nitro-nightly 3.0.1-20260120-020848-6786d069 → 3.0.1-20260120-133849-ca1a9dee
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.
- package/dist/_build/common.mjs +24931 -0
- package/dist/_build/rolldown.mjs +6 -11
- package/dist/_build/rollup.mjs +201 -0
- package/dist/_build/vite.build.mjs +1 -1
- package/dist/_chunks/dev.mjs +4 -6
- package/dist/_chunks/nitro.mjs +1183 -24
- package/dist/_chunks/nitro2.mjs +91 -248
- package/dist/_chunks/utils.mjs +254 -0
- package/dist/_common.mjs +45 -0
- package/dist/_libs/c12+giget+readdirp+chokidar.d.mts +214 -0
- package/dist/_libs/citty.mjs +140 -110
- package/dist/_libs/commondir+is-reference.mjs +1300 -0
- package/dist/_libs/compatx.d.mts +47 -0
- package/dist/_libs/confbox.mjs +2488 -70
- package/dist/_libs/esbuild.d.mts +20 -0
- package/dist/_libs/escape-string-regexp.mjs +8 -0
- package/dist/_libs/estree-walker.mjs +187 -0
- package/dist/_libs/hasown+resolve+deepmerge.mjs +1972 -0
- package/dist/_libs/httpxy.d.mts +79 -0
- package/dist/_libs/httpxy.mjs +6 -1
- package/dist/_libs/klona.mjs +38 -0
- package/dist/_libs/magic-string.d.mts +220 -0
- package/dist/_libs/mlly.d.mts +57 -0
- package/dist/_libs/nypm+giget+tinyexec.mjs +3603 -0
- package/dist/_libs/pkg-types.d.mts +23 -0
- package/dist/_libs/plugin-alias.mjs +64 -0
- package/dist/_libs/{plugin-alias+plugin-inject.mjs → plugin-inject.mjs} +2 -65
- package/dist/_libs/plugin-json.mjs +36 -0
- package/dist/_libs/pluginutils+plugin-commonjs.d.mts +241 -0
- package/dist/_libs/pluginutils.mjs +652 -0
- package/dist/_libs/{c12+dotenv+rc9.mjs → rc9+c12+dotenv.mjs} +105 -12
- package/dist/_libs/{chokidar+readdirp.mjs → readdirp+chokidar.mjs} +8 -1
- package/dist/_libs/remapping.mjs +117 -0
- package/dist/_libs/resolve-uri+gen-mapping.mjs +448 -0
- package/dist/_libs/rou3.d.mts +43 -0
- package/dist/_libs/rou3.mjs +322 -0
- package/dist/_libs/std-env.d.mts +4 -0
- package/dist/_libs/tsconfck.mjs +832 -0
- package/dist/_libs/ultrahtml.mjs +138 -0
- package/dist/_libs/{gen-mapping+remapping+resolve-uri+trace-mapping+unimport+unplugin+unplugin-utils+webpack-virtual-modules.mjs → unimport+unplugin.mjs} +228 -593
- package/dist/_libs/unplugin+unimport.d.mts +426 -0
- package/dist/_libs/unwasm.d.mts +29 -0
- package/dist/_presets.mjs +3 -8
- package/dist/builder.mjs +6 -8
- package/dist/cli/_chunks/build.mjs +1 -1
- package/dist/cli/_chunks/dev.mjs +2 -3
- package/dist/cli/_chunks/list.mjs +1 -1
- package/dist/cli/_chunks/prepare.mjs +1 -1
- package/dist/cli/_chunks/run.mjs +1 -1
- package/dist/cli/_chunks/task.mjs +16 -0
- package/dist/cli/index.mjs +1 -1
- package/dist/presets/aws-lambda/runtime/_utils.d.mts +0 -5
- package/dist/presets/netlify/runtime/netlify-edge.d.mts +0 -1
- package/dist/presets/winterjs/runtime/winterjs.d.mts +0 -1
- package/dist/runtime/internal/error/dev.d.mts +0 -1
- package/dist/runtime/internal/route-rules.d.mts +0 -4
- package/dist/runtime/internal/routes/openapi.d.mts +0 -1
- package/dist/runtime/internal/routes/scalar.d.mts +0 -1
- package/dist/runtime/internal/routes/swagger.d.mts +0 -1
- package/dist/runtime/internal/runtime-config.d.mts +0 -1
- package/dist/runtime/nitro.d.mts +0 -3
- package/dist/runtime/virtual/renderer-template.d.mts +0 -1
- package/dist/types/index.d.mts +25 -1394
- package/dist/vite.mjs +18 -641
- package/package.json +5 -5
- package/dist/_chunks/nitro3.mjs +0 -2696
- package/dist/_chunks/nitro4.mjs +0 -176
- package/dist/_chunks/nitro5.mjs +0 -733
- package/dist/_chunks/nitro6.mjs +0 -1458
- package/dist/_chunks/nitro7.mjs +0 -7561
- package/dist/_chunks/nitro8.mjs +0 -3524
- package/dist/_chunks/nitro9.mjs +0 -1729
- package/dist/_libs/_.mjs +0 -3
- package/dist/_libs/_2.mjs +0 -3
- package/dist/_libs/_3.mjs +0 -4
- package/dist/_libs/_4.mjs +0 -6
- package/dist/_libs/_5.mjs +0 -3
- package/dist/_libs/_6.mjs +0 -3
- package/dist/_libs/acorn+confbox+js-tokens+magic-string+mlly+pkg-types+sourcemap-codec+strip-literal+unimport.mjs +0 -8900
- package/dist/_libs/confbox+exsolve+pkg-types.mjs +0 -1249
- package/dist/_libs/confbox2.mjs +0 -786
- package/dist/_libs/confbox3.mjs +0 -404
- package/dist/_libs/confbox4.mjs +0 -3
- package/dist/_libs/estree-walker+unimport.mjs +0 -378
- package/dist/_libs/fdir+picomatch+tinyglobby.mjs +0 -2471
- package/dist/_libs/giget+node-fetch-native.mjs +0 -2692
- package/dist/_libs/local-pkg+quansync+unimport.mjs +0 -1526
- package/dist/_libs/nypm+tinyexec.mjs +0 -858
- package/dist/_libs/pathe.mjs +0 -164
- package/dist/_libs/perfect-debounce.mjs +0 -89
- package/dist/_libs/std-env.mjs +0 -158
- package/dist/_libs/unimport.mjs +0 -9
- package/dist/_libs/vite-plugin-fullstack.mjs +0 -26
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { n as createUnimport } from "./local-pkg+quansync+unimport.mjs";
|
|
1
|
+
import { i as __toESM, n as __exportAll, r as __require, t as __commonJSMin } from "../_common.mjs";
|
|
2
|
+
import { E as parse$1, P as require_picomatch, S as MagicString, T as Parser, at as join$1, b as getMagicString, ct as resolve$1, it as isAbsolute$2, y as createUnimport } from "../_build/common.mjs";
|
|
3
|
+
import { t as walk } from "./estree-walker.mjs";
|
|
4
|
+
import { t as remapping } from "./remapping.mjs";
|
|
6
5
|
import { createRequire } from "node:module";
|
|
7
6
|
import fs, { promises } from "node:fs";
|
|
8
7
|
import "node:fs/promises";
|
|
@@ -14,6 +13,196 @@ import "scule";
|
|
|
14
13
|
import { Buffer } from "node:buffer";
|
|
15
14
|
import * as querystring from "node:querystring";
|
|
16
15
|
|
|
16
|
+
//#region node_modules/.pnpm/unimport@5.6.0/node_modules/unimport/dist/chunks/detect-acorn.mjs
|
|
17
|
+
var detect_acorn_exports = /* @__PURE__ */ __exportAll({
|
|
18
|
+
createVirtualImportsAcronWalker: () => createVirtualImportsAcronWalker,
|
|
19
|
+
detectImportsAcorn: () => detectImportsAcorn,
|
|
20
|
+
traveseScopes: () => traveseScopes
|
|
21
|
+
});
|
|
22
|
+
async function detectImportsAcorn(code, ctx, options) {
|
|
23
|
+
const s = getMagicString(code);
|
|
24
|
+
const map = await ctx.getImportMap();
|
|
25
|
+
let matchedImports = [];
|
|
26
|
+
const enableAutoImport = options?.autoImport !== false;
|
|
27
|
+
const enableTransformVirtualImports = options?.transformVirtualImports !== false && ctx.options.virtualImports?.length;
|
|
28
|
+
if (enableAutoImport || enableTransformVirtualImports) {
|
|
29
|
+
const ast = parse$1(s.original, {
|
|
30
|
+
sourceType: "module",
|
|
31
|
+
ecmaVersion: "latest",
|
|
32
|
+
locations: true
|
|
33
|
+
});
|
|
34
|
+
const virtualImports = createVirtualImportsAcronWalker(map, ctx.options.virtualImports);
|
|
35
|
+
const scopes = traveseScopes(ast, enableTransformVirtualImports ? virtualImports.walk : {});
|
|
36
|
+
if (enableAutoImport) {
|
|
37
|
+
const identifiers = scopes.unmatched;
|
|
38
|
+
matchedImports.push(...Array.from(identifiers).map((name) => {
|
|
39
|
+
const item = map.get(name);
|
|
40
|
+
if (item && !item.disabled) return item;
|
|
41
|
+
return null;
|
|
42
|
+
}).filter(Boolean));
|
|
43
|
+
for (const addon of ctx.addons) matchedImports = await addon.matchImports?.call(ctx, identifiers, matchedImports) || matchedImports;
|
|
44
|
+
}
|
|
45
|
+
virtualImports.ranges.forEach(([start, end]) => {
|
|
46
|
+
s.remove(start, end);
|
|
47
|
+
});
|
|
48
|
+
matchedImports.push(...virtualImports.imports);
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
s,
|
|
52
|
+
strippedCode: code.toString(),
|
|
53
|
+
matchedImports,
|
|
54
|
+
isCJSContext: false,
|
|
55
|
+
firstOccurrence: 0
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function traveseScopes(ast, additionalWalk) {
|
|
59
|
+
const scopes = [];
|
|
60
|
+
let scopeCurrent = void 0;
|
|
61
|
+
const scopesStack = [];
|
|
62
|
+
function pushScope(node) {
|
|
63
|
+
scopeCurrent = {
|
|
64
|
+
node,
|
|
65
|
+
parent: scopeCurrent,
|
|
66
|
+
declarations: /* @__PURE__ */ new Set(),
|
|
67
|
+
references: /* @__PURE__ */ new Set()
|
|
68
|
+
};
|
|
69
|
+
scopes.push(scopeCurrent);
|
|
70
|
+
scopesStack.push(scopeCurrent);
|
|
71
|
+
}
|
|
72
|
+
function popScope(node) {
|
|
73
|
+
if (scopesStack.pop()?.node !== node) throw new Error("Scope mismatch");
|
|
74
|
+
scopeCurrent = scopesStack[scopesStack.length - 1];
|
|
75
|
+
}
|
|
76
|
+
pushScope(void 0);
|
|
77
|
+
walk(ast, {
|
|
78
|
+
enter(node, parent, prop, index) {
|
|
79
|
+
additionalWalk?.enter?.call(this, node, parent, prop, index);
|
|
80
|
+
switch (node.type) {
|
|
81
|
+
case "ImportSpecifier":
|
|
82
|
+
case "ImportDefaultSpecifier":
|
|
83
|
+
case "ImportNamespaceSpecifier":
|
|
84
|
+
scopeCurrent.declarations.add(node.local.name);
|
|
85
|
+
return;
|
|
86
|
+
case "FunctionDeclaration":
|
|
87
|
+
case "ClassDeclaration":
|
|
88
|
+
if (node.id) scopeCurrent.declarations.add(node.id.name);
|
|
89
|
+
return;
|
|
90
|
+
case "VariableDeclarator":
|
|
91
|
+
if (node.id.type === "Identifier") scopeCurrent.declarations.add(node.id.name);
|
|
92
|
+
else walk(node.id, { enter(node2) {
|
|
93
|
+
if (node2.type === "ObjectPattern") node2.properties.forEach((i) => {
|
|
94
|
+
if (i.type === "Property" && i.value.type === "Identifier") scopeCurrent.declarations.add(i.value.name);
|
|
95
|
+
else if (i.type === "RestElement" && i.argument.type === "Identifier") scopeCurrent.declarations.add(i.argument.name);
|
|
96
|
+
});
|
|
97
|
+
else if (node2.type === "ArrayPattern") node2.elements.forEach((i) => {
|
|
98
|
+
if (i?.type === "Identifier") scopeCurrent.declarations.add(i.name);
|
|
99
|
+
if (i?.type === "RestElement" && i.argument.type === "Identifier") scopeCurrent.declarations.add(i.argument.name);
|
|
100
|
+
});
|
|
101
|
+
} });
|
|
102
|
+
return;
|
|
103
|
+
case "BlockStatement":
|
|
104
|
+
switch (parent?.type) {
|
|
105
|
+
case "FunctionDeclaration":
|
|
106
|
+
case "ArrowFunctionExpression":
|
|
107
|
+
case "FunctionExpression": {
|
|
108
|
+
const parameterIdentifiers = parent.params.filter((p) => p.type === "Identifier");
|
|
109
|
+
for (const id of parameterIdentifiers) scopeCurrent.declarations.add(id.name);
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
pushScope(node);
|
|
114
|
+
return;
|
|
115
|
+
case "Identifier":
|
|
116
|
+
switch (parent?.type) {
|
|
117
|
+
case "CallExpression":
|
|
118
|
+
if (parent.callee === node || parent.arguments.includes(node)) scopeCurrent.references.add(node.name);
|
|
119
|
+
return;
|
|
120
|
+
case "MemberExpression":
|
|
121
|
+
if (parent.object === node) scopeCurrent.references.add(node.name);
|
|
122
|
+
return;
|
|
123
|
+
case "VariableDeclarator":
|
|
124
|
+
if (parent.init === node) scopeCurrent.references.add(node.name);
|
|
125
|
+
return;
|
|
126
|
+
case "SpreadElement":
|
|
127
|
+
if (parent.argument === node) scopeCurrent.references.add(node.name);
|
|
128
|
+
return;
|
|
129
|
+
case "ClassDeclaration":
|
|
130
|
+
if (parent.superClass === node) scopeCurrent.references.add(node.name);
|
|
131
|
+
return;
|
|
132
|
+
case "Property":
|
|
133
|
+
if (parent.value === node) scopeCurrent.references.add(node.name);
|
|
134
|
+
return;
|
|
135
|
+
case "TemplateLiteral":
|
|
136
|
+
if (parent.expressions.includes(node)) scopeCurrent.references.add(node.name);
|
|
137
|
+
return;
|
|
138
|
+
case "AssignmentExpression":
|
|
139
|
+
if (parent.right === node) scopeCurrent.references.add(node.name);
|
|
140
|
+
return;
|
|
141
|
+
case "IfStatement":
|
|
142
|
+
case "WhileStatement":
|
|
143
|
+
case "DoWhileStatement":
|
|
144
|
+
if (parent.test === node) scopeCurrent.references.add(node.name);
|
|
145
|
+
return;
|
|
146
|
+
case "SwitchStatement":
|
|
147
|
+
if (parent.discriminant === node) scopeCurrent.references.add(node.name);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
if (parent?.type.includes("Expression")) scopeCurrent.references.add(node.name);
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
leave(node, parent, prop, index) {
|
|
154
|
+
additionalWalk?.leave?.call(this, node, parent, prop, index);
|
|
155
|
+
switch (node.type) {
|
|
156
|
+
case "BlockStatement": popScope(node);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
const unmatched = /* @__PURE__ */ new Set();
|
|
161
|
+
for (const scope of scopes) for (const name of scope.references) {
|
|
162
|
+
let defined = false;
|
|
163
|
+
let parent = scope;
|
|
164
|
+
while (parent) {
|
|
165
|
+
if (parent.declarations.has(name)) {
|
|
166
|
+
defined = true;
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
parent = parent?.parent;
|
|
170
|
+
}
|
|
171
|
+
if (!defined) unmatched.add(name);
|
|
172
|
+
}
|
|
173
|
+
return {
|
|
174
|
+
unmatched,
|
|
175
|
+
scopes
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
function createVirtualImportsAcronWalker(importMap, virtualImports = []) {
|
|
179
|
+
const imports = [];
|
|
180
|
+
const ranges = [];
|
|
181
|
+
return {
|
|
182
|
+
imports,
|
|
183
|
+
ranges,
|
|
184
|
+
walk: { enter(node) {
|
|
185
|
+
if (node.type === "ImportDeclaration") {
|
|
186
|
+
if (virtualImports.includes(node.source.value)) {
|
|
187
|
+
ranges.push([node.start, node.end]);
|
|
188
|
+
node.specifiers.forEach((i) => {
|
|
189
|
+
if (i.type === "ImportSpecifier" && i.imported.type === "Identifier") {
|
|
190
|
+
const original = importMap.get(i.imported.name);
|
|
191
|
+
if (!original) throw new Error(`[unimport] failed to find "${i.imported.name}" imported from "${node.source.value}"`);
|
|
192
|
+
imports.push({
|
|
193
|
+
from: original.from,
|
|
194
|
+
name: original.name,
|
|
195
|
+
as: i.local.name
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
} }
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
//#endregion
|
|
17
206
|
//#region node_modules/.pnpm/unplugin@2.3.11/node_modules/unplugin/dist/context-Csj9j3eN.js
|
|
18
207
|
var import_picomatch = /* @__PURE__ */ __toESM(require_picomatch(), 1);
|
|
19
208
|
function toArray$2(array) {
|
|
@@ -114,7 +303,7 @@ function normalizeObjectHook(name, hook) {
|
|
|
114
303
|
filter: filter || (() => true)
|
|
115
304
|
};
|
|
116
305
|
}
|
|
117
|
-
function parse
|
|
306
|
+
function parse(code, opts = {}) {
|
|
118
307
|
return Parser.parse(code, {
|
|
119
308
|
sourceType: "module",
|
|
120
309
|
ecmaVersion: "latest",
|
|
@@ -172,7 +361,7 @@ function createBuildContext$1(compiler, compilation, loaderContext, inputSourceM
|
|
|
172
361
|
getWatchFiles() {
|
|
173
362
|
return Array.from(compilation.fileDependencies);
|
|
174
363
|
},
|
|
175
|
-
parse
|
|
364
|
+
parse,
|
|
176
365
|
emitFile(emittedFile) {
|
|
177
366
|
const outFileName = emittedFile.fileName || emittedFile.name;
|
|
178
367
|
if (emittedFile.source && outFileName) {
|
|
@@ -202,16 +391,16 @@ function decodeVirtualModuleId(encoded, _plugin) {
|
|
|
202
391
|
function isVirtualModuleId(encoded, plugin) {
|
|
203
392
|
return dirname(encoded) === plugin.__virtualModulePrefix;
|
|
204
393
|
}
|
|
205
|
-
var FakeVirtualModulesPlugin = class FakeVirtualModulesPlugin
|
|
394
|
+
var FakeVirtualModulesPlugin = class FakeVirtualModulesPlugin {
|
|
206
395
|
name = "FakeVirtualModulesPlugin";
|
|
207
396
|
static counters = /* @__PURE__ */ new Map();
|
|
208
397
|
static initCleanup = false;
|
|
209
398
|
constructor(plugin) {
|
|
210
399
|
this.plugin = plugin;
|
|
211
|
-
if (!FakeVirtualModulesPlugin
|
|
212
|
-
FakeVirtualModulesPlugin
|
|
400
|
+
if (!FakeVirtualModulesPlugin.initCleanup) {
|
|
401
|
+
FakeVirtualModulesPlugin.initCleanup = true;
|
|
213
402
|
process.once("exit", () => {
|
|
214
|
-
FakeVirtualModulesPlugin
|
|
403
|
+
FakeVirtualModulesPlugin.counters.forEach((_, dir) => {
|
|
215
404
|
fs.rmSync(dir, {
|
|
216
405
|
recursive: true,
|
|
217
406
|
force: true
|
|
@@ -223,17 +412,17 @@ var FakeVirtualModulesPlugin = class FakeVirtualModulesPlugin$1 {
|
|
|
223
412
|
apply(compiler) {
|
|
224
413
|
const dir = this.plugin.__virtualModulePrefix;
|
|
225
414
|
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
226
|
-
const counter = FakeVirtualModulesPlugin
|
|
227
|
-
FakeVirtualModulesPlugin
|
|
415
|
+
const counter = FakeVirtualModulesPlugin.counters.get(dir) ?? 0;
|
|
416
|
+
FakeVirtualModulesPlugin.counters.set(dir, counter + 1);
|
|
228
417
|
compiler.hooks.shutdown.tap(this.name, () => {
|
|
229
|
-
const counter$1 = (FakeVirtualModulesPlugin
|
|
418
|
+
const counter$1 = (FakeVirtualModulesPlugin.counters.get(dir) ?? 1) - 1;
|
|
230
419
|
if (counter$1 === 0) {
|
|
231
|
-
FakeVirtualModulesPlugin
|
|
420
|
+
FakeVirtualModulesPlugin.counters.delete(dir);
|
|
232
421
|
fs.rmSync(dir, {
|
|
233
422
|
recursive: true,
|
|
234
423
|
force: true
|
|
235
424
|
});
|
|
236
|
-
} else FakeVirtualModulesPlugin
|
|
425
|
+
} else FakeVirtualModulesPlugin.counters.set(dir, counter$1);
|
|
237
426
|
});
|
|
238
427
|
}
|
|
239
428
|
async writeModule(file) {
|
|
@@ -259,7 +448,7 @@ function getSource(fileSource) {
|
|
|
259
448
|
}
|
|
260
449
|
function createBuildContext(options, compiler, compilation, loaderContext, inputSourceMap) {
|
|
261
450
|
return {
|
|
262
|
-
parse
|
|
451
|
+
parse,
|
|
263
452
|
addWatchFile(id) {
|
|
264
453
|
options.addWatchFile(resolve(process$1.cwd(), id));
|
|
265
454
|
},
|
|
@@ -293,565 +482,6 @@ function normalizeMessage(error) {
|
|
|
293
482
|
return err;
|
|
294
483
|
}
|
|
295
484
|
|
|
296
|
-
//#endregion
|
|
297
|
-
//#region node_modules/.pnpm/@jridgewell+resolve-uri@3.1.2/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs
|
|
298
|
-
const schemeRegex = /^[\w+.-]+:\/\//;
|
|
299
|
-
/**
|
|
300
|
-
* Matches the parts of a URL:
|
|
301
|
-
* 1. Scheme, including ":", guaranteed.
|
|
302
|
-
* 2. User/password, including "@", optional.
|
|
303
|
-
* 3. Host, guaranteed.
|
|
304
|
-
* 4. Port, including ":", optional.
|
|
305
|
-
* 5. Path, including "/", optional.
|
|
306
|
-
* 6. Query, including "?", optional.
|
|
307
|
-
* 7. Hash, including "#", optional.
|
|
308
|
-
*/
|
|
309
|
-
const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/;
|
|
310
|
-
/**
|
|
311
|
-
* File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start
|
|
312
|
-
* with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).
|
|
313
|
-
*
|
|
314
|
-
* 1. Host, optional.
|
|
315
|
-
* 2. Path, which may include "/", guaranteed.
|
|
316
|
-
* 3. Query, including "?", optional.
|
|
317
|
-
* 4. Hash, including "#", optional.
|
|
318
|
-
*/
|
|
319
|
-
const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;
|
|
320
|
-
function isAbsoluteUrl(input) {
|
|
321
|
-
return schemeRegex.test(input);
|
|
322
|
-
}
|
|
323
|
-
function isSchemeRelativeUrl(input) {
|
|
324
|
-
return input.startsWith("//");
|
|
325
|
-
}
|
|
326
|
-
function isAbsolutePath(input) {
|
|
327
|
-
return input.startsWith("/");
|
|
328
|
-
}
|
|
329
|
-
function isFileUrl(input) {
|
|
330
|
-
return input.startsWith("file:");
|
|
331
|
-
}
|
|
332
|
-
function isRelative(input) {
|
|
333
|
-
return /^[.?#]/.test(input);
|
|
334
|
-
}
|
|
335
|
-
function parseAbsoluteUrl(input) {
|
|
336
|
-
const match = urlRegex.exec(input);
|
|
337
|
-
return makeUrl(match[1], match[2] || "", match[3], match[4] || "", match[5] || "/", match[6] || "", match[7] || "");
|
|
338
|
-
}
|
|
339
|
-
function parseFileUrl(input) {
|
|
340
|
-
const match = fileRegex.exec(input);
|
|
341
|
-
const path$1 = match[2];
|
|
342
|
-
return makeUrl("file:", "", match[1] || "", "", isAbsolutePath(path$1) ? path$1 : "/" + path$1, match[3] || "", match[4] || "");
|
|
343
|
-
}
|
|
344
|
-
function makeUrl(scheme, user, host, port, path$1, query, hash) {
|
|
345
|
-
return {
|
|
346
|
-
scheme,
|
|
347
|
-
user,
|
|
348
|
-
host,
|
|
349
|
-
port,
|
|
350
|
-
path: path$1,
|
|
351
|
-
query,
|
|
352
|
-
hash,
|
|
353
|
-
type: 7
|
|
354
|
-
};
|
|
355
|
-
}
|
|
356
|
-
function parseUrl(input) {
|
|
357
|
-
if (isSchemeRelativeUrl(input)) {
|
|
358
|
-
const url$1 = parseAbsoluteUrl("http:" + input);
|
|
359
|
-
url$1.scheme = "";
|
|
360
|
-
url$1.type = 6;
|
|
361
|
-
return url$1;
|
|
362
|
-
}
|
|
363
|
-
if (isAbsolutePath(input)) {
|
|
364
|
-
const url$1 = parseAbsoluteUrl("http://foo.com" + input);
|
|
365
|
-
url$1.scheme = "";
|
|
366
|
-
url$1.host = "";
|
|
367
|
-
url$1.type = 5;
|
|
368
|
-
return url$1;
|
|
369
|
-
}
|
|
370
|
-
if (isFileUrl(input)) return parseFileUrl(input);
|
|
371
|
-
if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);
|
|
372
|
-
const url = parseAbsoluteUrl("http://foo.com/" + input);
|
|
373
|
-
url.scheme = "";
|
|
374
|
-
url.host = "";
|
|
375
|
-
url.type = input ? input.startsWith("?") ? 3 : input.startsWith("#") ? 2 : 4 : 1;
|
|
376
|
-
return url;
|
|
377
|
-
}
|
|
378
|
-
function stripPathFilename(path$1) {
|
|
379
|
-
if (path$1.endsWith("/..")) return path$1;
|
|
380
|
-
const index = path$1.lastIndexOf("/");
|
|
381
|
-
return path$1.slice(0, index + 1);
|
|
382
|
-
}
|
|
383
|
-
function mergePaths(url, base) {
|
|
384
|
-
normalizePath$1(base, base.type);
|
|
385
|
-
if (url.path === "/") url.path = base.path;
|
|
386
|
-
else url.path = stripPathFilename(base.path) + url.path;
|
|
387
|
-
}
|
|
388
|
-
/**
|
|
389
|
-
* The path can have empty directories "//", unneeded parents "foo/..", or current directory
|
|
390
|
-
* "foo/.". We need to normalize to a standard representation.
|
|
391
|
-
*/
|
|
392
|
-
function normalizePath$1(url, type$1) {
|
|
393
|
-
const rel = type$1 <= 4;
|
|
394
|
-
const pieces = url.path.split("/");
|
|
395
|
-
let pointer = 1;
|
|
396
|
-
let positive = 0;
|
|
397
|
-
let addTrailingSlash = false;
|
|
398
|
-
for (let i = 1; i < pieces.length; i++) {
|
|
399
|
-
const piece = pieces[i];
|
|
400
|
-
if (!piece) {
|
|
401
|
-
addTrailingSlash = true;
|
|
402
|
-
continue;
|
|
403
|
-
}
|
|
404
|
-
addTrailingSlash = false;
|
|
405
|
-
if (piece === ".") continue;
|
|
406
|
-
if (piece === "..") {
|
|
407
|
-
if (positive) {
|
|
408
|
-
addTrailingSlash = true;
|
|
409
|
-
positive--;
|
|
410
|
-
pointer--;
|
|
411
|
-
} else if (rel) pieces[pointer++] = piece;
|
|
412
|
-
continue;
|
|
413
|
-
}
|
|
414
|
-
pieces[pointer++] = piece;
|
|
415
|
-
positive++;
|
|
416
|
-
}
|
|
417
|
-
let path$1 = "";
|
|
418
|
-
for (let i = 1; i < pointer; i++) path$1 += "/" + pieces[i];
|
|
419
|
-
if (!path$1 || addTrailingSlash && !path$1.endsWith("/..")) path$1 += "/";
|
|
420
|
-
url.path = path$1;
|
|
421
|
-
}
|
|
422
|
-
/**
|
|
423
|
-
* Attempts to resolve `input` URL/path relative to `base`.
|
|
424
|
-
*/
|
|
425
|
-
function resolve$1(input, base) {
|
|
426
|
-
if (!input && !base) return "";
|
|
427
|
-
const url = parseUrl(input);
|
|
428
|
-
let inputType = url.type;
|
|
429
|
-
if (base && inputType !== 7) {
|
|
430
|
-
const baseUrl = parseUrl(base);
|
|
431
|
-
const baseType = baseUrl.type;
|
|
432
|
-
switch (inputType) {
|
|
433
|
-
case 1: url.hash = baseUrl.hash;
|
|
434
|
-
case 2: url.query = baseUrl.query;
|
|
435
|
-
case 3:
|
|
436
|
-
case 4: mergePaths(url, baseUrl);
|
|
437
|
-
case 5:
|
|
438
|
-
url.user = baseUrl.user;
|
|
439
|
-
url.host = baseUrl.host;
|
|
440
|
-
url.port = baseUrl.port;
|
|
441
|
-
case 6: url.scheme = baseUrl.scheme;
|
|
442
|
-
}
|
|
443
|
-
if (baseType > inputType) inputType = baseType;
|
|
444
|
-
}
|
|
445
|
-
normalizePath$1(url, inputType);
|
|
446
|
-
const queryHash = url.query + url.hash;
|
|
447
|
-
switch (inputType) {
|
|
448
|
-
case 2:
|
|
449
|
-
case 3: return queryHash;
|
|
450
|
-
case 4: {
|
|
451
|
-
const path$1 = url.path.slice(1);
|
|
452
|
-
if (!path$1) return queryHash || ".";
|
|
453
|
-
if (isRelative(base || input) && !isRelative(path$1)) return "./" + path$1 + queryHash;
|
|
454
|
-
return path$1 + queryHash;
|
|
455
|
-
}
|
|
456
|
-
case 5: return url.path + queryHash;
|
|
457
|
-
default: return url.scheme + "//" + url.user + url.host + url.port + url.path + queryHash;
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
//#endregion
|
|
462
|
-
//#region node_modules/.pnpm/@jridgewell+trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs
|
|
463
|
-
function stripFilename(path$1) {
|
|
464
|
-
if (!path$1) return "";
|
|
465
|
-
const index = path$1.lastIndexOf("/");
|
|
466
|
-
return path$1.slice(0, index + 1);
|
|
467
|
-
}
|
|
468
|
-
function resolver(mapUrl, sourceRoot) {
|
|
469
|
-
const from = stripFilename(mapUrl);
|
|
470
|
-
const prefix = sourceRoot ? sourceRoot + "/" : "";
|
|
471
|
-
return (source) => resolve$1(prefix + (source || ""), from);
|
|
472
|
-
}
|
|
473
|
-
var COLUMN$1 = 0;
|
|
474
|
-
function maybeSort(mappings, owned) {
|
|
475
|
-
const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);
|
|
476
|
-
if (unsortedIndex === mappings.length) return mappings;
|
|
477
|
-
if (!owned) mappings = mappings.slice();
|
|
478
|
-
for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) mappings[i] = sortSegments(mappings[i], owned);
|
|
479
|
-
return mappings;
|
|
480
|
-
}
|
|
481
|
-
function nextUnsortedSegmentLine(mappings, start) {
|
|
482
|
-
for (let i = start; i < mappings.length; i++) if (!isSorted(mappings[i])) return i;
|
|
483
|
-
return mappings.length;
|
|
484
|
-
}
|
|
485
|
-
function isSorted(line) {
|
|
486
|
-
for (let j = 1; j < line.length; j++) if (line[j][COLUMN$1] < line[j - 1][COLUMN$1]) return false;
|
|
487
|
-
return true;
|
|
488
|
-
}
|
|
489
|
-
function sortSegments(line, owned) {
|
|
490
|
-
if (!owned) line = line.slice();
|
|
491
|
-
return line.sort(sortComparator);
|
|
492
|
-
}
|
|
493
|
-
function sortComparator(a, b) {
|
|
494
|
-
return a[COLUMN$1] - b[COLUMN$1];
|
|
495
|
-
}
|
|
496
|
-
var found = false;
|
|
497
|
-
function binarySearch(haystack, needle, low, high) {
|
|
498
|
-
while (low <= high) {
|
|
499
|
-
const mid = low + (high - low >> 1);
|
|
500
|
-
const cmp = haystack[mid][COLUMN$1] - needle;
|
|
501
|
-
if (cmp === 0) {
|
|
502
|
-
found = true;
|
|
503
|
-
return mid;
|
|
504
|
-
}
|
|
505
|
-
if (cmp < 0) low = mid + 1;
|
|
506
|
-
else high = mid - 1;
|
|
507
|
-
}
|
|
508
|
-
found = false;
|
|
509
|
-
return low - 1;
|
|
510
|
-
}
|
|
511
|
-
function upperBound(haystack, needle, index) {
|
|
512
|
-
for (let i = index + 1; i < haystack.length; index = i++) if (haystack[i][COLUMN$1] !== needle) break;
|
|
513
|
-
return index;
|
|
514
|
-
}
|
|
515
|
-
function lowerBound(haystack, needle, index) {
|
|
516
|
-
for (let i = index - 1; i >= 0; index = i--) if (haystack[i][COLUMN$1] !== needle) break;
|
|
517
|
-
return index;
|
|
518
|
-
}
|
|
519
|
-
function memoizedState() {
|
|
520
|
-
return {
|
|
521
|
-
lastKey: -1,
|
|
522
|
-
lastNeedle: -1,
|
|
523
|
-
lastIndex: -1
|
|
524
|
-
};
|
|
525
|
-
}
|
|
526
|
-
function memoizedBinarySearch(haystack, needle, state, key) {
|
|
527
|
-
const { lastKey, lastNeedle, lastIndex } = state;
|
|
528
|
-
let low = 0;
|
|
529
|
-
let high = haystack.length - 1;
|
|
530
|
-
if (key === lastKey) {
|
|
531
|
-
if (needle === lastNeedle) {
|
|
532
|
-
found = lastIndex !== -1 && haystack[lastIndex][COLUMN$1] === needle;
|
|
533
|
-
return lastIndex;
|
|
534
|
-
}
|
|
535
|
-
if (needle >= lastNeedle) low = lastIndex === -1 ? 0 : lastIndex;
|
|
536
|
-
else high = lastIndex;
|
|
537
|
-
}
|
|
538
|
-
state.lastKey = key;
|
|
539
|
-
state.lastNeedle = needle;
|
|
540
|
-
return state.lastIndex = binarySearch(haystack, needle, low, high);
|
|
541
|
-
}
|
|
542
|
-
function parse(map) {
|
|
543
|
-
return typeof map === "string" ? JSON.parse(map) : map;
|
|
544
|
-
}
|
|
545
|
-
var LEAST_UPPER_BOUND = -1;
|
|
546
|
-
var GREATEST_LOWER_BOUND = 1;
|
|
547
|
-
var TraceMap = class {
|
|
548
|
-
constructor(map, mapUrl) {
|
|
549
|
-
const isString$1 = typeof map === "string";
|
|
550
|
-
if (!isString$1 && map._decodedMemo) return map;
|
|
551
|
-
const parsed = parse(map);
|
|
552
|
-
const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;
|
|
553
|
-
this.version = version;
|
|
554
|
-
this.file = file;
|
|
555
|
-
this.names = names || [];
|
|
556
|
-
this.sourceRoot = sourceRoot;
|
|
557
|
-
this.sources = sources;
|
|
558
|
-
this.sourcesContent = sourcesContent;
|
|
559
|
-
this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0;
|
|
560
|
-
const resolve$3 = resolver(mapUrl, sourceRoot);
|
|
561
|
-
this.resolvedSources = sources.map(resolve$3);
|
|
562
|
-
const { mappings } = parsed;
|
|
563
|
-
if (typeof mappings === "string") {
|
|
564
|
-
this._encoded = mappings;
|
|
565
|
-
this._decoded = void 0;
|
|
566
|
-
} else if (Array.isArray(mappings)) {
|
|
567
|
-
this._encoded = void 0;
|
|
568
|
-
this._decoded = maybeSort(mappings, isString$1);
|
|
569
|
-
} else if (parsed.sections) throw new Error(`TraceMap passed sectioned source map, please use FlattenMap export instead`);
|
|
570
|
-
else throw new Error(`invalid source map: ${JSON.stringify(parsed)}`);
|
|
571
|
-
this._decodedMemo = memoizedState();
|
|
572
|
-
this._bySources = void 0;
|
|
573
|
-
this._bySourceMemos = void 0;
|
|
574
|
-
}
|
|
575
|
-
};
|
|
576
|
-
function cast$1(map) {
|
|
577
|
-
return map;
|
|
578
|
-
}
|
|
579
|
-
function decodedMappings(map) {
|
|
580
|
-
var _a;
|
|
581
|
-
return (_a = cast$1(map))._decoded || (_a._decoded = decode(cast$1(map)._encoded));
|
|
582
|
-
}
|
|
583
|
-
function traceSegment(map, line, column) {
|
|
584
|
-
const decoded = decodedMappings(map);
|
|
585
|
-
if (line >= decoded.length) return null;
|
|
586
|
-
const segments = decoded[line];
|
|
587
|
-
const index = traceSegmentInternal(segments, cast$1(map)._decodedMemo, line, column, GREATEST_LOWER_BOUND);
|
|
588
|
-
return index === -1 ? null : segments[index];
|
|
589
|
-
}
|
|
590
|
-
function traceSegmentInternal(segments, memo, line, column, bias) {
|
|
591
|
-
let index = memoizedBinarySearch(segments, column, memo, line);
|
|
592
|
-
if (found) index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index);
|
|
593
|
-
else if (bias === LEAST_UPPER_BOUND) index++;
|
|
594
|
-
if (index === -1 || index === segments.length) return -1;
|
|
595
|
-
return index;
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
//#endregion
|
|
599
|
-
//#region node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs
|
|
600
|
-
var SetArray = class {
|
|
601
|
-
constructor() {
|
|
602
|
-
this._indexes = { __proto__: null };
|
|
603
|
-
this.array = [];
|
|
604
|
-
}
|
|
605
|
-
};
|
|
606
|
-
function cast(set) {
|
|
607
|
-
return set;
|
|
608
|
-
}
|
|
609
|
-
function get(setarr, key) {
|
|
610
|
-
return cast(setarr)._indexes[key];
|
|
611
|
-
}
|
|
612
|
-
function put(setarr, key) {
|
|
613
|
-
const index = get(setarr, key);
|
|
614
|
-
if (index !== void 0) return index;
|
|
615
|
-
const { array, _indexes: indexes } = cast(setarr);
|
|
616
|
-
return indexes[key] = array.push(key) - 1;
|
|
617
|
-
}
|
|
618
|
-
function remove(setarr, key) {
|
|
619
|
-
const index = get(setarr, key);
|
|
620
|
-
if (index === void 0) return;
|
|
621
|
-
const { array, _indexes: indexes } = cast(setarr);
|
|
622
|
-
for (let i = index + 1; i < array.length; i++) {
|
|
623
|
-
const k = array[i];
|
|
624
|
-
array[i - 1] = k;
|
|
625
|
-
indexes[k]--;
|
|
626
|
-
}
|
|
627
|
-
indexes[key] = void 0;
|
|
628
|
-
array.pop();
|
|
629
|
-
}
|
|
630
|
-
var COLUMN = 0;
|
|
631
|
-
var SOURCES_INDEX = 1;
|
|
632
|
-
var SOURCE_LINE = 2;
|
|
633
|
-
var SOURCE_COLUMN = 3;
|
|
634
|
-
var NAMES_INDEX = 4;
|
|
635
|
-
var NO_NAME = -1;
|
|
636
|
-
var GenMapping = class {
|
|
637
|
-
constructor({ file, sourceRoot } = {}) {
|
|
638
|
-
this._names = new SetArray();
|
|
639
|
-
this._sources = new SetArray();
|
|
640
|
-
this._sourcesContent = [];
|
|
641
|
-
this._mappings = [];
|
|
642
|
-
this.file = file;
|
|
643
|
-
this.sourceRoot = sourceRoot;
|
|
644
|
-
this._ignoreList = new SetArray();
|
|
645
|
-
}
|
|
646
|
-
};
|
|
647
|
-
function cast2(map) {
|
|
648
|
-
return map;
|
|
649
|
-
}
|
|
650
|
-
var maybeAddSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => {
|
|
651
|
-
return addSegmentInternal(true, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content);
|
|
652
|
-
};
|
|
653
|
-
function setSourceContent(map, source, content) {
|
|
654
|
-
const { _sources: sources, _sourcesContent: sourcesContent } = cast2(map);
|
|
655
|
-
const index = put(sources, source);
|
|
656
|
-
sourcesContent[index] = content;
|
|
657
|
-
}
|
|
658
|
-
function setIgnore(map, source, ignore = true) {
|
|
659
|
-
const { _sources: sources, _sourcesContent: sourcesContent, _ignoreList: ignoreList } = cast2(map);
|
|
660
|
-
const index = put(sources, source);
|
|
661
|
-
if (index === sourcesContent.length) sourcesContent[index] = null;
|
|
662
|
-
if (ignore) put(ignoreList, index);
|
|
663
|
-
else remove(ignoreList, index);
|
|
664
|
-
}
|
|
665
|
-
function toDecodedMap(map) {
|
|
666
|
-
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, _ignoreList: ignoreList } = cast2(map);
|
|
667
|
-
removeEmptyFinalLines(mappings);
|
|
668
|
-
return {
|
|
669
|
-
version: 3,
|
|
670
|
-
file: map.file || void 0,
|
|
671
|
-
names: names.array,
|
|
672
|
-
sourceRoot: map.sourceRoot || void 0,
|
|
673
|
-
sources: sources.array,
|
|
674
|
-
sourcesContent,
|
|
675
|
-
mappings,
|
|
676
|
-
ignoreList: ignoreList.array
|
|
677
|
-
};
|
|
678
|
-
}
|
|
679
|
-
function toEncodedMap(map) {
|
|
680
|
-
const decoded = toDecodedMap(map);
|
|
681
|
-
return Object.assign({}, decoded, { mappings: encode(decoded.mappings) });
|
|
682
|
-
}
|
|
683
|
-
function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {
|
|
684
|
-
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names } = cast2(map);
|
|
685
|
-
const line = getIndex(mappings, genLine);
|
|
686
|
-
const index = getColumnIndex(line, genColumn);
|
|
687
|
-
if (!source) {
|
|
688
|
-
if (skipable && skipSourceless(line, index)) return;
|
|
689
|
-
return insert(line, index, [genColumn]);
|
|
690
|
-
}
|
|
691
|
-
assert(sourceLine);
|
|
692
|
-
assert(sourceColumn);
|
|
693
|
-
const sourcesIndex = put(sources, source);
|
|
694
|
-
const namesIndex = name ? put(names, name) : NO_NAME;
|
|
695
|
-
if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content != null ? content : null;
|
|
696
|
-
if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) return;
|
|
697
|
-
return insert(line, index, name ? [
|
|
698
|
-
genColumn,
|
|
699
|
-
sourcesIndex,
|
|
700
|
-
sourceLine,
|
|
701
|
-
sourceColumn,
|
|
702
|
-
namesIndex
|
|
703
|
-
] : [
|
|
704
|
-
genColumn,
|
|
705
|
-
sourcesIndex,
|
|
706
|
-
sourceLine,
|
|
707
|
-
sourceColumn
|
|
708
|
-
]);
|
|
709
|
-
}
|
|
710
|
-
function assert(_val) {}
|
|
711
|
-
function getIndex(arr, index) {
|
|
712
|
-
for (let i = arr.length; i <= index; i++) arr[i] = [];
|
|
713
|
-
return arr[index];
|
|
714
|
-
}
|
|
715
|
-
function getColumnIndex(line, genColumn) {
|
|
716
|
-
let index = line.length;
|
|
717
|
-
for (let i = index - 1; i >= 0; index = i--) if (genColumn >= line[i][COLUMN]) break;
|
|
718
|
-
return index;
|
|
719
|
-
}
|
|
720
|
-
function insert(array, index, value) {
|
|
721
|
-
for (let i = array.length; i > index; i--) array[i] = array[i - 1];
|
|
722
|
-
array[index] = value;
|
|
723
|
-
}
|
|
724
|
-
function removeEmptyFinalLines(mappings) {
|
|
725
|
-
const { length } = mappings;
|
|
726
|
-
let len = length;
|
|
727
|
-
for (let i = len - 1; i >= 0; len = i, i--) if (mappings[i].length > 0) break;
|
|
728
|
-
if (len < length) mappings.length = len;
|
|
729
|
-
}
|
|
730
|
-
function skipSourceless(line, index) {
|
|
731
|
-
if (index === 0) return true;
|
|
732
|
-
return line[index - 1].length === 1;
|
|
733
|
-
}
|
|
734
|
-
function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) {
|
|
735
|
-
if (index === 0) return false;
|
|
736
|
-
const prev = line[index - 1];
|
|
737
|
-
if (prev.length === 1) return false;
|
|
738
|
-
return sourcesIndex === prev[SOURCES_INDEX] && sourceLine === prev[SOURCE_LINE] && sourceColumn === prev[SOURCE_COLUMN] && namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME);
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
//#endregion
|
|
742
|
-
//#region node_modules/.pnpm/@jridgewell+remapping@2.3.5/node_modules/@jridgewell/remapping/dist/remapping.mjs
|
|
743
|
-
var SOURCELESS_MAPPING = /* @__PURE__ */ SegmentObject("", -1, -1, "", null, false);
|
|
744
|
-
var EMPTY_SOURCES = [];
|
|
745
|
-
function SegmentObject(source, line, column, name, content, ignore) {
|
|
746
|
-
return {
|
|
747
|
-
source,
|
|
748
|
-
line,
|
|
749
|
-
column,
|
|
750
|
-
name,
|
|
751
|
-
content,
|
|
752
|
-
ignore
|
|
753
|
-
};
|
|
754
|
-
}
|
|
755
|
-
function Source(map, sources, source, content, ignore) {
|
|
756
|
-
return {
|
|
757
|
-
map,
|
|
758
|
-
sources,
|
|
759
|
-
source,
|
|
760
|
-
content,
|
|
761
|
-
ignore
|
|
762
|
-
};
|
|
763
|
-
}
|
|
764
|
-
function MapSource(map, sources) {
|
|
765
|
-
return Source(map, sources, "", null, false);
|
|
766
|
-
}
|
|
767
|
-
function OriginalSource(source, content, ignore) {
|
|
768
|
-
return Source(null, EMPTY_SOURCES, source, content, ignore);
|
|
769
|
-
}
|
|
770
|
-
function traceMappings(tree) {
|
|
771
|
-
const gen = new GenMapping({ file: tree.map.file });
|
|
772
|
-
const { sources: rootSources, map } = tree;
|
|
773
|
-
const rootNames = map.names;
|
|
774
|
-
const rootMappings = decodedMappings(map);
|
|
775
|
-
for (let i = 0; i < rootMappings.length; i++) {
|
|
776
|
-
const segments = rootMappings[i];
|
|
777
|
-
for (let j = 0; j < segments.length; j++) {
|
|
778
|
-
const segment = segments[j];
|
|
779
|
-
const genCol = segment[0];
|
|
780
|
-
let traced = SOURCELESS_MAPPING;
|
|
781
|
-
if (segment.length !== 1) {
|
|
782
|
-
const source2 = rootSources[segment[1]];
|
|
783
|
-
traced = originalPositionFor(source2, segment[2], segment[3], segment.length === 5 ? rootNames[segment[4]] : "");
|
|
784
|
-
if (traced == null) continue;
|
|
785
|
-
}
|
|
786
|
-
const { column, line, name, content, source, ignore } = traced;
|
|
787
|
-
maybeAddSegment(gen, i, genCol, source, line, column, name);
|
|
788
|
-
if (source && content != null) setSourceContent(gen, source, content);
|
|
789
|
-
if (ignore) setIgnore(gen, source, true);
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
return gen;
|
|
793
|
-
}
|
|
794
|
-
function originalPositionFor(source, line, column, name) {
|
|
795
|
-
if (!source.map) return SegmentObject(source.source, line, column, name, source.content, source.ignore);
|
|
796
|
-
const segment = traceSegment(source.map, line, column);
|
|
797
|
-
if (segment == null) return null;
|
|
798
|
-
if (segment.length === 1) return SOURCELESS_MAPPING;
|
|
799
|
-
return originalPositionFor(source.sources[segment[1]], segment[2], segment[3], segment.length === 5 ? source.map.names[segment[4]] : name);
|
|
800
|
-
}
|
|
801
|
-
function asArray(value) {
|
|
802
|
-
if (Array.isArray(value)) return value;
|
|
803
|
-
return [value];
|
|
804
|
-
}
|
|
805
|
-
function buildSourceMapTree(input, loader) {
|
|
806
|
-
const maps = asArray(input).map((m) => new TraceMap(m, ""));
|
|
807
|
-
const map = maps.pop();
|
|
808
|
-
for (let i = 0; i < maps.length; i++) if (maps[i].sources.length > 1) throw new Error(`Transformation map ${i} must have exactly one source file.
|
|
809
|
-
Did you specify these with the most recent transformation maps first?`);
|
|
810
|
-
let tree = build(map, loader, "", 0);
|
|
811
|
-
for (let i = maps.length - 1; i >= 0; i--) tree = MapSource(maps[i], [tree]);
|
|
812
|
-
return tree;
|
|
813
|
-
}
|
|
814
|
-
function build(map, loader, importer, importerDepth) {
|
|
815
|
-
const { resolvedSources, sourcesContent, ignoreList } = map;
|
|
816
|
-
const depth = importerDepth + 1;
|
|
817
|
-
return MapSource(map, resolvedSources.map((sourceFile, i) => {
|
|
818
|
-
const ctx = {
|
|
819
|
-
importer,
|
|
820
|
-
depth,
|
|
821
|
-
source: sourceFile || "",
|
|
822
|
-
content: void 0,
|
|
823
|
-
ignore: void 0
|
|
824
|
-
};
|
|
825
|
-
const sourceMap = loader(ctx.source, ctx);
|
|
826
|
-
const { source, content, ignore } = ctx;
|
|
827
|
-
if (sourceMap) return build(new TraceMap(sourceMap, source), loader, source, depth);
|
|
828
|
-
return OriginalSource(source, content !== void 0 ? content : sourcesContent ? sourcesContent[i] : null, ignore !== void 0 ? ignore : ignoreList ? ignoreList.includes(i) : false);
|
|
829
|
-
}));
|
|
830
|
-
}
|
|
831
|
-
var SourceMap = class {
|
|
832
|
-
constructor(map, options) {
|
|
833
|
-
const out = options.decodedMappings ? toDecodedMap(map) : toEncodedMap(map);
|
|
834
|
-
this.version = out.version;
|
|
835
|
-
this.file = out.file;
|
|
836
|
-
this.mappings = out.mappings;
|
|
837
|
-
this.names = out.names;
|
|
838
|
-
this.ignoreList = out.ignoreList;
|
|
839
|
-
this.sourceRoot = out.sourceRoot;
|
|
840
|
-
this.sources = out.sources;
|
|
841
|
-
if (!options.excludeContent) this.sourcesContent = out.sourcesContent;
|
|
842
|
-
}
|
|
843
|
-
toString() {
|
|
844
|
-
return JSON.stringify(this);
|
|
845
|
-
}
|
|
846
|
-
};
|
|
847
|
-
function remapping(input, loader, options) {
|
|
848
|
-
const opts = typeof options === "object" ? options : {
|
|
849
|
-
excludeContent: !!options,
|
|
850
|
-
decodedMappings: false
|
|
851
|
-
};
|
|
852
|
-
return new SourceMap(traceMappings(buildSourceMapTree(input, loader)), opts);
|
|
853
|
-
}
|
|
854
|
-
|
|
855
485
|
//#endregion
|
|
856
486
|
//#region node_modules/.pnpm/webpack-virtual-modules@0.6.2/node_modules/webpack-virtual-modules/lib/virtual-stats.js
|
|
857
487
|
var require_virtual_stats = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -1182,11 +812,11 @@ function combineSourcemaps(filename, sourcemapList) {
|
|
|
1182
812
|
if (!map.file) delete map.file;
|
|
1183
813
|
return map;
|
|
1184
814
|
}
|
|
1185
|
-
function createBuildContext$2(build
|
|
815
|
+
function createBuildContext$2(build) {
|
|
1186
816
|
const watchFiles = [];
|
|
1187
|
-
const { initialOptions } = build
|
|
817
|
+
const { initialOptions } = build;
|
|
1188
818
|
return {
|
|
1189
|
-
parse
|
|
819
|
+
parse,
|
|
1190
820
|
addWatchFile() {
|
|
1191
821
|
throw new Error("unplugin/esbuild: addWatchFile outside supported hooks (resolveId, load, transform)");
|
|
1192
822
|
},
|
|
@@ -1205,7 +835,7 @@ function createBuildContext$2(build$1) {
|
|
|
1205
835
|
getNativeBuildContext() {
|
|
1206
836
|
return {
|
|
1207
837
|
framework: "esbuild",
|
|
1208
|
-
build
|
|
838
|
+
build
|
|
1209
839
|
};
|
|
1210
840
|
}
|
|
1211
841
|
};
|
|
@@ -1260,13 +890,13 @@ function getEsbuildPlugin(factory) {
|
|
|
1260
890
|
return (userOptions) => {
|
|
1261
891
|
const meta = { framework: "esbuild" };
|
|
1262
892
|
const plugins = toArray$2(factory(userOptions, meta));
|
|
1263
|
-
const setupPlugins = async (build
|
|
893
|
+
const setupPlugins = async (build) => {
|
|
1264
894
|
const setup = buildSetup();
|
|
1265
895
|
const loaders = [];
|
|
1266
896
|
for (const plugin of plugins) {
|
|
1267
897
|
const loader = {};
|
|
1268
898
|
await setup(plugin)({
|
|
1269
|
-
...build
|
|
899
|
+
...build,
|
|
1270
900
|
onLoad(_options, callback) {
|
|
1271
901
|
loader.options = _options;
|
|
1272
902
|
loader.onLoadCb = callback;
|
|
@@ -1275,10 +905,10 @@ function getEsbuildPlugin(factory) {
|
|
|
1275
905
|
loader.options ||= _options;
|
|
1276
906
|
loader.onTransformCb = callback;
|
|
1277
907
|
}
|
|
1278
|
-
}, build
|
|
908
|
+
}, build);
|
|
1279
909
|
if (loader.onLoadCb || loader.onTransformCb) loaders.push(loader);
|
|
1280
910
|
}
|
|
1281
|
-
if (loaders.length) build
|
|
911
|
+
if (loaders.length) build.onLoad(loaders.length === 1 ? loaders[0].options : { filter: /.*/ }, async (args) => {
|
|
1282
912
|
function checkFilter(options) {
|
|
1283
913
|
return loaders.length === 1 || !options?.filter || options.filter.test(args.path);
|
|
1284
914
|
}
|
|
@@ -1315,9 +945,9 @@ function getEsbuildPlugin(factory) {
|
|
|
1315
945
|
}
|
|
1316
946
|
function buildSetup() {
|
|
1317
947
|
return (plugin) => {
|
|
1318
|
-
return (build
|
|
948
|
+
return (build, rawBuild) => {
|
|
1319
949
|
const context = createBuildContext$2(rawBuild);
|
|
1320
|
-
const { onStart, onEnd, onResolve, onLoad, onTransform, initialOptions } = build
|
|
950
|
+
const { onStart, onEnd, onResolve, onLoad, onTransform, initialOptions } = build;
|
|
1321
951
|
const onResolveFilter = plugin.esbuild?.onResolveFilter ?? /.*/;
|
|
1322
952
|
const onLoadFilter = plugin.esbuild?.onLoadFilter ?? /.*/;
|
|
1323
953
|
const loader = plugin.esbuild?.loader ?? guessLoader;
|
|
@@ -1412,7 +1042,7 @@ function buildSetup() {
|
|
|
1412
1042
|
}
|
|
1413
1043
|
function createFarmContext(context, currentResolveId) {
|
|
1414
1044
|
return {
|
|
1415
|
-
parse
|
|
1045
|
+
parse,
|
|
1416
1046
|
addWatchFile(id) {
|
|
1417
1047
|
context.addWatchFile(id, currentResolveId || id);
|
|
1418
1048
|
},
|
|
@@ -1918,9 +1548,9 @@ function getWebpackPlugin(factory) {
|
|
|
1918
1548
|
const vfsModules = /* @__PURE__ */ new Set();
|
|
1919
1549
|
plugin.__vfsModules = vfsModules;
|
|
1920
1550
|
plugin.__vfs = vfs;
|
|
1921
|
-
const resolverPlugin = { apply(resolver
|
|
1922
|
-
const target = resolver
|
|
1923
|
-
resolver
|
|
1551
|
+
const resolverPlugin = { apply(resolver) {
|
|
1552
|
+
const target = resolver.ensureHook("resolve");
|
|
1553
|
+
resolver.getHook("resolve").tapAsync(plugin.name, async (request, resolveContext, callback) => {
|
|
1924
1554
|
if (!request.request) return callback();
|
|
1925
1555
|
if (normalizeAbsolutePath(request.request).startsWith(plugin.__virtualModulePrefix)) return callback();
|
|
1926
1556
|
const id = normalizeAbsolutePath(request.request);
|
|
@@ -1969,7 +1599,7 @@ function getWebpackPlugin(factory) {
|
|
|
1969
1599
|
...request,
|
|
1970
1600
|
request: resolved
|
|
1971
1601
|
};
|
|
1972
|
-
resolver
|
|
1602
|
+
resolver.doResolve(target, newRequest, null, resolveContext, callback);
|
|
1973
1603
|
});
|
|
1974
1604
|
} };
|
|
1975
1605
|
compiler.options.resolve.plugins = compiler.options.resolve.plugins || [];
|
|
@@ -2069,7 +1699,7 @@ function toArray$1(thing) {
|
|
|
2069
1699
|
const escapeMark = "[_#EsCaPe#_]";
|
|
2070
1700
|
function getMatcherString(id, resolutionBase) {
|
|
2071
1701
|
if (resolutionBase === false || isAbsolute$2(id) || id.startsWith("**")) return normalizePath(id);
|
|
2072
|
-
return join$1(normalizePath(resolve$
|
|
1702
|
+
return join$1(normalizePath(resolve$1(resolutionBase || "")).replaceAll(/[-^$*+?.()|[\]{}]/g, `${escapeMark}$&`), normalizePath(id)).replaceAll(escapeMark, "\\");
|
|
2073
1703
|
}
|
|
2074
1704
|
/**
|
|
2075
1705
|
* Constructs a filter function which can be used to determine whether or not
|
|
@@ -2109,6 +1739,11 @@ function createFilter(include, exclude, options) {
|
|
|
2109
1739
|
|
|
2110
1740
|
//#endregion
|
|
2111
1741
|
//#region node_modules/.pnpm/unimport@5.6.0/node_modules/unimport/dist/unplugin.mjs
|
|
1742
|
+
var unplugin_exports = /* @__PURE__ */ __exportAll({
|
|
1743
|
+
default: () => unplugin,
|
|
1744
|
+
defaultExcludes: () => defaultExcludes,
|
|
1745
|
+
defaultIncludes: () => defaultIncludes
|
|
1746
|
+
});
|
|
2112
1747
|
const defaultIncludes = [
|
|
2113
1748
|
/\.[jt]sx?$/,
|
|
2114
1749
|
/\.vue$/,
|
|
@@ -2147,4 +1782,4 @@ const unplugin = createUnplugin((options = {}) => {
|
|
|
2147
1782
|
});
|
|
2148
1783
|
|
|
2149
1784
|
//#endregion
|
|
2150
|
-
export {
|
|
1785
|
+
export { detect_acorn_exports as n, unplugin_exports as t };
|