@manifest-network/manifest-agent-core 0.18.0 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/_virtual/_@oxc-project_runtime@0.140.0/helpers/esm/defineProperty.js +12 -0
  2. package/dist/_virtual/_@oxc-project_runtime@0.140.0/helpers/esm/toPrimitive.js +14 -0
  3. package/dist/_virtual/_@oxc-project_runtime@0.140.0/helpers/esm/toPropertyKey.js +9 -0
  4. package/dist/_virtual/_@oxc-project_runtime@0.140.0/helpers/esm/typeof.js +11 -0
  5. package/dist/close-lease.d.ts +0 -1
  6. package/dist/close-lease.d.ts.map +1 -1
  7. package/dist/close-lease.js.map +1 -1
  8. package/dist/deploy-app.d.ts +0 -1
  9. package/dist/deploy-app.d.ts.map +1 -1
  10. package/dist/deploy-app.js +4 -2
  11. package/dist/deploy-app.js.map +1 -1
  12. package/dist/deploy-app.test-d.d.ts +1 -1
  13. package/dist/deploy-app.test-d.js +1 -1
  14. package/dist/deploy-app.test-d.js.map +1 -1
  15. package/dist/internals/cancellation.d.ts +0 -1
  16. package/dist/internals/cancellation.d.ts.map +1 -1
  17. package/dist/internals/cancellation.js.map +1 -1
  18. package/dist/internals/classify-deploy-error.d.ts.map +1 -1
  19. package/dist/internals/classify-deploy-response.d.ts.map +1 -1
  20. package/dist/internals/classify-deploy-response.js.map +1 -1
  21. package/dist/internals/connection.d.ts.map +1 -1
  22. package/dist/internals/connection.js.map +1 -1
  23. package/dist/internals/evaluate-readiness-from-fred.d.ts +1 -1
  24. package/dist/internals/evaluate-readiness-from-fred.d.ts.map +1 -1
  25. package/dist/internals/evaluate-readiness-from-fred.js.map +1 -1
  26. package/dist/internals/evaluate-readiness.d.ts +7 -3
  27. package/dist/internals/evaluate-readiness.d.ts.map +1 -1
  28. package/dist/internals/evaluate-readiness.js.map +1 -1
  29. package/dist/internals/format-success.d.ts +0 -1
  30. package/dist/internals/format-success.d.ts.map +1 -1
  31. package/dist/internals/format-success.js.map +1 -1
  32. package/dist/internals/humanize-denom.d.ts +0 -1
  33. package/dist/internals/humanize-denom.d.ts.map +1 -1
  34. package/dist/internals/humanize-denom.js.map +1 -1
  35. package/dist/internals/inspect-image.d.ts.map +1 -1
  36. package/dist/internals/inspect-image.js +1 -1
  37. package/dist/internals/inspect-image.js.map +1 -1
  38. package/dist/internals/lease-items.d.ts.map +1 -1
  39. package/dist/internals/lease-state.d.ts +0 -1
  40. package/dist/internals/lease-state.d.ts.map +1 -1
  41. package/dist/internals/lease-state.js +1 -1
  42. package/dist/internals/lease-state.js.map +1 -1
  43. package/dist/internals/render-deployment-plan.d.ts +1 -0
  44. package/dist/internals/render-deployment-plan.d.ts.map +1 -1
  45. package/dist/internals/render-deployment-plan.js +4 -3
  46. package/dist/internals/render-deployment-plan.js.map +1 -1
  47. package/dist/internals/render-intent-recap.d.ts +0 -1
  48. package/dist/internals/render-intent-recap.d.ts.map +1 -1
  49. package/dist/internals/render-intent-recap.js.map +1 -1
  50. package/dist/internals/render-partial-success-prompt.d.ts +0 -1
  51. package/dist/internals/render-partial-success-prompt.d.ts.map +1 -1
  52. package/dist/internals/save-manifest.d.ts.map +1 -1
  53. package/dist/internals/save-manifest.js.map +1 -1
  54. package/dist/internals/secret-denylist.d.ts.map +1 -1
  55. package/dist/internals/secret-denylist.js +1 -1
  56. package/dist/internals/secret-denylist.js.map +1 -1
  57. package/dist/internals/spec-normalize.d.ts +0 -1
  58. package/dist/internals/spec-normalize.d.ts.map +1 -1
  59. package/dist/internals/spec-normalize.js.map +1 -1
  60. package/dist/internals/verify-domain-state.d.ts.map +1 -1
  61. package/dist/internals/verify-domain-state.js.map +1 -1
  62. package/dist/internals/verify-recover.d.ts +0 -1
  63. package/dist/internals/verify-recover.d.ts.map +1 -1
  64. package/dist/manage-domain.d.ts +0 -1
  65. package/dist/manage-domain.d.ts.map +1 -1
  66. package/dist/manage-domain.js +1 -24
  67. package/dist/manage-domain.js.map +1 -1
  68. package/dist/node_modules/@vitest/pretty-format/dist/index.js +3 -3
  69. package/dist/node_modules/@vitest/pretty-format/dist/index.js.map +1 -1
  70. package/dist/node_modules/@vitest/runner/dist/chunk-artifact.js +20 -15
  71. package/dist/node_modules/@vitest/runner/dist/chunk-artifact.js.map +1 -1
  72. package/dist/node_modules/@vitest/runner/dist/index.js +2 -1
  73. package/dist/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js +1 -1
  74. package/dist/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js.map +1 -1
  75. package/dist/node_modules/@vitest/utils/dist/display.js +1 -1
  76. package/dist/node_modules/@vitest/utils/dist/display.js.map +1 -1
  77. package/dist/node_modules/@vitest/utils/dist/helpers.js +1 -1
  78. package/dist/node_modules/@vitest/utils/dist/helpers.js.map +1 -1
  79. package/dist/node_modules/@vitest/utils/dist/source-map.js +4 -4
  80. package/dist/node_modules/@vitest/utils/dist/source-map.js.map +1 -1
  81. package/dist/node_modules/tinyrainbow/dist/index.js +1 -1
  82. package/dist/node_modules/vite/dist/node/module-runner.js +8 -3
  83. package/dist/node_modules/vite/dist/node/module-runner.js.map +1 -1
  84. package/dist/node_modules/vitest/dist/index.js +2 -2
  85. package/dist/troubleshoot.d.ts +0 -1
  86. package/dist/troubleshoot.d.ts.map +1 -1
  87. package/dist/troubleshoot.js.map +1 -1
  88. package/dist/types.d.ts +0 -1
  89. package/dist/types.d.ts.map +1 -1
  90. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"module-runner.js","names":[],"sources":["../../../../../../../node_modules/vite/dist/node/module-runner.js"],"sourcesContent":["let SOURCEMAPPING_URL = \"sourceMa\";\nSOURCEMAPPING_URL += \"ppingURL\";\n//#endregion\n//#region src/shared/utils.ts\nconst isWindows = typeof process < \"u\" && process.platform === \"win32\";\n/**\n* Undo {@link wrapId}'s `/@id/` and null byte replacements.\n*/\nfunction unwrapId(id) {\n\treturn id.startsWith(\"/@id/\") ? id.slice(5).replace(\"__x00__\", \"\\0\") : id;\n}\nconst windowsSlashRE = /\\\\/g;\nfunction slash(p) {\n\treturn p.replace(windowsSlashRE, \"/\");\n}\nconst postfixRE = /[?#].*$/;\nfunction cleanUrl(url) {\n\treturn url.replace(postfixRE, \"\");\n}\nfunction isPrimitive(value) {\n\treturn !value || typeof value != \"object\" && typeof value != \"function\";\n}\nconst AsyncFunction = async function() {}.constructor;\nlet asyncFunctionDeclarationPaddingLineCount;\nfunction getAsyncFunctionDeclarationPaddingLineCount() {\n\tif (asyncFunctionDeclarationPaddingLineCount === void 0) {\n\t\tlet body = \"/*code*/\", source = new AsyncFunction(\"a\", \"b\", body).toString();\n\t\tasyncFunctionDeclarationPaddingLineCount = source.slice(0, source.indexOf(body)).split(\"\\n\").length - 1;\n\t}\n\treturn asyncFunctionDeclarationPaddingLineCount;\n}\nfunction promiseWithResolvers() {\n\tlet resolve, reject;\n\treturn {\n\t\tpromise: new Promise((_resolve, _reject) => {\n\t\t\tresolve = _resolve, reject = _reject;\n\t\t}),\n\t\tresolve,\n\t\treject\n\t};\n}\n//#endregion\n//#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs\nconst _DRIVE_LETTER_START_RE = /^[A-Za-z]:\\//;\nfunction normalizeWindowsPath(input = \"\") {\n\treturn input && input.replace(/\\\\/g, \"/\").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());\n}\nconst _IS_ABSOLUTE_RE = /^[/\\\\](?![/\\\\])|^[/\\\\]{2}(?!\\.)|^[A-Za-z]:[/\\\\]/, _DRIVE_LETTER_RE = /^[A-Za-z]:$/;\nfunction cwd() {\n\treturn typeof process < \"u\" && typeof process.cwd == \"function\" ? process.cwd().replace(/\\\\/g, \"/\") : \"/\";\n}\nconst resolve = function(...arguments_) {\n\targuments_ = arguments_.map((argument) => normalizeWindowsPath(argument));\n\tlet resolvedPath = \"\", resolvedAbsolute = !1;\n\tfor (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {\n\t\tlet path = index >= 0 ? arguments_[index] : cwd();\n\t\t!path || path.length === 0 || (resolvedPath = `${path}/${resolvedPath}`, resolvedAbsolute = isAbsolute(path));\n\t}\n\treturn resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute), resolvedAbsolute && !isAbsolute(resolvedPath) ? `/${resolvedPath}` : resolvedPath.length > 0 ? resolvedPath : \".\";\n};\nfunction normalizeString(path, allowAboveRoot) {\n\tlet res = \"\", lastSegmentLength = 0, lastSlash = -1, dots = 0, char = null;\n\tfor (let index = 0; index <= path.length; ++index) {\n\t\tif (index < path.length) char = path[index];\n\t\telse if (char === \"/\") break;\n\t\telse char = \"/\";\n\t\tif (char === \"/\") {\n\t\t\tif (!(lastSlash === index - 1 || dots === 1)) if (dots === 2) {\n\t\t\t\tif (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== \".\" || res[res.length - 2] !== \".\") {\n\t\t\t\t\tif (res.length > 2) {\n\t\t\t\t\t\tlet lastSlashIndex = res.lastIndexOf(\"/\");\n\t\t\t\t\t\tlastSlashIndex === -1 ? (res = \"\", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf(\"/\")), lastSlash = index, dots = 0;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if (res.length > 0) {\n\t\t\t\t\t\tres = \"\", lastSegmentLength = 0, lastSlash = index, dots = 0;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tallowAboveRoot && (res += res.length > 0 ? \"/..\" : \"..\", lastSegmentLength = 2);\n\t\t\t} else res.length > 0 ? res += `/${path.slice(lastSlash + 1, index)}` : res = path.slice(lastSlash + 1, index), lastSegmentLength = index - lastSlash - 1;\n\t\t\tlastSlash = index, dots = 0;\n\t\t} else char === \".\" && dots !== -1 ? ++dots : dots = -1;\n\t}\n\treturn res;\n}\nconst isAbsolute = function(p) {\n\treturn _IS_ABSOLUTE_RE.test(p);\n}, dirname = function(p) {\n\tlet segments = normalizeWindowsPath(p).replace(/\\/$/, \"\").split(\"/\").slice(0, -1);\n\treturn segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0]) && (segments[0] += \"/\"), segments.join(\"/\") || (isAbsolute(p) ? \"/\" : \".\");\n}, textDecoder = new TextDecoder(), decodeBase64 = typeof Buffer == \"function\" && typeof Buffer.from == \"function\" ? (base64) => Buffer.from(base64, \"base64\").toString(\"utf-8\") : (base64) => textDecoder.decode(Uint8Array.from(atob(base64), (c) => c.charCodeAt(0))), percentRegEx = /%/g, backslashRegEx = /\\\\/g, newlineRegEx = /\\n/g, carriageReturnRegEx = /\\r/g, tabRegEx = /\\t/g, questionRegex = /\\?/g, hashRegex = /#/g;\nfunction encodePathChars(filepath) {\n\treturn filepath.includes(\"%\") && (filepath = filepath.replace(percentRegEx, \"%25\")), !isWindows && filepath.includes(\"\\\\\") && (filepath = filepath.replace(backslashRegEx, \"%5C\")), filepath.includes(\"\\n\") && (filepath = filepath.replace(newlineRegEx, \"%0A\")), filepath.includes(\"\\r\") && (filepath = filepath.replace(carriageReturnRegEx, \"%0D\")), filepath.includes(\"\t\") && (filepath = filepath.replace(tabRegEx, \"%09\")), filepath;\n}\nconst posixDirname = dirname, posixResolve = resolve;\nfunction posixPathToFileHref(posixPath) {\n\tlet resolved = posixResolve(posixPath), filePathLast = posixPath.charCodeAt(posixPath.length - 1);\n\treturn (filePathLast === 47 || isWindows && filePathLast === 92) && resolved[resolved.length - 1] !== \"/\" && (resolved += \"/\"), resolved = encodePathChars(resolved), resolved.includes(\"?\") && (resolved = resolved.replace(questionRegex, \"%3F\")), resolved.includes(\"#\") && (resolved = resolved.replace(hashRegex, \"%23\")), new URL(`file://${resolved}`).href;\n}\nfunction toWindowsPath(path) {\n\treturn path.replace(/\\//g, \"\\\\\");\n}\n//#endregion\n//#region ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs\nvar comma = 44, chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\", intToChar = new Uint8Array(64), charToInt = new Uint8Array(128);\nfor (let i = 0; i < chars.length; i++) {\n\tlet c = chars.charCodeAt(i);\n\tintToChar[i] = c, charToInt[c] = i;\n}\nfunction decodeInteger(reader, relative) {\n\tlet value = 0, shift = 0, integer = 0;\n\tdo\n\t\tinteger = charToInt[reader.next()], value |= (integer & 31) << shift, shift += 5;\n\twhile (integer & 32);\n\tlet shouldNegate = value & 1;\n\treturn value >>>= 1, shouldNegate && (value = -2147483648 | -value), relative + value;\n}\nfunction hasMoreVlq(reader, max) {\n\treturn reader.pos >= max ? !1 : reader.peek() !== comma;\n}\nvar StringReader = class {\n\tconstructor(buffer) {\n\t\tthis.pos = 0, this.buffer = buffer;\n\t}\n\tnext() {\n\t\treturn this.buffer.charCodeAt(this.pos++);\n\t}\n\tpeek() {\n\t\treturn this.buffer.charCodeAt(this.pos);\n\t}\n\tindexOf(char) {\n\t\tlet { buffer, pos } = this, idx = buffer.indexOf(char, pos);\n\t\treturn idx === -1 ? buffer.length : idx;\n\t}\n};\nfunction decode(mappings) {\n\tlet { length } = mappings, reader = new StringReader(mappings), decoded = [], genColumn = 0, sourcesIndex = 0, sourceLine = 0, sourceColumn = 0, namesIndex = 0;\n\tdo {\n\t\tlet semi = reader.indexOf(\";\"), line = [], sorted = !0, lastCol = 0;\n\t\tfor (genColumn = 0; reader.pos < semi;) {\n\t\t\tlet seg;\n\t\t\tgenColumn = decodeInteger(reader, genColumn), genColumn < lastCol && (sorted = !1), lastCol = genColumn, hasMoreVlq(reader, semi) ? (sourcesIndex = decodeInteger(reader, sourcesIndex), sourceLine = decodeInteger(reader, sourceLine), sourceColumn = decodeInteger(reader, sourceColumn), hasMoreVlq(reader, semi) ? (namesIndex = decodeInteger(reader, namesIndex), seg = [\n\t\t\t\tgenColumn,\n\t\t\t\tsourcesIndex,\n\t\t\t\tsourceLine,\n\t\t\t\tsourceColumn,\n\t\t\t\tnamesIndex\n\t\t\t]) : seg = [\n\t\t\t\tgenColumn,\n\t\t\t\tsourcesIndex,\n\t\t\t\tsourceLine,\n\t\t\t\tsourceColumn\n\t\t\t]) : seg = [genColumn], line.push(seg), reader.pos++;\n\t\t}\n\t\tsorted || sort(line), decoded.push(line), reader.pos = semi + 1;\n\t} while (reader.pos <= length);\n\treturn decoded;\n}\nfunction sort(line) {\n\tline.sort(sortComparator);\n}\nfunction sortComparator(a, b) {\n\treturn a[0] - b[0];\n}\n//#endregion\n//#region ../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs\nvar COLUMN = 0, SOURCES_INDEX = 1, SOURCE_LINE = 2, SOURCE_COLUMN = 3, NAMES_INDEX = 4, found = !1;\nfunction binarySearch(haystack, needle, low, high) {\n\tfor (; low <= high;) {\n\t\tlet mid = low + (high - low >> 1), cmp = haystack[mid][COLUMN] - needle;\n\t\tif (cmp === 0) return found = !0, mid;\n\t\tcmp < 0 ? low = mid + 1 : high = mid - 1;\n\t}\n\treturn found = !1, low - 1;\n}\nfunction upperBound(haystack, needle, index) {\n\tfor (let i = index + 1; i < haystack.length && haystack[i][COLUMN] === needle; index = i++);\n\treturn index;\n}\nfunction lowerBound(haystack, needle, index) {\n\tfor (let i = index - 1; i >= 0 && haystack[i][COLUMN] === needle; index = i--);\n\treturn index;\n}\nfunction memoizedBinarySearch(haystack, needle, state, key) {\n\tlet { lastKey, lastNeedle, lastIndex } = state, low = 0, high = haystack.length - 1;\n\tif (key === lastKey) {\n\t\tif (needle === lastNeedle) return found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle, lastIndex;\n\t\tneedle >= lastNeedle ? low = lastIndex === -1 ? 0 : lastIndex : high = lastIndex;\n\t}\n\treturn state.lastKey = key, state.lastNeedle = needle, state.lastIndex = binarySearch(haystack, needle, low, high);\n}\nvar LINE_GTR_ZERO = \"`line` must be greater than 0 (lines start at line 1)\", COL_GTR_EQ_ZERO = \"`column` must be greater than or equal to 0 (columns start at column 0)\";\nfunction cast(map) {\n\treturn map;\n}\nfunction decodedMappings(map) {\n\tvar _a;\n\treturn (_a = cast(map))._decoded || (_a._decoded = decode(cast(map)._encoded));\n}\nfunction originalPositionFor(map, needle) {\n\tlet { line, column, bias } = needle;\n\tif (line--, line < 0) throw Error(LINE_GTR_ZERO);\n\tif (column < 0) throw Error(COL_GTR_EQ_ZERO);\n\tlet decoded = decodedMappings(map);\n\tif (line >= decoded.length) return OMapping(null, null, null, null);\n\tlet segments = decoded[line], index = traceSegmentInternal(segments, cast(map)._decodedMemo, line, column, bias || 1);\n\tif (index === -1) return OMapping(null, null, null, null);\n\tlet segment = segments[index];\n\tif (segment.length === 1) return OMapping(null, null, null, null);\n\tlet { names, resolvedSources } = map;\n\treturn OMapping(resolvedSources[segment[SOURCES_INDEX]], segment[SOURCE_LINE] + 1, segment[SOURCE_COLUMN], segment.length === 5 ? names[segment[NAMES_INDEX]] : null);\n}\nfunction OMapping(source, line, column, name) {\n\treturn {\n\t\tsource,\n\t\tline,\n\t\tcolumn,\n\t\tname\n\t};\n}\nfunction traceSegmentInternal(segments, memo, line, column, bias) {\n\tlet index = memoizedBinarySearch(segments, column, memo, line);\n\treturn found ? index = (bias === -1 ? upperBound : lowerBound)(segments, column, index) : bias === -1 && index++, index === -1 || index === segments.length ? -1 : index;\n}\n//#endregion\n//#region src/module-runner/sourcemap/decoder.ts\nvar DecodedMap = class {\n\tmap;\n\t_encoded;\n\t_decoded;\n\t_decodedMemo;\n\turl;\n\tfile;\n\tversion;\n\tnames = [];\n\tresolvedSources;\n\tconstructor(map, from) {\n\t\tthis.map = map;\n\t\tlet { mappings, names, sources } = map;\n\t\tthis.version = map.version, this.names = names || [], this._encoded = mappings || \"\", this._decodedMemo = memoizedState(), this.url = from, this.file = from;\n\t\tlet originDir = posixDirname(from);\n\t\tthis.resolvedSources = (sources || []).map((s) => posixResolve(originDir, s || \"\"));\n\t}\n};\nfunction memoizedState() {\n\treturn {\n\t\tlastKey: -1,\n\t\tlastNeedle: -1,\n\t\tlastIndex: -1\n\t};\n}\nfunction getOriginalPosition(map, needle) {\n\tlet result = originalPositionFor(map, needle);\n\treturn result.column == null ? null : result;\n}\n//#endregion\n//#region src/module-runner/evaluatedModules.ts\nconst MODULE_RUNNER_SOURCEMAPPING_REGEXP = RegExp(`//# ${SOURCEMAPPING_URL}=data:application/json;base64,(.+)`);\nvar EvaluatedModuleNode = class {\n\tid;\n\turl;\n\timporters = /* @__PURE__ */ new Set();\n\timports = /* @__PURE__ */ new Set();\n\tevaluated = !1;\n\tmeta;\n\tpromise;\n\texports;\n\tfile;\n\tmap;\n\tconstructor(id, url) {\n\t\tthis.id = id, this.url = url, this.file = cleanUrl(id);\n\t}\n}, EvaluatedModules = class {\n\tidToModuleMap = /* @__PURE__ */ new Map();\n\tfileToModulesMap = /* @__PURE__ */ new Map();\n\turlToIdModuleMap = /* @__PURE__ */ new Map();\n\t/**\n\t* Returns the module node by the resolved module ID. Usually, module ID is\n\t* the file system path with query and/or hash. It can also be a virtual module.\n\t*\n\t* Module runner graph will have 1 to 1 mapping with the server module graph.\n\t* @param id Resolved module ID\n\t*/\n\tgetModuleById(id) {\n\t\treturn this.idToModuleMap.get(id);\n\t}\n\t/**\n\t* Returns all modules related to the file system path. Different modules\n\t* might have different query parameters or hash, so it's possible to have\n\t* multiple modules for the same file.\n\t* @param file The file system path of the module\n\t*/\n\tgetModulesByFile(file) {\n\t\treturn this.fileToModulesMap.get(file);\n\t}\n\t/**\n\t* Returns the module node by the URL that was used in the import statement.\n\t* Unlike module graph on the server, the URL is not resolved and is used as is.\n\t* @param url Server URL that was used in the import statement\n\t*/\n\tgetModuleByUrl(url) {\n\t\treturn this.urlToIdModuleMap.get(unwrapId(url));\n\t}\n\t/**\n\t* Ensure that module is in the graph. If the module is already in the graph,\n\t* it will return the existing module node. Otherwise, it will create a new\n\t* module node and add it to the graph.\n\t* @param id Resolved module ID\n\t* @param url URL that was used in the import statement\n\t*/\n\tensureModule(id, url) {\n\t\tif (id = normalizeModuleId(id), this.idToModuleMap.has(id)) {\n\t\t\tlet moduleNode = this.idToModuleMap.get(id);\n\t\t\treturn this.urlToIdModuleMap.set(url, moduleNode), moduleNode;\n\t\t}\n\t\tlet moduleNode = new EvaluatedModuleNode(id, url);\n\t\tthis.idToModuleMap.set(id, moduleNode), this.urlToIdModuleMap.set(url, moduleNode);\n\t\tlet fileModules = this.fileToModulesMap.get(moduleNode.file) || /* @__PURE__ */ new Set();\n\t\treturn fileModules.add(moduleNode), this.fileToModulesMap.set(moduleNode.file, fileModules), moduleNode;\n\t}\n\tinvalidateModule(node) {\n\t\tnode.evaluated = !1, node.meta = void 0, node.map = void 0, node.promise = void 0, node.exports = void 0, node.imports.clear();\n\t}\n\t/**\n\t* Extracts the inlined source map from the module code and returns the decoded\n\t* source map. If the source map is not inlined, it will return null.\n\t* @param id Resolved module ID\n\t*/\n\tgetModuleSourceMapById(id) {\n\t\tlet mod = this.getModuleById(id);\n\t\tif (!mod) return null;\n\t\tif (mod.map) return mod.map;\n\t\tif (!mod.meta || !(\"code\" in mod.meta)) return null;\n\t\tlet pattern = `//# ${SOURCEMAPPING_URL}=data:application/json;base64,`, lastIndex = mod.meta.code.lastIndexOf(pattern);\n\t\tif (lastIndex === -1) return null;\n\t\tlet mapString = MODULE_RUNNER_SOURCEMAPPING_REGEXP.exec(mod.meta.code.slice(lastIndex))?.[1];\n\t\treturn mapString ? (mod.map = new DecodedMap(JSON.parse(decodeBase64(mapString)), mod.file), mod.map) : null;\n\t}\n\tclear() {\n\t\tthis.idToModuleMap.clear(), this.fileToModulesMap.clear(), this.urlToIdModuleMap.clear();\n\t}\n};\nconst prefixedBuiltins = new Set([\n\t\"node:sea\",\n\t\"node:sqlite\",\n\t\"node:test\",\n\t\"node:test/reporters\"\n]);\nfunction normalizeModuleId(file) {\n\treturn prefixedBuiltins.has(file) ? file : slash(file).replace(/^\\/@fs\\//, isWindows ? \"\" : \"/\").replace(/^node:/, \"\").replace(/^\\/+/, \"/\").replace(/^file:\\/+/, isWindows ? \"\" : \"/\");\n}\n//#endregion\n//#region src/shared/hmr.ts\nvar HMRContext = class {\n\thmrClient;\n\townerPath;\n\tnewListeners;\n\tconstructor(hmrClient, ownerPath) {\n\t\tthis.hmrClient = hmrClient, this.ownerPath = ownerPath, hmrClient.dataMap.has(ownerPath) || hmrClient.dataMap.set(ownerPath, {});\n\t\tlet mod = hmrClient.hotModulesMap.get(ownerPath);\n\t\tmod && (mod.callbacks = []);\n\t\tlet staleListeners = hmrClient.ctxToListenersMap.get(ownerPath);\n\t\tif (staleListeners) for (let [event, staleFns] of staleListeners) {\n\t\t\tlet listeners = hmrClient.customListenersMap.get(event);\n\t\t\tlisteners && hmrClient.customListenersMap.set(event, listeners.filter((l) => !staleFns.includes(l)));\n\t\t}\n\t\tthis.newListeners = /* @__PURE__ */ new Map(), hmrClient.ctxToListenersMap.set(ownerPath, this.newListeners);\n\t}\n\tget data() {\n\t\treturn this.hmrClient.dataMap.get(this.ownerPath);\n\t}\n\taccept(deps, callback) {\n\t\tif (typeof deps == \"function\" || !deps) this.acceptDeps([this.ownerPath], ([mod]) => deps?.(mod));\n\t\telse if (typeof deps == \"string\") this.acceptDeps([deps], ([mod]) => callback?.(mod));\n\t\telse if (Array.isArray(deps)) this.acceptDeps(deps, callback);\n\t\telse throw Error(\"invalid hot.accept() usage.\");\n\t}\n\tacceptExports(_, callback) {\n\t\tthis.acceptDeps([this.ownerPath], ([mod]) => callback?.(mod));\n\t}\n\tdispose(cb) {\n\t\tthis.hmrClient.disposeMap.set(this.ownerPath, cb);\n\t}\n\tprune(cb) {\n\t\tthis.hmrClient.pruneMap.set(this.ownerPath, cb);\n\t}\n\tdecline() {}\n\tinvalidate(message) {\n\t\tlet firstInvalidatedBy = this.hmrClient.currentFirstInvalidatedBy ?? this.ownerPath;\n\t\tthis.hmrClient.notifyListeners(\"vite:invalidate\", {\n\t\t\tpath: this.ownerPath,\n\t\t\tmessage,\n\t\t\tfirstInvalidatedBy\n\t\t}), this.send(\"vite:invalidate\", {\n\t\t\tpath: this.ownerPath,\n\t\t\tmessage,\n\t\t\tfirstInvalidatedBy\n\t\t}), this.hmrClient.logger.debug(`invalidate ${this.ownerPath}${message ? `: ${message}` : \"\"}`);\n\t}\n\ton(event, cb) {\n\t\tlet addToMap = (map) => {\n\t\t\tlet existing = map.get(event) || [];\n\t\t\texisting.push(cb), map.set(event, existing);\n\t\t};\n\t\taddToMap(this.hmrClient.customListenersMap), addToMap(this.newListeners);\n\t}\n\toff(event, cb) {\n\t\tlet removeFromMap = (map) => {\n\t\t\tlet existing = map.get(event);\n\t\t\tif (existing === void 0) return;\n\t\t\tlet pruned = existing.filter((l) => l !== cb);\n\t\t\tif (pruned.length === 0) {\n\t\t\t\tmap.delete(event);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tmap.set(event, pruned);\n\t\t};\n\t\tremoveFromMap(this.hmrClient.customListenersMap), removeFromMap(this.newListeners);\n\t}\n\tsend(event, data) {\n\t\tthis.hmrClient.send({\n\t\t\ttype: \"custom\",\n\t\t\tevent,\n\t\t\tdata\n\t\t});\n\t}\n\tacceptDeps(deps, callback = () => {}) {\n\t\tlet mod = this.hmrClient.hotModulesMap.get(this.ownerPath) || {\n\t\t\tid: this.ownerPath,\n\t\t\tcallbacks: []\n\t\t};\n\t\tmod.callbacks.push({\n\t\t\tdeps,\n\t\t\tfn: callback\n\t\t}), this.hmrClient.hotModulesMap.set(this.ownerPath, mod);\n\t}\n}, HMRClient = class {\n\tlogger;\n\ttransport;\n\timportUpdatedModule;\n\thotModulesMap = /* @__PURE__ */ new Map();\n\tdisposeMap = /* @__PURE__ */ new Map();\n\tpruneMap = /* @__PURE__ */ new Map();\n\tdataMap = /* @__PURE__ */ new Map();\n\tcustomListenersMap = /* @__PURE__ */ new Map();\n\tctxToListenersMap = /* @__PURE__ */ new Map();\n\tcurrentFirstInvalidatedBy;\n\tconstructor(logger, transport, importUpdatedModule) {\n\t\tthis.logger = logger, this.transport = transport, this.importUpdatedModule = importUpdatedModule;\n\t}\n\tasync notifyListeners(event, data) {\n\t\tlet cbs = this.customListenersMap.get(event);\n\t\tcbs && await Promise.allSettled(cbs.map((cb) => cb(data)));\n\t}\n\tsend(payload) {\n\t\tthis.transport.send(payload).catch((err) => {\n\t\t\tthis.logger.error(err);\n\t\t});\n\t}\n\tclear() {\n\t\tthis.hotModulesMap.clear(), this.disposeMap.clear(), this.pruneMap.clear(), this.dataMap.clear(), this.customListenersMap.clear(), this.ctxToListenersMap.clear();\n\t}\n\tasync prunePaths(paths) {\n\t\tawait Promise.all(paths.map((path) => {\n\t\t\tlet disposer = this.disposeMap.get(path);\n\t\t\tif (disposer) return disposer(this.dataMap.get(path));\n\t\t})), await Promise.all(paths.map((path) => {\n\t\t\tlet fn = this.pruneMap.get(path);\n\t\t\tif (fn) return fn(this.dataMap.get(path));\n\t\t}));\n\t}\n\twarnFailedUpdate(err, path) {\n\t\t(!(err instanceof Error) || !err.message.includes(\"fetch\")) && this.logger.error(err), this.logger.error(`Failed to reload ${path}. This could be due to syntax errors or importing non-existent modules. (see errors above)`);\n\t}\n\tupdateQueue = [];\n\tpendingUpdateQueue = !1;\n\t/**\n\t* buffer multiple hot updates triggered by the same src change\n\t* so that they are invoked in the same order they were sent.\n\t* (otherwise the order may be inconsistent because of the http request round trip)\n\t*/\n\tasync queueUpdate(payload) {\n\t\tif (this.updateQueue.push(this.fetchUpdate(payload)), !this.pendingUpdateQueue) {\n\t\t\tthis.pendingUpdateQueue = !0, await Promise.resolve(), this.pendingUpdateQueue = !1;\n\t\t\tlet loading = [...this.updateQueue];\n\t\t\tthis.updateQueue = [], (await Promise.all(loading)).forEach((fn) => fn && fn());\n\t\t}\n\t}\n\tasync fetchUpdate(update) {\n\t\tlet { path, acceptedPath, firstInvalidatedBy } = update, mod = this.hotModulesMap.get(path);\n\t\tif (!mod) return;\n\t\tlet fetchedModule, isSelfUpdate = path === acceptedPath, qualifiedCallbacks = mod.callbacks.filter(({ deps }) => deps.includes(acceptedPath));\n\t\tif (isSelfUpdate || qualifiedCallbacks.length > 0) {\n\t\t\tlet disposer = this.disposeMap.get(acceptedPath);\n\t\t\tdisposer && await disposer(this.dataMap.get(acceptedPath));\n\t\t\ttry {\n\t\t\t\tfetchedModule = await this.importUpdatedModule(update);\n\t\t\t} catch (e) {\n\t\t\t\tthis.warnFailedUpdate(e, acceptedPath);\n\t\t\t}\n\t\t}\n\t\treturn () => {\n\t\t\ttry {\n\t\t\t\tthis.currentFirstInvalidatedBy = firstInvalidatedBy;\n\t\t\t\tfor (let { deps, fn } of qualifiedCallbacks) fn(deps.map((dep) => dep === acceptedPath ? fetchedModule : void 0));\n\t\t\t\tlet loggedPath = isSelfUpdate ? path : `${acceptedPath} via ${path}`;\n\t\t\t\tthis.logger.debug(`hot updated: ${loggedPath}`);\n\t\t\t} finally {\n\t\t\t\tthis.currentFirstInvalidatedBy = void 0;\n\t\t\t}\n\t\t};\n\t}\n};\n//#endregion\n//#region src/shared/ssrTransform.ts\n/**\n* Vite converts `import { } from 'foo'` to `const _ = __vite_ssr_import__('foo')`.\n* Top-level imports and dynamic imports work slightly differently in Node.js.\n* This function normalizes the differences so it matches prod behaviour.\n*/\nfunction analyzeImportedModDifference(mod, rawId, moduleType, metadata) {\n\tif (!metadata?.isDynamicImport && metadata?.importedNames?.length) {\n\t\tlet missingBindings = metadata.importedNames.filter((s) => !(s in mod));\n\t\tif (missingBindings.length) {\n\t\t\tlet lastBinding = missingBindings[missingBindings.length - 1];\n\t\t\tthrow SyntaxError(moduleType === \"module\" ? `[vite] The requested module '${rawId}' does not provide an export named '${lastBinding}'` : `\\\n[vite] Named export '${lastBinding}' not found. The requested module '${rawId}' is a CommonJS module, which may not support all module.exports as named exports.\nCommonJS modules can always be imported via the default export, for example using:\n\nimport pkg from '${rawId}';\nconst {${missingBindings.join(\", \")}} = pkg;\n`);\n\t\t}\n\t}\n}\n//#endregion\n//#region ../../node_modules/.pnpm/nanoid@5.1.11/node_modules/nanoid/non-secure/index.js\nlet nanoid = (size = 21) => {\n\tlet id = \"\", i = size | 0;\n\tfor (; i--;) id += \"useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict\"[Math.random() * 64 | 0];\n\treturn id;\n};\n//#endregion\n//#region src/shared/moduleRunnerTransport.ts\nfunction reviveInvokeError(e) {\n\tlet error = Error(e.message || \"Unknown invoke error\");\n\treturn Object.assign(error, e, { runnerError: /* @__PURE__ */ Error(\"RunnerError\") }), error;\n}\nconst createInvokeableTransport = (transport) => {\n\tif (transport.invoke) return {\n\t\t...transport,\n\t\tasync invoke(name, data) {\n\t\t\tlet result = await transport.invoke({\n\t\t\t\ttype: \"custom\",\n\t\t\t\tevent: \"vite:invoke\",\n\t\t\t\tdata: {\n\t\t\t\t\tid: \"send\",\n\t\t\t\t\tname,\n\t\t\t\t\tdata\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (\"error\" in result) throw reviveInvokeError(result.error);\n\t\t\treturn result.result;\n\t\t}\n\t};\n\tif (!transport.send || !transport.connect) throw Error(\"transport must implement send and connect when invoke is not implemented\");\n\tlet rpcPromises = /* @__PURE__ */ new Map();\n\treturn {\n\t\t...transport,\n\t\tconnect({ onMessage, onDisconnection }) {\n\t\t\treturn transport.connect({\n\t\t\t\tonMessage(payload) {\n\t\t\t\t\tif (payload.type === \"custom\" && payload.event === \"vite:invoke\") {\n\t\t\t\t\t\tlet data = payload.data;\n\t\t\t\t\t\tif (data.id.startsWith(\"response:\")) {\n\t\t\t\t\t\t\tlet invokeId = data.id.slice(9), promise = rpcPromises.get(invokeId);\n\t\t\t\t\t\t\tif (!promise) return;\n\t\t\t\t\t\t\tpromise.timeoutId && clearTimeout(promise.timeoutId), rpcPromises.delete(invokeId);\n\t\t\t\t\t\t\tlet { error, result } = data.data;\n\t\t\t\t\t\t\terror ? promise.reject(error) : promise.resolve(result);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tonMessage(payload);\n\t\t\t\t},\n\t\t\t\tonDisconnection\n\t\t\t});\n\t\t},\n\t\tdisconnect() {\n\t\t\treturn rpcPromises.forEach((promise) => {\n\t\t\t\tpromise.reject(/* @__PURE__ */ Error(`transport was disconnected, cannot call ${JSON.stringify(promise.name)}`));\n\t\t\t}), rpcPromises.clear(), transport.disconnect?.();\n\t\t},\n\t\tsend(data) {\n\t\t\treturn transport.send(data);\n\t\t},\n\t\tasync invoke(name, data) {\n\t\t\tlet promiseId = nanoid(), wrappedData = {\n\t\t\t\ttype: \"custom\",\n\t\t\t\tevent: \"vite:invoke\",\n\t\t\t\tdata: {\n\t\t\t\t\tname,\n\t\t\t\t\tid: `send:${promiseId}`,\n\t\t\t\t\tdata\n\t\t\t\t}\n\t\t\t}, sendPromise = transport.send(wrappedData), { promise, resolve, reject } = promiseWithResolvers(), timeout = transport.timeout ?? 6e4, timeoutId;\n\t\t\ttimeout > 0 && (timeoutId = setTimeout(() => {\n\t\t\t\trpcPromises.delete(promiseId), reject(/* @__PURE__ */ Error(`transport invoke timed out after ${timeout}ms (data: ${JSON.stringify(wrappedData)})`));\n\t\t\t}, timeout), timeoutId?.unref?.()), rpcPromises.set(promiseId, {\n\t\t\t\tresolve,\n\t\t\t\treject,\n\t\t\t\tname,\n\t\t\t\ttimeoutId\n\t\t\t}), sendPromise && sendPromise.catch((err) => {\n\t\t\t\tclearTimeout(timeoutId), rpcPromises.delete(promiseId), reject(err);\n\t\t\t});\n\t\t\ttry {\n\t\t\t\treturn await promise;\n\t\t\t} catch (err) {\n\t\t\t\tthrow reviveInvokeError(err);\n\t\t\t}\n\t\t}\n\t};\n}, normalizeModuleRunnerTransport = (transport) => {\n\tlet invokeableTransport = createInvokeableTransport(transport), isConnected = !invokeableTransport.connect, connectingPromise;\n\treturn {\n\t\t...transport,\n\t\t...invokeableTransport.connect ? { async connect(onMessage) {\n\t\t\tif (isConnected) return;\n\t\t\tif (connectingPromise) {\n\t\t\t\tawait connectingPromise;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlet maybePromise = invokeableTransport.connect({\n\t\t\t\tonMessage: onMessage ?? (() => {}),\n\t\t\t\tonDisconnection() {\n\t\t\t\t\tisConnected = !1;\n\t\t\t\t}\n\t\t\t});\n\t\t\tmaybePromise && (connectingPromise = maybePromise, await connectingPromise, connectingPromise = void 0), isConnected = !0;\n\t\t} } : {},\n\t\t...invokeableTransport.disconnect ? { async disconnect() {\n\t\t\tisConnected && (connectingPromise && await connectingPromise, isConnected = !1, await invokeableTransport.disconnect());\n\t\t} } : {},\n\t\tasync send(data) {\n\t\t\tif (invokeableTransport.send) {\n\t\t\t\tif (!isConnected) if (connectingPromise) await connectingPromise;\n\t\t\t\telse throw new SendBeforeConnectError(\"send was called before connect\");\n\t\t\t\tawait invokeableTransport.send(data);\n\t\t\t}\n\t\t},\n\t\tasync invoke(name, data) {\n\t\t\tif (!isConnected) if (connectingPromise) await connectingPromise;\n\t\t\telse throw new SendBeforeConnectError(\"invoke was called before connect\");\n\t\t\treturn invokeableTransport.invoke(name, data);\n\t\t}\n\t};\n};\nvar SendBeforeConnectError = class extends Error {\n\tconstructor(message) {\n\t\tsuper(message), this.name = \"SendBeforeConnectError\";\n\t}\n};\nconst createWebSocketModuleRunnerTransport = (options) => {\n\tlet pingInterval = options.pingInterval ?? 3e4, ws, pingIntervalId;\n\treturn {\n\t\tasync connect({ onMessage, onDisconnection }) {\n\t\t\tlet socket = options.createConnection();\n\t\t\tsocket.addEventListener(\"message\", ({ data }) => {\n\t\t\t\tonMessage(JSON.parse(data));\n\t\t\t});\n\t\t\tlet isOpened = socket.readyState === socket.OPEN;\n\t\t\tisOpened || await new Promise((resolve, reject) => {\n\t\t\t\tsocket.addEventListener(\"open\", () => {\n\t\t\t\t\tisOpened = !0, resolve();\n\t\t\t\t}, { once: !0 }), socket.addEventListener(\"close\", () => {\n\t\t\t\t\tif (!isOpened) {\n\t\t\t\t\t\treject(/* @__PURE__ */ Error(\"WebSocket closed without opened.\"));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tonMessage({\n\t\t\t\t\t\ttype: \"custom\",\n\t\t\t\t\t\tevent: \"vite:ws:disconnect\",\n\t\t\t\t\t\tdata: { webSocket: socket }\n\t\t\t\t\t}), onDisconnection();\n\t\t\t\t});\n\t\t\t}), onMessage({\n\t\t\t\ttype: \"custom\",\n\t\t\t\tevent: \"vite:ws:connect\",\n\t\t\t\tdata: { webSocket: socket }\n\t\t\t}), ws = socket, pingIntervalId = setInterval(() => {\n\t\t\t\tsocket.readyState === socket.OPEN && socket.send(JSON.stringify({ type: \"ping\" }));\n\t\t\t}, pingInterval);\n\t\t},\n\t\tdisconnect() {\n\t\t\tclearInterval(pingIntervalId), ws?.close();\n\t\t},\n\t\tsend(data) {\n\t\t\tws.send(JSON.stringify(data));\n\t\t}\n\t};\n};\n//#endregion\n//#region src/shared/builtin.ts\nfunction createIsBuiltin(builtins) {\n\tlet plainBuiltinsSet = new Set(builtins.filter((builtin) => typeof builtin == \"string\")), regexBuiltins = builtins.filter((builtin) => typeof builtin != \"string\");\n\treturn (id) => plainBuiltinsSet.has(id) || regexBuiltins.some((regexp) => regexp.test(id));\n}\n//#endregion\n//#region src/module-runner/constants.ts\nconst ssrModuleExportsKey = \"__vite_ssr_exports__\", ssrImportKey = \"__vite_ssr_import__\", ssrDynamicImportKey = \"__vite_ssr_dynamic_import__\", ssrExportAllKey = \"__vite_ssr_exportAll__\", ssrExportNameKey = \"__vite_ssr_exportName__\", ssrImportMetaKey = \"__vite_ssr_import_meta__\", noop = () => {}, silentConsole = {\n\tdebug: noop,\n\terror: noop\n}, hmrLogger = {\n\tdebug: (...msg) => console.log(\"[vite]\", ...msg),\n\terror: (error) => console.log(\"[vite]\", error)\n};\n//#endregion\n//#region src/shared/hmrHandler.ts\nfunction createHMRHandler(handler) {\n\tlet queue = new Queue();\n\treturn (payload) => queue.enqueue(() => handler(payload));\n}\nvar Queue = class {\n\tqueue = [];\n\tpending = !1;\n\tenqueue(promise) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis.queue.push({\n\t\t\t\tpromise,\n\t\t\t\tresolve,\n\t\t\t\treject\n\t\t\t}), this.dequeue();\n\t\t});\n\t}\n\tdequeue() {\n\t\tif (this.pending) return !1;\n\t\tlet item = this.queue.shift();\n\t\treturn item ? (this.pending = !0, item.promise().then(item.resolve).catch(item.reject).finally(() => {\n\t\t\tthis.pending = !1, this.dequeue();\n\t\t}), !0) : !1;\n\t}\n};\n//#endregion\n//#region src/module-runner/hmrHandler.ts\nfunction createHMRHandlerForRunner(runner) {\n\treturn createHMRHandler(async (payload) => {\n\t\tlet hmrClient = runner.hmrClient;\n\t\tif (!(!hmrClient || runner.isClosed())) switch (payload.type) {\n\t\t\tcase \"connected\":\n\t\t\t\thmrClient.logger.debug(\"connected.\");\n\t\t\t\tbreak;\n\t\t\tcase \"update\":\n\t\t\t\tawait hmrClient.notifyListeners(\"vite:beforeUpdate\", payload), await Promise.all(payload.updates.map(async (update) => {\n\t\t\t\t\tif (update.type === \"js-update\") return update.acceptedPath = unwrapId(update.acceptedPath), update.path = unwrapId(update.path), hmrClient.queueUpdate(update);\n\t\t\t\t\thmrClient.logger.error(\"css hmr is not supported in runner mode.\");\n\t\t\t\t})), await hmrClient.notifyListeners(\"vite:afterUpdate\", payload);\n\t\t\t\tbreak;\n\t\t\tcase \"custom\":\n\t\t\t\tawait hmrClient.notifyListeners(payload.event, payload.data);\n\t\t\t\tbreak;\n\t\t\tcase \"full-reload\": {\n\t\t\t\tlet { triggeredBy } = payload, clearEntrypointUrls = triggeredBy ? getModulesEntrypoints(runner, getModulesByFile(runner, slash(triggeredBy))) : findAllEntrypoints(runner);\n\t\t\t\tif (!clearEntrypointUrls.size) break;\n\t\t\t\thmrClient.logger.debug(\"program reload\"), await hmrClient.notifyListeners(\"vite:beforeFullReload\", payload), runner.evaluatedModules.clear();\n\t\t\t\tfor (let url of clearEntrypointUrls) {\n\t\t\t\t\tif (runner.isClosed()) break;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait runner.import(url);\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\tif (runner.isClosed()) break;\n\t\t\t\t\t\terr.code !== \"ERR_OUTDATED_OPTIMIZED_DEP\" && hmrClient.logger.error(`An error happened during full reload\\n${err.message}\\n${err.stack}`);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"prune\":\n\t\t\t\tawait hmrClient.notifyListeners(\"vite:beforePrune\", payload), await hmrClient.prunePaths(payload.paths);\n\t\t\t\tbreak;\n\t\t\tcase \"error\": {\n\t\t\t\tawait hmrClient.notifyListeners(\"vite:error\", payload);\n\t\t\t\tlet err = payload.err;\n\t\t\t\thmrClient.logger.error(`Internal Server Error\\n${err.message}\\n${err.stack}`);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"ping\": break;\n\t\t\tdefault: return payload;\n\t\t}\n\t});\n}\nfunction getModulesByFile(runner, file) {\n\tlet nodes = runner.evaluatedModules.getModulesByFile(file);\n\treturn nodes ? [...nodes].map((node) => node.id) : [];\n}\nfunction getModulesEntrypoints(runner, modules, visited = /* @__PURE__ */ new Set(), entrypoints = /* @__PURE__ */ new Set()) {\n\tfor (let moduleId of modules) {\n\t\tif (visited.has(moduleId)) continue;\n\t\tvisited.add(moduleId);\n\t\tlet module = runner.evaluatedModules.getModuleById(moduleId);\n\t\tif (module) {\n\t\t\tif (!module.importers.size) {\n\t\t\t\tentrypoints.add(module.url);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (let importer of module.importers) getModulesEntrypoints(runner, [importer], visited, entrypoints);\n\t\t}\n\t}\n\treturn entrypoints;\n}\nfunction findAllEntrypoints(runner, entrypoints = /* @__PURE__ */ new Set()) {\n\tfor (let mod of runner.evaluatedModules.idToModuleMap.values()) mod.importers.size || entrypoints.add(mod.url);\n\treturn entrypoints;\n}\n//#endregion\n//#region src/module-runner/sourcemap/interceptor.ts\nconst sourceMapCache = {}, fileContentsCache = {}, evaluatedModulesCache = /* @__PURE__ */ new Set(), retrieveFileHandlers = /* @__PURE__ */ new Set(), retrieveSourceMapHandlers = /* @__PURE__ */ new Set(), createExecHandlers = (handlers) => ((...args) => {\n\tfor (let handler of handlers) {\n\t\tlet result = handler(...args);\n\t\tif (result) return result;\n\t}\n\treturn null;\n}), retrieveFileFromHandlers = createExecHandlers(retrieveFileHandlers), retrieveSourceMapFromHandlers = createExecHandlers(retrieveSourceMapHandlers);\nlet overridden = !1;\nconst originalPrepare = Error.prepareStackTrace;\nfunction resetInterceptor(runner, options) {\n\tevaluatedModulesCache.delete(runner.evaluatedModules), options.retrieveFile && retrieveFileHandlers.delete(options.retrieveFile), options.retrieveSourceMap && retrieveSourceMapHandlers.delete(options.retrieveSourceMap), evaluatedModulesCache.size === 0 && (Error.prepareStackTrace = originalPrepare, overridden = !1);\n}\nfunction interceptStackTrace(runner, options = {}) {\n\treturn overridden ||= (Error.prepareStackTrace = prepareStackTrace, !0), evaluatedModulesCache.add(runner.evaluatedModules), options.retrieveFile && retrieveFileHandlers.add(options.retrieveFile), options.retrieveSourceMap && retrieveSourceMapHandlers.add(options.retrieveSourceMap), () => resetInterceptor(runner, options);\n}\nfunction supportRelativeURL(file, url) {\n\tif (!file) return url;\n\tlet dir = posixDirname(slash(file)), match = /^\\w+:\\/\\/[^/]*/.exec(dir), protocol = match ? match[0] : \"\", startPath = dir.slice(protocol.length);\n\treturn protocol && /^\\/\\w:/.test(startPath) ? (protocol += \"/\", protocol + slash(posixResolve(startPath, url))) : protocol + posixResolve(startPath, url);\n}\nfunction getRunnerSourceMap(position) {\n\tfor (let moduleGraph of evaluatedModulesCache) {\n\t\tlet sourceMap = moduleGraph.getModuleSourceMapById(position.source);\n\t\tif (sourceMap) return {\n\t\t\turl: position.source,\n\t\t\tmap: sourceMap,\n\t\t\tvite: !0\n\t\t};\n\t}\n\treturn null;\n}\nfunction retrieveFile(path) {\n\tif (path in fileContentsCache) return fileContentsCache[path];\n\tlet content = retrieveFileFromHandlers(path);\n\treturn typeof content == \"string\" ? (fileContentsCache[path] = content, content) : null;\n}\nfunction retrieveSourceMapURL(source) {\n\tlet fileData = retrieveFile(source);\n\tif (!fileData) return null;\n\tlet re = /\\/\\/[@#]\\s*sourceMappingURL=([^\\s'\"]+)\\s*$|\\/\\*[@#]\\s*sourceMappingURL=[^\\s*'\"]+\\s*\\*\\/\\s*$/gm, lastMatch, match;\n\tfor (; match = re.exec(fileData);) lastMatch = match;\n\treturn lastMatch ? lastMatch[1] : null;\n}\nconst reSourceMap = /^data:application\\/json[^,]+base64,/;\nfunction retrieveSourceMap(source) {\n\tlet urlAndMap = retrieveSourceMapFromHandlers(source);\n\tif (urlAndMap) return urlAndMap;\n\tlet sourceMappingURL = retrieveSourceMapURL(source);\n\tif (!sourceMappingURL) return null;\n\tlet sourceMapData;\n\tif (reSourceMap.test(sourceMappingURL)) {\n\t\tlet rawData = sourceMappingURL.slice(sourceMappingURL.indexOf(\",\") + 1);\n\t\tsourceMapData = Buffer.from(rawData, \"base64\").toString(), sourceMappingURL = source;\n\t} else sourceMappingURL = supportRelativeURL(source, sourceMappingURL), sourceMapData = retrieveFile(sourceMappingURL);\n\treturn sourceMapData ? {\n\t\turl: sourceMappingURL,\n\t\tmap: sourceMapData\n\t} : null;\n}\nfunction mapSourcePosition(position) {\n\tif (!position.source) return position;\n\tlet sourceMap = getRunnerSourceMap(position);\n\tif (sourceMap ||= sourceMapCache[position.source], !sourceMap) {\n\t\tlet urlAndMap = retrieveSourceMap(position.source);\n\t\tif (urlAndMap && urlAndMap.map) {\n\t\t\tlet url = urlAndMap.url;\n\t\t\tsourceMap = sourceMapCache[position.source] = {\n\t\t\t\turl,\n\t\t\t\tmap: new DecodedMap(typeof urlAndMap.map == \"string\" ? JSON.parse(urlAndMap.map) : urlAndMap.map, url)\n\t\t\t};\n\t\t\tlet contents = sourceMap.map?.map.sourcesContent;\n\t\t\tsourceMap.map && contents && sourceMap.map.resolvedSources.forEach((source, i) => {\n\t\t\t\tlet content = contents[i];\n\t\t\t\tif (content && source && url) {\n\t\t\t\t\tlet contentUrl = supportRelativeURL(url, source);\n\t\t\t\t\tfileContentsCache[contentUrl] = content;\n\t\t\t\t}\n\t\t\t});\n\t\t} else sourceMap = sourceMapCache[position.source] = {\n\t\t\turl: null,\n\t\t\tmap: null\n\t\t};\n\t}\n\tif (sourceMap.map && sourceMap.url) {\n\t\tlet originalPosition = getOriginalPosition(sourceMap.map, position);\n\t\tif (originalPosition && originalPosition.source != null) return originalPosition.source = supportRelativeURL(sourceMap.url, originalPosition.source), sourceMap.vite && (originalPosition._vite = !0), originalPosition;\n\t}\n\treturn position;\n}\nfunction mapEvalOrigin(origin) {\n\tlet match = /^eval at ([^(]+) \\((.+):(\\d+):(\\d+)\\)$/.exec(origin);\n\tif (match) {\n\t\tlet position = mapSourcePosition({\n\t\t\tname: null,\n\t\t\tsource: match[2],\n\t\t\tline: +match[3],\n\t\t\tcolumn: match[4] - 1\n\t\t});\n\t\treturn `eval at ${match[1]} (${position.source}:${position.line}:${position.column + 1})`;\n\t}\n\treturn match = /^eval at ([^(]+) \\((.+)\\)$/.exec(origin), match ? `eval at ${match[1]} (${mapEvalOrigin(match[2])})` : origin;\n}\nfunction CallSiteToString() {\n\tlet fileName, fileLocation = \"\";\n\tif (this.isNative()) fileLocation = \"native\";\n\telse {\n\t\tfileName = this.getScriptNameOrSourceURL(), !fileName && this.isEval() && (fileLocation = this.getEvalOrigin(), fileLocation += \", \"), fileName ? fileLocation += fileName : fileLocation += \"<anonymous>\";\n\t\tlet lineNumber = this.getLineNumber();\n\t\tif (lineNumber != null) {\n\t\t\tfileLocation += `:${lineNumber}`;\n\t\t\tlet columnNumber = this.getColumnNumber();\n\t\t\tcolumnNumber && (fileLocation += `:${columnNumber}`);\n\t\t}\n\t}\n\tlet line = \"\", functionName = this.getFunctionName(), addSuffix = !0, isConstructor = this.isConstructor();\n\tif (this.isToplevel() || isConstructor) isConstructor ? line += `new ${functionName || \"<anonymous>\"}` : functionName ? line += functionName : (line += fileLocation, addSuffix = !1);\n\telse {\n\t\tlet typeName = this.getTypeName();\n\t\ttypeName === \"[object Object]\" && (typeName = \"null\");\n\t\tlet methodName = this.getMethodName();\n\t\tfunctionName ? (typeName && functionName.indexOf(typeName) !== 0 && (line += `${typeName}.`), line += functionName, methodName && functionName.indexOf(`.${methodName}`) !== functionName.length - methodName.length - 1 && (line += ` [as ${methodName}]`)) : line += `${typeName}.${methodName || \"<anonymous>\"}`;\n\t}\n\treturn addSuffix && (line += ` (${fileLocation})`), line;\n}\nfunction cloneCallSite(frame) {\n\tlet object = {};\n\treturn Object.getOwnPropertyNames(Object.getPrototypeOf(frame)).forEach((name) => {\n\t\tlet key = name;\n\t\tobject[key] = /^(?:is|get)/.test(name) ? function() {\n\t\t\treturn frame[key].call(frame);\n\t\t} : frame[key];\n\t}), object.toString = CallSiteToString, object;\n}\nfunction wrapCallSite(frame, state) {\n\tif (state === void 0 && (state = {\n\t\tnextPosition: null,\n\t\tcurPosition: null\n\t}), frame.isNative()) return state.curPosition = null, frame;\n\tlet source = frame.getFileName() || frame.getScriptNameOrSourceURL();\n\tif (source) {\n\t\tlet position = mapSourcePosition({\n\t\t\tname: null,\n\t\t\tsource,\n\t\t\tline: frame.getLineNumber() ?? 0,\n\t\t\tcolumn: (frame.getColumnNumber() ?? 1) - 1\n\t\t});\n\t\tstate.curPosition = position, frame = cloneCallSite(frame);\n\t\tlet originalFunctionName = frame.getFunctionName;\n\t\treturn frame.getFunctionName = function() {\n\t\t\tlet name = state.nextPosition == null ? originalFunctionName() : state.nextPosition.name || originalFunctionName();\n\t\t\treturn name === \"eval\" && \"_vite\" in position ? null : name;\n\t\t}, frame.getFileName = function() {\n\t\t\treturn position.source ?? null;\n\t\t}, frame.getLineNumber = function() {\n\t\t\treturn position.line;\n\t\t}, frame.getColumnNumber = function() {\n\t\t\treturn position.column + 1;\n\t\t}, frame.getScriptNameOrSourceURL = function() {\n\t\t\treturn position.source;\n\t\t}, frame;\n\t}\n\tlet origin = frame.isEval() && frame.getEvalOrigin();\n\treturn origin ? (origin = mapEvalOrigin(origin), frame = cloneCallSite(frame), frame.getEvalOrigin = function() {\n\t\treturn origin || void 0;\n\t}, frame) : frame;\n}\nfunction prepareStackTrace(error, stack) {\n\tlet errorString = `${error.name || \"Error\"}: ${error.message || \"\"}`, state = {\n\t\tnextPosition: null,\n\t\tcurPosition: null\n\t}, processedStack = [];\n\tfor (let i = stack.length - 1; i >= 0; i--) processedStack.push(`\\n at ${wrapCallSite(stack[i], state)}`), state.nextPosition = state.curPosition;\n\treturn state.curPosition = state.nextPosition = null, errorString + processedStack.reverse().join(\"\");\n}\n//#endregion\n//#region src/module-runner/sourcemap/index.ts\nfunction enableSourceMapSupport(runner) {\n\tif (runner.options.sourcemapInterceptor === \"node\") {\n\t\tif (typeof process > \"u\") throw TypeError(\"Cannot use \\\"sourcemapInterceptor: 'node'\\\" because global \\\"process\\\" variable is not available.\");\n\t\tif (typeof process.setSourceMapsEnabled != \"function\") throw TypeError(\"Cannot use \\\"sourcemapInterceptor: 'node'\\\" because \\\"process.setSourceMapsEnabled\\\" function is not available. Please use Node >= 16.6.0.\");\n\t\tlet isEnabledAlready = process.sourceMapsEnabled ?? !1;\n\t\treturn process.setSourceMapsEnabled(!0), () => !isEnabledAlready && process.setSourceMapsEnabled(!1);\n\t}\n\treturn interceptStackTrace(runner, typeof runner.options.sourcemapInterceptor == \"object\" ? runner.options.sourcemapInterceptor : void 0);\n}\n//#endregion\n//#region src/module-runner/esmEvaluator.ts\nvar ESModulesEvaluator = class {\n\tstartOffset = getAsyncFunctionDeclarationPaddingLineCount();\n\tasync runInlinedModule(context, code) {\n\t\tawait new AsyncFunction(ssrModuleExportsKey, ssrImportMetaKey, ssrImportKey, ssrDynamicImportKey, ssrExportAllKey, ssrExportNameKey, \"\\\"use strict\\\";\" + code)(context[ssrModuleExportsKey], context[ssrImportMetaKey], context[ssrImportKey], context[ssrDynamicImportKey], context[ssrExportAllKey], context[ssrExportNameKey]), Object.seal(context[ssrModuleExportsKey]);\n\t}\n\trunExternalModule(filepath) {\n\t\treturn import(filepath);\n\t}\n};\n//#endregion\n//#region src/module-runner/importMetaResolver.ts\nconst customizationHookNamespace = \"vite-module-runner:import-meta-resolve/v1/\", customizationHooksModule = `\n\nexport async function resolve(specifier, context, nextResolve) {\n if (specifier.startsWith(${JSON.stringify(customizationHookNamespace)})) {\n const data = specifier.slice(${JSON.stringify(customizationHookNamespace)}.length)\n const [parsedSpecifier, parsedImporter] = JSON.parse(data)\n specifier = parsedSpecifier\n context.parentURL = parsedImporter\n }\n return nextResolve(specifier, context)\n}\n\n`;\nfunction customizationHookResolve(specifier, context, nextResolve) {\n\tif (specifier.startsWith(customizationHookNamespace)) {\n\t\tlet data = specifier.slice(42), [parsedSpecifier, parsedImporter] = JSON.parse(data);\n\t\tspecifier = parsedSpecifier, context.parentURL = parsedImporter;\n\t}\n\treturn nextResolve(specifier, context);\n}\nlet isHookRegistered = !1;\nfunction createImportMetaResolver() {\n\tif (isHookRegistered) return importMetaResolveWithCustomHook;\n\tlet module;\n\ttry {\n\t\tmodule = typeof process < \"u\" ? process.getBuiltinModule(\"node:module\").Module : void 0;\n\t} catch {\n\t\treturn;\n\t}\n\tif (module) {\n\t\tif (module.registerHooks) return module.registerHooks({ resolve: customizationHookResolve }), isHookRegistered = !0, importMetaResolveWithCustomHook;\n\t\tif (module.register) {\n\t\t\ttry {\n\t\t\t\tlet hookModuleContent = `data:text/javascript,${encodeURI(customizationHooksModule)}`;\n\t\t\t\tmodule.register(hookModuleContent);\n\t\t\t} catch (e) {\n\t\t\t\tif (\"code\" in e && e.code === \"ERR_NETWORK_IMPORT_DISALLOWED\") return;\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t\treturn isHookRegistered = !0, importMetaResolveWithCustomHook;\n\t\t}\n\t}\n}\nfunction importMetaResolveWithCustomHook(specifier, importer) {\n\treturn import.meta.resolve(`${customizationHookNamespace}${JSON.stringify([specifier, importer])}`);\n}\n//#endregion\n//#region src/module-runner/createImportMeta.ts\nconst envProxy = new Proxy({}, { get(_, p) {\n\tthrow Error(`[module runner] Dynamic access of \"import.meta.env\" is not supported. Please, use \"import.meta.env.${String(p)}\" instead.`);\n} });\nfunction createDefaultImportMeta(modulePath) {\n\tlet href = posixPathToFileHref(modulePath), filename = modulePath, dirname = posixDirname(modulePath);\n\treturn {\n\t\tfilename: isWindows ? toWindowsPath(filename) : filename,\n\t\tdirname: isWindows ? toWindowsPath(dirname) : dirname,\n\t\turl: href,\n\t\tenv: envProxy,\n\t\tresolve(_id, _parent) {\n\t\t\tthrow Error(\"[module runner] \\\"import.meta.resolve\\\" is not supported.\");\n\t\t},\n\t\tglob() {\n\t\t\tthrow Error(\"[module runner] \\\"import.meta.glob\\\" is statically replaced during file transformation. Make sure to reference it by the full name.\");\n\t\t}\n\t};\n}\n/**\n* Create import.meta object for Node.js.\n*/\nfunction createNodeImportMeta(modulePath) {\n\tlet defaultMeta = createDefaultImportMeta(modulePath), href = defaultMeta.url, importMetaResolver = createImportMetaResolver();\n\treturn {\n\t\t...defaultMeta,\n\t\tmain: !1,\n\t\tresolve(id, parent) {\n\t\t\treturn (importMetaResolver ?? defaultMeta.resolve)(id, parent ?? href);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/module-runner/runner.ts\nvar ModuleRunner = class {\n\toptions;\n\tevaluator;\n\tdebug;\n\tevaluatedModules;\n\thmrClient;\n\ttransport;\n\tresetSourceMapSupport;\n\tconcurrentModuleNodePromises = /* @__PURE__ */ new Map();\n\tisBuiltin;\n\tbuiltinsPromise;\n\tclosed = !1;\n\tconstructor(options, evaluator = new ESModulesEvaluator(), debug) {\n\t\tif (this.options = options, this.evaluator = evaluator, this.debug = debug, this.evaluatedModules = options.evaluatedModules ?? new EvaluatedModules(), this.transport = normalizeModuleRunnerTransport(options.transport), options.hmr !== !1) {\n\t\t\tlet optionsHmr = options.hmr ?? !0, resolvedHmrLogger = optionsHmr === !0 || optionsHmr.logger === void 0 ? hmrLogger : optionsHmr.logger === !1 ? silentConsole : optionsHmr.logger;\n\t\t\tif (this.hmrClient = new HMRClient(resolvedHmrLogger, this.transport, ({ acceptedPath }) => this.import(acceptedPath)), !this.transport.connect) throw Error(\"HMR is not supported by this runner transport, but `hmr` option was set to true\");\n\t\t\tthis.transport.connect(createHMRHandlerForRunner(this));\n\t\t} else this.transport.connect?.();\n\t\toptions.sourcemapInterceptor !== !1 && (this.resetSourceMapSupport = enableSourceMapSupport(this));\n\t}\n\t/**\n\t* URL to execute. Accepts file path, server path or id relative to the root.\n\t*/\n\tasync import(url) {\n\t\tlet fetchedModule = await this.cachedModule(url);\n\t\treturn await this.cachedRequest(url, fetchedModule);\n\t}\n\t/**\n\t* Clear all caches including HMR listeners.\n\t*/\n\tclearCache() {\n\t\tthis.evaluatedModules.clear(), this.hmrClient?.clear();\n\t}\n\t/**\n\t* Clears all caches, removes all HMR listeners, and resets source map support.\n\t* This method doesn't stop the HMR connection.\n\t*/\n\tasync close() {\n\t\tthis.resetSourceMapSupport?.(), this.clearCache(), this.hmrClient = void 0, this.closed = !0, await this.transport.disconnect?.();\n\t}\n\t/**\n\t* Returns `true` if the runtime has been closed by calling `close()` method.\n\t*/\n\tisClosed() {\n\t\treturn this.closed;\n\t}\n\tprocessImport(exports, fetchResult, metadata) {\n\t\tif (!(\"externalize\" in fetchResult)) return exports;\n\t\tlet { url, type } = fetchResult;\n\t\treturn type !== \"module\" && type !== \"commonjs\" || analyzeImportedModDifference(exports, url, type, metadata), exports;\n\t}\n\tisCircularRequest(mod, callstack, visited = /* @__PURE__ */ new Set()) {\n\t\tif (visited.has(mod.id)) return !1;\n\t\tvisited.add(mod.id);\n\t\tfor (let importedModuleId of mod.imports) {\n\t\t\tif (callstack.includes(importedModuleId)) return !0;\n\t\t\tlet importedModule = this.evaluatedModules.getModuleById(importedModuleId);\n\t\t\tif (importedModule?.promise && !importedModule.evaluated && this.isCircularRequest(importedModule, callstack, visited)) return !0;\n\t\t}\n\t\treturn !1;\n\t}\n\tasync cachedRequest(url, mod, callstack = [], metadata) {\n\t\tlet meta = mod.meta, moduleId = meta.id, importee = callstack[callstack.length - 1];\n\t\tif (importee && mod.importers.add(importee), mod.evaluated && mod.promise) return this.processImport(await mod.promise, meta, metadata);\n\t\tif (mod.promise) return mod.exports && (callstack.includes(moduleId) || this.isCircularRequest(mod, callstack)) ? this.processImport(mod.exports, meta, metadata) : this.processImport(await mod.promise, meta, metadata);\n\t\tlet debugTimer;\n\t\tthis.debug && (debugTimer = setTimeout(() => {\n\t\t\tthis.debug(`[module runner] module ${moduleId} takes over 2s to load.\\n${`stack:\\n${[...callstack, moduleId].reverse().map((p) => ` - ${p}`).join(\"\\n\")}`}`);\n\t\t}, 2e3));\n\t\ttry {\n\t\t\tlet promise = this.directRequest(url, mod, callstack);\n\t\t\treturn mod.promise = promise, mod.evaluated = !1, this.processImport(await promise, meta, metadata);\n\t\t} finally {\n\t\t\tmod.evaluated = !0, debugTimer && clearTimeout(debugTimer);\n\t\t}\n\t}\n\tasync cachedModule(url, importer) {\n\t\tlet cached = this.concurrentModuleNodePromises.get(url);\n\t\tif (cached) this.debug?.(\"[module runner] using cached module info for\", url);\n\t\telse {\n\t\t\tlet cachedModule = this.evaluatedModules.getModuleByUrl(url);\n\t\t\tcached = this.getModuleInformation(url, importer, cachedModule).finally(() => {\n\t\t\t\tthis.concurrentModuleNodePromises.delete(url);\n\t\t\t}), this.concurrentModuleNodePromises.set(url, cached);\n\t\t}\n\t\treturn cached;\n\t}\n\tensureBuiltins() {\n\t\tif (!this.isBuiltin) return this.builtinsPromise ??= (async () => {\n\t\t\ttry {\n\t\t\t\tthis.debug?.(\"[module runner] fetching builtins from server\");\n\t\t\t\tlet builtins = (await this.transport.invoke(\"getBuiltins\", [])).map((builtin) => typeof builtin == \"object\" && builtin && \"type\" in builtin ? builtin.type === \"string\" ? builtin.value : new RegExp(builtin.source, builtin.flags) : builtin);\n\t\t\t\tthis.isBuiltin = createIsBuiltin(builtins), this.debug?.(\"[module runner] builtins loaded:\", builtins);\n\t\t\t} finally {\n\t\t\t\tthis.builtinsPromise = void 0;\n\t\t\t}\n\t\t})(), this.builtinsPromise;\n\t}\n\tasync getModuleInformation(url, importer, cachedModule) {\n\t\tif (this.closed) throw Error(\"Vite module runner has been closed.\");\n\t\tawait this.ensureBuiltins(), this.debug?.(\"[module runner] fetching\", url);\n\t\tlet isCached = !!(typeof cachedModule == \"object\" && cachedModule.meta), fetchedModule = url.startsWith(\"data:\") || this.isBuiltin?.(url) ? {\n\t\t\texternalize: url,\n\t\t\ttype: \"builtin\"\n\t\t} : await this.transport.invoke(\"fetchModule\", [\n\t\t\turl,\n\t\t\timporter,\n\t\t\t{\n\t\t\t\tcached: isCached,\n\t\t\t\tstartOffset: this.evaluator.startOffset\n\t\t\t}\n\t\t]);\n\t\tif (\"cache\" in fetchedModule) {\n\t\t\tif (!cachedModule || !cachedModule.meta) throw Error(`Module \"${url}\" was mistakenly invalidated during fetch phase.`);\n\t\t\treturn cachedModule;\n\t\t}\n\t\tlet moduleId = \"externalize\" in fetchedModule ? fetchedModule.externalize : fetchedModule.id, moduleUrl = \"url\" in fetchedModule ? fetchedModule.url : url, module = this.evaluatedModules.ensureModule(moduleId, moduleUrl);\n\t\treturn \"invalidate\" in fetchedModule && fetchedModule.invalidate && this.evaluatedModules.invalidateModule(module), fetchedModule.url = moduleUrl, fetchedModule.id = moduleId, module.meta = fetchedModule, module;\n\t}\n\tasync directRequest(url, mod, _callstack) {\n\t\tlet fetchResult = mod.meta, moduleId = fetchResult.id, callstack = [..._callstack, moduleId], request = async (dep, metadata) => {\n\t\t\tlet importer = \"file\" in fetchResult && fetchResult.file || moduleId, depMod = await this.cachedModule(dep, importer);\n\t\t\treturn depMod.importers.add(moduleId), mod.imports.add(depMod.id), this.cachedRequest(dep, depMod, callstack, metadata);\n\t\t}, dynamicRequest = async (dep) => (dep = String(dep), dep[0] === \".\" && (dep = posixResolve(posixDirname(url), dep)), request(dep, { isDynamicImport: !0 }));\n\t\tif (\"externalize\" in fetchResult) {\n\t\t\tlet { externalize } = fetchResult;\n\t\t\tthis.debug?.(\"[module runner] externalizing\", externalize);\n\t\t\tlet exports = await this.evaluator.runExternalModule(externalize);\n\t\t\treturn mod.exports = exports, exports;\n\t\t}\n\t\tlet { code, file } = fetchResult;\n\t\tif (code == null) {\n\t\t\tlet importer = callstack[callstack.length - 2];\n\t\t\tthrow Error(`[module runner] Failed to load \"${url}\"${importer ? ` imported from ${importer}` : \"\"}`);\n\t\t}\n\t\tlet createImportMeta = this.options.createImportMeta ?? createDefaultImportMeta, modulePath = cleanUrl(file || moduleId), href = posixPathToFileHref(modulePath), meta = await createImportMeta(modulePath), exports = Object.create(null);\n\t\tObject.defineProperty(exports, Symbol.toStringTag, {\n\t\t\tvalue: \"Module\",\n\t\t\tenumerable: !1,\n\t\t\tconfigurable: !1\n\t\t}), mod.exports = exports;\n\t\tlet hotContext;\n\t\tthis.hmrClient && Object.defineProperty(meta, \"hot\", {\n\t\t\tenumerable: !0,\n\t\t\tget: () => {\n\t\t\t\tif (!this.hmrClient) throw Error(\"[module runner] HMR client was closed.\");\n\t\t\t\treturn this.debug?.(\"[module runner] creating hmr context for\", mod.url), hotContext ||= new HMRContext(this.hmrClient, mod.url), hotContext;\n\t\t\t},\n\t\t\tset: (value) => {\n\t\t\t\thotContext = value;\n\t\t\t}\n\t\t});\n\t\tlet context = {\n\t\t\t[ssrImportKey]: request,\n\t\t\t[ssrDynamicImportKey]: dynamicRequest,\n\t\t\t[ssrModuleExportsKey]: exports,\n\t\t\t[ssrExportAllKey]: (obj) => exportAll(exports, obj),\n\t\t\t[ssrExportNameKey]: (name, getter) => Object.defineProperty(exports, name, {\n\t\t\t\tenumerable: !0,\n\t\t\t\tconfigurable: !0,\n\t\t\t\tget: getter\n\t\t\t}),\n\t\t\t[ssrImportMetaKey]: meta\n\t\t};\n\t\treturn this.debug?.(\"[module runner] executing\", href), await this.evaluator.runInlinedModule(context, code, mod), exports;\n\t}\n};\nfunction exportAll(exports, sourceModule) {\n\tif (exports !== sourceModule && !(isPrimitive(sourceModule) || Array.isArray(sourceModule) || sourceModule instanceof Promise)) {\n\t\tfor (let key in sourceModule) if (key !== \"default\" && key !== \"__esModule\" && !(key in exports)) try {\n\t\t\tObject.defineProperty(exports, key, {\n\t\t\t\tenumerable: !0,\n\t\t\t\tconfigurable: !0,\n\t\t\t\tget: () => sourceModule[key]\n\t\t\t});\n\t\t} catch {}\n\t}\n}\n//#endregion\nexport { ESModulesEvaluator, EvaluatedModules, ModuleRunner, createDefaultImportMeta, createNodeImportMeta, createWebSocketModuleRunnerTransport, normalizeModuleId, ssrDynamicImportKey, ssrExportAllKey, ssrExportNameKey, ssrImportKey, ssrImportMetaKey, ssrModuleExportsKey };\n"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAI,oBAAoB;AACxB,qBAAqB;AAGH,OAAO,UAAU,OAAO,QAAQ;CAkB5B,iBAAiB,CAAC,GAAE;AAoEzB,IAAI,YAAY;AAAkB,OAAO,UAAU,cAAqB,OAAO;AAchG,IAAgB,QAAQ,oEAAoE,YAAY,IAAI,WAAW,EAAE,GAAG,YAAY,IAAI,WAAW,GAAG;AAC1J,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;CACtC,IAAI,IAAI,MAAM,WAAW,CAAC;CAC1B,UAAU,KAAK,GAAG,UAAU,KAAK;AAClC;AAqJ2C,OAAO,OAAO,kBAAkB,mCAAmC;AAsjBtF,MAAM;AA8L9B,MAAM,6BAA6B;AAAyE,GAG/E,KAAK,UAAU,0BAA0B,EAHsC,EAIzE,KAAK,UAAU,0BAA0B,EAJgC;AAgD3F,IAAI,MAAM,CAAC,GAAG,EAAE,IAAI,GAAG,GAAG;CAC1C,MAAM,MAAM,sGAAsG,OAAO,CAAC,EAAE,WAAW;AACxI,EAAE,CAAC"}
1
+ {"version":3,"file":"module-runner.js","names":[],"sources":["../../../../../../../node_modules/vite/dist/node/module-runner.js"],"sourcesContent":["let SOURCEMAPPING_URL = \"sourceMa\";\nSOURCEMAPPING_URL += \"ppingURL\";\n//#endregion\n//#region src/shared/utils.ts\nconst isWindows = typeof process < \"u\" && process.platform === \"win32\";\n/**\n* Undo {@link wrapId}'s `/@id/` and null byte replacements.\n*/\nfunction unwrapId(id) {\n\treturn id.startsWith(\"/@id/\") ? id.slice(5).replace(\"__x00__\", \"\\0\") : id;\n}\nconst windowsSlashRE = /\\\\/g;\nfunction slash(p) {\n\treturn p.replace(windowsSlashRE, \"/\");\n}\nconst postfixRE = /[?#].*$/;\nfunction cleanUrl(url) {\n\treturn url.replace(postfixRE, \"\");\n}\nfunction isPrimitive(value) {\n\treturn !value || typeof value != \"object\" && typeof value != \"function\";\n}\nconst AsyncFunction = async function() {}.constructor;\nlet asyncFunctionDeclarationPaddingLineCount;\nfunction getAsyncFunctionDeclarationPaddingLineCount() {\n\tif (asyncFunctionDeclarationPaddingLineCount === void 0) {\n\t\tlet body = \"/*code*/\", source = new AsyncFunction(\"a\", \"b\", body).toString();\n\t\tasyncFunctionDeclarationPaddingLineCount = source.slice(0, source.indexOf(body)).split(\"\\n\").length - 1;\n\t}\n\treturn asyncFunctionDeclarationPaddingLineCount;\n}\nfunction promiseWithResolvers() {\n\tlet resolve, reject;\n\treturn {\n\t\tpromise: new Promise((_resolve, _reject) => {\n\t\t\tresolve = _resolve, reject = _reject;\n\t\t}),\n\t\tresolve,\n\t\treject\n\t};\n}\n//#endregion\n//#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs\nconst _DRIVE_LETTER_START_RE = /^[A-Za-z]:\\//;\nfunction normalizeWindowsPath(input = \"\") {\n\treturn input && input.replace(/\\\\/g, \"/\").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());\n}\nconst _IS_ABSOLUTE_RE = /^[/\\\\](?![/\\\\])|^[/\\\\]{2}(?!\\.)|^[A-Za-z]:[/\\\\]/, _DRIVE_LETTER_RE = /^[A-Za-z]:$/;\nfunction cwd() {\n\treturn typeof process < \"u\" && typeof process.cwd == \"function\" ? process.cwd().replace(/\\\\/g, \"/\") : \"/\";\n}\nconst resolve = function(...arguments_) {\n\targuments_ = arguments_.map((argument) => normalizeWindowsPath(argument));\n\tlet resolvedPath = \"\", resolvedAbsolute = !1;\n\tfor (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {\n\t\tlet path = index >= 0 ? arguments_[index] : cwd();\n\t\t!path || path.length === 0 || (resolvedPath = `${path}/${resolvedPath}`, resolvedAbsolute = isAbsolute(path));\n\t}\n\treturn resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute), resolvedAbsolute && !isAbsolute(resolvedPath) ? `/${resolvedPath}` : resolvedPath.length > 0 ? resolvedPath : \".\";\n};\nfunction normalizeString(path, allowAboveRoot) {\n\tlet res = \"\", lastSegmentLength = 0, lastSlash = -1, dots = 0, char = null;\n\tfor (let index = 0; index <= path.length; ++index) {\n\t\tif (index < path.length) char = path[index];\n\t\telse if (char === \"/\") break;\n\t\telse char = \"/\";\n\t\tif (char === \"/\") {\n\t\t\tif (!(lastSlash === index - 1 || dots === 1)) if (dots === 2) {\n\t\t\t\tif (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== \".\" || res[res.length - 2] !== \".\") {\n\t\t\t\t\tif (res.length > 2) {\n\t\t\t\t\t\tlet lastSlashIndex = res.lastIndexOf(\"/\");\n\t\t\t\t\t\tlastSlashIndex === -1 ? (res = \"\", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf(\"/\")), lastSlash = index, dots = 0;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if (res.length > 0) {\n\t\t\t\t\t\tres = \"\", lastSegmentLength = 0, lastSlash = index, dots = 0;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tallowAboveRoot && (res += res.length > 0 ? \"/..\" : \"..\", lastSegmentLength = 2);\n\t\t\t} else res.length > 0 ? res += `/${path.slice(lastSlash + 1, index)}` : res = path.slice(lastSlash + 1, index), lastSegmentLength = index - lastSlash - 1;\n\t\t\tlastSlash = index, dots = 0;\n\t\t} else char === \".\" && dots !== -1 ? ++dots : dots = -1;\n\t}\n\treturn res;\n}\nconst isAbsolute = function(p) {\n\treturn _IS_ABSOLUTE_RE.test(p);\n}, dirname = function(p) {\n\tlet segments = normalizeWindowsPath(p).replace(/\\/$/, \"\").split(\"/\").slice(0, -1);\n\treturn segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0]) && (segments[0] += \"/\"), segments.join(\"/\") || (isAbsolute(p) ? \"/\" : \".\");\n}, textDecoder = new TextDecoder(), decodeBase64 = (() => {\n\tlet capturedBuffer = typeof Buffer == \"function\" ? Buffer : void 0;\n\treturn capturedBuffer && typeof capturedBuffer.from == \"function\" ? (base64) => capturedBuffer.from(base64, \"base64\").toString(\"utf-8\") : (base64) => textDecoder.decode(Uint8Array.from(atob(base64), (c) => c.charCodeAt(0)));\n})(), percentRegEx = /%/g, backslashRegEx = /\\\\/g, newlineRegEx = /\\n/g, carriageReturnRegEx = /\\r/g, tabRegEx = /\\t/g, questionRegex = /\\?/g, hashRegex = /#/g;\nfunction encodePathChars(filepath) {\n\treturn filepath.includes(\"%\") && (filepath = filepath.replace(percentRegEx, \"%25\")), !isWindows && filepath.includes(\"\\\\\") && (filepath = filepath.replace(backslashRegEx, \"%5C\")), filepath.includes(\"\\n\") && (filepath = filepath.replace(newlineRegEx, \"%0A\")), filepath.includes(\"\\r\") && (filepath = filepath.replace(carriageReturnRegEx, \"%0D\")), filepath.includes(\"\t\") && (filepath = filepath.replace(tabRegEx, \"%09\")), filepath;\n}\nconst posixDirname = dirname, posixResolve = resolve;\nfunction posixPathToFileHref(posixPath) {\n\tlet resolved = posixResolve(posixPath), filePathLast = posixPath.charCodeAt(posixPath.length - 1);\n\treturn (filePathLast === 47 || isWindows && filePathLast === 92) && resolved[resolved.length - 1] !== \"/\" && (resolved += \"/\"), resolved = encodePathChars(resolved), resolved.includes(\"?\") && (resolved = resolved.replace(questionRegex, \"%3F\")), resolved.includes(\"#\") && (resolved = resolved.replace(hashRegex, \"%23\")), new URL(`file://${resolved}`).href;\n}\nfunction toWindowsPath(path) {\n\treturn path.replace(/\\//g, \"\\\\\");\n}\n//#endregion\n//#region ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs\nvar comma = 44, chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\", intToChar = /* @__PURE__ */ new Uint8Array(64), charToInt = /* @__PURE__ */ new Uint8Array(128);\nfor (let i = 0; i < chars.length; i++) {\n\tlet c = chars.charCodeAt(i);\n\tintToChar[i] = c, charToInt[c] = i;\n}\nfunction decodeInteger(reader, relative) {\n\tlet value = 0, shift = 0, integer = 0;\n\tdo\n\t\tinteger = charToInt[reader.next()], value |= (integer & 31) << shift, shift += 5;\n\twhile (integer & 32);\n\tlet shouldNegate = value & 1;\n\treturn value >>>= 1, shouldNegate && (value = -2147483648 | -value), relative + value;\n}\nfunction hasMoreVlq(reader, max) {\n\treturn reader.pos >= max ? !1 : reader.peek() !== comma;\n}\nvar StringReader = class {\n\tconstructor(buffer) {\n\t\tthis.pos = 0, this.buffer = buffer;\n\t}\n\tnext() {\n\t\treturn this.buffer.charCodeAt(this.pos++);\n\t}\n\tpeek() {\n\t\treturn this.buffer.charCodeAt(this.pos);\n\t}\n\tindexOf(char) {\n\t\tlet { buffer, pos } = this, idx = buffer.indexOf(char, pos);\n\t\treturn idx === -1 ? buffer.length : idx;\n\t}\n};\nfunction decode(mappings) {\n\tlet { length } = mappings, reader = new StringReader(mappings), decoded = [], genColumn = 0, sourcesIndex = 0, sourceLine = 0, sourceColumn = 0, namesIndex = 0;\n\tdo {\n\t\tlet semi = reader.indexOf(\";\"), line = [], sorted = !0, lastCol = 0;\n\t\tfor (genColumn = 0; reader.pos < semi;) {\n\t\t\tlet seg;\n\t\t\tgenColumn = decodeInteger(reader, genColumn), genColumn < lastCol && (sorted = !1), lastCol = genColumn, hasMoreVlq(reader, semi) ? (sourcesIndex = decodeInteger(reader, sourcesIndex), sourceLine = decodeInteger(reader, sourceLine), sourceColumn = decodeInteger(reader, sourceColumn), hasMoreVlq(reader, semi) ? (namesIndex = decodeInteger(reader, namesIndex), seg = [\n\t\t\t\tgenColumn,\n\t\t\t\tsourcesIndex,\n\t\t\t\tsourceLine,\n\t\t\t\tsourceColumn,\n\t\t\t\tnamesIndex\n\t\t\t]) : seg = [\n\t\t\t\tgenColumn,\n\t\t\t\tsourcesIndex,\n\t\t\t\tsourceLine,\n\t\t\t\tsourceColumn\n\t\t\t]) : seg = [genColumn], line.push(seg), reader.pos++;\n\t\t}\n\t\tsorted || sort(line), decoded.push(line), reader.pos = semi + 1;\n\t} while (reader.pos <= length);\n\treturn decoded;\n}\nfunction sort(line) {\n\tline.sort(sortComparator);\n}\nfunction sortComparator(a, b) {\n\treturn a[0] - b[0];\n}\n//#endregion\n//#region ../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs\nvar COLUMN = 0, SOURCES_INDEX = 1, SOURCE_LINE = 2, SOURCE_COLUMN = 3, NAMES_INDEX = 4, found = !1;\nfunction binarySearch(haystack, needle, low, high) {\n\tfor (; low <= high;) {\n\t\tlet mid = low + (high - low >> 1), cmp = haystack[mid][COLUMN] - needle;\n\t\tif (cmp === 0) return found = !0, mid;\n\t\tcmp < 0 ? low = mid + 1 : high = mid - 1;\n\t}\n\treturn found = !1, low - 1;\n}\nfunction upperBound(haystack, needle, index) {\n\tfor (let i = index + 1; i < haystack.length && haystack[i][COLUMN] === needle; index = i++);\n\treturn index;\n}\nfunction lowerBound(haystack, needle, index) {\n\tfor (let i = index - 1; i >= 0 && haystack[i][COLUMN] === needle; index = i--);\n\treturn index;\n}\nfunction memoizedBinarySearch(haystack, needle, state, key) {\n\tlet { lastKey, lastNeedle, lastIndex } = state, low = 0, high = haystack.length - 1;\n\tif (key === lastKey) {\n\t\tif (needle === lastNeedle) return found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle, lastIndex;\n\t\tneedle >= lastNeedle ? low = lastIndex === -1 ? 0 : lastIndex : high = lastIndex;\n\t}\n\treturn state.lastKey = key, state.lastNeedle = needle, state.lastIndex = binarySearch(haystack, needle, low, high);\n}\nvar LINE_GTR_ZERO = \"`line` must be greater than 0 (lines start at line 1)\", COL_GTR_EQ_ZERO = \"`column` must be greater than or equal to 0 (columns start at column 0)\";\nfunction cast(map) {\n\treturn map;\n}\nfunction decodedMappings(map) {\n\tvar _a;\n\treturn (_a = cast(map))._decoded || (_a._decoded = decode(cast(map)._encoded));\n}\nfunction originalPositionFor(map, needle) {\n\tlet { line, column, bias } = needle;\n\tif (line--, line < 0) throw Error(LINE_GTR_ZERO);\n\tif (column < 0) throw Error(COL_GTR_EQ_ZERO);\n\tlet decoded = decodedMappings(map);\n\tif (line >= decoded.length) return OMapping(null, null, null, null);\n\tlet segments = decoded[line], index = traceSegmentInternal(segments, cast(map)._decodedMemo, line, column, bias || 1);\n\tif (index === -1) return OMapping(null, null, null, null);\n\tlet segment = segments[index];\n\tif (segment.length === 1) return OMapping(null, null, null, null);\n\tlet { names, resolvedSources } = map;\n\treturn OMapping(resolvedSources[segment[SOURCES_INDEX]], segment[SOURCE_LINE] + 1, segment[SOURCE_COLUMN], segment.length === 5 ? names[segment[NAMES_INDEX]] : null);\n}\nfunction OMapping(source, line, column, name) {\n\treturn {\n\t\tsource,\n\t\tline,\n\t\tcolumn,\n\t\tname\n\t};\n}\nfunction traceSegmentInternal(segments, memo, line, column, bias) {\n\tlet index = memoizedBinarySearch(segments, column, memo, line);\n\treturn found ? index = (bias === -1 ? upperBound : lowerBound)(segments, column, index) : bias === -1 && index++, index === -1 || index === segments.length ? -1 : index;\n}\n//#endregion\n//#region src/module-runner/sourcemap/decoder.ts\nvar DecodedMap = class {\n\tmap;\n\t_encoded;\n\t_decoded;\n\t_decodedMemo;\n\turl;\n\tfile;\n\tversion;\n\tnames = [];\n\tresolvedSources;\n\tconstructor(map, from) {\n\t\tthis.map = map;\n\t\tlet { mappings, names, sources } = map;\n\t\tthis.version = map.version, this.names = names || [], this._encoded = mappings || \"\", this._decodedMemo = memoizedState(), this.url = from, this.file = from;\n\t\tlet originDir = posixDirname(from);\n\t\tthis.resolvedSources = (sources || []).map((s) => posixResolve(originDir, s || \"\"));\n\t}\n};\nfunction memoizedState() {\n\treturn {\n\t\tlastKey: -1,\n\t\tlastNeedle: -1,\n\t\tlastIndex: -1\n\t};\n}\nfunction getOriginalPosition(map, needle) {\n\tlet result = originalPositionFor(map, needle);\n\treturn result.column == null ? null : result;\n}\n//#endregion\n//#region src/module-runner/evaluatedModules.ts\nconst MODULE_RUNNER_SOURCEMAPPING_REGEXP = RegExp(`//# ${SOURCEMAPPING_URL}=data:application/json;base64,(.+)`);\nvar EvaluatedModuleNode = class {\n\tid;\n\turl;\n\timporters = /* @__PURE__ */ new Set();\n\timports = /* @__PURE__ */ new Set();\n\tevaluated = !1;\n\tmeta;\n\tpromise;\n\texports;\n\tfile;\n\tmap;\n\tconstructor(id, url) {\n\t\tthis.id = id, this.url = url, this.file = cleanUrl(id);\n\t}\n}, EvaluatedModules = class {\n\tidToModuleMap = /* @__PURE__ */ new Map();\n\tfileToModulesMap = /* @__PURE__ */ new Map();\n\turlToIdModuleMap = /* @__PURE__ */ new Map();\n\t/**\n\t* Returns the module node by the resolved module ID. Usually, module ID is\n\t* the file system path with query and/or hash. It can also be a virtual module.\n\t*\n\t* Module runner graph will have 1 to 1 mapping with the server module graph.\n\t* @param id Resolved module ID\n\t*/\n\tgetModuleById(id) {\n\t\treturn this.idToModuleMap.get(id);\n\t}\n\t/**\n\t* Returns all modules related to the file system path. Different modules\n\t* might have different query parameters or hash, so it's possible to have\n\t* multiple modules for the same file.\n\t* @param file The file system path of the module\n\t*/\n\tgetModulesByFile(file) {\n\t\treturn this.fileToModulesMap.get(file);\n\t}\n\t/**\n\t* Returns the module node by the URL that was used in the import statement.\n\t* Unlike module graph on the server, the URL is not resolved and is used as is.\n\t* @param url Server URL that was used in the import statement\n\t*/\n\tgetModuleByUrl(url) {\n\t\treturn this.urlToIdModuleMap.get(unwrapId(url));\n\t}\n\t/**\n\t* Ensure that module is in the graph. If the module is already in the graph,\n\t* it will return the existing module node. Otherwise, it will create a new\n\t* module node and add it to the graph.\n\t* @param id Resolved module ID\n\t* @param url URL that was used in the import statement\n\t*/\n\tensureModule(id, url) {\n\t\tif (id = normalizeModuleId(id), this.idToModuleMap.has(id)) {\n\t\t\tlet moduleNode = this.idToModuleMap.get(id);\n\t\t\treturn this.urlToIdModuleMap.set(url, moduleNode), moduleNode;\n\t\t}\n\t\tlet moduleNode = new EvaluatedModuleNode(id, url);\n\t\tthis.idToModuleMap.set(id, moduleNode), this.urlToIdModuleMap.set(url, moduleNode);\n\t\tlet fileModules = this.fileToModulesMap.get(moduleNode.file) || /* @__PURE__ */ new Set();\n\t\treturn fileModules.add(moduleNode), this.fileToModulesMap.set(moduleNode.file, fileModules), moduleNode;\n\t}\n\tinvalidateModule(node) {\n\t\tnode.evaluated = !1, node.meta = void 0, node.map = void 0, node.promise = void 0, node.exports = void 0, node.imports.clear();\n\t}\n\t/**\n\t* Extracts the inlined source map from the module code and returns the decoded\n\t* source map. If the source map is not inlined, it will return null.\n\t* @param id Resolved module ID\n\t*/\n\tgetModuleSourceMapById(id) {\n\t\tlet mod = this.getModuleById(id);\n\t\tif (!mod) return null;\n\t\tif (mod.map) return mod.map;\n\t\tif (!mod.meta || !(\"code\" in mod.meta)) return null;\n\t\tlet pattern = `//# ${SOURCEMAPPING_URL}=data:application/json;base64,`, lastIndex = mod.meta.code.lastIndexOf(pattern);\n\t\tif (lastIndex === -1) return null;\n\t\tlet mapString = MODULE_RUNNER_SOURCEMAPPING_REGEXP.exec(mod.meta.code.slice(lastIndex))?.[1];\n\t\treturn mapString ? (mod.map = new DecodedMap(JSON.parse(decodeBase64(mapString)), mod.file), mod.map) : null;\n\t}\n\tclear() {\n\t\tthis.idToModuleMap.clear(), this.fileToModulesMap.clear(), this.urlToIdModuleMap.clear();\n\t}\n};\nconst prefixedBuiltins = /* @__PURE__ */ new Set([\n\t\"node:sea\",\n\t\"node:sqlite\",\n\t\"node:test\",\n\t\"node:test/reporters\"\n]);\nfunction normalizeModuleId(file) {\n\treturn prefixedBuiltins.has(file) ? file : slash(file).replace(/^\\/@fs\\//, isWindows ? \"\" : \"/\").replace(/^node:/, \"\").replace(/^\\/+/, \"/\").replace(/^file:\\/+/, isWindows ? \"\" : \"/\");\n}\n//#endregion\n//#region src/shared/hmr.ts\nvar HMRContext = class {\n\thmrClient;\n\townerPath;\n\tnewListeners;\n\tconstructor(hmrClient, ownerPath) {\n\t\tthis.hmrClient = hmrClient, this.ownerPath = ownerPath, hmrClient.dataMap.has(ownerPath) || hmrClient.dataMap.set(ownerPath, {});\n\t\tlet mod = hmrClient.hotModulesMap.get(ownerPath);\n\t\tmod && (mod.callbacks = []);\n\t\tlet staleListeners = hmrClient.ctxToListenersMap.get(ownerPath);\n\t\tif (staleListeners) for (let [event, staleFns] of staleListeners) {\n\t\t\tlet listeners = hmrClient.customListenersMap.get(event);\n\t\t\tlisteners && hmrClient.customListenersMap.set(event, listeners.filter((l) => !staleFns.includes(l)));\n\t\t}\n\t\tthis.newListeners = /* @__PURE__ */ new Map(), hmrClient.ctxToListenersMap.set(ownerPath, this.newListeners);\n\t}\n\tget data() {\n\t\treturn this.hmrClient.dataMap.get(this.ownerPath);\n\t}\n\taccept(deps, callback) {\n\t\tif (typeof deps == \"function\" || !deps) this.acceptDeps([this.ownerPath], ([mod]) => deps?.(mod));\n\t\telse if (typeof deps == \"string\") this.acceptDeps([deps], ([mod]) => callback?.(mod));\n\t\telse if (Array.isArray(deps)) this.acceptDeps(deps, callback);\n\t\telse throw Error(\"invalid hot.accept() usage.\");\n\t}\n\tacceptExports(_, callback) {\n\t\tthis.acceptDeps([this.ownerPath], ([mod]) => callback?.(mod));\n\t}\n\tdispose(cb) {\n\t\tthis.hmrClient.disposeMap.set(this.ownerPath, cb);\n\t}\n\tprune(cb) {\n\t\tthis.hmrClient.pruneMap.set(this.ownerPath, cb);\n\t}\n\tdecline() {}\n\tinvalidate(message) {\n\t\tlet firstInvalidatedBy = this.hmrClient.currentFirstInvalidatedBy ?? this.ownerPath;\n\t\tthis.hmrClient.notifyListeners(\"vite:invalidate\", {\n\t\t\tpath: this.ownerPath,\n\t\t\tmessage,\n\t\t\tfirstInvalidatedBy\n\t\t}), this.send(\"vite:invalidate\", {\n\t\t\tpath: this.ownerPath,\n\t\t\tmessage,\n\t\t\tfirstInvalidatedBy\n\t\t}), this.hmrClient.logger.debug(`invalidate ${this.ownerPath}${message ? `: ${message}` : \"\"}`);\n\t}\n\ton(event, cb) {\n\t\tlet addToMap = (map) => {\n\t\t\tlet existing = map.get(event) || [];\n\t\t\texisting.push(cb), map.set(event, existing);\n\t\t};\n\t\taddToMap(this.hmrClient.customListenersMap), addToMap(this.newListeners);\n\t}\n\toff(event, cb) {\n\t\tlet removeFromMap = (map) => {\n\t\t\tlet existing = map.get(event);\n\t\t\tif (existing === void 0) return;\n\t\t\tlet pruned = existing.filter((l) => l !== cb);\n\t\t\tif (pruned.length === 0) {\n\t\t\t\tmap.delete(event);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tmap.set(event, pruned);\n\t\t};\n\t\tremoveFromMap(this.hmrClient.customListenersMap), removeFromMap(this.newListeners);\n\t}\n\tsend(event, data) {\n\t\tthis.hmrClient.send({\n\t\t\ttype: \"custom\",\n\t\t\tevent,\n\t\t\tdata\n\t\t});\n\t}\n\tacceptDeps(deps, callback = () => {}) {\n\t\tlet mod = this.hmrClient.hotModulesMap.get(this.ownerPath) || {\n\t\t\tid: this.ownerPath,\n\t\t\tcallbacks: []\n\t\t};\n\t\tmod.callbacks.push({\n\t\t\tdeps,\n\t\t\tfn: callback\n\t\t}), this.hmrClient.hotModulesMap.set(this.ownerPath, mod);\n\t}\n}, HMRClient = class {\n\tlogger;\n\ttransport;\n\timportUpdatedModule;\n\thotModulesMap = /* @__PURE__ */ new Map();\n\tdisposeMap = /* @__PURE__ */ new Map();\n\tpruneMap = /* @__PURE__ */ new Map();\n\tdataMap = /* @__PURE__ */ new Map();\n\tcustomListenersMap = /* @__PURE__ */ new Map();\n\tctxToListenersMap = /* @__PURE__ */ new Map();\n\tcurrentFirstInvalidatedBy;\n\tconstructor(logger, transport, importUpdatedModule) {\n\t\tthis.logger = logger, this.transport = transport, this.importUpdatedModule = importUpdatedModule;\n\t}\n\tasync notifyListeners(event, data) {\n\t\tlet cbs = this.customListenersMap.get(event);\n\t\tcbs && await Promise.allSettled(cbs.map((cb) => cb(data)));\n\t}\n\tsend(payload) {\n\t\tthis.transport.send(payload).catch((err) => {\n\t\t\tthis.logger.error(err);\n\t\t});\n\t}\n\tclear() {\n\t\tthis.hotModulesMap.clear(), this.disposeMap.clear(), this.pruneMap.clear(), this.dataMap.clear(), this.customListenersMap.clear(), this.ctxToListenersMap.clear();\n\t}\n\tasync prunePaths(paths) {\n\t\tawait Promise.all(paths.map((path) => {\n\t\t\tlet disposer = this.disposeMap.get(path);\n\t\t\tif (disposer) return disposer(this.dataMap.get(path));\n\t\t})), await Promise.all(paths.map((path) => {\n\t\t\tlet fn = this.pruneMap.get(path);\n\t\t\tif (fn) return fn(this.dataMap.get(path));\n\t\t}));\n\t}\n\twarnFailedUpdate(err, path) {\n\t\t(!(err instanceof Error) || !err.message.includes(\"fetch\")) && this.logger.error(err), this.logger.error(`Failed to reload ${path}. This could be due to syntax errors or importing non-existent modules. (see errors above)`);\n\t}\n\tupdateQueue = [];\n\tpendingUpdateQueue = !1;\n\t/**\n\t* buffer multiple hot updates triggered by the same src change\n\t* so that they are invoked in the same order they were sent.\n\t* (otherwise the order may be inconsistent because of the http request round trip)\n\t*/\n\tasync queueUpdate(payload) {\n\t\tif (this.updateQueue.push(this.fetchUpdate(payload)), !this.pendingUpdateQueue) {\n\t\t\tthis.pendingUpdateQueue = !0, await Promise.resolve(), this.pendingUpdateQueue = !1;\n\t\t\tlet loading = [...this.updateQueue];\n\t\t\tthis.updateQueue = [], (await Promise.all(loading)).forEach((fn) => fn && fn());\n\t\t}\n\t}\n\tasync fetchUpdate(update) {\n\t\tlet { path, acceptedPath, firstInvalidatedBy } = update, mod = this.hotModulesMap.get(path);\n\t\tif (!mod) return;\n\t\tlet fetchedModule, isSelfUpdate = path === acceptedPath, qualifiedCallbacks = mod.callbacks.filter(({ deps }) => deps.includes(acceptedPath));\n\t\tif (isSelfUpdate || qualifiedCallbacks.length > 0) {\n\t\t\tlet disposer = this.disposeMap.get(acceptedPath);\n\t\t\tdisposer && await disposer(this.dataMap.get(acceptedPath));\n\t\t\ttry {\n\t\t\t\tfetchedModule = await this.importUpdatedModule(update);\n\t\t\t} catch (e) {\n\t\t\t\tthis.warnFailedUpdate(e, acceptedPath);\n\t\t\t}\n\t\t}\n\t\treturn () => {\n\t\t\ttry {\n\t\t\t\tthis.currentFirstInvalidatedBy = firstInvalidatedBy;\n\t\t\t\tfor (let { deps, fn } of qualifiedCallbacks) fn(deps.map((dep) => dep === acceptedPath ? fetchedModule : void 0));\n\t\t\t\tlet loggedPath = isSelfUpdate ? path : `${acceptedPath} via ${path}`;\n\t\t\t\tthis.logger.debug(`hot updated: ${loggedPath}`);\n\t\t\t} finally {\n\t\t\t\tthis.currentFirstInvalidatedBy = void 0;\n\t\t\t}\n\t\t};\n\t}\n};\n//#endregion\n//#region src/shared/ssrTransform.ts\n/**\n* Vite converts `import { } from 'foo'` to `const _ = __vite_ssr_import__('foo')`.\n* Top-level imports and dynamic imports work slightly differently in Node.js.\n* This function normalizes the differences so it matches prod behaviour.\n*/\nfunction analyzeImportedModDifference(mod, rawId, moduleType, metadata) {\n\tif (!metadata?.isDynamicImport && metadata?.importedNames?.length) {\n\t\tlet missingBindings = metadata.importedNames.filter((s) => !(s in mod));\n\t\tif (missingBindings.length) {\n\t\t\tlet lastBinding = missingBindings[missingBindings.length - 1];\n\t\t\tthrow SyntaxError(moduleType === \"module\" ? `[vite] The requested module '${rawId}' does not provide an export named '${lastBinding}'` : `\\\n[vite] Named export '${lastBinding}' not found. The requested module '${rawId}' is a CommonJS module, which may not support all module.exports as named exports.\nCommonJS modules can always be imported via the default export, for example using:\n\nimport pkg from '${rawId}';\nconst {${missingBindings.join(\", \")}} = pkg;\n`);\n\t\t}\n\t}\n}\n//#endregion\n//#region ../../node_modules/.pnpm/nanoid@5.1.16/node_modules/nanoid/non-secure/index.js\nlet nanoid = (size = 21) => {\n\tlet id = \"\", i = size | 0;\n\tfor (; i-- > 0;) id += \"useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict\"[Math.random() * 64 | 0];\n\treturn id;\n};\n//#endregion\n//#region src/shared/moduleRunnerTransport.ts\nfunction reviveInvokeError(e) {\n\tlet error = Error(e.message || \"Unknown invoke error\");\n\treturn Object.assign(error, e, { runnerError: /* @__PURE__ */ Error(\"RunnerError\") }), error;\n}\nconst createInvokeableTransport = (transport) => {\n\tif (transport.invoke) return {\n\t\t...transport,\n\t\tasync invoke(name, data) {\n\t\t\tlet result = await transport.invoke({\n\t\t\t\ttype: \"custom\",\n\t\t\t\tevent: \"vite:invoke\",\n\t\t\t\tdata: {\n\t\t\t\t\tid: \"send\",\n\t\t\t\t\tname,\n\t\t\t\t\tdata\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (\"error\" in result) throw reviveInvokeError(result.error);\n\t\t\treturn result.result;\n\t\t}\n\t};\n\tif (!transport.send || !transport.connect) throw Error(\"transport must implement send and connect when invoke is not implemented\");\n\tlet rpcPromises = /* @__PURE__ */ new Map();\n\treturn {\n\t\t...transport,\n\t\tconnect({ onMessage, onDisconnection }) {\n\t\t\treturn transport.connect({\n\t\t\t\tonMessage(payload) {\n\t\t\t\t\tif (payload.type === \"custom\" && payload.event === \"vite:invoke\") {\n\t\t\t\t\t\tlet data = payload.data;\n\t\t\t\t\t\tif (data.id.startsWith(\"response:\")) {\n\t\t\t\t\t\t\tlet invokeId = data.id.slice(9), promise = rpcPromises.get(invokeId);\n\t\t\t\t\t\t\tif (!promise) return;\n\t\t\t\t\t\t\tpromise.timeoutId && clearTimeout(promise.timeoutId), rpcPromises.delete(invokeId);\n\t\t\t\t\t\t\tlet { error, result } = data.data;\n\t\t\t\t\t\t\terror ? promise.reject(error) : promise.resolve(result);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tonMessage(payload);\n\t\t\t\t},\n\t\t\t\tonDisconnection\n\t\t\t});\n\t\t},\n\t\tdisconnect() {\n\t\t\treturn rpcPromises.forEach((promise) => {\n\t\t\t\tpromise.reject(/* @__PURE__ */ Error(`transport was disconnected, cannot call ${JSON.stringify(promise.name)}`));\n\t\t\t}), rpcPromises.clear(), transport.disconnect?.();\n\t\t},\n\t\tsend(data) {\n\t\t\treturn transport.send(data);\n\t\t},\n\t\tasync invoke(name, data) {\n\t\t\tlet promiseId = nanoid(), wrappedData = {\n\t\t\t\ttype: \"custom\",\n\t\t\t\tevent: \"vite:invoke\",\n\t\t\t\tdata: {\n\t\t\t\t\tname,\n\t\t\t\t\tid: `send:${promiseId}`,\n\t\t\t\t\tdata\n\t\t\t\t}\n\t\t\t}, sendPromise = transport.send(wrappedData), { promise, resolve, reject } = promiseWithResolvers(), timeout = transport.timeout ?? 6e4, timeoutId;\n\t\t\ttimeout > 0 && (timeoutId = setTimeout(() => {\n\t\t\t\trpcPromises.delete(promiseId), reject(/* @__PURE__ */ Error(`transport invoke timed out after ${timeout}ms (data: ${JSON.stringify(wrappedData)})`));\n\t\t\t}, timeout), timeoutId?.unref?.()), rpcPromises.set(promiseId, {\n\t\t\t\tresolve,\n\t\t\t\treject,\n\t\t\t\tname,\n\t\t\t\ttimeoutId\n\t\t\t}), sendPromise && sendPromise.catch((err) => {\n\t\t\t\tclearTimeout(timeoutId), rpcPromises.delete(promiseId), reject(err);\n\t\t\t});\n\t\t\ttry {\n\t\t\t\treturn await promise;\n\t\t\t} catch (err) {\n\t\t\t\tthrow reviveInvokeError(err);\n\t\t\t}\n\t\t}\n\t};\n}, normalizeModuleRunnerTransport = (transport) => {\n\tlet invokeableTransport = createInvokeableTransport(transport), isConnected = !invokeableTransport.connect, connectingPromise;\n\treturn {\n\t\t...transport,\n\t\t...invokeableTransport.connect ? { async connect(onMessage) {\n\t\t\tif (isConnected) return;\n\t\t\tif (connectingPromise) {\n\t\t\t\tawait connectingPromise;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlet maybePromise = invokeableTransport.connect({\n\t\t\t\tonMessage: onMessage ?? (() => {}),\n\t\t\t\tonDisconnection() {\n\t\t\t\t\tisConnected = !1;\n\t\t\t\t}\n\t\t\t});\n\t\t\tmaybePromise && (connectingPromise = maybePromise, await connectingPromise, connectingPromise = void 0), isConnected = !0;\n\t\t} } : {},\n\t\t...invokeableTransport.disconnect ? { async disconnect() {\n\t\t\tisConnected && (connectingPromise && await connectingPromise, isConnected = !1, await invokeableTransport.disconnect());\n\t\t} } : {},\n\t\tasync send(data) {\n\t\t\tif (invokeableTransport.send) {\n\t\t\t\tif (!isConnected) if (connectingPromise) await connectingPromise;\n\t\t\t\telse throw new SendBeforeConnectError(\"send was called before connect\");\n\t\t\t\tawait invokeableTransport.send(data);\n\t\t\t}\n\t\t},\n\t\tasync invoke(name, data) {\n\t\t\tif (!isConnected) if (connectingPromise) await connectingPromise;\n\t\t\telse throw new SendBeforeConnectError(\"invoke was called before connect\");\n\t\t\treturn invokeableTransport.invoke(name, data);\n\t\t}\n\t};\n};\nvar SendBeforeConnectError = class extends Error {\n\tconstructor(message) {\n\t\tsuper(message), this.name = \"SendBeforeConnectError\";\n\t}\n};\nconst createWebSocketModuleRunnerTransport = (options) => {\n\tlet pingInterval = options.pingInterval ?? 3e4, ws, pingIntervalId;\n\treturn {\n\t\tasync connect({ onMessage, onDisconnection }) {\n\t\t\tlet socket = options.createConnection();\n\t\t\tsocket.addEventListener(\"message\", ({ data }) => {\n\t\t\t\tonMessage(JSON.parse(data));\n\t\t\t});\n\t\t\tlet isOpened = socket.readyState === socket.OPEN;\n\t\t\tisOpened || await new Promise((resolve, reject) => {\n\t\t\t\tsocket.addEventListener(\"open\", () => {\n\t\t\t\t\tisOpened = !0, resolve();\n\t\t\t\t}, { once: !0 }), socket.addEventListener(\"close\", () => {\n\t\t\t\t\tif (!isOpened) {\n\t\t\t\t\t\treject(/* @__PURE__ */ Error(\"WebSocket closed without opened.\"));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tonMessage({\n\t\t\t\t\t\ttype: \"custom\",\n\t\t\t\t\t\tevent: \"vite:ws:disconnect\",\n\t\t\t\t\t\tdata: { webSocket: socket }\n\t\t\t\t\t}), onDisconnection();\n\t\t\t\t});\n\t\t\t}), onMessage({\n\t\t\t\ttype: \"custom\",\n\t\t\t\tevent: \"vite:ws:connect\",\n\t\t\t\tdata: { webSocket: socket }\n\t\t\t}), ws = socket, pingIntervalId = setInterval(() => {\n\t\t\t\tsocket.readyState === socket.OPEN && socket.send(JSON.stringify({ type: \"ping\" }));\n\t\t\t}, pingInterval);\n\t\t},\n\t\tdisconnect() {\n\t\t\tclearInterval(pingIntervalId), ws?.close();\n\t\t},\n\t\tsend(data) {\n\t\t\tws.send(JSON.stringify(data));\n\t\t}\n\t};\n};\n//#endregion\n//#region src/shared/builtin.ts\nfunction createIsBuiltin(builtins) {\n\tlet plainBuiltinsSet = new Set(builtins.filter((builtin) => typeof builtin == \"string\")), regexBuiltins = builtins.filter((builtin) => typeof builtin != \"string\");\n\treturn (id) => plainBuiltinsSet.has(id) || regexBuiltins.some((regexp) => regexp.test(id));\n}\n//#endregion\n//#region src/module-runner/constants.ts\nconst ssrModuleExportsKey = \"__vite_ssr_exports__\", ssrImportKey = \"__vite_ssr_import__\", ssrDynamicImportKey = \"__vite_ssr_dynamic_import__\", ssrExportAllKey = \"__vite_ssr_exportAll__\", ssrExportNameKey = \"__vite_ssr_exportName__\", ssrImportMetaKey = \"__vite_ssr_import_meta__\", noop = () => {}, silentConsole = {\n\tdebug: noop,\n\terror: noop\n}, hmrLogger = {\n\tdebug: (...msg) => console.log(\"[vite]\", ...msg),\n\terror: (error) => console.log(\"[vite]\", error)\n};\n//#endregion\n//#region src/shared/hmrHandler.ts\nfunction createHMRHandler(handler) {\n\tlet queue = new Queue();\n\treturn (payload) => queue.enqueue(() => handler(payload));\n}\nvar Queue = class {\n\tqueue = [];\n\tpending = !1;\n\tenqueue(promise) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis.queue.push({\n\t\t\t\tpromise,\n\t\t\t\tresolve,\n\t\t\t\treject\n\t\t\t}), this.dequeue();\n\t\t});\n\t}\n\tdequeue() {\n\t\tif (this.pending) return !1;\n\t\tlet item = this.queue.shift();\n\t\treturn item ? (this.pending = !0, item.promise().then(item.resolve).catch(item.reject).finally(() => {\n\t\t\tthis.pending = !1, this.dequeue();\n\t\t}), !0) : !1;\n\t}\n};\n//#endregion\n//#region src/module-runner/hmrHandler.ts\nfunction createHMRHandlerForRunner(runner) {\n\treturn createHMRHandler(async (payload) => {\n\t\tlet hmrClient = runner.hmrClient;\n\t\tif (!(!hmrClient || runner.isClosed())) switch (payload.type) {\n\t\t\tcase \"connected\":\n\t\t\t\thmrClient.logger.debug(\"connected.\");\n\t\t\t\tbreak;\n\t\t\tcase \"update\":\n\t\t\t\tawait hmrClient.notifyListeners(\"vite:beforeUpdate\", payload), await Promise.all(payload.updates.map(async (update) => {\n\t\t\t\t\tif (update.type === \"js-update\") return update.acceptedPath = unwrapId(update.acceptedPath), update.path = unwrapId(update.path), hmrClient.queueUpdate(update);\n\t\t\t\t\thmrClient.logger.error(\"css hmr is not supported in runner mode.\");\n\t\t\t\t})), await hmrClient.notifyListeners(\"vite:afterUpdate\", payload);\n\t\t\t\tbreak;\n\t\t\tcase \"custom\":\n\t\t\t\tawait hmrClient.notifyListeners(payload.event, payload.data);\n\t\t\t\tbreak;\n\t\t\tcase \"full-reload\": {\n\t\t\t\tlet { triggeredBy } = payload, clearEntrypointUrls = triggeredBy ? getModulesEntrypoints(runner, getModulesByFile(runner, slash(triggeredBy))) : findAllEntrypoints(runner);\n\t\t\t\tif (!clearEntrypointUrls.size) break;\n\t\t\t\thmrClient.logger.debug(\"program reload\"), await hmrClient.notifyListeners(\"vite:beforeFullReload\", payload), runner.evaluatedModules.clear();\n\t\t\t\tfor (let url of clearEntrypointUrls) {\n\t\t\t\t\tif (runner.isClosed()) break;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait runner.import(url);\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\tif (runner.isClosed()) break;\n\t\t\t\t\t\terr.code !== \"ERR_OUTDATED_OPTIMIZED_DEP\" && hmrClient.logger.error(`An error happened during full reload\\n${err.message}\\n${err.stack}`);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"prune\":\n\t\t\t\tawait hmrClient.notifyListeners(\"vite:beforePrune\", payload), await hmrClient.prunePaths(payload.paths);\n\t\t\t\tbreak;\n\t\t\tcase \"error\": {\n\t\t\t\tawait hmrClient.notifyListeners(\"vite:error\", payload);\n\t\t\t\tlet err = payload.err;\n\t\t\t\thmrClient.logger.error(`Internal Server Error\\n${err.message}\\n${err.stack}`);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"ping\": break;\n\t\t\tdefault: return payload;\n\t\t}\n\t});\n}\nfunction getModulesByFile(runner, file) {\n\tlet nodes = runner.evaluatedModules.getModulesByFile(file);\n\treturn nodes ? [...nodes].map((node) => node.id) : [];\n}\nfunction getModulesEntrypoints(runner, modules, visited = /* @__PURE__ */ new Set(), entrypoints = /* @__PURE__ */ new Set()) {\n\tfor (let moduleId of modules) {\n\t\tif (visited.has(moduleId)) continue;\n\t\tvisited.add(moduleId);\n\t\tlet module = runner.evaluatedModules.getModuleById(moduleId);\n\t\tif (module) {\n\t\t\tif (!module.importers.size) {\n\t\t\t\tentrypoints.add(module.url);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (let importer of module.importers) getModulesEntrypoints(runner, [importer], visited, entrypoints);\n\t\t}\n\t}\n\treturn entrypoints;\n}\nfunction findAllEntrypoints(runner, entrypoints = /* @__PURE__ */ new Set()) {\n\tfor (let mod of runner.evaluatedModules.idToModuleMap.values()) mod.importers.size || entrypoints.add(mod.url);\n\treturn entrypoints;\n}\n//#endregion\n//#region src/module-runner/sourcemap/interceptor.ts\nconst sourceMapCache = {}, fileContentsCache = {}, evaluatedModulesCache = /* @__PURE__ */ new Set(), retrieveFileHandlers = /* @__PURE__ */ new Set(), retrieveSourceMapHandlers = /* @__PURE__ */ new Set(), createExecHandlers = (handlers) => ((...args) => {\n\tfor (let handler of handlers) {\n\t\tlet result = handler(...args);\n\t\tif (result) return result;\n\t}\n\treturn null;\n}), retrieveFileFromHandlers = createExecHandlers(retrieveFileHandlers), retrieveSourceMapFromHandlers = createExecHandlers(retrieveSourceMapHandlers);\nlet overridden = !1;\nconst originalPrepare = Error.prepareStackTrace;\nfunction resetInterceptor(runner, options) {\n\tevaluatedModulesCache.delete(runner.evaluatedModules), options.retrieveFile && retrieveFileHandlers.delete(options.retrieveFile), options.retrieveSourceMap && retrieveSourceMapHandlers.delete(options.retrieveSourceMap), evaluatedModulesCache.size === 0 && (Error.prepareStackTrace = originalPrepare, overridden = !1);\n}\nfunction interceptStackTrace(runner, options = {}) {\n\treturn overridden ||= (Error.prepareStackTrace = prepareStackTrace, !0), evaluatedModulesCache.add(runner.evaluatedModules), options.retrieveFile && retrieveFileHandlers.add(options.retrieveFile), options.retrieveSourceMap && retrieveSourceMapHandlers.add(options.retrieveSourceMap), () => resetInterceptor(runner, options);\n}\nfunction supportRelativeURL(file, url) {\n\tif (!file) return url;\n\tlet dir = posixDirname(slash(file)), match = /^\\w+:\\/\\/[^/]*/.exec(dir), protocol = match ? match[0] : \"\", startPath = dir.slice(protocol.length);\n\treturn protocol && /^\\/\\w:/.test(startPath) ? (protocol += \"/\", protocol + slash(posixResolve(startPath, url))) : protocol + posixResolve(startPath, url);\n}\nfunction getRunnerSourceMap(position) {\n\tfor (let moduleGraph of evaluatedModulesCache) {\n\t\tlet sourceMap = moduleGraph.getModuleSourceMapById(position.source);\n\t\tif (sourceMap) return {\n\t\t\turl: position.source,\n\t\t\tmap: sourceMap,\n\t\t\tvite: !0\n\t\t};\n\t}\n\treturn null;\n}\nfunction retrieveFile(path) {\n\tif (path in fileContentsCache) return fileContentsCache[path];\n\tlet content = retrieveFileFromHandlers(path);\n\treturn typeof content == \"string\" ? (fileContentsCache[path] = content, content) : null;\n}\nfunction retrieveSourceMapURL(source) {\n\tlet fileData = retrieveFile(source);\n\tif (!fileData) return null;\n\tlet re = /\\/\\/[@#]\\s*sourceMappingURL=([^\\s'\"]+)\\s*$|\\/\\*[@#]\\s*sourceMappingURL=[^\\s*'\"]+\\s*\\*\\/\\s*$/gm, lastMatch, match;\n\tfor (; match = re.exec(fileData);) lastMatch = match;\n\treturn lastMatch ? lastMatch[1] : null;\n}\nconst reSourceMap = /^data:application\\/json[^,]+base64,/;\nfunction retrieveSourceMap(source) {\n\tlet urlAndMap = retrieveSourceMapFromHandlers(source);\n\tif (urlAndMap) return urlAndMap;\n\tlet sourceMappingURL = retrieveSourceMapURL(source);\n\tif (!sourceMappingURL) return null;\n\tlet sourceMapData;\n\treturn reSourceMap.test(sourceMappingURL) ? (sourceMapData = decodeBase64(sourceMappingURL.slice(sourceMappingURL.indexOf(\",\") + 1)), sourceMappingURL = source) : (sourceMappingURL = supportRelativeURL(source, sourceMappingURL), sourceMapData = retrieveFile(sourceMappingURL)), sourceMapData ? {\n\t\turl: sourceMappingURL,\n\t\tmap: sourceMapData\n\t} : null;\n}\nfunction mapSourcePosition(position) {\n\tif (!position.source) return position;\n\tlet sourceMap = getRunnerSourceMap(position);\n\tif (sourceMap ||= sourceMapCache[position.source], !sourceMap) {\n\t\tlet urlAndMap = retrieveSourceMap(position.source);\n\t\tif (urlAndMap && urlAndMap.map) {\n\t\t\tlet url = urlAndMap.url;\n\t\t\tsourceMap = sourceMapCache[position.source] = {\n\t\t\t\turl,\n\t\t\t\tmap: new DecodedMap(typeof urlAndMap.map == \"string\" ? JSON.parse(urlAndMap.map) : urlAndMap.map, url)\n\t\t\t};\n\t\t\tlet contents = sourceMap.map?.map.sourcesContent;\n\t\t\tsourceMap.map && contents && sourceMap.map.resolvedSources.forEach((source, i) => {\n\t\t\t\tlet content = contents[i];\n\t\t\t\tif (content && source && url) {\n\t\t\t\t\tlet contentUrl = supportRelativeURL(url, source);\n\t\t\t\t\tfileContentsCache[contentUrl] = content;\n\t\t\t\t}\n\t\t\t});\n\t\t} else sourceMap = sourceMapCache[position.source] = {\n\t\t\turl: null,\n\t\t\tmap: null\n\t\t};\n\t}\n\tif (sourceMap.map && sourceMap.url) {\n\t\tlet originalPosition = getOriginalPosition(sourceMap.map, position);\n\t\tif (originalPosition && originalPosition.source != null) return originalPosition.source = supportRelativeURL(sourceMap.url, originalPosition.source), sourceMap.vite && (originalPosition._vite = !0), originalPosition;\n\t}\n\treturn position;\n}\nfunction mapEvalOrigin(origin) {\n\tlet match = /^eval at ([^(]+) \\((.+):(\\d+):(\\d+)\\)$/.exec(origin);\n\tif (match) {\n\t\tlet position = mapSourcePosition({\n\t\t\tname: null,\n\t\t\tsource: match[2],\n\t\t\tline: +match[3],\n\t\t\tcolumn: match[4] - 1\n\t\t});\n\t\treturn `eval at ${match[1]} (${position.source}:${position.line}:${position.column + 1})`;\n\t}\n\treturn match = /^eval at ([^(]+) \\((.+)\\)$/.exec(origin), match ? `eval at ${match[1]} (${mapEvalOrigin(match[2])})` : origin;\n}\nfunction CallSiteToString() {\n\tlet fileName, fileLocation = \"\";\n\tif (this.isNative()) fileLocation = \"native\";\n\telse {\n\t\tfileName = this.getScriptNameOrSourceURL(), !fileName && this.isEval() && (fileLocation = this.getEvalOrigin(), fileLocation += \", \"), fileName ? fileLocation += fileName : fileLocation += \"<anonymous>\";\n\t\tlet lineNumber = this.getLineNumber();\n\t\tif (lineNumber != null) {\n\t\t\tfileLocation += `:${lineNumber}`;\n\t\t\tlet columnNumber = this.getColumnNumber();\n\t\t\tcolumnNumber && (fileLocation += `:${columnNumber}`);\n\t\t}\n\t}\n\tlet line = \"\", functionName = this.getFunctionName(), addSuffix = !0, isConstructor = this.isConstructor();\n\tif (this.isToplevel() || isConstructor) isConstructor ? line += `new ${functionName || \"<anonymous>\"}` : functionName ? line += functionName : (line += fileLocation, addSuffix = !1);\n\telse {\n\t\tlet typeName = this.getTypeName();\n\t\ttypeName === \"[object Object]\" && (typeName = \"null\");\n\t\tlet methodName = this.getMethodName();\n\t\tfunctionName ? (typeName && functionName.indexOf(typeName) !== 0 && (line += `${typeName}.`), line += functionName, methodName && functionName.indexOf(`.${methodName}`) !== functionName.length - methodName.length - 1 && (line += ` [as ${methodName}]`)) : line += `${typeName}.${methodName || \"<anonymous>\"}`;\n\t}\n\treturn addSuffix && (line += ` (${fileLocation})`), line;\n}\nfunction cloneCallSite(frame) {\n\tlet object = {};\n\treturn Object.getOwnPropertyNames(Object.getPrototypeOf(frame)).forEach((name) => {\n\t\tlet key = name;\n\t\tobject[key] = /^(?:is|get)/.test(name) ? function() {\n\t\t\treturn frame[key].call(frame);\n\t\t} : frame[key];\n\t}), object.toString = CallSiteToString, object;\n}\nfunction wrapCallSite(frame, state) {\n\tif (state === void 0 && (state = {\n\t\tnextPosition: null,\n\t\tcurPosition: null\n\t}), frame.isNative()) return state.curPosition = null, frame;\n\tlet source = frame.getFileName() || frame.getScriptNameOrSourceURL();\n\tif (source) {\n\t\tlet position = mapSourcePosition({\n\t\t\tname: null,\n\t\t\tsource,\n\t\t\tline: frame.getLineNumber() ?? 0,\n\t\t\tcolumn: (frame.getColumnNumber() ?? 1) - 1\n\t\t});\n\t\tstate.curPosition = position, frame = cloneCallSite(frame);\n\t\tlet originalFunctionName = frame.getFunctionName;\n\t\treturn frame.getFunctionName = function() {\n\t\t\tlet name = state.nextPosition == null ? originalFunctionName() : state.nextPosition.name || originalFunctionName();\n\t\t\treturn name === \"eval\" && \"_vite\" in position ? null : name;\n\t\t}, frame.getFileName = function() {\n\t\t\treturn position.source ?? null;\n\t\t}, frame.getLineNumber = function() {\n\t\t\treturn position.line;\n\t\t}, frame.getColumnNumber = function() {\n\t\t\treturn position.column + 1;\n\t\t}, frame.getScriptNameOrSourceURL = function() {\n\t\t\treturn position.source;\n\t\t}, frame;\n\t}\n\tlet origin = frame.isEval() && frame.getEvalOrigin();\n\treturn origin ? (origin = mapEvalOrigin(origin), frame = cloneCallSite(frame), frame.getEvalOrigin = function() {\n\t\treturn origin || void 0;\n\t}, frame) : frame;\n}\nfunction prepareStackTrace(error, stack) {\n\tlet errorString = `${error.name || \"Error\"}: ${error.message || \"\"}`, state = {\n\t\tnextPosition: null,\n\t\tcurPosition: null\n\t}, processedStack = [];\n\tfor (let i = stack.length - 1; i >= 0; i--) processedStack.push(`\\n at ${wrapCallSite(stack[i], state)}`), state.nextPosition = state.curPosition;\n\treturn state.curPosition = state.nextPosition = null, errorString + processedStack.reverse().join(\"\");\n}\n//#endregion\n//#region src/module-runner/sourcemap/index.ts\nfunction enableSourceMapSupport(runner) {\n\tif (runner.options.sourcemapInterceptor === \"node\") {\n\t\tif (typeof process > \"u\") throw TypeError(\"Cannot use \\\"sourcemapInterceptor: 'node'\\\" because global \\\"process\\\" variable is not available.\");\n\t\tif (typeof process.setSourceMapsEnabled != \"function\") throw TypeError(\"Cannot use \\\"sourcemapInterceptor: 'node'\\\" because \\\"process.setSourceMapsEnabled\\\" function is not available. Please use Node >= 16.6.0.\");\n\t\tlet isEnabledAlready = process.sourceMapsEnabled ?? !1;\n\t\treturn process.setSourceMapsEnabled(!0), () => !isEnabledAlready && process.setSourceMapsEnabled(!1);\n\t}\n\treturn interceptStackTrace(runner, typeof runner.options.sourcemapInterceptor == \"object\" ? runner.options.sourcemapInterceptor : void 0);\n}\n//#endregion\n//#region src/module-runner/esmEvaluator.ts\nvar ESModulesEvaluator = class {\n\tstartOffset = getAsyncFunctionDeclarationPaddingLineCount() + 1;\n\tasync runInlinedModule(context, code) {\n\t\tawait new AsyncFunction(ssrModuleExportsKey, ssrImportMetaKey, ssrImportKey, ssrDynamicImportKey, ssrExportAllKey, ssrExportNameKey, \"\\\"use strict\\\";\\n\" + code)(context[ssrModuleExportsKey], context[ssrImportMetaKey], context[ssrImportKey], context[ssrDynamicImportKey], context[ssrExportAllKey], context[ssrExportNameKey]), Object.seal(context[ssrModuleExportsKey]);\n\t}\n\trunExternalModule(filepath) {\n\t\treturn import(filepath);\n\t}\n};\n//#endregion\n//#region src/module-runner/importMetaResolver.ts\nconst customizationHookNamespace = \"vite-module-runner:import-meta-resolve/v1/\", customizationHooksModule = `\n\nexport async function resolve(specifier, context, nextResolve) {\n if (specifier.startsWith(${JSON.stringify(customizationHookNamespace)})) {\n const data = specifier.slice(${JSON.stringify(customizationHookNamespace)}.length)\n const [parsedSpecifier, parsedImporter] = JSON.parse(data)\n specifier = parsedSpecifier\n context.parentURL = parsedImporter\n }\n return nextResolve(specifier, context)\n}\n\n`;\nfunction customizationHookResolve(specifier, context, nextResolve) {\n\tif (specifier.startsWith(customizationHookNamespace)) {\n\t\tlet data = specifier.slice(42), [parsedSpecifier, parsedImporter] = JSON.parse(data);\n\t\tspecifier = parsedSpecifier, context.parentURL = parsedImporter;\n\t}\n\treturn nextResolve(specifier, context);\n}\nlet isHookRegistered = !1;\nfunction createImportMetaResolver() {\n\tif (isHookRegistered) return importMetaResolveWithCustomHook;\n\tlet module;\n\ttry {\n\t\tmodule = typeof process < \"u\" ? process.getBuiltinModule(\"node:module\").Module : void 0;\n\t} catch {\n\t\treturn;\n\t}\n\tif (module) {\n\t\tif (module.registerHooks) return module.registerHooks({ resolve: customizationHookResolve }), isHookRegistered = !0, importMetaResolveWithCustomHook;\n\t\tif (module.register) {\n\t\t\ttry {\n\t\t\t\tlet hookModuleContent = `data:text/javascript,${encodeURI(customizationHooksModule)}`;\n\t\t\t\tmodule.register(hookModuleContent);\n\t\t\t} catch (e) {\n\t\t\t\tif (\"code\" in e && e.code === \"ERR_NETWORK_IMPORT_DISALLOWED\") return;\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t\treturn isHookRegistered = !0, importMetaResolveWithCustomHook;\n\t\t}\n\t}\n}\nfunction importMetaResolveWithCustomHook(specifier, importer) {\n\treturn import.meta.resolve(`${customizationHookNamespace}${JSON.stringify([specifier, importer])}`);\n}\n//#endregion\n//#region src/module-runner/createImportMeta.ts\nconst envProxy = new Proxy({}, { get(_, p) {\n\tthrow Error(`[module runner] Dynamic access of \"import.meta.env\" is not supported. Please, use \"import.meta.env.${String(p)}\" instead.`);\n} });\nfunction createDefaultImportMeta(modulePath) {\n\tlet href = posixPathToFileHref(modulePath), filename = modulePath, dirname = posixDirname(modulePath);\n\treturn {\n\t\tfilename: isWindows ? toWindowsPath(filename) : filename,\n\t\tdirname: isWindows ? toWindowsPath(dirname) : dirname,\n\t\turl: href,\n\t\tenv: envProxy,\n\t\tresolve(_id, _parent) {\n\t\t\tthrow Error(\"[module runner] \\\"import.meta.resolve\\\" is not supported.\");\n\t\t},\n\t\tglob() {\n\t\t\tthrow Error(\"[module runner] \\\"import.meta.glob\\\" is statically replaced during file transformation. Make sure to reference it by the full name.\");\n\t\t}\n\t};\n}\n/**\n* Create import.meta object for Node.js.\n*/\nfunction createNodeImportMeta(modulePath) {\n\tlet defaultMeta = createDefaultImportMeta(modulePath), href = defaultMeta.url, importMetaResolver = createImportMetaResolver();\n\treturn {\n\t\t...defaultMeta,\n\t\tmain: !1,\n\t\tresolve(id, parent) {\n\t\t\treturn (importMetaResolver ?? defaultMeta.resolve)(id, parent ?? href);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/module-runner/runner.ts\nvar ModuleRunner = class {\n\toptions;\n\tevaluator;\n\tdebug;\n\tevaluatedModules;\n\thmrClient;\n\ttransport;\n\tresetSourceMapSupport;\n\tconcurrentModuleNodePromises = /* @__PURE__ */ new Map();\n\tisBuiltin;\n\tbuiltinsPromise;\n\tclosed = !1;\n\tconstructor(options, evaluator = new ESModulesEvaluator(), debug) {\n\t\tif (this.options = options, this.evaluator = evaluator, this.debug = debug, this.evaluatedModules = options.evaluatedModules ?? new EvaluatedModules(), this.transport = normalizeModuleRunnerTransport(options.transport), options.hmr !== !1) {\n\t\t\tlet optionsHmr = options.hmr ?? !0, resolvedHmrLogger = optionsHmr === !0 || optionsHmr.logger === void 0 ? hmrLogger : optionsHmr.logger === !1 ? silentConsole : optionsHmr.logger;\n\t\t\tif (this.hmrClient = new HMRClient(resolvedHmrLogger, this.transport, ({ acceptedPath }) => this.import(acceptedPath)), !this.transport.connect) throw Error(\"HMR is not supported by this runner transport, but `hmr` option was set to true\");\n\t\t\tthis.transport.connect(createHMRHandlerForRunner(this));\n\t\t} else this.transport.connect?.();\n\t\toptions.sourcemapInterceptor !== !1 && (this.resetSourceMapSupport = enableSourceMapSupport(this));\n\t}\n\t/**\n\t* URL to execute. Accepts file path, server path or id relative to the root.\n\t*/\n\tasync import(url) {\n\t\tlet fetchedModule = await this.cachedModule(url);\n\t\treturn await this.cachedRequest(url, fetchedModule);\n\t}\n\t/**\n\t* Clear all caches including HMR listeners.\n\t*/\n\tclearCache() {\n\t\tthis.evaluatedModules.clear(), this.hmrClient?.clear();\n\t}\n\t/**\n\t* Clears all caches, removes all HMR listeners, and resets source map support.\n\t* This method doesn't stop the HMR connection.\n\t*/\n\tasync close() {\n\t\tthis.resetSourceMapSupport?.(), this.clearCache(), this.hmrClient = void 0, this.closed = !0, await this.transport.disconnect?.();\n\t}\n\t/**\n\t* Returns `true` if the runtime has been closed by calling `close()` method.\n\t*/\n\tisClosed() {\n\t\treturn this.closed;\n\t}\n\tprocessImport(exports, fetchResult, metadata) {\n\t\tif (!(\"externalize\" in fetchResult)) return exports;\n\t\tlet { url, type } = fetchResult;\n\t\treturn type !== \"module\" && type !== \"commonjs\" || analyzeImportedModDifference(exports, url, type, metadata), exports;\n\t}\n\tisCircularRequest(mod, callstack, visited = /* @__PURE__ */ new Set()) {\n\t\tif (visited.has(mod.id)) return !1;\n\t\tvisited.add(mod.id);\n\t\tfor (let importedModuleId of mod.imports) {\n\t\t\tif (callstack.includes(importedModuleId)) return !0;\n\t\t\tlet importedModule = this.evaluatedModules.getModuleById(importedModuleId);\n\t\t\tif (importedModule?.promise && !importedModule.evaluated && this.isCircularRequest(importedModule, callstack, visited)) return !0;\n\t\t}\n\t\treturn !1;\n\t}\n\tasync cachedRequest(url, mod, callstack = [], metadata) {\n\t\tlet meta = mod.meta, moduleId = meta.id, importee = callstack[callstack.length - 1];\n\t\tif (importee && mod.importers.add(importee), mod.evaluated && mod.promise) return this.processImport(await mod.promise, meta, metadata);\n\t\tif (mod.promise) return mod.exports && (callstack.includes(moduleId) || this.isCircularRequest(mod, callstack)) ? this.processImport(mod.exports, meta, metadata) : this.processImport(await mod.promise, meta, metadata);\n\t\tlet debugTimer;\n\t\tthis.debug && (debugTimer = setTimeout(() => {\n\t\t\tthis.debug(`[module runner] module ${moduleId} takes over 2s to load.\\n${`stack:\\n${[...callstack, moduleId].reverse().map((p) => ` - ${p}`).join(\"\\n\")}`}`);\n\t\t}, 2e3));\n\t\ttry {\n\t\t\tlet promise = this.directRequest(url, mod, callstack);\n\t\t\treturn mod.promise = promise, mod.evaluated = !1, this.processImport(await promise, meta, metadata);\n\t\t} finally {\n\t\t\tmod.evaluated = !0, debugTimer && clearTimeout(debugTimer);\n\t\t}\n\t}\n\tasync cachedModule(url, importer) {\n\t\tlet cached = this.concurrentModuleNodePromises.get(url);\n\t\tif (cached) this.debug?.(\"[module runner] using cached module info for\", url);\n\t\telse {\n\t\t\tlet cachedModule = this.evaluatedModules.getModuleByUrl(url);\n\t\t\tcached = this.getModuleInformation(url, importer, cachedModule).finally(() => {\n\t\t\t\tthis.concurrentModuleNodePromises.delete(url);\n\t\t\t}), this.concurrentModuleNodePromises.set(url, cached);\n\t\t}\n\t\treturn cached;\n\t}\n\tensureBuiltins() {\n\t\tif (!this.isBuiltin) return this.builtinsPromise ??= (async () => {\n\t\t\ttry {\n\t\t\t\tthis.debug?.(\"[module runner] fetching builtins from server\");\n\t\t\t\tlet builtins = (await this.transport.invoke(\"getBuiltins\", [])).map((builtin) => typeof builtin == \"object\" && builtin && \"type\" in builtin ? builtin.type === \"string\" ? builtin.value : new RegExp(builtin.source, builtin.flags) : builtin);\n\t\t\t\tthis.isBuiltin = createIsBuiltin(builtins), this.debug?.(\"[module runner] builtins loaded:\", builtins);\n\t\t\t} finally {\n\t\t\t\tthis.builtinsPromise = void 0;\n\t\t\t}\n\t\t})(), this.builtinsPromise;\n\t}\n\tasync getModuleInformation(url, importer, cachedModule) {\n\t\tif (this.closed) throw Error(\"Vite module runner has been closed.\");\n\t\tawait this.ensureBuiltins(), this.debug?.(\"[module runner] fetching\", url);\n\t\tlet isCached = !!(typeof cachedModule == \"object\" && cachedModule.meta), fetchedModule = url.startsWith(\"data:\") || this.isBuiltin?.(url) ? {\n\t\t\texternalize: url,\n\t\t\ttype: \"builtin\"\n\t\t} : await this.transport.invoke(\"fetchModule\", [\n\t\t\turl,\n\t\t\timporter,\n\t\t\t{\n\t\t\t\tcached: isCached,\n\t\t\t\tstartOffset: this.evaluator.startOffset\n\t\t\t}\n\t\t]);\n\t\tif (\"cache\" in fetchedModule) {\n\t\t\tif (!cachedModule || !cachedModule.meta) throw Error(`Module \"${url}\" was mistakenly invalidated during fetch phase.`);\n\t\t\treturn cachedModule;\n\t\t}\n\t\tlet moduleId = \"externalize\" in fetchedModule ? fetchedModule.externalize : fetchedModule.id, moduleUrl = \"url\" in fetchedModule ? fetchedModule.url : url, module = this.evaluatedModules.ensureModule(moduleId, moduleUrl);\n\t\treturn \"invalidate\" in fetchedModule && fetchedModule.invalidate && this.evaluatedModules.invalidateModule(module), fetchedModule.url = moduleUrl, fetchedModule.id = moduleId, module.meta = fetchedModule, module;\n\t}\n\tasync directRequest(url, mod, _callstack) {\n\t\tlet fetchResult = mod.meta, moduleId = fetchResult.id, callstack = [..._callstack, moduleId], request = async (dep, metadata) => {\n\t\t\tlet importer = \"file\" in fetchResult && fetchResult.file || moduleId, depMod = await this.cachedModule(dep, importer);\n\t\t\treturn depMod.importers.add(moduleId), mod.imports.add(depMod.id), this.cachedRequest(dep, depMod, callstack, metadata);\n\t\t}, dynamicRequest = async (dep) => (dep = String(dep), dep[0] === \".\" && (dep = posixResolve(posixDirname(url), dep)), request(dep, { isDynamicImport: !0 }));\n\t\tif (\"externalize\" in fetchResult) {\n\t\t\tlet { externalize } = fetchResult;\n\t\t\tthis.debug?.(\"[module runner] externalizing\", externalize);\n\t\t\tlet exports = await this.evaluator.runExternalModule(externalize);\n\t\t\treturn mod.exports = exports, exports;\n\t\t}\n\t\tlet { code, file } = fetchResult;\n\t\tif (code == null) {\n\t\t\tlet importer = callstack[callstack.length - 2];\n\t\t\tthrow Error(`[module runner] Failed to load \"${url}\"${importer ? ` imported from ${importer}` : \"\"}`);\n\t\t}\n\t\tlet createImportMeta = this.options.createImportMeta ?? createDefaultImportMeta, modulePath = cleanUrl(file || moduleId), href = posixPathToFileHref(modulePath), meta = await createImportMeta(modulePath), exports = Object.create(null);\n\t\tObject.defineProperty(exports, Symbol.toStringTag, {\n\t\t\tvalue: \"Module\",\n\t\t\tenumerable: !1,\n\t\t\tconfigurable: !1\n\t\t}), mod.exports = exports;\n\t\tlet hotContext;\n\t\tthis.hmrClient && Object.defineProperty(meta, \"hot\", {\n\t\t\tenumerable: !0,\n\t\t\tget: () => {\n\t\t\t\tif (!this.hmrClient) throw Error(\"[module runner] HMR client was closed.\");\n\t\t\t\treturn this.debug?.(\"[module runner] creating hmr context for\", mod.url), hotContext ||= new HMRContext(this.hmrClient, mod.url), hotContext;\n\t\t\t},\n\t\t\tset: (value) => {\n\t\t\t\thotContext = value;\n\t\t\t}\n\t\t});\n\t\tlet context = {\n\t\t\t[ssrImportKey]: request,\n\t\t\t[ssrDynamicImportKey]: dynamicRequest,\n\t\t\t[ssrModuleExportsKey]: exports,\n\t\t\t[ssrExportAllKey]: (obj) => exportAll(exports, obj),\n\t\t\t[ssrExportNameKey]: (name, getter) => Object.defineProperty(exports, name, {\n\t\t\t\tenumerable: !0,\n\t\t\t\tconfigurable: !0,\n\t\t\t\tget: getter\n\t\t\t}),\n\t\t\t[ssrImportMetaKey]: meta\n\t\t};\n\t\treturn this.debug?.(\"[module runner] executing\", href), await this.evaluator.runInlinedModule(context, code, mod), exports;\n\t}\n};\nfunction exportAll(exports, sourceModule) {\n\tif (exports !== sourceModule && !(isPrimitive(sourceModule) || Array.isArray(sourceModule) || sourceModule instanceof Promise)) {\n\t\tfor (let key in sourceModule) if (key !== \"default\" && key !== \"__esModule\" && !(key in exports)) try {\n\t\t\tObject.defineProperty(exports, key, {\n\t\t\t\tenumerable: !0,\n\t\t\t\tconfigurable: !0,\n\t\t\t\tget: () => sourceModule[key]\n\t\t\t});\n\t\t} catch {}\n\t}\n}\n//#endregion\nexport { ESModulesEvaluator, EvaluatedModules, ModuleRunner, createDefaultImportMeta, createNodeImportMeta, createWebSocketModuleRunnerTransport, normalizeModuleId, ssrDynamicImportKey, ssrExportAllKey, ssrExportNameKey, ssrImportKey, ssrImportMetaKey, ssrModuleExportsKey };\n"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAI,oBAAoB;AACxB,qBAAqB;AAGH,OAAO,UAAU,OAAO,QAAQ;CAkB5B,iBAAiB,CAAC,EAAA,CAAE;AAoEvC,MAAA,cAAc,IAAI,YAAY;OAAyB;CACzD,IAAI,iBAAiB,OAAO,UAAU,aAAa,SAAS,KAAK;CACjE,OAAO,kBAAkB,OAAO,eAAe,QAAQ,cAAc,WAAW,eAAe,KAAK,QAAQ,QAAQ,CAAC,CAAC,SAAS,OAAO,KAAK,WAAW,YAAY,OAAO,WAAW,KAAK,KAAK,MAAM,IAAI,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;AAC/N,EAAA,CAAG;AAca,IAAA,QAAQ;AAAoE,IAAA,4BAA4B,IAAI,WAAW,EAAE;AAAG,IAAA,4BAA4B,IAAI,WAAW,GAAG;AAC1L,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;CACtC,IAAI,IAAI,MAAM,WAAW,CAAC;CAC1B,UAAU,KAAK,GAAG,UAAU,KAAK;AAClC;AAqJ2C,OAAO,OAAO,kBAAkB,mCAAmC;AAsjBtF,MAAM;AA0L9B,MAAM,6BAA6B;AAAyE,GAG/E,KAAK,UAAU,0BAA0B,EAHsC,EAIzE,KAAK,UAAU,0BAA0B,EAJgC;AAgD3F,IAAI,MAAM,CAAC,GAAG,EAAE,IAAI,GAAG,GAAG;CAC1C,MAAM,MAAM,sGAAsG,OAAO,CAAC,EAAE,WAAW;AACxI,EAAE,CAAC"}
@@ -1,6 +1,6 @@
1
- import "../../@vitest/runner/dist/chunk-artifact.js";
1
+ import { h as describe, m as it } from "../../@vitest/runner/dist/chunk-artifact.js";
2
2
  import "../../@vitest/runner/dist/index.js";
3
3
  import "../../@vitest/runner/dist/utils.js";
4
4
  import "../../vite/dist/node/module-runner.js";
5
5
  import { expectTypeOf } from "expect-type";
6
- export { expectTypeOf };
6
+ export { describe, expectTypeOf, it };
@@ -1,5 +1,4 @@
1
1
  import { TroubleshootArgs, TroubleshootCallbacks, TroubleshootOptions, TroubleshootReport } from "./types.js";
2
-
3
2
  //#region src/troubleshoot.d.ts
4
3
  /**
5
4
  * Generate a diagnostic markdown report for `args.leaseUuid`.
@@ -1 +1 @@
1
- {"version":3,"file":"troubleshoot.d.ts","names":[],"sources":["../src/troubleshoot.ts"],"mappings":";;;;;;;;;;;;;;;;;;;iBAiEsB,sBAAA,CACpB,IAAA,EAAM,gBAAA,EACN,SAAA,EAAW,qBAAA,EACX,IAAA,EAAM,mBAAA,GACL,OAAA,CAAQ,kBAAA"}
1
+ {"version":3,"file":"troubleshoot.d.ts","names":[],"sources":["../src/troubleshoot.ts"],"mappings":";;;;;;;;;;;;;;;;;;iBAiEsB,uBACpB,MAAM,kBACN,WAAW,uBACX,MAAM,sBACL,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"troubleshoot.js","names":["decodeLeaseState"],"sources":["../src/troubleshoot.ts"],"sourcesContent":["/**\n * Public entry point: produce a markdown-formatted diagnostic report\n * for a given lease.\n *\n * Chain-only (no provider HTTP calls — `TroubleshootOptions` has no\n * `walletProvider` for ADR-036 auth). Composes:\n *\n * - `queryClient.liftedinit.billing.v1.lease({ leaseUuid })` for the\n * authoritative chain-side lease record.\n * - `lease-state.decode` + `isTerminal` to translate the integer\n * state into a canonical `LEASE_STATE_*` name and a\n * guidance-routing terminal/non-terminal classification.\n * - `lease-items.normalizeItem` to surface each item's serviceName\n * and customDomain regardless of snake/camelCase payload shape.\n *\n * The returned `markdown` is plain text with markdown formatting — host\n * surfaces can render it in chat directly or embed in a richer\n * diagnostic UI.\n *\n * **Scope:** chain-only. `TroubleshootOptions` carries no `walletProvider`,\n * so provider-side diagnostics (`appStatus` / `getLeaseProvision` /\n * `getAppLogs`) are out of scope for this function. If the report\n * surfaces a recovery-worthy state (e.g. terminal / drift), the caller\n * composes `closeLease()` separately — agent-core's simple-form\n * `onFailure({ reason })` does not carry recovery options, so the\n * orchestration of \"report → decide → close\" lives at the host surface.\n */\n\nimport {\n ManifestMCPError,\n ManifestMCPErrorCode,\n} from '@manifest-network/manifest-mcp-core';\nimport { makeCancellationScope } from './internals/cancellation.js';\nimport { normalizeItem } from './internals/lease-items.js';\nimport {\n decode as decodeLeaseState,\n isTerminal,\n} from './internals/lease-state.js';\nimport type {\n LeaseStateName,\n TroubleshootArgs,\n TroubleshootCallbacks,\n TroubleshootOptions,\n TroubleshootReport,\n} from './types.js';\n\nconst UUID_RE =\n /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;\n\n/**\n * Generate a diagnostic markdown report for `args.leaseUuid`.\n *\n * @throws `ManifestMCPError(INVALID_CONFIG)` for args validation.\n * @throws `ManifestMCPError(QUERY_FAILED)` in two cases, both with\n * `onFailure({ reason })` invoked first:\n * - the chain query rejects with a plain `Error` (RPC / transport\n * / decoding failure); or\n * - the chain query succeeds but returns `{ lease: null }` /\n * `undefined` (lease UUID not on-chain — the `billing.v1.lease`\n * no-such-lease response shape).\n * Structured `ManifestMCPError`s raised by the chain client\n * (e.g. `INVALID_CONFIG` from missing rpc/rest url config,\n * `RPC_CONNECTION_FAILED` from connect failure) are re-thrown\n * as-is with their original code, with `onFailure` invoked first.\n */\nexport async function troubleshootDeployment(\n args: TroubleshootArgs,\n callbacks: TroubleshootCallbacks,\n opts: TroubleshootOptions,\n): Promise<TroubleshootReport> {\n validateArgs(args);\n\n const cx = makeCancellationScope({\n opts,\n onProgress: callbacks.onProgress,\n opLabel: 'Troubleshoot',\n broadcasts: false,\n });\n cx.throwIfCancelled();\n\n let leasePayload: unknown;\n try {\n // Pull `getQueryClient()` INSIDE the try (Copilot review PR #60,\n // comment 3276719462). `getQueryClient()` can throw\n // `INVALID_CONFIG` (neither rpcUrl nor restUrl set) or\n // `RPC_CONNECTION_FAILED` (connect failure). Catching here routes\n // those init-time failures through the same `onFailure` +\n // QUERY_FAILED / structured-passthrough normalization the chain-\n // query failure mode already gets — three modes, one disambiguation.\n const queryClient = await opts.clientManager.getQueryClient();\n const result = await cx.race(\n queryClient.liftedinit.billing.v1.lease({\n leaseUuid: args.leaseUuid,\n }),\n );\n leasePayload = result.lease;\n } catch (err) {\n if (\n err instanceof ManifestMCPError &&\n err.code === ManifestMCPErrorCode.OPERATION_CANCELLED\n ) {\n throw err;\n }\n // Preserve structured `ManifestMCPError`s from the chain client\n // (Copilot review PR #60, comment 3276172289). Wrapping every\n // failure as `QUERY_FAILED` erases upstream error codes — a real\n // `INVALID_CONFIG` from the chain layer should surface to callers\n // with that code, not be collapsed to a less-specific category.\n // Mirrors the disambiguation `manage-domain.ts:lookupDomain`\n // adopted in commit aaa5cc5. Note: chain-NotFound for\n // `billing.v1.lease({ leaseUuid })` returns `{ lease: null }`\n // (handled below), so errors landing here are genuinely transport\n // or structured failures.\n const reason = `Failed to query lease ${args.leaseUuid}: ${err instanceof Error ? err.message : String(err)}`;\n if (callbacks.onFailure) {\n await callbacks.onFailure({ reason });\n }\n if (err instanceof ManifestMCPError) {\n throw err;\n }\n throw new ManifestMCPError(ManifestMCPErrorCode.QUERY_FAILED, reason);\n }\n\n if (leasePayload === null || leasePayload === undefined) {\n const reason = `Lease ${args.leaseUuid} not found on chain.`;\n if (callbacks.onFailure) {\n await callbacks.onFailure({ reason });\n }\n throw new ManifestMCPError(ManifestMCPErrorCode.QUERY_FAILED, reason);\n }\n\n const markdown = renderReport(args.leaseUuid, leasePayload);\n const report: TroubleshootReport = { markdown };\n callbacks.onComplete?.(report);\n return report;\n}\n\n// --- Helpers --------------------------------------------------------\n\nfunction validateArgs(args: TroubleshootArgs): void {\n if (typeof args.leaseUuid !== 'string' || !args.leaseUuid.match(UUID_RE)) {\n throw new ManifestMCPError(\n ManifestMCPErrorCode.INVALID_CONFIG,\n `troubleshootDeployment: leaseUuid must be a UUID; got \"${args.leaseUuid}\".`,\n );\n }\n}\n\ninterface LeaseShape {\n uuid?: unknown;\n state?: unknown;\n providerUuid?: unknown;\n provider_uuid?: unknown;\n createdAt?: unknown;\n created_at?: unknown;\n closedAt?: unknown;\n closed_at?: unknown;\n items?: unknown;\n}\n\nfunction renderReport(leaseUuid: string, lease: unknown): string {\n const l = (lease ?? {}) as LeaseShape;\n const rawState = l.state;\n const stateName = decodeLeaseState(\n typeof rawState === 'number' || typeof rawState === 'string'\n ? rawState\n : undefined,\n );\n const stateLabel = stateName ?? `UNKNOWN(${String(rawState)})`;\n const providerUuid =\n readString(l.providerUuid) || readString(l.provider_uuid) || '(unknown)';\n const createdAt = readTimestamp(l.createdAt) ?? readTimestamp(l.created_at);\n const closedAt = readTimestamp(l.closedAt) ?? readTimestamp(l.closed_at);\n\n const rawItems = Array.isArray(l.items) ? l.items : [];\n const items = rawItems.map(normalizeItem);\n\n const lines: string[] = [];\n lines.push(`# Lease diagnostic — ${leaseUuid}`);\n lines.push('');\n lines.push('## Chain state');\n lines.push('');\n lines.push(`- **State:** ${stateLabel}`);\n lines.push(`- **Provider:** ${providerUuid}`);\n if (createdAt) lines.push(`- **Created:** ${createdAt}`);\n if (closedAt) lines.push(`- **Closed:** ${closedAt}`);\n lines.push('');\n\n lines.push('## Items');\n lines.push('');\n if (items.length === 0) {\n lines.push('_No items found on this lease._');\n } else {\n for (const item of items) {\n const svc = item.serviceName.length > 0 ? item.serviceName : '(default)';\n const dom =\n item.customDomain.length > 0 ? item.customDomain : '(no custom domain)';\n lines.push(`- **${svc}** → ${dom}`);\n }\n }\n lines.push('');\n\n lines.push('## Guidance');\n lines.push('');\n for (const tip of guidanceFor(stateName)) {\n lines.push(`- ${tip}`);\n }\n\n return lines.join('\\n');\n}\n\nfunction guidanceFor(state: LeaseStateName | undefined): string[] {\n if (state === undefined) {\n return [\n 'Lease state could not be decoded. Re-query in a moment, or check the chain client logs for transport errors.',\n ];\n }\n if (isTerminal(state)) {\n return [\n `Lease is in terminal state \\`${state}\\`. No further provider activity expected.`,\n 'To redeploy, create a new lease via `deployApp`.',\n ];\n }\n switch (state) {\n case 'LEASE_STATE_PENDING':\n return [\n 'Lease is awaiting provider acknowledgement.',\n 'If pending persists for more than a few minutes, the provider may be offline; consider closing and redeploying.',\n ];\n case 'LEASE_STATE_ACTIVE':\n return [\n 'Lease is active on the provider. App-level status / logs require a provider HTTP call with an ADR-036 auth token (out of scope for this chain-only diagnostic).',\n ];\n default:\n return [\n `Lease state is \\`${state}\\`. Review the chain proto for the expected next transition.`,\n ];\n }\n}\n\nfunction readString(value: unknown): string {\n return typeof value === 'string' ? value : '';\n}\n\nfunction readTimestamp(value: unknown): string | undefined {\n if (value instanceof Date) return value.toISOString();\n if (typeof value === 'string' && value.length > 0) return value;\n return undefined;\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"troubleshoot.js","names":["decodeLeaseState"],"sources":["../src/troubleshoot.ts"],"sourcesContent":["/**\n * Public entry point: produce a markdown-formatted diagnostic report\n * for a given lease.\n *\n * Chain-only (no provider HTTP calls — `TroubleshootOptions` has no\n * `walletProvider` for ADR-036 auth). Composes:\n *\n * - `queryClient.liftedinit.billing.v1.lease({ leaseUuid })` for the\n * authoritative chain-side lease record.\n * - `lease-state.decode` + `isTerminal` to translate the integer\n * state into a canonical `LEASE_STATE_*` name and a\n * guidance-routing terminal/non-terminal classification.\n * - `lease-items.normalizeItem` to surface each item's serviceName\n * and customDomain regardless of snake/camelCase payload shape.\n *\n * The returned `markdown` is plain text with markdown formatting — host\n * surfaces can render it in chat directly or embed in a richer\n * diagnostic UI.\n *\n * **Scope:** chain-only. `TroubleshootOptions` carries no `walletProvider`,\n * so provider-side diagnostics (`appStatus` / `getLeaseProvision` /\n * `getAppLogs`) are out of scope for this function. If the report\n * surfaces a recovery-worthy state (e.g. terminal / drift), the caller\n * composes `closeLease()` separately — agent-core's simple-form\n * `onFailure({ reason })` does not carry recovery options, so the\n * orchestration of \"report → decide → close\" lives at the host surface.\n */\n\nimport {\n ManifestMCPError,\n ManifestMCPErrorCode,\n} from '@manifest-network/manifest-mcp-core';\nimport { makeCancellationScope } from './internals/cancellation.js';\nimport { normalizeItem } from './internals/lease-items.js';\nimport {\n decode as decodeLeaseState,\n isTerminal,\n} from './internals/lease-state.js';\nimport type {\n LeaseStateName,\n TroubleshootArgs,\n TroubleshootCallbacks,\n TroubleshootOptions,\n TroubleshootReport,\n} from './types.js';\n\nconst UUID_RE =\n /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;\n\n/**\n * Generate a diagnostic markdown report for `args.leaseUuid`.\n *\n * @throws `ManifestMCPError(INVALID_CONFIG)` for args validation.\n * @throws `ManifestMCPError(QUERY_FAILED)` in two cases, both with\n * `onFailure({ reason })` invoked first:\n * - the chain query rejects with a plain `Error` (RPC / transport\n * / decoding failure); or\n * - the chain query succeeds but returns `{ lease: null }` /\n * `undefined` (lease UUID not on-chain — the `billing.v1.lease`\n * no-such-lease response shape).\n * Structured `ManifestMCPError`s raised by the chain client\n * (e.g. `INVALID_CONFIG` from missing rpc/rest url config,\n * `RPC_CONNECTION_FAILED` from connect failure) are re-thrown\n * as-is with their original code, with `onFailure` invoked first.\n */\nexport async function troubleshootDeployment(\n args: TroubleshootArgs,\n callbacks: TroubleshootCallbacks,\n opts: TroubleshootOptions,\n): Promise<TroubleshootReport> {\n validateArgs(args);\n\n const cx = makeCancellationScope({\n opts,\n onProgress: callbacks.onProgress,\n opLabel: 'Troubleshoot',\n broadcasts: false,\n });\n cx.throwIfCancelled();\n\n let leasePayload: unknown;\n try {\n // Pull `getQueryClient()` INSIDE the try (Copilot review PR #60,\n // comment 3276719462). `getQueryClient()` can throw\n // `INVALID_CONFIG` (neither rpcUrl nor restUrl set) or\n // `RPC_CONNECTION_FAILED` (connect failure). Catching here routes\n // those init-time failures through the same `onFailure` +\n // QUERY_FAILED / structured-passthrough normalization the chain-\n // query failure mode already gets — three modes, one disambiguation.\n const queryClient = await opts.clientManager.getQueryClient();\n const result = await cx.race(\n queryClient.liftedinit.billing.v1.lease({\n leaseUuid: args.leaseUuid,\n }),\n );\n leasePayload = result.lease;\n } catch (err) {\n if (\n err instanceof ManifestMCPError &&\n err.code === ManifestMCPErrorCode.OPERATION_CANCELLED\n ) {\n throw err;\n }\n // Preserve structured `ManifestMCPError`s from the chain client\n // (Copilot review PR #60, comment 3276172289). Wrapping every\n // failure as `QUERY_FAILED` erases upstream error codes — a real\n // `INVALID_CONFIG` from the chain layer should surface to callers\n // with that code, not be collapsed to a less-specific category.\n // Mirrors the disambiguation `manage-domain.ts:lookupDomain`\n // adopted in commit aaa5cc5. Note: chain-NotFound for\n // `billing.v1.lease({ leaseUuid })` returns `{ lease: null }`\n // (handled below), so errors landing here are genuinely transport\n // or structured failures.\n const reason = `Failed to query lease ${args.leaseUuid}: ${err instanceof Error ? err.message : String(err)}`;\n if (callbacks.onFailure) {\n await callbacks.onFailure({ reason });\n }\n if (err instanceof ManifestMCPError) {\n throw err;\n }\n throw new ManifestMCPError(ManifestMCPErrorCode.QUERY_FAILED, reason);\n }\n\n if (leasePayload === null || leasePayload === undefined) {\n const reason = `Lease ${args.leaseUuid} not found on chain.`;\n if (callbacks.onFailure) {\n await callbacks.onFailure({ reason });\n }\n throw new ManifestMCPError(ManifestMCPErrorCode.QUERY_FAILED, reason);\n }\n\n const markdown = renderReport(args.leaseUuid, leasePayload);\n const report: TroubleshootReport = { markdown };\n callbacks.onComplete?.(report);\n return report;\n}\n\n// --- Helpers --------------------------------------------------------\n\nfunction validateArgs(args: TroubleshootArgs): void {\n if (typeof args.leaseUuid !== 'string' || !args.leaseUuid.match(UUID_RE)) {\n throw new ManifestMCPError(\n ManifestMCPErrorCode.INVALID_CONFIG,\n `troubleshootDeployment: leaseUuid must be a UUID; got \"${args.leaseUuid}\".`,\n );\n }\n}\n\ninterface LeaseShape {\n uuid?: unknown;\n state?: unknown;\n providerUuid?: unknown;\n provider_uuid?: unknown;\n createdAt?: unknown;\n created_at?: unknown;\n closedAt?: unknown;\n closed_at?: unknown;\n items?: unknown;\n}\n\nfunction renderReport(leaseUuid: string, lease: unknown): string {\n const l = (lease ?? {}) as LeaseShape;\n const rawState = l.state;\n const stateName = decodeLeaseState(\n typeof rawState === 'number' || typeof rawState === 'string'\n ? rawState\n : undefined,\n );\n const stateLabel = stateName ?? `UNKNOWN(${String(rawState)})`;\n const providerUuid =\n readString(l.providerUuid) || readString(l.provider_uuid) || '(unknown)';\n const createdAt = readTimestamp(l.createdAt) ?? readTimestamp(l.created_at);\n const closedAt = readTimestamp(l.closedAt) ?? readTimestamp(l.closed_at);\n\n const rawItems = Array.isArray(l.items) ? l.items : [];\n const items = rawItems.map(normalizeItem);\n\n const lines: string[] = [];\n lines.push(`# Lease diagnostic — ${leaseUuid}`);\n lines.push('');\n lines.push('## Chain state');\n lines.push('');\n lines.push(`- **State:** ${stateLabel}`);\n lines.push(`- **Provider:** ${providerUuid}`);\n if (createdAt) lines.push(`- **Created:** ${createdAt}`);\n if (closedAt) lines.push(`- **Closed:** ${closedAt}`);\n lines.push('');\n\n lines.push('## Items');\n lines.push('');\n if (items.length === 0) {\n lines.push('_No items found on this lease._');\n } else {\n for (const item of items) {\n const svc = item.serviceName.length > 0 ? item.serviceName : '(default)';\n const dom =\n item.customDomain.length > 0 ? item.customDomain : '(no custom domain)';\n lines.push(`- **${svc}** → ${dom}`);\n }\n }\n lines.push('');\n\n lines.push('## Guidance');\n lines.push('');\n for (const tip of guidanceFor(stateName)) {\n lines.push(`- ${tip}`);\n }\n\n return lines.join('\\n');\n}\n\nfunction guidanceFor(state: LeaseStateName | undefined): string[] {\n if (state === undefined) {\n return [\n 'Lease state could not be decoded. Re-query in a moment, or check the chain client logs for transport errors.',\n ];\n }\n if (isTerminal(state)) {\n return [\n `Lease is in terminal state \\`${state}\\`. No further provider activity expected.`,\n 'To redeploy, create a new lease via `deployApp`.',\n ];\n }\n switch (state) {\n case 'LEASE_STATE_PENDING':\n return [\n 'Lease is awaiting provider acknowledgement.',\n 'If pending persists for more than a few minutes, the provider may be offline; consider closing and redeploying.',\n ];\n case 'LEASE_STATE_ACTIVE':\n return [\n 'Lease is active on the provider. App-level status / logs require a provider HTTP call with an ADR-036 auth token (out of scope for this chain-only diagnostic).',\n ];\n default:\n return [\n `Lease state is \\`${state}\\`. Review the chain proto for the expected next transition.`,\n ];\n }\n}\n\nfunction readString(value: unknown): string {\n return typeof value === 'string' ? value : '';\n}\n\nfunction readTimestamp(value: unknown): string | undefined {\n if (value instanceof Date) return value.toISOString();\n if (typeof value === 'string' && value.length > 0) return value;\n return undefined;\n}\n"],"mappings":"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"}
package/dist/types.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { AppDeploySpec, CosmosClientManager, ServiceConfig, SkuCandidate, WalletProvider } from "@manifest-network/manifest-mcp-core";
2
-
3
2
  //#region src/types.d.ts
4
3
  interface Coin {
5
4
  denom: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","names":[],"sources":["../src/types.ts"],"mappings":"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"}
1
+ {"version":3,"file":"types.d.ts","names":[],"sources":["../src/types.ts"],"mappings":";;UA2BiB;EACf;EACA;;UAGe;EACf,OAAO;EACP;;UAYe;EACf;EACA;;UAGe;;EAEf,OAAO,gBAAgB;;EAEvB;;;;;;UAgCe;;EAEf,eAAe;;EAEf,iBAAiB,WAAW;;;;;;;UAQb,yBAAyB;;;;;;;;EAQxC,SAAS;;;;;EAKT;;;;;;;;;;;;;;;;;;;;;;;EAuBA,gBAAgB;;EAEhB;;EAEA,WAAW;;;;;;;;;;;EAWX;;;;;;;;;EASA;;;;;;;UAQe,4BAA4B;;EAE3C,SAAS;;EAET;EACA;EACA,WAAW;;;;;;UAOI,0BAA0B;;EAEzC,SAAS;;EAET;EACA;EACA,WAAW;;;;;;UAOI,4BAA4B;;EAE3C,SAAS;;EAET;EACA;EACA,WAAW;;UAYI;EACf;EACA;EACA;EACA;EACA;EACA;;KAKU;UAMK;EACf;EACA;EACA,kBAAkB;EAClB,gBAAgB;EAChB;IAAW,mBAAmB;;EAC9B;IAAO;IAAc,OAAO;;;UAKb;EACf,aAAa;EACb,YAAY;IAAgB;IAAoB;;;UAGjC;EACf,SAAS;EACT,WAAW;EACX,MAAM;;KAGI;EACN;EAAkB;EAAkB,KAAK;;EACzC;EAAsB,MAAM;;UAEjB;EACf;;KAKU;UAWK;EACf;EACA;EACA,YAAY;EACZ;EACA;EACA;;KAKU;EACN;EAA6B,WAAW;;EACxC;EAAkC,OAAO;;EACzC;;EACA;EAA8B;;EAE9B;EACA;;EAGA;EACA;EACA;EACA;EACA,QAAQ;;EAER;EAA6B;;EAC7B;EAAwB;EAAmB;;EAC3C;EAA0B,QAAQ;;EAOlC;EACA;EACA;;EAKA;EACA,YAAY;;EAIZ;;KAIM;EAEN;EACA;EACA;EACA;;EAEA;EAAmB;;KAEb;UAMK;EACf,IAAI;EACJ;EACA;;UAGe;EACf,IAAI;;UAKW;EACf,UAAU,MAAM,SAAS,QAAQ;EACjC,aAAa,OAAO,wBAAwB;EAC5C,cAAc,OAAO;EACrB,cAAc,QAAQ;EACtB,aACE,SAAS,iBACT,SAAS,qBACN,QAAQ;;;;;;EAMb,gBACE,YAAY,mBACT;IAAU;IAAiB;;;KAKtB;EACN;EAAe;EAAmB;EAAc;;EAChD;EAAiB;EAAmB;;EACpC;EAAkB;;KAEZ;EAEN;EACA;EACA;EACA;;EAGA;EACA;EACA;EACA;;EAEA;EAAkB;EAAc;IAAS;;;UAE9B;EACf,aAAa,OAAO,wBAAwB;EAC5C,cAAc,OAAO;EACrB,cAAc,QAAQ;EACtB,aAAa;IAAW;QAAqB;;UAK9B;EACf;;UAGe;EACf;;UAGe;EACf,aAAa,OAAO,wBAAwB;EAC5C,cAAc,OAAO;EACrB,cAAc,QAAQ;EACtB,aAAa;IAAW;QAAqB;;UAK9B;EACf;;UAGe;EACf;EACA,YAAY;;UAGG;EACf,aAAa,OAAO,wBAAwB;EAC5C,cAAc,OAAO;EACrB,cAAc,QAAQ;EACtB,aAAa;IAAW;QAAqB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manifest-network/manifest-agent-core",
3
- "version": "0.18.0",
3
+ "version": "0.20.0",
4
4
  "description": "TypeScript orchestration surface for Manifest agent flows (deploy / manage-domain / troubleshoot / close-lease). Type contract only — see ENG-127.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -49,14 +49,14 @@
49
49
  "dist"
50
50
  ],
51
51
  "peerDependencies": {
52
- "@manifest-network/manifest-mcp-core": "^0.18.0",
53
- "@manifest-network/manifest-mcp-fred": "^0.18.0"
52
+ "@manifest-network/manifest-mcp-core": "^0.20.0",
53
+ "@manifest-network/manifest-mcp-fred": "^0.20.0"
54
54
  },
55
55
  "devDependencies": {
56
- "@manifest-network/manifest-mcp-core": "0.18.0",
57
- "@manifest-network/manifest-mcp-fred": "0.18.0",
58
- "@types/node": "22.19.19",
56
+ "@manifest-network/manifest-mcp-core": "0.20.0",
57
+ "@manifest-network/manifest-mcp-fred": "0.20.0",
58
+ "@types/node": "22.20.1",
59
59
  "typescript": "5.9.3",
60
- "vitest": "4.1.8"
60
+ "vitest": "4.1.10"
61
61
  }
62
62
  }