diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/.next/dev/build-manifest.json b/.next/dev/build-manifest.json new file mode 100644 index 0000000..7d41cf9 --- /dev/null +++ b/.next/dev/build-manifest.json @@ -0,0 +1,26 @@ +{ + "pages": { + "/_app": [] + }, + "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/[root-of-the-server]__0d-m0h0._.js b/.next/dev/build/chunks/[root-of-the-server]__0d-m0h0._.js new file mode 100644 index 0000000..2173d15 --- /dev/null +++ b/.next/dev/build/chunks/[root-of-the-server]__0d-m0h0._.js @@ -0,0 +1,206 @@ +module.exports = [ +"[externals]/path [external] (path, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("path", () => require("path")); + +module.exports = mod; +}), +"[externals]/url [external] (url, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("url", () => require("url")); + +module.exports = mod; +}), +"[externals]/fs [external] (fs, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("fs", () => require("fs")); + +module.exports = mod; +}), +"[project]/postcss.config.mjs [postcss] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "default", + ()=>__TURBOPACK__default__export__ +]); +const config = { + plugins: { + "@tailwindcss/postcss": {} + } +}; +const __TURBOPACK__default__export__ = config; +}), +"[turbopack-node]/transforms/transforms.ts [postcss] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +/** + * Shared utilities for our 2 transform implementations. + */ __turbopack_context__.s([ + "fromPath", + ()=>fromPath, + "getReadEnvVariables", + ()=>getReadEnvVariables, + "toPath", + ()=>toPath +]); +var __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__ = __turbopack_context__.i("[externals]/path [external] (path, cjs)"); +; +const contextDir = process.cwd(); +const toPath = (file)=>{ + const relPath = (0, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["relative"])(contextDir, file); + if ((0, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["isAbsolute"])(relPath)) { + throw new Error(`Cannot depend on path (${file}) outside of root directory (${contextDir})`); + } + return __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["sep"] !== '/' ? relPath.replaceAll(__TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["sep"], '/') : relPath; +}; +const fromPath = (path)=>{ + return (0, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["join"])(/* turbopackIgnore: true */ contextDir, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["sep"] !== '/' ? path.replaceAll('/', __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["sep"]) : path); +}; +// Patch process.env to track which env vars are read +const originalEnv = process.env; +const readEnvVars = new Set(); +process.env = new Proxy(originalEnv, { + get (target, prop) { + if (typeof prop === 'string') { + // We register the env var as dependency on the + // current transform and all future transforms + // since the env var might be cached in module scope + // and influence them all + readEnvVars.add(prop); + } + return Reflect.get(target, prop); + }, + set (target, prop, value) { + return Reflect.set(target, prop, value); + } +}); +function getReadEnvVariables() { + return Array.from(readEnvVars); +} +}), +"[turbopack-node]/transforms/postcss.ts { CONFIG => \"[project]/postcss.config.mjs [postcss] (ecmascript)\" } [postcss] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "default", + ()=>transform, + "init", + ()=>init +]); +// @ts-ignore +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$mjs__$5b$postcss$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/postcss/lib/postcss.mjs [postcss] (ecmascript)"); +// @ts-ignore +var __TURBOPACK__imported__module__$5b$project$5d2f$postcss$2e$config$2e$mjs__$5b$postcss$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/postcss.config.mjs [postcss] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/transforms/transforms.ts [postcss] (ecmascript)"); +; +; +; +let processor; +const init = async (ipc)=>{ + let config = __TURBOPACK__imported__module__$5b$project$5d2f$postcss$2e$config$2e$mjs__$5b$postcss$5d$__$28$ecmascript$29$__["default"]; + if (typeof config === 'function') { + config = await config({ + env: 'development' + }); + } + if (typeof config === 'undefined') { + throw new Error('PostCSS config is undefined (make sure to export an function or object from config file)'); + } + let plugins; + if (Array.isArray(config.plugins)) { + plugins = config.plugins.map((plugin)=>{ + if (Array.isArray(plugin)) { + return plugin; + } else if (typeof plugin === 'string') { + return [ + plugin, + {} + ]; + } else { + return plugin; + } + }); + } else if (typeof config.plugins === 'object') { + plugins = Object.entries(config.plugins).filter(([, options])=>options); + } else { + plugins = []; + } + const loadedPlugins = plugins.map((plugin)=>{ + if (Array.isArray(plugin)) { + const [arg, options] = plugin; + let pluginFactory = arg; + if (typeof pluginFactory === 'string') { + pluginFactory = require(/* turbopackIgnore: true */ pluginFactory); + } + if (pluginFactory.default) { + pluginFactory = pluginFactory.default; + } + return pluginFactory(options); + } + return plugin; + }); + processor = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$mjs__$5b$postcss$5d$__$28$ecmascript$29$__["default"])(loadedPlugins); +}; +async function transform(ipc, cssContent, name, sourceMap) { + const { css, map, messages } = await processor.process(cssContent, { + from: name, + to: name, + map: sourceMap ? { + inline: false, + annotation: false + } : undefined + }); + const assets = []; + const filePaths = []; + const buildFilePaths = []; + const directories = []; + for (const msg of messages){ + switch(msg.type){ + case 'asset': + assets.push({ + file: msg.file, + content: msg.content, + sourceMap: !sourceMap ? undefined : typeof msg.sourceMap === 'string' ? msg.sourceMap : JSON.stringify(msg.sourceMap) + }); + break; + case 'dependency': + case 'missing-dependency': + filePaths.push((0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__["toPath"])(msg.file)); + break; + case 'build-dependency': + buildFilePaths.push((0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__["toPath"])(msg.file)); + break; + case 'dir-dependency': + directories.push([ + (0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__["toPath"])(msg.dir), + msg.glob + ]); + break; + case 'context-dependency': + directories.push([ + (0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__["toPath"])(msg.dir), + '**' + ]); + break; + default: + break; + } + } + ipc.sendInfo({ + type: 'dependencies', + filePaths, + directories, + buildFilePaths, + envVariables: (0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__["getReadEnvVariables"])() + }); + return { + css, + map: sourceMap ? JSON.stringify(map) : undefined, + assets + }; +} +}), +]; + +//# sourceMappingURL=%5Broot-of-the-server%5D__0d-m0h0._.js.map \ No newline at end of file diff --git a/.next/dev/build/chunks/[root-of-the-server]__0d-m0h0._.js.map b/.next/dev/build/chunks/[root-of-the-server]__0d-m0h0._.js.map new file mode 100644 index 0000000..6bd02b4 --- /dev/null +++ b/.next/dev/build/chunks/[root-of-the-server]__0d-m0h0._.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "sources": [], + "sections": [ + {"offset": {"line": 22, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/postcss.config.mjs"],"sourcesContent":["const config = {\n plugins: {\n \"@tailwindcss/postcss\": {},\n },\n};\n\nexport default config;\n"],"names":["config","plugins"],"mappings":";;;;AAAA,MAAMA,SAAS;IACbC,SAAS;QACP,wBAAwB,CAAC;IAC3B;AACF;uCAEeD"}}, + {"offset": {"line": 36, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/transforms/transforms.ts"],"sourcesContent":["/**\n * Shared utilities for our 2 transform implementations.\n */\n\nimport type { Channel as Ipc } from '../types'\nimport { relative, isAbsolute, join, sep } from 'path'\nimport { type StructuredError } from '../error'\nimport { type StackFrame } from '../compiled/stacktrace-parser'\n\nexport type IpcInfoMessage =\n | {\n type: 'dependencies'\n envVariables?: string[]\n directories?: Array<[string, string]>\n filePaths?: string[]\n buildFilePaths?: string[]\n }\n | {\n type: 'emittedError'\n severity: 'warning' | 'error'\n error: StructuredError\n }\n | {\n type: 'log'\n logs: Array<{\n time: number\n logType: string\n args: any[]\n trace?: StackFrame[]\n }>\n }\n\nexport type IpcRequestMessage =\n | {\n type: 'resolve'\n options: any\n lookupPath: string\n request: string\n }\n | {\n type: 'trackFileRead'\n file: string\n }\n\nexport type TransformIpc = Ipc\n\nconst contextDir = process.cwd()\nexport const toPath = (file: string) => {\n const relPath = relative(contextDir, file)\n if (isAbsolute(relPath)) {\n throw new Error(\n `Cannot depend on path (${file}) outside of root directory (${contextDir})`\n )\n }\n return sep !== '/' ? relPath.replaceAll(sep, '/') : relPath\n}\nexport const fromPath = (path: string) => {\n return join(\n /* turbopackIgnore: true */ contextDir,\n sep !== '/' ? path.replaceAll('/', sep) : path\n )\n}\n\n// Patch process.env to track which env vars are read\nconst originalEnv = process.env\nconst readEnvVars = new Set()\nprocess.env = new Proxy(originalEnv, {\n get(target, prop) {\n if (typeof prop === 'string') {\n // We register the env var as dependency on the\n // current transform and all future transforms\n // since the env var might be cached in module scope\n // and influence them all\n readEnvVars.add(prop)\n }\n return Reflect.get(target, prop)\n },\n set(target, prop, value) {\n return Reflect.set(target, prop, value)\n },\n})\n\nexport function getReadEnvVariables(): string[] {\n return Array.from(readEnvVars)\n}\n"],"names":["contextDir","process","cwd","toPath","file","relPath","Error","replaceAll","fromPath","path","originalEnv","env","readEnvVars","Set","Proxy","get","target","prop","add","Reflect","set","value","getReadEnvVariables","Array","from"],"mappings":"AAAA;;CAEC;;;;;;;;AAGD;;AAyCA,MAAMA,aAAaC,QAAQC,GAAG;AACvB,MAAMC,SAAS,CAACC;IACrB,MAAMC,UAAU,IAAA,6GAAQ,EAACL,YAAYI;IACrC,IAAI,IAAA,+GAAU,EAACC,UAAU;QACvB,MAAM,IAAIC,MACR,CAAC,uBAAuB,EAAEF,KAAK,6BAA6B,EAAEJ,WAAW,CAAC,CAAC;IAE/E;IACA,OAAO,wGAAG,KAAK,MAAMK,QAAQE,UAAU,CAAC,wGAAG,EAAE,OAAOF;AACtD;AACO,MAAMG,WAAW,CAACC;IACvB,OAAO,IAAA,yGAAI,EACT,yBAAyB,GAAGT,YAC5B,wGAAG,KAAK,MAAMS,KAAKF,UAAU,CAAC,KAAK,wGAAG,IAAIE;AAE9C;AAEA,qDAAqD;AACrD,MAAMC,cAAcT,QAAQU,GAAG;AAC/B,MAAMC,cAAc,IAAIC;AACxBZ,QAAQU,GAAG,GAAG,IAAIG,MAAMJ,aAAa;IACnCK,KAAIC,MAAM,EAAEC,IAAI;QACd,IAAI,OAAOA,SAAS,UAAU;YAC5B,+CAA+C;YAC/C,8CAA8C;YAC9C,oDAAoD;YACpD,yBAAyB;YACzBL,YAAYM,GAAG,CAACD;QAClB;QACA,OAAOE,QAAQJ,GAAG,CAACC,QAAQC;IAC7B;IACAG,KAAIJ,MAAM,EAAEC,IAAI,EAAEI,KAAK;QACrB,OAAOF,QAAQC,GAAG,CAACJ,QAAQC,MAAMI;IACnC;AACF;AAEO,SAASC;IACd,OAAOC,MAAMC,IAAI,CAACZ;AACpB"}}, + {"offset": {"line": 84, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/transforms/postcss.ts"],"sourcesContent":["declare const __turbopack_external_require__: (\n id: string,\n thunk: () => any,\n esm?: boolean\n) => any\n\nimport type { Processor } from 'postcss'\n\n// @ts-ignore\nimport postcss from '@vercel/turbopack/postcss'\n// @ts-ignore\nimport importedConfig from 'CONFIG'\nimport { getReadEnvVariables, toPath, type TransformIpc } from './transforms'\n\nlet processor: Processor | undefined\n\nexport const init = async (ipc: TransformIpc) => {\n let config = importedConfig\n if (typeof config === 'function') {\n config = await config({ env: 'development' })\n }\n if (typeof config === 'undefined') {\n throw new Error(\n 'PostCSS config is undefined (make sure to export an function or object from config file)'\n )\n }\n let plugins: any[]\n if (Array.isArray(config.plugins)) {\n plugins = config.plugins.map((plugin: [string, any] | string | any) => {\n if (Array.isArray(plugin)) {\n return plugin\n } else if (typeof plugin === 'string') {\n return [plugin, {}]\n } else {\n return plugin\n }\n })\n } else if (typeof config.plugins === 'object') {\n plugins = Object.entries(config.plugins).filter(([, options]) => options)\n } else {\n plugins = []\n }\n const loadedPlugins = plugins.map((plugin) => {\n if (Array.isArray(plugin)) {\n const [arg, options] = plugin\n let pluginFactory = arg\n\n if (typeof pluginFactory === 'string') {\n pluginFactory = require(/* turbopackIgnore: true */ pluginFactory)\n }\n\n if (pluginFactory.default) {\n pluginFactory = pluginFactory.default\n }\n\n return pluginFactory(options)\n }\n return plugin\n })\n\n processor = postcss(loadedPlugins)\n}\n\nexport default async function transform(\n ipc: TransformIpc,\n cssContent: string,\n name: string,\n sourceMap: boolean\n) {\n const { css, map, messages } = await processor!.process(cssContent, {\n from: name,\n to: name,\n map: sourceMap\n ? {\n inline: false,\n annotation: false,\n }\n : undefined,\n })\n\n const assets = []\n const filePaths: string[] = []\n const buildFilePaths: string[] = []\n const directories: Array<[string, string]> = []\n\n for (const msg of messages) {\n switch (msg.type) {\n case 'asset':\n assets.push({\n file: msg.file,\n content: msg.content,\n sourceMap: !sourceMap\n ? undefined\n : typeof msg.sourceMap === 'string'\n ? msg.sourceMap\n : JSON.stringify(msg.sourceMap),\n // There is also an info field, which we currently ignore\n })\n break\n case 'dependency':\n case 'missing-dependency':\n filePaths.push(toPath(msg.file))\n break\n case 'build-dependency':\n buildFilePaths.push(toPath(msg.file))\n break\n case 'dir-dependency':\n directories.push([toPath(msg.dir), msg.glob])\n break\n case 'context-dependency':\n directories.push([toPath(msg.dir), '**'])\n break\n default:\n // TODO: do we need to do anything here?\n break\n }\n }\n ipc.sendInfo({\n type: 'dependencies',\n filePaths,\n directories,\n buildFilePaths,\n envVariables: getReadEnvVariables(),\n })\n return {\n css,\n map: sourceMap ? JSON.stringify(map) : undefined,\n assets,\n }\n}\n"],"names":["processor","init","ipc","config","env","Error","plugins","Array","isArray","map","plugin","Object","entries","filter","options","loadedPlugins","arg","pluginFactory","require","default","transform","cssContent","name","sourceMap","css","messages","process","from","to","inline","annotation","undefined","assets","filePaths","buildFilePaths","directories","msg","type","push","file","content","JSON","stringify","dir","glob","sendInfo","envVariables"],"mappings":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,EAAE,GAAG,MAAMzB,UAAW0B,OAAO,CAACL,YAAY;QAClEM,MAAML;QACNM,IAAIN;QACJb,KAAKc,YACD;YACEM,QAAQ;YACRC,YAAY;QACd,IACAC;IACN;IAEA,MAAMC,SAAS,EAAE;IACjB,MAAMC,YAAsB,EAAE;IAC9B,MAAMC,iBAA2B,EAAE;IACnC,MAAMC,cAAuC,EAAE;IAE/C,KAAK,MAAMC,OAAOX,SAAU;QAC1B,OAAQW,IAAIC,IAAI;YACd,KAAK;gBACHL,OAAOM,IAAI,CAAC;oBACVC,MAAMH,IAAIG,IAAI;oBACdC,SAASJ,IAAII,OAAO;oBACpBjB,WAAW,CAACA,YACRQ,YACA,OAAOK,IAAIb,SAAS,KAAK,WACvBa,IAAIb,SAAS,GACbkB,KAAKC,SAAS,CAACN,IAAIb,SAAS;gBAEpC;gBACA;YACF,KAAK;YACL,KAAK;gBACHU,UAAUK,IAAI,CAAC,IAAA,yIAAM,EAACF,IAAIG,IAAI;gBAC9B;YACF,KAAK;gBACHL,eAAeI,IAAI,CAAC,IAAA,yIAAM,EAACF,IAAIG,IAAI;gBACnC;YACF,KAAK;gBACHJ,YAAYG,IAAI,CAAC;oBAAC,IAAA,yIAAM,EAACF,IAAIO,GAAG;oBAAGP,IAAIQ,IAAI;iBAAC;gBAC5C;YACF,KAAK;gBACHT,YAAYG,IAAI,CAAC;oBAAC,IAAA,yIAAM,EAACF,IAAIO,GAAG;oBAAG;iBAAK;gBACxC;YACF;gBAEE;QACJ;IACF;IACAzC,IAAI2C,QAAQ,CAAC;QACXR,MAAM;QACNJ;QACAE;QACAD;QACAY,cAAc,IAAA,sJAAmB;IACnC;IACA,OAAO;QACLtB;QACAf,KAAKc,YAAYkB,KAAKC,SAAS,CAACjC,OAAOsB;QACvCC;IACF;AACF"}}] +} \ No newline at end of file diff --git a/.next/dev/build/chunks/[root-of-the-server]__0iz~thn._.js b/.next/dev/build/chunks/[root-of-the-server]__0iz~thn._.js new file mode 100644 index 0000000..b389fc7 --- /dev/null +++ b/.next/dev/build/chunks/[root-of-the-server]__0iz~thn._.js @@ -0,0 +1,476 @@ +module.exports = [ +"[externals]/path [external] (path, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("path", () => require("path")); + +module.exports = mod; +}), +"[turbopack-node]/transforms/transforms.ts [webpack_loaders] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +/** + * Shared utilities for our 2 transform implementations. + */ __turbopack_context__.s([ + "fromPath", + ()=>fromPath, + "getReadEnvVariables", + ()=>getReadEnvVariables, + "toPath", + ()=>toPath +]); +var __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__ = __turbopack_context__.i("[externals]/path [external] (path, cjs)"); +; +const contextDir = process.cwd(); +const toPath = (file)=>{ + const relPath = (0, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["relative"])(contextDir, file); + if ((0, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["isAbsolute"])(relPath)) { + throw new Error(`Cannot depend on path (${file}) outside of root directory (${contextDir})`); + } + return __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["sep"] !== '/' ? relPath.replaceAll(__TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["sep"], '/') : relPath; +}; +const fromPath = (path)=>{ + return (0, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["join"])(/* turbopackIgnore: true */ contextDir, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["sep"] !== '/' ? path.replaceAll('/', __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["sep"]) : path); +}; +// Patch process.env to track which env vars are read +const originalEnv = process.env; +const readEnvVars = new Set(); +process.env = new Proxy(originalEnv, { + get (target, prop) { + if (typeof prop === 'string') { + // We register the env var as dependency on the + // current transform and all future transforms + // since the env var might be cached in module scope + // and influence them all + readEnvVars.add(prop); + } + return Reflect.get(target, prop); + }, + set (target, prop, value) { + return Reflect.set(target, prop, value); + } +}); +function getReadEnvVariables() { + return Array.from(readEnvVars); +} +}), +"[externals]/fs [external] (fs, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("fs", () => require("fs")); + +module.exports = mod; +}), +"[externals]/next/dist/compiled/loader-runner [external] (next/dist/compiled/loader-runner, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("next/dist/compiled/loader-runner", () => require("next/dist/compiled/loader-runner")); + +module.exports = mod; +}), +"[turbopack-node]/transforms/webpack-loaders.ts [webpack_loaders] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "default", + ()=>transform +]); +var __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__ = __turbopack_context__.i("[externals]/path [external] (path, cjs)"); +var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$compiled$2f$stacktrace$2d$parser$2f$index$2e$js__$5b$webpack_loaders$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/compiled/stacktrace-parser/index.js [webpack_loaders] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$error$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/error.ts [webpack_loaders] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/transforms/transforms.ts [webpack_loaders] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$externals$5d2f$fs__$5b$external$5d$__$28$fs$2c$__cjs$29$__ = __turbopack_context__.i("[externals]/fs [external] (fs, cjs)"); +; +; +; +; +; +; +const { runLoaders } = __turbopack_context__.r("[externals]/next/dist/compiled/loader-runner [external] (next/dist/compiled/loader-runner, cjs)"); +const contextDir = process.cwd(); +const LogType = Object.freeze({ + error: 'error', + warn: 'warn', + info: 'info', + log: 'log', + debug: 'debug', + trace: 'trace', + group: 'group', + groupCollapsed: 'groupCollapsed', + groupEnd: 'groupEnd', + profile: 'profile', + profileEnd: 'profileEnd', + time: 'time', + clear: 'clear', + status: 'status' +}); +const loaderFlag = 'LOADER_EXECUTION'; +const cutOffByFlag = (stack, flag)=>{ + const errorStack = stack.split('\n'); + for(let i = 0; i < errorStack.length; i++){ + if (errorStack[i].includes(flag)) { + errorStack.length = i; + } + } + return errorStack.join('\n'); +}; +/** + * @param stack stack trace + * @returns stack trace without the loader execution flag included + */ const cutOffLoaderExecution = (stack)=>cutOffByFlag(stack, loaderFlag); +class DummySpan { + traceChild() { + return new DummySpan(); + } + traceFn(fn) { + return fn(this); + } + async traceAsyncFn(fn) { + return await fn(this); + } + stop() { + return; + } +} +const transform = (ipc, content, name, query, loaders, sourceMap)=>{ + return new Promise((resolve, reject)=>{ + const resource = (0, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["resolve"])(contextDir, name); + const resourceDir = (0, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["dirname"])(resource); + const loadersWithOptions = loaders.map((loader)=>typeof loader === 'string' ? { + loader, + options: {} + } : loader); + const logs = []; + runLoaders({ + resource: resource + query, + context: { + _module: { + // For debugging purpose, if someone find context is not full compatible to + // webpack they can guess this comes from turbopack + __reserved: 'TurbopackContext' + }, + currentTraceSpan: new DummySpan(), + rootContext: contextDir, + sourceMap, + getOptions () { + const entry = this.loaders[this.loaderIndex]; + return entry.options && typeof entry.options === 'object' ? entry.options : {}; + }, + fs: { + readFile (p, optionsOrCb, maybeCb) { + ipc.sendRequest({ + type: 'trackFileRead', + file: (0, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["relative"])(contextDir, (0, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["resolve"])(p)) + }).then(()=>{ + __TURBOPACK__imported__module__$5b$externals$5d2f$fs__$5b$external$5d$__$28$fs$2c$__cjs$29$__["default"].readFile(p, optionsOrCb, maybeCb); + }, (err)=>{ + ipc.sendError(err); + // sendError is going to stop the process, no need to call callback + }); + } + }, + getResolve: (options)=>{ + const rustOptions = { + aliasFields: undefined, + conditionNames: undefined, + noPackageJson: false, + extensions: undefined, + mainFields: undefined, + noExportsField: false, + mainFiles: undefined, + noModules: false, + preferRelative: false + }; + if (options.alias) { + if (!Array.isArray(options.alias) || options.alias.length > 0) { + throw new Error('alias resolve option is not supported'); + } + } + if (options.aliasFields) { + if (!Array.isArray(options.aliasFields)) { + throw new Error('aliasFields resolve option must be an array'); + } + rustOptions.aliasFields = options.aliasFields; + } + if (options.conditionNames) { + if (!Array.isArray(options.conditionNames)) { + throw new Error('conditionNames resolve option must be an array'); + } + rustOptions.conditionNames = options.conditionNames; + } + if (options.descriptionFiles) { + if (!Array.isArray(options.descriptionFiles) || options.descriptionFiles.length > 0) { + throw new Error('descriptionFiles resolve option is not supported'); + } + rustOptions.noPackageJson = true; + } + if (options.extensions) { + if (!Array.isArray(options.extensions)) { + throw new Error('extensions resolve option must be an array'); + } + rustOptions.extensions = options.extensions; + } + if (options.mainFields) { + if (!Array.isArray(options.mainFields)) { + throw new Error('mainFields resolve option must be an array'); + } + rustOptions.mainFields = options.mainFields; + } + if (options.exportsFields) { + if (!Array.isArray(options.exportsFields) || options.exportsFields.length > 0) { + throw new Error('exportsFields resolve option is not supported'); + } + rustOptions.noExportsField = true; + } + if (options.mainFiles) { + if (!Array.isArray(options.mainFiles)) { + throw new Error('mainFiles resolve option must be an array'); + } + rustOptions.mainFiles = options.mainFiles; + } + if (options.modules) { + if (!Array.isArray(options.modules) || options.modules.length > 0) { + throw new Error('modules resolve option is not supported'); + } + rustOptions.noModules = true; + } + if (options.restrictions) { + // TODO This is ignored for now + } + if (options.dependencyType) { + // TODO This is ignored for now + } + if (options.preferRelative) { + if (typeof options.preferRelative !== 'boolean') { + throw new Error('preferRelative resolve option must be a boolean'); + } + rustOptions.preferRelative = options.preferRelative; + } + return (lookupPath, request, callback)=>{ + if (__TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["default"].isAbsolute(request)) { + // Relativize absolute requests. Turbopack disallow them in JS code, but here it's + // generated programatically and there is a smaller problem of + // non-cacheable/non-portable builds. + request = __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["default"].relative(lookupPath, request); + // On Windows, the path might be still absolute if it's on a different drive. Just + // let the resolver throw the error in that case. + if (!__TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["default"].isAbsolute(request) && request.split(__TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["default"].sep)[0] !== '..') { + request = './' + request; + } + } + const promise = ipc.sendRequest({ + type: 'resolve', + options: rustOptions, + lookupPath: (0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__["toPath"])(lookupPath), + request + }).then((unknownResult)=>{ + let result = unknownResult; + if (result && typeof result.path === 'string') { + return (0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__["fromPath"])(result.path); + } else { + throw Error('Expected { path: string } from resolve request'); + } + }); + if (callback) { + promise.then((result)=>callback(undefined, result), (err)=>callback(err)).catch((err)=>{ + ipc.sendError(err); + }); + } else { + return promise; + } + }; + }, + emitWarning: makeErrorEmitter('warning', ipc), + emitError: makeErrorEmitter('error', ipc), + getLogger (name) { + const logFn = (logType, ...args)=>{ + let trace; + switch(logType){ + case LogType.warn: + case LogType.error: + case LogType.trace: + case LogType.debug: + trace = (0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$compiled$2f$stacktrace$2d$parser$2f$index$2e$js__$5b$webpack_loaders$5d$__$28$ecmascript$29$__["parse"])(cutOffLoaderExecution(new Error('Trace').stack).split('\n').slice(3).join('\n')); + break; + default: + break; + } + // Batch logs messages to be sent at the end + logs.push({ + time: Date.now(), + logType, + args, + trace + }); + }; + let timers; + let timersAggregates; + // See https://github.com/webpack/webpack/blob/a48c34b34d2d6c44f9b2b221d7baf278d34ac0be/lib/logging/Logger.js#L8 + return { + error: logFn.bind(this, LogType.error), + warn: logFn.bind(this, LogType.warn), + info: logFn.bind(this, LogType.info), + log: logFn.bind(this, LogType.log), + debug: logFn.bind(this, LogType.debug), + assert: (assertion, ...args)=>{ + if (!assertion) { + logFn(LogType.error, ...args); + } + }, + trace: logFn.bind(this, LogType.trace), + clear: logFn.bind(this, LogType.clear), + status: logFn.bind(this, LogType.status), + group: logFn.bind(this, LogType.group), + groupCollapsed: logFn.bind(this, LogType.groupCollapsed), + groupEnd: logFn.bind(this, LogType.groupEnd), + profile: logFn.bind(this, LogType.profile), + profileEnd: logFn.bind(this, LogType.profileEnd), + time: (label)=>{ + timers = timers || new Map(); + timers.set(label, process.hrtime()); + }, + timeLog: (label)=>{ + const prev = timers && timers.get(label); + if (!prev) { + throw new Error(`No such label '${label}' for WebpackLogger.timeLog()`); + } + const time = process.hrtime(prev); + logFn(LogType.time, [ + label, + ...time + ]); + }, + timeEnd: (label)=>{ + const prev = timers && timers.get(label); + if (!prev) { + throw new Error(`No such label '${label}' for WebpackLogger.timeEnd()`); + } + const time = process.hrtime(prev); + /** @type {Map} */ timers.delete(label); + logFn(LogType.time, [ + label, + ...time + ]); + }, + timeAggregate: (label)=>{ + const prev = timers && timers.get(label); + if (!prev) { + throw new Error(`No such label '${label}' for WebpackLogger.timeAggregate()`); + } + const time = process.hrtime(prev); + /** @type {Map} */ timers.delete(label); + /** @type {Map} */ timersAggregates = timersAggregates || new Map(); + const current = timersAggregates.get(label); + if (current !== undefined) { + if (time[1] + current[1] > 1e9) { + time[0] += current[0] + 1; + time[1] = time[1] - 1e9 + current[1]; + } else { + time[0] += current[0]; + time[1] += current[1]; + } + } + timersAggregates.set(label, time); + }, + timeAggregateEnd: (label)=>{ + if (timersAggregates === undefined) return; + const time = timersAggregates.get(label); + if (time === undefined) return; + timersAggregates.delete(label); + logFn(LogType.time, [ + label, + ...time + ]); + } + }; + } + }, + loaders: loadersWithOptions.map((loader)=>({ + loader: /*TURBOPACK member replacement*/ __turbopack_context__.x.resolve(loader.loader, { + paths: [ + contextDir, + resourceDir + ] + }), + options: loader.options + })), + readResource: (_filename, callback)=>{ + // TODO assuming that filename === resource, but loaders might change that + let data = typeof content === 'string' ? Buffer.from(content, 'utf-8') : Buffer.from(content.binary, 'base64'); + callback(null, data); + } + }, (err, result)=>{ + if (logs.length) { + ipc.sendInfo({ + type: 'log', + logs: logs + }); + logs.length = 0; + } + ipc.sendInfo({ + type: 'dependencies', + envVariables: (0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__["getReadEnvVariables"])(), + filePaths: result.fileDependencies.map(__TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__["toPath"]), + directories: result.contextDependencies.map((dep)=>[ + (0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__["toPath"])(dep), + '**' + ]) + }); + if (err) { + // Resolve loader paths to include in the error message using + // the same "(from ...)" style as webpack's format-webpack-messages. + const loaderPathList = loadersWithOptions.map((l)=>{ + try { + return /*TURBOPACK member replacement*/ __turbopack_context__.x.resolve(l.loader, { + paths: [ + contextDir, + resourceDir + ] + }); + } catch { + return l.loader; + } + }); + const loaderPaths = loaderPathList.join(', '); + if (!(err instanceof Error)) { + // String throws lose their stack trace, so we create a + // synthetic one pointing at the loader. + const wrappedErr = new Error(`${String(err)}\n (from ${loaderPaths})`); + wrappedErr.stack = `Error: ${String(err)}\n at loader (${loaderPaths})`; + return reject(wrappedErr); + } + // Only append "(from ...)" when no loader path is already + // visible in the stack trace, to avoid redundant noise. + const stack = typeof err.stack === 'string' ? err.stack : ''; + if (!loaderPathList.some((p)=>stack.includes(p))) { + err.message += `\n (from ${loaderPaths})`; + } + return reject(err); + } + if (!result.result) return reject(new Error('No result from loaders')); + const [source, map] = result.result; + const resolvedValue = { + source: Buffer.isBuffer(source) ? { + binary: source.toString('base64') + } : source, + map: typeof map === 'string' ? map : typeof map === 'object' ? JSON.stringify(map) : undefined + }; + // Delay resolution by one event loop turn to catch deferred errors + // from loaders (e.g. unhandled Promise rejections, setTimeout throws). + // During this delay, uncaughtException/unhandledRejection handlers can + // fire and send the error via IPC before we send the 'end' message. + setTimeout(()=>resolve(resolvedValue), 0); + }); + }); +}; +; +function makeErrorEmitter(severity, ipc) { + return function(error) { + ipc.sendInfo({ + type: 'emittedError', + severity: severity, + error: (0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$error$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__["structuredError"])(error) + }); + }; +} +}), +]; + +//# sourceMappingURL=%5Broot-of-the-server%5D__0iz~thn._.js.map \ No newline at end of file diff --git a/.next/dev/build/chunks/[root-of-the-server]__0iz~thn._.js.map b/.next/dev/build/chunks/[root-of-the-server]__0iz~thn._.js.map new file mode 100644 index 0000000..e71986b --- /dev/null +++ b/.next/dev/build/chunks/[root-of-the-server]__0iz~thn._.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": [], + "sections": [ + {"offset": {"line": 10, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/transforms/transforms.ts"],"sourcesContent":["/**\n * Shared utilities for our 2 transform implementations.\n */\n\nimport type { Channel as Ipc } from '../types'\nimport { relative, isAbsolute, join, sep } from 'path'\nimport { type StructuredError } from '../error'\nimport { type StackFrame } from '../compiled/stacktrace-parser'\n\nexport type IpcInfoMessage =\n | {\n type: 'dependencies'\n envVariables?: string[]\n directories?: Array<[string, string]>\n filePaths?: string[]\n buildFilePaths?: string[]\n }\n | {\n type: 'emittedError'\n severity: 'warning' | 'error'\n error: StructuredError\n }\n | {\n type: 'log'\n logs: Array<{\n time: number\n logType: string\n args: any[]\n trace?: StackFrame[]\n }>\n }\n\nexport type IpcRequestMessage =\n | {\n type: 'resolve'\n options: any\n lookupPath: string\n request: string\n }\n | {\n type: 'trackFileRead'\n file: string\n }\n\nexport type TransformIpc = Ipc\n\nconst contextDir = process.cwd()\nexport const toPath = (file: string) => {\n const relPath = relative(contextDir, file)\n if (isAbsolute(relPath)) {\n throw new Error(\n `Cannot depend on path (${file}) outside of root directory (${contextDir})`\n )\n }\n return sep !== '/' ? relPath.replaceAll(sep, '/') : relPath\n}\nexport const fromPath = (path: string) => {\n return join(\n /* turbopackIgnore: true */ contextDir,\n sep !== '/' ? path.replaceAll('/', sep) : path\n )\n}\n\n// Patch process.env to track which env vars are read\nconst originalEnv = process.env\nconst readEnvVars = new Set()\nprocess.env = new Proxy(originalEnv, {\n get(target, prop) {\n if (typeof prop === 'string') {\n // We register the env var as dependency on the\n // current transform and all future transforms\n // since the env var might be cached in module scope\n // and influence them all\n readEnvVars.add(prop)\n }\n return Reflect.get(target, prop)\n },\n set(target, prop, value) {\n return Reflect.set(target, prop, value)\n },\n})\n\nexport function getReadEnvVariables(): string[] {\n return Array.from(readEnvVars)\n}\n"],"names":["contextDir","process","cwd","toPath","file","relPath","Error","replaceAll","fromPath","path","originalEnv","env","readEnvVars","Set","Proxy","get","target","prop","add","Reflect","set","value","getReadEnvVariables","Array","from"],"mappings":"AAAA;;CAEC;;;;;;;;AAGD;;AAyCA,MAAMA,aAAaC,QAAQC,GAAG;AACvB,MAAMC,SAAS,CAACC;IACrB,MAAMC,UAAU,IAAA,6GAAQ,EAACL,YAAYI;IACrC,IAAI,IAAA,+GAAU,EAACC,UAAU;QACvB,MAAM,IAAIC,MACR,CAAC,uBAAuB,EAAEF,KAAK,6BAA6B,EAAEJ,WAAW,CAAC,CAAC;IAE/E;IACA,OAAO,wGAAG,KAAK,MAAMK,QAAQE,UAAU,CAAC,wGAAG,EAAE,OAAOF;AACtD;AACO,MAAMG,WAAW,CAACC;IACvB,OAAO,IAAA,yGAAI,EACT,yBAAyB,GAAGT,YAC5B,wGAAG,KAAK,MAAMS,KAAKF,UAAU,CAAC,KAAK,wGAAG,IAAIE;AAE9C;AAEA,qDAAqD;AACrD,MAAMC,cAAcT,QAAQU,GAAG;AAC/B,MAAMC,cAAc,IAAIC;AACxBZ,QAAQU,GAAG,GAAG,IAAIG,MAAMJ,aAAa;IACnCK,KAAIC,MAAM,EAAEC,IAAI;QACd,IAAI,OAAOA,SAAS,UAAU;YAC5B,+CAA+C;YAC/C,8CAA8C;YAC9C,oDAAoD;YACpD,yBAAyB;YACzBL,YAAYM,GAAG,CAACD;QAClB;QACA,OAAOE,QAAQJ,GAAG,CAACC,QAAQC;IAC7B;IACAG,KAAIJ,MAAM,EAAEC,IAAI,EAAEI,KAAK;QACrB,OAAOF,QAAQC,GAAG,CAACJ,QAAQC,MAAMI;IACnC;AACF;AAEO,SAASC;IACd,OAAOC,MAAMC,IAAI,CAACZ;AACpB"}}, + {"offset": {"line": 70, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/transforms/webpack-loaders.ts"],"sourcesContent":["declare const __turbopack_external_require__: {\n resolve: (name: string, opt?: { paths: string[] }) => string\n} & ((id: string, thunk: () => any, esm?: boolean) => any)\n\nimport type { Channel as Ipc } from '../types'\nimport { dirname, resolve as pathResolve, relative } from 'path'\nimport {\n StackFrame,\n parse as parseStackTrace,\n} from '../compiled/stacktrace-parser'\nimport { structuredError, type StructuredError } from '../error'\nimport {\n fromPath,\n getReadEnvVariables,\n toPath,\n type TransformIpc,\n} from './transforms'\nimport fs from 'fs'\nimport path from 'path'\n\nexport type IpcInfoMessage =\n | {\n type: 'dependencies'\n envVariables?: string[]\n directories?: Array<[string, string]>\n filePaths?: string[]\n buildFilePaths?: string[]\n }\n | {\n type: 'emittedError'\n severity: 'warning' | 'error'\n error: StructuredError\n }\n | {\n type: 'log'\n logs: Array<{\n time: number\n logType: string\n args: any[]\n trace?: StackFrame[]\n }>\n }\n\nexport type IpcRequestMessage = {\n type: 'resolve'\n options: any\n lookupPath: string\n request: string\n}\n\ntype LoaderConfig =\n | string\n | {\n loader: string\n options: { [k: string]: unknown }\n }\n\nconst {\n runLoaders,\n}: typeof import('loader-runner') = require('@vercel/turbopack/loader-runner')\n\nconst contextDir = process.cwd()\n\nconst LogType = Object.freeze({\n error: 'error',\n warn: 'warn',\n info: 'info',\n log: 'log',\n debug: 'debug',\n\n trace: 'trace',\n\n group: 'group',\n groupCollapsed: 'groupCollapsed',\n groupEnd: 'groupEnd',\n\n profile: 'profile',\n profileEnd: 'profileEnd',\n\n time: 'time',\n\n clear: 'clear',\n status: 'status',\n})\n\nconst loaderFlag = 'LOADER_EXECUTION'\n\nconst cutOffByFlag = (stack: string, flag: string): string => {\n const errorStack = stack.split('\\n')\n for (let i = 0; i < errorStack.length; i++) {\n if (errorStack[i].includes(flag)) {\n errorStack.length = i\n }\n }\n return errorStack.join('\\n')\n}\n\n/**\n * @param stack stack trace\n * @returns stack trace without the loader execution flag included\n */\nconst cutOffLoaderExecution = (stack: string): string =>\n cutOffByFlag(stack, loaderFlag)\n\nclass DummySpan {\n traceChild() {\n return new DummySpan()\n }\n\n traceFn(fn: (span: DummySpan) => T): T {\n return fn(this)\n }\n\n async traceAsyncFn(fn: (span: DummySpan) => T | Promise): Promise {\n return await fn(this)\n }\n\n stop() {\n return\n }\n}\n\ntype ResolveOptions = {\n dependencyType?: string\n alias?: Record | unknown[]\n aliasFields?: string[]\n cacheWithContext?: boolean\n conditionNames?: string[]\n descriptionFiles?: string[]\n enforceExtension?: boolean\n extensionAlias: Record\n extensions?: string[]\n fallback?: Record\n mainFields?: string[]\n mainFiles?: string[]\n exportsFields?: string[]\n modules?: string[]\n plugins?: unknown[]\n symlinks?: boolean\n unsafeCache?: boolean\n useSyncFileSystemCalls?: boolean\n preferRelative?: boolean\n preferAbsolute?: boolean\n restrictions?: unknown[]\n roots?: string[]\n importFields?: string[]\n}\n\nconst transform = (\n ipc: TransformIpc,\n content: string | { binary: string },\n name: string,\n query: string,\n loaders: LoaderConfig[],\n sourceMap: boolean\n) => {\n return new Promise((resolve, reject) => {\n const resource = pathResolve(contextDir, name)\n const resourceDir = dirname(resource)\n\n const loadersWithOptions = loaders.map((loader) =>\n typeof loader === 'string' ? { loader, options: {} } : loader\n )\n\n const logs: Array<{\n time: number\n logType: string\n args: unknown[]\n trace: StackFrame[] | undefined\n }> = []\n\n runLoaders(\n {\n resource: resource + query,\n context: {\n _module: {\n // For debugging purpose, if someone find context is not full compatible to\n // webpack they can guess this comes from turbopack\n __reserved: 'TurbopackContext',\n },\n currentTraceSpan: new DummySpan(),\n rootContext: contextDir,\n sourceMap,\n getOptions() {\n const entry = this.loaders[this.loaderIndex]\n return entry.options && typeof entry.options === 'object'\n ? entry.options\n : {}\n },\n fs: {\n readFile(p: string, optionsOrCb: any, maybeCb: any) {\n ipc\n .sendRequest({\n type: 'trackFileRead',\n file: relative(contextDir, pathResolve(p)),\n })\n .then(\n () => {\n fs.readFile(p, optionsOrCb, maybeCb)\n },\n (err) => {\n ipc.sendError(err)\n // sendError is going to stop the process, no need to call callback\n }\n )\n },\n },\n getResolve: (options: ResolveOptions) => {\n const rustOptions = {\n aliasFields: undefined as undefined | string[],\n conditionNames: undefined as undefined | string[],\n noPackageJson: false,\n extensions: undefined as undefined | string[],\n mainFields: undefined as undefined | string[],\n noExportsField: false,\n mainFiles: undefined as undefined | string[],\n noModules: false,\n preferRelative: false,\n }\n if (options.alias) {\n if (!Array.isArray(options.alias) || options.alias.length > 0) {\n throw new Error('alias resolve option is not supported')\n }\n }\n if (options.aliasFields) {\n if (!Array.isArray(options.aliasFields)) {\n throw new Error('aliasFields resolve option must be an array')\n }\n rustOptions.aliasFields = options.aliasFields\n }\n if (options.conditionNames) {\n if (!Array.isArray(options.conditionNames)) {\n throw new Error(\n 'conditionNames resolve option must be an array'\n )\n }\n rustOptions.conditionNames = options.conditionNames\n }\n if (options.descriptionFiles) {\n if (\n !Array.isArray(options.descriptionFiles) ||\n options.descriptionFiles.length > 0\n ) {\n throw new Error(\n 'descriptionFiles resolve option is not supported'\n )\n }\n rustOptions.noPackageJson = true\n }\n if (options.extensions) {\n if (!Array.isArray(options.extensions)) {\n throw new Error('extensions resolve option must be an array')\n }\n rustOptions.extensions = options.extensions\n }\n if (options.mainFields) {\n if (!Array.isArray(options.mainFields)) {\n throw new Error('mainFields resolve option must be an array')\n }\n rustOptions.mainFields = options.mainFields\n }\n if (options.exportsFields) {\n if (\n !Array.isArray(options.exportsFields) ||\n options.exportsFields.length > 0\n ) {\n throw new Error('exportsFields resolve option is not supported')\n }\n rustOptions.noExportsField = true\n }\n if (options.mainFiles) {\n if (!Array.isArray(options.mainFiles)) {\n throw new Error('mainFiles resolve option must be an array')\n }\n rustOptions.mainFiles = options.mainFiles\n }\n if (options.modules) {\n if (\n !Array.isArray(options.modules) ||\n options.modules.length > 0\n ) {\n throw new Error('modules resolve option is not supported')\n }\n rustOptions.noModules = true\n }\n if (options.restrictions) {\n // TODO This is ignored for now\n }\n if (options.dependencyType) {\n // TODO This is ignored for now\n }\n if (options.preferRelative) {\n if (typeof options.preferRelative !== 'boolean') {\n throw new Error(\n 'preferRelative resolve option must be a boolean'\n )\n }\n rustOptions.preferRelative = options.preferRelative\n }\n return (\n lookupPath: string,\n request: string,\n callback?: (err?: Error, result?: string) => void\n ) => {\n if (path.isAbsolute(request)) {\n // Relativize absolute requests. Turbopack disallow them in JS code, but here it's\n // generated programatically and there is a smaller problem of\n // non-cacheable/non-portable builds.\n request = path.relative(lookupPath, request)\n\n // On Windows, the path might be still absolute if it's on a different drive. Just\n // let the resolver throw the error in that case.\n if (\n !path.isAbsolute(request) &&\n request.split(path.sep)[0] !== '..'\n ) {\n request = './' + request\n }\n }\n\n const promise = ipc\n .sendRequest({\n type: 'resolve',\n options: rustOptions,\n lookupPath: toPath(lookupPath),\n request,\n })\n .then((unknownResult) => {\n let result = unknownResult as { path: string }\n if (result && typeof result.path === 'string') {\n return fromPath(result.path)\n } else {\n throw Error(\n 'Expected { path: string } from resolve request'\n )\n }\n })\n if (callback) {\n promise\n .then(\n (result) => callback(undefined, result),\n (err) => callback(err)\n )\n .catch((err) => {\n ipc.sendError(err)\n })\n } else {\n return promise\n }\n }\n },\n emitWarning: makeErrorEmitter('warning', ipc),\n emitError: makeErrorEmitter('error', ipc),\n getLogger(name: unknown) {\n const logFn = (logType: string, ...args: unknown[]) => {\n let trace: StackFrame[] | undefined\n switch (logType) {\n case LogType.warn:\n case LogType.error:\n case LogType.trace:\n case LogType.debug:\n trace = parseStackTrace(\n cutOffLoaderExecution(new Error('Trace').stack!)\n .split('\\n')\n .slice(3)\n .join('\\n')\n )\n break\n default:\n // TODO: do we need to handle this?\n break\n }\n // Batch logs messages to be sent at the end\n logs.push({\n time: Date.now(),\n logType,\n args,\n trace,\n })\n }\n let timers: Map | undefined\n let timersAggregates: Map | undefined\n\n // See https://github.com/webpack/webpack/blob/a48c34b34d2d6c44f9b2b221d7baf278d34ac0be/lib/logging/Logger.js#L8\n return {\n error: logFn.bind(this, LogType.error),\n warn: logFn.bind(this, LogType.warn),\n info: logFn.bind(this, LogType.info),\n log: logFn.bind(this, LogType.log),\n debug: logFn.bind(this, LogType.debug),\n assert: (assertion: boolean, ...args: any[]) => {\n if (!assertion) {\n logFn(LogType.error, ...args)\n }\n },\n trace: logFn.bind(this, LogType.trace),\n clear: logFn.bind(this, LogType.clear),\n status: logFn.bind(this, LogType.status),\n group: logFn.bind(this, LogType.group),\n groupCollapsed: logFn.bind(this, LogType.groupCollapsed),\n groupEnd: logFn.bind(this, LogType.groupEnd),\n profile: logFn.bind(this, LogType.profile),\n profileEnd: logFn.bind(this, LogType.profileEnd),\n time: (label: string) => {\n timers = timers || new Map()\n timers.set(label, process.hrtime())\n },\n timeLog: (label: string) => {\n const prev = timers && timers.get(label)\n if (!prev) {\n throw new Error(\n `No such label '${label}' for WebpackLogger.timeLog()`\n )\n }\n const time = process.hrtime(prev)\n logFn(LogType.time, [label, ...time])\n },\n timeEnd: (label: string) => {\n const prev = timers && timers.get(label)\n if (!prev) {\n throw new Error(\n `No such label '${label}' for WebpackLogger.timeEnd()`\n )\n }\n const time = process.hrtime(prev)\n /** @type {Map} */\n timers!.delete(label)\n logFn(LogType.time, [label, ...time])\n },\n timeAggregate: (label: string) => {\n const prev = timers && timers.get(label)\n if (!prev) {\n throw new Error(\n `No such label '${label}' for WebpackLogger.timeAggregate()`\n )\n }\n const time = process.hrtime(prev)\n /** @type {Map} */\n timers!.delete(label)\n /** @type {Map} */\n timersAggregates = timersAggregates || new Map()\n const current = timersAggregates.get(label)\n if (current !== undefined) {\n if (time[1] + current[1] > 1e9) {\n time[0] += current[0] + 1\n time[1] = time[1] - 1e9 + current[1]\n } else {\n time[0] += current[0]\n time[1] += current[1]\n }\n }\n timersAggregates.set(label, time)\n },\n timeAggregateEnd: (label: string) => {\n if (timersAggregates === undefined) return\n const time = timersAggregates.get(label)\n if (time === undefined) return\n timersAggregates.delete(label)\n logFn(LogType.time, [label, ...time])\n },\n }\n },\n },\n\n loaders: loadersWithOptions.map((loader) => ({\n loader: __turbopack_external_require__.resolve(loader.loader, {\n paths: [contextDir, resourceDir],\n }),\n options: loader.options,\n })),\n readResource: (_filename, callback) => {\n // TODO assuming that filename === resource, but loaders might change that\n let data =\n typeof content === 'string'\n ? Buffer.from(content, 'utf-8')\n : Buffer.from(content.binary, 'base64')\n callback(null, data)\n },\n },\n (err, result) => {\n if (logs.length) {\n ipc.sendInfo({ type: 'log', logs: logs })\n logs.length = 0\n }\n ipc.sendInfo({\n type: 'dependencies',\n envVariables: getReadEnvVariables(),\n filePaths: result.fileDependencies.map(toPath),\n directories: result.contextDependencies.map((dep) => [\n toPath(dep),\n '**',\n ]),\n })\n if (err) {\n // Resolve loader paths to include in the error message using\n // the same \"(from ...)\" style as webpack's format-webpack-messages.\n const loaderPathList = loadersWithOptions.map((l) => {\n try {\n return __turbopack_external_require__.resolve(l.loader, {\n paths: [contextDir, resourceDir],\n })\n } catch {\n return l.loader\n }\n })\n const loaderPaths = loaderPathList.join(', ')\n\n if (!(err instanceof Error)) {\n // String throws lose their stack trace, so we create a\n // synthetic one pointing at the loader.\n const wrappedErr = new Error(\n `${String(err)}\\n (from ${loaderPaths})`\n )\n wrappedErr.stack = `Error: ${String(err)}\\n at loader (${loaderPaths})`\n return reject(wrappedErr)\n }\n\n // Only append \"(from ...)\" when no loader path is already\n // visible in the stack trace, to avoid redundant noise.\n const stack = typeof err.stack === 'string' ? err.stack : ''\n if (!loaderPathList.some((p) => stack.includes(p))) {\n err.message += `\\n (from ${loaderPaths})`\n }\n return reject(err)\n }\n if (!result.result) return reject(new Error('No result from loaders'))\n const [source, map] = result.result\n const resolvedValue = {\n source: Buffer.isBuffer(source)\n ? { binary: source.toString('base64') }\n : source,\n map:\n typeof map === 'string'\n ? map\n : typeof map === 'object'\n ? JSON.stringify(map)\n : undefined,\n }\n // Delay resolution by one event loop turn to catch deferred errors\n // from loaders (e.g. unhandled Promise rejections, setTimeout throws).\n // During this delay, uncaughtException/unhandledRejection handlers can\n // fire and send the error via IPC before we send the 'end' message.\n setTimeout(() => resolve(resolvedValue), 0)\n }\n )\n })\n}\n\nexport { transform as default }\n\nfunction makeErrorEmitter(\n severity: 'warning' | 'error',\n ipc: Ipc\n) {\n return function (error: Error | string) {\n ipc.sendInfo({\n type: 'emittedError',\n severity: severity,\n error: structuredError(error),\n })\n }\n}\n"],"names":["runLoaders","contextDir","process","cwd","LogType","Object","freeze","error","warn","info","log","debug","trace","group","groupCollapsed","groupEnd","profile","profileEnd","time","clear","status","loaderFlag","cutOffByFlag","stack","flag","errorStack","split","i","length","includes","join","cutOffLoaderExecution","DummySpan","traceChild","traceFn","fn","traceAsyncFn","stop","transform","ipc","content","name","query","loaders","sourceMap","Promise","resolve","reject","resource","resourceDir","loadersWithOptions","map","loader","options","logs","context","_module","__reserved","currentTraceSpan","rootContext","getOptions","entry","loaderIndex","fs","readFile","p","optionsOrCb","maybeCb","sendRequest","type","file","then","err","sendError","getResolve","rustOptions","aliasFields","undefined","conditionNames","noPackageJson","extensions","mainFields","noExportsField","mainFiles","noModules","preferRelative","alias","Array","isArray","Error","descriptionFiles","exportsFields","modules","restrictions","dependencyType","lookupPath","request","callback","isAbsolute","relative","sep","promise","unknownResult","result","path","catch","emitWarning","makeErrorEmitter","emitError","getLogger","logFn","logType","args","slice","push","Date","now","timers","timersAggregates","bind","assert","assertion","label","Map","set","hrtime","timeLog","prev","get","timeEnd","delete","timeAggregate","current","timeAggregateEnd","paths","readResource","_filename","data","Buffer","from","binary","sendInfo","envVariables","filePaths","fileDependencies","directories","contextDependencies","dep","loaderPathList","l","loaderPaths","wrappedErr","String","some","message","source","resolvedValue","isBuffer","toString","JSON","stringify","setTimeout","severity"],"mappings":";;;;AAKA;AACA;AAIA;AACA;AAMA;;;;;;;AAwCA,MAAM,EACJA,UAAU,EACX;AAED,MAAMC,aAAaC,QAAQC,GAAG;AAE9B,MAAMC,UAAUC,OAAOC,MAAM,CAAC;IAC5BC,OAAO;IACPC,MAAM;IACNC,MAAM;IACNC,KAAK;IACLC,OAAO;IAEPC,OAAO;IAEPC,OAAO;IACPC,gBAAgB;IAChBC,UAAU;IAEVC,SAAS;IACTC,YAAY;IAEZC,MAAM;IAENC,OAAO;IACPC,QAAQ;AACV;AA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oBAAEf,QAAQe,OAAOG,QAAQ,CAAC;gBAAU,IACpCH;gBACJxG,KACE,OAAOA,QAAQ,WACXA,MACA,OAAOA,QAAQ,WACb4G,KAAKC,SAAS,CAAC7G,OACf0B;YACV;YACA,mEAAmE;YACnE,uEAAuE;YACvE,uEAAuE;YACvE,oEAAoE;YACpEoF,WAAW,IAAMnH,QAAQ8G,gBAAgB;QAC3C;IAEJ;AACF;;AAIA,SAASjD,iBACPuD,QAA6B,EAC7B3H,GAA2C;IAE3C,OAAO,SAAUhC,KAAqB;QACpCgC,IAAIsG,QAAQ,CAAC;YACXxE,MAAM;YACN6F,UAAUA;YACV3J,OAAO,IAAA,uIAAe,EAACA;QACzB;IACF;AACF"}}] +} \ No newline at end of file diff --git a/.next/dev/build/chunks/[root-of-the-server]__0ubbtyl._.js b/.next/dev/build/chunks/[root-of-the-server]__0ubbtyl._.js new file mode 100644 index 0000000..b8806ac --- /dev/null +++ b/.next/dev/build/chunks/[root-of-the-server]__0ubbtyl._.js @@ -0,0 +1,508 @@ +module.exports = [ +"[turbopack-node]/child_process/globals.ts [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { + +// @ts-ignore +process.turbopack = {}; +}), +"[externals]/node:net [external] (node:net, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("node:net", () => require("node:net")); + +module.exports = mod; +}), +"[externals]/node:stream [external] (node:stream, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("node:stream", () => require("node:stream")); + +module.exports = mod; +}), +"[turbopack-node]/compiled/stacktrace-parser/index.js [postcss] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "parse", + ()=>parse +]); +if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = ("TURBOPACK compile-time value", "/ROOT/compiled/stacktrace-parser") + "/"; +var n = ""; +function parse(e) { + var r = e.split("\n"); + return r.reduce(function(e, r) { + var n = parseChrome(r) || parseWinjs(r) || parseGecko(r) || parseNode(r) || parseJSC(r); + if (n) { + e.push(n); + } + return e; + }, []); +} +var a = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i; +var l = /\((\S*)(?::(\d+))(?::(\d+))\)/; +function parseChrome(e) { + var r = a.exec(e); + if (!r) { + return null; + } + var u = r[2] && r[2].indexOf("native") === 0; + var t = r[2] && r[2].indexOf("eval") === 0; + var i = l.exec(r[2]); + if (t && i != null) { + r[2] = i[1]; + r[3] = i[2]; + r[4] = i[3]; + } + return { + file: !u ? r[2] : null, + methodName: r[1] || n, + arguments: u ? [ + r[2] + ] : [], + lineNumber: r[3] ? +r[3] : null, + column: r[4] ? +r[4] : null + }; +} +var u = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i; +function parseWinjs(e) { + var r = u.exec(e); + if (!r) { + return null; + } + return { + file: r[2], + methodName: r[1] || n, + arguments: [], + lineNumber: +r[3], + column: r[4] ? +r[4] : null + }; +} +var t = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i; +var i = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i; +function parseGecko(e) { + var r = t.exec(e); + if (!r) { + return null; + } + var a = r[3] && r[3].indexOf(" > eval") > -1; + var l = i.exec(r[3]); + if (a && l != null) { + r[3] = l[1]; + r[4] = l[2]; + r[5] = null; + } + return { + file: r[3], + methodName: r[1] || n, + arguments: r[2] ? r[2].split(",") : [], + lineNumber: r[4] ? +r[4] : null, + column: r[5] ? +r[5] : null + }; +} +var s = /^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i; +function parseJSC(e) { + var r = s.exec(e); + if (!r) { + return null; + } + return { + file: r[3], + methodName: r[1] || n, + arguments: [], + lineNumber: +r[4], + column: r[5] ? +r[5] : null + }; +} +var o = /^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i; +function parseNode(e) { + var r = o.exec(e); + if (!r) { + return null; + } + return { + file: r[2], + methodName: r[1] || n, + arguments: [], + lineNumber: +r[3], + column: r[4] ? +r[4] : null + }; +} +}), +"[turbopack-node]/error.ts [postcss] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "default", + ()=>isError, + "getProperError", + ()=>getProperError, + "structuredError", + ()=>structuredError +]); +var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$compiled$2f$stacktrace$2d$parser$2f$index$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/compiled/stacktrace-parser/index.js [postcss] (ecmascript)"); +; +function isError(err) { + return typeof err === 'object' && err !== null && 'name' in err && 'message' in err; +} +function getProperError(err) { + if (isError(err)) { + return err; + } + if ("TURBOPACK compile-time truthy", 1) { + // Provide a better error message for cases where `throw undefined` + // is called in development + if (typeof err === 'undefined') { + return new Error('`undefined` was thrown instead of a real error'); + } + if (err === null) { + return new Error('`null` was thrown instead of a real error'); + } + } + return new Error(isPlainObject(err) ? JSON.stringify(err) : err + ''); +} +function getObjectClassLabel(value) { + return Object.prototype.toString.call(value); +} +function isPlainObject(value) { + if (getObjectClassLabel(value) !== '[object Object]') { + return false; + } + const prototype = Object.getPrototypeOf(value); + /** + * this used to be previously: + * + * `return prototype === null || prototype === Object.prototype` + * + * but Edge Runtime expose Object from vm, being that kind of type-checking wrongly fail. + * + * It was changed to the current implementation since it's resilient to serialization. + */ return prototype === null || prototype.hasOwnProperty('isPrototypeOf'); +} +function structuredError(e) { + e = getProperError(e); + return { + name: e.name, + message: e.message, + stack: typeof e.stack === 'string' ? (0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$compiled$2f$stacktrace$2d$parser$2f$index$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["parse"])(e.stack) : [], + cause: e.cause ? structuredError(getProperError(e.cause)) : undefined + }; +} +}), +"[turbopack-node]/child_process/index.ts [postcss] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "IPC", + ()=>IPC +]); +var __TURBOPACK__imported__module__$5b$externals$5d2f$node$3a$net__$5b$external$5d$__$28$node$3a$net$2c$__cjs$29$__ = __turbopack_context__.i("[externals]/node:net [external] (node:net, cjs)"); +var __TURBOPACK__imported__module__$5b$externals$5d2f$node$3a$stream__$5b$external$5d$__$28$node$3a$stream$2c$__cjs$29$__ = __turbopack_context__.i("[externals]/node:stream [external] (node:stream, cjs)"); +var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$error$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/error.ts [postcss] (ecmascript)"); +; +; +; +function createIpc(port) { + const socket = (0, __TURBOPACK__imported__module__$5b$externals$5d2f$node$3a$net__$5b$external$5d$__$28$node$3a$net$2c$__cjs$29$__["createConnection"])({ + port, + host: '127.0.0.1' + }); + /** + * A writable stream that writes to the socket. + * We don't write directly to the socket because we need to + * handle backpressure and wait for the socket to be drained + * before writing more data. + */ const socketWritable = new __TURBOPACK__imported__module__$5b$externals$5d2f$node$3a$stream__$5b$external$5d$__$28$node$3a$stream$2c$__cjs$29$__["Writable"]({ + write (chunk, _enc, cb) { + if (socket.write(chunk)) { + cb(); + } else { + socket.once('drain', cb); + } + }, + final (cb) { + socket.end(cb); + } + }); + const packetQueue = []; + const recvPromiseResolveQueue = []; + function pushPacket(packet) { + const recvPromiseResolve = recvPromiseResolveQueue.shift(); + if (recvPromiseResolve != null) { + recvPromiseResolve(JSON.parse(packet.toString('utf8'))); + } else { + packetQueue.push(packet); + } + } + let state = { + type: 'waiting' + }; + let buffer = Buffer.alloc(0); + socket.once('connect', ()=>{ + socket.setNoDelay(true); + socket.on('data', (chunk)=>{ + buffer = Buffer.concat([ + buffer, + chunk + ]); + loop: while(true){ + switch(state.type){ + case 'waiting': + { + if (buffer.length >= 4) { + const length = buffer.readUInt32BE(0); + buffer = buffer.subarray(4); + state = { + type: 'packet', + length + }; + } else { + break loop; + } + break; + } + case 'packet': + { + if (buffer.length >= state.length) { + const packet = buffer.subarray(0, state.length); + buffer = buffer.subarray(state.length); + state = { + type: 'waiting' + }; + pushPacket(packet); + } else { + break loop; + } + break; + } + default: + invariant(state, (state)=>`Unknown state type: ${state?.type}`); + } + } + }); + }); + // When the socket is closed, this process is no longer needed. + // This might happen e. g. when parent process is killed or + // node.js pool is garbage collected. + socket.once('close', ()=>{ + process.exit(0); + }); + // TODO(lukesandberg): some of the messages being sent are very large and contain lots + // of redundant information. Consider adding gzip compression to our stream. + function doSend(message) { + return new Promise((resolve, reject)=>{ + // Reserve 4 bytes for our length prefix, we will over-write after encoding. + const packet = Buffer.from('0000' + message, 'utf8'); + packet.writeUInt32BE(packet.length - 4, 0); + socketWritable.write(packet, (err)=>{ + process.stderr.write(`TURBOPACK_OUTPUT_D\n`); + process.stdout.write(`TURBOPACK_OUTPUT_D\n`); + if (err != null) { + reject(err); + } else { + resolve(); + } + }); + }); + } + function send(message) { + return doSend(JSON.stringify(message)); + } + function sendReady() { + return doSend(''); + } + return { + async recv () { + const packet = packetQueue.shift(); + if (packet != null) { + return JSON.parse(packet.toString('utf8')); + } + const result = await new Promise((resolve)=>{ + recvPromiseResolveQueue.push((result)=>{ + resolve(result); + }); + }); + return result; + }, + send (message) { + return send(message); + }, + sendReady, + async sendError (error) { + let failed = false; + try { + await send({ + type: 'error', + ...(0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$error$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__["structuredError"])(error) + }); + } catch (err) { + // There's nothing we can do about errors that happen after this point, we can't tell anyone + // about them. + console.error('failed to send error back to rust:', err); + failed = true; + } + await new Promise((res)=>socket.end(()=>res())); + process.exit(failed ? 1 : 0); + } + }; +} +const PORT = process.argv[2]; +const IPC = createIpc(parseInt(PORT, 10)); +process.on('uncaughtException', (err)=>{ + IPC.sendError(err); +}); +process.on('unhandledRejection', (reason)=>{ + IPC.sendError(reason instanceof Error ? reason : new Error(String(reason))); +}); +const improveConsole = (name, stream, addStack)=>{ + // @ts-ignore + const original = console[name]; + // @ts-ignore + const stdio = process[stream]; + // @ts-ignore + console[name] = (...args)=>{ + stdio.write(`TURBOPACK_OUTPUT_B\n`); + original(...args); + if (addStack) { + const stack = new Error().stack?.replace(/^.+\n.+\n/, '') + '\n'; + stdio.write('TURBOPACK_OUTPUT_S\n'); + stdio.write(stack); + } + stdio.write('TURBOPACK_OUTPUT_E\n'); + }; +}; +improveConsole('error', 'stderr', true); +improveConsole('warn', 'stderr', true); +improveConsole('count', 'stdout', true); +improveConsole('trace', 'stderr', false); +improveConsole('log', 'stdout', true); +improveConsole('group', 'stdout', true); +improveConsole('groupCollapsed', 'stdout', true); +improveConsole('table', 'stdout', true); +improveConsole('debug', 'stdout', true); +improveConsole('info', 'stdout', true); +improveConsole('dir', 'stdout', true); +improveConsole('dirxml', 'stdout', true); +improveConsole('timeEnd', 'stdout', true); +improveConsole('timeLog', 'stdout', true); +improveConsole('timeStamp', 'stdout', true); +improveConsole('assert', 'stderr', true); +/** + * Utility function to ensure all variants of an enum are handled. + */ function invariant(never, computeMessage) { + throw new Error(`Invariant: ${computeMessage(never)}`); +} +}), +"[turbopack-node]/child_process/evaluate.ts [postcss] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "run", + ()=>run +]); +var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$child_process$2f$index$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/child_process/index.ts [postcss] (ecmascript)"); +; +const ipc = __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$child_process$2f$index$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__["IPC"]; +const queue = []; +const run = async (moduleFactory)=>{ + let nextId = 1; + const requests = new Map(); + const internalIpc = { + sendInfo: (message)=>ipc.send({ + type: 'info', + data: message + }), + sendRequest: (message)=>{ + const id = nextId++; + let resolve, reject; + const promise = new Promise((res, rej)=>{ + resolve = res; + reject = rej; + }); + requests.set(id, { + resolve, + reject + }); + return ipc.send({ + type: 'request', + id, + data: message + }).then(()=>promise); + }, + sendError: (error)=>{ + return ipc.sendError(error); + } + }; + // Initialize module and send ready message + let getValue; + try { + const module = await moduleFactory(); + if (typeof module.init === 'function') { + await module.init(); + } + getValue = module.default; + await ipc.sendReady(); + } catch (err) { + await ipc.sendReady(); + await ipc.sendError(err); + } + // Queue handling + let isRunning = false; + const run = async ()=>{ + while(queue.length > 0){ + const args = queue.shift(); + try { + const value = await getValue(internalIpc, ...args); + await ipc.send({ + type: 'end', + data: value === undefined ? undefined : JSON.stringify(value, null, 2), + duration: 0 + }); + } catch (e) { + await ipc.sendError(e); + } + } + isRunning = false; + }; + // Communication handling + while(true){ + const msg = await ipc.recv(); + switch(msg.type){ + case 'evaluate': + { + queue.push(msg.args); + if (!isRunning) { + isRunning = true; + run(); + } + break; + } + case 'result': + { + const request = requests.get(msg.id); + if (request) { + requests.delete(msg.id); + if (msg.error) { + request.reject(new Error(msg.error)); + } else { + request.resolve(msg.data); + } + } + break; + } + default: + { + console.error('unexpected message type', msg.type); + process.exit(1); + } + } + } +}; +}), +"[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)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([]); +var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$child_process$2f$evaluate$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/child_process/evaluate.ts [postcss] (ecmascript)"); +; +(0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$child_process$2f$evaluate$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__["run"])(()=>__turbopack_context__.A('[turbopack-node]/transforms/postcss.ts { CONFIG => "[project]/postcss.config.mjs [postcss] (ecmascript)" } [postcss] (ecmascript, async loader)')); +}), +]; + +//# sourceMappingURL=%5Broot-of-the-server%5D__0ubbtyl._.js.map \ No newline at end of file diff --git a/.next/dev/build/chunks/[root-of-the-server]__0ubbtyl._.js.map b/.next/dev/build/chunks/[root-of-the-server]__0ubbtyl._.js.map new file mode 100644 index 0000000..c99a0a4 --- /dev/null +++ b/.next/dev/build/chunks/[root-of-the-server]__0ubbtyl._.js.map @@ -0,0 +1,11 @@ +{ + "version": 3, + "sources": [], + "sections": [ + {"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/child_process/globals.ts"],"sourcesContent":["// @ts-ignore\nprocess.turbopack = {}\n"],"names":["process","turbopack"],"mappings":"AAAA,aAAa;AACbA,QAAQC,SAAS,GAAG,CAAC"}}, + {"offset": {"line": 21, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/compiled/stacktrace-parser/index.js"],"sourcesContent":["if (typeof __nccwpck_require__ !== \"undefined\")\n __nccwpck_require__.ab = __dirname + \"/\";\n\nvar n = \"\";\nexport function parse(e) {\n var r = e.split(\"\\n\");\n return r.reduce(function (e, r) {\n var n =\n parseChrome(r) ||\n parseWinjs(r) ||\n parseGecko(r) ||\n parseNode(r) ||\n parseJSC(r);\n if (n) {\n e.push(n);\n }\n return e;\n }, []);\n}\nvar a =\n /^\\s*at (.*?) ?\\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\\/|[a-z]:\\\\|\\\\\\\\).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\nvar l = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\nfunction parseChrome(e) {\n var r = a.exec(e);\n if (!r) {\n return null;\n }\n var u = r[2] && r[2].indexOf(\"native\") === 0;\n var t = r[2] && r[2].indexOf(\"eval\") === 0;\n var i = l.exec(r[2]);\n if (t && i != null) {\n r[2] = i[1];\n r[3] = i[2];\n r[4] = i[3];\n }\n return {\n file: !u ? r[2] : null,\n methodName: r[1] || n,\n arguments: u ? [r[2]] : [],\n lineNumber: r[3] ? +r[3] : null,\n column: r[4] ? +r[4] : null,\n };\n}\nvar u =\n /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nfunction parseWinjs(e) {\n var r = u.exec(e);\n if (!r) {\n return null;\n }\n return {\n file: r[2],\n methodName: r[1] || n,\n arguments: [],\n lineNumber: +r[3],\n column: r[4] ? +r[4] : null,\n };\n}\nvar t =\n /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\\[native).*?|[^@]*bundle)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nvar i = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nfunction parseGecko(e) {\n var r = t.exec(e);\n if (!r) {\n return null;\n }\n var a = r[3] && r[3].indexOf(\" > eval\") > -1;\n var l = i.exec(r[3]);\n if (a && l != null) {\n r[3] = l[1];\n r[4] = l[2];\n r[5] = null;\n }\n return {\n file: r[3],\n methodName: r[1] || n,\n arguments: r[2] ? r[2].split(\",\") : [],\n lineNumber: r[4] ? +r[4] : null,\n column: r[5] ? +r[5] : null,\n };\n}\nvar s = /^\\s*(?:([^@]*)(?:\\((.*?)\\))?@)?(\\S.*?):(\\d+)(?::(\\d+))?\\s*$/i;\nfunction parseJSC(e) {\n var r = s.exec(e);\n if (!r) {\n return null;\n }\n return {\n file: r[3],\n methodName: r[1] || n,\n arguments: [],\n lineNumber: +r[4],\n column: r[5] ? +r[5] : null,\n };\n}\nvar o =\n /^\\s*at (?:((?:\\[object object\\])?[^\\\\/]+(?: \\[as \\S+\\])?) )?\\(?(.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nfunction parseNode(e) {\n var r = o.exec(e);\n if (!r) {\n return null;\n }\n return {\n file: r[2],\n methodName: r[1] || n,\n arguments: [],\n lineNumber: +r[3],\n column: r[4] ? +r[4] : null,\n };\n}\n"],"names":["__nccwpck_require__","ab","n","parse","e","r","split","reduce","parseChrome","parseWinjs","parseGecko","parseNode","parseJSC","push","a","l","exec","u","indexOf","t","i","file","methodName","arguments","lineNumber","column","s","o"],"mappings":";;;;AAAA,IAAI,OAAOA,wBAAwB,aACjCA,oBAAoBC,EAAE,GAAG,uEAAY;AAEvC,IAAIC,IAAI;AACD,SAASC,MAAMC,CAAC;IACrB,IAAIC,IAAID,EAAEE,KAAK,CAAC;IAChB,OAAOD,EAAEE,MAAM,CAAC,SAAUH,CAAC,EAAEC,CAAC;QAC5B,IAAIH,IACFM,YAAYH,MACZI,WAAWJ,MACXK,WAAWL,MACXM,UAAUN,MACVO,SAASP;QACX,IAAIH,GAAG;YACLE,EAAES,IAAI,CAACX;QACT;QACA,OAAOE;IACT,GAAG,EAAE;AACP;AACA,IAAIU,IACF;AACF,IAAIC,IAAI;AACR,SAASP,YAAYJ,CAAC;IACpB,IAAIC,IAAIS,EAAEE,IAAI,CAACZ;IACf,IAAI,CAACC,GAAG;QACN,OAAO;IACT;IACA,IAAIY,IAAIZ,CAAC,CAAC,EAAE,IAAIA,CAAC,CAAC,EAAE,CAACa,OAAO,CAAC,cAAc;IAC3C,IAAIC,IAAId,CAAC,CAAC,EAAE,IAAIA,CAAC,CAAC,EAAE,CAACa,OAAO,CAAC,YAAY;IACzC,IAAIE,IAAIL,EAAEC,IAAI,CAACX,CAAC,CAAC,EAAE;IACnB,IAAIc,KAAKC,KAAK,MAAM;QAClBf,CAAC,CAAC,EAAE,GAAGe,CAAC,CAAC,EAAE;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A,OAAO;QACLgB,MAAMhB,CAAC,CAAC,EAAE;QACViB,YAAYjB,CAAC,CAAC,EAAE,IAAIH;QACpBqB,WAAWlB,CAAC,CAAC,EAAE,GAAGA,CAAC,CAAC,EAAE,CAACC,KAAK,CAAC,OAAO,EAAE;QACtCkB,YAAYnB,CAAC,CAAC,EAAE,GAAG,CAACA,CAAC,CAAC,EAAE,GAAG;QAC3BoB,QAAQpB,CAAC,CAAC,EAAE,GAAG,CAACA,CAAC,CAAC,EAAE,GAAG;IACzB;AACF;AACA,IAAIqB,IAAI;AACR,SAASd,SAASR,CAAC;IACjB,IAAIC,IAAIqB,EAAEV,IAAI,CAACZ;IACf,IAAI,CAACC,GAAG;QACN,OAAO;IACT;IACA,OAAO;QACLgB,MAAMhB,CAAC,CAAC,EAAE;QACViB,YAAYjB,CAAC,CAAC,EAAE,IAAIH;QACpBqB,WAAW,EAAE;QACbC,YAAY,CAACnB,CAAC,CAAC,EAAE;QACjBoB,QAAQpB,CAAC,CAAC,EAAE,GAAG,CAACA,CAAC,CAAC,EAAE,GAAG;IACzB;AACF;AACA,IAAIsB,IACF;AACF,SAAShB,UAAUP,CAAC;IAClB,IAAIC,IAAIsB,EAAEX,IAAI,CAACZ;IACf,IAAI,CAACC,GAAG;QACN,OAAO;IACT;IACA,OAAO;QACLgB,MAAMhB,CAAC,CAAC,EAAE;QACViB,YAAYjB,CAAC,CAAC,EAAE,IAAIH;QACpBqB,WAAW,EAAE;QACbC,YAAY,CAACnB,CAAC,CAAC,EAAE;QACjBoB,QAAQpB,CAAC,CAAC,EAAE,GAAG,CAACA,CAAC,CAAC,EAAE,GAAG;IACzB;AACF"}}, + {"offset": {"line": 130, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/error.ts"],"sourcesContent":["import type { StackFrame } from './compiled/stacktrace-parser'\nimport { parse as parseStackTrace } from './compiled/stacktrace-parser'\n\n// merged from next.js\n// https://github.com/vercel/next.js/blob/e657741b9908cf0044aaef959c0c4defb19ed6d8/packages/next/src/lib/is-error.ts\n// https://github.com/vercel/next.js/blob/e657741b9908cf0044aaef959c0c4defb19ed6d8/packages/next/src/shared/lib/is-plain-object.ts\n\nexport default function isError(err: unknown): err is Error {\n return (\n typeof err === 'object' && err !== null && 'name' in err && 'message' in err\n )\n}\n\nexport function getProperError(err: unknown): Error {\n if (isError(err)) {\n return err\n }\n\n if (process.env.NODE_ENV === 'development') {\n // Provide a better error message for cases where `throw undefined`\n // is called in development\n if (typeof err === 'undefined') {\n return new Error('`undefined` was thrown instead of a real error')\n }\n\n if (err === null) {\n return new Error('`null` was thrown instead of a real error')\n }\n }\n\n return new Error(isPlainObject(err) ? JSON.stringify(err) : err + '')\n}\n\nfunction getObjectClassLabel(value: any): string {\n return Object.prototype.toString.call(value)\n}\n\nfunction isPlainObject(value: any): boolean {\n if (getObjectClassLabel(value) !== '[object Object]') {\n return false\n }\n\n const prototype = Object.getPrototypeOf(value)\n\n /**\n * this used to be previously:\n *\n * `return prototype === null || prototype === Object.prototype`\n *\n * but Edge Runtime expose Object from vm, being that kind of type-checking wrongly fail.\n *\n * It was changed to the current implementation since it's resilient to serialization.\n */\n return prototype === null || prototype.hasOwnProperty('isPrototypeOf')\n}\n\nexport type StructuredError = {\n name: string\n message: string\n stack: StackFrame[]\n cause: StructuredError | undefined\n}\n\nexport function structuredError(e: Error | string): StructuredError {\n e = getProperError(e)\n\n return {\n name: e.name,\n message: e.message,\n stack: typeof e.stack === 'string' ? parseStackTrace(e.stack) : [],\n cause: e.cause ? structuredError(getProperError(e.cause)) : undefined,\n }\n}\n"],"names":["isError","err","getProperError","Error","isPlainObject","JSON","stringify","getObjectClassLabel","value","Object","prototype","toString","call","getPrototypeOf","hasOwnProperty","structuredError","e","name","message","stack","cause","undefined"],"mappings":";;;;;;;;AACA;;AAMe,SAASA,QAAQC,GAAY;IAC1C,OACE,OAAOA,QAAQ,YAAYA,QAAQ,QAAQ,UAAUA,OAAO,aAAaA;AAE7E;AAEO,SAASC,eAAeD,GAAY;IACzC,IAAID,QAAQC,MAAM;QAChB,OAAOA;IACT;IAEA,wCAA4C;QAC1C,mEAAmE;QACnE,2BAA2B;QAC3B,IAAI,OAAOA,QAAQ,aAAa;YAC9B,OAAO,IAAIE,MAAM;QACnB;QAEA,IAAIF,QAAQ,MAAM;YAChB,OAAO,IAAIE,MAAM;QACnB;IACF;IAEA,OAAO,IAAIA,MAAMC,cAAcH,OAAOI,KAAKC,SAAS,CAACL,OAAOA,MAAM;AACpE;AAEA,SAASM,oBAAoBC,KAAU;IACrC,OAAOC,OAAOC,SAAS,CAACC,QAAQ,CAACC,IAAI,CAACJ;AACxC;AAEA,SAASJ,cAAcI,KAAU;IAC/B,IAAID,oBAAoBC,WAAW,mBAAmB;QACpD,OAAO;IACT;IAEA,MAAME,YAAYD,OAAOI,cAAc,CAACL;IAExC;;;;;;;;GAQC,GACD,OAAOE,cAAc,QAAQA,UAAUI,cAAc,CAAC;AACxD;AASO,SAASC,gBAAgBC,CAAiB;IAC/CA,IAAId,eAAec;IAEnB,OAAO;QACLC,MAAMD,EAAEC,IAAI;QACZC,SAASF,EAAEE,OAAO;QAClBC,OAAO,OAAOH,EAAEG,KAAK,KAAK,WAAW,IAAA,yJAAe,EAACH,EAAEG,KAAK,IAAI,EAAE;QAClEC,OAAOJ,EAAEI,KAAK,GAAGL,gBAAgBb,eAAec,EAAEI,KAAK,KAAKC;IAC9D;AACF"}}, + {"offset": {"line": 190, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/child_process/index.ts"],"sourcesContent":["import { createConnection } from 'node:net'\nimport { Writable } from 'node:stream'\nimport { structuredError } from '../error'\n\ntype State =\n | {\n type: 'waiting'\n }\n | {\n type: 'packet'\n length: number\n }\n\nexport type Ipc = {\n recv(): Promise\n send(message: TOutgoing): Promise\n sendError(error: Error | string): Promise\n sendReady(): Promise\n}\n\nfunction createIpc(\n port: number\n): Ipc {\n const socket = createConnection({\n port,\n host: '127.0.0.1',\n })\n\n /**\n * A writable stream that writes to the socket.\n * We don't write directly to the socket because we need to\n * handle backpressure and wait for the socket to be drained\n * before writing more data.\n */\n const socketWritable = new Writable({\n write(chunk, _enc, cb) {\n if (socket.write(chunk)) {\n cb()\n } else {\n socket.once('drain', cb)\n }\n },\n final(cb) {\n socket.end(cb)\n },\n })\n\n const packetQueue: Buffer[] = []\n const recvPromiseResolveQueue: Array<(message: TIncoming) => void> = []\n\n function pushPacket(packet: Buffer) {\n const recvPromiseResolve = recvPromiseResolveQueue.shift()\n if (recvPromiseResolve != null) {\n recvPromiseResolve(JSON.parse(packet.toString('utf8')) as TIncoming)\n } else {\n packetQueue.push(packet)\n }\n }\n\n let state: State = { type: 'waiting' }\n let buffer: Buffer = Buffer.alloc(0)\n socket.once('connect', () => {\n socket.setNoDelay(true)\n socket.on('data', (chunk) => {\n buffer = Buffer.concat([buffer, chunk])\n\n loop: while (true) {\n switch (state.type) {\n case 'waiting': {\n if (buffer.length >= 4) {\n const length = buffer.readUInt32BE(0)\n buffer = buffer.subarray(4)\n state = { type: 'packet', length }\n } else {\n break loop\n }\n break\n }\n case 'packet': {\n if (buffer.length >= state.length) {\n const packet = buffer.subarray(0, state.length)\n buffer = buffer.subarray(state.length)\n state = { type: 'waiting' }\n pushPacket(packet)\n } else {\n break loop\n }\n break\n }\n default:\n invariant(state, (state) => `Unknown state type: ${state?.type}`)\n }\n }\n })\n })\n // When the socket is closed, this process is no longer needed.\n // This might happen e. g. when parent process is killed or\n // node.js pool is garbage collected.\n socket.once('close', () => {\n process.exit(0)\n })\n\n // TODO(lukesandberg): some of the messages being sent are very large and contain lots\n // of redundant information. Consider adding gzip compression to our stream.\n function doSend(message: string): Promise {\n return new Promise((resolve, reject) => {\n // Reserve 4 bytes for our length prefix, we will over-write after encoding.\n const packet = Buffer.from('0000' + message, 'utf8')\n packet.writeUInt32BE(packet.length - 4, 0)\n socketWritable.write(packet, (err) => {\n process.stderr.write(`TURBOPACK_OUTPUT_D\\n`)\n process.stdout.write(`TURBOPACK_OUTPUT_D\\n`)\n if (err != null) {\n reject(err)\n } else {\n resolve()\n }\n })\n })\n }\n\n function send(message: any): Promise {\n return doSend(JSON.stringify(message))\n }\n function sendReady(): Promise {\n return doSend('')\n }\n\n return {\n async recv() {\n const packet = packetQueue.shift()\n if (packet != null) {\n return JSON.parse(packet.toString('utf8')) as TIncoming\n }\n\n const result = await new Promise((resolve) => {\n recvPromiseResolveQueue.push((result) => {\n resolve(result)\n })\n })\n\n return result\n },\n\n send(message: TOutgoing) {\n return send(message)\n },\n\n sendReady,\n\n async sendError(error: Error): Promise {\n let failed = false\n try {\n await send({\n type: 'error',\n ...structuredError(error),\n })\n } catch (err) {\n // There's nothing we can do about errors that happen after this point, we can't tell anyone\n // about them.\n console.error('failed to send error back to rust:', err)\n failed = true\n }\n await new Promise((res) => socket.end(() => res()))\n process.exit(failed ? 1 : 0)\n },\n }\n}\n\nconst PORT = process.argv[2]\n\nexport const IPC = createIpc(parseInt(PORT, 10))\n\nprocess.on('uncaughtException', (err) => {\n IPC.sendError(err)\n})\n\nprocess.on('unhandledRejection', (reason) => {\n IPC.sendError(reason instanceof Error ? reason : new Error(String(reason)))\n})\n\nconst improveConsole = (name: string, stream: string, addStack: boolean) => {\n // @ts-ignore\n const original = console[name]\n // @ts-ignore\n const stdio = process[stream]\n // @ts-ignore\n console[name] = (...args: any[]) => {\n stdio.write(`TURBOPACK_OUTPUT_B\\n`)\n original(...args)\n if (addStack) {\n const stack = new Error().stack?.replace(/^.+\\n.+\\n/, '') + '\\n'\n stdio.write('TURBOPACK_OUTPUT_S\\n')\n stdio.write(stack)\n }\n stdio.write('TURBOPACK_OUTPUT_E\\n')\n }\n}\n\nimproveConsole('error', 'stderr', true)\nimproveConsole('warn', 'stderr', true)\nimproveConsole('count', 'stdout', true)\nimproveConsole('trace', 'stderr', false)\nimproveConsole('log', 'stdout', true)\nimproveConsole('group', 'stdout', true)\nimproveConsole('groupCollapsed', 'stdout', true)\nimproveConsole('table', 'stdout', true)\nimproveConsole('debug', 'stdout', true)\nimproveConsole('info', 'stdout', true)\nimproveConsole('dir', 'stdout', true)\nimproveConsole('dirxml', 'stdout', true)\nimproveConsole('timeEnd', 'stdout', true)\nimproveConsole('timeLog', 'stdout', true)\nimproveConsole('timeStamp', 'stdout', true)\nimproveConsole('assert', 'stderr', true)\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"],"names":["createIpc","port","socket","host","socketWritable","write","chunk","_enc","cb","once","final","end","packetQueue","recvPromiseResolveQueue","pushPacket","packet","recvPromiseResolve","shift","JSON","parse","toString","push","state","type","buffer","Buffer","alloc","setNoDelay","on","concat","loop","length","readUInt32BE","subarray","invariant","process","exit","doSend","message","Promise","resolve","reject","from","writeUInt32BE","err","stderr","stdout","send","stringify","sendReady","recv","result","sendError","error","failed","console","res","PORT","argv","IPC","parseInt","reason","Error","String","improveConsole","name","stream","addStack","original","stdio","args","stack","replace","never","computeMessage"],"mappings":";;;;AAAA;AACA;AACA;;;;AAkBA,SAASA,UACPC,IAAY;IAEZ,MAAMC,SAAS,IAAA,mIAAgB,EAAC;QAC9BD;QACAE,MAAM;IACR;IAEA;;;;;GAKC,GACD,MAAMC,iBAAiB,IAAI,iIAAQ,CAAC;QAClCC,OAAMC,KAAK,EAAEC,IAAI,EAAEC,EAAE;YACnB,IAAIN,OAAOG,KAAK,CAACC,QAAQ;gBACvBE;YACF,OAAO;gBACLN,OAAOO,IAAI,CAAC,SAASD;YACvB;QACF;QACAE,OAAMF,EAAE;YACNN,OAAOS,GAAG,CAACH;QACb;IACF;IAEA,MAAMI,cAAwB,EAAE;IAChC,MAAMC,0BAA+D,EAAE;IAEvE,SAASC,WAAWC,MAAc;QAChC,MAAMC,qBAAqBH,wBAAwBI,KAAK;QACxD,IAAID,sBAAsB,MAAM;YAC9BA,mBAAmBE,KAAKC,KAAK,CAACJ,OAAOK,QAAQ,CAA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]/child_process/evaluate.ts"],"sourcesContent":["import { IPC } from './index'\nimport type { Ipc as GenericIpc } from './index'\n\nimport type { Channel as Ipc } from '../types'\n\ntype IpcIncomingMessage =\n | {\n type: 'evaluate'\n args: string[]\n }\n | {\n type: 'result'\n id: number\n error: string | null\n data: any | null\n }\n\ntype IpcOutgoingMessage =\n | {\n type: 'end'\n data: string | undefined\n duration: number\n }\n | {\n type: 'info'\n data: any\n }\n | {\n type: 'request'\n id: number\n data: any\n }\n\nconst ipc = IPC as GenericIpc\n\nconst queue: string[][] = []\n\nexport const run = async (\n moduleFactory: () => Promise<{\n init?: () => Promise\n default: (ipc: Ipc, ...deserializedArgs: any[]) => any\n }>\n) => {\n let nextId = 1\n const requests = new Map()\n const internalIpc = {\n sendInfo: (message: any) =>\n ipc.send({\n type: 'info',\n data: message,\n }),\n sendRequest: (message: any) => {\n const id = nextId++\n let resolve, reject\n const promise = new Promise((res, rej) => {\n resolve = res\n reject = rej\n })\n requests.set(id, { resolve, reject })\n return ipc\n .send({ type: 'request', id, data: message })\n .then(() => promise)\n },\n sendError: (error: Error) => {\n return ipc.sendError(error)\n },\n }\n\n // Initialize module and send ready message\n let getValue: (ipc: Ipc, ...deserializedArgs: any[]) => any\n try {\n const module = await moduleFactory()\n if (typeof module.init === 'function') {\n await module.init()\n }\n getValue = module.default\n await ipc.sendReady()\n } catch (err) {\n await ipc.sendReady()\n await ipc.sendError(err as Error)\n }\n\n // Queue handling\n let isRunning = false\n const run = async () => {\n while (queue.length > 0) {\n const args = queue.shift()!\n try {\n const value = await getValue(internalIpc, ...args)\n await ipc.send({\n type: 'end',\n data:\n value === undefined ? undefined : JSON.stringify(value, null, 2),\n duration: 0,\n })\n } catch (e) {\n await ipc.sendError(e as Error)\n }\n }\n isRunning = false\n }\n\n // Communication handling\n while (true) {\n const msg = await ipc.recv()\n\n switch (msg.type) {\n case 'evaluate': {\n queue.push(msg.args)\n if (!isRunning) {\n isRunning = true\n run()\n }\n break\n }\n case 'result': {\n const request = requests.get(msg.id)\n if (request) {\n requests.delete(msg.id)\n if (msg.error) {\n request.reject(new Error(msg.error))\n } else {\n request.resolve(msg.data)\n }\n }\n break\n }\n default: {\n console.error('unexpected message type', (msg as any).type)\n process.exit(1)\n }\n }\n }\n}\n\nexport type { IpcIncomingMessage, IpcOutgoingMessage }\n"],"names":["ipc","queue","run","moduleFactory","nextId","requests","Map","internalIpc","sendInfo","message","send","type","data","sendRequest","id","resolve","reject","promise","Promise","res","rej","set","then","sendError","error","getValue","module","init","default","sendReady","err","isRunning","length","args","shift","value","undefined","JSON","stringify","duration","e","msg","recv","push","request","get","delete","Error","console","process","exit"],"mappings":";;;;AAAA;;AAiCA,MAAMA,MAAM,oIAAG;AAEf,MAAMC,QAAoB,EAAE;AAErB,MAAMC,MAAM,OACjBC;IAKA,IAAIC,SAAS;IACb,MAAMC,WAAW,IAAIC;IACrB,MAAMC,cAAc;QAClBC,UAAU,CAACC,UACTT,IAAIU,IAAI,CAAC;gBACPC,MAAM;gBACNC,MAAMH;YACR;QACFI,aAAa,CAACJ;YACZ,MAAMK,KAAKV;YACX,IAAIW,SAASC;YACb,MAAMC,UAAU,IAAIC,QAAQ,CAACC,KAAKC;gBAChCL,UAAUI;gBACVH,SAASI;YACX;YACAf,SAASgB,GAAG,CAACP,IAAI;gBAAEC;gBAASC;YAAO;YACnC,OAAOhB,IACJU,IAAI,CAAC;gBAAEC,MAAM;gBAAWG;gBAAIF,MAAMH;YAAQ,GAC1Ca,IAAI,CAAC,IAAML;QAChB;QACAM,WAAW,CAACC;YACV,OAAOxB,IAAIuB,SAAS,CAACC;QACvB;IACF;IAEA,2CAA2C;IAC3C,IAAIC;IACJ,IAAI;QACF,MAAMC,SAAS,MAAMvB;QACrB,IAAI,OAAOuB,OAAOC,IAAI,KAAK,YAAY;YACrC,MAAMD,OAAOC,IAAI;QACnB;QACAF,WAAWC,OAAOE,OAAO;QACzB,MAAM5B,IAAI6B,SAAS;IACrB,EAAE,OAAOC,KAAK;QACZ,MAAM9B,IAAI6B,SAAS;QACnB,MAAM7B,IAAIuB,SAAS,CAACO;IACtB;IAEA,iBAAiB;IACjB,IAAIC,YAAY;IAChB,MAAM7B,MAAM;QACV,MAAOD,MAAM+B,MAAM,GAAG,EAAG;YACvB,MAAMC,OAAOhC,MAAMiC,KAAK;YACxB,IAAI;gBACF,MAAMC,QAAQ,MAAMV,SAASlB,gBAAgB0B;gBAC7C,MAAMjC,IAAIU,IAAI,CAAC;oBACbC,MAAM;oBACNC,MACEuB,UAAUC,YAAYA,YAAYC,KAAKC,SAAS,CAACH,OAAO,MAAM;oBAChEI,UAAU;gBACZ;YACF,EAAE,OAAOC,GAAG;gBACV,MAAMxC,IAAIuB,SAAS,CAACiB;YACtB;QACF;QACAT,YAAY;IACd;IAEA,yBAAyB;IACzB,MAAO,KAAM;QACX,MAAMU,MAAM,MAAMzC,IAAI0C,IAAI;QAE1B,OAAQD,IAAI9B,IAAI;YACd,KAAK;gBAAY;oBACfV,MAAM0C,IAAI,CAACF,IAAIR,IAAI;oBACnB,IAAI,CAACF,WAAW;wBACdA,YAAY;wBACZ7B;oBACF;oBACA;gBACF;YACA,KAAK;gBAAU;oBACb,MAAM0C,UAAUvC,SAASwC,GAAG,CAACJ,IAAI3B,EAAE;oBACnC,IAAI8B,SAAS;wBACXvC,SAASyC,MAAM,CAACL,IAAI3B,EAAE;wBACtB,IAAI2B,IAAIjB,KAAK,EAAE;4BACboB,QAAQ5B,MAAM,CAAC,IAAI+B,MAAMN,IAAIjB,KAAK;wBACpC,OAAO;4BACLoB,QAAQ7B,OAAO,CAAC0B,IAAI7B,IAAI;wBAC1B;oBACF;oBACA;gBACF;YACA;gBAAS;oBACPoC,QAAQxB,KAAK,CAAC,2BAA2B,AAACiB,IAAY9B,IAAI;oBAC1DsC,QAAQC,IAAI,CAAC;gBACf;QACF;IACF;AACF"}}, + {"offset": {"line": 500, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/child_process/evaluate.ts/evaluate.js"],"sourcesContent":["import { run } from 'RUNTIME'; run(() => import('INNER'))"],"names":[],"mappings":";AAAA;;AAA+B,IAAA,uIAAG,EAAC"}}] +} \ No newline at end of file diff --git a/.next/dev/build/chunks/[root-of-the-server]__0z6~21d._.js b/.next/dev/build/chunks/[root-of-the-server]__0z6~21d._.js new file mode 100644 index 0000000..392b951 --- /dev/null +++ b/.next/dev/build/chunks/[root-of-the-server]__0z6~21d._.js @@ -0,0 +1,508 @@ +module.exports = [ +"[turbopack-node]/child_process/globals.ts [webpack_loaders] (ecmascript)", ((__turbopack_context__, module, exports) => { + +// @ts-ignore +process.turbopack = {}; +}), +"[externals]/node:net [external] (node:net, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("node:net", () => require("node:net")); + +module.exports = mod; +}), +"[externals]/node:stream [external] (node:stream, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("node:stream", () => require("node:stream")); + +module.exports = mod; +}), +"[turbopack-node]/compiled/stacktrace-parser/index.js [webpack_loaders] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "parse", + ()=>parse +]); +if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = ("TURBOPACK compile-time value", "/ROOT/compiled/stacktrace-parser") + "/"; +var n = ""; +function parse(e) { + var r = e.split("\n"); + return r.reduce(function(e, r) { + var n = parseChrome(r) || parseWinjs(r) || parseGecko(r) || parseNode(r) || parseJSC(r); + if (n) { + e.push(n); + } + return e; + }, []); +} +var a = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i; +var l = /\((\S*)(?::(\d+))(?::(\d+))\)/; +function parseChrome(e) { + var r = a.exec(e); + if (!r) { + return null; + } + var u = r[2] && r[2].indexOf("native") === 0; + var t = r[2] && r[2].indexOf("eval") === 0; + var i = l.exec(r[2]); + if (t && i != null) { + r[2] = i[1]; + r[3] = i[2]; + r[4] = i[3]; + } + return { + file: !u ? r[2] : null, + methodName: r[1] || n, + arguments: u ? [ + r[2] + ] : [], + lineNumber: r[3] ? +r[3] : null, + column: r[4] ? +r[4] : null + }; +} +var u = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i; +function parseWinjs(e) { + var r = u.exec(e); + if (!r) { + return null; + } + return { + file: r[2], + methodName: r[1] || n, + arguments: [], + lineNumber: +r[3], + column: r[4] ? +r[4] : null + }; +} +var t = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i; +var i = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i; +function parseGecko(e) { + var r = t.exec(e); + if (!r) { + return null; + } + var a = r[3] && r[3].indexOf(" > eval") > -1; + var l = i.exec(r[3]); + if (a && l != null) { + r[3] = l[1]; + r[4] = l[2]; + r[5] = null; + } + return { + file: r[3], + methodName: r[1] || n, + arguments: r[2] ? r[2].split(",") : [], + lineNumber: r[4] ? +r[4] : null, + column: r[5] ? +r[5] : null + }; +} +var s = /^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i; +function parseJSC(e) { + var r = s.exec(e); + if (!r) { + return null; + } + return { + file: r[3], + methodName: r[1] || n, + arguments: [], + lineNumber: +r[4], + column: r[5] ? +r[5] : null + }; +} +var o = /^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i; +function parseNode(e) { + var r = o.exec(e); + if (!r) { + return null; + } + return { + file: r[2], + methodName: r[1] || n, + arguments: [], + lineNumber: +r[3], + column: r[4] ? +r[4] : null + }; +} +}), +"[turbopack-node]/error.ts [webpack_loaders] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "default", + ()=>isError, + "getProperError", + ()=>getProperError, + "structuredError", + ()=>structuredError +]); +var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$compiled$2f$stacktrace$2d$parser$2f$index$2e$js__$5b$webpack_loaders$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/compiled/stacktrace-parser/index.js [webpack_loaders] (ecmascript)"); +; +function isError(err) { + return typeof err === 'object' && err !== null && 'name' in err && 'message' in err; +} +function getProperError(err) { + if (isError(err)) { + return err; + } + if ("TURBOPACK compile-time truthy", 1) { + // Provide a better error message for cases where `throw undefined` + // is called in development + if (typeof err === 'undefined') { + return new Error('`undefined` was thrown instead of a real error'); + } + if (err === null) { + return new Error('`null` was thrown instead of a real error'); + } + } + return new Error(isPlainObject(err) ? JSON.stringify(err) : err + ''); +} +function getObjectClassLabel(value) { + return Object.prototype.toString.call(value); +} +function isPlainObject(value) { + if (getObjectClassLabel(value) !== '[object Object]') { + return false; + } + const prototype = Object.getPrototypeOf(value); + /** + * this used to be previously: + * + * `return prototype === null || prototype === Object.prototype` + * + * but Edge Runtime expose Object from vm, being that kind of type-checking wrongly fail. + * + * It was changed to the current implementation since it's resilient to serialization. + */ return prototype === null || prototype.hasOwnProperty('isPrototypeOf'); +} +function structuredError(e) { + e = getProperError(e); + return { + name: e.name, + message: e.message, + stack: typeof e.stack === 'string' ? (0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$compiled$2f$stacktrace$2d$parser$2f$index$2e$js__$5b$webpack_loaders$5d$__$28$ecmascript$29$__["parse"])(e.stack) : [], + cause: e.cause ? structuredError(getProperError(e.cause)) : undefined + }; +} +}), +"[turbopack-node]/child_process/index.ts [webpack_loaders] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "IPC", + ()=>IPC +]); +var __TURBOPACK__imported__module__$5b$externals$5d2f$node$3a$net__$5b$external$5d$__$28$node$3a$net$2c$__cjs$29$__ = __turbopack_context__.i("[externals]/node:net [external] (node:net, cjs)"); +var __TURBOPACK__imported__module__$5b$externals$5d2f$node$3a$stream__$5b$external$5d$__$28$node$3a$stream$2c$__cjs$29$__ = __turbopack_context__.i("[externals]/node:stream [external] (node:stream, cjs)"); +var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$error$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/error.ts [webpack_loaders] (ecmascript)"); +; +; +; +function createIpc(port) { + const socket = (0, __TURBOPACK__imported__module__$5b$externals$5d2f$node$3a$net__$5b$external$5d$__$28$node$3a$net$2c$__cjs$29$__["createConnection"])({ + port, + host: '127.0.0.1' + }); + /** + * A writable stream that writes to the socket. + * We don't write directly to the socket because we need to + * handle backpressure and wait for the socket to be drained + * before writing more data. + */ const socketWritable = new __TURBOPACK__imported__module__$5b$externals$5d2f$node$3a$stream__$5b$external$5d$__$28$node$3a$stream$2c$__cjs$29$__["Writable"]({ + write (chunk, _enc, cb) { + if (socket.write(chunk)) { + cb(); + } else { + socket.once('drain', cb); + } + }, + final (cb) { + socket.end(cb); + } + }); + const packetQueue = []; + const recvPromiseResolveQueue = []; + function pushPacket(packet) { + const recvPromiseResolve = recvPromiseResolveQueue.shift(); + if (recvPromiseResolve != null) { + recvPromiseResolve(JSON.parse(packet.toString('utf8'))); + } else { + packetQueue.push(packet); + } + } + let state = { + type: 'waiting' + }; + let buffer = Buffer.alloc(0); + socket.once('connect', ()=>{ + socket.setNoDelay(true); + socket.on('data', (chunk)=>{ + buffer = Buffer.concat([ + buffer, + chunk + ]); + loop: while(true){ + switch(state.type){ + case 'waiting': + { + if (buffer.length >= 4) { + const length = buffer.readUInt32BE(0); + buffer = buffer.subarray(4); + state = { + type: 'packet', + length + }; + } else { + break loop; + } + break; + } + case 'packet': + { + if (buffer.length >= state.length) { + const packet = buffer.subarray(0, state.length); + buffer = buffer.subarray(state.length); + state = { + type: 'waiting' + }; + pushPacket(packet); + } else { + break loop; + } + break; + } + default: + invariant(state, (state)=>`Unknown state type: ${state?.type}`); + } + } + }); + }); + // When the socket is closed, this process is no longer needed. + // This might happen e. g. when parent process is killed or + // node.js pool is garbage collected. + socket.once('close', ()=>{ + process.exit(0); + }); + // TODO(lukesandberg): some of the messages being sent are very large and contain lots + // of redundant information. Consider adding gzip compression to our stream. + function doSend(message) { + return new Promise((resolve, reject)=>{ + // Reserve 4 bytes for our length prefix, we will over-write after encoding. + const packet = Buffer.from('0000' + message, 'utf8'); + packet.writeUInt32BE(packet.length - 4, 0); + socketWritable.write(packet, (err)=>{ + process.stderr.write(`TURBOPACK_OUTPUT_D\n`); + process.stdout.write(`TURBOPACK_OUTPUT_D\n`); + if (err != null) { + reject(err); + } else { + resolve(); + } + }); + }); + } + function send(message) { + return doSend(JSON.stringify(message)); + } + function sendReady() { + return doSend(''); + } + return { + async recv () { + const packet = packetQueue.shift(); + if (packet != null) { + return JSON.parse(packet.toString('utf8')); + } + const result = await new Promise((resolve)=>{ + recvPromiseResolveQueue.push((result)=>{ + resolve(result); + }); + }); + return result; + }, + send (message) { + return send(message); + }, + sendReady, + async sendError (error) { + let failed = false; + try { + await send({ + type: 'error', + ...(0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$error$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__["structuredError"])(error) + }); + } catch (err) { + // There's nothing we can do about errors that happen after this point, we can't tell anyone + // about them. + console.error('failed to send error back to rust:', err); + failed = true; + } + await new Promise((res)=>socket.end(()=>res())); + process.exit(failed ? 1 : 0); + } + }; +} +const PORT = process.argv[2]; +const IPC = createIpc(parseInt(PORT, 10)); +process.on('uncaughtException', (err)=>{ + IPC.sendError(err); +}); +process.on('unhandledRejection', (reason)=>{ + IPC.sendError(reason instanceof Error ? reason : new Error(String(reason))); +}); +const improveConsole = (name, stream, addStack)=>{ + // @ts-ignore + const original = console[name]; + // @ts-ignore + const stdio = process[stream]; + // @ts-ignore + console[name] = (...args)=>{ + stdio.write(`TURBOPACK_OUTPUT_B\n`); + original(...args); + if (addStack) { + const stack = new Error().stack?.replace(/^.+\n.+\n/, '') + '\n'; + stdio.write('TURBOPACK_OUTPUT_S\n'); + stdio.write(stack); + } + stdio.write('TURBOPACK_OUTPUT_E\n'); + }; +}; +improveConsole('error', 'stderr', true); +improveConsole('warn', 'stderr', true); +improveConsole('count', 'stdout', true); +improveConsole('trace', 'stderr', false); +improveConsole('log', 'stdout', true); +improveConsole('group', 'stdout', true); +improveConsole('groupCollapsed', 'stdout', true); +improveConsole('table', 'stdout', true); +improveConsole('debug', 'stdout', true); +improveConsole('info', 'stdout', true); +improveConsole('dir', 'stdout', true); +improveConsole('dirxml', 'stdout', true); +improveConsole('timeEnd', 'stdout', true); +improveConsole('timeLog', 'stdout', true); +improveConsole('timeStamp', 'stdout', true); +improveConsole('assert', 'stderr', true); +/** + * Utility function to ensure all variants of an enum are handled. + */ function invariant(never, computeMessage) { + throw new Error(`Invariant: ${computeMessage(never)}`); +} +}), +"[turbopack-node]/child_process/evaluate.ts [webpack_loaders] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "run", + ()=>run +]); +var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$child_process$2f$index$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/child_process/index.ts [webpack_loaders] (ecmascript)"); +; +const ipc = __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$child_process$2f$index$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__["IPC"]; +const queue = []; +const run = async (moduleFactory)=>{ + let nextId = 1; + const requests = new Map(); + const internalIpc = { + sendInfo: (message)=>ipc.send({ + type: 'info', + data: message + }), + sendRequest: (message)=>{ + const id = nextId++; + let resolve, reject; + const promise = new Promise((res, rej)=>{ + resolve = res; + reject = rej; + }); + requests.set(id, { + resolve, + reject + }); + return ipc.send({ + type: 'request', + id, + data: message + }).then(()=>promise); + }, + sendError: (error)=>{ + return ipc.sendError(error); + } + }; + // Initialize module and send ready message + let getValue; + try { + const module = await moduleFactory(); + if (typeof module.init === 'function') { + await module.init(); + } + getValue = module.default; + await ipc.sendReady(); + } catch (err) { + await ipc.sendReady(); + await ipc.sendError(err); + } + // Queue handling + let isRunning = false; + const run = async ()=>{ + while(queue.length > 0){ + const args = queue.shift(); + try { + const value = await getValue(internalIpc, ...args); + await ipc.send({ + type: 'end', + data: value === undefined ? undefined : JSON.stringify(value, null, 2), + duration: 0 + }); + } catch (e) { + await ipc.sendError(e); + } + } + isRunning = false; + }; + // Communication handling + while(true){ + const msg = await ipc.recv(); + switch(msg.type){ + case 'evaluate': + { + queue.push(msg.args); + if (!isRunning) { + isRunning = true; + run(); + } + break; + } + case 'result': + { + const request = requests.get(msg.id); + if (request) { + requests.delete(msg.id); + if (msg.error) { + request.reject(new Error(msg.error)); + } else { + request.resolve(msg.data); + } + } + break; + } + default: + { + console.error('unexpected message type', msg.type); + process.exit(1); + } + } + } +}; +}), +"[turbopack-node]/child_process/evaluate.ts/evaluate.js { INNER => \"[turbopack-node]/transforms/webpack-loaders.ts [webpack_loaders] (ecmascript)\", RUNTIME => \"[turbopack-node]/child_process/evaluate.ts [webpack_loaders] (ecmascript)\" } [webpack_loaders] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([]); +var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$child_process$2f$evaluate$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/child_process/evaluate.ts [webpack_loaders] (ecmascript)"); +; +(0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$child_process$2f$evaluate$2e$ts__$5b$webpack_loaders$5d$__$28$ecmascript$29$__["run"])(()=>__turbopack_context__.A("[turbopack-node]/transforms/webpack-loaders.ts [webpack_loaders] (ecmascript, async loader)")); +}), +]; + +//# sourceMappingURL=%5Broot-of-the-server%5D__0z6~21d._.js.map \ No newline at end of file diff --git a/.next/dev/build/chunks/[root-of-the-server]__0z6~21d._.js.map b/.next/dev/build/chunks/[root-of-the-server]__0z6~21d._.js.map new file mode 100644 index 0000000..e31a8b3 --- /dev/null +++ b/.next/dev/build/chunks/[root-of-the-server]__0z6~21d._.js.map @@ -0,0 +1,11 @@ +{ + "version": 3, + "sources": [], + "sections": [ + {"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/child_process/globals.ts"],"sourcesContent":["// @ts-ignore\nprocess.turbopack = {}\n"],"names":["process","turbopack"],"mappings":"AAAA,aAAa;AACbA,QAAQC,SAAS,GAAG,CAAC"}}, + {"offset": {"line": 21, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/compiled/stacktrace-parser/index.js"],"sourcesContent":["if (typeof __nccwpck_require__ !== \"undefined\")\n __nccwpck_require__.ab = __dirname + \"/\";\n\nvar n = \"\";\nexport function parse(e) {\n var r = e.split(\"\\n\");\n return r.reduce(function (e, r) {\n var n =\n parseChrome(r) ||\n parseWinjs(r) ||\n parseGecko(r) ||\n parseNode(r) ||\n parseJSC(r);\n if (n) {\n e.push(n);\n }\n return e;\n }, []);\n}\nvar a =\n /^\\s*at (.*?) ?\\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\\/|[a-z]:\\\\|\\\\\\\\).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\nvar l = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\nfunction parseChrome(e) {\n var r = a.exec(e);\n if (!r) {\n return null;\n }\n var u = r[2] && r[2].indexOf(\"native\") === 0;\n var t = r[2] && r[2].indexOf(\"eval\") === 0;\n var i = l.exec(r[2]);\n if (t && i != null) {\n r[2] = i[1];\n r[3] = i[2];\n r[4] = i[3];\n }\n return {\n file: !u ? r[2] : null,\n methodName: r[1] || n,\n arguments: u ? [r[2]] : [],\n lineNumber: r[3] ? +r[3] : null,\n column: r[4] ? +r[4] : null,\n };\n}\nvar u =\n /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nfunction parseWinjs(e) {\n var r = u.exec(e);\n if (!r) {\n return null;\n }\n return {\n file: r[2],\n methodName: r[1] || n,\n arguments: [],\n lineNumber: +r[3],\n column: r[4] ? +r[4] : null,\n };\n}\nvar t =\n /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\\[native).*?|[^@]*bundle)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nvar i = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nfunction parseGecko(e) {\n var r = t.exec(e);\n if (!r) {\n return null;\n }\n var a = r[3] && r[3].indexOf(\" > eval\") > -1;\n var l = i.exec(r[3]);\n if (a && l != null) {\n r[3] = l[1];\n r[4] = l[2];\n r[5] = null;\n }\n return {\n file: r[3],\n methodName: r[1] || n,\n arguments: r[2] ? r[2].split(\",\") : [],\n lineNumber: r[4] ? +r[4] : null,\n column: r[5] ? +r[5] : null,\n };\n}\nvar s = /^\\s*(?:([^@]*)(?:\\((.*?)\\))?@)?(\\S.*?):(\\d+)(?::(\\d+))?\\s*$/i;\nfunction parseJSC(e) {\n var r = s.exec(e);\n if (!r) {\n return null;\n }\n return {\n file: r[3],\n methodName: r[1] || n,\n arguments: [],\n lineNumber: +r[4],\n column: r[5] ? +r[5] : null,\n };\n}\nvar o =\n /^\\s*at (?:((?:\\[object object\\])?[^\\\\/]+(?: \\[as \\S+\\])?) )?\\(?(.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nfunction parseNode(e) {\n var r = o.exec(e);\n if (!r) {\n return null;\n }\n return {\n file: r[2],\n methodName: r[1] || n,\n arguments: [],\n lineNumber: +r[3],\n column: r[4] ? +r[4] : null,\n };\n}\n"],"names":["__nccwpck_require__","ab","n","parse","e","r","split","reduce","parseChrome","parseWinjs","parseGecko","parseNode","parseJSC","push","a","l","exec","u","indexOf","t","i","file","methodName","arguments","lineNumber","column","s","o"],"mappings":";;;;AAAA,IAAI,OAAOA,wBAAwB,aACjCA,oBAAoBC,EAAE,GAAG,uEAAY;AAEvC,IAAIC,IAAI;AACD,SAASC,MAAMC,CAAC;IACrB,IAAIC,IAAID,EAAEE,KAAK,CAAC;IAChB,OAAOD,EAAEE,MAAM,CAAC,SAAUH,CAAC,EAAEC,CAAC;QAC5B,IAAIH,IACFM,YAAYH,MACZI,WAAWJ,MACXK,WAAWL,MACXM,UAAUN,MACVO,SAASP;QACX,IAAIH,GAAG;YACLE,EAAES,IAAI,CAACX;QACT;QACA,OAAOE;IACT,GAAG,EAAE;AACP;AACA,IAAIU,IACF;AACF,IAAIC,IAAI;AACR,SAASP,YAAYJ,CAAC;IACpB,IAAIC,IAAIS,EAAEE,IAAI,CAACZ;IACf,IAAI,CAACC,GAAG;QACN,OAAO;IACT;IACA,IAAIY,IAAIZ,CAAC,CAAC,EAAE,IAAIA,CAAC,CAAC,EAAE,CAACa,OAAO,CAAC,cAAc;IAC3C,IAAIC,IAAId,CAAC,CAAC,EAAE,IAAIA,CAAC,CAAC,EAAE,CAACa,OAAO,CAAC,YAAY;IACzC,IAAIE,IAAIL,EAAEC,IAAI,CAACX,CAAC,CAAC,EAAE;IACnB,IAAIc,KAAKC,KAAK,MAAM;QAClBf,CAAC,CAAC,EAAE,GAAGe,CAAC,CAAC,EAAE;QACXf,CAAC,CAAC,EAAE,GAAGe,CAAC,CAAC,EAAE;QACXf,CAAC,CAAC,EAAE,GAAGe,CAAC,CAAC,EAAE;IACb;IACA,OAAO;QACLC,MAAM,CAACJ,IAAIZ,CAAC,CAAC,EAAE,GAAG;QAClBiB,YAAYjB,CAAC,CAAC,EAAE,IAAIH;QACpBqB,WAAWN,IAAI;YAACZ,CAAC,CAAC,EAAE;SAAC,GAAG,EAAE;QAC1BmB,YAAYnB,CAAC,CAAC,EAAE,GAAG,CAACA,CAAC,CAAC,EAAE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,IAAI;AACR,SAASd,SAASR,CAAC;IACjB,IAAIC,IAAIqB,EAAEV,IAAI,CAACZ;IACf,IAAI,CAACC,GAAG;QACN,OAAO;IACT;IACA,OAAO;QACLgB,MAAMhB,CAAC,CAAC,EAAE;QACViB,YAAYjB,CAAC,CAAC,EAAE,IAAIH;QACpBqB,WAAW,EAAE;QACbC,YAAY,CAACnB,CAAC,CAAC,EAAE;QACjBoB,QAAQpB,CAAC,CAAC,EAAE,GAAG,CAACA,CAAC,CAAC,EAAE,GAAG;IACzB;AACF;AACA,IAAIsB,IACF;AACF,SAAShB,UAAUP,CAAC;IAClB,IAAIC,IAAIsB,EAAEX,IAAI,CAACZ;IACf,IAAI,CAACC,GAAG;QACN,OAAO;IACT;IACA,OAAO;QACLgB,MAAMhB,CAAC,CAAC,EAAE;QACViB,YAAYjB,CAAC,CAAC,EAAE,IAAIH;QACpBqB,WAAW,EAAE;QACbC,YAAY,CAACnB,CAAC,CAAC,EAAE;QACjBoB,QAAQpB,CAAC,CAAC,EAAE,GAAG,CAACA,CAAC,CAAC,EAAE,GAAG;IACzB;AACF"}}, + {"offset": {"line": 130, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/error.ts"],"sourcesContent":["import type { StackFrame } from './compiled/stacktrace-parser'\nimport { parse as parseStackTrace } from './compiled/stacktrace-parser'\n\n// merged from next.js\n// https://github.com/vercel/next.js/blob/e657741b9908cf0044aaef959c0c4defb19ed6d8/packages/next/src/lib/is-error.ts\n// https://github.com/vercel/next.js/blob/e657741b9908cf0044aaef959c0c4defb19ed6d8/packages/next/src/shared/lib/is-plain-object.ts\n\nexport default function isError(err: unknown): err is Error {\n return (\n typeof err === 'object' && err !== null && 'name' in err && 'message' in err\n )\n}\n\nexport function getProperError(err: unknown): Error {\n if (isError(err)) {\n return err\n }\n\n if (process.env.NODE_ENV === 'development') {\n // Provide a better error message for cases where `throw undefined`\n // is called in development\n if (typeof err === 'undefined') {\n return new Error('`undefined` was thrown instead of a real error')\n }\n\n if (err === null) {\n return new Error('`null` was thrown instead of a real error')\n }\n }\n\n return new Error(isPlainObject(err) ? JSON.stringify(err) : err + '')\n}\n\nfunction getObjectClassLabel(value: any): string {\n return Object.prototype.toString.call(value)\n}\n\nfunction isPlainObject(value: any): boolean {\n if (getObjectClassLabel(value) !== '[object Object]') {\n return false\n }\n\n const prototype = Object.getPrototypeOf(value)\n\n /**\n * this used to be previously:\n *\n * `return prototype === null || prototype === Object.prototype`\n *\n * but Edge Runtime expose Object from vm, being that kind of type-checking wrongly fail.\n *\n * It was changed to the current implementation since it's resilient to serialization.\n */\n return prototype === null || prototype.hasOwnProperty('isPrototypeOf')\n}\n\nexport type StructuredError = {\n name: string\n message: string\n stack: StackFrame[]\n cause: StructuredError | undefined\n}\n\nexport function structuredError(e: Error | string): StructuredError {\n e = getProperError(e)\n\n return {\n name: e.name,\n message: e.message,\n stack: typeof e.stack === 'string' ? parseStackTrace(e.stack) : [],\n cause: e.cause ? structuredError(getProperError(e.cause)) : undefined,\n }\n}\n"],"names":["isError","err","getProperError","Error","isPlainObject","JSON","stringify","getObjectClassLabel","value","Object","prototype","toString","call","getPrototypeOf","hasOwnProperty","structuredError","e","name","message","stack","cause","undefined"],"mappings":";;;;;;;;AACA;;AAMe,SAASA,QAAQC,GAAY;IAC1C,OACE,OAAOA,QAAQ,YAAYA,QAAQ,QAAQ,UAAUA,OAAO,aAAaA;AAE7E;AAEO,SAASC,eAAeD,GAAY;IACzC,IAAID,QAAQC,MAAM;QAChB,OAAOA;IACT;IAEA,wCAA4C;QAC1C,mEAAmE;QACnE,2BAA2B;QAC3B,IAAI,OAAOA,QAAQ,aAAa;YAC9B,OAAO,IAAIE,MAAM;QACnB;QAEA,IAAIF,QAAQ,MAAM;YAChB,OAAO,IAAIE,MAAM;QACnB;IACF;IAEA,OAAO,IAAIA,MAAMC,cAAcH,OAAOI,KAAKC,SAAS,CAACL,OAAOA,MAAM;AACpE;AAEA,SAASM,oBAAoBC,KAAU;IACrC,OAAOC,OAAOC,SAAS,CAACC,QAAQ,CAACC,IAAI,CAACJ;AACxC;AAEA,SAASJ,cAAcI,KAAU;IAC/B,IAAID,oBAAoBC,WAAW,mBAAmB;QACpD,OAAO;IACT;IAEA,MAAME,YAAYD,OAAOI,cAAc,CAACL;IAExC;;;;;;;;GAQC,GACD,OAAOE,cAAc,QAAQA,UAAUI,cAAc,CAAC;AACxD;AASO,SAASC,gBAAgBC,CAAiB;IAC/CA,IAAId,eAAec;IAEnB,OAAO;QACLC,MAAMD,EAAEC,IAAI;QACZC,SAASF,EAAEE,OAAO;QAClBC,OAAO,OAAOH,EAAEG,KAAK,KAAK,WAAW,IAAA,iKAAe,EAACH,EAAEG,KAAK,IAAI,EAAE;QAClEC,OAAOJ,EAAEI,KAAK,GAAGL,gBAAgBb,eAAec,EAAEI,KAAK,KAAKC;IAC9D;AACF"}}, + {"offset": {"line": 190, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/child_process/index.ts"],"sourcesContent":["import { createConnection } from 'node:net'\nimport { Writable } from 'node:stream'\nimport { structuredError } from '../error'\n\ntype State =\n | {\n type: 'waiting'\n }\n | {\n type: 'packet'\n length: number\n }\n\nexport type Ipc = {\n recv(): Promise\n send(message: TOutgoing): Promise\n sendError(error: Error | string): Promise\n sendReady(): Promise\n}\n\nfunction createIpc(\n port: number\n): Ipc {\n const socket = createConnection({\n port,\n host: '127.0.0.1',\n })\n\n /**\n * A writable stream that writes to the socket.\n * We don't write directly to the socket because we need to\n * handle backpressure and wait for the socket to be drained\n * before writing more data.\n */\n const socketWritable = new Writable({\n write(chunk, _enc, cb) {\n if (socket.write(chunk)) {\n cb()\n } else {\n socket.once('drain', cb)\n }\n },\n final(cb) {\n socket.end(cb)\n },\n })\n\n const packetQueue: Buffer[] = []\n const recvPromiseResolveQueue: Array<(message: TIncoming) => void> = []\n\n function pushPacket(packet: Buffer) {\n const recvPromiseResolve = recvPromiseResolveQueue.shift()\n if (recvPromiseResolve != null) {\n recvPromiseResolve(JSON.parse(packet.toString('utf8')) as TIncoming)\n } else {\n packetQueue.push(packet)\n }\n }\n\n let state: State = { type: 'waiting' }\n let buffer: Buffer = Buffer.alloc(0)\n socket.once('connect', () => {\n socket.setNoDelay(true)\n socket.on('data', (chunk) => {\n buffer = Buffer.concat([buffer, chunk])\n\n loop: while (true) {\n switch (state.type) {\n case 'waiting': {\n if (buffer.length >= 4) {\n const length = buffer.readUInt32BE(0)\n buffer = buffer.subarray(4)\n state = { type: 'packet', length }\n } else {\n break loop\n }\n break\n }\n case 'packet': {\n if (buffer.length >= state.length) {\n const packet = buffer.subarray(0, state.length)\n buffer = buffer.subarray(state.length)\n state = { type: 'waiting' }\n pushPacket(packet)\n } else {\n break loop\n }\n break\n }\n default:\n invariant(state, (state) => `Unknown state type: ${state?.type}`)\n }\n }\n })\n })\n // When the socket is closed, this process is no longer needed.\n // This might happen e. g. when parent process is killed or\n // node.js pool is garbage collected.\n socket.once('close', () => {\n process.exit(0)\n })\n\n // TODO(lukesandberg): some of the messages being sent are very large and contain lots\n // of redundant information. Consider adding gzip compression to our stream.\n function doSend(message: string): Promise {\n return new Promise((resolve, reject) => {\n // Reserve 4 bytes for our length prefix, we will over-write after encoding.\n const packet = Buffer.from('0000' + message, 'utf8')\n packet.writeUInt32BE(packet.length - 4, 0)\n socketWritable.write(packet, (err) => {\n process.stderr.write(`TURBOPACK_OUTPUT_D\\n`)\n process.stdout.write(`TURBOPACK_OUTPUT_D\\n`)\n if (err != null) {\n reject(err)\n } else {\n resolve()\n }\n })\n })\n }\n\n function send(message: any): Promise {\n return doSend(JSON.stringify(message))\n }\n function sendReady(): Promise {\n return doSend('')\n }\n\n return {\n async recv() {\n const packet = packetQueue.shift()\n if (packet != null) {\n return JSON.parse(packet.toString('utf8')) as TIncoming\n }\n\n const result = await new Promise((resolve) => {\n recvPromiseResolveQueue.push((result) => {\n resolve(result)\n })\n })\n\n return result\n },\n\n send(message: TOutgoing) {\n return send(message)\n },\n\n sendReady,\n\n async sendError(error: Error): Promise {\n let failed = false\n try {\n await send({\n type: 'error',\n ...structuredError(error),\n })\n } catch (err) {\n // There's nothing we can do about errors that happen after this point, we can't tell anyone\n // about them.\n console.error('failed to send error back to rust:', err)\n failed = true\n }\n await new Promise((res) => socket.end(() => res()))\n process.exit(failed ? 1 : 0)\n },\n }\n}\n\nconst PORT = process.argv[2]\n\nexport const IPC = createIpc(parseInt(PORT, 10))\n\nprocess.on('uncaughtException', (err) => {\n IPC.sendError(err)\n})\n\nprocess.on('unhandledRejection', (reason) => {\n IPC.sendError(reason instanceof Error ? reason : new Error(String(reason)))\n})\n\nconst improveConsole = (name: string, stream: string, addStack: boolean) => {\n // @ts-ignore\n const original = console[name]\n // @ts-ignore\n const stdio = process[stream]\n // @ts-ignore\n console[name] = (...args: any[]) => {\n stdio.write(`TURBOPACK_OUTPUT_B\\n`)\n original(...args)\n if (addStack) {\n const stack = new Error().stack?.replace(/^.+\\n.+\\n/, '') + '\\n'\n stdio.write('TURBOPACK_OUTPUT_S\\n')\n stdio.write(stack)\n }\n stdio.write('TURBOPACK_OUTPUT_E\\n')\n }\n}\n\nimproveConsole('error', 'stderr', true)\nimproveConsole('warn', 'stderr', true)\nimproveConsole('count', 'stdout', true)\nimproveConsole('trace', 'stderr', false)\nimproveConsole('log', 'stdout', true)\nimproveConsole('group', 'stdout', true)\nimproveConsole('groupCollapsed', 'stdout', true)\nimproveConsole('table', 'stdout', true)\nimproveConsole('debug', 'stdout', true)\nimproveConsole('info', 'stdout', true)\nimproveConsole('dir', 'stdout', true)\nimproveConsole('dirxml', 'stdout', true)\nimproveConsole('timeEnd', 'stdout', true)\nimproveConsole('timeLog', 'stdout', true)\nimproveConsole('timeStamp', 'stdout', true)\nimproveConsole('assert', 'stderr', true)\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"],"names":["createIpc","port","socket","host","socketWritable","write","chunk","_enc","cb","once","final","end","packetQueue","recvPromiseResolveQueue","pushPacket","packet","recvPromiseResolve","shift","JSON","parse","toString","push","state","type","buffer","Buffer","alloc","setNoDelay","on","concat","loop","length","readUInt32BE","subarray","invariant","process","exit","doSend","message","Promise","resolve","reject","from","writeUInt32BE","err","stderr","stdout","send","stringify","sendReady","recv","result","sendError","error","failed","console","res","PORT","argv","IPC","parseInt","reason","Error","String","improveConsole","name","stream","addStack","original","stdio","args","stack","replace","never","computeMessage"],"mappings":";;;;AAAA;AACA;AACA;;;;AAkBA,SAASA,UACPC,IAAY;IAEZ,MAAMC,SAAS,IAAA,mIAAgB,EAAC;QAC9BD;QACAE,MAAM;IACR;IAEA;;;;;GAKC,GACD,MAAMC,iBAAiB,IAAI,iIAAQ,CAAC;QAClCC,OAAMC,KAAK,EAAEC,IAAI,EAAEC,EAAE;YACnB,IAAIN,OAAOG,KAAK,CAACC,QAAQ;gBACvBE;YACF,OAAO;gBACLN,OAAOO,IAAI,CAAC,SAASD;YACvB;QACF;QACAE,OAAMF,EAAE;YACNN,OAAOS,GAAG,CAACH;QACb;IACF;IAEA,MAAMI,cAAwB,EAAE;IAChC,MAAMC,0BAA+D,EAAE;IAEvE,SAASC,WAAWC,MAAc;QAChC,MAAMC,qBAAqBH,wBAAwBI,KAAK;QACxD,IAAID,sBAAsB,MAAM;YAC9BA,mBAAmBE,KAAKC,KAAK,CAACJ,OAAOK,QAAQ,CAAC;QAChD,OAAO;YACLR,YAAYS,IAAI,CAACN;QACnB;IACF;IAEA,IAAIO,QAAe;QAAEC,MAAM;IAAU;IACrC,IAAIC,SAAiBC,OAAOC,KAAK,CAAC;IAClCxB,OAAOO,IAAI,CAAC,WAAW;QACrBP,OAAOyB,UAAU,CAAC;QAClBzB,OAAO0B,EAAE,CAAC,QAAQ,CAACtB;YACjBkB,SAASC,OAAOI,MAAM,CAAC;gBAACL;gBAAQlB;aAAM;YAEtCwB,MAAM,MAAO,KAAM;gBACjB,OAAQR,MAAM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,aAAa;IACbX,OAAO,CAACU,KAAK,GAAG,CAAC,GAAGK;QAClBD,MAAMhE,KAAK,CAAC,CAAC,oBAAoB,CAAC;QAClC+D,YAAYE;QACZ,IAAIH,UAAU;YACZ,MAAMI,QAAQ,IAAIT,QAAQS,KAAK,EAAEC,QAAQ,aAAa,MAAM;YAC5DH,MAAMhE,KAAK,CAAC;YACZgE,MAAMhE,KAAK,CAACkE;QACd;QACAF,MAAMhE,KAAK,CAAC;IACd;AACF;AAEA2D,eAAe,SAAS,UAAU;AAClCA,eAAe,QAAQ,UAAU;AACjCA,eAAe,SAAS,UAAU;AAClCA,eAAe,SAAS,UAAU;AAClCA,eAAe,OAAO,UAAU;AAChCA,eAAe,SAAS,UAAU;AAClCA,eAAe,kBAAkB,UAAU;AAC3CA,eAAe,SAAS,UAAU;AAClCA,eAAe,SAAS,UAAU;AAClCA,eAAe,QAAQ,UAAU;AACjCA,eAAe,OAAO,UAAU;AAChCA,eAAe,UAAU,UAAU;AACnCA,eAAe,WAAW,UAAU;AACpCA,eAAe,WAAW,UAAU;AACpCA,eAAe,aAAa,UAAU;AACtCA,eAAe,UAAU,UAAU;AAEnC;;CAEC,GACD,SAAS9B,UAAUuC,KAAY,EAAEC,cAAoC;IACnE,MAAM,IAAIZ,MAAM,CAAC,WAAW,EAAEY,eAAeD,QAAQ;AACvD"}}, + {"offset": {"line": 394, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/child_process/evaluate.ts"],"sourcesContent":["import { IPC } from './index'\nimport type { Ipc as GenericIpc } from './index'\n\nimport type { Channel as Ipc } from '../types'\n\ntype IpcIncomingMessage =\n | {\n type: 'evaluate'\n args: string[]\n }\n | {\n type: 'result'\n id: number\n error: string | null\n data: any | null\n }\n\ntype IpcOutgoingMessage =\n | {\n type: 'end'\n data: string | undefined\n duration: number\n }\n | {\n type: 'info'\n data: any\n }\n | {\n type: 'request'\n id: number\n data: any\n }\n\nconst ipc = IPC as GenericIpc\n\nconst queue: string[][] = []\n\nexport const run = async (\n moduleFactory: () => Promise<{\n init?: () => Promise\n default: (ipc: Ipc, ...deserializedArgs: any[]) => any\n }>\n) => {\n let nextId = 1\n const requests = new Map()\n const internalIpc = {\n sendInfo: (message: any) =>\n ipc.send({\n type: 'info',\n data: message,\n }),\n sendRequest: (message: any) => {\n const id = nextId++\n let resolve, reject\n const promise = new Promise((res, rej) => {\n resolve = res\n reject = rej\n })\n requests.set(id, { resolve, reject })\n return ipc\n .send({ type: 'request', id, data: message })\n .then(() => promise)\n },\n sendError: (error: Error) => {\n return ipc.sendError(error)\n },\n }\n\n // Initialize module and send ready message\n let getValue: (ipc: Ipc, ...deserializedArgs: any[]) => any\n try {\n const module = await moduleFactory()\n if (typeof module.init === 'function') {\n await module.init()\n }\n getValue = module.default\n await ipc.sendReady()\n } catch (err) {\n await ipc.sendReady()\n await ipc.sendError(err as Error)\n }\n\n // Queue handling\n let isRunning = false\n const run = async () => {\n while (queue.length > 0) {\n const args = queue.shift()!\n try {\n const value = await getValue(internalIpc, ...args)\n await ipc.send({\n type: 'end',\n data:\n value === undefined ? undefined : JSON.stringify(value, null, 2),\n duration: 0,\n })\n } catch (e) {\n await ipc.sendError(e as Error)\n }\n }\n isRunning = false\n }\n\n // Communication handling\n while (true) {\n const msg = await ipc.recv()\n\n switch (msg.type) {\n case 'evaluate': {\n queue.push(msg.args)\n if (!isRunning) {\n isRunning = true\n run()\n }\n break\n }\n case 'result': {\n const request = requests.get(msg.id)\n if (request) {\n requests.delete(msg.id)\n if (msg.error) {\n request.reject(new Error(msg.error))\n } else {\n request.resolve(msg.data)\n }\n }\n break\n }\n default: {\n console.error('unexpected message type', (msg as any).type)\n process.exit(1)\n }\n }\n }\n}\n\nexport type { IpcIncomingMessage, IpcOutgoingMessage }\n"],"names":["ipc","queue","run","moduleFactory","nextId","requests","Map","internalIpc","sendInfo","message","send","type","data","sendRequest","id","resolve","reject","promise","Promise","res","rej","set","then","sendError","error","getValue","module","init","default","sendReady","err","isRunning","length","args","shift","value","undefined","JSON","stringify","duration","e","msg","recv","push","request","get","delete","Error","console","process","exit"],"mappings":";;;;AAAA;;AAiCA,MAAMA,MAAM,4IAAG;AAEf,MAAMC,QAAoB,EAAE;AAErB,MAAMC,MAAM,OACjBC;IAKA,IAAIC,SAAS;IACb,MAAMC,WAAW,IAAIC;IACrB,MAAMC,cAAc;QAClBC,UAAU,CAACC,UACTT,IAAIU,IAAI,CAAC;gBACPC,MAAM;gBACNC,MAAMH;YACR;QACFI,aAAa,CAACJ;YACZ,MAAMK,KAAKV;YACX,IAAIW,SAASC;YACb,MAAMC,UAAU,IAAIC,QAAQ,CAACC,KAAKC;gBAChCL,UAAUI;gBACVH,SAASI;YACX;YACAf,SAASgB,GAAG,CAACP,IAAI;gBAAEC;gBAASC;YAAO;YACnC,OAAOhB,IACJU,IAAI,CAAC;gBAAEC,MAAM;gBAAWG;gBAAIF,MAAMH;YAAQ,GAC1Ca,IAAI,CAAC,IAAML;QAChB;QACAM,WAAW,CAACC;YACV,OAAOxB,IAAIuB,SAAS,CAACC;QACvB;IACF;IAEA,2CAA2C;IAC3C,IAAIC;IACJ,IAAI;QACF,MAAMC,SAAS,MAAMvB;QACrB,IAAI,OAAOuB,OAAOC,IAAI,KAAK,YAAY;YACrC,MAAMD,OAAOC,IAAI;QACnB;QACAF,WAAWC,OAAOE,OAAO;QACzB,MAAM5B,IAAI6B,SAAS;IACrB,EAAE,OAAOC,KAAK;QACZ,MAAM9B,IAAI6B,SAAS;QACnB,MAAM7B,IAAIuB,SAAS,CAACO;IACtB;IAEA,iBAAiB;IACjB,IAAIC,YAAY;IAChB,MAAM7B,MAAM;QACV,MAAOD,MAAM+B,MAAM,GAAG,EAAG;YACvB,MAAMC,OAAOhC,MAAMiC,KAAK;YACxB,IAAI;gBACF,MAAMC,QAAQ,MAAMV,SAASlB,gBAAgB0B;gBAC7C,MAAMjC,IAAIU,IAAI,CAAC;oBACbC,MAAM;oBACNC,MACEuB,UAAUC,YAAYA,YAAYC,KAAKC,SAAS,CAACH,OAAO,MAAM;oBAChEI,UAAU;gBACZ;YACF,EAAE,OAAOC,GAAG;gBACV,MAAMxC,IAAIuB,SAAS,CAACiB;YACtB;QACF;QACAT,YAAY;IACd;IAEA,yBAAyB;IACzB,MAAO,KAAM;QACX,MAAMU,MAAM,MAAMzC,IAAI0C,IAAI;QAE1B,OAAQD,IAAI9B,IAAI;YACd,KAAK;gBAAY;oBACfV,MAAM0C,IAAI,CAACF,IAAIR,IAAI;oBACnB,IAAI,CAACF,WAAW;wBACdA,YAAY;wBACZ7B;oBACF;oBACA;gBACF;YACA,KAAK;gBAAU;oBACb,MAAM0C,UAAUvC,SAASwC,GAAG,CAACJ,IAAI3B,EAAE;oBACnC,IAAI8B,SAAS;wBACXvC,SAASyC,MAAM,CAACL,IAAI3B,EAAE;wBACtB,IAAI2B,IAAIjB,KAAK,EAAE;4BACboB,QAAQ5B,MAAM,CAAC,IAAI+B,MAAMN,IAAIjB,KAAK;wBACpC,OAAO;4BACLoB,QAAQ7B,OAAO,CAAC0B,IAAI7B,IAAI;wBAC1B;oBACF;oBACA;gBACF;YACA;gBAAS;oBACPoC,QAAQxB,KAAK,CAAC,2BAA2B,AAACiB,IAAY9B,IAAI;oBAC1DsC,QAAQC,IAAI,CAAC;gBACf;QACF;IACF;AACF"}}, + {"offset": {"line": 500, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack-node]/child_process/evaluate.ts/evaluate.js"],"sourcesContent":["import { run } from 'RUNTIME'; run(() => import('INNER'))"],"names":[],"mappings":";AAAA;;AAA+B,IAAA,+IAAG,EAAC"}}] +} \ No newline at end of file diff --git a/.next/dev/build/chunks/[turbopack-node]_transforms_postcss_ts_06e.r3r._.js b/.next/dev/build/chunks/[turbopack-node]_transforms_postcss_ts_06e.r3r._.js new file mode 100644 index 0000000..e34da84 --- /dev/null +++ b/.next/dev/build/chunks/[turbopack-node]_transforms_postcss_ts_06e.r3r._.js @@ -0,0 +1,13 @@ +module.exports = [ +"[turbopack-node]/transforms/postcss.ts { CONFIG => \"[project]/postcss.config.mjs [postcss] (ecmascript)\" } [postcss] (ecmascript, async loader)", ((__turbopack_context__) => { + +__turbopack_context__.v((parentImport) => { + return Promise.all([ + "chunks/node_modules_13sb.px._.js", + "chunks/[root-of-the-server]__0d-m0h0._.js" +].map((chunk) => __turbopack_context__.l(chunk))).then(() => { + return parentImport("[turbopack-node]/transforms/postcss.ts { CONFIG => \"[project]/postcss.config.mjs [postcss] (ecmascript)\" } [postcss] (ecmascript)"); + }); +}); +}), +]; \ No newline at end of file diff --git a/.next/dev/build/chunks/[turbopack-node]_transforms_postcss_ts_06e.r3r._.js.map b/.next/dev/build/chunks/[turbopack-node]_transforms_postcss_ts_06e.r3r._.js.map new file mode 100644 index 0000000..c15d7ec --- /dev/null +++ b/.next/dev/build/chunks/[turbopack-node]_transforms_postcss_ts_06e.r3r._.js.map @@ -0,0 +1,5 @@ +{ + "version": 3, + "sources": [], + "sections": [] +} \ No newline at end of file diff --git a/.next/dev/build/chunks/[turbopack-node]_transforms_webpack-loaders_ts_0z77ki4._.js b/.next/dev/build/chunks/[turbopack-node]_transforms_webpack-loaders_ts_0z77ki4._.js new file mode 100644 index 0000000..8316c97 --- /dev/null +++ b/.next/dev/build/chunks/[turbopack-node]_transforms_webpack-loaders_ts_0z77ki4._.js @@ -0,0 +1,12 @@ +module.exports = [ +"[turbopack-node]/transforms/webpack-loaders.ts [webpack_loaders] (ecmascript, async loader)", ((__turbopack_context__) => { + +__turbopack_context__.v((parentImport) => { + return Promise.all([ + "chunks/[root-of-the-server]__0iz~thn._.js" +].map((chunk) => __turbopack_context__.l(chunk))).then(() => { + return parentImport("[turbopack-node]/transforms/webpack-loaders.ts [webpack_loaders] (ecmascript)"); + }); +}); +}), +]; \ No newline at end of file diff --git a/.next/dev/build/chunks/[turbopack-node]_transforms_webpack-loaders_ts_0z77ki4._.js.map b/.next/dev/build/chunks/[turbopack-node]_transforms_webpack-loaders_ts_0z77ki4._.js.map new file mode 100644 index 0000000..c15d7ec --- /dev/null +++ b/.next/dev/build/chunks/[turbopack-node]_transforms_webpack-loaders_ts_0z77ki4._.js.map @@ -0,0 +1,5 @@ +{ + "version": 3, + "sources": [], + "sections": [] +} \ No newline at end of file diff --git a/.next/dev/build/chunks/[turbopack]_runtime.js b/.next/dev/build/chunks/[turbopack]_runtime.js new file mode 100644 index 0000000..a679cd4 --- /dev/null +++ b/.next/dev/build/chunks/[turbopack]_runtime.js @@ -0,0 +1,1702 @@ +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; + } +} +globalThis.__turbopack_server_hmr_apply__ = __turbopack_server_hmr_apply__; + + +//# 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 new file mode 100644 index 0000000..0f403e3 --- /dev/null +++ b/.next/dev/build/chunks/[turbopack]_runtime.js.map @@ -0,0 +1,14 @@ +{ + "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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turbopack:///[turbopack]/shared-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;I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AChB,WAAWY;IAC5B;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;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K,EACLC,QAAQ,EACR9B,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,C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0]}}, + {"offset": {"line": 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,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MAAMa,IAAI;QACnE;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\nglobalThis.__turbopack_server_hmr_apply__ = __turbopack_server_hmr_apply__\n"],"names":["hmrClientInitialized","ensureHmrClientInitialized","initializeServerHmr","moduleFactories","devModuleCache","__turbopack_server_hmr_apply__","update","emitMessage","type","data","err","console","error","globalThis"],"mappings":"AAAA,+DAA+D;AAC/D,wCAAwC;AAExC;;;CAGC,GAED,uEAAuE;AACvE,IAAIA,uBAAuB;AAC3B,SAASC;IACP,IAAID,sBAAsB;IAC1BA,uBAAuB;IAEvB,wEAAwE;IACxE,yCAAyC;IACzC,kEAAkE;IAClEE,oBAAoBC,iBAAiBC;AACvC;AAEA,SAASC,+BAA+BC,MAAwB;IAC9D,IAAI;QACFL;QAEA,uEAAuE;QACvE,OAAOM,YAAY;YACjBC,MAAM;YACNC,MAAMH;QACR;IACF,EAAE,OAAOI,KAAK;QACZC,QAAQC,KAAK,CAAC,wCAAwCF;QACtD,OAAO;IACT;AACF;AAEAG,WAAWR,8BAA8B,GAAGA","ignoreList":[0]}}] +} \ No newline at end of file diff --git a/.next/dev/build/chunks/node_modules_13sb.px._.js b/.next/dev/build/chunks/node_modules_13sb.px._.js new file mode 100644 index 0000000..9eef5ab --- /dev/null +++ b/.next/dev/build/chunks/node_modules_13sb.px._.js @@ -0,0 +1,6790 @@ +module.exports = [ +"[project]/node_modules/picocolors/picocolors.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { + +let p = process || {}, argv = p.argv || [], env = p.env || {}; +let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI); +let formatter = (open, close, replace = open)=>(input)=>{ + let string = "" + input, index = string.indexOf(close, open.length); + return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close; + }; +let replaceClose = (string, close, replace, index)=>{ + let result = "", cursor = 0; + do { + result += string.substring(cursor, index) + replace; + cursor = index + close.length; + index = string.indexOf(close, cursor); + }while (~index) + return result + string.substring(cursor); +}; +let createColors = (enabled = isColorSupported)=>{ + let f = enabled ? formatter : ()=>String; + return { + isColorSupported: enabled, + reset: f("\x1b[0m", "\x1b[0m"), + bold: f("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m"), + dim: f("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m"), + italic: f("\x1b[3m", "\x1b[23m"), + underline: f("\x1b[4m", "\x1b[24m"), + inverse: f("\x1b[7m", "\x1b[27m"), + hidden: f("\x1b[8m", "\x1b[28m"), + strikethrough: f("\x1b[9m", "\x1b[29m"), + black: f("\x1b[30m", "\x1b[39m"), + red: f("\x1b[31m", "\x1b[39m"), + green: f("\x1b[32m", "\x1b[39m"), + yellow: f("\x1b[33m", "\x1b[39m"), + blue: f("\x1b[34m", "\x1b[39m"), + magenta: f("\x1b[35m", "\x1b[39m"), + cyan: f("\x1b[36m", "\x1b[39m"), + white: f("\x1b[37m", "\x1b[39m"), + gray: f("\x1b[90m", "\x1b[39m"), + bgBlack: f("\x1b[40m", "\x1b[49m"), + bgRed: f("\x1b[41m", "\x1b[49m"), + bgGreen: f("\x1b[42m", "\x1b[49m"), + bgYellow: f("\x1b[43m", "\x1b[49m"), + bgBlue: f("\x1b[44m", "\x1b[49m"), + bgMagenta: f("\x1b[45m", "\x1b[49m"), + bgCyan: f("\x1b[46m", "\x1b[49m"), + bgWhite: f("\x1b[47m", "\x1b[49m"), + blackBright: f("\x1b[90m", "\x1b[39m"), + redBright: f("\x1b[91m", "\x1b[39m"), + greenBright: f("\x1b[92m", "\x1b[39m"), + yellowBright: f("\x1b[93m", "\x1b[39m"), + blueBright: f("\x1b[94m", "\x1b[39m"), + magentaBright: f("\x1b[95m", "\x1b[39m"), + cyanBright: f("\x1b[96m", "\x1b[39m"), + whiteBright: f("\x1b[97m", "\x1b[39m"), + bgBlackBright: f("\x1b[100m", "\x1b[49m"), + bgRedBright: f("\x1b[101m", "\x1b[49m"), + bgGreenBright: f("\x1b[102m", "\x1b[49m"), + bgYellowBright: f("\x1b[103m", "\x1b[49m"), + bgBlueBright: f("\x1b[104m", "\x1b[49m"), + bgMagentaBright: f("\x1b[105m", "\x1b[49m"), + bgCyanBright: f("\x1b[106m", "\x1b[49m"), + bgWhiteBright: f("\x1b[107m", "\x1b[49m") + }; +}; +module.exports = createColors(); +module.exports.createColors = createColors; +}), +"[project]/node_modules/postcss/lib/tokenize.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +const SINGLE_QUOTE = "'".charCodeAt(0); +const DOUBLE_QUOTE = '"'.charCodeAt(0); +const BACKSLASH = '\\'.charCodeAt(0); +const SLASH = '/'.charCodeAt(0); +const NEWLINE = '\n'.charCodeAt(0); +const SPACE = ' '.charCodeAt(0); +const FEED = '\f'.charCodeAt(0); +const TAB = '\t'.charCodeAt(0); +const CR = '\r'.charCodeAt(0); +const OPEN_SQUARE = '['.charCodeAt(0); +const CLOSE_SQUARE = ']'.charCodeAt(0); +const OPEN_PARENTHESES = '('.charCodeAt(0); +const CLOSE_PARENTHESES = ')'.charCodeAt(0); +const OPEN_CURLY = '{'.charCodeAt(0); +const CLOSE_CURLY = '}'.charCodeAt(0); +const SEMICOLON = ';'.charCodeAt(0); +const ASTERISK = '*'.charCodeAt(0); +const COLON = ':'.charCodeAt(0); +const AT = '@'.charCodeAt(0); +const RE_AT_END = /[\t\n\f\r "#'()/;[\\\]{}]/g; +const RE_WORD_END = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g; +const RE_BAD_BRACKET = /.[\r\n"'(/\\]/; +const RE_HEX_ESCAPE = /[\da-f]/i; +module.exports = function tokenizer(input, options = {}) { + let css = input.css.valueOf(); + let ignore = options.ignoreErrors; + let code, content, escape, next, quote; + let currentToken, escaped, escapePos, n, prev; + let length = css.length; + let pos = 0; + let buffer = []; + let returned = []; + function position() { + return pos; + } + function unclosed(what) { + throw input.error('Unclosed ' + what, pos); + } + function endOfFile() { + return returned.length === 0 && pos >= length; + } + function nextToken(opts) { + if (returned.length) return returned.pop(); + if (pos >= length) return; + let ignoreUnclosed = opts ? opts.ignoreUnclosed : false; + code = css.charCodeAt(pos); + switch(code){ + case NEWLINE: + case SPACE: + case TAB: + case CR: + case FEED: + { + next = pos; + do { + next += 1; + code = css.charCodeAt(next); + }while (code === SPACE || code === NEWLINE || code === TAB || code === CR || code === FEED) + currentToken = [ + 'space', + css.slice(pos, next) + ]; + pos = next - 1; + break; + } + case OPEN_SQUARE: + case CLOSE_SQUARE: + case OPEN_CURLY: + case CLOSE_CURLY: + case COLON: + case SEMICOLON: + case CLOSE_PARENTHESES: + { + let controlChar = String.fromCharCode(code); + currentToken = [ + controlChar, + controlChar, + pos + ]; + break; + } + case OPEN_PARENTHESES: + { + prev = buffer.length ? buffer.pop()[1] : ''; + n = css.charCodeAt(pos + 1); + if (prev === 'url' && n !== SINGLE_QUOTE && n !== DOUBLE_QUOTE && n !== SPACE && n !== NEWLINE && n !== TAB && n !== FEED && n !== CR) { + next = pos; + do { + escaped = false; + next = css.indexOf(')', next + 1); + if (next === -1) { + if (ignore || ignoreUnclosed) { + next = pos; + break; + } else { + unclosed('bracket'); + } + } + escapePos = next; + while(css.charCodeAt(escapePos - 1) === BACKSLASH){ + escapePos -= 1; + escaped = !escaped; + } + }while (escaped) + currentToken = [ + 'brackets', + css.slice(pos, next + 1), + pos, + next + ]; + pos = next; + } else { + next = css.indexOf(')', pos + 1); + content = css.slice(pos, next + 1); + if (next === -1 || RE_BAD_BRACKET.test(content)) { + currentToken = [ + '(', + '(', + pos + ]; + } else { + currentToken = [ + 'brackets', + content, + pos, + next + ]; + pos = next; + } + } + break; + } + case SINGLE_QUOTE: + case DOUBLE_QUOTE: + { + quote = code === SINGLE_QUOTE ? "'" : '"'; + next = pos; + do { + escaped = false; + next = css.indexOf(quote, next + 1); + if (next === -1) { + if (ignore || ignoreUnclosed) { + next = pos + 1; + break; + } else { + unclosed('string'); + } + } + escapePos = next; + while(css.charCodeAt(escapePos - 1) === BACKSLASH){ + escapePos -= 1; + escaped = !escaped; + } + }while (escaped) + currentToken = [ + 'string', + css.slice(pos, next + 1), + pos, + next + ]; + pos = next; + break; + } + case AT: + { + RE_AT_END.lastIndex = pos + 1; + RE_AT_END.test(css); + if (RE_AT_END.lastIndex === 0) { + next = css.length - 1; + } else { + next = RE_AT_END.lastIndex - 2; + } + currentToken = [ + 'at-word', + css.slice(pos, next + 1), + pos, + next + ]; + pos = next; + break; + } + case BACKSLASH: + { + next = pos; + escape = true; + while(css.charCodeAt(next + 1) === BACKSLASH){ + next += 1; + escape = !escape; + } + code = css.charCodeAt(next + 1); + if (escape && code !== SLASH && code !== SPACE && code !== NEWLINE && code !== TAB && code !== CR && code !== FEED) { + next += 1; + if (RE_HEX_ESCAPE.test(css.charAt(next))) { + while(RE_HEX_ESCAPE.test(css.charAt(next + 1))){ + next += 1; + } + if (css.charCodeAt(next + 1) === SPACE) { + next += 1; + } + } + } + currentToken = [ + 'word', + css.slice(pos, next + 1), + pos, + next + ]; + pos = next; + break; + } + default: + { + if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) { + next = css.indexOf('*/', pos + 2) + 1; + if (next === 0) { + if (ignore || ignoreUnclosed) { + next = css.length; + } else { + unclosed('comment'); + } + } + currentToken = [ + 'comment', + css.slice(pos, next + 1), + pos, + next + ]; + pos = next; + } else { + RE_WORD_END.lastIndex = pos + 1; + RE_WORD_END.test(css); + if (RE_WORD_END.lastIndex === 0) { + next = css.length - 1; + } else { + next = RE_WORD_END.lastIndex - 2; + } + currentToken = [ + 'word', + css.slice(pos, next + 1), + pos, + next + ]; + buffer.push(currentToken); + pos = next; + } + break; + } + } + pos++; + return currentToken; + } + function back(token) { + returned.push(token); + } + return { + back, + endOfFile, + nextToken, + position + }; +}; +}), +"[project]/node_modules/postcss/lib/terminal-highlight.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +let pico = __turbopack_context__.r("[project]/node_modules/picocolors/picocolors.js [postcss] (ecmascript)"); +let tokenizer = __turbopack_context__.r("[project]/node_modules/postcss/lib/tokenize.js [postcss] (ecmascript)"); +let Input; +function registerInput(dependant) { + Input = dependant; +} +const HIGHLIGHT_THEME = { + ';': pico.yellow, + ':': pico.yellow, + '(': pico.cyan, + ')': pico.cyan, + '[': pico.yellow, + ']': pico.yellow, + '{': pico.yellow, + '}': pico.yellow, + 'at-word': pico.cyan, + 'brackets': pico.cyan, + 'call': pico.cyan, + 'class': pico.yellow, + 'comment': pico.gray, + 'hash': pico.magenta, + 'string': pico.green +}; +function getTokenType([type, value], processor) { + if (type === 'word') { + if (value[0] === '.') { + return 'class'; + } + if (value[0] === '#') { + return 'hash'; + } + } + if (!processor.endOfFile()) { + let next = processor.nextToken(); + processor.back(next); + if (next[0] === 'brackets' || next[0] === '(') return 'call'; + } + return type; +} +function terminalHighlight(css) { + let processor = tokenizer(new Input(css), { + ignoreErrors: true + }); + let result = ''; + while(!processor.endOfFile()){ + let token = processor.nextToken(); + let color = HIGHLIGHT_THEME[getTokenType(token, processor)]; + if (color) { + result += token[1].split(/\r?\n/).map((i)=>color(i)).join('\n'); + } else { + result += token[1]; + } + } + return result; +} +terminalHighlight.registerInput = registerInput; +module.exports = terminalHighlight; +}), +"[project]/node_modules/postcss/lib/css-syntax-error.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +let pico = __turbopack_context__.r("[project]/node_modules/picocolors/picocolors.js [postcss] (ecmascript)"); +let terminalHighlight = __turbopack_context__.r("[project]/node_modules/postcss/lib/terminal-highlight.js [postcss] (ecmascript)"); +class CssSyntaxError extends Error { + constructor(message, line, column, source, file, plugin){ + super(message); + this.name = 'CssSyntaxError'; + this.reason = message; + if (file) { + this.file = file; + } + if (source) { + this.source = source; + } + if (plugin) { + this.plugin = plugin; + } + if (typeof line !== 'undefined' && typeof column !== 'undefined') { + if (typeof line === 'number') { + this.line = line; + this.column = column; + } else { + this.line = line.line; + this.column = line.column; + this.endLine = column.line; + this.endColumn = column.column; + } + } + this.setMessage(); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, CssSyntaxError); + } + } + setMessage() { + this.message = this.plugin ? this.plugin + ': ' : ''; + this.message += this.file ? this.file : ''; + if (typeof this.line !== 'undefined') { + this.message += ':' + this.line + ':' + this.column; + } + this.message += ': ' + this.reason; + } + showSourceCode(color) { + if (!this.source) return ''; + let css = this.source; + if (color == null) color = pico.isColorSupported; + let aside = (text)=>text; + let mark = (text)=>text; + let highlight = (text)=>text; + if (color) { + let { bold, gray, red } = pico.createColors(true); + mark = (text)=>bold(red(text)); + aside = (text)=>gray(text); + if (terminalHighlight) { + highlight = (text)=>terminalHighlight(text); + } + } + let lines = css.split(/\r?\n/); + let start = Math.max(this.line - 3, 0); + let end = Math.min(this.line + 2, lines.length); + let maxWidth = String(end).length; + return lines.slice(start, end).map((line, index)=>{ + let number = start + 1 + index; + let gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | '; + if (number === this.line) { + if (line.length > 160) { + let padding = 20; + let subLineStart = Math.max(0, this.column - padding); + let subLineEnd = Math.max(this.column + padding, this.endColumn + padding); + let subLine = line.slice(subLineStart, subLineEnd); + let spacing = aside(gutter.replace(/\d/g, ' ')) + line.slice(0, Math.min(this.column - 1, padding - 1)).replace(/[^\t]/g, ' '); + return mark('>') + aside(gutter) + highlight(subLine) + '\n ' + spacing + mark('^'); + } + let spacing = aside(gutter.replace(/\d/g, ' ')) + line.slice(0, this.column - 1).replace(/[^\t]/g, ' '); + return mark('>') + aside(gutter) + highlight(line) + '\n ' + spacing + mark('^'); + } + return ' ' + aside(gutter) + highlight(line); + }).join('\n'); + } + toString() { + let code = this.showSourceCode(); + if (code) { + code = '\n\n' + code + '\n'; + } + return this.name + ': ' + this.message + code; + } +} +module.exports = CssSyntaxError; +CssSyntaxError.default = CssSyntaxError; +}), +"[project]/node_modules/postcss/lib/stringifier.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +const DEFAULT_RAW = { + after: '\n', + beforeClose: '\n', + beforeComment: '\n', + beforeDecl: '\n', + beforeOpen: ' ', + beforeRule: '\n', + colon: ': ', + commentLeft: ' ', + commentRight: ' ', + emptyBody: '', + indent: ' ', + semicolon: false +}; +function capitalize(str) { + return str[0].toUpperCase() + str.slice(1); +} +class Stringifier { + constructor(builder){ + this.builder = builder; + } + atrule(node, semicolon) { + let name = '@' + node.name; + let params = node.params ? this.rawValue(node, 'params') : ''; + if (typeof node.raws.afterName !== 'undefined') { + name += node.raws.afterName; + } else if (params) { + name += ' '; + } + if (node.nodes) { + this.block(node, name + params); + } else { + let end = (node.raws.between || '') + (semicolon ? ';' : ''); + this.builder(name + params + end, node); + } + } + beforeAfter(node, detect) { + let value; + if (node.type === 'decl') { + value = this.raw(node, null, 'beforeDecl'); + } else if (node.type === 'comment') { + value = this.raw(node, null, 'beforeComment'); + } else if (detect === 'before') { + value = this.raw(node, null, 'beforeRule'); + } else { + value = this.raw(node, null, 'beforeClose'); + } + let buf = node.parent; + let depth = 0; + while(buf && buf.type !== 'root'){ + depth += 1; + buf = buf.parent; + } + if (value.includes('\n')) { + let indent = this.raw(node, null, 'indent'); + if (indent.length) { + for(let step = 0; step < depth; step++)value += indent; + } + } + return value; + } + block(node, start) { + let between = this.raw(node, 'between', 'beforeOpen'); + this.builder(start + between + '{', node, 'start'); + let after; + if (node.nodes && node.nodes.length) { + this.body(node); + after = this.raw(node, 'after'); + } else { + after = this.raw(node, 'after', 'emptyBody'); + } + if (after) this.builder(after); + this.builder('}', node, 'end'); + } + body(node) { + let last = node.nodes.length - 1; + while(last > 0){ + if (node.nodes[last].type !== 'comment') break; + last -= 1; + } + let semicolon = this.raw(node, 'semicolon'); + for(let i = 0; i < node.nodes.length; i++){ + let child = node.nodes[i]; + let before = this.raw(child, 'before'); + if (before) this.builder(before); + this.stringify(child, last !== i || semicolon); + } + } + comment(node) { + let left = this.raw(node, 'left', 'commentLeft'); + let right = this.raw(node, 'right', 'commentRight'); + this.builder('/*' + left + node.text + right + '*/', node); + } + decl(node, semicolon) { + let between = this.raw(node, 'between', 'colon'); + let string = node.prop + between + this.rawValue(node, 'value'); + if (node.important) { + string += node.raws.important || ' !important'; + } + if (semicolon) string += ';'; + this.builder(string, node); + } + document(node) { + this.body(node); + } + raw(node, own, detect) { + let value; + if (!detect) detect = own; + // Already had + if (own) { + value = node.raws[own]; + if (typeof value !== 'undefined') return value; + } + let parent = node.parent; + if (detect === 'before') { + // Hack for first rule in CSS + if (!parent || parent.type === 'root' && parent.first === node) { + return ''; + } + // `root` nodes in `document` should use only their own raws + if (parent && parent.type === 'document') { + return ''; + } + } + // Floating child without parent + if (!parent) return DEFAULT_RAW[detect]; + // Detect style by other nodes + let root = node.root(); + if (!root.rawCache) root.rawCache = {}; + if (typeof root.rawCache[detect] !== 'undefined') { + return root.rawCache[detect]; + } + if (detect === 'before' || detect === 'after') { + return this.beforeAfter(node, detect); + } else { + let method = 'raw' + capitalize(detect); + if (this[method]) { + value = this[method](root, node); + } else { + root.walk((i)=>{ + value = i.raws[own]; + if (typeof value !== 'undefined') return false; + }); + } + } + if (typeof value === 'undefined') value = DEFAULT_RAW[detect]; + root.rawCache[detect] = value; + return value; + } + rawBeforeClose(root) { + let value; + root.walk((i)=>{ + if (i.nodes && i.nodes.length > 0) { + if (typeof i.raws.after !== 'undefined') { + value = i.raws.after; + if (value.includes('\n')) { + value = value.replace(/[^\n]+$/, ''); + } + return false; + } + } + }); + if (value) value = value.replace(/\S/g, ''); + return value; + } + rawBeforeComment(root, node) { + let value; + root.walkComments((i)=>{ + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before; + if (value.includes('\n')) { + value = value.replace(/[^\n]+$/, ''); + } + return false; + } + }); + if (typeof value === 'undefined') { + value = this.raw(node, null, 'beforeDecl'); + } else if (value) { + value = value.replace(/\S/g, ''); + } + return value; + } + rawBeforeDecl(root, node) { + let value; + root.walkDecls((i)=>{ + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before; + if (value.includes('\n')) { + value = value.replace(/[^\n]+$/, ''); + } + return false; + } + }); + if (typeof value === 'undefined') { + value = this.raw(node, null, 'beforeRule'); + } else if (value) { + value = value.replace(/\S/g, ''); + } + return value; + } + rawBeforeOpen(root) { + let value; + root.walk((i)=>{ + if (i.type !== 'decl') { + value = i.raws.between; + if (typeof value !== 'undefined') return false; + } + }); + return value; + } + rawBeforeRule(root) { + let value; + root.walk((i)=>{ + if (i.nodes && (i.parent !== root || root.first !== i)) { + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before; + if (value.includes('\n')) { + value = value.replace(/[^\n]+$/, ''); + } + return false; + } + } + }); + if (value) value = value.replace(/\S/g, ''); + return value; + } + rawColon(root) { + let value; + root.walkDecls((i)=>{ + if (typeof i.raws.between !== 'undefined') { + value = i.raws.between.replace(/[^\s:]/g, ''); + return false; + } + }); + return value; + } + rawEmptyBody(root) { + let value; + root.walk((i)=>{ + if (i.nodes && i.nodes.length === 0) { + value = i.raws.after; + if (typeof value !== 'undefined') return false; + } + }); + return value; + } + rawIndent(root) { + if (root.raws.indent) return root.raws.indent; + let value; + root.walk((i)=>{ + let p = i.parent; + if (p && p !== root && p.parent && p.parent === root) { + if (typeof i.raws.before !== 'undefined') { + let parts = i.raws.before.split('\n'); + value = parts[parts.length - 1]; + value = value.replace(/\S/g, ''); + return false; + } + } + }); + return value; + } + rawSemicolon(root) { + let value; + root.walk((i)=>{ + if (i.nodes && i.nodes.length && i.last.type === 'decl') { + value = i.raws.semicolon; + if (typeof value !== 'undefined') return false; + } + }); + return value; + } + rawValue(node, prop) { + let value = node[prop]; + let raw = node.raws[prop]; + if (raw && raw.value === value) { + return raw.raw; + } + return value; + } + root(node) { + this.body(node); + if (node.raws.after) this.builder(node.raws.after); + } + rule(node) { + this.block(node, this.rawValue(node, 'selector')); + if (node.raws.ownSemicolon) { + this.builder(node.raws.ownSemicolon, node, 'end'); + } + } + stringify(node, semicolon) { + /* c8 ignore start */ if (!this[node.type]) { + throw new Error('Unknown AST node type ' + node.type + '. ' + 'Maybe you need to change PostCSS stringifier.'); + } + /* c8 ignore stop */ this[node.type](node, semicolon); + } +} +module.exports = Stringifier; +Stringifier.default = Stringifier; +}), +"[project]/node_modules/postcss/lib/stringify.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +let Stringifier = __turbopack_context__.r("[project]/node_modules/postcss/lib/stringifier.js [postcss] (ecmascript)"); +function stringify(node, builder) { + let str = new Stringifier(builder); + str.stringify(node); +} +module.exports = stringify; +stringify.default = stringify; +}), +"[project]/node_modules/postcss/lib/symbols.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +module.exports.isClean = Symbol('isClean'); +module.exports.my = Symbol('my'); +}), +"[project]/node_modules/postcss/lib/node.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +let CssSyntaxError = __turbopack_context__.r("[project]/node_modules/postcss/lib/css-syntax-error.js [postcss] (ecmascript)"); +let Stringifier = __turbopack_context__.r("[project]/node_modules/postcss/lib/stringifier.js [postcss] (ecmascript)"); +let stringify = __turbopack_context__.r("[project]/node_modules/postcss/lib/stringify.js [postcss] (ecmascript)"); +let { isClean, my } = __turbopack_context__.r("[project]/node_modules/postcss/lib/symbols.js [postcss] (ecmascript)"); +function cloneNode(obj, parent) { + let cloned = new obj.constructor(); + for(let i in obj){ + if (!Object.prototype.hasOwnProperty.call(obj, i)) { + continue; + } + if (i === 'proxyCache') continue; + let value = obj[i]; + let type = typeof value; + if (i === 'parent' && type === 'object') { + if (parent) cloned[i] = parent; + } else if (i === 'source') { + cloned[i] = value; + } else if (Array.isArray(value)) { + cloned[i] = value.map((j)=>cloneNode(j, cloned)); + } else { + if (type === 'object' && value !== null) value = cloneNode(value); + cloned[i] = value; + } + } + return cloned; +} +function sourceOffset(inputCSS, position) { + // Not all custom syntaxes support `offset` in `source.start` and `source.end` + if (position && typeof position.offset !== 'undefined') { + return position.offset; + } + let column = 1; + let line = 1; + let offset = 0; + for(let i = 0; i < inputCSS.length; i++){ + if (line === position.line && column === position.column) { + offset = i; + break; + } + if (inputCSS[i] === '\n') { + column = 1; + line += 1; + } else { + column += 1; + } + } + return offset; +} +class Node { + get proxyOf() { + return this; + } + constructor(defaults = {}){ + this.raws = {}; + this[isClean] = false; + this[my] = true; + for(let name in defaults){ + if (name === 'nodes') { + this.nodes = []; + for (let node of defaults[name]){ + if (typeof node.clone === 'function') { + this.append(node.clone()); + } else { + this.append(node); + } + } + } else { + this[name] = defaults[name]; + } + } + } + addToError(error) { + error.postcssNode = this; + if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) { + let s = this.source; + error.stack = error.stack.replace(/\n\s{4}at /, `$&${s.input.from}:${s.start.line}:${s.start.column}$&`); + } + return error; + } + after(add) { + this.parent.insertAfter(this, add); + return this; + } + assign(overrides = {}) { + for(let name in overrides){ + this[name] = overrides[name]; + } + return this; + } + before(add) { + this.parent.insertBefore(this, add); + return this; + } + cleanRaws(keepBetween) { + delete this.raws.before; + delete this.raws.after; + if (!keepBetween) delete this.raws.between; + } + clone(overrides = {}) { + let cloned = cloneNode(this); + for(let name in overrides){ + cloned[name] = overrides[name]; + } + return cloned; + } + cloneAfter(overrides = {}) { + let cloned = this.clone(overrides); + this.parent.insertAfter(this, cloned); + return cloned; + } + cloneBefore(overrides = {}) { + let cloned = this.clone(overrides); + this.parent.insertBefore(this, cloned); + return cloned; + } + error(message, opts = {}) { + if (this.source) { + let { end, start } = this.rangeBy(opts); + return this.source.input.error(message, { + column: start.column, + line: start.line + }, { + column: end.column, + line: end.line + }, opts); + } + return new CssSyntaxError(message); + } + getProxyProcessor() { + return { + get (node, prop) { + if (prop === 'proxyOf') { + return node; + } else if (prop === 'root') { + return ()=>node.root().toProxy(); + } else { + return node[prop]; + } + }, + set (node, prop, value) { + if (node[prop] === value) return true; + node[prop] = value; + if (prop === 'prop' || prop === 'value' || prop === 'name' || prop === 'params' || prop === 'important' || /* c8 ignore next */ prop === 'text') { + node.markDirty(); + } + return true; + } + }; + } + /* c8 ignore next 3 */ markClean() { + this[isClean] = true; + } + markDirty() { + if (this[isClean]) { + this[isClean] = false; + let next = this; + while(next = next.parent){ + next[isClean] = false; + } + } + } + next() { + if (!this.parent) return undefined; + let index = this.parent.index(this); + return this.parent.nodes[index + 1]; + } + positionBy(opts = {}) { + let pos = this.source.start; + if (opts.index) { + pos = this.positionInside(opts.index); + } else if (opts.word) { + let inputString = 'document' in this.source.input ? this.source.input.document : this.source.input.css; + let stringRepresentation = inputString.slice(sourceOffset(inputString, this.source.start), sourceOffset(inputString, this.source.end)); + let index = stringRepresentation.indexOf(opts.word); + if (index !== -1) pos = this.positionInside(index); + } + return pos; + } + positionInside(index) { + let column = this.source.start.column; + let line = this.source.start.line; + let inputString = 'document' in this.source.input ? this.source.input.document : this.source.input.css; + let offset = sourceOffset(inputString, this.source.start); + let end = offset + index; + for(let i = offset; i < end; i++){ + if (inputString[i] === '\n') { + column = 1; + line += 1; + } else { + column += 1; + } + } + return { + column, + line, + offset: end + }; + } + prev() { + if (!this.parent) return undefined; + let index = this.parent.index(this); + return this.parent.nodes[index - 1]; + } + rangeBy(opts = {}) { + let inputString = 'document' in this.source.input ? this.source.input.document : this.source.input.css; + let start = { + column: this.source.start.column, + line: this.source.start.line, + offset: sourceOffset(inputString, this.source.start) + }; + let end = this.source.end ? { + column: this.source.end.column + 1, + line: this.source.end.line, + offset: typeof this.source.end.offset === 'number' ? this.source.end.offset : // the `sourceOffset(... , this.source.end)` returns an inclusive offset. + // So, we add 1 to convert it to exclusive. + sourceOffset(inputString, this.source.end) + 1 + } : { + column: start.column + 1, + line: start.line, + offset: start.offset + 1 + }; + if (opts.word) { + let stringRepresentation = inputString.slice(sourceOffset(inputString, this.source.start), sourceOffset(inputString, this.source.end)); + let index = stringRepresentation.indexOf(opts.word); + if (index !== -1) { + start = this.positionInside(index); + end = this.positionInside(index + opts.word.length); + } + } else { + if (opts.start) { + start = { + column: opts.start.column, + line: opts.start.line, + offset: sourceOffset(inputString, opts.start) + }; + } else if (opts.index) { + start = this.positionInside(opts.index); + } + if (opts.end) { + end = { + column: opts.end.column, + line: opts.end.line, + offset: sourceOffset(inputString, opts.end) + }; + } else if (typeof opts.endIndex === 'number') { + end = this.positionInside(opts.endIndex); + } else if (opts.index) { + end = this.positionInside(opts.index + 1); + } + } + if (end.line < start.line || end.line === start.line && end.column <= start.column) { + end = { + column: start.column + 1, + line: start.line, + offset: start.offset + 1 + }; + } + return { + end, + start + }; + } + raw(prop, defaultType) { + let str = new Stringifier(); + return str.raw(this, prop, defaultType); + } + remove() { + if (this.parent) { + this.parent.removeChild(this); + } + this.parent = undefined; + return this; + } + replaceWith(...nodes) { + if (this.parent) { + let bookmark = this; + let foundSelf = false; + for (let node of nodes){ + if (node === this) { + foundSelf = true; + } else if (foundSelf) { + this.parent.insertAfter(bookmark, node); + bookmark = node; + } else { + this.parent.insertBefore(bookmark, node); + } + } + if (!foundSelf) { + this.remove(); + } + } + return this; + } + root() { + let result = this; + while(result.parent && result.parent.type !== 'document'){ + result = result.parent; + } + return result; + } + toJSON(_, inputs) { + let fixed = {}; + let emitInputs = inputs == null; + inputs = inputs || new Map(); + let inputsNextIndex = 0; + for(let name in this){ + if (!Object.prototype.hasOwnProperty.call(this, name)) { + continue; + } + if (name === 'parent' || name === 'proxyCache') continue; + let value = this[name]; + if (Array.isArray(value)) { + fixed[name] = value.map((i)=>{ + if (typeof i === 'object' && i.toJSON) { + return i.toJSON(null, inputs); + } else { + return i; + } + }); + } else if (typeof value === 'object' && value.toJSON) { + fixed[name] = value.toJSON(null, inputs); + } else if (name === 'source') { + if (value == null) continue; + let inputId = inputs.get(value.input); + if (inputId == null) { + inputId = inputsNextIndex; + inputs.set(value.input, inputsNextIndex); + inputsNextIndex++; + } + fixed[name] = { + end: value.end, + inputId, + start: value.start + }; + } else { + fixed[name] = value; + } + } + if (emitInputs) { + fixed.inputs = [ + ...inputs.keys() + ].map((input)=>input.toJSON()); + } + return fixed; + } + toProxy() { + if (!this.proxyCache) { + this.proxyCache = new Proxy(this, this.getProxyProcessor()); + } + return this.proxyCache; + } + toString(stringifier = stringify) { + if (stringifier.stringify) stringifier = stringifier.stringify; + let result = ''; + stringifier(this, (i)=>{ + result += i; + }); + return result; + } + warn(result, text, opts = {}) { + let data = { + node: this + }; + for(let i in opts)data[i] = opts[i]; + return result.warn(text, data); + } +} +module.exports = Node; +Node.default = Node; +}), +"[project]/node_modules/postcss/lib/comment.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +let Node = __turbopack_context__.r("[project]/node_modules/postcss/lib/node.js [postcss] (ecmascript)"); +class Comment extends Node { + constructor(defaults){ + super(defaults); + this.type = 'comment'; + } +} +module.exports = Comment; +Comment.default = Comment; +}), +"[project]/node_modules/postcss/lib/declaration.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +let Node = __turbopack_context__.r("[project]/node_modules/postcss/lib/node.js [postcss] (ecmascript)"); +class Declaration extends Node { + get variable() { + return this.prop.startsWith('--') || this.prop[0] === '$'; + } + constructor(defaults){ + if (defaults && typeof defaults.value !== 'undefined' && typeof defaults.value !== 'string') { + defaults = { + ...defaults, + value: String(defaults.value) + }; + } + super(defaults); + this.type = 'decl'; + } +} +module.exports = Declaration; +Declaration.default = Declaration; +}), +"[project]/node_modules/postcss/lib/container.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +let Comment = __turbopack_context__.r("[project]/node_modules/postcss/lib/comment.js [postcss] (ecmascript)"); +let Declaration = __turbopack_context__.r("[project]/node_modules/postcss/lib/declaration.js [postcss] (ecmascript)"); +let Node = __turbopack_context__.r("[project]/node_modules/postcss/lib/node.js [postcss] (ecmascript)"); +let { isClean, my } = __turbopack_context__.r("[project]/node_modules/postcss/lib/symbols.js [postcss] (ecmascript)"); +let AtRule, parse, Root, Rule; +function cleanSource(nodes) { + return nodes.map((i)=>{ + if (i.nodes) i.nodes = cleanSource(i.nodes); + delete i.source; + return i; + }); +} +function markTreeDirty(node) { + node[isClean] = false; + if (node.proxyOf.nodes) { + for (let i of node.proxyOf.nodes){ + markTreeDirty(i); + } + } +} +class Container extends Node { + get first() { + if (!this.proxyOf.nodes) return undefined; + return this.proxyOf.nodes[0]; + } + get last() { + if (!this.proxyOf.nodes) return undefined; + return this.proxyOf.nodes[this.proxyOf.nodes.length - 1]; + } + append(...children) { + for (let child of children){ + let nodes = this.normalize(child, this.last); + for (let node of nodes)this.proxyOf.nodes.push(node); + } + this.markDirty(); + return this; + } + cleanRaws(keepBetween) { + super.cleanRaws(keepBetween); + if (this.nodes) { + for (let node of this.nodes)node.cleanRaws(keepBetween); + } + } + each(callback) { + if (!this.proxyOf.nodes) return undefined; + let iterator = this.getIterator(); + let index, result; + while(this.indexes[iterator] < this.proxyOf.nodes.length){ + index = this.indexes[iterator]; + result = callback(this.proxyOf.nodes[index], index); + if (result === false) break; + this.indexes[iterator] += 1; + } + delete this.indexes[iterator]; + return result; + } + every(condition) { + return this.nodes.every(condition); + } + getIterator() { + if (!this.lastEach) this.lastEach = 0; + if (!this.indexes) this.indexes = {}; + this.lastEach += 1; + let iterator = this.lastEach; + this.indexes[iterator] = 0; + return iterator; + } + getProxyProcessor() { + return { + get (node, prop) { + if (prop === 'proxyOf') { + return node; + } else if (!node[prop]) { + return node[prop]; + } else if (prop === 'each' || typeof prop === 'string' && prop.startsWith('walk')) { + return (...args)=>{ + return node[prop](...args.map((i)=>{ + if (typeof i === 'function') { + return (child, index)=>i(child.toProxy(), index); + } else { + return i; + } + })); + }; + } else if (prop === 'every' || prop === 'some') { + return (cb)=>{ + return node[prop]((child, ...other)=>cb(child.toProxy(), ...other)); + }; + } else if (prop === 'root') { + return ()=>node.root().toProxy(); + } else if (prop === 'nodes') { + return node.nodes.map((i)=>i.toProxy()); + } else if (prop === 'first' || prop === 'last') { + return node[prop].toProxy(); + } else { + return node[prop]; + } + }, + set (node, prop, value) { + if (node[prop] === value) return true; + node[prop] = value; + if (prop === 'name' || prop === 'params' || prop === 'selector') { + node.markDirty(); + } + return true; + } + }; + } + index(child) { + if (typeof child === 'number') return child; + if (child.proxyOf) child = child.proxyOf; + return this.proxyOf.nodes.indexOf(child); + } + insertAfter(exist, add) { + let existIndex = this.index(exist); + let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse(); + existIndex = this.index(exist); + for (let node of nodes)this.proxyOf.nodes.splice(existIndex + 1, 0, node); + let index; + for(let id in this.indexes){ + index = this.indexes[id]; + if (existIndex < index) { + this.indexes[id] = index + nodes.length; + } + } + this.markDirty(); + return this; + } + insertBefore(exist, add) { + let existIndex = this.index(exist); + let type = existIndex === 0 ? 'prepend' : false; + let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse(); + existIndex = this.index(exist); + for (let node of nodes)this.proxyOf.nodes.splice(existIndex, 0, node); + let index; + for(let id in this.indexes){ + index = this.indexes[id]; + if (existIndex <= index) { + this.indexes[id] = index + nodes.length; + } + } + this.markDirty(); + return this; + } + normalize(nodes, sample) { + if (typeof nodes === 'string') { + nodes = cleanSource(parse(nodes).nodes); + } else if (typeof nodes === 'undefined') { + nodes = []; + } else if (Array.isArray(nodes)) { + nodes = nodes.slice(0); + for (let i of nodes){ + if (i.parent) i.parent.removeChild(i, 'ignore'); + } + } else if (nodes.type === 'root' && this.type !== 'document') { + nodes = nodes.nodes.slice(0); + for (let i of nodes){ + if (i.parent) i.parent.removeChild(i, 'ignore'); + } + } else if (nodes.type) { + nodes = [ + nodes + ]; + } else if (nodes.prop) { + if (typeof nodes.value === 'undefined') { + throw new Error('Value field is missed in node creation'); + } else if (typeof nodes.value !== 'string') { + nodes.value = String(nodes.value); + } + nodes = [ + new Declaration(nodes) + ]; + } else if (nodes.selector || nodes.selectors) { + nodes = [ + new Rule(nodes) + ]; + } else if (nodes.name) { + nodes = [ + new AtRule(nodes) + ]; + } else if (nodes.text) { + nodes = [ + new Comment(nodes) + ]; + } else { + throw new Error('Unknown node type in node creation'); + } + let processed = nodes.map((i)=>{ + /* c8 ignore next */ if (!i[my]) Container.rebuild(i); + i = i.proxyOf; + if (i.parent) i.parent.removeChild(i); + if (i[isClean]) markTreeDirty(i); + if (!i.raws) i.raws = {}; + if (typeof i.raws.before === 'undefined') { + if (sample && typeof sample.raws.before !== 'undefined') { + i.raws.before = sample.raws.before.replace(/\S/g, ''); + } + } + i.parent = this.proxyOf; + return i; + }); + return processed; + } + prepend(...children) { + children = children.reverse(); + for (let child of children){ + let nodes = this.normalize(child, this.first, 'prepend').reverse(); + for (let node of nodes)this.proxyOf.nodes.unshift(node); + for(let id in this.indexes){ + this.indexes[id] = this.indexes[id] + nodes.length; + } + } + this.markDirty(); + return this; + } + push(child) { + child.parent = this; + this.proxyOf.nodes.push(child); + return this; + } + removeAll() { + for (let node of this.proxyOf.nodes)node.parent = undefined; + this.proxyOf.nodes = []; + this.markDirty(); + return this; + } + removeChild(child) { + child = this.index(child); + this.proxyOf.nodes[child].parent = undefined; + this.proxyOf.nodes.splice(child, 1); + let index; + for(let id in this.indexes){ + index = this.indexes[id]; + if (index >= child) { + this.indexes[id] = index - 1; + } + } + this.markDirty(); + return this; + } + replaceValues(pattern, opts, callback) { + if (!callback) { + callback = opts; + opts = {}; + } + this.walkDecls((decl)=>{ + if (opts.props && !opts.props.includes(decl.prop)) return; + if (opts.fast && !decl.value.includes(opts.fast)) return; + decl.value = decl.value.replace(pattern, callback); + }); + this.markDirty(); + return this; + } + some(condition) { + return this.nodes.some(condition); + } + walk(callback) { + return this.each((child, i)=>{ + let result; + try { + result = callback(child, i); + } catch (e) { + throw child.addToError(e); + } + if (result !== false && child.walk) { + result = child.walk(callback); + } + return result; + }); + } + walkAtRules(name, callback) { + if (!callback) { + callback = name; + return this.walk((child, i)=>{ + if (child.type === 'atrule') { + return callback(child, i); + } + }); + } + if (name instanceof RegExp) { + return this.walk((child, i)=>{ + if (child.type === 'atrule' && name.test(child.name)) { + return callback(child, i); + } + }); + } + return this.walk((child, i)=>{ + if (child.type === 'atrule' && child.name === name) { + return callback(child, i); + } + }); + } + walkComments(callback) { + return this.walk((child, i)=>{ + if (child.type === 'comment') { + return callback(child, i); + } + }); + } + walkDecls(prop, callback) { + if (!callback) { + callback = prop; + return this.walk((child, i)=>{ + if (child.type === 'decl') { + return callback(child, i); + } + }); + } + if (prop instanceof RegExp) { + return this.walk((child, i)=>{ + if (child.type === 'decl' && prop.test(child.prop)) { + return callback(child, i); + } + }); + } + return this.walk((child, i)=>{ + if (child.type === 'decl' && child.prop === prop) { + return callback(child, i); + } + }); + } + walkRules(selector, callback) { + if (!callback) { + callback = selector; + return this.walk((child, i)=>{ + if (child.type === 'rule') { + return callback(child, i); + } + }); + } + if (selector instanceof RegExp) { + return this.walk((child, i)=>{ + if (child.type === 'rule' && selector.test(child.selector)) { + return callback(child, i); + } + }); + } + return this.walk((child, i)=>{ + if (child.type === 'rule' && child.selector === selector) { + return callback(child, i); + } + }); + } +} +Container.registerParse = (dependant)=>{ + parse = dependant; +}; +Container.registerRule = (dependant)=>{ + Rule = dependant; +}; +Container.registerAtRule = (dependant)=>{ + AtRule = dependant; +}; +Container.registerRoot = (dependant)=>{ + Root = dependant; +}; +module.exports = Container; +Container.default = Container; +/* c8 ignore start */ Container.rebuild = (node)=>{ + if (node.type === 'atrule') { + Object.setPrototypeOf(node, AtRule.prototype); + } else if (node.type === 'rule') { + Object.setPrototypeOf(node, Rule.prototype); + } else if (node.type === 'decl') { + Object.setPrototypeOf(node, Declaration.prototype); + } else if (node.type === 'comment') { + Object.setPrototypeOf(node, Comment.prototype); + } else if (node.type === 'root') { + Object.setPrototypeOf(node, Root.prototype); + } + node[my] = true; + if (node.nodes) { + node.nodes.forEach((child)=>{ + Container.rebuild(child); + }); + } +}; /* c8 ignore stop */ +}), +"[project]/node_modules/postcss/lib/at-rule.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +let Container = __turbopack_context__.r("[project]/node_modules/postcss/lib/container.js [postcss] (ecmascript)"); +class AtRule extends Container { + constructor(defaults){ + super(defaults); + this.type = 'atrule'; + } + append(...children) { + if (!this.proxyOf.nodes) this.nodes = []; + return super.append(...children); + } + prepend(...children) { + if (!this.proxyOf.nodes) this.nodes = []; + return super.prepend(...children); + } +} +module.exports = AtRule; +AtRule.default = AtRule; +Container.registerAtRule(AtRule); +}), +"[project]/node_modules/postcss/lib/document.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +let Container = __turbopack_context__.r("[project]/node_modules/postcss/lib/container.js [postcss] (ecmascript)"); +let LazyResult, Processor; +class Document extends Container { + constructor(defaults){ + // type needs to be passed to super, otherwise child roots won't be normalized correctly + super({ + type: 'document', + ...defaults + }); + if (!this.nodes) { + this.nodes = []; + } + } + toResult(opts = {}) { + let lazy = new LazyResult(new Processor(), this, opts); + return lazy.stringify(); + } +} +Document.registerLazyResult = (dependant)=>{ + LazyResult = dependant; +}; +Document.registerProcessor = (dependant)=>{ + Processor = dependant; +}; +module.exports = Document; +Document.default = Document; +}), +"[project]/node_modules/nanoid/non-secure/index.cjs [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { + +// This alphabet uses `A-Za-z0-9_-` symbols. +// The order of characters is optimized for better gzip and brotli compression. +// References to the same file (works both for gzip and brotli): +// `'use`, `andom`, and `rict'` +// References to the brotli default dictionary: +// `-26T`, `1983`, `40px`, `75px`, `bush`, `jack`, `mind`, `very`, and `wolf` +let urlAlphabet = 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'; +let customAlphabet = (alphabet, defaultSize = 21)=>{ + return (size = defaultSize)=>{ + let id = ''; + // A compact alternative for `for (var i = 0; i < step; i++)`. + let i = size | 0; + while(i--){ + // `| 0` is more compact and faster than `Math.floor()`. + id += alphabet[Math.random() * alphabet.length | 0]; + } + return id; + }; +}; +let nanoid = (size = 21)=>{ + let id = ''; + // A compact alternative for `for (var i = 0; i < step; i++)`. + let i = size | 0; + while(i--){ + // `| 0` is more compact and faster than `Math.floor()`. + id += urlAlphabet[Math.random() * 64 | 0]; + } + return id; +}; +module.exports = { + nanoid, + customAlphabet +}; +}), +"[project]/node_modules/source-map-js/lib/base64.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { + +/* -*- Mode: js; js-indent-level: 2; -*- */ /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); +/** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ exports.encode = function(number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); +}; +/** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ exports.decode = function(charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + var zero = 48; // '0' + var nine = 57; // '9' + var plus = 43; // '+' + var slash = 47; // '/' + var littleOffset = 26; + var numberOffset = 52; + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return charCode - bigA; + } + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return charCode - littleA + littleOffset; + } + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return charCode - zero + numberOffset; + } + // 62: + + if (charCode == plus) { + return 62; + } + // 63: / + if (charCode == slash) { + return 63; + } + // Invalid base64 digit. + return -1; +}; +}), +"[project]/node_modules/source-map-js/lib/base64-vlq.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { + +/* -*- Mode: js; js-indent-level: 2; -*- */ /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ var base64 = __turbopack_context__.r("[project]/node_modules/source-map-js/lib/base64.js [postcss] (ecmascript)"); +// A single base 64 digit can contain 6 bits of data. For the base 64 variable +// length quantities we use in the source map spec, the first bit is the sign, +// the next four bits are the actual value, and the 6th bit is the +// continuation bit. The continuation bit tells us whether there are more +// digits in this value following this digit. +// +// Continuation +// | Sign +// | | +// V V +// 101011 +var VLQ_BASE_SHIFT = 5; +// binary: 100000 +var VLQ_BASE = 1 << VLQ_BASE_SHIFT; +// binary: 011111 +var VLQ_BASE_MASK = VLQ_BASE - 1; +// binary: 100000 +var VLQ_CONTINUATION_BIT = VLQ_BASE; +/** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ function toVLQSigned(aValue) { + return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0; +} +/** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative ? -shifted : shifted; +} +/** + * Returns the base 64 VLQ encoded value. + */ exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + var vlq = toVLQSigned(aValue); + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + }while (vlq > 0) + return encoded; +}; +/** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + }while (continuation) + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; +}; +}), +"[project]/node_modules/source-map-js/lib/util.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { + +/* -*- Mode: js; js-indent-level: 2; -*- */ /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } +} +exports.getArg = getArg; +var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; +var dataUrlRegexp = /^data:.+\,.+$/; +function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; +} +exports.urlParse = urlParse; +function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port; + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; +} +exports.urlGenerate = urlGenerate; +var MAX_CACHED_INPUTS = 32; +/** + * Takes some function `f(input) -> result` and returns a memoized version of + * `f`. + * + * We keep at most `MAX_CACHED_INPUTS` memoized results of `f` alive. The + * memoization is a dumb-simple, linear least-recently-used cache. + */ function lruMemoize(f) { + var cache = []; + return function(input) { + for(var i = 0; i < cache.length; i++){ + if (cache[i].input === input) { + var temp = cache[0]; + cache[0] = cache[i]; + cache[i] = temp; + return cache[0].result; + } + } + var result = f(input); + cache.unshift({ + input, + result + }); + if (cache.length > MAX_CACHED_INPUTS) { + cache.pop(); + } + return result; + }; +} +/** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ var normalize = lruMemoize(function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + // Split the path into parts between `/` characters. This is much faster than + // using `.split(/\/+/g)`. + var parts = []; + var start = 0; + var i = 0; + while(true){ + start = i; + i = path.indexOf("/", start); + if (i === -1) { + parts.push(path.slice(start)); + break; + } else { + parts.push(path.slice(start, i)); + while(i < path.length && path[i] === "/"){ + i++; + } + } + } + for(var part, up = 0, i = parts.length - 1; i >= 0; i--){ + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; +}); +exports.normalize = normalize; +/** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + var joined = aPath.charAt(0) === '/' ? aPath : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; +} +exports.join = join; +exports.isAbsolute = function(aPath) { + return aPath.charAt(0) === '/' || urlRegexp.test(aPath); +}; +/** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + aRoot = aRoot.replace(/\/$/, ''); + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while(aPath.indexOf(aRoot + '/') !== 0){ + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + ++level; + } + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); +} +exports.relative = relative; +var supportsNullProto = function() { + var obj = Object.create(null); + return !('__proto__' in obj); +}(); +function identity(s) { + return s; +} +/** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + return aStr; +} +exports.toSetString = supportsNullProto ? identity : toSetString; +function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + return aStr; +} +exports.fromSetString = supportsNullProto ? identity : fromSetString; +function isProtoString(s) { + if (!s) { + return false; + } + var length = s.length; + if (length < 9 /* "__proto__".length */ ) { + return false; + } + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || s.charCodeAt(length - 2) !== 95 /* '_' */ || s.charCodeAt(length - 3) !== 111 /* 'o' */ || s.charCodeAt(length - 4) !== 116 /* 't' */ || s.charCodeAt(length - 5) !== 111 /* 'o' */ || s.charCodeAt(length - 6) !== 114 /* 'r' */ || s.charCodeAt(length - 7) !== 112 /* 'p' */ || s.charCodeAt(length - 8) !== 95 /* '_' */ || s.charCodeAt(length - 9) !== 95 /* '_' */ ) { + return false; + } + for(var i = length - 10; i >= 0; i--){ + if (s.charCodeAt(i) !== 36 /* '$' */ ) { + return false; + } + } + return true; +} +/** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByOriginalPositions = compareByOriginalPositions; +function compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) { + var cmp; + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource; +/** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; +function compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine; +function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + if (aStr1 === null) { + return 1; // aStr2 !== null + } + if (aStr2 === null) { + return -1; // aStr1 !== null + } + if (aStr1 > aStr2) { + return 1; + } + return -1; +} +/** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; +/** + * Strip any JSON XSSI avoidance prefix from the string (as documented + * in the source maps specification), and then parse the string as + * JSON. + */ function parseSourceMapInput(str) { + return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); +} +exports.parseSourceMapInput = parseSourceMapInput; +/** + * Compute the URL of a source given the the source root, the source's + * URL, and the source map's URL. + */ function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { + sourceURL = sourceURL || ''; + if (sourceRoot) { + // This follows what Chrome does. + if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { + sourceRoot += '/'; + } + // The spec says: + // Line 4: An optional source root, useful for relocating source + // files on a server or removing repeated values in the + // “sources” entry. This value is prepended to the individual + // entries in the “source” field. + sourceURL = sourceRoot + sourceURL; + } + // Historically, SourceMapConsumer did not take the sourceMapURL as + // a parameter. This mode is still somewhat supported, which is why + // this code block is conditional. However, it's preferable to pass + // the source map URL to SourceMapConsumer, so that this function + // can implement the source URL resolution algorithm as outlined in + // the spec. This block is basically the equivalent of: + // new URL(sourceURL, sourceMapURL).toString() + // ... except it avoids using URL, which wasn't available in the + // older releases of node still supported by this library. + // + // The spec says: + // If the sources are not absolute URLs after prepending of the + // “sourceRoot”, the sources are resolved relative to the + // SourceMap (like resolving script src in a html document). + if (sourceMapURL) { + var parsed = urlParse(sourceMapURL); + if (!parsed) { + throw new Error("sourceMapURL could not be parsed"); + } + if (parsed.path) { + // Strip the last path component, but keep the "/". + var index = parsed.path.lastIndexOf('/'); + if (index >= 0) { + parsed.path = parsed.path.substring(0, index + 1); + } + } + sourceURL = join(urlGenerate(parsed), sourceURL); + } + return normalize(sourceURL); +} +exports.computeSourceURL = computeSourceURL; +}), +"[project]/node_modules/source-map-js/lib/array-set.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { + +/* -*- Mode: js; js-indent-level: 2; -*- */ /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ var util = __turbopack_context__.r("[project]/node_modules/source-map-js/lib/util.js [postcss] (ecmascript)"); +var has = Object.prototype.hasOwnProperty; +var hasNativeMap = typeof Map !== "undefined"; +/** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); +} +/** + * Static method for creating ArraySet instances from an existing array. + */ ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for(var i = 0, len = aArray.length; i < len; i++){ + set.add(aArray[i], aAllowDuplicates); + } + return set; +}; +/** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; +}; +/** + * Add the given string to this set. + * + * @param String aStr + */ ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } +}; +/** + * Is the given string a member of this set? + * + * @param String aStr + */ ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } +}; +/** + * What is the index of the given string in the array? + * + * @param String aStr + */ ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + throw new Error('"' + aStr + '" is not in the set.'); +}; +/** + * What is the element at the given index? + * + * @param Number aIdx + */ ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); +}; +/** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); +}; +exports.ArraySet = ArraySet; +}), +"[project]/node_modules/source-map-js/lib/mapping-list.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { + +/* -*- Mode: js; js-indent-level: 2; -*- */ /* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ var util = __turbopack_context__.r("[project]/node_modules/source-map-js/lib/util.js [postcss] (ecmascript)"); +/** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; +} +/** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = { + generatedLine: -1, + generatedColumn: 0 + }; +} +/** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); +}; +/** + * Add the given source mapping. + * + * @param Object aMapping + */ MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } +}; +/** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; +}; +exports.MappingList = MappingList; +}), +"[project]/node_modules/source-map-js/lib/source-map-generator.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { + +/* -*- Mode: js; js-indent-level: 2; -*- */ /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ var base64VLQ = __turbopack_context__.r("[project]/node_modules/source-map-js/lib/base64-vlq.js [postcss] (ecmascript)"); +var util = __turbopack_context__.r("[project]/node_modules/source-map-js/lib/util.js [postcss] (ecmascript)"); +var ArraySet = __turbopack_context__.r("[project]/node_modules/source-map-js/lib/array-set.js [postcss] (ecmascript)").ArraySet; +var MappingList = __turbopack_context__.r("[project]/node_modules/source-map-js/lib/mapping-list.js [postcss] (ecmascript)").MappingList; +/** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._ignoreInvalidMapping = util.getArg(aArgs, 'ignoreInvalidMapping', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; +} +SourceMapGenerator.prototype._version = 3; +/** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer, generatorOps) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator(Object.assign(generatorOps || {}, { + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + })); + aSourceMapConsumer.eachMapping(function(mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function(sourceFile) { + var sourceRelative = sourceFile; + if (sourceRoot !== null) { + sourceRelative = util.relative(sourceRoot, sourceFile); + } + if (!generator._sources.has(sourceRelative)) { + generator._sources.add(sourceRelative); + } + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; +}; +/** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + if (!this._skipValidation) { + if (this._validateMapping(generated, original, source, name) === false) { + return; + } + } + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); +}; +/** + * Set the source content for a source file. + */ SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } +}; +/** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + 'or the source map\'s "file" property. Both were omitted.'); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function(mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source); + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + }, this); + this._sources = newSources; + this._names = newNames; + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function(sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); +}; +/** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + var message = 'original.line and original.column are not numbers -- you probably meant to omit ' + 'the original mapping entirely and only map the generated position. If so, pass ' + 'null for the original mapping instead of an object with empty or null values.'; + if (this._ignoreInvalidMapping) { + if (typeof console !== 'undefined' && console.warn) { + console.warn(message); + } + return false; + } else { + throw new Error(message); + } + } + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aOriginal && 'line' in aOriginal && 'column' in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) { + // Cases 2 and 3. + return; + } else { + var message = 'Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + }); + if (this._ignoreInvalidMapping) { + if (typeof console !== 'undefined' && console.warn) { + console.warn(message); + } + return false; + } else { + throw new Error(message); + } + } +}; +/** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + var mappings = this._mappings.toArray(); + for(var i = 0, len = mappings.length; i < len; i++){ + mapping = mappings[i]; + next = ''; + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while(mapping.generatedLine !== previousGeneratedLine){ + next += ';'; + previousGeneratedLine++; + } + } else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + result += next; + } + return result; +}; +SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function(source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null; + }, this); +}; +/** + * Externalize the source map. + */ SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + return map; +}; +/** + * Render the source map being generated to a string. + */ SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); +}; +exports.SourceMapGenerator = SourceMapGenerator; +}), +"[project]/node_modules/source-map-js/lib/binary-search.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { + +/* -*- Mode: js; js-indent-level: 2; -*- */ /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ exports.GREATEST_LOWER_BOUND = 1; +exports.LEAST_UPPER_BOUND = 2; +/** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } +} +/** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while(index - 1 >= 0){ + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + return index; +}; +}), +"[project]/node_modules/source-map-js/lib/quick-sort.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { + +/* -*- Mode: js; js-indent-level: 2; -*- */ /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ // It turns out that some (most?) JavaScript engines don't self-host +// `Array.prototype.sort`. This makes sense because C++ will likely remain +// faster than JS when doing raw CPU-intensive sorting. However, when using a +// custom comparator function, calling back and forth between the VM's C++ and +// JIT'd JS is rather slow *and* loses JIT type information, resulting in +// worse generated code for the comparator function than would be optimal. In +// fact, when sorting with a comparator, these costs outweigh the benefits of +// sorting in C++. By using our own JS-implemented Quick Sort (below), we get +// a ~3500ms mean speed-up in `bench/bench.html`. +function SortTemplate(comparator) { + /** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; + } + /** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ function randomIntInRange(low, high) { + return Math.round(low + Math.random() * (high - low)); + } + /** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + swap(ary, pivotIndex, r); + var pivot = ary[r]; + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for(var j = p; j < r; j++){ + if (comparator(ary[j], pivot, false) <= 0) { + i += 1; + swap(ary, i, j); + } + } + swap(ary, i + 1, j); + var q = i + 1; + // (2) Recurse on each half. + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } + } + return doQuickSort; +} +function cloneSort(comparator) { + let template = SortTemplate.toString(); + let templateFn = new Function(`return ${template}`)(); + return templateFn(comparator); +} +/** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ let sortCache = new WeakMap(); +exports.quickSort = function(ary, comparator, start = 0) { + let doQuickSort = sortCache.get(comparator); + if (doQuickSort === void 0) { + doQuickSort = cloneSort(comparator); + sortCache.set(comparator, doQuickSort); + } + doQuickSort(ary, comparator, start, ary.length - 1); +}; +}), +"[project]/node_modules/source-map-js/lib/source-map-consumer.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { + +/* -*- Mode: js; js-indent-level: 2; -*- */ /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ var util = __turbopack_context__.r("[project]/node_modules/source-map-js/lib/util.js [postcss] (ecmascript)"); +var binarySearch = __turbopack_context__.r("[project]/node_modules/source-map-js/lib/binary-search.js [postcss] (ecmascript)"); +var ArraySet = __turbopack_context__.r("[project]/node_modules/source-map-js/lib/array-set.js [postcss] (ecmascript)").ArraySet; +var base64VLQ = __turbopack_context__.r("[project]/node_modules/source-map-js/lib/base64-vlq.js [postcss] (ecmascript)"); +var quickSort = __turbopack_context__.r("[project]/node_modules/source-map-js/lib/quick-sort.js [postcss] (ecmascript)").quickSort; +function SourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); +} +SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); +}; +/** + * The version of the source mapping spec that we are consuming. + */ SourceMapConsumer.prototype._version = 3; +// `__generatedMappings` and `__originalMappings` are arrays that hold the +// parsed mapping coordinates from the source map's "mappings" attribute. They +// are lazily instantiated, accessed via the `_generatedMappings` and +// `_originalMappings` getters respectively, and we only parse the mappings +// and create these arrays once queried for a source location. We jump through +// these hoops because there can be many thousands of mappings, and parsing +// them is expensive, so we only want to do it if we must. +// +// Each object in the arrays is of the form: +// +// { +// generatedLine: The line number in the generated code, +// generatedColumn: The column number in the generated code, +// source: The path to the original source file that generated this +// chunk of code, +// originalLine: The line number in the original source that +// corresponds to this chunk of generated code, +// originalColumn: The column number in the original source that +// corresponds to this chunk of generated code, +// name: The name of the original symbol which generated this chunk of +// code. +// } +// +// All properties except for `generatedLine` and `generatedColumn` can be +// `null`. +// +// `_generatedMappings` is ordered by the generated positions. +// +// `_originalMappings` is ordered by the original positions. +SourceMapConsumer.prototype.__generatedMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + configurable: true, + enumerable: true, + get: function() { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + return this.__generatedMappings; + } +}); +SourceMapConsumer.prototype.__originalMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + configurable: true, + enumerable: true, + get: function() { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + return this.__originalMappings; + } +}); +SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; +}; +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); +}; +SourceMapConsumer.GENERATED_ORDER = 1; +SourceMapConsumer.ORIGINAL_ORDER = 2; +SourceMapConsumer.GREATEST_LOWER_BOUND = 1; +SourceMapConsumer.LEAST_UPPER_BOUND = 2; +/** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + var mappings; + switch(order){ + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + var sourceRoot = this.sourceRoot; + var boundCallback = aCallback.bind(context); + var names = this._names; + var sources = this._sources; + var sourceMapURL = this._sourceMapURL; + for(var i = 0, n = mappings.length; i < n; i++){ + var mapping = mappings[i]; + var source = mapping.source === null ? null : sources.at(mapping.source); + if (source !== null) { + source = util.computeSourceURL(sourceRoot, source, sourceMapURL); + } + boundCallback({ + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : names.at(mapping.name) + }); + } +}; +/** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number is 1-based. + * - column: Optional. the column number in the original source. + * The column number is 0-based. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + needle.source = this._findSourceIndex(needle.source); + if (needle.source < 0) { + return []; + } + var mappings = []; + var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while(mapping && mapping.originalLine === originalLine){ + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while(mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn){ + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + mapping = this._originalMappings[++index]; + } + } + } + return mappings; +}; +exports.SourceMapConsumer = SourceMapConsumer; +/** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The first parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + if (sourceRoot) { + sourceRoot = util.normalize(sourceRoot); + } + sources = sources.map(String)// Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize)// Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function(source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) ? util.relative(sourceRoot, source) : source; + }); + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + this._absoluteSources = this._sources.toArray().map(function(s) { + return util.computeSourceURL(sourceRoot, s, aSourceMapURL); + }); + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this._sourceMapURL = aSourceMapURL; + this.file = file; +} +BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; +/** + * Utility function to find the index of a source. Returns -1 if not + * found. + */ BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + if (this._sources.has(relativeSource)) { + return this._sources.indexOf(relativeSource); + } + // Maybe aSource is an absolute URL as returned by |sources|. In + // this case we can't simply undo the transform. + var i; + for(i = 0; i < this._absoluteSources.length; ++i){ + if (this._absoluteSources[i] == aSource) { + return i; + } + } + return -1; +}; +/** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @param String aSourceMapURL + * The URL at which the source map can be found (optional) + * @returns BasicSourceMapConsumer + */ BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), smc.sourceRoot); + smc.file = aSourceMap._file; + smc._sourceMapURL = aSourceMapURL; + smc._absoluteSources = smc._sources.toArray().map(function(s) { + return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); + }); + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + for(var i = 0, length = generatedMappings.length; i < length; i++){ + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + destOriginalMappings.push(destMapping); + } + destGeneratedMappings.push(destMapping); + } + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + return smc; +}; +/** + * The version of the source mapping spec that we are consuming. + */ BasicSourceMapConsumer.prototype._version = 3; +/** + * The list of original sources. + */ Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function() { + return this._absoluteSources.slice(); + } +}); +/** + * Provide the JIT with a nice shape / hidden class. + */ function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; +} +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ const compareGenerated = util.compareByGeneratedPositionsDeflatedNoLine; +function sortGenerated(array, start) { + let l = array.length; + let n = array.length - start; + if (n <= 1) { + return; + } else if (n == 2) { + let a = array[start]; + let b = array[start + 1]; + if (compareGenerated(a, b) > 0) { + array[start] = b; + array[start + 1] = a; + } + } else if (n < 20) { + for(let i = start; i < l; i++){ + for(let j = i; j > start; j--){ + let a = array[j - 1]; + let b = array[j]; + if (compareGenerated(a, b) <= 0) { + break; + } + array[j - 1] = b; + array[j] = a; + } + } + } else { + quickSort(array, compareGenerated, start); + } +} +BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + let subarrayStart = 0; + while(index < length){ + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + sortGenerated(generatedMappings, subarrayStart); + subarrayStart = generatedMappings.length; + } else if (aStr.charAt(index) === ',') { + index++; + } else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + for(end = index; end < length; end++){ + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + segment = []; + while(index < end){ + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + let currentSource = mapping.source; + while(originalMappings.length <= currentSource){ + originalMappings.push(null); + } + if (originalMappings[currentSource] === null) { + originalMappings[currentSource] = []; + } + originalMappings[currentSource].push(mapping); + } + } + } + sortGenerated(generatedMappings, subarrayStart); + this.__generatedMappings = generatedMappings; + for(var i = 0; i < originalMappings.length; i++){ + if (originalMappings[i] != null) { + quickSort(originalMappings[i], util.compareByOriginalPositionsNoSource); + } + } + this.__originalMappings = [].concat(...originalMappings); +}; +/** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + aNeedle[aColumnName]); + } + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); +}; +/** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() { + for(var index = 0; index < this._generatedMappings.length; ++index){ + var mapping = this._generatedMappings[index]; + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } +}; +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + var index = this._findMapping(needle, this._generatedMappings, "generatedLine", "generatedColumn", util.compareByGeneratedPositionsDeflated, util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)); + if (index >= 0) { + var mapping = this._generatedMappings[index]; + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + return { + source: null, + line: null, + column: null, + name: null + }; +}; +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function(sc) { + return sc == null; + }); +}; +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + var index = this._findSourceIndex(aSource); + if (index >= 0) { + return this.sourcesContent[index]; + } + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + var url; + if (this.sourceRoot != null && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]; + } + if ((!url.path || url.path == "/") && this._sources.has("/" + relativeSource)) { + return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; + } + } + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } else { + throw new Error('"' + relativeSource + '" is not in the SourceMap.'); + } +}; +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + source = this._findSourceIndex(source); + if (source < 0) { + return { + line: null, + column: null, + lastColumn: null + }; + } + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)); + if (index >= 0) { + var mapping = this._originalMappings[index]; + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + return { + line: null, + column: null, + lastColumn: null + }; +}; +exports.BasicSourceMapConsumer = BasicSourceMapConsumer; +/** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The first parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + this._sources = new ArraySet(); + this._names = new ArraySet(); + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function(s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) + }; + }); +} +IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; +/** + * The version of the source mapping spec that we are consuming. + */ IndexedSourceMapConsumer.prototype._version = 3; +/** + * The list of original sources. + */ Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function() { + var sources = []; + for(var i = 0; i < this._sections.length; i++){ + for(var j = 0; j < this._sections[i].consumer.sources.length; j++){ + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } +}); +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + return needle.generatedColumn - section.generatedOffset.generatedColumn; + }); + var section = this._sections[sectionIndex]; + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + return section.consumer.originalPositionFor({ + line: needle.generatedLine - (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0), + bias: aArgs.bias + }); +}; +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function(s) { + return s.consumer.hasContentsOfAllSources(); + }); +}; +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for(var i = 0; i < this._sections.length; i++){ + var section = this._sections[i]; + var content = section.consumer.sourceContentFor(aSource, true); + if (content || content === '') { + return content; + } + } + if (nullOnMissing) { + return null; + } else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } +}; +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for(var i = 0; i < this._sections.length; i++){ + var section = this._sections[i]; + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0) + }; + return ret; + } + } + return { + line: null, + column: null + }; +}; +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for(var i = 0; i < this._sections.length; i++){ + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for(var j = 0; j < sectionMappings.length; j++){ + var mapping = sectionMappings[j]; + var source = section.consumer._sources.at(mapping.source); + if (source !== null) { + source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); + } + this._sources.add(source); + source = this._sources.indexOf(source); + var name = null; + if (mapping.name) { + name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + } + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); +}; +exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; +}), +"[project]/node_modules/source-map-js/lib/source-node.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { + +/* -*- Mode: js; js-indent-level: 2; -*- */ /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ var SourceMapGenerator = __turbopack_context__.r("[project]/node_modules/source-map-js/lib/source-map-generator.js [postcss] (ecmascript)").SourceMapGenerator; +var util = __turbopack_context__.r("[project]/node_modules/source-map-js/lib/util.js [postcss] (ecmascript)"); +// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other +// operating systems these days (capturing the result). +var REGEX_NEWLINE = /(\r?\n)/; +// Newline character code for charCodeAt() comparisons +var NEWLINE_CODE = 10; +// Private symbol for identifying `SourceNode`s when multiple versions of +// the source-map library are loaded. This MUST NOT CHANGE across +// versions! +var isSourceNode = "$$$isSourceNode$$$"; +/** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); +} +/** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + //TURBOPACK unreachable + ; + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : undefined; + } + }; + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + aSourceMapConsumer.eachMapping(function(mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex] || ''; + var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while(lastGeneratedLine < mapping.generatedLine){ + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex] || ''; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function(sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + return node; + //TURBOPACK unreachable + ; + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source; + node.add(new SourceNode(mapping.originalLine, mapping.originalColumn, source, code, mapping.name)); + } + } +}; +/** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function(chunk) { + this.add(chunk); + }, this); + } else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } else { + throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk); + } + return this; +}; +/** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for(var i = aChunk.length - 1; i >= 0; i--){ + this.prepend(aChunk[i]); + } + } else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } else { + throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk); + } + return this; +}; +/** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for(var i = 0, len = this.children.length; i < len; i++){ + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } else { + if (chunk !== '') { + aFn(chunk, { + source: this.source, + line: this.line, + column: this.column, + name: this.name + }); + } + } + } +}; +/** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for(i = 0; i < len - 1; i++){ + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; +}; +/** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; +}; +/** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; +}; +/** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) { + for(var i = 0, len = this.children.length; i < len; i++){ + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + var sources = Object.keys(this.sourceContents); + for(var i = 0, len = sources.length; i < len; i++){ + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } +}; +/** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function(chunk) { + str += chunk; + }); + return str; +}; +/** + * Returns the string representation of this source node along with a source + * map. + */ SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function(chunk, original) { + generated.code += chunk; + if (original.source !== null && original.line !== null && original.column !== null) { + if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for(var idx = 0, length = chunk.length; idx < length; idx++){ + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function(sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + return { + code: generated.code, + map: map + }; +}; +exports.SourceNode = SourceNode; +}), +"[project]/node_modules/source-map-js/source-map.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { + +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ exports.SourceMapGenerator = __turbopack_context__.r("[project]/node_modules/source-map-js/lib/source-map-generator.js [postcss] (ecmascript)").SourceMapGenerator; +exports.SourceMapConsumer = __turbopack_context__.r("[project]/node_modules/source-map-js/lib/source-map-consumer.js [postcss] (ecmascript)").SourceMapConsumer; +exports.SourceNode = __turbopack_context__.r("[project]/node_modules/source-map-js/lib/source-node.js [postcss] (ecmascript)").SourceNode; +}), +"[project]/node_modules/postcss/lib/previous-map.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +let { existsSync, readFileSync } = __turbopack_context__.r("[externals]/fs [external] (fs, cjs)"); +let { dirname, join } = __turbopack_context__.r("[externals]/path [external] (path, cjs)"); +let { SourceMapConsumer, SourceMapGenerator } = __turbopack_context__.r("[project]/node_modules/source-map-js/source-map.js [postcss] (ecmascript)"); +function fromBase64(str) { + if ("TURBOPACK compile-time truthy", 1) { + return Buffer.from(str, 'base64').toString(); + } else //TURBOPACK unreachable + ; +} +class PreviousMap { + constructor(css, opts){ + if (opts.map === false) return; + this.loadAnnotation(css); + this.inline = this.startWith(this.annotation, 'data:'); + let prev = opts.map ? opts.map.prev : undefined; + let text = this.loadMap(opts.from, prev); + if (!this.mapFile && opts.from) { + this.mapFile = opts.from; + } + if (this.mapFile) this.root = dirname(this.mapFile); + if (text) this.text = text; + } + consumer() { + if (!this.consumerCache) { + this.consumerCache = new SourceMapConsumer(this.text); + } + return this.consumerCache; + } + decodeInline(text) { + let baseCharsetUri = /^data:application\/json;charset=utf-?8;base64,/; + let baseUri = /^data:application\/json;base64,/; + let charsetUri = /^data:application\/json;charset=utf-?8,/; + let uri = /^data:application\/json,/; + let uriMatch = text.match(charsetUri) || text.match(uri); + if (uriMatch) { + return decodeURIComponent(text.substr(uriMatch[0].length)); + } + let baseUriMatch = text.match(baseCharsetUri) || text.match(baseUri); + if (baseUriMatch) { + return fromBase64(text.substr(baseUriMatch[0].length)); + } + let encoding = text.match(/data:application\/json;([^,]+),/)[1]; + throw new Error('Unsupported source map encoding ' + encoding); + } + getAnnotationURL(sourceMapString) { + return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, '').trim(); + } + isMap(map) { + if (typeof map !== 'object') return false; + return typeof map.mappings === 'string' || typeof map._mappings === 'string' || Array.isArray(map.sections); + } + loadAnnotation(css) { + let comments = css.match(/\/\*\s*# sourceMappingURL=/g); + if (!comments) return; + // sourceMappingURLs from comments, strings, etc. + let start = css.lastIndexOf(comments.pop()); + let end = css.indexOf('*/', start); + if (start > -1 && end > -1) { + // Locate the last sourceMappingURL to avoid pickin + this.annotation = this.getAnnotationURL(css.substring(start, end)); + } + } + loadFile(path) { + this.root = dirname(path); + if (existsSync(path)) { + this.mapFile = path; + return readFileSync(path, 'utf-8').toString().trim(); + } + } + loadMap(file, prev) { + if (prev === false) return false; + if (prev) { + if (typeof prev === 'string') { + return prev; + } else if (typeof prev === 'function') { + let prevPath = prev(file); + if (prevPath) { + let map = this.loadFile(prevPath); + if (!map) { + throw new Error('Unable to load previous source map: ' + prevPath.toString()); + } + return map; + } + } else if (prev instanceof SourceMapConsumer) { + return SourceMapGenerator.fromSourceMap(prev).toString(); + } else if (prev instanceof SourceMapGenerator) { + return prev.toString(); + } else if (this.isMap(prev)) { + return JSON.stringify(prev); + } else { + throw new Error('Unsupported previous source map format: ' + prev.toString()); + } + } else if (this.inline) { + return this.decodeInline(this.annotation); + } else if (this.annotation) { + let map = this.annotation; + if (file) map = join(dirname(file), map); + return this.loadFile(map); + } + } + startWith(string, start) { + if (!string) return false; + return string.substr(0, start.length) === start; + } + withContent() { + return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0); + } +} +module.exports = PreviousMap; +PreviousMap.default = PreviousMap; +}), +"[project]/node_modules/postcss/lib/input.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +let { nanoid } = __turbopack_context__.r("[project]/node_modules/nanoid/non-secure/index.cjs [postcss] (ecmascript)"); +let { isAbsolute, resolve } = __turbopack_context__.r("[externals]/path [external] (path, cjs)"); +let { SourceMapConsumer, SourceMapGenerator } = __turbopack_context__.r("[project]/node_modules/source-map-js/source-map.js [postcss] (ecmascript)"); +let { fileURLToPath, pathToFileURL } = __turbopack_context__.r("[externals]/url [external] (url, cjs)"); +let CssSyntaxError = __turbopack_context__.r("[project]/node_modules/postcss/lib/css-syntax-error.js [postcss] (ecmascript)"); +let PreviousMap = __turbopack_context__.r("[project]/node_modules/postcss/lib/previous-map.js [postcss] (ecmascript)"); +let terminalHighlight = __turbopack_context__.r("[project]/node_modules/postcss/lib/terminal-highlight.js [postcss] (ecmascript)"); +let lineToIndexCache = Symbol('lineToIndexCache'); +let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator); +let pathAvailable = Boolean(resolve && isAbsolute); +function getLineToIndex(input) { + if (input[lineToIndexCache]) return input[lineToIndexCache]; + let lines = input.css.split('\n'); + let lineToIndex = new Array(lines.length); + let prevIndex = 0; + for(let i = 0, l = lines.length; i < l; i++){ + lineToIndex[i] = prevIndex; + prevIndex += lines[i].length + 1; + } + input[lineToIndexCache] = lineToIndex; + return lineToIndex; +} +class Input { + get from() { + return this.file || this.id; + } + constructor(css, opts = {}){ + if (css === null || typeof css === 'undefined' || typeof css === 'object' && !css.toString) { + throw new Error(`PostCSS received ${css} instead of CSS string`); + } + this.css = css.toString(); + if (this.css[0] === '\uFEFF' || this.css[0] === '\uFFFE') { + this.hasBOM = true; + this.css = this.css.slice(1); + } else { + this.hasBOM = false; + } + this.document = this.css; + if (opts.document) this.document = opts.document.toString(); + if (opts.from) { + if (!pathAvailable || /^\w+:\/\//.test(opts.from) || isAbsolute(opts.from)) { + this.file = opts.from; + } else { + this.file = resolve(opts.from); + } + } + if (pathAvailable && sourceMapAvailable) { + let map = new PreviousMap(this.css, opts); + if (map.text) { + this.map = map; + let file = map.consumer().file; + if (!this.file && file) this.file = this.mapResolve(file); + } + } + if (!this.file) { + this.id = ''; + } + if (this.map) this.map.file = this.from; + } + error(message, line, column, opts = {}) { + let endColumn, endLine, endOffset, offset, result; + if (line && typeof line === 'object') { + let start = line; + let end = column; + if (typeof start.offset === 'number') { + offset = start.offset; + let pos = this.fromOffset(offset); + line = pos.line; + column = pos.col; + } else { + line = start.line; + column = start.column; + offset = this.fromLineAndColumn(line, column); + } + if (typeof end.offset === 'number') { + endOffset = end.offset; + let pos = this.fromOffset(endOffset); + endLine = pos.line; + endColumn = pos.col; + } else { + endLine = end.line; + endColumn = end.column; + endOffset = this.fromLineAndColumn(end.line, end.column); + } + } else if (!column) { + offset = line; + let pos = this.fromOffset(offset); + line = pos.line; + column = pos.col; + } else { + offset = this.fromLineAndColumn(line, column); + } + let origin = this.origin(line, column, endLine, endColumn); + if (origin) { + result = new CssSyntaxError(message, origin.endLine === undefined ? origin.line : { + column: origin.column, + line: origin.line + }, origin.endLine === undefined ? origin.column : { + column: origin.endColumn, + line: origin.endLine + }, origin.source, origin.file, opts.plugin); + } else { + result = new CssSyntaxError(message, endLine === undefined ? line : { + column, + line + }, endLine === undefined ? column : { + column: endColumn, + line: endLine + }, this.css, this.file, opts.plugin); + } + result.input = { + column, + endColumn, + endLine, + endOffset, + line, + offset, + source: this.css + }; + if (this.file) { + if ("TURBOPACK compile-time truthy", 1) { + result.input.url = pathToFileURL(this.file).toString(); + } + result.input.file = this.file; + } + return result; + } + fromLineAndColumn(line, column) { + let lineToIndex = getLineToIndex(this); + let index = lineToIndex[line - 1]; + return index + column - 1; + } + fromOffset(offset) { + let lineToIndex = getLineToIndex(this); + let lastLine = lineToIndex[lineToIndex.length - 1]; + let min = 0; + if (offset >= lastLine) { + min = lineToIndex.length - 1; + } else { + let max = lineToIndex.length - 2; + let mid; + while(min < max){ + mid = min + (max - min >> 1); + if (offset < lineToIndex[mid]) { + max = mid - 1; + } else if (offset >= lineToIndex[mid + 1]) { + min = mid + 1; + } else { + min = mid; + break; + } + } + } + return { + col: offset - lineToIndex[min] + 1, + line: min + 1 + }; + } + mapResolve(file) { + if (/^\w+:\/\//.test(file)) { + return file; + } + return resolve(this.map.consumer().sourceRoot || this.map.root || '.', file); + } + origin(line, column, endLine, endColumn) { + if (!this.map) return false; + let consumer = this.map.consumer(); + let from = consumer.originalPositionFor({ + column, + line + }); + if (!from.source) return false; + let to; + if (typeof endLine === 'number') { + to = consumer.originalPositionFor({ + column: endColumn, + line: endLine + }); + } + let fromUrl; + if (isAbsolute(from.source)) { + fromUrl = pathToFileURL(from.source); + } else { + fromUrl = new URL(from.source, this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile)); + } + let result = { + column: from.column, + endColumn: to && to.column, + endLine: to && to.line, + line: from.line, + url: fromUrl.toString() + }; + if (fromUrl.protocol === 'file:') { + if (fileURLToPath) { + result.file = fileURLToPath(fromUrl); + } else { + /* c8 ignore next 2 */ throw new Error(`file: protocol is not available in this PostCSS build`); + } + } + let source = consumer.sourceContentFor(from.source); + if (source) result.source = source; + return result; + } + toJSON() { + let json = {}; + for (let name of [ + 'hasBOM', + 'css', + 'file', + 'id' + ]){ + if (this[name] != null) { + json[name] = this[name]; + } + } + if (this.map) { + json.map = { + ...this.map + }; + if (json.map.consumerCache) { + json.map.consumerCache = undefined; + } + } + return json; + } +} +module.exports = Input; +Input.default = Input; +if (terminalHighlight && terminalHighlight.registerInput) { + terminalHighlight.registerInput(Input); +} +}), +"[project]/node_modules/postcss/lib/root.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +let Container = __turbopack_context__.r("[project]/node_modules/postcss/lib/container.js [postcss] (ecmascript)"); +let LazyResult, Processor; +class Root extends Container { + constructor(defaults){ + super(defaults); + this.type = 'root'; + if (!this.nodes) this.nodes = []; + } + normalize(child, sample, type) { + let nodes = super.normalize(child); + if (sample) { + if (type === 'prepend') { + if (this.nodes.length > 1) { + sample.raws.before = this.nodes[1].raws.before; + } else { + delete sample.raws.before; + } + } else if (this.first !== sample) { + for (let node of nodes){ + node.raws.before = sample.raws.before; + } + } + } + return nodes; + } + removeChild(child, ignore) { + let index = this.index(child); + if (!ignore && index === 0 && this.nodes.length > 1) { + this.nodes[1].raws.before = this.nodes[index].raws.before; + } + return super.removeChild(child); + } + toResult(opts = {}) { + let lazy = new LazyResult(new Processor(), this, opts); + return lazy.stringify(); + } +} +Root.registerLazyResult = (dependant)=>{ + LazyResult = dependant; +}; +Root.registerProcessor = (dependant)=>{ + Processor = dependant; +}; +module.exports = Root; +Root.default = Root; +Container.registerRoot(Root); +}), +"[project]/node_modules/postcss/lib/list.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +let list = { + comma (string) { + return list.split(string, [ + ',' + ], true); + }, + space (string) { + let spaces = [ + ' ', + '\n', + '\t' + ]; + return list.split(string, spaces); + }, + split (string, separators, last) { + let array = []; + let current = ''; + let split = false; + let func = 0; + let inQuote = false; + let prevQuote = ''; + let escape = false; + for (let letter of string){ + if (escape) { + escape = false; + } else if (letter === '\\') { + escape = true; + } else if (inQuote) { + if (letter === prevQuote) { + inQuote = false; + } + } else if (letter === '"' || letter === "'") { + inQuote = true; + prevQuote = letter; + } else if (letter === '(') { + func += 1; + } else if (letter === ')') { + if (func > 0) func -= 1; + } else if (func === 0) { + if (separators.includes(letter)) split = true; + } + if (split) { + if (current !== '') array.push(current.trim()); + current = ''; + split = false; + } else { + current += letter; + } + } + if (last || current !== '') array.push(current.trim()); + return array; + } +}; +module.exports = list; +list.default = list; +}), +"[project]/node_modules/postcss/lib/rule.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +let Container = __turbopack_context__.r("[project]/node_modules/postcss/lib/container.js [postcss] (ecmascript)"); +let list = __turbopack_context__.r("[project]/node_modules/postcss/lib/list.js [postcss] (ecmascript)"); +class Rule extends Container { + get selectors() { + return list.comma(this.selector); + } + set selectors(values) { + let match = this.selector ? this.selector.match(/,\s*/) : null; + let sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen'); + this.selector = values.join(sep); + } + constructor(defaults){ + super(defaults); + this.type = 'rule'; + if (!this.nodes) this.nodes = []; + } +} +module.exports = Rule; +Rule.default = Rule; +Container.registerRule(Rule); +}), +"[project]/node_modules/postcss/lib/fromJSON.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +let AtRule = __turbopack_context__.r("[project]/node_modules/postcss/lib/at-rule.js [postcss] (ecmascript)"); +let Comment = __turbopack_context__.r("[project]/node_modules/postcss/lib/comment.js [postcss] (ecmascript)"); +let Declaration = __turbopack_context__.r("[project]/node_modules/postcss/lib/declaration.js [postcss] (ecmascript)"); +let Input = __turbopack_context__.r("[project]/node_modules/postcss/lib/input.js [postcss] (ecmascript)"); +let PreviousMap = __turbopack_context__.r("[project]/node_modules/postcss/lib/previous-map.js [postcss] (ecmascript)"); +let Root = __turbopack_context__.r("[project]/node_modules/postcss/lib/root.js [postcss] (ecmascript)"); +let Rule = __turbopack_context__.r("[project]/node_modules/postcss/lib/rule.js [postcss] (ecmascript)"); +function fromJSON(json, inputs) { + if (Array.isArray(json)) return json.map((n)=>fromJSON(n)); + let { inputs: ownInputs, ...defaults } = json; + if (ownInputs) { + inputs = []; + for (let input of ownInputs){ + let inputHydrated = { + ...input, + __proto__: Input.prototype + }; + if (inputHydrated.map) { + inputHydrated.map = { + ...inputHydrated.map, + __proto__: PreviousMap.prototype + }; + } + inputs.push(inputHydrated); + } + } + if (defaults.nodes) { + defaults.nodes = json.nodes.map((n)=>fromJSON(n, inputs)); + } + if (defaults.source) { + let { inputId, ...source } = defaults.source; + defaults.source = source; + if (inputId != null) { + defaults.source.input = inputs[inputId]; + } + } + if (defaults.type === 'root') { + return new Root(defaults); + } else if (defaults.type === 'decl') { + return new Declaration(defaults); + } else if (defaults.type === 'rule') { + return new Rule(defaults); + } else if (defaults.type === 'comment') { + return new Comment(defaults); + } else if (defaults.type === 'atrule') { + return new AtRule(defaults); + } else { + throw new Error('Unknown node type: ' + json.type); + } +} +module.exports = fromJSON; +fromJSON.default = fromJSON; +}), +"[project]/node_modules/postcss/lib/map-generator.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +let { dirname, relative, resolve, sep } = __turbopack_context__.r("[externals]/path [external] (path, cjs)"); +let { SourceMapConsumer, SourceMapGenerator } = __turbopack_context__.r("[project]/node_modules/source-map-js/source-map.js [postcss] (ecmascript)"); +let { pathToFileURL } = __turbopack_context__.r("[externals]/url [external] (url, cjs)"); +let Input = __turbopack_context__.r("[project]/node_modules/postcss/lib/input.js [postcss] (ecmascript)"); +let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator); +let pathAvailable = Boolean(dirname && resolve && relative && sep); +class MapGenerator { + constructor(stringify, root, opts, cssString){ + this.stringify = stringify; + this.mapOpts = opts.map || {}; + this.root = root; + this.opts = opts; + this.css = cssString; + this.originalCSS = cssString; + this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute; + this.memoizedFileURLs = new Map(); + this.memoizedPaths = new Map(); + this.memoizedURLs = new Map(); + } + addAnnotation() { + let content; + if (this.isInline()) { + content = 'data:application/json;base64,' + this.toBase64(this.map.toString()); + } else if (typeof this.mapOpts.annotation === 'string') { + content = this.mapOpts.annotation; + } else if (typeof this.mapOpts.annotation === 'function') { + content = this.mapOpts.annotation(this.opts.to, this.root); + } else { + content = this.outputFile() + '.map'; + } + let eol = '\n'; + if (this.css.includes('\r\n')) eol = '\r\n'; + this.css += eol + '/*# sourceMappingURL=' + content + ' */'; + } + applyPrevMaps() { + for (let prev of this.previous()){ + let from = this.toUrl(this.path(prev.file)); + let root = prev.root || dirname(prev.file); + let map; + if (this.mapOpts.sourcesContent === false) { + map = new SourceMapConsumer(prev.text); + if (map.sourcesContent) { + map.sourcesContent = null; + } + } else { + map = prev.consumer(); + } + this.map.applySourceMap(map, from, this.toUrl(this.path(root))); + } + } + clearAnnotation() { + if (this.mapOpts.annotation === false) return; + if (this.root) { + let node; + for(let i = this.root.nodes.length - 1; i >= 0; i--){ + node = this.root.nodes[i]; + if (node.type !== 'comment') continue; + if (node.text.startsWith('# sourceMappingURL=')) { + this.root.removeChild(i); + } + } + } else if (this.css) { + let startIndex; + while((startIndex = this.css.lastIndexOf('/*#')) !== -1){ + let endIndex = this.css.indexOf('*/', startIndex + 3); + if (endIndex === -1) break; + while(startIndex > 0 && this.css[startIndex - 1] === '\n'){ + startIndex--; + } + this.css = this.css.slice(0, startIndex) + this.css.slice(endIndex + 2); + } + } + } + generate() { + this.clearAnnotation(); + if (pathAvailable && sourceMapAvailable && this.isMap()) { + return this.generateMap(); + } else { + let result = ''; + this.stringify(this.root, (i)=>{ + result += i; + }); + return [ + result + ]; + } + } + generateMap() { + if (this.root) { + this.generateString(); + } else if (this.previous().length === 1) { + let prev = this.previous()[0].consumer(); + prev.file = this.outputFile(); + this.map = SourceMapGenerator.fromSourceMap(prev, { + ignoreInvalidMapping: true + }); + } else { + this.map = new SourceMapGenerator({ + file: this.outputFile(), + ignoreInvalidMapping: true + }); + this.map.addMapping({ + generated: { + column: 0, + line: 1 + }, + original: { + column: 0, + line: 1 + }, + source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : '' + }); + } + if (this.isSourcesContent()) this.setSourcesContent(); + if (this.root && this.previous().length > 0) this.applyPrevMaps(); + if (this.isAnnotation()) this.addAnnotation(); + if (this.isInline()) { + return [ + this.css + ]; + } else { + return [ + this.css, + this.map + ]; + } + } + generateString() { + this.css = ''; + this.map = new SourceMapGenerator({ + file: this.outputFile(), + ignoreInvalidMapping: true + }); + let line = 1; + let column = 1; + let noSource = ''; + let mapping = { + generated: { + column: 0, + line: 0 + }, + original: { + column: 0, + line: 0 + }, + source: '' + }; + let last, lines; + this.stringify(this.root, (str, node, type)=>{ + this.css += str; + if (node && type !== 'end') { + mapping.generated.line = line; + mapping.generated.column = column - 1; + if (node.source && node.source.start) { + mapping.source = this.sourcePath(node); + mapping.original.line = node.source.start.line; + mapping.original.column = node.source.start.column - 1; + this.map.addMapping(mapping); + } else { + mapping.source = noSource; + mapping.original.line = 1; + mapping.original.column = 0; + this.map.addMapping(mapping); + } + } + lines = str.match(/\n/g); + if (lines) { + line += lines.length; + last = str.lastIndexOf('\n'); + column = str.length - last; + } else { + column += str.length; + } + if (node && type !== 'start') { + let p = node.parent || { + raws: {} + }; + let childless = node.type === 'decl' || node.type === 'atrule' && !node.nodes; + if (!childless || node !== p.last || p.raws.semicolon) { + if (node.source && node.source.end) { + mapping.source = this.sourcePath(node); + mapping.original.line = node.source.end.line; + mapping.original.column = node.source.end.column - 1; + mapping.generated.line = line; + mapping.generated.column = column - 2; + this.map.addMapping(mapping); + } else { + mapping.source = noSource; + mapping.original.line = 1; + mapping.original.column = 0; + mapping.generated.line = line; + mapping.generated.column = column - 1; + this.map.addMapping(mapping); + } + } + } + }); + } + isAnnotation() { + if (this.isInline()) { + return true; + } + if (typeof this.mapOpts.annotation !== 'undefined') { + return this.mapOpts.annotation; + } + if (this.previous().length) { + return this.previous().some((i)=>i.annotation); + } + return true; + } + isInline() { + if (typeof this.mapOpts.inline !== 'undefined') { + return this.mapOpts.inline; + } + let annotation = this.mapOpts.annotation; + if (typeof annotation !== 'undefined' && annotation !== true) { + return false; + } + if (this.previous().length) { + return this.previous().some((i)=>i.inline); + } + return true; + } + isMap() { + if (typeof this.opts.map !== 'undefined') { + return !!this.opts.map; + } + return this.previous().length > 0; + } + isSourcesContent() { + if (typeof this.mapOpts.sourcesContent !== 'undefined') { + return this.mapOpts.sourcesContent; + } + if (this.previous().length) { + return this.previous().some((i)=>i.withContent()); + } + return true; + } + outputFile() { + if (this.opts.to) { + return this.path(this.opts.to); + } else if (this.opts.from) { + return this.path(this.opts.from); + } else { + return 'to.css'; + } + } + path(file) { + if (this.mapOpts.absolute) return file; + if (file.charCodeAt(0) === 60 /* `<` */ ) return file; + if (/^\w+:\/\//.test(file)) return file; + let cached = this.memoizedPaths.get(file); + if (cached) return cached; + let from = this.opts.to ? dirname(this.opts.to) : '.'; + if (typeof this.mapOpts.annotation === 'string') { + from = dirname(resolve(from, this.mapOpts.annotation)); + } + let path = relative(from, file); + this.memoizedPaths.set(file, path); + return path; + } + previous() { + if (!this.previousMaps) { + this.previousMaps = []; + if (this.root) { + this.root.walk((node)=>{ + if (node.source && node.source.input.map) { + let map = node.source.input.map; + if (!this.previousMaps.includes(map)) { + this.previousMaps.push(map); + } + } + }); + } else { + let input = new Input(this.originalCSS, this.opts); + if (input.map) this.previousMaps.push(input.map); + } + } + return this.previousMaps; + } + setSourcesContent() { + let already = {}; + if (this.root) { + this.root.walk((node)=>{ + if (node.source) { + let from = node.source.input.from; + if (from && !already[from]) { + already[from] = true; + let fromUrl = this.usesFileUrls ? this.toFileUrl(from) : this.toUrl(this.path(from)); + this.map.setSourceContent(fromUrl, node.source.input.css); + } + } + }); + } else if (this.css) { + let from = this.opts.from ? this.toUrl(this.path(this.opts.from)) : ''; + this.map.setSourceContent(from, this.css); + } + } + sourcePath(node) { + if (this.mapOpts.from) { + return this.toUrl(this.mapOpts.from); + } else if (this.usesFileUrls) { + return this.toFileUrl(node.source.input.from); + } else { + return this.toUrl(this.path(node.source.input.from)); + } + } + toBase64(str) { + if ("TURBOPACK compile-time truthy", 1) { + return Buffer.from(str).toString('base64'); + } else //TURBOPACK unreachable + ; + } + toFileUrl(path) { + let cached = this.memoizedFileURLs.get(path); + if (cached) return cached; + if ("TURBOPACK compile-time truthy", 1) { + let fileURL = pathToFileURL(path).toString(); + this.memoizedFileURLs.set(path, fileURL); + return fileURL; + } else //TURBOPACK unreachable + ; + } + toUrl(path) { + let cached = this.memoizedURLs.get(path); + if (cached) return cached; + if (sep === '\\') { + path = path.replace(/\\/g, '/'); + } + let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent); + this.memoizedURLs.set(path, url); + return url; + } +} +module.exports = MapGenerator; +}), +"[project]/node_modules/postcss/lib/parser.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +let AtRule = __turbopack_context__.r("[project]/node_modules/postcss/lib/at-rule.js [postcss] (ecmascript)"); +let Comment = __turbopack_context__.r("[project]/node_modules/postcss/lib/comment.js [postcss] (ecmascript)"); +let Declaration = __turbopack_context__.r("[project]/node_modules/postcss/lib/declaration.js [postcss] (ecmascript)"); +let Root = __turbopack_context__.r("[project]/node_modules/postcss/lib/root.js [postcss] (ecmascript)"); +let Rule = __turbopack_context__.r("[project]/node_modules/postcss/lib/rule.js [postcss] (ecmascript)"); +let tokenizer = __turbopack_context__.r("[project]/node_modules/postcss/lib/tokenize.js [postcss] (ecmascript)"); +const SAFE_COMMENT_NEIGHBOR = { + empty: true, + space: true +}; +function findLastWithPosition(tokens) { + for(let i = tokens.length - 1; i >= 0; i--){ + let token = tokens[i]; + let pos = token[3] || token[2]; + if (pos) return pos; + } +} +class Parser { + constructor(input){ + this.input = input; + this.root = new Root(); + this.current = this.root; + this.spaces = ''; + this.semicolon = false; + this.createTokenizer(); + this.root.source = { + input, + start: { + column: 1, + line: 1, + offset: 0 + } + }; + } + atrule(token) { + let node = new AtRule(); + node.name = token[1].slice(1); + if (node.name === '') { + this.unnamedAtrule(node, token); + } + this.init(node, token[2]); + let type; + let prev; + let shift; + let last = false; + let open = false; + let params = []; + let brackets = []; + while(!this.tokenizer.endOfFile()){ + token = this.tokenizer.nextToken(); + type = token[0]; + if (type === '(' || type === '[') { + brackets.push(type === '(' ? ')' : ']'); + } else if (type === '{' && brackets.length > 0) { + brackets.push('}'); + } else if (type === brackets[brackets.length - 1]) { + brackets.pop(); + } + if (brackets.length === 0) { + if (type === ';') { + node.source.end = this.getPosition(token[2]); + node.source.end.offset++; + this.semicolon = true; + break; + } else if (type === '{') { + open = true; + break; + } else if (type === '}') { + if (params.length > 0) { + shift = params.length - 1; + prev = params[shift]; + while(prev && prev[0] === 'space'){ + prev = params[--shift]; + } + if (prev) { + node.source.end = this.getPosition(prev[3] || prev[2]); + node.source.end.offset++; + } + } + this.end(token); + break; + } else { + params.push(token); + } + } else { + params.push(token); + } + if (this.tokenizer.endOfFile()) { + last = true; + break; + } + } + node.raws.between = this.spacesAndCommentsFromEnd(params); + if (params.length) { + node.raws.afterName = this.spacesAndCommentsFromStart(params); + this.raw(node, 'params', params); + if (last) { + token = params[params.length - 1]; + node.source.end = this.getPosition(token[3] || token[2]); + node.source.end.offset++; + this.spaces = node.raws.between; + node.raws.between = ''; + } + } else { + node.raws.afterName = ''; + node.params = ''; + } + if (open) { + node.nodes = []; + this.current = node; + } + } + checkMissedSemicolon(tokens) { + let colon = this.colon(tokens); + if (colon === false) return; + let founded = 0; + let token; + for(let j = colon - 1; j >= 0; j--){ + token = tokens[j]; + if (token[0] !== 'space') { + founded += 1; + if (founded === 2) break; + } + } + // If the token is a word, e.g. `!important`, `red` or any other valid property's value. + // Then we need to return the colon after that word token. [3] is the "end" colon of that word. + // And because we need it after that one we do +1 to get the next one. + throw this.input.error('Missed semicolon', token[0] === 'word' ? token[3] + 1 : token[2]); + } + colon(tokens) { + let brackets = 0; + let prev, token, type; + for (let [i, element] of tokens.entries()){ + token = element; + type = token[0]; + if (type === '(') { + brackets += 1; + } + if (type === ')') { + brackets -= 1; + } + if (brackets === 0 && type === ':') { + if (!prev) { + this.doubleColon(token); + } else if (prev[0] === 'word' && prev[1] === 'progid') { + continue; + } else { + return i; + } + } + prev = token; + } + return false; + } + comment(token) { + let node = new Comment(); + this.init(node, token[2]); + node.source.end = this.getPosition(token[3] || token[2]); + node.source.end.offset++; + let text = token[1].slice(2, -2); + if (!text.trim()) { + node.text = ''; + node.raws.left = text; + node.raws.right = ''; + } else { + let match = text.match(/^(\s*)([^]*\S)(\s*)$/); + node.text = match[2]; + node.raws.left = match[1]; + node.raws.right = match[3]; + } + } + createTokenizer() { + this.tokenizer = tokenizer(this.input); + } + decl(tokens, customProperty) { + let node = new Declaration(); + this.init(node, tokens[0][2]); + let last = tokens[tokens.length - 1]; + if (last[0] === ';') { + this.semicolon = true; + tokens.pop(); + } + node.source.end = this.getPosition(last[3] || last[2] || findLastWithPosition(tokens)); + node.source.end.offset++; + while(tokens[0][0] !== 'word'){ + if (tokens.length === 1) this.unknownWord(tokens); + node.raws.before += tokens.shift()[1]; + } + node.source.start = this.getPosition(tokens[0][2]); + node.prop = ''; + while(tokens.length){ + let type = tokens[0][0]; + if (type === ':' || type === 'space' || type === 'comment') { + break; + } + node.prop += tokens.shift()[1]; + } + node.raws.between = ''; + let token; + while(tokens.length){ + token = tokens.shift(); + if (token[0] === ':') { + node.raws.between += token[1]; + break; + } else { + if (token[0] === 'word' && /\w/.test(token[1])) { + this.unknownWord([ + token + ]); + } + node.raws.between += token[1]; + } + } + if (node.prop[0] === '_' || node.prop[0] === '*') { + node.raws.before += node.prop[0]; + node.prop = node.prop.slice(1); + } + let firstSpaces = []; + let next; + while(tokens.length){ + next = tokens[0][0]; + if (next !== 'space' && next !== 'comment') break; + firstSpaces.push(tokens.shift()); + } + this.precheckMissedSemicolon(tokens); + for(let i = tokens.length - 1; i >= 0; i--){ + token = tokens[i]; + if (token[1].toLowerCase() === '!important') { + node.important = true; + let string = this.stringFrom(tokens, i); + string = this.spacesFromEnd(tokens) + string; + if (string !== ' !important') node.raws.important = string; + break; + } else if (token[1].toLowerCase() === 'important') { + let cache = tokens.slice(0); + let str = ''; + for(let j = i; j > 0; j--){ + let type = cache[j][0]; + if (str.trim().startsWith('!') && type !== 'space') { + break; + } + str = cache.pop()[1] + str; + } + if (str.trim().startsWith('!')) { + node.important = true; + node.raws.important = str; + tokens = cache; + } + } + if (token[0] !== 'space' && token[0] !== 'comment') { + break; + } + } + let hasWord = tokens.some((i)=>i[0] !== 'space' && i[0] !== 'comment'); + if (hasWord) { + node.raws.between += firstSpaces.map((i)=>i[1]).join(''); + firstSpaces = []; + } + this.raw(node, 'value', firstSpaces.concat(tokens), customProperty); + if (node.value.includes(':') && !customProperty) { + this.checkMissedSemicolon(tokens); + } + } + doubleColon(token) { + throw this.input.error('Double colon', { + offset: token[2] + }, { + offset: token[2] + token[1].length + }); + } + emptyRule(token) { + let node = new Rule(); + this.init(node, token[2]); + node.selector = ''; + node.raws.between = ''; + this.current = node; + } + end(token) { + if (this.current.nodes && this.current.nodes.length) { + this.current.raws.semicolon = this.semicolon; + } + this.semicolon = false; + this.current.raws.after = (this.current.raws.after || '') + this.spaces; + this.spaces = ''; + if (this.current.parent) { + this.current.source.end = this.getPosition(token[2]); + this.current.source.end.offset++; + this.current = this.current.parent; + } else { + this.unexpectedClose(token); + } + } + endFile() { + if (this.current.parent) this.unclosedBlock(); + if (this.current.nodes && this.current.nodes.length) { + this.current.raws.semicolon = this.semicolon; + } + this.current.raws.after = (this.current.raws.after || '') + this.spaces; + this.root.source.end = this.getPosition(this.tokenizer.position()); + } + freeSemicolon(token) { + this.spaces += token[1]; + if (this.current.nodes) { + let prev = this.current.nodes[this.current.nodes.length - 1]; + if (prev && prev.type === 'rule' && !prev.raws.ownSemicolon) { + prev.raws.ownSemicolon = this.spaces; + this.spaces = ''; + prev.source.end = this.getPosition(token[2]); + prev.source.end.offset += prev.raws.ownSemicolon.length; + } + } + } + // Helpers + getPosition(offset) { + let pos = this.input.fromOffset(offset); + return { + column: pos.col, + line: pos.line, + offset + }; + } + init(node, offset) { + this.current.push(node); + node.source = { + input: this.input, + start: this.getPosition(offset) + }; + node.raws.before = this.spaces; + this.spaces = ''; + if (node.type !== 'comment') this.semicolon = false; + } + other(start) { + let end = false; + let type = null; + let colon = false; + let bracket = null; + let brackets = []; + let customProperty = start[1].startsWith('--'); + let tokens = []; + let token = start; + while(token){ + type = token[0]; + tokens.push(token); + if (type === '(' || type === '[') { + if (!bracket) bracket = token; + brackets.push(type === '(' ? ')' : ']'); + } else if (customProperty && colon && type === '{') { + if (!bracket) bracket = token; + brackets.push('}'); + } else if (brackets.length === 0) { + if (type === ';') { + if (colon) { + this.decl(tokens, customProperty); + return; + } else { + break; + } + } else if (type === '{') { + this.rule(tokens); + return; + } else if (type === '}') { + this.tokenizer.back(tokens.pop()); + end = true; + break; + } else if (type === ':') { + colon = true; + } + } else if (type === brackets[brackets.length - 1]) { + brackets.pop(); + if (brackets.length === 0) bracket = null; + } + token = this.tokenizer.nextToken(); + } + if (this.tokenizer.endOfFile()) end = true; + if (brackets.length > 0) this.unclosedBracket(bracket); + if (end && colon) { + if (!customProperty) { + while(tokens.length){ + token = tokens[tokens.length - 1][0]; + if (token !== 'space' && token !== 'comment') break; + this.tokenizer.back(tokens.pop()); + } + } + this.decl(tokens, customProperty); + } else { + this.unknownWord(tokens); + } + } + parse() { + let token; + while(!this.tokenizer.endOfFile()){ + token = this.tokenizer.nextToken(); + switch(token[0]){ + case 'space': + this.spaces += token[1]; + break; + case ';': + this.freeSemicolon(token); + break; + case '}': + this.end(token); + break; + case 'comment': + this.comment(token); + break; + case 'at-word': + this.atrule(token); + break; + case '{': + this.emptyRule(token); + break; + default: + this.other(token); + break; + } + } + this.endFile(); + } + precheckMissedSemicolon() { + // Hook for Safe Parser + } + raw(node, prop, tokens, customProperty) { + let token, type; + let length = tokens.length; + let value = ''; + let clean = true; + let next, prev; + for(let i = 0; i < length; i += 1){ + token = tokens[i]; + type = token[0]; + if (type === 'space' && i === length - 1 && !customProperty) { + clean = false; + } else if (type === 'comment') { + prev = tokens[i - 1] ? tokens[i - 1][0] : 'empty'; + next = tokens[i + 1] ? tokens[i + 1][0] : 'empty'; + if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) { + if (value.slice(-1) === ',') { + clean = false; + } else { + value += token[1]; + } + } else { + clean = false; + } + } else { + value += token[1]; + } + } + if (!clean) { + let raw = tokens.reduce((all, i)=>all + i[1], ''); + node.raws[prop] = { + raw, + value + }; + } + node[prop] = value; + } + rule(tokens) { + tokens.pop(); + let node = new Rule(); + this.init(node, tokens[0][2]); + node.raws.between = this.spacesAndCommentsFromEnd(tokens); + this.raw(node, 'selector', tokens); + this.current = node; + } + spacesAndCommentsFromEnd(tokens) { + let lastTokenType; + let spaces = ''; + while(tokens.length){ + lastTokenType = tokens[tokens.length - 1][0]; + if (lastTokenType !== 'space' && lastTokenType !== 'comment') break; + spaces = tokens.pop()[1] + spaces; + } + return spaces; + } + // Errors + spacesAndCommentsFromStart(tokens) { + let next; + let spaces = ''; + while(tokens.length){ + next = tokens[0][0]; + if (next !== 'space' && next !== 'comment') break; + spaces += tokens.shift()[1]; + } + return spaces; + } + spacesFromEnd(tokens) { + let lastTokenType; + let spaces = ''; + while(tokens.length){ + lastTokenType = tokens[tokens.length - 1][0]; + if (lastTokenType !== 'space') break; + spaces = tokens.pop()[1] + spaces; + } + return spaces; + } + stringFrom(tokens, from) { + let result = ''; + for(let i = from; i < tokens.length; i++){ + result += tokens[i][1]; + } + tokens.splice(from, tokens.length - from); + return result; + } + unclosedBlock() { + let pos = this.current.source.start; + throw this.input.error('Unclosed block', pos.line, pos.column); + } + unclosedBracket(bracket) { + throw this.input.error('Unclosed bracket', { + offset: bracket[2] + }, { + offset: bracket[2] + 1 + }); + } + unexpectedClose(token) { + throw this.input.error('Unexpected }', { + offset: token[2] + }, { + offset: token[2] + 1 + }); + } + unknownWord(tokens) { + throw this.input.error('Unknown word ' + tokens[0][1], { + offset: tokens[0][2] + }, { + offset: tokens[0][2] + tokens[0][1].length + }); + } + unnamedAtrule(node, token) { + throw this.input.error('At-rule without name', { + offset: token[2] + }, { + offset: token[2] + token[1].length + }); + } +} +module.exports = Parser; +}), +"[project]/node_modules/postcss/lib/parse.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +let Container = __turbopack_context__.r("[project]/node_modules/postcss/lib/container.js [postcss] (ecmascript)"); +let Input = __turbopack_context__.r("[project]/node_modules/postcss/lib/input.js [postcss] (ecmascript)"); +let Parser = __turbopack_context__.r("[project]/node_modules/postcss/lib/parser.js [postcss] (ecmascript)"); +function parse(css, opts) { + let input = new Input(css, opts); + let parser = new Parser(input); + try { + parser.parse(); + } catch (e) { + if ("TURBOPACK compile-time truthy", 1) { + if (e.name === 'CssSyntaxError' && opts && opts.from) { + if (/\.scss$/i.test(opts.from)) { + e.message += '\nYou tried to parse SCSS with ' + 'the standard CSS parser; ' + 'try again with the postcss-scss parser'; + } else if (/\.sass/i.test(opts.from)) { + e.message += '\nYou tried to parse Sass with ' + 'the standard CSS parser; ' + 'try again with the postcss-sass parser'; + } else if (/\.less$/i.test(opts.from)) { + e.message += '\nYou tried to parse Less with ' + 'the standard CSS parser; ' + 'try again with the postcss-less parser'; + } + } + } + throw e; + } + return parser.root; +} +module.exports = parse; +parse.default = parse; +Container.registerParse(parse); +}), +"[project]/node_modules/postcss/lib/warning.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +class Warning { + constructor(text, opts = {}){ + this.type = 'warning'; + this.text = text; + if (opts.node && opts.node.source) { + let range = opts.node.rangeBy(opts); + this.line = range.start.line; + this.column = range.start.column; + this.endLine = range.end.line; + this.endColumn = range.end.column; + } + for(let opt in opts)this[opt] = opts[opt]; + } + toString() { + if (this.node) { + return this.node.error(this.text, { + index: this.index, + plugin: this.plugin, + word: this.word + }).message; + } + if (this.plugin) { + return this.plugin + ': ' + this.text; + } + return this.text; + } +} +module.exports = Warning; +Warning.default = Warning; +}), +"[project]/node_modules/postcss/lib/result.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +let Warning = __turbopack_context__.r("[project]/node_modules/postcss/lib/warning.js [postcss] (ecmascript)"); +class Result { + get content() { + return this.css; + } + constructor(processor, root, opts){ + this.processor = processor; + this.messages = []; + this.root = root; + this.opts = opts; + this.css = ''; + this.map = undefined; + } + toString() { + return this.css; + } + warn(text, opts = {}) { + if (!opts.plugin) { + if (this.lastPlugin && this.lastPlugin.postcssPlugin) { + opts.plugin = this.lastPlugin.postcssPlugin; + } + } + let warning = new Warning(text, opts); + this.messages.push(warning); + return warning; + } + warnings() { + return this.messages.filter((i)=>i.type === 'warning'); + } +} +module.exports = Result; +Result.default = Result; +}), +"[project]/node_modules/postcss/lib/warn-once.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +/* eslint-disable no-console */ let printed = {}; +module.exports = function warnOnce(message) { + if (printed[message]) return; + printed[message] = true; + if (typeof console !== 'undefined' && console.warn) { + console.warn(message); + } +}; +}), +"[project]/node_modules/postcss/lib/lazy-result.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +let Container = __turbopack_context__.r("[project]/node_modules/postcss/lib/container.js [postcss] (ecmascript)"); +let Document = __turbopack_context__.r("[project]/node_modules/postcss/lib/document.js [postcss] (ecmascript)"); +let MapGenerator = __turbopack_context__.r("[project]/node_modules/postcss/lib/map-generator.js [postcss] (ecmascript)"); +let parse = __turbopack_context__.r("[project]/node_modules/postcss/lib/parse.js [postcss] (ecmascript)"); +let Result = __turbopack_context__.r("[project]/node_modules/postcss/lib/result.js [postcss] (ecmascript)"); +let Root = __turbopack_context__.r("[project]/node_modules/postcss/lib/root.js [postcss] (ecmascript)"); +let stringify = __turbopack_context__.r("[project]/node_modules/postcss/lib/stringify.js [postcss] (ecmascript)"); +let { isClean, my } = __turbopack_context__.r("[project]/node_modules/postcss/lib/symbols.js [postcss] (ecmascript)"); +let warnOnce = __turbopack_context__.r("[project]/node_modules/postcss/lib/warn-once.js [postcss] (ecmascript)"); +const TYPE_TO_CLASS_NAME = { + atrule: 'AtRule', + comment: 'Comment', + decl: 'Declaration', + document: 'Document', + root: 'Root', + rule: 'Rule' +}; +const PLUGIN_PROPS = { + AtRule: true, + AtRuleExit: true, + Comment: true, + CommentExit: true, + Declaration: true, + DeclarationExit: true, + Document: true, + DocumentExit: true, + Once: true, + OnceExit: true, + postcssPlugin: true, + prepare: true, + Root: true, + RootExit: true, + Rule: true, + RuleExit: true +}; +const NOT_VISITORS = { + Once: true, + postcssPlugin: true, + prepare: true +}; +const CHILDREN = 0; +function isPromise(obj) { + return typeof obj === 'object' && typeof obj.then === 'function'; +} +function getEvents(node) { + let key = false; + let type = TYPE_TO_CLASS_NAME[node.type]; + if (node.type === 'decl') { + key = node.prop.toLowerCase(); + } else if (node.type === 'atrule') { + key = node.name.toLowerCase(); + } + if (key && node.append) { + return [ + type, + type + '-' + key, + CHILDREN, + type + 'Exit', + type + 'Exit-' + key + ]; + } else if (key) { + return [ + type, + type + '-' + key, + type + 'Exit', + type + 'Exit-' + key + ]; + } else if (node.append) { + return [ + type, + CHILDREN, + type + 'Exit' + ]; + } else { + return [ + type, + type + 'Exit' + ]; + } +} +function toStack(node) { + let events; + if (node.type === 'document') { + events = [ + 'Document', + CHILDREN, + 'DocumentExit' + ]; + } else if (node.type === 'root') { + events = [ + 'Root', + CHILDREN, + 'RootExit' + ]; + } else { + events = getEvents(node); + } + return { + eventIndex: 0, + events, + iterator: 0, + node, + visitorIndex: 0, + visitors: [] + }; +} +function cleanMarks(node) { + node[isClean] = false; + if (node.nodes) node.nodes.forEach((i)=>cleanMarks(i)); + return node; +} +let postcss = {}; +class LazyResult { + get content() { + return this.stringify().content; + } + get css() { + return this.stringify().css; + } + get map() { + return this.stringify().map; + } + get messages() { + return this.sync().messages; + } + get opts() { + return this.result.opts; + } + get processor() { + return this.result.processor; + } + get root() { + return this.sync().root; + } + get [Symbol.toStringTag]() { + return 'LazyResult'; + } + constructor(processor, css, opts){ + this.stringified = false; + this.processed = false; + let root; + if (typeof css === 'object' && css !== null && (css.type === 'root' || css.type === 'document')) { + root = cleanMarks(css); + } else if (css instanceof LazyResult || css instanceof Result) { + root = cleanMarks(css.root); + if (css.map) { + if (typeof opts.map === 'undefined') opts.map = {}; + if (!opts.map.inline) opts.map.inline = false; + opts.map.prev = css.map; + } + } else { + let parser = parse; + if (opts.syntax) parser = opts.syntax.parse; + if (opts.parser) parser = opts.parser; + if (parser.parse) parser = parser.parse; + try { + root = parser(css, opts); + } catch (error) { + this.processed = true; + this.error = error; + } + if (root && !root[my]) { + /* c8 ignore next 2 */ Container.rebuild(root); + } + } + this.result = new Result(processor, root, opts); + this.helpers = { + ...postcss, + postcss, + result: this.result + }; + this.plugins = this.processor.plugins.map((plugin)=>{ + if (typeof plugin === 'object' && plugin.prepare) { + return { + ...plugin, + ...plugin.prepare(this.result) + }; + } else { + return plugin; + } + }); + } + async() { + if (this.error) return Promise.reject(this.error); + if (this.processed) return Promise.resolve(this.result); + if (!this.processing) { + this.processing = this.runAsync(); + } + return this.processing; + } + catch(onRejected) { + return this.async().catch(onRejected); + } + finally(onFinally) { + return this.async().then(onFinally, onFinally); + } + getAsyncError() { + throw new Error('Use process(css).then(cb) to work with async plugins'); + } + handleError(error, node) { + let plugin = this.result.lastPlugin; + try { + if (node) node.addToError(error); + this.error = error; + if (error.name === 'CssSyntaxError' && !error.plugin) { + error.plugin = plugin.postcssPlugin; + error.setMessage(); + } else if (plugin.postcssVersion) { + if ("TURBOPACK compile-time truthy", 1) { + let pluginName = plugin.postcssPlugin; + let pluginVer = plugin.postcssVersion; + let runtimeVer = this.result.processor.version; + let a = pluginVer.split('.'); + let b = runtimeVer.split('.'); + if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) { + // eslint-disable-next-line no-console + console.error('Unknown error from PostCSS plugin. Your current PostCSS ' + 'version is ' + runtimeVer + ', but ' + pluginName + ' uses ' + pluginVer + '. Perhaps this is the source of the error below.'); + } + } + } + } catch (err) { + /* c8 ignore next 3 */ // eslint-disable-next-line no-console + if (console && console.error) console.error(err); + } + return error; + } + prepareVisitors() { + this.listeners = {}; + let add = (plugin, type, cb)=>{ + if (!this.listeners[type]) this.listeners[type] = []; + this.listeners[type].push([ + plugin, + cb + ]); + }; + for (let plugin of this.plugins){ + if (typeof plugin === 'object') { + for(let event in plugin){ + if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) { + throw new Error(`Unknown event ${event} in ${plugin.postcssPlugin}. ` + `Try to update PostCSS (${this.processor.version} now).`); + } + if (!NOT_VISITORS[event]) { + if (typeof plugin[event] === 'object') { + for(let filter in plugin[event]){ + if (filter === '*') { + add(plugin, event, plugin[event][filter]); + } else { + add(plugin, event + '-' + filter.toLowerCase(), plugin[event][filter]); + } + } + } else if (typeof plugin[event] === 'function') { + add(plugin, event, plugin[event]); + } + } + } + } + } + this.hasListener = Object.keys(this.listeners).length > 0; + } + async runAsync() { + this.plugin = 0; + for(let i = 0; i < this.plugins.length; i++){ + let plugin = this.plugins[i]; + let promise = this.runOnRoot(plugin); + if (isPromise(promise)) { + try { + await promise; + } catch (error) { + throw this.handleError(error); + } + } + } + this.prepareVisitors(); + if (this.hasListener) { + let root = this.result.root; + while(!root[isClean]){ + root[isClean] = true; + let stack = [ + toStack(root) + ]; + while(stack.length > 0){ + let promise = this.visitTick(stack); + if (isPromise(promise)) { + try { + await promise; + } catch (e) { + let node = stack[stack.length - 1].node; + throw this.handleError(e, node); + } + } + } + } + if (this.listeners.OnceExit) { + for (let [plugin, visitor] of this.listeners.OnceExit){ + this.result.lastPlugin = plugin; + try { + if (root.type === 'document') { + let roots = root.nodes.map((subRoot)=>visitor(subRoot, this.helpers)); + await Promise.all(roots); + } else { + await visitor(root, this.helpers); + } + } catch (e) { + throw this.handleError(e); + } + } + } + } + this.processed = true; + return this.stringify(); + } + runOnRoot(plugin) { + this.result.lastPlugin = plugin; + try { + if (typeof plugin === 'object' && plugin.Once) { + if (this.result.root.type === 'document') { + let roots = this.result.root.nodes.map((root)=>plugin.Once(root, this.helpers)); + if (isPromise(roots[0])) { + return Promise.all(roots); + } + return roots; + } + return plugin.Once(this.result.root, this.helpers); + } else if (typeof plugin === 'function') { + return plugin(this.result.root, this.result); + } + } catch (error) { + throw this.handleError(error); + } + } + stringify() { + if (this.error) throw this.error; + if (this.stringified) return this.result; + this.stringified = true; + this.sync(); + let opts = this.result.opts; + let str = stringify; + if (opts.syntax) str = opts.syntax.stringify; + if (opts.stringifier) str = opts.stringifier; + if (str.stringify) str = str.stringify; + let map = new MapGenerator(str, this.result.root, this.result.opts); + let data = map.generate(); + this.result.css = data[0]; + this.result.map = data[1]; + return this.result; + } + sync() { + if (this.error) throw this.error; + if (this.processed) return this.result; + this.processed = true; + if (this.processing) { + throw this.getAsyncError(); + } + for (let plugin of this.plugins){ + let promise = this.runOnRoot(plugin); + if (isPromise(promise)) { + throw this.getAsyncError(); + } + } + this.prepareVisitors(); + if (this.hasListener) { + let root = this.result.root; + while(!root[isClean]){ + root[isClean] = true; + this.walkSync(root); + } + if (this.listeners.OnceExit) { + if (root.type === 'document') { + for (let subRoot of root.nodes){ + this.visitSync(this.listeners.OnceExit, subRoot); + } + } else { + this.visitSync(this.listeners.OnceExit, root); + } + } + } + return this.result; + } + then(onFulfilled, onRejected) { + if ("TURBOPACK compile-time truthy", 1) { + if (!('from' in this.opts)) { + warnOnce('Without `from` option PostCSS could generate wrong source map ' + 'and will not find Browserslist config. Set it to CSS file path ' + 'or to `undefined` to prevent this warning.'); + } + } + return this.async().then(onFulfilled, onRejected); + } + toString() { + return this.css; + } + visitSync(visitors, node) { + for (let [plugin, visitor] of visitors){ + this.result.lastPlugin = plugin; + let promise; + try { + promise = visitor(node, this.helpers); + } catch (e) { + throw this.handleError(e, node.proxyOf); + } + if (node.type !== 'root' && node.type !== 'document' && !node.parent) { + return true; + } + if (isPromise(promise)) { + throw this.getAsyncError(); + } + } + } + visitTick(stack) { + let visit = stack[stack.length - 1]; + let { node, visitors } = visit; + if (node.type !== 'root' && node.type !== 'document' && !node.parent) { + stack.pop(); + return; + } + if (visitors.length > 0 && visit.visitorIndex < visitors.length) { + let [plugin, visitor] = visitors[visit.visitorIndex]; + visit.visitorIndex += 1; + if (visit.visitorIndex === visitors.length) { + visit.visitors = []; + visit.visitorIndex = 0; + } + this.result.lastPlugin = plugin; + try { + return visitor(node.toProxy(), this.helpers); + } catch (e) { + throw this.handleError(e, node); + } + } + if (visit.iterator !== 0) { + let iterator = visit.iterator; + let child; + while(child = node.nodes[node.indexes[iterator]]){ + node.indexes[iterator] += 1; + if (!child[isClean]) { + child[isClean] = true; + stack.push(toStack(child)); + return; + } + } + visit.iterator = 0; + delete node.indexes[iterator]; + } + let events = visit.events; + while(visit.eventIndex < events.length){ + let event = events[visit.eventIndex]; + visit.eventIndex += 1; + if (event === CHILDREN) { + if (node.nodes && node.nodes.length) { + node[isClean] = true; + visit.iterator = node.getIterator(); + } + return; + } else if (this.listeners[event]) { + visit.visitors = this.listeners[event]; + return; + } + } + stack.pop(); + } + walkSync(node) { + node[isClean] = true; + let events = getEvents(node); + for (let event of events){ + if (event === CHILDREN) { + if (node.nodes) { + node.each((child)=>{ + if (!child[isClean]) this.walkSync(child); + }); + } + } else { + let visitors = this.listeners[event]; + if (visitors) { + if (this.visitSync(visitors, node.toProxy())) return; + } + } + } + } + warnings() { + return this.sync().warnings(); + } +} +LazyResult.registerPostcss = (dependant)=>{ + postcss = dependant; +}; +module.exports = LazyResult; +LazyResult.default = LazyResult; +Root.registerLazyResult(LazyResult); +Document.registerLazyResult(LazyResult); +}), +"[project]/node_modules/postcss/lib/no-work-result.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +let MapGenerator = __turbopack_context__.r("[project]/node_modules/postcss/lib/map-generator.js [postcss] (ecmascript)"); +let parse = __turbopack_context__.r("[project]/node_modules/postcss/lib/parse.js [postcss] (ecmascript)"); +const Result = __turbopack_context__.r("[project]/node_modules/postcss/lib/result.js [postcss] (ecmascript)"); +let stringify = __turbopack_context__.r("[project]/node_modules/postcss/lib/stringify.js [postcss] (ecmascript)"); +let warnOnce = __turbopack_context__.r("[project]/node_modules/postcss/lib/warn-once.js [postcss] (ecmascript)"); +class NoWorkResult { + get content() { + return this.result.css; + } + get css() { + return this.result.css; + } + get map() { + return this.result.map; + } + get messages() { + return []; + } + get opts() { + return this.result.opts; + } + get processor() { + return this.result.processor; + } + get root() { + if (this._root) { + return this._root; + } + let root; + let parser = parse; + try { + root = parser(this._css, this._opts); + } catch (error) { + this.error = error; + } + if (this.error) { + throw this.error; + } else { + this._root = root; + return root; + } + } + get [Symbol.toStringTag]() { + return 'NoWorkResult'; + } + constructor(processor, css, opts){ + css = css.toString(); + this.stringified = false; + this._processor = processor; + this._css = css; + this._opts = opts; + this._map = undefined; + let str = stringify; + this.result = new Result(this._processor, undefined, this._opts); + this.result.css = css; + let self = this; + Object.defineProperty(this.result, 'root', { + get () { + return self.root; + } + }); + let map = new MapGenerator(str, undefined, this._opts, css); + if (map.isMap()) { + let [generatedCSS, generatedMap] = map.generate(); + if (generatedCSS) { + this.result.css = generatedCSS; + } + if (generatedMap) { + this.result.map = generatedMap; + } + } else { + map.clearAnnotation(); + this.result.css = map.css; + } + } + async() { + if (this.error) return Promise.reject(this.error); + return Promise.resolve(this.result); + } + catch(onRejected) { + return this.async().catch(onRejected); + } + finally(onFinally) { + return this.async().then(onFinally, onFinally); + } + sync() { + if (this.error) throw this.error; + return this.result; + } + then(onFulfilled, onRejected) { + if ("TURBOPACK compile-time truthy", 1) { + if (!('from' in this._opts)) { + warnOnce('Without `from` option PostCSS could generate wrong source map ' + 'and will not find Browserslist config. Set it to CSS file path ' + 'or to `undefined` to prevent this warning.'); + } + } + return this.async().then(onFulfilled, onRejected); + } + toString() { + return this._css; + } + warnings() { + return []; + } +} +module.exports = NoWorkResult; +NoWorkResult.default = NoWorkResult; +}), +"[project]/node_modules/postcss/lib/processor.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +let Document = __turbopack_context__.r("[project]/node_modules/postcss/lib/document.js [postcss] (ecmascript)"); +let LazyResult = __turbopack_context__.r("[project]/node_modules/postcss/lib/lazy-result.js [postcss] (ecmascript)"); +let NoWorkResult = __turbopack_context__.r("[project]/node_modules/postcss/lib/no-work-result.js [postcss] (ecmascript)"); +let Root = __turbopack_context__.r("[project]/node_modules/postcss/lib/root.js [postcss] (ecmascript)"); +class Processor { + constructor(plugins = []){ + this.version = '8.5.8'; + this.plugins = this.normalize(plugins); + } + normalize(plugins) { + let normalized = []; + for (let i of plugins){ + if (i.postcss === true) { + i = i(); + } else if (i.postcss) { + i = i.postcss; + } + if (typeof i === 'object' && Array.isArray(i.plugins)) { + normalized = normalized.concat(i.plugins); + } else if (typeof i === 'object' && i.postcssPlugin) { + normalized.push(i); + } else if (typeof i === 'function') { + normalized.push(i); + } else if (typeof i === 'object' && (i.parse || i.stringify)) { + if ("TURBOPACK compile-time truthy", 1) { + throw new Error('PostCSS syntaxes cannot be used as plugins. Instead, please use ' + 'one of the syntax/parser/stringifier options as outlined ' + 'in your PostCSS runner documentation.'); + } + } else { + throw new Error(i + ' is not a PostCSS plugin'); + } + } + return normalized; + } + process(css, opts = {}) { + if (!this.plugins.length && !opts.parser && !opts.stringifier && !opts.syntax) { + return new NoWorkResult(this, css, opts); + } else { + return new LazyResult(this, css, opts); + } + } + use(plugin) { + this.plugins = this.plugins.concat(this.normalize([ + plugin + ])); + return this; + } +} +module.exports = Processor; +Processor.default = Processor; +Root.registerProcessor(Processor); +Document.registerProcessor(Processor); +}), +"[project]/node_modules/postcss/lib/postcss.js [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +let AtRule = __turbopack_context__.r("[project]/node_modules/postcss/lib/at-rule.js [postcss] (ecmascript)"); +let Comment = __turbopack_context__.r("[project]/node_modules/postcss/lib/comment.js [postcss] (ecmascript)"); +let Container = __turbopack_context__.r("[project]/node_modules/postcss/lib/container.js [postcss] (ecmascript)"); +let CssSyntaxError = __turbopack_context__.r("[project]/node_modules/postcss/lib/css-syntax-error.js [postcss] (ecmascript)"); +let Declaration = __turbopack_context__.r("[project]/node_modules/postcss/lib/declaration.js [postcss] (ecmascript)"); +let Document = __turbopack_context__.r("[project]/node_modules/postcss/lib/document.js [postcss] (ecmascript)"); +let fromJSON = __turbopack_context__.r("[project]/node_modules/postcss/lib/fromJSON.js [postcss] (ecmascript)"); +let Input = __turbopack_context__.r("[project]/node_modules/postcss/lib/input.js [postcss] (ecmascript)"); +let LazyResult = __turbopack_context__.r("[project]/node_modules/postcss/lib/lazy-result.js [postcss] (ecmascript)"); +let list = __turbopack_context__.r("[project]/node_modules/postcss/lib/list.js [postcss] (ecmascript)"); +let Node = __turbopack_context__.r("[project]/node_modules/postcss/lib/node.js [postcss] (ecmascript)"); +let parse = __turbopack_context__.r("[project]/node_modules/postcss/lib/parse.js [postcss] (ecmascript)"); +let Processor = __turbopack_context__.r("[project]/node_modules/postcss/lib/processor.js [postcss] (ecmascript)"); +let Result = __turbopack_context__.r("[project]/node_modules/postcss/lib/result.js [postcss] (ecmascript)"); +let Root = __turbopack_context__.r("[project]/node_modules/postcss/lib/root.js [postcss] (ecmascript)"); +let Rule = __turbopack_context__.r("[project]/node_modules/postcss/lib/rule.js [postcss] (ecmascript)"); +let stringify = __turbopack_context__.r("[project]/node_modules/postcss/lib/stringify.js [postcss] (ecmascript)"); +let Warning = __turbopack_context__.r("[project]/node_modules/postcss/lib/warning.js [postcss] (ecmascript)"); +function postcss(...plugins) { + if (plugins.length === 1 && Array.isArray(plugins[0])) { + plugins = plugins[0]; + } + return new Processor(plugins); +} +postcss.plugin = function plugin(name, initializer) { + let warningPrinted = false; + function creator(...args) { + // eslint-disable-next-line no-console + if (console && console.warn && !warningPrinted) { + warningPrinted = true; + // eslint-disable-next-line no-console + console.warn(name + ': postcss.plugin was deprecated. Migration guide:\n' + 'https://evilmartians.com/chronicles/postcss-8-plugin-migration'); + if (process.env.LANG && process.env.LANG.startsWith('cn')) { + /* c8 ignore next 7 */ // eslint-disable-next-line no-console + console.warn(name + ': 里面 postcss.plugin 被弃用. 迁移指南:\n' + 'https://www.w3ctech.com/topic/2226'); + } + } + let transformer = initializer(...args); + transformer.postcssPlugin = name; + transformer.postcssVersion = new Processor().version; + return transformer; + } + let cache; + Object.defineProperty(creator, 'postcss', { + get () { + if (!cache) cache = creator(); + return cache; + } + }); + creator.process = function(css, processOpts, pluginOpts) { + return postcss([ + creator(pluginOpts) + ]).process(css, processOpts); + }; + return creator; +}; +postcss.stringify = stringify; +postcss.parse = parse; +postcss.fromJSON = fromJSON; +postcss.list = list; +postcss.comment = (defaults)=>new Comment(defaults); +postcss.atRule = (defaults)=>new AtRule(defaults); +postcss.decl = (defaults)=>new Declaration(defaults); +postcss.rule = (defaults)=>new Rule(defaults); +postcss.root = (defaults)=>new Root(defaults); +postcss.document = (defaults)=>new Document(defaults); +postcss.CssSyntaxError = CssSyntaxError; +postcss.Declaration = Declaration; +postcss.Container = Container; +postcss.Processor = Processor; +postcss.Document = Document; +postcss.Comment = Comment; +postcss.Warning = Warning; +postcss.AtRule = AtRule; +postcss.Result = Result; +postcss.Input = Input; +postcss.Rule = Rule; +postcss.Root = Root; +postcss.Node = Node; +LazyResult.registerPostcss(postcss); +module.exports = postcss; +postcss.default = postcss; +}), +"[project]/node_modules/postcss/lib/postcss.mjs [postcss] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "AtRule", + ()=>AtRule, + "Comment", + ()=>Comment, + "Container", + ()=>Container, + "CssSyntaxError", + ()=>CssSyntaxError, + "Declaration", + ()=>Declaration, + "Document", + ()=>Document, + "Input", + ()=>Input, + "Node", + ()=>Node, + "Processor", + ()=>Processor, + "Result", + ()=>Result, + "Root", + ()=>Root, + "Rule", + ()=>Rule, + "Warning", + ()=>Warning, + "atRule", + ()=>atRule, + "comment", + ()=>comment, + "decl", + ()=>decl, + "default", + ()=>__TURBOPACK__default__export__, + "document", + ()=>document, + "fromJSON", + ()=>fromJSON, + "list", + ()=>list, + "parse", + ()=>parse, + "plugin", + ()=>plugin, + "root", + ()=>root, + "rule", + ()=>rule, + "stringify", + ()=>stringify +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/postcss/lib/postcss.js [postcss] (ecmascript)"); +; +const __TURBOPACK__default__export__ = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["default"]; +const stringify = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["default"].stringify; +const fromJSON = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["default"].fromJSON; +const plugin = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["default"].plugin; +const parse = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["default"].parse; +const list = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["default"].list; +const document = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["default"].document; +const comment = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["default"].comment; +const atRule = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["default"].atRule; +const rule = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["default"].rule; +const decl = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["default"].decl; +const root = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["default"].root; +const CssSyntaxError = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["default"].CssSyntaxError; +const Declaration = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["default"].Declaration; +const Container = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["default"].Container; +const Processor = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["default"].Processor; +const Document = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["default"].Document; +const Comment = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["default"].Comment; +const Warning = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["default"].Warning; +const AtRule = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["default"].AtRule; +const Result = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["default"].Result; +const Input = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["default"].Input; +const Rule = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["default"].Rule; +const Root = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["default"].Root; +const Node = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["default"].Node; +}), +]; + +//# sourceMappingURL=node_modules_13sb.px._.js.map \ No newline at end of file diff --git a/.next/dev/build/chunks/node_modules_13sb.px._.js.map b/.next/dev/build/chunks/node_modules_13sb.px._.js.map new file mode 100644 index 0000000..7006f5a --- /dev/null +++ b/.next/dev/build/chunks/node_modules_13sb.px._.js.map @@ -0,0 +1,47 @@ +{ + "version": 3, + "sources": [], + "sections": [ + {"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/picocolors/picocolors.js"],"sourcesContent":["let p = process || {}, argv = p.argv || [], env = p.env || {}\nlet isColorSupported =\n\t!(!!env.NO_COLOR || argv.includes(\"--no-color\")) &&\n\t(!!env.FORCE_COLOR || argv.includes(\"--color\") || p.platform === \"win32\" || ((p.stdout || {}).isTTY && env.TERM !== \"dumb\") || !!env.CI)\n\nlet formatter = (open, close, replace = open) =>\n\tinput => {\n\t\tlet string = \"\" + input, index = string.indexOf(close, open.length)\n\t\treturn ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close\n\t}\n\nlet replaceClose = (string, close, replace, index) => {\n\tlet result = \"\", cursor = 0\n\tdo {\n\t\tresult += string.substring(cursor, index) + replace\n\t\tcursor = index + close.length\n\t\tindex = string.indexOf(close, cursor)\n\t} while (~index)\n\treturn result + string.substring(cursor)\n}\n\nlet createColors = (enabled = isColorSupported) => {\n\tlet f = enabled ? formatter : () => String\n\treturn {\n\t\tisColorSupported: enabled,\n\t\treset: f(\"\\x1b[0m\", \"\\x1b[0m\"),\n\t\tbold: f(\"\\x1b[1m\", \"\\x1b[22m\", \"\\x1b[22m\\x1b[1m\"),\n\t\tdim: f(\"\\x1b[2m\", \"\\x1b[22m\", \"\\x1b[22m\\x1b[2m\"),\n\t\titalic: f(\"\\x1b[3m\", \"\\x1b[23m\"),\n\t\tunderline: f(\"\\x1b[4m\", \"\\x1b[24m\"),\n\t\tinverse: f(\"\\x1b[7m\", \"\\x1b[27m\"),\n\t\thidden: f(\"\\x1b[8m\", \"\\x1b[28m\"),\n\t\tstrikethrough: f(\"\\x1b[9m\", \"\\x1b[29m\"),\n\n\t\tblack: f(\"\\x1b[30m\", \"\\x1b[39m\"),\n\t\tred: f(\"\\x1b[31m\", \"\\x1b[39m\"),\n\t\tgreen: f(\"\\x1b[32m\", \"\\x1b[39m\"),\n\t\tyellow: f(\"\\x1b[33m\", \"\\x1b[39m\"),\n\t\tblue: f(\"\\x1b[34m\", \"\\x1b[39m\"),\n\t\tmagenta: f(\"\\x1b[35m\", \"\\x1b[39m\"),\n\t\tcyan: f(\"\\x1b[36m\", \"\\x1b[39m\"),\n\t\twhite: f(\"\\x1b[37m\", \"\\x1b[39m\"),\n\t\tgray: f(\"\\x1b[90m\", \"\\x1b[39m\"),\n\n\t\tbgBlack: f(\"\\x1b[40m\", \"\\x1b[49m\"),\n\t\tbgRed: f(\"\\x1b[41m\", \"\\x1b[49m\"),\n\t\tbgGreen: f(\"\\x1b[42m\", \"\\x1b[49m\"),\n\t\tbgYellow: f(\"\\x1b[43m\", \"\\x1b[49m\"),\n\t\tbgBlue: f(\"\\x1b[44m\", \"\\x1b[49m\"),\n\t\tbgMagenta: f(\"\\x1b[45m\", \"\\x1b[49m\"),\n\t\tbgCyan: f(\"\\x1b[46m\", \"\\x1b[49m\"),\n\t\tbgWhite: f(\"\\x1b[47m\", \"\\x1b[49m\"),\n\n\t\tblackBright: f(\"\\x1b[90m\", \"\\x1b[39m\"),\n\t\tredBright: f(\"\\x1b[91m\", \"\\x1b[39m\"),\n\t\tgreenBright: f(\"\\x1b[92m\", \"\\x1b[39m\"),\n\t\tyellowBright: f(\"\\x1b[93m\", \"\\x1b[39m\"),\n\t\tblueBright: f(\"\\x1b[94m\", \"\\x1b[39m\"),\n\t\tmagentaBright: f(\"\\x1b[95m\", \"\\x1b[39m\"),\n\t\tcyanBright: f(\"\\x1b[96m\", \"\\x1b[39m\"),\n\t\twhiteBright: f(\"\\x1b[97m\", \"\\x1b[39m\"),\n\n\t\tbgBlackBright: f(\"\\x1b[100m\", \"\\x1b[49m\"),\n\t\tbgRedBright: f(\"\\x1b[101m\", \"\\x1b[49m\"),\n\t\tbgGreenBright: f(\"\\x1b[102m\", \"\\x1b[49m\"),\n\t\tbgYellowBright: f(\"\\x1b[103m\", \"\\x1b[49m\"),\n\t\tbgBlueBright: f(\"\\x1b[104m\", \"\\x1b[49m\"),\n\t\tbgMagentaBright: f(\"\\x1b[105m\", \"\\x1b[49m\"),\n\t\tbgCyanBright: f(\"\\x1b[106m\", \"\\x1b[49m\"),\n\t\tbgWhiteBright: f(\"\\x1b[107m\", \"\\x1b[49m\"),\n\t}\n}\n\nmodule.exports = createColors()\nmodule.exports.createColors = createColors\n"],"names":["p","process","argv","env","isColorSupported","NO_COLOR","includes","FORCE_COLOR","platform","stdout","isTTY","TERM","CI","formatter","open","close","replace","input","string","index","indexOf","length","replaceClose","result","cursor","substring","createColors","enabled","f","String","reset","bold","dim","italic","underline","inverse","hidden","strikethrough","black","red","green","yellow","blue","magenta","cyan","white","gray","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite","blackBright","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright","bgBlackBright","bgRedBright","bgGreenBright","bgYellowBright","bgBlueBright","bgMagentaBright","bgCyanBright","bgWhiteBright","module","exports"],"mappings":"AAAA,IAAIA,IAAIC,WAAW,CAAC,GAAGC,OAAOF,EAAEE,IAAI,IAAI,EAAE,EAAEC,MAAMH,EAAEG,GAAG,IAAI,CAAC;AAC5D,IAAIC,mBACH,CAAC,CAAC,CAAC,CAACD,IAAIE,QAAQ,IAAIH,KAAKI,QAAQ,CAAC,aAAa,KAC/C,CAAC,CAAC,CAACH,IAAII,WAAW,IAAIL,KAAKI,QAAQ,CAAC,cAAcN,EAAEQ,QAAQ,KAAK,WAAY,CAACR,EAAES,MAAM,IAAI,CAAC,CAAC,EAAEC,KAAK,IAAIP,IAAIQ,IAAI,KAAK,UAAW,CAAC,CAACR,IAAIS,EAAE;AAExI,IAAIC,YAAY,CAACC,MAAMC,OAAOC,UAAUF,IAAI,GAC3CG,CAAAA;QACC,IAAIC,SAAS,KAAKD,OAAOE,QAAQD,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AE,YAAY;QAEvB2B,aAAa3B,EAAE,YAAY;QAC3B4B,WAAW5B,EAAE,YAAY;QACzB6B,aAAa7B,EAAE,YAAY;QAC3B8B,cAAc9B,EAAE,YAAY;QAC5B+B,YAAY/B,EAAE,YAAY;QAC1BgC,eAAehC,EAAE,YAAY;QAC7BiC,YAAYjC,EAAE,YAAY;QAC1BkC,aAAalC,EAAE,YAAY;QAE3BmC,eAAenC,EAAE,aAAa;QAC9BoC,aAAapC,EAAE,aAAa;QAC5BqC,eAAerC,EAAE,aAAa;QAC9BsC,gBAAgBtC,EAAE,aAAa;QAC/BuC,cAAcvC,EAAE,aAAa;QAC7BwC,iBAAiBxC,EAAE,aAAa;QAChCyC,cAAczC,EAAE,aAAa;QAC7B0C,eAAe1C,EAAE,aAAa;IAC/B;AACD;AAEA2C,OAAOC,OAAO,GAAG9C;AACjB6C,OAAOC,OAAO,CAAC9C,YAAY,GAAGA","ignoreList":[0]}}, + {"offset": {"line": 71, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/tokenize.js"],"sourcesContent":["'use strict'\n\nconst SINGLE_QUOTE = \"'\".charCodeAt(0)\nconst DOUBLE_QUOTE = '\"'.charCodeAt(0)\nconst BACKSLASH = '\\\\'.charCodeAt(0)\nconst SLASH = '/'.charCodeAt(0)\nconst NEWLINE = '\\n'.charCodeAt(0)\nconst SPACE = ' '.charCodeAt(0)\nconst FEED = '\\f'.charCodeAt(0)\nconst TAB = '\\t'.charCodeAt(0)\nconst CR = '\\r'.charCodeAt(0)\nconst OPEN_SQUARE = '['.charCodeAt(0)\nconst CLOSE_SQUARE = ']'.charCodeAt(0)\nconst OPEN_PARENTHESES = '('.charCodeAt(0)\nconst CLOSE_PARENTHESES = ')'.charCodeAt(0)\nconst OPEN_CURLY = '{'.charCodeAt(0)\nconst CLOSE_CURLY = '}'.charCodeAt(0)\nconst SEMICOLON = ';'.charCodeAt(0)\nconst ASTERISK = '*'.charCodeAt(0)\nconst COLON = ':'.charCodeAt(0)\nconst AT = '@'.charCodeAt(0)\n\nconst RE_AT_END = /[\\t\\n\\f\\r \"#'()/;[\\\\\\]{}]/g\nconst RE_WORD_END = /[\\t\\n\\f\\r !\"#'():;@[\\\\\\]{}]|\\/(?=\\*)/g\nconst RE_BAD_BRACKET = /.[\\r\\n\"'(/\\\\]/\nconst RE_HEX_ESCAPE = /[\\da-f]/i\n\nmodule.exports = function tokenizer(input, options = {}) {\n let css = input.css.valueOf()\n let ignore = options.ignoreErrors\n\n let code, content, escape, next, quote\n let currentToken, escaped, escapePos, n, prev\n\n let length = css.length\n let pos = 0\n let buffer = []\n let returned = []\n\n function position() {\n return pos\n }\n\n function unclosed(what) {\n throw input.error('Unclosed ' + what, pos)\n }\n\n function endOfFile() {\n return returned.length === 0 && pos >= length\n }\n\n function nextToken(opts) {\n if (returned.length) return returned.pop()\n if (pos >= length) return\n\n let ignoreUnclosed = opts ? opts.ignoreUnclosed : false\n\n code = css.charCodeAt(pos)\n\n switch (code) {\n case NEWLINE:\n case SPACE:\n case TAB:\n case CR:\n case FEED: {\n next = pos\n do {\n next += 1\n code = css.charCodeAt(next)\n } while (\n code === SPACE ||\n code === NEWLINE ||\n code === TAB ||\n code === CR ||\n code === FEED\n )\n\n currentToken = ['space', css.slice(pos, next)]\n pos = next - 1\n break\n }\n\n case OPEN_SQUARE:\n case CLOSE_SQUARE:\n case OPEN_CURLY:\n case CLOSE_CURLY:\n case COLON:\n case SEMICOLON:\n case CLOSE_PARENTHESES: {\n let controlChar = String.fromCharCode(code)\n currentToken = [controlChar, controlChar, pos]\n break\n }\n\n case OPEN_PARENTHESES: {\n prev = buffer.length ? buffer.pop()[1] : ''\n n = css.charCodeAt(pos + 1)\n if (\n prev === 'url' &&\n n !== SINGLE_QUOTE &&\n n !== DOUBLE_QUOTE &&\n n !== SPACE &&\n n !== NEWLINE &&\n n !== TAB &&\n n !== FEED &&\n n !== CR\n ) {\n next = pos\n do {\n escaped = false\n next = css.indexOf(')', next + 1)\n if (next === -1) {\n if (ignore || ignoreUnclosed) {\n next = pos\n break\n } else {\n unclosed('bracket')\n }\n }\n escapePos = next\n while (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n escapePos -= 1\n escaped = !escaped\n }\n } while (escaped)\n\n currentToken = ['brackets', css.slice(pos, next + 1), pos, next]\n\n pos = next\n } else {\n next = css.indexOf(')', pos + 1)\n content = css.slice(pos, next + 1)\n\n if (next === -1 || RE_BAD_BRACKET.test(content)) {\n currentToken = ['(', '(', pos]\n } else {\n currentToken = ['brackets', content, pos, next]\n pos = next\n }\n }\n\n break\n }\n\n case SINGLE_QUOTE:\n case DOUBLE_QUOTE: {\n quote = code === SINGLE_QUOTE ? \"'\" : '\"'\n next = pos\n do {\n escaped = false\n next = css.indexOf(quote, next + 1)\n if (next === -1) {\n if (ignore || ignoreUnclosed) {\n next = pos + 1\n break\n } else {\n unclosed('string')\n }\n }\n escapePos = next\n while (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n escapePos -= 1\n escaped = !escaped\n }\n } while (escaped)\n\n currentToken = ['string', css.slice(pos, next + 1), pos, next]\n pos = next\n break\n }\n\n case AT: {\n RE_AT_END.lastIndex = pos + 1\n RE_AT_END.test(css)\n if (RE_AT_END.lastIndex === 0) {\n next = css.length - 1\n } else {\n next = RE_AT_END.lastIndex - 2\n }\n\n currentToken = ['at-word', css.slice(pos, next + 1), pos, next]\n\n pos = next\n break\n }\n\n case BACKSLASH: {\n next = pos\n escape = true\n while (css.charCodeAt(next + 1) === BACKSLASH) {\n next += 1\n escape = !escape\n }\n code = css.charCodeAt(next + 1)\n if (\n escape &&\n code !== SLASH &&\n code !== SPACE &&\n code !== NEWLINE &&\n code !== TAB &&\n code !== CR &&\n code !== FEED\n ) {\n next += 1\n if (RE_HEX_ESCAPE.test(css.charAt(next))) {\n while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) {\n next += 1\n }\n if (css.charCodeAt(next + 1) === SPACE) {\n next += 1\n }\n }\n }\n\n currentToken = ['word', css.slice(pos, next + 1), pos, next]\n\n pos = next\n break\n }\n\n default: {\n if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) {\n next = css.indexOf('*/', pos + 2) + 1\n if (next === 0) {\n if (ignore || ignoreUnclosed) {\n next = css.length\n } else {\n unclosed('comment')\n }\n }\n\n currentToken = ['comment', css.slice(pos, next + 1), pos, next]\n pos = next\n } else {\n RE_WORD_END.lastIndex = pos + 1\n RE_WORD_END.test(css)\n if (RE_WORD_END.lastIndex === 0) {\n next = css.length - 1\n } else {\n next = RE_WORD_END.lastIndex - 2\n }\n\n currentToken = ['word', css.slice(pos, next + 1), pos, next]\n buffer.push(currentToken)\n pos = next\n }\n\n break\n }\n }\n\n pos++\n return currentToken\n }\n\n function back(token) {\n returned.push(token)\n }\n\n return {\n back,\n endOfFile,\n nextToken,\n position\n }\n}\n"],"names":["SINGLE_QUOTE","charCodeAt","DOUBLE_QUOTE","BACKSLASH","SLASH","NEWLINE","SPACE","FEED","TAB","CR","OPEN_SQUARE","CLOSE_SQUARE","OPEN_PARENTHESES","CLOSE_PARENTHESES","OPEN_CURLY","CLOSE_CURLY","SEMICOLON","ASTERISK","COLON","AT","RE_AT_END","RE_WORD_END","RE_BAD_BRACKET","RE_HEX_ESCAPE","module","exports","tokenizer","input","options","css","valueOf","ignore","ignoreErrors","code","content","escape","next","quote","currentToken","escaped","escapePos","n","prev","length","pos","buffer","returned","position","unclosed","what","error","endOfFile","nextToken","opts","pop","ignoreUnclosed","slice","controlChar","String","fromCharCode","indexOf","test","lastIndex","charAt","push","back","token"],"mappings":"AAEA,MAAMA,eAAe,IAAIC,UAAU,CAAC;AACpC,MAAMC,eAAe,IAAID,UAAU,CAAC;AACpC,MAAME,YAAY,KAAKF,UAAU,CAAC;AAClC,MAAMG,QAAQ,IAAIH,UAAU,CAAC;AAC7B,MAAMI,UAAU,KAAKJ,UAAU,CAAC;AAChC,MAAMK,QAAQ,IAAIL,UAAU,CAAC;AAC7B,MAAMM,OAAO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AAYwC,IAAI,CAAChC;wBACjB,IAAIR,YAAYyC,SAAS,KAAK,GAAG;4BAC/B1B,OAAOP,IAAIc,MAAM,GAAG;wBACtB,OAAO;4BACLP,OAAOf,YAAYyC,SAAS,GAAG;wBACjC;wBAEAxB,eAAe;4BAAC;4BAAQT,IAAI2B,KAAK,CAACZ,KAAKR,OAAO;4BAAIQ;4BAAKR;yBAAK;wBAC5DS,OAAOmB,IAAI,CAAC1B;wBACZM,MAAMR;oBACR;oBAEA;gBACF;QACF;QAEAQ;QACA,OAAON;IACT;IAEA,SAAS2B,KAAKC,KAAK;QACjBpB,SAASkB,IAAI,CAACE;IAChB;IAEA,OAAO;QACLD;QACAd;QACAC;QACAL;IACF;AACF","ignoreList":[0]}}, + {"offset": {"line": 336, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/terminal-highlight.js"],"sourcesContent":["'use strict'\n\nlet pico = require('picocolors')\n\nlet tokenizer = require('./tokenize')\n\nlet Input\n\nfunction registerInput(dependant) {\n Input = dependant\n}\n\nconst HIGHLIGHT_THEME = {\n ';': pico.yellow,\n ':': pico.yellow,\n '(': pico.cyan,\n ')': pico.cyan,\n '[': pico.yellow,\n ']': pico.yellow,\n '{': pico.yellow,\n '}': pico.yellow,\n 'at-word': pico.cyan,\n 'brackets': pico.cyan,\n 'call': pico.cyan,\n 'class': pico.yellow,\n 'comment': pico.gray,\n 'hash': pico.magenta,\n 'string': pico.green\n}\n\nfunction getTokenType([type, value], processor) {\n if (type === 'word') {\n if (value[0] === '.') {\n return 'class'\n }\n if (value[0] === '#') {\n return 'hash'\n }\n }\n\n if (!processor.endOfFile()) {\n let next = processor.nextToken()\n processor.back(next)\n if (next[0] === 'brackets' || next[0] === '(') return 'call'\n }\n\n return type\n}\n\nfunction terminalHighlight(css) {\n let processor = tokenizer(new Input(css), { ignoreErrors: true })\n let result = ''\n while (!processor.endOfFile()) {\n let token = processor.nextToken()\n let color = HIGHLIGHT_THEME[getTokenType(token, processor)]\n if (color) {\n result += token[1]\n .split(/\\r?\\n/)\n .map(i => color(i))\n .join('\\n')\n } else {\n result += token[1]\n }\n }\n return result\n}\n\nterminalHighlight.registerInput = registerInput\n\nmodule.exports = terminalHighlight\n"],"names":["pico","tokenizer","Input","registerInput","dependant","HIGHLIGHT_THEME","yellow","cyan","gray","magenta","green","getTokenType","type","value","processor","endOfFile","next","nextToken","back","terminalHighlight","css","ignoreErrors","result","token","color","split","map","i","join","module","exports"],"mappings":"AAEA,IAAIA;AAEJ,IAAIC;AAEJ,IAAIC;AAEJ,SAASC,cAAcC,SAAS;IAC9BF,QAAQE;AACV;AAEA,MAAMC,kBAAkB;IACtB,KAAKL,KAAKM,MAAM;IAChB,KAAKN,KAAKM,MAAM;IAChB,KAAKN,KAAKO,IAAI;IACd,KAAKP,KAAKO,IAAI;IACd,KAAKP,KAAKM,MAAM;IAChB,KAAKN,KAAKM,MAAM;IAChB,KAAKN,KAAKM,MAAM;IAChB,KAAKN,KAAKM,MAAM;IAChB,WAAWN,KAAKO,IAAI;IACpB,YAAYP,KAAKO,IAAI;IACrB,QAAQP,KAAKO,IAAI;IACjB,SAASP,KAAKM,MAAM;IACpB,WAAWN,KAAKQ,IAAI;IACpB,QAAQR,KAAKS,OAAO;IACpB,UAAUT,KAAKU,KAAK;AACtB;AAEA,SAASC,aAAa,CAACC,MAAMC,MAAM,EAAEC,SAAS;IAC5C,IAAIF,SAAS,QAAQ;QACnB,IAAIC,KAAK,CAAC,EAAE,KAAK,KAAK;YACpB,OAAO;QACT;QACA,IAAIA,KAAK,CAAC,EAAE,KAAK,KAAK;YACpB,OAAO;QACT;IACF;IAEA,IAAI,CAACC,UAAUC,SAAS,IAAI;QAC1B,IAAIC,OAAOF,UAAUG,SAAS;QAC9BH,UAAUI,IAAI,CAACF;QACf,IAAIA,IAAI,CAAC,EAAE,KAAK,cAAcA,IAAI,CAAC,EAAE,KAAK,KAAK,OAAO;IACxD;IAEA,OAAOJ;AACT;AAEA,SAASO,kBAAkBC,GAAG;IAC5B,IAAIN,YAAYb,UAAU,IAAIC,MAAMkB,MAAM;QAAEC,cAAc;IAAK;IAC/D,IAAIC,SAAS;IACb,MAAO,CAACR,UAAUC,SAAS,GAAI;QAC7B,IAAIQ,QAAQT,UAAUG,SAAS;QAC/B,IAAIO,QAAQnB,eAAe,CAACM,aAAaY,OAAOT,WAAW;QAC3D,IAAIU,OAAO;YACTF,UAAUC,KAAK,CAAC,EAAE,CACfE,KAAK,CAAC,SACNC,GAAG,CAACC,CAAAA,IAAKH,MAAMG,IACfC,IAAI,CAAC;QACV,OAAO;YACLN,UAAUC,KAAK,CAAC,EAAE;QACpB;IACF;IACA,OAAOD;AACT;AAEAH,kBAAkBhB,aAAa,GAAGA;AAElC0B,OAAOC,OAAO,GAAGX","ignoreList":[0]}}, + {"offset": {"line": 397, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/css-syntax-error.js"],"sourcesContent":["'use strict'\n\nlet pico = require('picocolors')\n\nlet terminalHighlight = require('./terminal-highlight')\n\nclass CssSyntaxError extends Error {\n constructor(message, line, column, source, file, plugin) {\n super(message)\n this.name = 'CssSyntaxError'\n this.reason = message\n\n if (file) {\n this.file = file\n }\n if (source) {\n this.source = source\n }\n if (plugin) {\n this.plugin = plugin\n }\n if (typeof line !== 'undefined' && typeof column !== 'undefined') {\n if (typeof line === 'number') {\n this.line = line\n this.column = column\n } else {\n this.line = line.line\n this.column = line.column\n this.endLine = column.line\n this.endColumn = column.column\n }\n }\n\n this.setMessage()\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, CssSyntaxError)\n }\n }\n\n setMessage() {\n this.message = this.plugin ? this.plugin + ': ' : ''\n this.message += this.file ? this.file : ''\n if (typeof this.line !== 'undefined') {\n this.message += ':' + this.line + ':' + this.column\n }\n this.message += ': ' + this.reason\n }\n\n showSourceCode(color) {\n if (!this.source) return ''\n\n let css = this.source\n if (color == null) color = pico.isColorSupported\n\n let aside = text => text\n let mark = text => text\n let highlight = text => text\n if (color) {\n let { bold, gray, red } = pico.createColors(true)\n mark = text => bold(red(text))\n aside = text => gray(text)\n if (terminalHighlight) {\n highlight = text => terminalHighlight(text)\n }\n }\n\n let lines = css.split(/\\r?\\n/)\n let start = Math.max(this.line - 3, 0)\n let end = Math.min(this.line + 2, lines.length)\n let maxWidth = String(end).length\n\n return lines\n .slice(start, end)\n .map((line, index) => {\n let number = start + 1 + index\n let gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | '\n if (number === this.line) {\n if (line.length > 160) {\n let padding = 20\n let subLineStart = Math.max(0, this.column - padding)\n let subLineEnd = Math.max(\n this.column + padding,\n this.endColumn + padding\n )\n let subLine = line.slice(subLineStart, subLineEnd)\n\n let spacing =\n aside(gutter.replace(/\\d/g, ' ')) +\n line\n .slice(0, Math.min(this.column - 1, padding - 1))\n .replace(/[^\\t]/g, ' ')\n\n return (\n mark('>') +\n aside(gutter) +\n highlight(subLine) +\n '\\n ' +\n spacing +\n mark('^')\n )\n }\n\n let spacing =\n aside(gutter.replace(/\\d/g, ' ')) +\n line.slice(0, this.column - 1).replace(/[^\\t]/g, ' ')\n\n return (\n mark('>') +\n aside(gutter) +\n highlight(line) +\n '\\n ' +\n spacing +\n mark('^')\n )\n }\n\n return ' ' + aside(gutter) + highlight(line)\n })\n .join('\\n')\n }\n\n toString() {\n let code = this.showSourceCode()\n if (code) {\n code = '\\n\\n' + code + '\\n'\n }\n return this.name + ': ' + this.message + code\n }\n}\n\nmodule.exports = CssSyntaxError\nCssSyntaxError.default = CssSyntaxError\n"],"names":["pico","terminalHighlight","CssSyntaxError","Error","message","line","column","source","file","plugin","name","reason","endLine","endColumn","setMessage","captureStackTrace","showSourceCode","color","css","isColorSupported","aside","text","mark","highlight","bold","gray","red","createColors","lines","split","start","Math","max","end","min","length","maxWidth","String","slice","map","index","number","gutter","padding","subLineStart","subLineEnd","subLine","spacing","replace","join","toString","code","module","exports","default"],"mappings":"AAEA,IAAIA;AAEJ,IAA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G,UAAUzC,KAAKiC,KAAK,CAACM,cAAcC;oBAEvC,IAAIE,UACF3B,MAAMsB,OAAOM,OAAO,CAAC,OAAO,QAC5B3C,KACGiC,KAAK,CAAC,GAAGP,KAAKG,GAAG,CAAC,IAAI,CAAC5B,MAAM,GAAG,GAAGqC,UAAU,IAC7CK,OAAO,CAAC,UAAU;oBAEvB,OACE1B,KAAK,OACLF,MAAMsB,UACNnB,UAAUuB,WACV,QACAC,UACAzB,KAAK;gBAET;gBAEA,IAAIyB,UACF3B,MAAMsB,OAAOM,OAAO,CAAC,OAAO,QAC5B3C,KAAKiC,KAAK,CAAC,GAAG,IAAI,CAAChC,MAAM,GAAG,GAAG0C,OAAO,CAAC,UAAU;gBAEnD,OACE1B,KAAK,OACLF,MAAMsB,UACNnB,UAAUlB,QACV,QACA0C,UACAzB,KAAK;YAET;YAEA,OAAO,MAAMF,MAAMsB,UAAUnB,UAAUlB;QACzC,GACC4C,IAAI,CAAC;IACV;IAEAC,WAAW;QACT,IAAIC,OAAO,IAAI,CAACnC,cAAc;QAC9B,IAAImC,MAAM;YACRA,OAAO,SAASA,OAAO;QACzB;QACA,OAAO,IAAI,CAACzC,IAAI,GAAG,OAAO,IAAI,CAACN,OAAO,GAAG+C;IAC3C;AACF;AAEAC,OAAOC,OAAO,GAAGnD;AACjBA,eAAeoD,OAAO,GAAGpD","ignoreList":[0]}}, + {"offset": {"line": 488, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/stringifier.js"],"sourcesContent":["'use strict'\n\nconst DEFAULT_RAW = {\n after: '\\n',\n beforeClose: '\\n',\n beforeComment: '\\n',\n beforeDecl: '\\n',\n beforeOpen: ' ',\n beforeRule: '\\n',\n colon: ': ',\n commentLeft: ' ',\n commentRight: ' ',\n emptyBody: '',\n indent: ' ',\n semicolon: false\n}\n\nfunction capitalize(str) {\n return str[0].toUpperCase() + str.slice(1)\n}\n\nclass Stringifier {\n constructor(builder) {\n this.builder = builder\n }\n\n atrule(node, semicolon) {\n let name = '@' + node.name\n let params = node.params ? this.rawValue(node, 'params') : ''\n\n if (typeof node.raws.afterName !== 'undefined') {\n name += node.raws.afterName\n } else if (params) {\n name += ' '\n }\n\n if (node.nodes) {\n this.block(node, name + params)\n } else {\n let end = (node.raws.between || '') + (semicolon ? ';' : '')\n this.builder(name + params + end, node)\n }\n }\n\n beforeAfter(node, detect) {\n let value\n if (node.type === 'decl') {\n value = this.raw(node, null, 'beforeDecl')\n } else if (node.type === 'comment') {\n value = this.raw(node, null, 'beforeComment')\n } else if (detect === 'before') {\n value = this.raw(node, null, 'beforeRule')\n } else {\n value = this.raw(node, null, 'beforeClose')\n }\n\n let buf = node.parent\n let depth = 0\n while (buf && buf.type !== 'root') {\n depth += 1\n buf = buf.parent\n }\n\n if (value.includes('\\n')) {\n let indent = this.raw(node, null, 'indent')\n if (indent.length) {\n for (let step = 0; step < depth; step++) value += indent\n }\n }\n\n return value\n }\n\n block(node, start) {\n let between = this.raw(node, 'between', 'beforeOpen')\n this.builder(start + between + '{', node, 'start')\n\n let after\n if (node.nodes && node.nodes.length) {\n this.body(node)\n after = this.raw(node, 'after')\n } else {\n after = this.raw(node, 'after', 'emptyBody')\n }\n\n if (after) this.builder(after)\n this.builder('}', node, 'end')\n }\n\n body(node) {\n let last = node.nodes.length - 1\n while (last > 0) {\n if (node.nodes[last].type !== 'comment') break\n last -= 1\n }\n\n let semicolon = this.raw(node, 'semicolon')\n for (let i = 0; i < node.nodes.length; i++) {\n let child = node.nodes[i]\n let before = this.raw(child, 'before')\n if (before) this.builder(before)\n this.stringify(child, last !== i || semicolon)\n }\n }\n\n comment(node) {\n let left = this.raw(node, 'left', 'commentLeft')\n let right = this.raw(node, 'right', 'commentRight')\n this.builder('/*' + left + node.text + right + '*/', node)\n }\n\n decl(node, semicolon) {\n let between = this.raw(node, 'between', 'colon')\n let string = node.prop + between + this.rawValue(node, 'value')\n\n if (node.important) {\n string += node.raws.important || ' !important'\n }\n\n if (semicolon) string += ';'\n this.builder(string, node)\n }\n\n document(node) {\n this.body(node)\n }\n\n raw(node, own, detect) {\n let value\n if (!detect) detect = own\n\n // Already had\n if (own) {\n value = node.raws[own]\n if (typeof value !== 'undefined') return value\n }\n\n let parent = node.parent\n\n if (detect === 'before') {\n // Hack for first rule in CSS\n if (!parent || (parent.type === 'root' && parent.first === node)) {\n return ''\n }\n\n // `root` nodes in `document` should use only their own raws\n if (parent && parent.type === 'document') {\n return ''\n }\n }\n\n // Floating child without parent\n if (!parent) return DEFAULT_RAW[detect]\n\n // Detect style by other nodes\n let root = node.root()\n if (!root.rawCache) root.rawCache = {}\n if (typeof root.rawCache[detect] !== 'undefined') {\n return root.rawCache[detect]\n }\n\n if (detect === 'before' || detect === 'after') {\n return this.beforeAfter(node, detect)\n } else {\n let method = 'raw' + capitalize(detect)\n if (this[method]) {\n value = this[method](root, node)\n } else {\n root.walk(i => {\n value = i.raws[own]\n if (typeof value !== 'undefined') return false\n })\n }\n }\n\n if (typeof value === 'undefined') value = DEFAULT_RAW[detect]\n\n root.rawCache[detect] = value\n return value\n }\n\n rawBeforeClose(root) {\n let value\n root.walk(i => {\n if (i.nodes && i.nodes.length > 0) {\n if (typeof i.raws.after !== 'undefined') {\n value = i.raws.after\n if (value.includes('\\n')) {\n value = value.replace(/[^\\n]+$/, '')\n }\n return false\n }\n }\n })\n if (value) value = value.replace(/\\S/g, '')\n return value\n }\n\n rawBeforeComment(root, node) {\n let value\n root.walkComments(i => {\n if (typeof i.raws.before !== 'undefined') {\n value = i.raws.before\n if (value.includes('\\n')) {\n value = value.replace(/[^\\n]+$/, '')\n }\n return false\n }\n })\n if (typeof value === 'undefined') {\n value = this.raw(node, null, 'beforeDecl')\n } else if (value) {\n value = value.replace(/\\S/g, '')\n }\n return value\n }\n\n rawBeforeDecl(root, node) {\n let value\n root.walkDecls(i => {\n if (typeof i.raws.before !== 'undefined') {\n value = i.raws.before\n if (value.includes('\\n')) {\n value = value.replace(/[^\\n]+$/, '')\n }\n return false\n }\n })\n if (typeof value === 'undefined') {\n value = this.raw(node, null, 'beforeRule')\n } else if (value) {\n value = value.replace(/\\S/g, '')\n }\n return value\n }\n\n rawBeforeOpen(root) {\n let value\n root.walk(i => {\n if (i.type !== 'decl') {\n value = i.raws.between\n if (typeof value !== 'undefined') return false\n }\n })\n return value\n }\n\n rawBeforeRule(root) {\n let value\n root.walk(i => {\n if (i.nodes && (i.parent !== root || root.first !== i)) {\n if (typeof i.raws.before !== 'undefined') {\n value = i.raws.before\n if (value.includes('\\n')) {\n value = value.replace(/[^\\n]+$/, '')\n }\n return false\n }\n }\n })\n if (value) value = value.replace(/\\S/g, '')\n return value\n }\n\n rawColon(root) {\n let value\n root.walkDecls(i => {\n if (typeof i.raws.between !== 'undefined') {\n value = i.raws.between.replace(/[^\\s:]/g, '')\n return false\n }\n })\n return value\n }\n\n rawEmptyBody(root) {\n let value\n root.walk(i => {\n if (i.nodes && i.nodes.length === 0) {\n value = i.raws.after\n if (typeof value !== 'undefined') return false\n }\n })\n return value\n }\n\n rawIndent(root) {\n if (root.raws.indent) return root.raws.indent\n let value\n root.walk(i => {\n let p = i.parent\n if (p && p !== root && p.parent && p.parent === root) {\n if (typeof i.raws.before !== 'undefined') {\n let parts = i.raws.before.split('\\n')\n value = parts[parts.length - 1]\n value = value.replace(/\\S/g, '')\n return false\n }\n }\n })\n return value\n }\n\n rawSemicolon(root) {\n let value\n root.walk(i => {\n if (i.nodes && i.nodes.length && i.last.type === 'decl') {\n value = i.raws.semicolon\n if (typeof value !== 'undefined') return false\n }\n })\n return value\n }\n\n rawValue(node, prop) {\n let value = node[prop]\n let raw = node.raws[prop]\n if (raw && raw.value === value) {\n return raw.raw\n }\n\n return value\n }\n\n root(node) {\n this.body(node)\n if (node.raws.after) this.builder(node.raws.after)\n }\n\n rule(node) {\n this.block(node, this.rawValue(node, 'selector'))\n if (node.raws.ownSemicolon) {\n this.builder(node.raws.ownSemicolon, node, 'end')\n }\n }\n\n stringify(node, semicolon) {\n /* c8 ignore start */\n if (!this[node.type]) {\n throw new Error(\n 'Unknown AST node type ' +\n node.type +\n '. ' +\n 'Maybe you need to change PostCSS stringifier.'\n )\n }\n /* c8 ignore stop */\n this[node.type](node, semicolon)\n }\n}\n\nmodule.exports = Stringifier\nStringifier.default = Stringifier\n"],"names":["DEFAULT_RAW","after","beforeClose","beforeComment","beforeDecl","beforeOpen","beforeRule","colon","commentLeft","commentRight","emptyBody","indent","semicolon","capitalize","str","toUpperCase","slice","Stringifier","builder","atrule","node","name","params","rawValue","raws","afterName","nodes","block","end","between","beforeAfter","detect","value","type","raw","buf","parent","depth","includes","length","step","start","body","last","i","child","before","stringify","comment","left","right","text","decl","string","prop","important","document","own","first","root","rawCache","method","walk","rawBeforeClose","replace","rawBeforeComment","walkComments","rawBeforeDecl","walkDecls","rawBeforeOpen","rawBeforeRule","rawColon","rawEmptyBody","rawIndent","p","parts","split","rawSemicolon","rule","ownSemicolon","Error","module","exports","default"],"mappings":"AAEA,MAAMA,cAAc;IAClBC,OAAO;IACPC,aAAa;IACbC,eAAe;IACfC,YAAY;IACZC,YAAY;IACZC,YAAY;IACZC,OAAO;IACPC,aAAa;IACbC,cAAc;IACdC,WAAW;IACXC,QAAQ;IACRC,WAAW;AACb;AAEA,SAASC,WAAWC,GAAG;IACrB,OAAOA,GAAG,CAAC,EAAE,CAACC,WAAW,KAAKD,IAAIE,KAAK,CAAC;AAC1C;AAEA,MAAMC;IACJA,YAAYC,OAAO,CAAE;QACnB,IAAI,CAACA,OAAO,GAAGA;IACjB;IAEAC,OAAOC,IAAI,EAAER,SAAS,EAAE;QACtB,IAAIS,OAAO,MAAMD,KAAKC,IAAI;QAC1B,IAAIC,SAASF,KAAKE,MAAM,GAAG,IAAI,CAACC,QAAQ,CAACH,MAAM,YAAY;QAE3D,IAAI,OAAOA,KAAKI,IAAI,CAACC,SAAS,KAAK,aAAa;YAC9CJ,QAAQD,KAAKI,IAAI,CAACC,SAAS;QAC7B,OAAO,IAAIH,QAAQ;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,aAAa,OAAO;YAC3C;QACF;QACA,OAAOA;IACT;IAEAT,SAASH,IAAI,EAAEkC,IAAI,EAAE;QACnB,IAAItB,QAAQZ,IAAI,CAACkC,KAAK;QACtB,IAAIpB,MAAMd,KAAKI,IAAI,CAAC8B,KAAK;QACzB,IAAIpB,OAAOA,IAAIF,KAAK,KAAKA,OAAO;YAC9B,OAAOE,IAAIA,GAAG;QAChB;QAEA,OAAOF;IACT;IAEA2B,KAAKvC,IAAI,EAAE;QACT,IAAI,CAACsB,IAAI,CAACtB;QACV,IAAIA,KAAKI,IAAI,CAACvB,KAAK,EAAE,IAAI,CAACiB,OAAO,CAACE,KAAKI,IAAI,CAACvB,KAAK;IACnD;IAEA6E,KAAK1D,IAAI,EAAE;QACT,IAAI,CAACO,KAAK,CAACP,MAAM,IAAI,CAACG,QAAQ,CAACH,MAAM;QACrC,IAAIA,KAAKI,IAAI,CAACuD,YAAY,EAAE;YAC1B,IAAI,CAAC7D,OAAO,CAACE,KAAKI,IAAI,CAACuD,YAAY,EAAE3D,MAAM;QAC7C;IACF;IAEA2B,UAAU3B,IAAI,EAAER,SAAS,EAAE;QACzB,mBAAmB,GACnB,IAAI,CAAC,IAAI,CAACQ,KAAKa,IAAI,CAAC,EAAE;YACpB,MAAM,IAAI+C,MACR,2BACE5D,KAAKa,IAAI,GACT,OACA;QAEN;QACA,kBAAkB,GAClB,IAAI,CAACb,KAAKa,IAAI,CAAC,CAACb,MAAMR;IACxB;AACF;AAEAqE,OAAOC,OAAO,GAAGjE;AACjBA,YAAYkE,OAAO,GAAGlE","ignoreList":[0]}}, + {"offset": {"line": 792, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/stringify.js"],"sourcesContent":["'use strict'\n\nlet Stringifier = require('./stringifier')\n\nfunction stringify(node, builder) {\n let str = new Stringifier(builder)\n str.stringify(node)\n}\n\nmodule.exports = stringify\nstringify.default = stringify\n"],"names":["Stringifier","stringify","node","builder","str","module","exports","default"],"mappings":"AAEA,IAAIA;AAEJ,SAASC,UAAUC,IAAI,EAAEC,OAAO;IAC9B,IAAIC,MAAM,IAAIJ,YAAYG;IAC1BC,IAAIH,SAAS,CAACC;AAChB;AAEAG,OAAOC,OAAO,GAAGL;AACjBA,UAAUM,OAAO,GAAGN","ignoreList":[0]}}, + {"offset": {"line": 803, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/symbols.js"],"sourcesContent":["'use strict'\n\nmodule.exports.isClean = Symbol('isClean')\n\nmodule.exports.my = Symbol('my')\n"],"names":["module","exports","isClean","Symbol","my"],"mappings":"AAEAA,OAAOC,OAAO,CAACC,OAAO,GAAGC,OAAO;AAEhCH,OAAOC,OAAO,CAACG,EAAE,GAAGD,OAAO","ignoreList":[0]}}, + {"offset": {"line": 809, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/node.js"],"sourcesContent":["'use strict'\n\nlet CssSyntaxError = require('./css-syntax-error')\nlet Stringifier = require('./stringifier')\nlet stringify = require('./stringify')\nlet { isClean, my } = require('./symbols')\n\nfunction cloneNode(obj, parent) {\n let cloned = new obj.constructor()\n\n for (let i in obj) {\n if (!Object.prototype.hasOwnProperty.call(obj, i)) {\n /* c8 ignore next 2 */\n continue\n }\n if (i === 'proxyCache') continue\n let value = obj[i]\n let type = typeof value\n\n if (i === 'parent' && type === 'object') {\n if (parent) cloned[i] = parent\n } else if (i === 'source') {\n cloned[i] = value\n } else if (Array.isArray(value)) {\n cloned[i] = value.map(j => cloneNode(j, cloned))\n } else {\n if (type === 'object' && value !== null) value = cloneNode(value)\n cloned[i] = value\n }\n }\n\n return cloned\n}\n\nfunction sourceOffset(inputCSS, position) {\n // Not all custom syntaxes support `offset` in `source.start` and `source.end`\n if (position && typeof position.offset !== 'undefined') {\n return position.offset\n }\n\n let column = 1\n let line = 1\n let offset = 0\n\n for (let i = 0; i < inputCSS.length; i++) {\n if (line === position.line && column === position.column) {\n offset = i\n break\n }\n\n if (inputCSS[i] === '\\n') {\n column = 1\n line += 1\n } else {\n column += 1\n }\n }\n\n return offset\n}\n\nclass Node {\n get proxyOf() {\n return this\n }\n\n constructor(defaults = {}) {\n this.raws = {}\n this[isClean] = false\n this[my] = true\n\n for (let name in defaults) {\n if (name === 'nodes') {\n this.nodes = []\n for (let node of defaults[name]) {\n if (typeof node.clone === 'function') {\n this.append(node.clone())\n } else {\n this.append(node)\n }\n }\n } else {\n this[name] = defaults[name]\n }\n }\n }\n\n addToError(error) {\n error.postcssNode = this\n if (error.stack && this.source && /\\n\\s{4}at /.test(error.stack)) {\n let s = this.source\n error.stack = error.stack.replace(\n /\\n\\s{4}at /,\n `$&${s.input.from}:${s.start.line}:${s.start.column}$&`\n )\n }\n return error\n }\n\n after(add) {\n this.parent.insertAfter(this, add)\n return this\n }\n\n assign(overrides = {}) {\n for (let name in overrides) {\n this[name] = overrides[name]\n }\n return this\n }\n\n before(add) {\n this.parent.insertBefore(this, add)\n return this\n }\n\n cleanRaws(keepBetween) {\n delete this.raws.before\n delete this.raws.after\n if (!keepBetween) delete this.raws.between\n }\n\n clone(overrides = {}) {\n let cloned = cloneNode(this)\n for (let name in overrides) {\n cloned[name] = overrides[name]\n }\n return cloned\n }\n\n cloneAfter(overrides = {}) {\n let cloned = this.clone(overrides)\n this.parent.insertAfter(this, cloned)\n return cloned\n }\n\n cloneBefore(overrides = {}) {\n let cloned = this.clone(overrides)\n this.parent.insertBefore(this, cloned)\n return cloned\n }\n\n error(message, opts = {}) {\n if (this.source) {\n let { end, start } = this.rangeBy(opts)\n return this.source.input.error(\n message,\n { column: start.column, line: start.line },\n { column: end.column, line: end.line },\n opts\n )\n }\n return new CssSyntaxError(message)\n }\n\n getProxyProcessor() {\n return {\n get(node, prop) {\n if (prop === 'proxyOf') {\n return node\n } else if (prop === 'root') {\n return () => node.root().toProxy()\n } else {\n return node[prop]\n }\n },\n\n set(node, prop, value) {\n if (node[prop] === value) return true\n node[prop] = value\n if (\n prop === 'prop' ||\n prop === 'value' ||\n prop === 'name' ||\n prop === 'params' ||\n prop === 'important' ||\n /* c8 ignore next */\n prop === 'text'\n ) {\n node.markDirty()\n }\n return true\n }\n }\n }\n\n /* c8 ignore next 3 */\n markClean() {\n this[isClean] = true\n }\n\n markDirty() {\n if (this[isClean]) {\n this[isClean] = false\n let next = this\n while ((next = next.parent)) {\n next[isClean] = false\n }\n }\n }\n\n next() {\n if (!this.parent) return undefined\n let index = this.parent.index(this)\n return this.parent.nodes[index + 1]\n }\n\n positionBy(opts = {}) {\n let pos = this.source.start\n if (opts.index) {\n pos = this.positionInside(opts.index)\n } else if (opts.word) {\n let inputString =\n 'document' in this.source.input\n ? this.source.input.document\n : this.source.input.css\n let stringRepresentation = inputString.slice(\n sourceOffset(inputString, this.source.start),\n sourceOffset(inputString, this.source.end)\n )\n let index = stringRepresentation.indexOf(opts.word)\n if (index !== -1) pos = this.positionInside(index)\n }\n return pos\n }\n\n positionInside(index) {\n let column = this.source.start.column\n let line = this.source.start.line\n let inputString =\n 'document' in this.source.input\n ? this.source.input.document\n : this.source.input.css\n let offset = sourceOffset(inputString, this.source.start)\n let end = offset + index\n\n for (let i = offset; i < end; i++) {\n if (inputString[i] === '\\n') {\n column = 1\n line += 1\n } else {\n column += 1\n }\n }\n\n return { column, line, offset: end }\n }\n\n prev() {\n if (!this.parent) return undefined\n let index = this.parent.index(this)\n return this.parent.nodes[index - 1]\n }\n\n rangeBy(opts = {}) {\n let inputString =\n 'document' in this.source.input\n ? this.source.input.document\n : this.source.input.css\n let start = {\n column: this.source.start.column,\n line: this.source.start.line,\n offset: sourceOffset(inputString, this.source.start)\n }\n let end = this.source.end\n ? {\n column: this.source.end.column + 1,\n line: this.source.end.line,\n offset:\n typeof this.source.end.offset === 'number'\n ? // `source.end.offset` is exclusive, so we don't need to add 1\n this.source.end.offset\n : // Since line/column in this.source.end is inclusive,\n // the `sourceOffset(... , this.source.end)` returns an inclusive offset.\n // So, we add 1 to convert it to exclusive.\n sourceOffset(inputString, this.source.end) + 1\n }\n : {\n column: start.column + 1,\n line: start.line,\n offset: start.offset + 1\n }\n\n if (opts.word) {\n let stringRepresentation = inputString.slice(\n sourceOffset(inputString, this.source.start),\n sourceOffset(inputString, this.source.end)\n )\n let index = stringRepresentation.indexOf(opts.word)\n if (index !== -1) {\n start = this.positionInside(index)\n end = this.positionInside(index + opts.word.length)\n }\n } else {\n if (opts.start) {\n start = {\n column: opts.start.column,\n line: opts.start.line,\n offset: sourceOffset(inputString, opts.start)\n }\n } else if (opts.index) {\n start = this.positionInside(opts.index)\n }\n\n if (opts.end) {\n end = {\n column: opts.end.column,\n line: opts.end.line,\n offset: sourceOffset(inputString, opts.end)\n }\n } else if (typeof opts.endIndex === 'number') {\n end = this.positionInside(opts.endIndex)\n } else if (opts.index) {\n end = this.positionInside(opts.index + 1)\n }\n }\n\n if (\n end.line < start.line ||\n (end.line === start.line && end.column <= start.column)\n ) {\n end = {\n column: start.column + 1,\n line: start.line,\n offset: start.offset + 1\n }\n }\n\n return { end, start }\n }\n\n raw(prop, defaultType) {\n let str = new Stringifier()\n return str.raw(this, prop, defaultType)\n }\n\n remove() {\n if (this.parent) {\n this.parent.removeChild(this)\n }\n this.parent = undefined\n return this\n }\n\n replaceWith(...nodes) {\n if (this.parent) {\n let bookmark = this\n let foundSelf = false\n for (let node of nodes) {\n if (node === this) {\n foundSelf = true\n } else if (foundSelf) {\n this.parent.insertAfter(bookmark, node)\n bookmark = node\n } else {\n this.parent.insertBefore(bookmark, node)\n }\n }\n\n if (!foundSelf) {\n this.remove()\n }\n }\n\n return this\n }\n\n root() {\n let result = this\n while (result.parent && result.parent.type !== 'document') {\n result = result.parent\n }\n return result\n }\n\n toJSON(_, inputs) {\n let fixed = {}\n let emitInputs = inputs == null\n inputs = inputs || new Map()\n let inputsNextIndex = 0\n\n for (let name in this) {\n if (!Object.prototype.hasOwnProperty.call(this, name)) {\n /* c8 ignore next 2 */\n continue\n }\n if (name === 'parent' || name === 'proxyCache') continue\n let value = this[name]\n\n if (Array.isArray(value)) {\n fixed[name] = value.map(i => {\n if (typeof i === 'object' && i.toJSON) {\n return i.toJSON(null, inputs)\n } else {\n return i\n }\n })\n } else if (typeof value === 'object' && value.toJSON) {\n fixed[name] = value.toJSON(null, inputs)\n } else if (name === 'source') {\n if (value == null) continue\n let inputId = inputs.get(value.input)\n if (inputId == null) {\n inputId = inputsNextIndex\n inputs.set(value.input, inputsNextIndex)\n inputsNextIndex++\n }\n fixed[name] = {\n end: value.end,\n inputId,\n start: value.start\n }\n } else {\n fixed[name] = value\n }\n }\n\n if (emitInputs) {\n fixed.inputs = [...inputs.keys()].map(input => input.toJSON())\n }\n\n return fixed\n }\n\n toProxy() {\n if (!this.proxyCache) {\n this.proxyCache = new Proxy(this, this.getProxyProcessor())\n }\n return this.proxyCache\n }\n\n toString(stringifier = stringify) {\n if (stringifier.stringify) stringifier = stringifier.stringify\n let result = ''\n stringifier(this, i => {\n result += i\n })\n return result\n }\n\n warn(result, text, opts = {}) {\n let data = { node: this }\n for (let i in opts) data[i] = opts[i]\n return result.warn(text, data)\n }\n}\n\nmodule.exports = Node\nNode.default = Node\n"],"names":["CssSyntaxError","Stringifier","stringify","isClean","my","cloneNode","obj","parent","cloned","i","Object","prototype","hasOwnProperty","call","value","type","Array","isArray","map","j","sourceOffset","inputCSS","position","offset","column","line","length","Node","proxyOf","defaults","raws","name","nodes","node","clone","append","addToError","error","postcssNode","stack","source","test","s","replace","input","from","start","after","add","insertAfter","assign","overrides","before","insertBefore","cleanRaws","keepBetween","between","cloneAfter","cloneBefore","message","opts","end","rangeBy","getProxyProcessor","get","prop","root","toProxy","set","markDirty","markClean","next","undefined","index","positionBy","pos","positionInside","word","inputString","document","css","stringRepresentation","slice","indexOf","prev","endIndex","raw","defaultType","str","remove","removeChild","replaceWith","bookmark","foundSelf","result","toJSON","_","inputs","fixed","emitInputs","Map","inputsNextIndex","inputId","keys","proxyCache","Proxy","toString","stringifier","warn","text","data","module","exports","default"],"mappings":"AAEA,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AS;QACba,YAAY,IAAI,EAAElG,CAAAA;YAChBqF,UAAUrF;QACZ;QACA,OAAOqF;IACT;IAEAc,KAAKd,MAAM,EAAEe,IAAI,EAAEjD,OAAO,CAAC,CAAC,EAAE;QAC5B,IAAIkD,OAAO;YAAE7E,MAAM,IAAI;QAAC;QACxB,IAAK,IAAIxB,KAAKmD,KAAMkD,IAAI,CAACrG,EAAE,GAAGmD,IAAI,CAACnD,EAAE;QACrC,OAAOqF,OAAOc,IAAI,CAACC,MAAMC;IAC3B;AACF;AAEAC,OAAOC,OAAO,GAAGrF;AACjBA,KAAKsF,OAAO,GAAGtF","ignoreList":[0]}}, + {"offset": {"line": 1182, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/comment.js"],"sourcesContent":["'use strict'\n\nlet Node = require('./node')\n\nclass Comment extends Node {\n constructor(defaults) {\n super(defaults)\n this.type = 'comment'\n }\n}\n\nmodule.exports = Comment\nComment.default = Comment\n"],"names":["Node","Comment","defaults","type","module","exports","default"],"mappings":"AAEA,IAAIA;AAEJ,MAAMC,gBAAgBD;IACpBC,YAAYC,QAAQ,CAAE;QACpB,KAAK,CAACA;QACN,IAAI,CAACC,IAAI,GAAG;IACd;AACF;AAEAC,OAAOC,OAAO,GAAGJ;AACjBA,QAAQK,OAAO,GAAGL","ignoreList":[0]}}, + {"offset": {"line": 1195, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/declaration.js"],"sourcesContent":["'use strict'\n\nlet Node = require('./node')\n\nclass Declaration extends Node {\n get variable() {\n return this.prop.startsWith('--') || this.prop[0] === '$'\n }\n\n constructor(defaults) {\n if (\n defaults &&\n typeof defaults.value !== 'undefined' &&\n typeof defaults.value !== 'string'\n ) {\n defaults = { ...defaults, value: String(defaults.value) }\n }\n super(defaults)\n this.type = 'decl'\n }\n}\n\nmodule.exports = Declaration\nDeclaration.default = Declaration\n"],"names":["Node","Declaration","variable","prop","startsWith","defaults","value","String","type","module","exports","default"],"mappings":"AAEA,IAAIA;AAEJ,MAAMC,oBAAoBD;IACxB,IAAIE,WAAW;QACb,OAAO,IAAI,CAACC,IAAI,CAACC,UAAU,CAAC,SAAS,IAAI,CAACD,IAAI,CAAC,EAAE,KAAK;IACxD;IAEAF,YAAYI,QAAQ,CAAE;QACpB,IACEA,YACA,OAAOA,SAASC,KAAK,KAAK,eAC1B,OAAOD,SAASC,KAAK,KAAK,UAC1B;YACAD,WAAW;gBAAE,GAAGA,QAAQ;gBAAEC,OAAOC,OAAOF,SAASC,KAAK;YAAE;QAC1D;QACA,KAAK,CAACD;QACN,IAAI,CAACG,IAAI,GAAG;IACd;AACF;AAEAC,OAAOC,OAAO,GAAGT;AACjBA,YAAYU,OAAO,GAAGV","ignoreList":[0]}}, + {"offset": {"line": 1217, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/container.js"],"sourcesContent":["'use strict'\n\nlet Comment = require('./comment')\nlet Declaration = require('./declaration')\nlet Node = require('./node')\nlet { isClean, my } = require('./symbols')\n\nlet AtRule, parse, Root, Rule\n\nfunction cleanSource(nodes) {\n return nodes.map(i => {\n if (i.nodes) i.nodes = cleanSource(i.nodes)\n delete i.source\n return i\n })\n}\n\nfunction markTreeDirty(node) {\n node[isClean] = false\n if (node.proxyOf.nodes) {\n for (let i of node.proxyOf.nodes) {\n markTreeDirty(i)\n }\n }\n}\n\nclass Container extends Node {\n get first() {\n if (!this.proxyOf.nodes) return undefined\n return this.proxyOf.nodes[0]\n }\n\n get last() {\n if (!this.proxyOf.nodes) return undefined\n return this.proxyOf.nodes[this.proxyOf.nodes.length - 1]\n }\n\n append(...children) {\n for (let child of children) {\n let nodes = this.normalize(child, this.last)\n for (let node of nodes) this.proxyOf.nodes.push(node)\n }\n\n this.markDirty()\n\n return this\n }\n\n cleanRaws(keepBetween) {\n super.cleanRaws(keepBetween)\n if (this.nodes) {\n for (let node of this.nodes) node.cleanRaws(keepBetween)\n }\n }\n\n each(callback) {\n if (!this.proxyOf.nodes) return undefined\n let iterator = this.getIterator()\n\n let index, result\n while (this.indexes[iterator] < this.proxyOf.nodes.length) {\n index = this.indexes[iterator]\n result = callback(this.proxyOf.nodes[index], index)\n if (result === false) break\n\n this.indexes[iterator] += 1\n }\n\n delete this.indexes[iterator]\n return result\n }\n\n every(condition) {\n return this.nodes.every(condition)\n }\n\n getIterator() {\n if (!this.lastEach) this.lastEach = 0\n if (!this.indexes) this.indexes = {}\n\n this.lastEach += 1\n let iterator = this.lastEach\n this.indexes[iterator] = 0\n\n return iterator\n }\n\n getProxyProcessor() {\n return {\n get(node, prop) {\n if (prop === 'proxyOf') {\n return node\n } else if (!node[prop]) {\n return node[prop]\n } else if (\n prop === 'each' ||\n (typeof prop === 'string' && prop.startsWith('walk'))\n ) {\n return (...args) => {\n return node[prop](\n ...args.map(i => {\n if (typeof i === 'function') {\n return (child, index) => i(child.toProxy(), index)\n } else {\n return i\n }\n })\n )\n }\n } else if (prop === 'every' || prop === 'some') {\n return cb => {\n return node[prop]((child, ...other) =>\n cb(child.toProxy(), ...other)\n )\n }\n } else if (prop === 'root') {\n return () => node.root().toProxy()\n } else if (prop === 'nodes') {\n return node.nodes.map(i => i.toProxy())\n } else if (prop === 'first' || prop === 'last') {\n return node[prop].toProxy()\n } else {\n return node[prop]\n }\n },\n\n set(node, prop, value) {\n if (node[prop] === value) return true\n node[prop] = value\n if (prop === 'name' || prop === 'params' || prop === 'selector') {\n node.markDirty()\n }\n return true\n }\n }\n }\n\n index(child) {\n if (typeof child === 'number') return child\n if (child.proxyOf) child = child.proxyOf\n return this.proxyOf.nodes.indexOf(child)\n }\n\n insertAfter(exist, add) {\n let existIndex = this.index(exist)\n let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse()\n existIndex = this.index(exist)\n for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node)\n\n let index\n for (let id in this.indexes) {\n index = this.indexes[id]\n if (existIndex < index) {\n this.indexes[id] = index + nodes.length\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n insertBefore(exist, add) {\n let existIndex = this.index(exist)\n let type = existIndex === 0 ? 'prepend' : false\n let nodes = this.normalize(\n add,\n this.proxyOf.nodes[existIndex],\n type\n ).reverse()\n existIndex = this.index(exist)\n for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node)\n\n let index\n for (let id in this.indexes) {\n index = this.indexes[id]\n if (existIndex <= index) {\n this.indexes[id] = index + nodes.length\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n normalize(nodes, sample) {\n if (typeof nodes === 'string') {\n nodes = cleanSource(parse(nodes).nodes)\n } else if (typeof nodes === 'undefined') {\n nodes = []\n } else if (Array.isArray(nodes)) {\n nodes = nodes.slice(0)\n for (let i of nodes) {\n if (i.parent) i.parent.removeChild(i, 'ignore')\n }\n } else if (nodes.type === 'root' && this.type !== 'document') {\n nodes = nodes.nodes.slice(0)\n for (let i of nodes) {\n if (i.parent) i.parent.removeChild(i, 'ignore')\n }\n } else if (nodes.type) {\n nodes = [nodes]\n } else if (nodes.prop) {\n if (typeof nodes.value === 'undefined') {\n throw new Error('Value field is missed in node creation')\n } else if (typeof nodes.value !== 'string') {\n nodes.value = String(nodes.value)\n }\n nodes = [new Declaration(nodes)]\n } else if (nodes.selector || nodes.selectors) {\n nodes = [new Rule(nodes)]\n } else if (nodes.name) {\n nodes = [new AtRule(nodes)]\n } else if (nodes.text) {\n nodes = [new Comment(nodes)]\n } else {\n throw new Error('Unknown node type in node creation')\n }\n\n let processed = nodes.map(i => {\n /* c8 ignore next */\n if (!i[my]) Container.rebuild(i)\n i = i.proxyOf\n if (i.parent) i.parent.removeChild(i)\n if (i[isClean]) markTreeDirty(i)\n\n if (!i.raws) i.raws = {}\n if (typeof i.raws.before === 'undefined') {\n if (sample && typeof sample.raws.before !== 'undefined') {\n i.raws.before = sample.raws.before.replace(/\\S/g, '')\n }\n }\n i.parent = this.proxyOf\n return i\n })\n\n return processed\n }\n\n prepend(...children) {\n children = children.reverse()\n for (let child of children) {\n let nodes = this.normalize(child, this.first, 'prepend').reverse()\n for (let node of nodes) this.proxyOf.nodes.unshift(node)\n for (let id in this.indexes) {\n this.indexes[id] = this.indexes[id] + nodes.length\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n push(child) {\n child.parent = this\n this.proxyOf.nodes.push(child)\n return this\n }\n\n removeAll() {\n for (let node of this.proxyOf.nodes) node.parent = undefined\n this.proxyOf.nodes = []\n\n this.markDirty()\n\n return this\n }\n\n removeChild(child) {\n child = this.index(child)\n this.proxyOf.nodes[child].parent = undefined\n this.proxyOf.nodes.splice(child, 1)\n\n let index\n for (let id in this.indexes) {\n index = this.indexes[id]\n if (index >= child) {\n this.indexes[id] = index - 1\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n replaceValues(pattern, opts, callback) {\n if (!callback) {\n callback = opts\n opts = {}\n }\n\n this.walkDecls(decl => {\n if (opts.props && !opts.props.includes(decl.prop)) return\n if (opts.fast && !decl.value.includes(opts.fast)) return\n\n decl.value = decl.value.replace(pattern, callback)\n })\n\n this.markDirty()\n\n return this\n }\n\n some(condition) {\n return this.nodes.some(condition)\n }\n\n walk(callback) {\n return this.each((child, i) => {\n let result\n try {\n result = callback(child, i)\n } catch (e) {\n throw child.addToError(e)\n }\n if (result !== false && child.walk) {\n result = child.walk(callback)\n }\n\n return result\n })\n }\n\n walkAtRules(name, callback) {\n if (!callback) {\n callback = name\n return this.walk((child, i) => {\n if (child.type === 'atrule') {\n return callback(child, i)\n }\n })\n }\n if (name instanceof RegExp) {\n return this.walk((child, i) => {\n if (child.type === 'atrule' && name.test(child.name)) {\n return callback(child, i)\n }\n })\n }\n return this.walk((child, i) => {\n if (child.type === 'atrule' && child.name === name) {\n return callback(child, i)\n }\n })\n }\n\n walkComments(callback) {\n return this.walk((child, i) => {\n if (child.type === 'comment') {\n return callback(child, i)\n }\n })\n }\n\n walkDecls(prop, callback) {\n if (!callback) {\n callback = prop\n return this.walk((child, i) => {\n if (child.type === 'decl') {\n return callback(child, i)\n }\n })\n }\n if (prop instanceof RegExp) {\n return this.walk((child, i) => {\n if (child.type === 'decl' && prop.test(child.prop)) {\n return callback(child, i)\n }\n })\n }\n return this.walk((child, i) => {\n if (child.type === 'decl' && child.prop === prop) {\n return callback(child, i)\n }\n })\n }\n\n walkRules(selector, callback) {\n if (!callback) {\n callback = selector\n\n return this.walk((child, i) => {\n if (child.type === 'rule') {\n return callback(child, i)\n }\n })\n }\n if (selector instanceof RegExp) {\n return this.walk((child, i) => {\n if (child.type === 'rule' && selector.test(child.selector)) {\n return callback(child, i)\n }\n })\n }\n return this.walk((child, i) => {\n if (child.type === 'rule' && child.selector === selector) {\n return callback(child, i)\n }\n })\n }\n}\n\nContainer.registerParse = dependant => {\n parse = dependant\n}\n\nContainer.registerRule = dependant => {\n Rule = dependant\n}\n\nContainer.registerAtRule = dependant => {\n AtRule = dependant\n}\n\nContainer.registerRoot = dependant => {\n Root = dependant\n}\n\nmodule.exports = Container\nContainer.default = Container\n\n/* c8 ignore start */\nContainer.rebuild = node => {\n if (node.type === 'atrule') {\n Object.setPrototypeOf(node, AtRule.prototype)\n } else if (node.type === 'rule') {\n Object.setPrototypeOf(node, Rule.prototype)\n } else if (node.type === 'decl') {\n Object.setPrototypeOf(node, Declaration.prototype)\n } else if (node.type === 'comment') {\n Object.setPrototypeOf(node, Comment.prototype)\n } else if (node.type === 'root') {\n Object.setPrototypeOf(node, Root.prototype)\n }\n\n node[my] = true\n\n if (node.nodes) {\n node.nodes.forEach(child => {\n Container.rebuild(child)\n })\n }\n}\n/* c8 ignore stop */\n"],"names":["Comment","Declaration","Node","isClean","my","AtRule","parse","Root","Rule","cleanSource","nodes","map","i","source","markTreeDirty","node","proxyOf","Container","first","undefined","last","length","append","children","child","normalize","push","markDirty","cleanRaws","keepBetween","each","callback","iterator","getIterator","index","result","indexes","every","condition","lastEach","getProxyProcessor","get","prop","startsWith","args","toProxy","cb","other","root","set","value","indexOf","insertAfter","exist","add","existIndex","reverse","splice","id","insertBefore","type","sample","Array","isArray","slice","parent","removeChild","Error","String","selector","selectors","name","text","processed","rebuild","raws","before","replace","prepend","unshift","removeAll","replaceValues","pattern","opts","walkDecls","decl","props","includes","fast","some","walk","e","addToError","walkAtRules","RegExp","test","walkComments","walkRules","registerParse","dependant","registerRule","registerAtRule","registerRoot","module","exports","default","Object","setPrototypeOf","prototype","forEach"],"mappings":"AAEA,IAAIA;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAI,EAAEC,OAAO,EAAEC,EAAE,EAAE;AAEnB,IAAIC,QAAQC,OAAOC,MAAMC;AAEzB,SAASC,YAAYC,KAAK;IACxB,OAAOA,MAAMC,GAAG,CAACC,CAAAA;QACf,IAAIA,EAAEF,KAAK,EAAEE,EAAEF,KAAK,GAAGD,YAAYG,EAAEF,KAAK;QAC1C,OAAOE,EAAEC,MAAM;QACf,OAAOD;IACT;AACF;AAEA,SAASE,cAAcC,IAAI;IACzBA,IAAI,CAACZ,QAAQ,GAAG;IAChB,IAAIY,KAAKC,OAAO,CAACN,KAAK,EAAE;QACtB,KAAK,IAAIE,KAAKG,KAAKC,OAAO,CAACN,KAAK,CAAE;YAChCI,cAAcF;QAChB;IACF;AACF;AAEA,MAAMK,kBAAkBf;IACtB,IAAIgB,QAAQ;QACV,IAAI,CAAC,IAAI,CAACF,OAAO,CAACN,KAAK,EAAE,OAAOS;QAChC,OAAO,IAAI,CAACH,OAAO,CAACN,KAAK,CAAC,EAAE;IAC9B;IAEA,IAAIU,OAAO;QACT,IAAI,CAAC,IAAI,CAACJ,OAAO,CAACN,KAAK,EAAE,OAAOS;QAChC,OAAO,IAAI,CAACH,OAAO,CAACN,KAAK,CAAC,IAAI,CAACM,OAAO,CAACN,KAAK,CAACW,MAAM,GAAG,EAAE;IAC1D;IAEAC,OAAO,GAAGC,QAAQ,EAAE;QAClB,KAAK,IAAIC,SAASD,SAAU;YAC1B,IAAIb,QAAQ,IAAI,CAACe,SAAS,CAACD,OAAO,IAAI,CAAC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ources":["turbopack:///[project]/node_modules/postcss/lib/at-rule.js"],"sourcesContent":["'use strict'\n\nlet Container = require('./container')\n\nclass AtRule extends Container {\n constructor(defaults) {\n super(defaults)\n this.type = 'atrule'\n }\n\n append(...children) {\n if (!this.proxyOf.nodes) this.nodes = []\n return super.append(...children)\n }\n\n prepend(...children) {\n if (!this.proxyOf.nodes) this.nodes = []\n return super.prepend(...children)\n }\n}\n\nmodule.exports = AtRule\nAtRule.default = AtRule\n\nContainer.registerAtRule(AtRule)\n"],"names":["Container","AtRule","defaults","type","append","children","proxyOf","nodes","prepend","module","exports","default","registerAtRule"],"mappings":"AAEA,IAAIA;AAEJ,MAAMC,eAAeD;IACnBC,YAAYC,QAAQ,CAAE;QACpB,KAAK,CAACA;QACN,IAAI,CAACC,IAAI,GAAG;IACd;IAEAC,OAAO,GAAGC,QAAQ,EAAE;QAClB,IAAI,CAAC,IAAI,CAACC,OAAO,CAACC,KAAK,EAAE,IAAI,CAACA,KAAK,GAAG,EAAE;QACxC,OAAO,KAAK,CAACH,UAAUC;IACzB;IAEAG,QAAQ,GAAGH,QAAQ,EAAE;QACnB,IAAI,CAAC,IAAI,CAACC,OAAO,CAACC,KAAK,EAAE,IAAI,CAACA,KAAK,GAAG,EAAE;QACxC,OAAO,KAAK,CAACC,WAAWH;IAC1B;AACF;AAEAI,OAAOC,OAAO,GAAGT;AACjBA,OAAOU,OAAO,GAAGV;AAEjBD,UAAUY,cAAc,CAACX","ignoreList":[0]}}, + {"offset": {"line": 1620, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/document.js"],"sourcesContent":["'use strict'\n\nlet Container = require('./container')\n\nlet LazyResult, Processor\n\nclass Document extends Container {\n constructor(defaults) {\n // type needs to be passed to super, otherwise child roots won't be normalized correctly\n super({ type: 'document', ...defaults })\n\n if (!this.nodes) {\n this.nodes = []\n }\n }\n\n toResult(opts = {}) {\n let lazy = new LazyResult(new Processor(), this, opts)\n\n return lazy.stringify()\n }\n}\n\nDocument.registerLazyResult = dependant => {\n LazyResult = dependant\n}\n\nDocument.registerProcessor = dependant => {\n Processor = dependant\n}\n\nmodule.exports = Document\nDocument.default = Document\n"],"names":["Container","LazyResult","Processor","Document","defaults","type","nodes","toResult","opts","lazy","stringify","registerLazyResult","dependant","registerProcessor","module","exports","default"],"mappings":"AAEA,IAAIA;AAEJ,IAAIC,YAAYC;AAEhB,MAAMC,iBAAiBH;IACrBG,YAAYC,QAAQ,CAAE;QACpB,wFAAwF;QACxF,KAAK,CAAC;YAAEC,MAAM;YAAY,GAAGD,QAAQ;QAAC;QAEtC,IAAI,CAAC,IAAI,CAACE,KAAK,EAAE;YACf,IAAI,CAACA,KAAK,GAAG,EAAE;QACjB;IACF;IAEAC,SAASC,OAAO,CAAC,CAAC,EAAE;QAClB,IAAIC,OAAO,IAAIR,WAAW,IAAIC,aAAa,IAAI,EAAEM;QAEjD,OAAOC,KAAKC,SAAS;IACvB;AACF;AAEAP,SAASQ,kBAAkB,GAAGC,CAAAA;IAC5BX,aAAaW;AACf;AAEAT,SAASU,iBAAiB,GAAGD,CAAAA;IAC3BV,YAAYU;AACd;AAEAE,OAAOC,OAAO,GAAGZ;AACjBA,SAASa,OAAO,GAAGb","ignoreList":[0]}}, + {"offset": {"line": 1649, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/nanoid/non-secure/index.cjs"],"sourcesContent":["// This alphabet uses `A-Za-z0-9_-` symbols.\n// The order of characters is optimized for better gzip and brotli compression.\n// References to the same file (works both for gzip and brotli):\n// `'use`, `andom`, and `rict'`\n// References to the brotli default dictionary:\n// `-26T`, `1983`, `40px`, `75px`, `bush`, `jack`, `mind`, `very`, and `wolf`\nlet urlAlphabet =\n 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\n\nlet customAlphabet = (alphabet, defaultSize = 21) => {\n return (size = defaultSize) => {\n let id = ''\n // A compact alternative for `for (var i = 0; i < step; i++)`.\n let i = size | 0\n while (i--) {\n // `| 0` is more compact and faster than `Math.floor()`.\n id += alphabet[(Math.random() * alphabet.length) | 0]\n }\n return id\n }\n}\n\nlet nanoid = (size = 21) => {\n let id = ''\n // A compact alternative for `for (var i = 0; i < step; i++)`.\n let i = size | 0\n while (i--) {\n // `| 0` is more compact and faster than `Math.floor()`.\n id += urlAlphabet[(Math.random() * 64) | 0]\n }\n return id\n}\n\nmodule.exports = { nanoid, customAlphabet }\n"],"names":["urlAlphabet","customAlphabet","alphabet","defaultSize","size","id","i","Math","random","length","nanoid","module","exports"],"mappings":"AAAA,4CAA4C;AAC5C,+EAA+E;AAC/E,gEAAgE;AAChE,+BAA+B;AAC/B,+CAA+C;AAC/C,6EAA6E;AAC7E,IAAIA,cACF;AAEF,IAAIC,iBAAiB,CAACC,UAAUC,cAAc,EAAE;IAC9C,OAAO,CAACC,OAAOD,WAAW;QACxB,IAAIE,KAAK;QACT,8DAA8D;QAC9D,IAAIC,IAAIF,OAAO;QACf,MAAOE,IAAK;YACV,wDAAwD;YACxDD,MAAMH,QAAQ,CAAC,AAACK,KAAKC,MAAM,KAAKN,SAASO,MAAM,GAAI,EAAE;QACvD;QACA,OAAOJ;IACT;AACF;AAEA,IAAIK,SAAS,CAACN,OAAO,EAAE;IACrB,IAAIC,KAAK;IACT,8DAA8D;IAC9D,IAAIC,IAAIF,OAAO;IACf,MAAOE,IAAK;QACV,wDAAwD;QACxDD,MAAML,WAAW,CAAC,AAACO,KAAKC,MAAM,KAAK,KAAM,EAAE;IAC7C;IACA,OAAOH;AACT;AAEAM,OAAOC,OAAO,GAAG;IAAEF;IAAQT;AAAe","ignoreList":[0]}}, + {"offset": {"line": 1685, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/source-map-js/lib/base64.js"],"sourcesContent":["/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n};\n"],"names":["intToCharMap","split","exports","encode","number","length","TypeError","decode","charCode","bigA","bigZ","littleA","littleZ","zero","nine","plus","slash","littleOffset","numberOffset"],"mappings":"AAAA,yCAAyC,GACzC;;;;CAIC,GAED,IAAIA,eAAe,mEAAmEC,KAAK,CAAC;AAE5F;;CAEC,GACDC,QAAQC,MAAM,GAAG,SAAUC,MAAM;IAC/B,IAAI,KAAKA,UAAUA,SAASJ,aAAaK,MAAM,EAAE;QAC/C,OAAOL,YAAY,CAACI,OAAO;IAC7B;IACA,MAAM,IAAIE,UAAU,+BAA+BF;AACrD;AAEA;;;CAGC,GACDF,QAAQK,MAAM,GAAG,SAAUC,QAAQ;IACjC,IAAIC,OAAO,IAAQ,MAAM;IACzB,IAAIC,OAAO,IAAQ,MAAM;IAEzB,IAAIC,UAAU,IAAK,MAAM;IACzB,IAAIC,UAAU,KAAK,MAAM;IAEzB,IAAIC,OAAO,IAAQ,MAAM;IACzB,IAAIC,OAAO,IAAQ,MAAM;IAEzB,IAAIC,OAAO,IAAQ,MAAM;IACzB,IAAIC,QAAQ,IAAO,MAAM;IAEzB,IAAIC,eAAe;IACnB,IAAIC,eAAe;IAEnB,qCAAqC;IACrC,IAAIT,QAAQD,YAAYA,YAAYE,MAAM;QACxC,OAAQF,WAAWC;IACrB;IAEA,sCAAsC;IACtC,IAAIE,WAAWH,YAAYA,YAAYI,SAAS;QAC9C,OAAQJ,WAAWG,UAAUM;IAC/B;IAEA,sBAAsB;IACtB,IAAIJ,QAAQL,YAAYA,YAAYM,MAAM;QACxC,OAAQN,WAAWK,OAAOK;IAC5B;IAEA,QAAQ;IACR,IAAIV,YAAYO,MAAM;QACpB,OAAO;IACT;IAEA,QAAQ;IACR,IAAIP,YAAYQ,OAAO;QACrB,OAAO;IACT;IAEA,wBAAwB;IACxB,OAAO,CAAC;AACV","ignoreList":[0]}}, + {"offset": {"line": 1738, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/source-map-js/lib/base64-vlq.js"],"sourcesContent":["/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n};\n"],"names":["base64","VLQ_BASE_SHIFT","VLQ_BASE","VLQ_BASE_MASK","VLQ_CONTINUATION_BIT","toVLQSigned","aValue","fromVLQSigned","isNegative","shifted","exports","encode","base64VLQ_encode","encoded","digit","vlq","decode","base64VLQ_decode","aStr","aIndex","aOutParam","strLen","length","result","shift","continuation","Error","charCodeAt","charAt","value","rest"],"mappings":"AAAA,yCAAyC,GACzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCC,GAED,IAAIA;AAEJ,8EAA8E;AAC9E,8EAA8E;AAC9E,kEAAkE;AAClE,yEAAyE;AACzE,6CAA6C;AAC7C,EAAE;AACF,iBAAiB;AACjB,cAAc;AACd,WAAW;AACX,WAAW;AACX,WAAW;AAEX,IAAIC,iBAAiB;AAErB,iBAAiB;AACjB,IAAIC,WAAW,KAAKD;AAEpB,iBAAiB;AACjB,IAAIE,gBAAgBD,WAAW;AAE/B,iBAAiB;AACjB,IAAIE,uBAAuBF;AAE3B;;;;;CAKC,GACD,SAASG,YAAYC,MAAM;IACzB,OAAOA,SAAS,IACZ,CAAC,AAAC,CAACA,UAAW,CAAC,IAAI,IACnB,CAACA,UAAU,CAAC,IAAI;AACtB;AAEA;;;;;CAKC,GACD,SAASC,cAAcD,MAAM;IAC3B,IAAIE,aAAa,CAACF,SAAS,CAAC,MAAM;IAClC,IAAIG,UAAUH,UAAU;IACxB,OAAOE,aACH,CAACC,UACDA;AACN;AAEA;;CAEC,GACDC,QAAQC,MAAM,GAAG,SAASC,iBAAiBN,MAAM;IAC/C,IAAIO,UAAU;IACd,IAAIC;IAEJ,IAAIC,MAAMV,YAAYC;IAEtB,GAAG;QACDQ,QAAQC,MAAMZ;QACdY,SAASd;QACT,IAAIc,MAAM,GAAG;YACX,sEAAsE;YACtE,8BAA8B;YAC9BD,SAASV;QACX;QACAS,WAAWb,OAAOW,MAAM,CAACG;IAC3B,QAASC,MAAM,EAAG;IAElB,OAAOF;AACT;AAEA;;;CAGC,GACDH,QAAQM,MAAM,GAAG,SAASC,iBAAiBC,IAAI,EAAEC,MAAM,EAAEC,SAAS;IAChE,IAAIC,SAASH,KAAKI,MAAM;IACxB,IAAIC,SAAS;IACb,IAAIC,QAAQ;IACZ,IAAIC,cAAcX;IAElB,GAAG;QACD,IAAIK,UAAUE,QAAQ;YACpB,MAAM,IAAIK,MAAM;QAClB;QAEAZ,QAAQd,OAAOgB,MAAM,CAACE,KAAKS,UAAU,CAACR;QACtC,IAAIL,UAAU,CAAC,GAAG;YAChB,MAAM,IAAIY,MAAM,2BAA2BR,KAAKU,MAAM,CAACT,SAAS;QAClE;QAEAM,eAAe,CAAC,CAAC,CAACX,QAAQV,oBAAoB;QAC9CU,SAASX;QACToB,SAASA,SAAS,CAACT,SAASU,KAAK;QACjCA,SAASvB;IACX,QAASwB,aAAc;IAEvBL,UAAUS,KAAK,GAAGtB,cAAcgB;IAChCH,UAAUU,IAAI,GAAGX;AACnB","ignoreList":[0]}}, + {"offset": {"line": 1854, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/source-map-js/lib/util.js"],"sourcesContent":["/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n}\nexports.urlGenerate = urlGenerate;\n\nvar MAX_CACHED_INPUTS = 32;\n\n/**\n * Takes some function `f(input) -> result` and returns a memoized version of\n * `f`.\n *\n * We keep at most `MAX_CACHED_INPUTS` memoized results of `f` alive. The\n * memoization is a dumb-simple, linear least-recently-used cache.\n */\nfunction lruMemoize(f) {\n var cache = [];\n\n return function(input) {\n for (var i = 0; i < cache.length; i++) {\n if (cache[i].input === input) {\n var temp = cache[0];\n cache[0] = cache[i];\n cache[i] = temp;\n return cache[0].result;\n }\n }\n\n var result = f(input);\n\n cache.unshift({\n input,\n result,\n });\n\n if (cache.length > MAX_CACHED_INPUTS) {\n cache.pop();\n }\n\n return result;\n };\n}\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nvar normalize = lruMemoize(function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n // Split the path into parts between `/` characters. This is much faster than\n // using `.split(/\\/+/g)`.\n var parts = [];\n var start = 0;\n var i = 0;\n while (true) {\n start = i;\n i = path.indexOf(\"/\", start);\n if (i === -1) {\n parts.push(path.slice(start));\n break;\n } else {\n parts.push(path.slice(start, i));\n while (i < path.length && path[i] === \"/\") {\n i++;\n }\n }\n }\n\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n});\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || urlRegexp.test(aPath);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n var obj = Object.create(null);\n return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n if (isProtoString(aStr)) {\n return '$' + aStr;\n }\n\n return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n if (isProtoString(aStr)) {\n return aStr.slice(1);\n }\n\n return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n if (!s) {\n return false;\n }\n\n var length = s.length;\n\n if (length < 9 /* \"__proto__\".length */) {\n return false;\n }\n\n if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n s.charCodeAt(length - 9) !== 95 /* '_' */) {\n return false;\n }\n\n for (var i = length - 10; i >= 0; i--) {\n if (s.charCodeAt(i) !== 36 /* '$' */) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\nfunction compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) {\n var cmp\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine;\n\nfunction strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 === null) {\n return 1; // aStr2 !== null\n }\n\n if (aStr2 === null) {\n return -1; // aStr1 !== null\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n/**\n * Strip any JSON XSSI avoidance prefix from the string (as documented\n * in the source maps specification), and then parse the string as\n * JSON.\n */\nfunction parseSourceMapInput(str) {\n return JSON.parse(str.replace(/^\\)]}'[^\\n]*\\n/, ''));\n}\nexports.parseSourceMapInput = parseSourceMapInput;\n\n/**\n * Compute the URL of a source given the the source root, the source's\n * URL, and the source map's URL.\n */\nfunction computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {\n sourceURL = sourceURL || '';\n\n if (sourceRoot) {\n // This follows what Chrome does.\n if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {\n sourceRoot += '/';\n }\n // The spec says:\n // Line 4: An optional source root, useful for relocating source\n // files on a server or removing repeated values in the\n // “sources” entry. This value is prepended to the individual\n // entries in the “source” field.\n sourceURL = sourceRoot + sourceURL;\n }\n\n // Historically, SourceMapConsumer did not take the sourceMapURL as\n // a parameter. This mode is still somewhat supported, which is why\n // this code block is conditional. However, it's preferable to pass\n // the source map URL to SourceMapConsumer, so that this function\n // can implement the source URL resolution algorithm as outlined in\n // the spec. This block is basically the equivalent of:\n // new URL(sourceURL, sourceMapURL).toString()\n // ... except it avoids using URL, which wasn't available in the\n // older releases of node still supported by this library.\n //\n // The spec says:\n // If the sources are not absolute URLs after prepending of the\n // “sourceRoot”, the sources are resolved relative to the\n // SourceMap (like resolving script src in a html document).\n if (sourceMapURL) {\n var parsed = urlParse(sourceMapURL);\n if (!parsed) {\n throw new Error(\"sourceMapURL could not be parsed\");\n }\n if (parsed.path) {\n // Strip the last path component, but keep the \"/\".\n var index = parsed.path.lastIndexOf('/');\n if (index >= 0) {\n parsed.path = parsed.path.substring(0, index + 1);\n }\n }\n sourceURL = join(urlGenerate(parsed), sourceURL);\n }\n\n return normalize(sourceURL);\n}\nexports.computeSourceURL = computeSourceURL;\n"],"names":["getArg","aArgs","aName","aDefaultValue","arguments","length","Error","exports","urlRegexp","dataUrlRegexp","urlParse","aUrl","match","scheme","auth","host","port","path","urlGenerate","aParsedUrl","url","MAX_CACHED_INPUTS","lruMemoize","f","cache","input","i","temp","result","unshift","pop","normalize","aPath","isAbsolute","parts","start","indexOf","push","slice","part","up","splice","join","aRoot","aPathUrl","aRootUrl","joined","charAt","replace","test","relative","level","index","lastIndexOf","Array","substr","supportsNullProto","obj","Object","create","identity","s","toSetString","aStr","isProtoString","fromSetString","charCodeAt","compareByOriginalPositions","mappingA","mappingB","onlyCompareOriginal","cmp","strcmp","source","originalLine","originalColumn","generatedColumn","generatedLine","name","compareByOriginalPositionsNoSource","compareByGeneratedPositionsDeflated","onlyCompareGenerated","compareByGeneratedPositionsDeflatedNoLine","aStr1","aStr2","compareByGeneratedPositionsInflated","parseSourceMapInput","str","JSON","parse","computeSourceURL","sourceRoot","sourceURL","sourceMapURL","parsed","substring"],"mappings":"AAAA,yCAAyC,GACzC;;;;CAIC,GAED;;;;;;;;;CASC,GACD,SAASA,OAAOC,KAAK,EAAEC,KAAK,EAAEC,aAAa;IACzC,IAAID,SAASD,OAAO;QAClB,OAAOA,KAAK,CAACC,MAAM;IACrB,OAAO,IAAIE,UAAUC,MAAM,KAAK,GAAG;QACjC,OAAOF;IACT,OAAO;QACL,MAAM,IAAIG,MAAM,MAAMJ,QAAQ;IAChC;AACF;AACAK,QAAQP,MAAM,GAAGA;AAEjB,IAAIQ,YAAY;AAChB,IAAIC,gBAAgB;AAEpB,SAASC,SAASC,IAAI;IACpB,IAAIC,QAAQD,KAAKC,KAAK,CAACJ;IACvB,IAAI,CAACI,OAAO;QACV,OAAO;IACT;IACA,OAAO;QACLC,QAAQD,KAAK,CAAC,EAAE;QAChBE,MAAMF,KAAK,CAAC,EAAE;QACdG,MAAMH,KAAK,CAAC,EAAE;QACdI,MAAMJ,KAAK,CAAC,EAAE;QACdK,MAAML,KAAK,CAAC,EAAE;IAChB;AACF;AACAL,QAAQG,QAAQ,GAAGA;AAEnB,SAASQ,YAAYC,UAAU;IAC7B,IAAIC,MAAM;IACV,IAAID,WAAWN,MAAM,EAAE;QACrBO,OAAOD,WAAWN,MAAM,GAAG;IAC7B;IACAO,OAAO;IACP,IAAID,WAAWL,IAAI,EAAE;QACnBM,OAAOD,WAAWL,IAAI,GAAG;IAC3B;IACA,IAAIK,WAAWJ,IAAI,EAAE;QACnBK,OAAOD,WAAWJ,IAAI;IACxB;IACA,IAAII,WAAWH,IAAI,EAAE;QACnBI,OAAO,MAAMD,WAAWH,IAAI;IAC9B;IACA,IAAIG,WAAWF,IAAI,EAAE;QACnBG,OAAOD,WAAWF,IAAI;IACxB;IACA,OAAOG;AACT;AACAb,QAAQW,WAAW,GAAGA;AAEtB,IAAIG,oBAAoB;AAExB;;;;;;CAMC,GACD,SAASC,WAAWC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iE;IACjE,mEAAmE;IACnE,wDAAwD;IACxD,iDAAiD;IACjD,gEAAgE;IAChE,0DAA0D;IAC1D,EAAE;IACF,iBAAiB;IACjB,iEAAiE;IACjE,2DAA2D;IAC3D,8DAA8D;IAC9D,IAAIC,cAAc;QAChB,IAAIC,SAASpF,SAASmF;QACtB,IAAI,CAACC,QAAQ;YACX,MAAM,IAAIxF,MAAM;QAClB;QACA,IAAIwF,OAAO7E,IAAI,EAAE;YACf,mDAAmD;YACnD,IAAImC,QAAQ0C,OAAO7E,IAAI,CAACoC,WAAW,CAAC;YACpC,IAAID,SAAS,GAAG;gBACd0C,OAAO7E,IAAI,GAAG6E,OAAO7E,IAAI,CAAC8E,SAAS,CAAC,GAAG3C,QAAQ;YACjD;QACF;QACAwC,YAAYlD,KAAKxB,YAAY4E,SAASF;IACxC;IAEA,OAAO7D,UAAU6D;AACnB;AACArF,QAAQmF,gBAAgB,GAAGA","ignoreList":[0]}}, + {"offset": {"line": 2349, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/source-map-js/lib/array-set.js"],"sourcesContent":["/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\nvar hasNativeMap = typeof Map !== \"undefined\";\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n this._array = [];\n this._set = hasNativeMap ? new Map() : Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n if (hasNativeMap) {\n this._set.set(aStr, idx);\n } else {\n this._set[sStr] = idx;\n }\n }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n if (hasNativeMap) {\n return this._set.has(aStr);\n } else {\n var sStr = util.toSetString(aStr);\n return has.call(this._set, sStr);\n }\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n if (hasNativeMap) {\n var idx = this._set.get(aStr);\n if (idx >= 0) {\n return idx;\n }\n } else {\n var sStr = util.toSetString(aStr);\n if (has.call(this._set, sStr)) {\n return this._set[sStr];\n }\n }\n\n throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n"],"names":["util","has","Object","prototype","hasOwnProperty","hasNativeMap","Map","ArraySet","_array","_set","create","fromArray","ArraySet_fromArray","aArray","aAllowDuplicates","set","i","len","length","add","size","ArraySet_size","getOwnPropertyNames","ArraySet_add","aStr","sStr","toSetString","isDuplicate","call","idx","push","ArraySet_has","indexOf","ArraySet_indexOf","get","Error","at","ArraySet_at","aIdx","toArray","ArraySet_toArray","slice","exports"],"mappings":"AAAA,yCAAyC,GACzC;;;;CAIC,GAED,IAAIA;AACJ,IAAIC,MAAMC,OAAOC,SAAS,CAACC,cAAc;AACzC,IAAIC,eAAe,OAAOC,QAAQ;AAElC;;;;;CAKC,GACD,SAASC;IACP,IAAI,CAACC,MAAM,GAAG,EAAE;IAChB,IAAI,CAACC,IAAI,GAAGJ,eAAe,IAAIC,QAAQJ,OAAOQ,MAAM,CAAC;AACvD;AAEA;;CAEC,GACDH,SAASI,SAAS,GAAG,SAASC,mBAAmBC,MAAM,EAAEC,gBAAgB;IACvE,IAAIC,MAAM,IAAIR;IACd,IAAK,IAAIS,IAAI,GAAGC,MAAMJ,OAAOK,MAAM,EAAEF,IAAIC,KAAKD,IAAK;QACjDD,IAAII,GAAG,CAACN,MAAM,CAACG,EAAE,EAAEF;IACrB;IACA,OAAOC;AACT;AAEA;;;;;CAKC,GACDR,SAASJ,SAAS,CAACiB,IAAI,GAAG,SAASC;IACjC,OAAOhB,eAAe,IAAI,CAACI,IAAI,CAACW,IAAI,GAAGlB,OAAOoB,mBAAmB,CAAC,IAAI,CAACb,IAAI,EAAES,MAAM;AACrF;AAEA;;;;CAIC,GACDX,SAASJ,SAAS,CAACgB,GAAG,GAAG,SAASI,aAAaC,IAAI,EAAEV,gBAAgB;IACnE,IAAIW,OAAOpB,eAAemB,OAAOxB,KAAK0B,WAAW,CAACF;IAClD,IAAIG,cAActB,eAAe,IAAI,CAACJ,GAAG,CAACuB,QAAQvB,IAAI2B,IAAI,CAAC,IAAI,CAACnB,IAAI,EAAEgB;IACtE,IAAII,MAAM,IAAI,CAACrB,MAAM,CAACU,MAAM;IAC5B,IAAI,CAAC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ACpC,OAAO,IAAI,CAAChC,MAAM,CAACiC,KAAK;AAC1B;AAEAC,QAAQnC,QAAQ,GAAGA","ignoreList":[0]}}, + {"offset": {"line": 2452, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/source-map-js/lib/mapping-list.js"],"sourcesContent":["/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n};\n\nexports.MappingList = MappingList;\n"],"names":["util","generatedPositionAfter","mappingA","mappingB","lineA","generatedLine","lineB","columnA","generatedColumn","columnB","compareByGeneratedPositionsInflated","MappingList","_array","_sorted","_last","prototype","unsortedForEach","MappingList_forEach","aCallback","aThisArg","forEach","add","MappingList_add","aMapping","push","toArray","MappingList_toArray","sort","exports"],"mappings":"AAAA,yCAAyC,GACzC;;;;CAIC,GAED,IAAIA;AAEJ;;;CAGC,GACD,SAASC,uBAAuBC,QAAQ,EAAEC,QAAQ;IAChD,iCAAiC;IACjC,IAAIC,QAAQF,SAASG,aAAa;IAClC,IAAIC,QAAQH,SAASE,aAAa;IAClC,IAAIE,UAAUL,SAASM,eAAe;IACtC,IAAIC,UAAUN,SAASK,eAAe;IACtC,OAAOF,QAAQF,SAASE,SAASF,SAASK,WAAWF,WAC9CP,KAAKU,mCAAmC,CAACR,UAAUC,aAAa;AACzE;AAEA;;;;CAIC,GACD,SAASQ;IACP,IAAI,CAACC,MAAM,GAAG,EAAE;IAChB,IAAI,CAACC,OAAO,GAAG;IACf,oBAAoB;IACpB,IAAI,CAACC,KAAK,GAAG;QAACT,eAAe,CAAC;QAAGG,iBAAiB;IAAC;AACrD;AAEA;;;;;CAKC,GACDG,YAAYI,SAAS,CAACC,eAAe,GACnC,SAASC,oBAAoBC,SAAS,EAAEC,QAAQ;IAC9C,IAAI,CAACP,MAAM,CAACQ,OAAO,CAACF,WAAWC;AACjC;AAEF;;;;CAIC,GACDR,YAAYI,SAAS,CAACM,GAAG,GAAG,SAASC,gBAAgBC,QAAQ;IAC3D,IAAItB,uBAAuB,IAAI,CAACa,KAAK,EAAES,WAAW;QAChD,IAAI,CAACT,KAAK,GAAGS;QACb,IAAI,CAACX,MAAM,CAACY,IAAI,CAACD;IACnB,OAAO;QACL,IAAI,CAACV,OAAO,GAAG;QACf,IAAI,CAACD,MAAM,CAACY,IAAI,CAACD;IACnB;AACF;AAEA;;;;;;;;CAQC,GACDZ,YAAYI,SAAS,CAACU,OAAO,GAAG,SAASC;IACvC,IAAI,CAAC,IAAI,CAACb,OAAO,EAAE;QACjB,IAAI,CAACD,MAAM,CAACe,IAAI,CAAC3B,KAAKU,mCAAmC;QACzD,IAAI,CAACG,OAAO,GAAG;IACjB;IACA,OAAO,IAAI,CAACD,MAAM;AACpB;AAEAgB,QAAQjB,WAAW,GAAGA","ignoreList":[0]}}, + {"offset": {"line": 2521, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/source-map-js/lib/source-map-generator.js"],"sourcesContent":["/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._ignoreInvalidMapping = util.getArg(aArgs, 'ignoreInvalidMapping', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer, generatorOps) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator(Object.assign(generatorOps || {}, {\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n }));\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var sourceRelative = sourceFile;\n if (sourceRoot !== null) {\n sourceRelative = util.relative(sourceRoot, sourceFile);\n }\n\n if (!generator._sources.has(sourceRelative)) {\n generator._sources.add(sourceRelative);\n }\n\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n if (this._validateMapping(generated, original, source, name) === false) {\n return;\n }\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = Object.create(null);\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n // When aOriginal is truthy but has empty values for .line and .column,\n // it is most likely a programmer error. In this case we throw a very\n // specific error message to try to guide them the right way.\n // For example: https://github.com/Polymer/polymer-bundler/pull/519\n if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n var message = 'original.line and original.column are not numbers -- you probably meant to omit ' +\n 'the original mapping entirely and only map the generated position. If so, pass ' +\n 'null for the original mapping instead of an object with empty or null values.'\n\n if (this._ignoreInvalidMapping) {\n if (typeof console !== 'undefined' && console.warn) {\n console.warn(message);\n }\n return false;\n } else {\n throw new Error(message);\n }\n }\n\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n var message = 'Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n });\n\n if (this._ignoreInvalidMapping) {\n if (typeof console !== 'undefined' && console.warn) {\n console.warn(message);\n }\n return false;\n } else {\n throw new Error(message)\n }\n }\n };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var next;\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n next = ''\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n next += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n next += ',';\n }\n }\n\n next += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n next += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n next += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n next += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n next += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n\n result += next;\n }\n\n return result;\n };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n"],"names":["base64VLQ","util","ArraySet","MappingList","SourceMapGenerator","aArgs","_file","getArg","_sourceRoot","_skipValidation","_ignoreInvalidMapping","_sources","_names","_mappings","_sourcesContents","prototype","_version","fromSourceMap","SourceMapGenerator_fromSourceMap","aSourceMapConsumer","generatorOps","sourceRoot","generator","Object","assign","file","eachMapping","mapping","newMapping","generated","line","generatedLine","column","generatedColumn","source","relative","original","originalLine","originalColumn","name","addMapping","sources","forEach","sourceFile","sourceRelative","has","add","content","sourceContentFor","setSourceContent","SourceMapGenerator_addMapping","_validateMapping","String","SourceMapGenerator_setSourceContent","aSourceFile","aSourceContent","create","toSetString","keys","length","applySourceMap","SourceMapGenerator_applySourceMap","aSourceMapPath","Error","newSources","newNames","unsortedForEach","originalPositionFor","join","SourceMapGenerator_validateMapping","aGenerated","aOriginal","aSource","aName","message","console","warn","JSON","stringify","_serializeMappings","SourceMapGenerator_serializeMappings","previousGeneratedColumn","previousGeneratedLine","previousOriginalColumn","previousOriginalLine","previousName","previousSource","result","next","nameIdx","sourceIdx","mappings","toArray","i","len","compareByGeneratedPositionsInflated","encode","indexOf","_generateSourcesContent","SourceMapGenerator_generateSourcesContent","aSources","aSourceRoot","map","key","hasOwnProperty","call","toJSON","SourceMapGenerator_toJSON","version","names","sourcesContent","toString","SourceMapGenerator_toString","exports"],"mappings":"AAAA,yCAAyC,GACzC;;;;CAIC,GAED,IAAIA;AACJ,IAAIC;AACJ,IAAIC,WAAW,wGAAuBA,QAAQ;AAC9C,IAAIC,cAAc,2GAA0BA,WAAW;AAEvD;;;;;;;CAOC,GACD,SAASC,mBAAmBC,KAAK;IAC/B,IAAI,CAACA,OAAO;QACVA,QAAQ,CAAC;IACX;IACA,IAAI,CAACC,KAAK,GAAGL,KAAKM,MAAM,CAACF,OAAO,QAAQ;IACxC,IAAI,CAACG,WAAW,GAAGP,KAAKM,MAAM,CAACF,OAAO,cAAc;IACpD,IAAI,CAACI,eAAe,GAAGR,KAAKM,MAAM,CAACF,OAAO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AAK,IAAI,MAAM;QACtBgG,IAAI7E,IAAI,GAAG,IAAI,CAACnB,KAAK;IACvB;IACA,IAAI,IAAI,CAACE,WAAW,IAAI,MAAM;QAC5B8F,IAAIjF,UAAU,GAAG,IAAI,CAACb,WAAW;IACnC;IACA,IAAI,IAAI,CAACM,gBAAgB,EAAE;QACzBwF,IAAIQ,cAAc,GAAG,IAAI,CAACZ,uBAAuB,CAACI,IAAI7D,OAAO,EAAE6D,IAAIjF,UAAU;IAC/E;IAEA,OAAOiF;AACT;AAEF;;CAEC,GACDlG,mBAAmBW,SAAS,CAACgG,QAAQ,GACnC,SAASC;IACP,OAAOnC,KAAKC,SAAS,CAAC,IAAI,CAAC4B,MAAM;AACnC;AAEFO,QAAQ7G,kBAAkB,GAAGA","ignoreList":[0]}}, + {"offset": {"line": 2886, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/source-map-js/lib/binary-search.js"],"sourcesContent":["/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n"],"names":["exports","GREATEST_LOWER_BOUND","LEAST_UPPER_BOUND","recursiveSearch","aLow","aHigh","aNeedle","aHaystack","aCompare","aBias","mid","Math","floor","cmp","length","search","index"],"mappings":"AAAA,yCAAyC,GACzC;;;;CAIC,GAEDA,QAAQC,oBAAoB,GAAG;AAC/BD,QAAQE,iBAAiB,GAAG;AAE5B;;;;;;;;;;;;CAYC,GACD,SAASC,gBAAgBC,IAAI,EAAEC,KAAK,EAAEC,OAAO,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,KAAK;IACvE,8DAA8D;IAC9D,EAAE;IACF,qDAAqD;IACrD,EAAE;IACF,yEAAyE;IACzE,iCAAiC;IACjC,EAAE;IACF,uEAAuE;IACvE,mEAAmE;IACnE,IAAIC,MAAMC,KAAKC,KAAK,CAAC,CAACP,QAAQD,IAAI,IAAI,KAAKA;IAC3C,IAAIS,MAAML,SAASF,SAASC,SAAS,CAACG,IAAI,EAAE;IAC5C,IAAIG,QAAQ,GAAG;QACb,wCAAwC;QACxC,OAAOH;IACT,OACK,IAAIG,MAAM,GAAG;QAChB,6CAA6C;QAC7C,IAAIR,QAAQK,MAAM,GAAG;YACnB,oCAAoC;YACpC,OAAOP,gBAAgBO,KAAKL,OAAOC,SAASC,WAAWC,UAAUC;QACnE;QAEA,wEAAwE;QACxE,0EAA0E;QAC1E,IAAIA,SAAST,QAAQE,iBAAiB,EAAE;YACtC,OAAOG,QAAQE,UAAUO,MAAM,GAAGT,QAAQ,CAAC;QAC7C,OAAO;YACL,OAAOK;QACT;IACF,OACK;QACH,0CAA0C;QAC1C,IAAIA,MAAMN,OAAO,GAAG;YAClB,oCAAoC;YACpC,OAAOD,gBAAgBC,MAAMM,KAAKJ,SAASC,WAAWC,UAAUC;QAClE;QAEA,0EAA0E;QAC1E,IAAIA,SAAST,QAAQE,iBAAiB,EAAE;YACtC,OAAOQ;QACT,OAAO;YACL,OAAON,OAAO,IAAI,CAAC,IAAIA;QACzB;IACF;AACF;AAEA;;;;;;;;;;;;;;;;;CAiBC,GACDJ,QAAQe,MAAM,GAAG,SAASA,OAAOT,OAAO,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,KAAK;IAClE,IAAIF,UAAUO,MAAM,KAAK,GAAG;QAC1B,OAAO,CAAC;IACV;IAEA,IAAIE,QAAQb,gBAAgB,CAAC,GAAGI,UAAUO,MAAM,EAAER,SAASC,WAC/BC,UAAUC,SAAST,QAAQC,oBAAoB;IAC3E,IAAIe,QAAQ,GAAG;QACb,OAAO,CAAC;IACV;IAEA,2EAA2E;IAC3E,yEAAyE;IACzE,6DAA6D;IAC7D,MAAOA,QAAQ,KAAK,EAAG;QACrB,IAAIR,SAASD,SAAS,CAACS,MAAM,EAAET,SAAS,CAACS,QAAQ,EAAE,EAAE,UAAU,GAAG;YAChE;QACF;QACA,EAAEA;IACJ;IAEA,OAAOA;AACT","ignoreList":[0]}}, + {"offset": {"line": 2985, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/source-map-js/lib/quick-sort.js"],"sourcesContent":["/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\nfunction SortTemplate(comparator) {\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\nfunction swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot, false) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n}\n\n return doQuickSort;\n}\n\nfunction cloneSort(comparator) {\n let template = SortTemplate.toString();\n let templateFn = new Function(`return ${template}`)();\n return templateFn(comparator);\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\n\nlet sortCache = new WeakMap();\nexports.quickSort = function (ary, comparator, start = 0) {\n let doQuickSort = sortCache.get(comparator);\n if (doQuickSort === void 0) {\n doQuickSort = cloneSort(comparator);\n sortCache.set(comparator, doQuickSort);\n }\n doQuickSort(ary, comparator, start, ary.length - 1);\n};\n"],"names":["SortTemplate","comparator","swap","ary","x","y","temp","randomIntInRange","low","high","Math","round","random","doQuickSort","p","r","pivotIndex","i","pivot","j","q","cloneSort","template","toString","templateFn","Function","sortCache","WeakMap","exports","quickSort","start","get","set","length"],"mappings":"AAAA,yCAAyC,GACzC;;;;CAIC,GAED,oEAAoE;AACpE,0EAA0E;AAC1E,6EAA6E;AAC7E,8EAA8E;AAC9E,yEAAyE;AACzE,6EAA6E;AAC7E,6EAA6E;AAC7E,6EAA6E;AAC7E,iDAAiD;AAEjD,SAASA,aAAaC,UAAU;IAEhC;;;;;;;;;CASC,GACD,SAASC,KAAKC,GAAG,EAAEC,CAAC,EAAEC,CAAC;QACrB,IAAIC,OAAOH,GAAG,CAACC,EAAE;QACjBD,GAAG,CAACC,EAAE,GAAGD,GAAG,CAACE,EAAE;QACfF,GAAG,CAACE,EAAE,GAAGC;IACX;IAEA;;;;;;;CAOC,GACD,SAASC,iBAAiBC,GAAG,EAAEC,IAAI;QACjC,OAAOC,KAAKC,KAAK,CAACH,MAAOE,KAAKE,MAAM,KAAK,CAACH,OAAOD,GAAG;IACtD;IAEA;;;;;;;;;;;CAWC,GACD,SAASK,YAAYV,GAAG,EAAEF,UAAU,EAAEa,CAAC,EAAEC,CAAC;QACxC,wEAAwE;QACxE,4EAA4E;QAC5E,qCAAqC;QAErC,IAAID,IAAIC,GAAG;YACT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, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/source-map-js/lib/source-map-consumer.js"],"sourcesContent":["/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL)\n : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n// {\n// generatedLine: The line number in the generated code,\n// generatedColumn: The column number in the generated code,\n// source: The path to the original source file that generated this\n// chunk of code,\n// originalLine: The line number in the original source that\n// corresponds to this chunk of generated code,\n// originalColumn: The column number in the original source that\n// corresponds to this chunk of generated code,\n// name: The name of the original symbol which generated this chunk of\n// code.\n// }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n configurable: true,\n enumerable: true,\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n configurable: true,\n enumerable: true,\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n var boundCallback = aCallback.bind(context);\n var names = this._names;\n var sources = this._sources;\n var sourceMapURL = this._sourceMapURL;\n\n for (var i = 0, n = mappings.length; i < n; i++) {\n var mapping = mappings[i];\n var source = mapping.source === null ? null : sources.at(mapping.source);\n if(source !== null) {\n source = util.computeSourceURL(sourceRoot, source, sourceMapURL);\n }\n boundCallback({\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : names.at(mapping.name)\n });\n }\n };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number is 1-based.\n * - column: Optional. the column number in the original source.\n * The column number is 0-based.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based.\n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n needle.source = this._findSourceIndex(needle.source);\n if (needle.source < 0) {\n return [];\n }\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The first parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * The second parameter, if given, is a string whose value is the URL\n * at which the source map was found. This URL is used to compute the\n * sources array.\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n if (sourceRoot) {\n sourceRoot = util.normalize(sourceRoot);\n }\n\n sources = sources\n .map(String)\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names.map(String), true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this._absoluteSources = this._sources.toArray().map(function (s) {\n return util.computeSourceURL(sourceRoot, s, aSourceMapURL);\n });\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this._sourceMapURL = aSourceMapURL;\n this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Utility function to find the index of a source. Returns -1 if not\n * found.\n */\nBasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {\n var relativeSource = aSource;\n if (this.sourceRoot != null) {\n relativeSource = util.relative(this.sourceRoot, relativeSource);\n }\n\n if (this._sources.has(relativeSource)) {\n return this._sources.indexOf(relativeSource);\n }\n\n // Maybe aSource is an absolute URL as returned by |sources|. In\n // this case we can't simply undo the transform.\n var i;\n for (i = 0; i < this._absoluteSources.length; ++i) {\n if (this._absoluteSources[i] == aSource) {\n return i;\n }\n }\n\n return -1;\n};\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @param String aSourceMapURL\n * The URL at which the source map can be found (optional)\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n smc._sourceMapURL = aSourceMapURL;\n smc._absoluteSources = smc._sources.toArray().map(function (s) {\n return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);\n });\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._absoluteSources.slice();\n }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\n\nconst compareGenerated = util.compareByGeneratedPositionsDeflatedNoLine;\nfunction sortGenerated(array, start) {\n let l = array.length;\n let n = array.length - start;\n if (n <= 1) {\n return;\n } else if (n == 2) {\n let a = array[start];\n let b = array[start + 1];\n if (compareGenerated(a, b) > 0) {\n array[start] = b;\n array[start + 1] = a;\n }\n } else if (n < 20) {\n for (let i = start; i < l; i++) {\n for (let j = i; j > start; j--) {\n let a = array[j - 1];\n let b = array[j];\n if (compareGenerated(a, b) <= 0) {\n break;\n }\n array[j - 1] = b;\n array[j] = a;\n }\n }\n } else {\n quickSort(array, compareGenerated, start);\n }\n}\nBasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n let subarrayStart = 0;\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n\n sortGenerated(generatedMappings, subarrayStart);\n subarrayStart = generatedMappings.length;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n let currentSource = mapping.source;\n while (originalMappings.length <= currentSource) {\n originalMappings.push(null);\n }\n if (originalMappings[currentSource] === null) {\n originalMappings[currentSource] = [];\n }\n originalMappings[currentSource].push(mapping);\n }\n }\n }\n\n sortGenerated(generatedMappings, subarrayStart);\n this.__generatedMappings = generatedMappings;\n\n for (var i = 0; i < originalMappings.length; i++) {\n if (originalMappings[i] != null) {\n quickSort(originalMappings[i], util.compareByOriginalPositionsNoSource);\n }\n }\n this.__originalMappings = [].concat(...originalMappings);\n };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source. The line number\n * is 1-based.\n * - column: The column number in the generated source. The column\n * number is 0-based.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null. The\n * line number is 1-based.\n * - column: The column number in the original source, or null. The\n * column number is 0-based.\n * - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n var index = this._findSourceIndex(aSource);\n if (index >= 0) {\n return this.sourcesContent[index];\n }\n\n var relativeSource = aSource;\n if (this.sourceRoot != null) {\n relativeSource = util.relative(this.sourceRoot, relativeSource);\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = relativeSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + relativeSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + relativeSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + relativeSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number\n * is 1-based.\n * - column: The column number in the original source. The column\n * number is 0-based.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based.\n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n source = this._findSourceIndex(source);\n if (source < 0) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The first parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * The second parameter, if given, is a string whose value is the URL\n * at which the source map was found. This URL is used to compute the\n * sources array.\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL)\n }\n });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source. The line number\n * is 1-based.\n * - column: The column number in the generated source. The column\n * number is 0-based.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null. The\n * line number is 1-based.\n * - column: The column number in the original source, or null. The\n * column number is 0-based.\n * - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content || content === '') {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number\n * is 1-based.\n * - column: The column number in the original source. The column\n * number is 0-based.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based. \n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n if(source !== null) {\n source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);\n }\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = null;\n if (mapping.name) {\n name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n }\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n"],"names":["util","binarySearch","ArraySet","base64VLQ","quickSort","SourceMapConsumer","aSourceMap","aSourceMapURL","sourceMap","parseSourceMapInput","sections","IndexedSourceMapConsumer","BasicSourceMapConsumer","fromSourceMap","prototype","_version","__generatedMappings","Object","defineProperty","configurable","enumerable","get","_parseMappings","_mappings","sourceRoot","__originalMappings","_charIsMappingSeparator","SourceMapConsumer_charIsMappingSeparator","aStr","index","c","charAt","SourceMapConsumer_parseMappings","aSourceRoot","Error","GENERATED_ORDER","ORIGINAL_ORDER","GREATEST_LOWER_BOUND","LEAST_UPPER_BOUND","eachMapping","SourceMapConsumer_eachMapping","aCallback","aContext","aOrder","context","order","mappings","_generatedMappings","_originalMappings","boundCallback","bind","names","_names","sources","_sources","sourceMapURL","_sourceMapURL","i","n","length","mapping","source","at","computeSourceURL","generatedLine","generatedColumn","originalLine","originalColumn","name","allGeneratedPositionsFor","SourceMapConsumer_allGeneratedPositionsFor","aArgs","line","getArg","needle","_findSourceIndex","_findMapping","compareByOriginalPositions","column","undefined","push","lastColumn","exports","version","sourcesContent","file","normalize","map","String","isAbsolute","relative","fromArray","_absoluteSources","toArray","s","create","consumer","aSource","relativeSource","has","indexOf","SourceMapConsumer_fromSourceMap","smc","_sourceRoot","_generateSourcesContent","_file","generatedMappings","slice","destGeneratedMappings","destOriginalMappings","srcMapping","destMapping","Mapping","compareGenerated","compareByGeneratedPositionsDeflatedNoLine","sortGenerated","array","start","l","a","b","j","previousGeneratedColumn","previousOriginalLine","previousOriginalColumn","previousSource","previousName","cachedSegments","temp","originalMappings","str","segment","end","value","subarrayStart","decode","rest","currentSource","compareByOriginalPositionsNoSource","concat","SourceMapConsumer_findMapping","aNeedle","aMappings","aLineName","aColumnName","aComparator","aBias","TypeError","search","computeColumnSpans","SourceMapConsumer_computeColumnSpans","nextMapping","lastGeneratedColumn","Infinity","originalPositionFor","SourceMapConsumer_originalPositionFor","compareByGeneratedPositionsDeflated","hasContentsOfAllSources","BasicSourceMapConsumer_hasContentsOfAllSources","size","some","sc","sourceContentFor","SourceMapConsumer_sourceContentFor","nullOnMissing","url","urlParse","fileUriAbsPath","replace","scheme","path","generatedPositionFor","SourceMapConsumer_generatedPositionFor","lastOffset","_sections","offset","offsetLine","offsetColumn","generatedOffset","IndexedSourceMapConsumer_originalPositionFor","sectionIndex","section","cmp","bias","IndexedSourceMapConsumer_hasContentsOfAllSources","every","IndexedSourceMapConsumer_sourceContentFor","content","IndexedSourceMapConsumer_generatedPositionFor","generatedPosition","ret","IndexedSourceMapConsumer_parseMappings","sectionMappings","add","adjustedMapping"],"mappings":"AAAA,yCAAyC,GACzC;;;;CAIC,GAED,IAAIA;AACJ,IAAIC;AACJ,IAAIC,WAAW,wGAAuBA,QAAQ;AAC9C,IAAIC;AACJ,IAAIC,YAAY,yGAAwBA,SAAS;AAEjD,SAASC,kBAAkBC,UAAU,EAAEC,aAAa;IAClD,IAAIC,YAAYF;IAChB,IAAI,OAAOA,eAAe,UAAU;QAClCE,YAAYR,KAAKS,mBAAmB,CAACH;IACvC;IAEA,OAAOE,UAAUE,QAAQ,IAAI,OACzB,IAAIC,yBAAyBH,WAAWD,iBACxC,IAAIK,uBAAuBJ,WAAWD;AAC5C;AAEAF,kBAAkBQ,aAAa,GAAG,SAASP,UAAU,EAAEC,aAAa;IAClE,OAAOK,uBAAuBC,aAAa,CAACP,YAAYC;AAC1D;AAEA;;CAEC,GACDF,kBAAkBS,SAAS,CAACC,QAAQ,GAAG;AAEvC,0EAA0E;AAC1E,8EAA8E;AAC9E,qEAAqE;AACrE,2EAA2E;AAC3E,8EAA8E;AAC9E,2EAA2E;AAC3E,0DAA0D;AAC1D,EAAE;AACF,4CAA4C;AAC5C,EAAE;AACF,QAAQ;AACR,8DAA8D;AAC9D,kEAAkE;AAClE,yEAAyE;AACzE,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,sEAAsE;AACtE,qEAAqE;AACrE,4EAA4E;AAC5E,oBAAoB;AACpB,QAAQ;AACR,EAAE;AACF,yEAAyE;AACzE,UAAU;AACV,EAAE;AACF,8DAA8D;AAC9D,EAAE;AACF,4DAA4D;AAE5DV,kBAAkBS,SAAS,CAACE,mBAAmB,GAAG;AAClDC,OAAOC,cAAc,CAACb,kBAAkBS,SAAS,EAAE,sBAAsB;IACvEK,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gE,IAAI,CAACkH;YAC9B,IAAI,OAAOA,gBAAgBhI,YAAY,KAAK,UAAU;gBACpD,IAAI,CAACzC,kBAAkB,CAACuD,IAAI,CAACkH;YAC/B;QACF;IACF;IAEA9L,UAAU,IAAI,CAACY,mBAAmB,EAAEhB,KAAK4J,mCAAmC;IAC5ExJ,UAAU,IAAI,CAACqB,kBAAkB,EAAEzB,KAAK6E,0BAA0B;AACpE;AAEFK,QAAQvE,wBAAwB,GAAGA","ignoreList":[0]}}, + {"offset": {"line": 4065, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/source-map-js/lib/source-node.js"],"sourcesContent":["/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are accessed by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var remainingLinesIndex = 0;\n var shiftNextLine = function() {\n var lineContents = getNextLine();\n // The last line of a file might not have a newline.\n var newLine = getNextLine() || \"\";\n return lineContents + newLine;\n\n function getNextLine() {\n return remainingLinesIndex < remainingLines.length ?\n remainingLines[remainingLinesIndex++] : undefined;\n }\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[remainingLinesIndex] || '';\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[remainingLinesIndex] || '';\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLinesIndex < remainingLines.length) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n"],"names":["SourceMapGenerator","util","REGEX_NEWLINE","NEWLINE_CODE","isSourceNode","SourceNode","aLine","aColumn","aSource","aChunks","aName","children","sourceContents","line","column","source","name","add","fromStringWithSourceMap","SourceNode_fromStringWithSourceMap","aGeneratedCode","aSourceMapConsumer","aRelativePath","node","remainingLines","split","remainingLinesIndex","shiftNextLine","lineContents","getNextLine","newLine","length","undefined","lastGeneratedLine","lastGeneratedColumn","lastMapping","eachMapping","mapping","generatedLine","addMappingWithCode","nextLine","code","substr","generatedColumn","splice","join","sources","forEach","sourceFile","content","sourceContentFor","setSourceContent","originalLine","originalColumn","prototype","SourceNode_add","aChunk","Array","isArray","chunk","push","TypeError","prepend","SourceNode_prepend","i","unshift","walk","SourceNode_walk","aFn","len","SourceNode_join","aSep","newChildren","replaceRight","SourceNode_replaceRight","aPattern","aReplacement","lastChild","replace","SourceNode_setSourceContent","aSourceFile","aSourceContent","toSetString","walkSourceContents","SourceNode_walkSourceContents","Object","keys","fromSetString","toString","SourceNode_toString","str","toStringWithSourceMap","SourceNode_toStringWithSourceMap","aArgs","generated","map","sourceMappingActive","lastOriginalSource","lastOriginalLine","lastOriginalColumn","lastOriginalName","original","addMapping","idx","charCodeAt","sourceContent","exports"],"mappings":"AAAA,yCAAyC,GACzC;;;;CAIC,GAED,IAAIA,qBAAqB,mHAAkCA,kBAAkB;AAC7E,IAAIC;AAEJ,6EAA6E;AAC7E,uDAAuD;AACvD,IAAIC,gBAAgB;AAEpB,sDAAsD;AACtD,IAAIC,eAAe;AAEnB,yEAAyE;AACzE,iEAAiE;AACjE,YAAY;AACZ,IAAIC,eAAe;AAEnB;;;;;;;;;;;CAWC,GACD,SAASC,WAAWC,KAAK,EAAEC,OAAO,EAAEC,OAAO,EAAEC,OAAO,EAAEC,KAAK;IACzD,IAAI,CAACC,QAAQ,GAAG,EAAE;IAClB,IAAI,CAACC,cAAc,GAAG,CAAC;IACvB,IAAI,CAACC,IAAI,GAAGP,SAAS,OAAO,OAAOA;IACnC,IAAI,CAACQ,MAAM,GAAGP,WAAW,OAAO,OAAOA;IACvC,IAAI,CAACQ,MAAM,GAAGP,WAAW,OAAO,OAAOA;IACvC,IAAI,CAACQ,IAAI,GAAGN,SAAS,OAAO,OAAOA;IACnC,IAAI,CAACN,aAAa,GAAG;IACrB,IAAIK,WAAW,MAAM,IAAI,CAACQ,GAAG,CAACR;AAChC;AAEA;;;;;;;CAOC,GACDJ,WAAWa,uBAAuB,GAChC,SAASC,mCAAmCC,cAAc,EAAEC,kBAAkB,EAAEC,aAAa;IAC3F,yDAAyD;IACzD,oBAAoB;IACpB,IAAIC,OAAO,IAAIlB;IAEf,qEAAqE;IACrE,oEAAoE;IACpE,8CAA8C;IAC9C,+DAA+D;IAC/D,IAAImB,iBAAiBJ,eAAeK,KAAK,CAACvB;IAC1C,IAAIwB,sBAAsB;IAC1B,IAAIC,gBAAgB;QAClB,IAAI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nC;IAEA,OAAO;QAAEhE,MAAMqD,UAAUrD,IAAI;QAAEsD,KAAKA;IAAI;AAC1C;AAEAW,QAAQrG,UAAU,GAAGA","ignoreList":[0]}}, + {"offset": {"line": 4423, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/source-map-js/source-map.js"],"sourcesContent":["/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n"],"names":["exports","SourceMapGenerator","SourceMapConsumer","SourceNode"],"mappings":"AAAA;;;;CAIC,GACDA,QAAQC,kBAAkB,GAAG,mHAAsCA,kBAAkB;AACrFD,QAAQE,iBAAiB,GAAG,kHAAqCA,iBAAiB;AAClFF,QAAQG,UAAU,GAAG,0GAA6BA,UAAU","ignoreList":[0]}}, + {"offset": {"line": 4434, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/previous-map.js"],"sourcesContent":["'use strict'\n\nlet { existsSync, readFileSync } = require('fs')\nlet { dirname, join } = require('path')\nlet { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')\n\nfunction fromBase64(str) {\n if (Buffer) {\n return Buffer.from(str, 'base64').toString()\n } else {\n /* c8 ignore next 2 */\n return window.atob(str)\n }\n}\n\nclass PreviousMap {\n constructor(css, opts) {\n if (opts.map === false) return\n this.loadAnnotation(css)\n this.inline = this.startWith(this.annotation, 'data:')\n\n let prev = opts.map ? opts.map.prev : undefined\n let text = this.loadMap(opts.from, prev)\n if (!this.mapFile && opts.from) {\n this.mapFile = opts.from\n }\n if (this.mapFile) this.root = dirname(this.mapFile)\n if (text) this.text = text\n }\n\n consumer() {\n if (!this.consumerCache) {\n this.consumerCache = new SourceMapConsumer(this.text)\n }\n return this.consumerCache\n }\n\n decodeInline(text) {\n let baseCharsetUri = /^data:application\\/json;charset=utf-?8;base64,/\n let baseUri = /^data:application\\/json;base64,/\n let charsetUri = /^data:application\\/json;charset=utf-?8,/\n let uri = /^data:application\\/json,/\n\n let uriMatch = text.match(charsetUri) || text.match(uri)\n if (uriMatch) {\n return decodeURIComponent(text.substr(uriMatch[0].length))\n }\n\n let baseUriMatch = text.match(baseCharsetUri) || text.match(baseUri)\n if (baseUriMatch) {\n return fromBase64(text.substr(baseUriMatch[0].length))\n }\n\n let encoding = text.match(/data:application\\/json;([^,]+),/)[1]\n throw new Error('Unsupported source map encoding ' + encoding)\n }\n\n getAnnotationURL(sourceMapString) {\n return sourceMapString.replace(/^\\/\\*\\s*# sourceMappingURL=/, '').trim()\n }\n\n isMap(map) {\n if (typeof map !== 'object') return false\n return (\n typeof map.mappings === 'string' ||\n typeof map._mappings === 'string' ||\n Array.isArray(map.sections)\n )\n }\n\n loadAnnotation(css) {\n let comments = css.match(/\\/\\*\\s*# sourceMappingURL=/g)\n if (!comments) return\n\n // sourceMappingURLs from comments, strings, etc.\n let start = css.lastIndexOf(comments.pop())\n let end = css.indexOf('*/', start)\n\n if (start > -1 && end > -1) {\n // Locate the last sourceMappingURL to avoid pickin\n this.annotation = this.getAnnotationURL(css.substring(start, end))\n }\n }\n\n loadFile(path) {\n this.root = dirname(path)\n if (existsSync(path)) {\n this.mapFile = path\n return readFileSync(path, 'utf-8').toString().trim()\n }\n }\n\n loadMap(file, prev) {\n if (prev === false) return false\n\n if (prev) {\n if (typeof prev === 'string') {\n return prev\n } else if (typeof prev === 'function') {\n let prevPath = prev(file)\n if (prevPath) {\n let map = this.loadFile(prevPath)\n if (!map) {\n throw new Error(\n 'Unable to load previous source map: ' + prevPath.toString()\n )\n }\n return map\n }\n } else if (prev instanceof SourceMapConsumer) {\n return SourceMapGenerator.fromSourceMap(prev).toString()\n } else if (prev instanceof SourceMapGenerator) {\n return prev.toString()\n } else if (this.isMap(prev)) {\n return JSON.stringify(prev)\n } else {\n throw new Error(\n 'Unsupported previous source map format: ' + prev.toString()\n )\n }\n } else if (this.inline) {\n return this.decodeInline(this.annotation)\n } else if (this.annotation) {\n let map = this.annotation\n if (file) map = join(dirname(file), map)\n return this.loadFile(map)\n }\n }\n\n startWith(string, start) {\n if (!string) return false\n return string.substr(0, start.length) === start\n }\n\n withContent() {\n return !!(\n this.consumer().sourcesContent &&\n this.consumer().sourcesContent.length > 0\n )\n }\n}\n\nmodule.exports = PreviousMap\nPreviousMap.default = PreviousMap\n"],"names":["existsSync","readFileSync","dirname","join","SourceMapConsumer","SourceMapGenerator","fromBase64","str","Buffer","from","toString","PreviousMap","css","opts","map","loadAnnotation","inline","startWith","annotation","prev","undefined","text","loadMap","mapFile","root","consumer","consumerCache","decodeInline","baseCharsetUri","baseUri","charsetUri","uri","uriMatch","match","decodeURIComponent","substr","length","baseUriMatch","encoding","Error","getAnnotationURL","sourceMapString","replace","trim","isMap","mappings","_mappings","Array","isArray","sections","comments","start","lastIndexOf","pop","end","indexOf","substring","loadFile","path","file","prevPath","fromSourceMap","JSON","stringify","string","withContent","sourcesContent","module","exports","default"],"mappings":"AAEA,IAAI,EAAEA,UAAU,EAAEC,YAAY,EAAE;AAChC,IAAI,EAAEC,OAAO,EAAEC,IAAI,EAAE;AACrB,IAAI,EAAEC,iBAAiB,EAAEC,kBAAkB,EAAE;AAE7C,SAASC,WAAWC,GAAG;IACrB,wCAAY;QACV,OAAOC,OAAOC,IAAI,CAACF,KAAK,UAAUG,QAAQ;IAC5C;;AAIF;AAEA,MAAMC;IACJA,YAAYC,GAAG,EAAEC,IAAI,CAAE;QACrB,IAAIA,KAAKC,GAAG,KAAK,OAAO;QACxB,IAAI,CAACC,cAAc,CAACH;QACpB,IAAI,CAACI,MAAM,GAAG,IAAI,CAACC,SAAS,CAAC,IAAI,CAACC,UAAU,EAAE;QAE9C,IAAIC,OAAON,KAAKC,GAAG,GAAGD,KAAKC,GAAG,CAACK,IAAI,GAAG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K,CAACzB,OAAO;gBAC3B,OAAO2C,KAAKC,SAAS,CAAC5C;YACxB,OAAO;gBACL,MAAM,IAAIoB,MACR,6CAA6CpB,KAAKT,QAAQ;YAE9D;QACF,OAAO,IAAI,IAAI,CAACM,MAAM,EAAE;YACtB,OAAO,IAAI,CAACW,YAAY,CAAC,IAAI,CAACT,UAAU;QAC1C,OAAO,IAAI,IAAI,CAACA,UAAU,EAAE;YAC1B,IAAIJ,MAAM,IAAI,CAACI,UAAU;YACzB,IAAIyC,MAAM7C,MAAMX,KAAKD,QAAQyD,OAAO7C;YACpC,OAAO,IAAI,CAAC2C,QAAQ,CAAC3C;QACvB;IACF;IAEAG,UAAU+C,MAAM,EAAEb,KAAK,EAAE;QACvB,IAAI,CAACa,QAAQ,OAAO;QACpB,OAAOA,OAAO7B,MAAM,CAAC,GAAGgB,MAAMf,MAAM,MAAMe;IAC5C;IAEAc,cAAc;QACZ,OAAO,CAAC,CAAC,CACP,IAAI,CAACxC,QAAQ,GAAGyC,cAAc,IAC9B,IAAI,CAACzC,QAAQ,GAAGyC,cAAc,CAAC9B,MAAM,GAAG,CAC1C;IACF;AACF;AAEA+B,OAAOC,OAAO,GAAGzD;AACjBA,YAAY0D,OAAO,GAAG1D","ignoreList":[0]}}, + {"offset": {"line": 4548, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/input.js"],"sourcesContent":["'use strict'\n\nlet { nanoid } = require('nanoid/non-secure')\nlet { isAbsolute, resolve } = require('path')\nlet { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')\nlet { fileURLToPath, pathToFileURL } = require('url')\n\nlet CssSyntaxError = require('./css-syntax-error')\nlet PreviousMap = require('./previous-map')\nlet terminalHighlight = require('./terminal-highlight')\n\nlet lineToIndexCache = Symbol('lineToIndexCache')\n\nlet sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)\nlet pathAvailable = Boolean(resolve && isAbsolute)\n\nfunction getLineToIndex(input) {\n if (input[lineToIndexCache]) return input[lineToIndexCache]\n let lines = input.css.split('\\n')\n let lineToIndex = new Array(lines.length)\n let prevIndex = 0\n\n for (let i = 0, l = lines.length; i < l; i++) {\n lineToIndex[i] = prevIndex\n prevIndex += lines[i].length + 1\n }\n\n input[lineToIndexCache] = lineToIndex\n return lineToIndex\n}\n\nclass Input {\n get from() {\n return this.file || this.id\n }\n\n constructor(css, opts = {}) {\n if (\n css === null ||\n typeof css === 'undefined' ||\n (typeof css === 'object' && !css.toString)\n ) {\n throw new Error(`PostCSS received ${css} instead of CSS string`)\n }\n\n this.css = css.toString()\n\n if (this.css[0] === '\\uFEFF' || this.css[0] === '\\uFFFE') {\n this.hasBOM = true\n this.css = this.css.slice(1)\n } else {\n this.hasBOM = false\n }\n\n this.document = this.css\n if (opts.document) this.document = opts.document.toString()\n\n if (opts.from) {\n if (\n !pathAvailable ||\n /^\\w+:\\/\\//.test(opts.from) ||\n isAbsolute(opts.from)\n ) {\n this.file = opts.from\n } else {\n this.file = resolve(opts.from)\n }\n }\n\n if (pathAvailable && sourceMapAvailable) {\n let map = new PreviousMap(this.css, opts)\n if (map.text) {\n this.map = map\n let file = map.consumer().file\n if (!this.file && file) this.file = this.mapResolve(file)\n }\n }\n\n if (!this.file) {\n this.id = ''\n }\n if (this.map) this.map.file = this.from\n }\n\n error(message, line, column, opts = {}) {\n let endColumn, endLine, endOffset, offset, result\n\n if (line && typeof line === 'object') {\n let start = line\n let end = column\n if (typeof start.offset === 'number') {\n offset = start.offset\n let pos = this.fromOffset(offset)\n line = pos.line\n column = pos.col\n } else {\n line = start.line\n column = start.column\n offset = this.fromLineAndColumn(line, column)\n }\n if (typeof end.offset === 'number') {\n endOffset = end.offset\n let pos = this.fromOffset(endOffset)\n endLine = pos.line\n endColumn = pos.col\n } else {\n endLine = end.line\n endColumn = end.column\n endOffset = this.fromLineAndColumn(end.line, end.column)\n }\n } else if (!column) {\n offset = line\n let pos = this.fromOffset(offset)\n line = pos.line\n column = pos.col\n } else {\n offset = this.fromLineAndColumn(line, column)\n }\n\n let origin = this.origin(line, column, endLine, endColumn)\n if (origin) {\n result = new CssSyntaxError(\n message,\n origin.endLine === undefined\n ? origin.line\n : { column: origin.column, line: origin.line },\n origin.endLine === undefined\n ? origin.column\n : { column: origin.endColumn, line: origin.endLine },\n origin.source,\n origin.file,\n opts.plugin\n )\n } else {\n result = new CssSyntaxError(\n message,\n endLine === undefined ? line : { column, line },\n endLine === undefined ? column : { column: endColumn, line: endLine },\n this.css,\n this.file,\n opts.plugin\n )\n }\n\n result.input = { column, endColumn, endLine, endOffset, line, offset, source: this.css }\n if (this.file) {\n if (pathToFileURL) {\n result.input.url = pathToFileURL(this.file).toString()\n }\n result.input.file = this.file\n }\n\n return result\n }\n\n fromLineAndColumn(line, column) {\n let lineToIndex = getLineToIndex(this)\n let index = lineToIndex[line - 1]\n return index + column - 1\n }\n\n fromOffset(offset) {\n let lineToIndex = getLineToIndex(this)\n let lastLine = lineToIndex[lineToIndex.length - 1]\n\n let min = 0\n if (offset >= lastLine) {\n min = lineToIndex.length - 1\n } else {\n let max = lineToIndex.length - 2\n let mid\n while (min < max) {\n mid = min + ((max - min) >> 1)\n if (offset < lineToIndex[mid]) {\n max = mid - 1\n } else if (offset >= lineToIndex[mid + 1]) {\n min = mid + 1\n } else {\n min = mid\n break\n }\n }\n }\n return {\n col: offset - lineToIndex[min] + 1,\n line: min + 1\n }\n }\n\n mapResolve(file) {\n if (/^\\w+:\\/\\//.test(file)) {\n return file\n }\n return resolve(this.map.consumer().sourceRoot || this.map.root || '.', file)\n }\n\n origin(line, column, endLine, endColumn) {\n if (!this.map) return false\n let consumer = this.map.consumer()\n\n let from = consumer.originalPositionFor({ column, line })\n if (!from.source) return false\n\n let to\n if (typeof endLine === 'number') {\n to = consumer.originalPositionFor({ column: endColumn, line: endLine })\n }\n\n let fromUrl\n\n if (isAbsolute(from.source)) {\n fromUrl = pathToFileURL(from.source)\n } else {\n fromUrl = new URL(\n from.source,\n this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile)\n )\n }\n\n let result = {\n column: from.column,\n endColumn: to && to.column,\n endLine: to && to.line,\n line: from.line,\n url: fromUrl.toString()\n }\n\n if (fromUrl.protocol === 'file:') {\n if (fileURLToPath) {\n result.file = fileURLToPath(fromUrl)\n } else {\n /* c8 ignore next 2 */\n throw new Error(`file: protocol is not available in this PostCSS build`)\n }\n }\n\n let source = consumer.sourceContentFor(from.source)\n if (source) result.source = source\n\n return result\n }\n\n toJSON() {\n let json = {}\n for (let name of ['hasBOM', 'css', 'file', 'id']) {\n if (this[name] != null) {\n json[name] = this[name]\n }\n }\n if (this.map) {\n json.map = { ...this.map }\n if (json.map.consumerCache) {\n json.map.consumerCache = undefined\n }\n }\n return json\n }\n}\n\nmodule.exports = Input\nInput.default = Input\n\nif (terminalHighlight && terminalHighlight.registerInput) {\n terminalHighlight.registerInput(Input)\n}\n"],"names":["nanoid","isAbsolute","resolve","SourceMapConsumer","SourceMapGenerator","fileURLToPath","pathToFileURL","CssSyntaxError","PreviousMap","terminalHighlight","lineToIndexCache","Symbol","sourceMapAvailable","Boolean","pathAvailable","getLineToIndex","input","lines","css","split","lineToIndex","Array","length","prevIndex","i","l","Input","from","file","id","opts","toString","Error","hasBOM","slice","document","test","map","text","consumer","mapResolve","error","message","line","column","endColumn","endLine","endOffset","offset","result","start","end","pos","fromOffset","col","fromLineAndColumn","origin","undefined","source","plugin","url","index","lastLine","min","max","mid","sourceRoot","root","originalPositionFor","to","fromUrl","URL","mapFile","protocol","sourceContentFor","toJSON","json","name","consumerCache","module","exports","default","registerInput"],"mappings":"AAEA,IAAI,EAAEA,MAAM,EAAE;AACd,IAAI,EAAEC,UAAU,EAAEC,OAAO,EAAE;AAC3B,IAAI,EAAEC,iBAAiB,EAAEC,kBAAkB,EAAE;AAC7C,IAAI,EAAEC,aAAa,EAAEC,aAAa,EAAE;AAEpC,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AAEJ,IAAIC,mBAAmBC,OAAO;AA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A,QAAQT,OAAOS,MAAM,GAAGA;QAE5B,OAAOT;IACT;IAEA0B,SAAS;QACP,IAAIC,OAAO,CAAC;QACZ,KAAK,IAAIC,QAAQ;YAAC;YAAU;YAAO;YAAQ;SAAK,CAAE;YAChD,IAAI,IAAI,CAACA,KAAK,IAAI,MAAM;gBACtBD,IAAI,CAACC,KAAK,GAAG,IAAI,CAACA,KAAK;YACzB;QACF;QACA,IAAI,IAAI,CAACxC,GAAG,EAAE;YACZuC,KAAKvC,GAAG,GAAG;gBAAE,GAAG,IAAI,CAACA,GAAG;YAAC;YACzB,IAAIuC,KAAKvC,GAAG,CAACyC,aAAa,EAAE;gBAC1BF,KAAKvC,GAAG,CAACyC,aAAa,GAAGrB;YAC3B;QACF;QACA,OAAOmB;IACT;AACF;AAEAG,OAAOC,OAAO,GAAGtD;AACjBA,MAAMuD,OAAO,GAAGvD;AAEhB,IAAIjB,qBAAqBA,kBAAkByE,aAAa,EAAE;IACxDzE,kBAAkByE,aAAa,CAACxD;AAClC","ignoreList":[0]}}, + {"offset": {"line": 4783, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/root.js"],"sourcesContent":["'use strict'\n\nlet Container = require('./container')\n\nlet LazyResult, Processor\n\nclass Root extends Container {\n constructor(defaults) {\n super(defaults)\n this.type = 'root'\n if (!this.nodes) this.nodes = []\n }\n\n normalize(child, sample, type) {\n let nodes = super.normalize(child)\n\n if (sample) {\n if (type === 'prepend') {\n if (this.nodes.length > 1) {\n sample.raws.before = this.nodes[1].raws.before\n } else {\n delete sample.raws.before\n }\n } else if (this.first !== sample) {\n for (let node of nodes) {\n node.raws.before = sample.raws.before\n }\n }\n }\n\n return nodes\n }\n\n removeChild(child, ignore) {\n let index = this.index(child)\n\n if (!ignore && index === 0 && this.nodes.length > 1) {\n this.nodes[1].raws.before = this.nodes[index].raws.before\n }\n\n return super.removeChild(child)\n }\n\n toResult(opts = {}) {\n let lazy = new LazyResult(new Processor(), this, opts)\n return lazy.stringify()\n }\n}\n\nRoot.registerLazyResult = dependant => {\n LazyResult = dependant\n}\n\nRoot.registerProcessor = dependant => {\n Processor = dependant\n}\n\nmodule.exports = Root\nRoot.default = Root\n\nContainer.registerRoot(Root)\n"],"names":["Container","LazyResult","Processor","Root","defaults","type","nodes","normalize","child","sample","length","raws","before","first","node","removeChild","ignore","index","toResult","opts","lazy","stringify","registerLazyResult","dependant","registerProcessor","module","exports","default","registerRoot"],"mappings":"AAEA,IAAIA;AAEJ,IAAIC,YAAYC;AAEhB,MAAMC,aAAaH;IACjBG,YAAYC,QAAQ,CAAE;QACpB,KAAK,CAACA;QACN,IAAI,CAACC,IAAI,GAAG;QACZ,IAAI,CAAC,IAAI,CAACC,KAAK,EAAE,IAAI,CAACA,KAAK,GAAG,EAAE;IAClC;IAEAC,UAAUC,KAAK,EAAEC,MAAM,EAAEJ,IAAI,EAAE;QAC7B,IAAIC,QAAQ,KAAK,CAACC,UAAUC;QAE5B,IAAIC,QAAQ;YACV,IAAIJ,SAAS,WAAW;gBACtB,IAAI,IAAI,CAACC,KAAK,CAACI,MAAM,GAAG,GAAG;oBACzBD,OAAOE,IAAI,CAACC,MAAM,GAAG,IAAI,CAACN,KAAK,CAAC,EAAE,CAACK,IAAI,CAACC,MAAM;gBAChD,OAAO;oBACL,OAAOH,OAAOE,IAAI,CAACC,MAAM;gBAC3B;YACF,OAAO,IAAI,IAAI,CAACC,KAAK,KAAKJ,QAAQ;gBAChC,KAAK,IAAIK,QAAQR,MAAO;oBACtBQ,KAAKH,IAAI,CAACC,MAAM,GAAGH,OAAOE,IAAI,CAACC,MAAM;gBACvC;YACF;QACF;QAEA,OAAON;IACT;IAEAS,YAAYP,KAAK,EAAEQ,MAAM,EAAE;QACzB,IAAIC,QAAQ,IAAI,CAACA,KAAK,CAACT;QAEvB,IAAI,CAACQ,UAAUC,UAAU,KAAK,IAAI,CAACX,KAAK,CAACI,MAAM,GAAG,GAAG;YACnD,IAAI,CAACJ,KAAK,CAAC,EAAE,CAACK,IAAI,CAACC,MAAM,GAAG,IAAI,CAACN,KAAK,CAACW,MAAM,CAACN,IAAI,CAACC,MAAM;QAC3D;QAEA,OAAO,KAAK,CAACG,YAAYP;IAC3B;IAEAU,SAASC,OAAO,CAAC,CAAC,EAAE;QAClB,IAAIC,OAAO,IAAInB,WAAW,IAAIC,aAAa,IAAI,EAAEiB;QACjD,OAAOC,KAAKC,SAAS;IACvB;AACF;AAEAlB,KAAKmB,kBAAkB,GAAGC,CAAAA;IACxBtB,aAAasB;AACf;AAEApB,KAAKqB,iBAAiB,GAAGD,CAAAA;IACvBrB,YAAYqB;AACd;AAEAE,OAAOC,OAAO,GAAGvB;AACjBA,KAAKwB,OAAO,GAAGxB;AAEfH,UAAU4B,YAAY,CAACzB","ignoreList":[0]}}, + {"offset": {"line": 4833, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/list.js"],"sourcesContent":["'use strict'\n\nlet list = {\n comma(string) {\n return list.split(string, [','], true)\n },\n\n space(string) {\n let spaces = [' ', '\\n', '\\t']\n return list.split(string, spaces)\n },\n\n split(string, separators, last) {\n let array = []\n let current = ''\n let split = false\n\n let func = 0\n let inQuote = false\n let prevQuote = ''\n let escape = false\n\n for (let letter of string) {\n if (escape) {\n escape = false\n } else if (letter === '\\\\') {\n escape = true\n } else if (inQuote) {\n if (letter === prevQuote) {\n inQuote = false\n }\n } else if (letter === '\"' || letter === \"'\") {\n inQuote = true\n prevQuote = letter\n } else if (letter === '(') {\n func += 1\n } else if (letter === ')') {\n if (func > 0) func -= 1\n } else if (func === 0) {\n if (separators.includes(letter)) split = true\n }\n\n if (split) {\n if (current !== '') array.push(current.trim())\n current = ''\n split = false\n } else {\n current += letter\n }\n }\n\n if (last || current !== '') array.push(current.trim())\n return array\n }\n}\n\nmodule.exports = list\nlist.default = list\n"],"names":["list","comma","string","split","space","spaces","separators","last","array","current","func","inQuote","prevQuote","escape","letter","includes","push","trim","module","exports","default"],"mappings":"AAEA,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ule.js"],"sourcesContent":["'use strict'\n\nlet Container = require('./container')\nlet list = require('./list')\n\nclass Rule extends Container {\n get selectors() {\n return list.comma(this.selector)\n }\n\n set selectors(values) {\n let match = this.selector ? this.selector.match(/,\\s*/) : null\n let sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen')\n this.selector = values.join(sep)\n }\n\n constructor(defaults) {\n super(defaults)\n this.type = 'rule'\n if (!this.nodes) this.nodes = []\n }\n}\n\nmodule.exports = Rule\nRule.default = Rule\n\nContainer.registerRule(Rule)\n"],"names":["Container","list","Rule","selectors","comma","selector","values","match","sep","raw","join","defaults","type","nodes","module","exports","default","registerRule"],"mappings":"AAEA,IAAIA;AACJ,IAAIC;AAEJ,MAAMC,aAAaF;IACjB,IAAIG,YAAY;QACd,OAAOF,KAAKG,KAAK,CAAC,IAAI,CAACC,QAAQ;IACjC;IAEA,IAAIF,UAAUG,MAAM,EAAE;QACpB,IAAIC,QAAQ,IAAI,CAACF,QAAQ,GAAG,IAAI,CAACA,QAAQ,CAACE,KAAK,CAAC,UAAU;QAC1D,IAAIC,MAAMD,QAAQA,KAAK,CAAC,EAAE,GAAG,MAAM,IAAI,CAACE,GAAG,CAAC,WAAW;QACvD,IAAI,CAACJ,QAAQ,GAAGC,OAAOI,IAAI,CAACF;IAC9B;IAEAN,YAAYS,QAAQ,CAAE;QACpB,KAAK,CAACA;QACN,IAAI,CAACC,IAAI,GAAG;QACZ,IAAI,CAAC,IAAI,CAACC,KAAK,EAAE,IAAI,CAACA,KAAK,GAAG,EAAE;IAClC;AACF;AAEAC,OAAOC,OAAO,GAAGb;AACjBA,KAAKc,OAAO,GAAGd;AAEfF,UAAUiB,YAAY,CAACf","ignoreList":[0]}}, + {"offset": {"line": 4916, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/fromJSON.js"],"sourcesContent":["'use strict'\n\nlet AtRule = require('./at-rule')\nlet Comment = require('./comment')\nlet Declaration = require('./declaration')\nlet Input = require('./input')\nlet PreviousMap = require('./previous-map')\nlet Root = require('./root')\nlet Rule = require('./rule')\n\nfunction fromJSON(json, inputs) {\n if (Array.isArray(json)) return json.map(n => fromJSON(n))\n\n let { inputs: ownInputs, ...defaults } = json\n if (ownInputs) {\n inputs = []\n for (let input of ownInputs) {\n let inputHydrated = { ...input, __proto__: Input.prototype }\n if (inputHydrated.map) {\n inputHydrated.map = {\n ...inputHydrated.map,\n __proto__: PreviousMap.prototype\n }\n }\n inputs.push(inputHydrated)\n }\n }\n if (defaults.nodes) {\n defaults.nodes = json.nodes.map(n => fromJSON(n, inputs))\n }\n if (defaults.source) {\n let { inputId, ...source } = defaults.source\n defaults.source = source\n if (inputId != null) {\n defaults.source.input = inputs[inputId]\n }\n }\n if (defaults.type === 'root') {\n return new Root(defaults)\n } else if (defaults.type === 'decl') {\n return new Declaration(defaults)\n } else if (defaults.type === 'rule') {\n return new Rule(defaults)\n } else if (defaults.type === 'comment') {\n return new Comment(defaults)\n } else if (defaults.type === 'atrule') {\n return new AtRule(defaults)\n } else {\n throw new Error('Unknown node type: ' + json.type)\n }\n}\n\nmodule.exports = fromJSON\nfromJSON.default = fromJSON\n"],"names":["AtRule","Comment","Declaration","Input","PreviousMap","Root","Rule","fromJSON","json","inputs","Array","isArray","map","n","ownInputs","defaults","input","inputHydrated","__proto__","prototype","push","nodes","source","inputId","type","Error","module","exports","default"],"mappings":"AAEA,IAAIA;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AAEJ,SAASC,SAASC,IAAI,EAAEC,MAAM;IAC5B,IAAIC,MAAMC,OAAO,CAACH,OAAO,OAAOA,KAAKI,GAAG,CAACC,CAAAA,IAAKN,SAASM;IAEvD,IAAI,EAAEJ,QAAQK,SAAS,EAAE,GAAGC,UAAU,GAAGP;IACzC,IAAIM,WAAW;QACbL,SAAS,EAAE;QACX,KAAK,IAAIO,SAASF,UAAW;YAC3B,IAAIG,gBAAgB;gBAAE,GAAGD,KAAK;gBAAEE,WAAWf,MAAMgB,SAAS;YAAC;YAC3D,IAAIF,cAAcL,GAAG,EAAE;gBACrBK,cAAcL,GAAG,GAAG;oBAClB,GAAGK,cAAcL,GAAG;oBACpBM,WAAWd,YAAYe,SAAS;gBAClC;YACF;YACAV,OAAOW,IAAI,CAACH;QACd;IACF;IACA,IAAIF,SAASM,KAAK,EAAE;QAClBN,SAASM,KAAK,GAAGb,KAAKa,KAAK,CAACT,GAAG,CAACC,CAAAA,IAAKN,SAASM,GAAGJ;IACnD;IACA,IAAIM,SAASO,MAAM,EAAE;QACnB,IAAI,EAAEC,OAAO,EAAE,GAAGD,QAAQ,GAAGP,SAASO,MAAM;QAC5CP,SAASO,MAAM,GAAGA;QAClB,IAAIC,WAAW,MAAM;YACnBR,SAASO,MAAM,CAACN,KAAK,GAAGP,MAAM,CAACc,QAAQ;QACzC;IACF;IACA,IAAIR,SAASS,IAAI,KAAK,QAAQ;QAC5B,OAAO,IAAInB,KAAKU;IAClB,OAAO,IAAIA,SAASS,IAAI,KAAK,QAAQ;QACnC,OAAO,IAAItB,YAAYa;IACzB,OAAO,IAAIA,SAASS,IAAI,KAAK,QAAQ;QACnC,OAAO,IAAIlB,KAAKS;IAClB,OAAO,IAAIA,SAASS,IAAI,KAAK,WAAW;QACtC,OAAO,IAAIvB,QAAQc;IACrB,OAAO,IAAIA,SAASS,IAAI,KAAK,UAAU;QACrC,OAAO,IAAIxB,OAAOe;IACpB,OAAO;QACL,MAAM,IAAIU,MAAM,wBAAwBjB,KAAKgB,IAAI;IACnD;AACF;AAEAE,OAAOC,OAAO,GAAGpB;AACjBA,SAASqB,OAAO,GAAGrB","ignoreList":[0]}}, + {"offset": {"line": 4972, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/map-generator.js"],"sourcesContent":["'use strict'\n\nlet { dirname, relative, resolve, sep } = require('path')\nlet { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')\nlet { pathToFileURL } = require('url')\n\nlet Input = require('./input')\n\nlet sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)\nlet pathAvailable = Boolean(dirname && resolve && relative && sep)\n\nclass MapGenerator {\n constructor(stringify, root, opts, cssString) {\n this.stringify = stringify\n this.mapOpts = opts.map || {}\n this.root = root\n this.opts = opts\n this.css = cssString\n this.originalCSS = cssString\n this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute\n\n this.memoizedFileURLs = new Map()\n this.memoizedPaths = new Map()\n this.memoizedURLs = new Map()\n }\n\n addAnnotation() {\n let content\n\n if (this.isInline()) {\n content =\n 'data:application/json;base64,' + this.toBase64(this.map.toString())\n } else if (typeof this.mapOpts.annotation === 'string') {\n content = this.mapOpts.annotation\n } else if (typeof this.mapOpts.annotation === 'function') {\n content = this.mapOpts.annotation(this.opts.to, this.root)\n } else {\n content = this.outputFile() + '.map'\n }\n let eol = '\\n'\n if (this.css.includes('\\r\\n')) eol = '\\r\\n'\n\n this.css += eol + '/*# sourceMappingURL=' + content + ' */'\n }\n\n applyPrevMaps() {\n for (let prev of this.previous()) {\n let from = this.toUrl(this.path(prev.file))\n let root = prev.root || dirname(prev.file)\n let map\n\n if (this.mapOpts.sourcesContent === false) {\n map = new SourceMapConsumer(prev.text)\n if (map.sourcesContent) {\n map.sourcesContent = null\n }\n } else {\n map = prev.consumer()\n }\n\n this.map.applySourceMap(map, from, this.toUrl(this.path(root)))\n }\n }\n\n clearAnnotation() {\n if (this.mapOpts.annotation === false) return\n\n if (this.root) {\n let node\n for (let i = this.root.nodes.length - 1; i >= 0; i--) {\n node = this.root.nodes[i]\n if (node.type !== 'comment') continue\n if (node.text.startsWith('# sourceMappingURL=')) {\n this.root.removeChild(i)\n }\n }\n } else if (this.css) {\n let startIndex\n while ((startIndex = this.css.lastIndexOf('/*#')) !== -1) {\n let endIndex = this.css.indexOf('*/', startIndex + 3)\n if (endIndex === -1) break\n while (startIndex > 0 && this.css[startIndex - 1] === '\\n') {\n startIndex--\n }\n this.css = this.css.slice(0, startIndex) + this.css.slice(endIndex + 2)\n }\n }\n }\n\n generate() {\n this.clearAnnotation()\n if (pathAvailable && sourceMapAvailable && this.isMap()) {\n return this.generateMap()\n } else {\n let result = ''\n this.stringify(this.root, i => {\n result += i\n })\n return [result]\n }\n }\n\n generateMap() {\n if (this.root) {\n this.generateString()\n } else if (this.previous().length === 1) {\n let prev = this.previous()[0].consumer()\n prev.file = this.outputFile()\n this.map = SourceMapGenerator.fromSourceMap(prev, {\n ignoreInvalidMapping: true\n })\n } else {\n this.map = new SourceMapGenerator({\n file: this.outputFile(),\n ignoreInvalidMapping: true\n })\n this.map.addMapping({\n generated: { column: 0, line: 1 },\n original: { column: 0, line: 1 },\n source: this.opts.from\n ? this.toUrl(this.path(this.opts.from))\n : ''\n })\n }\n\n if (this.isSourcesContent()) this.setSourcesContent()\n if (this.root && this.previous().length > 0) this.applyPrevMaps()\n if (this.isAnnotation()) this.addAnnotation()\n\n if (this.isInline()) {\n return [this.css]\n } else {\n return [this.css, this.map]\n }\n }\n\n generateString() {\n this.css = ''\n this.map = new SourceMapGenerator({\n file: this.outputFile(),\n ignoreInvalidMapping: true\n })\n\n let line = 1\n let column = 1\n\n let noSource = ''\n let mapping = {\n generated: { column: 0, line: 0 },\n original: { column: 0, line: 0 },\n source: ''\n }\n\n let last, lines\n this.stringify(this.root, (str, node, type) => {\n this.css += str\n\n if (node && type !== 'end') {\n mapping.generated.line = line\n mapping.generated.column = column - 1\n if (node.source && node.source.start) {\n mapping.source = this.sourcePath(node)\n mapping.original.line = node.source.start.line\n mapping.original.column = node.source.start.column - 1\n this.map.addMapping(mapping)\n } else {\n mapping.source = noSource\n mapping.original.line = 1\n mapping.original.column = 0\n this.map.addMapping(mapping)\n }\n }\n\n lines = str.match(/\\n/g)\n if (lines) {\n line += lines.length\n last = str.lastIndexOf('\\n')\n column = str.length - last\n } else {\n column += str.length\n }\n\n if (node && type !== 'start') {\n let p = node.parent || { raws: {} }\n let childless =\n node.type === 'decl' || (node.type === 'atrule' && !node.nodes)\n if (!childless || node !== p.last || p.raws.semicolon) {\n if (node.source && node.source.end) {\n mapping.source = this.sourcePath(node)\n mapping.original.line = node.source.end.line\n mapping.original.column = node.source.end.column - 1\n mapping.generated.line = line\n mapping.generated.column = column - 2\n this.map.addMapping(mapping)\n } else {\n mapping.source = noSource\n mapping.original.line = 1\n mapping.original.column = 0\n mapping.generated.line = line\n mapping.generated.column = column - 1\n this.map.addMapping(mapping)\n }\n }\n }\n })\n }\n\n isAnnotation() {\n if (this.isInline()) {\n return true\n }\n if (typeof this.mapOpts.annotation !== 'undefined') {\n return this.mapOpts.annotation\n }\n if (this.previous().length) {\n return this.previous().some(i => i.annotation)\n }\n return true\n }\n\n isInline() {\n if (typeof this.mapOpts.inline !== 'undefined') {\n return this.mapOpts.inline\n }\n\n let annotation = this.mapOpts.annotation\n if (typeof annotation !== 'undefined' && annotation !== true) {\n return false\n }\n\n if (this.previous().length) {\n return this.previous().some(i => i.inline)\n }\n return true\n }\n\n isMap() {\n if (typeof this.opts.map !== 'undefined') {\n return !!this.opts.map\n }\n return this.previous().length > 0\n }\n\n isSourcesContent() {\n if (typeof this.mapOpts.sourcesContent !== 'undefined') {\n return this.mapOpts.sourcesContent\n }\n if (this.previous().length) {\n return this.previous().some(i => i.withContent())\n }\n return true\n }\n\n outputFile() {\n if (this.opts.to) {\n return this.path(this.opts.to)\n } else if (this.opts.from) {\n return this.path(this.opts.from)\n } else {\n return 'to.css'\n }\n }\n\n path(file) {\n if (this.mapOpts.absolute) return file\n if (file.charCodeAt(0) === 60 /* `<` */) return file\n if (/^\\w+:\\/\\//.test(file)) return file\n let cached = this.memoizedPaths.get(file)\n if (cached) return cached\n\n let from = this.opts.to ? dirname(this.opts.to) : '.'\n\n if (typeof this.mapOpts.annotation === 'string') {\n from = dirname(resolve(from, this.mapOpts.annotation))\n }\n\n let path = relative(from, file)\n this.memoizedPaths.set(file, path)\n\n return path\n }\n\n previous() {\n if (!this.previousMaps) {\n this.previousMaps = []\n if (this.root) {\n this.root.walk(node => {\n if (node.source && node.source.input.map) {\n let map = node.source.input.map\n if (!this.previousMaps.includes(map)) {\n this.previousMaps.push(map)\n }\n }\n })\n } else {\n let input = new Input(this.originalCSS, this.opts)\n if (input.map) this.previousMaps.push(input.map)\n }\n }\n\n return this.previousMaps\n }\n\n setSourcesContent() {\n let already = {}\n if (this.root) {\n this.root.walk(node => {\n if (node.source) {\n let from = node.source.input.from\n if (from && !already[from]) {\n already[from] = true\n let fromUrl = this.usesFileUrls\n ? this.toFileUrl(from)\n : this.toUrl(this.path(from))\n this.map.setSourceContent(fromUrl, node.source.input.css)\n }\n }\n })\n } else if (this.css) {\n let from = this.opts.from\n ? this.toUrl(this.path(this.opts.from))\n : ''\n this.map.setSourceContent(from, this.css)\n }\n }\n\n sourcePath(node) {\n if (this.mapOpts.from) {\n return this.toUrl(this.mapOpts.from)\n } else if (this.usesFileUrls) {\n return this.toFileUrl(node.source.input.from)\n } else {\n return this.toUrl(this.path(node.source.input.from))\n }\n }\n\n toBase64(str) {\n if (Buffer) {\n return Buffer.from(str).toString('base64')\n } else {\n return window.btoa(unescape(encodeURIComponent(str)))\n }\n }\n\n toFileUrl(path) {\n let cached = this.memoizedFileURLs.get(path)\n if (cached) return cached\n\n if (pathToFileURL) {\n let fileURL = pathToFileURL(path).toString()\n this.memoizedFileURLs.set(path, fileURL)\n\n return fileURL\n } else {\n throw new Error(\n '`map.absolute` option is not available in this PostCSS build'\n )\n }\n }\n\n toUrl(path) {\n let cached = this.memoizedURLs.get(path)\n if (cached) return cached\n\n if (sep === '\\\\') {\n path = path.replace(/\\\\/g, '/')\n }\n\n let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent)\n this.memoizedURLs.set(path, url)\n\n return url\n }\n}\n\nmodule.exports = MapGenerator\n"],"names":["dirname","relative","resolve","sep","SourceMapConsumer","SourceMapGenerator","pathToFileURL","Input","sourceMapAvailable","Boolean","pathAvailable","MapGenerator","stringify","root","opts","cssString","mapOpts","map","css","originalCSS","usesFileUrls","from","absolute","memoizedFileURLs","Map","memoizedPaths","memoizedURLs","addAnnotation","content","isInline","toBase64","toString","annotation","to","outputFile","eol","includes","applyPrevMaps","prev","previous","toUrl","path","file","sourcesContent","text","consumer","applySourceMap","clearAnnotation","node","i","nodes","length","type","startsWith","removeChild","startIndex","lastIndexOf","endIndex","indexOf","slice","generate","isMap","generateMap","result","generateString","fromSourceMap","ignoreInvalidMapping","addMapping","generated","column","line","original","source","isSourcesContent","setSourcesContent","isAnnotation","noSource","mapping","last","lines","str","start","sourcePath","match","p","parent","raws","childless","semicolon","end","some","inline","withContent","charCodeAt","test","cached","get","set","previousMaps","walk","input","push","already","fromUrl","toFileUrl","setSourceContent","Buffer","fileURL","replace","url","encodeURI","encodeURIComponent","module","exports"],"mappings":"AAEA,IAAI,EAAEA,OAAO,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,GAAG,EAAE;AACvC,IAAI,EAAEC,iBAAiB,EAAEC,kBAAkB,EAAE;AAC7C,IAAI,EAAEC,aAAa,EAAE;AAErB,IAAIC;AAEJ,IAAIC,qBAAqBC,QAAQL,qBAAqBC;AACtD,IAAIK,gBAAgBD,QAAQT,WAAWE,WAAWD,YAAYE;AAE9D,MAAMQ;IACJA,YAAYC,SAAS,EAAEC,IAAI,EAAEC,IAAI,EAAEC,SAAS,CAAE;QAC5C,IAAI,CAACH,SAAS,GAAGA;QACjB,IAAI,CAACI,OAAO,GAAGF,KAAKG,GAAG,IAAI,CAAC;QAC5B,IAAI,CAACJ,IAAI,GAAGA;QACZ,IAAI,CAACC,IAAI,GAAGA;QACZ,IAAI,CAACI,GAAG,GAAGH;QACX,IAAI,CAACI,WAAW,GAAGJ;QACnB,IAAI,CAACK,YAAY,GAAG,CAAC,IAAI,CAACJ,OAAO,CAACK,IAAI,IAAI,IAAI,CAACL,OAAO,CAACM,QAAQ;QAE/D,IAAI,CAACC,gBAAgB,GAAG,IAAIC;QAC5B,IAAI,CAACC,a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I,CAACoF,SAAS,CAACxD,KAAKwB,MAAM,CAAC4B,KAAK,CAAC/E,IAAI;QAC9C,OAAO;YACL,OAAO,IAAI,CAACmB,KAAK,CAAC,IAAI,CAACC,IAAI,CAACO,KAAKwB,MAAM,CAAC4B,KAAK,CAAC/E,IAAI;QACpD;IACF;IAEAS,SAASkD,GAAG,EAAE;QACZ,wCAAY;YACV,OAAO0B,OAAOrF,IAAI,CAAC2D,KAAKjD,QAAQ,CAAC;QACnC;;IAGF;IAEAyE,UAAU/D,IAAI,EAAE;QACd,IAAIsD,SAAS,IAAI,CAACxE,gBAAgB,CAACyE,GAAG,CAACvD;QACvC,IAAIsD,QAAQ,OAAOA;QAEnB,wCAAmB;YACjB,IAAIY,UAAUrG,cAAcmC,MAAMV,QAAQ;YAC1C,IAAI,CAACR,gBAAgB,CAAC0E,GAAG,CAACxD,MAAMkE;YAEhC,OAAOA;QACT;;IAKF;IAEAnE,MAAMC,IAAI,EAAE;QACV,IAAIsD,SAAS,IAAI,CAACrE,YAAY,CAACsE,GAAG,CAACvD;QACnC,IAAIsD,QAAQ,OAAOA;QAEnB,IAAI5F,QAAQ,MAAM;YAChBsC,OAAOA,KAAKmE,OAAO,CAAC,OAAO;QAC7B;QAEA,IAAIC,MAAMC,UAAUrE,MAAMmE,OAAO,CAAC,SAASG;QAC3C,IAAI,CAACrF,YAAY,CAACuE,GAAG,CAACxD,MAAMoE;QAE5B,OAAOA;IACT;AACF;AAEAG,OAAOC,OAAO,GAAGtG","ignoreList":[0]}}, + {"offset": {"line": 5311, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/parser.js"],"sourcesContent":["'use strict'\n\nlet AtRule = require('./at-rule')\nlet Comment = require('./comment')\nlet Declaration = require('./declaration')\nlet Root = require('./root')\nlet Rule = require('./rule')\nlet tokenizer = require('./tokenize')\n\nconst SAFE_COMMENT_NEIGHBOR = {\n empty: true,\n space: true\n}\n\nfunction findLastWithPosition(tokens) {\n for (let i = tokens.length - 1; i >= 0; i--) {\n let token = tokens[i]\n let pos = token[3] || token[2]\n if (pos) return pos\n }\n}\n\nclass Parser {\n constructor(input) {\n this.input = input\n\n this.root = new Root()\n this.current = this.root\n this.spaces = ''\n this.semicolon = false\n\n this.createTokenizer()\n this.root.source = { input, start: { column: 1, line: 1, offset: 0 } }\n }\n\n atrule(token) {\n let node = new AtRule()\n node.name = token[1].slice(1)\n if (node.name === '') {\n this.unnamedAtrule(node, token)\n }\n this.init(node, token[2])\n\n let type\n let prev\n let shift\n let last = false\n let open = false\n let params = []\n let brackets = []\n\n while (!this.tokenizer.endOfFile()) {\n token = this.tokenizer.nextToken()\n type = token[0]\n\n if (type === '(' || type === '[') {\n brackets.push(type === '(' ? ')' : ']')\n } else if (type === '{' && brackets.length > 0) {\n brackets.push('}')\n } else if (type === brackets[brackets.length - 1]) {\n brackets.pop()\n }\n\n if (brackets.length === 0) {\n if (type === ';') {\n node.source.end = this.getPosition(token[2])\n node.source.end.offset++\n this.semicolon = true\n break\n } else if (type === '{') {\n open = true\n break\n } else if (type === '}') {\n if (params.length > 0) {\n shift = params.length - 1\n prev = params[shift]\n while (prev && prev[0] === 'space') {\n prev = params[--shift]\n }\n if (prev) {\n node.source.end = this.getPosition(prev[3] || prev[2])\n node.source.end.offset++\n }\n }\n this.end(token)\n break\n } else {\n params.push(token)\n }\n } else {\n params.push(token)\n }\n\n if (this.tokenizer.endOfFile()) {\n last = true\n break\n }\n }\n\n node.raws.between = this.spacesAndCommentsFromEnd(params)\n if (params.length) {\n node.raws.afterName = this.spacesAndCommentsFromStart(params)\n this.raw(node, 'params', params)\n if (last) {\n token = params[params.length - 1]\n node.source.end = this.getPosition(token[3] || token[2])\n node.source.end.offset++\n this.spaces = node.raws.between\n node.raws.between = ''\n }\n } else {\n node.raws.afterName = ''\n node.params = ''\n }\n\n if (open) {\n node.nodes = []\n this.current = node\n }\n }\n\n checkMissedSemicolon(tokens) {\n let colon = this.colon(tokens)\n if (colon === false) return\n\n let founded = 0\n let token\n for (let j = colon - 1; j >= 0; j--) {\n token = tokens[j]\n if (token[0] !== 'space') {\n founded += 1\n if (founded === 2) break\n }\n }\n // If the token is a word, e.g. `!important`, `red` or any other valid property's value.\n // Then we need to return the colon after that word token. [3] is the \"end\" colon of that word.\n // And because we need it after that one we do +1 to get the next one.\n throw this.input.error(\n 'Missed semicolon',\n token[0] === 'word' ? token[3] + 1 : token[2]\n )\n }\n\n colon(tokens) {\n let brackets = 0\n let prev, token, type\n for (let [i, element] of tokens.entries()) {\n token = element\n type = token[0]\n\n if (type === '(') {\n brackets += 1\n }\n if (type === ')') {\n brackets -= 1\n }\n if (brackets === 0 && type === ':') {\n if (!prev) {\n this.doubleColon(token)\n } else if (prev[0] === 'word' && prev[1] === 'progid') {\n continue\n } else {\n return i\n }\n }\n\n prev = token\n }\n return false\n }\n\n comment(token) {\n let node = new Comment()\n this.init(node, token[2])\n node.source.end = this.getPosition(token[3] || token[2])\n node.source.end.offset++\n\n let text = token[1].slice(2, -2)\n if (!text.trim()) {\n node.text = ''\n node.raws.left = text\n node.raws.right = ''\n } else {\n let match = text.match(/^(\\s*)([^]*\\S)(\\s*)$/)\n node.text = match[2]\n node.raws.left = match[1]\n node.raws.right = match[3]\n }\n }\n\n createTokenizer() {\n this.tokenizer = tokenizer(this.input)\n }\n\n decl(tokens, customProperty) {\n let node = new Declaration()\n this.init(node, tokens[0][2])\n\n let last = tokens[tokens.length - 1]\n if (last[0] === ';') {\n this.semicolon = true\n tokens.pop()\n }\n\n node.source.end = this.getPosition(\n last[3] || last[2] || findLastWithPosition(tokens)\n )\n node.source.end.offset++\n\n while (tokens[0][0] !== 'word') {\n if (tokens.length === 1) this.unknownWord(tokens)\n node.raws.before += tokens.shift()[1]\n }\n node.source.start = this.getPosition(tokens[0][2])\n\n node.prop = ''\n while (tokens.length) {\n let type = tokens[0][0]\n if (type === ':' || type === 'space' || type === 'comment') {\n break\n }\n node.prop += tokens.shift()[1]\n }\n\n node.raws.between = ''\n\n let token\n while (tokens.length) {\n token = tokens.shift()\n\n if (token[0] === ':') {\n node.raws.between += token[1]\n break\n } else {\n if (token[0] === 'word' && /\\w/.test(token[1])) {\n this.unknownWord([token])\n }\n node.raws.between += token[1]\n }\n }\n\n if (node.prop[0] === '_' || node.prop[0] === '*') {\n node.raws.before += node.prop[0]\n node.prop = node.prop.slice(1)\n }\n\n let firstSpaces = []\n let next\n while (tokens.length) {\n next = tokens[0][0]\n if (next !== 'space' && next !== 'comment') break\n firstSpaces.push(tokens.shift())\n }\n\n this.precheckMissedSemicolon(tokens)\n\n for (let i = tokens.length - 1; i >= 0; i--) {\n token = tokens[i]\n if (token[1].toLowerCase() === '!important') {\n node.important = true\n let string = this.stringFrom(tokens, i)\n string = this.spacesFromEnd(tokens) + string\n if (string !== ' !important') node.raws.important = string\n break\n } else if (token[1].toLowerCase() === 'important') {\n let cache = tokens.slice(0)\n let str = ''\n for (let j = i; j > 0; j--) {\n let type = cache[j][0]\n if (str.trim().startsWith('!') && type !== 'space') {\n break\n }\n str = cache.pop()[1] + str\n }\n if (str.trim().startsWith('!')) {\n node.important = true\n node.raws.important = str\n tokens = cache\n }\n }\n\n if (token[0] !== 'space' && token[0] !== 'comment') {\n break\n }\n }\n\n let hasWord = tokens.some(i => i[0] !== 'space' && i[0] !== 'comment')\n\n if (hasWord) {\n node.raws.between += firstSpaces.map(i => i[1]).join('')\n firstSpaces = []\n }\n this.raw(node, 'value', firstSpaces.concat(tokens), customProperty)\n\n if (node.value.includes(':') && !customProperty) {\n this.checkMissedSemicolon(tokens)\n }\n }\n\n doubleColon(token) {\n throw this.input.error(\n 'Double colon',\n { offset: token[2] },\n { offset: token[2] + token[1].length }\n )\n }\n\n emptyRule(token) {\n let node = new Rule()\n this.init(node, token[2])\n node.selector = ''\n node.raws.between = ''\n this.current = node\n }\n\n end(token) {\n if (this.current.nodes && this.current.nodes.length) {\n this.current.raws.semicolon = this.semicolon\n }\n this.semicolon = false\n\n this.current.raws.after = (this.current.raws.after || '') + this.spaces\n this.spaces = ''\n\n if (this.current.parent) {\n this.current.source.end = this.getPosition(token[2])\n this.current.source.end.offset++\n this.current = this.current.parent\n } else {\n this.unexpectedClose(token)\n }\n }\n\n endFile() {\n if (this.current.parent) this.unclosedBlock()\n if (this.current.nodes && this.current.nodes.length) {\n this.current.raws.semicolon = this.semicolon\n }\n this.current.raws.after = (this.current.raws.after || '') + this.spaces\n this.root.source.end = this.getPosition(this.tokenizer.position())\n }\n\n freeSemicolon(token) {\n this.spaces += token[1]\n if (this.current.nodes) {\n let prev = this.current.nodes[this.current.nodes.length - 1]\n if (prev && prev.type === 'rule' && !prev.raws.ownSemicolon) {\n prev.raws.ownSemicolon = this.spaces\n this.spaces = ''\n prev.source.end = this.getPosition(token[2])\n prev.source.end.offset += prev.raws.ownSemicolon.length\n }\n }\n }\n\n // Helpers\n\n getPosition(offset) {\n let pos = this.input.fromOffset(offset)\n return {\n column: pos.col,\n line: pos.line,\n offset\n }\n }\n\n init(node, offset) {\n this.current.push(node)\n node.source = {\n input: this.input,\n start: this.getPosition(offset)\n }\n node.raws.before = this.spaces\n this.spaces = ''\n if (node.type !== 'comment') this.semicolon = false\n }\n\n other(start) {\n let end = false\n let type = null\n let colon = false\n let bracket = null\n let brackets = []\n let customProperty = start[1].startsWith('--')\n\n let tokens = []\n let token = start\n while (token) {\n type = token[0]\n tokens.push(token)\n\n if (type === '(' || type === '[') {\n if (!bracket) bracket = token\n brackets.push(type === '(' ? ')' : ']')\n } else if (customProperty && colon && type === '{') {\n if (!bracket) bracket = token\n brackets.push('}')\n } else if (brackets.length === 0) {\n if (type === ';') {\n if (colon) {\n this.decl(tokens, customProperty)\n return\n } else {\n break\n }\n } else if (type === '{') {\n this.rule(tokens)\n return\n } else if (type === '}') {\n this.tokenizer.back(tokens.pop())\n end = true\n break\n } else if (type === ':') {\n colon = true\n }\n } else if (type === brackets[brackets.length - 1]) {\n brackets.pop()\n if (brackets.length === 0) bracket = null\n }\n\n token = this.tokenizer.nextToken()\n }\n\n if (this.tokenizer.endOfFile()) end = true\n if (brackets.length > 0) this.unclosedBracket(bracket)\n\n if (end && colon) {\n if (!customProperty) {\n while (tokens.length) {\n token = tokens[tokens.length - 1][0]\n if (token !== 'space' && token !== 'comment') break\n this.tokenizer.back(tokens.pop())\n }\n }\n this.decl(tokens, customProperty)\n } else {\n this.unknownWord(tokens)\n }\n }\n\n parse() {\n let token\n while (!this.tokenizer.endOfFile()) {\n token = this.tokenizer.nextToken()\n\n switch (token[0]) {\n case 'space':\n this.spaces += token[1]\n break\n\n case ';':\n this.freeSemicolon(token)\n break\n\n case '}':\n this.end(token)\n break\n\n case 'comment':\n this.comment(token)\n break\n\n case 'at-word':\n this.atrule(token)\n break\n\n case '{':\n this.emptyRule(token)\n break\n\n default:\n this.other(token)\n break\n }\n }\n this.endFile()\n }\n\n precheckMissedSemicolon(/* tokens */) {\n // Hook for Safe Parser\n }\n\n raw(node, prop, tokens, customProperty) {\n let token, type\n let length = tokens.length\n let value = ''\n let clean = true\n let next, prev\n\n for (let i = 0; i < length; i += 1) {\n token = tokens[i]\n type = token[0]\n if (type === 'space' && i === length - 1 && !customProperty) {\n clean = false\n } else if (type === 'comment') {\n prev = tokens[i - 1] ? tokens[i - 1][0] : 'empty'\n next = tokens[i + 1] ? tokens[i + 1][0] : 'empty'\n if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) {\n if (value.slice(-1) === ',') {\n clean = false\n } else {\n value += token[1]\n }\n } else {\n clean = false\n }\n } else {\n value += token[1]\n }\n }\n if (!clean) {\n let raw = tokens.reduce((all, i) => all + i[1], '')\n node.raws[prop] = { raw, value }\n }\n node[prop] = value\n }\n\n rule(tokens) {\n tokens.pop()\n\n let node = new Rule()\n this.init(node, tokens[0][2])\n\n node.raws.between = this.spacesAndCommentsFromEnd(tokens)\n this.raw(node, 'selector', tokens)\n this.current = node\n }\n\n spacesAndCommentsFromEnd(tokens) {\n let lastTokenType\n let spaces = ''\n while (tokens.length) {\n lastTokenType = tokens[tokens.length - 1][0]\n if (lastTokenType !== 'space' && lastTokenType !== 'comment') break\n spaces = tokens.pop()[1] + spaces\n }\n return spaces\n }\n\n // Errors\n\n spacesAndCommentsFromStart(tokens) {\n let next\n let spaces = ''\n while (tokens.length) {\n next = tokens[0][0]\n if (next !== 'space' && next !== 'comment') break\n spaces += tokens.shift()[1]\n }\n return spaces\n }\n\n spacesFromEnd(tokens) {\n let lastTokenType\n let spaces = ''\n while (tokens.length) {\n lastTokenType = tokens[tokens.length - 1][0]\n if (lastTokenType !== 'space') break\n spaces = tokens.pop()[1] + spaces\n }\n return spaces\n }\n\n stringFrom(tokens, from) {\n let result = ''\n for (let i = from; i < tokens.length; i++) {\n result += tokens[i][1]\n }\n tokens.splice(from, tokens.length - from)\n return result\n }\n\n unclosedBlock() {\n let pos = this.current.source.start\n throw this.input.error('Unclosed block', pos.line, pos.column)\n }\n\n unclosedBracket(bracket) {\n throw this.input.error(\n 'Unclosed bracket',\n { offset: bracket[2] },\n { offset: bracket[2] + 1 }\n )\n }\n\n unexpectedClose(token) {\n throw this.input.error(\n 'Unexpected }',\n { offset: token[2] },\n { offset: token[2] + 1 }\n )\n }\n\n unknownWord(tokens) {\n throw this.input.error(\n 'Unknown word ' + tokens[0][1],\n { offset: tokens[0][2] },\n { offset: tokens[0][2] + tokens[0][1].length }\n )\n }\n\n unnamedAtrule(node, token) {\n throw this.input.error(\n 'At-rule without name',\n { offset: token[2] },\n { offset: token[2] + token[1].length }\n )\n }\n}\n\nmodule.exports = Parser\n"],"names":["AtRule","Comment","Declaration","Root","Rule","tokenizer","SAFE_COMMENT_NEIGHBOR","empty","space","findLastWithPosition","tokens","i","length","token","pos","Parser","input","root","current","spaces","semicolon","createTokenizer","source","start","column","line","offset","atrule","node","name","slice","unnamedAtrule","init","type","prev","shift","last","open","params","brackets","endOfFile","nextToken","push","pop","end","getPosition","raws","between","spacesAndCommentsFromEnd","afterName","spacesAndCommentsFromStart","raw","nodes","checkMissedSemicolon","colon","founded","j","error","element","entries","doubleColon","comment","text","trim","left","right","match","decl","customProperty","unknownWord","before","prop","test","firstSpaces","next","precheckMissedSemicolon","toLowerCase","important","string","stringFrom","spacesFromEnd","cache","str","startsWith","hasWord","some","map","join","concat","value","includes","emptyRule","selector","after","parent","unexpectedClose","endFile","unclosedBlock","position","freeSemicolon","ownSemicolon","fromOffset","col","other","bracket","rule","back","unclosedBracket","parse","clean","reduce","all","lastTokenType","from","result","splice","module","exports"],"mappings":"AAEA,IAAIA;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AAEJ,MAAMC,wBAAwB;IAC5BC,OAAO;IACPC,OAAO;AACT;AAEA,SAASC,qBAAqBC,MAAM;IAClC,IAAK,IAAIC,IAAID,OAAOE,MAAM,GAAG,GAAGD,KAAK,GAAGA,IAAK;QAC3C,IAAIE,QAAQH,MAAM,CAACC,EAAE;QACrB,IAAIG,MAAMD,KAAK,CAAC,EAAE,IAAIA,KAAK,CAAC,EAAE;QAC9B,IAAIC,KAAK,OAAOA;IAClB;AACF;AAEA,MAAMC;IACJA,YAAYC,KAAK,CAAE;QACjB,IAAI,CAACA,KAAK,GAAGA;QAEb,IAAI,CAACC,IAAI,GAAG,IAAId;QAChB,IAAI,CAACe,OAAO,GAAG,IAAI,CAACD,IAAI;QACxB,IAAI,CAACE,MAAM,GAAG;QACd,IAAI,CAACC,SAAS,GAAG;QAEjB,IAAI,CAACC,eAAe;QACpB,IAAI,CAACJ,IAAI,CAACK,MAAM,GAAG;YAAEN;YAAOO,OAAO;gBAAEC,QAAQ;gBAAGC,MAAM;gBAAGC,QAAQ;YAAE;QAAE;IACvE;IAEAC,OAAOd,KAAK,EAAE;QACZ,IAAIe,OAAO,IAAI5B;QACf4B,KAAKC,IAAI,GAAGhB,KAAK,CAAC,EAAE,CAACiB,KAAK,CAAC;QAC3B,IAAIF,KAAKC,IAAI,KAAK,IAAI;YACpB,IAAI,CAAC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,EAAE,EAC9B;YAAEgB,QAAQhB,MAAM,CAAC,EAAE,CAAC,EAAE;QAAC,GACvB;YAAEgB,QAAQhB,MAAM,CAAC,EAAE,CAAC,EAAE,GAAGA,MAAM,CAAC,EAAE,CAAC,EAAE,CAACE,MAAM;QAAC;IAEjD;IAEAmB,cAAcH,IAAI,EAAEf,KAAK,EAAE;QACzB,MAAM,IAAI,CAACG,KAAK,CAACyC,KAAK,CACpB,wBACA;YAAE/B,QAAQb,KAAK,CAAC,EAAE;QAAC,GACnB;YAAEa,QAAQb,KAAK,CAAC,EAAE,GAAGA,KAAK,CAAC,EAAE,CAACD,MAAM;QAAC;IAEzC;AACF;AAEAwG,OAAOC,OAAO,GAAGtG","ignoreList":[0]}}, + {"offset": {"line": 5853, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/parse.js"],"sourcesContent":["'use strict'\n\nlet Container = require('./container')\nlet Input = require('./input')\nlet Parser = require('./parser')\n\nfunction parse(css, opts) {\n let input = new Input(css, opts)\n let parser = new Parser(input)\n try {\n parser.parse()\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n if (e.name === 'CssSyntaxError' && opts && opts.from) {\n if (/\\.scss$/i.test(opts.from)) {\n e.message +=\n '\\nYou tried to parse SCSS with ' +\n 'the standard CSS parser; ' +\n 'try again with the postcss-scss parser'\n } else if (/\\.sass/i.test(opts.from)) {\n e.message +=\n '\\nYou tried to parse Sass with ' +\n 'the standard CSS parser; ' +\n 'try again with the postcss-sass parser'\n } else if (/\\.less$/i.test(opts.from)) {\n e.message +=\n '\\nYou tried to parse Less with ' +\n 'the standard CSS parser; ' +\n 'try again with the postcss-less parser'\n }\n }\n }\n throw e\n }\n\n return parser.root\n}\n\nmodule.exports = parse\nparse.default = parse\n\nContainer.registerParse(parse)\n"],"names":["Container","Input","Parser","parse","css","opts","input","parser","e","name","from","test","message","root","module","exports","default","registerParse"],"mappings":"AAEA,IAAIA;AACJ,IAAIC;AACJ,IAAIC;AAEJ,SAASC,MAAMC,GAAG,EAAEC,IAAI;IACtB,IAAIC,QAAQ,IAAIL,MAAMG,KAAKC;IAC3B,IAAIE,SAAS,IAAIL,OAAOI;IACxB,IAAI;QACFC,OAAOJ,KAAK;IACd,EAAE,OAAOK,GAAG;QACV,wCAA2C;YACzC,IAAIA,EAAEC,IAAI,KAAK,oBAAoBJ,QAAQA,KAAKK,IAAI,EAAE;gBACpD,IAAI,WAAWC,IAAI,CAACN,KAAKK,IAAI,GAAG;oBAC9BF,EAAEI,OAAO,IACP,oCACA,8BACA;gBACJ,OAAO,IAAI,UAAUD,IAAI,CAACN,KAAKK,IAAI,GAAG;oBACpCF,EAAEI,OAAO,IACP,oCACA,8BACA;gBACJ,OAAO,IAAI,WAAWD,IAAI,CAACN,KAAKK,IAAI,GAAG;oBACrCF,EAAEI,OAAO,IACP,oCACA,8BACA;gBACJ;YACF;QACF;QACA,MAAMJ;IACR;IAEA,OAAOD,OAAOM,IAAI;AACpB;AAEAC,OAAOC,OAAO,GAAGZ;AACjBA,MAAMa,OAAO,GAAGb;AAEhBH,UAAUiB,aAAa,CAACd","ignoreList":[0]}}, + {"offset": {"line": 5884, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/warning.js"],"sourcesContent":["'use strict'\n\nclass Warning {\n constructor(text, opts = {}) {\n this.type = 'warning'\n this.text = text\n\n if (opts.node && opts.node.source) {\n let range = opts.node.rangeBy(opts)\n this.line = range.start.line\n this.column = range.start.column\n this.endLine = range.end.line\n this.endColumn = range.end.column\n }\n\n for (let opt in opts) this[opt] = opts[opt]\n }\n\n toString() {\n if (this.node) {\n return this.node.error(this.text, {\n index: this.index,\n plugin: this.plugin,\n word: this.word\n }).message\n }\n\n if (this.plugin) {\n return this.plugin + ': ' + this.text\n }\n\n return this.text\n }\n}\n\nmodule.exports = Warning\nWarning.default = Warning\n"],"names":["Warning","text","opts","type","node","source","range","rangeBy","line","start","column","endLine","end","endColumn","opt","toString","error","index","plugin","word","message","module","exports","default"],"mappings":"AAEA,MAAMA;IACJA,YAAYC,IAAI,EAAEC,OAAO,CAAC,CAAC,CAAE;QAC3B,IAAI,CAACC,IAAI,GAAG;QACZ,IAAI,CAACF,IAAI,GAAGA;QAEZ,IAAIC,KAAKE,IAAI,IAAIF,KAAKE,IAAI,CAACC,MAAM,EAAE;YACjC,IAAIC,QAAQJ,KAAKE,IAAI,CAACG,OAAO,CAACL;YAC9B,IAAI,CAACM,IAAI,GAAGF,MAAMG,KAAK,CAACD,IAAI;YAC5B,IAAI,CAACE,MAAM,GAAGJ,MAAMG,KAAK,CAACC,MAAM;YAChC,IAAI,CAACC,OAAO,GAAGL,MAAMM,GAAG,CAACJ,IAAI;YAC7B,IAAI,CAACK,SAAS,GAAGP,MAAMM,GAAG,CAACF,MAAM;QACnC;QAEA,IAAK,IAAII,OAAOZ,KAAM,IAAI,CAACY,IAAI,GAAGZ,IAAI,CAACY,IAAI;IAC7C;IAEAC,WAAW;QACT,IAAI,IAAI,CAACX,IAAI,EAAE;YACb,OAAO,IAAI,CAACA,IAAI,CAACY,KAAK,CAAC,IAAI,CAACf,IAAI,EAAE;gBAChCgB,OAAO,IAAI,CAACA,KAAK;gBACjBC,QAAQ,IAAI,CAACA,MAAM;gBACnBC,MAAM,IAAI,CAACA,IAAI;YACjB,GAAGC,OAAO;QACZ;QAEA,IAAI,IAAI,CAACF,MAAM,EAAE;YACf,OAAO,IAAI,CAACA,MAAM,GAAG,OAAO,IAAI,CAACjB,IAAI;QACvC;QAEA,OAAO,IAAI,CAACA,IAAI;IAClB;AACF;AAEAoB,OAAOC,OAAO,GAAGtB;AACjBA,QAAQuB,OAAO,GAAGvB","ignoreList":[0]}}, + {"offset": {"line": 5917, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/result.js"],"sourcesContent":["'use strict'\n\nlet Warning = require('./warning')\n\nclass Result {\n get content() {\n return this.css\n }\n\n constructor(processor, root, opts) {\n this.processor = processor\n this.messages = []\n this.root = root\n this.opts = opts\n this.css = ''\n this.map = undefined\n }\n\n toString() {\n return this.css\n }\n\n warn(text, opts = {}) {\n if (!opts.plugin) {\n if (this.lastPlugin && this.lastPlugin.postcssPlugin) {\n opts.plugin = this.lastPlugin.postcssPlugin\n }\n }\n\n let warning = new Warning(text, opts)\n this.messages.push(warning)\n\n return warning\n }\n\n warnings() {\n return this.messages.filter(i => i.type === 'warning')\n }\n}\n\nmodule.exports = Result\nResult.default = Result\n"],"names":["Warning","Result","content","css","processor","root","opts","messages","map","undefined","toString","warn","text","plugin","lastPlugin","postcssPlugin","warning","push","warnings","filter","i","type","module","exports","default"],"mappings":"AAEA,IAAIA;AAEJ,MAAMC;IACJ,IAAIC,UAAU;QACZ,OAAO,IAAI,CAACC,GAAG;IACjB;IAEAF,YAAYG,SAAS,EAAEC,IAAI,EAAEC,IAAI,CAAE;QACjC,IAAI,CAACF,SAAS,GAAGA;QACjB,IAAI,CAACG,QAAQ,GAAG,EAAE;QAClB,IAAI,CAACF,IAAI,GAAGA;QACZ,IAAI,CAACC,IAAI,GAAGA;QACZ,IAAI,CAACH,GAAG,GAAG;QACX,IAAI,CAACK,GAAG,GAAGC;IACb;IAEAC,WAAW;QACT,OAAO,IAAI,CAACP,GAAG;IACjB;IAEAQ,KAAKC,IAAI,EAAEN,OAAO,CAAC,CAAC,EAAE;QACpB,IAAI,CAACA,KAAKO,MAAM,EAAE;YAChB,IAAI,IAAI,CAACC,UAAU,IAAI,IAAI,CAACA,UAAU,CAACC,aAAa,EAAE;gBACpDT,KAAKO,MAAM,GAAG,IAAI,CAACC,UAAU,CAACC,aAAa;YAC7C;QACF;QAEA,IAAIC,UAAU,IAAIhB,QAAQY,MAAMN;QAChC,IAAI,CAACC,QAAQ,CAACU,IAAI,CAACD;QAEnB,OAAOA;IACT;IAEAE,WAAW;QACT,OAAO,IAAI,CAACX,QAAQ,CAACY,MAAM,CAACC,CAAAA,IAAKA,EAAEC,IAAI,KAAK;IAC9C;AACF;AAEAC,OAAOC,OAAO,GAAGtB;AACjBA,OAAOuB,OAAO,GAAGvB","ignoreList":[0]}}, + {"offset": {"line": 5953, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/warn-once.js"],"sourcesContent":["/* eslint-disable no-console */\n'use strict'\n\nlet printed = {}\n\nmodule.exports = function warnOnce(message) {\n if (printed[message]) return\n printed[message] = true\n\n if (typeof console !== 'undefined' && console.warn) {\n console.warn(message)\n }\n}\n"],"names":["printed","module","exports","warnOnce","message","console","warn"],"mappings":"AAAA,6BAA6B,GAG7B,IAAIA,UAAU,CAAC;AAEfC,OAAOC,OAAO,GAAG,SAASC,SAASC,OAAO;IACxC,IAAIJ,OAAO,CAACI,QAAQ,EAAE;IACtBJ,OAAO,CAACI,QAAQ,GAAG;IAEnB,IAAI,OAAOC,YAAY,eAAeA,QAAQC,IAAI,EAAE;QAClDD,QAAQC,IAAI,CAACF;IACf;AACF","ignoreList":[0]}}, + {"offset": {"line": 5965, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/lazy-result.js"],"sourcesContent":["'use strict'\n\nlet Container = require('./container')\nlet Document = require('./document')\nlet MapGenerator = require('./map-generator')\nlet parse = require('./parse')\nlet Result = require('./result')\nlet Root = require('./root')\nlet stringify = require('./stringify')\nlet { isClean, my } = require('./symbols')\nlet warnOnce = require('./warn-once')\n\nconst TYPE_TO_CLASS_NAME = {\n atrule: 'AtRule',\n comment: 'Comment',\n decl: 'Declaration',\n document: 'Document',\n root: 'Root',\n rule: 'Rule'\n}\n\nconst PLUGIN_PROPS = {\n AtRule: true,\n AtRuleExit: true,\n Comment: true,\n CommentExit: true,\n Declaration: true,\n DeclarationExit: true,\n Document: true,\n DocumentExit: true,\n Once: true,\n OnceExit: true,\n postcssPlugin: true,\n prepare: true,\n Root: true,\n RootExit: true,\n Rule: true,\n RuleExit: true\n}\n\nconst NOT_VISITORS = {\n Once: true,\n postcssPlugin: true,\n prepare: true\n}\n\nconst CHILDREN = 0\n\nfunction isPromise(obj) {\n return typeof obj === 'object' && typeof obj.then === 'function'\n}\n\nfunction getEvents(node) {\n let key = false\n let type = TYPE_TO_CLASS_NAME[node.type]\n if (node.type === 'decl') {\n key = node.prop.toLowerCase()\n } else if (node.type === 'atrule') {\n key = node.name.toLowerCase()\n }\n\n if (key && node.append) {\n return [\n type,\n type + '-' + key,\n CHILDREN,\n type + 'Exit',\n type + 'Exit-' + key\n ]\n } else if (key) {\n return [type, type + '-' + key, type + 'Exit', type + 'Exit-' + key]\n } else if (node.append) {\n return [type, CHILDREN, type + 'Exit']\n } else {\n return [type, type + 'Exit']\n }\n}\n\nfunction toStack(node) {\n let events\n if (node.type === 'document') {\n events = ['Document', CHILDREN, 'DocumentExit']\n } else if (node.type === 'root') {\n events = ['Root', CHILDREN, 'RootExit']\n } else {\n events = getEvents(node)\n }\n\n return {\n eventIndex: 0,\n events,\n iterator: 0,\n node,\n visitorIndex: 0,\n visitors: []\n }\n}\n\nfunction cleanMarks(node) {\n node[isClean] = false\n if (node.nodes) node.nodes.forEach(i => cleanMarks(i))\n return node\n}\n\nlet postcss = {}\n\nclass LazyResult {\n get content() {\n return this.stringify().content\n }\n\n get css() {\n return this.stringify().css\n }\n\n get map() {\n return this.stringify().map\n }\n\n get messages() {\n return this.sync().messages\n }\n\n get opts() {\n return this.result.opts\n }\n\n get processor() {\n return this.result.processor\n }\n\n get root() {\n return this.sync().root\n }\n\n get [Symbol.toStringTag]() {\n return 'LazyResult'\n }\n\n constructor(processor, css, opts) {\n this.stringified = false\n this.processed = false\n\n let root\n if (\n typeof css === 'object' &&\n css !== null &&\n (css.type === 'root' || css.type === 'document')\n ) {\n root = cleanMarks(css)\n } else if (css instanceof LazyResult || css instanceof Result) {\n root = cleanMarks(css.root)\n if (css.map) {\n if (typeof opts.map === 'undefined') opts.map = {}\n if (!opts.map.inline) opts.map.inline = false\n opts.map.prev = css.map\n }\n } else {\n let parser = parse\n if (opts.syntax) parser = opts.syntax.parse\n if (opts.parser) parser = opts.parser\n if (parser.parse) parser = parser.parse\n\n try {\n root = parser(css, opts)\n } catch (error) {\n this.processed = true\n this.error = error\n }\n\n if (root && !root[my]) {\n /* c8 ignore next 2 */\n Container.rebuild(root)\n }\n }\n\n this.result = new Result(processor, root, opts)\n this.helpers = { ...postcss, postcss, result: this.result }\n this.plugins = this.processor.plugins.map(plugin => {\n if (typeof plugin === 'object' && plugin.prepare) {\n return { ...plugin, ...plugin.prepare(this.result) }\n } else {\n return plugin\n }\n })\n }\n\n async() {\n if (this.error) return Promise.reject(this.error)\n if (this.processed) return Promise.resolve(this.result)\n if (!this.processing) {\n this.processing = this.runAsync()\n }\n return this.processing\n }\n\n catch(onRejected) {\n return this.async().catch(onRejected)\n }\n\n finally(onFinally) {\n return this.async().then(onFinally, onFinally)\n }\n\n getAsyncError() {\n throw new Error('Use process(css).then(cb) to work with async plugins')\n }\n\n handleError(error, node) {\n let plugin = this.result.lastPlugin\n try {\n if (node) node.addToError(error)\n this.error = error\n if (error.name === 'CssSyntaxError' && !error.plugin) {\n error.plugin = plugin.postcssPlugin\n error.setMessage()\n } else if (plugin.postcssVersion) {\n if (process.env.NODE_ENV !== 'production') {\n let pluginName = plugin.postcssPlugin\n let pluginVer = plugin.postcssVersion\n let runtimeVer = this.result.processor.version\n let a = pluginVer.split('.')\n let b = runtimeVer.split('.')\n\n if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) {\n // eslint-disable-next-line no-console\n console.error(\n 'Unknown error from PostCSS plugin. Your current PostCSS ' +\n 'version is ' +\n runtimeVer +\n ', but ' +\n pluginName +\n ' uses ' +\n pluginVer +\n '. Perhaps this is the source of the error below.'\n )\n }\n }\n }\n } catch (err) {\n /* c8 ignore next 3 */\n // eslint-disable-next-line no-console\n if (console && console.error) console.error(err)\n }\n return error\n }\n\n prepareVisitors() {\n this.listeners = {}\n let add = (plugin, type, cb) => {\n if (!this.listeners[type]) this.listeners[type] = []\n this.listeners[type].push([plugin, cb])\n }\n for (let plugin of this.plugins) {\n if (typeof plugin === 'object') {\n for (let event in plugin) {\n if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) {\n throw new Error(\n `Unknown event ${event} in ${plugin.postcssPlugin}. ` +\n `Try to update PostCSS (${this.processor.version} now).`\n )\n }\n if (!NOT_VISITORS[event]) {\n if (typeof plugin[event] === 'object') {\n for (let filter in plugin[event]) {\n if (filter === '*') {\n add(plugin, event, plugin[event][filter])\n } else {\n add(\n plugin,\n event + '-' + filter.toLowerCase(),\n plugin[event][filter]\n )\n }\n }\n } else if (typeof plugin[event] === 'function') {\n add(plugin, event, plugin[event])\n }\n }\n }\n }\n }\n this.hasListener = Object.keys(this.listeners).length > 0\n }\n\n async runAsync() {\n this.plugin = 0\n for (let i = 0; i < this.plugins.length; i++) {\n let plugin = this.plugins[i]\n let promise = this.runOnRoot(plugin)\n if (isPromise(promise)) {\n try {\n await promise\n } catch (error) {\n throw this.handleError(error)\n }\n }\n }\n\n this.prepareVisitors()\n if (this.hasListener) {\n let root = this.result.root\n while (!root[isClean]) {\n root[isClean] = true\n let stack = [toStack(root)]\n while (stack.length > 0) {\n let promise = this.visitTick(stack)\n if (isPromise(promise)) {\n try {\n await promise\n } catch (e) {\n let node = stack[stack.length - 1].node\n throw this.handleError(e, node)\n }\n }\n }\n }\n\n if (this.listeners.OnceExit) {\n for (let [plugin, visitor] of this.listeners.OnceExit) {\n this.result.lastPlugin = plugin\n try {\n if (root.type === 'document') {\n let roots = root.nodes.map(subRoot =>\n visitor(subRoot, this.helpers)\n )\n\n await Promise.all(roots)\n } else {\n await visitor(root, this.helpers)\n }\n } catch (e) {\n throw this.handleError(e)\n }\n }\n }\n }\n\n this.processed = true\n return this.stringify()\n }\n\n runOnRoot(plugin) {\n this.result.lastPlugin = plugin\n try {\n if (typeof plugin === 'object' && plugin.Once) {\n if (this.result.root.type === 'document') {\n let roots = this.result.root.nodes.map(root =>\n plugin.Once(root, this.helpers)\n )\n\n if (isPromise(roots[0])) {\n return Promise.all(roots)\n }\n\n return roots\n }\n\n return plugin.Once(this.result.root, this.helpers)\n } else if (typeof plugin === 'function') {\n return plugin(this.result.root, this.result)\n }\n } catch (error) {\n throw this.handleError(error)\n }\n }\n\n stringify() {\n if (this.error) throw this.error\n if (this.stringified) return this.result\n this.stringified = true\n\n this.sync()\n\n let opts = this.result.opts\n let str = stringify\n if (opts.syntax) str = opts.syntax.stringify\n if (opts.stringifier) str = opts.stringifier\n if (str.stringify) str = str.stringify\n\n let map = new MapGenerator(str, this.result.root, this.result.opts)\n let data = map.generate()\n this.result.css = data[0]\n this.result.map = data[1]\n\n return this.result\n }\n\n sync() {\n if (this.error) throw this.error\n if (this.processed) return this.result\n this.processed = true\n\n if (this.processing) {\n throw this.getAsyncError()\n }\n\n for (let plugin of this.plugins) {\n let promise = this.runOnRoot(plugin)\n if (isPromise(promise)) {\n throw this.getAsyncError()\n }\n }\n\n this.prepareVisitors()\n if (this.hasListener) {\n let root = this.result.root\n while (!root[isClean]) {\n root[isClean] = true\n this.walkSync(root)\n }\n if (this.listeners.OnceExit) {\n if (root.type === 'document') {\n for (let subRoot of root.nodes) {\n this.visitSync(this.listeners.OnceExit, subRoot)\n }\n } else {\n this.visitSync(this.listeners.OnceExit, root)\n }\n }\n }\n\n return this.result\n }\n\n then(onFulfilled, onRejected) {\n if (process.env.NODE_ENV !== 'production') {\n if (!('from' in this.opts)) {\n warnOnce(\n 'Without `from` option PostCSS could generate wrong source map ' +\n 'and will not find Browserslist config. Set it to CSS file path ' +\n 'or to `undefined` to prevent this warning.'\n )\n }\n }\n return this.async().then(onFulfilled, onRejected)\n }\n\n toString() {\n return this.css\n }\n\n visitSync(visitors, node) {\n for (let [plugin, visitor] of visitors) {\n this.result.lastPlugin = plugin\n let promise\n try {\n promise = visitor(node, this.helpers)\n } catch (e) {\n throw this.handleError(e, node.proxyOf)\n }\n if (node.type !== 'root' && node.type !== 'document' && !node.parent) {\n return true\n }\n if (isPromise(promise)) {\n throw this.getAsyncError()\n }\n }\n }\n\n visitTick(stack) {\n let visit = stack[stack.length - 1]\n let { node, visitors } = visit\n\n if (node.type !== 'root' && node.type !== 'document' && !node.parent) {\n stack.pop()\n return\n }\n\n if (visitors.length > 0 && visit.visitorIndex < visitors.length) {\n let [plugin, visitor] = visitors[visit.visitorIndex]\n visit.visitorIndex += 1\n if (visit.visitorIndex === visitors.length) {\n visit.visitors = []\n visit.visitorIndex = 0\n }\n this.result.lastPlugin = plugin\n try {\n return visitor(node.toProxy(), this.helpers)\n } catch (e) {\n throw this.handleError(e, node)\n }\n }\n\n if (visit.iterator !== 0) {\n let iterator = visit.iterator\n let child\n while ((child = node.nodes[node.indexes[iterator]])) {\n node.indexes[iterator] += 1\n if (!child[isClean]) {\n child[isClean] = true\n stack.push(toStack(child))\n return\n }\n }\n visit.iterator = 0\n delete node.indexes[iterator]\n }\n\n let events = visit.events\n while (visit.eventIndex < events.length) {\n let event = events[visit.eventIndex]\n visit.eventIndex += 1\n if (event === CHILDREN) {\n if (node.nodes && node.nodes.length) {\n node[isClean] = true\n visit.iterator = node.getIterator()\n }\n return\n } else if (this.listeners[event]) {\n visit.visitors = this.listeners[event]\n return\n }\n }\n stack.pop()\n }\n\n walkSync(node) {\n node[isClean] = true\n let events = getEvents(node)\n for (let event of events) {\n if (event === CHILDREN) {\n if (node.nodes) {\n node.each(child => {\n if (!child[isClean]) this.walkSync(child)\n })\n }\n } else {\n let visitors = this.listeners[event]\n if (visitors) {\n if (this.visitSync(visitors, node.toProxy())) return\n }\n }\n }\n }\n\n warnings() {\n return this.sync().warnings()\n }\n}\n\nLazyResult.registerPostcss = dependant => {\n postcss = dependant\n}\n\nmodule.exports = LazyResult\nLazyResult.default = LazyResult\n\nRoot.registerLazyResult(LazyResult)\nDocument.registerLazyResult(LazyResult)\n"],"names":["Container","Document","MapGenerator","parse","Result","Root","stringify","isClean","my","warnOnce","TYPE_TO_CLASS_NAME","atrule","comment","decl","document","root","rule","PLUGIN_PROPS","AtRule","AtRuleExit","Comment","CommentExit","Declaration","DeclarationExit","DocumentExit","Once","OnceExit","postcssPlugin","prepare","RootExit","Rule","RuleExit","NOT_VISITORS","CHILDREN","isPromise","obj","then","getEvents","node","key","type","prop","toLowerCase","name","append","toStack","events","eventIndex","iterator","visitorIndex","visitors","cleanMarks","nodes","forEach","i","postcss","LazyResult","content","css","map","messages","sync","opts","result","processor","Symbol","toStringTag","stringified","processed","inline","prev","parser","syntax","error","rebuild","helpers","plugins","plugin","async","Promise","reject","resolve","processing","runAsync","catch","onRejected","finally","onFinally","getAsyncError","Error","handleError","lastPlugin","addToError","setMessage","postcssVersion","pluginName","pluginVer","runtimeVer","version","a","split","b","parseInt","console","err","prepareVisitors","listeners","add","cb","push","event","test","filter","hasListener","Object","keys","length","promise","runOnRoot","stack","visitTick","e","visitor","roots","subRoot","all","str","stringifier","data","generate","walkSync","visitSync","onFulfilled","toString","proxyOf","parent","visit","pop","toProxy","child","indexes","getIterator","each","warnings","registerPostcss","dependant","module","exports","default","registerLazyResult"],"mappings":"AAEA,IAAIA;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAI,EAAEC,OAAO,EAAEC,EAAE,EAAE;AACnB,IAAIC;AAEJ,MAAMC,qBAAqB;IACzBC,QAAQ;IACRC,SAAS;IACTC,MAAM;IACNC,UAAU;IACVC,MAAM;IACNC,MAAM;AACR;AAEA,MAAMC,eAAe;IACnBC,QAAQ;IACRC,YAAY;IACZC,SAAS;IACTC,aAAa;IACbC,aAAa;IACbC,iBAAiB;IACjBtB,UAAU;IACVuB,cAAc;IACdC,MAAM;IACNC,UAAU;IACVC,eAAe;IACfC,SAAS;IACTvB,MAAM;IACNwB,UAAU;IACVC,MAAM;IACNC,UAAU;AACZ;AAEA,MAAMC,eAAe;IACnBP,MAAM;IACNE,eAAe;IACfC,SAAS;AACX;AAEA,MAAMK,WAAW;AAEjB,SAASC,UAAUC,GAAG;IAC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AAC;YACpCyF,MAAMzF,UAAU,IAAI;YACpB,IAAI+D,UAAU7E,UAAU;gBACtB,IAAIK,KAAKc,KAAK,IAAId,KAAKc,KAAK,CAACgE,MAAM,EAAE;oBACnC9E,IAAI,CAAC/B,QAAQ,GAAG;oBAChBiI,MAAMxF,QAAQ,GAAGV,KAAKuG,WAAW;gBACnC;gBACA;YACF,OAAO,IAAI,IAAI,CAACnC,SAAS,CAACI,MAAM,EAAE;gBAChC0B,MAAMtF,QAAQ,GAAG,IAAI,CAACwD,SAAS,CAACI,MAAM;gBACtC;YACF;QACF;QACAS,MAAMkB,GAAG;IACX;IAEAP,SAAS5F,IAAI,EAAE;QACbA,IAAI,CAAC/B,QAAQ,GAAG;QAChB,IAAIuC,SAAST,UAAUC;QACvB,KAAK,IAAIwE,SAAShE,OAAQ;YACxB,IAAIgE,UAAU7E,UAAU;gBACtB,IAAIK,KAAKc,KAAK,EAAE;oBACdd,KAAKwG,IAAI,CAACH,CAAAA;wBACR,IAAI,CAACA,KAAK,CAACpI,QAAQ,EAAE,IAAI,CAAC2H,QAAQ,CAACS;oBACrC;gBACF;YACF,OAAO;gBACL,IAAIzF,WAAW,IAAI,CAACwD,SAAS,CAACI,MAAM;gBACpC,IAAI5D,UAAU;oBACZ,IAAI,IAAI,CAACiF,SAAS,CAACjF,UAAUZ,KAAKoG,OAAO,KAAK;gBAChD;YACF;QACF;IACF;IAEAK,WAAW;QACT,OAAO,IAAI,CAAClF,IAAI,GAAGkF,QAAQ;IAC7B;AACF;AAEAvF,WAAWwF,eAAe,GAAGC,CAAAA;IAC3B1F,UAAU0F;AACZ;AAEAC,OAAOC,OAAO,GAAG3F;AACjBA,WAAW4F,OAAO,GAAG5F;AAErBnD,KAAKgJ,kBAAkB,CAAC7F;AACxBvD,SAASoJ,kBAAkB,CAAC7F","ignoreList":[0]}}, + {"offset": {"line": 6456, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/no-work-result.js"],"sourcesContent":["'use strict'\n\nlet MapGenerator = require('./map-generator')\nlet parse = require('./parse')\nconst Result = require('./result')\nlet stringify = require('./stringify')\nlet warnOnce = require('./warn-once')\n\nclass NoWorkResult {\n get content() {\n return this.result.css\n }\n\n get css() {\n return this.result.css\n }\n\n get map() {\n return this.result.map\n }\n\n get messages() {\n return []\n }\n\n get opts() {\n return this.result.opts\n }\n\n get processor() {\n return this.result.processor\n }\n\n get root() {\n if (this._root) {\n return this._root\n }\n\n let root\n let parser = parse\n\n try {\n root = parser(this._css, this._opts)\n } catch (error) {\n this.error = error\n }\n\n if (this.error) {\n throw this.error\n } else {\n this._root = root\n return root\n }\n }\n\n get [Symbol.toStringTag]() {\n return 'NoWorkResult'\n }\n\n constructor(processor, css, opts) {\n css = css.toString()\n this.stringified = false\n\n this._processor = processor\n this._css = css\n this._opts = opts\n this._map = undefined\n\n let str = stringify\n this.result = new Result(this._processor, undefined, this._opts)\n this.result.css = css\n\n let self = this\n Object.defineProperty(this.result, 'root', {\n get() {\n return self.root\n }\n })\n\n let map = new MapGenerator(str, undefined, this._opts, css)\n if (map.isMap()) {\n let [generatedCSS, generatedMap] = map.generate()\n if (generatedCSS) {\n this.result.css = generatedCSS\n }\n if (generatedMap) {\n this.result.map = generatedMap\n }\n } else {\n map.clearAnnotation()\n this.result.css = map.css\n }\n }\n\n async() {\n if (this.error) return Promise.reject(this.error)\n return Promise.resolve(this.result)\n }\n\n catch(onRejected) {\n return this.async().catch(onRejected)\n }\n\n finally(onFinally) {\n return this.async().then(onFinally, onFinally)\n }\n\n sync() {\n if (this.error) throw this.error\n return this.result\n }\n\n then(onFulfilled, onRejected) {\n if (process.env.NODE_ENV !== 'production') {\n if (!('from' in this._opts)) {\n warnOnce(\n 'Without `from` option PostCSS could generate wrong source map ' +\n 'and will not find Browserslist config. Set it to CSS file path ' +\n 'or to `undefined` to prevent this warning.'\n )\n }\n }\n\n return this.async().then(onFulfilled, onRejected)\n }\n\n toString() {\n return this._css\n }\n\n warnings() {\n return []\n }\n}\n\nmodule.exports = NoWorkResult\nNoWorkResult.default = NoWorkResult\n"],"names":["MapGenerator","parse","Result","stringify","warnOnce","NoWorkResult","content","result","css","map","messages","opts","processor","root","_root","parser","_css","_opts","error","Symbol","toStringTag","toString","stringified","_processor","_map","undefined","str","self","Object","defineProperty","get","isMap","generatedCSS","generatedMap","generate","clearAnnotation","async","Promise","reject","resolve","catch","onRejected","finally","onFinally","then","sync","onFulfilled","warnings","module","exports","default"],"mappings":"AAEA,IAAIA;AACJ,IAAIC;AACJ,MAAMC;AACN,IAAIC;AACJ,IAAIC;AAEJ,MAAMC;IACJ,IAAIC,UAAU;QACZ,OAAO,IAAI,CAACC,MAAM,CAACC,GAAG;IACxB;IAEA,IAAIA,MAAM;QACR,OAAO,IAAI,CAACD,MAAM,CAACC,GAAG;IACxB;IAEA,IAAIC,MAAM;QACR,OAAO,IAAI,CAACF,MAAM,CAACE,GAAG;IACxB;IAEA,IAAIC,WAAW;QACb,OAAO,EAAE;IACX;IAEA,IAAIC,OAAO;QACT,OAAO,IAAI,CAACJ,MAAM,CAACI,IAAI;IACzB;IAEA,IAAIC,YAAY;QACd,OAAO,IAAI,CAACL,MAAM,CAACK,SAAS;IAC9B;IAEA,IAAIC,OAAO;QACT,IAAI,IAAI,CAACC,KAAK,EAAE;YACd,OAAO,IAAI,CAACA,KAAK;QACnB;QAEA,IAAID;QACJ,IAAIE,SAASd;QAEb,IAAI;YACFY,OAAOE,OAAO,IAAI,CAACC,IAAI,EAAE,IAAI,CAACC,KAAK;QACrC,EAAE,OAAOC,OAAO;YACd,IAAI,CAACA,KAAK,GAAGA;QACf;QAEA,IAAI,IAAI,CAACA,KAAK,EAAE;YACd,MAAM,IAAI,CAACA,KAAK;QAClB,OAAO;YACL,IAAI,CAACJ,KAAK,GAAGD;YACb,OAAOA;QACT;IACF;IAEA,IAAI,CAACM,OAAOC,WAAW,CAAC,GAAG;QACzB,OAAO;IACT;IAEAf,YAAYO,SAAS,EAAEJ,GAAG,EAA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EAE,OAAO;QACL,IAAI,IAAI,CAAC3B,KAAK,EAAE,MAAM,IAAI,CAACA,KAAK;QAChC,OAAO,IAAI,CAACX,MAAM;IACpB;IAEAqC,KAAKE,WAAW,EAAEL,UAAU,EAAE;QAC5B,wCAA2C;YACzC,IAAI,CAAC,CAAC,UAAU,IAAI,CAACxB,KAAK,GAAG;gBAC3Bb,SACE,mEACE,oEACA;YAEN;QACF;QAEA,OAAO,IAAI,CAACgC,KAAK,GAAGQ,IAAI,CAACE,aAAaL;IACxC;IAEApB,WAAW;QACT,OAAO,IAAI,CAACL,IAAI;IAClB;IAEA+B,WAAW;QACT,OAAO,EAAE;IACX;AACF;AAEAC,OAAOC,OAAO,GAAG5C;AACjBA,aAAa6C,OAAO,GAAG7C","ignoreList":[0]}}, + {"offset": {"line": 6566, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/processor.js"],"sourcesContent":["'use strict'\n\nlet Document = require('./document')\nlet LazyResult = require('./lazy-result')\nlet NoWorkResult = require('./no-work-result')\nlet Root = require('./root')\n\nclass Processor {\n constructor(plugins = []) {\n this.version = '8.5.8'\n this.plugins = this.normalize(plugins)\n }\n\n normalize(plugins) {\n let normalized = []\n for (let i of plugins) {\n if (i.postcss === true) {\n i = i()\n } else if (i.postcss) {\n i = i.postcss\n }\n\n if (typeof i === 'object' && Array.isArray(i.plugins)) {\n normalized = normalized.concat(i.plugins)\n } else if (typeof i === 'object' && i.postcssPlugin) {\n normalized.push(i)\n } else if (typeof i === 'function') {\n normalized.push(i)\n } else if (typeof i === 'object' && (i.parse || i.stringify)) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(\n 'PostCSS syntaxes cannot be used as plugins. Instead, please use ' +\n 'one of the syntax/parser/stringifier options as outlined ' +\n 'in your PostCSS runner documentation.'\n )\n }\n } else {\n throw new Error(i + ' is not a PostCSS plugin')\n }\n }\n return normalized\n }\n\n process(css, opts = {}) {\n if (\n !this.plugins.length &&\n !opts.parser &&\n !opts.stringifier &&\n !opts.syntax\n ) {\n return new NoWorkResult(this, css, opts)\n } else {\n return new LazyResult(this, css, opts)\n }\n }\n\n use(plugin) {\n this.plugins = this.plugins.concat(this.normalize([plugin]))\n return this\n }\n}\n\nmodule.exports = Processor\nProcessor.default = Processor\n\nRoot.registerProcessor(Processor)\nDocument.registerProcessor(Processor)\n"],"names":["Document","LazyResult","NoWorkResult","Root","Processor","plugins","version","normalize","normalized","i","postcss","Array","isArray","concat","postcssPlugin","push","parse","stringify","Error","process","css","opts","length","parser","stringifier","syntax","use","plugin","module","exports","default","registerProcessor"],"mappings":"AAEA,IAAIA;AACJ,IAAIC;AACJ,IAAIC;AACJ,IAAIC;AAEJ,MAAMC;IACJA,YAAYC,UAAU,EAAE,CAAE;QACxB,IAAI,CAACC,OAAO,GAAG;QACf,IAAI,CAACD,OAAO,GAAG,IAAI,CAACE,SAAS,CAACF;IAChC;IAEAE,UAAUF,OAAO,EAAE;QACjB,IAAIG,aAAa,EAAE;QACnB,KAAK,IAAIC,KAAKJ,QAAS;YACrB,IAAII,EAAEC,OAAO,KAAK,MAAM;gBACtBD,IAAIA;YACN,OAAO,IAAIA,EAAEC,OAAO,EAAE;gBACpBD,IAAIA,EAAEC,OAAO;YACf;YAEA,IAAI,OAAOD,MAAM,YAAYE,MAAMC,OAAO,CAACH,EAAEJ,OAAO,GAAG;gBACrDG,aAAaA,WAAWK,MAAM,CAACJ,EAAEJ,OAAO;YAC1C,OAAO,IAAI,OAAOI,MAAM,YAAYA,EAAEK,aAAa,EAAE;gBACnDN,WAAWO,IAAI,CAACN;YAClB,OAAO,IAAI,OAAOA,MAAM,YAAY;gBAClCD,WAAWO,IAAI,CAACN;YAClB,OAAO,IAAI,OAAOA,MAAM,YAAY,CAACA,EAAEO,KAAK,IAAIP,EAAEQ,SAAS,GAAG;gBAC5D,wCAA2C;oBACzC,MAAM,IAAIC,MACR,qEACE,8DACA;gBAEN;YACF,OAAO;gBACL,MAAM,IAAIA,MAAMT,IAAI;YACtB;QACF;QACA,OAAOD;IACT;IAEAW,QAAQC,GAAG,EAAEC,OAAO,CAAC,CAAC,EAAE;QACtB,IACE,CAAC,IAAI,CAAChB,OAAO,CAACiB,MAAM,IACpB,CAACD,KAAKE,MAAM,IACZ,CAACF,KAAKG,WAAW,IACjB,CAACH,KAAKI,MAAM,EACZ;YACA,OAAO,IAAIvB,aAAa,IAAI,EAAEkB,KAAKC;QACrC,OAAO;YACL,OAAO,IAAIpB,WAAW,IAAI,EAAEmB,KAAKC;QACnC;IACF;IAEAK,IAAIC,MAAM,EAAE;QACV,IAAI,CAACtB,OAAO,GAAG,IAAI,CAACA,OAAO,CAACQ,MAAM,CAAC,IAAI,CAACN,SAAS,CAAC;YAACoB;SAAO;QAC1D,OAAO,IAAI;IACb;AACF;AAEAC,OAAOC,OAAO,GAAGzB;AACjBA,UAAU0B,OAAO,GAAG1B;AAEpBD,KAAK4B,iBAAiB,CAAC3B;AACvBJ,SAAS+B,iBAAiB,CAAC3B","ignoreList":[0]}}, + {"offset": {"line": 6621, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/postcss.js"],"sourcesContent":["'use strict'\n\nlet AtRule = require('./at-rule')\nlet Comment = require('./comment')\nlet Container = require('./container')\nlet CssSyntaxError = require('./css-syntax-error')\nlet Declaration = require('./declaration')\nlet Document = require('./document')\nlet fromJSON = require('./fromJSON')\nlet Input = require('./input')\nlet LazyResult = require('./lazy-result')\nlet list = require('./list')\nlet Node = require('./node')\nlet parse = require('./parse')\nlet Processor = require('./processor')\nlet Result = require('./result.js')\nlet Root = require('./root')\nlet Rule = require('./rule')\nlet stringify = require('./stringify')\nlet Warning = require('./warning')\n\nfunction postcss(...plugins) {\n if (plugins.length === 1 && Array.isArray(plugins[0])) {\n plugins = plugins[0]\n }\n return new Processor(plugins)\n}\n\npostcss.plugin = function plugin(name, initializer) {\n let warningPrinted = false\n function creator(...args) {\n // eslint-disable-next-line no-console\n if (console && console.warn && !warningPrinted) {\n warningPrinted = true\n // eslint-disable-next-line no-console\n console.warn(\n name +\n ': postcss.plugin was deprecated. Migration guide:\\n' +\n 'https://evilmartians.com/chronicles/postcss-8-plugin-migration'\n )\n if (process.env.LANG && process.env.LANG.startsWith('cn')) {\n /* c8 ignore next 7 */\n // eslint-disable-next-line no-console\n console.warn(\n name +\n ': 里面 postcss.plugin 被弃用. 迁移指南:\\n' +\n 'https://www.w3ctech.com/topic/2226'\n )\n }\n }\n let transformer = initializer(...args)\n transformer.postcssPlugin = name\n transformer.postcssVersion = new Processor().version\n return transformer\n }\n\n let cache\n Object.defineProperty(creator, 'postcss', {\n get() {\n if (!cache) cache = creator()\n return cache\n }\n })\n\n creator.process = function (css, processOpts, pluginOpts) {\n return postcss([creator(pluginOpts)]).process(css, processOpts)\n }\n\n return creator\n}\n\npostcss.stringify = stringify\npostcss.parse = parse\npostcss.fromJSON = fromJSON\npostcss.list = list\n\npostcss.comment = defaults => new Comment(defaults)\npostcss.atRule = defaults => new AtRule(defaults)\npostcss.decl = defaults => new Declaration(defaults)\npostcss.rule = defaults => new Rule(defaults)\npostcss.root = defaults => new Root(defaults)\npostcss.document = defaults => new Document(defaults)\n\npostcss.CssSyntaxError = CssSyntaxError\npostcss.Declaration = Declaration\npostcss.Container = Container\npostcss.Processor = Processor\npostcss.Document = Document\npostcss.Comment = Comment\npostcss.Warning = Warning\npostcss.AtRule = AtRule\npostcss.Result = Result\npostcss.Input = Input\npostcss.Rule = Rule\npostcss.Root = Root\npostcss.Node = Node\n\nLazyResult.registerPostcss(postcss)\n\nmodule.exports = postcss\npostcss.default = postcss\n"],"names":["AtRule","Comment","Container","CssSyntaxError","Declaration","Document","fromJSON","Input","LazyResult","list","Node","parse","Processor","Result","Root","Rule","stringify","Warning","postcss","plugins","length","Array","isArray","plugin","name","initializer","warningPrinted","creator","args","console","warn","process","env","LANG","startsWith","transformer","postcssPlugin","postcssVersion","version","cache","Object","defineProperty","get","css","processOpts","pluginOpts","comment","defaults","atRule","dec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,EAAEd,OAAO,CAACY,KAAKC;IACrD;IAEA,OAAOjB;AACT;AAEAT,QAAQF,SAAS,GAAGA;AACpBE,QAAQP,KAAK,GAAGA;AAChBO,QAAQZ,QAAQ,GAAGA;AACnBY,QAAQT,IAAI,GAAGA;AAEfS,QAAQ4B,OAAO,GAAGC,CAAAA,WAAY,IAAI9C,QAAQ8C;AAC1C7B,QAAQ8B,MAAM,GAAGD,CAAAA,WAAY,IAAI/C,OAAO+C;AACxC7B,QAAQ+B,IAAI,GAAGF,CAAAA,WAAY,IAAI3C,YAAY2C;AAC3C7B,QAAQgC,IAAI,GAAGH,CAAAA,WAAY,IAAIhC,KAAKgC;AACpC7B,QAAQiC,IAAI,GAAGJ,CAAAA,WAAY,IAAIjC,KAAKiC;AACpC7B,QAAQkC,QAAQ,GAAGL,CAAAA,WAAY,IAAI1C,SAAS0C;AAE5C7B,QAAQf,cAAc,GAAGA;AACzBe,QAAQd,WAAW,GAAGA;AACtBc,QAAQhB,SAAS,GAAGA;AACpBgB,QAAQN,SAAS,GAAGA;AACpBM,QAAQb,QAAQ,GAAGA;AACnBa,QAAQjB,OAAO,GAAGA;AAClBiB,QAAQD,OAAO,GAAGA;AAClBC,QAAQlB,MAAM,GAAGA;AACjBkB,QAAQL,MAAM,GAAGA;AACjBK,QAAQX,KAAK,GAAGA;AAChBW,QAAQH,IAAI,GAAGA;AACfG,QAAQJ,IAAI,GAAGA;AACfI,QAAQR,IAAI,GAAGA;AAEfF,WAAW6C,eAAe,CAACnC;AAE3BoC,OAAOC,OAAO,GAAGrC;AACjBA,QAAQsC,OAAO,GAAGtC","ignoreList":[0]}}, + {"offset": {"line": 6707, "column": 0}, "map": {"version":3,"sources":["turbopack:///[project]/node_modules/postcss/lib/postcss.mjs"],"sourcesContent":["import postcss from './postcss.js'\n\nexport default postcss\n\nexport const stringify = postcss.stringify\nexport const fromJSON = postcss.fromJSON\nexport const plugin = postcss.plugin\nexport const parse = postcss.parse\nexport const list = postcss.list\n\nexport const document = postcss.document\nexport const comment = postcss.comment\nexport const atRule = postcss.atRule\nexport const rule = postcss.rule\nexport const decl = postcss.decl\nexport const root = postcss.root\n\nexport const CssSyntaxError = postcss.CssSyntaxError\nexport const Declaration = postcss.Declaration\nexport const Container = postcss.Container\nexport const Processor = postcss.Processor\nexport const Document = postcss.Document\nexport const Comment = postcss.Comment\nexport const Warning = postcss.Warning\nexport const AtRule = postcss.AtRule\nexport const Result = postcss.Result\nexport const Input = postcss.Input\nexport const Rule = postcss.Rule\nexport const Root = postcss.Root\nexport const Node = postcss.Node\n"],"names":["stringify","fromJSON","plugin","parse","list","document","comment","atRule","rule","decl","root","CssSyntaxError","Declaration","Container","Processor","Document","Comment","Warning","AtRule","Result","Input","Rule","Root","Node"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;uCAEe,iJAAO;AAEf,MAAMA,YAAY,iJAAO,CAACA,SAAS;AACnC,MAAMC,WAAW,iJAAO,CAACA,QAAQ;AACjC,MAAMC,SAAS,iJAAO,CAACA,MAAM;AAC7B,MAAMC,QAAQ,iJAAO,CAACA,KAAK;AAC3B,MAAMC,OAAO,iJAAO,CAACA,IAAI;AAEzB,MAAMC,WAAW,iJAAO,CAACA,QAAQ;AACjC,MAAMC,UAAU,iJAAO,CAACA,OAAO;AAC/B,MAAMC,SAAS,iJAAO,CAACA,MAAM;AAC7B,MAAMC,OAAO,iJAAO,CAACA,IAAI;AACzB,MAAMC,OAAO,iJAAO,CAACA,IAAI;AACzB,MAAMC,OAAO,iJAAO,CAACA,IAAI;AAEzB,MAAMC,iBAAiB,iJAAO,CAACA,cAAc;AAC7C,MAAMC,cAAc,iJAAO,CAACA,WAAW;AACvC,MAAMC,YAAY,iJAAO,CAACA,SAAS;AACnC,MAAMC,YAAY,iJAAO,CAACA,SAAS;AACnC,MAAMC,WAAW,iJAAO,CAACA,QAAQ;AACjC,MAAMC,UAAU,iJAAO,CAACA,OAAO;AAC/B,MAAMC,UAAU,iJAAO,CAACA,OAAO;AAC/B,MAAMC,SAAS,iJAAO,CAACA,MAAM;AAC7B,MAAMC,SAAS,iJAAO,CAACA,MAAM;AAC7B,MAAMC,QAAQ,iJAAO,CAACA,KAAK;AAC3B,MAAMC,OAAO,iJAAO,CAACA,IAAI;AACzB,MAAMC,OAAO,iJAAO,CAACA,IAAI;AACzB,MAAMC,OAAO,iJAAO,CAACA,IAAI","ignoreList":[0]}}] +} \ No newline at end of file diff --git a/.next/dev/build/package.json b/.next/dev/build/package.json new file mode 100644 index 0000000..7156107 --- /dev/null +++ b/.next/dev/build/package.json @@ -0,0 +1 @@ +{"type": "commonjs"} \ No newline at end of file diff --git a/.next/dev/build/postcss.js b/.next/dev/build/postcss.js new file mode 100644 index 0000000..16e95c9 --- /dev/null +++ b/.next/dev/build/postcss.js @@ -0,0 +1,6 @@ +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 new file mode 100644 index 0000000..c15d7ec --- /dev/null +++ b/.next/dev/build/postcss.js.map @@ -0,0 +1,5 @@ +{ + "version": 3, + "sources": [], + "sections": [] +} \ No newline at end of file diff --git a/.next/dev/build/webpack-loaders.js b/.next/dev/build/webpack-loaders.js new file mode 100644 index 0000000..b004eff --- /dev/null +++ b/.next/dev/build/webpack-loaders.js @@ -0,0 +1,6 @@ +var R=require("./chunks/[turbopack]_runtime.js")("webpack-loaders.js") +R.c("chunks/[turbopack-node]_transforms_webpack-loaders_ts_0z77ki4._.js") +R.c("chunks/[root-of-the-server]__0z6~21d._.js") +R.m("[turbopack-node]/child_process/globals.ts [webpack_loaders] (ecmascript)") +R.m("[turbopack-node]/child_process/evaluate.ts/evaluate.js { INNER => \"[turbopack-node]/transforms/webpack-loaders.ts [webpack_loaders] (ecmascript)\", RUNTIME => \"[turbopack-node]/child_process/evaluate.ts [webpack_loaders] (ecmascript)\" } [webpack_loaders] (ecmascript)") +module.exports=R.m("[turbopack-node]/child_process/evaluate.ts/evaluate.js { INNER => \"[turbopack-node]/transforms/webpack-loaders.ts [webpack_loaders] (ecmascript)\", RUNTIME => \"[turbopack-node]/child_process/evaluate.ts [webpack_loaders] (ecmascript)\" } [webpack_loaders] (ecmascript)").exports diff --git a/.next/dev/build/webpack-loaders.js.map b/.next/dev/build/webpack-loaders.js.map new file mode 100644 index 0000000..c15d7ec --- /dev/null +++ b/.next/dev/build/webpack-loaders.js.map @@ -0,0 +1,5 @@ +{ + "version": 3, + "sources": [], + "sections": [] +} \ No newline at end of file diff --git a/.next/dev/cache/.rscinfo b/.next/dev/cache/.rscinfo new file mode 100644 index 0000000..36ee3c8 --- /dev/null +++ b/.next/dev/cache/.rscinfo @@ -0,0 +1 @@ +{"encryption.key":"DddTuKeMZrapI4o1y4jJmN+DomVnQzcM28ENLtnoreQ=","encryption.expire_at":1775220292504} \ No newline at end of file diff --git a/.next/dev/cache/next-devtools-config.json b/.next/dev/cache/next-devtools-config.json new file mode 100644 index 0000000..dd36ae7 --- /dev/null +++ b/.next/dev/cache/next-devtools-config.json @@ -0,0 +1,4 @@ +{ + "theme": "system", + "scale": 1 +} \ No newline at end of file diff --git a/.next/dev/cache/turbopack/0ca967b8/00000001.sst b/.next/dev/cache/turbopack/0ca967b8/00000001.sst new file mode 100644 index 0000000..27be9e0 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000001.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000002.sst b/.next/dev/cache/turbopack/0ca967b8/00000002.sst new file mode 100644 index 0000000..946178d Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000002.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000003.sst b/.next/dev/cache/turbopack/0ca967b8/00000003.sst new file mode 100644 index 0000000..f21a184 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000003.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000004.sst b/.next/dev/cache/turbopack/0ca967b8/00000004.sst new file mode 100644 index 0000000..571f784 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000004.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000005.meta b/.next/dev/cache/turbopack/0ca967b8/00000005.meta new file mode 100644 index 0000000..e61beb8 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000005.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000006.meta b/.next/dev/cache/turbopack/0ca967b8/00000006.meta new file mode 100644 index 0000000..70626ed Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000006.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000007.meta b/.next/dev/cache/turbopack/0ca967b8/00000007.meta new file mode 100644 index 0000000..a22c3a5 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000007.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000008.meta b/.next/dev/cache/turbopack/0ca967b8/00000008.meta new file mode 100644 index 0000000..8fc33c0 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000008.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000009.sst b/.next/dev/cache/turbopack/0ca967b8/00000009.sst new file mode 100644 index 0000000..ecdcbd7 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000009.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000010.sst b/.next/dev/cache/turbopack/0ca967b8/00000010.sst new file mode 100644 index 0000000..e0fce94 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000010.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000011.sst b/.next/dev/cache/turbopack/0ca967b8/00000011.sst new file mode 100644 index 0000000..0ca899d Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000011.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000012.sst b/.next/dev/cache/turbopack/0ca967b8/00000012.sst new file mode 100644 index 0000000..68b91af Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000012.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000013.sst b/.next/dev/cache/turbopack/0ca967b8/00000013.sst new file mode 100644 index 0000000..d760689 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000013.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000014.sst b/.next/dev/cache/turbopack/0ca967b8/00000014.sst new file mode 100644 index 0000000..1394651 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000014.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000015.sst b/.next/dev/cache/turbopack/0ca967b8/00000015.sst new file mode 100644 index 0000000..7b195a4 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000015.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000016.meta b/.next/dev/cache/turbopack/0ca967b8/00000016.meta new file mode 100644 index 0000000..a6a4aa9 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000016.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000017.meta b/.next/dev/cache/turbopack/0ca967b8/00000017.meta new file mode 100644 index 0000000..bceff98 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000017.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000018.meta b/.next/dev/cache/turbopack/0ca967b8/00000018.meta new file mode 100644 index 0000000..94a0104 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000018.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000019.meta b/.next/dev/cache/turbopack/0ca967b8/00000019.meta new file mode 100644 index 0000000..8028fc4 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000019.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000020.sst b/.next/dev/cache/turbopack/0ca967b8/00000020.sst new file mode 100644 index 0000000..832b79d Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000020.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000021.sst b/.next/dev/cache/turbopack/0ca967b8/00000021.sst new file mode 100644 index 0000000..10c8d69 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000021.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000022.sst b/.next/dev/cache/turbopack/0ca967b8/00000022.sst new file mode 100644 index 0000000..14cc0fb Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000022.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000023.sst b/.next/dev/cache/turbopack/0ca967b8/00000023.sst new file mode 100644 index 0000000..362beb1 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000023.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000024.meta b/.next/dev/cache/turbopack/0ca967b8/00000024.meta new file mode 100644 index 0000000..f475772 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000024.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000025.meta b/.next/dev/cache/turbopack/0ca967b8/00000025.meta new file mode 100644 index 0000000..885ef8b Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000025.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000026.meta b/.next/dev/cache/turbopack/0ca967b8/00000026.meta new file mode 100644 index 0000000..37f18b6 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000026.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000027.meta b/.next/dev/cache/turbopack/0ca967b8/00000027.meta new file mode 100644 index 0000000..f6907a6 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000027.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000028.sst b/.next/dev/cache/turbopack/0ca967b8/00000028.sst new file mode 100644 index 0000000..d5e01ee Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000028.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000029.sst b/.next/dev/cache/turbopack/0ca967b8/00000029.sst new file mode 100644 index 0000000..6a1f4f8 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000029.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000030.sst b/.next/dev/cache/turbopack/0ca967b8/00000030.sst new file mode 100644 index 0000000..a56e90c Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000030.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000031.sst b/.next/dev/cache/turbopack/0ca967b8/00000031.sst new file mode 100644 index 0000000..c97bf3f Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000031.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000032.meta b/.next/dev/cache/turbopack/0ca967b8/00000032.meta new file mode 100644 index 0000000..2cff980 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000032.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000033.meta b/.next/dev/cache/turbopack/0ca967b8/00000033.meta new file mode 100644 index 0000000..a897b39 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000033.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000034.meta b/.next/dev/cache/turbopack/0ca967b8/00000034.meta new file mode 100644 index 0000000..6392916 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000034.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000035.meta b/.next/dev/cache/turbopack/0ca967b8/00000035.meta new file mode 100644 index 0000000..bdf13ec Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000035.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000036.sst b/.next/dev/cache/turbopack/0ca967b8/00000036.sst new file mode 100644 index 0000000..6226364 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000036.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000037.sst b/.next/dev/cache/turbopack/0ca967b8/00000037.sst new file mode 100644 index 0000000..dc73b43 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000037.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000038.sst b/.next/dev/cache/turbopack/0ca967b8/00000038.sst new file mode 100644 index 0000000..6764b5d Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000038.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000039.sst b/.next/dev/cache/turbopack/0ca967b8/00000039.sst new file mode 100644 index 0000000..d356679 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000039.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000040.meta b/.next/dev/cache/turbopack/0ca967b8/00000040.meta new file mode 100644 index 0000000..74ed511 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000040.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000041.meta b/.next/dev/cache/turbopack/0ca967b8/00000041.meta new file mode 100644 index 0000000..8f10fdd Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000041.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000042.meta b/.next/dev/cache/turbopack/0ca967b8/00000042.meta new file mode 100644 index 0000000..1190b09 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000042.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000043.meta b/.next/dev/cache/turbopack/0ca967b8/00000043.meta new file mode 100644 index 0000000..0022129 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000043.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000044.sst b/.next/dev/cache/turbopack/0ca967b8/00000044.sst new file mode 100644 index 0000000..7dc143b Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000044.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000045.sst b/.next/dev/cache/turbopack/0ca967b8/00000045.sst new file mode 100644 index 0000000..a182cd4 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000045.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000046.sst b/.next/dev/cache/turbopack/0ca967b8/00000046.sst new file mode 100644 index 0000000..f65bf2b Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000046.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000047.sst b/.next/dev/cache/turbopack/0ca967b8/00000047.sst new file mode 100644 index 0000000..ac0cc77 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000047.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000048.meta b/.next/dev/cache/turbopack/0ca967b8/00000048.meta new file mode 100644 index 0000000..27f4da1 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000048.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000049.meta b/.next/dev/cache/turbopack/0ca967b8/00000049.meta new file mode 100644 index 0000000..c7a0ac6 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000049.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000050.meta b/.next/dev/cache/turbopack/0ca967b8/00000050.meta new file mode 100644 index 0000000..86b1651 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000050.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000051.meta b/.next/dev/cache/turbopack/0ca967b8/00000051.meta new file mode 100644 index 0000000..4f83408 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000051.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000052.sst b/.next/dev/cache/turbopack/0ca967b8/00000052.sst new file mode 100644 index 0000000..401c003 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000052.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000053.sst b/.next/dev/cache/turbopack/0ca967b8/00000053.sst new file mode 100644 index 0000000..6c121c1 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000053.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000054.sst b/.next/dev/cache/turbopack/0ca967b8/00000054.sst new file mode 100644 index 0000000..f65bf2b Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000054.sst differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000055.meta b/.next/dev/cache/turbopack/0ca967b8/00000055.meta new file mode 100644 index 0000000..4b24199 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000055.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000056.meta b/.next/dev/cache/turbopack/0ca967b8/00000056.meta new file mode 100644 index 0000000..db25326 Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000056.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/00000057.meta b/.next/dev/cache/turbopack/0ca967b8/00000057.meta new file mode 100644 index 0000000..7c43d8c Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/00000057.meta differ diff --git a/.next/dev/cache/turbopack/0ca967b8/CURRENT b/.next/dev/cache/turbopack/0ca967b8/CURRENT new file mode 100644 index 0000000..410199c Binary files /dev/null and b/.next/dev/cache/turbopack/0ca967b8/CURRENT differ diff --git a/.next/dev/cache/turbopack/0ca967b8/LOG b/.next/dev/cache/turbopack/0ca967b8/LOG new file mode 100644 index 0000000..5956302 --- /dev/null +++ b/.next/dev/cache/turbopack/0ca967b8/LOG @@ -0,0 +1,51 @@ +Time 2026-03-20T12:44:54.6022134Z +Commit 00000008 806 keys in 5ms 274µs 700ns +FAM | META SEQ | SST SEQ | RANGE + 0 | 00000005 | 00000003 SST | [========================================================] | 48b2c92616fc193d-db02334e96d65708 (0 MiB, fresh) + 1 | 00000006 | 00000001 SST | [==================================================================================================] | 01319201325d8723-ffc6fea73ecbf9f6 (0 MiB, fresh) + 2 | 00000007 | 00000002 SST | [==================================================================================================] | 01319201325d8723-ffc6fea73ecbf9f6 (0 MiB, fresh) + 3 | 00000008 | 00000004 SST | [==================================================================================================] | 00561bb733264ffb-ffcf706b5ac8fc99 (0 MiB, fresh) +Time 2026-03-20T12:45:00.374305Z +Commit 00000019 222754 keys in 106ms 199µs 300ns +FAM | META SEQ | SST SEQ | RANGE + 0 | 00000016 | 00000014 SST | [========================================================] | 48b2c92616fc193d-db02334e96d65708 (0 MiB, fresh) + 1 | 00000017 | 00000013 SST | [==================================================================================================] | 000162bda900bf14-fffec925b18eeb5e (3 MiB, fresh) + 2 | 00000018 | 00000010 SST | [=======================] | 40033e172ef5726c-7fff898d608ce952 (9 MiB, fresh) + 2 | 00000018 | 00000009 SST | [=======================] | 000162bda900bf14-3ffdae33b3a9deb9 (10 MiB, fresh) + 2 | 00000018 | 00000012 SST | [=======================] | 800015b4f029548b-bfff72bb84ef3ae8 (10 MiB, fresh) + 2 | 00000018 | 00000011 SST | [=======================] | c0002f8f2f9a1a05-fffec925b18eeb5e (11 MiB, fresh) + 3 | 00000019 | 00000015 SST | [==================================================================================================] | 000103b01c4022c7-fffd19dfcf688e97 (0 MiB, fresh) +Time 2026-03-20T12:50:01.9977829Z +Commit 00000027 233 keys in 8ms 223µs 400ns +FAM | META SEQ | SST SEQ | RANGE + 0 | 00000024 | 00000022 SST | [========================================================] | 48b2c92616fc193d-db02334e96d65708 (0 MiB, fresh) + 1 | 00000025 | 00000020 SST | [==================================================================================================] | 024547abec4ee104-ffe1f5856bfecd9a (0 MiB, fresh) + 2 | 00000026 | 00000021 SST | [==================================================================================================] | 024547abec4ee104-ffe1f5856bfecd9a (0 MiB, fresh) + 3 | 00000027 | 00000023 SST | [======================================================================] | 383408c3b441048d-eb85789a8284a660 (0 MiB, fresh) +Time 2026-03-20T12:50:37.2170627Z +Commit 00000035 103 keys in 5ms 734µs 100ns +FAM | META SEQ | SST SEQ | RANGE + 0 | 00000032 | 00000030 SST | [========================================================] | 48b2c92616fc193d-db02334e96d65708 (0 MiB, fresh) + 1 | 00000033 | 00000028 SST | [==================================================================================================] | 024547abec4ee104-fe70d9cbb6db4bd3 (0 MiB, fresh) + 2 | 00000034 | 00000029 SST | [==================================================================================================] | 024547abec4ee104-fe70d9cbb6db4bd3 (0 MiB, fresh) + 3 | 00000035 | 00000031 SST | O | 8a7f9216fa3bcf2b-8a7f9216fa3bcf2b (0 MiB, fresh) +Time 2026-03-20T12:51:25.7646408Z +Commit 00000043 694 keys in 7ms 952µs 500ns +FAM | META SEQ | SST SEQ | RANGE + 0 | 00000040 | 00000038 SST | [========================================================] | 48b2c92616fc193d-db02334e96d65708 (0 MiB, fresh) + 1 | 00000041 | 00000037 SST | [==================================================================================================] | 0013a5884d7a81c9-fe70d9cbb6db4bd3 (0 MiB, fresh) + 2 | 00000042 | 00000036 SST | [==================================================================================================] | 0013a5884d7a81c9-fe70d9cbb6db4bd3 (0 MiB, fresh) + 3 | 00000043 | 00000039 SST | [===================================================] | 225c0fc5515165e9-a77b0c5b73402431 (0 MiB, fresh) +Time 2026-03-20T12:53:13.4116937Z +Commit 00000051 24907 keys in 35ms 89µs 300ns +FAM | META SEQ | SST SEQ | RANGE + 0 | 00000048 | 00000046 SST | [========================================================] | 48b2c92616fc193d-db02334e96d65708 (0 MiB, fresh) + 1 | 00000049 | 00000045 SST | [==================================================================================================] | 000543d06f6c2eee-fffd6fbd2229df8a (0 MiB, fresh) + 2 | 00000050 | 00000044 SST | [==================================================================================================] | 000543d06f6c2eee-fffd6fbd2229df8a (11 MiB, fresh) + 3 | 00000051 | 00000047 SST | [==================================================================================================] | 00038d51c68249cf-ffde7b51c347f36e (0 MiB, fresh) +Time 2026-03-20T12:54:33.3216686Z +Commit 00000057 2123 keys in 7ms 167µs 500ns +FAM | META SEQ | SST SEQ | RANGE + 0 | 00000055 | 00000054 SST | [========================================================] | 48b2c92616fc193d-db02334e96d65708 (0 MiB, fresh) + 2 | 00000056 | 00000052 SST | [==================================================================================================] | 00af38a09affafc3-ff078261c00f822a (0 MiB, fresh) + 1 | 00000057 | 00000053 SST | [==================================================================================================] | 000543d06f6c2eee-ffe1f5856bfecd9a (0 MiB, fresh) diff --git a/.next/dev/fallback-build-manifest.json b/.next/dev/fallback-build-manifest.json new file mode 100644 index 0000000..087bbcf --- /dev/null +++ b/.next/dev/fallback-build-manifest.json @@ -0,0 +1,13 @@ +{ + "pages": { + "/_app": [] + }, + "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 new file mode 100644 index 0000000..cb5ab49 --- /dev/null +++ b/.next/dev/logs/next-development.log @@ -0,0 +1,3 @@ +{"timestamp":"00:00:00.832","source":"Server","level":"LOG","message":""} +{"timestamp":"00:00:01.222","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:01.716","source":"Browser","level":"INFO","message":"%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold"} diff --git a/.next/dev/package.json b/.next/dev/package.json new file mode 100644 index 0000000..c9a4422 --- /dev/null +++ b/.next/dev/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} \ No newline at end of file diff --git a/.next/dev/prerender-manifest.json b/.next/dev/prerender-manifest.json new file mode 100644 index 0000000..54a39cd --- /dev/null +++ b/.next/dev/prerender-manifest.json @@ -0,0 +1,11 @@ +{ + "version": 4, + "routes": {}, + "dynamicRoutes": {}, + "notFoundRoutes": [], + "preview": { + "previewModeId": "0b4ff4dd02bdaf910d7b79003c204a79", + "previewModeSigningKey": "967273a02804c688a7ca5e1df3b27de199eca5eafdbc619258fd44f9b5530fb0", + "previewModeEncryptionKey": "a8a2e791bc794e0bc23b88e790e51c952aaaf356af515f100e6b9254d4e0915a" + } +} \ No newline at end of file diff --git a/.next/dev/routes-manifest.json b/.next/dev/routes-manifest.json new file mode 100644 index 0000000..442224a --- /dev/null +++ b/.next/dev/routes-manifest.json @@ -0,0 +1 @@ +{"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 new file mode 100644 index 0000000..e234c2e --- /dev/null +++ b/.next/dev/server/app-paths-manifest.json @@ -0,0 +1,3 @@ +{ + "/page": "app/page.js" +} \ No newline at end of file diff --git a/.next/dev/server/app/page.js b/.next/dev/server/app/page.js new file mode 100644 index 0000000..94ca9f7 --- /dev/null +++ b/.next/dev/server/app/page.js @@ -0,0 +1,16 @@ +var R=require("../chunks/ssr/[turbopack]_runtime.js")("server/app/page.js") +R.c("server/chunks/ssr/node_modules_next_dist_0b98i0s._.js") +R.c("server/chunks/ssr/[root-of-the-server]__0~y8ue.._.js") +R.c("server/chunks/ssr/node_modules_next_dist_compiled_0evda~q._.js") +R.c("server/chunks/ssr/node_modules_next_dist_esm_0a7~8qg._.js") +R.c("server/chunks/ssr/node_modules_next_dist_0xz11-d._.js") +R.c("server/chunks/ssr/node_modules_@swc_helpers_cjs__interop_require_wildcard_cjs_04g1nof._.js") +R.c("server/chunks/ssr/[externals]__0.~q4c8._.js") +R.c("server/chunks/ssr/[root-of-the-server]__05etucg._.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_page_actions_09-gtaw.js") +R.m("[project]/node_modules/next/dist/esm/build/templates/app-page.js?page=/page { METADATA_0 => \"[project]/src/app/favicon.ico.mjs { IMAGE => \\\"[project]/src/app/favicon.ico (static in ecmascript, tag client)\\\" } [app-rsc] (structured image object, ecmascript)\", MODULE_1 => \"[project]/src/app/layout.tsx [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_2 => \"[project]/node_modules/next/dist/client/components/builtin/not-found.js [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_3 => \"[project]/node_modules/next/dist/client/components/builtin/forbidden.js [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_4 => \"[project]/node_modules/next/dist/client/components/builtin/unauthorized.js [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_5 => \"[project]/node_modules/next/dist/client/components/builtin/global-error.js [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_6 => \"[project]/src/app/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=/page { METADATA_0 => \"[project]/src/app/favicon.ico.mjs { IMAGE => \\\"[project]/src/app/favicon.ico (static in ecmascript, tag client)\\\" } [app-rsc] (structured image object, ecmascript)\", MODULE_1 => \"[project]/src/app/layout.tsx [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_2 => \"[project]/node_modules/next/dist/client/components/builtin/not-found.js [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_3 => \"[project]/node_modules/next/dist/client/components/builtin/forbidden.js [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_4 => \"[project]/node_modules/next/dist/client/components/builtin/unauthorized.js [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_5 => \"[project]/node_modules/next/dist/client/components/builtin/global-error.js [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_6 => \"[project]/src/app/page.tsx [app-rsc] (ecmascript, Next.js Server Component)\" } [app-rsc] (ecmascript)").exports diff --git a/.next/dev/server/app/page.js.map b/.next/dev/server/app/page.js.map new file mode 100644 index 0000000..c15d7ec --- /dev/null +++ b/.next/dev/server/app/page.js.map @@ -0,0 +1,5 @@ +{ + "version": 3, + "sources": [], + "sections": [] +} \ No newline at end of file diff --git a/.next/dev/server/app/page/app-paths-manifest.json b/.next/dev/server/app/page/app-paths-manifest.json new file mode 100644 index 0000000..e234c2e --- /dev/null +++ b/.next/dev/server/app/page/app-paths-manifest.json @@ -0,0 +1,3 @@ +{ + "/page": "app/page.js" +} \ No newline at end of file diff --git a/.next/dev/server/app/page/build-manifest.json b/.next/dev/server/app/page/build-manifest.json new file mode 100644 index 0000000..c92f10b --- /dev/null +++ b/.next/dev/server/app/page/build-manifest.json @@ -0,0 +1,22 @@ +{ + "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/page/next-font-manifest.json b/.next/dev/server/app/page/next-font-manifest.json new file mode 100644 index 0000000..a6438fd --- /dev/null +++ b/.next/dev/server/app/page/next-font-manifest.json @@ -0,0 +1,11 @@ +{ + "pages": {}, + "app": { + "[project]/src/app/page": [ + "static/media/caa3a2e1cccd8315-s.p.16t1db8_9y2o~.woff2", + "static/media/797e433ab948586e-s.p.0.q-h669a_dqa.woff2" + ] + }, + "appUsingSizeAdjust": true, + "pagesUsingSizeAdjust": false +} \ No newline at end of file diff --git a/.next/dev/server/app/page/react-loadable-manifest.json b/.next/dev/server/app/page/react-loadable-manifest.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/.next/dev/server/app/page/react-loadable-manifest.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/.next/dev/server/app/page/server-reference-manifest.json b/.next/dev/server/app/page/server-reference-manifest.json new file mode 100644 index 0000000..27a92af --- /dev/null +++ b/.next/dev/server/app/page/server-reference-manifest.json @@ -0,0 +1,4 @@ +{ + "node": {}, + "edge": {} +} \ No newline at end of file diff --git a/.next/dev/server/app/page_client-reference-manifest.js b/.next/dev/server/app/page_client-reference-manifest.js new file mode 100644 index 0000000..5e013b2 --- /dev/null +++ b/.next/dev/server/app/page_client-reference-manifest.js @@ -0,0 +1,3 @@ +globalThis.__RSC_MANIFEST = globalThis.__RSC_MANIFEST || {}; +globalThis.__RSC_MANIFEST["/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_next_dist_0tt2wve._.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_next_dist_0tt2wve._.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_next_dist_0tt2wve._.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_next_dist_0tt2wve._.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_next_dist_0tt2wve._.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_next_dist_0tt2wve._.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_next_dist_0tt2wve._.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_next_dist_0tt2wve._.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_next_dist_0tt2wve._.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_next_dist_0tt2wve._.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_next_dist_0tt2wve._.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_next_dist_0tt2wve._.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_next_dist_0tt2wve._.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_next_dist_0tt2wve._.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_next_dist_0tt2wve._.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_next_dist_0tt2wve._.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_next_dist_0tt2wve._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js","/_next/static/chunks/node_modules_next_dist_client_components_builtin_global-error_002ye8~.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_next_dist_0tt2wve._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js","/_next/static/chunks/node_modules_next_dist_client_components_builtin_global-error_002ye8~.js"],"async":false},"[project]/src/app/page.tsx ":{"id":"[project]/src/app/page.tsx [app-client] (ecmascript)","name":"*","chunks":["/_next/static/chunks/node_modules_next_dist_0tt2wve._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js","/_next/static/chunks/_00_70_t._.js","/_next/static/chunks/src_app_page_tsx_002ye8~._.js"],"async":false},"[project]/src/app/page.tsx":{"id":"[project]/src/app/page.tsx [app-client] (ecmascript)","name":"*","chunks":["/_next/static/chunks/node_modules_next_dist_0tt2wve._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js","/_next/static/chunks/_00_70_t._.js","/_next/static/chunks/src_app_page_tsx_002ye8~._.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_0yh1sr3._.js","server/chunks/ssr/[externals]_next_dist_0yew8f-._.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_0yh1sr3._.js","server/chunks/ssr/[externals]_next_dist_0yew8f-._.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_0yh1sr3._.js","server/chunks/ssr/[externals]_next_dist_0yew8f-._.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_0yh1sr3._.js","server/chunks/ssr/[externals]_next_dist_0yew8f-._.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_0yh1sr3._.js","server/chunks/ssr/[externals]_next_dist_0yew8f-._.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_0yh1sr3._.js","server/chunks/ssr/[externals]_next_dist_0yew8f-._.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_0yh1sr3._.js","server/chunks/ssr/[externals]_next_dist_0yew8f-._.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_0yh1sr3._.js","server/chunks/ssr/[externals]_next_dist_0yew8f-._.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_0yh1sr3._.js","server/chunks/ssr/[externals]_next_dist_0yew8f-._.js","server/chunks/ssr/node_modules_09w7yel._.js"],"async":false}},"[project]/src/app/page.tsx [app-client] (ecmascript)":{"*":{"id":"[project]/src/app/page.tsx [app-ssr] (ecmascript)","name":"*","chunks":["server/chunks/ssr/node_modules_next_dist_0yh1sr3._.js","server/chunks/ssr/[externals]_next_dist_0yew8f-._.js","server/chunks/ssr/_0i76b3g._.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]/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/page.tsx [app-client] (ecmascript)":{"*":{"id":"[project]/src/app/page.tsx [app-rsc] (client reference proxy)","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{},"entryCSSFiles":{"[project]/src/app/layout":[{"path":"static/chunks/[root-of-the-server]__02nfq85._.css","inlined":false}],"[project]/node_modules/next/dist/client/components/builtin/global-error":[{"path":"static/chunks/[root-of-the-server]__02nfq85._.css","inlined":false}],"[project]/src/app/page":[{"path":"static/chunks/[root-of-the-server]__02nfq85._.css","inlined":false}]},"entryJSFiles":{"[project]/src/app/layout":["static/chunks/node_modules_next_dist_0tt2wve._.js","static/chunks/src_app_layout_tsx_004glpo._.js"],"[project]/node_modules/next/dist/client/components/builtin/global-error":["static/chunks/node_modules_next_dist_0tt2wve._.js","static/chunks/src_app_layout_tsx_004glpo._.js","static/chunks/node_modules_next_dist_client_components_builtin_global-error_002ye8~.js"],"[project]/src/app/page":["static/chunks/node_modules_next_dist_0tt2wve._.js","static/chunks/src_app_layout_tsx_004glpo._.js","static/chunks/_00_70_t._.js","static/chunks/src_app_page_tsx_002ye8~._.js"]}}; + diff --git a/.next/dev/server/chunks/ssr/[externals]__0.~q4c8._.js b/.next/dev/server/chunks/ssr/[externals]__0.~q4c8._.js new file mode 100644 index 0000000..eab6b59 --- /dev/null +++ b/.next/dev/server/chunks/ssr/[externals]__0.~q4c8._.js @@ -0,0 +1,62 @@ +module.exports = [ +"[externals]/path [external] (path, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("path", () => require("path")); + +module.exports = mod; +}), +"[externals]/next/dist/compiled/next-server/app-page-turbo.runtime.dev.js [external] (next/dist/compiled/next-server/app-page-turbo.runtime.dev.js, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("next/dist/compiled/next-server/app-page-turbo.runtime.dev.js", () => require("next/dist/compiled/next-server/app-page-turbo.runtime.dev.js")); + +module.exports = mod; +}), +"[externals]/next/dist/server/app-render/work-async-storage.external.js [external] (next/dist/server/app-render/work-async-storage.external.js, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("next/dist/server/app-render/work-async-storage.external.js", () => require("next/dist/server/app-render/work-async-storage.external.js")); + +module.exports = mod; +}), +"[externals]/next/dist/server/app-render/work-unit-async-storage.external.js [external] (next/dist/server/app-render/work-unit-async-storage.external.js, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("next/dist/server/app-render/work-unit-async-storage.external.js", () => require("next/dist/server/app-render/work-unit-async-storage.external.js")); + +module.exports = mod; +}), +"[externals]/next/dist/server/app-render/action-async-storage.external.js [external] (next/dist/server/app-render/action-async-storage.external.js, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("next/dist/server/app-render/action-async-storage.external.js", () => require("next/dist/server/app-render/action-async-storage.external.js")); + +module.exports = mod; +}), +"[externals]/next/dist/server/app-render/after-task-async-storage.external.js [external] (next/dist/server/app-render/after-task-async-storage.external.js, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("next/dist/server/app-render/after-task-async-storage.external.js", () => require("next/dist/server/app-render/after-task-async-storage.external.js")); + +module.exports = mod; +}), +"[externals]/next/dist/server/app-render/dynamic-access-async-storage.external.js [external] (next/dist/server/app-render/dynamic-access-async-storage.external.js, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("next/dist/server/app-render/dynamic-access-async-storage.external.js", () => require("next/dist/server/app-render/dynamic-access-async-storage.external.js")); + +module.exports = mod; +}), +"[externals]/next/dist/compiled/@opentelemetry/api [external] (next/dist/compiled/@opentelemetry/api, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("next/dist/compiled/@opentelemetry/api", () => require("next/dist/compiled/@opentelemetry/api")); + +module.exports = mod; +}), +"[externals]/util [external] (util, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("util", () => require("util")); + +module.exports = mod; +}), +"[externals]/module [external] (module, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("module", () => require("module")); + +module.exports = mod; +}), +]; \ No newline at end of file diff --git a/.next/dev/server/chunks/ssr/[externals]__0.~q4c8._.js.map b/.next/dev/server/chunks/ssr/[externals]__0.~q4c8._.js.map new file mode 100644 index 0000000..c15d7ec --- /dev/null +++ b/.next/dev/server/chunks/ssr/[externals]__0.~q4c8._.js.map @@ -0,0 +1,5 @@ +{ + "version": 3, + "sources": [], + "sections": [] +} \ No newline at end of file diff --git a/.next/dev/server/chunks/ssr/[externals]_next_dist_0yew8f-._.js b/.next/dev/server/chunks/ssr/[externals]_next_dist_0yew8f-._.js new file mode 100644 index 0000000..30e6c91 --- /dev/null +++ b/.next/dev/server/chunks/ssr/[externals]_next_dist_0yew8f-._.js @@ -0,0 +1,38 @@ +module.exports = [ +"[externals]/next/dist/compiled/next-server/app-page-turbo.runtime.dev.js [external] (next/dist/compiled/next-server/app-page-turbo.runtime.dev.js, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("next/dist/compiled/next-server/app-page-turbo.runtime.dev.js", () => require("next/dist/compiled/next-server/app-page-turbo.runtime.dev.js")); + +module.exports = mod; +}), +"[externals]/next/dist/server/app-render/work-unit-async-storage.external.js [external] (next/dist/server/app-render/work-unit-async-storage.external.js, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("next/dist/server/app-render/work-unit-async-storage.external.js", () => require("next/dist/server/app-render/work-unit-async-storage.external.js")); + +module.exports = mod; +}), +"[externals]/next/dist/server/app-render/work-async-storage.external.js [external] (next/dist/server/app-render/work-async-storage.external.js, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("next/dist/server/app-render/work-async-storage.external.js", () => require("next/dist/server/app-render/work-async-storage.external.js")); + +module.exports = mod; +}), +"[externals]/next/dist/server/app-render/action-async-storage.external.js [external] (next/dist/server/app-render/action-async-storage.external.js, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("next/dist/server/app-render/action-async-storage.external.js", () => require("next/dist/server/app-render/action-async-storage.external.js")); + +module.exports = mod; +}), +"[externals]/next/dist/server/app-render/after-task-async-storage.external.js [external] (next/dist/server/app-render/after-task-async-storage.external.js, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("next/dist/server/app-render/after-task-async-storage.external.js", () => require("next/dist/server/app-render/after-task-async-storage.external.js")); + +module.exports = mod; +}), +"[externals]/next/dist/server/app-render/dynamic-access-async-storage.external.js [external] (next/dist/server/app-render/dynamic-access-async-storage.external.js, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("next/dist/server/app-render/dynamic-access-async-storage.external.js", () => require("next/dist/server/app-render/dynamic-access-async-storage.external.js")); + +module.exports = mod; +}), +]; \ No newline at end of file diff --git a/.next/dev/server/chunks/ssr/[externals]_next_dist_0yew8f-._.js.map b/.next/dev/server/chunks/ssr/[externals]_next_dist_0yew8f-._.js.map new file mode 100644 index 0000000..c15d7ec --- /dev/null +++ b/.next/dev/server/chunks/ssr/[externals]_next_dist_0yew8f-._.js.map @@ -0,0 +1,5 @@ +{ + "version": 3, + "sources": [], + "sections": [] +} \ No newline at end of file diff --git a/.next/dev/server/chunks/ssr/[root-of-the-server]__05etucg._.js b/.next/dev/server/chunks/ssr/[root-of-the-server]__05etucg._.js new file mode 100644 index 0000000..467e359 --- /dev/null +++ b/.next/dev/server/chunks/ssr/[root-of-the-server]__05etucg._.js @@ -0,0 +1,108 @@ +module.exports = [ +"[next]/internal/font/google/geist_a71539c9.module.css [app-rsc] (css module)", ((__turbopack_context__) => { + +__turbopack_context__.v({ + "className": "geist_a71539c9-module__T19VSG__className", + "variable": "geist_a71539c9-module__T19VSG__variable", +}); +}), +"[next]/internal/font/google/geist_a71539c9.js [app-rsc] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "default", + ()=>__TURBOPACK__default__export__ +]); +var __TURBOPACK__imported__module__$5b$next$5d2f$internal$2f$font$2f$google$2f$geist_a71539c9$2e$module$2e$css__$5b$app$2d$rsc$5d$__$28$css__module$29$__ = __turbopack_context__.i("[next]/internal/font/google/geist_a71539c9.module.css [app-rsc] (css module)"); +; +const fontData = { + className: __TURBOPACK__imported__module__$5b$next$5d2f$internal$2f$font$2f$google$2f$geist_a71539c9$2e$module$2e$css__$5b$app$2d$rsc$5d$__$28$css__module$29$__["default"].className, + style: { + fontFamily: "'Geist', 'Geist Fallback'", + fontStyle: "normal" + } +}; +if (__TURBOPACK__imported__module__$5b$next$5d2f$internal$2f$font$2f$google$2f$geist_a71539c9$2e$module$2e$css__$5b$app$2d$rsc$5d$__$28$css__module$29$__["default"].variable != null) { + fontData.variable = __TURBOPACK__imported__module__$5b$next$5d2f$internal$2f$font$2f$google$2f$geist_a71539c9$2e$module$2e$css__$5b$app$2d$rsc$5d$__$28$css__module$29$__["default"].variable; +} +const __TURBOPACK__default__export__ = fontData; +}), +"[next]/internal/font/google/geist_mono_8d43a2aa.module.css [app-rsc] (css module)", ((__turbopack_context__) => { + +__turbopack_context__.v({ + "className": "geist_mono_8d43a2aa-module__8Li5zG__className", + "variable": "geist_mono_8d43a2aa-module__8Li5zG__variable", +}); +}), +"[next]/internal/font/google/geist_mono_8d43a2aa.js [app-rsc] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "default", + ()=>__TURBOPACK__default__export__ +]); +var __TURBOPACK__imported__module__$5b$next$5d2f$internal$2f$font$2f$google$2f$geist_mono_8d43a2aa$2e$module$2e$css__$5b$app$2d$rsc$5d$__$28$css__module$29$__ = __turbopack_context__.i("[next]/internal/font/google/geist_mono_8d43a2aa.module.css [app-rsc] (css module)"); +; +const fontData = { + className: __TURBOPACK__imported__module__$5b$next$5d2f$internal$2f$font$2f$google$2f$geist_mono_8d43a2aa$2e$module$2e$css__$5b$app$2d$rsc$5d$__$28$css__module$29$__["default"].className, + style: { + fontFamily: "'Geist Mono', 'Geist Mono Fallback'", + fontStyle: "normal" + } +}; +if (__TURBOPACK__imported__module__$5b$next$5d2f$internal$2f$font$2f$google$2f$geist_mono_8d43a2aa$2e$module$2e$css__$5b$app$2d$rsc$5d$__$28$css__module$29$__["default"].variable != null) { + fontData.variable = __TURBOPACK__imported__module__$5b$next$5d2f$internal$2f$font$2f$google$2f$geist_mono_8d43a2aa$2e$module$2e$css__$5b$app$2d$rsc$5d$__$28$css__module$29$__["default"].variable; +} +const __TURBOPACK__default__export__ = fontData; +}), +"[project]/src/app/layout.tsx [app-rsc] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "default", + ()=>RootLayout, + "metadata", + ()=>metadata +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-dev-runtime.js [app-rsc] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$next$5d2f$internal$2f$font$2f$google$2f$geist_a71539c9$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[next]/internal/font/google/geist_a71539c9.js [app-rsc] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$next$5d2f$internal$2f$font$2f$google$2f$geist_mono_8d43a2aa$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[next]/internal/font/google/geist_mono_8d43a2aa.js [app-rsc] (ecmascript)"); +; +; +; +; +const metadata = { + title: "Create Next App", + description: "Generated by create next app" +}; +function RootLayout({ children }) { + return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])("html", { + lang: "en", + className: `${__TURBOPACK__imported__module__$5b$next$5d2f$internal$2f$font$2f$google$2f$geist_a71539c9$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["default"].variable} ${__TURBOPACK__imported__module__$5b$next$5d2f$internal$2f$font$2f$google$2f$geist_mono_8d43a2aa$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["default"].variable} h-full antialiased`, + children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])("body", { + className: "min-h-full flex flex-col", + children: children + }, void 0, false, { + fileName: "[project]/src/app/layout.tsx", + lineNumber: 30, + columnNumber: 7 + }, this) + }, void 0, false, { + fileName: "[project]/src/app/layout.tsx", + lineNumber: 26, + columnNumber: 5 + }, this); +} +}), +"[project]/src/app/layout.tsx [app-rsc] (ecmascript, Next.js Server Component)", ((__turbopack_context__) => { + +__turbopack_context__.n(__turbopack_context__.i("[project]/src/app/layout.tsx [app-rsc] (ecmascript)")); +}), +"[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-dev-runtime.js [app-rsc] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +module.exports = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/module.compiled.js [app-rsc] (ecmascript)").vendored['react-rsc'].ReactJsxDevRuntime; +}), +]; + +//# sourceMappingURL=%5Broot-of-the-server%5D__05etucg._.js.map \ No newline at end of file diff --git a/.next/dev/server/chunks/ssr/[root-of-the-server]__05etucg._.js.map b/.next/dev/server/chunks/ssr/[root-of-the-server]__05etucg._.js.map new file mode 100644 index 0000000..81d3db7 --- /dev/null +++ b/.next/dev/server/chunks/ssr/[root-of-the-server]__05etucg._.js.map @@ -0,0 +1,11 @@ +{ + "version": 3, + "sources": [], + "sections": [ + {"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":["turbopack:///[next]/internal/font/google/geist_a71539c9.module.css [app-rsc] (css module)"],"sourcesContent":["__turbopack_context__.v({\n \"className\": \"geist_a71539c9-module__T19VSG__className\",\n \"variable\": \"geist_a71539c9-module__T19VSG__variable\",\n});\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA","ignoreList":[0]}}, + {"offset": {"line": 11, "column": 0}, "map": {"version":3,"sources":["turbopack:///[next]/internal/font/google/geist_a71539c9.js"],"sourcesContent":["import cssModule from \"@vercel/turbopack-next/internal/font/google/cssmodule.module.css?{%22path%22:%22layout.tsx%22,%22import%22:%22Geist%22,%22arguments%22:[{%22variable%22:%22--font-geist-sans%22,%22subsets%22:[%22latin%22]}],%22variableName%22:%22geistSans%22}\";\nconst fontData = {\n className: cssModule.className,\n style: {\n fontFamily: \"'Geist', 'Geist Fallback'\",\n fontStyle: \"normal\",\n\n },\n};\n\nif (cssModule.variable != null) {\n fontData.variable = cssModule.variable;\n}\n\nexport default fontData;\n"],"names":["fontData","className","style","fontFamily","fontStyle","variable"],"mappings":";;;;AAAA;;AACA,MAAMA,WAAW;IACbC,WAAW,gKAAS,CAACA,SAAS;IAC9BC,OAAO;QACHC,YAAY;QACZC,WAAW;IAEf;AACJ;AAEA,IAAI,gKAAS,CAACC,QAAQ,IAAI,MAAM;IAC5BL,SAASK,QAAQ,GAAG,gKAAS,CAACA,QAAQ;AAC1C;uCAEeL","ignoreList":[0]}}, + {"offset": {"line": 31, "column": 0}, "map": {"version":3,"sources":["turbopack:///[next]/internal/font/google/geist_mono_8d43a2aa.module.css [app-rsc] (css module)"],"sourcesContent":["__turbopack_context__.v({\n \"className\": \"geist_mono_8d43a2aa-module__8Li5zG__className\",\n \"variable\": \"geist_mono_8d43a2aa-module__8Li5zG__variable\",\n});\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA","ignoreList":[0]}}, + {"offset": {"line": 39, "column": 0}, "map": {"version":3,"sources":["turbopack:///[next]/internal/font/google/geist_mono_8d43a2aa.js"],"sourcesContent":["import cssModule from \"@vercel/turbopack-next/internal/font/google/cssmodule.module.css?{%22path%22:%22layout.tsx%22,%22import%22:%22Geist_Mono%22,%22arguments%22:[{%22variable%22:%22--font-geist-mono%22,%22subsets%22:[%22latin%22]}],%22variableName%22:%22geistMono%22}\";\nconst fontData = {\n className: cssModule.className,\n style: {\n fontFamily: \"'Geist Mono', 'Geist Mono Fallback'\",\n fontStyle: \"normal\",\n\n },\n};\n\nif (cssModule.variable != null) {\n fontData.variable = cssModule.variable;\n}\n\nexport default fontData;\n"],"names":["fontData","className","style","fontFamily","fontStyle","variable"],"mappings":";;;;AAAA;;AACA,MAAMA,WAAW;IACbC,WAAW,qKAAS,CAACA,SAAS;IAC9BC,OAAO;QACHC,YAAY;QACZC,WAAW;IAEf;AACJ;AAEA,IAAI,qKAAS,CAACC,QAAQ,IAAI,MAAM;IAC5BL,SAASK,QAAQ,GAAG,qKAAS,CAACA,QAAQ;AAC1C;uCAEeL","ignoreList":[0]}}, + {"offset": {"line": 60, "column": 0}, "map": {"version":3,"sources":["file:///C:/Users/rjrbi/openapi-finder/src/app/layout.tsx"],"sourcesContent":["import type { Metadata } from \"next\";\nimport { Geist, Geist_Mono } from \"next/font/google\";\nimport \"./globals.css\";\n\nconst geistSans = Geist({\n variable: \"--font-geist-sans\",\n subsets: [\"latin\"],\n});\n\nconst geistMono = Geist_Mono({\n variable: \"--font-geist-mono\",\n subsets: [\"latin\"],\n});\n\nexport const metadata: Metadata = {\n title: \"Create Next App\",\n description: \"Generated by create next app\",\n};\n\nexport default function RootLayout({\n children,\n}: Readonly<{\n children: React.ReactNode;\n}>) {\n return (\n \n {children}\n \n );\n}\n"],"names":["metadata","title","description","RootLayout","children","lang","className","variable"],"mappings":";;;;;;;;;;;;;AAcO,MAAMA,WAAqB;IAChCC,OAAO;IACPC,aAAa;AACf;AAEe,SAASC,WAAW,EACjCC,QAAQ,EAGR;IACA,qBACE,8OAAC;QACCC,MAAK;QACLC,WAAW,GAAG,oJAAS,CAACC,QAAQ,CAAC,CAAC,EAAE,yJAAS,CAACA,QAAQ,CAAC,mBAAmB,CAAC;kBAE3E,cAAA,8OAAC;YAAKD,WAAU;sBAA4BF;;;;;;;;;;;AAGlD"}}, + {"offset": {"line": 103, "column": 0}, "map": {"version":3,"sources":["file:///C:/Users/rjrbi/openapi-finder/node_modules/next/src/server/route-modules/app-page/vendored/rsc/react-jsx-dev-runtime.ts"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-rsc']!.ReactJsxDevRuntime\n"],"names":["module","exports","require","vendored","ReactJsxDevRuntime"],"mappings":"AAAAA,OAAOC,OAAO,GACZC,QAAQ,4HACRC,QAAQ,CAAC,YAAY,CAAEC,kBAAkB","ignoreList":[0]}}] +} \ No newline at end of file diff --git a/.next/dev/server/chunks/ssr/[root-of-the-server]__05p4ngc._.js b/.next/dev/server/chunks/ssr/[root-of-the-server]__05p4ngc._.js new file mode 100644 index 0000000..08fc7d6 --- /dev/null +++ b/.next/dev/server/chunks/ssr/[root-of-the-server]__05p4ngc._.js @@ -0,0 +1,169 @@ +module.exports = [ +"[externals]/next/dist/shared/lib/no-fallback-error.external.js [external] (next/dist/shared/lib/no-fallback-error.external.js, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("next/dist/shared/lib/no-fallback-error.external.js", () => require("next/dist/shared/lib/no-fallback-error.external.js")); + +module.exports = mod; +}), +"[project]/src/app/favicon.ico (static in ecmascript, tag client)", ((__turbopack_context__) => { + +__turbopack_context__.v("/_next/static/media/favicon.0x3dzn~oxb6tn.ico" + (globalThis["NEXT_CLIENT_ASSET_SUFFIX"] || ''));}), +"[project]/src/app/favicon.ico.mjs { IMAGE => \"[project]/src/app/favicon.ico (static in ecmascript, tag client)\" } [app-rsc] (structured image object, ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "default", + ()=>__TURBOPACK__default__export__ +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$src$2f$app$2f$favicon$2e$ico__$28$static__in__ecmascript$2c$__tag__client$29$__ = __turbopack_context__.i("[project]/src/app/favicon.ico (static in ecmascript, tag client)"); +; +const __TURBOPACK__default__export__ = { + src: __TURBOPACK__imported__module__$5b$project$5d2f$src$2f$app$2f$favicon$2e$ico__$28$static__in__ecmascript$2c$__tag__client$29$__["default"], + width: 256, + height: 256 +}; +}), +"[project]/src/app/page.tsx [app-rsc] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "default", + ()=>Home +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-dev-runtime.js [app-rsc] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$image$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/image.js [app-rsc] (ecmascript)"); +; +; +function Home() { + return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])("div", { + className: "flex flex-col flex-1 items-center justify-center bg-zinc-50 font-sans dark:bg-black", + children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])("main", { + className: "flex flex-1 w-full max-w-3xl flex-col items-center justify-between py-32 px-16 bg-white dark:bg-black sm:items-start", + children: [ + /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$image$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["default"], { + className: "dark:invert", + src: "/next.svg", + alt: "Next.js logo", + width: 100, + height: 20, + priority: true + }, void 0, false, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 7, + columnNumber: 9 + }, this), + /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])("div", { + className: "flex flex-col items-center gap-6 text-center sm:items-start sm:text-left", + children: [ + /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])("h1", { + className: "max-w-xs text-3xl font-semibold leading-10 tracking-tight text-black dark:text-zinc-50", + children: "To get started, edit the page.tsx file." + }, void 0, false, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 16, + columnNumber: 11 + }, this), + /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])("p", { + className: "max-w-md text-lg leading-8 text-zinc-600 dark:text-zinc-400", + children: [ + "Looking for a starting point or more instructions? Head over to", + " ", + /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])("a", { + href: "https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app", + className: "font-medium text-zinc-950 dark:text-zinc-50", + children: "Templates" + }, void 0, false, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 21, + columnNumber: 13 + }, this), + " ", + "or the", + " ", + /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])("a", { + href: "https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app", + className: "font-medium text-zinc-950 dark:text-zinc-50", + children: "Learning" + }, void 0, false, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 28, + columnNumber: 13 + }, this), + " ", + "center." + ] + }, void 0, true, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 19, + columnNumber: 11 + }, this) + ] + }, void 0, true, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 15, + columnNumber: 9 + }, this), + /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])("div", { + className: "flex flex-col gap-4 text-base font-medium sm:flex-row", + children: [ + /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])("a", { + className: "flex h-12 w-full items-center justify-center gap-2 rounded-full bg-foreground px-5 text-background transition-colors hover:bg-[#383838] dark:hover:bg-[#ccc] md:w-[158px]", + href: "https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app", + target: "_blank", + rel: "noopener noreferrer", + children: [ + /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$image$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["default"], { + className: "dark:invert", + src: "/vercel.svg", + alt: "Vercel logomark", + width: 16, + height: 16 + }, void 0, false, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 44, + columnNumber: 13 + }, this), + "Deploy Now" + ] + }, void 0, true, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 38, + columnNumber: 11 + }, this), + /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["jsxDEV"])("a", { + className: "flex h-12 w-full items-center justify-center rounded-full border border-solid border-black/[.08] px-5 transition-colors hover:border-transparent hover:bg-black/[.04] dark:border-white/[.145] dark:hover:bg-[#1a1a1a] md:w-[158px]", + href: "https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app", + target: "_blank", + rel: "noopener noreferrer", + children: "Documentation" + }, void 0, false, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 53, + columnNumber: 11 + }, this) + ] + }, void 0, true, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 37, + columnNumber: 9 + }, this) + ] + }, void 0, true, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 6, + columnNumber: 7 + }, this) + }, void 0, false, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 5, + columnNumber: 5 + }, this); +} +}), +"[project]/src/app/page.tsx [app-rsc] (ecmascript, Next.js Server Component)", ((__turbopack_context__) => { + +__turbopack_context__.n(__turbopack_context__.i("[project]/src/app/page.tsx [app-rsc] (ecmascript)")); +}), +]; + +//# sourceMappingURL=%5Broot-of-the-server%5D__05p4ngc._.js.map \ No newline at end of file diff --git a/.next/dev/server/chunks/ssr/[root-of-the-server]__05p4ngc._.js.map b/.next/dev/server/chunks/ssr/[root-of-the-server]__05p4ngc._.js.map new file mode 100644 index 0000000..1837d96 --- /dev/null +++ b/.next/dev/server/chunks/ssr/[root-of-the-server]__05p4ngc._.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": [], + "sections": [ + {"offset": {"line": 13, "column": 0}, "map": {"version":3,"sources":["file:///C:/Users/rjrbi/openapi-finder/src/app/favicon.ico.mjs%20%28structured%20image%20object%29"],"sourcesContent":["import src from \"IMAGE\";\nexport default { src, width: 256, height: 256 }\n"],"names":["src","width","height"],"mappings":";;;;AAAA;;uCACe;IAAEA,KAAAA,0IAAG;IAAEC,OAAO;IAAKC,QAAQ;AAAI"}}, + {"offset": {"line": 28, "column": 0}, "map": {"version":3,"sources":["file:///C:/Users/rjrbi/openapi-finder/src/app/page.tsx"],"sourcesContent":["import Image from \"next/image\";\n\nexport default function Home() {\n return (\n
\n
\n \n
\n

\n To get started, edit the page.tsx file.\n

\n

\n Looking for a starting point or more instructions? Head over to{\" \"}\n \n Templates\n {\" \"}\n or the{\" \"}\n \n Learning\n {\" \"}\n center.\n

\n
\n
\n \n \n Deploy Now\n \n \n Documentation\n \n
\n
\n
\n );\n}\n"],"names":["Home","className","src","alt","width","height","priority","href","target","rel"],"mappings":";;;;;AAAA;;;AAEe,SAASA;IACtB,qBACE,8OAAC;QAAIC,WAAU;kBACb,cAAA,8OAAC;YAAKA,WAAU;;8BACd,8OAAC,wIAAK;oBACJA,WAAU;oBACVC,KAAI;oBACJC,KAAI;oBACJC,OAAO;oBACPC,QAAQ;oBACRC,QAAQ;;;;;;8BAEV,8OAAC;oBAAIL,WAAU;;sCACb,8OAAC;4BAAGA,WAAU;sCAAyF;;;;;;sCAGvG,8OAAC;4BAAEA,WAAU;;gCAA8D;gCACT;8CAChE,8OAAC;oCACCM,MAAK;oCACLN,WAAU;8CACX;;;;;;gCAEI;gCAAI;gCACF;8CACP,8OAAC;oCACCM,MAAK;oCACLN,WAAU;8CACX;;;;;;gCAEI;gCAAI;;;;;;;;;;;;;8BAIb,8OAAC;oBAAIA,WAAU;;sCACb,8OAAC;4BACCA,WAAU;4BACVM,MAAK;4BACLC,QAAO;4BACPC,KAAI;;8CAEJ,8OAAC,wIAAK;oCACJR,WAAU;oCACVC,KAAI;oCACJC,KAAI;oCACJC,OAAO;oCACPC,QAAQ;;;;;;gCACR;;;;;;;sCAGJ,8OAAC;4BACCJ,WAAU;4BACVM,MAAK;4BACLC,QAAO;4BACPC,KAAI;sCACL;;;;;;;;;;;;;;;;;;;;;;;AAOX"}}] +} \ No newline at end of file diff --git a/.next/dev/server/chunks/ssr/[root-of-the-server]__0~y8ue.._.js b/.next/dev/server/chunks/ssr/[root-of-the-server]__0~y8ue.._.js new file mode 100644 index 0000000..41257f8 --- /dev/null +++ b/.next/dev/server/chunks/ssr/[root-of-the-server]__0~y8ue.._.js @@ -0,0 +1,68 @@ +module.exports = [ +"[externals]/next/dist/shared/lib/no-fallback-error.external.js [external] (next/dist/shared/lib/no-fallback-error.external.js, cjs)", ((__turbopack_context__, module, exports) => { + +const mod = __turbopack_context__.x("next/dist/shared/lib/no-fallback-error.external.js", () => require("next/dist/shared/lib/no-fallback-error.external.js")); + +module.exports = mod; +}), +"[project]/src/app/favicon.ico (static in ecmascript, tag client)", ((__turbopack_context__) => { + +__turbopack_context__.v("/_next/static/media/favicon.0x3dzn~oxb6tn.ico" + (globalThis["NEXT_CLIENT_ASSET_SUFFIX"] || ''));}), +"[project]/src/app/favicon.ico.mjs { IMAGE => \"[project]/src/app/favicon.ico (static in ecmascript, tag client)\" } [app-rsc] (structured image object, ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "default", + ()=>__TURBOPACK__default__export__ +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$src$2f$app$2f$favicon$2e$ico__$28$static__in__ecmascript$2c$__tag__client$29$__ = __turbopack_context__.i("[project]/src/app/favicon.ico (static in ecmascript, tag client)"); +; +const __TURBOPACK__default__export__ = { + src: __TURBOPACK__imported__module__$5b$project$5d2f$src$2f$app$2f$favicon$2e$ico__$28$static__in__ecmascript$2c$__tag__client$29$__["default"], + width: 256, + height: 256 +}; +}), +"[project]/src/app/page.tsx [app-rsc] (client reference proxy) ", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "default", + ()=>__TURBOPACK__default__export__ +]); +// This file is generated by next-core EcmascriptClientReferenceModule. +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-server.js [app-rsc] (ecmascript)"); +; +const __TURBOPACK__default__export__ = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["registerClientReference"])(function() { + throw new Error("Attempted to call the default export of [project]/src/app/page.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); +}, "[project]/src/app/page.tsx ", "default"); +}), +"[project]/src/app/page.tsx [app-rsc] (client reference proxy)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "default", + ()=>__TURBOPACK__default__export__ +]); +// This file is generated by next-core EcmascriptClientReferenceModule. +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-server.js [app-rsc] (ecmascript)"); +; +const __TURBOPACK__default__export__ = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$rsc$2f$react$2d$server$2d$dom$2d$turbopack$2d$server$2e$js__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__["registerClientReference"])(function() { + throw new Error("Attempted to call the default export of [project]/src/app/page.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); +}, "[project]/src/app/page.tsx", "default"); +}), +"[project]/src/app/page.tsx [app-rsc] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +var __TURBOPACK__imported__module__$5b$project$5d2f$src$2f$app$2f$page$2e$tsx__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__$3c$module__evaluation$3e$__ = __turbopack_context__.i("[project]/src/app/page.tsx [app-rsc] (client reference proxy) "); +var __TURBOPACK__imported__module__$5b$project$5d2f$src$2f$app$2f$page$2e$tsx__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__ = __turbopack_context__.i("[project]/src/app/page.tsx [app-rsc] (client reference proxy)"); +; +__turbopack_context__.n(__TURBOPACK__imported__module__$5b$project$5d2f$src$2f$app$2f$page$2e$tsx__$5b$app$2d$rsc$5d$__$28$client__reference__proxy$29$__); +}), +"[project]/src/app/page.tsx [app-rsc] (ecmascript, Next.js Server Component)", ((__turbopack_context__) => { + +__turbopack_context__.n(__turbopack_context__.i("[project]/src/app/page.tsx [app-rsc] (ecmascript)")); +}), +]; + +//# sourceMappingURL=%5Broot-of-the-server%5D__0~y8ue.._.js.map \ No newline at end of file diff --git a/.next/dev/server/chunks/ssr/[root-of-the-server]__0~y8ue.._.js.map b/.next/dev/server/chunks/ssr/[root-of-the-server]__0~y8ue.._.js.map new file mode 100644 index 0000000..0aee57d --- /dev/null +++ b/.next/dev/server/chunks/ssr/[root-of-the-server]__0~y8ue.._.js.map @@ -0,0 +1,9 @@ +{ + "version": 3, + "sources": [], + "sections": [ + {"offset": {"line": 13, "column": 0}, "map": {"version":3,"sources":["file:///C:/Users/rjrbi/openapi-finder/src/app/favicon.ico.mjs%20%28structured%20image%20object%29"],"sourcesContent":["import src from \"IMAGE\";\nexport default { src, width: 256, height: 256 }\n"],"names":["src","width","height"],"mappings":";;;;AAAA;;uCACe;IAAEA,KAAAA,0IAAG;IAAEC,OAAO;IAAKC,QAAQ;AAAI"}}, + {"offset": {"line": 28, "column": 0}, "map": {"version":3,"sources":["file:///C:/Users/rjrbi/openapi-finder/src/app/page.tsx/__nextjs-internal-proxy.mjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport default registerClientReference(\n function() { throw new Error(\"Attempted to call the default export of [project]/src/app/page.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/src/app/page.tsx \",\n \"default\",\n);\n"],"names":["Error"],"mappings":";;;;AAAA,uEAAuE;AACvE;;uCACe,IAAA,wQAAuB,EAClC;IAAa,MAAM,IAAIA,MAAM;AAAoR,GACjT,kDACA","ignoreList":[0]}}, + {"offset": {"line": 42, "column": 0}, "map": {"version":3,"sources":["file:///C:/Users/rjrbi/openapi-finder/src/app/page.tsx/__nextjs-internal-proxy.mjs"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport default registerClientReference(\n function() { throw new Error(\"Attempted to call the default export of [project]/src/app/page.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/src/app/page.tsx\",\n \"default\",\n);\n"],"names":["Error"],"mappings":";;;;AAAA,uEAAuE;AACvE;;uCACe,IAAA,wQAAuB,EAClC;IAAa,MAAM,IAAIA,MAAM;AAAgQ,GAC7R,8BACA","ignoreList":[0]}}, + {"offset": {"line": 56, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}}] +} \ No newline at end of file diff --git a/.next/dev/server/chunks/ssr/[turbopack]_runtime.js b/.next/dev/server/chunks/ssr/[turbopack]_runtime.js new file mode 100644 index 0000000..b9ac9c9 --- /dev/null +++ b/.next/dev/server/chunks/ssr/[turbopack]_runtime.js @@ -0,0 +1,1715 @@ +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; + } +} +globalThis.__turbopack_server_hmr_apply__ = __turbopack_server_hmr_apply__; + + +//# 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 new file mode 100644 index 0000000..b2df44e --- /dev/null +++ b/.next/dev/server/chunks/ssr/[turbopack]_runtime.js.map @@ -0,0 +1,14 @@ +{ + "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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AAM,IAAIhJ,MAAM,CAAC,WAAW,EAAEgJ,eAAeD,QAAQ;AACvD;AAEA;;CAEC,GACD,SAASE,2BACPhG,QAAkB,EAClBiG,UAAsB,EACtBC,UAAsB;IAEtB,IAAIC;IACJ,OAAQF;QACN;YACEE,sBAAsB,CAAC,4BAA4B,EAAED,YAAY;YACjE;QACF;YACEC,sBAAsB,CAAC,oCAAoC,EAAED,YAAY;YACzE;QACF;YACEC,sBAAsB;YACtB;QACF;YACEN,UACEI,YACA,CAACA,aAAe,CAAC,qBAAqB,EAAEA,YAAY;IAE1D;IACA,OAAO,CAAC,OAAO,EAAEjG,SAAS,kBAAkB,EAAEmG,oBAAoB,0CAA0C,CAAC;AAC/G;AAEA;;CAEC,GACD,SAASC,YAAYC,SAAmB;IACtC,MAAM,IAAItJ,MAAM;AAClB;AACAhC,iBAAiBuL,CAAC,GAAGF;AAErB,kGAAkG;AAClGrL,iBAAiBwL,CAAC,GAAGC;AAMrB,SAASxD,uBAAuByD,OAAiB;IAC/C,+DAA+D;IAC/DvL,OAAOQ,cAAc,CAAC+K,SAAS,QAAQ;QACrCjK,OAAO;IACT;AACF","ignoreList":[0]}}, + {"offset": {"line": 593, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared-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,CAA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B0B,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\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,yBAAyBC;IAC7BC,OAAO,mBAAkB;IAEzBC,gBAA2B;IAE3BH,YAAYI,OAAe,EAAED,eAA2B,CAAE;QACxD,KAAK,CAACC;QACN,IAAI,CAACD,eAAe,GAAGA;IACzB;AACF;AAyBA;;;CAGC,GACD,6DAA6D;AAC7D,SAASE,kBACPC,YAAiC,EACjCC,aAAuB,EACvBC,WAA4C;IAE5C,mCAAmC;IACnC,IAAIF,aAAaG,QAAQ,CAACC,OAAO,CAACH,mBAAmB,CAAC,GAAG;QACvDD,aAAaG,QAAQ,CAACE,IAAI,CAACJ;IAC7B;IAEA,0CAA0C;IAC1C,IAAIC,eAAeA,YAAYI,OAAO,CAACF,OAAO,CAACJ,aAAaO,EAAE,MAAM,CA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C,kBAA2D,EAC3DnC,eAAgC,EAChCzG,cAAsC,EACtC8I,mBAIc,EACdC,wBAAqE,EACrErH,qBAA8B;;IAE7B,CAAC,EAAEC,eAAe,EAAEC,oBAAoB,EAAE,GAAG0D,wBAC5C3D,iBACAC,sBACAF,sBACD;IAED,+CAA+C;IAC/C,MAAMiE,8BACJD,mCAAmC/D;IAErC,oDAAoD;IACpD,MAAM,EAAEyE,qBAAqB,EAAE,GAAGF,aAChCvE,iBACAwE,iBACAvE;IAGF,IAAI2F;IAEJ,SAASyB,YAAYO,GAAQ;QAC3B,IAAI,CAAChC,OAAOA,QAAQgC,KAAI,mBAAmB;IAC7C;IAEAV,WACElD,6BACAiD,oBACAxC,uBACAxE,sBACA6E,iBACAzG,gBACA8I,qBACAC,0BACAC;IAGF,IAAIzB,OAAO;QACT,MAAMA;IACR;IAEA,uEAAuE;IACvE,IAAIjH,yBAAyBiF,IAAI,GAAG,GAAG;QACrCmE,cACE,IAAInJ,OACJ,IAAIJ,OACJ,EAAE,EACF,IAAIA,OACJsG,iBACAzG,gBACA8I,qBACAC,0BACArH;IAEJ;AACF;AAEA;;;;;;;CAOC,GACD,SAASiI,kCAAkCC,OAc1C;IACC,MAAM,EACJ5B,KAAK,EACLC,QAAQ,EACR9B,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": 1517, "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;QAEA,OAAO,IAAKvB,QACVqB,SACAC;IAEJ;IAEA,mDAAmD;IACnD,MAAME,eAAe,CAACH,SAAmBI;QACvCA,KAAKC,YAAW,qBAAqB;IACvC;IAEA,0DAA0D;IAC1D,MAAMC,YAAYC,wBAChBd,IACAC,YACAC,YACAX,iBACAb,gBACAM,gBACAmB,sBACAG,eACAI;IAIAG,UAAkBE,MAAM,GAAG;IAE7B,OAAOF;AACT;AAEA;;CAEC,GACD,SAASG,yBACPC,SAAoB,EACpBb,QAAkB;IAElB,OAAOL,kBAAkBK,UAAUc,WAAWC,OAAO,EAAEF;AACzD;AAEA;;CAEC,GACD,oFAAoF;AACpF,SAASG,8BACPH,SAAoB,EACpBb,QAAkB;IAElB,MAAMG,UAAS7B,cAAc,CAAC0B,SAAS;IAEvC,IAAIG,SAAQ;QACV,IAAIA,QAAOc,KAAK,EAAE;YAChB,MAAMd,QAAOc,KAAK;QACpB;QACA,OAAOd;IACT;IAEA,OAAOS,yBAAyBC,WAAWb;AAC7C;AAEA;;;CAGC,GACD,aAAa;AACb,SAASkB,iCACPtB,EAAY,EACZuB,YAAuB;IAEvB,kCAAkC;IAClCC,kBAAkBD,cAAcvB,IAAItB,cAAc,CAACsB,GAAG;IAEtD,MAAMO,UAAS7B,cAAc,CAACsB,GAAG;IAEjC,IAAIO,SAAQ;QACV,IAAIA,QAAOc,KAAK,EAAE;YAChB,MAAMd,QAAOc,KAAK;QACpB;QAEA,OAAOd;IACT;IAEA,MAAMM,YAAYd,kBAAkBC,IAAIkB,WAAWO,MAAM,EAAEF,aAAavB,EAAE;IAE1E,yEAAyE;IACzEwB,kBAAkBD,cAAcvB,IAAIa;IAEpC,OAAOA;AACT;AAEAa,OAAOlB,OAAO,GAAG,CAACmB,aAA0B,CAAC;QAC3CC,GAAG,CAAC5B,KAAiBoB,8BAA8BO,YAAY3B;QAC/DR,GAAG,CAACqC,YAAyBC,iBAAiBH,YAAYE;IAC5D,CAAC","ignoreList":[0]}}, + {"offset": {"line": 1601, "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,MAAMC,eAAeC,KAAKC,OAAO,CAACC,cAAcP;IAChD,MAAMQ,WAAWN,IAAIO,aAAa,CAACL,cAAcM,IAAI;IACrD,MAAMC,YAAYV,WAAW,GAAGO,SAAS,CAAC,EAAEP,UAAU,GAAGO;IACzD,IAAII,OAAOb,MAAMa,IAAI,GAAG,uBAAuBD;IAC/C,IAAIZ,MAAMc,GAAG,EAAE;QACbD,QACE,uEACAE,OAAOC,IAAI,CAAChB,MAAMc,GAAG,EAAEG,QAAQ,CAAC;IACpC;IACA,OAAOJ;AACT;AAEA,IAAIK,yBAAmE;AAEvE,SAASC,oBACPC,eAAgC,EAChCC,cAAsC;IAEtC,IAAIH,0BAA0B,MAAM;QAClC,MAAM,IAAII,MAAM;IAClB;IAEA,qDAAqD;IACrDJ,yBAAyB,CAACK;QACxBC,mBAAmBD,KAAKH,iBAAiBC;IAC3C;AACF;AAEA;;;;;;CAMC,GACD,SAASI,YAAYF,GAAgC;IACnD,IAAIL,0BAA0B,MAAM;QAClCQ,QAAQC,IAAI,CACV,iEACAJ;QAEF,OAAO;IACT;IAEA,IAAI;QACFL,uBAAuBK,IAAIK,IAAI;QAC/B,OAAO;IACT,EAAE,OAAOC,KAAK;QACZH,QAAQI,KAAK,CAAC,gCAAgCD;QAC9C,OAAO;IACT;AACF;AAEA;;;CAGC,GACD,SAASL,mBACPD,GAAqB,EACrBH,eAAgC,EAChCC,cAAsC;IAEtC,IAAIE,IAAIQ,IAAI,KAAK,WAAW;QAC1B;IACF;IAEA,MAAMC,cAAcT,IAAIS,WAAW;IACnC,IAAIA,YAAYD,IAAI,KAAK,0BAA0B;QACjD;IACF;IAEA,IAAI;QACF,MAAM,EAAEE,UAAU,CAAC,CAAC,EAAEC,SAAS,CAAC,CAAC,EAAE,GAAGF;QAEtC,MAAMG,kBAAkB,CAACnC;YACvB,mCAAmC;YACnC,OAAO,CAAC,GAAGoC,IAAI,EAAEpC,MAAMc,GAAG,GAAGf,iBAAiBC,SAASA,MAAMa,IAAI;QACnE;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": 1683, "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\nglobalThis.__turbopack_server_hmr_apply__ = __turbopack_server_hmr_apply__\n"],"names":["hmrClientInitialized","ensureHmrClientInitialized","initializeServerHmr","moduleFactories","devModuleCache","__turbopack_server_hmr_apply__","update","emitMessage","type","data","err","console","error","globalThis"],"mappings":"AAAA,+DAA+D;AAC/D,wCAAwC;AAExC;;;CAGC,GAED,uEAAuE;AACvE,IAAIA,uBAAuB;AAC3B,SAASC;IACP,IAAID,sBAAsB;IAC1BA,uBAAuB;IAEvB,wEAAwE;IACxE,yCAAyC;IACzC,kEAAkE;IAClEE,oBAAoBC,iBAAiBC;AACvC;AAEA,SAASC,+BAA+BC,MAAwB;IAC9D,IAAI;QACFL;QAEA,uEAAuE;QACvE,OAAOM,YAAY;YACjBC,MAAM;YACNC,MAAMH;QACR;IACF,EAAE,OAAOI,KAAK;QACZC,QAAQC,KAAK,CAAC,wCAAwCF;QACtD,OAAO;IACT;AACF;AAEAG,WAAWR,8BAA8B,GAAGA","ignoreList":[0]}}] +} \ No newline at end of file diff --git a/.next/dev/server/chunks/ssr/_0i76b3g._.js b/.next/dev/server/chunks/ssr/_0i76b3g._.js new file mode 100644 index 0000000..f8d2133 --- /dev/null +++ b/.next/dev/server/chunks/ssr/_0i76b3g._.js @@ -0,0 +1,219 @@ +module.exports = [ +"[project]/src/components/search-bar.tsx [app-ssr] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "SearchBar", + ()=>SearchBar +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime.js [app-ssr] (ecmascript)"); +"use client"; +; +function SearchBar({ value, onChange, placeholder = "Buscar APIs por nombre..." }) { + return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", { + className: "w-full", + children: [ + /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("label", { + htmlFor: "api-search", + className: "sr-only", + children: "Buscar APIs por nombre" + }, void 0, false, { + fileName: "[project]/src/components/search-bar.tsx", + lineNumber: 18, + columnNumber: 7 + }, this), + /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("input", { + id: "api-search", + type: "text", + value: value, + onChange: onChange, + placeholder: placeholder, + className: "w-full rounded-2xl border border-zinc-300 bg-white px-4 py-3 text-sm text-zinc-900 shadow-sm outline-none transition focus:border-zinc-500 focus:ring-4 focus:ring-zinc-200" + }, void 0, false, { + fileName: "[project]/src/components/search-bar.tsx", + lineNumber: 22, + columnNumber: 7 + }, this) + ] + }, void 0, true, { + fileName: "[project]/src/components/search-bar.tsx", + lineNumber: 17, + columnNumber: 5 + }, this); +} +}), +"[project]/src/app/page.tsx [app-ssr] (ecmascript)", ((__turbopack_context__) => { +"use strict"; + +__turbopack_context__.s([ + "default", + ()=>Home +]); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime.js [app-ssr] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); +var __TURBOPACK__imported__module__$5b$project$5d2f$src$2f$components$2f$search$2d$bar$2e$tsx__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/src/components/search-bar.tsx [app-ssr] (ecmascript)"); +"use client"; +; +; +; +const apis = [ + { + id: 1, + name: "OpenWeather", + description: "Datos del tiempo en tiempo real" + }, + { + id: 2, + name: "PokeAPI", + description: "Información sobre Pokemon" + }, + { + id: 3, + name: "REST Countries", + description: "Datos de países y regiones" + }, + { + id: 4, + name: "The Cat API", + description: "Imágenes e información de gatos" + } +]; +function Home() { + const [search, setSearch] = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useState"])(""); + const filteredApis = apis.filter((api)=>api.name.toLowerCase().includes(search.toLowerCase())); + function handleSearchChange(event) { + setSearch(event.target.value); + } + return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("main", { + className: "min-h-screen bg-zinc-50 px-4 py-10 text-zinc-900", + children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", { + className: "mx-auto flex w-full max-w-3xl flex-col gap-8", + children: [ + /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("header", { + className: "space-y-3", + children: [ + /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("p", { + className: "text-sm font-medium uppercase tracking-[0.2em] text-zinc-500", + children: "OpenAPI Finder" + }, void 0, false, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 44, + columnNumber: 11 + }, this), + /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", { + className: "space-y-2", + children: [ + /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("h1", { + className: "text-4xl font-semibold tracking-tight", + children: "Encuentra APIs publicas rapidamente" + }, void 0, false, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 49, + columnNumber: 13 + }, this), + /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("p", { + className: "max-w-2xl text-base text-zinc-600", + children: "Usa la barra de busqueda para filtrar APIs por nombre desde la pagina principal." + }, void 0, false, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 52, + columnNumber: 13 + }, this) + ] + }, void 0, true, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 48, + columnNumber: 11 + }, this) + ] + }, void 0, true, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 43, + columnNumber: 9 + }, this), + /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])(__TURBOPACK__imported__module__$5b$project$5d2f$src$2f$components$2f$search$2d$bar$2e$tsx__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["SearchBar"], { + value: search, + onChange: handleSearchChange, + placeholder: "Buscar APIs por nombre..." + }, void 0, false, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 59, + columnNumber: 9 + }, this), + /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("section", { + className: "space-y-3", + children: [ + /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("h2", { + className: "text-sm font-semibold uppercase tracking-wide text-zinc-500", + children: "Resultados" + }, void 0, false, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 66, + columnNumber: 11 + }, this), + filteredApis.length > 0 ? /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("ul", { + className: "grid gap-3", + children: filteredApis.map((api)=>/*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("li", { + className: "rounded-2xl border border-zinc-200 bg-white p-4 shadow-sm", + children: [ + /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("h3", { + className: "text-lg font-semibold", + children: api.name + }, void 0, false, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 77, + columnNumber: 19 + }, this), + /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("p", { + className: "mt-1 text-sm text-zinc-600", + children: api.description + }, void 0, false, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 78, + columnNumber: 19 + }, this) + ] + }, api.id, true, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 73, + columnNumber: 17 + }, this)) + }, void 0, false, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 71, + columnNumber: 13 + }, this) : /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$dev$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxDEV"])("div", { + className: "rounded-2xl border border-dashed border-zinc-300 bg-white p-6 text-sm text-zinc-500", + children: "No se han encontrado APIs con ese nombre." + }, void 0, false, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 85, + columnNumber: 13 + }, this) + ] + }, void 0, true, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 65, + columnNumber: 9 + }, this) + ] + }, void 0, true, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 42, + columnNumber: 7 + }, this) + }, void 0, false, { + fileName: "[project]/src/app/page.tsx", + lineNumber: 41, + columnNumber: 5 + }, this); +} +}), +"[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +module.exports = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/module.compiled.js [app-ssr] (ecmascript)").vendored['react-ssr'].ReactJsxDevRuntime; +}), +]; + +//# sourceMappingURL=_0i76b3g._.js.map \ No newline at end of file diff --git a/.next/dev/server/chunks/ssr/_0i76b3g._.js.map b/.next/dev/server/chunks/ssr/_0i76b3g._.js.map new file mode 100644 index 0000000..e710ebf --- /dev/null +++ b/.next/dev/server/chunks/ssr/_0i76b3g._.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "sources": [], + "sections": [ + {"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["file:///C:/Users/rjrbi/openapi-finder/src/components/search-bar.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ChangeEvent } from \"react\";\n\ntype SearchBarProps = {\n value: string;\n onChange: (event: ChangeEvent) => void;\n placeholder?: string;\n};\n\nexport function SearchBar({\n value,\n onChange,\n placeholder = \"Buscar APIs por nombre...\",\n}: SearchBarProps) {\n return (\n
\n \n\n \n
\n );\n}"],"names":["SearchBar","value","onChange","placeholder","className","htmlFor","id","type"],"mappings":";;;;;AAAA;;AAUO,SAASA,UAAU,EACxBC,KAAK,EACLC,QAAQ,EACRC,cAAc,2BAA2B,EAC1B;IACf,qBACE,8OAAC;QAAIC,WAAU;;0BACb,8OAAC;gBAAMC,SAAQ;gBAAaD,WAAU;0BAAU;;;;;;0BAIhD,8OAAC;gBACCE,IAAG;gBACHC,MAAK;gBACLN,OAAOA;gBACPC,UAAUA;gBACVC,aAAaA;gBACbC,WAAU;;;;;;;;;;;;AAIlB"}}, + {"offset": {"line": 47, "column": 0}, "map": {"version":3,"sources":["file:///C:/Users/rjrbi/openapi-finder/src/app/page.tsx"],"sourcesContent":["\"use client\";\n\nimport { ChangeEvent, useState } from \"react\";\nimport { SearchBar } from \"@/components/search-bar\";\n\nconst apis = [\n {\n id: 1,\n name: \"OpenWeather\",\n description: \"Datos del tiempo en tiempo real\",\n },\n {\n id: 2,\n name: \"PokeAPI\",\n description: \"Información sobre Pokemon\",\n },\n {\n id: 3,\n name: \"REST Countries\",\n description: \"Datos de países y regiones\",\n },\n {\n id: 4,\n name: \"The Cat API\",\n description: \"Imágenes e información de gatos\",\n },\n];\n\nexport default function Home() {\n const [search, setSearch] = useState(\"\");\n\n const filteredApis = apis.filter((api) =>\n api.name.toLowerCase().includes(search.toLowerCase())\n );\n\n function handleSearchChange(event: ChangeEvent) {\n setSearch(event.target.value);\n }\n\n return (\n
\n
\n
\n

\n OpenAPI Finder\n

\n\n
\n

\n Encuentra APIs publicas rapidamente\n

\n

\n Usa la barra de busqueda para filtrar APIs por nombre desde la\n pagina principal.\n

\n
\n
\n\n \n\n
\n

\n Resultados\n

\n\n {filteredApis.length > 0 ? (\n
    \n {filteredApis.map((api) => (\n \n

    {api.name}

    \n

    \n {api.description}\n

    \n \n ))}\n
\n ) : (\n
\n No se han encontrado APIs con ese nombre.\n
\n )}\n
\n
\n
\n );\n}"],"names":["apis","id","name","description","Home","search","setSearch","filteredApis","filter","api","toLowerCase","includes","handleSearchChange","event","target","value","className","onChange","placeholder","length","map"],"mappings":";;;;;AAEA;AACA;AAHA;;;;AAKA,MAAMA,OAAO;IACX;QACEC,IAAI;QACJC,MAAM;QACNC,aAAa;IACf;IACA;QACEF,IAAI;QACJC,MAAM;QACNC,aAAa;IACf;IACA;QACEF,IAAI;QACJC,MAAM;QACNC,aAAa;IACf;IACA;QACEF,IAAI;QACJC,MAAM;QACNC,aAAa;IACf;CACD;AAEc,SAASC;IACtB,MAAM,CAACC,QAAQC,UAAU,GAAG,IAAA,iNAAQ,EAAC;IAErC,MAAMC,eAAeP,KAAKQ,MAAM,CAAC,CAACC,MAChCA,IAAIP,IAAI,CAACQ,WAAW,GAAGC,QAAQ,CAACN,OAAOK,WAAW;IAGpD,SAASE,mBAAmBC,KAAoC;QAC9DP,UAAUO,MAAMC,MAAM,CAACC,KAAK;IAC9B;IAEA,qBACE,8OAAC;QAAKC,WAAU;kBACd,cAAA,8OAAC;YAAIA,WAAU;;8BACb,8OAAC;oBAAOA,WAAU;;sCAChB,8OAAC;4BAAEA,WAAU;sCAA+D;;;;;;sCAI5E,8OAAC;4BAAIA,WAAU;;8CACb,8OAAC;oCAAGA,WAAU;8CAAwC;;;;;;8CAGtD,8OAAC;oCAAEA,WAAU;8CAAoC;;;;;;;;;;;;;;;;;;8BAOrD,8OAAC,gJAAS;oBACRD,OAAOV;oBACPY,UAAUL;oBACVM,aAAY;;;;;;8BAGd,8OAAC;oBAAQF,WAAU;;sCACjB,8OAAC;4BAAGA,WAAU;sCAA8D;;;;;;wBAI3ET,aAAaY,MAAM,GAAG,kBACrB,8OAAC;4BAAGH,WAAU;sCACXT,aAAaa,GAAG,CAAC,CAACX,oBACjB,8OAAC;oCAECO,WAAU;;sDAEV,8OAAC;4CAAGA,WAAU;sDAAyBP,IAAIP,IAAI;;;;;;sDAC/C,8OAAC;4CAAEc,WAAU;sDACVP,IAAIN,WAAW;;;;;;;mCALbM,IAAIR,EAAE;;;;;;;;;iDAWjB,8OAAC;4BAAIe,WAAU;sCAAsF;;;;;;;;;;;;;;;;;;;;;;;AAQjH"}}, + {"offset": {"line": 214, "column": 0}, "map": {"version":3,"sources":["file:///C:/Users/rjrbi/openapi-finder/node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime.ts"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactJsxDevRuntime\n"],"names":["module","exports","require","vendored","ReactJsxDevRuntime"],"mappings":"AAAAA,OAAOC,OAAO,GACZC,QAAQ,4HACRC,QAAQ,CAAC,YAAY,CAAEC,kBAAkB","ignoreList":[0]}}] +} \ No newline at end of file diff --git a/.next/dev/server/chunks/ssr/_next-internal_server_app_page_actions_09-gtaw.js b/.next/dev/server/chunks/ssr/_next-internal_server_app_page_actions_09-gtaw.js new file mode 100644 index 0000000..7bc185d --- /dev/null +++ b/.next/dev/server/chunks/ssr/_next-internal_server_app_page_actions_09-gtaw.js @@ -0,0 +1,7 @@ +module.exports = [ +"[project]/.next-internal/server/app/page/actions.js [app-rsc] (server actions loader, ecmascript)", ((__turbopack_context__, module, exports) => { + +}), +]; + +//# sourceMappingURL=_next-internal_server_app_page_actions_09-gtaw.js.map \ No newline at end of file diff --git a/.next/dev/server/chunks/ssr/_next-internal_server_app_page_actions_09-gtaw.js.map b/.next/dev/server/chunks/ssr/_next-internal_server_app_page_actions_09-gtaw.js.map new file mode 100644 index 0000000..f89d7b7 --- /dev/null +++ b/.next/dev/server/chunks/ssr/_next-internal_server_app_page_actions_09-gtaw.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": [], + "sections": [ + {"offset": {"line": 3, "column": 0}, "map": {"version":3,"sources":[],"names":[],"mappings":""}}] +} \ No newline at end of file diff --git a/.next/dev/server/chunks/ssr/node_modules_09w7yel._.js b/.next/dev/server/chunks/ssr/node_modules_09w7yel._.js new file mode 100644 index 0000000..772715c --- /dev/null +++ b/.next/dev/server/chunks/ssr/node_modules_09w7yel._.js @@ -0,0 +1,313 @@ +module.exports = [ +"[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +function _interop_require_default(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +} +exports._ = _interop_require_default; +}), +"[project]/node_modules/next/dist/client/components/handle-isr-error.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "handleISRError", { + enumerable: true, + get: function() { + return handleISRError; + } +}); +const workAsyncStorage = ("TURBOPACK compile-time truthy", 1) ? __turbopack_context__.r("[externals]/next/dist/server/app-render/work-async-storage.external.js [external] (next/dist/server/app-render/work-async-storage.external.js, cjs)").workAsyncStorage : "TURBOPACK unreachable"; +function handleISRError({ error }) { + if (workAsyncStorage) { + const store = workAsyncStorage.getStore(); + if (store?.isStaticGeneration) { + if (error) { + console.error(error); + } + throw error; + } + } +} +if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { + Object.defineProperty(exports.default, '__esModule', { + value: true + }); + Object.assign(exports.default, exports); + module.exports = exports.default; +} +}), +"[project]/node_modules/next/dist/client/components/builtin/error-styles.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +0 && (module.exports = { + WarningIcon: null, + errorStyles: null, + errorThemeCss: null +}); +function _export(target, all) { + for(var name in all)Object.defineProperty(target, name, { + enumerable: true, + get: all[name] + }); +} +_export(exports, { + WarningIcon: function() { + return WarningIcon; + }, + errorStyles: function() { + return errorStyles; + }, + errorThemeCss: function() { + return errorThemeCss; + } +}); +const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-ssr] (ecmascript)"); +const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js [app-ssr] (ecmascript)"); +const _react = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)")); +const errorStyles = { + container: { + fontFamily: 'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"', + height: '100vh', + display: 'flex', + alignItems: 'center', + justifyContent: 'center' + }, + card: { + marginTop: '-32px', + maxWidth: '325px', + padding: '32px 28px', + textAlign: 'left' + }, + icon: { + marginBottom: '24px' + }, + title: { + fontSize: '24px', + fontWeight: 500, + letterSpacing: '-0.02em', + lineHeight: '32px', + margin: '0 0 12px 0', + color: 'var(--next-error-title)' + }, + message: { + fontSize: '14px', + fontWeight: 400, + lineHeight: '21px', + margin: '0 0 20px 0', + color: 'var(--next-error-message)' + }, + form: { + margin: 0 + }, + buttonGroup: { + display: 'flex', + gap: '8px', + alignItems: 'center' + }, + button: { + display: 'inline-flex', + alignItems: 'center', + justifyContent: 'center', + height: '32px', + padding: '0 12px', + fontSize: '14px', + fontWeight: 500, + lineHeight: '20px', + borderRadius: '6px', + cursor: 'pointer', + color: 'var(--next-error-btn-text)', + background: 'var(--next-error-btn-bg)', + border: 'var(--next-error-btn-border)' + }, + buttonSecondary: { + display: 'inline-flex', + alignItems: 'center', + justifyContent: 'center', + height: '32px', + padding: '0 12px', + fontSize: '14px', + fontWeight: 500, + lineHeight: '20px', + borderRadius: '6px', + cursor: 'pointer', + color: 'var(--next-error-btn-secondary-text)', + background: 'var(--next-error-btn-secondary-bg)', + border: 'var(--next-error-btn-secondary-border)' + }, + digestFooter: { + position: 'fixed', + bottom: '32px', + left: '0', + right: '0', + textAlign: 'center', + fontFamily: 'ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,monospace', + fontSize: '12px', + lineHeight: '18px', + fontWeight: 400, + margin: '0', + color: 'var(--next-error-digest)' + } +}; +const errorThemeCss = ` +:root { + --next-error-bg: #fff; + --next-error-text: #171717; + --next-error-title: #171717; + --next-error-message: #171717; + --next-error-digest: #666666; + --next-error-btn-text: #fff; + --next-error-btn-bg: #171717; + --next-error-btn-border: none; + --next-error-btn-secondary-text: #171717; + --next-error-btn-secondary-bg: transparent; + --next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08); +} +@media (prefers-color-scheme: dark) { + :root { + --next-error-bg: #0a0a0a; + --next-error-text: #ededed; + --next-error-title: #ededed; + --next-error-message: #ededed; + --next-error-digest: #a0a0a0; + --next-error-btn-text: #0a0a0a; + --next-error-btn-bg: #ededed; + --next-error-btn-border: none; + --next-error-btn-secondary-text: #ededed; + --next-error-btn-secondary-bg: transparent; + --next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14); + } +} +body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); } +`.replace(/\n\s*/g, ''); +function WarningIcon() { + return /*#__PURE__*/ (0, _jsxruntime.jsx)("svg", { + width: "32", + height: "32", + viewBox: "-0.2 -1.5 32 32", + fill: "none", + style: errorStyles.icon, + children: /*#__PURE__*/ (0, _jsxruntime.jsx)("path", { + d: "M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z", + fill: "var(--next-error-title)" + }) + }); +} +if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { + Object.defineProperty(exports.default, '__esModule', { + value: true + }); + Object.assign(exports.default, exports); + module.exports = exports.default; +} +}), +"[project]/node_modules/next/dist/client/components/builtin/global-error.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, // supplied custom global error signatures. +"default", { + enumerable: true, + get: function() { + return _default; + } +}); +const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-ssr] (ecmascript)"); +const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js [app-ssr] (ecmascript)"); +const _react = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)")); +const _handleisrerror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/handle-isr-error.js [app-ssr] (ecmascript)"); +const _errorstyles = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/builtin/error-styles.js [app-ssr] (ecmascript)"); +function DefaultGlobalError({ error }) { + const digest = error?.digest; + const isServerError = !!digest; + const message = isServerError ? 'A server error occurred. Reload to try again.' : 'Reload to try again, or go back.'; + (0, _handleisrerror.handleISRError)({ + error + }); + return /*#__PURE__*/ (0, _jsxruntime.jsxs)("html", { + id: "__next_error__", + children: [ + /*#__PURE__*/ (0, _jsxruntime.jsx)("head", { + children: /*#__PURE__*/ (0, _jsxruntime.jsx)("style", { + dangerouslySetInnerHTML: { + __html: _errorstyles.errorThemeCss + } + }) + }), + /*#__PURE__*/ (0, _jsxruntime.jsxs)("body", { + children: [ + /*#__PURE__*/ (0, _jsxruntime.jsx)("div", { + style: _errorstyles.errorStyles.container, + children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", { + style: _errorstyles.errorStyles.card, + children: [ + /*#__PURE__*/ (0, _jsxruntime.jsx)(_errorstyles.WarningIcon, {}), + /*#__PURE__*/ (0, _jsxruntime.jsx)("h1", { + style: _errorstyles.errorStyles.title, + children: "This page couldn’t load" + }), + /*#__PURE__*/ (0, _jsxruntime.jsx)("p", { + style: _errorstyles.errorStyles.message, + children: message + }), + /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", { + style: _errorstyles.errorStyles.buttonGroup, + children: [ + /*#__PURE__*/ (0, _jsxruntime.jsx)("form", { + style: _errorstyles.errorStyles.form, + children: /*#__PURE__*/ (0, _jsxruntime.jsx)("button", { + type: "submit", + style: _errorstyles.errorStyles.button, + children: "Reload" + }) + }), + !isServerError && /*#__PURE__*/ (0, _jsxruntime.jsx)("button", { + type: "button", + style: _errorstyles.errorStyles.buttonSecondary, + onClick: ()=>{ + if (window.history.length > 1) { + window.history.back(); + } else { + window.location.href = '/'; + } + }, + children: "Back" + }) + ] + }) + ] + }) + }), + digest && /*#__PURE__*/ (0, _jsxruntime.jsxs)("p", { + style: _errorstyles.errorStyles.digestFooter, + children: [ + "ERROR ", + digest + ] + }) + ] + }) + ] + }); +} +const _default = DefaultGlobalError; +if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { + Object.defineProperty(exports.default, '__esModule', { + value: true + }); + Object.assign(exports.default, exports); + module.exports = exports.default; +} +}), +]; + +//# sourceMappingURL=node_modules_09w7yel._.js.map \ No newline at end of file diff --git a/.next/dev/server/chunks/ssr/node_modules_09w7yel._.js.map b/.next/dev/server/chunks/ssr/node_modules_09w7yel._.js.map new file mode 100644 index 0000000..48cc102 --- /dev/null +++ b/.next/dev/server/chunks/ssr/node_modules_09w7yel._.js.map @@ -0,0 +1,9 @@ +{ + "version": 3, + "sources": [], + "sections": [ + {"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["file:///C:/Users/rjrbi/openapi-finder/node_modules/%40swc/helpers/cjs/_interop_require_default.cjs"],"sourcesContent":["\"use strict\";\n\nfunction _interop_require_default(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nexports._ = _interop_require_default;\n"],"names":["_interop_require_default","obj","__esModule","default","exports","_"],"mappings":"AAEA,SAASA,yBAAyBC,GAAG;IACjC,OAAOA,OAAOA,IAAIC,UAAU,GAAGD,MAAM;QAAEE,SAASF;IAAI;AACxD;AACAG,QAAQC,CAAC,GAAGL","ignoreList":[0]}}, + {"offset": {"line": 14, "column": 0}, "map": {"version":3,"sources":["file:///C:/Users/rjrbi/openapi-finder/node_modules/next/src/client/components/handle-isr-error.tsx"],"sourcesContent":["const workAsyncStorage =\n typeof window === 'undefined'\n ? (\n require('../../server/app-render/work-async-storage.external') as typeof import('../../server/app-render/work-async-storage.external')\n ).workAsyncStorage\n : undefined\n\n// if we are revalidating we want to re-throw the error so the\n// function crashes so we can maintain our previous cache\n// instead of caching the error page\nexport function handleISRError({ error }: { error: any }) {\n if (workAsyncStorage) {\n const store = workAsyncStorage.getStore()\n if (store?.isStaticGeneration) {\n if (error) {\n console.error(error)\n }\n throw error\n }\n }\n}\n"],"names":["handleISRError","workAsyncStorage","window","require","undefined","error","store","getStore","isStaticGeneration","console"],"mappings":";;;+BAUgBA,kBAAAA;;;eAAAA;;;AAVhB,MAAMC,mBACJ,OAAOC,WAAW,qBAEZC,QAAQ,uKACRF,gBAAgB,GAClBG;AAKC,SAASJ,eAAe,EAAEK,KAAK,EAAkB;IACtD,IAAIJ,kBAAkB;QACpB,MAAMK,QAAQL,iBAAiBM,QAAQ;QACvC,IAAID,OAAOE,oBAAoB;YAC7B,IAAIH,OAAO;gBACTI,QAAQJ,KAAK,CAACA;YAChB;YACA,MAAMA;QACR;IACF;AACF","ignoreList":[0]}}, + {"offset": {"line": 46, "column": 0}, "map": {"version":3,"sources":["file:///C:/Users/rjrbi/openapi-finder/node_modules/next/src/client/components/builtin/error-styles.tsx"],"sourcesContent":["import React from 'react'\n\nexport const errorStyles = {\n container: {\n fontFamily:\n 'system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"',\n height: '100vh',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n card: {\n marginTop: '-32px',\n maxWidth: '325px',\n padding: '32px 28px',\n textAlign: 'left' as const,\n },\n icon: {\n marginBottom: '24px',\n },\n title: {\n fontSize: '24px',\n fontWeight: 500,\n letterSpacing: '-0.02em',\n lineHeight: '32px',\n margin: '0 0 12px 0',\n color: 'var(--next-error-title)',\n },\n message: {\n fontSize: '14px',\n fontWeight: 400,\n lineHeight: '21px',\n margin: '0 0 20px 0',\n color: 'var(--next-error-message)',\n },\n form: {\n margin: 0,\n },\n buttonGroup: {\n display: 'flex',\n gap: '8px',\n alignItems: 'center',\n },\n button: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: '32px',\n padding: '0 12px',\n fontSize: '14px',\n fontWeight: 500,\n lineHeight: '20px',\n borderRadius: '6px',\n cursor: 'pointer',\n color: 'var(--next-error-btn-text)',\n background: 'var(--next-error-btn-bg)',\n border: 'var(--next-error-btn-border)',\n },\n buttonSecondary: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: '32px',\n padding: '0 12px',\n fontSize: '14px',\n fontWeight: 500,\n lineHeight: '20px',\n borderRadius: '6px',\n cursor: 'pointer',\n color: 'var(--next-error-btn-secondary-text)',\n background: 'var(--next-error-btn-secondary-bg)',\n border: 'var(--next-error-btn-secondary-border)',\n },\n digestFooter: {\n position: 'fixed' as const,\n bottom: '32px',\n left: '0',\n right: '0',\n textAlign: 'center' as const,\n fontFamily:\n 'ui-monospace,SFMono-Regular,\"SF Mono\",Menlo,Consolas,monospace',\n fontSize: '12px',\n lineHeight: '18px',\n fontWeight: 400,\n margin: '0',\n color: 'var(--next-error-digest)',\n },\n} as const\n\nexport const errorThemeCss = `\n:root {\n --next-error-bg: #fff;\n --next-error-text: #171717;\n --next-error-title: #171717;\n --next-error-message: #171717;\n --next-error-digest: #666666;\n --next-error-btn-text: #fff;\n --next-error-btn-bg: #171717;\n --next-error-btn-border: none;\n --next-error-btn-secondary-text: #171717;\n --next-error-btn-secondary-bg: transparent;\n --next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);\n}\n@media (prefers-color-scheme: dark) {\n :root {\n --next-error-bg: #0a0a0a;\n --next-error-text: #ededed;\n --next-error-title: #ededed;\n --next-error-message: #ededed;\n --next-error-digest: #a0a0a0;\n --next-error-btn-text: #0a0a0a;\n --next-error-btn-bg: #ededed;\n --next-error-btn-border: none;\n --next-error-btn-secondary-text: #ededed;\n --next-error-btn-secondary-bg: transparent;\n --next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);\n }\n}\nbody { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\n`.replace(/\\n\\s*/g, '')\n\nexport function WarningIcon() {\n return (\n \n \n \n )\n}\n"],"names":["WarningIcon","errorStyles","errorThemeCss","container","fontFamily","height","display","alignItems","justifyContent","card","marginTop","maxWidth","padding","textAlign","icon","marginBottom","title","fontSize","fontWeight","letterSpacing","lineHeight","margin","color","message","form","buttonGroup","gap","button","borderRadius","cursor","background","border","buttonSecondary","digestFooter","position","bottom","left","right","replace","svg","width","viewBox","fill","style","path","d"],"mappings":";;;;;;;;;;;;;;;IAyHgBA,WAAW,EAAA;eAAXA;;IAvHHC,WAAW,EAAA;eAAXA;;IAuFAC,aAAa,EAAA;eAAbA;;;;;gEAzFK;AAEX,MAAMD,cAAc;IACzBE,WAAW;QACTC,YACE;QACFC,QAAQ;QACRC,SAAS;QACTC,YAAY;QACZC,gBAAgB;IAClB;IACAC,MAAM;QACJC,WAAW;QACXC,UAAU;QACVC,SAAS;QACTC,WAAW;IACb;IACAC,MAAM;QACJC,cAAc;IAChB;IACAC,OAAO;QACLC,UAAU;QACVC,YAAY;QACZC,eAAe;QACfC,YAAY;QACZC,QAAQ;QACRC,OAAO;IACT;IACAC,SAAS;QACPN,UAAU;QACVC,YAAY;QACZE,YAAY;QACZC,QAAQ;QACRC,OAAO;IACT;IACAE,MAAM;QACJH,QAAQ;IACV;IACAI,aAAa;QACXnB,SAAS;QACToB,KAAK;QACLnB,YAAY;IACd;IACAoB,QAAQ;QACNrB,SAAS;QACTC,YAAY;QACZC,gBAAgB;QAChBH,QAAQ;QACRO,SAAS;QACTK,UAAU;QACVC,YAAY;QACZE,YAAY;QACZQ,cAAc;QACdC,QAAQ;QACRP,OAAO;QACPQ,YAAY;QACZC,QAAQ;IACV;IACAC,iBAAiB;QACf1B,SAAS;QACTC,YAAY;QACZC,gBAAgB;QAChBH,QAAQ;QACRO,SAAS;QACTK,UAAU;QACVC,YAAY;QACZE,YAAY;QACZQ,cAAc;QACdC,QAAQ;QACRP,OAAO;QACPQ,YAAY;QACZC,QAAQ;IACV;IACAE,cAAc;QACZC,UAAU;QACVC,QAAQ;QACRC,MAAM;QACNC,OAAO;QACPxB,WAAW;QACXT,YACE;QACFa,UAAU;QACVG,YAAY;QACZF,YAAY;QACZG,QAAQ;QACRC,OAAO;IACT;AACF;AAEO,MAAMpB,gBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8B9B,CAAC,CAACoC,OAAO,CAAC,UAAU;AAEb,SAAStC;IACd,OAAA,WAAA,GACE,CAAA,GAAA,YAAA,GAAA,EAACuC,OAAAA;QACCC,OAAM;QACNnC,QAAO;QACPoC,SAAQ;QACRC,MAAK;QACLC,OAAO1C,YAAYa,IAAI;kBAEvB,WAAA,GAAA,CAAA,GAAA,YAAA,GAAA,EAAC8B,QAAAA;YACCC,GAAE;YACFH,MAAK;;;AAIb","ignoreList":[0]}}, + {"offset": {"line": 213, "column": 0}, "map": {"version":3,"sources":["file:///C:/Users/rjrbi/openapi-finder/node_modules/next/src/client/components/builtin/global-error.tsx"],"sourcesContent":["'use client'\n\nimport React from 'react'\nimport { handleISRError } from '../handle-isr-error'\nimport { errorStyles, errorThemeCss, WarningIcon } from './error-styles'\n\nexport type GlobalErrorComponent = React.ComponentType<{\n error: any\n reset: () => void\n unstable_retry: () => void\n}>\n\nfunction DefaultGlobalError({ error }: { error: any }) {\n const digest: string | undefined = error?.digest\n const isServerError = !!digest\n\n const message = isServerError\n ? 'A server error occurred. Reload to try again.'\n : 'Reload to try again, or go back.'\n\n handleISRError({ error })\n\n return (\n \n \n \n \n {statusDotColor[status] && (\n \n )}\n \n {statusText[status]}\n \n \n \n )\n}\n\nfunction AnimateStatusText({\n children: text,\n showEllipsis = true,\n}: {\n children: string\n statusKey?: string // Keep for type compatibility but unused\n showEllipsis?: boolean\n}) {\n return (\n
\n
\n {text}\n {showEllipsis && (\n \n .\n .\n .\n \n )}\n
\n
\n )\n}\n","export let TransitionStatusDataAttributes = /*#__PURE__*/function (TransitionStatusDataAttributes) {\n /**\n * Present when the component is animating in.\n */\n TransitionStatusDataAttributes[\"startingStyle\"] = \"data-starting-style\";\n /**\n * Present when the component is animating out.\n */\n TransitionStatusDataAttributes[\"endingStyle\"] = \"data-ending-style\";\n return TransitionStatusDataAttributes;\n}({});\nconst STARTING_HOOK = {\n [TransitionStatusDataAttributes.startingStyle]: ''\n};\nconst ENDING_HOOK = {\n [TransitionStatusDataAttributes.endingStyle]: ''\n};\nexport const transitionStatusMapping = {\n transitionStatus(value) {\n if (value === 'starting') {\n return STARTING_HOOK;\n }\n if (value === 'ending') {\n return ENDING_HOOK;\n }\n return null;\n }\n};","import { TransitionStatusDataAttributes } from \"./styleHookMapping.js\";\nexport let CommonPopupDataAttributes = function (CommonPopupDataAttributes) {\n /**\n * Present when the popup is open.\n */\n CommonPopupDataAttributes[\"open\"] = \"data-open\";\n /**\n * Present when the popup is closed.\n */\n CommonPopupDataAttributes[\"closed\"] = \"data-closed\";\n /**\n * Present when the popup is animating in.\n */\n CommonPopupDataAttributes[CommonPopupDataAttributes[\"startingStyle\"] = TransitionStatusDataAttributes.startingStyle] = \"startingStyle\";\n /**\n * Present when the popup is animating out.\n */\n CommonPopupDataAttributes[CommonPopupDataAttributes[\"endingStyle\"] = TransitionStatusDataAttributes.endingStyle] = \"endingStyle\";\n /**\n * Present when the anchor is hidden.\n */\n CommonPopupDataAttributes[\"anchorHidden\"] = \"data-anchor-hidden\";\n return CommonPopupDataAttributes;\n}({});\nexport let CommonTriggerDataAttributes = /*#__PURE__*/function (CommonTriggerDataAttributes) {\n /**\n * Present when the popup is open.\n */\n CommonTriggerDataAttributes[\"popupOpen\"] = \"data-popup-open\";\n /**\n * Present when a pressable trigger is pressed.\n */\n CommonTriggerDataAttributes[\"pressed\"] = \"data-pressed\";\n return CommonTriggerDataAttributes;\n}({});\nconst TRIGGER_HOOK = {\n [CommonTriggerDataAttributes.popupOpen]: ''\n};\nconst PRESSABLE_TRIGGER_HOOK = {\n [CommonTriggerDataAttributes.popupOpen]: '',\n [CommonTriggerDataAttributes.pressed]: ''\n};\nconst POPUP_OPEN_HOOK = {\n [CommonPopupDataAttributes.open]: ''\n};\nconst POPUP_CLOSED_HOOK = {\n [CommonPopupDataAttributes.closed]: ''\n};\nconst ANCHOR_HIDDEN_HOOK = {\n [CommonPopupDataAttributes.anchorHidden]: ''\n};\nexport const triggerOpenStateMapping = {\n open(value) {\n if (value) {\n return TRIGGER_HOOK;\n }\n return null;\n }\n};\nexport const pressableTriggerOpenStateMapping = {\n open(value) {\n if (value) {\n return PRESSABLE_TRIGGER_HOOK;\n }\n return null;\n }\n};\nexport const popupStateMapping = {\n open(value) {\n if (value) {\n return POPUP_OPEN_HOOK;\n }\n return POPUP_CLOSED_HOOK;\n },\n anchorHidden(value) {\n if (value) {\n return ANCHOR_HIDDEN_HOOK;\n }\n return null;\n }\n};","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { useCompositeListContext } from \"./CompositeListContext.js\";\nexport let IndexGuessBehavior = /*#__PURE__*/function (IndexGuessBehavior) {\n IndexGuessBehavior[IndexGuessBehavior[\"None\"] = 0] = \"None\";\n IndexGuessBehavior[IndexGuessBehavior[\"GuessFromOrder\"] = 1] = \"GuessFromOrder\";\n return IndexGuessBehavior;\n}({});\n\n/**\n * Used to register a list item and its index (DOM position) in the `CompositeList`.\n */\nexport function useCompositeListItem(params = {}) {\n const {\n label,\n metadata,\n textRef,\n indexGuessBehavior\n } = params;\n const {\n register,\n unregister,\n subscribeMapChange,\n elementsRef,\n labelsRef,\n nextIndexRef\n } = useCompositeListContext();\n const indexRef = React.useRef(-1);\n const [index, setIndex] = React.useState(indexGuessBehavior === IndexGuessBehavior.GuessFromOrder ? () => {\n if (indexRef.current === -1) {\n const newIndex = nextIndexRef.current;\n nextIndexRef.current += 1;\n indexRef.current = newIndex;\n }\n return indexRef.current;\n } : -1);\n const componentRef = React.useRef(null);\n const ref = React.useCallback(node => {\n componentRef.current = node;\n if (index !== -1 && node !== null) {\n elementsRef.current[index] = node;\n if (labelsRef) {\n const isLabelDefined = label !== undefined;\n labelsRef.current[index] = isLabelDefined ? label : textRef?.current?.textContent ?? node.textContent;\n }\n }\n }, [index, elementsRef, labelsRef, label, textRef]);\n useIsoLayoutEffect(() => {\n const node = componentRef.current;\n if (node) {\n register(node, metadata);\n return () => {\n unregister(node);\n };\n }\n return undefined;\n }, [register, unregister, metadata]);\n useIsoLayoutEffect(() => {\n return subscribeMapChange(map => {\n const i = componentRef.current ? map.get(componentRef.current)?.index : null;\n if (i != null) {\n setIndex(i);\n }\n });\n }, [subscribeMapChange, setIndex]);\n return React.useMemo(() => ({\n ref,\n index\n }), [index, ref]);\n}","\n import API from \"!../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"../../build/webpack/loaders/devtool/devtool-style-inject.js\";\n import setAttributes from \"!../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../../node_modules/.pnpm/css-loader@7.1.2_@rspack+core@1.6.7_@swc+helpers@0.5.15__webpack@5.98.0_@swc+core@1.11.24_@sw_bx7gx6l2cs2trwgqreijicltyy/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!./global.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn;\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../../node_modules/.pnpm/css-loader@7.1.2_@rspack+core@1.6.7_@swc+helpers@0.5.15__webpack@5.98.0_@swc+core@1.11.24_@sw_bx7gx6l2cs2trwgqreijicltyy/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!./global.css\";\n export default content && content.locals ? content.locals : undefined;\n","\n import API from \"!../../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"../../../../build/webpack/loaders/devtool/devtool-style-inject.js\";\n import setAttributes from \"!../../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../../../../node_modules/.pnpm/css-loader@7.1.2_@rspack+core@1.6.7_@swc+helpers@0.5.15__webpack@5.98.0_@swc+core@1.11.24_@sw_bx7gx6l2cs2trwgqreijicltyy/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!./style.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn;\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../../../../node_modules/.pnpm/css-loader@7.1.2_@rspack+core@1.6.7_@swc+helpers@0.5.15__webpack@5.98.0_@swc+core@1.11.24_@sw_bx7gx6l2cs2trwgqreijicltyy/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!./style.css\";\n export default content && content.locals ? content.locals : undefined;\n","import { parse } from 'next/dist/compiled/stacktrace-parser'\n\nconst regexNextStatic = /\\/_next(\\/static\\/.+)/\n\nexport interface StackFrame {\n file: string | null\n methodName: string\n arguments: string[]\n /** 1-based */\n line1: number | null\n /** 1-based */\n column1: number | null\n}\n\nexport function parseStack(\n stack: string,\n distDir = process.env.__NEXT_DIST_DIR\n): StackFrame[] {\n if (!stack) return []\n\n // throw away eval information that stacktrace-parser doesn't support\n // adapted from https://github.com/stacktracejs/error-stack-parser/blob/9f33c224b5d7b607755eb277f9d51fcdb7287e24/error-stack-parser.js#L59C33-L59C62\n stack = stack\n .split('\\n')\n .map((line) => {\n if (line.includes('(eval ')) {\n line = line\n .replace(/eval code/g, 'eval')\n .replace(/\\(eval at [^()]* \\(/, '(file://')\n .replace(/\\),.*$/g, ')')\n }\n\n return line\n })\n .join('\\n')\n\n const frames = parse(stack)\n return frames.map((frame) => {\n try {\n const url = new URL(frame.file!)\n const res = regexNextStatic.exec(url.pathname)\n if (res) {\n const effectiveDistDir = distDir\n ?.replace(/\\\\/g, '/')\n ?.replace(/\\/$/, '')\n if (effectiveDistDir) {\n frame.file =\n 'file://' + effectiveDistDir.concat(res.pop()!) + url.search\n }\n }\n } catch {}\n return {\n file: frame.file,\n line1: frame.lineNumber,\n column1: frame.column,\n methodName: frame.methodName,\n arguments: frame.arguments,\n }\n })\n}\n","// To distinguish from React error.digest, we use a different symbol here to determine if the error is from console.error or unhandled promise rejection.\nconst digestSym = Symbol.for('next.console.error.digest')\n\n// Represent non Error shape unhandled promise rejections or console.error errors.\n// Those errors will be captured and displayed in Error Overlay.\ntype ConsoleError = Error & {\n [digestSym]: 'NEXT_CONSOLE_ERROR'\n environmentName: string\n}\n\nexport function createConsoleError(\n message: string | Error,\n environmentName?: string | null\n): ConsoleError {\n const error = (\n typeof message === 'string' ? new Error(message) : message\n ) as ConsoleError\n error[digestSym] = 'NEXT_CONSOLE_ERROR'\n\n if (environmentName && !error.environmentName) {\n error.environmentName = environmentName\n }\n\n return error\n}\n\nexport const isConsoleError = (error: any): error is ConsoleError => {\n return error && error[digestSym] === 'NEXT_CONSOLE_ERROR'\n}\n","import { useReducer } from 'react'\n\nimport type { FlightRouterState } from '../../shared/lib/app-router-types'\nimport type { VersionInfo } from '../../server/dev/parse-version-info'\nimport type { SupportedErrorEvent } from './container/runtime-error/render-error'\nimport type { DebugInfo } from '../shared/types'\nimport type { DevIndicatorServerState } from '../../server/dev/dev-indicator-server-state'\nimport { parseStack } from '../../server/lib/parse-stack'\nimport { isConsoleError } from '../shared/console-error'\nimport type { CacheIndicatorState } from './cache-indicator'\nimport { readInstantNavCookieState } from './components/instant-navs/instant-nav-cookie'\n\nexport type DevToolsConfig = {\n theme?: 'light' | 'dark' | 'system'\n disableDevIndicator?: boolean\n devToolsPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'\n devToolsPanelPosition?: Record<\n string,\n 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'\n >\n devToolsPanelSize?: Record\n scale?: number\n hideShortcut?: string | null\n}\n\nexport type Corners = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'\nexport type DevToolsIndicatorPosition = Corners\n\nconst BASE_SIZE = 16\n\nexport const NEXT_DEV_TOOLS_SCALE = {\n Small: BASE_SIZE / 14,\n Medium: BASE_SIZE / 16,\n Large: BASE_SIZE / 18,\n}\n\nexport type DevToolsScale =\n (typeof NEXT_DEV_TOOLS_SCALE)[keyof typeof NEXT_DEV_TOOLS_SCALE]\n\ntype FastRefreshState =\n /** No refresh in progress. */\n | { type: 'idle' }\n /** The refresh process has been triggered, but the new code has not been executed yet. */\n | { type: 'pending'; errors: readonly SupportedErrorEvent[] }\n\nexport interface OverlayState {\n readonly nextId: number\n readonly buildError: string | null\n readonly errors: readonly SupportedErrorEvent[]\n readonly refreshState: FastRefreshState\n readonly versionInfo: VersionInfo\n readonly notFound: boolean\n readonly buildingIndicator: boolean\n readonly renderingIndicator: boolean\n readonly cacheIndicator: CacheIndicatorState\n readonly staticIndicator: 'pending' | 'static' | 'dynamic' | 'disabled'\n readonly showIndicator: boolean\n readonly disableDevIndicator: boolean\n readonly debugInfo: DebugInfo\n readonly routerType: 'pages' | 'app'\n /** This flag is used to handle the Error Overlay state in the \"old\" overlay.\n * In the DevTools panel, this value will used for the \"Error Overlay Mode\"\n * which is viewing the \"Issues Tab\" as a fullscreen.\n */\n readonly isErrorOverlayOpen: boolean\n readonly devToolsPosition: Corners\n readonly devToolsPanelPosition: Readonly>\n readonly devToolsPanelSize: Readonly<\n Record\n >\n readonly scale: number\n readonly page: string\n readonly tree: FlightRouterState | null\n readonly theme: 'light' | 'dark' | 'system'\n readonly hideShortcut: string | null\n readonly instantNavs: boolean\n}\ntype DevtoolsPanelName = string\nexport type OverlayDispatch = React.Dispatch\n\nexport const ACTION_CACHE_INDICATOR = 'cache-indicator'\nexport const ACTION_STATIC_INDICATOR = 'static-indicator'\nexport const ACTION_BUILD_OK = 'build-ok'\nexport const ACTION_BUILD_ERROR = 'build-error'\nexport const ACTION_BEFORE_REFRESH = 'before-fast-refresh'\nexport const ACTION_REFRESH = 'fast-refresh'\nexport const ACTION_VERSION_INFO = 'version-info'\nexport const ACTION_UNHANDLED_ERROR = 'unhandled-error'\nexport const ACTION_UNHANDLED_REJECTION = 'unhandled-rejection'\nexport const ACTION_DEBUG_INFO = 'debug-info'\nexport const ACTION_DEV_INDICATOR = 'dev-indicator'\nexport const ACTION_DEV_INDICATOR_SET = 'dev-indicator-disable'\n\nexport const ACTION_ERROR_OVERLAY_OPEN = 'error-overlay-open'\nexport const ACTION_ERROR_OVERLAY_CLOSE = 'error-overlay-close'\nexport const ACTION_ERROR_OVERLAY_TOGGLE = 'error-overlay-toggle'\n\nexport const ACTION_BUILDING_INDICATOR_SHOW = 'building-indicator-show'\nexport const ACTION_BUILDING_INDICATOR_HIDE = 'building-indicator-hide'\nexport const ACTION_RENDERING_INDICATOR_SHOW = 'rendering-indicator-show'\nexport const ACTION_RENDERING_INDICATOR_HIDE = 'rendering-indicator-hide'\n\nexport const ACTION_DEVTOOLS_POSITION = 'devtools-position'\nexport const ACTION_DEVTOOLS_PANEL_POSITION = 'devtools-panel-position'\nexport const ACTION_DEVTOOLS_SCALE = 'devtools-scale'\n\nexport const ACTION_DEVTOOLS_CONFIG = 'devtools-config'\nexport const ACTION_INSTANT_NAVS_TOGGLE = 'instant-navs-toggle'\nexport const ACTION_INSTANT_NAVS_RESET = 'instant-navs-reset'\n\nexport const STORAGE_KEY_PANEL_POSITION_PREFIX =\n '__nextjs-dev-tools-panel-position'\nexport const STORE_KEY_PANEL_SIZE_PREFIX = '__nextjs-dev-tools-panel-size'\nexport const STORE_KEY_SHARED_PANEL_SIZE =\n '__nextjs-dev-tools-shared-panel-size'\nexport const STORE_KEY_SHARED_PANEL_LOCATION =\n '__nextjs-dev-tools-shared-panel-location'\n\nexport const ACTION_DEVTOOL_UPDATE_ROUTE_STATE =\n 'segment-explorer-update-route-state'\n\ninterface CacheIndicatorAction {\n type: typeof ACTION_CACHE_INDICATOR\n cacheIndicator: CacheIndicatorState\n}\n\ninterface StaticIndicatorAction {\n type: typeof ACTION_STATIC_INDICATOR\n staticIndicator: 'pending' | 'static' | 'dynamic' | 'disabled'\n}\n\ninterface BuildOkAction {\n type: typeof ACTION_BUILD_OK\n}\ninterface BuildErrorAction {\n type: typeof ACTION_BUILD_ERROR\n message: string\n}\ninterface BeforeFastRefreshAction {\n type: typeof ACTION_BEFORE_REFRESH\n}\ninterface FastRefreshAction {\n type: typeof ACTION_REFRESH\n}\n\ninterface UnhandledErrorAction {\n type: typeof ACTION_UNHANDLED_ERROR\n reason: Error\n}\ninterface UnhandledRejectionAction {\n type: typeof ACTION_UNHANDLED_REJECTION\n reason: Error\n}\n\ninterface DebugInfoAction {\n type: typeof ACTION_DEBUG_INFO\n debugInfo: any\n}\n\ninterface VersionInfoAction {\n type: typeof ACTION_VERSION_INFO\n versionInfo: VersionInfo\n}\n\ninterface DevIndicatorAction {\n type: typeof ACTION_DEV_INDICATOR\n devIndicator: DevIndicatorServerState\n}\n\ninterface DevIndicatorSetAction {\n type: typeof ACTION_DEV_INDICATOR_SET\n disabled: boolean\n}\n\ninterface ErrorOverlayOpenAction {\n type: typeof ACTION_ERROR_OVERLAY_OPEN\n}\ninterface ErrorOverlayCloseAction {\n type: typeof ACTION_ERROR_OVERLAY_CLOSE\n}\ninterface ErrorOverlayToggleAction {\n type: typeof ACTION_ERROR_OVERLAY_TOGGLE\n}\n\ninterface BuildingIndicatorShowAction {\n type: typeof ACTION_BUILDING_INDICATOR_SHOW\n}\ninterface BuildingIndicatorHideAction {\n type: typeof ACTION_BUILDING_INDICATOR_HIDE\n}\n\ninterface RenderingIndicatorShowAction {\n type: typeof ACTION_RENDERING_INDICATOR_SHOW\n}\ninterface RenderingIndicatorHideAction {\n type: typeof ACTION_RENDERING_INDICATOR_HIDE\n}\n\ninterface DevToolsIndicatorPositionAction {\n type: typeof ACTION_DEVTOOLS_POSITION\n devToolsPosition: Corners\n}\n\ninterface DevToolsPanelPositionAction {\n type: typeof ACTION_DEVTOOLS_PANEL_POSITION\n key: string\n devToolsPanelPosition: Corners\n}\n\ninterface DevToolsScaleAction {\n type: typeof ACTION_DEVTOOLS_SCALE\n scale: number\n}\n\ninterface DevToolUpdateRouteStateAction {\n type: typeof ACTION_DEVTOOL_UPDATE_ROUTE_STATE\n page: string\n tree: FlightRouterState | null\n}\n\ninterface DevToolsConfigAction {\n type: typeof ACTION_DEVTOOLS_CONFIG\n devToolsConfig: DevToolsConfig\n}\n\ninterface CacheOnlyToggleAction {\n type: typeof ACTION_INSTANT_NAVS_TOGGLE\n}\n\ninterface InstantNavResetAction {\n type: typeof ACTION_INSTANT_NAVS_RESET\n}\n\nexport type DispatcherEvent =\n | BuildOkAction\n | BuildErrorAction\n | BeforeFastRefreshAction\n | FastRefreshAction\n | UnhandledErrorAction\n | UnhandledRejectionAction\n | VersionInfoAction\n | CacheIndicatorAction\n | StaticIndicatorAction\n | DebugInfoAction\n | DevIndicatorAction\n | ErrorOverlayOpenAction\n | ErrorOverlayCloseAction\n | ErrorOverlayToggleAction\n | BuildingIndicatorShowAction\n | BuildingIndicatorHideAction\n | RenderingIndicatorShowAction\n | RenderingIndicatorHideAction\n | DevToolsIndicatorPositionAction\n | DevToolsPanelPositionAction\n | DevToolsScaleAction\n | DevToolUpdateRouteStateAction\n | DevIndicatorSetAction\n | DevToolsConfigAction\n | CacheOnlyToggleAction\n | InstantNavResetAction\n\nconst REACT_ERROR_STACK_BOTTOM_FRAME_REGEX =\n // 1st group: new frame + v8\n // 2nd group: new frame + SpiderMonkey, JavaScriptCore\n // 3rd group: old frame + v8\n // 4th group: old frame + SpiderMonkey, JavaScriptCore\n /\\s+(at Object\\.react_stack_bottom_frame.*)|(react_stack_bottom_frame@.*)|(at react-stack-bottom-frame.*)|(react-stack-bottom-frame@.*)/\n\n// React calls user code starting from a special stack frame.\n// The basic stack will be different if the same error location is hit again\n// due to StrictMode.\n// This gets only the stack after React which is unaffected by StrictMode.\nfunction getStackIgnoringStrictMode(stack: string | undefined) {\n return stack?.split(REACT_ERROR_STACK_BOTTOM_FRAME_REGEX)[0]\n}\n\nconst shouldDisableDevIndicator =\n process.env.__NEXT_DEV_INDICATOR?.toString() === 'false'\n\nconst devToolsInitialPositionFromNextConfig = (process.env\n .__NEXT_DEV_INDICATOR_POSITION ?? 'bottom-left') as Corners\n\nconst hasInstantNavsCookie =\n !!process.env.__NEXT_INSTANT_NAV_TOGGLE &&\n readInstantNavCookieState() !== null\n\nexport const INITIAL_OVERLAY_STATE: Omit<\n OverlayState,\n 'isErrorOverlayOpen' | 'routerType'\n> = {\n nextId: 1,\n buildError: null,\n errors: [],\n notFound: false,\n renderingIndicator: false,\n cacheIndicator: 'disabled',\n staticIndicator: 'disabled',\n /*\n This is set to `true` when we can reliably know\n whether the indicator is in disabled state or not.\n Otherwise the surface would flicker because the disabled flag loads from the config.\n */\n // When instant nav is active, show the indicator immediately so the user\n // can toggle it off. Normally this is set to true by the HMR connection,\n // but the HMR WebSocket is only created during hydration.\n showIndicator: hasInstantNavsCookie,\n disableDevIndicator: false,\n buildingIndicator: false,\n refreshState: { type: 'idle' },\n versionInfo: { installed: '0.0.0', staleness: 'unknown' },\n debugInfo: { devtoolsFrontendUrl: undefined },\n devToolsPosition: devToolsInitialPositionFromNextConfig,\n devToolsPanelPosition: {\n [STORE_KEY_SHARED_PANEL_LOCATION]: devToolsInitialPositionFromNextConfig,\n },\n devToolsPanelSize: {},\n scale: NEXT_DEV_TOOLS_SCALE.Medium,\n page: '',\n tree: null,\n theme: 'system',\n hideShortcut: null,\n instantNavs: hasInstantNavsCookie,\n}\n\nfunction getInitialState(\n routerType: 'pages' | 'app',\n enableCacheIndicator: boolean\n): OverlayState & { routerType: 'pages' | 'app' } {\n return {\n ...INITIAL_OVERLAY_STATE,\n // Pages Router only listenes to thrown errors which\n // always open the overlay.\n // TODO: Should be the same default as App Router once we surface console.error in Pages Router.\n isErrorOverlayOpen: routerType === 'pages',\n routerType,\n cacheIndicator: enableCacheIndicator ? 'ready' : 'disabled',\n }\n}\n\nexport function useErrorOverlayReducer(\n routerType: 'pages' | 'app',\n getOwnerStack: (error: Error) => string | null | undefined,\n isRecoverableError: (error: Error) => boolean,\n enableCacheIndicator: boolean\n) {\n function pushErrorFilterDuplicates(\n events: readonly SupportedErrorEvent[],\n id: number,\n error: Error\n ): readonly SupportedErrorEvent[] {\n const ownerStack = getOwnerStack(error)\n const frames = parseStack((error.stack || '') + (ownerStack || ''))\n const pendingEvent: SupportedErrorEvent = {\n id,\n error,\n frames,\n type: isRecoverableError(error)\n ? 'recoverable'\n : isConsoleError(error)\n ? 'console'\n : 'runtime',\n }\n const pendingEvents = events.filter((event) => {\n // Filter out duplicate errors\n return (\n // SpiderMonkey and JavaScriptCore don't include the error message in the stack.\n // We don't want to dedupe errors with different messages for which we don't have a good stack\n '' + event.error !== '' + pendingEvent.error ||\n (event.error.stack !== pendingEvent.error.stack &&\n // TODO: Let ReactDevTools control deduping instead?\n getStackIgnoringStrictMode(event.error.stack) !==\n getStackIgnoringStrictMode(pendingEvent.error.stack)) ||\n getOwnerStack(event.error) !== getOwnerStack(pendingEvent.error)\n )\n })\n // If there's nothing filtered out, the event is a brand new error\n if (pendingEvents.length === events.length) {\n pendingEvents.push(pendingEvent)\n return pendingEvents\n }\n // Otherwise remain the same events\n return events\n }\n\n return useReducer(\n (state: OverlayState, action: DispatcherEvent): OverlayState => {\n switch (action.type) {\n case ACTION_DEBUG_INFO: {\n return { ...state, debugInfo: action.debugInfo }\n }\n case ACTION_CACHE_INDICATOR: {\n return { ...state, cacheIndicator: action.cacheIndicator }\n }\n case ACTION_STATIC_INDICATOR: {\n return { ...state, staticIndicator: action.staticIndicator }\n }\n case ACTION_BUILD_OK: {\n return { ...state, buildError: null }\n }\n case ACTION_BUILD_ERROR: {\n return { ...state, buildError: action.message }\n }\n case ACTION_BEFORE_REFRESH: {\n return { ...state, refreshState: { type: 'pending', errors: [] } }\n }\n case ACTION_REFRESH: {\n return {\n ...state,\n buildError: null,\n errors:\n // Errors can come in during updates. In this case, UNHANDLED_ERROR\n // and UNHANDLED_REJECTION events might be dispatched between the\n // BEFORE_REFRESH and the REFRESH event. We want to keep those errors\n // around until the next refresh. Otherwise we run into a race\n // condition where those errors would be cleared on refresh completion\n // before they can be displayed.\n state.refreshState.type === 'pending'\n ? state.refreshState.errors\n : [],\n refreshState: { type: 'idle' },\n }\n }\n case ACTION_UNHANDLED_ERROR:\n case ACTION_UNHANDLED_REJECTION: {\n switch (state.refreshState.type) {\n case 'idle': {\n return {\n ...state,\n nextId: state.nextId + 1,\n errors: pushErrorFilterDuplicates(\n state.errors,\n state.nextId,\n action.reason\n ),\n }\n }\n case 'pending': {\n return {\n ...state,\n nextId: state.nextId + 1,\n refreshState: {\n ...state.refreshState,\n errors: pushErrorFilterDuplicates(\n state.errors,\n state.nextId,\n action.reason\n ),\n },\n }\n }\n default:\n return state\n }\n }\n case ACTION_VERSION_INFO: {\n return { ...state, versionInfo: action.versionInfo }\n }\n case ACTION_DEV_INDICATOR_SET: {\n return { ...state, disableDevIndicator: action.disabled }\n }\n case ACTION_DEV_INDICATOR: {\n return {\n ...state,\n showIndicator: true,\n disableDevIndicator:\n shouldDisableDevIndicator || !!action.devIndicator.disabledUntil,\n }\n }\n case ACTION_ERROR_OVERLAY_OPEN: {\n return { ...state, isErrorOverlayOpen: true }\n }\n case ACTION_ERROR_OVERLAY_CLOSE: {\n return { ...state, isErrorOverlayOpen: false }\n }\n case ACTION_ERROR_OVERLAY_TOGGLE: {\n return { ...state, isErrorOverlayOpen: !state.isErrorOverlayOpen }\n }\n case ACTION_BUILDING_INDICATOR_SHOW: {\n return { ...state, buildingIndicator: true }\n }\n case ACTION_BUILDING_INDICATOR_HIDE: {\n return { ...state, buildingIndicator: false }\n }\n case ACTION_RENDERING_INDICATOR_SHOW: {\n return { ...state, renderingIndicator: true }\n }\n case ACTION_RENDERING_INDICATOR_HIDE: {\n return { ...state, renderingIndicator: false }\n }\n\n case ACTION_DEVTOOLS_POSITION: {\n return { ...state, devToolsPosition: action.devToolsPosition }\n }\n case ACTION_DEVTOOLS_PANEL_POSITION: {\n return {\n ...state,\n devToolsPanelPosition: {\n ...state.devToolsPanelPosition,\n [action.key]: action.devToolsPanelPosition,\n },\n }\n }\n\n case ACTION_DEVTOOLS_SCALE: {\n return { ...state, scale: action.scale }\n }\n case ACTION_DEVTOOL_UPDATE_ROUTE_STATE: {\n return { ...state, page: action.page, tree: action.tree }\n }\n case ACTION_DEVTOOLS_CONFIG: {\n const {\n theme,\n disableDevIndicator,\n devToolsPosition,\n devToolsPanelPosition,\n devToolsPanelSize,\n scale,\n hideShortcut,\n } = action.devToolsConfig\n\n return {\n ...state,\n theme: theme ?? state.theme,\n disableDevIndicator:\n disableDevIndicator ?? state.disableDevIndicator,\n devToolsPosition: devToolsPosition ?? state.devToolsPosition,\n devToolsPanelPosition:\n devToolsPanelPosition ?? state.devToolsPanelPosition,\n scale: scale ?? state.scale,\n devToolsPanelSize: devToolsPanelSize ?? state.devToolsPanelSize,\n hideShortcut:\n // hideShortcut can be null.\n hideShortcut !== undefined ? hideShortcut : state.hideShortcut,\n }\n }\n case ACTION_INSTANT_NAVS_TOGGLE: {\n return { ...state, instantNavs: !state.instantNavs }\n }\n case ACTION_INSTANT_NAVS_RESET: {\n return { ...state, instantNavs: false }\n }\n default: {\n return state\n }\n }\n },\n getInitialState(routerType, enableCacheIndicator)\n )\n}\n","export function css(\n strings: TemplateStringsArray,\n ...keys: readonly string[]\n): string {\n const lastIndex = strings.length - 1\n const str =\n // Convert template literal into a single line string\n strings.slice(0, lastIndex).reduce((p, s, i) => p + s + keys[i], '') +\n strings[lastIndex]\n\n return (\n str\n // Remove comments\n .replace(/\\/\\*[\\s\\S]*?\\*\\//g, '')\n // Remove whitespace, tabs, and newlines\n .replace(/\\s+/g, ' ')\n // Remove spaces before and after semicolons, and spaces after commas\n .replace(/\\s*([:;,{}])\\s*/g, '$1')\n // Remove extra semicolons\n .replace(/;+}/g, '}')\n // Trim leading and trailing whitespaces\n .trim()\n )\n}\n","import { css } from '../utils/css'\nimport { useInsertionEffect } from 'react'\n\nexport const FontStyles = () => {\n useInsertionEffect(() => {\n const style = document.createElement('style')\n style.textContent = css`\n /* latin-ext */\n @font-face {\n font-family: '__nextjs-Geist';\n font-style: normal;\n font-weight: 400 600;\n font-display: swap;\n src: url(/__nextjs_font/geist-latin-ext.woff2) format('woff2');\n unicode-range:\n U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,\n U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,\n U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin-ext */\n @font-face {\n font-family: '__nextjs-Geist Mono';\n font-style: normal;\n font-weight: 400 600;\n font-display: swap;\n src: url(/__nextjs_font/geist-mono-latin-ext.woff2) format('woff2');\n unicode-range:\n U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,\n U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,\n U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: '__nextjs-Geist';\n font-style: normal;\n font-weight: 400 600;\n font-display: swap;\n src: url(/__nextjs_font/geist-latin.woff2) format('woff2');\n unicode-range:\n U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,\n U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,\n U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin */\n @font-face {\n font-family: '__nextjs-Geist Mono';\n font-style: normal;\n font-weight: 400 600;\n font-display: swap;\n src: url(/__nextjs_font/geist-mono-latin.woff2) format('woff2');\n unicode-range:\n U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,\n U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,\n U+2212, U+2215, U+FEFF, U+FFFD;\n }\n `\n document.head.appendChild(style)\n\n return () => {\n document.head.removeChild(style)\n }\n }, [])\n\n return null\n}\n","import { createPortal } from 'react-dom'\nimport { useDevOverlayContext } from '../../dev-overlay.browser'\n\nexport function ShadowPortal({ children }: { children: React.ReactNode }) {\n const { shadowRoot } = useDevOverlayContext()\n\n return createPortal(children, shadowRoot)\n}\n","function decodeHex(hexStr: string): string {\n if (hexStr.trim() === '') {\n throw new Error(\"can't decode empty hex\")\n }\n\n const num = parseInt(hexStr, 16)\n if (isNaN(num)) {\n throw new Error(`invalid hex: \\`${hexStr}\\``)\n }\n\n return String.fromCodePoint(num)\n}\n\nconst enum Mode {\n Text,\n Underscore,\n Hex,\n LongHex,\n}\n\nconst DECODE_REGEX = /^__TURBOPACK__([a-zA-Z0-9_$]+)__$/\n\nexport function decodeMagicIdentifier(identifier: string): string {\n const matches = identifier.match(DECODE_REGEX)\n if (!matches) {\n return identifier\n }\n\n const inner = matches[1]\n\n let output = ''\n\n let mode: Mode = Mode.Text\n let buffer = ''\n for (let i = 0; i < inner.length; i++) {\n const char = inner[i]\n\n if (mode === Mode.Text) {\n if (char === '_') {\n mode = Mode.Underscore\n } else if (char === '$') {\n mode = Mode.Hex\n } else {\n output += char\n }\n } else if (mode === Mode.Underscore) {\n if (char === '_') {\n output += ' '\n mode = Mode.Text\n } else if (char === '$') {\n output += '_'\n mode = Mode.Hex\n } else {\n output += char\n mode = Mode.Text\n }\n } else if (mode === Mode.Hex) {\n if (buffer.length === 2) {\n output += decodeHex(buffer)\n buffer = ''\n }\n\n if (char === '_') {\n if (buffer !== '') {\n throw new Error(`invalid hex: \\`${buffer}\\``)\n }\n\n mode = Mode.LongHex\n } else if (char === '$') {\n if (buffer !== '') {\n throw new Error(`invalid hex: \\`${buffer}\\``)\n }\n\n mode = Mode.Text\n } else {\n buffer += char\n }\n } else if (mode === Mode.LongHex) {\n if (char === '_') {\n throw new Error(`invalid hex: \\`${buffer + char}\\``)\n } else if (char === '$') {\n output += decodeHex(buffer)\n buffer = ''\n\n mode = Mode.Text\n } else {\n buffer += char\n }\n }\n }\n\n return output\n}\n\nexport const MAGIC_IDENTIFIER_REGEX = /__TURBOPACK__[a-zA-Z0-9_$]+__/g\n\n/**\n * Cleans up module IDs by removing implementation details.\n * - Replaces [project] with .\n * - Removes content in brackets [], parentheses (), and angle brackets <>\n */\nexport function deobfuscateModuleId(moduleId: string): string {\n return (\n moduleId\n // Replace [project] with .\n .replace(/\\[project\\]/g, '.')\n // Remove content in square brackets (e.g. [app-rsc])\n .replace(/\\s\\[([^\\]]*)\\]/g, '')\n // Remove content in parentheses (e.g. (ecmascript))\n .replace(/\\s\\(([^)]*)\\)/g, '')\n // Remove content in angle brackets (e.g. )\n .replace(/\\s<([^>]*)>/g, '')\n // Clean up any extra whitespace\n .trim()\n )\n}\n\n/**\n * Removes the free call wrapper pattern (0, expr) from expressions.\n * This is a JavaScript pattern to call a function without binding 'this',\n * but it's noise for developers reading error messages.\n */\nexport function removeFreeCallWrapper(text: string): string {\n // Match (0, .) patterns anywhere in the text the beginning\n // Overzealous: accept any non-whitespace member expression after the dot.\n // TODO: Fix https://linear.app/vercel/issue/NEXT-4875 to allow using unicode property escapes\n return text.replace(\n /\\(0\\s*,\\s*(__TURBOPACK__[a-zA-Z0-9_$]+__\\.[^\\s)]+)\\)/g,\n '$1'\n )\n}\n\nexport type TextPartType = 'raw' | 'deobfuscated'\n\n/**\n * Deobfuscates text and returns an array of discriminated parts.\n * Each part is a tuple of [type, string] where type is either 'raw' (unchanged text)\n * or 'deobfuscated' (a magic identifier that was decoded).\n *\n * This is useful when you need to process or display deobfuscated and raw text differently.\n */\nexport function deobfuscateTextParts(\n text: string\n): Array<[TextPartType, string]> {\n // First, remove free call wrappers\n const withoutFreeCall = removeFreeCallWrapper(text)\n\n const parts: Array<[TextPartType, string]> = []\n let lastIndex = 0\n\n // Create a new regex instance for global matching\n const regex = new RegExp(MAGIC_IDENTIFIER_REGEX.source, 'g')\n\n for (\n let match = regex.exec(withoutFreeCall);\n match !== null;\n match = regex.exec(withoutFreeCall)\n ) {\n const matchStart = match.index\n const matchEnd = regex.lastIndex\n const ident = match[0]\n\n // Add raw text before this match (if any)\n if (matchStart > lastIndex) {\n const rawText = withoutFreeCall.substring(lastIndex, matchStart)\n parts.push(['raw', rawText])\n }\n\n // Process and add the deobfuscated part\n try {\n const decoded = decodeMagicIdentifier(ident)\n // If it was a magic identifier, clean up the module ID\n if (decoded !== ident) {\n // Check if this is an \"imported module\" reference\n const importedModuleMatch = decoded.match(/^imported module (.+)$/)\n if (importedModuleMatch) {\n // Clean the entire module path (which includes [app-rsc], etc.)\n const modulePathWithMetadata = importedModuleMatch[1]\n const cleaned = deobfuscateModuleId(modulePathWithMetadata)\n parts.push(['deobfuscated', `{imported module ${cleaned}}`])\n } else {\n const cleaned = deobfuscateModuleId(decoded)\n parts.push(['deobfuscated', `{${cleaned}}`])\n }\n } else {\n // Not actually a magic identifier, treat as raw\n parts.push(['raw', ident])\n }\n } catch (e) {\n parts.push(['deobfuscated', `{${ident} (decoding failed: ${e})}`])\n }\n\n lastIndex = matchEnd\n }\n\n // Add any remaining raw text after the last match\n if (lastIndex < withoutFreeCall.length) {\n const rawText = withoutFreeCall.substring(lastIndex)\n parts.push(['raw', rawText])\n }\n\n return parts\n}\n\n/**\n * Deobfuscates text by:\n * 1. Decoding magic identifiers\n * 2. Cleaning up module IDs\n * 3. Removing free call wrappers\n */\nexport function deobfuscateText(text: string): string {\n const parts = deobfuscateTextParts(text)\n return parts.map((part) => part[1]).join('')\n}\n","import React from 'react'\nimport { deobfuscateTextParts } from '../../../../shared/lib/magic-identifier'\n\nconst linkRegex = /https?:\\/\\/[^\\s/$.?#].[^\\s)'\"]*/i\n\nexport const HotlinkedText: React.FC<{\n text: string\n matcher?: (text: string) => string | null\n}> = function HotlinkedText(props) {\n const { text, matcher } = props\n\n // Deobfuscate the entire text first\n const deobfuscatedParts = deobfuscateTextParts(text)\n\n return (\n <>\n {deobfuscatedParts.map(([type, part], outerIndex) => {\n if (type === 'raw') {\n return (\n part\n // Split on whitespace and links\n .split(/(\\s+|https?:\\/\\/[^\\s/$.?#].[^\\s)'\"]*)/)\n .map((rawPart, index) => {\n if (linkRegex.test(rawPart)) {\n const link = linkRegex.exec(rawPart)!\n const href = link[0]\n // If link matcher is present, check if it returns a className\n let linkClassName: string | null = null\n if (typeof matcher === 'function') {\n linkClassName = matcher(href)\n // If matcher returns null, don't turn it into a link\n if (linkClassName === null) {\n return (\n \n {rawPart}\n \n )\n }\n }\n return (\n \n \n {rawPart}\n \n \n )\n } else {\n return (\n \n {rawPart}\n \n )\n }\n })\n )\n } else if (type === 'deobfuscated') {\n // italicize the deobfuscated part\n return {part}\n } else {\n throw new Error(`Unknown text part type: ${type}`)\n }\n })}\n \n )\n}\n","const replacementRegExes = [\n /^webpack-internal:\\/\\/\\/(\\([\\w-]+\\)\\/)?/,\n /^(webpack:\\/\\/\\/|webpack:\\/\\/(_N_E\\/)?)(\\([\\w-]+\\)\\/)?/,\n]\n\nexport function isWebpackInternalResource(file: string) {\n for (const regex of replacementRegExes) {\n if (regex.test(file)) return true\n\n file = file.replace(regex, '')\n }\n\n return false\n}\n\n/**\n * Format the webpack internal id to original file path\n *\n * webpack-internal:///./src/hello.tsx => ./src/hello.tsx\n * webpack://_N_E/./src/hello.tsx => ./src/hello.tsx\n * webpack://./src/hello.tsx => ./src/hello.tsx\n * webpack:///./src/hello.tsx => ./src/hello.tsx\n */\nexport function formatStackFrameFile(file: string) {\n for (const regex of replacementRegExes) {\n file = file.replace(regex, '')\n }\n\n return file\n}\n","import type {\n OriginalStackFrameResponse,\n OriginalStackFrameResponseResult,\n OriginalStackFramesRequest,\n StackFrame,\n} from '../server/shared'\nimport {\n isWebpackInternalResource,\n formatStackFrameFile,\n} from './webpack-module-path'\n\nexport type { StackFrame }\n\ninterface ResolvedOriginalStackFrame extends OriginalStackFrameResponse {\n error: false\n reason: null\n external: boolean\n ignored: boolean\n sourceStackFrame: StackFrame\n}\n\ninterface RejectedOriginalStackFrame extends OriginalStackFrameResponse {\n error: true\n reason: string\n external: boolean\n ignored: boolean\n sourceStackFrame: StackFrame\n}\n\nexport type OriginalStackFrame =\n | ResolvedOriginalStackFrame\n | RejectedOriginalStackFrame\n\nfunction getOriginalStackFrame(\n source: StackFrame,\n response: OriginalStackFrameResponseResult\n): Promise {\n async function _getOriginalStackFrame(): Promise {\n if (response.status === 'rejected') {\n throw new Error(response.reason)\n }\n\n const body: OriginalStackFrameResponse = response.value\n\n return {\n error: false,\n reason: null,\n external: false,\n sourceStackFrame: source,\n originalStackFrame: body.originalStackFrame,\n originalCodeFrame: body.originalCodeFrame || null,\n ignored: body.originalStackFrame?.ignored || false,\n }\n }\n\n // TODO: merge this section into ignoredList handling\n if (source.file === 'file://' || source.file?.match(/https?:\\/\\//)) {\n return Promise.resolve({\n error: false,\n reason: null,\n external: true,\n sourceStackFrame: source,\n originalStackFrame: null,\n originalCodeFrame: null,\n ignored: true,\n })\n }\n\n return _getOriginalStackFrame().catch(\n (err: Error): RejectedOriginalStackFrame => ({\n error: true,\n reason: err?.message ?? err?.toString() ?? 'Unknown Error',\n external: false,\n sourceStackFrame: source,\n originalStackFrame: null,\n originalCodeFrame: null,\n ignored: false,\n })\n )\n}\n\nexport async function getOriginalStackFrames(\n frames: readonly StackFrame[],\n type: 'server' | 'edge-server' | null,\n isAppDir: boolean\n): Promise {\n const req: OriginalStackFramesRequest = {\n frames,\n isServer: type === 'server',\n isEdgeServer: type === 'edge-server',\n isAppDirectory: isAppDir,\n }\n\n let res: Response | undefined = undefined\n let reason: string | undefined = undefined\n try {\n res = await fetch('/__nextjs_original-stack-frames', {\n method: 'POST',\n body: JSON.stringify(req),\n })\n } catch (e) {\n reason = e + ''\n }\n\n // When fails to fetch the original stack frames, we reject here to be\n // caught at `_getOriginalStackFrame()` and return the stack frames so\n // that the error overlay can render.\n if (res && res.ok && res.status !== 204) {\n const data = await res.json()\n return Promise.all(\n frames.map((frame, index) => getOriginalStackFrame(frame, data[index]))\n )\n } else {\n if (res) {\n reason = await res.text()\n }\n }\n return Promise.all(\n frames.map((frame) =>\n getOriginalStackFrame(frame, {\n status: 'rejected',\n reason: `Failed to fetch the original stack frames ${reason ? `: ${reason}` : ''}`,\n })\n )\n )\n}\n\nexport function getStackFrameFile(frame: StackFrame): string {\n if (!frame.file) return ''\n\n const isWebpackFrame = isWebpackInternalResource(frame.file)\n\n let str = ''\n // Skip URL parsing for webpack internal file paths.\n if (isWebpackFrame) {\n str = formatStackFrameFile(frame.file)\n } else {\n try {\n const u = new URL(frame.file)\n\n let parsedPath = ''\n // Strip the origin for same-origin scripts.\n if (globalThis.location?.origin !== u.origin) {\n // URLs can be valid without an `origin`, so long as they have a\n // `protocol`. However, `origin` is preferred.\n if (u.origin === 'null') {\n parsedPath += u.protocol\n } else {\n parsedPath += u.origin\n }\n }\n\n // Strip query string information as it's typically too verbose to be\n // meaningful.\n parsedPath += u.pathname\n str = formatStackFrameFile(parsedPath)\n } catch {\n str = formatStackFrameFile(frame.file)\n }\n }\n\n if (!isWebpackInternalResource(frame.file) && frame.line1 != null) {\n // We don't need line and column numbers for anonymous sources because\n // there's no entrypoint for the location anyway.\n if (str && frame.file !== '') {\n if (frame.column1 != null) {\n str += ` (${frame.line1}:${frame.column1})`\n } else {\n str += ` (${frame.line1})`\n }\n }\n }\n return str\n}\n","import { useCallback } from 'react'\n\nexport function useOpenInEditor({\n file,\n line1,\n column1,\n}: {\n file?: string | null\n line1?: number | null\n column1?: number | null\n} = {}) {\n const openInEditor = useCallback(() => {\n if (file == null || line1 == null || column1 == null) return\n\n const params = new URLSearchParams()\n params.append('file', file)\n params.append('line1', String(line1))\n params.append('column1', String(column1))\n\n self\n .fetch(\n `${\n process.env.__NEXT_ROUTER_BASEPATH || ''\n }/__nextjs_launch-editor?${params.toString()}`\n )\n .then(\n () => {},\n (cause) => {\n console.error(\n `Failed to open file \"${file} (${line1}:${column1})\" in your editor. Cause:`,\n cause\n )\n }\n )\n }, [file, line1, column1])\n\n return openInEditor\n}\n","export function ExternalIcon(props: React.SVGProps) {\n return (\n \n \n \n )\n}\n\nexport function SourceMappingErrorIcon(props: React.SVGProps) {\n return (\n \n \n \n )\n}\n","export function FileIcon({ lang }: { lang?: string }) {\n if (!lang) return \n\n switch (lang.toLowerCase()) {\n case 'jsx':\n case 'tsx':\n return \n case 'ts':\n case 'typescript':\n return \n case 'javascript':\n case 'js':\n case 'mjs':\n return \n case 'json':\n return \n default:\n return \n }\n}\n\nfunction Json() {\n return (\n \n \n \n )\n}\n\nfunction Js() {\n return (\n \n \n \n )\n}\n\nfunction Ts() {\n return (\n \n \n \n \n \n )\n}\n\nfunction File() {\n return (\n \n \n \n )\n}\n\nfunction React() {\n return (\n \n \n \n \n \n \n \n \n \n \n )\n}\n","import Anser, { type AnserJsonEntry } from 'next/dist/compiled/anser'\nimport stripAnsi from 'next/dist/compiled/strip-ansi'\nimport type { StackFrame } from '../../../shared/stack-frame'\n\n// Strip leading spaces out of the code frame\nexport function formatCodeFrame(codeFrame: string) {\n const lines = codeFrame.split(/\\r?\\n/g)\n\n // Find the minimum length of leading spaces after `|` in the code frame\n const miniLeadingSpacesLength = lines\n .map((line) =>\n /^>? +\\d+ +\\| [ ]+/.exec(stripAnsi(line)) === null\n ? null\n : /^>? +\\d+ +\\| ( *)/.exec(stripAnsi(line))\n )\n .filter(Boolean)\n .map((v) => v!.pop()!)\n .reduce((c, n) => (isNaN(c) ? n.length : Math.min(c, n.length)), NaN)\n\n // When the minimum length of leading spaces is greater than 1, remove them\n // from the code frame to help the indentation looks better when there's a lot leading spaces.\n if (miniLeadingSpacesLength > 1) {\n return lines\n .map((line, a) =>\n ~(a = line.indexOf('|'))\n ? line.substring(0, a) +\n line.substring(a).replace(`^\\\\ {${miniLeadingSpacesLength}}`, '')\n : line\n )\n .join('\\n')\n }\n return lines.join('\\n')\n}\n\nexport function groupCodeFrameLines(formattedFrame: string) {\n // Map the decoded lines to a format that can be rendered\n const decoded = Anser.ansiToJson(formattedFrame, {\n json: true,\n use_classes: true,\n remove_empty: true,\n })\n const lines: (typeof decoded)[] = []\n\n let line: typeof decoded = []\n for (const token of decoded) {\n // If the token is a new line with only line break \"\\n\",\n // break here into a new line.\n // The line could also contain spaces, it's still considered line break if \"\\n\" line has spaces.\n if (typeof token.content === 'string' && token.content.includes('\\n')) {\n const segments = token.content.split('\\n')\n for (let i = 0; i < segments.length; i++) {\n const segment = segments[i]\n if (segment) {\n line.push({\n ...token,\n content: segment,\n })\n }\n if (i < segments.length - 1) {\n lines.push(line)\n line = []\n }\n }\n } else {\n line.push(token)\n }\n }\n if (line.length > 0) {\n lines.push(line)\n }\n\n return lines\n}\n\nexport function parseLineNumberFromCodeFrameLine(\n line: AnserJsonEntry[],\n stackFrame: StackFrame\n) {\n let lineNumberToken: AnserJsonEntry | undefined\n let line1: string | undefined\n // parse line number from line first 2 tokens\n // e.g. ` > 1 | const foo = 'bar'` => `1`, first token is `1 |`\n // e.g. ` 2 | const foo = 'bar'` => `2`. first 2 tokens are ' ' and ' 2 |'\n if (line[0]?.content === '>' || line[0]?.content === ' ') {\n lineNumberToken = line[1]\n line1 = lineNumberToken?.content?.replace('|', '')?.trim()\n }\n\n // When the line number is possibly undefined, it can be just the non-source code line\n // e.g. the ^ sign can also take a line, we skip rendering line number for it\n return {\n lineNumber: line1,\n isErroredLine: line1 === stackFrame.line1?.toString(),\n }\n}\n","import { useMemo } from 'react'\nimport { HotlinkedText } from '../hot-linked-text'\nimport { getStackFrameFile, type StackFrame } from '../../../shared/stack-frame'\nimport { useOpenInEditor } from '../../utils/use-open-in-editor'\nimport { ExternalIcon } from '../../icons/external'\nimport { FileIcon } from '../../icons/file'\nimport {\n formatCodeFrame,\n groupCodeFrameLines,\n parseLineNumberFromCodeFrameLine,\n} from './parse-code-frame'\n\ntype CodeFrameProps = {\n stackFrame: StackFrame\n codeFrame: string\n}\n\nexport function CodeFrame({ stackFrame, codeFrame }: CodeFrameProps) {\n const parsedLineStates = useMemo(() => {\n const decodedLines = groupCodeFrameLines(formatCodeFrame(codeFrame))\n\n return decodedLines.map((line) => {\n return {\n line,\n parsedLine: parseLineNumberFromCodeFrameLine(line, stackFrame),\n }\n })\n }, [codeFrame, stackFrame])\n\n const open = useOpenInEditor({\n file: stackFrame.file,\n line1: stackFrame.line1 ?? 1,\n column1: stackFrame.column1 ?? 1,\n })\n\n const fileExtension = stackFrame?.file?.split('.').pop()\n\n // TODO: make the caret absolute\n return (\n
\n
\n {/* TODO: This is
in `Terminal` component.\n Changing now will require multiple test snapshots updates.\n Leaving as
as is trivial and does not affect the UI.\n Change when the new redbox matcher `toDisplayRedbox` is used.\n */}\n

\n \n \n \n \n {getStackFrameFile(stackFrame)} @{' '}\n \n \n \n \n \n \n \n

\n
\n
\n        
\n {parsedLineStates.map(({ line, parsedLine }, lineIndex) => {\n const { lineNumber, isErroredLine } = parsedLine\n\n const lineNumberProps: Record = {}\n if (lineNumber) {\n lineNumberProps['data-nextjs-codeframe-line'] = lineNumber\n }\n if (isErroredLine) {\n lineNumberProps['data-nextjs-codeframe-line--errored'] = true\n }\n\n return (\n
\n {line.map((entry, entryIndex) => (\n \n {entry.content}\n \n ))}\n
\n )\n })}\n
\n
\n
\n )\n}\n\nexport const CODE_FRAME_STYLES = `\n [data-nextjs-codeframe] {\n --code-frame-padding: 12px;\n --code-frame-line-height: var(--size-16);\n background-color: var(--color-background-200);\n color: var(--color-gray-1000);\n text-overflow: ellipsis;\n border: 1px solid var(--color-gray-400);\n border-radius: 8px;\n font-family: var(--font-stack-monospace);\n font-size: var(--size-12);\n line-height: var(--code-frame-line-height);\n margin: 8px 0;\n\n svg {\n width: var(--size-16);\n height: var(--size-16);\n }\n }\n\n .code-frame-link,\n .code-frame-pre {\n padding: var(--code-frame-padding);\n }\n\n .code-frame-link svg {\n flex-shrink: 0;\n }\n\n .code-frame-lines {\n min-width: max-content;\n }\n\n .code-frame-link [data-text] {\n text-align: left;\n margin: auto 6px;\n }\n\n .code-frame-header {\n width: 100%;\n transition: background 100ms ease-out;\n border-radius: 8px 8px 0 0;\n border-bottom: 1px solid var(--color-gray-400);\n }\n\n [data-with-open-in-editor-link-source-file] {\n padding: 4px;\n margin: -4px 0 -4px auto;\n border-radius: var(--rounded-full);\n margin-left: auto;\n\n &:focus-visible {\n outline: var(--focus-ring);\n outline-offset: -2px;\n }\n\n &:hover {\n background: var(--color-gray-100);\n }\n }\n\n [data-nextjs-codeframe]::selection,\n [data-nextjs-codeframe] *::selection {\n background-color: var(--color-ansi-selection);\n }\n\n [data-nextjs-codeframe] *:not(a) {\n color: inherit;\n background-color: transparent;\n font-family: var(--font-stack-monospace);\n }\n\n [data-nextjs-codeframe-line][data-nextjs-codeframe-line--errored=\"true\"] {\n position: relative;\n isolation: isolate;\n\n > span { \n position: relative;\n z-index: 1;\n }\n\n &::after {\n content: \"\";\n width: calc(100% + var(--code-frame-padding) * 2);\n height: var(--code-frame-line-height);\n left: calc(-1 * var(--code-frame-padding));\n background: var(--color-red-200);\n box-shadow: 2px 0 0 0 var(--color-red-900) inset;\n position: absolute;\n }\n }\n\n\n [data-nextjs-codeframe] > * {\n margin: 0;\n }\n\n .code-frame-link {\n display: flex;\n margin: 0;\n outline: 0;\n }\n .code-frame-link [data-icon='right'] {\n margin-left: auto;\n }\n\n [data-nextjs-codeframe] div > pre {\n overflow: hidden;\n display: inline-block;\n }\n\n [data-nextjs-codeframe] svg {\n color: var(--color-gray-900);\n }\n`\n","import * as React from 'react'\n\ntype DialogBodyProps = {\n children?: React.ReactNode\n className?: string\n} & React.HTMLAttributes\n\nconst DialogBody: React.FC = function DialogBody({\n children,\n className,\n ...props\n}) {\n return (\n
\n {children}\n
\n )\n}\n\nexport { DialogBody }\n","import * as React from 'react'\n\ntype DialogContentProps = {\n children?: React.ReactNode\n className?: string\n} & React.HTMLAttributes\n\nconst DialogContent: React.FC = function DialogContent({\n children,\n className,\n ...props\n}) {\n return (\n
\n {children}\n
\n )\n}\n\nexport { DialogContent }\n","import { css } from '../../utils/css'\n\nexport const styles = css`\n [data-nextjs-dialog-root] {\n --next-dialog-radius: var(--rounded-xl);\n --next-dialog-max-width: 960px;\n --next-dialog-row-padding: 16px;\n --next-dialog-padding: 12px;\n --next-dialog-notch-height: 42px;\n --next-dialog-border-width: 1px;\n\n display: flex;\n flex-direction: column;\n width: 100%;\n max-height: calc(100% - 56px);\n max-width: var(--next-dialog-max-width);\n margin-right: auto;\n margin-left: auto;\n scale: 0.97;\n opacity: 0;\n transition-property: scale, opacity;\n transition-duration: var(--transition-duration);\n transition-timing-function: var(--timing-overlay);\n\n &[data-rendered='true'] {\n opacity: 1;\n scale: 1;\n }\n\n [data-nextjs-scroll-fader][data-side='top'] {\n left: 1px;\n top: calc(\n var(--next-dialog-notch-height) + var(--next-dialog-border-width)\n );\n width: calc(100% - var(--next-dialog-padding));\n opacity: 0;\n }\n }\n\n [data-nextjs-dialog] {\n outline: 0;\n }\n\n [data-nextjs-dialog-backdrop] {\n opacity: 0;\n transition: opacity var(--transition-duration) var(--timing-overlay);\n }\n\n [data-nextjs-dialog-overlay] {\n margin: 8px;\n }\n\n [data-nextjs-dialog-overlay][data-rendered='true']\n [data-nextjs-dialog-backdrop] {\n opacity: 1;\n }\n\n [data-nextjs-dialog-content] {\n border: none;\n margin: 0;\n display: flex;\n flex-direction: column;\n position: relative;\n padding: var(--next-dialog-padding);\n }\n\n [data-nextjs-dialog-content] > [data-nextjs-dialog-header] {\n flex-shrink: 0;\n margin-bottom: 8px;\n }\n\n [data-nextjs-dialog-content] > [data-nextjs-dialog-body] {\n position: relative;\n flex: 1 1 auto;\n }\n\n @media (max-height: 812px) {\n [data-nextjs-dialog-overlay] {\n max-height: calc(100% - 15px);\n }\n }\n\n @media (min-width: 576px) {\n [data-nextjs-dialog-root] {\n --next-dialog-max-width: 540px;\n }\n }\n\n @media (min-width: 768px) {\n [data-nextjs-dialog-root] {\n --next-dialog-max-width: 720px;\n }\n }\n\n @media (min-width: 992px) {\n [data-nextjs-dialog-root] {\n --next-dialog-max-width: 960px;\n }\n }\n`\n","/**\n * Merge multiple args to a single string with spaces. Useful for merging class names.\n * @example\n * cx('foo', 'bar') // 'foo bar'\n * cx('foo', null, 'bar', undefined, 'baz', false) // 'foo bar baz'\n */\nexport function cx(...args: (string | undefined | null | false)[]): string {\n return args.filter(Boolean).join(' ')\n}\n","import * as React from 'react'\nimport { cx } from '../../utils/cx'\n\nfunction useCopy(getContent: () => Promise) {\n type CopyState =\n | {\n state: 'initial'\n }\n | {\n state: 'error'\n error: unknown\n }\n | { state: 'success' }\n\n const [copyState, dispatch, isPending] = React.useActionState(\n (\n state: CopyState,\n action: 'reset' | 'copy'\n ): CopyState | Promise => {\n if (action === 'reset') {\n return { state: 'initial' }\n }\n if (action === 'copy') {\n if (!navigator.clipboard) {\n return {\n state: 'error',\n error: 'Copy to clipboard is not supported in this browser',\n }\n }\n return getContent().then((content) => {\n return navigator.clipboard.writeText(content).then(\n () => {\n return { state: 'success' }\n },\n (error) => {\n return { state: 'error', error }\n }\n )\n })\n }\n return state\n },\n {\n state: 'initial',\n }\n )\n\n function copy() {\n React.startTransition(() => {\n dispatch('copy')\n })\n }\n\n const reset = React.useCallback(() => {\n dispatch('reset')\n }, [\n // TODO: `dispatch` from `useActionState` is not reactive.\n // Remove from dependencies once https://github.com/facebook/react/pull/29665 is released.\n dispatch,\n ])\n\n return [copyState, copy, reset, isPending] as const\n}\n\ntype CopyButtonProps = React.HTMLProps & {\n actionLabel: string\n successLabel: string\n icon?: React.ReactNode\n}\n\nexport function CopyButton(\n props: CopyButtonProps & {\n content?: string\n getContent?: () => Promise\n }\n) {\n const {\n content,\n getContent,\n actionLabel,\n successLabel,\n icon,\n disabled,\n ...rest\n } = props\n const getContentString = (): Promise => {\n if (content) {\n return Promise.resolve(content)\n }\n if (getContent) {\n return getContent()\n }\n return Promise.resolve('')\n }\n const [copyState, copy, reset, isPending] = useCopy(getContentString)\n\n const error = copyState.state === 'error' ? copyState.error : null\n React.useEffect(() => {\n if (error !== null) {\n // Only log warning in terminal to avoid showing in the error overlay.\n // When it's errored, the copy button will be disabled.\n console.warn(error)\n }\n }, [error])\n React.useEffect(() => {\n if (copyState.state === 'success') {\n const timeoutId = setTimeout(() => {\n reset()\n }, 2000)\n\n return () => {\n clearTimeout(timeoutId)\n }\n }\n }, [isPending, copyState.state, reset])\n const isDisabled = !navigator.clipboard || isPending || disabled || !!error\n const label = copyState.state === 'success' ? successLabel : actionLabel\n\n // Assign default icon\n const renderedIcon =\n copyState.state === 'success' ? (\n \n ) : (\n icon || (\n \n )\n )\n\n return (\n {\n if (!isDisabled) {\n copy()\n }\n }}\n >\n {renderedIcon}\n {copyState.state === 'error' ? ` ${copyState.error}` : null}\n \n )\n}\n\nfunction CopyIcon(props: React.SVGProps) {\n return (\n \n \n \n )\n}\n\nfunction CopySuccessIcon() {\n return (\n \n \n \n )\n}\n\nexport const COPY_BUTTON_STYLES = `\n .nextjs-data-copy-button {\n color: inherit;\n\n svg {\n width: var(--size-16);\n height: var(--size-16);\n }\n }\n .nextjs-data-copy-button[aria-disabled=\"true\"] {\n background-color: var(--color-gray-100);\n cursor: not-allowed;\n }\n .nextjs-data-copy-button[data-pending=\"true\"] {\n cursor: wait;\n }\n .nextjs-data-copy-button--initial:hover:not([aria-disabled=\"true\"]) {\n cursor: pointer;\n }\n .nextjs-data-copy-button--error:not([aria-disabled=\"true\"]),\n .nextjs-data-copy-button--error:hover:not([aria-disabled=\"true\"]) {\n color: var(--color-ansi-red);\n }\n .nextjs-data-copy-button--success:not([aria-disabled=\"true\"]) {\n color: var(--color-ansi-green);\n }\n`\n","import { startTransition, useActionState, useEffect } from 'react'\nimport { CopyButton } from '../../copy-button'\n\nfunction NodeJsIcon(props: any) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction NodeJsDisabledIcon(props: any) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nexport function NodejsInspectorButton({\n defaultDevtoolsFrontendUrl,\n}: {\n defaultDevtoolsFrontendUrl: string | undefined\n}) {\n const [devtoolsFrontendUrlState, attachDebuggerAction, isAttachingDebugger] =\n useActionState<\n | { status: 'fulfilled'; value: string | undefined }\n | { status: 'rejected'; reason: unknown }\n >(\n async () => {\n try {\n const response = await fetch('/__nextjs_attach-nodejs-inspector', {\n method: 'POST',\n })\n if (!response.ok) {\n throw new Error(\n `${response.status} ${response.statusText}: ${await response.text()}`\n )\n }\n const devtoolsFrontendUrl = await response.json()\n return {\n status: 'fulfilled',\n value: devtoolsFrontendUrl,\n }\n } catch (cause) {\n return {\n status: 'rejected',\n reason: new Error(\n 'Failed to attach Node.js inspector: ' +\n // TODO: Use `cause` property once Redbox supports displaying `cause`\n String(cause)\n ),\n }\n }\n },\n { status: 'fulfilled', value: defaultDevtoolsFrontendUrl }\n )\n\n const devtoolsFrontendUrl =\n devtoolsFrontendUrlState.status === 'fulfilled'\n ? devtoolsFrontendUrlState.value\n : undefined\n\n useEffect(() => {\n if (devtoolsFrontendUrlState.status === 'rejected') {\n console.error(devtoolsFrontendUrlState.reason)\n }\n }, [devtoolsFrontendUrlState])\n\n const attachDebugger = startTransition.bind(null, attachDebuggerAction)\n\n if (devtoolsFrontendUrl === undefined) {\n return (\n \n \n \n )\n }\n return (\n \n }\n />\n )\n}\n","import { CopyButton } from '../../copy-button'\n\nexport function CopyErrorButton({\n error,\n generateErrorInfo,\n}: {\n error: Error\n generateErrorInfo: () => Promise\n}) {\n return (\n \n )\n}\n","export const REACT_HYDRATION_ERROR_LINK =\n 'https://react.dev/link/hydration-mismatch'\nexport const NEXTJS_HYDRATION_ERROR_LINK =\n 'https://nextjs.org/docs/messages/react-hydration-error'\n\n/**\n * Only React 19+ contains component stack diff in the error message\n */\nconst errorMessagesWithComponentStackDiff = [\n /^In HTML, (.+?) cannot be a child of <(.+?)>\\.(.*)\\nThis will cause a hydration error\\.(.*)/,\n /^In HTML, (.+?) cannot be a descendant of <(.+?)>\\.\\nThis will cause a hydration error\\.(.*)/,\n /^In HTML, text nodes cannot be a child of <(.+?)>\\.\\nThis will cause a hydration error\\./,\n /^In HTML, whitespace text nodes cannot be a child of <(.+?)>\\. Make sure you don't have any extra whitespace between tags on each line of your source code\\.\\nThis will cause a hydration error\\./,\n]\n\nexport function isHydrationError(error: Error): boolean {\n return (\n isErrorMessageWithComponentStackDiff(error.message) ||\n /Hydration failed because the server rendered (text|HTML) didn't match the client\\./.test(\n error.message\n ) ||\n /A tree hydrated but some attributes of the server rendered HTML didn't match the client properties./.test(\n error.message\n )\n )\n}\n\nexport function isErrorMessageWithComponentStackDiff(msg: string): boolean {\n return errorMessagesWithComponentStackDiff.some((regex) => regex.test(msg))\n}\n\nexport function getHydrationErrorStackInfo(error: Error): {\n message: string | null\n notes: string | null\n diff: string | null\n} {\n const errorMessage = error.message\n if (isErrorMessageWithComponentStackDiff(errorMessage)) {\n const [message, diffLog = ''] = errorMessage.split('\\n\\n')\n const diff = diffLog.trim()\n return {\n message: diff === '' ? errorMessage.trim() : message.trim(),\n diff,\n notes: null,\n }\n }\n\n const [message, maybeComponentStackDiff] = errorMessage.split(\n `${REACT_HYDRATION_ERROR_LINK}`\n )\n const trimmedMessage = message.trim()\n // React built-in hydration diff starts with a newline\n if (\n maybeComponentStackDiff !== undefined &&\n maybeComponentStackDiff.length > 1\n ) {\n const diffs: string[] = []\n maybeComponentStackDiff.split('\\n').forEach((line) => {\n if (line.trim() === '') return\n if (!line.trim().startsWith('at ')) {\n diffs.push(line)\n }\n })\n\n const [displayedMessage, ...notes] = trimmedMessage.split('\\n\\n')\n return {\n message: displayedMessage,\n diff: diffs.join('\\n'),\n notes: notes.join('\\n\\n') || null,\n }\n } else {\n const [displayedMessage, ...notes] = trimmedMessage.split('\\n\\n')\n return {\n message: displayedMessage,\n diff: null,\n notes: notes.join('\\n\\n'),\n }\n }\n}\n","import {\n NEXTJS_HYDRATION_ERROR_LINK,\n REACT_HYDRATION_ERROR_LINK,\n} from '../../../../shared/react-19-hydration-error'\nimport { parseUrlFromText } from '../../../utils/parse-url-from-text'\n\nconst docsURLAllowlist = ['https://nextjs.org', 'https://react.dev']\n\nfunction docsLinkMatcher(text: string): boolean {\n return docsURLAllowlist.some((url) => text.startsWith(url))\n}\n\nfunction getDocsURLFromErrorMessage(text: string): string | null {\n const urls = parseUrlFromText(text, docsLinkMatcher)\n\n if (urls.length === 0) {\n return null\n }\n\n const href = urls[0]\n\n // Replace react hydration error link with nextjs hydration error link\n if (href === REACT_HYDRATION_ERROR_LINK) {\n return NEXTJS_HYDRATION_ERROR_LINK\n }\n\n return href\n}\n\nexport function DocsLinkButton({ errorMessage }: { errorMessage: string }) {\n const docsURL = getDocsURLFromErrorMessage(errorMessage)\n\n if (!docsURL) {\n return (\n \n \n \n )\n }\n\n return (\n \n \n \n )\n}\n\nfunction DocsIcon(props: React.SVGProps) {\n return (\n \n \n \n )\n}\n","export function parseUrlFromText(\n text: string,\n matcherFunc?: (text: string) => boolean\n): string[] {\n const linkRegex = /https?:\\/\\/[^\\s/$.?#].[^\\s)'\"]*/gi\n const links = Array.from(text.matchAll(linkRegex), (match) => match[0])\n\n if (matcherFunc) {\n return links.filter((link) => matcherFunc(link))\n }\n\n return links\n}\n","import type { DebugInfo } from '../../../../shared/types'\nimport { NodejsInspectorButton } from './nodejs-inspector-button'\nimport { CopyErrorButton } from './copy-error-button'\nimport { DocsLinkButton } from './docs-link-button'\n\ntype ErrorOverlayToolbarProps = {\n error: Error\n debugInfo: DebugInfo | undefined\n feedbackButton?: React.ReactNode\n generateErrorInfo: () => Promise\n}\n\nexport function ErrorOverlayToolbar({\n error,\n debugInfo,\n feedbackButton,\n generateErrorInfo,\n}: ErrorOverlayToolbarProps) {\n return (\n \n {/* TODO: Move the button inside and remove the feedback on the footer of the error overlay. */}\n {feedbackButton}\n \n \n \n \n )\n}\n\nexport const styles = `\n .error-overlay-toolbar {\n display: flex;\n gap: 6px;\n }\n\n .nodejs-inspector-button,\n .copy-error-button,\n .docs-link-button {\n display: flex;\n justify-content: center;\n align-items: center;\n\n width: var(--size-28);\n height: var(--size-28);\n background: var(--color-background-100);\n background-clip: padding-box;\n border: 1px solid var(--color-gray-alpha-400);\n box-shadow: var(--shadow-small);\n border-radius: var(--rounded-full);\n\n svg {\n width: var(--size-14);\n height: var(--size-14);\n }\n\n &:focus {\n outline: var(--focus-ring);\n }\n\n &:not(:disabled):hover {\n background: var(--color-gray-alpha-100);\n }\n\n &:not(:disabled):active {\n background: var(--color-gray-alpha-200);\n }\n\n &:disabled {\n background-color: var(--color-gray-100);\n cursor: not-allowed;\n }\n }\n\n .nodejs-inspector-button[data-pending='true'] {\n cursor: wait;\n }\n\n .error-overlay-toolbar-button-icon {\n color: var(--color-gray-900);\n }\n`\n","import type { ComponentProps } from 'react'\n\nexport function ThumbsUp(props: ComponentProps<'svg'>) {\n return (\n \n \n \n \n \n )\n}\n","import type { ComponentProps } from 'react'\n\nexport function ThumbsDown(props: ComponentProps<'svg'>) {\n return (\n \n \n \n )\n}\n","import { useState, useCallback } from 'react'\nimport { ThumbsUp } from '../../../../icons/thumbs/thumbs-up'\nimport { ThumbsDown } from '../../../../icons/thumbs/thumbs-down'\nimport { cx } from '../../../../utils/cx'\n\ninterface ErrorFeedbackProps {\n errorCode: string\n className?: string\n}\nexport function ErrorFeedback({ errorCode, className }: ErrorFeedbackProps) {\n const [votedMap, setVotedMap] = useState>({})\n const voted = votedMap[errorCode]\n const hasVoted = voted !== undefined\n const disabled = process.env.__NEXT_TELEMETRY_DISABLED\n\n const handleFeedback = useCallback(\n async (wasHelpful: boolean) => {\n // Optimistically set feedback state without loading/error states to keep implementation simple\n setVotedMap((prev) => ({\n ...prev,\n [errorCode]: wasHelpful,\n }))\n\n try {\n const response = await fetch(\n `${process.env.__NEXT_ROUTER_BASEPATH || ''}/__nextjs_error_feedback?${new URLSearchParams(\n {\n errorCode,\n wasHelpful: wasHelpful.toString(),\n }\n )}`\n )\n\n if (!response.ok) {\n // Handle non-2xx HTTP responses here if needed\n console.error('Failed to record feedback on the server.')\n }\n } catch (error) {\n console.error('Failed to record feedback:', error)\n }\n },\n [errorCode]\n )\n\n return (\n \n {hasVoted ? (\n

\n Thanks for your feedback!\n

\n ) : (\n <>\n

\n \n Was this helpful?\n \n

\n handleFeedback(true)}\n className={cx('feedback-button', voted === true && 'voted')}\n title={\n disabled\n ? 'Feedback disabled due to setting NEXT_TELEMETRY_DISABLED'\n : undefined\n }\n type=\"button\"\n >\n \n \n handleFeedback(false)}\n className={cx('feedback-button', voted === false && 'voted')}\n title={\n disabled\n ? 'Feedback disabled due to setting NEXT_TELEMETRY_DISABLED'\n : undefined\n }\n type=\"button\"\n >\n \n \n \n )}\n
\n )\n}\n\nexport const styles = `\n .error-feedback {\n display: flex;\n align-items: center;\n gap: 8px;\n white-space: nowrap;\n color: var(--color-gray-900);\n }\n\n .error-feedback-thanks {\n height: var(--size-24);\n display: flex;\n align-items: center;\n padding-right: 4px; /* To match the 4px inner padding of the thumbs up and down icons */\n }\n\n .feedback-button {\n background: none;\n border: none;\n border-radius: var(--rounded-md);\n width: var(--size-24);\n height: var(--size-24);\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n\n &:focus {\n outline: var(--focus-ring);\n }\n\n &:hover {\n background: var(--color-gray-alpha-100);\n }\n\n &:active {\n background: var(--color-gray-alpha-200);\n }\n }\n\n .feedback-button[aria-disabled='true'] {\n opacity: 0.7;\n cursor: not-allowed;\n }\n\n .feedback-button.voted {\n background: var(--color-gray-alpha-200);\n }\n\n .thumbs-up-icon,\n .thumbs-down-icon {\n color: var(--color-gray-900);\n width: var(--size-16);\n height: var(--size-16);\n }\n`\n","import { ErrorFeedback } from './error-feedback/error-feedback'\nimport { styles as feedbackStyles } from './error-feedback/error-feedback'\n\ntype ErrorOverlayFooterProps = {\n errorCode: string | undefined\n}\n\nexport function ErrorOverlayFooter({ errorCode }: ErrorOverlayFooterProps) {\n return (\n
\n {errorCode ? (\n \n ) : null}\n
\n )\n}\n\nexport const styles = `\n .error-overlay-footer {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n\n gap: 8px;\n padding: 12px;\n background: var(--color-background-200);\n border-top: 1px solid var(--color-gray-400);\n }\n\n .error-feedback {\n margin-left: auto;\n\n p {\n font-size: var(--size-14);\n font-weight: 500;\n margin: 0;\n }\n }\n\n ${feedbackStyles}\n`\n","import { useState, useRef, useLayoutEffect } from 'react'\nimport type { ErrorType } from '../error-type-label/error-type-label'\n\nexport type ErrorMessageType = React.ReactNode\n\ntype ErrorMessageProps = {\n errorMessage: ErrorMessageType\n errorType: ErrorType\n}\n\nexport function ErrorMessage({ errorMessage, errorType }: ErrorMessageProps) {\n const [isExpanded, setIsExpanded] = useState(false)\n const [isTooTall, setIsTooTall] = useState(false)\n const messageRef = useRef(null)\n\n useLayoutEffect(() => {\n if (messageRef.current) {\n setIsTooTall(messageRef.current.scrollHeight > 200)\n }\n }, [errorMessage])\n\n if (!errorMessage) {\n return null\n }\n\n // The \"Blocking Route\" error message is specifically formatted to look nice\n // in the overlay (rather than just passed through from the console), so we\n // intentionally don't truncate it and rely on the scroll overflow instead.\n const shouldTruncate = isTooTall && errorType !== 'Blocking Route'\n\n return (\n
\n \n {errorMessage}\n
\n {shouldTruncate && !isExpanded && (\n <>\n
\n setIsExpanded(true)}\n className=\"nextjs__container_errors_expand_button\"\n aria-expanded={isExpanded}\n aria-controls=\"nextjs__container_errors_desc\"\n >\n Show More\n \n \n )}\n
\n )\n}\n\nexport const styles = `\n .nextjs__container_errors_wrapper {\n position: relative;\n }\n\n .nextjs__container_errors_desc {\n margin: 0;\n margin-left: 4px;\n color: var(--color-red-900);\n font-weight: 500;\n font-size: var(--size-16);\n letter-spacing: -0.32px;\n line-height: var(--size-24);\n overflow-wrap: break-word;\n white-space: pre-wrap;\n }\n\n .nextjs__container_errors_desc.truncated {\n max-height: 200px;\n overflow: hidden;\n }\n\n .nextjs__container_errors_gradient_overlay {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 85px;\n background: linear-gradient(\n 180deg,\n rgba(250, 250, 250, 0) 0%,\n var(--color-background-100) 100%\n );\n }\n\n .nextjs__container_errors_expand_button {\n position: absolute;\n bottom: 10px;\n left: 50%;\n transform: translateX(-50%);\n display: flex;\n align-items: center;\n padding: 6px 8px;\n background: var(--color-background-100);\n border: 1px solid var(--color-gray-alpha-400);\n border-radius: 999px;\n box-shadow:\n 0px 2px 2px var(--color-gray-alpha-100),\n 0px 8px 8px -8px var(--color-gray-alpha-100);\n font-size: var(--size-13);\n cursor: pointer;\n color: var(--color-gray-900);\n font-weight: 500;\n transition: background-color 0.2s ease;\n }\n\n .nextjs__container_errors_expand_button:hover {\n background: var(--color-gray-100);\n }\n`\n","export type ErrorType =\n | 'Build Error'\n | `Runtime ${string}`\n | `Console ${string}`\n | `Recoverable ${string}`\n | 'Blocking Route'\n | 'Ambiguous Metadata'\n\ntype ErrorTypeLabelProps = {\n errorType: ErrorType\n}\n\nexport function ErrorTypeLabel({ errorType }: ErrorTypeLabelProps) {\n return (\n \n {errorType}\n \n )\n}\n\nexport const styles = `\n .nextjs__container_errors_label {\n padding: 2px 6px;\n margin: 0;\n border-radius: var(--rounded-md-2);\n background: var(--color-red-100);\n font-weight: 600;\n font-size: var(--size-12);\n color: var(--color-red-900);\n font-family: var(--font-stack-monospace);\n line-height: var(--size-20);\n }\n\n .nextjs__container_errors_label_blocking_page {\n background: var(--color-blue-100);\n color: var(--color-blue-900);\n }\n`\n","export function LeftArrow({\n title,\n className,\n}: {\n title?: string\n className?: string\n}) {\n return (\n \n \n \n )\n}\n","export function RightArrow({\n title,\n className,\n}: {\n title?: string\n className?: string\n}) {\n return (\n \n \n \n )\n}\n","import {\n startTransition,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react'\nimport { LeftArrow } from '../../../icons/left-arrow'\nimport { RightArrow } from '../../../icons/right-arrow'\nimport type { ReadyRuntimeError } from '../../../utils/get-error-by-type'\n\ntype ErrorPaginationProps = {\n runtimeErrors: ReadyRuntimeError[]\n activeIdx: number\n onActiveIndexChange: (index: number) => void\n}\n\nexport function ErrorOverlayPagination({\n runtimeErrors,\n activeIdx,\n onActiveIndexChange,\n}: ErrorPaginationProps) {\n const handlePrevious = useCallback(\n () =>\n startTransition(() => {\n if (activeIdx > 0) {\n onActiveIndexChange(Math.max(0, activeIdx - 1))\n }\n }),\n [activeIdx, onActiveIndexChange]\n )\n\n const handleNext = useCallback(\n () =>\n startTransition(() => {\n if (activeIdx < runtimeErrors.length - 1) {\n onActiveIndexChange(\n Math.max(0, Math.min(runtimeErrors.length - 1, activeIdx + 1))\n )\n }\n }),\n [activeIdx, runtimeErrors.length, onActiveIndexChange]\n )\n\n const buttonLeft = useRef(null)\n const buttonRight = useRef(null)\n\n const [nav, setNav] = useState(null)\n const onNav = useCallback((el: HTMLElement) => {\n setNav(el)\n }, [])\n\n useEffect(() => {\n if (nav == null) {\n return\n }\n\n const root = nav.getRootNode()\n const d = self.document\n\n function handler(e: KeyboardEvent) {\n if (e.key === 'ArrowLeft') {\n e.preventDefault()\n e.stopPropagation()\n handlePrevious && handlePrevious()\n } else if (e.key === 'ArrowRight') {\n e.preventDefault()\n e.stopPropagation()\n handleNext && handleNext()\n }\n }\n\n root.addEventListener('keydown', handler as EventListener)\n if (root !== d) {\n d.addEventListener('keydown', handler)\n }\n return function () {\n root.removeEventListener('keydown', handler as EventListener)\n if (root !== d) {\n d.removeEventListener('keydown', handler)\n }\n }\n }, [nav, handleNext, handlePrevious])\n\n // Unlock focus for browsers like Firefox, that break all user focus if the\n // currently focused item becomes disabled.\n useEffect(() => {\n if (nav == null) {\n return\n }\n\n const root = nav.getRootNode()\n // Always true, but we do this for TypeScript:\n if (root instanceof ShadowRoot) {\n const a = root.activeElement\n\n if (activeIdx === 0) {\n if (buttonLeft.current && a === buttonLeft.current) {\n buttonLeft.current.blur()\n }\n } else if (activeIdx === runtimeErrors.length - 1) {\n if (buttonRight.current && a === buttonRight.current) {\n buttonRight.current.blur()\n }\n }\n }\n }, [nav, activeIdx, runtimeErrors.length])\n\n return (\n \n \n \n \n
\n {activeIdx + 1}/\n \n {/* Display 1 out of 1 if there are no errors (e.g. for build errors). */}\n {runtimeErrors.length || 1}\n \n
\n = runtimeErrors.length - 1}\n aria-disabled={activeIdx >= runtimeErrors.length - 1}\n onClick={handleNext}\n data-nextjs-dialog-error-next\n className=\"error-overlay-pagination-button\"\n >\n \n \n \n )\n}\n\nexport const styles = `\n .error-overlay-pagination {\n -webkit-font-smoothing: antialiased;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 8px;\n width: fit-content;\n }\n\n .error-overlay-pagination-count {\n color: var(--color-gray-900);\n text-align: center;\n font-size: var(--size-14);\n font-weight: 500;\n line-height: var(--size-16);\n font-variant-numeric: tabular-nums;\n }\n\n .error-overlay-pagination-button {\n display: flex;\n justify-content: center;\n align-items: center;\n\n width: var(--size-24);\n height: var(--size-24);\n background: var(--color-gray-300);\n flex-shrink: 0;\n\n border: none;\n border-radius: var(--rounded-full);\n\n svg {\n width: var(--size-16);\n height: var(--size-16);\n }\n\n &:focus-visible {\n outline: var(--focus-ring);\n }\n\n &:not(:disabled):active {\n background: var(--color-gray-500);\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n }\n\n .error-overlay-pagination-button-icon {\n color: var(--color-gray-1000);\n }\n`\n","export function EclipseIcon(props: React.SVGProps) {\n return (\n \n \n \n )\n}\n","import type { VersionInfo } from '../../../../server/dev/parse-version-info'\nimport { getStaleness } from '../../../shared/version-staleness'\nimport { cx } from '../../utils/cx'\nimport { EclipseIcon } from '../../icons/eclipse'\n\nexport function VersionStalenessInfo({\n versionInfo,\n bundlerName,\n}: {\n versionInfo: VersionInfo\n // Passed from parent for easier handling in Storybook.\n bundlerName: 'Webpack' | 'Turbopack' | 'Rspack'\n}) {\n const { staleness } = versionInfo\n let { text, indicatorClass, title } = getStaleness(versionInfo)\n\n const isTurbopack = bundlerName === 'Turbopack'\n const shouldBeLink = staleness.startsWith('stale')\n if (shouldBeLink) {\n return (\n \n \n \n {text}\n \n \n {bundlerName}\n \n \n )\n }\n\n return (\n \n \n \n {text}\n \n {bundlerName}\n \n )\n}\n\nexport const styles = `\n .nextjs-container-build-error-version-status {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 4px;\n\n height: var(--size-26);\n padding: 6px 8px 6px 6px;\n background: var(--color-background-100);\n background-clip: padding-box;\n border: 1px solid var(--color-gray-alpha-400);\n box-shadow: var(--shadow-small);\n border-radius: var(--rounded-full);\n\n color: var(--color-gray-900);\n font-size: var(--size-12);\n font-weight: 500;\n line-height: var(--size-16);\n }\n\n a.nextjs-container-build-error-version-status {\n text-decoration: none;\n color: var(--color-gray-900);\n\n &:hover {\n background: var(--color-gray-100);\n }\n\n &:focus {\n outline: var(--focus-ring);\n }\n }\n\n .version-staleness-indicator.fresh {\n fill: var(--color-green-800);\n stroke: var(--color-green-300);\n }\n .version-staleness-indicator.stale {\n fill: var(--color-amber-800);\n stroke: var(--color-amber-300);\n }\n .version-staleness-indicator.outdated {\n fill: var(--color-red-800);\n stroke: var(--color-red-300);\n }\n .version-staleness-indicator.unknown {\n fill: var(--color-gray-800);\n stroke: var(--color-gray-300);\n }\n\n .nextjs-container-build-error-version-status > .turbopack-text {\n background: linear-gradient(\n to right,\n var(--color-turbopack-text-red) 0%,\n var(--color-turbopack-text-blue) 100%\n );\n background-clip: text;\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n }\n`\n","import type { VersionInfo } from '../../server/dev/parse-version-info'\n\nexport function getStaleness({ installed, staleness, expected }: VersionInfo) {\n let text = ''\n let title = ''\n let indicatorClass = ''\n const versionLabel = `Next.js ${installed}`\n switch (staleness) {\n case 'newer-than-npm':\n case 'fresh':\n text = versionLabel\n title = `Latest available version is detected (${installed}).`\n indicatorClass = 'fresh'\n break\n case 'stale-patch':\n case 'stale-minor':\n text = `${versionLabel} (stale)`\n title = `There is a newer version (${expected}) available, upgrade recommended! `\n indicatorClass = 'stale'\n break\n case 'stale-major': {\n text = `${versionLabel} (outdated)`\n title = `An outdated version detected (latest is ${expected}), upgrade is highly recommended!`\n indicatorClass = 'outdated'\n break\n }\n case 'stale-prerelease': {\n text = `${versionLabel} (stale)`\n title = `There is a newer canary version (${expected}) available, please upgrade! `\n indicatorClass = 'stale'\n break\n }\n case 'unknown':\n text = `${versionLabel} (unknown)`\n title = 'No Next.js version data was found.'\n indicatorClass = 'unknown'\n break\n default:\n break\n }\n return { text, indicatorClass, title }\n}\n","import type { VersionInfo } from '../../../../../server/dev/parse-version-info'\n\nimport { ErrorOverlayPagination } from '../error-overlay-pagination/error-overlay-pagination'\nimport { VersionStalenessInfo } from '../../version-staleness-info/version-staleness-info'\nimport type { ReadyRuntimeError } from '../../../utils/get-error-by-type'\n\ntype ErrorOverlayNavProps = {\n runtimeErrors?: ReadyRuntimeError[]\n activeIdx?: number\n setActiveIndex?: (index: number) => void\n versionInfo?: VersionInfo\n isTurbopack?: boolean\n}\n\nexport function ErrorOverlayNav({\n runtimeErrors,\n activeIdx,\n setActiveIndex,\n versionInfo,\n}: ErrorOverlayNavProps) {\n const bundlerName = (process.env.__NEXT_BUNDLER || 'Turbopack') as\n | 'Turbopack'\n | 'Webpack'\n | 'Rspack'\n\n return (\n
\n \n {/* TODO: better passing data instead of nullish coalescing */}\n {})}\n />\n \n {versionInfo && (\n \n \n \n )}\n
\n )\n}\n\nexport const styles = `\n [data-nextjs-error-overlay-nav] {\n --stroke-color: var(--color-gray-400);\n --background-color: var(--color-background-100);\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n width: 100%;\n\n position: relative;\n z-index: 2;\n outline: none;\n translate: var(--next-dialog-border-width) var(--next-dialog-border-width);\n max-width: var(--next-dialog-max-width);\n\n .error-overlay-notch {\n translate: calc(var(--next-dialog-border-width) * -1);\n width: auto;\n height: var(--next-dialog-notch-height);\n padding: 12px;\n background: var(--background-color);\n border: var(--next-dialog-border-width) solid var(--stroke-color);\n border-bottom: none;\n position: relative;\n\n &[data-side='left'] {\n padding-right: 0;\n border-radius: var(--next-dialog-radius) 0 0 0;\n\n .error-overlay-notch-tail {\n right: -54px;\n }\n\n > *:not(.error-overlay-notch-tail) {\n margin-right: -10px;\n }\n }\n\n &[data-side='right'] {\n padding-left: 0;\n border-radius: 0 var(--next-dialog-radius) 0 0;\n\n .error-overlay-notch-tail {\n left: -54px;\n transform: rotateY(180deg);\n }\n\n > *:not(.error-overlay-notch-tail) {\n margin-left: -12px;\n }\n }\n\n .error-overlay-notch-tail {\n position: absolute;\n top: calc(var(--next-dialog-border-width) * -1);\n pointer-events: none;\n z-index: -1;\n height: calc(100% + var(--next-dialog-border-width));\n }\n }\n }\n\n @media (max-width: 600px) {\n [data-nextjs-error-overlay-nav] {\n background: var(--background-color);\n border-radius: var(--next-dialog-radius) var(--next-dialog-radius) 0 0;\n border: var(--next-dialog-border-width) solid var(--stroke-color);\n border-bottom: none;\n overflow: hidden;\n translate: 0 var(--next-dialog-border-width);\n \n .error-overlay-notch {\n border-radius: 0;\n border: 0;\n\n &[data-side=\"left\"], &[data-side=\"right\"] {\n border-radius: 0;\n }\n\n .error-overlay-notch-tail {\n display: none;\n }\n }\n }\n }\n`\n\nfunction Notch({\n children,\n side = 'left',\n}: {\n children: React.ReactNode\n side?: 'left' | 'right'\n}) {\n return (\n
\n {children}\n \n
\n )\n}\n\nfunction Tail() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n","import * as React from 'react'\nimport { useOnClickOutside } from '../../hooks/use-on-click-outside'\n\ntype DialogProps = {\n children?: React.ReactNode\n 'aria-labelledby': string\n 'aria-describedby': string\n className?: string\n onClose?: () => void\n} & React.HTMLAttributes\n\nconst CSS_SELECTORS_TO_EXCLUDE_ON_CLICK_OUTSIDE = [\n '[data-next-mark]',\n '[data-issues-open]',\n '#nextjs-dev-tools-menu',\n '[data-nextjs-error-overlay-nav]',\n '[data-info-popover]',\n '[data-nextjs-devtools-panel-overlay]',\n '[data-nextjs-devtools-panel-footer]',\n '[data-nextjs-error-overlay-footer]',\n]\n\nconst Dialog: React.FC = function Dialog({\n children,\n className,\n onClose,\n 'aria-labelledby': ariaLabelledBy,\n 'aria-describedby': ariaDescribedBy,\n ...props\n}) {\n const dialogRef = React.useRef(null)\n // TODO: Document is an external store. Either use useSyncExternalStore or always set the role.\n const [role, setRole] = React.useState(\n typeof document !== 'undefined' && document.hasFocus()\n ? 'dialog'\n : undefined\n )\n\n useOnClickOutside(\n dialogRef,\n CSS_SELECTORS_TO_EXCLUDE_ON_CLICK_OUTSIDE,\n (e) => {\n e.preventDefault()\n return onClose?.()\n }\n )\n\n React.useEffect(() => {\n if (dialogRef.current == null) {\n return\n }\n\n function handleFocus() {\n // safari will force itself as the active application when a background page triggers any sort of autofocus\n // this is a workaround to only set the dialog role if the document has focus\n setRole(document.hasFocus() ? 'dialog' : undefined)\n }\n\n window.addEventListener('focus', handleFocus)\n window.addEventListener('blur', handleFocus)\n return () => {\n window.removeEventListener('focus', handleFocus)\n window.removeEventListener('blur', handleFocus)\n }\n }, [])\n\n React.useEffect(() => {\n const dialog = dialogRef.current\n const root = dialog?.getRootNode()\n const initialActiveElement =\n root instanceof ShadowRoot ? (root?.activeElement as HTMLElement) : null\n\n // Trap focus within the dialog\n dialog?.focus()\n\n return () => {\n // Blur first to avoid getting stuck, in case `activeElement` is missing\n dialog?.blur()\n // Restore focus to the previously active element\n initialActiveElement?.focus()\n }\n }, [])\n\n return (\n {\n if (e.key === 'Escape') {\n onClose?.()\n }\n }}\n {...props}\n >\n {children}\n
\n )\n}\n\nexport { Dialog }\n","import * as React from 'react'\n\nexport function useOnClickOutside(\n el: Node | React.RefObject | null,\n cssSelectorsToExclude: string[],\n handler: ((e: MouseEvent | TouchEvent) => void) | undefined\n) {\n React.useEffect(() => {\n // Support both direct nodes and ref objects\n const element = el && 'current' in el ? el.current : el\n if (element == null || handler == null) {\n return\n }\n\n const listener = (e: MouseEvent | TouchEvent) => {\n // Do nothing if clicking ref's element or descendent elements\n if (!element || element.contains(e.target as Element)) {\n return\n }\n\n if (\n // Do nothing if clicking on an element that is excluded by the CSS selector(s)\n cssSelectorsToExclude.some((cssSelector) =>\n (e.target as Element).closest(cssSelector)\n )\n ) {\n return\n }\n\n handler(e)\n }\n\n const root = element.getRootNode()\n root.addEventListener('mouseup', listener as EventListener)\n root.addEventListener('touchend', listener as EventListener, {\n passive: false,\n })\n return function () {\n root.removeEventListener('mouseup', listener as EventListener)\n root.removeEventListener('touchend', listener as EventListener)\n }\n }, [handler, el, cssSelectorsToExclude])\n}\n","import { Dialog } from '../../dialog/dialog'\n\ntype ErrorOverlayDialogProps = {\n children?: React.ReactNode\n onClose?: () => void\n footer?: React.ReactNode\n} & React.HTMLAttributes\n\nexport function ErrorOverlayDialog({\n children,\n onClose,\n footer,\n ...props\n}: ErrorOverlayDialogProps) {\n return (\n
\n \n {children}\n \n {footer}\n
\n )\n}\n\nexport const DIALOG_STYLES = `\n .error-overlay-dialog-container {\n display: flex;\n flex-direction: column;\n background: var(--color-background-100);\n background-clip: padding-box;\n border: var(--next-dialog-border-width) solid var(--color-gray-400);\n border-radius: 0 0 var(--next-dialog-radius) var(--next-dialog-radius);\n box-shadow: var(--shadow-menu);\n position: relative;\n overflow: hidden;\n }\n\n .error-overlay-dialog-scroll {\n overflow-y: auto;\n height: 100%;\n }\n`\n","type DialogHeaderProps = React.HTMLAttributes\n\nexport function DialogHeader(props: DialogHeaderProps) {\n return (\n
\n {props.children}\n
\n )\n}\n","import { DialogHeader } from '../../dialog/dialog-header'\n\ntype ErrorOverlayDialogHeaderProps = {\n children?: React.ReactNode\n}\n\nexport function ErrorOverlayDialogHeader({\n children,\n}: ErrorOverlayDialogHeaderProps) {\n return (\n \n {children}\n \n )\n}\n\nexport const DIALOG_HEADER_STYLES = `\n .nextjs-container-errors-header {\n position: relative;\n }\n .nextjs-container-errors-header > h1 {\n font-size: var(--size-20);\n line-height: var(--size-24);\n font-weight: bold;\n margin: calc(16px * 1.5) 0;\n color: var(--color-title-h1);\n }\n .nextjs-container-errors-header small {\n font-size: var(--size-14);\n color: var(--color-accents-1);\n margin-left: 16px;\n }\n .nextjs-container-errors-header small > span {\n font-family: var(--font-stack-monospace);\n }\n .nextjs-container-errors-header > div > small {\n margin: 0;\n margin-top: 4px;\n }\n .nextjs-container-errors-header > p > a {\n color: inherit;\n font-weight: bold;\n }\n .nextjs-container-errors-header\n > .nextjs-container-build-error-version-status {\n position: absolute;\n top: 16px;\n right: 16px;\n }\n`\n","import { DialogBody } from '../../dialog'\n\ntype ErrorOverlayDialogBodyProps = {\n children?: React.ReactNode\n onClose?: () => void\n}\n\nexport function ErrorOverlayDialogBody({\n children,\n}: ErrorOverlayDialogBodyProps) {\n return (\n {children}\n )\n}\n\nexport const DIALOG_BODY_STYLES = ``\n","import * as React from 'react'\nimport { lock, unlock } from './body-locker'\n\nexport type OverlayProps = React.HTMLAttributes & {\n fixed?: boolean\n ref?: React.Ref\n}\n\nconst Overlay: React.FC = function Overlay({\n className,\n children,\n ...props\n}) {\n React.useEffect(() => {\n lock()\n return () => {\n unlock()\n }\n }, [])\n\n return (\n
\n {children}\n
\n )\n}\n\nexport { Overlay }\n","import { css } from '../../../utils/css'\nimport { Overlay, type OverlayProps } from '../../overlay/overlay'\n\nexport function ErrorOverlayOverlay({ children, ...props }: OverlayProps) {\n return {children}\n}\n\nexport const OVERLAY_STYLES = css`\n [data-nextjs-dialog-overlay] {\n padding: initial;\n top: 10vh;\n }\n`\n","export function ErrorOverlayBottomStack({\n errorCount,\n activeIdx,\n}: {\n errorCount: number\n activeIdx: number\n}) {\n // If there are more than 2 errors to navigate, the stack count should remain at 2.\n const stackCount = Math.min(errorCount - activeIdx - 1, 2)\n return (\n
\n \n
\n 1\n
\n
\n 2\n
\n
\n \n )\n}\n\nexport const styles = `\n .error-overlay-bottom-stack-layer {\n width: 100%;\n height: var(--stack-layer-height);\n position: relative;\n border: 1px solid var(--color-gray-400);\n border-radius: var(--rounded-xl);\n background: var(--color-background-200);\n transition:\n translate 350ms var(--timing-swift),\n box-shadow 350ms var(--timing-swift);\n }\n\n .error-overlay-bottom-stack-layer-1 {\n width: calc(100% - var(--size-24));\n }\n\n .error-overlay-bottom-stack-layer-2 {\n width: calc(100% - var(--size-48));\n z-index: -1;\n }\n\n .error-overlay-bottom-stack {\n width: 100%;\n position: absolute;\n bottom: -1px;\n height: 0;\n overflow: visible;\n }\n\n .error-overlay-bottom-stack-stack {\n --stack-layer-height: 44px;\n --stack-layer-height-half: calc(var(--stack-layer-height) / 2);\n --stack-layer-trim: 13px;\n --shadow: 0px 0.925px 0.925px 0px rgba(0, 0, 0, 0.02),\n 0px 3.7px 7.4px -3.7px rgba(0, 0, 0, 0.04),\n 0px 14.8px 22.2px -7.4px rgba(0, 0, 0, 0.06);\n\n display: grid;\n place-items: center center;\n width: 100%;\n position: fixed;\n height: 0;\n overflow: visible;\n z-index: -1;\n max-width: var(--next-dialog-max-width);\n\n .error-overlay-bottom-stack-layer {\n grid-area: 1 / 1;\n /* Hide */\n translate: 0 calc(var(--stack-layer-height) * -1);\n }\n\n &[data-stack-count='1'],\n &[data-stack-count='2'] {\n .error-overlay-bottom-stack-layer-1 {\n translate: 0\n calc(var(--stack-layer-height-half) * -1 - var(--stack-layer-trim));\n }\n }\n\n &[data-stack-count='2'] {\n .error-overlay-bottom-stack-layer-2 {\n translate: 0 calc(var(--stack-layer-trim) * -1 * 2);\n }\n }\n\n /* Only the bottom stack should have the shadow */\n &[data-stack-count='1'] .error-overlay-bottom-stack-layer-1 {\n box-shadow: var(--shadow);\n }\n\n &[data-stack-count='2'] {\n .error-overlay-bottom-stack-layer-2 {\n box-shadow: var(--shadow);\n }\n }\n }\n`\n","export function EnvironmentNameLabel({\n environmentName,\n}: {\n environmentName: string\n}) {\n return {environmentName}\n}\n\nexport const ENVIRONMENT_NAME_LABEL_STYLES = `\n [data-nextjs-environment-name-label] {\n padding: 2px 6px;\n margin: 0;\n border-radius: var(--rounded-md-2);\n background: var(--color-gray-100);\n font-weight: 600;\n font-size: var(--size-12);\n color: var(--color-gray-900);\n font-family: var(--font-stack-monospace);\n line-height: var(--size-20);\n }\n`\n","import { useEffect, useEffectEvent } from 'react'\n\nexport function useFocusTrap(\n rootRef: React.RefObject,\n triggerRef: React.RefObject | null,\n active: boolean,\n onOpenFocus?: () => void\n) {\n const fireOpenFocus = useEffectEvent((rootNode: HTMLElement | null) => {\n if (onOpenFocus) {\n onOpenFocus()\n } else {\n rootNode?.focus()\n }\n })\n useEffect(() => {\n let rootNode: HTMLElement | null = null\n\n function onTab(e: KeyboardEvent) {\n if (e.key !== 'Tab' || rootNode === null) {\n return\n }\n\n const [firstFocusableNode, lastFocusableNode] =\n getFocusableNodes(rootNode)\n const activeElement = getActiveElement(rootNode)\n\n if (e.shiftKey) {\n if (activeElement === firstFocusableNode) {\n lastFocusableNode?.focus()\n e.preventDefault()\n }\n } else {\n if (activeElement === lastFocusableNode) {\n firstFocusableNode?.focus()\n e.preventDefault()\n }\n }\n }\n\n const id = setTimeout(() => {\n // Grab this on next tick to ensure the content is mounted\n rootNode = rootRef.current\n if (active) {\n fireOpenFocus(rootNode)\n rootNode?.addEventListener('keydown', onTab)\n } else {\n const activeElement = getActiveElement(rootNode)\n // Only restore focus if the focus was previously on the content.\n // This avoids us accidentally focusing on mount when the\n // user could want to interact with their own app instead.\n if (triggerRef && rootNode?.contains(activeElement)) {\n triggerRef.current?.focus()\n }\n }\n })\n\n return () => {\n clearTimeout(id)\n rootNode?.removeEventListener('keydown', onTab)\n }\n }, [active, rootRef, triggerRef])\n}\n\nexport function getActiveElement(node: HTMLElement | null) {\n const root = node?.getRootNode()\n return root instanceof ShadowRoot\n ? (root?.activeElement as HTMLElement)\n : null\n}\n\nfunction getFocusableNodes(node: HTMLElement): [HTMLElement, HTMLElement] | [] {\n const focusableElements = node.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n )\n if (!focusableElements) return []\n return [\n focusableElements![0] as HTMLElement,\n focusableElements![focusableElements!.length - 1] as HTMLElement,\n ]\n}\n\n//////////////////////////////////////////////////////////////////////////////////////\n\n// TODO: split up escape and click outside logic\nexport function useClickOutsideAndEscape(\n rootRef: React.RefObject,\n triggerRef: React.RefObject,\n active: boolean,\n close: (reason: 'escape' | 'outside') => void,\n ownerDocument?: Document\n) {\n useEffect(() => {\n if (!active) {\n return\n }\n\n const ownerDocumentEl = ownerDocument || rootRef.current?.ownerDocument\n\n function handleClickOutside(event: MouseEvent) {\n const target = event.target as HTMLElement\n if (rootRef.current && rootRef.current.contains(target)) {\n return\n }\n\n const cushion = 10\n\n if (\n !(rootRef.current?.getBoundingClientRect()\n ? event.clientX >=\n rootRef.current.getBoundingClientRect()!.left - cushion &&\n event.clientX <=\n rootRef.current.getBoundingClientRect()!.right + cushion &&\n event.clientY >=\n rootRef.current.getBoundingClientRect()!.top - cushion &&\n event.clientY <=\n rootRef.current.getBoundingClientRect()!.bottom + cushion\n : false) &&\n !(triggerRef.current?.getBoundingClientRect()\n ? event.clientX >=\n triggerRef.current.getBoundingClientRect()!.left - cushion &&\n event.clientX <=\n triggerRef.current.getBoundingClientRect()!.right + cushion &&\n event.clientY >=\n triggerRef.current.getBoundingClientRect()!.top - cushion &&\n event.clientY <=\n triggerRef.current.getBoundingClientRect()!.bottom + cushion\n : false)\n ) {\n close('outside')\n }\n }\n\n function handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Escape') {\n close('escape')\n }\n }\n\n ownerDocumentEl?.addEventListener('mousedown', handleClickOutside)\n\n ownerDocumentEl?.addEventListener('keydown', handleKeyDown)\n\n return () => {\n ownerDocumentEl?.removeEventListener('mousedown', handleClickOutside)\n ownerDocumentEl?.removeEventListener('keydown', handleKeyDown)\n }\n }, [active, close, ownerDocument, rootRef, triggerRef])\n}\n\n//////////////////////////////////////////////////////////////////////////////////////\n\nexport const MENU_DURATION_MS = 200\nexport const MENU_CURVE = 'cubic-bezier(0.175, 0.885, 0.32, 1.1)'\n","import { type CSSProperties, type Ref, forwardRef } from 'react'\n\nexport const Fader = forwardRef(function Fader(\n {\n stop,\n blur,\n side,\n style,\n height,\n }: {\n stop?: string\n blur?: string\n height?: number\n side: 'top' | 'bottom' | 'left' | 'right'\n className?: string\n style?: CSSProperties\n },\n ref: Ref\n) {\n return (\n \n )\n})\n\nexport const FADER_STYLES = `\n .nextjs-scroll-fader {\n --blur: 1px;\n --stop: 25%;\n --height: 150px;\n --color-bg: var(--color-background-100);\n position: absolute;\n pointer-events: none;\n user-select: none;\n width: 100%;\n height: var(--height);\n left: 0;\n backdrop-filter: blur(var(--blur));\n\n &[data-side=\"top\"] {\n top: 0;\n background: linear-gradient(to top, transparent, var(--color-bg));\n mask-image: linear-gradient(to bottom, var(--color-bg) var(--stop), transparent);\n }\n }\n`\n","import { forwardRef, useEffect, useState } from 'react'\n\nexport const Resizer = forwardRef(function Resizer(\n {\n children,\n measure,\n ...props\n }: {\n children: React.ReactNode\n measure: boolean\n } & React.HTMLProps,\n resizerRef: React.Ref\n) {\n const [element, setElement] = useState(null)\n const [height, measuring] = useMeasureHeight(element, measure)\n\n return (\n \n
{children}
\n \n )\n})\n\nfunction useMeasureHeight(\n element: HTMLDivElement | null,\n measure: boolean\n): [number, boolean] {\n const [height, setHeight] = useState(0)\n const [measuring, setMeasuring] = useState(true)\n\n useEffect(() => {\n if (!measure) {\n return\n }\n\n let timerId: number\n\n if (!element) {\n return\n }\n\n const observer = new ResizeObserver(([{ contentRect }]) => {\n clearTimeout(timerId)\n\n timerId = window.setTimeout(() => {\n setMeasuring(false)\n }, 100)\n\n setHeight(contentRect.height)\n })\n\n observer.observe(element)\n return () => observer.disconnect()\n }, [measure, element])\n\n return [height, measuring]\n}\n","type OverlayBackdropProps = {\n fixed?: boolean\n} & React.HTMLAttributes\n\nexport function OverlayBackdrop({ fixed, ...props }: OverlayBackdropProps) {\n return (\n \n )\n}\n","import * as React from 'react'\nimport type { DebugInfo } from '../../../../shared/types'\nimport type { ErrorMessageType } from '../error-message/error-message'\nimport type { ErrorType } from '../error-type-label/error-type-label'\n\nimport { DialogContent } from '../../dialog'\nimport {\n ErrorOverlayToolbar,\n styles as toolbarStyles,\n} from '../error-overlay-toolbar/error-overlay-toolbar'\nimport { ErrorOverlayFooter } from '../error-overlay-footer/error-overlay-footer'\nimport {\n ErrorMessage,\n styles as errorMessageStyles,\n} from '../error-message/error-message'\nimport {\n ErrorTypeLabel,\n styles as errorTypeLabelStyles,\n} from '../error-type-label/error-type-label'\nimport {\n ErrorOverlayNav,\n styles as floatingHeaderStyles,\n} from '../error-overlay-nav/error-overlay-nav'\n\nimport { ErrorOverlayDialog, DIALOG_STYLES } from '../dialog/dialog'\nimport {\n ErrorOverlayDialogHeader,\n DIALOG_HEADER_STYLES,\n} from '../dialog/header'\nimport { ErrorOverlayDialogBody, DIALOG_BODY_STYLES } from '../dialog/body'\nimport { OVERLAY_STYLES, ErrorOverlayOverlay } from '../overlay/overlay'\nimport { ErrorOverlayBottomStack } from '../error-overlay-bottom-stack'\nimport type { ErrorBaseProps } from '../error-overlay/error-overlay'\nimport type { ReadyRuntimeError } from '../../../utils/get-error-by-type'\nimport { EnvironmentNameLabel } from '../environment-name-label/environment-name-label'\nimport { useFocusTrap } from '../dev-tools-indicator/utils'\nimport { Fader } from '../../fader'\nimport { Resizer } from '../../resizer'\nimport { OverlayBackdrop } from '../../overlay'\n\nexport interface ErrorOverlayLayoutProps extends ErrorBaseProps {\n errorMessage: ErrorMessageType\n errorType: ErrorType\n children?: React.ReactNode\n errorCode?: string\n error: ReadyRuntimeError['error']\n debugInfo?: DebugInfo\n isBuildError?: boolean\n onClose?: () => void\n // TODO: better handle receiving\n runtimeErrors?: ReadyRuntimeError[]\n activeIdx?: number\n setActiveIndex?: (index: number) => void\n dialogResizerRef?: React.RefObject\n generateErrorInfo: () => Promise\n}\n\nexport function ErrorOverlayLayout({\n errorMessage,\n errorType,\n children,\n errorCode,\n errorCount,\n error,\n debugInfo,\n isBuildError,\n onClose,\n versionInfo,\n runtimeErrors,\n activeIdx,\n setActiveIndex,\n isTurbopack,\n dialogResizerRef,\n generateErrorInfo,\n // This prop is used to animate the dialog, it comes from a parent component ()\n // If it's not being passed, we should just render the component as it is being\n // used without the context of a parent component that controls its state (e.g. Storybook).\n rendered = true,\n transitionDurationMs,\n}: ErrorOverlayLayoutProps) {\n const animationProps = {\n 'data-rendered': rendered,\n style: {\n '--transition-duration': `${transitionDurationMs}ms`,\n } as React.CSSProperties,\n }\n\n const [animating, setAnimating] = React.useState(\n Boolean(transitionDurationMs)\n )\n\n const faderRef = React.useRef(null)\n const hasFooter = Boolean(errorCode)\n const dialogRef = React.useRef(null)\n useFocusTrap(dialogRef, null, rendered)\n\n function onScroll(e: React.UIEvent) {\n if (faderRef.current) {\n const opacity = clamp(e.currentTarget.scrollTop / 17, [0, 1])\n faderRef.current.style.opacity = String(opacity)\n }\n }\n\n function onTransitionEnd({ propertyName, target }: React.TransitionEvent) {\n // We can only measure height after the `scale` transition ends,\n // otherwise we will measure height as a multiple of the animating value\n // which will give us an incorrect value.\n if (propertyName === 'scale' && target === dialogRef.current) {\n setAnimating(false)\n }\n }\n\n return (\n \n \n \n \n }\n >\n \n \n \n \n \n \n {error.environmentName && (\n \n )}\n \n \n \n \n \n\n {children}\n \n \n\n \n \n \n \n \n )\n}\n\nfunction clamp(value: number, [min, max]: [number, number]) {\n return Math.min(Math.max(value, min), max)\n}\n\nexport const styles = `\n ${OVERLAY_STYLES}\n ${DIALOG_STYLES}\n ${DIALOG_HEADER_STYLES}\n ${DIALOG_BODY_STYLES}\n\n ${floatingHeaderStyles}\n ${errorTypeLabelStyles}\n ${errorMessageStyles}\n ${toolbarStyles}\n\n [data-nextjs-error-label-group] {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n`\n","import { css } from '../../utils/css'\n\nconst styles = css`\n [data-nextjs-dialog-overlay] {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n /* secondary z-index, -1 than toast z-index */\n z-index: 2147483646;\n\n display: flex;\n align-content: center;\n align-items: center;\n flex-direction: column;\n padding: 10vh 15px 0;\n /* color schemes we handle. Every other scheme the UA would need to overwrite */\n color-scheme: dark light;\n }\n\n @media (max-height: 812px) {\n [data-nextjs-dialog-overlay] {\n padding: 15px 15px 0;\n }\n }\n\n [data-nextjs-dialog-backdrop] {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: var(--color-backdrop);\n backdrop-filter: blur(10px);\n pointer-events: all;\n z-index: -1;\n }\n\n [data-nextjs-dialog-backdrop-fixed] {\n cursor: not-allowed;\n -webkit-backdrop-filter: blur(8px);\n backdrop-filter: blur(8px);\n }\n`\n\nexport { styles }\n","import { useOpenInEditor } from '../../utils/use-open-in-editor'\n\ntype EditorLinkProps = {\n file: string\n isSourceFile: boolean\n location?: {\n line: number\n column: number\n }\n}\nexport function EditorLink({ file, location }: EditorLinkProps) {\n const open = useOpenInEditor({\n file,\n line1: location?.line ?? 1,\n column1: location?.column ?? 1,\n })\n\n return (\n \n {file}\n {location ? `:${location.line}:${location.column}` : null}\n \n \n \n \n \n \n )\n}\n\nexport const EDITOR_LINK_STYLES = `\n [data-with-open-in-editor-link] svg {\n width: auto;\n height: var(--size-14);\n margin-left: 8px;\n }\n [data-with-open-in-editor-link] {\n cursor: pointer;\n }\n [data-with-open-in-editor-link]:hover {\n text-decoration: underline dotted;\n }\n [data-with-open-in-editor-link-import-trace] {\n margin-left: 16px;\n }\n`\n","import Anser from 'next/dist/compiled/anser'\nimport * as React from 'react'\nimport { HotlinkedText } from '../hot-linked-text'\nimport { EditorLink } from './editor-link'\nimport { ExternalIcon } from '../../icons/external'\nimport { getStackFrameFile, type StackFrame } from '../../../shared/stack-frame'\nimport { useOpenInEditor } from '../../utils/use-open-in-editor'\nimport { FileIcon } from '../../icons/file'\n\ntype TerminalProps = { content: string }\n\nfunction getFile(lines: string[]) {\n const contentFileName = lines.shift()\n if (!contentFileName) return null\n const [fileName, line, column] = contentFileName.split(':', 3)\n\n const parsedLine = Number(line)\n const parsedColumn = Number(column)\n const hasLocation = !Number.isNaN(parsedLine) && !Number.isNaN(parsedColumn)\n\n return {\n fileName: hasLocation ? fileName : contentFileName,\n location: hasLocation\n ? {\n line1: parsedLine,\n column1: parsedColumn,\n }\n : undefined,\n }\n}\n\nfunction getImportTraceFiles(lines: string[]) {\n if (\n lines.some((line) => /ReactServerComponentsError:/.test(line)) ||\n lines.some((line) => /Import trace for requested module:/.test(line))\n ) {\n // Grab the lines at the end containing the files\n const files = []\n while (\n /.+\\..+/.test(lines[lines.length - 1]) &&\n !lines[lines.length - 1].includes(':')\n ) {\n const file = lines.pop()!.trim()\n files.unshift(file)\n }\n\n return files\n }\n\n return []\n}\n\nfunction getEditorLinks(content: string) {\n const lines = content.split('\\n')\n const file = getFile(lines)\n const importTraceFiles = getImportTraceFiles(lines)\n\n return { file, source: lines.join('\\n'), importTraceFiles }\n}\n\nexport const Terminal: React.FC = function Terminal({\n content,\n}) {\n const { file, source, importTraceFiles } = React.useMemo(\n () => getEditorLinks(content),\n [content]\n )\n\n const decoded = React.useMemo(() => {\n return Anser.ansiToJson(source, {\n json: true,\n use_classes: true,\n remove_empty: true,\n })\n }, [source])\n\n const open = useOpenInEditor({\n file: file?.fileName,\n line1: file?.location?.line1 ?? 1,\n column1: file?.location?.column1 ?? 1,\n })\n\n const stackFrame: StackFrame = {\n file: file?.fileName ?? null,\n methodName: '',\n arguments: [],\n line1: file?.location?.line1 ?? null,\n column1: file?.location?.column1 ?? null,\n }\n\n const fileExtension = stackFrame?.file?.split('.').pop()\n\n return (\n
\n
\n
\n \n \n \n \n {/* TODO: Unlike the CodeFrame component, the `methodName` is unavailable. */}\n {getStackFrameFile(stackFrame)}\n \n \n \n \n \n \n
\n
\n
\n        
\n {decoded.map((entry, index) => (\n \n \n \n ))}\n {importTraceFiles.map((importTraceFile) => (\n \n ))}\n
\n
\n
\n )\n}\n\nexport const TERMINAL_STYLES = `\n [data-nextjs-terminal]::selection,\n [data-nextjs-terminal] *::selection {\n background-color: var(--color-ansi-selection);\n }\n\n [data-nextjs-terminal] * {\n color: inherit;\n background-color: transparent;\n font-family: var(--font-stack-monospace);\n }\n\n [data-nextjs-terminal] > div > p {\n display: flex;\n align-items: center;\n justify-content: space-between;\n cursor: pointer;\n margin: 0;\n }\n [data-nextjs-terminal] > div > p:hover {\n text-decoration: underline dotted;\n }\n [data-nextjs-terminal] div > pre {\n overflow: hidden;\n display: inline-block;\n }\n`\n","import React, { useCallback, useMemo } from 'react'\nimport stripAnsi from 'next/dist/compiled/strip-ansi'\nimport { Terminal } from '../components/terminal'\nimport { ErrorOverlayLayout } from '../components/errors/error-overlay-layout/error-overlay-layout'\nimport type { ErrorBaseProps } from '../components/errors/error-overlay/error-overlay'\n\ninterface BuildErrorProps extends ErrorBaseProps {\n message: string\n}\n\nconst getErrorTextFromBuildErrorMessage = (multiLineMessage: string) => {\n const lines = multiLineMessage.split('\\n')\n // The multi-line build error message looks like:\n // ::\n // \n // \n // e.g.\n // ./path/to/file.js:1:1\n // SyntaxError: ...\n // > 1 | con st foo =\n // ...\n return (\n stripAnsi(lines[1] || '')\n // label will already say that it's an error\n .replace(/^Error: /, '')\n )\n}\n\nexport const BuildError: React.FC = function BuildError({\n message,\n ...props\n}) {\n const noop = useCallback(() => {}, [])\n const error = new Error(message)\n const formattedMessage = useMemo(\n () => getErrorTextFromBuildErrorMessage(message) || 'Failed to compile',\n [message]\n )\n\n const generateErrorInfo = useCallback(async () => {\n const parts: string[] = []\n\n // 1. Error Type\n parts.push(`## Error Type\\nBuild Error`)\n\n // 2. Error Message\n if (formattedMessage) {\n parts.push(`## Error Message\\n${formattedMessage}`)\n }\n\n // 3. Build Output (decoded stderr)\n if (message) {\n const decodedOutput = stripAnsi(message)\n parts.push(`## Build Output\\n${decodedOutput}`)\n }\n\n // Format as AI prompt\n const errorInfo = `${parts.join('\\n\\n')}\n\nNext.js version: ${props.versionInfo.installed} (${process.env.__NEXT_BUNDLER})\\n`\n\n return errorInfo\n }, [message, formattedMessage, props.versionInfo])\n\n return (\n \n \n \n )\n}\n\nexport const styles = ``\n","import type { OriginalStackFrame } from '../../../shared/stack-frame'\n\nimport { HotlinkedText } from '../hot-linked-text'\nimport { ExternalIcon, SourceMappingErrorIcon } from '../../icons/external'\nimport { getStackFrameFile } from '../../../shared/stack-frame'\nimport { useOpenInEditor } from '../../utils/use-open-in-editor'\n\nexport const CallStackFrame: React.FC<{\n frame: OriginalStackFrame\n}> = function CallStackFrame({ frame }) {\n // TODO: ability to expand resolved frames\n\n const f = frame.originalStackFrame ?? frame.sourceStackFrame\n const hasOriginalCodeFrame = Boolean(frame.originalCodeFrame)\n const open = useOpenInEditor(\n hasOriginalCodeFrame\n ? {\n file: f.file,\n line1: f.line1 ?? 1,\n column1: f.column1 ?? 1,\n }\n : undefined\n )\n\n // Formatted file source could be empty. e.g. will be formatted to empty string,\n // we'll skip rendering the frame in this case.\n const stackFrameFile = getStackFrameFile(f)\n\n if (!stackFrameFile) {\n return null\n }\n\n return (\n \n
\n \n {hasOriginalCodeFrame && (\n \n \n \n )}\n {frame.error ? (\n console.error(frame.reason)}\n title=\"Sourcemapping failed. Click to log cause of error.\"\n >\n \n \n ) : null}\n
\n \n {stackFrameFile}\n \n \n )\n}\n\nexport const CALL_STACK_FRAME_STYLES = `\n [data-nextjs-call-stack-frame-no-source] {\n padding: 6px 8px;\n margin-bottom: 4px;\n\n border-radius: var(--rounded-lg);\n }\n\n [data-nextjs-call-stack-frame-no-source]:last-child {\n margin-bottom: 0;\n }\n\n [data-nextjs-call-stack-frame-ignored=\"true\"] {\n opacity: 0.6;\n }\n\n [data-nextjs-call-stack-frame] {\n user-select: text;\n display: block;\n box-sizing: border-box;\n\n user-select: text;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n\n padding: 6px 8px;\n\n border-radius: var(--rounded-lg);\n }\n\n .call-stack-frame-method-name {\n display: flex;\n align-items: center;\n gap: 4px;\n\n margin-bottom: 4px;\n font-family: var(--font-stack-monospace);\n\n color: var(--color-gray-1000);\n font-size: var(--size-14);\n font-weight: 500;\n line-height: var(--size-20);\n\n svg {\n width: var(--size-16px);\n height: var(--size-16px);\n }\n }\n\n .open-in-editor-button, .source-mapping-error-button {\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--rounded-full);\n padding: 4px;\n color: var(--color-font);\n\n svg {\n width: var(--size-16);\n height: var(--size-16);\n }\n\n &:focus-visible {\n outline: var(--focus-ring);\n outline-offset: -2px;\n }\n\n &:hover {\n background: var(--color-gray-100);\n }\n }\n\n .call-stack-frame-file {\n color: var(--color-gray-900);\n font-size: var(--size-14);\n line-height: var(--size-20);\n word-wrap: break-word;\n }\n`\n","export function ChevronUpDownIcon() {\n return (\n \n \n \n )\n}\n","import type { OriginalStackFrame } from '../../../shared/stack-frame'\n\nimport { CallStackFrame } from '../call-stack-frame/call-stack-frame'\nimport { ChevronUpDownIcon } from '../../icons/chevron-up-down'\nimport { css } from '../../utils/css'\n\nexport function CallStack({\n frames,\n isIgnoreListOpen,\n ignoredFramesTally,\n onToggleIgnoreList,\n}: {\n frames: readonly OriginalStackFrame[]\n isIgnoreListOpen: boolean\n ignoredFramesTally: number\n onToggleIgnoreList: () => void\n}) {\n return (\n
\n
\n

\n Call Stack {frames.length}\n

\n {ignoredFramesTally > 0 && (\n \n {`${isIgnoreListOpen ? 'Hide' : 'Show'} ${ignoredFramesTally} ignore-listed frame(s)`}\n \n \n )}\n
\n {frames.map((frame, frameIndex) => {\n return !frame.ignored || isIgnoreListOpen ? (\n \n ) : null\n })}\n
\n )\n}\n\nexport const CALL_STACK_STYLES = css`\n [data-nextjs-call-stack-container] {\n position: relative;\n margin-top: 8px;\n }\n\n [data-nextjs-call-stack-header] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n min-height: var(--size-28);\n padding: 8px 8px 12px 4px;\n width: 100%;\n }\n\n [data-nextjs-call-stack-title] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 8px;\n\n margin: 0;\n\n color: var(--color-gray-1000);\n font-size: var(--size-16);\n font-weight: 500;\n }\n\n [data-nextjs-call-stack-count] {\n display: flex;\n justify-content: center;\n align-items: center;\n\n width: var(--size-20);\n height: var(--size-20);\n gap: 4px;\n\n color: var(--color-gray-1000);\n text-align: center;\n font-size: var(--size-11);\n font-weight: 500;\n line-height: var(--size-16);\n\n border-radius: var(--rounded-full);\n background: var(--color-gray-300);\n }\n\n [data-nextjs-call-stack-ignored-list-toggle-button] {\n all: unset;\n display: flex;\n align-items: center;\n gap: 6px;\n color: var(--color-gray-900);\n font-size: var(--size-14);\n line-height: var(--size-20);\n border-radius: 6px;\n padding: 4px 6px;\n margin-right: -6px;\n transition: background 150ms ease;\n\n &:hover {\n background: var(--color-gray-100);\n }\n\n &:focus {\n outline: var(--focus-ring);\n }\n\n svg {\n width: var(--size-16);\n height: var(--size-16);\n }\n }\n`\n","import type { OriginalStackFrame } from '../../../../shared/stack-frame'\nimport { useMemo, useState, useRef } from 'react'\nimport { CallStack } from '../../call-stack/call-stack'\n\ninterface CallStackProps {\n frames: readonly OriginalStackFrame[]\n dialogResizerRef: React.RefObject\n}\n\nexport function ErrorOverlayCallStack({\n frames,\n dialogResizerRef,\n}: CallStackProps) {\n const initialDialogHeight = useRef(NaN)\n const [isIgnoreListOpen, setIsIgnoreListOpen] = useState(false)\n\n const ignoredFramesTally = useMemo(() => {\n return frames.reduce((tally, frame) => tally + (frame.ignored ? 1 : 0), 0)\n }, [frames])\n\n function onToggleIgnoreList() {\n const dialog = dialogResizerRef?.current\n\n if (isIgnoreListOpen) {\n // Closing requires dialog for animation\n if (!dialog) {\n // No dialog ref available, just close without animation\n setIsIgnoreListOpen(false)\n return\n }\n\n const { height: currentHeight } = dialog.getBoundingClientRect()\n\n if (!initialDialogHeight.current) {\n initialDialogHeight.current = currentHeight\n }\n\n function onTransitionEnd() {\n // TS bug. We closed over a non-nullable value here.\n dialog!.removeEventListener('transitionend', onTransitionEnd)\n setIsIgnoreListOpen(false)\n }\n // eslint-disable-next-line react-hooks/immutability -- Bug in react-hooks/react-compiler\n dialog.style.height = `${initialDialogHeight.current}px`\n dialog.addEventListener('transitionend', onTransitionEnd)\n } else {\n if (dialog) {\n const { height: currentHeight } = dialog.getBoundingClientRect()\n // When the ignore list is closed, we need to store the initial height of the dialog,\n // we need this value to restore the dialog to its original height when the ignore list is opened again.\n if (!initialDialogHeight.current) {\n initialDialogHeight.current = currentHeight\n }\n }\n setIsIgnoreListOpen(true)\n }\n }\n\n return (\n \n )\n}\n","export function CollapseIcon({ collapsed }: { collapsed?: boolean } = {}) {\n return (\n \n \n \n )\n}\n","import { useMemo, useState } from 'react'\nimport { CollapseIcon } from '../../icons/collapse-icon'\n/**\n *\n * Format component stack into pseudo HTML\n * component stack is an array of strings, e.g.: ['p', 'p', 'Page', ...]\n *\n * For html tags mismatch, it will render it for the code block\n *\n * ```\n *
\n *  {`\n *    \n *       

\n *

\n * `}\n *

\n * ```\n *\n * For text mismatch, it will render it for the code block\n *\n * ```\n *
\n * {`\n *   \n *     

\n * \"Server Text\" (green)\n * \"Client Text\" (red)\n *

\n *
\n * `}
\n * ```\n *\n * For bad text under a tag it will render it for the code block,\n * e.g. \"Mismatched Text\" under

\n *\n * ```\n *

\n * {`\n *   \n *     
\n *

\n * \"Mismatched Text\" (red)\n *

\n *
\n *
\n * `}
\n * ```\n *\n */\nexport function PseudoHtmlDiff({\n reactOutputComponentDiff,\n}: {\n reactOutputComponentDiff: string\n}) {\n const [isDiffCollapsed, toggleCollapseHtml] = useState(true)\n\n const htmlComponents = useMemo(() => {\n const componentStacks: React.ReactNode[] = []\n const reactComponentDiffLines = reactOutputComponentDiff.split('\\n')\n reactComponentDiffLines.forEach((line, index) => {\n const isDiffLine = line[0] === '+' || line[0] === '-'\n const isHighlightedLine = line[0] === '>'\n const hasSign = isDiffLine || isHighlightedLine\n const sign = hasSign ? line[0] : ''\n const signIndex = hasSign ? line.indexOf(sign) : -1\n const [prefix, suffix] = hasSign\n ? [line.slice(0, signIndex), line.slice(signIndex + 1)]\n : [line, '']\n\n if (isDiffLine) {\n componentStacks.push(\n \n \n {/* Slice 2 spaces for the icon */}\n {prefix}\n \n {sign}\n \n {suffix}\n {'\\n'}\n \n \n )\n } else {\n // In general, if it's not collapsed, show the whole diff\n componentStacks.push(\n \n {prefix}\n \n {sign}\n \n {suffix}\n {'\\n'}\n \n )\n }\n })\n return componentStacks\n }, [reactOutputComponentDiff])\n\n return (\n \n
\n toggleCollapseHtml(!isDiffCollapsed)}\n >\n \n \n
\n \n + Client\n \n \n - Server\n \n
\n
\n
\n        {htmlComponents}\n      
\n \n )\n}\n","export { PseudoHtmlDiff } from '../../components/hydration-diff/diff-view'\n\nexport const PSEUDO_HTML_DIFF_STYLES = `\n [data-nextjs-container-errors-pseudo-html] {\n padding: 8px 0;\n margin: 8px 0;\n border: 1px solid var(--color-gray-400);\n background: var(--color-background-200);\n color: var(--color-syntax-constant);\n font-family: var(--font-stack-monospace);\n font-size: var(--size-12);\n line-height: 1.33em; /* 16px in 12px font size */\n border-radius: var(--rounded-md-2);\n }\n [data-nextjs-container-errors-pseudo-html-line] {\n display: inline-block;\n width: 100%;\n padding-left: 40px;\n line-height: calc(5 / 3);\n }\n [data-nextjs-container-errors-pseudo-html--diff='error'] {\n background: var(--color-amber-100);\n box-shadow: 2px 0 0 0 var(--color-amber-900) inset;\n font-weight: bold;\n }\n [data-nextjs-container-errors-pseudo-html-collapse-button] {\n all: unset;\n margin-left: 12px;\n &:focus {\n outline: none;\n }\n }\n [data-nextjs-container-errors-pseudo-html--diff='add'] {\n background: var(--color-green-300);\n }\n [data-nextjs-container-errors-pseudo-html-line-sign] {\n margin-left: calc(24px * -1);\n margin-right: 24px;\n }\n [data-nextjs-container-errors-pseudo-html--diff='add']\n [data-nextjs-container-errors-pseudo-html-line-sign] {\n color: var(--color-green-900);\n }\n [data-nextjs-container-errors-pseudo-html--diff='remove'] {\n background: var(--color-red-300);\n }\n [data-nextjs-container-errors-pseudo-html--diff='remove']\n [data-nextjs-container-errors-pseudo-html-line-sign] {\n color: var(--color-red-900);\n margin-left: calc(24px * -1);\n margin-right: 24px;\n }\n [data-nextjs-container-errors-pseudo-html--diff='error']\n [data-nextjs-container-errors-pseudo-html-line-sign] {\n color: var(--color-amber-900);\n }\n ${/* hide but text are still accessible in DOM */ ''}\n [data-nextjs-container-errors-pseudo-html--hint] {\n display: inline-block;\n font-size: 0;\n height: 0;\n }\n [data-nextjs-container-errors-pseudo-html--tag-adjacent='false'] {\n color: var(--color-accents-1);\n }\n .nextjs__container_errors__component-stack {\n margin: 0;\n }\n [data-nextjs-container-errors-pseudo-html-collapse='true']\n .nextjs__container_errors__component-stack\n code {\n max-height: 120px;\n mask-image: linear-gradient(to bottom,rgba(0,0,0,0) 0%,black 10%);\n padding-bottom: 40px;\n }\n .nextjs__container_errors__component-stack code {\n display: block;\n width: 100%;\n white-space: pre-wrap;\n scroll-snap-type: y mandatory;\n overflow-y: hidden;\n }\n [data-nextjs-container-errors-pseudo-html--diff] {\n scroll-snap-align: center;\n }\n .error-overlay-hydration-error-diff-plus-icon {\n color: var(--color-green-900);\n }\n .error-overlay-hydration-error-diff-minus-icon {\n color: var(--color-red-900);\n }\n [data-nextjs-hydration-diff-header] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 12px 0 0;\n }\n [data-nextjs-hydration-diff-badge] {\n display: flex;\n gap: 8px;\n font-size: var(--size-12);\n }\n [data-nextjs-hydration-diff-badge-item] {\n display: flex;\n align-items: center;\n gap: 4px;\n color: var(--color-gray-900);\n }\n [data-nextjs-hydration-diff-badge-item='client'] span:first-child {\n color: var(--color-green-900);\n font-weight: bold;\n }\n [data-nextjs-hydration-diff-badge-item='server'] span:first-child {\n color: var(--color-red-900);\n font-weight: bold;\n }\n`\n","import { useMemo } from 'react'\nimport React from 'react'\nimport { CodeFrame } from '../../components/code-frame/code-frame'\nimport { ErrorOverlayCallStack } from '../../components/errors/error-overlay-call-stack/error-overlay-call-stack'\nimport type { ReadyErrorCause } from '../../utils/get-error-by-type'\n\ntype ErrorCauseProps = {\n cause: ReadyErrorCause\n dialogResizerRef: React.RefObject\n}\n\nexport function ErrorCause({ cause, dialogResizerRef }: ErrorCauseProps) {\n const frames = React.use(cause.frames())\n const trimmedMessage = cause.error.message.trim()\n\n const firstFrame = useMemo(() => {\n const index = frames.findIndex(\n (entry) =>\n !entry.ignored &&\n Boolean(entry.originalCodeFrame) &&\n Boolean(entry.originalStackFrame)\n )\n return frames[index] ?? null\n }, [frames])\n\n return (\n
\n
\n \n Caused by: {cause.error.name || 'Error'}\n \n
\n {trimmedMessage ? (\n

{trimmedMessage}

\n ) : null}\n\n {firstFrame && (\n \n )}\n\n {frames.length > 0 && (\n \n )}\n\n {cause.cause && (\n \n )}\n
\n )\n}\n\nexport const styles = `\n [data-nextjs-error-cause] {\n border-top: 1px solid var(--color-gray-400);\n margin-top: 16px;\n padding-top: 16px;\n }\n\n .error-cause-header {\n display: flex;\n align-items: center;\n margin-bottom: 8px;\n }\n\n .error-cause-label {\n padding: 2px 6px;\n margin: 0;\n border-radius: var(--rounded-md-2);\n background: var(--color-red-100);\n font-weight: 600;\n font-size: var(--size-12);\n color: var(--color-red-900);\n font-family: var(--font-stack-monospace);\n line-height: var(--size-20);\n }\n\n .error-cause-message {\n margin: 0;\n margin-left: 4px;\n color: var(--color-red-900);\n font-weight: 500;\n font-size: var(--size-16);\n letter-spacing: -0.32px;\n line-height: var(--size-24);\n overflow-wrap: break-word;\n white-space: pre-wrap;\n }\n`\n","const symbolError = Symbol.for('NextjsError')\n\nexport function getErrorSource(error: Error): 'server' | 'edge-server' | null {\n return (error as any)[symbolError] || null\n}\n\nexport type ErrorSourceType = 'edge-server' | 'server'\n\nexport function decorateServerError(error: Error, type: ErrorSourceType) {\n Object.defineProperty(error, symbolError, {\n writable: false,\n enumerable: false,\n configurable: false,\n value: type,\n })\n}\n","import type { SupportedErrorEvent } from '../container/runtime-error/render-error'\nimport { getOriginalStackFrames } from '../../shared/stack-frame'\nimport type { OriginalStackFrame } from '../../shared/stack-frame'\nimport { getErrorSource } from '../../../shared/lib/error-source'\nimport { parseStack } from '../../../server/lib/parse-stack'\nimport React from 'react'\n\nexport type ReadyErrorCause = {\n error: Error\n frames: () => Promise\n cause?: ReadyErrorCause\n}\n\nexport type ReadyRuntimeError = {\n id: number\n runtime: true\n error: Error & { environmentName?: string }\n frames: () => Promise\n type: 'runtime' | 'console' | 'recoverable'\n cause?: ReadyErrorCause\n}\n\nexport const useFrames = (\n error: ReadyRuntimeError | null\n): readonly OriginalStackFrame[] => {\n if (!error) return []\n\n const frames = error.frames\n return React.use(frames())\n}\n\nexport function getErrorByType(\n event: SupportedErrorEvent,\n isAppDir: boolean\n): ReadyRuntimeError {\n const readyRuntimeError: ReadyRuntimeError = {\n id: event.id,\n runtime: true,\n error: event.error,\n type: event.type,\n // createMemoizedPromise dedups calls to getOriginalStackFrames\n frames: createMemoizedPromise(async () => {\n return await getOriginalStackFrames(\n event.frames,\n getErrorSource(event.error),\n isAppDir\n )\n }),\n cause: getCauseChain(event.error, isAppDir),\n }\n return readyRuntimeError\n}\n\nfunction getCauseChain(\n error: Error,\n isAppDir: boolean,\n depth: number = 0\n): ReadyErrorCause | undefined {\n if (depth >= 5) return undefined\n const cause = error.cause\n if (!(cause instanceof Error)) return undefined\n\n const frames = parseStack(cause.stack || '')\n return {\n error: cause,\n frames: createMemoizedPromise(async () => {\n return await getOriginalStackFrames(\n frames,\n getErrorSource(cause),\n isAppDir\n )\n }),\n cause: getCauseChain(cause, isAppDir, depth + 1),\n }\n}\n\nfunction createMemoizedPromise(\n promiseFactory: () => Promise\n): () => Promise {\n const cachedPromise = promiseFactory()\n return function (): Promise {\n return cachedPromise\n }\n}\n","import { useMemo } from 'react'\nimport { CodeFrame } from '../../components/code-frame/code-frame'\nimport { ErrorOverlayCallStack } from '../../components/errors/error-overlay-call-stack/error-overlay-call-stack'\nimport { PSEUDO_HTML_DIFF_STYLES } from './component-stack-pseudo-html'\nimport { ErrorCause, styles as errorCauseStyles } from './error-cause'\nimport {\n useFrames,\n type ReadyRuntimeError,\n} from '../../utils/get-error-by-type'\n\ntype RuntimeErrorProps = {\n error: ReadyRuntimeError\n dialogResizerRef: React.RefObject\n}\n\nexport function RuntimeError({ error, dialogResizerRef }: RuntimeErrorProps) {\n const frames = useFrames(error)\n\n const firstFrame = useMemo(() => {\n const firstFirstPartyFrameIndex = frames.findIndex(\n (entry) =>\n !entry.ignored &&\n Boolean(entry.originalCodeFrame) &&\n Boolean(entry.originalStackFrame)\n )\n\n return frames[firstFirstPartyFrameIndex] ?? null\n }, [frames])\n\n return (\n <>\n {firstFrame && (\n \n )}\n\n {frames.length > 0 && (\n \n )}\n\n {error.cause && (\n \n )}\n \n )\n}\n\nexport const styles = `\n ${PSEUDO_HTML_DIFF_STYLES}\n ${errorCauseStyles}\n`\n","import React, { useMemo, useRef, Suspense, useCallback } from 'react'\nimport type { DebugInfo } from '../../shared/types'\nimport { Overlay, OverlayBackdrop } from '../components/overlay'\nimport { RuntimeError } from './runtime-error'\nimport { getErrorSource } from '../../../shared/lib/error-source'\nimport { HotlinkedText } from '../components/hot-linked-text'\nimport { PseudoHtmlDiff } from './runtime-error/component-stack-pseudo-html'\nimport {\n ErrorOverlayLayout,\n type ErrorOverlayLayoutProps,\n} from '../components/errors/error-overlay-layout/error-overlay-layout'\nimport {\n getHydrationErrorStackInfo,\n isHydrationError,\n NEXTJS_HYDRATION_ERROR_LINK,\n} from '../../shared/react-19-hydration-error'\nimport type { ReadyRuntimeError } from '../utils/get-error-by-type'\nimport type { ErrorBaseProps } from '../components/errors/error-overlay/error-overlay'\nimport type { HydrationErrorState } from '../../shared/hydration-error'\nimport { useActiveRuntimeError } from '../hooks/use-active-runtime-error'\nimport { formatCodeFrame } from '../components/code-frame/parse-code-frame'\nimport stripAnsi from 'next/dist/compiled/strip-ansi'\n\ninterface ErrorsProps extends ErrorBaseProps {\n getSquashedHydrationErrorDetails: (error: Error) => HydrationErrorState | null\n runtimeErrors: ReadyRuntimeError[]\n debugInfo: DebugInfo\n onClose: () => void\n}\n\nfunction matchLinkType(text: string): string | null {\n if (text.startsWith('https://nextjs.org')) {\n return 'nextjs-link'\n }\n if (text.startsWith('https://') || text.startsWith('http://')) {\n return 'external-link'\n }\n return null\n}\n\nfunction HydrationErrorDescription({ message }: { message: string }) {\n return \n}\n\nfunction GenericErrorDescription({ error }: { error: Error }) {\n const environmentName =\n 'environmentName' in error ? error.environmentName : ''\n const envPrefix = environmentName ? `[ ${environmentName} ] ` : ''\n\n // The environment name will be displayed as a label, so remove it\n // from the message (e.g. \"[ Server ] hello world\" -> \"hello world\").\n let message = error.message\n if (message.startsWith(envPrefix)) {\n message = message.slice(envPrefix.length)\n }\n\n message = message.trim()\n if (!message) {\n return null\n }\n\n return (\n <>\n \n \n )\n}\n\nfunction DynamicMetadataErrorDescription({\n variant,\n}: {\n variant: 'navigation' | 'runtime'\n}) {\n if (variant === 'navigation') {\n return (\n
\n

\n Data that blocks navigation was accessed inside{' '}\n generateMetadata() in an otherwise prerenderable page\n

\n

\n When Document metadata is the only part of a page that cannot be\n prerendered Next.js expects you to either make it prerenderable or\n make some other part of the page non-prerenderable to avoid\n unintentional partially dynamic pages. Uncached data such as{' '}\n fetch(...), cached data with a low expire time, or{' '}\n connection() are all examples of data that only resolve\n on navigation.\n

\n

To fix this:

\n

\n \n Move the asynchronous await into a Cache Component (\n \"use cache\")\n \n . This allows Next.js to statically prerender{' '}\n generateMetadata() as part of the HTML document, so it's\n instantly visible to the user.\n

\n

\n or\n

\n

\n \n add connection() inside a {''}\n {' '}\n somewhere in a Page or Layout. This tells Next.js that the page is\n intended to have some non-prerenderable parts.\n

\n

\n Learn more:{' '}\n \n https://nextjs.org/docs/messages/next-prerender-dynamic-metadata\n \n

\n
\n )\n } else {\n return (\n
\n

\n Runtime data was accessed inside generateMetadata() or\n file-based metadata\n

\n

\n When Document metadata is the only part of a page that cannot be\n prerendered Next.js expects you to either make it prerenderable or\n make some other part of the page non-prerenderable to avoid\n unintentional partially dynamic pages.\n

\n

To fix this:

\n

\n \n Remove the Runtime data access from generateMetadata()\n \n . This allows Next.js to statically prerender{' '}\n generateMetadata() as part of the HTML document, so it's\n instantly visible to the user.\n

\n

\n or\n

\n

\n \n add connection() inside a {''}\n {' '}\n somewhere in a Page or Layout. This tells Next.js that the page is\n intended to have some non-prerenderable parts.\n

\n

\n Note that if you are using file-based metadata, such as icons, inside\n a route with dynamic params then the only recourse is to make some\n other part of the page non-prerenderable.\n

\n

\n Learn more:{' '}\n \n https://nextjs.org/docs/messages/next-prerender-dynamic-metadata\n \n

\n
\n )\n }\n}\n\nfunction BlockingPageLoadErrorDescription({\n variant,\n refinement,\n}: {\n variant: 'navigation' | 'runtime'\n refinement: '' | 'generateViewport' | 'generateMetadata'\n}) {\n if (refinement === 'generateViewport') {\n if (variant === 'navigation') {\n return (\n
\n

\n Data that blocks navigation was accessed inside{' '}\n generateViewport()\n

\n

\n Viewport metadata needs to be available on page load so accessing\n data that waits for a user navigation while producing it prevents\n Next.js from prerendering an initial UI. Uncached data such as{' '}\n fetch(...), cached data with a low expire time, or{' '}\n connection() are all examples of data that only resolve\n on navigation.\n

\n

To fix this:

\n

\n \n Move the asynchronous await into a Cache Component (\n \"use cache\")\n \n . This allows Next.js to statically prerender{' '}\n generateViewport() as part of the HTML document, so\n it's instantly visible to the user.\n

\n

\n or\n

\n

\n \n Put a {''} around your document{' '}\n {''}.\n \n This indicate to Next.js that you are opting into allowing blocking\n navigations for any page.\n

\n

\n Learn more:{' '}\n \n https://nextjs.org/docs/messages/next-prerender-dynamic-viewport\n \n

\n
\n )\n } else {\n return (\n
\n

\n Runtime data was accessed inside generateViewport()\n

\n

\n Viewport metadata needs to be available on page load so accessing\n data that comes from a user Request while producing it prevents\n Next.js from prerendering an initial UI.\n cookies(), headers(), and{' '}\n searchParams, are examples of Runtime data that can\n only come from a user request.\n

\n

To fix this:

\n

\n Remove the Runtime data requirement from{' '}\n generateViewport. This allows Next.js to statically\n prerender generateViewport() as part of the HTML\n document, so it's instantly visible to the user.\n

\n

\n or\n

\n

\n \n Put a {''} around your document{' '}\n {''}.\n \n This indicate to Next.js that you are opting into allowing blocking\n navigations for any page.\n

\n

\n params are usually considered Runtime data but if all\n params are provided a value using generateStaticParams{' '}\n they can be statically prerendered.\n

\n

\n Learn more:{' '}\n \n https://nextjs.org/docs/messages/next-prerender-dynamic-viewport\n \n

\n
\n )\n }\n } else if (refinement === 'generateMetadata') {\n if (variant === 'navigation') {\n return (\n
\n

\n Data that blocks navigation was accessed inside{' '}\n generateMetadata() in an otherwise prerenderable page\n

\n

\n When Document metadata is the only part of a page that cannot be\n prerendered Next.js expects you to either make it prerenderable or\n make some other part of the page non-prerenderable to avoid\n unintentional partially dynamic pages. Uncached data such as{' '}\n fetch(...), cached data with a low expire time, or{' '}\n connection() are all examples of data that only resolve\n on navigation.\n

\n

To fix this:

\n

\n \n Move the asynchronous await into a Cache Component (\n \"use cache\")\n \n . This allows Next.js to statically prerender{' '}\n generateMetadata() as part of the HTML document, so\n it's instantly visible to the user.\n

\n

\n or\n

\n

\n \n add connection() inside a {''}\n {' '}\n somewhere in a Page or Layout. This tells Next.js that the page is\n intended to have some non-prerenderable parts.\n

\n

\n Learn more:{' '}\n \n https://nextjs.org/docs/messages/next-prerender-dynamic-metadata\n \n

\n
\n )\n } else {\n return (\n
\n

\n Runtime data was accessed inside generateMetadata() or\n file-based metadata\n

\n

\n When Document metadata is the only part of a page that cannot be\n prerendered Next.js expects you to either make it prerenderable or\n make some other part of the page non-prerenderable to avoid\n unintentional partially dynamic pages.\n

\n

To fix this:

\n

\n \n Remove the Runtime data access from{' '}\n generateMetadata()\n \n . This allows Next.js to statically prerender{' '}\n generateMetadata() as part of the HTML document, so\n it's instantly visible to the user.\n

\n

\n or\n

\n

\n \n add connection() inside a {''}\n {' '}\n somewhere in a Page or Layout. This tells Next.js that the page is\n intended to have some non-prerenderable parts.\n

\n

\n Note that if you are using file-based metadata, such as icons,\n inside a route with dynamic params then the only recourse is to make\n some other part of the page non-prerenderable.\n

\n

\n Learn more:{' '}\n \n https://nextjs.org/docs/messages/next-prerender-dynamic-metadata\n \n

\n
\n )\n }\n }\n\n if (variant === 'runtime') {\n return (\n
\n

\n Runtime data was accessed outside of {''}\n

\n

\n This delays the entire page from rendering, resulting in a slow user\n experience. Next.js uses this error to ensure your app loads instantly\n on every navigation. cookies(), headers(),\n and searchParams, are examples of Runtime data that can\n only come from a user request.\n

\n

To fix this:

\n

\n Provide a fallback UI using {''} around\n this component.\n

\n

\n or\n

\n

\n \n Move the Runtime data access into a deeper component wrapped in{' '}\n {''}.\n \n

\n

\n In either case this allows Next.js to stream its contents to the user\n when they request the page, while still providing an initial UI that\n is prerendered and prefetchable for instant navigations.\n

\n

\n Learn more:{' '}\n \n https://nextjs.org/docs/messages/blocking-route\n \n

\n
\n )\n } else {\n return (\n
\n

\n Data that blocks navigation was accessed outside of {''}\n

\n

\n This delays the entire page from rendering, resulting in a slow user\n experience. Next.js uses this error to ensure your app loads instantly\n on every navigation. Uncached data such as fetch(...),\n cached data with a low expire time, or connection() are\n all examples of data that only resolve on navigation.\n

\n

To fix this, you can either:

\n

\n Provide a fallback UI using {''} around\n this component. This allows Next.js to stream its contents to the user\n as soon as it's ready, without blocking the rest of the app.\n

\n

\n or\n

\n

\n \n Move the asynchronous await into a Cache Component (\n \"use cache\")\n \n . This allows Next.js to statically prerender the component as part of\n the HTML document, so it's instantly visible to the user.\n

\n

\n Learn more:{' '}\n \n https://nextjs.org/docs/messages/blocking-route\n \n

\n
\n )\n }\n}\n\nexport function getErrorTypeLabel(\n error: Error,\n type: ReadyRuntimeError['type'],\n errorDetails: ErrorDetails\n): ErrorOverlayLayoutProps['errorType'] {\n if (errorDetails.type === 'blocking-route') {\n return `Blocking Route`\n }\n if (errorDetails.type === 'dynamic-metadata') {\n return `Ambiguous Metadata`\n }\n if (type === 'recoverable') {\n return `Recoverable ${error.name}`\n }\n if (type === 'console') {\n return `Console ${error.name}`\n }\n return `Runtime ${error.name}`\n}\n\ntype ErrorDetails =\n | NoErrorDetails\n | HydrationErrorDetails\n | BlockingRouteErrorDetails\n | DynamicMetadataErrorDetails\n\ntype NoErrorDetails = {\n type: 'empty'\n}\n\ntype HydrationErrorDetails = {\n type: 'hydration'\n warning: string | null\n notes: string | null\n reactOutputComponentDiff: string | null\n}\n\ntype BlockingRouteErrorDetails = {\n type: 'blocking-route'\n variant: 'navigation' | 'runtime'\n refinement: '' | 'generateViewport'\n}\n\ntype DynamicMetadataErrorDetails = {\n type: 'dynamic-metadata'\n variant: 'navigation' | 'runtime'\n}\n\nconst noErrorDetails: ErrorDetails = {\n type: 'empty',\n}\n\nexport function useErrorDetails(\n error: Error | undefined,\n getSquashedHydrationErrorDetails: (error: Error) => HydrationErrorState | null\n): ErrorDetails {\n return useMemo(() => {\n if (error === undefined) {\n return noErrorDetails\n }\n\n const hydrationErrorDetails = getHydrationErrorDetails(\n error,\n getSquashedHydrationErrorDetails\n )\n if (hydrationErrorDetails) {\n return hydrationErrorDetails\n }\n\n const blockingRouteErrorDetails = getBlockingRouteErrorDetails(error)\n if (blockingRouteErrorDetails) {\n return blockingRouteErrorDetails\n }\n\n return noErrorDetails\n }, [error, getSquashedHydrationErrorDetails])\n}\n\nfunction getHydrationErrorDetails(\n error: Error,\n getSquashedHydrationErrorDetails: (error: Error) => HydrationErrorState | null\n): null | HydrationErrorDetails {\n const pagesRouterErrorDetails = getSquashedHydrationErrorDetails(error)\n if (pagesRouterErrorDetails !== null) {\n return {\n type: 'hydration',\n warning: pagesRouterErrorDetails.warning ?? null,\n notes: null,\n reactOutputComponentDiff:\n pagesRouterErrorDetails.reactOutputComponentDiff ?? null,\n }\n }\n\n if (!isHydrationError(error)) {\n return null\n }\n\n const { message, notes, diff } = getHydrationErrorStackInfo(error)\n if (message === null) {\n return null\n }\n\n return {\n type: 'hydration',\n warning: message,\n notes,\n reactOutputComponentDiff: diff,\n }\n}\n\nfunction getBlockingRouteErrorDetails(error: Error): null | ErrorDetails {\n const isBlockingPageLoadError = error.message.includes('/blocking-route')\n\n if (isBlockingPageLoadError) {\n const isRuntimeData = error.message.includes('cookies()')\n\n return {\n type: 'blocking-route',\n variant: isRuntimeData ? 'runtime' : 'navigation',\n refinement: '',\n }\n }\n\n const isDynamicMetadataError = error.message.includes(\n '/next-prerender-dynamic-metadata'\n )\n if (isDynamicMetadataError) {\n const isRuntimeData = error.message.includes('cookies()')\n return {\n type: 'dynamic-metadata',\n variant: isRuntimeData ? 'runtime' : 'navigation',\n }\n }\n\n const isBlockingViewportError = error.message.includes(\n '/next-prerender-dynamic-viewport'\n )\n if (isBlockingViewportError) {\n const isRuntimeData = error.message.includes('cookies()')\n return {\n type: 'blocking-route',\n variant: isRuntimeData ? 'runtime' : 'navigation',\n refinement: 'generateViewport',\n }\n }\n\n return null\n}\n\nexport function Errors({\n getSquashedHydrationErrorDetails,\n runtimeErrors,\n debugInfo,\n onClose,\n ...props\n}: ErrorsProps) {\n const dialogResizerRef = useRef(null)\n\n const {\n isLoading,\n errorCode,\n errorType,\n activeIdx,\n errorDetails,\n activeError,\n setActiveIndex,\n } = useActiveRuntimeError({ runtimeErrors, getSquashedHydrationErrorDetails })\n\n const generateErrorInfo = useCallback(async () => {\n if (!activeError) return ''\n\n const parts: string[] = []\n\n // 1. Error Type\n if (errorType) {\n parts.push(`## Error Type\\n${errorType}`)\n }\n\n // 2. Error Message\n const error = activeError.error\n let message = error.message\n if ('environmentName' in error && error.environmentName) {\n const envPrefix = `[ ${error.environmentName} ] `\n if (message.startsWith(envPrefix)) {\n message = message.slice(envPrefix.length)\n }\n }\n if (message) {\n parts.push(`## Error Message\\n${message}`)\n }\n\n const frames = await Promise.race([\n activeError.frames(),\n new Promise((resolve) => setTimeout(() => resolve(null), 2000)),\n ])\n\n // Append call stack\n if (frames === null) {\n parts.push(\n 'Unable to retrieve stack frames for this error. Falling back to unsourcemapped stack\\n\\n' +\n error.stack\n )\n } else {\n if (frames.length > 0) {\n const visibleFrames = frames.filter((frame) => !frame.ignored)\n if (visibleFrames.length > 0) {\n const stackLines = visibleFrames\n .map((frame) => {\n if (frame.originalStackFrame) {\n const { methodName, file, line1, column1 } =\n frame.originalStackFrame\n return ` at ${methodName} (${file}:${line1}:${column1})`\n } else if (frame.sourceStackFrame) {\n const { methodName, file, line1, column1 } =\n frame.sourceStackFrame\n return ` at ${methodName} (${file}:${line1}:${column1})`\n }\n return ''\n })\n .filter(Boolean)\n\n if (stackLines.length > 0) {\n parts.push(`\\n${stackLines.join('\\n')}`)\n }\n }\n }\n\n // 3. Code Frame (decoded)\n const firstFirstPartyFrameIndex = frames.findIndex(\n (entry) =>\n !entry.ignored &&\n Boolean(entry.originalCodeFrame) &&\n Boolean(entry.originalStackFrame)\n )\n\n const firstFrame = frames[firstFirstPartyFrameIndex] ?? null\n if (firstFrame?.originalCodeFrame) {\n const decodedCodeFrame = stripAnsi(\n formatCodeFrame(firstFrame.originalCodeFrame)\n )\n parts.push(`## Code Frame\\n${decodedCodeFrame}`)\n }\n }\n\n // Format as markdown error info\n const errorInfo = `${parts.join('\\n\\n')}\n\nNext.js version: ${props.versionInfo.installed} (${process.env.__NEXT_BUNDLER})\\n`\n\n return errorInfo\n }, [activeError, errorType, props.versionInfo])\n\n if (isLoading) {\n // TODO: better loading state\n return (\n \n \n \n )\n }\n\n if (!activeError) {\n return null\n }\n\n const error = activeError.error\n const isServerError = ['server', 'edge-server'].includes(\n getErrorSource(error) || ''\n )\n\n let errorMessage: React.ReactNode\n let maybeNotes: React.ReactNode = null\n let maybeDiff: React.ReactNode = null\n switch (errorDetails.type) {\n case 'hydration':\n errorMessage = errorDetails.warning ? (\n \n ) : (\n \n )\n maybeNotes = (\n
\n {errorDetails.notes ? (\n <>\n \n {errorDetails.notes}\n

\n \n ) : null}\n {errorDetails.warning ? (\n \n \n

\n ) : null}\n
\n )\n if (errorDetails.reactOutputComponentDiff) {\n maybeDiff = (\n \n )\n }\n break\n case 'blocking-route':\n errorMessage = (\n \n )\n break\n case 'dynamic-metadata':\n errorMessage = (\n \n )\n break\n case 'empty':\n errorMessage = \n break\n default:\n errorDetails satisfies never\n }\n\n return (\n \n {maybeNotes}\n {maybeDiff}\n }>\n \n \n \n )\n}\n\nexport const styles = `\n .nextjs-error-with-static {\n bottom: calc(16px * 4.5);\n }\n p.nextjs__container_errors__link {\n font-size: var(--size-14);\n }\n p.nextjs__container_errors__notes {\n color: var(--color-stack-notes);\n font-size: var(--size-14);\n line-height: 1.5;\n }\n .nextjs-container-errors-body > h2:not(:first-child) {\n margin-top: calc(16px + 8px);\n }\n .nextjs-container-errors-body > h2 {\n color: var(--color-title-color);\n margin-bottom: 8px;\n font-size: var(--size-20);\n }\n .nextjs-toast-errors-parent {\n cursor: pointer;\n transition: transform 0.2s ease;\n }\n .nextjs-toast-errors-parent:hover {\n transform: scale(1.1);\n }\n .nextjs-toast-errors {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n }\n .nextjs-toast-errors > svg {\n margin-right: 8px;\n }\n .nextjs-toast-hide-button {\n margin-left: 24px;\n border: none;\n background: none;\n color: var(--color-ansi-bright-white);\n padding: 0;\n transition: opacity 0.25s ease;\n opacity: 0.7;\n }\n .nextjs-toast-hide-button:hover {\n opacity: 1;\n }\n .nextjs__container_errors__error_title {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 14px;\n }\n .error-overlay-notes-container {\n margin: 8px 2px;\n }\n .error-overlay-notes-container p {\n white-space: pre-wrap;\n }\n .nextjs__blocking_page_load_error_description {\n color: var(--color-stack-notes);\n }\n .nextjs__blocking_page_load_error_description_title {\n color: var(--color-title-color);\n }\n .nextjs__blocking_page_load_error_fix_option {\n background-color: var(--color-background-200);\n padding: 14px;\n border-radius: var(--rounded-md-2);\n border: 1px solid var(--color-gray-alpha-400);\n }\n .external-link, .external-link:hover {\n color:inherit;\n }\n`\n","import type { ReadyRuntimeError } from '../utils/get-error-by-type'\nimport type { HydrationErrorState } from '../../shared/hydration-error'\n\nimport { useMemo, useState } from 'react'\nimport { getErrorTypeLabel, useErrorDetails } from '../container/errors'\nimport { extractNextErrorCode } from '../../../lib/error-telemetry-utils'\n\nexport function useActiveRuntimeError({\n runtimeErrors,\n getSquashedHydrationErrorDetails,\n}: {\n runtimeErrors: ReadyRuntimeError[]\n getSquashedHydrationErrorDetails: (error: Error) => HydrationErrorState | null\n}) {\n const [activeIdx, setActiveIndex] = useState(0)\n\n const isLoading = useMemo(() => {\n return runtimeErrors.length === 0\n }, [runtimeErrors.length])\n\n const activeError = useMemo(\n () => runtimeErrors[activeIdx] ?? null,\n [activeIdx, runtimeErrors]\n )\n\n const errorDetails = useErrorDetails(\n activeError?.error,\n getSquashedHydrationErrorDetails\n )\n\n if (isLoading || !activeError) {\n return {\n isLoading,\n activeIdx,\n setActiveIndex,\n activeError: null,\n errorDetails: null,\n errorCode: null,\n errorType: null,\n }\n }\n\n const error = activeError.error\n const errorCode = extractNextErrorCode(error)\n const errorType = getErrorTypeLabel(error, activeError.type, errorDetails)\n\n return {\n isLoading,\n activeIdx,\n setActiveIndex,\n activeError,\n errorDetails,\n errorCode,\n errorType,\n }\n}\n","const ERROR_CODE_DELIMITER = '@'\n\n/**\n * Augments the digest field of errors thrown in React Server Components (RSC) with an error code.\n * Since RSC errors can only be serialized through the digest field, this provides a way to include\n * an additional error code that can be extracted client-side via `extractNextErrorCode`.\n *\n * The error code is appended to the digest string with a semicolon separator, allowing it to be\n * parsed out later while preserving the original digest value.\n */\nexport const createDigestWithErrorCode = (\n thrownValue: unknown,\n originalDigest: string\n): string => {\n if (\n typeof thrownValue === 'object' &&\n thrownValue !== null &&\n '__NEXT_ERROR_CODE' in thrownValue\n ) {\n return `${originalDigest}${ERROR_CODE_DELIMITER}${thrownValue.__NEXT_ERROR_CODE}`\n }\n return originalDigest\n}\n\nexport const extractNextErrorCode = (error: unknown): string | undefined => {\n if (\n typeof error === 'object' &&\n error !== null &&\n '__NEXT_ERROR_CODE' in error &&\n typeof error.__NEXT_ERROR_CODE === 'string'\n ) {\n return error.__NEXT_ERROR_CODE\n }\n\n if (\n typeof error === 'object' &&\n error !== null &&\n 'digest' in error &&\n typeof error.digest === 'string'\n ) {\n const segments = error.digest.split(ERROR_CODE_DELIMITER)\n const errorCode = segments.find((segment) => segment.startsWith('E'))\n return errorCode\n }\n\n return undefined\n}\n","export default function EyeIcon() {\n return (\n \n \n \n )\n}\n","export default function LightIcon() {\n return (\n \n \n \n \n \n \n \n \n \n \n )\n}\n","export default function DarkIcon() {\n return (\n \n \n \n )\n}\n","export default function SystemIcon() {\n return (\n \n \n \n )\n}\n","import type { JSX } from 'react'\nimport { useState, useRef } from 'react'\nimport { css } from '../../../../utils/css'\n\nconst SUCCESS_SHOW_DELAY_MS = 180\nconst SUCCESS_FADE_DELAY_MS = 1000\n\nconst modifierKeys = ['Meta', 'Control', 'Ctrl', 'Alt', 'Option', 'Shift']\n\nexport function ShortcutRecorder({\n value,\n onChange,\n}: {\n value: string[] | null\n onChange: (value: string | null) => void\n}) {\n const [pristine, setPristine] = useState(true)\n const [show, setShow] = useState(false)\n const [keys, setKeys] = useState(value ?? [])\n const [success, setSuccess] = useState(false)\n const timeoutRef = useRef(null)\n const buttonRef = useRef(null)\n const hasShortcut = Boolean(value) || keys.length > 0\n\n function handleKeyDown(e: React.KeyboardEvent) {\n // Don't handle events from the Clear button\n if (e.target !== buttonRef.current) return\n if (e.key === 'Tab') return\n if (timeoutRef.current) clearTimeout(timeoutRef.current)\n\n if (!show) {\n setShow(true)\n }\n\n // Reset current shortcut on first key press\n // if this is a fresh recording session\n if (pristine) {\n setKeys([])\n setPristine(false)\n }\n\n function handleValidation(next: string[]) {\n timeoutRef.current = window.setTimeout(() => {\n setSuccess(true)\n onChange(next.join('+'))\n timeoutRef.current = window.setTimeout(() => {\n setShow(false)\n }, SUCCESS_FADE_DELAY_MS)\n }, SUCCESS_SHOW_DELAY_MS)\n }\n\n e.preventDefault()\n e.stopPropagation()\n\n setKeys((prev) => {\n // Don't add duplicate keys\n if (prev.includes(e.code) || prev.includes(e.key)) return prev\n\n /**\n * Why are we using `e.code` for non-modifier keys?\n *\n * Consider this keybind: Alt + L\n *\n * If we capture `e.key` here then it will correspond to an awkward symbol (¬)\n * because pressing Alt + L creates this symbol.\n *\n * While `e.code` will give us `KeyL` as the value which we also later use in\n * `useShortcuts()` to match the keybind correctly without relying on modifier symbols.\n */\n // Handle non-modifier keys (action keys)\n if (!modifierKeys.includes(e.key)) {\n // Replace existing non-modifier key if present\n const existingNonModifierIndex = prev.findIndex(\n (key) => !modifierKeys.includes(key)\n )\n if (existingNonModifierIndex !== -1) {\n const next = [...prev]\n next[existingNonModifierIndex] = e.code\n handleValidation(next)\n return next\n }\n // Add new non-modifier key at the end\n const next = [...prev, e.code]\n handleValidation(next)\n return next\n }\n\n // Handle modifier keys\n const next = [...prev]\n\n // Find the correct position for the modifier key based on predefined order\n const keyOrderIndex = modifierKeys.indexOf(e.key)\n let insertIndex = 0\n\n // Find where to insert by checking existing modifier keys\n for (let i = 0; i < next.length; i++) {\n if (modifierKeys.includes(next[i])) {\n const existingOrderIndex = modifierKeys.indexOf(next[i])\n if (keyOrderIndex < existingOrderIndex) {\n insertIndex = i\n break\n }\n insertIndex = i + 1\n } else {\n // Stop at first non-modifier key\n break\n }\n }\n\n next.splice(insertIndex, 0, e.key)\n handleValidation(next)\n return next\n })\n }\n\n function clear() {\n buttonRef.current?.focus()\n setKeys([])\n setSuccess(false)\n setTimeout(() => {\n setShow(true)\n })\n onChange(null)\n }\n\n function onBlur() {\n setSuccess(false)\n setShow(false)\n setPristine(true)\n }\n\n function onStart() {\n // Clear out timeouts for hiding the tooltip after success\n if (timeoutRef.current) clearTimeout(timeoutRef.current)\n setShow(true)\n buttonRef.current?.focus()\n }\n\n return (\n
\n \n {!hasShortcut ? (\n 'Record Shortcut'\n ) : (\n
\n {keys.map((key) => (\n {key}\n ))}\n
\n )}\n {hasShortcut && (\n e.stopPropagation()}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n clear()\n e.stopPropagation()\n }\n }}\n aria-label=\"Clear shortcut\"\n tabIndex={0}\n >\n \n
\n )}\n \n
\n
\n \n {success ? 'Shortcut set' : 'Recording'}\n
\n \n
\n \n )\n}\n\nfunction BottomArrow() {\n return (\n \n \n \n )\n}\n\nfunction Kbd({ children }: { children: string }) {\n function renderKey(key: string) {\n switch (key) {\n case 'Meta':\n // Command symbol (⌘) on macOS\n // On non-macOS, shows \"Ctrl\"\n return \n case 'Alt':\n case 'Option':\n // Option symbol (⌥)\n return '⌥'\n case 'Control':\n case 'Ctrl':\n // Control abbreviation\n return 'Ctrl'\n case 'Shift':\n // Shift symbol (⇧)\n return '⇧'\n case 'Enter':\n // Enter symbol (⏎)\n return '⏎'\n case 'Escape':\n case 'Esc':\n return 'Esc'\n case ' ':\n case 'Space':\n case 'Spacebar':\n return 'Space'\n case 'ArrowUp':\n return '↑'\n case 'ArrowDown':\n return '↓'\n case 'ArrowLeft':\n return '←'\n case 'ArrowRight':\n return '→'\n case 'Tab':\n return 'Tab'\n case 'Backspace':\n return '⌫'\n case 'Delete':\n return '⌦'\n default:\n // Capitalize single letters, otherwise show as-is\n if (children.length === 1) {\n return children.toUpperCase()\n }\n return children\n }\n }\n const key = renderKey(children)\n const isSymbol = typeof key === 'string' ? key.length === 1 : false\n return {parseKeyCode(key)}\n}\n\nfunction parseKeyCode(code: string | JSX.Element) {\n if (typeof code !== 'string') return code\n\n // Map common KeyboardEvent.code values to their corresponding key values\n const codeToKeyMap: Record = {\n Minus: '-',\n Equal: '=',\n BracketLeft: '[',\n BracketRight: ']',\n Backslash: '\\\\',\n Semicolon: ';',\n Quote: \"'\",\n Comma: ',',\n Period: '.',\n Backquote: '`',\n Space: ' ',\n Slash: '/',\n IntlBackslash: '\\\\',\n // Add more as needed\n }\n\n if (codeToKeyMap[code]) {\n return codeToKeyMap[code]\n }\n\n // Handle KeyA-Z, Digit0-9, Numpad0-9, NumpadAdd, etc.\n if (/^Key([A-Z])$/.test(code)) {\n return code.replace(/^Key/, '')\n }\n if (/^Digit([0-9])$/.test(code)) {\n return code.replace(/^Digit/, '')\n }\n if (/^Numpad([0-9])$/.test(code)) {\n return code.replace(/^Numpad/, '')\n }\n if (code === 'NumpadAdd') return '+'\n if (code === 'NumpadSubtract') return '-'\n if (code === 'NumpadMultiply') return '*'\n if (code === 'NumpadDivide') return '/'\n if (code === 'NumpadDecimal') return '.'\n if (code === 'NumpadEnter') return 'Enter'\n\n return code\n}\n\nfunction MetaKey() {\n const label = isApple()\n ? // Meta is Command on Apple devices, otherwise Control\n '⌘'\n : // Explicitly say \"Ctrl\" instead of the symbol \"⌃\"\n // because most Windows/Linux laptops do not print the symbol\n // Other keyboard-intensive apps like Linear do this\n 'Ctrl'\n\n return (\n {label}\n )\n}\n\nfunction IconCross() {\n return (\n \n \n \n )\n}\n\nexport const SHORTCUT_RECORDER_STYLES = css`\n .shortcut-recorder {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n position: relative;\n font-family: var(--font-stack-sans);\n\n .shortcut-recorder-button {\n display: flex;\n align-items: center;\n gap: 4px;\n background: transparent;\n border: 1px dashed var(--color-gray-500);\n border-radius: var(--rounded-lg);\n padding: 6px 8px;\n font-weight: 400;\n font-size: var(--size-14);\n color: var(--color-gray-1000);\n transition: border-color 150ms var(--timing-swift);\n\n &[data-has-shortcut='true'] {\n border: 1px solid var(--color-gray-alpha-400);\n\n &:hover {\n border-color: var(--color-gray-500);\n }\n }\n\n &:hover {\n border-color: var(--color-gray-600);\n }\n\n &::placeholder {\n color: var(--color-gray-900);\n }\n\n &[data-pristine='false']::placeholder {\n color: transparent;\n }\n\n &:focus-visible {\n outline: var(--focus-ring);\n outline-offset: -1px;\n }\n }\n\n kbd {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-family: var(--font-stack-sans);\n background: var(--color-gray-200);\n min-width: 20px;\n height: 20px;\n font-size: 14px;\n border-radius: 4px;\n color: var(--color-gray-1000);\n\n &[data-symbol='false'] {\n padding: 0 4px;\n }\n }\n\n .shortcut-recorder-clear-button {\n cursor: pointer;\n color: var(--color-gray-1000);\n width: 20px;\n height: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n transition: background 150ms var(--timing-swift);\n\n &:hover {\n background: var(--color-gray-300);\n }\n\n &:focus-visible {\n outline: var(--focus-ring);\n }\n\n svg {\n width: 14px;\n height: 14px;\n }\n }\n }\n\n .shortcut-recorder-keys {\n pointer-events: none;\n user-select: none;\n display: flex;\n align-items: center;\n gap: 2px;\n }\n\n .shortcut-recorder-tooltip {\n --gap: 8px;\n --background: var(--color-gray-1000);\n background: var(--background);\n color: var(--color-background-100);\n font-size: var(--size-14);\n padding: 4px 8px;\n border-radius: 8px;\n position: absolute;\n bottom: calc(100% + var(--gap));\n text-align: center;\n opacity: 0;\n scale: 0.96;\n white-space: nowrap;\n user-select: none;\n transition:\n opacity 150ms var(--timing-swift),\n scale 150ms var(--timing-swift);\n\n &[data-show='true'] {\n opacity: 1;\n scale: 1;\n }\n\n svg {\n position: absolute;\n transform: translateX(-50%);\n bottom: -6px;\n left: 50%;\n }\n\n .shortcut-recorder-status {\n display: flex;\n align-items: center;\n gap: 6px;\n }\n\n .shortcut-recorder-status-icon {\n width: 7px;\n height: 7px;\n border-radius: 50%;\n flex-shrink: 0;\n background: var(--color-red-700);\n\n &[data-success='true'] {\n background: var(--color-green-700);\n }\n }\n }\n`\n\n///////////////////////////////////////////////////////////////////////////////////////////////////\n\nfunction testPlatform(re: RegExp): boolean | undefined {\n return window.navigator != null\n ? re.test(window.navigator.platform)\n : undefined\n}\n\nfunction isMac(): boolean | undefined {\n return testPlatform(/^Mac/)\n}\n\nfunction isIPhone(): boolean | undefined {\n return testPlatform(/^iPhone/)\n}\n\nfunction isIPad(): boolean | undefined {\n return (\n testPlatform(/^iPad/) ||\n // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.\n (isMac() && navigator.maxTouchPoints > 1)\n )\n}\n\nfunction isApple(): boolean | undefined {\n return isMac() || isIPhone() || isIPad()\n}\n","import type { DevToolsConfig } from '../dev-overlay/shared'\nimport { z } from 'next/dist/compiled/zod'\n\nexport const devToolsConfigSchema: z.ZodType = z.object({\n theme: z.enum(['light', 'dark', 'system']).optional(),\n disableDevIndicator: z.boolean().optional(),\n devToolsPosition: z\n .enum(['top-left', 'top-right', 'bottom-left', 'bottom-right'])\n .optional(),\n devToolsPanelPosition: z\n .record(\n z.string(),\n z.enum(['top-left', 'top-right', 'bottom-left', 'bottom-right'])\n )\n .optional(),\n devToolsPanelSize: z\n .record(z.string(), z.object({ width: z.number(), height: z.number() }))\n .optional(),\n scale: z.number().optional(),\n hideShortcut: z.string().nullable().optional(),\n})\n","import type { DevToolsConfig } from '../shared'\nimport { devToolsConfigSchema } from '../../shared/devtools-config-schema'\nimport { deepMerge } from '../../shared/deepmerge'\n\nlet queuedConfigPatch: DevToolsConfig = {}\nlet timer: ReturnType | null = null\n\nfunction flushPatch() {\n if (Object.keys(queuedConfigPatch).length === 0) {\n return\n }\n\n const body = JSON.stringify(queuedConfigPatch)\n queuedConfigPatch = {}\n\n fetch('/__nextjs_devtools_config', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body,\n // keepalive in case of fetch interrupted, e.g. navigation or reload\n keepalive: true,\n }).catch((error) => {\n console.warn('[Next.js DevTools] Failed to save config:', {\n data: body,\n error,\n })\n })\n}\n\nexport function saveDevToolsConfig(patch: DevToolsConfig) {\n const validation = devToolsConfigSchema.safeParse(patch)\n if (!validation.success) {\n console.warn(\n '[Next.js DevTools] Invalid config patch:',\n validation.error.message\n )\n return\n }\n\n queuedConfigPatch = deepMerge(queuedConfigPatch, patch)\n\n if (timer) {\n clearTimeout(timer)\n }\n\n timer = setTimeout(flushPatch, 120)\n}\n","export function deepMerge(target: any, source: any): any {\n if (!source || typeof source !== 'object' || Array.isArray(source)) {\n return source\n }\n\n if (!target || typeof target !== 'object' || Array.isArray(target)) {\n return source\n }\n\n const result = { ...target }\n\n for (const key in source) {\n const sourceValue = source[key]\n const targetValue = target[key]\n\n if (sourceValue !== undefined) {\n if (\n sourceValue &&\n typeof sourceValue === 'object' &&\n !Array.isArray(sourceValue) &&\n targetValue &&\n typeof targetValue === 'object' &&\n !Array.isArray(targetValue)\n ) {\n result[key] = deepMerge(targetValue, sourceValue)\n } else {\n result[key] = sourceValue\n }\n }\n }\n\n return result\n}\n","import type {\n DevToolsIndicatorPosition,\n DevToolsScale,\n} from '../../../../shared'\n\nimport { useDevOverlayContext } from '../../../../../dev-overlay.browser'\nimport { css } from '../../../../utils/css'\nimport EyeIcon from '../../../../icons/eye-icon'\nimport { NEXT_DEV_TOOLS_SCALE } from '../../../../shared'\nimport LightIcon from '../../../../icons/light-icon'\nimport DarkIcon from '../../../../icons/dark-icon'\nimport SystemIcon from '../../../../icons/system-icon'\nimport { ShortcutRecorder } from './shortcut-recorder'\nimport { useRestartServer } from '../../error-overlay-toolbar/use-restart-server'\nimport { saveDevToolsConfig } from '../../../../utils/save-devtools-config'\n\nexport function UserPreferencesBody({\n theme,\n hide,\n hideShortcut,\n setHideShortcut,\n scale,\n setPosition,\n setScale,\n position,\n}: {\n theme: 'dark' | 'light' | 'system'\n hide: () => void\n hideShortcut: string | null\n setHideShortcut: (value: string | null) => void\n setPosition: (position: DevToolsIndicatorPosition) => void\n position: DevToolsIndicatorPosition\n scale: DevToolsScale\n setScale: (value: DevToolsScale) => void\n}) {\n const { restartServer, isPending } = useRestartServer()\n const { shadowRoot } = useDevOverlayContext()\n\n const handleThemeChange = (e: React.ChangeEvent) => {\n const portal = shadowRoot.host\n if (e.target.value === 'system') {\n portal.classList.remove('dark')\n portal.classList.remove('light')\n saveDevToolsConfig({ theme: 'system' })\n return\n }\n\n if (e.target.value === 'dark') {\n portal.classList.add('dark')\n portal.classList.remove('light')\n saveDevToolsConfig({ theme: 'dark' })\n } else {\n portal.classList.remove('dark')\n portal.classList.add('light')\n saveDevToolsConfig({ theme: 'light' })\n }\n }\n\n function handlePositionChange(e: React.ChangeEvent) {\n setPosition(e.target.value as DevToolsIndicatorPosition)\n saveDevToolsConfig({\n devToolsPosition: e.target.value as DevToolsIndicatorPosition,\n })\n }\n\n function handleSizeChange({ target }: React.ChangeEvent) {\n const value = Number(target.value) as DevToolsScale\n setScale(value)\n saveDevToolsConfig({ scale: value })\n }\n\n return (\n
\n
\n
\n \n

\n Select your theme preference.\n

\n
\n }\n value={theme}\n onChange={handleThemeChange}\n >\n \n \n \n \n
\n\n
\n
\n \n

\n Adjust the placement of your dev tools.\n

\n
\n \n \n \n \n \n \n
\n\n
\n
\n \n

\n Adjust the size of your dev tools.\n

\n
\n \n
\n\n
\n
\n \n

\n Hide Dev Tools until you restart your dev server, or 1 day.\n

\n
\n
\n \n \n Hide\n \n
\n
\n\n
\n
\n \n

\n Set a custom keyboard shortcut to toggle visibility.\n

\n
\n
\n \n
\n
\n\n
\n
\n \n

\n To disable this UI completely, set{' '}\n devIndicators: false in\n your next.config file.\n

\n
\n
\n\n
\n
\n \n

\n Restarts the development server without needing to leave the\n browser.\n

\n
\n
\n restartServer({ invalidateFileSystemCache: false })}\n disabled={isPending}\n >\n Restart\n \n
\n
\n\n {process.env.__NEXT_BUNDLER_HAS_PERSISTENT_CACHE ? (\n
\n
\n \n

\n Clears the bundler cache and restarts the dev server. Helpful if\n you are seeing stale errors or changes are not appearing.\n

\n
\n
\n restartServer({ invalidateFileSystemCache: true })}\n disabled={isPending}\n >\n Reset Cache\n \n
\n
\n ) : null}\n
\n )\n}\n\nfunction Select({\n children,\n prefix,\n ...props\n}: {\n prefix?: React.ReactNode\n} & Omit, 'prefix'>) {\n return (\n
\n {prefix}\n \n \n
\n )\n}\n\nfunction ThemeIcon({ theme }: { theme: 'dark' | 'light' | 'system' }) {\n switch (theme) {\n case 'system':\n return \n case 'dark':\n return \n case 'light':\n return \n default:\n return null\n }\n}\n\nexport const DEV_TOOLS_INFO_USER_PREFERENCES_STYLES = css`\n .preferences-container {\n width: 100%;\n }\n\n @media (min-width: 576px) {\n .preferences-container {\n width: 480px;\n }\n }\n\n .preference-section:first-child {\n padding-top: 0;\n }\n\n .preference-section {\n padding: 12px 0;\n border-bottom: 1px solid var(--color-gray-400);\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 24px;\n }\n\n .preference-section:last-child {\n border-bottom: none;\n }\n\n .preference-header {\n margin-bottom: 0;\n flex: 1;\n }\n\n .preference-header label {\n font-size: var(--size-14);\n font-weight: 500;\n color: var(--color-gray-1000);\n margin: 0;\n }\n\n .preference-description {\n color: var(--color-gray-900);\n font-size: var(--size-14);\n margin: 0;\n }\n\n .select-button,\n .action-button {\n display: flex;\n align-items: center;\n gap: 8px;\n background: var(--color-background-100);\n border: 1px solid var(--color-gray-400);\n border-radius: var(--rounded-lg);\n font-weight: 400;\n font-size: var(--size-14);\n color: var(--color-gray-1000);\n padding: 6px 8px;\n transition: border-color 150ms var(--timing-swift);\n\n &:hover {\n border-color: var(--color-gray-500);\n }\n\n svg {\n width: 14px;\n height: 14px;\n overflow: visible;\n }\n }\n\n .select-button {\n &:focus-within {\n outline: var(--focus-ring);\n outline-offset: -1px;\n }\n\n select {\n all: unset;\n }\n\n option {\n color: var(--color-gray-1000);\n background: var(--color-background-100);\n }\n }\n\n .preference-section button:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n :global(.icon) {\n width: 18px;\n height: 18px;\n color: #666;\n }\n`\n\nfunction ChevronDownIcon() {\n return (\n \n \n \n )\n}\n","import { useState } from 'react'\n\nexport function useRestartServer() {\n const [isPending, setIsPending] = useState(false)\n\n const restartServer = async ({\n invalidateFileSystemCache,\n }: {\n invalidateFileSystemCache: boolean\n }): Promise => {\n setIsPending(true)\n\n const url = invalidateFileSystemCache\n ? '/__nextjs_restart_dev?invalidateFileSystemCache=1'\n : '/__nextjs_restart_dev'\n\n let serverRestarted = false\n\n try {\n const curId = await fetch('/__nextjs_server_status')\n .then((res) => res.json())\n .then((data) => data.executionId as number)\n .catch((error) => {\n console.log(\n '[Next.js DevTools] Failed to fetch server status while restarting dev server.',\n error\n )\n return null\n })\n\n if (!curId) {\n console.log(\n '[Next.js DevTools] Failed to get the current server execution ID while restarting dev server.'\n )\n return\n }\n\n const restartRes = await fetch(url, {\n method: 'POST',\n })\n\n if (!restartRes.ok) {\n // Use console log to avoid spamming the error overlay which users can't control.\n console.log(\n '[Next.js DevTools] Failed to fetch restart server endpoint. Status:',\n restartRes.status\n )\n return\n }\n\n // Poll for server restart confirmation.\n for (let i = 0; i < 10; i++) {\n // generous 1 second delay for large apps.\n await new Promise((resolveTimeout) => setTimeout(resolveTimeout, 1_000))\n\n try {\n const nextId = await fetch('/__nextjs_server_status')\n .then((res) => res.json())\n .then((data) => data.executionId as number)\n\n // If the execution ID has changed, the server has restarted successfully.\n if (curId !== nextId) {\n serverRestarted = true\n // Reload the page to ensure the connection to the new server.\n window.location.reload()\n return\n }\n } catch (e) {\n continue\n }\n }\n\n console.log(\n '[Next.js DevTools] Failed to restart server. Exhausted all polling attempts.'\n )\n return\n } catch (error) {\n console.log('[Next.js DevTools] Failed to restart server.', error)\n return\n } finally {\n // If server restarted, don't reset isPending since the page will reload.\n if (!serverRestarted) {\n setIsPending(false)\n }\n }\n }\n\n return {\n restartServer,\n isPending,\n }\n}\n","import { CODE_FRAME_STYLES } from '../components/code-frame/code-frame'\nimport { styles as dialog } from '../components/dialog'\nimport { styles as errorLayout } from '../components/errors/error-overlay-layout/error-overlay-layout'\nimport { styles as bottomStack } from '../components/errors/error-overlay-bottom-stack'\nimport { styles as pagination } from '../components/errors/error-overlay-pagination/error-overlay-pagination'\nimport { styles as overlay } from '../components/overlay/styles'\nimport { styles as footer } from '../components/errors/error-overlay-footer/error-overlay-footer'\nimport { TERMINAL_STYLES } from '../components/terminal/terminal'\nimport { styles as versionStaleness } from '../components/version-staleness-info/version-staleness-info'\nimport { styles as buildErrorStyles } from '../container/build-error'\nimport { styles as containerErrorStyles } from '../container/errors'\nimport { styles as containerRuntimeErrorStyles } from '../container/runtime-error'\nimport { COPY_BUTTON_STYLES } from '../components/copy-button'\nimport { CALL_STACK_FRAME_STYLES } from '../components/call-stack-frame/call-stack-frame'\nimport { css } from '../utils/css'\nimport { EDITOR_LINK_STYLES } from '../components/terminal/editor-link'\nimport { ENVIRONMENT_NAME_LABEL_STYLES } from '../components/errors/environment-name-label/environment-name-label'\nimport { DEV_TOOLS_INFO_USER_PREFERENCES_STYLES } from '../components/errors/dev-tools-indicator/dev-tools-info/user-preferences'\nimport { FADER_STYLES } from '../components/fader'\nimport { CALL_STACK_STYLES } from '../components/call-stack/call-stack'\nimport { SHORTCUT_RECORDER_STYLES } from '../components/errors/dev-tools-indicator/dev-tools-info/shortcut-recorder'\n\nexport function ComponentStyles() {\n return (\n \n )\n}\n","import { useState, useEffect } from 'react'\n\ninterface Options {\n enterDelay?: number\n exitDelay?: number\n onUnmount?: () => void\n}\n\ntype Timeout = ReturnType\n\n/**\n * Useful to perform CSS transitions on React components without\n * using libraries like Framer Motion. This hook will defer the\n * unmount of a React component until after a delay.\n *\n * @param active - Whether the component should be rendered\n * @param options - Options for the delayed render\n * @param options.enterDelay - Delay before rendering the component\n * @param options.exitDelay - Delay before unmounting the component\n *\n * const Modal = ({ active }) => {\n * const { mounted, rendered } = useDelayedRender(active, {\n * exitDelay: 2000,\n * })\n *\n * if (!mounted) return null\n *\n * return (\n * \n *
...
\n *
\n * )\n *}\n *\n * */\nexport function useDelayedRender(active = false, options: Options = {}) {\n const [mounted, setMounted] = useState(active)\n const [rendered, setRendered] = useState(false)\n\n const { enterDelay = 1, exitDelay = 0 } = options\n useEffect(() => {\n let renderTimeout: Timeout | undefined\n let unmountTimeout: Timeout | undefined\n\n if (active) {\n // eslint-disable-next-line react-hooks/set-state-in-effect -- intentional cascading update\n setMounted(true)\n if (enterDelay <= 0) {\n setRendered(true)\n } else {\n renderTimeout = setTimeout(() => {\n setRendered(true)\n }, enterDelay)\n }\n } else {\n setRendered(false)\n if (exitDelay <= 0) {\n setMounted(false)\n } else {\n unmountTimeout = setTimeout(() => {\n setMounted(false)\n }, exitDelay)\n }\n }\n\n return () => {\n clearTimeout(renderTimeout)\n clearTimeout(unmountTimeout)\n }\n }, [active, enterDelay, exitDelay])\n\n return { mounted, rendered }\n}\n","import {\n ACTION_ERROR_OVERLAY_CLOSE,\n type OverlayDispatch,\n type OverlayState,\n} from '../../../shared'\n\nimport { Activity } from 'react'\nimport { BuildError } from '../../../container/build-error'\nimport { Errors } from '../../../container/errors'\nimport { useDelayedRender } from '../../../hooks/use-delayed-render'\nimport type { ReadyRuntimeError } from '../../../utils/get-error-by-type'\nimport type { HydrationErrorState } from '../../../../shared/hydration-error'\n\nconst transitionDurationMs = 200\n\nexport interface ErrorBaseProps {\n rendered: boolean\n transitionDurationMs: number\n isTurbopack: boolean\n versionInfo: OverlayState['versionInfo']\n errorCount: number\n}\n\nexport function ErrorOverlay({\n state,\n dispatch,\n getSquashedHydrationErrorDetails,\n runtimeErrors,\n errorCount,\n}: {\n state: OverlayState\n dispatch: OverlayDispatch\n getSquashedHydrationErrorDetails: (error: Error) => HydrationErrorState | null\n runtimeErrors: ReadyRuntimeError[]\n errorCount: number\n}) {\n const isTurbopack = !!process.env.TURBOPACK\n\n // This hook lets us do an exit animation before unmounting the component\n const { mounted, rendered } = useDelayedRender(state.isErrorOverlayOpen, {\n exitDelay: transitionDurationMs,\n })\n\n const commonProps = {\n rendered,\n transitionDurationMs,\n isTurbopack,\n versionInfo: state.versionInfo,\n errorCount,\n }\n\n if (state.buildError !== null) {\n return (\n \n )\n }\n\n // No Runtime Errors.\n if (!runtimeErrors.length) {\n return null\n }\n\n return (\n \n {\n dispatch({ type: ACTION_ERROR_OVERLAY_CLOSE })\n }}\n />\n \n )\n}\n","import type { OverlayState } from '../../shared'\nimport type { StackFrame } from '../../../shared/stack-frame'\n\nimport { useMemo, useState, useEffect } from 'react'\nimport {\n getErrorByType,\n type ReadyRuntimeError,\n} from '../../utils/get-error-by-type'\n\nexport type SupportedErrorEvent = {\n id: number\n error: Error\n frames: readonly StackFrame[]\n type: 'runtime' | 'recoverable' | 'console'\n}\n\ntype Props = {\n children: (params: {\n runtimeErrors: ReadyRuntimeError[]\n totalErrorCount: number\n }) => React.ReactNode\n state: OverlayState\n isAppDir: boolean\n}\n\nexport const RenderError = (props: Props) => {\n const { state } = props\n const isBuildError = !!state.buildError\n\n if (isBuildError) {\n return \n } else {\n return \n }\n}\n\nconst RenderRuntimeError = ({ children, state, isAppDir }: Props) => {\n const { errors } = state\n\n const [lookups, setLookups] = useState<{\n [eventId: string]: ReadyRuntimeError\n }>({})\n\n const [runtimeErrors, nextError] = useMemo<\n [ReadyRuntimeError[], SupportedErrorEvent | null]\n >(() => {\n let ready: ReadyRuntimeError[] = []\n let next: SupportedErrorEvent | null = null\n\n // Ensure errors are displayed in the order they occurred in:\n for (let idx = 0; idx < errors.length; ++idx) {\n const e = errors[idx]\n const { id } = e\n if (id in lookups) {\n ready.push(lookups[id])\n continue\n }\n\n next = e\n break\n }\n\n return [ready, next]\n }, [errors, lookups])\n\n useEffect(() => {\n if (nextError == null) {\n return\n }\n\n const resolved = getErrorByType(nextError, isAppDir)\n // eslint-disable-next-line react-hooks/set-state-in-effect -- TODO: fetch-while-rendering\n setLookups((m) => ({ ...m, [resolved.id]: resolved }))\n }, [nextError, isAppDir])\n\n const totalErrorCount = errors.length\n\n return children({ runtimeErrors, totalErrorCount })\n}\n\nconst RenderBuildError = ({ children }: Props) => {\n return children({\n runtimeErrors: [],\n // Build errors and missing root layout tags persist until fixed,\n // so we can set a fixed error count of 1\n totalErrorCount: 1,\n })\n}\n","import { useLayoutEffect } from 'react'\nimport { useDevOverlayContext } from '../../dev-overlay.browser'\n\nexport function ScaleUpdater() {\n const { shadowRoot, state } = useDevOverlayContext()\n\n useLayoutEffect(() => {\n // Update the CSS custom property for scale\n if (shadowRoot?.host) {\n ;(shadowRoot.host as HTMLElement).style.setProperty(\n '--nextjs-dev-tools-scale',\n String(state.scale || 1)\n )\n }\n }, [shadowRoot, state.scale])\n\n return null\n}\n","\n import API from \"!../../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"../../../../build/webpack/loaders/devtool/devtool-style-inject.js\";\n import setAttributes from \"!../../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../../../../node_modules/.pnpm/css-loader@7.1.2_@rspack+core@1.6.7_@swc+helpers@0.5.15__webpack@5.98.0_@swc+core@1.11.24_@sw_bx7gx6l2cs2trwgqreijicltyy/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!./devtools-indicator.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn;\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../../../../node_modules/.pnpm/css-loader@7.1.2_@rspack+core@1.6.7_@swc+helpers@0.5.15__webpack@5.98.0_@swc+core@1.11.24_@sw_bx7gx6l2cs2trwgqreijicltyy/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!./devtools-indicator.css\";\n export default content && content.locals ? content.locals : undefined;\n","export function Cross(props: React.SVGProps) {\n return (\n \n \n \n )\n}\n","export function Warning(props: React.SVGProps) {\n return (\n \n \n \n )\n}\n","import {\n createContext,\n useContext,\n type Dispatch,\n type SetStateAction,\n} from 'react'\n\nexport type PanelStateKind =\n | 'preferences'\n | 'route-type'\n | 'segment-explorer'\n | 'panel-selector'\n | 'instant-navs'\n\nexport const PanelRouterContext = createContext<{\n panel: PanelStateKind | null\n setPanel: Dispatch>\n triggerRef: React.RefObject\n selectedIndex: number\n setSelectedIndex: Dispatch>\n}>(null!)\n\nexport const usePanelRouterContext = () => useContext(PanelRouterContext)\n","import { INDICATOR_PADDING } from '../components/devtools-indicator/devtools-indicator'\nimport type { OverlayState } from '../shared'\n\nexport const BASE_LOGO_SIZE = 36\nconst INDICATOR_GAP = 9\n\nfunction getIndicatorSquare(state: OverlayState): number {\n return BASE_LOGO_SIZE / state.scale\n}\n\nexport function getIndicatorOffset(state: OverlayState): number {\n return INDICATOR_PADDING + getIndicatorSquare(state) + INDICATOR_GAP\n}\n","import { useRef, useState } from 'react'\nimport { useUpdateAnimation } from './hooks/use-update-animation'\nimport { useMeasureWidth } from './hooks/use-measure-width'\nimport { Cross } from '../../icons/cross'\nimport { Warning } from '../../icons/warning'\nimport { css } from '../../utils/css'\nimport { useDevOverlayContext } from '../../../dev-overlay.browser'\nimport { useRenderErrorContext } from '../../dev-overlay'\nimport { useDelayedRender } from '../../hooks/use-delayed-render'\nimport {\n ACTION_ERROR_OVERLAY_CLOSE,\n ACTION_ERROR_OVERLAY_OPEN,\n} from '../../shared'\nimport { usePanelRouterContext } from '../../menu/context'\nimport { BASE_LOGO_SIZE } from '../../utils/indicator-metrics'\nimport { StatusIndicator, Status, getCurrentStatus } from './status-indicator'\n\nconst SHORT_DURATION_MS = 150\n\nexport function NextLogo({\n onTriggerClick,\n ...buttonProps\n}: { onTriggerClick: () => void } & React.ComponentProps<'button'>) {\n const { state, dispatch } = useDevOverlayContext()\n const { totalErrorCount } = useRenderErrorContext()\n const SIZE = BASE_LOGO_SIZE / state.scale\n const { panel, triggerRef, setPanel } = usePanelRouterContext()\n const isMenuOpen = panel === 'panel-selector'\n\n const hasError = totalErrorCount > 0\n const [isErrorExpanded, setIsErrorExpanded] = useState(hasError)\n const [previousHasError, setPreviousHasError] = useState(hasError)\n if (previousHasError !== hasError) {\n setPreviousHasError(hasError)\n // Reset the expanded state when the error state changes\n setIsErrorExpanded(hasError)\n }\n const [dismissed, setDismissed] = useState(false)\n const newErrorDetected = useUpdateAnimation(\n totalErrorCount,\n SHORT_DURATION_MS\n )\n\n // Cache indicator state management\n const isCacheFilling = state.cacheIndicator === 'filling'\n const isCacheBypassing = state.cacheIndicator === 'bypass'\n\n // Determine if we should show any status (excluding cache bypass, which renders like error badge)\n const shouldShowStatus =\n state.buildingIndicator || state.renderingIndicator || isCacheFilling\n\n // Delay showing for 400ms to catch fast operations,\n // and keep visible for minimum time (longer for warnings)\n const { rendered: showStatusIndicator } = useDelayedRender(shouldShowStatus, {\n enterDelay: 400,\n exitDelay: 500,\n })\n\n const ref = useRef(null)\n const measuredWidth = useMeasureWidth(ref)\n\n // Get the current status from the state\n const currentStatus = getCurrentStatus(\n state.buildingIndicator,\n state.renderingIndicator,\n state.cacheIndicator\n )\n\n const displayStatus = showStatusIndicator ? currentStatus : Status.None\n\n const isExpanded =\n isErrorExpanded ||\n isCacheBypassing ||\n showStatusIndicator ||\n state.disableDevIndicator\n const width = measuredWidth === 0 ? 'auto' : measuredWidth\n\n return (\n \n {/* Styles */}\n \n \n
\n {/* Children */}\n {!state.disableDevIndicator && (\n \n \n \n )}\n {isExpanded && (\n <>\n {/* Error badge has priority over cache indicator */}\n {(isErrorExpanded || state.disableDevIndicator) && (\n
\n {\n if (state.isErrorOverlayOpen) {\n dispatch({\n type: ACTION_ERROR_OVERLAY_CLOSE,\n })\n return\n }\n dispatch({ type: ACTION_ERROR_OVERLAY_OPEN })\n setPanel(null)\n }}\n >\n {state.disableDevIndicator && (\n
\n \n
\n )}\n \n {totalErrorCount}\n {' '}\n
\n Issue\n {totalErrorCount > 1 && (\n 2,\n // otherwise it should stay static between re-renders.\n data-animate={\n newErrorDetected && totalErrorCount === 2\n }\n >\n s\n \n )}\n
\n \n {!state.buildError && (\n {\n if (state.disableDevIndicator) {\n setDismissed(true)\n } else {\n setIsErrorExpanded(false)\n }\n // Move focus to the trigger to prevent having it stuck on this element\n triggerRef.current?.focus()\n }}\n >\n \n \n )}\n
\n )}\n {/* Cache bypass badge shown when cache is being bypassed */}\n {isCacheBypassing && !hasError && !state.disableDevIndicator && (\n \n )}\n {/* Status indicator shown when no errors and no cache bypass */}\n {showStatusIndicator &&\n !hasError &&\n !isCacheBypassing &&\n !state.disableDevIndicator && (\n \n )}\n \n )}\n
\n \n
\n
\n )\n}\n\nfunction AnimateCount({\n children: count,\n animate = true,\n ...props\n}: {\n children: number\n animate: boolean\n}) {\n return (\n
\n
\n {count - 1}\n
\n
\n {count}\n
\n
\n )\n}\n\nfunction CacheBypassBadge({\n onTriggerClick,\n triggerRef,\n}: {\n onTriggerClick: () => void\n triggerRef: React.RefObject\n}) {\n const [dismissed, setDismissed] = useState(false)\n\n if (dismissed) {\n return null\n }\n\n return (\n
\n \n Cache disabled\n \n {\n setDismissed(true)\n // Move focus to the trigger to prevent having it stuck on this element\n triggerRef.current?.focus()\n }}\n >\n \n \n
\n )\n}\n\nfunction NextMark() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )\n}\n","import { useEffect, useRef, useState } from 'react'\n\nexport function useUpdateAnimation(\n issueCount: number,\n animationDurationMs = 0\n) {\n const lastUpdatedTimeStamp = useRef(null)\n const [animate, setAnimate] = useState(false)\n\n useEffect(() => {\n if (issueCount > 0) {\n const deltaMs = lastUpdatedTimeStamp.current\n ? Date.now() - lastUpdatedTimeStamp.current\n : -1\n lastUpdatedTimeStamp.current = Date.now()\n\n // We don't animate if `issueCount` changes too quickly\n if (deltaMs <= animationDurationMs) {\n return\n }\n\n setAnimate(true)\n // It is important to use a CSS transitioned state, not a CSS keyframed animation\n // because if the issue count increases faster than the animation duration, it\n // will abruptly stop and not transition smoothly back to its original state.\n const timeoutId = window.setTimeout(() => {\n setAnimate(false)\n }, animationDurationMs)\n\n return () => {\n clearTimeout(timeoutId)\n }\n }\n }, [issueCount, animationDurationMs])\n\n return animate\n}\n","import { useEffect, useState } from 'react'\n\nexport function useMeasureWidth(\n ref: React.RefObject\n): number {\n const [width, setWidth] = useState(0)\n\n useEffect(() => {\n const el = ref.current\n\n if (!el) {\n return\n }\n\n const observer = new ResizeObserver(([{ contentRect }]) => {\n setWidth(contentRect.width)\n })\n\n observer.observe(el)\n return () => observer.disconnect()\n }, [ref])\n\n return width\n}\n","import * as React from 'react'\nimport { cx } from '../../utils/cx'\ntype ToastProps = React.HTMLProps & {\n children?: React.ReactNode\n onClick?: () => void\n className?: string\n}\n\nexport const Toast = React.forwardRef(\n function Toast({ onClick, children, className, ...props }, ref) {\n return (\n {\n if (!(e.target as HTMLElement).closest('a')) {\n e.preventDefault()\n }\n return onClick?.()\n }}\n className={cx('nextjs-toast', className)}\n >\n {children}\n \n )\n }\n)\n","import React, {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n type Ref,\n type RefObject,\n} from 'react'\n\ninterface DragContextValue {\n register: (el: HTMLElement) => void\n unregister: (el: HTMLElement) => void\n handles: Set\n disabled: boolean\n}\n\nconst DragContext = createContext(null)\n\nexport function DragProvider({\n children,\n disabled = false,\n}: {\n children: React.ReactNode\n disabled?: boolean\n}) {\n const handlesRef = useRef>(new Set())\n\n const register = useCallback((el: HTMLElement) => {\n handlesRef.current.add(el)\n }, [])\n\n const unregister = useCallback((el: HTMLElement) => {\n handlesRef.current.delete(el)\n }, [])\n\n const value = useMemo(\n () => ({\n register,\n unregister,\n handles:\n // eslint-disable-next-line react-hooks/refs -- TODO\n handlesRef.current,\n disabled,\n }),\n [register, unregister, disabled]\n )\n\n return {children}\n}\n\nexport function useDragContext() {\n return useContext(DragContext)\n}\n\nexport function DragHandle({\n children,\n ref,\n ...props\n}: React.HTMLAttributes & { ref?: Ref }) {\n const internalRef = useRef(null)\n const ctx = useDragContext()\n\n const setRef = useCallback(\n (node: HTMLDivElement | null) => {\n internalRef.current = node ?? null\n if (typeof ref === 'function') {\n ref(node)\n } else if (ref && typeof ref === 'object') {\n ;(ref as RefObject).current = node\n }\n },\n [ref]\n )\n\n useEffect(() => {\n if (!ctx || !internalRef.current || ctx.disabled) return\n const el = internalRef.current\n ctx.register(el)\n return () => ctx.unregister(el)\n }, [ctx])\n\n return (\n \n {children}\n \n )\n}\n","import type { Corners } from '../../../shared'\nimport { useCallback, useLayoutEffect, useRef } from 'react'\nimport { useDragContext } from './drag-context'\n\ninterface Point {\n x: number\n y: number\n}\n\ninterface Corner {\n corner: Corners\n translation: Point\n}\n\nexport function Draggable({\n children,\n padding,\n position: currentCorner,\n setPosition: setCurrentCorner,\n onDragStart,\n dragHandleSelector,\n disableDrag = false,\n avoidZone,\n ...props\n}: {\n children: React.ReactElement\n position: Corners\n padding: number\n setPosition: (position: Corners) => void\n onDragStart?: () => void\n dragHandleSelector?: string\n disableDrag?: boolean\n style?: React.CSSProperties\n avoidZone?: {\n square: number\n corner: Corners\n padding: number\n }\n}) {\n const { ref, animate, ...drag } = useDrag({\n disabled: disableDrag,\n handles: useDragContext()?.handles,\n threshold: 5,\n onDragStart,\n onDragEnd,\n onAnimationEnd,\n dragHandleSelector,\n })\n\n function onDragEnd(translation: Point, velocity: Point) {\n const distance = Math.sqrt(\n translation.x * translation.x + translation.y * translation.y\n )\n if (distance === 0) {\n ref.current?.style.removeProperty('translate')\n return\n }\n\n const projectedPosition = {\n x: translation.x + project(velocity.x),\n y: translation.y + project(velocity.y),\n }\n const nearestCorner = getNearestCorner(projectedPosition)\n animate(nearestCorner)\n }\n\n function onAnimationEnd({ corner }: Corner) {\n setTimeout(() => {\n ref.current?.style.removeProperty('translate')\n setCurrentCorner(corner)\n })\n }\n\n function getNearestCorner({ x, y }: Point): Corner {\n const allCorners = getCorners()\n const distances = Object.entries(allCorners).map(([key, translation]) => {\n const distance = Math.sqrt(\n (x - translation.x) ** 2 + (y - translation.y) ** 2\n )\n return { key, distance }\n })\n const min = Math.min(...distances.map((d) => d.distance))\n const nearest = distances.find((d) => d.distance === min)\n if (!nearest) {\n // this should be guarded by an invariant, shouldn't ever happen\n return { corner: currentCorner, translation: allCorners[currentCorner] }\n }\n return {\n translation: allCorners[nearest.key as Corners],\n corner: nearest.key as Corners,\n }\n }\n\n function getCorners(): Record {\n const offset = padding * 2\n const triggerWidth = ref.current?.offsetWidth || 0\n const triggerHeight = ref.current?.offsetHeight || 0\n const scrollbarWidth =\n window.innerWidth - document.documentElement.clientWidth\n\n function getAbsolutePosition(corner: Corners) {\n const isRight = corner.includes('right')\n const isBottom = corner.includes('bottom')\n\n // Base positions flush against the chosen corner\n let x = isRight\n ? window.innerWidth - scrollbarWidth - offset - triggerWidth\n : 0\n let y = isBottom ? window.innerHeight - offset - triggerHeight : 0\n\n // Apply avoidZone offset if this corner is occupied. We only move along\n // the vertical axis to keep the panel within the viewport. For bottom\n // corners we move the panel up, for top corners we move it down.\n if (avoidZone && avoidZone.corner === corner) {\n const delta = avoidZone.square + avoidZone.padding\n if (isBottom) {\n // move up\n y -= delta\n } else {\n // move down\n y += delta\n }\n }\n\n return { x, y }\n }\n\n const basePosition = getAbsolutePosition(currentCorner)\n\n function rel(pos: Point): Point {\n return {\n x: pos.x - basePosition.x,\n y: pos.y - basePosition.y,\n }\n }\n\n return {\n 'top-left': rel(getAbsolutePosition('top-left')),\n 'top-right': rel(getAbsolutePosition('top-right')),\n 'bottom-left': rel(getAbsolutePosition('bottom-left')),\n 'bottom-right': rel(getAbsolutePosition('bottom-right')),\n }\n }\n\n return (\n
\n {children}\n
\n )\n}\n\ninterface UseDragOptions {\n disabled: boolean\n onDragStart?: () => void\n onDrag?: (translation: Point) => void\n onDragEnd?: (translation: Point, velocity: Point) => void\n onAnimationEnd?: (corner: Corner) => void\n threshold: number // Minimum movement before drag starts\n dragHandleSelector?: string\n handles?: Set\n}\n\ninterface Velocity {\n position: Point\n timestamp: number\n}\n\nfunction useDrag(options: UseDragOptions) {\n const ref = useRef(null)\n const machine = useRef<\n | { state: 'idle' | 'press' | 'drag-end' }\n | { state: 'drag'; pointerId: number }\n >({\n state: 'idle',\n })\n const cleanup = useRef<() => void>(null)\n\n const origin = useRef({ x: 0, y: 0 })\n const translation = useRef({ x: 0, y: 0 })\n const lastTimestamp = useRef(0)\n const velocities = useRef([])\n\n const cancel = useCallback(() => {\n if (machine.current.state === 'drag') {\n ref.current?.releasePointerCapture(machine.current.pointerId)\n }\n\n machine.current =\n machine.current.state === 'drag'\n ? { state: 'drag-end' }\n : { state: 'idle' }\n\n if (cleanup.current !== null) {\n cleanup.current()\n cleanup.current = null\n }\n\n velocities.current = []\n\n ref.current?.classList.remove('dev-tools-grabbing')\n ref.current?.style.removeProperty('-webkit-user-select')\n document.body.style.removeProperty('user-select')\n document.body.style.removeProperty('-webkit-user-select')\n }, [])\n\n useLayoutEffect(() => {\n if (options.disabled) {\n cancel()\n }\n }, [cancel, options.disabled])\n\n function set(position: Point) {\n if (ref.current) {\n translation.current = position\n ref.current.style.translate = `${position.x}px ${position.y}px`\n }\n }\n\n function animate(corner: Corner) {\n const el = ref.current\n if (el === null) return\n\n function listener(e: TransitionEvent) {\n if (e.propertyName === 'translate') {\n options.onAnimationEnd?.(corner)\n translation.current = { x: 0, y: 0 }\n el!.style.transition = ''\n el!.removeEventListener('transitionend', listener)\n }\n }\n\n // Generated from https://www.easing.dev/spring\n el.style.transition = 'translate 491.22ms var(--timing-bounce)'\n el.addEventListener('transitionend', listener)\n set(corner.translation)\n }\n\n function onClick(e: MouseEvent) {\n if (machine.current.state === 'drag-end') {\n e.preventDefault()\n e.stopPropagation()\n machine.current = { state: 'idle' }\n ref.current?.removeEventListener('click', onClick)\n }\n }\n\n function isValidDragHandle(target: EventTarget | null): boolean {\n if (!target || !ref.current) return true\n\n if (options.handles && options.handles.size > 0) {\n let node: HTMLElement | null = target as HTMLElement\n while (node && node !== ref.current) {\n if (options.handles.has(node)) return true\n node = node.parentElement\n }\n return false\n }\n\n if (options.dragHandleSelector) {\n const element = target as Element\n return element.closest(options.dragHandleSelector) !== null\n }\n\n return true\n }\n\n function onPointerDown(e: React.PointerEvent) {\n if (e.button !== 0) {\n return // ignore right click\n }\n\n // Check if the pointer down event is on a valid drag handle\n if (!isValidDragHandle(e.target)) {\n return\n }\n\n origin.current = { x: e.clientX, y: e.clientY }\n machine.current = { state: 'press' }\n window.addEventListener('pointermove', onPointerMove)\n window.addEventListener('pointerup', onPointerUp)\n\n if (cleanup.current !== null) {\n cleanup.current()\n cleanup.current = null\n }\n cleanup.current = () => {\n window.removeEventListener('pointermove', onPointerMove)\n window.removeEventListener('pointerup', onPointerUp)\n }\n\n ref.current?.addEventListener('click', onClick)\n }\n\n function onPointerMove(e: PointerEvent) {\n if (machine.current.state === 'press') {\n const dx = e.clientX - origin.current.x\n const dy = e.clientY - origin.current.y\n const distance = Math.sqrt(dx * dx + dy * dy)\n\n if (distance >= options.threshold) {\n machine.current = { state: 'drag', pointerId: e.pointerId }\n ref.current?.setPointerCapture(e.pointerId)\n ref.current?.classList.add('dev-tools-grabbing')\n ref.current?.style.setProperty('-webkit-user-select', 'none')\n document.body.style.userSelect = 'none'\n document.body.style.webkitUserSelect = 'none'\n options.onDragStart?.()\n }\n }\n\n if (machine.current.state !== 'drag') return\n\n const currentPosition = { x: e.clientX, y: e.clientY }\n\n const dx = currentPosition.x - origin.current.x\n const dy = currentPosition.y - origin.current.y\n origin.current = currentPosition\n\n const newTranslation = {\n x: translation.current.x + dx,\n y: translation.current.y + dy,\n }\n\n set(newTranslation)\n\n // Keep a history of recent positions for velocity calculation\n // Only store points that are at least 10ms apart to avoid too many samples\n const now = Date.now()\n const shouldAddToHistory = now - lastTimestamp.current >= 10\n if (shouldAddToHistory) {\n velocities.current = [\n ...velocities.current.slice(-5),\n { position: currentPosition, timestamp: now },\n ]\n }\n\n lastTimestamp.current = now\n options.onDrag?.(translation.current)\n }\n\n function onPointerUp() {\n const velocity = calculateVelocity(velocities.current)\n\n cancel()\n\n // TODO: This is the onDragEnd when the pointerdown event was fired not the onDragEnd when the pointerup event was fired\n options.onDragEnd?.(translation.current, velocity)\n }\n\n if (options.disabled) {\n return {\n ref,\n animate,\n }\n }\n\n return {\n ref,\n onPointerDown,\n animate,\n }\n}\n\nfunction calculateVelocity(\n history: Array<{ position: Point; timestamp: number }>\n): Point {\n if (history.length < 2) {\n return { x: 0, y: 0 }\n }\n\n const oldestPoint = history[0]\n const latestPoint = history[history.length - 1]\n\n const timeDelta = latestPoint.timestamp - oldestPoint.timestamp\n\n if (timeDelta === 0) {\n return { x: 0, y: 0 }\n }\n\n // Calculate pixels per millisecond\n const velocityX =\n (latestPoint.position.x - oldestPoint.position.x) / timeDelta\n const velocityY =\n (latestPoint.position.y - oldestPoint.position.y) / timeDelta\n\n // Convert to pixels per second for more intuitive values\n return {\n x: velocityX * 1000,\n y: velocityY * 1000,\n }\n}\n\nfunction project(initialVelocity: number, decelerationRate = 0.999) {\n return ((initialVelocity / 1000) * decelerationRate) / (1 - decelerationRate)\n}\n","import './devtools-indicator.css'\nimport type { CSSProperties } from 'react'\nimport type { DevToolsIndicatorPosition } from '../../shared'\nimport { NextLogo } from './next-logo'\nimport { Toast } from '../toast'\nimport {\n MENU_CURVE,\n MENU_DURATION_MS,\n} from '../errors/dev-tools-indicator/utils'\nimport {\n ACTION_DEVTOOLS_POSITION,\n STORE_KEY_SHARED_PANEL_LOCATION,\n STORAGE_KEY_PANEL_POSITION_PREFIX,\n ACTION_DEVTOOLS_PANEL_POSITION,\n} from '../../shared'\nimport { Draggable } from '../errors/dev-tools-indicator/draggable'\nimport { useDevOverlayContext } from '../../../dev-overlay.browser'\nimport { usePanelRouterContext } from '../../menu/context'\nimport { saveDevToolsConfig } from '../../utils/save-devtools-config'\n\nexport const INDICATOR_PADDING = 20\n\nexport function DevToolsIndicator() {\n const { state, dispatch } = useDevOverlayContext()\n const { panel, setPanel, setSelectedIndex } = usePanelRouterContext()\n const updateAllPanelPositions = useUpdateAllPanelPositions()\n const [vertical, horizontal] = state.devToolsPosition.split('-', 2)\n\n return (\n // TODO: why is this called a toast\n \n {\n dispatch({\n type: ACTION_DEVTOOLS_POSITION,\n devToolsPosition: p,\n })\n saveDevToolsConfig({ devToolsPosition: p })\n\n updateAllPanelPositions(p)\n }}\n >\n {\n const newPanel =\n panel === 'panel-selector' ? null : 'panel-selector'\n setPanel(newPanel)\n if (!newPanel) {\n setSelectedIndex(-1)\n return\n }\n }}\n />\n \n \n )\n}\n\n/**\n * makes sure we eventually sync the panel to the logo, otherwise\n * it will be jarring if the panels start appearing on the other\n * side of the logo. This wont teleport the panel because the indicator\n * cannot be dragged when any panel is open\n */\nexport const useUpdateAllPanelPositions = () => {\n const { state, dispatch } = useDevOverlayContext()\n return (position: DevToolsIndicatorPosition) => {\n dispatch({\n type: ACTION_DEVTOOLS_PANEL_POSITION,\n devToolsPanelPosition: position,\n key: STORE_KEY_SHARED_PANEL_LOCATION,\n })\n\n const panelPositionKeys = Object.keys(state.devToolsPanelPosition).filter(\n (key) => key.startsWith(STORAGE_KEY_PANEL_POSITION_PREFIX)\n )\n\n const panelPositionPatch: Record = {\n [STORE_KEY_SHARED_PANEL_LOCATION]: position,\n }\n\n panelPositionKeys.forEach((key) => {\n dispatch({\n type: ACTION_DEVTOOLS_PANEL_POSITION,\n devToolsPanelPosition: position,\n key,\n })\n\n panelPositionPatch[key] = position\n })\n\n saveDevToolsConfig({\n devToolsPanelPosition: panelPositionPatch,\n })\n }\n}\n","import { useDevOverlayContext } from '../../dev-overlay.browser'\nimport { useClickOutsideAndEscape } from '../components/errors/dev-tools-indicator/utils'\nimport {\n useEffectEvent,\n useLayoutEffect,\n useRef,\n createContext,\n useContext,\n type CSSProperties,\n type Dispatch,\n type SetStateAction,\n} from 'react'\nimport { getIndicatorOffset } from '../utils/indicator-metrics'\nimport { INDICATOR_PADDING } from '../components/devtools-indicator/devtools-indicator'\nimport { usePanelRouterContext } from './context'\nimport { usePanelContext } from './panel-router'\n\ninterface C {\n closeMenu?: () => void\n selectedIndex: number\n setSelectedIndex: Dispatch>\n}\n\nconst MenuContext = createContext({} as C)\n\nfunction MenuItem({\n index,\n label,\n value,\n onClick,\n href,\n ...props\n}: {\n index?: number\n title?: string\n label: string\n value: React.ReactNode\n href?: string\n onClick?: () => void\n}) {\n const isInteractive =\n typeof onClick === 'function' || typeof href === 'string'\n const { closeMenu, selectedIndex, setSelectedIndex } = useContext(MenuContext)\n const selected = selectedIndex === index\n\n function click() {\n if (isInteractive) {\n onClick?.()\n closeMenu?.()\n if (href) {\n window.open(href, '_blank', 'noopener, noreferrer')\n }\n }\n }\n\n return (\n {\n if (isInteractive && index !== undefined && selectedIndex !== index) {\n setSelectedIndex(index)\n }\n }}\n onMouseLeave={() => setSelectedIndex(-1)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n click()\n }\n }}\n role={isInteractive ? 'menuitem' : undefined}\n tabIndex={selected ? 0 : -1}\n {...props}\n >\n {label}\n {value}\n \n )\n}\n\nexport const DevtoolMenu = ({\n closeOnClickOutside = true,\n items,\n}: {\n closeOnClickOutside?: boolean\n items: Array<\n | false\n | undefined\n | null\n | {\n onClick?: () => void\n title?: string\n label: string\n value: React.ReactNode\n attributes?: Record\n footer?: boolean\n }\n >\n}) => {\n const { state } = useDevOverlayContext()\n const { setPanel, triggerRef, setSelectedIndex, selectedIndex } =\n usePanelRouterContext()\n const { mounted } = usePanelContext()\n\n const [vertical, horizontal] = state.devToolsPosition.split('-', 2)\n\n const menuRef = useRef(null)\n\n useClickOutsideAndEscape(\n menuRef,\n triggerRef,\n closeOnClickOutside && mounted,\n (reason) => {\n switch (reason) {\n case 'escape': {\n setPanel(null)\n setSelectedIndex(-1)\n return\n }\n case 'outside': {\n if (!closeOnClickOutside) {\n return\n }\n setPanel(null)\n setSelectedIndex(-1)\n return\n }\n default: {\n return null!\n }\n }\n }\n )\n const fireInitialSelectMenuItem = useEffectEvent(() => {\n selectMenuItem({\n index: selectedIndex === -1 ? 'first' : selectedIndex,\n menuRef,\n setSelectedIndex,\n })\n })\n\n useLayoutEffect(() => {\n menuRef.current?.focus() // allows keydown to be captured\n fireInitialSelectMenuItem()\n }, [])\n\n const indicatorOffset = getIndicatorOffset(state)\n\n const [indicatorVertical, indicatorHorizontal] = state.devToolsPosition.split(\n '-',\n 2\n )\n\n const verticalOffset =\n vertical === indicatorVertical && horizontal === indicatorHorizontal\n ? indicatorOffset\n : INDICATOR_PADDING\n\n const positionStyle = {\n [vertical]: `${verticalOffset}px`,\n [horizontal]: `${INDICATOR_PADDING}px`,\n [vertical === 'top' ? 'bottom' : 'top']: 'auto',\n [horizontal === 'left' ? 'right' : 'left']: 'auto',\n } as CSSProperties\n const definedItems = items.filter((item) => !!item)\n const itemsAboveFooter = definedItems.filter((item) => !item.footer)\n const itemsBelowFooter = definedItems.filter((item) => item.footer)\n\n function onMenuKeydown(e: React.KeyboardEvent) {\n e.preventDefault()\n\n const clickableItems = definedItems.filter((item) => item.onClick)\n const totalClickableItems = clickableItems.length\n\n switch (e.key) {\n case 'ArrowDown':\n const next =\n selectedIndex >= totalClickableItems - 1 ? 0 : selectedIndex + 1\n selectMenuItem({ index: next, menuRef, setSelectedIndex })\n break\n case 'ArrowUp':\n const prev =\n selectedIndex <= 0 ? totalClickableItems - 1 : selectedIndex - 1\n selectMenuItem({ index: prev, menuRef, setSelectedIndex })\n break\n case 'Home':\n selectMenuItem({ index: 'first', menuRef, setSelectedIndex })\n break\n case 'End':\n selectMenuItem({ index: 'last', menuRef, setSelectedIndex })\n break\n case 'n':\n if (e.ctrlKey) {\n const nextCtrl =\n selectedIndex >= totalClickableItems - 1 ? 0 : selectedIndex + 1\n selectMenuItem({ index: nextCtrl, menuRef, setSelectedIndex })\n }\n break\n case 'p':\n if (e.ctrlKey) {\n const prevCtrl =\n selectedIndex <= 0 ? totalClickableItems - 1 : selectedIndex - 1\n selectMenuItem({ index: prevCtrl, menuRef, setSelectedIndex })\n }\n break\n default:\n break\n }\n }\n\n return (\n \n \n
\n {itemsAboveFooter.map((item, index) => (\n \n ))}\n
\n
\n {itemsBelowFooter.map((item, index) => (\n \n ))}\n
\n \n \n )\n}\n\nfunction getAdjustedIndex(\n items: Array<{ onClick?: () => void }>,\n targetIndex: number\n): number {\n let adjustedIndex = 0\n\n for (let i = 0; i <= targetIndex && i < items.length; i++) {\n if (items[i].onClick) {\n if (i === targetIndex) {\n return adjustedIndex\n }\n adjustedIndex++\n }\n }\n\n return adjustedIndex\n}\n\nfunction getClickableItemsCount(\n items: Array<{ onClick?: () => void }>\n): number {\n return items.filter((item) => item.onClick).length\n}\n\nexport function IssueCount({ children }: { children: number }) {\n return (\n 0}\n >\n \n {children}\n \n )\n}\n\nexport function ChevronRight() {\n return (\n \n \n \n )\n}\n\nfunction selectMenuItem({\n index,\n menuRef,\n setSelectedIndex,\n}: {\n index: number | 'first' | 'last'\n menuRef: React.RefObject\n setSelectedIndex: (index: number) => void\n}) {\n if (index === 'first') {\n setTimeout(() => {\n const all = menuRef.current?.querySelectorAll('[role=\"menuitem\"]')\n if (all) {\n const firstIndex = all[0].getAttribute('data-index')\n selectMenuItem({ index: Number(firstIndex), menuRef, setSelectedIndex })\n }\n })\n return\n }\n\n if (index === 'last') {\n setTimeout(() => {\n const all = menuRef.current?.querySelectorAll('[role=\"menuitem\"]')\n if (all) {\n const lastIndex = all.length - 1\n selectMenuItem({ index: lastIndex, menuRef, setSelectedIndex })\n }\n })\n return\n }\n\n const el = menuRef.current?.querySelector(\n `[data-index=\"${index}\"]`\n ) as HTMLElement\n\n if (el) {\n setSelectedIndex(index)\n el?.focus()\n }\n}\n","import {\n createContext,\n useCallback,\n useContext,\n useEffectEvent,\n useLayoutEffect,\n useState,\n type RefObject,\n} from 'react'\nimport { STORE_KEY_SHARED_PANEL_SIZE, type Corners } from '../../../shared'\n\nexport type ResizeDirection =\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'top-left'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-right'\n\ninterface ResizeContextValue {\n resizeRef: RefObject\n minWidth: number\n minHeight: number\n maxWidth?: number\n maxHeight?: number\n draggingDirection: ResizeDirection | null\n setDraggingDirection: (direction: ResizeDirection | null) => void\n storageKey: string\n}\n\nconst ResizeContext = createContext(null!)\n\nconst constrainDimensions = (params: {\n width: number\n height: number\n minWidth: number\n minHeight: number\n}) => {\n const maxWidth = window.innerWidth * 0.95\n const maxHeight = window.innerHeight * 0.95\n\n return {\n width: Math.min(maxWidth, Math.max(params.minWidth, params.width)),\n height: Math.min(maxHeight, Math.max(params.minHeight, params.height)),\n }\n}\n\ninterface ResizeProviderProps {\n value: {\n resizeRef: RefObject\n minWidth?: number\n minHeight?: number\n maxWidth?: number\n maxHeight?: number\n devToolsPosition: Corners\n devToolsPanelSize: Record\n storageKey?: string\n initialSize?: { height: number; width: number }\n }\n children: React.ReactNode\n}\n\nexport const ResizeProvider = ({ value, children }: ResizeProviderProps) => {\n const minWidth = value.minWidth ?? 100\n const minHeight = value.minHeight ?? 80\n const maxWidth = value.maxWidth\n const maxHeight = value.maxHeight\n const [draggingDirection, setDraggingDirection] =\n useState(null)\n\n const storageKey = value.storageKey ?? STORE_KEY_SHARED_PANEL_SIZE\n\n const { resizeRef } = value\n const applyConstrainedDimensions = useCallback(() => {\n if (!resizeRef.current) return\n\n // this feels weird to read local storage on resize, but we don't\n // track the dimensions of the container, and this is better than\n // getBoundingClientReact\n\n // an optimization if this is too expensive is to maintain the current\n // container size in a ref and update it on resize, which is essentially\n // what we're doing here, just dumber\n if (draggingDirection !== null) {\n // Don't override live resizing operation with stale cached values.\n return\n }\n\n const dim = value.devToolsPanelSize[storageKey]\n if (!dim) {\n return\n }\n const { height, width } = constrainDimensions({\n ...dim,\n minWidth: minWidth ?? 100,\n minHeight: minHeight ?? 80,\n })\n\n resizeRef.current.style.width = `${width}px`\n resizeRef.current.style.height = `${height}px`\n return true\n }, [\n resizeRef,\n draggingDirection,\n storageKey,\n minWidth,\n minHeight,\n value.devToolsPanelSize,\n ])\n\n const fireInitialConstrainDimensions = useEffectEvent(() => {\n const applied = applyConstrainedDimensions()\n if (\n !applied &&\n resizeRef.current &&\n value.initialSize?.height &&\n value.initialSize.width\n ) {\n const { height, width } = constrainDimensions({\n height: value.initialSize.height,\n width: value.initialSize.width,\n minWidth: minWidth ?? 100,\n minHeight: minHeight ?? 80,\n })\n resizeRef.current.style.width = `${width}px`\n resizeRef.current.style.height = `${height}px`\n }\n })\n\n useLayoutEffect(() => {\n fireInitialConstrainDimensions()\n }, [])\n\n useLayoutEffect(() => {\n window.addEventListener('resize', applyConstrainedDimensions)\n return () =>\n window.removeEventListener('resize', applyConstrainedDimensions)\n }, [\n applyConstrainedDimensions,\n value.initialSize?.height,\n value.initialSize?.width,\n value.resizeRef,\n ])\n\n return (\n \n {children}\n \n )\n}\n\nexport const useResize = () => {\n const context = useContext(ResizeContext)\n if (!context) {\n throw new Error('useResize must be used within a Resize provider')\n }\n return context\n}\n","\n import API from \"!../../../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"../../../../../build/webpack/loaders/devtool/devtool-style-inject.js\";\n import setAttributes from \"!../../../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../../../../../node_modules/.pnpm/css-loader@7.1.2_@rspack+core@1.6.7_@swc+helpers@0.5.15__webpack@5.98.0_@swc+core@1.11.24_@sw_bx7gx6l2cs2trwgqreijicltyy/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!./resize-handle.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn;\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../../../../../node_modules/.pnpm/css-loader@7.1.2_@rspack+core@1.6.7_@swc+helpers@0.5.15__webpack@5.98.0_@swc+core@1.11.24_@sw_bx7gx6l2cs2trwgqreijicltyy/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!./resize-handle.css\";\n export default content && content.locals ? content.locals : undefined;\n","import { useState, useLayoutEffect } from 'react'\nimport type { Corners } from '../../../shared'\nimport { useResize, type ResizeDirection } from './resize-provider'\nimport './resize-handle.css'\nimport { saveDevToolsConfig } from '../../../utils/save-devtools-config'\n\nexport const ResizeHandle = ({\n direction,\n position,\n}: {\n direction: ResizeDirection\n position: Corners\n}) => {\n const {\n resizeRef,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n storageKey,\n draggingDirection,\n setDraggingDirection,\n } = useResize()\n const [borderWidths, setBorderWidths] = useState({\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n })\n\n // TODO: NEXT-4645\n const shouldShowHandle = () => {\n const getOppositeCorner = (corner: Corners): ResizeDirection => {\n switch (corner) {\n case 'top-left':\n return 'bottom-right'\n case 'top-right':\n return 'bottom-left'\n case 'bottom-left':\n return 'top-right'\n case 'bottom-right':\n return 'top-left'\n default: {\n corner satisfies never\n return null!\n }\n }\n }\n\n // we block the sides of the corner its in (bottom-left has bottom and left sides blocked from resizing)\n // because there shouldn't be anywhere to resize, and if the user decides to resize from that point it\n // would be unhandled/slightly janky (the component would have to re-magnetic-snap after the resize)\n if (position.split('-').includes(direction)) return false\n\n // same logic as above, but the only corner resize that makes\n // sense is the corner fully exposed (the opposing corner)\n const isCorner = direction.includes('-')\n if (isCorner) {\n const opposite = getOppositeCorner(position)\n return direction === opposite\n }\n\n return true\n }\n\n // we want the resize lines to be flush with the entire true width of the containers box\n // and we don't want the user of ResizeHandle to have to tell us the border width\n useLayoutEffect(() => {\n if (!resizeRef.current) return\n\n const element = resizeRef.current\n const computedStyle = window.getComputedStyle(element)\n\n const borderTop = parseFloat(computedStyle.borderTopWidth) || 0\n const borderRight = parseFloat(computedStyle.borderRightWidth) || 0\n const borderBottom = parseFloat(computedStyle.borderBottomWidth) || 0\n const borderLeft = parseFloat(computedStyle.borderLeftWidth) || 0\n\n setBorderWidths({\n top: borderTop,\n right: borderRight,\n bottom: borderBottom,\n left: borderLeft,\n })\n }, [resizeRef])\n\n const handleMouseDown = (mouseDownEvent: React.MouseEvent) => {\n mouseDownEvent.preventDefault()\n if (!resizeRef.current) return\n setDraggingDirection(direction)\n\n const element = resizeRef.current\n const initialRect = element.getBoundingClientRect()\n const startX = mouseDownEvent.clientX\n const startY = mouseDownEvent.clientY\n\n const handleMouseMove = (mouseMoveEvent: MouseEvent) => {\n const deltaX = mouseMoveEvent.clientX - startX\n const deltaY = mouseMoveEvent.clientY - startY\n\n const { newWidth, newHeight } = getNewDimensions(\n direction,\n deltaX,\n deltaY,\n initialRect,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight\n )\n\n if (newWidth !== undefined) {\n element.style.width = `${newWidth}px`\n }\n if (newHeight !== undefined) {\n element.style.height = `${newHeight}px`\n }\n }\n\n const handleMouseUp = () => {\n setDraggingDirection(null)\n document.removeEventListener('mousemove', handleMouseMove)\n document.removeEventListener('mouseup', handleMouseUp)\n if (!resizeRef.current) {\n // possible if the user closes during drag\n return\n }\n\n const { width, height } = resizeRef.current.getBoundingClientRect()\n saveDevToolsConfig({\n devToolsPanelSize: { [storageKey]: { width, height } },\n })\n }\n document.addEventListener('mousemove', handleMouseMove)\n document.addEventListener('mouseup', handleMouseUp)\n }\n\n if (!shouldShowHandle()) {\n return null\n }\n const totalHorizontalBorder = borderWidths.left + borderWidths.right\n const totalVerticalBorder = borderWidths.top + borderWidths.bottom\n\n const isCornerHandle = direction.includes('-')\n\n return (\n <>\n {/* this is what actually captures the events, its partially on the container, and partially off */}\n \n\n {/* this panel appears to capture the click, but its just a visual indicator for user of the resize target */}\n {!isCornerHandle && (\n \n )}\n \n )\n}\n\nconst getNewDimensions = (\n direction: ResizeDirection,\n deltaX: number,\n deltaY: number,\n initialRect: DOMRect,\n minWidth: number,\n minHeight: number,\n maxWidth?: number,\n maxHeight?: number\n) => {\n const effectiveMaxWidth = maxWidth ?? window.innerWidth * 0.95\n const effectiveMaxHeight = maxHeight ?? window.innerHeight * 0.95\n\n switch (direction) {\n case 'right':\n return {\n newWidth: Math.min(\n effectiveMaxWidth,\n Math.max(minWidth, initialRect.width + deltaX)\n ),\n newHeight: initialRect.height,\n }\n\n case 'left': {\n return {\n newWidth: Math.min(\n effectiveMaxWidth,\n Math.max(minWidth, initialRect.width - deltaX)\n ),\n newHeight: initialRect.height,\n }\n }\n\n case 'bottom':\n return {\n newWidth: initialRect.width,\n newHeight: Math.min(\n effectiveMaxHeight,\n Math.max(minHeight, initialRect.height + deltaY)\n ),\n }\n\n case 'top': {\n return {\n newWidth: initialRect.width,\n newHeight: Math.min(\n effectiveMaxHeight,\n Math.max(minHeight, initialRect.height - deltaY)\n ),\n }\n }\n\n case 'top-left': {\n return {\n newWidth: Math.min(\n effectiveMaxWidth,\n Math.max(minWidth, initialRect.width - deltaX)\n ),\n newHeight: Math.min(\n effectiveMaxHeight,\n Math.max(minHeight, initialRect.height - deltaY)\n ),\n }\n }\n\n case 'top-right': {\n return {\n newWidth: Math.min(\n effectiveMaxWidth,\n Math.max(minWidth, initialRect.width + deltaX)\n ),\n newHeight: Math.min(\n effectiveMaxHeight,\n Math.max(minHeight, initialRect.height - deltaY)\n ),\n }\n }\n\n case 'bottom-left': {\n return {\n newWidth: Math.min(\n effectiveMaxWidth,\n Math.max(minWidth, initialRect.width - deltaX)\n ),\n newHeight: Math.min(\n effectiveMaxHeight,\n Math.max(minHeight, initialRect.height + deltaY)\n ),\n }\n }\n\n case 'bottom-right':\n return {\n newWidth: Math.min(\n effectiveMaxWidth,\n Math.max(minWidth, initialRect.width + deltaX)\n ),\n newHeight: Math.min(\n effectiveMaxHeight,\n Math.max(minHeight, initialRect.height + deltaY)\n ),\n }\n default: {\n direction satisfies never\n return null!\n }\n }\n}\n","\n import API from \"!../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"../../../build/webpack/loaders/devtool/devtool-style-inject.js\";\n import setAttributes from \"!../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../../../node_modules/.pnpm/css-loader@7.1.2_@rspack+core@1.6.7_@swc+helpers@0.5.15__webpack@5.98.0_@swc+core@1.11.24_@sw_bx7gx6l2cs2trwgqreijicltyy/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!./dynamic-panel.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn;\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../../../node_modules/.pnpm/css-loader@7.1.2_@rspack+core@1.6.7_@swc+helpers@0.5.15__webpack@5.98.0_@swc+core@1.11.24_@sw_bx7gx6l2cs2trwgqreijicltyy/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!./dynamic-panel.css\";\n export default content && content.locals ? content.locals : undefined;\n","import { useRef, useState, useEffect, type CSSProperties } from 'react'\nimport { useDevOverlayContext } from '../../dev-overlay.browser'\nimport { INDICATOR_PADDING } from '../components/devtools-indicator/devtools-indicator'\nimport { ResizeHandle } from '../components/devtools-panel/resize/resize-handle'\nimport { ResizeProvider } from '../components/devtools-panel/resize/resize-provider'\nimport {\n DragHandle,\n DragProvider,\n} from '../components/errors/dev-tools-indicator/drag-context'\nimport { Draggable } from '../components/errors/dev-tools-indicator/draggable'\nimport { useClickOutsideAndEscape } from '../components/errors/dev-tools-indicator/utils'\nimport { usePanelRouterContext } from '../menu/context'\nimport { usePanelContext } from '../menu/panel-router'\nimport {\n ACTION_DEVTOOLS_PANEL_POSITION,\n STORAGE_KEY_PANEL_POSITION_PREFIX,\n STORE_KEY_PANEL_SIZE_PREFIX,\n STORE_KEY_SHARED_PANEL_LOCATION,\n STORE_KEY_SHARED_PANEL_SIZE,\n} from '../shared'\nimport { getIndicatorOffset } from '../utils/indicator-metrics'\nimport { saveDevToolsConfig } from '../utils/save-devtools-config'\nimport './dynamic-panel.css'\n\nfunction resolveCSSValue(\n value: string | number,\n dimension: 'width' | 'height' = 'width'\n): number {\n if (typeof value === 'number') return value\n\n // kinda hacky, might be a better way to do this\n const temp = document.createElement('div')\n temp.style.position = 'absolute'\n temp.style.visibility = 'hidden'\n if (dimension === 'width') {\n temp.style.width = value\n } else {\n temp.style.height = value\n }\n document.body.appendChild(temp)\n const pixels = dimension === 'width' ? temp.offsetWidth : temp.offsetHeight\n document.body.removeChild(temp)\n return pixels\n}\n\nfunction useResolvedDimensions(\n minWidth?: string | number,\n minHeight?: string | number,\n maxWidth?: string | number,\n maxHeight?: string | number\n) {\n const [dimensions, setDimensions] = useState(() => ({\n minWidth: minWidth ? resolveCSSValue(minWidth, 'width') : undefined,\n minHeight: minHeight ? resolveCSSValue(minHeight, 'height') : undefined,\n maxWidth: maxWidth ? resolveCSSValue(maxWidth, 'width') : undefined,\n maxHeight: maxHeight ? resolveCSSValue(maxHeight, 'height') : undefined,\n }))\n\n useEffect(() => {\n const updateDimensions = () => {\n setDimensions({\n minWidth: minWidth ? resolveCSSValue(minWidth, 'width') : undefined,\n minHeight: minHeight ? resolveCSSValue(minHeight, 'height') : undefined,\n maxWidth: maxWidth ? resolveCSSValue(maxWidth, 'width') : undefined,\n maxHeight: maxHeight ? resolveCSSValue(maxHeight, 'height') : undefined,\n })\n }\n\n window.addEventListener('resize', updateDimensions)\n return () => window.removeEventListener('resize', updateDimensions)\n }, [minWidth, minHeight, maxWidth, maxHeight])\n\n return dimensions\n}\n\nexport function DynamicPanel({\n header,\n children,\n draggable = false,\n sizeConfig = {\n kind: 'resizable',\n minWidth: 400,\n minHeight: 350,\n maxWidth: 1000,\n maxHeight: 1000,\n initialSize: {\n height: 400,\n width: 500,\n },\n },\n closeOnClickOutside = false,\n sharePanelSizeGlobally = true,\n sharePanelPositionGlobally = true,\n containerProps,\n}: {\n header: React.ReactNode\n children: React.ReactNode\n draggable?: boolean\n sharePanelSizeGlobally?: boolean\n sharePanelPositionGlobally?: boolean\n containerProps?: React.HTMLProps\n sizeConfig?:\n | {\n kind: 'resizable'\n minWidth: string | number\n minHeight: string | number\n maxWidth: string | number\n maxHeight: string | number\n initialSize: { height: number; width: number }\n sides?: Array<'horizontal' | 'vertical' | 'diagonal'>\n }\n | {\n kind: 'fixed'\n height: number\n width: number\n }\n closeOnClickOutside?: boolean\n}) {\n const { setPanel } = usePanelRouterContext()\n const { name, mounted } = usePanelContext()\n const resizeStorageKey = sharePanelSizeGlobally\n ? STORE_KEY_SHARED_PANEL_SIZE\n : `${STORE_KEY_PANEL_SIZE_PREFIX}_${name}`\n\n const positionStorageKey = sharePanelPositionGlobally\n ? STORE_KEY_SHARED_PANEL_LOCATION\n : `${STORAGE_KEY_PANEL_POSITION_PREFIX}_${name}`\n\n const { dispatch, state } = useDevOverlayContext()\n const devtoolsPanelPosition =\n state.devToolsPanelPosition[positionStorageKey] ?? state.devToolsPosition\n const [panelVertical, panelHorizontal] = devtoolsPanelPosition.split('-', 2)\n const resizeContainerRef = useRef(null)\n const { triggerRef } = usePanelRouterContext()\n\n useClickOutsideAndEscape(\n resizeContainerRef,\n triggerRef,\n mounted,\n (reason) => {\n switch (reason) {\n case 'escape': {\n setPanel('panel-selector')\n return\n }\n case 'outside': {\n if (closeOnClickOutside) {\n setPanel('panel-selector')\n }\n return\n }\n default: {\n return null!\n }\n }\n }\n )\n\n const indicatorOffset = getIndicatorOffset(state)\n\n const [indicatorVertical, indicatorHorizontal] = state.devToolsPosition.split(\n '-',\n 2\n )\n\n const verticalOffset =\n panelVertical === indicatorVertical &&\n panelHorizontal === indicatorHorizontal\n ? indicatorOffset\n : INDICATOR_PADDING\n\n const positionStyle = {\n [panelVertical]: `${verticalOffset}px`,\n [panelHorizontal]: `${INDICATOR_PADDING}px`,\n [panelVertical === 'top' ? 'bottom' : 'top']: 'auto',\n [panelHorizontal === 'left' ? 'right' : 'left']: 'auto',\n } as CSSProperties\n\n const isResizable = sizeConfig.kind === 'resizable'\n\n const resolvedDimensions = useResolvedDimensions(\n isResizable ? sizeConfig.minWidth : undefined,\n isResizable ? sizeConfig.minHeight : undefined,\n isResizable ? sizeConfig.maxWidth : undefined,\n isResizable ? sizeConfig.maxHeight : undefined\n )\n\n const minWidth = resolvedDimensions.minWidth\n const minHeight = resolvedDimensions.minHeight\n const maxWidth = resolvedDimensions.maxWidth\n const maxHeight = resolvedDimensions.maxHeight\n\n const panelSizeKey = name\n ? `${STORE_KEY_PANEL_SIZE_PREFIX}_${name}`\n : STORE_KEY_SHARED_PANEL_SIZE\n const panelSize = state.devToolsPanelSize[panelSizeKey]\n\n return (\n \n \n }\n >\n \n {\n dispatch({\n type: ACTION_DEVTOOLS_PANEL_POSITION,\n devToolsPanelPosition: p,\n key: positionStorageKey,\n })\n\n if (sizeConfig.kind === 'resizable') {\n saveDevToolsConfig({\n devToolsPanelPosition: {\n [positionStorageKey]: p,\n },\n })\n }\n }}\n style={{\n overflow: 'auto',\n width: '100%',\n height: '100%',\n }}\n disableDrag={!draggable}\n >\n <>\n \n {header}\n \n {children}\n \n \n {isResizable && (\n <>\n {(!sizeConfig.sides ||\n sizeConfig.sides.includes('vertical')) && (\n <>\n \n \n \n )}\n {(!sizeConfig.sides ||\n sizeConfig.sides.includes('horizontal')) && (\n <>\n \n \n \n )}\n {(!sizeConfig.sides ||\n sizeConfig.sides.includes('diagonal')) && (\n <>\n \n \n \n \n \n )}\n \n )}\n \n \n \n \n \n )\n}\n","import type { ComponentProps } from 'react'\n\nfunction StaticRouteContent({\n routerType,\n ...props\n}: { routerType: 'pages' | 'app' } & ComponentProps<'div'>) {\n return (\n
\n

\n The path{' '}\n {window.location.pathname}{' '}\n is marked as \"static\" since it will be prerendered during the build\n time.\n

\n

\n With Static Rendering, routes are rendered at build time, or in the\n background after{' '}\n \n data revalidation\n \n .\n

\n

\n Static rendering is useful when a route has data that is not\n personalized to the user and can be known at build time, such as a\n static blog post or a product page.\n

\n
\n )\n}\n\nfunction DynamicRouteContent({\n routerType,\n ...props\n}: { routerType: 'pages' | 'app' } & ComponentProps<'div'>) {\n return (\n
\n

\n The path{' '}\n {window.location.pathname}{' '}\n is marked as \"dynamic\" since it will be rendered for each user at{' '}\n request time.\n

\n

\n Dynamic rendering is useful when a route has data that is personalized\n to the user or has information that can only be known at request time,\n such as cookies or the URL's search params.\n

\n {routerType === 'pages' ? (\n

\n Exporting the{' '}\n \n getServerSideProps\n {' '}\n function will opt the route into dynamic rendering. This function will\n be called by the server on every request.\n

\n ) : (\n

\n During rendering, if a{' '}\n \n Dynamic API\n {' '}\n or a{' '}\n \n fetch\n {' '}\n option of{' '}\n {`{ cache: 'no-store' }`}{' '}\n is discovered, Next.js will switch to dynamically rendering the whole\n route.\n

\n )}\n
\n )\n}\n\nexport const learnMoreLink = {\n pages: {\n static:\n 'https://nextjs.org/docs/pages/building-your-application/rendering/static-site-generation',\n dynamic:\n 'https://nextjs.org/docs/pages/building-your-application/rendering/server-side-rendering',\n },\n app: {\n static:\n 'https://nextjs.org/docs/app/building-your-application/rendering/server-components#static-rendering-default',\n dynamic:\n 'https://nextjs.org/docs/app/building-your-application/rendering/server-components#dynamic-rendering',\n },\n} as const\n\nexport function RouteInfoBody({\n routerType,\n isStaticRoute,\n ...props\n}: {\n routerType: 'pages' | 'app'\n isStaticRoute: boolean\n} & ComponentProps<'div'>) {\n return isStaticRoute ? (\n \n ) : (\n \n )\n}\n","\n import API from \"!../../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"../../../../build/webpack/loaders/devtool/devtool-style-inject.js\";\n import setAttributes from \"!../../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../../../../node_modules/.pnpm/css-loader@7.1.2_@rspack+core@1.6.7_@swc+helpers@0.5.15__webpack@5.98.0_@swc+core@1.11.24_@sw_bx7gx6l2cs2trwgqreijicltyy/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!./segment-explorer.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn;\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../../../../node_modules/.pnpm/css-loader@7.1.2_@rspack+core@1.6.7_@swc+helpers@0.5.15__webpack@5.98.0_@swc+core@1.11.24_@sw_bx7gx6l2cs2trwgqreijicltyy/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!./segment-explorer.css\";\n export default content && content.locals ? content.locals : undefined;\n","import { useSyncExternalStore } from 'react'\nimport type { SegmentNodeState } from '../userspace/app/segment-explorer-node'\n\n/**\n * Trie data structure for storing and searching paths\n *\n * This can be used to store app router paths and search for them efficiently.\n * e.g.\n *\n * [trie root]\n * ├── layout.js\n * ├── page.js\n * ├── blog\n * ├── layout.js\n * ├── page.js\n * ├── [slug]\n * ├── layout.js\n * ├── page.js\n **/\n\ntype TrieNode = {\n value: Value | undefined\n children: {\n [key: string]: TrieNode | undefined\n }\n}\n\ntype Trie = {\n insert: (value: Value) => void\n remove: (value: Value) => void\n getRoot: () => TrieNode\n}\n\nconst listeners = new Set<() => void>()\nconst createSegmentTreeStore = (): {\n subscribe: (callback: () => void) => () => void\n getSnapshot: () => SegmentTrieNode\n getServerSnapshot: () => SegmentTrieNode\n} => {\n // return a store that can be used by useSyncExternalStore\n return {\n subscribe: (callback) => {\n listeners.add(callback)\n return () => listeners.delete(callback)\n },\n getSnapshot: () => {\n return trie.getRoot()\n },\n getServerSnapshot: () => {\n return trie.getRoot()\n },\n }\n}\n\n// TODO: Move the Segment Tree into React State\nconst { subscribe, getSnapshot, getServerSnapshot } = createSegmentTreeStore()\n\nfunction createTrie({\n getCharacters = (item: Value) => [item] as string[],\n compare = (a: Value | undefined, b: Value | undefined) => a === b,\n}: {\n getCharacters?: (item: Value) => string[]\n compare?: (a: Value | undefined, b: Value | undefined) => boolean\n}): Trie {\n let root: TrieNode = {\n value: undefined,\n children: {},\n }\n\n function markUpdated() {\n for (const listener of listeners) {\n listener()\n }\n }\n\n function insert(value: Value) {\n let currentNode = root\n const segments = getCharacters(value)\n\n for (const segment of segments) {\n if (!currentNode.children[segment]) {\n currentNode.children[segment] = {\n value: undefined,\n // Skip value for intermediate nodes\n children: {},\n }\n }\n currentNode = currentNode.children[segment]\n }\n\n currentNode.value = value\n\n root = { ...root }\n markUpdated()\n }\n\n function remove(value: Value) {\n let currentNode = root\n const segments = getCharacters(value)\n\n const stack: TrieNode[] = []\n let found = true\n for (const segment of segments) {\n if (!currentNode.children[segment]) {\n found = false\n break\n }\n stack.push(currentNode)\n currentNode = currentNode.children[segment]!\n }\n // If the value is not found, skip removal\n if (!found || !compare(currentNode.value, value)) {\n return\n }\n currentNode.value = undefined\n for (let i = stack.length - 1; i >= 0; i--) {\n const parentNode = stack[i]\n const segment = segments[i]\n if (Object.keys(parentNode.children[segment]!.children).length === 0) {\n delete parentNode.children[segment]\n }\n }\n\n root = { ...root }\n markUpdated()\n }\n\n function getRoot(): TrieNode {\n return root\n }\n\n return { insert, remove, getRoot }\n}\n\ntype SegmentTrie = Trie\nexport type SegmentTrieNode = TrieNode\n\nconst trie: SegmentTrie = createTrie({\n compare: (a, b) => {\n if (!a || !b) return false\n return (\n a.pagePath === b.pagePath &&\n a.type === b.type &&\n a.boundaryType === b.boundaryType\n )\n },\n getCharacters: (item) => item.pagePath.split('/'),\n})\nexport const insertSegmentNode = trie.insert\nexport const removeSegmentNode = trie.remove\nexport const getSegmentTrieRoot = trie.getRoot\n\nexport function useSegmentTree(): SegmentTrieNode {\n const state = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot)\n return state\n}\n","\n import API from \"!../../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"../../../../build/webpack/loaders/devtool/devtool-style-inject.js\";\n import setAttributes from \"!../../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../../../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.98.0_@swc+core@1.11.24_@swc+helpers@0.5.15__esbuild@0.25.9_/node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../../../../node_modules/.pnpm/css-loader@7.1.2_@rspack+core@1.6.7_@swc+helpers@0.5.15__webpack@5.98.0_@swc+core@1.11.24_@sw_bx7gx6l2cs2trwgqreijicltyy/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!./segment-boundary-trigger.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn;\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../../../../node_modules/.pnpm/css-loader@7.1.2_@rspack+core@1.6.7_@swc+helpers@0.5.15__webpack@5.98.0_@swc+core@1.11.24_@sw_bx7gx6l2cs2trwgqreijicltyy/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!./segment-boundary-trigger.css\";\n export default content && content.locals ? content.locals : undefined;\n","'use client';\n\nimport * as React from 'react';\nconst UNINITIALIZED = {};\n\n/**\n * A React.useRef() that is initialized with a function. Note that it accepts an optional\n * initialization argument, so the initialization function doesn't need to be an inline closure.\n *\n * @usage\n * const ref = useRefWithInit(sortColumns, columns)\n */\n\nexport function useRefWithInit(init, initArg) {\n const ref = React.useRef(UNINITIALIZED);\n if (ref.current === UNINITIALIZED) {\n ref.current = init(initArg);\n }\n return ref;\n}","'use client';\n\nimport * as React from 'react';\nconst EMPTY = [];\n\n/**\n * A React.useEffect equivalent that runs once, when the component is mounted.\n */\nexport function useOnMount(fn) {\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- no need to put `fn` in the dependency array\n /* eslint-disable react-hooks/exhaustive-deps */\n React.useEffect(fn, EMPTY);\n /* eslint-enable react-hooks/exhaustive-deps */\n}","'use client';\n\nimport { useRefWithInit } from \"./useRefWithInit.js\";\nimport { useOnMount } from \"./useOnMount.js\";\nconst EMPTY = 0;\nexport class Timeout {\n static create() {\n return new Timeout();\n }\n currentId = (() => EMPTY)();\n\n /**\n * Executes `fn` after `delay`, clearing any previously scheduled call.\n */\n start(delay, fn) {\n this.clear();\n this.currentId = setTimeout(() => {\n this.currentId = EMPTY;\n fn();\n }, delay); /* Node.js types are enabled in development */\n }\n isStarted() {\n return this.currentId !== EMPTY;\n }\n clear = () => {\n if (this.currentId !== EMPTY) {\n clearTimeout(this.currentId);\n this.currentId = EMPTY;\n }\n };\n disposeEffect = () => {\n return this.clear;\n };\n}\n\n/**\n * A `setTimeout` with automatic cleanup and guard.\n */\nexport function useTimeout() {\n const timeout = useRefWithInit(Timeout.create).current;\n useOnMount(timeout.disposeEffect);\n return timeout;\n}","'use client';\n\nimport * as React from 'react';\nimport { useRefWithInit } from \"./useRefWithInit.js\";\n\n// https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379\nconst useInsertionEffect = React[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0, -3)];\nconst useSafeInsertionEffect =\n// React 17 doesn't have useInsertionEffect.\nuseInsertionEffect &&\n// Preact replaces useInsertionEffect with useLayoutEffect and fires too late.\nuseInsertionEffect !== React.useLayoutEffect ? useInsertionEffect : fn => fn();\nexport function useEventCallback(callback) {\n const stable = useRefWithInit(createStableCallback).current;\n stable.next = callback;\n useSafeInsertionEffect(stable.effect);\n return stable.trampoline;\n}\nfunction createStableCallback() {\n const stable = {\n next: undefined,\n callback: assertNotCalled,\n trampoline: (...args) => stable.callback?.(...args),\n effect: () => {\n stable.callback = stable.next;\n }\n };\n return stable;\n}\nfunction assertNotCalled() {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error('Base UI: Cannot call an event handler while rendering.');\n }\n}","'use client';\n\n// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- process.env never changes, dependency arrays are intentionally ignored\n/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\nimport * as React from 'react';\nexport function useControlled({\n controlled,\n default: defaultProp,\n name,\n state = 'value'\n}) {\n // isControlled is ignored in the hook dependency lists as it should never change.\n const {\n current: isControlled\n } = React.useRef(controlled !== undefined);\n const [valueState, setValue] = React.useState(defaultProp);\n const value = isControlled ? controlled : valueState;\n if (process.env.NODE_ENV !== 'production') {\n React.useEffect(() => {\n if (isControlled !== (controlled !== undefined)) {\n console.error([`Base UI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', \"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'].join('\\n'));\n }\n }, [state, name, controlled]);\n const {\n current: defaultValue\n } = React.useRef(defaultProp);\n React.useEffect(() => {\n // Object.is() is not equivalent to the === operator.\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is for more details.\n if (!isControlled && !Object.is(defaultValue, defaultProp)) {\n console.error([`Base UI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\\n'));\n }\n }, [JSON.stringify(defaultProp)]);\n }\n const setValueIfUncontrolled = React.useCallback(newValue => {\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n return [value, setValueIfUncontrolled];\n}","import * as React from 'react';\n\n// https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379\nexport const SafeReact = {\n ...React\n};","'use client';\n\nimport * as React from 'react';\nimport { SafeReact } from \"./safeReact.js\";\nlet globalId = 0;\n\n// TODO React 17: Remove `useGlobalId` once React 17 support is removed\nfunction useGlobalId(idOverride, prefix = 'mui') {\n const [defaultId, setDefaultId] = React.useState(idOverride);\n const id = idOverride || defaultId;\n React.useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`${prefix}-${globalId}`);\n }\n }, [defaultId, prefix]);\n return id;\n}\nconst maybeReactUseId = SafeReact.useId;\n\n/**\n *\n * @example
\n * @param idOverride\n * @returns {string}\n */\nexport function useId(idOverride, prefix) {\n // React.useId() is only available from React 17.0.0.\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride ?? (prefix ? `${prefix}-${reactId}` : reactId);\n }\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride, prefix);\n}","export function createEventEmitter() {\n const map = new Map();\n return {\n emit(event, data) {\n map.get(event)?.forEach(listener => listener(data));\n },\n on(event, listener) {\n if (!map.has(event)) {\n map.set(event, new Set());\n }\n map.get(event).add(listener);\n },\n off(event, listener) {\n map.get(event)?.delete(listener);\n }\n };\n}","'use client';\n\nimport * as React from 'react';\nconst noop = () => {};\nexport const useIsoLayoutEffect = typeof document !== 'undefined' ? React.useLayoutEffect : noop;","import * as React from 'react';\nimport { useId } from '@base-ui-components/utils/useId';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { createEventEmitter } from \"../utils/createEventEmitter.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FloatingNodeContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") FloatingNodeContext.displayName = \"FloatingNodeContext\";\nconst FloatingTreeContext = /*#__PURE__*/React.createContext(null);\n\n/**\n * Returns the parent node id for nested floating elements, if available.\n * Returns `null` for top-level floating elements.\n */\nif (process.env.NODE_ENV !== \"production\") FloatingTreeContext.displayName = \"FloatingTreeContext\";\nexport const useFloatingParentNodeId = () => React.useContext(FloatingNodeContext)?.id || null;\n\n/**\n * Returns the nearest floating tree context, if available.\n */\nexport const useFloatingTree = () => React.useContext(FloatingTreeContext);\n\n/**\n * Registers a node into the `FloatingTree`, returning its id.\n * @see https://floating-ui.com/docs/FloatingTree\n */\nexport function useFloatingNodeId(customParentId) {\n const id = useId();\n const tree = useFloatingTree();\n const reactParentId = useFloatingParentNodeId();\n const parentId = customParentId || reactParentId;\n useIsoLayoutEffect(() => {\n if (!id) {\n return undefined;\n }\n const node = {\n id,\n parentId\n };\n tree?.addNode(node);\n return () => {\n tree?.removeNode(node);\n };\n }, [tree, id, parentId]);\n return id;\n}\n/**\n * Provides parent node context for nested floating elements.\n * @see https://floating-ui.com/docs/FloatingTree\n * @internal\n */\nexport function FloatingNode(props) {\n const {\n children,\n id\n } = props;\n const parentId = useFloatingParentNodeId();\n return /*#__PURE__*/_jsx(FloatingNodeContext.Provider, {\n value: React.useMemo(() => ({\n id,\n parentId\n }), [id, parentId]),\n children: children\n });\n}\n/**\n * Provides context for nested floating elements when they are not children of\n * each other on the DOM.\n * This is not necessary in all cases, except when there must be explicit communication between parent and child floating elements. It is necessary for:\n * - The `bubbles` option in the `useDismiss()` Hook\n * - Nested virtual list navigation\n * - Nested floating elements that each open on hover\n * - Custom communication between parent and child floating elements\n * @see https://floating-ui.com/docs/FloatingTree\n * @internal\n */\nexport function FloatingTree(props) {\n const {\n children\n } = props;\n const nodesRef = React.useRef([]);\n const addNode = React.useCallback(node => {\n nodesRef.current = [...nodesRef.current, node];\n }, []);\n const removeNode = React.useCallback(node => {\n nodesRef.current = nodesRef.current.filter(n => n !== node);\n }, []);\n const [events] = React.useState(() => createEventEmitter());\n return /*#__PURE__*/_jsx(FloatingTreeContext.Provider, {\n value: React.useMemo(() => ({\n nodesRef,\n addNode,\n removeNode,\n events\n }), [addNode, removeNode, events]),\n children: children\n });\n}","import * as React from 'react';\nimport { isElement } from '@floating-ui/utils/dom';\nimport { useEventCallback } from '@base-ui-components/utils/useEventCallback';\nimport { useId } from '@base-ui-components/utils/useId';\nimport { createEventEmitter } from \"../utils/createEventEmitter.js\";\nimport { useFloatingParentNodeId } from \"../components/FloatingTree.js\";\nexport function useFloatingRootContext(options) {\n const {\n open = false,\n onOpenChange: onOpenChangeProp,\n elements: elementsProp\n } = options;\n const floatingId = useId();\n const dataRef = React.useRef({});\n const [events] = React.useState(() => createEventEmitter());\n const nested = useFloatingParentNodeId() != null;\n if (process.env.NODE_ENV !== 'production') {\n const optionDomReference = elementsProp.reference;\n if (optionDomReference && !isElement(optionDomReference)) {\n console.error('Cannot pass a virtual element to the `elements.reference` option,', 'as it must be a real DOM element. Use `refs.setPositionReference()`', 'instead.');\n }\n }\n const [positionReference, setPositionReference] = React.useState(elementsProp.reference);\n const onOpenChange = useEventCallback((newOpen, event, reason) => {\n dataRef.current.openEvent = newOpen ? event : undefined;\n events.emit('openchange', {\n open: newOpen,\n event,\n reason,\n nested\n });\n onOpenChangeProp?.(newOpen, event, reason);\n });\n const refs = React.useMemo(() => ({\n setPositionReference\n }), []);\n const elements = React.useMemo(() => ({\n reference: positionReference || elementsProp.reference || null,\n floating: elementsProp.floating || null,\n domReference: elementsProp.reference\n }), [positionReference, elementsProp.reference, elementsProp.floating]);\n return React.useMemo(() => ({\n dataRef,\n open,\n onOpenChange,\n elements,\n events,\n floatingId,\n refs\n }), [open, onOpenChange, elements, events, floatingId, refs]);\n}","function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nconst invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);\n}\nconst tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);\nfunction isTableElement(element) {\n return tableElements.has(getNodeName(element));\n}\nconst topLayerSelectors = [':popover-open', ':modal'];\nfunction isTopLayer(element) {\n return topLayerSelectors.some(selector => {\n try {\n return element.matches(selector);\n } catch (_e) {\n return false;\n }\n });\n}\nconst transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];\nconst willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];\nconst containValues = ['paint', 'layout', 'strict', 'content'];\nfunction isContainingBlock(elementOrCss) {\n const webkit = isWebKit();\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nconst lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);\nfunction isLastTraversableNode(node) {\n return lastTraversableNodeNames.has(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","'use client';\n\nimport { useIsoLayoutEffect } from \"./useIsoLayoutEffect.js\";\nimport { useRefWithInit } from \"./useRefWithInit.js\";\nexport function useLatestRef(value) {\n const latest = useRefWithInit(createLatestRef, value).current;\n latest.next = value;\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useIsoLayoutEffect(latest.effect);\n return latest;\n}\nfunction createLatestRef(value) {\n const latest = {\n current: value,\n next: value,\n effect: () => {\n latest.current = latest.next;\n }\n };\n return latest;\n}","const hasNavigator = typeof navigator !== 'undefined';\nconst nav = getNavigatorData();\nconst platform = getPlatform();\nconst userAgent = getUserAgent();\nexport const isWebKit = typeof CSS === 'undefined' || !CSS.supports ? false : CSS.supports('-webkit-backdrop-filter:none');\nexport const isIOS =\n// iPads can claim to be MacIntel\nnav.platform === 'MacIntel' && nav.maxTouchPoints > 1 ? true : /iP(hone|ad|od)|iOS/.test(nav.platform);\nexport const isFirefox = hasNavigator && /firefox/i.test(userAgent);\nexport const isSafari = hasNavigator && /apple/i.test(navigator.vendor);\nexport const isAndroid = hasNavigator && /android/i.test(platform) || /android/i.test(userAgent);\nexport const isMac = hasNavigator && platform.toLowerCase().startsWith('mac') && !navigator.maxTouchPoints;\nexport const isJSDOM = userAgent.includes('jsdom/');\n\n// Avoid Chrome DevTools blue warning.\nfunction getNavigatorData() {\n if (!hasNavigator) {\n return {\n platform: '',\n maxTouchPoints: -1\n };\n }\n const uaData = navigator.userAgentData;\n if (uaData?.platform) {\n return {\n platform: uaData.platform,\n maxTouchPoints: navigator.maxTouchPoints\n };\n }\n return {\n platform: navigator.platform ?? '',\n maxTouchPoints: navigator.maxTouchPoints ?? -1\n };\n}\nfunction getUserAgent() {\n if (!hasNavigator) {\n return '';\n }\n const uaData = navigator.userAgentData;\n if (uaData && Array.isArray(uaData.brands)) {\n return uaData.brands.map(({\n brand,\n version\n }) => `${brand}/${version}`).join(' ');\n }\n return navigator.userAgent;\n}\nfunction getPlatform() {\n if (!hasNavigator) {\n return '';\n }\n const uaData = navigator.userAgentData;\n if (uaData?.platform) {\n return uaData.platform;\n }\n return navigator.platform ?? '';\n}","import { isAndroid, isJSDOM } from '@base-ui-components/utils/detectBrowser';\nexport function stopEvent(event) {\n event.preventDefault();\n event.stopPropagation();\n}\nexport function isReactEvent(event) {\n return 'nativeEvent' in event;\n}\n\n// License: https://github.com/adobe/react-spectrum/blob/b35d5c02fe900badccd0cf1a8f23bb593419f238/packages/@react-aria/utils/src/isVirtualEvent.ts\nexport function isVirtualClick(event) {\n // FIXME: Firefox is now emitting a deprecation warning for `mozInputSource`.\n // Try to find a workaround for this. `react-aria` source still has the check.\n if (event.mozInputSource === 0 && event.isTrusted) {\n return true;\n }\n if (isAndroid && event.pointerType) {\n return event.type === 'click' && event.buttons === 1;\n }\n return event.detail === 0 && !event.pointerType;\n}\nexport function isVirtualPointerEvent(event) {\n if (isJSDOM) {\n return false;\n }\n return !isAndroid && event.width === 0 && event.height === 0 || isAndroid && event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'mouse' ||\n // iOS VoiceOver returns 0.333• for width/height.\n event.width < 1 && event.height < 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'touch';\n}\nexport function isMouseLikePointerType(pointerType, strict) {\n // On some Linux machines with Chromium, mouse inputs return a `pointerType`\n // of \"pen\": https://github.com/floating-ui/floating-ui/issues/2015\n const values = ['mouse', 'pen'];\n if (!strict) {\n values.push('', undefined);\n }\n return values.includes(pointerType);\n}","export const FOCUSABLE_ATTRIBUTE = 'data-base-ui-focusable';\nexport const ACTIVE_KEY = 'active';\nexport const SELECTED_KEY = 'selected';\nexport const TYPEABLE_SELECTOR = \"input:not([type='hidden']):not([disabled]),\" + \"[contenteditable]:not([contenteditable='false']),textarea:not([disabled])\";\nexport const ARROW_LEFT = 'ArrowLeft';\nexport const ARROW_RIGHT = 'ArrowRight';\nexport const ARROW_UP = 'ArrowUp';\nexport const ARROW_DOWN = 'ArrowDown';","import { isHTMLElement, isShadowRoot } from '@floating-ui/utils/dom';\nimport { isJSDOM } from '@base-ui-components/utils/detectBrowser';\nimport { FOCUSABLE_ATTRIBUTE, TYPEABLE_SELECTOR } from \"./constants.js\";\nexport function activeElement(doc) {\n let element = doc.activeElement;\n while (element?.shadowRoot?.activeElement != null) {\n element = element.shadowRoot.activeElement;\n }\n return element;\n}\nexport function contains(parent, child) {\n if (!parent || !child) {\n return false;\n }\n const rootNode = child.getRootNode?.();\n\n // First, attempt with faster native method\n if (parent.contains(child)) {\n return true;\n }\n\n // then fallback to custom implementation with Shadow DOM support\n if (rootNode && isShadowRoot(rootNode)) {\n let next = child;\n while (next) {\n if (parent === next) {\n return true;\n }\n // @ts-ignore\n next = next.parentNode || next.host;\n }\n }\n\n // Give up, the result is false\n return false;\n}\nexport function getTarget(event) {\n if ('composedPath' in event) {\n return event.composedPath()[0];\n }\n\n // TS thinks `event` is of type never as it assumes all browsers support\n // `composedPath()`, but browsers without shadow DOM don't.\n return event.target;\n}\nexport function isEventTargetWithin(event, node) {\n if (node == null) {\n return false;\n }\n if ('composedPath' in event) {\n return event.composedPath().includes(node);\n }\n\n // TS thinks `event` is of type never as it assumes all browsers support composedPath, but browsers without shadow dom don't\n const eventAgain = event;\n return eventAgain.target != null && node.contains(eventAgain.target);\n}\nexport function isRootElement(element) {\n return element.matches('html,body');\n}\nexport function getDocument(node) {\n return node?.ownerDocument || document;\n}\nexport function isTypeableElement(element) {\n return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);\n}\nexport function isTypeableCombobox(element) {\n if (!element) {\n return false;\n }\n return element.getAttribute('role') === 'combobox' && isTypeableElement(element);\n}\nexport function matchesFocusVisible(element) {\n // We don't want to block focus from working with `visibleOnly`\n // (JSDOM doesn't match `:focus-visible` when the element has `:focus`)\n if (!element || isJSDOM) {\n return true;\n }\n try {\n return element.matches(':focus-visible');\n } catch (_e) {\n return true;\n }\n}\nexport function getFloatingFocusElement(floatingElement) {\n if (!floatingElement) {\n return null;\n }\n // Try to find the element that has `{...getFloatingProps()}` spread on it.\n // This indicates the floating element is acting as a positioning wrapper, and\n // so focus should be managed on the child element with the event handlers and\n // aria props.\n return floatingElement.hasAttribute(FOCUSABLE_ATTRIBUTE) ? floatingElement : floatingElement.querySelector(`[${FOCUSABLE_ATTRIBUTE}]`) || floatingElement;\n}","export function createAttribute(name) {\n return `data-base-ui-${name}`;\n}","import * as React from 'react';\nimport { isElement } from '@floating-ui/utils/dom';\nimport { useTimeout } from '@base-ui-components/utils/useTimeout';\nimport { useLatestRef } from '@base-ui-components/utils/useLatestRef';\nimport { useEventCallback } from '@base-ui-components/utils/useEventCallback';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { contains, getDocument, isMouseLikePointerType } from \"../utils.js\";\nimport { useFloatingParentNodeId, useFloatingTree } from \"../components/FloatingTree.js\";\nimport { createAttribute } from \"../utils/createAttribute.js\";\nconst safePolygonIdentifier = createAttribute('safe-polygon');\nexport function getDelay(value, prop, pointerType) {\n if (pointerType && !isMouseLikePointerType(pointerType)) {\n return 0;\n }\n if (typeof value === 'number') {\n return value;\n }\n if (typeof value === 'function') {\n const result = value();\n if (typeof result === 'number') {\n return result;\n }\n return result?.[prop];\n }\n return value?.[prop];\n}\nfunction getRestMs(value) {\n if (typeof value === 'function') {\n return value();\n }\n return value;\n}\n/**\n * Opens the floating element while hovering over the reference element, like\n * CSS `:hover`.\n * @see https://floating-ui.com/docs/useHover\n */\nexport function useHover(context, props = {}) {\n const {\n open,\n onOpenChange,\n dataRef,\n events,\n elements\n } = context;\n const {\n enabled = true,\n delay = 0,\n handleClose = null,\n mouseOnly = false,\n restMs = 0,\n move = true\n } = props;\n const tree = useFloatingTree();\n const parentId = useFloatingParentNodeId();\n const handleCloseRef = useLatestRef(handleClose);\n const delayRef = useLatestRef(delay);\n const openRef = useLatestRef(open);\n const restMsRef = useLatestRef(restMs);\n const pointerTypeRef = React.useRef(undefined);\n const timeout = useTimeout();\n const handlerRef = React.useRef(undefined);\n const restTimeout = useTimeout();\n const blockMouseMoveRef = React.useRef(true);\n const performedPointerEventsMutationRef = React.useRef(false);\n const unbindMouseMoveRef = React.useRef(() => {});\n const restTimeoutPendingRef = React.useRef(false);\n const isHoverOpen = useEventCallback(() => {\n const type = dataRef.current.openEvent?.type;\n return type?.includes('mouse') && type !== 'mousedown';\n });\n\n // When closing before opening, clear the delay timeouts to cancel it\n // from showing.\n React.useEffect(() => {\n if (!enabled) {\n return undefined;\n }\n function onOpenChangeLocal({\n open: newOpen\n }) {\n if (!newOpen) {\n timeout.clear();\n restTimeout.clear();\n blockMouseMoveRef.current = true;\n restTimeoutPendingRef.current = false;\n }\n }\n events.on('openchange', onOpenChangeLocal);\n return () => {\n events.off('openchange', onOpenChangeLocal);\n };\n }, [enabled, events, timeout, restTimeout]);\n React.useEffect(() => {\n if (!enabled) {\n return undefined;\n }\n if (!handleCloseRef.current) {\n return undefined;\n }\n if (!open) {\n return undefined;\n }\n function onLeave(event) {\n if (isHoverOpen()) {\n onOpenChange(false, event, 'hover');\n }\n }\n const html = getDocument(elements.floating).documentElement;\n html.addEventListener('mouseleave', onLeave);\n return () => {\n html.removeEventListener('mouseleave', onLeave);\n };\n }, [elements.floating, open, onOpenChange, enabled, handleCloseRef, isHoverOpen]);\n const closeWithDelay = React.useCallback((event, runElseBranch = true, reason = 'hover') => {\n const closeDelay = getDelay(delayRef.current, 'close', pointerTypeRef.current);\n if (closeDelay && !handlerRef.current) {\n timeout.start(closeDelay, () => onOpenChange(false, event, reason));\n } else if (runElseBranch) {\n timeout.clear();\n onOpenChange(false, event, reason);\n }\n }, [delayRef, onOpenChange, timeout]);\n const cleanupMouseMoveHandler = useEventCallback(() => {\n unbindMouseMoveRef.current();\n handlerRef.current = undefined;\n });\n const clearPointerEvents = useEventCallback(() => {\n if (performedPointerEventsMutationRef.current) {\n const body = getDocument(elements.floating).body;\n body.style.pointerEvents = '';\n body.removeAttribute(safePolygonIdentifier);\n performedPointerEventsMutationRef.current = false;\n }\n });\n const isClickLikeOpenEvent = useEventCallback(() => {\n return dataRef.current.openEvent ? ['click', 'mousedown'].includes(dataRef.current.openEvent.type) : false;\n });\n\n // Registering the mouse events on the reference directly to bypass React's\n // delegation system. If the cursor was on a disabled element and then entered\n // the reference (no gap), `mouseenter` doesn't fire in the delegation system.\n React.useEffect(() => {\n if (!enabled) {\n return undefined;\n }\n function onReferenceMouseEnter(event) {\n timeout.clear();\n blockMouseMoveRef.current = false;\n if (mouseOnly && !isMouseLikePointerType(pointerTypeRef.current) || getRestMs(restMsRef.current) > 0 && !getDelay(delayRef.current, 'open')) {\n return;\n }\n const openDelay = getDelay(delayRef.current, 'open', pointerTypeRef.current);\n if (openDelay) {\n timeout.start(openDelay, () => {\n if (!openRef.current) {\n onOpenChange(true, event, 'hover');\n }\n });\n } else if (!open) {\n onOpenChange(true, event, 'hover');\n }\n }\n function onReferenceMouseLeave(event) {\n if (isClickLikeOpenEvent()) {\n clearPointerEvents();\n return;\n }\n unbindMouseMoveRef.current();\n const doc = getDocument(elements.floating);\n restTimeout.clear();\n restTimeoutPendingRef.current = false;\n if (handleCloseRef.current && dataRef.current.floatingContext) {\n // Prevent clearing `onScrollMouseLeave` timeout.\n if (!open) {\n timeout.clear();\n }\n handlerRef.current = handleCloseRef.current({\n ...dataRef.current.floatingContext,\n tree,\n x: event.clientX,\n y: event.clientY,\n onClose() {\n clearPointerEvents();\n cleanupMouseMoveHandler();\n if (!isClickLikeOpenEvent()) {\n closeWithDelay(event, true, 'safe-polygon');\n }\n }\n });\n const handler = handlerRef.current;\n doc.addEventListener('mousemove', handler);\n unbindMouseMoveRef.current = () => {\n doc.removeEventListener('mousemove', handler);\n };\n return;\n }\n\n // Allow interactivity without `safePolygon` on touch devices. With a\n // pointer, a short close delay is an alternative, so it should work\n // consistently.\n const shouldClose = pointerTypeRef.current === 'touch' ? !contains(elements.floating, event.relatedTarget) : true;\n if (shouldClose) {\n closeWithDelay(event);\n }\n }\n\n // Ensure the floating element closes after scrolling even if the pointer\n // did not move.\n // https://github.com/floating-ui/floating-ui/discussions/1692\n function onScrollMouseLeave(event) {\n if (isClickLikeOpenEvent()) {\n return;\n }\n if (!dataRef.current.floatingContext) {\n return;\n }\n handleCloseRef.current?.({\n ...dataRef.current.floatingContext,\n tree,\n x: event.clientX,\n y: event.clientY,\n onClose() {\n clearPointerEvents();\n cleanupMouseMoveHandler();\n if (!isClickLikeOpenEvent()) {\n closeWithDelay(event);\n }\n }\n })(event);\n }\n function onFloatingMouseEnter() {\n timeout.clear();\n }\n function onFloatingMouseLeave(event) {\n if (!isClickLikeOpenEvent()) {\n closeWithDelay(event, false);\n }\n }\n if (isElement(elements.domReference)) {\n const reference = elements.domReference;\n const floating = elements.floating;\n if (open) {\n reference.addEventListener('mouseleave', onScrollMouseLeave);\n }\n if (move) {\n reference.addEventListener('mousemove', onReferenceMouseEnter, {\n once: true\n });\n }\n reference.addEventListener('mouseenter', onReferenceMouseEnter);\n reference.addEventListener('mouseleave', onReferenceMouseLeave);\n if (floating) {\n floating.addEventListener('mouseleave', onScrollMouseLeave);\n floating.addEventListener('mouseenter', onFloatingMouseEnter);\n floating.addEventListener('mouseleave', onFloatingMouseLeave);\n }\n return () => {\n if (open) {\n reference.removeEventListener('mouseleave', onScrollMouseLeave);\n }\n if (move) {\n reference.removeEventListener('mousemove', onReferenceMouseEnter);\n }\n reference.removeEventListener('mouseenter', onReferenceMouseEnter);\n reference.removeEventListener('mouseleave', onReferenceMouseLeave);\n if (floating) {\n floating.removeEventListener('mouseleave', onScrollMouseLeave);\n floating.removeEventListener('mouseenter', onFloatingMouseEnter);\n floating.removeEventListener('mouseleave', onFloatingMouseLeave);\n }\n };\n }\n return undefined;\n }, [elements, enabled, context, mouseOnly, move, closeWithDelay, cleanupMouseMoveHandler, clearPointerEvents, onOpenChange, open, openRef, tree, delayRef, handleCloseRef, dataRef, isClickLikeOpenEvent, restMsRef, timeout, restTimeout]);\n\n // Block pointer-events of every element other than the reference and floating\n // while the floating element is open and has a `handleClose` handler. Also\n // handles nested floating elements.\n // https://github.com/floating-ui/floating-ui/issues/1722\n useIsoLayoutEffect(() => {\n if (!enabled) {\n return undefined;\n }\n\n // eslint-disable-next-line no-underscore-dangle\n if (open && handleCloseRef.current?.__options?.blockPointerEvents && isHoverOpen()) {\n performedPointerEventsMutationRef.current = true;\n const floatingEl = elements.floating;\n if (isElement(elements.domReference) && floatingEl) {\n const body = getDocument(elements.floating).body;\n body.setAttribute(safePolygonIdentifier, '');\n const ref = elements.domReference;\n const parentFloating = tree?.nodesRef.current.find(node => node.id === parentId)?.context?.elements.floating;\n if (parentFloating) {\n parentFloating.style.pointerEvents = '';\n }\n body.style.pointerEvents = 'none';\n ref.style.pointerEvents = 'auto';\n floatingEl.style.pointerEvents = 'auto';\n return () => {\n body.style.pointerEvents = '';\n ref.style.pointerEvents = '';\n floatingEl.style.pointerEvents = '';\n };\n }\n }\n return undefined;\n }, [enabled, open, parentId, elements, tree, handleCloseRef, isHoverOpen]);\n useIsoLayoutEffect(() => {\n if (!open) {\n pointerTypeRef.current = undefined;\n restTimeoutPendingRef.current = false;\n cleanupMouseMoveHandler();\n clearPointerEvents();\n }\n }, [open, cleanupMouseMoveHandler, clearPointerEvents]);\n React.useEffect(() => {\n return () => {\n cleanupMouseMoveHandler();\n timeout.clear();\n restTimeout.clear();\n clearPointerEvents();\n };\n }, [enabled, elements.domReference, cleanupMouseMoveHandler, clearPointerEvents, timeout, restTimeout]);\n const reference = React.useMemo(() => {\n function setPointerRef(event) {\n pointerTypeRef.current = event.pointerType;\n }\n return {\n onPointerDown: setPointerRef,\n onPointerEnter: setPointerRef,\n onMouseMove(event) {\n const {\n nativeEvent\n } = event;\n function handleMouseMove() {\n if (!blockMouseMoveRef.current && !openRef.current) {\n onOpenChange(true, nativeEvent, 'hover');\n }\n }\n if (mouseOnly && !isMouseLikePointerType(pointerTypeRef.current)) {\n return;\n }\n if (open || getRestMs(restMsRef.current) === 0) {\n return;\n }\n\n // Ignore insignificant movements to account for tremors.\n if (restTimeoutPendingRef.current && event.movementX ** 2 + event.movementY ** 2 < 2) {\n return;\n }\n restTimeout.clear();\n if (pointerTypeRef.current === 'touch') {\n handleMouseMove();\n } else {\n restTimeoutPendingRef.current = true;\n restTimeout.start(getRestMs(restMsRef.current), handleMouseMove);\n }\n }\n };\n }, [mouseOnly, onOpenChange, open, openRef, restMsRef, restTimeout]);\n return React.useMemo(() => enabled ? {\n reference\n } : {}, [enabled, reference]);\n}","/* eslint-disable @typescript-eslint/no-loop-func */\n\nexport function getNodeChildren(nodes, id, onlyOpenChildren = true) {\n const directChildren = nodes.filter(node => node.parentId === id && (!onlyOpenChildren || node.context?.open));\n return directChildren.flatMap(child => [child, ...getNodeChildren(nodes, child.id, onlyOpenChildren)]);\n}\nexport function getDeepestNode(nodes, id) {\n let deepestNodeId;\n let maxDepth = -1;\n function findDeepest(nodeId, depth) {\n if (depth > maxDepth) {\n deepestNodeId = nodeId;\n maxDepth = depth;\n }\n const children = getNodeChildren(nodes, nodeId);\n children.forEach(child => {\n findDeepest(child.id, depth + 1);\n });\n }\n findDeepest(id, 0);\n return nodes.find(node => node.id === deepestNodeId);\n}\nexport function getNodeAncestors(nodes, id) {\n let allAncestors = [];\n let currentParentId = nodes.find(node => node.id === id)?.parentId;\n while (currentParentId) {\n const currentNode = nodes.find(node => node.id === currentParentId);\n currentParentId = currentNode?.parentId;\n if (currentNode) {\n allAncestors = allAncestors.concat(currentNode);\n }\n }\n return allAncestors;\n}","import { isElement } from '@floating-ui/utils/dom';\nimport { Timeout } from '@base-ui-components/utils/useTimeout';\nimport { contains, getTarget } from \"./utils/element.js\";\nimport { getNodeChildren } from \"./utils/nodes.js\";\n\n/* eslint-disable no-nested-ternary */\n\nfunction isPointInPolygon(point, polygon) {\n const [x, y] = point;\n let isInsideValue = false;\n const length = polygon.length;\n // eslint-disable-next-line no-plusplus\n for (let i = 0, j = length - 1; i < length; j = i++) {\n const [xi, yi] = polygon[i] || [0, 0];\n const [xj, yj] = polygon[j] || [0, 0];\n const intersect = yi >= y !== yj >= y && x <= (xj - xi) * (y - yi) / (yj - yi) + xi;\n if (intersect) {\n isInsideValue = !isInsideValue;\n }\n }\n return isInsideValue;\n}\nfunction isInside(point, rect) {\n return point[0] >= rect.x && point[0] <= rect.x + rect.width && point[1] >= rect.y && point[1] <= rect.y + rect.height;\n}\n/**\n * Generates a safe polygon area that the user can traverse without closing the\n * floating element once leaving the reference element.\n * @see https://floating-ui.com/docs/useHover#safepolygon\n */\nexport function safePolygon(options = {}) {\n const {\n buffer = 0.5,\n blockPointerEvents = false,\n requireIntent = true\n } = options;\n const timeout = new Timeout();\n let hasLanded = false;\n let lastX = null;\n let lastY = null;\n let lastCursorTime = typeof performance !== 'undefined' ? performance.now() : 0;\n function getCursorSpeed(x, y) {\n const currentTime = performance.now();\n const elapsedTime = currentTime - lastCursorTime;\n if (lastX === null || lastY === null || elapsedTime === 0) {\n lastX = x;\n lastY = y;\n lastCursorTime = currentTime;\n return null;\n }\n const deltaX = x - lastX;\n const deltaY = y - lastY;\n const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n const speed = distance / elapsedTime; // px / ms\n\n lastX = x;\n lastY = y;\n lastCursorTime = currentTime;\n return speed;\n }\n const fn = ({\n x,\n y,\n placement,\n elements,\n onClose,\n nodeId,\n tree\n }) => {\n return function onMouseMove(event) {\n function close() {\n timeout.clear();\n onClose();\n }\n timeout.clear();\n if (!elements.domReference || !elements.floating || placement == null || x == null || y == null) {\n return undefined;\n }\n const {\n clientX,\n clientY\n } = event;\n const clientPoint = [clientX, clientY];\n const target = getTarget(event);\n const isLeave = event.type === 'mouseleave';\n const isOverFloatingEl = contains(elements.floating, target);\n const isOverReferenceEl = contains(elements.domReference, target);\n const refRect = elements.domReference.getBoundingClientRect();\n const rect = elements.floating.getBoundingClientRect();\n const side = placement.split('-')[0];\n const cursorLeaveFromRight = x > rect.right - rect.width / 2;\n const cursorLeaveFromBottom = y > rect.bottom - rect.height / 2;\n const isOverReferenceRect = isInside(clientPoint, refRect);\n const isFloatingWider = rect.width > refRect.width;\n const isFloatingTaller = rect.height > refRect.height;\n const left = (isFloatingWider ? refRect : rect).left;\n const right = (isFloatingWider ? refRect : rect).right;\n const top = (isFloatingTaller ? refRect : rect).top;\n const bottom = (isFloatingTaller ? refRect : rect).bottom;\n if (isOverFloatingEl) {\n hasLanded = true;\n if (!isLeave) {\n return undefined;\n }\n }\n if (isOverReferenceEl) {\n hasLanded = false;\n }\n if (isOverReferenceEl && !isLeave) {\n hasLanded = true;\n return undefined;\n }\n\n // Prevent overlapping floating element from being stuck in an open-close\n // loop: https://github.com/floating-ui/floating-ui/issues/1910\n if (isLeave && isElement(event.relatedTarget) && contains(elements.floating, event.relatedTarget)) {\n return undefined;\n }\n\n // If any nested child is open, abort.\n if (tree && getNodeChildren(tree.nodesRef.current, nodeId).some(({\n context\n }) => context?.open)) {\n return undefined;\n }\n\n // If the pointer is leaving from the opposite side, the \"buffer\" logic\n // creates a point where the floating element remains open, but should be\n // ignored.\n // A constant of 1 handles floating point rounding errors.\n if (side === 'top' && y >= refRect.bottom - 1 || side === 'bottom' && y <= refRect.top + 1 || side === 'left' && x >= refRect.right - 1 || side === 'right' && x <= refRect.left + 1) {\n return close();\n }\n\n // Ignore when the cursor is within the rectangular trough between the\n // two elements. Since the triangle is created from the cursor point,\n // which can start beyond the ref element's edge, traversing back and\n // forth from the ref to the floating element can cause it to close. This\n // ensures it always remains open in that case.\n let rectPoly = [];\n switch (side) {\n case 'top':\n rectPoly = [[left, refRect.top + 1], [left, rect.bottom - 1], [right, rect.bottom - 1], [right, refRect.top + 1]];\n break;\n case 'bottom':\n rectPoly = [[left, rect.top + 1], [left, refRect.bottom - 1], [right, refRect.bottom - 1], [right, rect.top + 1]];\n break;\n case 'left':\n rectPoly = [[rect.right - 1, bottom], [rect.right - 1, top], [refRect.left + 1, top], [refRect.left + 1, bottom]];\n break;\n case 'right':\n rectPoly = [[refRect.right - 1, bottom], [refRect.right - 1, top], [rect.left + 1, top], [rect.left + 1, bottom]];\n break;\n default:\n }\n function getPolygon([px, py]) {\n switch (side) {\n case 'top':\n {\n const cursorPointOne = [isFloatingWider ? px + buffer / 2 : cursorLeaveFromRight ? px + buffer * 4 : px - buffer * 4, py + buffer + 1];\n const cursorPointTwo = [isFloatingWider ? px - buffer / 2 : cursorLeaveFromRight ? px + buffer * 4 : px - buffer * 4, py + buffer + 1];\n const commonPoints = [[rect.left, cursorLeaveFromRight ? rect.bottom - buffer : isFloatingWider ? rect.bottom - buffer : rect.top], [rect.right, cursorLeaveFromRight ? isFloatingWider ? rect.bottom - buffer : rect.top : rect.bottom - buffer]];\n return [cursorPointOne, cursorPointTwo, ...commonPoints];\n }\n case 'bottom':\n {\n const cursorPointOne = [isFloatingWider ? px + buffer / 2 : cursorLeaveFromRight ? px + buffer * 4 : px - buffer * 4, py - buffer];\n const cursorPointTwo = [isFloatingWider ? px - buffer / 2 : cursorLeaveFromRight ? px + buffer * 4 : px - buffer * 4, py - buffer];\n const commonPoints = [[rect.left, cursorLeaveFromRight ? rect.top + buffer : isFloatingWider ? rect.top + buffer : rect.bottom], [rect.right, cursorLeaveFromRight ? isFloatingWider ? rect.top + buffer : rect.bottom : rect.top + buffer]];\n return [cursorPointOne, cursorPointTwo, ...commonPoints];\n }\n case 'left':\n {\n const cursorPointOne = [px + buffer + 1, isFloatingTaller ? py + buffer / 2 : cursorLeaveFromBottom ? py + buffer * 4 : py - buffer * 4];\n const cursorPointTwo = [px + buffer + 1, isFloatingTaller ? py - buffer / 2 : cursorLeaveFromBottom ? py + buffer * 4 : py - buffer * 4];\n const commonPoints = [[cursorLeaveFromBottom ? rect.right - buffer : isFloatingTaller ? rect.right - buffer : rect.left, rect.top], [cursorLeaveFromBottom ? isFloatingTaller ? rect.right - buffer : rect.left : rect.right - buffer, rect.bottom]];\n return [...commonPoints, cursorPointOne, cursorPointTwo];\n }\n case 'right':\n {\n const cursorPointOne = [px - buffer, isFloatingTaller ? py + buffer / 2 : cursorLeaveFromBottom ? py + buffer * 4 : py - buffer * 4];\n const cursorPointTwo = [px - buffer, isFloatingTaller ? py - buffer / 2 : cursorLeaveFromBottom ? py + buffer * 4 : py - buffer * 4];\n const commonPoints = [[cursorLeaveFromBottom ? rect.left + buffer : isFloatingTaller ? rect.left + buffer : rect.right, rect.top], [cursorLeaveFromBottom ? isFloatingTaller ? rect.left + buffer : rect.right : rect.left + buffer, rect.bottom]];\n return [cursorPointOne, cursorPointTwo, ...commonPoints];\n }\n default:\n return [];\n }\n }\n if (isPointInPolygon([clientX, clientY], rectPoly)) {\n return undefined;\n }\n if (hasLanded && !isOverReferenceRect) {\n return close();\n }\n if (!isLeave && requireIntent) {\n const cursorSpeed = getCursorSpeed(event.clientX, event.clientY);\n const cursorSpeedThreshold = 0.1;\n if (cursorSpeed !== null && cursorSpeed < cursorSpeedThreshold) {\n return close();\n }\n }\n if (!isPointInPolygon([clientX, clientY], getPolygon([x, y]))) {\n close();\n } else if (!hasLanded && requireIntent) {\n timeout.start(40, close);\n }\n return undefined;\n };\n };\n\n // eslint-disable-next-line no-underscore-dangle\n fn.__options = {\n blockPointerEvents\n };\n return fn;\n}","import * as React from 'react';\nimport { getWindow, isElement, isHTMLElement } from '@floating-ui/utils/dom';\nimport { isMac, isSafari } from '@base-ui-components/utils/detectBrowser';\nimport { useTimeout } from '@base-ui-components/utils/useTimeout';\nimport { activeElement, contains, getDocument, getTarget, isTypeableElement, matchesFocusVisible } from \"../utils.js\";\nimport { createAttribute } from \"../utils/createAttribute.js\";\nconst isMacSafari = isMac && isSafari;\n/**\n * Opens the floating element while the reference element has focus, like CSS\n * `:focus`.\n * @see https://floating-ui.com/docs/useFocus\n */\nexport function useFocus(context, props = {}) {\n const {\n open,\n onOpenChange,\n events,\n dataRef,\n elements\n } = context;\n const {\n enabled = true,\n visibleOnly = true\n } = props;\n const blockFocusRef = React.useRef(false);\n const timeout = useTimeout();\n const keyboardModalityRef = React.useRef(true);\n React.useEffect(() => {\n if (!enabled) {\n return undefined;\n }\n const win = getWindow(elements.domReference);\n\n // If the reference was focused and the user left the tab/window, and the\n // floating element was not open, the focus should be blocked when they\n // return to the tab/window.\n function onBlur() {\n if (!open && isHTMLElement(elements.domReference) && elements.domReference === activeElement(getDocument(elements.domReference))) {\n blockFocusRef.current = true;\n }\n }\n function onKeyDown() {\n keyboardModalityRef.current = true;\n }\n function onPointerDown() {\n keyboardModalityRef.current = false;\n }\n win.addEventListener('blur', onBlur);\n if (isMacSafari) {\n win.addEventListener('keydown', onKeyDown, true);\n win.addEventListener('pointerdown', onPointerDown, true);\n }\n return () => {\n win.removeEventListener('blur', onBlur);\n if (isMacSafari) {\n win.removeEventListener('keydown', onKeyDown, true);\n win.removeEventListener('pointerdown', onPointerDown, true);\n }\n };\n }, [elements.domReference, open, enabled]);\n React.useEffect(() => {\n if (!enabled) {\n return undefined;\n }\n function onOpenChangeLocal({\n reason\n }) {\n if (reason === 'reference-press' || reason === 'escape-key') {\n blockFocusRef.current = true;\n }\n }\n events.on('openchange', onOpenChangeLocal);\n return () => {\n events.off('openchange', onOpenChangeLocal);\n };\n }, [events, enabled]);\n const reference = React.useMemo(() => ({\n onMouseLeave() {\n blockFocusRef.current = false;\n },\n onFocus(event) {\n if (blockFocusRef.current) {\n return;\n }\n const target = getTarget(event.nativeEvent);\n if (visibleOnly && isElement(target)) {\n // Safari fails to match `:focus-visible` if focus was initially\n // outside the document.\n if (isMacSafari && !event.relatedTarget) {\n if (!keyboardModalityRef.current && !isTypeableElement(target)) {\n return;\n }\n } else if (!matchesFocusVisible(target)) {\n return;\n }\n }\n onOpenChange(true, event.nativeEvent, 'focus');\n },\n onBlur(event) {\n blockFocusRef.current = false;\n const relatedTarget = event.relatedTarget;\n const nativeEvent = event.nativeEvent;\n\n // Hit the non-modal focus management portal guard. Focus will be\n // moved into the floating element immediately after.\n const movedToFocusGuard = isElement(relatedTarget) && relatedTarget.hasAttribute(createAttribute('focus-guard')) && relatedTarget.getAttribute('data-type') === 'outside';\n\n // Wait for the window blur listener to fire.\n timeout.start(0, () => {\n const activeEl = activeElement(elements.domReference ? elements.domReference.ownerDocument : document);\n\n // Focus left the page, keep it open.\n if (!relatedTarget && activeEl === elements.domReference) {\n return;\n }\n\n // When focusing the reference element (e.g. regular click), then\n // clicking into the floating element, prevent it from hiding.\n // Note: it must be focusable, e.g. `tabindex=\"-1\"`.\n // We can not rely on relatedTarget to point to the correct element\n // as it will only point to the shadow host of the newly focused element\n // and not the element that actually has received focus if it is located\n // inside a shadow root.\n if (contains(dataRef.current.floatingContext?.refs.floating.current, activeEl) || contains(elements.domReference, activeEl) || movedToFocusGuard) {\n return;\n }\n onOpenChange(false, nativeEvent, 'focus');\n });\n }\n }), [dataRef, elements.domReference, onOpenChange, visibleOnly, timeout]);\n return React.useMemo(() => enabled ? {\n reference\n } : {}, [enabled, reference]);\n}","'use client';\n\nimport { useRefWithInit } from \"./useRefWithInit.js\";\nimport { useOnMount } from \"./useOnMount.js\";\n/** Unlike `setTimeout`, rAF doesn't guarantee a positive integer return value, so we can't have\n * a monomorphic `uint` type with `0` meaning empty.\n * See warning note at:\n * https://developer.mozilla.org/en-US/docs/Web/API/Window/requestAnimationFrame#return_value */\nconst EMPTY = null;\nlet LAST_RAF = globalThis.requestAnimationFrame;\nclass Scheduler {\n /* This implementation uses an array as a backing data-structure for frame callbacks.\n * It allows `O(1)` callback cancelling by inserting a `null` in the array, though it\n * never calls the native `cancelAnimationFrame` if there are no frames left. This can\n * be much more efficient if there is a call pattern that alterns as\n * \"request-cancel-request-cancel-…\".\n * But in the case of \"request-request-…-cancel-cancel-…\", it leaves the final animation\n * frame to run anyway. We turn that frame into a `O(1)` no-op via `callbacksCount`. */\n\n callbacks = (() => [])();\n callbacksCount = 0;\n nextId = 1;\n startId = 1;\n isScheduled = false;\n tick = timestamp => {\n this.isScheduled = false;\n const currentCallbacks = this.callbacks;\n const currentCallbacksCount = this.callbacksCount;\n\n // Update these before iterating, callbacks could call `requestAnimationFrame` again.\n this.callbacks = [];\n this.callbacksCount = 0;\n this.startId = this.nextId;\n if (currentCallbacksCount > 0) {\n for (let i = 0; i < currentCallbacks.length; i += 1) {\n currentCallbacks[i]?.(timestamp);\n }\n }\n };\n request(fn) {\n const id = this.nextId;\n this.nextId += 1;\n this.callbacks.push(fn);\n this.callbacksCount += 1;\n\n /* In a test environment with fake timers, a fake `requestAnimationFrame` can be called\n * but there's no guarantee that the animation frame will actually run before the fake\n * timers are teared, which leaves `isScheduled` set, but won't run our `tick()`. */\n const didRAFChange = process.env.NODE_ENV === 'test' && LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, true);\n if (!this.isScheduled || didRAFChange) {\n requestAnimationFrame(this.tick);\n this.isScheduled = true;\n }\n return id;\n }\n cancel(id) {\n const index = id - this.startId;\n if (index < 0 || index >= this.callbacks.length) {\n return;\n }\n this.callbacks[index] = null;\n this.callbacksCount -= 1;\n }\n}\nconst scheduler = new Scheduler();\nexport class AnimationFrame {\n static create() {\n return new AnimationFrame();\n }\n static request(fn) {\n return scheduler.request(fn);\n }\n static cancel(id) {\n return scheduler.cancel(id);\n }\n currentId = (() => EMPTY)();\n\n /**\n * Executes `fn` after `delay`, clearing any previously scheduled call.\n */\n request(fn) {\n this.cancel();\n this.currentId = scheduler.request(() => {\n this.currentId = EMPTY;\n fn();\n });\n }\n cancel = () => {\n if (this.currentId !== EMPTY) {\n scheduler.cancel(this.currentId);\n this.currentId = EMPTY;\n }\n };\n disposeEffect = () => {\n return this.cancel;\n };\n}\n\n/**\n * A `requestAnimationFrame` with automatic cleanup and guard.\n */\nexport function useAnimationFrame() {\n const timeout = useRefWithInit(AnimationFrame.create).current;\n useOnMount(timeout.disposeEffect);\n return timeout;\n}","export const TYPEAHEAD_RESET_MS = 500;\nexport const PATIENT_CLICK_THRESHOLD = 500;\nexport const DISABLED_TRANSITIONS_STYLE = {\n style: {\n transition: 'none'\n }\n};\nexport const EMPTY_OBJECT = {};\nexport const EMPTY_ARRAY = [];\nexport const CLICK_TRIGGER_IDENTIFIER = 'data-base-ui-click-trigger';\n\n/**\n * Used for dropdowns that usually strictly prefer top/bottom placements and\n * use `var(--available-height)` to limit their height.\n */\nexport const DROPDOWN_COLLISION_AVOIDANCE = {\n fallbackAxisSide: 'none'\n};\n\n/**\n * Used by regular popups that usually aren't scrollable and are allowed to\n * freely flip to any axis of placement.\n */\nexport const POPUP_COLLISION_AVOIDANCE = {\n fallbackAxisSide: 'end'\n};","import * as React from 'react';\nimport { getOverflowAncestors } from '@floating-ui/react-dom';\nimport { getComputedStyle, getParentNode, isElement, isHTMLElement, isLastTraversableNode, isWebKit } from '@floating-ui/utils/dom';\nimport { Timeout, useTimeout } from '@base-ui-components/utils/useTimeout';\nimport { useEventCallback } from '@base-ui-components/utils/useEventCallback';\nimport { contains, getDocument, getTarget, isEventTargetWithin, isReactEvent, isRootElement, getNodeChildren } from \"../utils.js\";\n\n/* eslint-disable no-underscore-dangle */\n\nimport { useFloatingTree } from \"../components/FloatingTree.js\";\nimport { createAttribute } from \"../utils/createAttribute.js\";\nconst bubbleHandlerKeys = {\n intentional: 'onClick',\n sloppy: 'onPointerDown'\n};\nexport function normalizeProp(normalizable) {\n return {\n escapeKey: typeof normalizable === 'boolean' ? normalizable : normalizable?.escapeKey ?? false,\n outsidePress: typeof normalizable === 'boolean' ? normalizable : normalizable?.outsidePress ?? true\n };\n}\n/**\n * Closes the floating element when a dismissal is requested — by default, when\n * the user presses the `escape` key or outside of the floating element.\n * @see https://floating-ui.com/docs/useDismiss\n */\nexport function useDismiss(context, props = {}) {\n const {\n open,\n onOpenChange,\n elements,\n dataRef\n } = context;\n const {\n enabled = true,\n escapeKey = true,\n outsidePress: outsidePressProp = true,\n outsidePressEvent = 'sloppy',\n referencePress = false,\n referencePressEvent = 'sloppy',\n ancestorScroll = false,\n bubbles,\n capture\n } = props;\n const tree = useFloatingTree();\n const outsidePressFn = useEventCallback(typeof outsidePressProp === 'function' ? outsidePressProp : () => false);\n const outsidePress = typeof outsidePressProp === 'function' ? outsidePressFn : outsidePressProp;\n const endedOrStartedInsideRef = React.useRef(false);\n const {\n escapeKey: escapeKeyBubbles,\n outsidePress: outsidePressBubbles\n } = normalizeProp(bubbles);\n const {\n escapeKey: escapeKeyCapture,\n outsidePress: outsidePressCapture\n } = normalizeProp(capture);\n const touchStateRef = React.useRef(null);\n const cancelDismissOnEndTimeout = useTimeout();\n const insideReactTreeTimeout = useTimeout();\n const isComposingRef = React.useRef(false);\n const currentPointerTypeRef = React.useRef('');\n const trackPointerType = useEventCallback(event => {\n currentPointerTypeRef.current = event.pointerType;\n });\n const getOutsidePressEvent = useEventCallback(() => {\n const type = currentPointerTypeRef.current;\n const computedType = type === 'pen' || !type ? 'mouse' : type;\n if (typeof outsidePressEvent === 'string') {\n return outsidePressEvent;\n }\n return outsidePressEvent[computedType];\n });\n const closeOnEscapeKeyDown = useEventCallback(event => {\n if (!open || !enabled || !escapeKey || event.key !== 'Escape') {\n return;\n }\n\n // Wait until IME is settled. Pressing `Escape` while composing should\n // close the compose menu, but not the floating element.\n if (isComposingRef.current) {\n return;\n }\n const nodeId = dataRef.current.floatingContext?.nodeId;\n const children = tree ? getNodeChildren(tree.nodesRef.current, nodeId) : [];\n if (!escapeKeyBubbles) {\n event.stopPropagation();\n if (children.length > 0) {\n let shouldDismiss = true;\n children.forEach(child => {\n if (child.context?.open && !child.context.dataRef.current.__escapeKeyBubbles) {\n shouldDismiss = false;\n }\n });\n if (!shouldDismiss) {\n return;\n }\n }\n }\n onOpenChange(false, isReactEvent(event) ? event.nativeEvent : event, 'escape-key');\n });\n const shouldIgnoreEvent = useEventCallback(event => {\n const computedOutsidePressEvent = getOutsidePressEvent();\n return computedOutsidePressEvent === 'intentional' && event.type !== 'click' || computedOutsidePressEvent === 'sloppy' && event.type === 'click';\n });\n const closeOnEscapeKeyDownCapture = useEventCallback(event => {\n const callback = () => {\n closeOnEscapeKeyDown(event);\n getTarget(event)?.removeEventListener('keydown', callback);\n };\n getTarget(event)?.addEventListener('keydown', callback);\n });\n const closeOnPressOutside = useEventCallback(event => {\n if (shouldIgnoreEvent(event)) {\n return;\n }\n\n // Given developers can stop the propagation of the synthetic event,\n // we can only be confident with a positive value.\n const insideReactTree = dataRef.current.insideReactTree;\n dataRef.current.insideReactTree = false;\n\n // When click outside is lazy (`up` event), handle dragging.\n // Don't close if:\n // - The click started inside the floating element.\n // - The click ended inside the floating element.\n const endedOrStartedInside = endedOrStartedInsideRef.current;\n endedOrStartedInsideRef.current = false;\n if (getOutsidePressEvent() === 'intentional' && endedOrStartedInside) {\n return;\n }\n if (insideReactTree) {\n return;\n }\n if (typeof outsidePress === 'function' && !outsidePress(event)) {\n return;\n }\n const target = getTarget(event);\n const inertSelector = `[${createAttribute('inert')}]`;\n const markers = getDocument(elements.floating).querySelectorAll(inertSelector);\n let targetRootAncestor = isElement(target) ? target : null;\n while (targetRootAncestor && !isLastTraversableNode(targetRootAncestor)) {\n const nextParent = getParentNode(targetRootAncestor);\n if (isLastTraversableNode(nextParent) || !isElement(nextParent)) {\n break;\n }\n targetRootAncestor = nextParent;\n }\n\n // Check if the click occurred on a third-party element injected after the\n // floating element rendered.\n if (markers.length && isElement(target) && !isRootElement(target) &&\n // Clicked on a direct ancestor (e.g. FloatingOverlay).\n !contains(target, elements.floating) &&\n // If the target root element contains none of the markers, then the\n // element was injected after the floating element rendered.\n Array.from(markers).every(marker => !contains(targetRootAncestor, marker))) {\n return;\n }\n\n // Check if the click occurred on the scrollbar\n if (isHTMLElement(target)) {\n const lastTraversableNode = isLastTraversableNode(target);\n const style = getComputedStyle(target);\n const scrollRe = /auto|scroll/;\n const isScrollableX = lastTraversableNode || scrollRe.test(style.overflowX);\n const isScrollableY = lastTraversableNode || scrollRe.test(style.overflowY);\n const canScrollX = isScrollableX && target.clientWidth > 0 && target.scrollWidth > target.clientWidth;\n const canScrollY = isScrollableY && target.clientHeight > 0 && target.scrollHeight > target.clientHeight;\n const isRTL = style.direction === 'rtl';\n\n // Check click position relative to scrollbar.\n // In some browsers it is possible to change the (or window)\n // scrollbar to the left side, but is very rare and is difficult to\n // check for. Plus, for modal dialogs with backdrops, it is more\n // important that the backdrop is checked but not so much the window.\n const pressedVerticalScrollbar = canScrollY && (isRTL ? event.offsetX <= target.offsetWidth - target.clientWidth : event.offsetX > target.clientWidth);\n const pressedHorizontalScrollbar = canScrollX && event.offsetY > target.clientHeight;\n if (pressedVerticalScrollbar || pressedHorizontalScrollbar) {\n return;\n }\n }\n const nodeId = dataRef.current.floatingContext?.nodeId;\n const targetIsInsideChildren = tree && getNodeChildren(tree.nodesRef.current, nodeId).some(node => isEventTargetWithin(event, node.context?.elements.floating));\n if (isEventTargetWithin(event, elements.floating) || isEventTargetWithin(event, elements.domReference) || targetIsInsideChildren) {\n return;\n }\n const children = tree ? getNodeChildren(tree.nodesRef.current, nodeId) : [];\n if (children.length > 0) {\n let shouldDismiss = true;\n children.forEach(child => {\n if (child.context?.open && !child.context.dataRef.current.__outsidePressBubbles) {\n shouldDismiss = false;\n }\n });\n if (!shouldDismiss) {\n return;\n }\n }\n onOpenChange(false, event, 'outside-press');\n });\n const handlePointerDown = useEventCallback(event => {\n if (getOutsidePressEvent() !== 'sloppy' || !open || !enabled || isEventTargetWithin(event, elements.floating) || isEventTargetWithin(event, elements.domReference)) {\n return;\n }\n if (event.pointerType === 'touch') {\n touchStateRef.current = {\n startTime: Date.now(),\n startX: event.clientX,\n startY: event.clientY,\n dismissOnPointerUp: false,\n dismissOnMouseDown: true\n };\n cancelDismissOnEndTimeout.start(1000, () => {\n if (touchStateRef.current) {\n touchStateRef.current.dismissOnPointerUp = false;\n touchStateRef.current.dismissOnMouseDown = false;\n }\n });\n return;\n }\n closeOnPressOutside(event);\n });\n const closeOnPressOutsideCapture = useEventCallback(event => {\n if (shouldIgnoreEvent(event)) {\n return;\n }\n cancelDismissOnEndTimeout.clear();\n if (event.type === 'mousedown' && touchStateRef.current && !touchStateRef.current.dismissOnMouseDown) {\n return;\n }\n const callback = () => {\n if (event.type === 'pointerdown') {\n handlePointerDown(event);\n } else {\n closeOnPressOutside(event);\n }\n getTarget(event)?.removeEventListener(event.type, callback);\n };\n getTarget(event)?.addEventListener(event.type, callback);\n });\n const handlePointerMove = useEventCallback(event => {\n if (getOutsidePressEvent() !== 'sloppy' || event.pointerType !== 'touch' || !touchStateRef.current || isEventTargetWithin(event, elements.floating) || isEventTargetWithin(event, elements.domReference)) {\n return;\n }\n const deltaX = Math.abs(event.clientX - touchStateRef.current.startX);\n const deltaY = Math.abs(event.clientY - touchStateRef.current.startY);\n const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n if (distance > 5) {\n touchStateRef.current.dismissOnPointerUp = true;\n }\n if (distance > 10) {\n closeOnPressOutside(event);\n cancelDismissOnEndTimeout.clear();\n touchStateRef.current = null;\n }\n });\n const handlePointerUp = useEventCallback(event => {\n if (getOutsidePressEvent() !== 'sloppy' || event.pointerType !== 'touch' || !touchStateRef.current || isEventTargetWithin(event, elements.floating) || isEventTargetWithin(event, elements.domReference)) {\n return;\n }\n if (touchStateRef.current.dismissOnPointerUp) {\n closeOnPressOutside(event);\n }\n cancelDismissOnEndTimeout.clear();\n touchStateRef.current = null;\n });\n React.useEffect(() => {\n if (!open || !enabled) {\n return undefined;\n }\n dataRef.current.__escapeKeyBubbles = escapeKeyBubbles;\n dataRef.current.__outsidePressBubbles = outsidePressBubbles;\n const compositionTimeout = new Timeout();\n function onScroll(event) {\n onOpenChange(false, event, 'ancestor-scroll');\n }\n function handleCompositionStart() {\n compositionTimeout.clear();\n isComposingRef.current = true;\n }\n function handleCompositionEnd() {\n // Safari fires `compositionend` before `keydown`, so we need to wait\n // until the next tick to set `isComposing` to `false`.\n // https://bugs.webkit.org/show_bug.cgi?id=165004\n compositionTimeout.start(\n // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.\n // Only apply to WebKit for the test to remain 0ms.\n isWebKit() ? 5 : 0, () => {\n isComposingRef.current = false;\n });\n }\n const doc = getDocument(elements.floating);\n doc.addEventListener('pointerdown', trackPointerType, true);\n if (escapeKey) {\n doc.addEventListener('keydown', escapeKeyCapture ? closeOnEscapeKeyDownCapture : closeOnEscapeKeyDown, escapeKeyCapture);\n doc.addEventListener('compositionstart', handleCompositionStart);\n doc.addEventListener('compositionend', handleCompositionEnd);\n }\n if (outsidePress) {\n doc.addEventListener('click', outsidePressCapture ? closeOnPressOutsideCapture : closeOnPressOutside, outsidePressCapture);\n doc.addEventListener('pointerdown', outsidePressCapture ? closeOnPressOutsideCapture : closeOnPressOutside, outsidePressCapture);\n doc.addEventListener('pointermove', handlePointerMove, outsidePressCapture);\n doc.addEventListener('pointerup', handlePointerUp, outsidePressCapture);\n doc.addEventListener('mousedown', closeOnPressOutsideCapture, outsidePressCapture);\n }\n let ancestors = [];\n if (ancestorScroll) {\n if (isElement(elements.domReference)) {\n ancestors = getOverflowAncestors(elements.domReference);\n }\n if (isElement(elements.floating)) {\n ancestors = ancestors.concat(getOverflowAncestors(elements.floating));\n }\n if (!isElement(elements.reference) && elements.reference && elements.reference.contextElement) {\n ancestors = ancestors.concat(getOverflowAncestors(elements.reference.contextElement));\n }\n }\n\n // Ignore the visual viewport for scrolling dismissal (allow pinch-zoom)\n ancestors = ancestors.filter(ancestor => ancestor !== doc.defaultView?.visualViewport);\n ancestors.forEach(ancestor => {\n ancestor.addEventListener('scroll', onScroll, {\n passive: true\n });\n });\n return () => {\n doc.removeEventListener('pointerdown', trackPointerType, true);\n if (escapeKey) {\n doc.removeEventListener('keydown', escapeKeyCapture ? closeOnEscapeKeyDownCapture : closeOnEscapeKeyDown, escapeKeyCapture);\n doc.removeEventListener('compositionstart', handleCompositionStart);\n doc.removeEventListener('compositionend', handleCompositionEnd);\n }\n if (outsidePress) {\n doc.removeEventListener('click', outsidePressCapture ? closeOnPressOutsideCapture : closeOnPressOutside, outsidePressCapture);\n doc.removeEventListener('pointerdown', outsidePressCapture ? closeOnPressOutsideCapture : closeOnPressOutside, outsidePressCapture);\n doc.removeEventListener('pointermove', handlePointerMove, outsidePressCapture);\n doc.removeEventListener('pointerup', handlePointerUp, outsidePressCapture);\n doc.removeEventListener('mousedown', closeOnPressOutsideCapture, outsidePressCapture);\n }\n ancestors.forEach(ancestor => {\n ancestor.removeEventListener('scroll', onScroll);\n });\n compositionTimeout.clear();\n };\n }, [dataRef, elements, escapeKey, outsidePress, outsidePressEvent, open, onOpenChange, ancestorScroll, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, escapeKeyCapture, closeOnEscapeKeyDownCapture, closeOnPressOutside, outsidePressCapture, closeOnPressOutsideCapture, handlePointerDown, handlePointerMove, handlePointerUp, trackPointerType]);\n React.useEffect(() => {\n dataRef.current.insideReactTree = false;\n }, [dataRef, outsidePress]);\n const reference = React.useMemo(() => ({\n onKeyDown: closeOnEscapeKeyDown,\n ...(referencePress && {\n [bubbleHandlerKeys[referencePressEvent]]: event => {\n onOpenChange(false, event.nativeEvent, 'reference-press');\n },\n ...(referencePressEvent !== 'intentional' && {\n onClick(event) {\n onOpenChange(false, event.nativeEvent, 'reference-press');\n }\n })\n })\n }), [closeOnEscapeKeyDown, onOpenChange, referencePress, referencePressEvent]);\n const handlePressedInside = useEventCallback(event => {\n const target = getTarget(event.nativeEvent);\n if (!contains(elements.floating, target)) {\n return;\n }\n endedOrStartedInsideRef.current = true;\n });\n const handleCaptureInside = useEventCallback(() => {\n dataRef.current.insideReactTree = true;\n insideReactTreeTimeout.start(0, () => {\n dataRef.current.insideReactTree = false;\n });\n });\n const floating = React.useMemo(() => ({\n onKeyDown: closeOnEscapeKeyDown,\n onMouseDown: handlePressedInside,\n onMouseUp: handlePressedInside,\n onPointerDownCapture: handleCaptureInside,\n onMouseDownCapture: handleCaptureInside,\n onClickCapture: handleCaptureInside\n }), [closeOnEscapeKeyDown, handlePressedInside, handleCaptureInside]);\n return React.useMemo(() => enabled ? {\n reference,\n floating\n } : {}, [enabled, reference, floating]);\n}","import * as React from 'react';\nimport { useId } from '@base-ui-components/utils/useId';\nimport { getFloatingFocusElement } from \"../utils.js\";\nimport { useFloatingParentNodeId } from \"../components/FloatingTree.js\";\nconst componentRoleToAriaRoleMap = new Map([['select', 'listbox'], ['combobox', 'listbox'], ['label', false]]);\n\n/**\n * Adds base screen reader props to the reference and floating elements for a\n * given floating element `role`.\n * @see https://floating-ui.com/docs/useRole\n */\nexport function useRole(context, props = {}) {\n const {\n open,\n elements,\n floatingId: defaultFloatingId\n } = context;\n const {\n enabled = true,\n role = 'dialog'\n } = props;\n const defaultReferenceId = useId();\n const referenceId = elements.domReference?.id || defaultReferenceId;\n const floatingId = React.useMemo(() => getFloatingFocusElement(elements.floating)?.id || defaultFloatingId, [elements.floating, defaultFloatingId]);\n const ariaRole = componentRoleToAriaRoleMap.get(role) ?? role;\n const parentId = useFloatingParentNodeId();\n const isNested = parentId != null;\n const reference = React.useMemo(() => {\n if (ariaRole === 'tooltip' || role === 'label') {\n return {\n [`aria-${role === 'label' ? 'labelledby' : 'describedby'}`]: open ? floatingId : undefined\n };\n }\n return {\n 'aria-expanded': open ? 'true' : 'false',\n 'aria-haspopup': ariaRole === 'alertdialog' ? 'dialog' : ariaRole,\n 'aria-controls': open ? floatingId : undefined,\n ...(ariaRole === 'listbox' && {\n role: 'combobox'\n }),\n ...(ariaRole === 'menu' && {\n id: referenceId\n }),\n ...(ariaRole === 'menu' && isNested && {\n role: 'menuitem'\n }),\n ...(role === 'select' && {\n 'aria-autocomplete': 'none'\n }),\n ...(role === 'combobox' && {\n 'aria-autocomplete': 'list'\n })\n };\n }, [ariaRole, floatingId, isNested, open, referenceId, role]);\n const floating = React.useMemo(() => {\n const floatingProps = {\n id: floatingId,\n ...(ariaRole && {\n role: ariaRole\n })\n };\n if (ariaRole === 'tooltip' || role === 'label') {\n return floatingProps;\n }\n return {\n ...floatingProps,\n ...(ariaRole === 'menu' && {\n 'aria-labelledby': referenceId\n })\n };\n }, [ariaRole, floatingId, referenceId, role]);\n const item = React.useCallback(({\n active,\n selected\n }) => {\n const commonProps = {\n role: 'option',\n ...(active && {\n id: `${floatingId}-fui-option`\n })\n };\n\n // For `menu`, we are unable to tell if the item is a `menuitemradio`\n // or `menuitemcheckbox`. For backwards-compatibility reasons, also\n // avoid defaulting to `menuitem` as it may overwrite custom role props.\n switch (role) {\n case 'select':\n case 'combobox':\n return {\n ...commonProps,\n 'aria-selected': selected\n };\n default:\n }\n return {};\n }, [floatingId, role]);\n return React.useMemo(() => enabled ? {\n reference,\n floating,\n item\n } : {}, [enabled, reference, floating, item]);\n}","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nconst yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);\nfunction getSideAxis(placement) {\n return yAxisSides.has(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nconst lrPlacement = ['left', 'right'];\nconst rlPlacement = ['right', 'left'];\nconst tbPlacement = ['top', 'bottom'];\nconst btPlacement = ['bottom', 'top'];\nfunction getSideList(side, isStart, rtl) {\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rlPlacement : lrPlacement;\n return isStart ? lrPlacement : rlPlacement;\n case 'left':\n case 'right':\n return isStart ? tbPlacement : btPlacement;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { floor } from '@floating-ui/utils';\nimport { stopEvent } from \"./event.js\";\nimport { ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP } from \"./constants.js\";\nexport function isDifferentGridRow(index, cols, prevRow) {\n return Math.floor(index / cols) !== prevRow;\n}\nexport function isIndexOutOfListBounds(listRef, index) {\n return index < 0 || index >= listRef.current.length;\n}\nexport function getMinListIndex(listRef, disabledIndices) {\n return findNonDisabledListIndex(listRef, {\n disabledIndices\n });\n}\nexport function getMaxListIndex(listRef, disabledIndices) {\n return findNonDisabledListIndex(listRef, {\n decrement: true,\n startingIndex: listRef.current.length,\n disabledIndices\n });\n}\nexport function findNonDisabledListIndex(listRef, {\n startingIndex = -1,\n decrement = false,\n disabledIndices,\n amount = 1\n} = {}) {\n let index = startingIndex;\n do {\n index += decrement ? -amount : amount;\n } while (index >= 0 && index <= listRef.current.length - 1 && isListIndexDisabled(listRef, index, disabledIndices));\n return index;\n}\nexport function getGridNavigatedIndex(listRef, {\n event,\n orientation,\n loop,\n rtl,\n cols,\n disabledIndices,\n minIndex,\n maxIndex,\n prevIndex,\n stopEvent: stop = false\n}) {\n let nextIndex = prevIndex;\n if (event.key === ARROW_UP) {\n if (stop) {\n stopEvent(event);\n }\n if (prevIndex === -1) {\n nextIndex = maxIndex;\n } else {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: nextIndex,\n amount: cols,\n decrement: true,\n disabledIndices\n });\n if (loop && (prevIndex - cols < minIndex || nextIndex < 0)) {\n const col = prevIndex % cols;\n const maxCol = maxIndex % cols;\n const offset = maxIndex - (maxCol - col);\n if (maxCol === col) {\n nextIndex = maxIndex;\n } else {\n nextIndex = maxCol > col ? offset : offset - cols;\n }\n }\n }\n if (isIndexOutOfListBounds(listRef, nextIndex)) {\n nextIndex = prevIndex;\n }\n }\n if (event.key === ARROW_DOWN) {\n if (stop) {\n stopEvent(event);\n }\n if (prevIndex === -1) {\n nextIndex = minIndex;\n } else {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex,\n amount: cols,\n disabledIndices\n });\n if (loop && prevIndex + cols > maxIndex) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex % cols - cols,\n amount: cols,\n disabledIndices\n });\n }\n }\n if (isIndexOutOfListBounds(listRef, nextIndex)) {\n nextIndex = prevIndex;\n }\n }\n\n // Remains on the same row/column.\n if (orientation === 'both') {\n const prevRow = floor(prevIndex / cols);\n if (event.key === (rtl ? ARROW_LEFT : ARROW_RIGHT)) {\n if (stop) {\n stopEvent(event);\n }\n if (prevIndex % cols !== cols - 1) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex,\n disabledIndices\n });\n if (loop && isDifferentGridRow(nextIndex, cols, prevRow)) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex - prevIndex % cols - 1,\n disabledIndices\n });\n }\n } else if (loop) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex - prevIndex % cols - 1,\n disabledIndices\n });\n }\n if (isDifferentGridRow(nextIndex, cols, prevRow)) {\n nextIndex = prevIndex;\n }\n }\n if (event.key === (rtl ? ARROW_RIGHT : ARROW_LEFT)) {\n if (stop) {\n stopEvent(event);\n }\n if (prevIndex % cols !== 0) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex,\n decrement: true,\n disabledIndices\n });\n if (loop && isDifferentGridRow(nextIndex, cols, prevRow)) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex + (cols - prevIndex % cols),\n decrement: true,\n disabledIndices\n });\n }\n } else if (loop) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex + (cols - prevIndex % cols),\n decrement: true,\n disabledIndices\n });\n }\n if (isDifferentGridRow(nextIndex, cols, prevRow)) {\n nextIndex = prevIndex;\n }\n }\n const lastRow = floor(maxIndex / cols) === prevRow;\n if (isIndexOutOfListBounds(listRef, nextIndex)) {\n if (loop && lastRow) {\n nextIndex = event.key === (rtl ? ARROW_RIGHT : ARROW_LEFT) ? maxIndex : findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex - prevIndex % cols - 1,\n disabledIndices\n });\n } else {\n nextIndex = prevIndex;\n }\n }\n }\n return nextIndex;\n}\n\n/** For each cell index, gets the item index that occupies that cell */\nexport function createGridCellMap(sizes, cols, dense) {\n const cellMap = [];\n let startIndex = 0;\n sizes.forEach(({\n width,\n height\n }, index) => {\n if (width > cols) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(`[Floating UI]: Invalid grid - item width at index ${index} is greater than grid columns`);\n }\n }\n let itemPlaced = false;\n if (dense) {\n startIndex = 0;\n }\n while (!itemPlaced) {\n const targetCells = [];\n for (let i = 0; i < width; i += 1) {\n for (let j = 0; j < height; j += 1) {\n targetCells.push(startIndex + i + j * cols);\n }\n }\n if (startIndex % cols + width <= cols && targetCells.every(cell => cellMap[cell] == null)) {\n targetCells.forEach(cell => {\n cellMap[cell] = index;\n });\n itemPlaced = true;\n } else {\n startIndex += 1;\n }\n }\n });\n\n // convert into a non-sparse array\n return [...cellMap];\n}\n\n/** Gets cell index of an item's corner or -1 when index is -1. */\nexport function getGridCellIndexOfCorner(index, sizes, cellMap, cols, corner) {\n if (index === -1) {\n return -1;\n }\n const firstCellIndex = cellMap.indexOf(index);\n const sizeItem = sizes[index];\n switch (corner) {\n case 'tl':\n return firstCellIndex;\n case 'tr':\n if (!sizeItem) {\n return firstCellIndex;\n }\n return firstCellIndex + sizeItem.width - 1;\n case 'bl':\n if (!sizeItem) {\n return firstCellIndex;\n }\n return firstCellIndex + (sizeItem.height - 1) * cols;\n case 'br':\n return cellMap.lastIndexOf(index);\n default:\n return -1;\n }\n}\n\n/** Gets all cell indices that correspond to the specified indices */\nexport function getGridCellIndices(indices, cellMap) {\n return cellMap.flatMap((index, cellIndex) => indices.includes(index) ? [cellIndex] : []);\n}\nexport function isListIndexDisabled(listRef, index, disabledIndices) {\n if (typeof disabledIndices === 'function') {\n return disabledIndices(index);\n }\n if (disabledIndices) {\n return disabledIndices.includes(index);\n }\n const element = listRef.current[index];\n return element == null || element.hasAttribute('disabled') || element.getAttribute('aria-disabled') === 'true';\n}","let rafId = 0;\nexport function enqueueFocus(el, options = {}) {\n const {\n preventScroll = false,\n cancelPrevious = true,\n sync = false\n } = options;\n if (cancelPrevious) {\n cancelAnimationFrame(rafId);\n }\n const exec = () => el?.focus({\n preventScroll\n });\n if (sync) {\n exec();\n } else {\n rafId = requestAnimationFrame(exec);\n }\n}","import * as React from 'react';\nimport { isHTMLElement } from '@floating-ui/utils/dom';\nimport { useLatestRef } from '@base-ui-components/utils/useLatestRef';\nimport { useEventCallback } from '@base-ui-components/utils/useEventCallback';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { activeElement, contains, getDocument, isTypeableCombobox, isVirtualClick, isVirtualPointerEvent, stopEvent, getFloatingFocusElement, isIndexOutOfListBounds, getMinListIndex, getMaxListIndex, getGridNavigatedIndex, isListIndexDisabled, createGridCellMap, getGridCellIndices, getGridCellIndexOfCorner, findNonDisabledListIndex } from \"../utils.js\";\nimport { useFloatingParentNodeId, useFloatingTree } from \"../components/FloatingTree.js\";\nimport { enqueueFocus } from \"../utils/enqueueFocus.js\";\nimport { ARROW_UP, ARROW_DOWN, ARROW_RIGHT, ARROW_LEFT } from \"../utils/constants.js\";\nexport const ESCAPE = 'Escape';\nfunction doSwitch(orientation, vertical, horizontal) {\n switch (orientation) {\n case 'vertical':\n return vertical;\n case 'horizontal':\n return horizontal;\n default:\n return vertical || horizontal;\n }\n}\nfunction isMainOrientationKey(key, orientation) {\n const vertical = key === ARROW_UP || key === ARROW_DOWN;\n const horizontal = key === ARROW_LEFT || key === ARROW_RIGHT;\n return doSwitch(orientation, vertical, horizontal);\n}\nfunction isMainOrientationToEndKey(key, orientation, rtl) {\n const vertical = key === ARROW_DOWN;\n const horizontal = rtl ? key === ARROW_LEFT : key === ARROW_RIGHT;\n return doSwitch(orientation, vertical, horizontal) || key === 'Enter' || key === ' ' || key === '';\n}\nfunction isCrossOrientationOpenKey(key, orientation, rtl) {\n const vertical = rtl ? key === ARROW_LEFT : key === ARROW_RIGHT;\n const horizontal = key === ARROW_DOWN;\n return doSwitch(orientation, vertical, horizontal);\n}\nfunction isCrossOrientationCloseKey(key, orientation, rtl, cols) {\n const vertical = rtl ? key === ARROW_RIGHT : key === ARROW_LEFT;\n const horizontal = key === ARROW_UP;\n if (orientation === 'both' || orientation === 'horizontal' && cols && cols > 1) {\n return key === ESCAPE;\n }\n return doSwitch(orientation, vertical, horizontal);\n}\n/**\n * Adds arrow key-based navigation of a list of items, either using real DOM\n * focus or virtual focus.\n * @see https://floating-ui.com/docs/useListNavigation\n */\nexport function useListNavigation(context, props) {\n const {\n open,\n onOpenChange,\n elements,\n floatingId\n } = context;\n const {\n listRef,\n activeIndex,\n onNavigate: onNavigateProp = () => {},\n enabled = true,\n selectedIndex = null,\n allowEscape = false,\n loop = false,\n nested = false,\n rtl = false,\n virtual = false,\n focusItemOnOpen = 'auto',\n focusItemOnHover = true,\n openOnArrowKeyDown = true,\n disabledIndices = undefined,\n orientation = 'vertical',\n parentOrientation,\n cols = 1,\n scrollItemIntoView = true,\n virtualItemRef,\n itemSizes,\n dense = false\n } = props;\n if (process.env.NODE_ENV !== 'production') {\n if (allowEscape) {\n if (!loop) {\n console.warn('`useListNavigation` looping must be enabled to allow escaping.');\n }\n if (!virtual) {\n console.warn('`useListNavigation` must be virtual to allow escaping.');\n }\n }\n if (orientation === 'vertical' && cols > 1) {\n console.warn('In grid list navigation mode (`cols` > 1), the `orientation` should', 'be either \"horizontal\" or \"both\".');\n }\n }\n const floatingFocusElement = getFloatingFocusElement(elements.floating);\n const floatingFocusElementRef = useLatestRef(floatingFocusElement);\n const parentId = useFloatingParentNodeId();\n const tree = useFloatingTree();\n useIsoLayoutEffect(() => {\n context.dataRef.current.orientation = orientation;\n }, [context, orientation]);\n const typeableComboboxReference = isTypeableCombobox(elements.domReference);\n const focusItemOnOpenRef = React.useRef(focusItemOnOpen);\n const indexRef = React.useRef(selectedIndex ?? -1);\n const keyRef = React.useRef(null);\n const isPointerModalityRef = React.useRef(true);\n const onNavigate = useEventCallback(() => {\n onNavigateProp(indexRef.current === -1 ? null : indexRef.current);\n });\n const previousOnNavigateRef = React.useRef(onNavigate);\n const previousMountedRef = React.useRef(!!elements.floating);\n const previousOpenRef = React.useRef(open);\n const forceSyncFocusRef = React.useRef(false);\n const forceScrollIntoViewRef = React.useRef(false);\n const disabledIndicesRef = useLatestRef(disabledIndices);\n const latestOpenRef = useLatestRef(open);\n const scrollItemIntoViewRef = useLatestRef(scrollItemIntoView);\n const selectedIndexRef = useLatestRef(selectedIndex);\n const [activeId, setActiveId] = React.useState();\n const focusItem = useEventCallback(() => {\n function runFocus(item) {\n if (virtual) {\n if (item.id?.endsWith('-fui-option')) {\n item.id = `${floatingId}-${Math.random().toString(16).slice(2, 10)}`;\n }\n setActiveId(item.id);\n tree?.events.emit('virtualfocus', item);\n if (virtualItemRef) {\n virtualItemRef.current = item;\n }\n } else {\n enqueueFocus(item, {\n sync: forceSyncFocusRef.current,\n preventScroll: true\n });\n }\n }\n const initialItem = listRef.current[indexRef.current];\n const forceScrollIntoView = forceScrollIntoViewRef.current;\n if (initialItem) {\n runFocus(initialItem);\n }\n const scheduler = forceSyncFocusRef.current ? v => v() : requestAnimationFrame;\n scheduler(() => {\n const waitedItem = listRef.current[indexRef.current] || initialItem;\n if (!waitedItem) {\n return;\n }\n if (!initialItem) {\n runFocus(waitedItem);\n }\n const scrollIntoViewOptions = scrollItemIntoViewRef.current;\n const shouldScrollIntoView =\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n scrollIntoViewOptions && item && (forceScrollIntoView || !isPointerModalityRef.current);\n if (shouldScrollIntoView) {\n // JSDOM doesn't support `.scrollIntoView()` but it's widely supported\n // by all browsers.\n waitedItem.scrollIntoView?.(typeof scrollIntoViewOptions === 'boolean' ? {\n block: 'nearest',\n inline: 'nearest'\n } : scrollIntoViewOptions);\n }\n });\n });\n\n // Sync `selectedIndex` to be the `activeIndex` upon opening the floating\n // element. Also, reset `activeIndex` upon closing the floating element.\n useIsoLayoutEffect(() => {\n if (!enabled) {\n return;\n }\n if (open && elements.floating) {\n if (focusItemOnOpenRef.current && selectedIndex != null) {\n // Regardless of the pointer modality, we want to ensure the selected\n // item comes into view when the floating element is opened.\n forceScrollIntoViewRef.current = true;\n indexRef.current = selectedIndex;\n onNavigate();\n }\n } else if (previousMountedRef.current) {\n // Since the user can specify `onNavigate` conditionally\n // (onNavigate: open ? setActiveIndex : setSelectedIndex),\n // we store and call the previous function.\n indexRef.current = -1;\n previousOnNavigateRef.current();\n }\n }, [enabled, open, elements.floating, selectedIndex, onNavigate]);\n\n // Sync `activeIndex` to be the focused item while the floating element is\n // open.\n useIsoLayoutEffect(() => {\n if (!enabled) {\n return;\n }\n if (!open) {\n return;\n }\n if (!elements.floating) {\n return;\n }\n if (activeIndex == null) {\n forceSyncFocusRef.current = false;\n if (selectedIndexRef.current != null) {\n return;\n }\n\n // Reset while the floating element was open (e.g. the list changed).\n if (previousMountedRef.current) {\n indexRef.current = -1;\n focusItem();\n }\n\n // Initial sync.\n if ((!previousOpenRef.current || !previousMountedRef.current) && focusItemOnOpenRef.current && (keyRef.current != null || focusItemOnOpenRef.current === true && keyRef.current == null)) {\n let runs = 0;\n const waitForListPopulated = () => {\n if (listRef.current[0] == null) {\n // Avoid letting the browser paint if possible on the first try,\n // otherwise use rAF. Don't try more than twice, since something\n // is wrong otherwise.\n if (runs < 2) {\n const scheduler = runs ? requestAnimationFrame : queueMicrotask;\n scheduler(waitForListPopulated);\n }\n runs += 1;\n } else {\n indexRef.current = keyRef.current == null || isMainOrientationToEndKey(keyRef.current, orientation, rtl) || nested ? getMinListIndex(listRef, disabledIndicesRef.current) : getMaxListIndex(listRef, disabledIndicesRef.current);\n keyRef.current = null;\n onNavigate();\n }\n };\n waitForListPopulated();\n }\n } else if (!isIndexOutOfListBounds(listRef, activeIndex)) {\n indexRef.current = activeIndex;\n focusItem();\n forceScrollIntoViewRef.current = false;\n }\n }, [enabled, open, elements.floating, activeIndex, selectedIndexRef, nested, listRef, orientation, rtl, onNavigate, focusItem, disabledIndicesRef]);\n\n // Ensure the parent floating element has focus when a nested child closes\n // to allow arrow key navigation to work after the pointer leaves the child.\n useIsoLayoutEffect(() => {\n if (!enabled || elements.floating || !tree || virtual || !previousMountedRef.current) {\n return;\n }\n const nodes = tree.nodesRef.current;\n const parent = nodes.find(node => node.id === parentId)?.context?.elements.floating;\n const activeEl = activeElement(getDocument(elements.floating));\n const treeContainsActiveEl = nodes.some(node => node.context && contains(node.context.elements.floating, activeEl));\n if (parent && !treeContainsActiveEl && isPointerModalityRef.current) {\n parent.focus({\n preventScroll: true\n });\n }\n }, [enabled, elements.floating, tree, parentId, virtual]);\n useIsoLayoutEffect(() => {\n previousOnNavigateRef.current = onNavigate;\n previousOpenRef.current = open;\n previousMountedRef.current = !!elements.floating;\n });\n useIsoLayoutEffect(() => {\n if (!open) {\n keyRef.current = null;\n focusItemOnOpenRef.current = focusItemOnOpen;\n }\n }, [open, focusItemOnOpen]);\n const hasActiveIndex = activeIndex != null;\n const item = React.useMemo(() => {\n function syncCurrentTarget(currentTarget) {\n if (!latestOpenRef.current) {\n return;\n }\n const index = listRef.current.indexOf(currentTarget);\n if (index !== -1 && indexRef.current !== index) {\n indexRef.current = index;\n onNavigate();\n }\n }\n const itemProps = {\n onFocus({\n currentTarget\n }) {\n forceSyncFocusRef.current = true;\n syncCurrentTarget(currentTarget);\n },\n onClick: ({\n currentTarget\n }) => currentTarget.focus({\n preventScroll: true\n }),\n // Safari\n onMouseMove({\n currentTarget\n }) {\n forceSyncFocusRef.current = true;\n forceScrollIntoViewRef.current = false;\n if (focusItemOnHover) {\n syncCurrentTarget(currentTarget);\n }\n },\n onPointerLeave({\n pointerType\n }) {\n if (!isPointerModalityRef.current || pointerType === 'touch') {\n return;\n }\n forceSyncFocusRef.current = true;\n if (!focusItemOnHover) {\n return;\n }\n indexRef.current = -1;\n onNavigate();\n if (!virtual) {\n floatingFocusElementRef.current?.focus({\n preventScroll: true\n });\n }\n }\n };\n return itemProps;\n }, [latestOpenRef, floatingFocusElementRef, focusItemOnHover, listRef, onNavigate, virtual]);\n const getParentOrientation = React.useCallback(() => {\n return parentOrientation ?? tree?.nodesRef.current.find(node => node.id === parentId)?.context?.dataRef?.current.orientation;\n }, [parentId, tree, parentOrientation]);\n const commonOnKeyDown = useEventCallback(event => {\n isPointerModalityRef.current = false;\n forceSyncFocusRef.current = true;\n\n // When composing a character, Chrome fires ArrowDown twice. Firefox/Safari\n // don't appear to suffer from this. `event.isComposing` is avoided due to\n // Safari not supporting it properly (although it's not needed in the first\n // place for Safari, just avoiding any possible issues).\n if (event.which === 229) {\n return;\n }\n\n // If the floating element is animating out, ignore navigation. Otherwise,\n // the `activeIndex` gets set to 0 despite not being open so the next time\n // the user ArrowDowns, the first item won't be focused.\n if (!latestOpenRef.current && event.currentTarget === floatingFocusElementRef.current) {\n return;\n }\n if (nested && isCrossOrientationCloseKey(event.key, orientation, rtl, cols)) {\n // If the nested list's close key is also the parent navigation key,\n // let the parent navigate. Otherwise, stop propagating the event.\n if (!isMainOrientationKey(event.key, getParentOrientation())) {\n stopEvent(event);\n }\n onOpenChange(false, event.nativeEvent, 'list-navigation');\n if (isHTMLElement(elements.domReference)) {\n if (virtual) {\n tree?.events.emit('virtualfocus', elements.domReference);\n } else {\n elements.domReference.focus();\n }\n }\n return;\n }\n const currentIndex = indexRef.current;\n const minIndex = getMinListIndex(listRef, disabledIndices);\n const maxIndex = getMaxListIndex(listRef, disabledIndices);\n if (!typeableComboboxReference) {\n if (event.key === 'Home') {\n stopEvent(event);\n indexRef.current = minIndex;\n onNavigate();\n }\n if (event.key === 'End') {\n stopEvent(event);\n indexRef.current = maxIndex;\n onNavigate();\n }\n }\n\n // Grid navigation.\n if (cols > 1) {\n const sizes = itemSizes || Array.from({\n length: listRef.current.length\n }, () => ({\n width: 1,\n height: 1\n }));\n // To calculate movements on the grid, we use hypothetical cell indices\n // as if every item was 1x1, then convert back to real indices.\n const cellMap = createGridCellMap(sizes, cols, dense);\n const minGridIndex = cellMap.findIndex(index => index != null && !isListIndexDisabled(listRef, index, disabledIndices));\n // last enabled index\n const maxGridIndex = cellMap.reduce((foundIndex, index, cellIndex) => index != null && !isListIndexDisabled(listRef, index, disabledIndices) ? cellIndex : foundIndex, -1);\n const index = cellMap[getGridNavigatedIndex({\n current: cellMap.map(itemIndex => itemIndex != null ? listRef.current[itemIndex] : null)\n }, {\n event,\n orientation,\n loop,\n rtl,\n cols,\n // treat undefined (empty grid spaces) as disabled indices so we\n // don't end up in them\n disabledIndices: getGridCellIndices([...((typeof disabledIndices !== 'function' ? disabledIndices : null) || listRef.current.map((_, listIndex) => isListIndexDisabled(listRef, listIndex, disabledIndices) ? listIndex : undefined)), undefined], cellMap),\n minIndex: minGridIndex,\n maxIndex: maxGridIndex,\n prevIndex: getGridCellIndexOfCorner(indexRef.current > maxIndex ? minIndex : indexRef.current, sizes, cellMap, cols,\n // use a corner matching the edge closest to the direction\n // we're moving in so we don't end up in the same item. Prefer\n // top/left over bottom/right.\n // eslint-disable-next-line no-nested-ternary\n event.key === ARROW_DOWN ? 'bl' : event.key === (rtl ? ARROW_LEFT : ARROW_RIGHT) ? 'tr' : 'tl'),\n stopEvent: true\n })];\n if (index != null) {\n indexRef.current = index;\n onNavigate();\n }\n if (orientation === 'both') {\n return;\n }\n }\n if (isMainOrientationKey(event.key, orientation)) {\n stopEvent(event);\n\n // Reset the index if no item is focused.\n if (open && !virtual && activeElement(event.currentTarget.ownerDocument) === event.currentTarget) {\n indexRef.current = isMainOrientationToEndKey(event.key, orientation, rtl) ? minIndex : maxIndex;\n onNavigate();\n return;\n }\n if (isMainOrientationToEndKey(event.key, orientation, rtl)) {\n if (loop) {\n indexRef.current =\n // eslint-disable-next-line no-nested-ternary\n currentIndex >= maxIndex ? allowEscape && currentIndex !== listRef.current.length ? -1 : minIndex : findNonDisabledListIndex(listRef, {\n startingIndex: currentIndex,\n disabledIndices\n });\n } else {\n indexRef.current = Math.min(maxIndex, findNonDisabledListIndex(listRef, {\n startingIndex: currentIndex,\n disabledIndices\n }));\n }\n } else if (loop) {\n indexRef.current =\n // eslint-disable-next-line no-nested-ternary\n currentIndex <= minIndex ? allowEscape && currentIndex !== -1 ? listRef.current.length : maxIndex : findNonDisabledListIndex(listRef, {\n startingIndex: currentIndex,\n decrement: true,\n disabledIndices\n });\n } else {\n indexRef.current = Math.max(minIndex, findNonDisabledListIndex(listRef, {\n startingIndex: currentIndex,\n decrement: true,\n disabledIndices\n }));\n }\n if (isIndexOutOfListBounds(listRef, indexRef.current)) {\n indexRef.current = -1;\n }\n onNavigate();\n }\n });\n const ariaActiveDescendantProp = React.useMemo(() => {\n return virtual && open && hasActiveIndex && {\n 'aria-activedescendant': activeId\n };\n }, [virtual, open, hasActiveIndex, activeId]);\n const floating = React.useMemo(() => {\n return {\n 'aria-orientation': orientation === 'both' ? undefined : orientation,\n ...(!typeableComboboxReference ? ariaActiveDescendantProp : {}),\n onKeyDown(event) {\n // Close submenu on Shift+Tab\n if (event.key === 'Tab' && event.shiftKey && open && !virtual) {\n stopEvent(event);\n onOpenChange(false, event.nativeEvent, 'list-navigation');\n if (isHTMLElement(elements.domReference)) {\n elements.domReference.focus();\n }\n return;\n }\n commonOnKeyDown(event);\n },\n onPointerMove() {\n isPointerModalityRef.current = true;\n }\n };\n }, [ariaActiveDescendantProp, commonOnKeyDown, orientation, typeableComboboxReference, onOpenChange, open, virtual, elements.domReference]);\n const reference = React.useMemo(() => {\n function checkVirtualMouse(event) {\n if (focusItemOnOpen === 'auto' && isVirtualClick(event.nativeEvent)) {\n focusItemOnOpenRef.current = true;\n }\n }\n function checkVirtualPointer(event) {\n // `pointerdown` fires first, reset the state then perform the checks.\n focusItemOnOpenRef.current = focusItemOnOpen;\n if (focusItemOnOpen === 'auto' && isVirtualPointerEvent(event.nativeEvent)) {\n focusItemOnOpenRef.current = true;\n }\n }\n return {\n ...ariaActiveDescendantProp,\n onKeyDown(event) {\n isPointerModalityRef.current = false;\n const isArrowKey = event.key.startsWith('Arrow');\n const isParentCrossOpenKey = isCrossOrientationOpenKey(event.key, getParentOrientation(), rtl);\n const isMainKey = isMainOrientationKey(event.key, orientation);\n const isNavigationKey = (nested ? isParentCrossOpenKey : isMainKey) || event.key === 'Enter' || event.key.trim() === '';\n if (virtual && open) {\n return commonOnKeyDown(event);\n }\n\n // If a floating element should not open on arrow key down, avoid\n // setting `activeIndex` while it's closed.\n if (!open && !openOnArrowKeyDown && isArrowKey) {\n return undefined;\n }\n if (isNavigationKey) {\n const isParentMainKey = isMainOrientationKey(event.key, getParentOrientation());\n keyRef.current = nested && isParentMainKey ? null : event.key;\n }\n if (nested) {\n if (isParentCrossOpenKey) {\n stopEvent(event);\n if (open) {\n indexRef.current = getMinListIndex(listRef, disabledIndicesRef.current);\n onNavigate();\n } else {\n onOpenChange(true, event.nativeEvent, 'list-navigation');\n }\n }\n return undefined;\n }\n if (isMainKey) {\n if (selectedIndex != null) {\n indexRef.current = selectedIndex;\n }\n stopEvent(event);\n if (!open && openOnArrowKeyDown) {\n onOpenChange(true, event.nativeEvent, 'list-navigation');\n } else {\n commonOnKeyDown(event);\n }\n if (open) {\n onNavigate();\n }\n }\n return undefined;\n },\n onFocus() {\n if (open && !virtual) {\n indexRef.current = -1;\n onNavigate();\n }\n },\n onPointerDown: checkVirtualPointer,\n onPointerEnter: checkVirtualPointer,\n onMouseDown: checkVirtualMouse,\n onClick: checkVirtualMouse\n };\n }, [ariaActiveDescendantProp, commonOnKeyDown, disabledIndicesRef, focusItemOnOpen, listRef, nested, onNavigate, onOpenChange, open, openOnArrowKeyDown, orientation, getParentOrientation, rtl, selectedIndex, virtual]);\n return React.useMemo(() => enabled ? {\n reference,\n floating,\n item\n } : {}, [enabled, reference, floating, item]);\n}","import * as React from 'react';\nimport { ACTIVE_KEY, FOCUSABLE_ATTRIBUTE, SELECTED_KEY } from \"../utils/constants.js\";\n/**\n * Merges an array of interaction hooks' props into prop getters, allowing\n * event handler functions to be composed together without overwriting one\n * another.\n * @see https://floating-ui.com/docs/useInteractions\n */\nexport function useInteractions(propsList = []) {\n const referenceDeps = propsList.map(key => key?.reference);\n const floatingDeps = propsList.map(key => key?.floating);\n const itemDeps = propsList.map(key => key?.item);\n const getReferenceProps = React.useCallback(userProps => mergeProps(userProps, propsList, 'reference'),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n referenceDeps);\n const getFloatingProps = React.useCallback(userProps => mergeProps(userProps, propsList, 'floating'),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n floatingDeps);\n const getItemProps = React.useCallback(userProps => mergeProps(userProps, propsList, 'item'),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n itemDeps);\n return React.useMemo(() => ({\n getReferenceProps,\n getFloatingProps,\n getItemProps\n }), [getReferenceProps, getFloatingProps, getItemProps]);\n}\n\n/* eslint-disable guard-for-in */\n\nfunction mergeProps(userProps, propsList, elementKey) {\n const eventHandlers = new Map();\n const isItem = elementKey === 'item';\n const outputProps = {};\n if (elementKey === 'floating') {\n outputProps.tabIndex = -1;\n outputProps[FOCUSABLE_ATTRIBUTE] = '';\n }\n for (const key in userProps) {\n if (isItem && userProps) {\n if (key === ACTIVE_KEY || key === SELECTED_KEY) {\n continue;\n }\n }\n outputProps[key] = userProps[key];\n }\n for (let i = 0; i < propsList.length; i += 1) {\n let props;\n const propsOrGetProps = propsList[i]?.[elementKey];\n if (typeof propsOrGetProps === 'function') {\n props = userProps ? propsOrGetProps(userProps) : null;\n } else {\n props = propsOrGetProps;\n }\n if (!props) {\n continue;\n }\n mutablyMergeProps(outputProps, props, isItem, eventHandlers);\n }\n mutablyMergeProps(outputProps, userProps, isItem, eventHandlers);\n return outputProps;\n}\nfunction mutablyMergeProps(outputProps, props, isItem, eventHandlers) {\n for (const key in props) {\n const value = props[key];\n if (isItem && (key === ACTIVE_KEY || key === SELECTED_KEY)) {\n continue;\n }\n if (!key.startsWith('on')) {\n outputProps[key] = value;\n } else {\n if (!eventHandlers.has(key)) {\n eventHandlers.set(key, []);\n }\n if (typeof value === 'function') {\n eventHandlers.get(key)?.push(value);\n outputProps[key] = (...args) => {\n return eventHandlers.get(key)?.map(fn => fn(...args)).find(val => val !== undefined);\n };\n }\n }\n }\n}","'use client';\n\nimport * as React from 'react';\nexport const MenuRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") MenuRootContext.displayName = \"MenuRootContext\";\nexport function useMenuRootContext(optional) {\n const context = React.useContext(MenuRootContext);\n if (context === undefined && !optional) {\n throw new Error('Base UI: MenuRootContext is missing. Menu parts must be placed within .');\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nexport const MenubarContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") MenubarContext.displayName = \"MenubarContext\";\nexport function useMenubarContext(optional) {\n const context = React.useContext(MenubarContext);\n if (context === null && !optional) {\n throw new Error('Base UI: MenubarContext is missing. Menubar parts must be placed within .');\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { AnimationFrame } from '@base-ui-components/utils/useAnimationFrame';\n/**\n * Provides a status string for CSS animations.\n * @param open - a boolean that determines if the element is open.\n * @param enableIdleState - a boolean that enables the `'idle'` state between `'starting'` and `'ending'`\n */\nexport function useTransitionStatus(open, enableIdleState = false, deferEndingState = false) {\n const [transitionStatus, setTransitionStatus] = React.useState(open && enableIdleState ? 'idle' : undefined);\n const [mounted, setMounted] = React.useState(open);\n if (open && !mounted) {\n setMounted(true);\n setTransitionStatus('starting');\n }\n if (!open && mounted && transitionStatus !== 'ending' && !deferEndingState) {\n setTransitionStatus('ending');\n }\n if (!open && !mounted && transitionStatus === 'ending') {\n setTransitionStatus(undefined);\n }\n useIsoLayoutEffect(() => {\n if (!open && mounted && transitionStatus !== 'ending' && deferEndingState) {\n const frame = AnimationFrame.request(() => {\n setTransitionStatus('ending');\n });\n return () => {\n AnimationFrame.cancel(frame);\n };\n }\n return undefined;\n }, [open, mounted, transitionStatus, deferEndingState]);\n useIsoLayoutEffect(() => {\n if (!open || enableIdleState) {\n return undefined;\n }\n const frame = AnimationFrame.request(() => {\n ReactDOM.flushSync(() => {\n setTransitionStatus(undefined);\n });\n });\n return () => {\n AnimationFrame.cancel(frame);\n };\n }, [enableIdleState, open]);\n useIsoLayoutEffect(() => {\n if (!open || !enableIdleState) {\n return undefined;\n }\n if (open && mounted && transitionStatus !== 'idle') {\n setTransitionStatus('starting');\n }\n const frame = AnimationFrame.request(() => {\n setTransitionStatus('idle');\n });\n return () => {\n AnimationFrame.cancel(frame);\n };\n }, [enableIdleState, open, mounted, setTransitionStatus, transitionStatus]);\n return React.useMemo(() => ({\n mounted,\n setMounted,\n transitionStatus\n }), [mounted, transitionStatus]);\n}","'use client';\n\nimport * as React from 'react';\nimport { useEventCallback } from '@base-ui-components/utils/useEventCallback';\nimport { useLatestRef } from '@base-ui-components/utils/useLatestRef';\nimport { useAnimationsFinished } from \"./useAnimationsFinished.js\";\n\n/**\n * Calls the provided function when the CSS open/close animation or transition completes.\n */\nexport function useOpenChangeComplete(parameters) {\n const {\n enabled = true,\n open,\n ref,\n onComplete: onCompleteParam\n } = parameters;\n const openRef = useLatestRef(open);\n const onComplete = useEventCallback(onCompleteParam);\n const runOnceAnimationsFinish = useAnimationsFinished(ref, open);\n React.useEffect(() => {\n if (!enabled) {\n return;\n }\n runOnceAnimationsFinish(() => {\n if (open === openRef.current) {\n onComplete();\n }\n });\n }, [enabled, open, onComplete, runOnceAnimationsFinish, openRef]);\n}","'use client';\n\nimport * as ReactDOM from 'react-dom';\nimport { useAnimationFrame } from '@base-ui-components/utils/useAnimationFrame';\nimport { useEventCallback } from '@base-ui-components/utils/useEventCallback';\n\n/**\n * Executes a function once all animations have finished on the provided element.\n * @param elementOrRef - The element to watch for animations.\n * @param waitForNextTick - Whether to wait for the next tick before checking for animations.\n */\nexport function useAnimationsFinished(elementOrRef, waitForNextTick = false) {\n const frame = useAnimationFrame();\n return useEventCallback((fnToExecute,\n /**\n * An optional [AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that\n * can be used to abort `fnToExecute` before all the animations have finished.\n * @default null\n */\n signal = null) => {\n frame.cancel();\n if (elementOrRef == null) {\n return;\n }\n let element;\n if ('current' in elementOrRef) {\n if (elementOrRef.current == null) {\n return;\n }\n element = elementOrRef.current;\n } else {\n element = elementOrRef;\n }\n if (typeof element.getAnimations !== 'function' || globalThis.BASE_UI_ANIMATIONS_DISABLED) {\n fnToExecute();\n } else {\n frame.request(() => {\n function exec() {\n if (!element) {\n return;\n }\n Promise.allSettled(element.getAnimations().map(anim => anim.finished)).then(() => {\n if (signal != null && signal.aborted) {\n return;\n }\n // Synchronously flush the unmounting of the component so that the browser doesn't\n // paint: https://github.com/mui/base-ui/issues/979\n ReactDOM.flushSync(fnToExecute);\n });\n }\n\n // `open: true` animations need to wait for the next tick to be detected\n if (waitForNextTick) {\n frame.request(exec);\n } else {\n exec();\n }\n });\n }\n });\n}","'use client';\n\nimport * as React from 'react';\n/**\n * @internal\n */\nexport const DirectionContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") DirectionContext.displayName = \"DirectionContext\";\nexport function useDirection(optional = true) {\n const context = React.useContext(DirectionContext);\n if (context === undefined && !optional) {\n throw new Error('Base UI: DirectionContext is missing.');\n }\n return context?.direction ?? 'ltr';\n}","export { getWindow as ownerWindow } from '@floating-ui/utils/dom';\nexport function ownerDocument(node) {\n return node?.ownerDocument || document;\n}","export const NOOP = () => {};","import { isIOS, isWebKit } from '@base-ui-components/utils/detectBrowser';\nimport { ownerDocument, ownerWindow } from '@base-ui-components/utils/owner';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { Timeout } from '@base-ui-components/utils/useTimeout';\nimport { AnimationFrame } from '@base-ui-components/utils/useAnimationFrame';\nimport { NOOP } from \"./noop.js\";\n\n/* eslint-disable lines-between-class-members */\n\nlet originalHtmlStyles = {};\nlet originalBodyStyles = {};\nlet originalHtmlScrollBehavior = '';\nfunction hasInsetScrollbars(referenceElement) {\n if (typeof document === 'undefined') {\n return false;\n }\n const doc = ownerDocument(referenceElement);\n const win = ownerWindow(doc);\n return win.innerWidth - doc.documentElement.clientWidth > 0;\n}\nfunction preventScrollBasic(referenceElement) {\n const doc = ownerDocument(referenceElement);\n const html = doc.documentElement;\n const originalOverflow = html.style.overflow;\n html.style.overflow = 'hidden';\n return () => {\n html.style.overflow = originalOverflow;\n };\n}\nfunction preventScrollStandard(referenceElement) {\n const doc = ownerDocument(referenceElement);\n const html = doc.documentElement;\n const body = doc.body;\n const win = ownerWindow(html);\n let scrollTop = 0;\n let scrollLeft = 0;\n const resizeFrame = AnimationFrame.create();\n\n // Pinch-zoom in Safari causes a shift. Just don't lock scroll if there's any pinch-zoom.\n if (isWebKit && (win.visualViewport?.scale ?? 1) !== 1) {\n return () => {};\n }\n function lockScroll() {\n /* DOM reads: */\n\n const htmlStyles = win.getComputedStyle(html);\n const bodyStyles = win.getComputedStyle(body);\n scrollTop = html.scrollTop;\n scrollLeft = html.scrollLeft;\n originalHtmlStyles = {\n scrollbarGutter: html.style.scrollbarGutter,\n overflowY: html.style.overflowY,\n overflowX: html.style.overflowX\n };\n originalHtmlScrollBehavior = html.style.scrollBehavior;\n originalBodyStyles = {\n position: body.style.position,\n height: body.style.height,\n width: body.style.width,\n boxSizing: body.style.boxSizing,\n overflowY: body.style.overflowY,\n overflowX: body.style.overflowX,\n scrollBehavior: body.style.scrollBehavior\n };\n\n // Handle `scrollbar-gutter` in Chrome when there is no scrollable content.\n const supportsStableScrollbarGutter = typeof CSS !== 'undefined' && CSS.supports?.('scrollbar-gutter', 'stable');\n const isScrollableY = html.scrollHeight > html.clientHeight;\n const isScrollableX = html.scrollWidth > html.clientWidth;\n const hasConstantOverflowY = htmlStyles.overflowY === 'scroll' || bodyStyles.overflowY === 'scroll';\n const hasConstantOverflowX = htmlStyles.overflowX === 'scroll' || bodyStyles.overflowX === 'scroll';\n\n // Values can be negative in Firefox\n const scrollbarWidth = Math.max(0, win.innerWidth - html.clientWidth);\n const scrollbarHeight = Math.max(0, win.innerHeight - html.clientHeight);\n\n // Avoid shift due to the default margin. This does cause elements to be clipped\n // with whitespace. Warn if has margins?\n const marginY = parseFloat(bodyStyles.marginTop) + parseFloat(bodyStyles.marginBottom);\n const marginX = parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight);\n\n /*\n * DOM writes:\n * Do not read the DOM past this point!\n */\n\n Object.assign(html.style, {\n scrollbarGutter: 'stable',\n overflowY: !supportsStableScrollbarGutter && (isScrollableY || hasConstantOverflowY) ? 'scroll' : 'hidden',\n overflowX: !supportsStableScrollbarGutter && (isScrollableX || hasConstantOverflowX) ? 'scroll' : 'hidden'\n });\n Object.assign(body.style, {\n position: 'relative',\n height: marginY || scrollbarHeight ? `calc(100dvh - ${marginY + scrollbarHeight}px)` : '100dvh',\n width: marginX || scrollbarWidth ? `calc(100vw - ${marginX + scrollbarWidth}px)` : '100vw',\n boxSizing: 'border-box',\n overflow: 'hidden',\n scrollBehavior: 'unset'\n });\n body.scrollTop = scrollTop;\n body.scrollLeft = scrollLeft;\n html.setAttribute('data-base-ui-scroll-locked', '');\n html.style.scrollBehavior = 'unset';\n }\n function cleanup() {\n Object.assign(html.style, originalHtmlStyles);\n Object.assign(body.style, originalBodyStyles);\n html.scrollTop = scrollTop;\n html.scrollLeft = scrollLeft;\n html.removeAttribute('data-base-ui-scroll-locked');\n html.style.scrollBehavior = originalHtmlScrollBehavior;\n }\n function handleResize() {\n cleanup();\n resizeFrame.request(lockScroll);\n }\n lockScroll();\n win.addEventListener('resize', handleResize);\n return () => {\n resizeFrame.cancel();\n cleanup();\n win.removeEventListener('resize', handleResize);\n };\n}\nclass ScrollLocker {\n lockCount = 0;\n restore = (() => null)();\n timeoutLock = (() => Timeout.create())();\n timeoutUnlock = (() => Timeout.create())();\n acquire(referenceElement) {\n this.lockCount += 1;\n if (this.lockCount === 1 && this.restore === null) {\n this.timeoutLock.start(0, () => this.lock(referenceElement));\n }\n return this.release;\n }\n release = () => {\n this.lockCount -= 1;\n if (this.lockCount === 0 && this.restore) {\n this.timeoutUnlock.start(0, this.unlock);\n }\n };\n unlock = () => {\n if (this.lockCount === 0 && this.restore) {\n this.restore?.();\n this.restore = null;\n }\n };\n lock(referenceElement) {\n if (this.lockCount === 0 || this.restore !== null) {\n return;\n }\n const doc = ownerDocument(referenceElement);\n const html = doc.documentElement;\n const htmlOverflowY = ownerWindow(html).getComputedStyle(html).overflowY;\n\n // If the site author already hid overflow on , respect it and bail out.\n if (htmlOverflowY === 'hidden' || htmlOverflowY === 'clip') {\n this.restore = NOOP;\n return;\n }\n const isOverflowHiddenLock = isIOS || !hasInsetScrollbars(referenceElement);\n\n // On iOS, scroll locking does not work if the navbar is collapsed. Due to numerous\n // side effects and bugs that arise on iOS, it must be researched extensively before\n // being enabled to ensure it doesn't cause the following issues:\n // - Textboxes must scroll into view when focused, nor cause a glitchy scroll animation.\n // - The navbar must not force itself into view and cause layout shift.\n // - Scroll containers must not flicker upon closing a popup when it has an exit animation.\n this.restore = isOverflowHiddenLock ? preventScrollBasic(referenceElement) : preventScrollStandard(referenceElement);\n }\n}\nconst SCROLL_LOCKER = new ScrollLocker();\n\n/**\n * Locks the scroll of the document when enabled.\n *\n * @param enabled - Whether to enable the scroll lock.\n */\nexport function useScrollLock(params) {\n const {\n enabled = true,\n mounted,\n open,\n referenceElement = null\n } = params;\n\n // https://github.com/mui/base-ui/issues/1135\n useIsoLayoutEffect(() => {\n if (enabled && isWebKit && mounted && !open) {\n const doc = ownerDocument(referenceElement);\n const originalUserSelect = doc.body.style.userSelect;\n const originalWebkitUserSelect = doc.body.style.webkitUserSelect;\n doc.body.style.userSelect = 'none';\n doc.body.style.webkitUserSelect = 'none';\n return () => {\n doc.body.style.userSelect = originalUserSelect;\n doc.body.style.webkitUserSelect = originalWebkitUserSelect;\n };\n }\n return undefined;\n }, [enabled, mounted, open, referenceElement]);\n useIsoLayoutEffect(() => {\n if (!enabled) {\n return undefined;\n }\n return SCROLL_LOCKER.acquire(referenceElement);\n }, [enabled, referenceElement]);\n}","export function translateOpenChangeReason(nativeReason) {\n if (!nativeReason) {\n return undefined;\n }\n return {\n // Identical mappings\n 'focus-out': 'focus-out',\n 'escape-key': 'escape-key',\n 'outside-press': 'outside-press',\n 'list-navigation': 'list-navigation',\n // New mappings\n click: 'trigger-press',\n hover: 'trigger-hover',\n focus: 'trigger-focus',\n 'reference-press': 'trigger-press',\n 'safe-polygon': 'trigger-hover',\n 'ancestor-scroll': undefined // Not supported\n }[nativeReason];\n}","import * as React from 'react';\nexport const ContextMenuRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ContextMenuRootContext.displayName = \"ContextMenuRootContext\";\nexport function useContextMenuRootContext(optional = true) {\n const context = React.useContext(ContextMenuRootContext);\n if (context === undefined && !optional) {\n throw new Error('Base UI: ContextMenuRootContext is missing. ContextMenu parts must be placed within .');\n }\n return context;\n}","import * as React from 'react';\nexport const MenuSubmenuRootContext = /*#__PURE__*/React.createContext(false);\nif (process.env.NODE_ENV !== \"production\") MenuSubmenuRootContext.displayName = \"MenuSubmenuRootContext\";\nexport function useMenuSubmenuRootContext() {\n return React.useContext(MenuSubmenuRootContext);\n}","export function mergeObjects(a, b) {\n if (a && !b) {\n return a;\n }\n if (!a && b) {\n return b;\n }\n if (a || b) {\n return {\n ...a,\n ...b\n };\n }\n return undefined;\n}","import { mergeObjects } from '@base-ui-components/utils/mergeObjects';\nconst EMPTY_PROPS = {};\n\n/**\n * Merges multiple sets of React props. It follows the Object.assign pattern where the rightmost object's fields overwrite\n * the conflicting ones from others. This doesn't apply to event handlers, `className` and `style` props.\n * Event handlers are merged such that they are called in sequence (the rightmost one being called first),\n * and allows the user to prevent the subsequent event handlers from being\n * executed by attaching a `preventBaseUIHandler` method.\n * It also merges the `className` and `style` props, whereby the classes are concatenated\n * and the rightmost styles overwrite the subsequent ones.\n *\n * Props can either be provided as objects or as functions that take the previous props as an argument.\n * The function will receive the merged props up to that point (going from left to right):\n * so in the case of `(obj1, obj2, fn, obj3)`, `fn` will receive the merged props of `obj1` and `obj2`.\n * The function is responsible for chaining event handlers if needed (i.e. we don't run the merge logic).\n *\n * Event handlers returned by the functions are not automatically prevented when `preventBaseUIHandler` is called.\n * They must check `event.baseUIHandlerPrevented` themselves and bail out if it's true.\n *\n * @important **`ref` is not merged.**\n * @param props props to merge.\n * @returns the merged props.\n */\n/* eslint-disable id-denylist */\n\nexport function mergeProps(a, b, c, d, e) {\n // We need to mutably own `merged`\n let merged = {\n ...resolvePropsGetter(a, EMPTY_PROPS)\n };\n if (b) {\n merged = mergeOne(merged, b);\n }\n if (c) {\n merged = mergeOne(merged, c);\n }\n if (d) {\n merged = mergeOne(merged, d);\n }\n if (e) {\n merged = mergeOne(merged, e);\n }\n return merged;\n}\n/* eslint-enable id-denylist */\n\nexport function mergePropsN(props) {\n if (props.length === 0) {\n return EMPTY_PROPS;\n }\n if (props.length === 1) {\n return resolvePropsGetter(props[0], EMPTY_PROPS);\n }\n\n // We need to mutably own `merged`\n let merged = {\n ...resolvePropsGetter(props[0], EMPTY_PROPS)\n };\n for (let i = 1; i < props.length; i += 1) {\n merged = mergeOne(merged, props[i]);\n }\n return merged;\n}\nfunction mergeOne(merged, inputProps) {\n if (isPropsGetter(inputProps)) {\n return inputProps(merged);\n }\n return mutablyMergeInto(merged, inputProps);\n}\n\n/**\n * Merges two sets of props. In case of conflicts, the external props take precedence.\n */\nfunction mutablyMergeInto(mergedProps, externalProps) {\n if (!externalProps) {\n return mergedProps;\n }\n\n // eslint-disable-next-line guard-for-in\n for (const propName in externalProps) {\n const externalPropValue = externalProps[propName];\n switch (propName) {\n case 'style':\n {\n mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);\n break;\n }\n case 'className':\n {\n mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);\n break;\n }\n default:\n {\n if (isEventHandler(propName, externalPropValue)) {\n mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);\n } else {\n mergedProps[propName] = externalPropValue;\n }\n }\n }\n }\n return mergedProps;\n}\nfunction isEventHandler(key, value) {\n // This approach is more efficient than using a regex.\n const code0 = key.charCodeAt(0);\n const code1 = key.charCodeAt(1);\n const code2 = key.charCodeAt(2);\n return code0 === 111 /* o */ && code1 === 110 /* n */ && code2 >= 65 /* A */ && code2 <= 90 /* Z */ && (typeof value === 'function' || typeof value === 'undefined');\n}\nfunction isPropsGetter(inputProps) {\n return typeof inputProps === 'function';\n}\nfunction resolvePropsGetter(inputProps, previousProps) {\n if (isPropsGetter(inputProps)) {\n return inputProps(previousProps);\n }\n return inputProps ?? EMPTY_PROPS;\n}\nfunction mergeEventHandlers(ourHandler, theirHandler) {\n if (!theirHandler) {\n return ourHandler;\n }\n if (!ourHandler) {\n return theirHandler;\n }\n return event => {\n if (isSyntheticEvent(event)) {\n const baseUIEvent = event;\n makeEventPreventable(baseUIEvent);\n const result = theirHandler(baseUIEvent);\n if (!baseUIEvent.baseUIHandlerPrevented) {\n ourHandler?.(baseUIEvent);\n }\n return result;\n }\n const result = theirHandler(event);\n ourHandler?.(event);\n return result;\n };\n}\nexport function makeEventPreventable(event) {\n event.preventBaseUIHandler = () => {\n event.baseUIHandlerPrevented = true;\n };\n return event;\n}\nexport function mergeClassNames(ourClassName, theirClassName) {\n if (theirClassName) {\n if (ourClassName) {\n // eslint-disable-next-line prefer-template\n return theirClassName + ' ' + ourClassName;\n }\n return theirClassName;\n }\n return ourClassName;\n}\nfunction isSyntheticEvent(event) {\n return event != null && typeof event === 'object' && 'nativeEvent' in event;\n}","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { useTimeout } from '@base-ui-components/utils/useTimeout';\nimport { useEventCallback } from '@base-ui-components/utils/useEventCallback';\nimport { useControlled } from '@base-ui-components/utils/useControlled';\nimport { useId } from '@base-ui-components/utils/useId';\nimport { FloatingTree, useClick, useDismiss, useFloatingRootContext, useFocus, useHover, useInteractions, useListNavigation, useRole, useTypeahead, safePolygon } from \"../../floating-ui-react/index.js\";\nimport { MenuRootContext, useMenuRootContext } from \"./MenuRootContext.js\";\nimport { useMenubarContext } from \"../../menubar/MenubarContext.js\";\nimport { useTransitionStatus } from \"../../utils/useTransitionStatus.js\";\nimport { PATIENT_CLICK_THRESHOLD, TYPEAHEAD_RESET_MS } from \"../../utils/constants.js\";\nimport { useOpenChangeComplete } from \"../../utils/useOpenChangeComplete.js\";\nimport { useDirection } from \"../../direction-provider/DirectionContext.js\";\nimport { useScrollLock } from \"../../utils/useScrollLock.js\";\nimport { useOpenInteractionType } from \"../../utils/useOpenInteractionType.js\";\nimport { translateOpenChangeReason } from \"../../utils/translateOpenChangeReason.js\";\nimport { useContextMenuRootContext } from \"../../context-menu/root/ContextMenuRootContext.js\";\nimport { useMenuSubmenuRootContext } from \"../submenu-root/MenuSubmenuRootContext.js\";\nimport { useMixedToggleClickHandler } from \"../../utils/useMixedToggleClickHander.js\";\nimport { mergeProps } from \"../../merge-props/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst EMPTY_ARRAY = [];\nconst EMPTY_REF = {\n current: false\n};\n\n/**\n * Groups all parts of the menu.\n * Doesn’t render its own HTML element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nexport const MenuRoot = function MenuRoot(props) {\n const {\n children,\n open: openProp,\n onOpenChange,\n onOpenChangeComplete,\n defaultOpen = false,\n disabled = false,\n modal: modalProp,\n loop = true,\n orientation = 'vertical',\n actionsRef,\n openOnHover: openOnHoverProp,\n delay = 100,\n closeDelay = 0,\n closeParentOnEsc = true\n } = props;\n const [triggerElement, setTriggerElement] = React.useState(null);\n const [positionerElement, setPositionerElementUnwrapped] = React.useState(null);\n const [instantType, setInstantType] = React.useState();\n const [hoverEnabled, setHoverEnabled] = React.useState(true);\n const [activeIndex, setActiveIndex] = React.useState(null);\n const [lastOpenChangeReason, setLastOpenChangeReason] = React.useState(null);\n const [stickIfOpen, setStickIfOpen] = React.useState(true);\n const [allowMouseEnterState, setAllowMouseEnterState] = React.useState(false);\n const openEventRef = React.useRef(null);\n const popupRef = React.useRef(null);\n const positionerRef = React.useRef(null);\n const itemDomElements = React.useRef([]);\n const itemLabels = React.useRef([]);\n const stickIfOpenTimeout = useTimeout();\n const contextMenuContext = useContextMenuRootContext(true);\n const isSubmenu = useMenuSubmenuRootContext();\n let parent;\n {\n const parentContext = useMenuRootContext(true);\n const menubarContext = useMenubarContext(true);\n if (isSubmenu && parentContext) {\n parent = {\n type: 'menu',\n context: parentContext\n };\n } else if (menubarContext) {\n parent = {\n type: 'menubar',\n context: menubarContext\n };\n } else if (contextMenuContext) {\n parent = {\n type: 'context-menu',\n context: contextMenuContext\n };\n } else {\n parent = {\n type: undefined\n };\n }\n }\n let rootId = useId();\n if (parent.type !== undefined) {\n rootId = parent.context.rootId;\n }\n const modal = (parent.type === undefined || parent.type === 'context-menu') && (modalProp ?? true);\n\n // If this menu is a submenu, it should inherit `allowMouseEnter` from its\n // parent. Otherwise it manages the state on its own.\n const allowMouseEnter = parent.type === 'menu' ? parent.context.allowMouseEnter : allowMouseEnterState;\n const setAllowMouseEnter = parent.type === 'menu' ? parent.context.setAllowMouseEnter : setAllowMouseEnterState;\n if (process.env.NODE_ENV !== 'production') {\n if (parent.type !== undefined && modalProp !== undefined) {\n console.warn('Base UI: The `modal` prop is not supported on nested menus. It will be ignored.');\n }\n }\n const openOnHover = openOnHoverProp ?? (parent.type === 'menu' || parent.type === 'menubar' && parent.context.hasSubmenuOpen);\n const [open, setOpenUnwrapped] = useControlled({\n controlled: openProp,\n default: defaultOpen,\n name: 'MenuRoot',\n state: 'open'\n });\n const allowOutsidePressDismissalRef = React.useRef(parent.type !== 'context-menu');\n const allowOutsidePressDismissalTimeout = useTimeout();\n React.useEffect(() => {\n if (!open) {\n openEventRef.current = null;\n }\n if (parent.type !== 'context-menu') {\n return;\n }\n if (!open) {\n allowOutsidePressDismissalTimeout.clear();\n allowOutsidePressDismissalRef.current = false;\n return;\n }\n\n // With `mousedown` outside press events and long press touch input, there\n // needs to be a grace period after opening to ensure the dismissal event\n // doesn't fire immediately after open.\n allowOutsidePressDismissalTimeout.start(500, () => {\n allowOutsidePressDismissalRef.current = true;\n });\n }, [allowOutsidePressDismissalTimeout, open, parent.type]);\n const setPositionerElement = React.useCallback(value => {\n positionerRef.current = value;\n setPositionerElementUnwrapped(value);\n }, []);\n const {\n mounted,\n setMounted,\n transitionStatus\n } = useTransitionStatus(open);\n const {\n openMethod,\n triggerProps: interactionTypeProps,\n reset: resetOpenInteractionType\n } = useOpenInteractionType(open);\n useScrollLock({\n enabled: open && modal && lastOpenChangeReason !== 'trigger-hover' && openMethod !== 'touch',\n mounted,\n open,\n referenceElement: positionerElement\n });\n if (!open && !hoverEnabled) {\n setHoverEnabled(true);\n }\n const handleUnmount = useEventCallback(() => {\n setMounted(false);\n setStickIfOpen(true);\n setAllowMouseEnter(false);\n onOpenChangeComplete?.(false);\n resetOpenInteractionType();\n });\n useOpenChangeComplete({\n enabled: !actionsRef,\n open,\n ref: popupRef,\n onComplete() {\n if (!open) {\n handleUnmount();\n }\n }\n });\n const allowTouchToCloseRef = React.useRef(true);\n const allowTouchToCloseTimeout = useTimeout();\n const setOpen = useEventCallback((nextOpen, event, reason) => {\n if (open === nextOpen) {\n return;\n }\n if (nextOpen === false && event?.type === 'click' && event.pointerType === 'touch' && !allowTouchToCloseRef.current) {\n return;\n }\n\n // Workaround `enableFocusInside` in Floating UI setting `tabindex=0` of a non-highlighted\n // option upon close when tabbing out due to `keepMounted=true`:\n // https://github.com/floating-ui/floating-ui/pull/3004/files#diff-962a7439cdeb09ea98d4b622a45d517bce07ad8c3f866e089bda05f4b0bbd875R194-R199\n // This otherwise causes options to retain `tabindex=0` incorrectly when the popup is closed\n // when tabbing outside.\n if (!nextOpen && activeIndex !== null) {\n const activeOption = itemDomElements.current[activeIndex];\n // Wait for Floating UI's focus effect to have fired\n queueMicrotask(() => {\n activeOption?.setAttribute('tabindex', '-1');\n });\n }\n\n // Prevent the menu from closing on mobile devices that have a delayed click event.\n // In some cases the menu, when tapped, will fire the focus event first and then the click event.\n // Without this guard, the menu will close immediately after opening.\n if (nextOpen && reason === 'trigger-focus') {\n allowTouchToCloseRef.current = false;\n allowTouchToCloseTimeout.start(300, () => {\n allowTouchToCloseRef.current = true;\n });\n } else {\n allowTouchToCloseRef.current = true;\n allowTouchToCloseTimeout.clear();\n }\n const isKeyboardClick = (reason === 'trigger-press' || reason === 'item-press') && event.detail === 0 && event?.isTrusted;\n const isDismissClose = !nextOpen && (reason === 'escape-key' || reason == null);\n function changeState() {\n onOpenChange?.(nextOpen, event, reason);\n setOpenUnwrapped(nextOpen);\n setLastOpenChangeReason(reason ?? null);\n openEventRef.current = event ?? null;\n }\n if (reason === 'trigger-hover') {\n // Only allow \"patient\" clicks to close the menu if it's open.\n // If they clicked within 500ms of the menu opening, keep it open.\n setStickIfOpen(true);\n stickIfOpenTimeout.start(PATIENT_CLICK_THRESHOLD, () => {\n setStickIfOpen(false);\n });\n ReactDOM.flushSync(changeState);\n } else {\n changeState();\n }\n if (parent.type === 'menubar' && (reason === 'trigger-focus' || reason === 'focus-out' || reason === 'trigger-hover' || reason === 'list-navigation' || reason === 'sibling-open')) {\n setInstantType('group');\n } else if (isKeyboardClick || isDismissClose) {\n setInstantType(isKeyboardClick ? 'click' : 'dismiss');\n } else {\n setInstantType(undefined);\n }\n });\n React.useImperativeHandle(actionsRef, () => ({\n unmount: handleUnmount\n }), [handleUnmount]);\n let ctx;\n if (parent.type === 'context-menu') {\n ctx = parent.context;\n }\n React.useImperativeHandle(ctx?.positionerRef, () => positionerElement, [positionerElement]);\n React.useImperativeHandle(ctx?.actionsRef, () => ({\n setOpen\n }), [setOpen]);\n React.useEffect(() => {\n if (!open) {\n stickIfOpenTimeout.clear();\n }\n }, [stickIfOpenTimeout, open]);\n const floatingRootContext = useFloatingRootContext({\n elements: {\n reference: triggerElement,\n floating: positionerElement\n },\n open,\n onOpenChange(openValue, eventValue, reasonValue) {\n setOpen(openValue, eventValue, translateOpenChangeReason(reasonValue));\n }\n });\n const hover = useHover(floatingRootContext, {\n enabled: hoverEnabled && openOnHover && !disabled && parent.type !== 'context-menu' && (parent.type !== 'menubar' || parent.context.hasSubmenuOpen && !open),\n handleClose: safePolygon({\n blockPointerEvents: true\n }),\n mouseOnly: true,\n move: parent.type === 'menu',\n restMs: parent.type === undefined || parent.type === 'menu' && allowMouseEnter ? delay : undefined,\n delay: parent.type === 'menu' ? {\n open: allowMouseEnter ? delay : 10 ** 10,\n close: closeDelay\n } : {\n close: closeDelay\n }\n });\n const focus = useFocus(floatingRootContext, {\n enabled: !disabled && !open && parent.type === 'menubar' && parent.context.hasSubmenuOpen && !contextMenuContext\n });\n const click = useClick(floatingRootContext, {\n enabled: !disabled && parent.type !== 'context-menu',\n event: open && parent.type === 'menubar' ? 'click' : 'mousedown',\n toggle: !openOnHover || parent.type !== 'menu',\n ignoreMouse: openOnHover && parent.type === 'menu',\n stickIfOpen: parent.type === undefined ? stickIfOpen : false\n });\n const dismiss = useDismiss(floatingRootContext, {\n enabled: !disabled,\n bubbles: closeParentOnEsc && parent.type === 'menu',\n outsidePress() {\n if (parent.type !== 'context-menu' || openEventRef.current?.type === 'contextmenu') {\n return true;\n }\n return allowOutsidePressDismissalRef.current;\n }\n });\n const role = useRole(floatingRootContext, {\n role: 'menu'\n });\n const direction = useDirection();\n const listNavigation = useListNavigation(floatingRootContext, {\n enabled: !disabled,\n listRef: itemDomElements,\n activeIndex,\n nested: parent.type !== undefined,\n loop,\n orientation,\n parentOrientation: parent.type === 'menubar' ? parent.context.orientation : undefined,\n rtl: direction === 'rtl',\n disabledIndices: EMPTY_ARRAY,\n onNavigate: setActiveIndex,\n openOnArrowKeyDown: parent.type !== 'context-menu'\n });\n const typingRef = React.useRef(false);\n const onTypingChange = React.useCallback(nextTyping => {\n typingRef.current = nextTyping;\n }, []);\n const typeahead = useTypeahead(floatingRootContext, {\n listRef: itemLabels,\n activeIndex,\n resetMs: TYPEAHEAD_RESET_MS,\n onMatch: index => {\n if (open && index !== activeIndex) {\n setActiveIndex(index);\n }\n },\n onTypingChange\n });\n const {\n getReferenceProps,\n getFloatingProps,\n getItemProps\n } = useInteractions([hover, click, dismiss, focus, role, listNavigation, typeahead]);\n const mixedToggleHandlers = useMixedToggleClickHandler({\n open,\n enabled: parent.type === 'menubar',\n mouseDownAction: 'open'\n });\n const triggerProps = React.useMemo(() => {\n const referenceProps = mergeProps(getReferenceProps(), {\n onMouseEnter() {\n setHoverEnabled(true);\n },\n onMouseMove() {\n setAllowMouseEnter(true);\n }\n }, interactionTypeProps, mixedToggleHandlers);\n delete referenceProps.role;\n return referenceProps;\n }, [getReferenceProps, mixedToggleHandlers, setAllowMouseEnter, interactionTypeProps]);\n const popupProps = React.useMemo(() => getFloatingProps({\n onMouseEnter() {\n if (!openOnHover || parent.type === 'menu') {\n setHoverEnabled(false);\n }\n },\n onMouseMove() {\n setAllowMouseEnter(true);\n },\n onClick() {\n if (openOnHover) {\n setHoverEnabled(false);\n }\n }\n }), [getFloatingProps, openOnHover, parent.type, setAllowMouseEnter]);\n const itemProps = React.useMemo(() => getItemProps(), [getItemProps]);\n const context = React.useMemo(() => ({\n activeIndex,\n setActiveIndex,\n allowMouseUpTriggerRef: parent.type ? parent.context.allowMouseUpTriggerRef : EMPTY_REF,\n floatingRootContext,\n itemProps,\n popupProps,\n triggerProps,\n itemDomElements,\n itemLabels,\n mounted,\n open,\n popupRef,\n positionerRef,\n setOpen,\n setPositionerElement,\n triggerElement,\n setTriggerElement,\n transitionStatus,\n lastOpenChangeReason,\n instantType,\n onOpenChangeComplete,\n setHoverEnabled,\n typingRef,\n modal,\n disabled,\n parent,\n rootId,\n allowMouseEnter,\n setAllowMouseEnter\n }), [activeIndex, floatingRootContext, itemProps, popupProps, triggerProps, itemDomElements, itemLabels, mounted, open, positionerRef, setOpen, transitionStatus, triggerElement, setPositionerElement, lastOpenChangeReason, instantType, onOpenChangeComplete, modal, disabled, parent, rootId, allowMouseEnter, setAllowMouseEnter]);\n const content = /*#__PURE__*/_jsx(MenuRootContext.Provider, {\n value: context,\n children: children\n });\n if (parent.type === undefined || parent.type === 'context-menu') {\n // set up a FloatingTree to provide the context to nested menus\n return /*#__PURE__*/_jsx(FloatingTree, {\n children: content\n });\n }\n return content;\n};","'use client';\n\nimport * as React from 'react';\nimport { useEventCallback } from '@base-ui-components/utils/useEventCallback';\nimport { useEnhancedClickHandler } from '@base-ui-components/utils/useEnhancedClickHandler';\n\n/**\n * Determines the interaction type (keyboard, mouse, touch, etc.) that opened the component.\n *\n * @param open The open state of the component.\n */\nexport function useOpenInteractionType(open) {\n const [openMethod, setOpenMethod] = React.useState(null);\n const handleTriggerClick = useEventCallback((_, interactionType) => {\n if (!open) {\n setOpenMethod(interactionType);\n }\n });\n const reset = useEventCallback(() => {\n setOpenMethod(null);\n });\n const {\n onClick,\n onPointerDown\n } = useEnhancedClickHandler(handleTriggerClick);\n return React.useMemo(() => ({\n openMethod,\n reset,\n triggerProps: {\n onClick,\n onPointerDown\n }\n }), [openMethod, reset, onClick, onPointerDown]);\n}","import * as React from 'react';\n/**\n * Provides a cross-browser way to determine the type of the pointer used to click.\n * Safari and Firefox do not provide the PointerEvent to the click handler (they use MouseEvent) yet.\n * Additionally, this implementation detects if the click was triggered by the keyboard.\n *\n * @param handler The function to be called when the button is clicked. The first parameter is the original event and the second parameter is the pointer type.\n */\nexport function useEnhancedClickHandler(handler) {\n const lastClickInteractionTypeRef = React.useRef('');\n const handlePointerDown = React.useCallback(event => {\n if (event.defaultPrevented) {\n return;\n }\n lastClickInteractionTypeRef.current = event.pointerType;\n handler(event, event.pointerType);\n }, [handler]);\n const handleClick = React.useCallback(event => {\n // event.detail has the number of clicks performed on the element. 0 means it was triggered by the keyboard.\n if (event.detail === 0) {\n handler(event, 'keyboard');\n return;\n }\n if ('pointerType' in event) {\n // Chrome and Edge correctly use PointerEvent\n handler(event, event.pointerType);\n }\n handler(event, lastClickInteractionTypeRef.current);\n lastClickInteractionTypeRef.current = '';\n }, [handler]);\n return {\n onClick: handleClick,\n onPointerDown: handlePointerDown\n };\n}","'use client';\n\nimport * as React from 'react';\nimport { useAnimationFrame } from '@base-ui-components/utils/useAnimationFrame';\nimport { EMPTY_OBJECT } from \"../../utils/constants.js\";\nimport { isMouseLikePointerType } from \"../utils.js\";\n/**\n * Opens or closes the floating element when clicking the reference element.\n * @see https://floating-ui.com/docs/useClick\n */\nexport function useClick(context, props = {}) {\n const {\n open,\n onOpenChange,\n dataRef\n } = context;\n const {\n enabled = true,\n event: eventOption = 'click',\n toggle = true,\n ignoreMouse = false,\n stickIfOpen = true\n } = props;\n const pointerTypeRef = React.useRef(undefined);\n const frame = useAnimationFrame();\n const reference = React.useMemo(() => ({\n onPointerDown(event) {\n pointerTypeRef.current = event.pointerType;\n },\n onMouseDown(event) {\n const pointerType = pointerTypeRef.current;\n const nativeEvent = event.nativeEvent;\n\n // Ignore all buttons except for the \"main\" button.\n // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button\n if (event.button !== 0 || eventOption === 'click' || isMouseLikePointerType(pointerType, true) && ignoreMouse) {\n return;\n }\n const openEvent = dataRef.current.openEvent;\n const openEventType = openEvent?.type;\n const nextOpen = !(open && toggle && (openEvent && stickIfOpen ? openEventType === 'click' || openEventType === 'mousedown' : true));\n // Wait until focus is set on the element. This is an alternative to\n // `event.preventDefault()` to avoid :focus-visible from appearing when using a pointer.\n frame.request(() => {\n onOpenChange(nextOpen, nativeEvent, 'click');\n });\n },\n onClick(event) {\n const pointerType = pointerTypeRef.current;\n if (eventOption === 'mousedown' && pointerType) {\n pointerTypeRef.current = undefined;\n return;\n }\n if (isMouseLikePointerType(pointerType, true) && ignoreMouse) {\n return;\n }\n const openEvent = dataRef.current.openEvent;\n const openEventType = openEvent?.type;\n const nextOpen = !(open && toggle && (openEvent && stickIfOpen ? openEventType === 'click' || openEventType === 'mousedown' || openEventType === 'keydown' || openEventType === 'keyup' : true));\n onOpenChange(nextOpen, event.nativeEvent, 'click');\n },\n onKeyDown() {\n pointerTypeRef.current = undefined;\n }\n }), [dataRef, eventOption, ignoreMouse, onOpenChange, open, stickIfOpen, toggle, frame]);\n return React.useMemo(() => enabled ? {\n reference\n } : EMPTY_OBJECT, [enabled, reference]);\n}","import * as React from 'react';\nimport { useLatestRef } from '@base-ui-components/utils/useLatestRef';\nimport { useEventCallback } from '@base-ui-components/utils/useEventCallback';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { useTimeout } from '@base-ui-components/utils/useTimeout';\nimport { stopEvent } from \"../utils.js\";\n/**\n * Provides a matching callback that can be used to focus an item as the user\n * types, often used in tandem with `useListNavigation()`.\n * @see https://floating-ui.com/docs/useTypeahead\n */\nexport function useTypeahead(context, props) {\n const {\n open,\n dataRef\n } = context;\n const {\n listRef,\n activeIndex,\n onMatch: onMatchProp,\n onTypingChange: onTypingChangeProp,\n enabled = true,\n findMatch = null,\n resetMs = 750,\n ignoreKeys = [],\n selectedIndex = null\n } = props;\n const timeout = useTimeout();\n const stringRef = React.useRef('');\n const prevIndexRef = React.useRef(selectedIndex ?? activeIndex ?? -1);\n const matchIndexRef = React.useRef(null);\n const onMatch = useEventCallback(onMatchProp);\n const onTypingChange = useEventCallback(onTypingChangeProp);\n const findMatchRef = useLatestRef(findMatch);\n const ignoreKeysRef = useLatestRef(ignoreKeys);\n useIsoLayoutEffect(() => {\n if (open) {\n timeout.clear();\n matchIndexRef.current = null;\n stringRef.current = '';\n }\n }, [open, timeout]);\n useIsoLayoutEffect(() => {\n // Sync arrow key navigation but not typeahead navigation.\n if (open && stringRef.current === '') {\n prevIndexRef.current = selectedIndex ?? activeIndex ?? -1;\n }\n }, [open, selectedIndex, activeIndex]);\n const setTypingChange = useEventCallback(value => {\n if (value) {\n if (!dataRef.current.typing) {\n dataRef.current.typing = value;\n onTypingChange(value);\n }\n } else if (dataRef.current.typing) {\n dataRef.current.typing = value;\n onTypingChange(value);\n }\n });\n const onKeyDown = useEventCallback(event => {\n function getMatchingIndex(list, orderedList, string) {\n const str = findMatchRef.current ? findMatchRef.current(orderedList, string) : orderedList.find(text => text?.toLocaleLowerCase().indexOf(string.toLocaleLowerCase()) === 0);\n return str ? list.indexOf(str) : -1;\n }\n const listContent = listRef.current;\n if (stringRef.current.length > 0 && stringRef.current[0] !== ' ') {\n if (getMatchingIndex(listContent, listContent, stringRef.current) === -1) {\n setTypingChange(false);\n } else if (event.key === ' ') {\n stopEvent(event);\n }\n }\n if (listContent == null || ignoreKeysRef.current.includes(event.key) ||\n // Character key.\n event.key.length !== 1 ||\n // Modifier key.\n event.ctrlKey || event.metaKey || event.altKey) {\n return;\n }\n if (open && event.key !== ' ') {\n stopEvent(event);\n setTypingChange(true);\n }\n\n // Bail out if the list contains a word like \"llama\" or \"aaron\". TODO:\n // allow it in this case, too.\n const allowRapidSuccessionOfFirstLetter = listContent.every(text => text ? text[0]?.toLocaleLowerCase() !== text[1]?.toLocaleLowerCase() : true);\n\n // Allows the user to cycle through items that start with the same letter\n // in rapid succession.\n if (allowRapidSuccessionOfFirstLetter && stringRef.current === event.key) {\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n }\n stringRef.current += event.key;\n timeout.start(resetMs, () => {\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n setTypingChange(false);\n });\n const prevIndex = prevIndexRef.current;\n const index = getMatchingIndex(listContent, [...listContent.slice((prevIndex || 0) + 1), ...listContent.slice(0, (prevIndex || 0) + 1)], stringRef.current);\n if (index !== -1) {\n onMatch(index);\n matchIndexRef.current = index;\n } else if (event.key !== ' ') {\n stringRef.current = '';\n setTypingChange(false);\n }\n });\n const reference = React.useMemo(() => ({\n onKeyDown\n }), [onKeyDown]);\n const floating = React.useMemo(() => {\n return {\n onKeyDown,\n onKeyUp(event) {\n if (event.key === ' ') {\n setTypingChange(false);\n }\n }\n };\n }, [onKeyDown, setTypingChange]);\n return React.useMemo(() => enabled ? {\n reference,\n floating\n } : {}, [enabled, reference, floating]);\n}","import * as React from 'react';\nimport { ownerDocument } from '@base-ui-components/utils/owner';\nimport { EMPTY_OBJECT } from \"./constants.js\";\n\n/**\n * Returns `click` and `mousedown` handlers that fix the behavior of triggers of popups that are toggled by different events.\n * For example, a button that opens a popup on mousedown and closes it on click.\n * This hook prevents the popup from closing immediately after the mouse button is released.\n */\nexport function useMixedToggleClickHandler(params) {\n const {\n enabled = true,\n mouseDownAction,\n open\n } = params;\n const ignoreClickRef = React.useRef(false);\n return React.useMemo(() => {\n if (!enabled) {\n return EMPTY_OBJECT;\n }\n return {\n onMouseDown: event => {\n if (mouseDownAction === 'open' && !open || mouseDownAction === 'close' && open) {\n ignoreClickRef.current = true;\n ownerDocument(event.currentTarget).addEventListener('click', () => {\n ignoreClickRef.current = false;\n }, {\n once: true\n });\n }\n },\n onClick: event => {\n if (ignoreClickRef.current) {\n ignoreClickRef.current = false;\n event.preventBaseUIHandler();\n }\n }\n };\n }, [enabled, mouseDownAction, open]);\n}","import { useRefWithInit } from \"./useRefWithInit.js\";\n\n/**\n * Merges refs into a single memoized callback ref or `null`.\n * This makes sure multiple refs are updated together and have the same value.\n *\n * This function accepts up to four refs. If you need to merge more, or have an unspecified number of refs to merge,\n * use `useMergedRefsN` instead.\n */\n\nexport function useMergedRefs(a, b, c, d) {\n const forkRef = useRefWithInit(createForkRef).current;\n if (didChange(forkRef, a, b, c, d)) {\n update(forkRef, [a, b, c, d]);\n }\n return forkRef.callback;\n}\n\n/**\n * Merges an array of refs into a single memoized callback ref or `null`.\n *\n * If you need to merge a fixed number (up to four) of refs, use `useMergedRefs` instead for better performance.\n */\nexport function useMergedRefsN(refs) {\n const forkRef = useRefWithInit(createForkRef).current;\n if (didChangeN(forkRef, refs)) {\n update(forkRef, refs);\n }\n return forkRef.callback;\n}\nfunction createForkRef() {\n return {\n callback: null,\n cleanup: null,\n refs: []\n };\n}\nfunction didChange(forkRef, a, b, c, d) {\n // prettier-ignore\n return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;\n}\nfunction didChangeN(forkRef, newRefs) {\n return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]);\n}\nfunction update(forkRef, refs) {\n forkRef.refs = refs;\n if (refs.every(ref => ref == null)) {\n forkRef.callback = null;\n return;\n }\n forkRef.callback = instance => {\n if (forkRef.cleanup) {\n forkRef.cleanup();\n forkRef.cleanup = null;\n }\n if (instance != null) {\n const cleanupCallbacks = Array(refs.length).fill(null);\n for (let i = 0; i < refs.length; i += 1) {\n const ref = refs[i];\n if (ref == null) {\n continue;\n }\n switch (typeof ref) {\n case 'function':\n {\n const refCleanup = ref(instance);\n if (typeof refCleanup === 'function') {\n cleanupCallbacks[i] = refCleanup;\n }\n break;\n }\n case 'object':\n {\n ref.current = instance;\n break;\n }\n default:\n }\n }\n forkRef.cleanup = () => {\n for (let i = 0; i < refs.length; i += 1) {\n const ref = refs[i];\n if (ref == null) {\n continue;\n }\n switch (typeof ref) {\n case 'function':\n {\n const cleanupCallback = cleanupCallbacks[i];\n if (typeof cleanupCallback === 'function') {\n cleanupCallback();\n } else {\n ref(null);\n }\n break;\n }\n case 'object':\n {\n ref.current = null;\n break;\n }\n default:\n }\n }\n };\n }\n };\n}","import * as React from 'react';\nconst majorVersion = parseInt(React.version, 10);\nexport function isReactVersionAtLeast(reactVersionToCheck) {\n return majorVersion >= reactVersionToCheck;\n}","import * as React from 'react';\nimport { useMergedRefs, useMergedRefsN } from '@base-ui-components/utils/useMergedRefs';\nimport { isReactVersionAtLeast } from '@base-ui-components/utils/reactVersion';\nimport { mergeObjects } from '@base-ui-components/utils/mergeObjects';\nimport { getStyleHookProps } from \"./getStyleHookProps.js\";\nimport { resolveClassName } from \"./resolveClassName.js\";\nimport { mergeProps, mergePropsN, mergeClassNames } from \"../merge-props/index.js\";\nimport { EMPTY_OBJECT } from \"./constants.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Renders a Base UI element.\n *\n * @param element The default HTML element to render. Can be overridden by the `render` prop.\n * @param componentProps An object containing the `render` and `className` props to be used for element customization. Other props are ignored.\n * @param params Additional parameters for rendering the element.\n */\nexport function useRenderElement(element, componentProps, params = {}) {\n const renderProp = componentProps.render;\n const outProps = useRenderElementProps(componentProps, params);\n if (params.enabled === false) {\n return null;\n }\n const state = params.state ?? EMPTY_OBJECT;\n return evaluateRenderProp(element, renderProp, outProps, state);\n}\n\n/**\n * Computes render element final props.\n */\nfunction useRenderElementProps(componentProps, params = {}) {\n const {\n className: classNameProp,\n render: renderProp\n } = componentProps;\n const {\n state = EMPTY_OBJECT,\n ref,\n props,\n disableStyleHooks,\n customStyleHookMapping,\n enabled = true\n } = params;\n const className = enabled ? resolveClassName(classNameProp, state) : undefined;\n let styleHooks;\n if (disableStyleHooks !== true) {\n // SAFETY: We use typings to ensure `disableStyleHooks` is either always set or\n // always unset, so this `if` block is stable across renders.\n /* eslint-disable-next-line react-hooks/rules-of-hooks */\n styleHooks = React.useMemo(() => enabled ? getStyleHookProps(state, customStyleHookMapping) : EMPTY_OBJECT, [state, customStyleHookMapping, enabled]);\n }\n const outProps = enabled ? mergeObjects(styleHooks, Array.isArray(props) ? mergePropsN(props) : props) ?? EMPTY_OBJECT : EMPTY_OBJECT;\n\n // SAFETY: The `useMergedRefs` functions use a single hook to store the same value,\n // switching between them at runtime is safe. If this assertion fails, React will\n // throw at runtime anyway.\n // This also skips the `useMergedRefs` call on the server, which is fine because\n // refs are not used on the server side.\n /* eslint-disable react-hooks/rules-of-hooks */\n if (typeof document !== 'undefined') {\n if (!enabled) {\n useMergedRefs(null, null);\n } else if (Array.isArray(ref)) {\n outProps.ref = useMergedRefsN([outProps.ref, getChildRef(renderProp), ...ref]);\n } else {\n outProps.ref = useMergedRefs(outProps.ref, getChildRef(renderProp), ref);\n }\n }\n if (!enabled) {\n return EMPTY_OBJECT;\n }\n if (className !== undefined) {\n outProps.className = mergeClassNames(outProps.className, className);\n }\n return outProps;\n}\nfunction evaluateRenderProp(element, render, props, state) {\n if (render) {\n if (typeof render === 'function') {\n return render(props, state);\n }\n const mergedProps = mergeProps(props, render.props);\n mergedProps.ref = props.ref;\n return /*#__PURE__*/React.cloneElement(render, mergedProps);\n }\n if (element) {\n if (typeof element === 'string') {\n return renderTag(element, props);\n }\n }\n // Unreachable, but the typings on `useRenderElement` need to be reworked\n // to annotate it correctly.\n throw new Error('Base UI: Render element or function are not defined.');\n}\nfunction renderTag(Tag, props) {\n if (Tag === 'button') {\n return /*#__PURE__*/_jsx(\"button\", {\n type: \"button\",\n ...props\n });\n }\n if (Tag === 'img') {\n return /*#__PURE__*/_jsx(\"img\", {\n alt: \"\",\n ...props\n });\n }\n return /*#__PURE__*/React.createElement(Tag, props);\n}\nfunction getChildRef(render) {\n if (render && typeof render !== 'function') {\n return isReactVersionAtLeast(19) ? render.props.ref : render.ref;\n }\n return null;\n}","/**\n * If the provided className is a string, it will be returned as is.\n * Otherwise, the function will call the className function with the state as the first argument.\n *\n * @param className\n * @param state\n */\nexport function resolveClassName(className, state) {\n return typeof className === 'function' ? className(state) : className;\n}","export function getStyleHookProps(state, customMapping) {\n const props = {};\n\n /* eslint-disable-next-line guard-for-in */\n for (const key in state) {\n const value = state[key];\n if (customMapping?.hasOwnProperty(key)) {\n const customProps = customMapping[key](value);\n if (customProps != null) {\n Object.assign(props, customProps);\n }\n continue;\n }\n if (value === true) {\n props[`data-${key.toLowerCase()}`] = '';\n } else if (value) {\n props[`data-${key.toLowerCase()}`] = value.toString();\n }\n }\n return props;\n}","'use client';\n\nimport * as React from 'react';\nexport const CompositeRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") CompositeRootContext.displayName = \"CompositeRootContext\";\nexport function useCompositeRootContext(optional = false) {\n const context = React.useContext(CompositeRootContext);\n if (context === undefined && !optional) {\n throw new Error('Base UI: CompositeRootContext is missing. Composite parts must be placed within .');\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { useEventCallback } from '@base-ui-components/utils/useEventCallback';\nimport { error } from '@base-ui-components/utils/error';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { makeEventPreventable, mergeProps } from \"../merge-props/index.js\";\nimport { useCompositeRootContext } from \"../composite/root/CompositeRootContext.js\";\nimport { useFocusableWhenDisabled } from \"../utils/useFocusableWhenDisabled.js\";\nexport function useButton(parameters = {}) {\n const {\n disabled = false,\n focusableWhenDisabled,\n tabIndex = 0,\n native: isNativeButton = true\n } = parameters;\n const buttonRef = React.useRef(null);\n const isCompositeItem = useCompositeRootContext(true) !== undefined;\n const isValidLink = useEventCallback(() => {\n const element = buttonRef.current;\n return Boolean(element?.tagName === 'A' && element?.href);\n });\n const {\n props: focusableWhenDisabledProps\n } = useFocusableWhenDisabled({\n focusableWhenDisabled,\n disabled,\n composite: isCompositeItem,\n tabIndex,\n isNativeButton\n });\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (!buttonRef.current) {\n return;\n }\n const isButtonTag = buttonRef.current.tagName === 'BUTTON';\n if (isNativeButton) {\n if (!isButtonTag) {\n error('A component that acts as a button was not rendered as a native