@storybook/react 10.5.0-alpha.5 → 10.5.0-alpha.7
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/_browser-chunks/{chunk-L3JF7GGZ.js → chunk-3HUEQMBJ.js} +1 -1
- package/dist/_browser-chunks/{chunk-SKX2IJJR.js → chunk-4GJ4IH3W.js} +3 -3
- package/dist/_browser-chunks/{chunk-K2MYE2K3.js → chunk-5GZAZJC7.js} +5 -10
- package/dist/_browser-chunks/{chunk-GOMPYXOS.js → chunk-B3FR4PBN.js} +6 -6
- package/dist/_browser-chunks/{chunk-SL3VIQZ3.js → chunk-UAWMPV5J.js} +5 -1
- package/dist/_browser-chunks/{chunk-JQJMT7FV.js → chunk-WP3KE75H.js} +2 -2
- package/dist/entry-preview-argtypes.js +3 -3
- package/dist/entry-preview-docs.js +3 -3
- package/dist/entry-preview-rsc.js +1 -1
- package/dist/entry-preview.js +2 -2
- package/dist/index.js +6 -6
- package/dist/playwright.js +1 -1
- package/dist/preset.js +646 -623
- package/dist/preview.js +6 -6
- package/package.json +4 -3
package/dist/preset.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_k4x5zyjr6vp from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_k4x5zyjr6vp from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_k4x5zyjr6vp from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_k4x5zyjr6vp.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_k4x5zyjr6vp.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_k4x5zyjr6vp.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -20,11 +20,20 @@ var __require = /* @__PURE__ */ ((x) => typeof require < "u" ? require : typeof
|
|
|
20
20
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
21
21
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
22
22
|
});
|
|
23
|
-
var __esm = (fn, res) => function() {
|
|
24
|
-
|
|
23
|
+
var __esm = (fn, res, err) => function() {
|
|
24
|
+
if (err) throw err[0];
|
|
25
|
+
try {
|
|
26
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
27
|
+
} catch (e) {
|
|
28
|
+
throw err = [e], e;
|
|
29
|
+
}
|
|
25
30
|
};
|
|
26
31
|
var __commonJS = (cb, mod) => function() {
|
|
27
|
-
|
|
32
|
+
try {
|
|
33
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
34
|
+
} catch (e) {
|
|
35
|
+
throw mod = 0, e;
|
|
36
|
+
}
|
|
28
37
|
};
|
|
29
38
|
var __export = (target, all) => {
|
|
30
39
|
for (var name in all)
|
|
@@ -57,10 +66,10 @@ var require_estraverse = __commonJS({
|
|
|
57
66
|
return ret;
|
|
58
67
|
}
|
|
59
68
|
function upperBound(array, func) {
|
|
60
|
-
var diff, len,
|
|
61
|
-
for (len = array.length,
|
|
62
|
-
diff = len >>> 1, current2 =
|
|
63
|
-
return
|
|
69
|
+
var diff, len, i2, current2;
|
|
70
|
+
for (len = array.length, i2 = 0; len; )
|
|
71
|
+
diff = len >>> 1, current2 = i2 + diff, func(array[current2]) ? len = diff : (i2 = current2 + 1, len -= diff + 1);
|
|
72
|
+
return i2;
|
|
64
73
|
}
|
|
65
74
|
Syntax = {
|
|
66
75
|
AssignmentExpression: "AssignmentExpression",
|
|
@@ -241,7 +250,7 @@ var require_estraverse = __commonJS({
|
|
|
241
250
|
function Controller() {
|
|
242
251
|
}
|
|
243
252
|
Controller.prototype.path = function() {
|
|
244
|
-
var
|
|
253
|
+
var i2, iz, j, jz, result, element;
|
|
245
254
|
function addToPath(result2, path6) {
|
|
246
255
|
if (Array.isArray(path6))
|
|
247
256
|
for (j = 0, jz = path6.length; j < jz; ++j)
|
|
@@ -251,16 +260,16 @@ var require_estraverse = __commonJS({
|
|
|
251
260
|
}
|
|
252
261
|
if (!this.__current.path)
|
|
253
262
|
return null;
|
|
254
|
-
for (result = [],
|
|
255
|
-
element = this.__leavelist[
|
|
263
|
+
for (result = [], i2 = 2, iz = this.__leavelist.length; i2 < iz; ++i2)
|
|
264
|
+
element = this.__leavelist[i2], addToPath(result, element.path);
|
|
256
265
|
return addToPath(result, this.__current.path), result;
|
|
257
266
|
}, Controller.prototype.type = function() {
|
|
258
267
|
var node = this.current();
|
|
259
268
|
return node.type || this.__current.wrap;
|
|
260
269
|
}, Controller.prototype.parents = function() {
|
|
261
|
-
var
|
|
262
|
-
for (result = [],
|
|
263
|
-
result.push(this.__leavelist[
|
|
270
|
+
var i2, iz, result;
|
|
271
|
+
for (result = [], i2 = 1, iz = this.__leavelist.length; i2 < iz; ++i2)
|
|
272
|
+
result.push(this.__leavelist[i2].node);
|
|
264
273
|
return result;
|
|
265
274
|
}, Controller.prototype.current = function() {
|
|
266
275
|
return this.__current.node;
|
|
@@ -285,8 +294,8 @@ var require_estraverse = __commonJS({
|
|
|
285
294
|
return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && key === "properties";
|
|
286
295
|
}
|
|
287
296
|
function candidateExistsInLeaveList(leavelist, candidate) {
|
|
288
|
-
for (var
|
|
289
|
-
if (leavelist[
|
|
297
|
+
for (var i2 = leavelist.length - 1; i2 >= 0; --i2)
|
|
298
|
+
if (leavelist[i2].node === candidate)
|
|
290
299
|
return !0;
|
|
291
300
|
return !1;
|
|
292
301
|
}
|
|
@@ -332,10 +341,10 @@ var require_estraverse = __commonJS({
|
|
|
332
341
|
}, Controller.prototype.replace = function(root, visitor) {
|
|
333
342
|
var worklist, leavelist, node, nodeType, target, element, current2, current22, candidates, candidate, sentinel, outer, key;
|
|
334
343
|
function removeElem(element2) {
|
|
335
|
-
var
|
|
344
|
+
var i2, key2, nextElem, parent;
|
|
336
345
|
if (element2.ref.remove()) {
|
|
337
|
-
for (key2 = element2.ref.key, parent = element2.ref.parent,
|
|
338
|
-
if (nextElem = worklist[
|
|
346
|
+
for (key2 = element2.ref.key, parent = element2.ref.parent, i2 = worklist.length; i2--; )
|
|
347
|
+
if (nextElem = worklist[i2], nextElem.ref && nextElem.ref.parent === parent) {
|
|
339
348
|
if (nextElem.ref.key < key2)
|
|
340
349
|
break;
|
|
341
350
|
--nextElem.ref.key;
|
|
@@ -391,19 +400,19 @@ var require_estraverse = __commonJS({
|
|
|
391
400
|
}), comment.extendedRange = [comment.range[0], comment.range[1]], target !== tokens.length && (comment.extendedRange[1] = tokens[target].range[0]), target -= 1, target >= 0 && (comment.extendedRange[0] = tokens[target].range[1]), comment;
|
|
392
401
|
}
|
|
393
402
|
function attachComments(tree, providedComments, tokens) {
|
|
394
|
-
var comments = [], comment, len,
|
|
403
|
+
var comments = [], comment, len, i2, cursor;
|
|
395
404
|
if (!tree.range)
|
|
396
405
|
throw new Error("attachComments needs range information");
|
|
397
406
|
if (!tokens.length) {
|
|
398
407
|
if (providedComments.length) {
|
|
399
|
-
for (
|
|
400
|
-
comment = deepCopy(providedComments[
|
|
408
|
+
for (i2 = 0, len = providedComments.length; i2 < len; i2 += 1)
|
|
409
|
+
comment = deepCopy(providedComments[i2]), comment.extendedRange = [0, tree.range[0]], comments.push(comment);
|
|
401
410
|
tree.leadingComments = comments;
|
|
402
411
|
}
|
|
403
412
|
return tree;
|
|
404
413
|
}
|
|
405
|
-
for (
|
|
406
|
-
comments.push(extendCommentRange(deepCopy(providedComments[
|
|
414
|
+
for (i2 = 0, len = providedComments.length; i2 < len; i2 += 1)
|
|
415
|
+
comments.push(extendCommentRange(deepCopy(providedComments[i2]), tokens));
|
|
407
416
|
return cursor = 0, traverse(tree, {
|
|
408
417
|
enter: function(node) {
|
|
409
418
|
for (var comment2; cursor < comments.length && (comment2 = comments[cursor], !(comment2.extendedRange[1] > node.range[0])); )
|
|
@@ -690,11 +699,11 @@ var require_keyword = __commonJS({
|
|
|
690
699
|
return id === "eval" || id === "arguments";
|
|
691
700
|
}
|
|
692
701
|
function isIdentifierNameES5(id) {
|
|
693
|
-
var
|
|
702
|
+
var i2, iz, ch;
|
|
694
703
|
if (id.length === 0 || (ch = id.charCodeAt(0), !code.isIdentifierStartES5(ch)))
|
|
695
704
|
return !1;
|
|
696
|
-
for (
|
|
697
|
-
if (ch = id.charCodeAt(
|
|
705
|
+
for (i2 = 1, iz = id.length; i2 < iz; ++i2)
|
|
706
|
+
if (ch = id.charCodeAt(i2), !code.isIdentifierPartES5(ch))
|
|
698
707
|
return !1;
|
|
699
708
|
return !0;
|
|
700
709
|
}
|
|
@@ -702,12 +711,12 @@ var require_keyword = __commonJS({
|
|
|
702
711
|
return (lead - 55296) * 1024 + (trail - 56320) + 65536;
|
|
703
712
|
}
|
|
704
713
|
function isIdentifierNameES6(id) {
|
|
705
|
-
var
|
|
714
|
+
var i2, iz, ch, lowCh, check;
|
|
706
715
|
if (id.length === 0)
|
|
707
716
|
return !1;
|
|
708
|
-
for (check = code.isIdentifierStartES6,
|
|
709
|
-
if (ch = id.charCodeAt(
|
|
710
|
-
if (++
|
|
717
|
+
for (check = code.isIdentifierStartES6, i2 = 0, iz = id.length; i2 < iz; ++i2) {
|
|
718
|
+
if (ch = id.charCodeAt(i2), 55296 <= ch && ch <= 56319) {
|
|
719
|
+
if (++i2, i2 >= iz || (lowCh = id.charCodeAt(i2), !(56320 <= lowCh && lowCh <= 57343)))
|
|
711
720
|
return !1;
|
|
712
721
|
ch = decodeUtf16(ch, lowCh);
|
|
713
722
|
}
|
|
@@ -831,8 +840,8 @@ var require_util = __commonJS({
|
|
|
831
840
|
return aPath;
|
|
832
841
|
path5 = url.path;
|
|
833
842
|
}
|
|
834
|
-
for (var isAbsolute4 = exports.isAbsolute(path5), parts = path5.split(/\/+/), part, up3 = 0,
|
|
835
|
-
part = parts[
|
|
843
|
+
for (var isAbsolute4 = exports.isAbsolute(path5), parts = path5.split(/\/+/), part, up3 = 0, i2 = parts.length - 1; i2 >= 0; i2--)
|
|
844
|
+
part = parts[i2], part === "." ? parts.splice(i2, 1) : part === ".." ? up3++ : up3 > 0 && (part === "" ? (parts.splice(i2 + 1, up3), up3 = 0) : (parts.splice(i2, 2), up3--));
|
|
836
845
|
return path5 = parts.join("/"), path5 === "" && (path5 = isAbsolute4 ? "/" : "."), url ? (url.path = path5, urlGenerate(url)) : path5;
|
|
837
846
|
}
|
|
838
847
|
exports.normalize = normalize2;
|
|
@@ -884,8 +893,8 @@ var require_util = __commonJS({
|
|
|
884
893
|
var length = s.length;
|
|
885
894
|
if (length < 9 || s.charCodeAt(length - 1) !== 95 || s.charCodeAt(length - 2) !== 95 || s.charCodeAt(length - 3) !== 111 || s.charCodeAt(length - 4) !== 116 || s.charCodeAt(length - 5) !== 111 || s.charCodeAt(length - 6) !== 114 || s.charCodeAt(length - 7) !== 112 || s.charCodeAt(length - 8) !== 95 || s.charCodeAt(length - 9) !== 95)
|
|
886
895
|
return !1;
|
|
887
|
-
for (var
|
|
888
|
-
if (s.charCodeAt(
|
|
896
|
+
for (var i2 = length - 10; i2 >= 0; i2--)
|
|
897
|
+
if (s.charCodeAt(i2) !== 36)
|
|
889
898
|
return !1;
|
|
890
899
|
return !0;
|
|
891
900
|
}
|
|
@@ -936,8 +945,8 @@ var require_array_set = __commonJS({
|
|
|
936
945
|
this._array = [], this._set = hasNativeMap ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
|
|
937
946
|
}
|
|
938
947
|
ArraySet.fromArray = function(aArray, aAllowDuplicates) {
|
|
939
|
-
for (var set = new ArraySet(),
|
|
940
|
-
set.add(aArray[
|
|
948
|
+
for (var set = new ArraySet(), i2 = 0, len = aArray.length; i2 < len; i2++)
|
|
949
|
+
set.add(aArray[i2], aAllowDuplicates);
|
|
941
950
|
return set;
|
|
942
951
|
};
|
|
943
952
|
ArraySet.prototype.size = function() {
|
|
@@ -1093,12 +1102,12 @@ var require_source_map_generator = __commonJS({
|
|
|
1093
1102
|
}
|
|
1094
1103
|
};
|
|
1095
1104
|
SourceMapGenerator.prototype._serializeMappings = function() {
|
|
1096
|
-
for (var previousGeneratedColumn = 0, previousGeneratedLine = 1, previousOriginalColumn = 0, previousOriginalLine = 0, previousName = 0, previousSource = 0, result = "", next, mapping, nameIdx, sourceIdx, mappings = this._mappings.toArray(),
|
|
1097
|
-
if (mapping = mappings[
|
|
1105
|
+
for (var previousGeneratedColumn = 0, previousGeneratedLine = 1, previousOriginalColumn = 0, previousOriginalLine = 0, previousName = 0, previousSource = 0, result = "", next, mapping, nameIdx, sourceIdx, mappings = this._mappings.toArray(), i2 = 0, len = mappings.length; i2 < len; i2++) {
|
|
1106
|
+
if (mapping = mappings[i2], next = "", mapping.generatedLine !== previousGeneratedLine)
|
|
1098
1107
|
for (previousGeneratedColumn = 0; mapping.generatedLine !== previousGeneratedLine; )
|
|
1099
1108
|
next += ";", previousGeneratedLine++;
|
|
1100
|
-
else if (
|
|
1101
|
-
if (!util.compareByGeneratedPositionsInflated(mapping, mappings[
|
|
1109
|
+
else if (i2 > 0) {
|
|
1110
|
+
if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i2 - 1]))
|
|
1102
1111
|
continue;
|
|
1103
1112
|
next += ",";
|
|
1104
1113
|
}
|
|
@@ -1172,12 +1181,12 @@ var require_quick_sort = __commonJS({
|
|
|
1172
1181
|
}
|
|
1173
1182
|
function doQuickSort(ary, comparator, p, r) {
|
|
1174
1183
|
if (p < r) {
|
|
1175
|
-
var pivotIndex = randomIntInRange(p, r),
|
|
1184
|
+
var pivotIndex = randomIntInRange(p, r), i2 = p - 1;
|
|
1176
1185
|
swap(ary, pivotIndex, r);
|
|
1177
1186
|
for (var pivot = ary[r], j = p; j < r; j++)
|
|
1178
|
-
comparator(ary[j], pivot) <= 0 && (
|
|
1179
|
-
swap(ary,
|
|
1180
|
-
var q =
|
|
1187
|
+
comparator(ary[j], pivot) <= 0 && (i2 += 1, swap(ary, i2, j));
|
|
1188
|
+
swap(ary, i2 + 1, j);
|
|
1189
|
+
var q = i2 + 1;
|
|
1181
1190
|
doQuickSort(ary, comparator, p, q - 1), doQuickSort(ary, comparator, q + 1, r);
|
|
1182
1191
|
}
|
|
1183
1192
|
}
|
|
@@ -1305,10 +1314,10 @@ var require_source_map_consumer = __commonJS({
|
|
|
1305
1314
|
var relativeSource = aSource;
|
|
1306
1315
|
if (this.sourceRoot != null && (relativeSource = util.relative(this.sourceRoot, relativeSource)), this._sources.has(relativeSource))
|
|
1307
1316
|
return this._sources.indexOf(relativeSource);
|
|
1308
|
-
var
|
|
1309
|
-
for (
|
|
1310
|
-
if (this._absoluteSources[
|
|
1311
|
-
return
|
|
1317
|
+
var i2;
|
|
1318
|
+
for (i2 = 0; i2 < this._absoluteSources.length; ++i2)
|
|
1319
|
+
if (this._absoluteSources[i2] == aSource)
|
|
1320
|
+
return i2;
|
|
1312
1321
|
return -1;
|
|
1313
1322
|
};
|
|
1314
1323
|
BasicSourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {
|
|
@@ -1319,8 +1328,8 @@ var require_source_map_consumer = __commonJS({
|
|
|
1319
1328
|
), smc.file = aSourceMap._file, smc._sourceMapURL = aSourceMapURL, smc._absoluteSources = smc._sources.toArray().map(function(s) {
|
|
1320
1329
|
return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);
|
|
1321
1330
|
});
|
|
1322
|
-
for (var generatedMappings = aSourceMap._mappings.toArray().slice(), destGeneratedMappings = smc.__generatedMappings = [], destOriginalMappings = smc.__originalMappings = [],
|
|
1323
|
-
var srcMapping = generatedMappings[
|
|
1331
|
+
for (var generatedMappings = aSourceMap._mappings.toArray().slice(), destGeneratedMappings = smc.__generatedMappings = [], destOriginalMappings = smc.__originalMappings = [], i2 = 0, length = generatedMappings.length; i2 < length; i2++) {
|
|
1332
|
+
var srcMapping = generatedMappings[i2], destMapping = new Mapping();
|
|
1324
1333
|
destMapping.generatedLine = srcMapping.generatedLine, destMapping.generatedColumn = srcMapping.generatedColumn, srcMapping.source && (destMapping.source = sources.indexOf(srcMapping.source), destMapping.originalLine = srcMapping.originalLine, destMapping.originalColumn = srcMapping.originalColumn, srcMapping.name && (destMapping.name = names.indexOf(srcMapping.name)), destOriginalMappings.push(destMapping)), destGeneratedMappings.push(destMapping);
|
|
1325
1334
|
}
|
|
1326
1335
|
return quickSort(smc.__originalMappings, util.compareByOriginalPositions), smc;
|
|
@@ -1505,9 +1514,9 @@ var require_source_map_consumer = __commonJS({
|
|
|
1505
1514
|
IndexedSourceMapConsumer.prototype._version = 3;
|
|
1506
1515
|
Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", {
|
|
1507
1516
|
get: function() {
|
|
1508
|
-
for (var sources = [],
|
|
1509
|
-
for (var j = 0; j < this._sections[
|
|
1510
|
-
sources.push(this._sections[
|
|
1517
|
+
for (var sources = [], i2 = 0; i2 < this._sections.length; i2++)
|
|
1518
|
+
for (var j = 0; j < this._sections[i2].consumer.sources.length; j++)
|
|
1519
|
+
sources.push(this._sections[i2].consumer.sources[j]);
|
|
1511
1520
|
return sources;
|
|
1512
1521
|
}
|
|
1513
1522
|
});
|
|
@@ -1540,8 +1549,8 @@ var require_source_map_consumer = __commonJS({
|
|
|
1540
1549
|
});
|
|
1541
1550
|
};
|
|
1542
1551
|
IndexedSourceMapConsumer.prototype.sourceContentFor = function(aSource, nullOnMissing) {
|
|
1543
|
-
for (var
|
|
1544
|
-
var section = this._sections[
|
|
1552
|
+
for (var i2 = 0; i2 < this._sections.length; i2++) {
|
|
1553
|
+
var section = this._sections[i2], content = section.consumer.sourceContentFor(aSource, !0);
|
|
1545
1554
|
if (content)
|
|
1546
1555
|
return content;
|
|
1547
1556
|
}
|
|
@@ -1550,8 +1559,8 @@ var require_source_map_consumer = __commonJS({
|
|
|
1550
1559
|
throw new Error('"' + aSource + '" is not in the SourceMap.');
|
|
1551
1560
|
};
|
|
1552
1561
|
IndexedSourceMapConsumer.prototype.generatedPositionFor = function(aArgs) {
|
|
1553
|
-
for (var
|
|
1554
|
-
var section = this._sections[
|
|
1562
|
+
for (var i2 = 0; i2 < this._sections.length; i2++) {
|
|
1563
|
+
var section = this._sections[i2];
|
|
1555
1564
|
if (section.consumer._findSourceIndex(util.getArg(aArgs, "source")) !== -1) {
|
|
1556
1565
|
var generatedPosition = section.consumer.generatedPositionFor(aArgs);
|
|
1557
1566
|
if (generatedPosition) {
|
|
@@ -1570,8 +1579,8 @@ var require_source_map_consumer = __commonJS({
|
|
|
1570
1579
|
};
|
|
1571
1580
|
IndexedSourceMapConsumer.prototype._parseMappings = function(aStr, aSourceRoot) {
|
|
1572
1581
|
this.__generatedMappings = [], this.__originalMappings = [];
|
|
1573
|
-
for (var
|
|
1574
|
-
for (var section = this._sections[
|
|
1582
|
+
for (var i2 = 0; i2 < this._sections.length; i2++)
|
|
1583
|
+
for (var section = this._sections[i2], sectionMappings = section.consumer._generatedMappings, j = 0; j < sectionMappings.length; j++) {
|
|
1575
1584
|
var mapping = sectionMappings[j], source = section.consumer._sources.at(mapping.source);
|
|
1576
1585
|
source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL), this._sources.add(source), source = this._sources.indexOf(source);
|
|
1577
1586
|
var name = null;
|
|
@@ -1657,8 +1666,8 @@ var require_source_node = __commonJS({
|
|
|
1657
1666
|
};
|
|
1658
1667
|
SourceNode.prototype.prepend = function(aChunk) {
|
|
1659
1668
|
if (Array.isArray(aChunk))
|
|
1660
|
-
for (var
|
|
1661
|
-
this.prepend(aChunk[
|
|
1669
|
+
for (var i2 = aChunk.length - 1; i2 >= 0; i2--)
|
|
1670
|
+
this.prepend(aChunk[i2]);
|
|
1662
1671
|
else if (aChunk[isSourceNode] || typeof aChunk == "string")
|
|
1663
1672
|
this.children.unshift(aChunk);
|
|
1664
1673
|
else
|
|
@@ -1668,8 +1677,8 @@ var require_source_node = __commonJS({
|
|
|
1668
1677
|
return this;
|
|
1669
1678
|
};
|
|
1670
1679
|
SourceNode.prototype.walk = function(aFn) {
|
|
1671
|
-
for (var chunk,
|
|
1672
|
-
chunk = this.children[
|
|
1680
|
+
for (var chunk, i2 = 0, len = this.children.length; i2 < len; i2++)
|
|
1681
|
+
chunk = this.children[i2], chunk[isSourceNode] ? chunk.walk(aFn) : chunk !== "" && aFn(chunk, {
|
|
1673
1682
|
source: this.source,
|
|
1674
1683
|
line: this.line,
|
|
1675
1684
|
column: this.column,
|
|
@@ -1677,11 +1686,11 @@ var require_source_node = __commonJS({
|
|
|
1677
1686
|
});
|
|
1678
1687
|
};
|
|
1679
1688
|
SourceNode.prototype.join = function(aSep) {
|
|
1680
|
-
var newChildren,
|
|
1689
|
+
var newChildren, i2, len = this.children.length;
|
|
1681
1690
|
if (len > 0) {
|
|
1682
|
-
for (newChildren = [],
|
|
1683
|
-
newChildren.push(this.children[
|
|
1684
|
-
newChildren.push(this.children[
|
|
1691
|
+
for (newChildren = [], i2 = 0; i2 < len - 1; i2++)
|
|
1692
|
+
newChildren.push(this.children[i2]), newChildren.push(aSep);
|
|
1693
|
+
newChildren.push(this.children[i2]), this.children = newChildren;
|
|
1685
1694
|
}
|
|
1686
1695
|
return this;
|
|
1687
1696
|
};
|
|
@@ -1693,10 +1702,10 @@ var require_source_node = __commonJS({
|
|
|
1693
1702
|
this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
|
|
1694
1703
|
};
|
|
1695
1704
|
SourceNode.prototype.walkSourceContents = function(aFn) {
|
|
1696
|
-
for (var
|
|
1697
|
-
this.children[
|
|
1698
|
-
for (var sources = Object.keys(this.sourceContents),
|
|
1699
|
-
aFn(util.fromSetString(sources[
|
|
1705
|
+
for (var i2 = 0, len = this.children.length; i2 < len; i2++)
|
|
1706
|
+
this.children[i2][isSourceNode] && this.children[i2].walkSourceContents(aFn);
|
|
1707
|
+
for (var sources = Object.keys(this.sourceContents), i2 = 0, len = sources.length; i2 < len; i2++)
|
|
1708
|
+
aFn(util.fromSetString(sources[i2]), this.sourceContents[sources[i2]]);
|
|
1700
1709
|
};
|
|
1701
1710
|
SourceNode.prototype.toString = function() {
|
|
1702
1711
|
var str = "";
|
|
@@ -1982,12 +1991,12 @@ var require_escodegen = __commonJS({
|
|
|
1982
1991
|
return (ch & -2) === 8232 ? (previousIsBackslash ? "u" : "\\u") + (ch === 8232 ? "2028" : "2029") : ch === 10 || ch === 13 ? (previousIsBackslash ? "" : "\\") + (ch === 10 ? "n" : "r") : String.fromCharCode(ch);
|
|
1983
1992
|
}
|
|
1984
1993
|
function generateRegExp(reg) {
|
|
1985
|
-
var match, result, flags,
|
|
1994
|
+
var match, result, flags, i2, iz, ch, characterInBrack, previousIsBackslash;
|
|
1986
1995
|
if (result = reg.toString(), reg.source) {
|
|
1987
1996
|
if (match = result.match(/\/([^/]*)$/), !match)
|
|
1988
1997
|
return result;
|
|
1989
|
-
for (flags = match[1], result = "", characterInBrack = !1, previousIsBackslash = !1,
|
|
1990
|
-
ch = reg.source.charCodeAt(
|
|
1998
|
+
for (flags = match[1], result = "", characterInBrack = !1, previousIsBackslash = !1, i2 = 0, iz = reg.source.length; i2 < iz; ++i2)
|
|
1999
|
+
ch = reg.source.charCodeAt(i2), previousIsBackslash ? (result += escapeRegExpCharacter(ch, previousIsBackslash), previousIsBackslash = !1) : (characterInBrack ? ch === 93 && (characterInBrack = !1) : ch === 47 ? result += "\\" : ch === 91 && (characterInBrack = !0), result += escapeRegExpCharacter(ch, previousIsBackslash), previousIsBackslash = ch === 92);
|
|
1991
2000
|
return "/" + result + "/" + flags;
|
|
1992
2001
|
}
|
|
1993
2002
|
return result;
|
|
@@ -2010,21 +2019,21 @@ var require_escodegen = __commonJS({
|
|
|
2010
2019
|
throw new Error("Incorrectly classified character");
|
|
2011
2020
|
}
|
|
2012
2021
|
function escapeDirective(str) {
|
|
2013
|
-
var
|
|
2014
|
-
for (quote = quotes === "double" ? '"' : "'",
|
|
2015
|
-
if (code = str.charCodeAt(
|
|
2022
|
+
var i2, iz, code, quote;
|
|
2023
|
+
for (quote = quotes === "double" ? '"' : "'", i2 = 0, iz = str.length; i2 < iz; ++i2)
|
|
2024
|
+
if (code = str.charCodeAt(i2), code === 39) {
|
|
2016
2025
|
quote = '"';
|
|
2017
2026
|
break;
|
|
2018
2027
|
} else if (code === 34) {
|
|
2019
2028
|
quote = "'";
|
|
2020
2029
|
break;
|
|
2021
|
-
} else code === 92 && ++
|
|
2030
|
+
} else code === 92 && ++i2;
|
|
2022
2031
|
return quote + str + quote;
|
|
2023
2032
|
}
|
|
2024
2033
|
function escapeString(str) {
|
|
2025
|
-
var result = "",
|
|
2026
|
-
for (
|
|
2027
|
-
if (code = str.charCodeAt(
|
|
2034
|
+
var result = "", i2, len, code, singleQuotes = 0, doubleQuotes = 0, single, quote;
|
|
2035
|
+
for (i2 = 0, len = str.length; i2 < len; ++i2) {
|
|
2036
|
+
if (code = str.charCodeAt(i2), code === 39)
|
|
2028
2037
|
++singleQuotes;
|
|
2029
2038
|
else if (code === 34)
|
|
2030
2039
|
++doubleQuotes;
|
|
@@ -2034,21 +2043,21 @@ var require_escodegen = __commonJS({
|
|
|
2034
2043
|
result += escapeDisallowedCharacter(code);
|
|
2035
2044
|
continue;
|
|
2036
2045
|
} else if (!esutils.code.isIdentifierPartES5(code) && (json && code < 32 || !json && !escapeless && (code < 32 || code > 126))) {
|
|
2037
|
-
result += escapeAllowedCharacter(code, str.charCodeAt(
|
|
2046
|
+
result += escapeAllowedCharacter(code, str.charCodeAt(i2 + 1));
|
|
2038
2047
|
continue;
|
|
2039
2048
|
}
|
|
2040
2049
|
result += String.fromCharCode(code);
|
|
2041
2050
|
}
|
|
2042
2051
|
if (single = !(quotes === "double" || quotes === "auto" && doubleQuotes < singleQuotes), quote = single ? "'" : '"', !(single ? singleQuotes : doubleQuotes))
|
|
2043
2052
|
return quote + result + quote;
|
|
2044
|
-
for (str = result, result = quote,
|
|
2045
|
-
code = str.charCodeAt(
|
|
2053
|
+
for (str = result, result = quote, i2 = 0, len = str.length; i2 < len; ++i2)
|
|
2054
|
+
code = str.charCodeAt(i2), (code === 39 && single || code === 34 && !single) && (result += "\\"), result += String.fromCharCode(code);
|
|
2046
2055
|
return result + quote;
|
|
2047
2056
|
}
|
|
2048
2057
|
function flattenToString(arr) {
|
|
2049
|
-
var
|
|
2050
|
-
for (
|
|
2051
|
-
elem = arr[
|
|
2058
|
+
var i2, iz, elem, result = "";
|
|
2059
|
+
for (i2 = 0, iz = arr.length; i2 < iz; ++i2)
|
|
2060
|
+
elem = arr[i2], result += Array.isArray(elem) ? flattenToString(elem) : elem;
|
|
2052
2061
|
return result;
|
|
2053
2062
|
}
|
|
2054
2063
|
function toSourceNodeWhenNeeded(generated, node) {
|
|
@@ -2076,20 +2085,20 @@ var require_escodegen = __commonJS({
|
|
|
2076
2085
|
previousBase = base2, base2 += indent2, fn(base2), base2 = previousBase;
|
|
2077
2086
|
}
|
|
2078
2087
|
function calculateSpaces(str) {
|
|
2079
|
-
var
|
|
2080
|
-
for (
|
|
2088
|
+
var i2;
|
|
2089
|
+
for (i2 = str.length - 1; i2 >= 0 && !esutils.code.isLineTerminator(str.charCodeAt(i2)); --i2)
|
|
2081
2090
|
;
|
|
2082
|
-
return str.length - 1 -
|
|
2091
|
+
return str.length - 1 - i2;
|
|
2083
2092
|
}
|
|
2084
2093
|
function adjustMultilineComment(value, specialBase) {
|
|
2085
|
-
var array,
|
|
2086
|
-
for (array = value.split(/\r\n|[\r\n]/), spaces = Number.MAX_VALUE,
|
|
2087
|
-
for (line = array[
|
|
2094
|
+
var array, i2, len, line, j, spaces, previousBase, sn;
|
|
2095
|
+
for (array = value.split(/\r\n|[\r\n]/), spaces = Number.MAX_VALUE, i2 = 1, len = array.length; i2 < len; ++i2) {
|
|
2096
|
+
for (line = array[i2], j = 0; j < line.length && esutils.code.isWhiteSpace(line.charCodeAt(j)); )
|
|
2088
2097
|
++j;
|
|
2089
2098
|
spaces > j && (spaces = j);
|
|
2090
2099
|
}
|
|
2091
|
-
for (typeof specialBase < "u" ? (previousBase = base2, array[1][spaces] === "*" && (specialBase += " "), base2 = specialBase) : (spaces & 1 && --spaces, previousBase = base2),
|
|
2092
|
-
sn = toSourceNodeWhenNeeded(addIndent(array[
|
|
2100
|
+
for (typeof specialBase < "u" ? (previousBase = base2, array[1][spaces] === "*" && (specialBase += " "), base2 = specialBase) : (spaces & 1 && --spaces, previousBase = base2), i2 = 1, len = array.length; i2 < len; ++i2)
|
|
2101
|
+
sn = toSourceNodeWhenNeeded(addIndent(array[i2].slice(spaces))), array[i2] = sourceMap ? sn.join("") : sn;
|
|
2093
2102
|
return base2 = previousBase, array.join(`
|
|
2094
2103
|
`);
|
|
2095
2104
|
}
|
|
@@ -2104,20 +2113,20 @@ var require_escodegen = __commonJS({
|
|
|
2104
2113
|
return extra.format.indent.adjustMultilineComment && /[\n\r]/.test(comment.value) ? adjustMultilineComment("/*" + comment.value + "*/", specialBase) : "/*" + comment.value + "*/";
|
|
2105
2114
|
}
|
|
2106
2115
|
function addComments(stmt, result) {
|
|
2107
|
-
var
|
|
2116
|
+
var i2, len, comment, save, tailingToStatement, specialBase, fragment, extRange, range, prevRange, prefix, infix, suffix, count;
|
|
2108
2117
|
if (stmt.leadingComments && stmt.leadingComments.length > 0) {
|
|
2109
2118
|
if (save = result, preserveBlankLines) {
|
|
2110
2119
|
for (comment = stmt.leadingComments[0], result = [], extRange = comment.extendedRange, range = comment.range, prefix = sourceCode.substring(extRange[0], range[0]), count = (prefix.match(/\n/g) || []).length, count > 0 ? (result.push(stringRepeat(`
|
|
2111
|
-
`, count)), result.push(addIndent(generateComment(comment)))) : (result.push(prefix), result.push(generateComment(comment))), prevRange = range,
|
|
2112
|
-
comment = stmt.leadingComments[
|
|
2120
|
+
`, count)), result.push(addIndent(generateComment(comment)))) : (result.push(prefix), result.push(generateComment(comment))), prevRange = range, i2 = 1, len = stmt.leadingComments.length; i2 < len; i2++)
|
|
2121
|
+
comment = stmt.leadingComments[i2], range = comment.range, infix = sourceCode.substring(prevRange[1], range[0]), count = (infix.match(/\n/g) || []).length, result.push(stringRepeat(`
|
|
2113
2122
|
`, count)), result.push(addIndent(generateComment(comment))), prevRange = range;
|
|
2114
2123
|
suffix = sourceCode.substring(range[1], extRange[1]), count = (suffix.match(/\n/g) || []).length, result.push(stringRepeat(`
|
|
2115
2124
|
`, count));
|
|
2116
2125
|
} else
|
|
2117
2126
|
for (comment = stmt.leadingComments[0], result = [], safeConcatenation && stmt.type === Syntax.Program && stmt.body.length === 0 && result.push(`
|
|
2118
2127
|
`), result.push(generateComment(comment)), endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()) || result.push(`
|
|
2119
|
-
`),
|
|
2120
|
-
comment = stmt.leadingComments[
|
|
2128
|
+
`), i2 = 1, len = stmt.leadingComments.length; i2 < len; ++i2)
|
|
2129
|
+
comment = stmt.leadingComments[i2], fragment = [generateComment(comment)], endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString()) || fragment.push(`
|
|
2121
2130
|
`), result.push(addIndent(fragment));
|
|
2122
2131
|
result.push(addIndent(save));
|
|
2123
2132
|
}
|
|
@@ -2126,8 +2135,8 @@ var require_escodegen = __commonJS({
|
|
|
2126
2135
|
comment = stmt.trailingComments[0], extRange = comment.extendedRange, range = comment.range, prefix = sourceCode.substring(extRange[0], range[0]), count = (prefix.match(/\n/g) || []).length, count > 0 ? (result.push(stringRepeat(`
|
|
2127
2136
|
`, count)), result.push(addIndent(generateComment(comment)))) : (result.push(prefix), result.push(generateComment(comment)));
|
|
2128
2137
|
else
|
|
2129
|
-
for (tailingToStatement = !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()), specialBase = stringRepeat(" ", calculateSpaces(toSourceNodeWhenNeeded([base2, result, indent2]).toString())),
|
|
2130
|
-
comment = stmt.trailingComments[
|
|
2138
|
+
for (tailingToStatement = !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()), specialBase = stringRepeat(" ", calculateSpaces(toSourceNodeWhenNeeded([base2, result, indent2]).toString())), i2 = 0, len = stmt.trailingComments.length; i2 < len; ++i2)
|
|
2139
|
+
comment = stmt.trailingComments[i2], tailingToStatement ? (i2 === 0 ? result = [result, indent2] : result = [result, specialBase], result.push(generateComment(comment, specialBase))) : result = [result, addIndent(generateComment(comment))], i2 !== len - 1 && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()) && (result = [result, `
|
|
2131
2140
|
`]);
|
|
2132
2141
|
return result;
|
|
2133
2142
|
}
|
|
@@ -2143,9 +2152,9 @@ var require_escodegen = __commonJS({
|
|
|
2143
2152
|
return current2 < should ? ["(", text, ")"] : text;
|
|
2144
2153
|
}
|
|
2145
2154
|
function generateVerbatimString(string) {
|
|
2146
|
-
var
|
|
2147
|
-
for (result = string.split(/\r\n|\n/),
|
|
2148
|
-
result[
|
|
2155
|
+
var i2, iz, result;
|
|
2156
|
+
for (result = string.split(/\r\n|\n/), i2 = 1, iz = result.length; i2 < iz; i2++)
|
|
2157
|
+
result[i2] = newline + base2 + result[i2];
|
|
2149
2158
|
return result;
|
|
2150
2159
|
}
|
|
2151
2160
|
function generateVerbatim(expr, precedence) {
|
|
@@ -2183,12 +2192,12 @@ var require_escodegen = __commonJS({
|
|
|
2183
2192
|
CodeGenerator.prototype.generatePattern = function(node, precedence, flags) {
|
|
2184
2193
|
return node.type === Syntax.Identifier ? generateIdentifier(node) : this.generateExpression(node, precedence, flags);
|
|
2185
2194
|
}, CodeGenerator.prototype.generateFunctionParams = function(node) {
|
|
2186
|
-
var
|
|
2195
|
+
var i2, iz, result, hasDefault;
|
|
2187
2196
|
if (hasDefault = !1, node.type === Syntax.ArrowFunctionExpression && !node.rest && (!node.defaults || node.defaults.length === 0) && node.params.length === 1 && node.params[0].type === Syntax.Identifier)
|
|
2188
2197
|
result = [generateAsyncPrefix(node, !0), generateIdentifier(node.params[0])];
|
|
2189
2198
|
else {
|
|
2190
|
-
for (result = node.type === Syntax.ArrowFunctionExpression ? [generateAsyncPrefix(node, !1)] : [], result.push("("), node.defaults && (hasDefault = !0),
|
|
2191
|
-
hasDefault && node.defaults[
|
|
2199
|
+
for (result = node.type === Syntax.ArrowFunctionExpression ? [generateAsyncPrefix(node, !1)] : [], result.push("("), node.defaults && (hasDefault = !0), i2 = 0, iz = node.params.length; i2 < iz; ++i2)
|
|
2200
|
+
hasDefault && node.defaults[i2] ? result.push(this.generateAssignment(node.params[i2], node.defaults[i2], "=", Precedence.Assignment, E_TTT)) : result.push(this.generatePattern(node.params[i2], Precedence.Assignment, E_TTT)), i2 + 1 < iz && result.push("," + space);
|
|
2192
2201
|
node.rest && (node.params.length && result.push("," + space), result.push("..."), result.push(generateIdentifier(node.rest))), result.push(")");
|
|
2193
2202
|
}
|
|
2194
2203
|
return result;
|
|
@@ -2226,10 +2235,10 @@ var require_escodegen = __commonJS({
|
|
|
2226
2235
|
return withIndent(function() {
|
|
2227
2236
|
stmt.body.length === 0 && preserveBlankLines && (range = stmt.range, range[1] - range[0] > 2 && (content = sourceCode.substring(range[0] + 1, range[1] - 1), content[0] === `
|
|
2228
2237
|
` && (result = ["{"]), result.push(content)));
|
|
2229
|
-
var
|
|
2230
|
-
for (bodyFlags = S_TFFF, flags & F_FUNC_BODY && (bodyFlags |= F_DIRECTIVE_CTX),
|
|
2231
|
-
preserveBlankLines && (
|
|
2232
|
-
` && (result = ["{"])), stmt.body[0].leadingComments || generateBlankLines(stmt.range[0], stmt.body[0].range[0], result)),
|
|
2238
|
+
var i2, iz, fragment, bodyFlags;
|
|
2239
|
+
for (bodyFlags = S_TFFF, flags & F_FUNC_BODY && (bodyFlags |= F_DIRECTIVE_CTX), i2 = 0, iz = stmt.body.length; i2 < iz; ++i2)
|
|
2240
|
+
preserveBlankLines && (i2 === 0 && (stmt.body[0].leadingComments && (range = stmt.body[0].leadingComments[0].extendedRange, content = sourceCode.substring(range[0], range[1]), content[0] === `
|
|
2241
|
+
` && (result = ["{"])), stmt.body[0].leadingComments || generateBlankLines(stmt.range[0], stmt.body[0].range[0], result)), i2 > 0 && !stmt.body[i2 - 1].trailingComments && !stmt.body[i2].leadingComments && generateBlankLines(stmt.body[i2 - 1].range[1], stmt.body[i2].range[0], result)), i2 === iz - 1 && (bodyFlags |= F_SEMICOLON_OPT), stmt.body[i2].leadingComments && preserveBlankLines ? fragment = that.generateStatement(stmt.body[i2], bodyFlags) : fragment = addIndent(that.generateStatement(stmt.body[i2], bodyFlags)), result.push(fragment), endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString()) || preserveBlankLines && i2 < iz - 1 && stmt.body[i2 + 1].leadingComments || result.push(newline), preserveBlankLines && i2 === iz - 1 && (stmt.body[i2].trailingComments || generateBlankLines(stmt.body[i2].range[1], stmt.range[1], result));
|
|
2233
2242
|
}), result.push(addIndent("}")), result;
|
|
2234
2243
|
},
|
|
2235
2244
|
BreakStatement: function(stmt, flags) {
|
|
@@ -2241,9 +2250,9 @@ var require_escodegen = __commonJS({
|
|
|
2241
2250
|
ClassBody: function(stmt, flags) {
|
|
2242
2251
|
var result = ["{", newline], that = this;
|
|
2243
2252
|
return withIndent(function(indent3) {
|
|
2244
|
-
var
|
|
2245
|
-
for (
|
|
2246
|
-
result.push(indent3), result.push(that.generateExpression(stmt.body[
|
|
2253
|
+
var i2, iz;
|
|
2254
|
+
for (i2 = 0, iz = stmt.body.length; i2 < iz; ++i2)
|
|
2255
|
+
result.push(indent3), result.push(that.generateExpression(stmt.body[i2], Precedence.Sequence, E_TTT)), i2 + 1 < iz && result.push(newline);
|
|
2247
2256
|
}), endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()) || result.push(newline), result.push(base2), result.push("}"), result;
|
|
2248
2257
|
},
|
|
2249
2258
|
ClassDeclaration: function(stmt, flags) {
|
|
@@ -2285,9 +2294,9 @@ var require_escodegen = __commonJS({
|
|
|
2285
2294
|
ExportNamedDeclaration: function(stmt, flags) {
|
|
2286
2295
|
var result = ["export"], bodyFlags, that = this;
|
|
2287
2296
|
return bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF, stmt.declaration ? join7(result, this.generateStatement(stmt.declaration, bodyFlags)) : (stmt.specifiers && (stmt.specifiers.length === 0 ? result = join7(result, "{" + space + "}") : stmt.specifiers[0].type === Syntax.ExportBatchSpecifier ? result = join7(result, this.generateExpression(stmt.specifiers[0], Precedence.Sequence, E_TTT)) : (result = join7(result, "{"), withIndent(function(indent3) {
|
|
2288
|
-
var
|
|
2289
|
-
for (result.push(newline),
|
|
2290
|
-
result.push(indent3), result.push(that.generateExpression(stmt.specifiers[
|
|
2297
|
+
var i2, iz;
|
|
2298
|
+
for (result.push(newline), i2 = 0, iz = stmt.specifiers.length; i2 < iz; ++i2)
|
|
2299
|
+
result.push(indent3), result.push(that.generateExpression(stmt.specifiers[i2], Precedence.Sequence, E_TTT)), i2 + 1 < iz && result.push("," + newline);
|
|
2291
2300
|
}), endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()) || result.push(newline), result.push(base2 + "}")), stmt.source ? result = join7(result, [
|
|
2292
2301
|
"from" + space,
|
|
2293
2302
|
// ModuleSpecifier
|
|
@@ -2316,12 +2325,12 @@ var require_escodegen = __commonJS({
|
|
|
2316
2325
|
return fragment2.slice(0, 8) !== "function" ? !1 : (code = fragment2.charCodeAt(8), code === 40 || esutils.code.isWhiteSpace(code) || code === 42 || esutils.code.isLineTerminator(code));
|
|
2317
2326
|
}
|
|
2318
2327
|
function isAsyncPrefixed(fragment2) {
|
|
2319
|
-
var code,
|
|
2328
|
+
var code, i2, iz;
|
|
2320
2329
|
if (fragment2.slice(0, 5) !== "async" || !esutils.code.isWhiteSpace(fragment2.charCodeAt(5)))
|
|
2321
2330
|
return !1;
|
|
2322
|
-
for (
|
|
2331
|
+
for (i2 = 6, iz = fragment2.length; i2 < iz && esutils.code.isWhiteSpace(fragment2.charCodeAt(i2)); ++i2)
|
|
2323
2332
|
;
|
|
2324
|
-
return
|
|
2333
|
+
return i2 === iz || fragment2.slice(i2, i2 + 8) !== "function" ? !1 : (code = fragment2.charCodeAt(i2 + 8), code === 40 || esutils.code.isWhiteSpace(code) || code === 42 || esutils.code.isLineTerminator(code));
|
|
2325
2334
|
}
|
|
2326
2335
|
return result = [this.generateExpression(stmt.expression, Precedence.Sequence, E_TTT)], fragment = toSourceNodeWhenNeeded(result).toString(), fragment.charCodeAt(0) === 123 || // ObjectExpression
|
|
2327
2336
|
isClassPrefixed(fragment) || isFunctionPrefixed(fragment) || isAsyncPrefixed(fragment) || directive && flags & F_DIRECTIVE_CTX && stmt.expression.type === Syntax.Literal && typeof stmt.expression.value == "string" ? result = ["(", result, ")" + this.semicolon(flags)] : result.push(this.semicolon(flags)), result;
|
|
@@ -2342,9 +2351,9 @@ var require_escodegen = __commonJS({
|
|
|
2342
2351
|
space,
|
|
2343
2352
|
this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT)
|
|
2344
2353
|
]) : (result.push(space + "{"), stmt.specifiers.length - cursor === 1 ? (result.push(space), result.push(this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT)), result.push(space + "}" + space)) : (withIndent(function(indent3) {
|
|
2345
|
-
var
|
|
2346
|
-
for (result.push(newline),
|
|
2347
|
-
result.push(indent3), result.push(that.generateExpression(stmt.specifiers[
|
|
2354
|
+
var i2, iz;
|
|
2355
|
+
for (result.push(newline), i2 = cursor, iz = stmt.specifiers.length; i2 < iz; ++i2)
|
|
2356
|
+
result.push(indent3), result.push(that.generateExpression(stmt.specifiers[i2], Precedence.Sequence, E_TTT)), i2 + 1 < iz && result.push("," + newline);
|
|
2348
2357
|
}), endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()) || result.push(newline), result.push(base2 + "}" + space)))), result = join7(result, [
|
|
2349
2358
|
"from" + space,
|
|
2350
2359
|
// ModuleSpecifier
|
|
@@ -2363,12 +2372,12 @@ var require_escodegen = __commonJS({
|
|
|
2363
2372
|
] : this.generatePattern(stmt.id, Precedence.Assignment, itemFlags);
|
|
2364
2373
|
},
|
|
2365
2374
|
VariableDeclaration: function(stmt, flags) {
|
|
2366
|
-
var result,
|
|
2375
|
+
var result, i2, iz, node, bodyFlags, that = this;
|
|
2367
2376
|
result = [stmt.kind], bodyFlags = flags & F_ALLOW_IN ? S_TFFF : S_FFFF;
|
|
2368
2377
|
function block() {
|
|
2369
2378
|
for (node = stmt.declarations[0], extra.comment && node.leadingComments ? (result.push(`
|
|
2370
|
-
`), result.push(addIndent(that.generateStatement(node, bodyFlags)))) : (result.push(noEmptySpace()), result.push(that.generateStatement(node, bodyFlags))),
|
|
2371
|
-
node = stmt.declarations[
|
|
2379
|
+
`), result.push(addIndent(that.generateStatement(node, bodyFlags)))) : (result.push(noEmptySpace()), result.push(that.generateStatement(node, bodyFlags))), i2 = 1, iz = stmt.declarations.length; i2 < iz; ++i2)
|
|
2380
|
+
node = stmt.declarations[i2], extra.comment && node.leadingComments ? (result.push("," + newline), result.push(addIndent(that.generateStatement(node, bodyFlags)))) : (result.push("," + space), result.push(that.generateStatement(node, bodyFlags)));
|
|
2372
2381
|
}
|
|
2373
2382
|
return stmt.declarations.length > 1 ? withIndent(block) : block(), result.push(this.semicolon(flags)), result;
|
|
2374
2383
|
},
|
|
@@ -2379,24 +2388,24 @@ var require_escodegen = __commonJS({
|
|
|
2379
2388
|
), this.semicolon(flags)];
|
|
2380
2389
|
},
|
|
2381
2390
|
TryStatement: function(stmt, flags) {
|
|
2382
|
-
var result,
|
|
2391
|
+
var result, i2, iz, guardedHandlers;
|
|
2383
2392
|
if (result = ["try", this.maybeBlock(stmt.block, S_TFFF)], result = this.maybeBlockSuffix(stmt.block, result), stmt.handlers)
|
|
2384
|
-
for (
|
|
2385
|
-
result = join7(result, this.generateStatement(stmt.handlers[
|
|
2393
|
+
for (i2 = 0, iz = stmt.handlers.length; i2 < iz; ++i2)
|
|
2394
|
+
result = join7(result, this.generateStatement(stmt.handlers[i2], S_TFFF)), (stmt.finalizer || i2 + 1 !== iz) && (result = this.maybeBlockSuffix(stmt.handlers[i2].body, result));
|
|
2386
2395
|
else {
|
|
2387
|
-
for (guardedHandlers = stmt.guardedHandlers || [],
|
|
2388
|
-
result = join7(result, this.generateStatement(guardedHandlers[
|
|
2396
|
+
for (guardedHandlers = stmt.guardedHandlers || [], i2 = 0, iz = guardedHandlers.length; i2 < iz; ++i2)
|
|
2397
|
+
result = join7(result, this.generateStatement(guardedHandlers[i2], S_TFFF)), (stmt.finalizer || i2 + 1 !== iz) && (result = this.maybeBlockSuffix(guardedHandlers[i2].body, result));
|
|
2389
2398
|
if (stmt.handler)
|
|
2390
2399
|
if (Array.isArray(stmt.handler))
|
|
2391
|
-
for (
|
|
2392
|
-
result = join7(result, this.generateStatement(stmt.handler[
|
|
2400
|
+
for (i2 = 0, iz = stmt.handler.length; i2 < iz; ++i2)
|
|
2401
|
+
result = join7(result, this.generateStatement(stmt.handler[i2], S_TFFF)), (stmt.finalizer || i2 + 1 !== iz) && (result = this.maybeBlockSuffix(stmt.handler[i2].body, result));
|
|
2393
2402
|
else
|
|
2394
2403
|
result = join7(result, this.generateStatement(stmt.handler, S_TFFF)), stmt.finalizer && (result = this.maybeBlockSuffix(stmt.handler.body, result));
|
|
2395
2404
|
}
|
|
2396
2405
|
return stmt.finalizer && (result = join7(result, ["finally", this.maybeBlock(stmt.finalizer, S_TFFF)])), result;
|
|
2397
2406
|
},
|
|
2398
2407
|
SwitchStatement: function(stmt, flags) {
|
|
2399
|
-
var result, fragment,
|
|
2408
|
+
var result, fragment, i2, iz, bodyFlags, that = this;
|
|
2400
2409
|
if (withIndent(function() {
|
|
2401
2410
|
result = [
|
|
2402
2411
|
"switch" + space + "(",
|
|
@@ -2404,18 +2413,18 @@ var require_escodegen = __commonJS({
|
|
|
2404
2413
|
")" + space + "{" + newline
|
|
2405
2414
|
];
|
|
2406
2415
|
}), stmt.cases)
|
|
2407
|
-
for (bodyFlags = S_TFFF,
|
|
2408
|
-
|
|
2416
|
+
for (bodyFlags = S_TFFF, i2 = 0, iz = stmt.cases.length; i2 < iz; ++i2)
|
|
2417
|
+
i2 === iz - 1 && (bodyFlags |= F_SEMICOLON_OPT), fragment = addIndent(this.generateStatement(stmt.cases[i2], bodyFlags)), result.push(fragment), endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString()) || result.push(newline);
|
|
2409
2418
|
return result.push(addIndent("}")), result;
|
|
2410
2419
|
},
|
|
2411
2420
|
SwitchCase: function(stmt, flags) {
|
|
2412
|
-
var result, fragment,
|
|
2421
|
+
var result, fragment, i2, iz, bodyFlags, that = this;
|
|
2413
2422
|
return withIndent(function() {
|
|
2414
2423
|
for (stmt.test ? result = [
|
|
2415
2424
|
join7("case", that.generateExpression(stmt.test, Precedence.Sequence, E_TTT)),
|
|
2416
2425
|
":"
|
|
2417
|
-
] : result = ["default:"],
|
|
2418
|
-
|
|
2426
|
+
] : result = ["default:"], i2 = 0, iz = stmt.consequent.length, iz && stmt.consequent[0].type === Syntax.BlockStatement && (fragment = that.maybeBlock(stmt.consequent[0], S_TFFF), result.push(fragment), i2 = 1), i2 !== iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()) && result.push(newline), bodyFlags = S_TFFF; i2 < iz; ++i2)
|
|
2427
|
+
i2 === iz - 1 && flags & F_SEMICOLON_OPT && (bodyFlags |= F_SEMICOLON_OPT), fragment = addIndent(that.generateStatement(stmt.consequent[i2], bodyFlags)), result.push(fragment), i2 + 1 !== iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString()) && result.push(newline);
|
|
2419
2428
|
}), result;
|
|
2420
2429
|
},
|
|
2421
2430
|
IfStatement: function(stmt, flags) {
|
|
@@ -2444,10 +2453,10 @@ var require_escodegen = __commonJS({
|
|
|
2444
2453
|
return [stmt.label.name + ":", this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF)];
|
|
2445
2454
|
},
|
|
2446
2455
|
Program: function(stmt, flags) {
|
|
2447
|
-
var result, fragment,
|
|
2456
|
+
var result, fragment, i2, iz, bodyFlags;
|
|
2448
2457
|
for (iz = stmt.body.length, result = [safeConcatenation && iz > 0 ? `
|
|
2449
|
-
` : ""], bodyFlags = S_TFTF,
|
|
2450
|
-
!safeConcatenation &&
|
|
2458
|
+
` : ""], bodyFlags = S_TFTF, i2 = 0; i2 < iz; ++i2)
|
|
2459
|
+
!safeConcatenation && i2 === iz - 1 && (bodyFlags |= F_SEMICOLON_OPT), preserveBlankLines && (i2 === 0 && (stmt.body[0].leadingComments || generateBlankLines(stmt.range[0], stmt.body[i2].range[0], result)), i2 > 0 && !stmt.body[i2 - 1].trailingComments && !stmt.body[i2].leadingComments && generateBlankLines(stmt.body[i2 - 1].range[1], stmt.body[i2].range[0], result)), fragment = addIndent(this.generateStatement(stmt.body[i2], bodyFlags)), result.push(fragment), i2 + 1 < iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString()) && (preserveBlankLines && stmt.body[i2 + 1].leadingComments || result.push(newline)), preserveBlankLines && i2 === iz - 1 && (stmt.body[i2].trailingComments || generateBlankLines(stmt.body[i2].range[1], stmt.range[1], result));
|
|
2451
2460
|
return result;
|
|
2452
2461
|
},
|
|
2453
2462
|
FunctionDeclaration: function(stmt, flags) {
|
|
@@ -2487,9 +2496,9 @@ var require_escodegen = __commonJS({
|
|
|
2487
2496
|
}
|
|
2488
2497
|
}, merge(CodeGenerator.prototype, CodeGenerator.Statement), CodeGenerator.Expression = {
|
|
2489
2498
|
SequenceExpression: function(expr, precedence, flags) {
|
|
2490
|
-
var result,
|
|
2491
|
-
for (Precedence.Sequence < precedence && (flags |= F_ALLOW_IN), result = [],
|
|
2492
|
-
result.push(this.generateExpression(expr.expressions[
|
|
2499
|
+
var result, i2, iz;
|
|
2500
|
+
for (Precedence.Sequence < precedence && (flags |= F_ALLOW_IN), result = [], i2 = 0, iz = expr.expressions.length; i2 < iz; ++i2)
|
|
2501
|
+
result.push(this.generateExpression(expr.expressions[i2], Precedence.Assignment, flags)), i2 + 1 < iz && result.push("," + space);
|
|
2493
2502
|
return parenthesize(result, Precedence.Sequence, precedence);
|
|
2494
2503
|
},
|
|
2495
2504
|
AssignmentExpression: function(expr, precedence, flags) {
|
|
@@ -2519,9 +2528,9 @@ var require_escodegen = __commonJS({
|
|
|
2519
2528
|
return currentPrecedence = BinaryPrecedence[expr.operator], leftPrecedence = expr.operator === "**" ? Precedence.Postfix : currentPrecedence, rightPrecedence = expr.operator === "**" ? currentPrecedence : currentPrecedence + 1, currentPrecedence < precedence && (flags |= F_ALLOW_IN), fragment = this.generateExpression(expr.left, leftPrecedence, flags), leftSource = fragment.toString(), leftSource.charCodeAt(leftSource.length - 1) === 47 && esutils.code.isIdentifierPartES5(expr.operator.charCodeAt(0)) ? result = [fragment, noEmptySpace(), expr.operator] : result = join7(fragment, expr.operator), fragment = this.generateExpression(expr.right, rightPrecedence, flags), expr.operator === "/" && fragment.toString().charAt(0) === "/" || expr.operator.slice(-1) === "<" && fragment.toString().slice(0, 3) === "!--" ? (result.push(noEmptySpace()), result.push(fragment)) : result = join7(result, fragment), expr.operator === "in" && !(flags & F_ALLOW_IN) ? ["(", result, ")"] : (expr.operator === "||" || expr.operator === "&&") && flags & F_FOUND_COALESCE ? ["(", result, ")"] : parenthesize(result, currentPrecedence, precedence);
|
|
2520
2529
|
},
|
|
2521
2530
|
CallExpression: function(expr, precedence, flags) {
|
|
2522
|
-
var result,
|
|
2523
|
-
for (result = [this.generateExpression(expr.callee, Precedence.Call, E_TTF)], expr.optional && result.push("?."), result.push("("),
|
|
2524
|
-
result.push(this.generateExpression(expr.arguments[
|
|
2531
|
+
var result, i2, iz;
|
|
2532
|
+
for (result = [this.generateExpression(expr.callee, Precedence.Call, E_TTF)], expr.optional && result.push("?."), result.push("("), i2 = 0, iz = expr.arguments.length; i2 < iz; ++i2)
|
|
2533
|
+
result.push(this.generateExpression(expr.arguments[i2], Precedence.Assignment, E_TTT)), i2 + 1 < iz && result.push("," + space);
|
|
2525
2534
|
return result.push(")"), flags & F_ALLOW_CALL ? parenthesize(result, Precedence.Call, precedence) : ["(", result, ")"];
|
|
2526
2535
|
},
|
|
2527
2536
|
ChainExpression: function(expr, precedence, flags) {
|
|
@@ -2530,13 +2539,13 @@ var require_escodegen = __commonJS({
|
|
|
2530
2539
|
return parenthesize(result, Precedence.OptionalChaining, precedence);
|
|
2531
2540
|
},
|
|
2532
2541
|
NewExpression: function(expr, precedence, flags) {
|
|
2533
|
-
var result, length,
|
|
2542
|
+
var result, length, i2, iz, itemFlags;
|
|
2534
2543
|
if (length = expr.arguments.length, itemFlags = flags & F_ALLOW_UNPARATH_NEW && !parentheses && length === 0 ? E_TFT : E_TFF, result = join7(
|
|
2535
2544
|
"new",
|
|
2536
2545
|
this.generateExpression(expr.callee, Precedence.New, itemFlags)
|
|
2537
2546
|
), !(flags & F_ALLOW_UNPARATH_NEW) || parentheses || length > 0) {
|
|
2538
|
-
for (result.push("("),
|
|
2539
|
-
result.push(this.generateExpression(expr.arguments[
|
|
2547
|
+
for (result.push("("), i2 = 0, iz = length; i2 < iz; ++i2)
|
|
2548
|
+
result.push(this.generateExpression(expr.arguments[i2], Precedence.Assignment, E_TTT)), i2 + 1 < iz && result.push("," + space);
|
|
2540
2549
|
result.push(")");
|
|
2541
2550
|
}
|
|
2542
2551
|
return parenthesize(result, Precedence.New, precedence);
|
|
@@ -2597,9 +2606,9 @@ var require_escodegen = __commonJS({
|
|
|
2597
2606
|
ArrayExpression: function(expr, precedence, flags, isPattern) {
|
|
2598
2607
|
var result, multiline, that = this;
|
|
2599
2608
|
return expr.elements.length ? (multiline = isPattern ? !1 : expr.elements.length > 1, result = ["[", multiline ? newline : ""], withIndent(function(indent3) {
|
|
2600
|
-
var
|
|
2601
|
-
for (
|
|
2602
|
-
expr.elements[
|
|
2609
|
+
var i2, iz;
|
|
2610
|
+
for (i2 = 0, iz = expr.elements.length; i2 < iz; ++i2)
|
|
2611
|
+
expr.elements[i2] ? (result.push(multiline ? indent3 : ""), result.push(that.generateExpression(expr.elements[i2], Precedence.Assignment, E_TTT))) : (multiline && result.push(indent3), i2 + 1 === iz && result.push(",")), i2 + 1 < iz && result.push("," + (multiline ? newline : space));
|
|
2603
2612
|
}), multiline && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()) && result.push(newline), result.push(multiline ? base2 : ""), result.push("]"), result) : "[]";
|
|
2604
2613
|
},
|
|
2605
2614
|
RestElement: function(expr, precedence, flags) {
|
|
@@ -2641,31 +2650,31 @@ var require_escodegen = __commonJS({
|
|
|
2641
2650
|
return expr.properties.length ? (multiline = expr.properties.length > 1, withIndent(function() {
|
|
2642
2651
|
fragment = that.generateExpression(expr.properties[0], Precedence.Sequence, E_TTT);
|
|
2643
2652
|
}), !multiline && !hasLineTerminator(toSourceNodeWhenNeeded(fragment).toString()) ? ["{", space, fragment, space, "}"] : (withIndent(function(indent3) {
|
|
2644
|
-
var
|
|
2653
|
+
var i2, iz;
|
|
2645
2654
|
if (result = ["{", newline, indent3, fragment], multiline)
|
|
2646
|
-
for (result.push("," + newline),
|
|
2647
|
-
result.push(indent3), result.push(that.generateExpression(expr.properties[
|
|
2655
|
+
for (result.push("," + newline), i2 = 1, iz = expr.properties.length; i2 < iz; ++i2)
|
|
2656
|
+
result.push(indent3), result.push(that.generateExpression(expr.properties[i2], Precedence.Sequence, E_TTT)), i2 + 1 < iz && result.push("," + newline);
|
|
2648
2657
|
}), endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()) || result.push(newline), result.push(base2), result.push("}"), result)) : "{}";
|
|
2649
2658
|
},
|
|
2650
2659
|
AssignmentPattern: function(expr, precedence, flags) {
|
|
2651
2660
|
return this.generateAssignment(expr.left, expr.right, "=", precedence, flags);
|
|
2652
2661
|
},
|
|
2653
2662
|
ObjectPattern: function(expr, precedence, flags) {
|
|
2654
|
-
var result,
|
|
2663
|
+
var result, i2, iz, multiline, property, that = this;
|
|
2655
2664
|
if (!expr.properties.length)
|
|
2656
2665
|
return "{}";
|
|
2657
2666
|
if (multiline = !1, expr.properties.length === 1)
|
|
2658
2667
|
property = expr.properties[0], property.type === Syntax.Property && property.value.type !== Syntax.Identifier && (multiline = !0);
|
|
2659
2668
|
else
|
|
2660
|
-
for (
|
|
2661
|
-
if (property = expr.properties[
|
|
2669
|
+
for (i2 = 0, iz = expr.properties.length; i2 < iz; ++i2)
|
|
2670
|
+
if (property = expr.properties[i2], property.type === Syntax.Property && !property.shorthand) {
|
|
2662
2671
|
multiline = !0;
|
|
2663
2672
|
break;
|
|
2664
2673
|
}
|
|
2665
2674
|
return result = ["{", multiline ? newline : ""], withIndent(function(indent3) {
|
|
2666
|
-
var
|
|
2667
|
-
for (
|
|
2668
|
-
result.push(multiline ? indent3 : ""), result.push(that.generateExpression(expr.properties[
|
|
2675
|
+
var i3, iz2;
|
|
2676
|
+
for (i3 = 0, iz2 = expr.properties.length; i3 < iz2; ++i3)
|
|
2677
|
+
result.push(multiline ? indent3 : ""), result.push(that.generateExpression(expr.properties[i3], Precedence.Sequence, E_TTT)), i3 + 1 < iz2 && result.push("," + (multiline ? newline : space));
|
|
2669
2678
|
}), multiline && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()) && result.push(newline), result.push(multiline ? base2 : ""), result.push("}"), result;
|
|
2670
2679
|
},
|
|
2671
2680
|
ThisExpression: function(expr, precedence, flags) {
|
|
@@ -2706,10 +2715,10 @@ var require_escodegen = __commonJS({
|
|
|
2706
2715
|
return this.ComprehensionExpression(expr, precedence, flags);
|
|
2707
2716
|
},
|
|
2708
2717
|
ComprehensionExpression: function(expr, precedence, flags) {
|
|
2709
|
-
var result,
|
|
2718
|
+
var result, i2, iz, fragment, that = this;
|
|
2710
2719
|
return result = expr.type === Syntax.GeneratorExpression ? ["("] : ["["], extra.moz.comprehensionExpressionStartsWithAssignment && (fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT), result.push(fragment)), expr.blocks && withIndent(function() {
|
|
2711
|
-
for (
|
|
2712
|
-
fragment = that.generateExpression(expr.blocks[
|
|
2720
|
+
for (i2 = 0, iz = expr.blocks.length; i2 < iz; ++i2)
|
|
2721
|
+
fragment = that.generateExpression(expr.blocks[i2], Precedence.Sequence, E_TTT), i2 > 0 || extra.moz.comprehensionExpressionStartsWithAssignment ? result = join7(result, fragment) : result.push(fragment);
|
|
2713
2722
|
}), expr.filter && (result = join7(result, "if" + space), fragment = this.generateExpression(expr.filter, Precedence.Sequence, E_TTT), result = join7(result, ["(", fragment, ")"])), extra.moz.comprehensionExpressionStartsWithAssignment || (fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT), result = join7(result, fragment)), result.push(expr.type === Syntax.GeneratorExpression ? ")" : "]"), result;
|
|
2714
2723
|
},
|
|
2715
2724
|
ComprehensionBlock: function(expr, precedence, flags) {
|
|
@@ -2739,9 +2748,9 @@ var require_escodegen = __commonJS({
|
|
|
2739
2748
|
return expr.value.raw;
|
|
2740
2749
|
},
|
|
2741
2750
|
TemplateLiteral: function(expr, precedence, flags) {
|
|
2742
|
-
var result,
|
|
2743
|
-
for (result = ["`"],
|
|
2744
|
-
result.push(this.generateExpression(expr.quasis[
|
|
2751
|
+
var result, i2, iz;
|
|
2752
|
+
for (result = ["`"], i2 = 0, iz = expr.quasis.length; i2 < iz; ++i2)
|
|
2753
|
+
result.push(this.generateExpression(expr.quasis[i2], Precedence.Primary, E_TTT)), i2 + 1 < iz && (result.push("${" + space), result.push(this.generateExpression(expr.expressions[i2], Precedence.Sequence, E_TTT)), result.push(space + "}"));
|
|
2745
2754
|
return result.push("`"), result;
|
|
2746
2755
|
},
|
|
2747
2756
|
ModuleSpecifier: function(expr, precedence, flags) {
|
|
@@ -2825,14 +2834,14 @@ var require_dist = __commonJS({
|
|
|
2825
2834
|
}
|
|
2826
2835
|
strings[0] = strings[0].replace(/^\r?\n/, "");
|
|
2827
2836
|
var string = strings[0];
|
|
2828
|
-
return values.forEach(function(value,
|
|
2837
|
+
return values.forEach(function(value, i2) {
|
|
2829
2838
|
var endentations = string.match(/(?:^|\n)( *)$/), endentation = endentations ? endentations[1] : "", indentedValue = value;
|
|
2830
2839
|
typeof value == "string" && value.includes(`
|
|
2831
2840
|
`) && (indentedValue = String(value).split(`
|
|
2832
|
-
`).map(function(str,
|
|
2833
|
-
return
|
|
2841
|
+
`).map(function(str, i3) {
|
|
2842
|
+
return i3 === 0 ? str : "" + endentation + str;
|
|
2834
2843
|
}).join(`
|
|
2835
|
-
`)), string += indentedValue + strings[
|
|
2844
|
+
`)), string += indentedValue + strings[i2 + 1];
|
|
2836
2845
|
}), string;
|
|
2837
2846
|
}
|
|
2838
2847
|
exports.dedent = dedent3;
|
|
@@ -2867,10 +2876,10 @@ __export(acorn_exports, {
|
|
|
2867
2876
|
version: () => version
|
|
2868
2877
|
});
|
|
2869
2878
|
function isInAstralSet(code, set) {
|
|
2870
|
-
for (var pos = 65536,
|
|
2871
|
-
if (pos += set[
|
|
2879
|
+
for (var pos = 65536, i2 = 0; i2 < set.length; i2 += 2) {
|
|
2880
|
+
if (pos += set[i2], pos > code)
|
|
2872
2881
|
return !1;
|
|
2873
|
-
if (pos += set[
|
|
2882
|
+
if (pos += set[i2 + 1], pos >= code)
|
|
2874
2883
|
return !0;
|
|
2875
2884
|
}
|
|
2876
2885
|
return !1;
|
|
@@ -2892,10 +2901,10 @@ function isNewLine(code) {
|
|
|
2892
2901
|
}
|
|
2893
2902
|
function nextLineBreak(code, from, end) {
|
|
2894
2903
|
end === void 0 && (end = code.length);
|
|
2895
|
-
for (var
|
|
2896
|
-
var next = code.charCodeAt(
|
|
2904
|
+
for (var i2 = from; i2 < end; i2++) {
|
|
2905
|
+
var next = code.charCodeAt(i2);
|
|
2897
2906
|
if (isNewLine(next))
|
|
2898
|
-
return
|
|
2907
|
+
return i2 < end - 1 && next === 13 && code.charCodeAt(i2 + 1) === 10 ? i2 + 2 : i2 + 1;
|
|
2899
2908
|
}
|
|
2900
2909
|
return -1;
|
|
2901
2910
|
}
|
|
@@ -2957,13 +2966,13 @@ function isPrivateFieldAccess(node) {
|
|
|
2957
2966
|
function finishNodeAt(node, type, pos, loc) {
|
|
2958
2967
|
return node.type = type, node.end = pos, this.options.locations && (node.loc.end = loc), this.options.ranges && (node.range[1] = pos), node;
|
|
2959
2968
|
}
|
|
2960
|
-
function buildUnicodeData(
|
|
2961
|
-
var d = data[
|
|
2962
|
-
binary: wordsRegexp(unicodeBinaryProperties[
|
|
2963
|
-
binaryOfStrings: wordsRegexp(unicodeBinaryPropertiesOfStrings[
|
|
2969
|
+
function buildUnicodeData(ecmaVersion2) {
|
|
2970
|
+
var d = data[ecmaVersion2] = {
|
|
2971
|
+
binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion2] + " " + unicodeGeneralCategoryValues),
|
|
2972
|
+
binaryOfStrings: wordsRegexp(unicodeBinaryPropertiesOfStrings[ecmaVersion2]),
|
|
2964
2973
|
nonBinary: {
|
|
2965
2974
|
General_Category: wordsRegexp(unicodeGeneralCategoryValues),
|
|
2966
|
-
Script: wordsRegexp(unicodeScriptValues[
|
|
2975
|
+
Script: wordsRegexp(unicodeScriptValues[ecmaVersion2])
|
|
2967
2976
|
}
|
|
2968
2977
|
};
|
|
2969
2978
|
d.nonBinary.Script_Extensions = d.nonBinary.Script, d.nonBinary.gc = d.nonBinary.General_Category, d.nonBinary.sc = d.nonBinary.Script, d.nonBinary.scx = d.nonBinary.Script_Extensions;
|
|
@@ -3281,8 +3290,8 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
3281
3290
|
return (this.currentVarScope().flags & SCOPE_ASYNC) > 0;
|
|
3282
3291
|
};
|
|
3283
3292
|
prototypeAccessors.canAwait.get = function() {
|
|
3284
|
-
for (var
|
|
3285
|
-
var ref2 = this.scopeStack[
|
|
3293
|
+
for (var i2 = this.scopeStack.length - 1; i2 >= 0; i2--) {
|
|
3294
|
+
var ref2 = this.scopeStack[i2], flags = ref2.flags;
|
|
3286
3295
|
if (flags & (SCOPE_CLASS_STATIC_BLOCK | SCOPE_CLASS_FIELD_INIT))
|
|
3287
3296
|
return !1;
|
|
3288
3297
|
if (flags & SCOPE_FUNCTION)
|
|
@@ -3301,8 +3310,8 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
3301
3310
|
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
3302
3311
|
};
|
|
3303
3312
|
prototypeAccessors.allowNewDotTarget.get = function() {
|
|
3304
|
-
for (var
|
|
3305
|
-
var ref2 = this.scopeStack[
|
|
3313
|
+
for (var i2 = this.scopeStack.length - 1; i2 >= 0; i2--) {
|
|
3314
|
+
var ref2 = this.scopeStack[i2], flags = ref2.flags;
|
|
3306
3315
|
if (flags & (SCOPE_CLASS_STATIC_BLOCK | SCOPE_CLASS_FIELD_INIT) || flags & SCOPE_FUNCTION && !(flags & SCOPE_ARROW))
|
|
3307
3316
|
return !0;
|
|
3308
3317
|
}
|
|
@@ -3313,8 +3322,8 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
3313
3322
|
};
|
|
3314
3323
|
Parser.extend = function() {
|
|
3315
3324
|
for (var plugins = [], len = arguments.length; len--; ) plugins[len] = arguments[len];
|
|
3316
|
-
for (var cls = this,
|
|
3317
|
-
cls = plugins[
|
|
3325
|
+
for (var cls = this, i2 = 0; i2 < plugins.length; i2++)
|
|
3326
|
+
cls = plugins[i2](cls);
|
|
3318
3327
|
return cls;
|
|
3319
3328
|
};
|
|
3320
3329
|
Parser.parse = function(input, options) {
|
|
@@ -3409,8 +3418,8 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
3409
3418
|
node.body.push(stmt);
|
|
3410
3419
|
}
|
|
3411
3420
|
if (this.inModule)
|
|
3412
|
-
for (var
|
|
3413
|
-
var name =
|
|
3421
|
+
for (var i2 = 0, list2 = Object.keys(this.undefinedExports); i2 < list2.length; i2 += 1) {
|
|
3422
|
+
var name = list2[i2];
|
|
3414
3423
|
this.raiseRecoverable(this.undefinedExports[name].start, "Export '" + name + "' is not defined");
|
|
3415
3424
|
}
|
|
3416
3425
|
return this.adaptDirectivePrologue(node.body), this.next(), node.sourceType = this.options.sourceType, this.finishNode(node, "Program");
|
|
@@ -3539,12 +3548,12 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
3539
3548
|
pp$8.parseBreakContinueStatement = function(node, keyword) {
|
|
3540
3549
|
var isBreak = keyword === "break";
|
|
3541
3550
|
this.next(), this.eat(types$1.semi) || this.insertSemicolon() ? node.label = null : this.type !== types$1.name ? this.unexpected() : (node.label = this.parseIdent(), this.semicolon());
|
|
3542
|
-
for (var
|
|
3543
|
-
var lab = this.labels[
|
|
3551
|
+
for (var i2 = 0; i2 < this.labels.length; ++i2) {
|
|
3552
|
+
var lab = this.labels[i2];
|
|
3544
3553
|
if ((node.label == null || lab.name === node.label.name) && (lab.kind != null && (isBreak || lab.kind === "loop") || node.label && isBreak))
|
|
3545
3554
|
break;
|
|
3546
3555
|
}
|
|
3547
|
-
return
|
|
3556
|
+
return i2 === this.labels.length && this.raise(node.start, "Unsyntactic " + keyword), this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
|
|
3548
3557
|
};
|
|
3549
3558
|
pp$8.parseDebuggerStatement = function(node) {
|
|
3550
3559
|
return this.next(), this.semicolon(), this.finishNode(node, "DebuggerStatement");
|
|
@@ -3620,12 +3629,12 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
3620
3629
|
return this.next(), this.finishNode(node, "EmptyStatement");
|
|
3621
3630
|
};
|
|
3622
3631
|
pp$8.parseLabeledStatement = function(node, maybeName, expr, context) {
|
|
3623
|
-
for (var i$1 = 0,
|
|
3624
|
-
var label =
|
|
3632
|
+
for (var i$1 = 0, list2 = this.labels; i$1 < list2.length; i$1 += 1) {
|
|
3633
|
+
var label = list2[i$1];
|
|
3625
3634
|
label.name === maybeName && this.raise(expr.start, "Label '" + maybeName + "' is already declared");
|
|
3626
3635
|
}
|
|
3627
|
-
for (var kind = this.type.isLoop ? "loop" : this.type === types$1._switch ? "switch" : null,
|
|
3628
|
-
var label$1 = this.labels[
|
|
3636
|
+
for (var kind = this.type.isLoop ? "loop" : this.type === types$1._switch ? "switch" : null, i2 = this.labels.length - 1; i2 >= 0; i2--) {
|
|
3637
|
+
var label$1 = this.labels[i2];
|
|
3629
3638
|
if (label$1.statementStart === node.start)
|
|
3630
3639
|
label$1.statementStart = this.start, label$1.kind = kind;
|
|
3631
3640
|
else
|
|
@@ -3687,17 +3696,17 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
3687
3696
|
pp$8.parseClassElement = function(constructorAllowsSuper) {
|
|
3688
3697
|
if (this.eat(types$1.semi))
|
|
3689
3698
|
return null;
|
|
3690
|
-
var
|
|
3699
|
+
var ecmaVersion2 = this.options.ecmaVersion, node = this.startNode(), keyName = "", isGenerator = !1, isAsync = !1, kind = "method", isStatic = !1;
|
|
3691
3700
|
if (this.eatContextual("static")) {
|
|
3692
|
-
if (
|
|
3701
|
+
if (ecmaVersion2 >= 13 && this.eat(types$1.braceL))
|
|
3693
3702
|
return this.parseClassStaticBlock(node), node;
|
|
3694
3703
|
this.isClassElementNameStart() || this.type === types$1.star ? isStatic = !0 : keyName = "static";
|
|
3695
3704
|
}
|
|
3696
|
-
if (node.static = isStatic, !keyName &&
|
|
3705
|
+
if (node.static = isStatic, !keyName && ecmaVersion2 >= 8 && this.eatContextual("async") && ((this.isClassElementNameStart() || this.type === types$1.star) && !this.canInsertSemicolon() ? isAsync = !0 : keyName = "async"), !keyName && (ecmaVersion2 >= 9 || !isAsync) && this.eat(types$1.star) && (isGenerator = !0), !keyName && !isAsync && !isGenerator) {
|
|
3697
3706
|
var lastValue = this.value;
|
|
3698
3707
|
(this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ? kind = lastValue : keyName = lastValue);
|
|
3699
3708
|
}
|
|
3700
|
-
if (keyName ? (node.computed = !1, node.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), node.key.name = keyName, this.finishNode(node.key, "Identifier")) : this.parseClassElementName(node),
|
|
3709
|
+
if (keyName ? (node.computed = !1, node.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), node.key.name = keyName, this.finishNode(node.key, "Identifier")) : this.parseClassElementName(node), ecmaVersion2 < 13 || this.type === types$1.parenL || kind !== "method" || isGenerator || isAsync) {
|
|
3701
3710
|
var isConstructor = !node.static && checkKeyName(node, "constructor"), allowsDirectSuper = isConstructor && constructorAllowsSuper;
|
|
3702
3711
|
isConstructor && kind !== "method" && this.raise(node.key.start, "Constructor can't have get/set modifier"), node.kind = isConstructor ? "constructor" : kind, this.parseClassMethod(node, isGenerator, isAsync, allowsDirectSuper);
|
|
3703
3712
|
} else
|
|
@@ -3741,8 +3750,8 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
3741
3750
|
pp$8.exitClassBody = function() {
|
|
3742
3751
|
var ref2 = this.privateNameStack.pop(), declared = ref2.declared, used = ref2.used;
|
|
3743
3752
|
if (this.options.checkPrivateFields)
|
|
3744
|
-
for (var len = this.privateNameStack.length, parent = len === 0 ? null : this.privateNameStack[len - 1],
|
|
3745
|
-
var id = used[
|
|
3753
|
+
for (var len = this.privateNameStack.length, parent = len === 0 ? null : this.privateNameStack[len - 1], i2 = 0; i2 < used.length; ++i2) {
|
|
3754
|
+
var id = used[i2];
|
|
3746
3755
|
hasOwn(declared, id.name) || (parent ? parent.used.push(id) : this.raiseRecoverable(id.start, "Private field '#" + id.name + "' must be declared in an enclosing class"));
|
|
3747
3756
|
}
|
|
3748
3757
|
};
|
|
@@ -3760,8 +3769,8 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
3760
3769
|
if (node.declaration = null, node.specifiers = this.parseExportSpecifiers(exports), this.eatContextual("from"))
|
|
3761
3770
|
this.type !== types$1.string && this.unexpected(), node.source = this.parseExprAtom(), this.options.ecmaVersion >= 16 && (node.attributes = this.parseWithClause());
|
|
3762
3771
|
else {
|
|
3763
|
-
for (var
|
|
3764
|
-
var spec =
|
|
3772
|
+
for (var i2 = 0, list2 = node.specifiers; i2 < list2.length; i2 += 1) {
|
|
3773
|
+
var spec = list2[i2];
|
|
3765
3774
|
this.checkUnreserved(spec.local), this.checkLocalExport(spec.local), spec.local.type === "Literal" && this.raise(spec.local.start, "A string literal cannot be used as an exported binding without `from`.");
|
|
3766
3775
|
}
|
|
3767
3776
|
node.source = null, this.options.ecmaVersion >= 16 && (node.attributes = []);
|
|
@@ -3794,8 +3803,8 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
3794
3803
|
if (type === "Identifier")
|
|
3795
3804
|
this.checkExport(exports, pat, pat.start);
|
|
3796
3805
|
else if (type === "ObjectPattern")
|
|
3797
|
-
for (var
|
|
3798
|
-
var prop =
|
|
3806
|
+
for (var i2 = 0, list2 = pat.properties; i2 < list2.length; i2 += 1) {
|
|
3807
|
+
var prop = list2[i2];
|
|
3799
3808
|
this.checkPatternExport(exports, prop);
|
|
3800
3809
|
}
|
|
3801
3810
|
else if (type === "ArrayPattern")
|
|
@@ -3807,8 +3816,8 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
3807
3816
|
};
|
|
3808
3817
|
pp$8.checkVariableExport = function(exports, decls) {
|
|
3809
3818
|
if (exports)
|
|
3810
|
-
for (var
|
|
3811
|
-
var decl =
|
|
3819
|
+
for (var i2 = 0, list2 = decls; i2 < list2.length; i2 += 1) {
|
|
3820
|
+
var decl = list2[i2];
|
|
3812
3821
|
this.checkPatternExport(exports, decl.id);
|
|
3813
3822
|
}
|
|
3814
3823
|
};
|
|
@@ -3891,8 +3900,8 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
3891
3900
|
return this.parseIdent(!0);
|
|
3892
3901
|
};
|
|
3893
3902
|
pp$8.adaptDirectivePrologue = function(statements) {
|
|
3894
|
-
for (var
|
|
3895
|
-
statements[
|
|
3903
|
+
for (var i2 = 0; i2 < statements.length && this.isDirectiveCandidate(statements[i2]); ++i2)
|
|
3904
|
+
statements[i2].directive = statements[i2].expression.raw.slice(1, -1);
|
|
3896
3905
|
};
|
|
3897
3906
|
pp$8.isDirectiveCandidate = function(statement) {
|
|
3898
3907
|
return this.options.ecmaVersion >= 5 && statement.type === "ExpressionStatement" && statement.expression.type === "Literal" && typeof statement.expression.value == "string" && // Reject parenthesized strings.
|
|
@@ -3912,8 +3921,8 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
3912
3921
|
break;
|
|
3913
3922
|
case "ObjectExpression":
|
|
3914
3923
|
node.type = "ObjectPattern", refDestructuringErrors && this.checkPatternErrors(refDestructuringErrors, !0);
|
|
3915
|
-
for (var
|
|
3916
|
-
var prop =
|
|
3924
|
+
for (var i2 = 0, list2 = node.properties; i2 < list2.length; i2 += 1) {
|
|
3925
|
+
var prop = list2[i2];
|
|
3917
3926
|
this.toAssignable(prop, isBinding), prop.type === "RestElement" && (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern") && this.raise(prop.argument.start, "Unexpected token");
|
|
3918
3927
|
}
|
|
3919
3928
|
break;
|
|
@@ -3945,8 +3954,8 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
3945
3954
|
return node;
|
|
3946
3955
|
};
|
|
3947
3956
|
pp$7.toAssignableList = function(exprList, isBinding) {
|
|
3948
|
-
for (var end = exprList.length,
|
|
3949
|
-
var elt = exprList[
|
|
3957
|
+
for (var end = exprList.length, i2 = 0; i2 < end; i2++) {
|
|
3958
|
+
var elt = exprList[i2];
|
|
3950
3959
|
elt && this.toAssignable(elt, isBinding);
|
|
3951
3960
|
}
|
|
3952
3961
|
if (end) {
|
|
@@ -4025,8 +4034,8 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
4025
4034
|
pp$7.checkLValPattern = function(expr, bindingType, checkClashes) {
|
|
4026
4035
|
switch (bindingType === void 0 && (bindingType = BIND_NONE), expr.type) {
|
|
4027
4036
|
case "ObjectPattern":
|
|
4028
|
-
for (var
|
|
4029
|
-
var prop =
|
|
4037
|
+
for (var i2 = 0, list2 = expr.properties; i2 < list2.length; i2 += 1) {
|
|
4038
|
+
var prop = list2[i2];
|
|
4030
4039
|
this.checkLValInnerPattern(prop, bindingType, checkClashes);
|
|
4031
4040
|
}
|
|
4032
4041
|
break;
|
|
@@ -4082,8 +4091,8 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
4082
4091
|
return parent === types.f_expr || parent === types.f_stat ? !0 : prevType === types$1.colon && (parent === types.b_stat || parent === types.b_expr) ? !parent.isExpr : prevType === types$1._return || prevType === types$1.name && this.exprAllowed ? lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) : prevType === types$1._else || prevType === types$1.semi || prevType === types$1.eof || prevType === types$1.parenR || prevType === types$1.arrow ? !0 : prevType === types$1.braceL ? parent === types.b_stat : prevType === types$1._var || prevType === types$1._const || prevType === types$1.name ? !1 : !this.exprAllowed;
|
|
4083
4092
|
};
|
|
4084
4093
|
pp$6.inGeneratorContext = function() {
|
|
4085
|
-
for (var
|
|
4086
|
-
var context = this.context[
|
|
4094
|
+
for (var i2 = this.context.length - 1; i2 >= 1; i2--) {
|
|
4095
|
+
var context = this.context[i2];
|
|
4087
4096
|
if (context.token === "function")
|
|
4088
4097
|
return context.generator;
|
|
4089
4098
|
}
|
|
@@ -4530,16 +4539,16 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
4530
4539
|
this.exitScope();
|
|
4531
4540
|
};
|
|
4532
4541
|
pp$5.isSimpleParamList = function(params) {
|
|
4533
|
-
for (var
|
|
4534
|
-
var param =
|
|
4542
|
+
for (var i2 = 0, list2 = params; i2 < list2.length; i2 += 1) {
|
|
4543
|
+
var param = list2[i2];
|
|
4535
4544
|
if (param.type !== "Identifier")
|
|
4536
4545
|
return !1;
|
|
4537
4546
|
}
|
|
4538
4547
|
return !0;
|
|
4539
4548
|
};
|
|
4540
4549
|
pp$5.checkParams = function(node, allowDuplicates) {
|
|
4541
|
-
for (var nameHash = /* @__PURE__ */ Object.create(null),
|
|
4542
|
-
var param =
|
|
4550
|
+
for (var nameHash = /* @__PURE__ */ Object.create(null), i2 = 0, list2 = node.params; i2 < list2.length; i2 += 1) {
|
|
4551
|
+
var param = list2[i2];
|
|
4543
4552
|
this.checkLValInnerPattern(param, BIND_VAR, allowDuplicates ? null : nameHash);
|
|
4544
4553
|
}
|
|
4545
4554
|
};
|
|
@@ -4619,8 +4628,8 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
4619
4628
|
var scope$2 = this.currentScope();
|
|
4620
4629
|
this.treatFunctionsAsVar ? redeclared = scope$2.lexical.indexOf(name) > -1 : redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1, scope$2.functions.push(name);
|
|
4621
4630
|
} else
|
|
4622
|
-
for (var
|
|
4623
|
-
var scope$3 = this.scopeStack[
|
|
4631
|
+
for (var i2 = this.scopeStack.length - 1; i2 >= 0; --i2) {
|
|
4632
|
+
var scope$3 = this.scopeStack[i2];
|
|
4624
4633
|
if (scope$3.lexical.indexOf(name) > -1 && !(scope$3.flags & SCOPE_SIMPLE_CATCH && scope$3.lexical[0] === name) || !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) {
|
|
4625
4634
|
redeclared = !0;
|
|
4626
4635
|
break;
|
|
@@ -4637,15 +4646,15 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
4637
4646
|
return this.scopeStack[this.scopeStack.length - 1];
|
|
4638
4647
|
};
|
|
4639
4648
|
pp$3.currentVarScope = function() {
|
|
4640
|
-
for (var
|
|
4641
|
-
var scope = this.scopeStack[
|
|
4649
|
+
for (var i2 = this.scopeStack.length - 1; ; i2--) {
|
|
4650
|
+
var scope = this.scopeStack[i2];
|
|
4642
4651
|
if (scope.flags & (SCOPE_VAR | SCOPE_CLASS_FIELD_INIT | SCOPE_CLASS_STATIC_BLOCK))
|
|
4643
4652
|
return scope;
|
|
4644
4653
|
}
|
|
4645
4654
|
};
|
|
4646
4655
|
pp$3.currentThisScope = function() {
|
|
4647
|
-
for (var
|
|
4648
|
-
var scope = this.scopeStack[
|
|
4656
|
+
for (var i2 = this.scopeStack.length - 1; ; i2--) {
|
|
4657
|
+
var scope = this.scopeStack[i2];
|
|
4649
4658
|
if (scope.flags & (SCOPE_VAR | SCOPE_CLASS_FIELD_INIT | SCOPE_CLASS_STATIC_BLOCK) && !(scope.flags & SCOPE_ARROW))
|
|
4650
4659
|
return scope;
|
|
4651
4660
|
}
|
|
@@ -4718,24 +4727,24 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
4718
4727
|
RegExpValidationState.prototype.raise = function(message) {
|
|
4719
4728
|
this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + message);
|
|
4720
4729
|
};
|
|
4721
|
-
RegExpValidationState.prototype.at = function(
|
|
4730
|
+
RegExpValidationState.prototype.at = function(i2, forceU) {
|
|
4722
4731
|
forceU === void 0 && (forceU = !1);
|
|
4723
4732
|
var s = this.source, l = s.length;
|
|
4724
|
-
if (
|
|
4733
|
+
if (i2 >= l)
|
|
4725
4734
|
return -1;
|
|
4726
|
-
var c = s.charCodeAt(
|
|
4727
|
-
if (!(forceU || this.switchU) || c <= 55295 || c >= 57344 ||
|
|
4735
|
+
var c = s.charCodeAt(i2);
|
|
4736
|
+
if (!(forceU || this.switchU) || c <= 55295 || c >= 57344 || i2 + 1 >= l)
|
|
4728
4737
|
return c;
|
|
4729
|
-
var next = s.charCodeAt(
|
|
4738
|
+
var next = s.charCodeAt(i2 + 1);
|
|
4730
4739
|
return next >= 56320 && next <= 57343 ? (c << 10) + next - 56613888 : c;
|
|
4731
4740
|
};
|
|
4732
|
-
RegExpValidationState.prototype.nextIndex = function(
|
|
4741
|
+
RegExpValidationState.prototype.nextIndex = function(i2, forceU) {
|
|
4733
4742
|
forceU === void 0 && (forceU = !1);
|
|
4734
4743
|
var s = this.source, l = s.length;
|
|
4735
|
-
if (
|
|
4744
|
+
if (i2 >= l)
|
|
4736
4745
|
return l;
|
|
4737
|
-
var c = s.charCodeAt(
|
|
4738
|
-
return !(forceU || this.switchU) || c <= 55295 || c >= 57344 ||
|
|
4746
|
+
var c = s.charCodeAt(i2), next;
|
|
4747
|
+
return !(forceU || this.switchU) || c <= 55295 || c >= 57344 || i2 + 1 >= l || (next = s.charCodeAt(i2 + 1)) < 56320 || next > 57343 ? i2 + 1 : i2 + 2;
|
|
4739
4748
|
};
|
|
4740
4749
|
RegExpValidationState.prototype.current = function(forceU) {
|
|
4741
4750
|
return forceU === void 0 && (forceU = !1), this.at(this.pos, forceU);
|
|
@@ -4751,8 +4760,8 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
4751
4760
|
};
|
|
4752
4761
|
RegExpValidationState.prototype.eatChars = function(chs, forceU) {
|
|
4753
4762
|
forceU === void 0 && (forceU = !1);
|
|
4754
|
-
for (var pos = this.pos,
|
|
4755
|
-
var ch =
|
|
4763
|
+
for (var pos = this.pos, i2 = 0, list2 = chs; i2 < list2.length; i2 += 1) {
|
|
4764
|
+
var ch = list2[i2], current2 = this.at(pos, forceU);
|
|
4756
4765
|
if (current2 === -1 || current2 !== ch)
|
|
4757
4766
|
return !1;
|
|
4758
4767
|
pos = this.nextIndex(pos, forceU);
|
|
@@ -4760,9 +4769,9 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
4760
4769
|
return this.pos = pos, !0;
|
|
4761
4770
|
};
|
|
4762
4771
|
pp$1.validateRegExpFlags = function(state) {
|
|
4763
|
-
for (var validFlags = state.validFlags, flags = state.flags, u = !1, v = !1,
|
|
4764
|
-
var flag = flags.charAt(
|
|
4765
|
-
validFlags.indexOf(flag) === -1 && this.raise(state.start, "Invalid regular expression flag"), flags.indexOf(flag,
|
|
4772
|
+
for (var validFlags = state.validFlags, flags = state.flags, u = !1, v = !1, i2 = 0; i2 < flags.length; i2++) {
|
|
4773
|
+
var flag = flags.charAt(i2);
|
|
4774
|
+
validFlags.indexOf(flag) === -1 && this.raise(state.start, "Invalid regular expression flag"), flags.indexOf(flag, i2 + 1) > -1 && this.raise(state.start, "Duplicate regular expression flag"), flag === "u" && (u = !0), flag === "v" && (v = !0);
|
|
4766
4775
|
}
|
|
4767
4776
|
this.options.ecmaVersion >= 15 && u && v && this.raise(state.start, "Invalid regular expression flag");
|
|
4768
4777
|
};
|
|
@@ -4780,8 +4789,8 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
4780
4789
|
125
|
|
4781
4790
|
/* } */
|
|
4782
4791
|
)) && state.raise("Lone quantifier brackets")), state.maxBackReference > state.numCapturingParens && state.raise("Invalid escape");
|
|
4783
|
-
for (var
|
|
4784
|
-
var name =
|
|
4792
|
+
for (var i2 = 0, list2 = state.backReferenceNames; i2 < list2.length; i2 += 1) {
|
|
4793
|
+
var name = list2[i2];
|
|
4785
4794
|
state.groupNames[name] || state.raise("Invalid named capture referenced");
|
|
4786
4795
|
}
|
|
4787
4796
|
};
|
|
@@ -4924,9 +4933,9 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
4924
4933
|
/* - */
|
|
4925
4934
|
);
|
|
4926
4935
|
if (addModifiers || hasHyphen) {
|
|
4927
|
-
for (var
|
|
4928
|
-
var modifier = addModifiers.charAt(
|
|
4929
|
-
addModifiers.indexOf(modifier,
|
|
4936
|
+
for (var i2 = 0; i2 < addModifiers.length; i2++) {
|
|
4937
|
+
var modifier = addModifiers.charAt(i2);
|
|
4938
|
+
addModifiers.indexOf(modifier, i2 + 1) > -1 && state.raise("Duplicate regular expression modifiers");
|
|
4930
4939
|
}
|
|
4931
4940
|
if (hasHyphen) {
|
|
4932
4941
|
var removeModifiers = this.regexp_eatModifiers(state);
|
|
@@ -5004,8 +5013,8 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
5004
5013
|
var trackDisjunction = this.options.ecmaVersion >= 16, known = state.groupNames[state.lastStringValue];
|
|
5005
5014
|
if (known)
|
|
5006
5015
|
if (trackDisjunction)
|
|
5007
|
-
for (var
|
|
5008
|
-
var altID =
|
|
5016
|
+
for (var i2 = 0, list2 = known; i2 < list2.length; i2 += 1) {
|
|
5017
|
+
var altID = list2[i2];
|
|
5009
5018
|
altID.separatedFrom(state.branchID) || state.raise("Duplicate capture group name");
|
|
5010
5019
|
}
|
|
5011
5020
|
else
|
|
@@ -5464,7 +5473,7 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
5464
5473
|
pp$1.regexp_eatFixedHexDigits = function(state, length) {
|
|
5465
5474
|
var start = state.pos;
|
|
5466
5475
|
state.lastIntValue = 0;
|
|
5467
|
-
for (var
|
|
5476
|
+
for (var i2 = 0; i2 < length; ++i2) {
|
|
5468
5477
|
var ch = state.current();
|
|
5469
5478
|
if (!isHexDigit(ch))
|
|
5470
5479
|
return state.pos = start, !1;
|
|
@@ -5621,8 +5630,8 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
5621
5630
|
return next === 61 ? this.finishOp(types$1.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2) : code === 61 && next === 62 && this.options.ecmaVersion >= 6 ? (this.pos += 2, this.finishToken(types$1.arrow)) : this.finishOp(code === 61 ? types$1.eq : types$1.prefix, 1);
|
|
5622
5631
|
};
|
|
5623
5632
|
pp.readToken_question = function() {
|
|
5624
|
-
var
|
|
5625
|
-
if (
|
|
5633
|
+
var ecmaVersion2 = this.options.ecmaVersion;
|
|
5634
|
+
if (ecmaVersion2 >= 11) {
|
|
5626
5635
|
var next = this.input.charCodeAt(this.pos + 1);
|
|
5627
5636
|
if (next === 46) {
|
|
5628
5637
|
var next2 = this.input.charCodeAt(this.pos + 2);
|
|
@@ -5630,7 +5639,7 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
5630
5639
|
return this.finishOp(types$1.questionDot, 2);
|
|
5631
5640
|
}
|
|
5632
5641
|
if (next === 63) {
|
|
5633
|
-
if (
|
|
5642
|
+
if (ecmaVersion2 >= 12) {
|
|
5634
5643
|
var next2$1 = this.input.charCodeAt(this.pos + 2);
|
|
5635
5644
|
if (next2$1 === 61)
|
|
5636
5645
|
return this.finishOp(types$1.assign, 3);
|
|
@@ -5641,8 +5650,8 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
5641
5650
|
return this.finishOp(types$1.question, 1);
|
|
5642
5651
|
};
|
|
5643
5652
|
pp.readToken_numberSign = function() {
|
|
5644
|
-
var
|
|
5645
|
-
if (
|
|
5653
|
+
var ecmaVersion2 = this.options.ecmaVersion, code = 35;
|
|
5654
|
+
if (ecmaVersion2 >= 13 && (++this.pos, code = this.fullCharCodeAtPos(), isIdentifierStart(code, !0) || code === 92))
|
|
5646
5655
|
return this.finishToken(types$1.privateId, this.readWord1());
|
|
5647
5656
|
this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'");
|
|
5648
5657
|
};
|
|
@@ -5768,10 +5777,10 @@ var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars,
|
|
|
5768
5777
|
return this.finishToken(types$1.regexp, { pattern, flags, value });
|
|
5769
5778
|
};
|
|
5770
5779
|
pp.readInt = function(radix, len, maybeLegacyOctalNumericLiteral) {
|
|
5771
|
-
for (var allowSeparators = this.options.ecmaVersion >= 12 && len === void 0, isLegacyOctalNumericLiteral = maybeLegacyOctalNumericLiteral && this.input.charCodeAt(this.pos) === 48, start = this.pos, total = 0, lastCode = 0,
|
|
5780
|
+
for (var allowSeparators = this.options.ecmaVersion >= 12 && len === void 0, isLegacyOctalNumericLiteral = maybeLegacyOctalNumericLiteral && this.input.charCodeAt(this.pos) === 48, start = this.pos, total = 0, lastCode = 0, i2 = 0, e = len ?? 1 / 0; i2 < e; ++i2, ++this.pos) {
|
|
5772
5781
|
var code = this.input.charCodeAt(this.pos), val = void 0;
|
|
5773
5782
|
if (allowSeparators && code === 95) {
|
|
5774
|
-
isLegacyOctalNumericLiteral && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), lastCode === 95 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"),
|
|
5783
|
+
isLegacyOctalNumericLiteral && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), lastCode === 95 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), i2 === 0 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), lastCode = code;
|
|
5775
5784
|
continue;
|
|
5776
5785
|
}
|
|
5777
5786
|
if (code >= 97 ? val = code - 97 + 10 : code >= 65 ? val = code - 65 + 10 : code >= 48 && code <= 57 ? val = code - 48 : val = 1 / 0, val >= radix)
|
|
@@ -6644,8 +6653,8 @@ var require_walk = __commonJS({
|
|
|
6644
6653
|
}
|
|
6645
6654
|
var base2 = {};
|
|
6646
6655
|
base2.Program = base2.BlockStatement = function(node, st, c) {
|
|
6647
|
-
for (var
|
|
6648
|
-
var stmt =
|
|
6656
|
+
for (var i2 = 0, list2 = node.body; i2 < list2.length; i2 += 1) {
|
|
6657
|
+
var stmt = list2[i2];
|
|
6649
6658
|
c(stmt, st, "Statement");
|
|
6650
6659
|
}
|
|
6651
6660
|
}, base2.Statement = skipThrough, base2.EmptyStatement = ignore, base2.ExpressionStatement = base2.ParenthesizedExpression = base2.ChainExpression = function(node, st, c) {
|
|
@@ -6661,15 +6670,15 @@ var require_walk = __commonJS({
|
|
|
6661
6670
|
for (var i$1 = 0, list$1 = node.cases; i$1 < list$1.length; i$1 += 1) {
|
|
6662
6671
|
var cs = list$1[i$1];
|
|
6663
6672
|
cs.test && c(cs.test, st, "Expression");
|
|
6664
|
-
for (var
|
|
6665
|
-
var cons =
|
|
6673
|
+
for (var i2 = 0, list2 = cs.consequent; i2 < list2.length; i2 += 1) {
|
|
6674
|
+
var cons = list2[i2];
|
|
6666
6675
|
c(cons, st, "Statement");
|
|
6667
6676
|
}
|
|
6668
6677
|
}
|
|
6669
6678
|
}, base2.SwitchCase = function(node, st, c) {
|
|
6670
6679
|
node.test && c(node.test, st, "Expression");
|
|
6671
|
-
for (var
|
|
6672
|
-
var cons =
|
|
6680
|
+
for (var i2 = 0, list2 = node.consequent; i2 < list2.length; i2 += 1) {
|
|
6681
|
+
var cons = list2[i2];
|
|
6673
6682
|
c(cons, st, "Statement");
|
|
6674
6683
|
}
|
|
6675
6684
|
}, base2.ReturnStatement = base2.YieldExpression = base2.AwaitExpression = function(node, st, c) {
|
|
@@ -6691,16 +6700,16 @@ var require_walk = __commonJS({
|
|
|
6691
6700
|
}, base2.DebuggerStatement = ignore, base2.FunctionDeclaration = function(node, st, c) {
|
|
6692
6701
|
return c(node, st, "Function");
|
|
6693
6702
|
}, base2.VariableDeclaration = function(node, st, c) {
|
|
6694
|
-
for (var
|
|
6695
|
-
var decl =
|
|
6703
|
+
for (var i2 = 0, list2 = node.declarations; i2 < list2.length; i2 += 1) {
|
|
6704
|
+
var decl = list2[i2];
|
|
6696
6705
|
c(decl, st);
|
|
6697
6706
|
}
|
|
6698
6707
|
}, base2.VariableDeclarator = function(node, st, c) {
|
|
6699
6708
|
c(node.id, st, "Pattern"), node.init && c(node.init, st, "Expression");
|
|
6700
6709
|
}, base2.Function = function(node, st, c) {
|
|
6701
6710
|
node.id && c(node.id, st, "Pattern");
|
|
6702
|
-
for (var
|
|
6703
|
-
var param =
|
|
6711
|
+
for (var i2 = 0, list2 = node.params; i2 < list2.length; i2 += 1) {
|
|
6712
|
+
var param = list2[i2];
|
|
6704
6713
|
c(param, st, "Pattern");
|
|
6705
6714
|
}
|
|
6706
6715
|
c(node.body, st, node.expression ? "Expression" : "Statement");
|
|
@@ -6709,33 +6718,33 @@ var require_walk = __commonJS({
|
|
|
6709
6718
|
}, base2.VariablePattern = ignore, base2.MemberPattern = skipThrough, base2.RestElement = function(node, st, c) {
|
|
6710
6719
|
return c(node.argument, st, "Pattern");
|
|
6711
6720
|
}, base2.ArrayPattern = function(node, st, c) {
|
|
6712
|
-
for (var
|
|
6713
|
-
var elt =
|
|
6721
|
+
for (var i2 = 0, list2 = node.elements; i2 < list2.length; i2 += 1) {
|
|
6722
|
+
var elt = list2[i2];
|
|
6714
6723
|
elt && c(elt, st, "Pattern");
|
|
6715
6724
|
}
|
|
6716
6725
|
}, base2.ObjectPattern = function(node, st, c) {
|
|
6717
|
-
for (var
|
|
6718
|
-
var prop =
|
|
6726
|
+
for (var i2 = 0, list2 = node.properties; i2 < list2.length; i2 += 1) {
|
|
6727
|
+
var prop = list2[i2];
|
|
6719
6728
|
prop.type === "Property" ? (prop.computed && c(prop.key, st, "Expression"), c(prop.value, st, "Pattern")) : prop.type === "RestElement" && c(prop.argument, st, "Pattern");
|
|
6720
6729
|
}
|
|
6721
6730
|
}, base2.Expression = skipThrough, base2.ThisExpression = base2.Super = base2.MetaProperty = ignore, base2.ArrayExpression = function(node, st, c) {
|
|
6722
|
-
for (var
|
|
6723
|
-
var elt =
|
|
6731
|
+
for (var i2 = 0, list2 = node.elements; i2 < list2.length; i2 += 1) {
|
|
6732
|
+
var elt = list2[i2];
|
|
6724
6733
|
elt && c(elt, st, "Expression");
|
|
6725
6734
|
}
|
|
6726
6735
|
}, base2.ObjectExpression = function(node, st, c) {
|
|
6727
|
-
for (var
|
|
6728
|
-
var prop =
|
|
6736
|
+
for (var i2 = 0, list2 = node.properties; i2 < list2.length; i2 += 1) {
|
|
6737
|
+
var prop = list2[i2];
|
|
6729
6738
|
c(prop, st);
|
|
6730
6739
|
}
|
|
6731
6740
|
}, base2.FunctionExpression = base2.ArrowFunctionExpression = base2.FunctionDeclaration, base2.SequenceExpression = function(node, st, c) {
|
|
6732
|
-
for (var
|
|
6733
|
-
var expr =
|
|
6741
|
+
for (var i2 = 0, list2 = node.expressions; i2 < list2.length; i2 += 1) {
|
|
6742
|
+
var expr = list2[i2];
|
|
6734
6743
|
c(expr, st, "Expression");
|
|
6735
6744
|
}
|
|
6736
6745
|
}, base2.TemplateLiteral = function(node, st, c) {
|
|
6737
|
-
for (var
|
|
6738
|
-
var quasi =
|
|
6746
|
+
for (var i2 = 0, list2 = node.quasis; i2 < list2.length; i2 += 1) {
|
|
6747
|
+
var quasi = list2[i2];
|
|
6739
6748
|
c(quasi, st);
|
|
6740
6749
|
}
|
|
6741
6750
|
for (var i$1 = 0, list$1 = node.expressions; i$1 < list$1.length; i$1 += 1) {
|
|
@@ -6752,8 +6761,8 @@ var require_walk = __commonJS({
|
|
|
6752
6761
|
c(node.test, st, "Expression"), c(node.consequent, st, "Expression"), c(node.alternate, st, "Expression");
|
|
6753
6762
|
}, base2.NewExpression = base2.CallExpression = function(node, st, c) {
|
|
6754
6763
|
if (c(node.callee, st, "Expression"), node.arguments)
|
|
6755
|
-
for (var
|
|
6756
|
-
var arg =
|
|
6764
|
+
for (var i2 = 0, list2 = node.arguments; i2 < list2.length; i2 += 1) {
|
|
6765
|
+
var arg = list2[i2];
|
|
6757
6766
|
c(arg, st, "Expression");
|
|
6758
6767
|
}
|
|
6759
6768
|
}, base2.MemberExpression = function(node, st, c) {
|
|
@@ -6763,8 +6772,8 @@ var require_walk = __commonJS({
|
|
|
6763
6772
|
}, base2.ExportAllDeclaration = function(node, st, c) {
|
|
6764
6773
|
node.exported && c(node.exported, st), c(node.source, st, "Expression");
|
|
6765
6774
|
}, base2.ImportDeclaration = function(node, st, c) {
|
|
6766
|
-
for (var
|
|
6767
|
-
var spec =
|
|
6775
|
+
for (var i2 = 0, list2 = node.specifiers; i2 < list2.length; i2 += 1) {
|
|
6776
|
+
var spec = list2[i2];
|
|
6768
6777
|
c(spec, st);
|
|
6769
6778
|
}
|
|
6770
6779
|
c(node.source, st, "Expression");
|
|
@@ -6777,8 +6786,8 @@ var require_walk = __commonJS({
|
|
|
6777
6786
|
}, base2.Class = function(node, st, c) {
|
|
6778
6787
|
node.id && c(node.id, st, "Pattern"), node.superClass && c(node.superClass, st, "Expression"), c(node.body, st);
|
|
6779
6788
|
}, base2.ClassBody = function(node, st, c) {
|
|
6780
|
-
for (var
|
|
6781
|
-
var elt =
|
|
6789
|
+
for (var i2 = 0, list2 = node.body; i2 < list2.length; i2 += 1) {
|
|
6790
|
+
var elt = list2[i2];
|
|
6782
6791
|
c(elt, st);
|
|
6783
6792
|
}
|
|
6784
6793
|
}, base2.MethodDefinition = base2.Property = function(node, st, c) {
|
|
@@ -6928,16 +6937,16 @@ var require_dist2 = __commonJS({
|
|
|
6928
6937
|
"use strict";
|
|
6929
6938
|
var __assign = exports && exports.__assign || function() {
|
|
6930
6939
|
return __assign = Object.assign || function(t6) {
|
|
6931
|
-
for (var s,
|
|
6932
|
-
s = arguments[
|
|
6940
|
+
for (var s, i2 = 1, n = arguments.length; i2 < n; i2++) {
|
|
6941
|
+
s = arguments[i2];
|
|
6933
6942
|
for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && (t6[p] = s[p]);
|
|
6934
6943
|
}
|
|
6935
6944
|
return t6;
|
|
6936
6945
|
}, __assign.apply(this, arguments);
|
|
6937
6946
|
}, __spreadArrays = exports && exports.__spreadArrays || function() {
|
|
6938
|
-
for (var s = 0,
|
|
6939
|
-
for (var r = Array(s), k = 0,
|
|
6940
|
-
for (var a = arguments[
|
|
6947
|
+
for (var s = 0, i2 = 0, il = arguments.length; i2 < il; i2++) s += arguments[i2].length;
|
|
6948
|
+
for (var r = Array(s), k = 0, i2 = 0; i2 < il; i2++)
|
|
6949
|
+
for (var a = arguments[i2], j = 0, jl = a.length; j < jl; j++, k++)
|
|
6941
6950
|
r[k] = a[j];
|
|
6942
6951
|
return r;
|
|
6943
6952
|
};
|
|
@@ -6991,9 +7000,9 @@ var require_dist2 = __commonJS({
|
|
|
6991
7000
|
if (input.length === 0)
|
|
6992
7001
|
return "[]";
|
|
6993
7002
|
seen.push(input);
|
|
6994
|
-
var ret = "[" + tokens.newLine + input.map(function(el,
|
|
6995
|
-
var eol = input.length - 1 ===
|
|
6996
|
-
return combinedOptions.transform && (value = combinedOptions.transform(input,
|
|
7003
|
+
var ret = "[" + tokens.newLine + input.map(function(el, i2) {
|
|
7004
|
+
var eol = input.length - 1 === i2 ? tokens.newLine : "," + tokens.newLineOrSpace, value = prettyPrint2(el, combinedOptions, pad + combinedOptions.indent);
|
|
7005
|
+
return combinedOptions.transform && (value = combinedOptions.transform(input, i2, value)), tokens.indent + value + eol;
|
|
6997
7006
|
}).join("") + tokens.pad + "]";
|
|
6998
7007
|
return seen.pop(), expandWhiteSpace(ret);
|
|
6999
7008
|
}
|
|
@@ -7004,8 +7013,8 @@ var require_dist2 = __commonJS({
|
|
|
7004
7013
|
})), objKeys_1.length === 0)
|
|
7005
7014
|
return "{}";
|
|
7006
7015
|
seen.push(input);
|
|
7007
|
-
var ret = "{" + tokens.newLine + objKeys_1.map(function(el,
|
|
7008
|
-
var eol = objKeys_1.length - 1 ===
|
|
7016
|
+
var ret = "{" + tokens.newLine + objKeys_1.map(function(el, i2) {
|
|
7017
|
+
var eol = objKeys_1.length - 1 === i2 ? tokens.newLine : "," + tokens.newLineOrSpace, isSymbol2 = typeof el == "symbol", isClassic = !isSymbol2 && /^[a-z$_][a-z$_0-9]*$/i.test(el.toString()), key = isSymbol2 || isClassic ? el : prettyPrint2(el, combinedOptions), value = prettyPrint2(input[el], combinedOptions, pad + combinedOptions.indent);
|
|
7009
7018
|
return combinedOptions.transform && (value = combinedOptions.transform(input, el, value)), tokens.indent + String(key) + ": " + value + eol;
|
|
7010
7019
|
}).join("") + tokens.pad + "}";
|
|
7011
7020
|
return seen.pop(), expandWhiteSpace(ret);
|
|
@@ -7023,8 +7032,8 @@ var require_dist2 = __commonJS({
|
|
|
7023
7032
|
var require_react_is_production_min = __commonJS({
|
|
7024
7033
|
"../../../node_modules/react-element-to-jsx-string/node_modules/react-is/cjs/react-is.production.min.js"(exports) {
|
|
7025
7034
|
"use strict";
|
|
7026
|
-
var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h = Symbol.for("react.context"), k = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), t6 = Symbol.for("react.offscreen"), u;
|
|
7027
|
-
u = Symbol.for("react.module.reference");
|
|
7035
|
+
var b = /* @__PURE__ */ Symbol.for("react.element"), c = /* @__PURE__ */ Symbol.for("react.portal"), d = /* @__PURE__ */ Symbol.for("react.fragment"), e = /* @__PURE__ */ Symbol.for("react.strict_mode"), f = /* @__PURE__ */ Symbol.for("react.profiler"), g = /* @__PURE__ */ Symbol.for("react.provider"), h = /* @__PURE__ */ Symbol.for("react.context"), k = /* @__PURE__ */ Symbol.for("react.server_context"), l = /* @__PURE__ */ Symbol.for("react.forward_ref"), m = /* @__PURE__ */ Symbol.for("react.suspense"), n = /* @__PURE__ */ Symbol.for("react.suspense_list"), p = /* @__PURE__ */ Symbol.for("react.memo"), q = /* @__PURE__ */ Symbol.for("react.lazy"), t6 = /* @__PURE__ */ Symbol.for("react.offscreen"), u;
|
|
7036
|
+
u = /* @__PURE__ */ Symbol.for("react.module.reference");
|
|
7028
7037
|
function v(a) {
|
|
7029
7038
|
if (typeof a == "object" && a !== null) {
|
|
7030
7039
|
var r = a.$$typeof;
|
|
@@ -7122,8 +7131,8 @@ var require_react_is_development = __commonJS({
|
|
|
7122
7131
|
"use strict";
|
|
7123
7132
|
process.env.NODE_ENV !== "production" && (function() {
|
|
7124
7133
|
"use strict";
|
|
7125
|
-
var enableScopeAPI = !1, enableCacheElement = !1, enableTransitionTracing = !1, enableLegacyHidden = !1, enableDebugTracing = !1, REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = Symbol.for("react.provider"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_SERVER_CONTEXT_TYPE = Symbol.for("react.server_context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"), REACT_MODULE_REFERENCE;
|
|
7126
|
-
REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
|
|
7134
|
+
var enableScopeAPI = !1, enableCacheElement = !1, enableTransitionTracing = !1, enableLegacyHidden = !1, enableDebugTracing = !1, REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = /* @__PURE__ */ Symbol.for("react.provider"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_SERVER_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.server_context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_OFFSCREEN_TYPE = /* @__PURE__ */ Symbol.for("react.offscreen"), REACT_MODULE_REFERENCE;
|
|
7135
|
+
REACT_MODULE_REFERENCE = /* @__PURE__ */ Symbol.for("react.module.reference");
|
|
7127
7136
|
function isValidElementType(type) {
|
|
7128
7137
|
return !!(typeof type == "string" || typeof type == "function" || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing || typeof type == "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
|
7129
7138
|
// types supported by any Flight configuration anywhere since
|
|
@@ -7512,8 +7521,8 @@ var require_parse = __commonJS({
|
|
|
7512
7521
|
let value = holder[name];
|
|
7513
7522
|
if (value != null && typeof value == "object")
|
|
7514
7523
|
if (Array.isArray(value))
|
|
7515
|
-
for (let
|
|
7516
|
-
let key2 = String(
|
|
7524
|
+
for (let i2 = 0; i2 < value.length; i2++) {
|
|
7525
|
+
let key2 = String(i2), replacement = internalize(value, key2, reviver);
|
|
7517
7526
|
replacement === void 0 ? delete value[key2] : Object.defineProperty(value, key2, {
|
|
7518
7527
|
value: replacement,
|
|
7519
7528
|
writable: !0,
|
|
@@ -8221,15 +8230,15 @@ var require_stringify = __commonJS({
|
|
|
8221
8230
|
"\u2028": "\\u2028",
|
|
8222
8231
|
"\u2029": "\\u2029"
|
|
8223
8232
|
}, product = "";
|
|
8224
|
-
for (let
|
|
8225
|
-
let c = value2[
|
|
8233
|
+
for (let i2 = 0; i2 < value2.length; i2++) {
|
|
8234
|
+
let c = value2[i2];
|
|
8226
8235
|
switch (c) {
|
|
8227
8236
|
case "'":
|
|
8228
8237
|
case '"':
|
|
8229
8238
|
quotes[c]++, product += c;
|
|
8230
8239
|
continue;
|
|
8231
8240
|
case "\0":
|
|
8232
|
-
if (util.isDigit(value2[
|
|
8241
|
+
if (util.isDigit(value2[i2 + 1])) {
|
|
8233
8242
|
product += "\\x00";
|
|
8234
8243
|
continue;
|
|
8235
8244
|
}
|
|
@@ -8285,8 +8294,8 @@ var require_stringify = __commonJS({
|
|
|
8285
8294
|
let firstChar = String.fromCodePoint(key.codePointAt(0));
|
|
8286
8295
|
if (!util.isIdStartChar(firstChar))
|
|
8287
8296
|
return quoteString(key, !0);
|
|
8288
|
-
for (let
|
|
8289
|
-
if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(
|
|
8297
|
+
for (let i2 = firstChar.length; i2 < key.length; i2++)
|
|
8298
|
+
if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i2))))
|
|
8290
8299
|
return quoteString(key, !0);
|
|
8291
8300
|
return key;
|
|
8292
8301
|
}
|
|
@@ -8297,8 +8306,8 @@ var require_stringify = __commonJS({
|
|
|
8297
8306
|
let stepback = indent2;
|
|
8298
8307
|
indent2 = indent2 + gap;
|
|
8299
8308
|
let partial = [];
|
|
8300
|
-
for (let
|
|
8301
|
-
let propertyString = serializeProperty(String(
|
|
8309
|
+
for (let i2 = 0; i2 < value2.length; i2++) {
|
|
8310
|
+
let propertyString = serializeProperty(String(i2), value2);
|
|
8302
8311
|
partial.push(propertyString !== void 0 ? propertyString : "null");
|
|
8303
8312
|
}
|
|
8304
8313
|
let final;
|
|
@@ -8348,8 +8357,8 @@ var require_tsconfig_loader = __commonJS({
|
|
|
8348
8357
|
"use strict";
|
|
8349
8358
|
var __assign = exports && exports.__assign || function() {
|
|
8350
8359
|
return __assign = Object.assign || function(t6) {
|
|
8351
|
-
for (var s,
|
|
8352
|
-
s = arguments[
|
|
8360
|
+
for (var s, i2 = 1, n = arguments.length; i2 < n; i2++) {
|
|
8361
|
+
s = arguments[i2];
|
|
8353
8362
|
for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && (t6[p] = s[p]);
|
|
8354
8363
|
}
|
|
8355
8364
|
return t6;
|
|
@@ -8536,8 +8545,8 @@ var require_minimist = __commonJS({
|
|
|
8536
8545
|
return flags.allBools && /^--[^=]+$/.test(arg2) || flags.strings[key2] || flags.bools[key2] || aliases[key2];
|
|
8537
8546
|
}
|
|
8538
8547
|
function setKey(obj, keys, value2) {
|
|
8539
|
-
for (var o = obj,
|
|
8540
|
-
var key2 = keys[
|
|
8548
|
+
for (var o = obj, i3 = 0; i3 < keys.length - 1; i3++) {
|
|
8549
|
+
var key2 = keys[i3];
|
|
8541
8550
|
if (isConstructorOrProto(o, key2))
|
|
8542
8551
|
return;
|
|
8543
8552
|
o[key2] === void 0 && (o[key2] = {}), (o[key2] === Object.prototype || o[key2] === Number.prototype || o[key2] === String.prototype) && (o[key2] = {}), o[key2] === Array.prototype && (o[key2] = []), o = o[key2];
|
|
@@ -8558,8 +8567,8 @@ var require_minimist = __commonJS({
|
|
|
8558
8567
|
});
|
|
8559
8568
|
var notFlags = [];
|
|
8560
8569
|
args.indexOf("--") !== -1 && (notFlags = args.slice(args.indexOf("--") + 1), args = args.slice(0, args.indexOf("--")));
|
|
8561
|
-
for (var
|
|
8562
|
-
var arg = args[
|
|
8570
|
+
for (var i2 = 0; i2 < args.length; i2++) {
|
|
8571
|
+
var arg = args[i2], key, next;
|
|
8563
8572
|
if (/^--.+=/.test(arg)) {
|
|
8564
8573
|
var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
|
|
8565
8574
|
key = m[1];
|
|
@@ -8568,7 +8577,7 @@ var require_minimist = __commonJS({
|
|
|
8568
8577
|
} else if (/^--no-.+/.test(arg))
|
|
8569
8578
|
key = arg.match(/^--no-(.+)/)[1], setArg(key, !1, arg);
|
|
8570
8579
|
else if (/^--.+/.test(arg))
|
|
8571
|
-
key = arg.match(/^--(.+)/)[1], next = args[
|
|
8580
|
+
key = arg.match(/^--(.+)/)[1], next = args[i2 + 1], next !== void 0 && !/^(-|--)[^-]/.test(next) && !flags.bools[key] && !flags.allBools && (!aliases[key] || !aliasIsBoolean(key)) ? (setArg(key, next, arg), i2 += 1) : /^(true|false)$/.test(next) ? (setArg(key, next === "true", arg), i2 += 1) : setArg(key, flags.strings[key] ? "" : !0, arg);
|
|
8572
8581
|
else if (/^-[^-]+/.test(arg)) {
|
|
8573
8582
|
for (var letters = arg.slice(1, -1).split(""), broken = !1, j = 0; j < letters.length; j++) {
|
|
8574
8583
|
if (next = arg.slice(j + 2), next === "-") {
|
|
@@ -8589,9 +8598,9 @@ var require_minimist = __commonJS({
|
|
|
8589
8598
|
} else
|
|
8590
8599
|
setArg(letters[j], flags.strings[letters[j]] ? "" : !0, arg);
|
|
8591
8600
|
}
|
|
8592
|
-
key = arg.slice(-1)[0], !broken && key !== "-" && (args[
|
|
8601
|
+
key = arg.slice(-1)[0], !broken && key !== "-" && (args[i2 + 1] && !/^(-|--)[^-]/.test(args[i2 + 1]) && !flags.bools[key] && (!aliases[key] || !aliasIsBoolean(key)) ? (setArg(key, args[i2 + 1], arg), i2 += 1) : args[i2 + 1] && /^(true|false)$/.test(args[i2 + 1]) ? (setArg(key, args[i2 + 1] === "true", arg), i2 += 1) : setArg(key, flags.strings[key] ? "" : !0, arg));
|
|
8593
8602
|
} else if ((!flags.unknownFn || flags.unknownFn(arg) !== !1) && argv._.push(flags.strings._ || !isNumber(arg) ? arg : Number(arg)), opts.stopEarly) {
|
|
8594
|
-
argv._.push.apply(argv._, args.slice(
|
|
8603
|
+
argv._.push.apply(argv._, args.slice(i2 + 1));
|
|
8595
8604
|
break;
|
|
8596
8605
|
}
|
|
8597
8606
|
}
|
|
@@ -8611,8 +8620,8 @@ var require_register = __commonJS({
|
|
|
8611
8620
|
"../../../node_modules/tsconfig-paths/lib/register.js"(exports) {
|
|
8612
8621
|
"use strict";
|
|
8613
8622
|
var __spreadArray = exports && exports.__spreadArray || function(to, from, pack) {
|
|
8614
|
-
if (pack || arguments.length === 2) for (var
|
|
8615
|
-
(ar || !(
|
|
8623
|
+
if (pack || arguments.length === 2) for (var i2 = 0, l = from.length, ar; i2 < l; i2++)
|
|
8624
|
+
(ar || !(i2 in from)) && (ar || (ar = Array.prototype.slice.call(from, 0, i2)), ar[i2] = from[i2]);
|
|
8616
8625
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
8617
8626
|
};
|
|
8618
8627
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
@@ -8858,9 +8867,9 @@ var require_normalize_options = __commonJS({
|
|
|
8858
8867
|
let packagePath = path5.dirname(manifestPath), unqualifiedPath = typeof parts[2] < "u" ? path5.join(packagePath, parts[2]) : packagePath;
|
|
8859
8868
|
return { packagePath, unqualifiedPath };
|
|
8860
8869
|
}, runPnpResolutionOnArray = (request, paths2) => {
|
|
8861
|
-
for (let
|
|
8862
|
-
let resolution = runPnpResolution(request, paths2[
|
|
8863
|
-
if (resolution ||
|
|
8870
|
+
for (let i2 = 0; i2 < paths2.length; i2++) {
|
|
8871
|
+
let resolution = runPnpResolution(request, paths2[i2]);
|
|
8872
|
+
if (resolution || i2 === paths2.length - 1)
|
|
8864
8873
|
return resolution;
|
|
8865
8874
|
}
|
|
8866
8875
|
return null;
|
|
@@ -8893,18 +8902,18 @@ var require_implementation = __commonJS({
|
|
|
8893
8902
|
"../../../node_modules/function-bind/implementation.js"(exports, module) {
|
|
8894
8903
|
"use strict";
|
|
8895
8904
|
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ", toStr = Object.prototype.toString, max = Math.max, funcType = "[object Function]", concatty = function(a, b) {
|
|
8896
|
-
for (var arr = [],
|
|
8897
|
-
arr[
|
|
8905
|
+
for (var arr = [], i2 = 0; i2 < a.length; i2 += 1)
|
|
8906
|
+
arr[i2] = a[i2];
|
|
8898
8907
|
for (var j = 0; j < b.length; j += 1)
|
|
8899
8908
|
arr[j + a.length] = b[j];
|
|
8900
8909
|
return arr;
|
|
8901
8910
|
}, slicy = function(arrLike, offset2) {
|
|
8902
|
-
for (var arr = [],
|
|
8903
|
-
arr[j] = arrLike[
|
|
8911
|
+
for (var arr = [], i2 = offset2 || 0, j = 0; i2 < arrLike.length; i2 += 1, j += 1)
|
|
8912
|
+
arr[j] = arrLike[i2];
|
|
8904
8913
|
return arr;
|
|
8905
8914
|
}, joiny = function(arr, joiner) {
|
|
8906
|
-
for (var str = "",
|
|
8907
|
-
str += arr[
|
|
8915
|
+
for (var str = "", i2 = 0; i2 < arr.length; i2 += 1)
|
|
8916
|
+
str += arr[i2], i2 + 1 < arr.length && (str += joiner);
|
|
8908
8917
|
return str;
|
|
8909
8918
|
};
|
|
8910
8919
|
module.exports = function(that) {
|
|
@@ -8923,8 +8932,8 @@ var require_implementation = __commonJS({
|
|
|
8923
8932
|
that,
|
|
8924
8933
|
concatty(args, arguments)
|
|
8925
8934
|
);
|
|
8926
|
-
}, boundLength = max(0, target.length - args.length), boundArgs = [],
|
|
8927
|
-
boundArgs[
|
|
8935
|
+
}, boundLength = max(0, target.length - args.length), boundArgs = [], i2 = 0; i2 < boundLength; i2++)
|
|
8936
|
+
boundArgs[i2] = "$" + i2;
|
|
8928
8937
|
if (bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder), target.prototype) {
|
|
8929
8938
|
var Empty = function() {
|
|
8930
8939
|
};
|
|
@@ -9127,8 +9136,8 @@ var require_is_core_module = __commonJS({
|
|
|
9127
9136
|
"use strict";
|
|
9128
9137
|
var hasOwn2 = require_hasown();
|
|
9129
9138
|
function specifierIncluded(current2, specifier) {
|
|
9130
|
-
for (var nodeParts = current2.split("."), parts = specifier.split(" "), op = parts.length > 1 ? parts[0] : "=", versionParts = (parts.length > 1 ? parts[1] : parts[0]).split("."),
|
|
9131
|
-
var cur = parseInt(nodeParts[
|
|
9139
|
+
for (var nodeParts = current2.split("."), parts = specifier.split(" "), op = parts.length > 1 ? parts[0] : "=", versionParts = (parts.length > 1 ? parts[1] : parts[0]).split("."), i2 = 0; i2 < 3; ++i2) {
|
|
9140
|
+
var cur = parseInt(nodeParts[i2] || 0, 10), ver = parseInt(versionParts[i2] || 0, 10);
|
|
9132
9141
|
if (cur !== ver)
|
|
9133
9142
|
return op === "<" ? cur < ver : op === ">=" ? cur >= ver : !1;
|
|
9134
9143
|
}
|
|
@@ -9138,8 +9147,8 @@ var require_is_core_module = __commonJS({
|
|
|
9138
9147
|
var specifiers = range.split(/ ?&& ?/);
|
|
9139
9148
|
if (specifiers.length === 0)
|
|
9140
9149
|
return !1;
|
|
9141
|
-
for (var
|
|
9142
|
-
if (!specifierIncluded(current2, specifiers[
|
|
9150
|
+
for (var i2 = 0; i2 < specifiers.length; ++i2)
|
|
9151
|
+
if (!specifierIncluded(current2, specifiers[i2]))
|
|
9143
9152
|
return !1;
|
|
9144
9153
|
return !0;
|
|
9145
9154
|
}
|
|
@@ -9150,8 +9159,8 @@ var require_is_core_module = __commonJS({
|
|
|
9150
9159
|
if (typeof current2 != "string")
|
|
9151
9160
|
throw new TypeError(typeof nodeVersion > "u" ? "Unable to determine current node version" : "If provided, a valid node version is required");
|
|
9152
9161
|
if (specifierValue && typeof specifierValue == "object") {
|
|
9153
|
-
for (var
|
|
9154
|
-
if (matchesRange(current2, specifierValue[
|
|
9162
|
+
for (var i2 = 0; i2 < specifierValue.length; ++i2)
|
|
9163
|
+
if (matchesRange(current2, specifierValue[i2]))
|
|
9155
9164
|
return !0;
|
|
9156
9165
|
return !1;
|
|
9157
9166
|
}
|
|
@@ -9198,8 +9207,8 @@ var require_async = __commonJS({
|
|
|
9198
9207
|
}
|
|
9199
9208
|
});
|
|
9200
9209
|
}, getPackageCandidates = function(x, start, opts) {
|
|
9201
|
-
for (var dirs = nodeModulesPaths(start, opts, x),
|
|
9202
|
-
dirs[
|
|
9210
|
+
for (var dirs = nodeModulesPaths(start, opts, x), i2 = 0; i2 < dirs.length; i2++)
|
|
9211
|
+
dirs[i2] = path5.join(dirs[i2], x);
|
|
9203
9212
|
return dirs;
|
|
9204
9213
|
};
|
|
9205
9214
|
module.exports = function(x, options, callback) {
|
|
@@ -9604,8 +9613,8 @@ var require_sync = __commonJS({
|
|
|
9604
9613
|
} catch {
|
|
9605
9614
|
}
|
|
9606
9615
|
}, getPackageCandidates = function(x, start, opts) {
|
|
9607
|
-
for (var dirs = nodeModulesPaths(start, opts, x),
|
|
9608
|
-
dirs[
|
|
9616
|
+
for (var dirs = nodeModulesPaths(start, opts, x), i2 = 0; i2 < dirs.length; i2++)
|
|
9617
|
+
dirs[i2] = path5.join(dirs[i2], x);
|
|
9609
9618
|
return dirs;
|
|
9610
9619
|
};
|
|
9611
9620
|
module.exports = function(x, options) {
|
|
@@ -9638,8 +9647,8 @@ var require_sync = __commonJS({
|
|
|
9638
9647
|
}
|
|
9639
9648
|
if (isFile2(x2))
|
|
9640
9649
|
return x2;
|
|
9641
|
-
for (var
|
|
9642
|
-
var file = x2 + extensions[
|
|
9650
|
+
for (var i2 = 0; i2 < extensions.length; i2++) {
|
|
9651
|
+
var file = x2 + extensions[i2];
|
|
9643
9652
|
if (isFile2(file))
|
|
9644
9653
|
return file;
|
|
9645
9654
|
}
|
|
@@ -9688,8 +9697,8 @@ var require_sync = __commonJS({
|
|
|
9688
9697
|
function loadNodeModulesSync(x2, start) {
|
|
9689
9698
|
for (var thunk = function() {
|
|
9690
9699
|
return getPackageCandidates(x2, start, opts);
|
|
9691
|
-
}, dirs = packageIterator ? packageIterator(x2, start, thunk, opts) : thunk(),
|
|
9692
|
-
var dir = dirs[
|
|
9700
|
+
}, dirs = packageIterator ? packageIterator(x2, start, thunk, opts) : thunk(), i2 = 0; i2 < dirs.length; i2++) {
|
|
9701
|
+
var dir = dirs[i2];
|
|
9693
9702
|
if (isDirectory(path5.dirname(dir))) {
|
|
9694
9703
|
var m2 = loadAsFileSync(dir);
|
|
9695
9704
|
if (m2) return m2;
|
|
@@ -9747,10 +9756,10 @@ var require_translateOffset = __commonJS({
|
|
|
9747
9756
|
var warned = !1;
|
|
9748
9757
|
function translateOffset(start, fromOffsets, toOffsets, fromLengths, toLengths = fromLengths, preferEnd = !1) {
|
|
9749
9758
|
if (!fromOffsets.every((value, index) => index === 0 || fromOffsets[index - 1] <= value)) {
|
|
9750
|
-
for (let
|
|
9751
|
-
let fromOffset = fromOffsets[
|
|
9759
|
+
for (let i2 = 0; i2 < fromOffsets.length; i2++) {
|
|
9760
|
+
let fromOffset = fromOffsets[i2], fromLength = fromLengths[i2];
|
|
9752
9761
|
if (start >= fromOffset && start <= fromOffset + fromLength) {
|
|
9753
|
-
let toLength = toLengths[
|
|
9762
|
+
let toLength = toLengths[i2], toOffset = toOffsets[i2], rangeOffset, relativePos = start - fromOffset;
|
|
9754
9763
|
return preferEnd && toLength > fromLength && relativePos === fromLength ? rangeOffset = toLength : rangeOffset = Math.min(relativePos, toLength), toOffset + rangeOffset;
|
|
9755
9764
|
}
|
|
9756
9765
|
}
|
|
@@ -9795,8 +9804,8 @@ var require_sourceMap = __commonJS({
|
|
|
9795
9804
|
if (memo.offsets.length === 0)
|
|
9796
9805
|
return;
|
|
9797
9806
|
let { low: start, high: end } = (0, binarySearch_1.binarySearch)(memo.offsets, offset2), skip = /* @__PURE__ */ new Set(), toRange = fromRange === "sourceOffsets" ? "generatedOffsets" : "sourceOffsets";
|
|
9798
|
-
for (let
|
|
9799
|
-
for (let mapping of memo.mappings[
|
|
9807
|
+
for (let i2 = start; i2 <= end; i2++)
|
|
9808
|
+
for (let mapping of memo.mappings[i2]) {
|
|
9800
9809
|
if (skip.has(mapping) || (skip.add(mapping), filter && !filter(mapping.data)))
|
|
9801
9810
|
continue;
|
|
9802
9811
|
let mapped = (0, translateOffset_1.translateOffset)(offset2, mapping[fromRange], mapping[toRange], getLengths(mapping, fromRange), getLengths(mapping, toRange), preferEnd);
|
|
@@ -9827,14 +9836,14 @@ var require_sourceMap = __commonJS({
|
|
|
9827
9836
|
createMemo(key) {
|
|
9828
9837
|
let offsetsSet = /* @__PURE__ */ new Set();
|
|
9829
9838
|
for (let mapping of this.mappings)
|
|
9830
|
-
for (let
|
|
9831
|
-
offsetsSet.add(mapping[key][
|
|
9839
|
+
for (let i2 = 0; i2 < mapping[key].length; i2++)
|
|
9840
|
+
offsetsSet.add(mapping[key][i2]), offsetsSet.add(mapping[key][i2] + getLengths(mapping, key)[i2]);
|
|
9832
9841
|
let offsets = [...offsetsSet].sort((a, b) => a - b), mappings = offsets.map(() => /* @__PURE__ */ new Set());
|
|
9833
9842
|
for (let mapping of this.mappings)
|
|
9834
|
-
for (let
|
|
9835
|
-
let startIndex = (0, binarySearch_1.binarySearch)(offsets, mapping[key][
|
|
9836
|
-
for (let
|
|
9837
|
-
mappings[
|
|
9843
|
+
for (let i2 = 0; i2 < mapping[key].length; i2++) {
|
|
9844
|
+
let startIndex = (0, binarySearch_1.binarySearch)(offsets, mapping[key][i2]).match, endIndex = (0, binarySearch_1.binarySearch)(offsets, mapping[key][i2] + getLengths(mapping, key)[i2]).match;
|
|
9845
|
+
for (let i3 = startIndex; i3 <= endIndex; i3++)
|
|
9846
|
+
mappings[i3].add(mapping);
|
|
9838
9847
|
}
|
|
9839
9848
|
return { offsets, mappings };
|
|
9840
9849
|
}
|
|
@@ -10572,9 +10581,9 @@ var require_transform = __commonJS({
|
|
|
10572
10581
|
fileName && textSpan && (changesPerFile[fileName] ?? (changesPerFile[fileName] = [])).push({ ...c, span: textSpan });
|
|
10573
10582
|
});
|
|
10574
10583
|
else {
|
|
10575
|
-
let
|
|
10584
|
+
let list2 = changesPerFile[fileChanges.fileName] ?? (changesPerFile[fileChanges.fileName] = []);
|
|
10576
10585
|
fileChanges.textChanges.forEach((c) => {
|
|
10577
|
-
|
|
10586
|
+
list2.push(c);
|
|
10578
10587
|
}), fileChanges.isNewFile && newFiles.add(fileChanges.fileName);
|
|
10579
10588
|
}
|
|
10580
10589
|
}
|
|
@@ -10739,8 +10748,8 @@ var require_proxyCreateProgram = __commonJS({
|
|
|
10739
10748
|
var language_core_1 = require_language_core(), common_1 = require_common(), resolveModuleName_1 = require_resolveModuleName(), decorateProgram_1 = require_decorateProgram(), utils_1 = require_utils3(), arrayEqual = (a, b) => {
|
|
10740
10749
|
if (a.length !== b.length)
|
|
10741
10750
|
return !1;
|
|
10742
|
-
for (let
|
|
10743
|
-
if (a[
|
|
10751
|
+
for (let i2 = 0; i2 < a.length; i2++)
|
|
10752
|
+
if (a[i2] !== b[i2])
|
|
10744
10753
|
return !1;
|
|
10745
10754
|
return !0;
|
|
10746
10755
|
}, objectEqual = (a, b) => {
|
|
@@ -11117,8 +11126,8 @@ var require_proxyLanguageService = __commonJS({
|
|
|
11117
11126
|
let displayPartsStrs = /* @__PURE__ */ new Set([displayPartsToString(infos[0].displayParts)]), documentationStrs = /* @__PURE__ */ new Set([displayPartsToString(infos[0].documentation)]), tagsStrs = /* @__PURE__ */ new Set();
|
|
11118
11127
|
for (let tag of infos[0].tags ?? [])
|
|
11119
11128
|
tagsStrs.add(tag.name + "__volar__" + displayPartsToString(tag.text));
|
|
11120
|
-
for (let
|
|
11121
|
-
let { displayParts, documentation, tags } = infos[
|
|
11129
|
+
for (let i2 = 1; i2 < infos.length; i2++) {
|
|
11130
|
+
let { displayParts, documentation, tags } = infos[i2];
|
|
11122
11131
|
displayParts?.length && !displayPartsStrs.has(displayPartsToString(displayParts)) && (displayPartsStrs.add(displayPartsToString(displayParts)), combine.displayParts ??= [], combine.displayParts.push({ ...displayParts[0], text: `
|
|
11123
11132
|
|
|
11124
11133
|
` + displayParts[0].text }), combine.displayParts.push(...displayParts.slice(1))), documentation?.length && !documentationStrs.has(displayPartsToString(documentation)) && (documentationStrs.add(displayPartsToString(documentation)), combine.documentation ??= [], combine.documentation.push({ ...documentation[0], text: `
|
|
@@ -11273,9 +11282,9 @@ var require_proxyLanguageService = __commonJS({
|
|
|
11273
11282
|
endOfLineState: 0
|
|
11274
11283
|
};
|
|
11275
11284
|
let mappingOffset = (0, transform_1.getMappingOffset)(language, serviceScript), start = mapped.start + mappingOffset, end = mapped.end + mappingOffset, result = getEncodedSemanticClassifications2(targetScript.id, { start, length: end - start }, format3), spans = [];
|
|
11276
|
-
for (let
|
|
11277
|
-
for (let [_, sourceStart, sourceEnd] of (0, transform_1.toSourceRanges)(sourceScript, language, serviceScript, result.spans[
|
|
11278
|
-
spans.push(sourceStart, sourceEnd - sourceStart, result.spans[
|
|
11285
|
+
for (let i2 = 0; i2 < result.spans.length; i2 += 3)
|
|
11286
|
+
for (let [_, sourceStart, sourceEnd] of (0, transform_1.toSourceRanges)(sourceScript, language, serviceScript, result.spans[i2], result.spans[i2] + result.spans[i2 + 1], !1, language_core_1.isSemanticTokensEnabled)) {
|
|
11287
|
+
spans.push(sourceStart, sourceEnd - sourceStart, result.spans[i2 + 2]);
|
|
11279
11288
|
break;
|
|
11280
11289
|
}
|
|
11281
11290
|
return result.spans = spans, result;
|
|
@@ -11497,33 +11506,33 @@ var require_path_browserify = __commonJS({
|
|
|
11497
11506
|
throw new TypeError("Path must be a string. Received " + JSON.stringify(path5));
|
|
11498
11507
|
}
|
|
11499
11508
|
function normalizeStringPosix(path5, allowAboveRoot) {
|
|
11500
|
-
for (var res = "", lastSegmentLength = 0, lastSlash = -1, dots = 0, code,
|
|
11501
|
-
if (
|
|
11502
|
-
code = path5.charCodeAt(
|
|
11509
|
+
for (var res = "", lastSegmentLength = 0, lastSlash = -1, dots = 0, code, i2 = 0; i2 <= path5.length; ++i2) {
|
|
11510
|
+
if (i2 < path5.length)
|
|
11511
|
+
code = path5.charCodeAt(i2);
|
|
11503
11512
|
else {
|
|
11504
11513
|
if (code === 47)
|
|
11505
11514
|
break;
|
|
11506
11515
|
code = 47;
|
|
11507
11516
|
}
|
|
11508
11517
|
if (code === 47) {
|
|
11509
|
-
if (!(lastSlash ===
|
|
11510
|
-
if (lastSlash !==
|
|
11518
|
+
if (!(lastSlash === i2 - 1 || dots === 1))
|
|
11519
|
+
if (lastSlash !== i2 - 1 && dots === 2) {
|
|
11511
11520
|
if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 || res.charCodeAt(res.length - 2) !== 46) {
|
|
11512
11521
|
if (res.length > 2) {
|
|
11513
11522
|
var lastSlashIndex = res.lastIndexOf("/");
|
|
11514
11523
|
if (lastSlashIndex !== res.length - 1) {
|
|
11515
|
-
lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash =
|
|
11524
|
+
lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = i2, dots = 0;
|
|
11516
11525
|
continue;
|
|
11517
11526
|
}
|
|
11518
11527
|
} else if (res.length === 2 || res.length === 1) {
|
|
11519
|
-
res = "", lastSegmentLength = 0, lastSlash =
|
|
11528
|
+
res = "", lastSegmentLength = 0, lastSlash = i2, dots = 0;
|
|
11520
11529
|
continue;
|
|
11521
11530
|
}
|
|
11522
11531
|
}
|
|
11523
11532
|
allowAboveRoot && (res.length > 0 ? res += "/.." : res = "..", lastSegmentLength = 2);
|
|
11524
11533
|
} else
|
|
11525
|
-
res.length > 0 ? res += "/" + path5.slice(lastSlash + 1,
|
|
11526
|
-
lastSlash =
|
|
11534
|
+
res.length > 0 ? res += "/" + path5.slice(lastSlash + 1, i2) : res = path5.slice(lastSlash + 1, i2), lastSegmentLength = i2 - lastSlash - 1;
|
|
11535
|
+
lastSlash = i2, dots = 0;
|
|
11527
11536
|
} else code === 46 && dots !== -1 ? ++dots : dots = -1;
|
|
11528
11537
|
}
|
|
11529
11538
|
return res;
|
|
@@ -11535,9 +11544,9 @@ var require_path_browserify = __commonJS({
|
|
|
11535
11544
|
var posix = {
|
|
11536
11545
|
// path.resolve([from ...], to)
|
|
11537
11546
|
resolve: function() {
|
|
11538
|
-
for (var resolvedPath = "", resolvedAbsolute = !1, cwd2,
|
|
11547
|
+
for (var resolvedPath = "", resolvedAbsolute = !1, cwd2, i2 = arguments.length - 1; i2 >= -1 && !resolvedAbsolute; i2--) {
|
|
11539
11548
|
var path5;
|
|
11540
|
-
|
|
11549
|
+
i2 >= 0 ? path5 = arguments[i2] : (cwd2 === void 0 && (cwd2 = process.cwd()), path5 = cwd2), assertPath(path5), path5.length !== 0 && (resolvedPath = path5 + "/" + resolvedPath, resolvedAbsolute = path5.charCodeAt(0) === 47);
|
|
11541
11550
|
}
|
|
11542
11551
|
return resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute), resolvedAbsolute ? resolvedPath.length > 0 ? "/" + resolvedPath : "/" : resolvedPath.length > 0 ? resolvedPath : ".";
|
|
11543
11552
|
},
|
|
@@ -11552,8 +11561,8 @@ var require_path_browserify = __commonJS({
|
|
|
11552
11561
|
join: function() {
|
|
11553
11562
|
if (arguments.length === 0)
|
|
11554
11563
|
return ".";
|
|
11555
|
-
for (var joined,
|
|
11556
|
-
var arg = arguments[
|
|
11564
|
+
for (var joined, i2 = 0; i2 < arguments.length; ++i2) {
|
|
11565
|
+
var arg = arguments[i2];
|
|
11557
11566
|
assertPath(arg), arg.length > 0 && (joined === void 0 ? joined = arg : joined += "/" + arg);
|
|
11558
11567
|
}
|
|
11559
11568
|
return joined === void 0 ? "." : posix.normalize(joined);
|
|
@@ -11564,24 +11573,24 @@ var require_path_browserify = __commonJS({
|
|
|
11564
11573
|
;
|
|
11565
11574
|
for (var fromEnd = from.length, fromLen = fromEnd - fromStart, toStart = 1; toStart < to.length && to.charCodeAt(toStart) === 47; ++toStart)
|
|
11566
11575
|
;
|
|
11567
|
-
for (var toEnd = to.length, toLen = toEnd - toStart, length = fromLen < toLen ? fromLen : toLen, lastCommonSep = -1,
|
|
11568
|
-
if (
|
|
11576
|
+
for (var toEnd = to.length, toLen = toEnd - toStart, length = fromLen < toLen ? fromLen : toLen, lastCommonSep = -1, i2 = 0; i2 <= length; ++i2) {
|
|
11577
|
+
if (i2 === length) {
|
|
11569
11578
|
if (toLen > length) {
|
|
11570
|
-
if (to.charCodeAt(toStart +
|
|
11571
|
-
return to.slice(toStart +
|
|
11572
|
-
if (
|
|
11573
|
-
return to.slice(toStart +
|
|
11574
|
-
} else fromLen > length && (from.charCodeAt(fromStart +
|
|
11579
|
+
if (to.charCodeAt(toStart + i2) === 47)
|
|
11580
|
+
return to.slice(toStart + i2 + 1);
|
|
11581
|
+
if (i2 === 0)
|
|
11582
|
+
return to.slice(toStart + i2);
|
|
11583
|
+
} else fromLen > length && (from.charCodeAt(fromStart + i2) === 47 ? lastCommonSep = i2 : i2 === 0 && (lastCommonSep = 0));
|
|
11575
11584
|
break;
|
|
11576
11585
|
}
|
|
11577
|
-
var fromCode = from.charCodeAt(fromStart +
|
|
11586
|
+
var fromCode = from.charCodeAt(fromStart + i2), toCode = to.charCodeAt(toStart + i2);
|
|
11578
11587
|
if (fromCode !== toCode)
|
|
11579
11588
|
break;
|
|
11580
|
-
fromCode === 47 && (lastCommonSep =
|
|
11589
|
+
fromCode === 47 && (lastCommonSep = i2);
|
|
11581
11590
|
}
|
|
11582
11591
|
var out = "";
|
|
11583
|
-
for (
|
|
11584
|
-
(
|
|
11592
|
+
for (i2 = fromStart + lastCommonSep + 1; i2 <= fromEnd; ++i2)
|
|
11593
|
+
(i2 === fromEnd || from.charCodeAt(i2) === 47) && (out.length === 0 ? out += ".." : out += "/..");
|
|
11585
11594
|
return out.length > 0 ? out + to.slice(toStart + lastCommonSep) : (toStart += lastCommonSep, to.charCodeAt(toStart) === 47 && ++toStart, to.slice(toStart));
|
|
11586
11595
|
},
|
|
11587
11596
|
_makeLong: function(path5) {
|
|
@@ -11589,10 +11598,10 @@ var require_path_browserify = __commonJS({
|
|
|
11589
11598
|
},
|
|
11590
11599
|
dirname: function(path5) {
|
|
11591
11600
|
if (assertPath(path5), path5.length === 0) return ".";
|
|
11592
|
-
for (var code = path5.charCodeAt(0), hasRoot = code === 47, end = -1, matchedSlash = !0,
|
|
11593
|
-
if (code = path5.charCodeAt(
|
|
11601
|
+
for (var code = path5.charCodeAt(0), hasRoot = code === 47, end = -1, matchedSlash = !0, i2 = path5.length - 1; i2 >= 1; --i2)
|
|
11602
|
+
if (code = path5.charCodeAt(i2), code === 47) {
|
|
11594
11603
|
if (!matchedSlash) {
|
|
11595
|
-
end =
|
|
11604
|
+
end = i2;
|
|
11596
11605
|
break;
|
|
11597
11606
|
}
|
|
11598
11607
|
} else
|
|
@@ -11602,44 +11611,44 @@ var require_path_browserify = __commonJS({
|
|
|
11602
11611
|
basename: function(path5, ext) {
|
|
11603
11612
|
if (ext !== void 0 && typeof ext != "string") throw new TypeError('"ext" argument must be a string');
|
|
11604
11613
|
assertPath(path5);
|
|
11605
|
-
var start = 0, end = -1, matchedSlash = !0,
|
|
11614
|
+
var start = 0, end = -1, matchedSlash = !0, i2;
|
|
11606
11615
|
if (ext !== void 0 && ext.length > 0 && ext.length <= path5.length) {
|
|
11607
11616
|
if (ext.length === path5.length && ext === path5) return "";
|
|
11608
11617
|
var extIdx = ext.length - 1, firstNonSlashEnd = -1;
|
|
11609
|
-
for (
|
|
11610
|
-
var code = path5.charCodeAt(
|
|
11618
|
+
for (i2 = path5.length - 1; i2 >= 0; --i2) {
|
|
11619
|
+
var code = path5.charCodeAt(i2);
|
|
11611
11620
|
if (code === 47) {
|
|
11612
11621
|
if (!matchedSlash) {
|
|
11613
|
-
start =
|
|
11622
|
+
start = i2 + 1;
|
|
11614
11623
|
break;
|
|
11615
11624
|
}
|
|
11616
11625
|
} else
|
|
11617
|
-
firstNonSlashEnd === -1 && (matchedSlash = !1, firstNonSlashEnd =
|
|
11626
|
+
firstNonSlashEnd === -1 && (matchedSlash = !1, firstNonSlashEnd = i2 + 1), extIdx >= 0 && (code === ext.charCodeAt(extIdx) ? --extIdx === -1 && (end = i2) : (extIdx = -1, end = firstNonSlashEnd));
|
|
11618
11627
|
}
|
|
11619
11628
|
return start === end ? end = firstNonSlashEnd : end === -1 && (end = path5.length), path5.slice(start, end);
|
|
11620
11629
|
} else {
|
|
11621
|
-
for (
|
|
11622
|
-
if (path5.charCodeAt(
|
|
11630
|
+
for (i2 = path5.length - 1; i2 >= 0; --i2)
|
|
11631
|
+
if (path5.charCodeAt(i2) === 47) {
|
|
11623
11632
|
if (!matchedSlash) {
|
|
11624
|
-
start =
|
|
11633
|
+
start = i2 + 1;
|
|
11625
11634
|
break;
|
|
11626
11635
|
}
|
|
11627
|
-
} else end === -1 && (matchedSlash = !1, end =
|
|
11636
|
+
} else end === -1 && (matchedSlash = !1, end = i2 + 1);
|
|
11628
11637
|
return end === -1 ? "" : path5.slice(start, end);
|
|
11629
11638
|
}
|
|
11630
11639
|
},
|
|
11631
11640
|
extname: function(path5) {
|
|
11632
11641
|
assertPath(path5);
|
|
11633
|
-
for (var startDot = -1, startPart = 0, end = -1, matchedSlash = !0, preDotState = 0,
|
|
11634
|
-
var code = path5.charCodeAt(
|
|
11642
|
+
for (var startDot = -1, startPart = 0, end = -1, matchedSlash = !0, preDotState = 0, i2 = path5.length - 1; i2 >= 0; --i2) {
|
|
11643
|
+
var code = path5.charCodeAt(i2);
|
|
11635
11644
|
if (code === 47) {
|
|
11636
11645
|
if (!matchedSlash) {
|
|
11637
|
-
startPart =
|
|
11646
|
+
startPart = i2 + 1;
|
|
11638
11647
|
break;
|
|
11639
11648
|
}
|
|
11640
11649
|
continue;
|
|
11641
11650
|
}
|
|
11642
|
-
end === -1 && (matchedSlash = !1, end =
|
|
11651
|
+
end === -1 && (matchedSlash = !1, end = i2 + 1), code === 46 ? startDot === -1 ? startDot = i2 : preDotState !== 1 && (preDotState = 1) : startDot !== -1 && (preDotState = -1);
|
|
11643
11652
|
}
|
|
11644
11653
|
return startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot
|
|
11645
11654
|
preDotState === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
@@ -11656,15 +11665,15 @@ var require_path_browserify = __commonJS({
|
|
|
11656
11665
|
if (path5.length === 0) return ret;
|
|
11657
11666
|
var code = path5.charCodeAt(0), isAbsolute4 = code === 47, start;
|
|
11658
11667
|
isAbsolute4 ? (ret.root = "/", start = 1) : start = 0;
|
|
11659
|
-
for (var startDot = -1, startPart = 0, end = -1, matchedSlash = !0,
|
|
11660
|
-
if (code = path5.charCodeAt(
|
|
11668
|
+
for (var startDot = -1, startPart = 0, end = -1, matchedSlash = !0, i2 = path5.length - 1, preDotState = 0; i2 >= start; --i2) {
|
|
11669
|
+
if (code = path5.charCodeAt(i2), code === 47) {
|
|
11661
11670
|
if (!matchedSlash) {
|
|
11662
|
-
startPart =
|
|
11671
|
+
startPart = i2 + 1;
|
|
11663
11672
|
break;
|
|
11664
11673
|
}
|
|
11665
11674
|
continue;
|
|
11666
11675
|
}
|
|
11667
|
-
end === -1 && (matchedSlash = !1, end =
|
|
11676
|
+
end === -1 && (matchedSlash = !1, end = i2 + 1), code === 46 ? startDot === -1 ? startDot = i2 : preDotState !== 1 && (preDotState = 1) : startDot !== -1 && (preDotState = -1);
|
|
11668
11677
|
}
|
|
11669
11678
|
return startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot
|
|
11670
11679
|
preDotState === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
@@ -11815,8 +11824,8 @@ var require_createProject = __commonJS({
|
|
|
11815
11824
|
for (let fileName of tsFileNamesSet) {
|
|
11816
11825
|
tsFileRegistry.set(fileName, !0);
|
|
11817
11826
|
let parts = fileName.split("/");
|
|
11818
|
-
for (let
|
|
11819
|
-
let dirName = parts.slice(0,
|
|
11827
|
+
for (let i2 = 1; i2 < parts.length; i2++) {
|
|
11828
|
+
let dirName = parts.slice(0, i2).join("/");
|
|
11820
11829
|
tsFileDirRegistry.set(dirName, !0);
|
|
11821
11830
|
}
|
|
11822
11831
|
}
|
|
@@ -11877,7 +11886,7 @@ var require_umd = __commonJS({
|
|
|
11877
11886
|
if (typeof t8 != "string") throw new TypeError("Path must be a string. Received " + JSON.stringify(t8));
|
|
11878
11887
|
}
|
|
11879
11888
|
function r2(t8, e3) {
|
|
11880
|
-
for (var r3, n3 = "",
|
|
11889
|
+
for (var r3, n3 = "", i2 = 0, o = -1, s = 0, a = 0; a <= t8.length; ++a) {
|
|
11881
11890
|
if (a < t8.length) r3 = t8.charCodeAt(a);
|
|
11882
11891
|
else {
|
|
11883
11892
|
if (r3 === 47) break;
|
|
@@ -11885,78 +11894,78 @@ var require_umd = __commonJS({
|
|
|
11885
11894
|
}
|
|
11886
11895
|
if (r3 === 47) {
|
|
11887
11896
|
if (!(o === a - 1 || s === 1)) if (o !== a - 1 && s === 2) {
|
|
11888
|
-
if (n3.length < 2 ||
|
|
11897
|
+
if (n3.length < 2 || i2 !== 2 || n3.charCodeAt(n3.length - 1) !== 46 || n3.charCodeAt(n3.length - 2) !== 46) {
|
|
11889
11898
|
if (n3.length > 2) {
|
|
11890
11899
|
var h = n3.lastIndexOf("/");
|
|
11891
11900
|
if (h !== n3.length - 1) {
|
|
11892
|
-
h === -1 ? (n3 = "",
|
|
11901
|
+
h === -1 ? (n3 = "", i2 = 0) : i2 = (n3 = n3.slice(0, h)).length - 1 - n3.lastIndexOf("/"), o = a, s = 0;
|
|
11893
11902
|
continue;
|
|
11894
11903
|
}
|
|
11895
11904
|
} else if (n3.length === 2 || n3.length === 1) {
|
|
11896
|
-
n3 = "",
|
|
11905
|
+
n3 = "", i2 = 0, o = a, s = 0;
|
|
11897
11906
|
continue;
|
|
11898
11907
|
}
|
|
11899
11908
|
}
|
|
11900
|
-
e3 && (n3.length > 0 ? n3 += "/.." : n3 = "..",
|
|
11901
|
-
} else n3.length > 0 ? n3 += "/" + t8.slice(o + 1, a) : n3 = t8.slice(o + 1, a),
|
|
11909
|
+
e3 && (n3.length > 0 ? n3 += "/.." : n3 = "..", i2 = 2);
|
|
11910
|
+
} else n3.length > 0 ? n3 += "/" + t8.slice(o + 1, a) : n3 = t8.slice(o + 1, a), i2 = a - o - 1;
|
|
11902
11911
|
o = a, s = 0;
|
|
11903
11912
|
} else r3 === 46 && s !== -1 ? ++s : s = -1;
|
|
11904
11913
|
}
|
|
11905
11914
|
return n3;
|
|
11906
11915
|
}
|
|
11907
11916
|
var n2 = { resolve: function() {
|
|
11908
|
-
for (var t8, n3 = "",
|
|
11917
|
+
for (var t8, n3 = "", i2 = !1, o = arguments.length - 1; o >= -1 && !i2; o--) {
|
|
11909
11918
|
var s;
|
|
11910
|
-
o >= 0 ? s = arguments[o] : (t8 === void 0 && (t8 = process.cwd()), s = t8), e2(s), s.length !== 0 && (n3 = s + "/" + n3,
|
|
11919
|
+
o >= 0 ? s = arguments[o] : (t8 === void 0 && (t8 = process.cwd()), s = t8), e2(s), s.length !== 0 && (n3 = s + "/" + n3, i2 = s.charCodeAt(0) === 47);
|
|
11911
11920
|
}
|
|
11912
|
-
return n3 = r2(n3, !
|
|
11921
|
+
return n3 = r2(n3, !i2), i2 ? n3.length > 0 ? "/" + n3 : "/" : n3.length > 0 ? n3 : ".";
|
|
11913
11922
|
}, normalize: function(t8) {
|
|
11914
11923
|
if (e2(t8), t8.length === 0) return ".";
|
|
11915
|
-
var n3 = t8.charCodeAt(0) === 47,
|
|
11916
|
-
return (t8 = r2(t8, !n3)).length !== 0 || n3 || (t8 = "."), t8.length > 0 &&
|
|
11924
|
+
var n3 = t8.charCodeAt(0) === 47, i2 = t8.charCodeAt(t8.length - 1) === 47;
|
|
11925
|
+
return (t8 = r2(t8, !n3)).length !== 0 || n3 || (t8 = "."), t8.length > 0 && i2 && (t8 += "/"), n3 ? "/" + t8 : t8;
|
|
11917
11926
|
}, isAbsolute: function(t8) {
|
|
11918
11927
|
return e2(t8), t8.length > 0 && t8.charCodeAt(0) === 47;
|
|
11919
11928
|
}, join: function() {
|
|
11920
11929
|
if (arguments.length === 0) return ".";
|
|
11921
11930
|
for (var t8, r3 = 0; r3 < arguments.length; ++r3) {
|
|
11922
|
-
var
|
|
11923
|
-
e2(
|
|
11931
|
+
var i2 = arguments[r3];
|
|
11932
|
+
e2(i2), i2.length > 0 && (t8 === void 0 ? t8 = i2 : t8 += "/" + i2);
|
|
11924
11933
|
}
|
|
11925
11934
|
return t8 === void 0 ? "." : n2.normalize(t8);
|
|
11926
11935
|
}, relative: function(t8, r3) {
|
|
11927
11936
|
if (e2(t8), e2(r3), t8 === r3 || (t8 = n2.resolve(t8)) === (r3 = n2.resolve(r3))) return "";
|
|
11928
|
-
for (var
|
|
11929
|
-
for (var o = t8.length, s = o -
|
|
11937
|
+
for (var i2 = 1; i2 < t8.length && t8.charCodeAt(i2) === 47; ++i2) ;
|
|
11938
|
+
for (var o = t8.length, s = o - i2, a = 1; a < r3.length && r3.charCodeAt(a) === 47; ++a) ;
|
|
11930
11939
|
for (var h = r3.length - a, c = s < h ? s : h, f = -1, u = 0; u <= c; ++u) {
|
|
11931
11940
|
if (u === c) {
|
|
11932
11941
|
if (h > c) {
|
|
11933
11942
|
if (r3.charCodeAt(a + u) === 47) return r3.slice(a + u + 1);
|
|
11934
11943
|
if (u === 0) return r3.slice(a + u);
|
|
11935
|
-
} else s > c && (t8.charCodeAt(
|
|
11944
|
+
} else s > c && (t8.charCodeAt(i2 + u) === 47 ? f = u : u === 0 && (f = 0));
|
|
11936
11945
|
break;
|
|
11937
11946
|
}
|
|
11938
|
-
var l = t8.charCodeAt(
|
|
11947
|
+
var l = t8.charCodeAt(i2 + u);
|
|
11939
11948
|
if (l !== r3.charCodeAt(a + u)) break;
|
|
11940
11949
|
l === 47 && (f = u);
|
|
11941
11950
|
}
|
|
11942
11951
|
var d = "";
|
|
11943
|
-
for (u =
|
|
11952
|
+
for (u = i2 + f + 1; u <= o; ++u) u !== o && t8.charCodeAt(u) !== 47 || (d.length === 0 ? d += ".." : d += "/..");
|
|
11944
11953
|
return d.length > 0 ? d + r3.slice(a + f) : (a += f, r3.charCodeAt(a) === 47 && ++a, r3.slice(a));
|
|
11945
11954
|
}, _makeLong: function(t8) {
|
|
11946
11955
|
return t8;
|
|
11947
11956
|
}, dirname: function(t8) {
|
|
11948
11957
|
if (e2(t8), t8.length === 0) return ".";
|
|
11949
|
-
for (var r3 = t8.charCodeAt(0), n3 = r3 === 47,
|
|
11958
|
+
for (var r3 = t8.charCodeAt(0), n3 = r3 === 47, i2 = -1, o = !0, s = t8.length - 1; s >= 1; --s) if ((r3 = t8.charCodeAt(s)) === 47) {
|
|
11950
11959
|
if (!o) {
|
|
11951
|
-
|
|
11960
|
+
i2 = s;
|
|
11952
11961
|
break;
|
|
11953
11962
|
}
|
|
11954
11963
|
} else o = !1;
|
|
11955
|
-
return
|
|
11964
|
+
return i2 === -1 ? n3 ? "/" : "." : n3 && i2 === 1 ? "//" : t8.slice(0, i2);
|
|
11956
11965
|
}, basename: function(t8, r3) {
|
|
11957
11966
|
if (r3 !== void 0 && typeof r3 != "string") throw new TypeError('"ext" argument must be a string');
|
|
11958
11967
|
e2(t8);
|
|
11959
|
-
var n3,
|
|
11968
|
+
var n3, i2 = 0, o = -1, s = !0;
|
|
11960
11969
|
if (r3 !== void 0 && r3.length > 0 && r3.length <= t8.length) {
|
|
11961
11970
|
if (r3.length === t8.length && r3 === t8) return "";
|
|
11962
11971
|
var a = r3.length - 1, h = -1;
|
|
@@ -11964,31 +11973,31 @@ var require_umd = __commonJS({
|
|
|
11964
11973
|
var c = t8.charCodeAt(n3);
|
|
11965
11974
|
if (c === 47) {
|
|
11966
11975
|
if (!s) {
|
|
11967
|
-
|
|
11976
|
+
i2 = n3 + 1;
|
|
11968
11977
|
break;
|
|
11969
11978
|
}
|
|
11970
11979
|
} else h === -1 && (s = !1, h = n3 + 1), a >= 0 && (c === r3.charCodeAt(a) ? --a == -1 && (o = n3) : (a = -1, o = h));
|
|
11971
11980
|
}
|
|
11972
|
-
return
|
|
11981
|
+
return i2 === o ? o = h : o === -1 && (o = t8.length), t8.slice(i2, o);
|
|
11973
11982
|
}
|
|
11974
11983
|
for (n3 = t8.length - 1; n3 >= 0; --n3) if (t8.charCodeAt(n3) === 47) {
|
|
11975
11984
|
if (!s) {
|
|
11976
|
-
|
|
11985
|
+
i2 = n3 + 1;
|
|
11977
11986
|
break;
|
|
11978
11987
|
}
|
|
11979
11988
|
} else o === -1 && (s = !1, o = n3 + 1);
|
|
11980
|
-
return o === -1 ? "" : t8.slice(
|
|
11989
|
+
return o === -1 ? "" : t8.slice(i2, o);
|
|
11981
11990
|
}, extname: function(t8) {
|
|
11982
11991
|
e2(t8);
|
|
11983
|
-
for (var r3 = -1, n3 = 0,
|
|
11992
|
+
for (var r3 = -1, n3 = 0, i2 = -1, o = !0, s = 0, a = t8.length - 1; a >= 0; --a) {
|
|
11984
11993
|
var h = t8.charCodeAt(a);
|
|
11985
|
-
if (h !== 47)
|
|
11994
|
+
if (h !== 47) i2 === -1 && (o = !1, i2 = a + 1), h === 46 ? r3 === -1 ? r3 = a : s !== 1 && (s = 1) : r3 !== -1 && (s = -1);
|
|
11986
11995
|
else if (!o) {
|
|
11987
11996
|
n3 = a + 1;
|
|
11988
11997
|
break;
|
|
11989
11998
|
}
|
|
11990
11999
|
}
|
|
11991
|
-
return r3 === -1 ||
|
|
12000
|
+
return r3 === -1 || i2 === -1 || s === 0 || s === 1 && r3 === i2 - 1 && r3 === n3 + 1 ? "" : t8.slice(r3, i2);
|
|
11992
12001
|
}, format: function(t8) {
|
|
11993
12002
|
if (t8 === null || typeof t8 != "object") throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof t8);
|
|
11994
12003
|
return (function(t9, e3) {
|
|
@@ -11999,9 +12008,9 @@ var require_umd = __commonJS({
|
|
|
11999
12008
|
e2(t8);
|
|
12000
12009
|
var r3 = { root: "", dir: "", base: "", ext: "", name: "" };
|
|
12001
12010
|
if (t8.length === 0) return r3;
|
|
12002
|
-
var n3,
|
|
12011
|
+
var n3, i2 = t8.charCodeAt(0), o = i2 === 47;
|
|
12003
12012
|
o ? (r3.root = "/", n3 = 1) : n3 = 0;
|
|
12004
|
-
for (var s = -1, a = 0, h = -1, c = !0, f = t8.length - 1, u = 0; f >= n3; --f) if ((
|
|
12013
|
+
for (var s = -1, a = 0, h = -1, c = !0, f = t8.length - 1, u = 0; f >= n3; --f) if ((i2 = t8.charCodeAt(f)) !== 47) h === -1 && (c = !1, h = f + 1), i2 === 46 ? s === -1 ? s = f : u !== 1 && (u = 1) : s !== -1 && (u = -1);
|
|
12005
12014
|
else if (!c) {
|
|
12006
12015
|
a = f + 1;
|
|
12007
12016
|
break;
|
|
@@ -12017,10 +12026,10 @@ var require_umd = __commonJS({
|
|
|
12017
12026
|
}
|
|
12018
12027
|
}, 231: (t7, e2, r2) => {
|
|
12019
12028
|
Object.defineProperty(e2, "__esModule", { value: !0 }), e2.uriToFsPath = e2.URI = void 0;
|
|
12020
|
-
let n2 = r2(70),
|
|
12029
|
+
let n2 = r2(70), i2 = /^\w[\w\d+.-]*$/, o = /^\//, s = /^\/\//;
|
|
12021
12030
|
function a(t8, e3) {
|
|
12022
12031
|
if (!t8.scheme && e3) throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t8.authority}", path: "${t8.path}", query: "${t8.query}", fragment: "${t8.fragment}"}`);
|
|
12023
|
-
if (t8.scheme && !
|
|
12032
|
+
if (t8.scheme && !i2.test(t8.scheme)) throw new Error("[UriError]: Scheme contains illegal characters.");
|
|
12024
12033
|
if (t8.path) {
|
|
12025
12034
|
if (t8.authority) {
|
|
12026
12035
|
if (!o.test(t8.path)) throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character');
|
|
@@ -12037,7 +12046,7 @@ var require_umd = __commonJS({
|
|
|
12037
12046
|
path;
|
|
12038
12047
|
query;
|
|
12039
12048
|
fragment;
|
|
12040
|
-
constructor(t8, e3, r3, n3,
|
|
12049
|
+
constructor(t8, e3, r3, n3, i3, o2 = !1) {
|
|
12041
12050
|
typeof t8 == "object" ? (this.scheme = t8.scheme || h, this.authority = t8.authority || h, this.path = t8.path || h, this.query = t8.query || h, this.fragment = t8.fragment || h) : (this.scheme = /* @__PURE__ */ (function(t9, e4) {
|
|
12042
12051
|
return t9 || e4 ? t9 : "file";
|
|
12043
12052
|
})(t8, o2), this.authority = e3 || h, this.path = (function(t9, e4) {
|
|
@@ -12048,15 +12057,15 @@ var require_umd = __commonJS({
|
|
|
12048
12057
|
e4 ? e4[0] !== c && (e4 = c + e4) : e4 = c;
|
|
12049
12058
|
}
|
|
12050
12059
|
return e4;
|
|
12051
|
-
})(this.scheme, r3 || h), this.query = n3 || h, this.fragment =
|
|
12060
|
+
})(this.scheme, r3 || h), this.query = n3 || h, this.fragment = i3 || h, a(this, o2));
|
|
12052
12061
|
}
|
|
12053
12062
|
get fsPath() {
|
|
12054
12063
|
return v(this, !1);
|
|
12055
12064
|
}
|
|
12056
12065
|
with(t8) {
|
|
12057
12066
|
if (!t8) return this;
|
|
12058
|
-
let { scheme: e3, authority: r3, path: n3, query:
|
|
12059
|
-
return e3 === void 0 ? e3 = this.scheme : e3 === null && (e3 = h), r3 === void 0 ? r3 = this.authority : r3 === null && (r3 = h), n3 === void 0 ? n3 = this.path : n3 === null && (n3 = h),
|
|
12067
|
+
let { scheme: e3, authority: r3, path: n3, query: i3, fragment: o2 } = t8;
|
|
12068
|
+
return e3 === void 0 ? e3 = this.scheme : e3 === null && (e3 = h), r3 === void 0 ? r3 = this.authority : r3 === null && (r3 = h), n3 === void 0 ? n3 = this.path : n3 === null && (n3 = h), i3 === void 0 ? i3 = this.query : i3 === null && (i3 = h), o2 === void 0 ? o2 = this.fragment : o2 === null && (o2 = h), e3 === this.scheme && r3 === this.authority && n3 === this.path && i3 === this.query && o2 === this.fragment ? this : new d(e3, r3, n3, i3, o2);
|
|
12060
12069
|
}
|
|
12061
12070
|
static parse(t8, e3 = !1) {
|
|
12062
12071
|
let r3 = f.exec(t8);
|
|
@@ -12109,17 +12118,17 @@ var require_umd = __commonJS({
|
|
|
12109
12118
|
}
|
|
12110
12119
|
let p = { 58: "%3A", 47: "%2F", 63: "%3F", 35: "%23", 91: "%5B", 93: "%5D", 64: "%40", 33: "%21", 36: "%24", 38: "%26", 39: "%27", 40: "%28", 41: "%29", 42: "%2A", 43: "%2B", 44: "%2C", 59: "%3B", 61: "%3D", 32: "%20" };
|
|
12111
12120
|
function g(t8, e3, r3) {
|
|
12112
|
-
let n3,
|
|
12121
|
+
let n3, i3 = -1;
|
|
12113
12122
|
for (let o2 = 0; o2 < t8.length; o2++) {
|
|
12114
12123
|
let s2 = t8.charCodeAt(o2);
|
|
12115
|
-
if (s2 >= 97 && s2 <= 122 || s2 >= 65 && s2 <= 90 || s2 >= 48 && s2 <= 57 || s2 === 45 || s2 === 46 || s2 === 95 || s2 === 126 || e3 && s2 === 47 || r3 && s2 === 91 || r3 && s2 === 93 || r3 && s2 === 58)
|
|
12124
|
+
if (s2 >= 97 && s2 <= 122 || s2 >= 65 && s2 <= 90 || s2 >= 48 && s2 <= 57 || s2 === 45 || s2 === 46 || s2 === 95 || s2 === 126 || e3 && s2 === 47 || r3 && s2 === 91 || r3 && s2 === 93 || r3 && s2 === 58) i3 !== -1 && (n3 += encodeURIComponent(t8.substring(i3, o2)), i3 = -1), n3 !== void 0 && (n3 += t8.charAt(o2));
|
|
12116
12125
|
else {
|
|
12117
12126
|
n3 === void 0 && (n3 = t8.substr(0, o2));
|
|
12118
12127
|
let e4 = p[s2];
|
|
12119
|
-
e4 !== void 0 ? (
|
|
12128
|
+
e4 !== void 0 ? (i3 !== -1 && (n3 += encodeURIComponent(t8.substring(i3, o2)), i3 = -1), n3 += e4) : i3 === -1 && (i3 = o2);
|
|
12120
12129
|
}
|
|
12121
12130
|
}
|
|
12122
|
-
return
|
|
12131
|
+
return i3 !== -1 && (n3 += encodeURIComponent(t8.substring(i3))), n3 !== void 0 ? n3 : t8;
|
|
12123
12132
|
}
|
|
12124
12133
|
function m(t8) {
|
|
12125
12134
|
let e3;
|
|
@@ -12134,8 +12143,8 @@ var require_umd = __commonJS({
|
|
|
12134
12143
|
return r3 = t8.authority && t8.path.length > 1 && t8.scheme === "file" ? `//${t8.authority}${t8.path}` : t8.path.charCodeAt(0) === 47 && (t8.path.charCodeAt(1) >= 65 && t8.path.charCodeAt(1) <= 90 || t8.path.charCodeAt(1) >= 97 && t8.path.charCodeAt(1) <= 122) && t8.path.charCodeAt(2) === 58 ? e3 ? t8.path.substr(1) : t8.path[1].toLowerCase() + t8.path.substr(2) : t8.path, n2.isWindows && (r3 = r3.replace(/\//g, "\\")), r3;
|
|
12135
12144
|
}
|
|
12136
12145
|
function y(t8, e3) {
|
|
12137
|
-
let r3 = e3 ? m : g, n3 = "", { scheme:
|
|
12138
|
-
if (
|
|
12146
|
+
let r3 = e3 ? m : g, n3 = "", { scheme: i3, authority: o2, path: s2, query: a2, fragment: h2 } = t8;
|
|
12147
|
+
if (i3 && (n3 += i3, n3 += ":"), (o2 || i3 === "file") && (n3 += c, n3 += c), o2) {
|
|
12139
12148
|
let t9 = o2.indexOf("@");
|
|
12140
12149
|
if (t9 !== -1) {
|
|
12141
12150
|
let e4 = o2.substr(0, t9);
|
|
@@ -12170,13 +12179,13 @@ var require_umd = __commonJS({
|
|
|
12170
12179
|
}, 552: function(t7, e2, r2) {
|
|
12171
12180
|
var n2 = this && this.__createBinding || (Object.create ? function(t8, e3, r3, n3) {
|
|
12172
12181
|
n3 === void 0 && (n3 = r3);
|
|
12173
|
-
var
|
|
12174
|
-
|
|
12182
|
+
var i3 = Object.getOwnPropertyDescriptor(e3, r3);
|
|
12183
|
+
i3 && !("get" in i3 ? !e3.__esModule : i3.writable || i3.configurable) || (i3 = { enumerable: !0, get: function() {
|
|
12175
12184
|
return e3[r3];
|
|
12176
|
-
} }), Object.defineProperty(t8, n3,
|
|
12185
|
+
} }), Object.defineProperty(t8, n3, i3);
|
|
12177
12186
|
} : function(t8, e3, r3, n3) {
|
|
12178
12187
|
n3 === void 0 && (n3 = r3), t8[n3] = e3[r3];
|
|
12179
|
-
}),
|
|
12188
|
+
}), i2 = this && this.__setModuleDefault || (Object.create ? function(t8, e3) {
|
|
12180
12189
|
Object.defineProperty(t8, "default", { enumerable: !0, value: e3 });
|
|
12181
12190
|
} : function(t8, e3) {
|
|
12182
12191
|
t8.default = e3;
|
|
@@ -12184,7 +12193,7 @@ var require_umd = __commonJS({
|
|
|
12184
12193
|
if (t8 && t8.__esModule) return t8;
|
|
12185
12194
|
var e3 = {};
|
|
12186
12195
|
if (t8 != null) for (var r3 in t8) r3 !== "default" && Object.prototype.hasOwnProperty.call(t8, r3) && n2(e3, t8, r3);
|
|
12187
|
-
return
|
|
12196
|
+
return i2(e3, t8), e3;
|
|
12188
12197
|
};
|
|
12189
12198
|
Object.defineProperty(e2, "__esModule", { value: !0 }), e2.Utils = void 0;
|
|
12190
12199
|
let s = o(r2(975)), a = s.posix || s, h = "/";
|
|
@@ -12195,8 +12204,8 @@ var require_umd = __commonJS({
|
|
|
12195
12204
|
}, t8.resolvePath = function(t9, ...e3) {
|
|
12196
12205
|
let r3 = t9.path, n3 = !1;
|
|
12197
12206
|
r3[0] !== h && (r3 = h + r3, n3 = !0);
|
|
12198
|
-
let
|
|
12199
|
-
return n3 &&
|
|
12207
|
+
let i3 = a.resolve(r3, ...e3);
|
|
12208
|
+
return n3 && i3[0] === h && !t9.authority && (i3 = i3.substring(1)), t9.with({ path: i3 });
|
|
12200
12209
|
}, t8.dirname = function(t9) {
|
|
12201
12210
|
if (t9.path.length === 0 || t9.path === h) return t9;
|
|
12202
12211
|
let e3 = a.dirname(t9.path);
|
|
@@ -12209,8 +12218,8 @@ var require_umd = __commonJS({
|
|
|
12209
12218
|
})(c || (e2.Utils = c = {}));
|
|
12210
12219
|
} }, e = {};
|
|
12211
12220
|
function r(n2) {
|
|
12212
|
-
var
|
|
12213
|
-
if (
|
|
12221
|
+
var i2 = e[n2];
|
|
12222
|
+
if (i2 !== void 0) return i2.exports;
|
|
12214
12223
|
var o = e[n2] = { exports: {} };
|
|
12215
12224
|
return t6[n2].call(o.exports, o, o.exports, r), o.exports;
|
|
12216
12225
|
}
|
|
@@ -12222,9 +12231,9 @@ var require_umd = __commonJS({
|
|
|
12222
12231
|
Object.defineProperty(t7, "URI", { enumerable: !0, get: function() {
|
|
12223
12232
|
return e2.URI;
|
|
12224
12233
|
} });
|
|
12225
|
-
let
|
|
12234
|
+
let i2 = r(552);
|
|
12226
12235
|
Object.defineProperty(t7, "Utils", { enumerable: !0, get: function() {
|
|
12227
|
-
return
|
|
12236
|
+
return i2.Utils;
|
|
12228
12237
|
} });
|
|
12229
12238
|
})(), n;
|
|
12230
12239
|
})()));
|
|
@@ -12257,8 +12266,8 @@ var require_core4 = __commonJS({
|
|
|
12257
12266
|
var emptyArray = [];
|
|
12258
12267
|
function every(array, callback) {
|
|
12259
12268
|
if (array) {
|
|
12260
|
-
for (let
|
|
12261
|
-
if (!callback(array[
|
|
12269
|
+
for (let i2 = 0; i2 < array.length; i2++)
|
|
12270
|
+
if (!callback(array[i2], i2))
|
|
12262
12271
|
return !1;
|
|
12263
12272
|
}
|
|
12264
12273
|
return !0;
|
|
@@ -12266,9 +12275,9 @@ var require_core4 = __commonJS({
|
|
|
12266
12275
|
function findIndex(array, predicate, startIndex) {
|
|
12267
12276
|
if (array === void 0)
|
|
12268
12277
|
return -1;
|
|
12269
|
-
for (let
|
|
12270
|
-
if (predicate(array[
|
|
12271
|
-
return
|
|
12278
|
+
for (let i2 = startIndex ?? 0; i2 < array.length; i2++)
|
|
12279
|
+
if (predicate(array[i2], i2))
|
|
12280
|
+
return i2;
|
|
12272
12281
|
return -1;
|
|
12273
12282
|
}
|
|
12274
12283
|
function contains(array, value, equalityComparer = equateValues) {
|
|
@@ -12280,17 +12289,17 @@ var require_core4 = __commonJS({
|
|
|
12280
12289
|
return !1;
|
|
12281
12290
|
}
|
|
12282
12291
|
function indexOfAnyCharCode(text, charCodes, start) {
|
|
12283
|
-
for (let
|
|
12284
|
-
if (contains(charCodes, text.charCodeAt(
|
|
12285
|
-
return
|
|
12292
|
+
for (let i2 = start || 0; i2 < text.length; i2++)
|
|
12293
|
+
if (contains(charCodes, text.charCodeAt(i2)))
|
|
12294
|
+
return i2;
|
|
12286
12295
|
return -1;
|
|
12287
12296
|
}
|
|
12288
12297
|
function map(array, f) {
|
|
12289
12298
|
let result;
|
|
12290
12299
|
if (array) {
|
|
12291
12300
|
result = [];
|
|
12292
|
-
for (let
|
|
12293
|
-
result.push(f(array[
|
|
12301
|
+
for (let i2 = 0; i2 < array.length; i2++)
|
|
12302
|
+
result.push(f(array[i2], i2));
|
|
12294
12303
|
}
|
|
12295
12304
|
return result;
|
|
12296
12305
|
}
|
|
@@ -12303,8 +12312,8 @@ var require_core4 = __commonJS({
|
|
|
12303
12312
|
function flatMap(array, mapfn) {
|
|
12304
12313
|
let result;
|
|
12305
12314
|
if (array)
|
|
12306
|
-
for (let
|
|
12307
|
-
let v = mapfn(array[
|
|
12315
|
+
for (let i2 = 0; i2 < array.length; i2++) {
|
|
12316
|
+
let v = mapfn(array[i2], i2);
|
|
12308
12317
|
v && (isArray2(v) ? result = addRange(result, v) : result = append(result, v));
|
|
12309
12318
|
}
|
|
12310
12319
|
return result || emptyArray;
|
|
@@ -12331,8 +12340,8 @@ var require_core4 = __commonJS({
|
|
|
12331
12340
|
if (to === void 0)
|
|
12332
12341
|
return from.slice(start, end);
|
|
12333
12342
|
start = start === void 0 ? 0 : toOffset(from, start), end = end === void 0 ? from.length : toOffset(from, end);
|
|
12334
|
-
for (let
|
|
12335
|
-
from[
|
|
12343
|
+
for (let i2 = start; i2 < end && i2 < from.length; i2++)
|
|
12344
|
+
from[i2] !== void 0 && to.push(from[i2]);
|
|
12336
12345
|
return to;
|
|
12337
12346
|
}
|
|
12338
12347
|
function sort(array, comparer) {
|
|
@@ -12540,8 +12549,8 @@ var require_path = __commonJS({
|
|
|
12540
12549
|
if (!(0, core_1.some)(components))
|
|
12541
12550
|
return [];
|
|
12542
12551
|
let reduced = [components[0]];
|
|
12543
|
-
for (let
|
|
12544
|
-
let component = components[
|
|
12552
|
+
for (let i2 = 1; i2 < components.length; i2++) {
|
|
12553
|
+
let component = components[i2];
|
|
12545
12554
|
if (component && component !== ".") {
|
|
12546
12555
|
if (component === "..") {
|
|
12547
12556
|
if (reduced.length > 1) {
|
|
@@ -12591,8 +12600,8 @@ var require_path = __commonJS({
|
|
|
12591
12600
|
if (childComponents.length < parentComponents.length)
|
|
12592
12601
|
return !1;
|
|
12593
12602
|
let componentEqualityComparer = ignoreCase ? core_1.equateStringsCaseInsensitive : core_1.equateStringsCaseSensitive;
|
|
12594
|
-
for (let
|
|
12595
|
-
if (!(
|
|
12603
|
+
for (let i2 = 0; i2 < parentComponents.length; i2++)
|
|
12604
|
+
if (!(i2 === 0 ? core_1.equateStringsCaseInsensitive : componentEqualityComparer)(parentComponents[i2], childComponents[i2]))
|
|
12596
12605
|
return !1;
|
|
12597
12606
|
return !0;
|
|
12598
12607
|
}
|
|
@@ -12965,8 +12974,8 @@ var require_createSys = __commonJS({
|
|
|
12965
12974
|
for (; lastDirPath !== currentDirPath; )
|
|
12966
12975
|
lastDirPath = currentDirPath, dirNames.push(currentDirName), currentDirPath = path5.dirname(currentDirPath), currentDirName = path5.basename(currentDirPath);
|
|
12967
12976
|
let currentDir = root;
|
|
12968
|
-
for (let
|
|
12969
|
-
let nextDirName = dirNames[
|
|
12977
|
+
for (let i2 = dirNames.length - 1; i2 >= 0; i2--) {
|
|
12978
|
+
let nextDirName = dirNames[i2];
|
|
12970
12979
|
currentDir = getDirFromDir(currentDir, nextDirName), markExists && !currentDir.exists && (currentDir.exists = !0, version2++);
|
|
12971
12980
|
}
|
|
12972
12981
|
return currentDir;
|
|
@@ -13289,7 +13298,7 @@ import {
|
|
|
13289
13298
|
} from "storybook/internal/docs-tools";
|
|
13290
13299
|
|
|
13291
13300
|
// src/docs/lib/componentTypes.ts
|
|
13292
|
-
var isMemo = (component) => component.$$typeof === Symbol.for("react.memo");
|
|
13301
|
+
var isMemo = (component) => component.$$typeof === /* @__PURE__ */ Symbol.for("react.memo");
|
|
13293
13302
|
|
|
13294
13303
|
// src/docs/lib/defaultValues/createDefaultValue.ts
|
|
13295
13304
|
import {
|
|
@@ -13480,14 +13489,9 @@ function parse5(value) {
|
|
|
13480
13489
|
};
|
|
13481
13490
|
if (ast.body[0] != null) {
|
|
13482
13491
|
let rootNode = ast.body[0];
|
|
13483
|
-
|
|
13484
|
-
|
|
13485
|
-
|
|
13486
|
-
expressionResult != null && (parsingResult = expressionResult);
|
|
13487
|
-
break;
|
|
13488
|
-
}
|
|
13489
|
-
default:
|
|
13490
|
-
break;
|
|
13492
|
+
if (rootNode.type === "ExpressionStatement") {
|
|
13493
|
+
let expressionResult = parseExpression(rootNode.expression);
|
|
13494
|
+
expressionResult != null && (parsingResult = expressionResult);
|
|
13491
13495
|
}
|
|
13492
13496
|
}
|
|
13493
13497
|
return parsingResult;
|
|
@@ -13690,15 +13694,15 @@ function _toPrimitive(t6, r) {
|
|
|
13690
13694
|
if (typeof t6 != "object" || !t6) return t6;
|
|
13691
13695
|
var e = t6[Symbol.toPrimitive];
|
|
13692
13696
|
if (e !== void 0) {
|
|
13693
|
-
var
|
|
13694
|
-
if (typeof
|
|
13697
|
+
var i2 = e.call(t6, r || "default");
|
|
13698
|
+
if (typeof i2 != "object") return i2;
|
|
13695
13699
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
13696
13700
|
}
|
|
13697
13701
|
return (r === "string" ? String : Number)(t6);
|
|
13698
13702
|
}
|
|
13699
13703
|
function _toPropertyKey(t6) {
|
|
13700
|
-
var
|
|
13701
|
-
return typeof
|
|
13704
|
+
var i2 = _toPrimitive(t6, "string");
|
|
13705
|
+
return typeof i2 == "symbol" ? i2 : i2 + "";
|
|
13702
13706
|
}
|
|
13703
13707
|
function _typeof(o) {
|
|
13704
13708
|
"@babel/helpers - typeof";
|
|
@@ -14581,9 +14585,9 @@ function typeTokenizer(spacing = "compact") {
|
|
|
14581
14585
|
let join7 = getJoiner(spacing);
|
|
14582
14586
|
return (spec) => {
|
|
14583
14587
|
let curlies = 0, lines = [];
|
|
14584
|
-
for (let [
|
|
14588
|
+
for (let [i2, { tokens }] of spec.source.entries()) {
|
|
14585
14589
|
let type = "";
|
|
14586
|
-
if (
|
|
14590
|
+
if (i2 === 0 && tokens.description[0] !== "{")
|
|
14587
14591
|
return spec;
|
|
14588
14592
|
for (let ch of tokens.description)
|
|
14589
14593
|
if (ch === "{" && curlies++, ch === "}" && curlies--, type += ch, curlies === 0)
|
|
@@ -14599,8 +14603,8 @@ function typeTokenizer(spacing = "compact") {
|
|
|
14599
14603
|
critical: !0
|
|
14600
14604
|
}), spec;
|
|
14601
14605
|
let parts = [], offset2 = lines[0][0].postDelimiter.length;
|
|
14602
|
-
for (let [
|
|
14603
|
-
tokens.type = type,
|
|
14606
|
+
for (let [i2, [tokens, type]] of lines.entries())
|
|
14607
|
+
tokens.type = type, i2 > 0 && (tokens.type = tokens.postDelimiter.slice(offset2) + type, tokens.postDelimiter = tokens.postDelimiter.slice(0, offset2)), [tokens.postType, tokens.description] = splitSpace(tokens.description.slice(type.length)), parts.push(tokens.type);
|
|
14604
14608
|
return parts[0] = parts[0].slice(1), parts[parts.length - 1] = parts[parts.length - 1].slice(0, -1), spec.type = join7(parts), spec;
|
|
14605
14609
|
};
|
|
14606
14610
|
}
|
|
@@ -14613,7 +14617,7 @@ function getJoiner(spacing) {
|
|
|
14613
14617
|
// ../../../node_modules/comment-parser/es6/parser/tokenizers/name.js
|
|
14614
14618
|
var isQuoted = (s) => s && s.startsWith('"') && s.endsWith('"');
|
|
14615
14619
|
function nameTokenizer() {
|
|
14616
|
-
let typeEnd = (num, { tokens },
|
|
14620
|
+
let typeEnd = (num, { tokens }, i2) => tokens.type === "" ? num : i2;
|
|
14617
14621
|
return (spec) => {
|
|
14618
14622
|
let { tokens } = spec.source[spec.source.reduce(typeEnd, 0)], source = tokens.description.trimLeft(), quotedGroups = source.split('"');
|
|
14619
14623
|
if (quotedGroups.length > 1 && quotedGroups[0] === "" && quotedGroups.length % 2 === 1)
|
|
@@ -14672,7 +14676,7 @@ function getJoiner2(spacing) {
|
|
|
14672
14676
|
function compactJoiner(lines, markers = Markers) {
|
|
14673
14677
|
return lines.map(({ tokens: { description } }) => description.trim()).filter((description) => description !== "").join(" ");
|
|
14674
14678
|
}
|
|
14675
|
-
var lineNo = (num, { tokens },
|
|
14679
|
+
var lineNo = (num, { tokens }, i2) => tokens.type === "" ? num : i2, getDescription = ({ tokens }) => (tokens.delimiter === "" ? tokens.start : tokens.postDelimiter.slice(1)) + tokens.description;
|
|
14676
14680
|
function preserveJoiner(lines, markers = Markers) {
|
|
14677
14681
|
if (lines.length === 0)
|
|
14678
14682
|
return "";
|
|
@@ -14850,9 +14854,9 @@ var memoStore = /* @__PURE__ */ new WeakMap(), asyncMemoStore = /* @__PURE__ */
|
|
|
14850
14854
|
function extractJSDocInfo(jsdocComment) {
|
|
14851
14855
|
let jsDoc = ["/**", ...jsdocComment.split(`
|
|
14852
14856
|
`).map((line) => ` * ${line}`), " */"].join(`
|
|
14853
|
-
`), parsed = parse6(jsDoc);
|
|
14857
|
+
`), description = parse6(jsDoc, { spacing: "preserve" })[0].description, parsed = parse6(jsDoc, { spacing: "compact" });
|
|
14854
14858
|
return {
|
|
14855
|
-
description
|
|
14859
|
+
description,
|
|
14856
14860
|
tags: Object.fromEntries(
|
|
14857
14861
|
Object.entries(groupBy(parsed[0].tags, (it) => it.tag)).map(([key, tags]) => [
|
|
14858
14862
|
key,
|
|
@@ -16280,9 +16284,9 @@ function buildReactComponentDocgenFromResolved({
|
|
|
16280
16284
|
docgenEngine,
|
|
16281
16285
|
filterStoryIds
|
|
16282
16286
|
}) {
|
|
16283
|
-
let
|
|
16287
|
+
let id = getComponentIdFromEntry(entry), title = entry.title.split("/").at(-1).replace(/\s+/g, ""), packageName = getPackageInfo(component?.path, storyPath), fallbackImport = getFallbackImport(packageName, componentName), imports = getImports({ components: allComponents, packageName }).join(`
|
|
16284
16288
|
`).trim() || fallbackImport, stories = extractStorySnippets(csf, component?.componentName, filterStoryIds), base2 = {
|
|
16285
|
-
|
|
16289
|
+
id,
|
|
16286
16290
|
name: componentName ?? title,
|
|
16287
16291
|
path: storyFilePath,
|
|
16288
16292
|
stories,
|
|
@@ -16345,32 +16349,6 @@ ${storyFile}`
|
|
|
16345
16349
|
error: docgenError
|
|
16346
16350
|
};
|
|
16347
16351
|
}
|
|
16348
|
-
function toReactComponentManifest(resolved) {
|
|
16349
|
-
let { componentId, subcomponents, ...rest } = resolved;
|
|
16350
|
-
return {
|
|
16351
|
-
...rest,
|
|
16352
|
-
id: componentId,
|
|
16353
|
-
...subcomponents ? {
|
|
16354
|
-
subcomponents: Object.fromEntries(
|
|
16355
|
-
Object.entries(subcomponents).map(([key, sub]) => [
|
|
16356
|
-
key,
|
|
16357
|
-
{
|
|
16358
|
-
name: sub.name,
|
|
16359
|
-
path: sub.path,
|
|
16360
|
-
description: sub.description,
|
|
16361
|
-
summary: sub.summary,
|
|
16362
|
-
import: sub.import,
|
|
16363
|
-
jsDocTags: sub.jsDocTags,
|
|
16364
|
-
error: sub.error,
|
|
16365
|
-
reactDocgen: sub.reactDocgen,
|
|
16366
|
-
reactDocgenTypescript: sub.reactDocgenTypescript,
|
|
16367
|
-
reactComponentMeta: sub.reactComponentMeta
|
|
16368
|
-
}
|
|
16369
|
-
])
|
|
16370
|
-
)
|
|
16371
|
-
} : {}
|
|
16372
|
-
};
|
|
16373
|
-
}
|
|
16374
16352
|
|
|
16375
16353
|
// src/componentManifest/componentMetaManagerSingleton.ts
|
|
16376
16354
|
import { logger as logger8 } from "storybook/internal/node-logger";
|
|
@@ -16454,19 +16432,19 @@ function resolveComponentSymbol(typescript, checker, symbol, contextNode, depth
|
|
|
16454
16432
|
}
|
|
16455
16433
|
return resolved;
|
|
16456
16434
|
}
|
|
16457
|
-
function
|
|
16435
|
+
function findImportSymbolInStoryFile(typescript, checker, storySourceFile, componentRef) {
|
|
16458
16436
|
let importSpecifier = componentRef.importId, importName = componentRef.importName, memberAccess = componentRef.member;
|
|
16459
|
-
if (
|
|
16460
|
-
|
|
16461
|
-
|
|
16462
|
-
|
|
16463
|
-
|
|
16464
|
-
|
|
16465
|
-
|
|
16466
|
-
|
|
16467
|
-
|
|
16468
|
-
|
|
16469
|
-
|
|
16437
|
+
if (importSpecifier)
|
|
16438
|
+
for (let stmt of storySourceFile.statements) {
|
|
16439
|
+
if (!typescript.isImportDeclaration(stmt))
|
|
16440
|
+
continue;
|
|
16441
|
+
let moduleSpec = stmt.moduleSpecifier;
|
|
16442
|
+
if (!typescript.isStringLiteral(moduleSpec) || moduleSpec.text !== importSpecifier)
|
|
16443
|
+
continue;
|
|
16444
|
+
let clause = stmt.importClause;
|
|
16445
|
+
if (!clause)
|
|
16446
|
+
continue;
|
|
16447
|
+
let importSymbol;
|
|
16470
16448
|
if (importName === "default") {
|
|
16471
16449
|
if (clause.name && (importSymbol = checker.getSymbolAtLocation(clause.name)), !importSymbol && clause.namedBindings && typescript.isNamedImports(clause.namedBindings)) {
|
|
16472
16450
|
for (let spec of clause.namedBindings.elements)
|
|
@@ -16483,9 +16461,28 @@ function resolvePropsFromStoryFile(typescript, checker, storySourceFile, compone
|
|
|
16483
16461
|
}
|
|
16484
16462
|
}
|
|
16485
16463
|
if (!importSymbol && memberAccess && clause.namedBindings && typescript.isNamespaceImport(clause.namedBindings) && (importSymbol = checker.getSymbolAtLocation(clause.namedBindings.name)), importSymbol)
|
|
16486
|
-
|
|
16464
|
+
return importSymbol;
|
|
16487
16465
|
}
|
|
16466
|
+
}
|
|
16467
|
+
function metaComponentMatchesRef(typescript, checker, storySourceFile, componentRef, metaComponentInitializer) {
|
|
16468
|
+
let refSymbol = findImportSymbolInStoryFile(typescript, checker, storySourceFile, componentRef), metaSymbol = resolveComponentSymbolFromNode(typescript, checker, metaComponentInitializer);
|
|
16469
|
+
if (refSymbol && metaSymbol && !componentRef.member)
|
|
16470
|
+
return resolveAliasedSymbol(typescript, checker, refSymbol) === resolveAliasedSymbol(typescript, checker, metaSymbol);
|
|
16471
|
+
if (typescript.isIdentifier(metaComponentInitializer))
|
|
16472
|
+
return componentRef.componentName === metaComponentInitializer.text;
|
|
16473
|
+
if (typescript.isPropertyAccessExpression(metaComponentInitializer) && typescript.isIdentifier(metaComponentInitializer.expression)) {
|
|
16474
|
+
let metaName = `${metaComponentInitializer.expression.text}.${metaComponentInitializer.name.text}`;
|
|
16475
|
+
return componentRef.componentName === metaName;
|
|
16488
16476
|
}
|
|
16477
|
+
return !1;
|
|
16478
|
+
}
|
|
16479
|
+
function resolvePropsFromStoryFile(typescript, checker, storySourceFile, componentRef) {
|
|
16480
|
+
let memberAccess = componentRef.member, importSymbol = findImportSymbolInStoryFile(
|
|
16481
|
+
typescript,
|
|
16482
|
+
checker,
|
|
16483
|
+
storySourceFile,
|
|
16484
|
+
componentRef
|
|
16485
|
+
);
|
|
16489
16486
|
if (!importSymbol)
|
|
16490
16487
|
return;
|
|
16491
16488
|
let result;
|
|
@@ -16556,6 +16553,37 @@ function resolvePropsFromComponentType(typescript, checker, componentType) {
|
|
|
16556
16553
|
}
|
|
16557
16554
|
}
|
|
16558
16555
|
}
|
|
16556
|
+
function resolvePropsFromComponentExport(typescript, checker, componentSourceFile, componentRef) {
|
|
16557
|
+
let moduleSymbol = checker.getSymbolAtLocation(componentSourceFile);
|
|
16558
|
+
if (!moduleSymbol)
|
|
16559
|
+
return;
|
|
16560
|
+
let exports = checker.getExportsOfModule(checker.getMergedSymbol(moduleSymbol)), exportName = componentRef.importName ?? componentRef.componentName.split(".").at(-1);
|
|
16561
|
+
if (!exportName)
|
|
16562
|
+
return;
|
|
16563
|
+
let exportSymbol, componentType;
|
|
16564
|
+
if (componentRef.namespace && componentRef.member) {
|
|
16565
|
+
let namespaceExportName = componentRef.importName ?? componentRef.member;
|
|
16566
|
+
if (exportSymbol = namespaceExportName === "default" ? exports.find((symbol) => symbol.getName() === "default") : exports.find((symbol) => symbol.getName() === namespaceExportName), !exportSymbol)
|
|
16567
|
+
return;
|
|
16568
|
+
componentType = checker.getTypeOfSymbol(exportSymbol);
|
|
16569
|
+
} else {
|
|
16570
|
+
if (exportSymbol = exportName === "default" ? exports.find((symbol) => symbol.getName() === "default") : exports.find((symbol) => symbol.getName() === exportName), !exportSymbol)
|
|
16571
|
+
return;
|
|
16572
|
+
if (componentType = checker.getTypeOfSymbol(exportSymbol), componentRef.member) {
|
|
16573
|
+
let memberSymbol = componentType.getProperty(componentRef.member);
|
|
16574
|
+
if (!memberSymbol)
|
|
16575
|
+
return;
|
|
16576
|
+
exportSymbol = memberSymbol, componentType = checker.getTypeOfSymbol(memberSymbol);
|
|
16577
|
+
}
|
|
16578
|
+
}
|
|
16579
|
+
let propsType = resolvePropsFromComponentType(typescript, checker, componentType), contextNode = exportSymbol ? getSymbolContextNode(exportSymbol) : void 0;
|
|
16580
|
+
if (!(!propsType || !exportSymbol || !contextNode))
|
|
16581
|
+
return {
|
|
16582
|
+
componentRef,
|
|
16583
|
+
propsType,
|
|
16584
|
+
symbol: resolveComponentSymbol(typescript, checker, exportSymbol, contextNode)
|
|
16585
|
+
};
|
|
16586
|
+
}
|
|
16559
16587
|
function getPropSourceFile(prop) {
|
|
16560
16588
|
let declarations = prop.getDeclarations();
|
|
16561
16589
|
if (declarations?.length) {
|
|
@@ -16604,7 +16632,12 @@ function serializeType(typescript, checker, type, isRequired, depth = 0) {
|
|
|
16604
16632
|
if (type.isUnion()) {
|
|
16605
16633
|
let nonUndefinedTypes = type.types.filter(
|
|
16606
16634
|
(t6) => !(t6.getFlags() & typescript.TypeFlags.Undefined)
|
|
16607
|
-
),
|
|
16635
|
+
), booleanLiterals = nonUndefinedTypes.filter(
|
|
16636
|
+
(t6) => t6.getFlags() & typescript.TypeFlags.BooleanLiteral
|
|
16637
|
+
);
|
|
16638
|
+
if (booleanLiterals.length === 2 && booleanLiterals.length === nonUndefinedTypes.length)
|
|
16639
|
+
return { name: "boolean" };
|
|
16640
|
+
let literalMembers = nonUndefinedTypes.filter(isLiteralType);
|
|
16608
16641
|
if (literalMembers.length > 0 && literalMembers.length === nonUndefinedTypes.length)
|
|
16609
16642
|
return {
|
|
16610
16643
|
name: "enum",
|
|
@@ -16868,7 +16901,7 @@ function serializeComponentDoc(typescript, checker, {
|
|
|
16868
16901
|
seen.set(name, prop);
|
|
16869
16902
|
else if (!isDegraded) {
|
|
16870
16903
|
let existingType = checker.getTypeOfSymbolAtLocation(existing, contextNode);
|
|
16871
|
-
(
|
|
16904
|
+
(existingType.getFlags() & typescript.TypeFlags.Never || existingType.getFlags() & typescript.TypeFlags.Undefined) && seen.set(name, prop);
|
|
16872
16905
|
}
|
|
16873
16906
|
}
|
|
16874
16907
|
allMemberPropSets.push(memberPropNames);
|
|
@@ -17175,6 +17208,11 @@ var ComponentMetaProject = class {
|
|
|
17175
17208
|
checker,
|
|
17176
17209
|
storySourceFile,
|
|
17177
17210
|
entryComponent
|
|
17211
|
+
)), resolvedComponent || (resolvedComponent = resolvePropsFromComponentExport(
|
|
17212
|
+
this.typescript,
|
|
17213
|
+
checker,
|
|
17214
|
+
componentSourceFile,
|
|
17215
|
+
entryComponent
|
|
17178
17216
|
)), !resolvedComponent)
|
|
17179
17217
|
continue;
|
|
17180
17218
|
let serializationContext = serializationContextByComponentPath.get(componentPath);
|
|
@@ -17230,7 +17268,16 @@ var ComponentMetaProject = class {
|
|
|
17230
17268
|
if (!defaultExport)
|
|
17231
17269
|
return;
|
|
17232
17270
|
let componentProp = checker.getTypeOfSymbol(defaultExport).getProperty("component");
|
|
17233
|
-
if (!componentProp)
|
|
17271
|
+
if (!componentProp?.valueDeclaration || !this.typescript.isPropertyAssignment(componentProp.valueDeclaration))
|
|
17272
|
+
return;
|
|
17273
|
+
let metaComponentInitializer = componentProp.valueDeclaration.initializer;
|
|
17274
|
+
if (!metaComponentInitializer || !metaComponentMatchesRef(
|
|
17275
|
+
this.typescript,
|
|
17276
|
+
checker,
|
|
17277
|
+
storySourceFile,
|
|
17278
|
+
componentRef,
|
|
17279
|
+
metaComponentInitializer
|
|
17280
|
+
))
|
|
17234
17281
|
return;
|
|
17235
17282
|
let componentType = checker.getTypeOfSymbol(componentProp), selectedSymbol = componentProp.valueDeclaration && this.typescript.isPropertyAssignment(componentProp.valueDeclaration) ? checker.getSymbolAtLocation(componentProp.valueDeclaration.initializer) : componentType.getSymbol?.();
|
|
17236
17283
|
if (memberAccess) {
|
|
@@ -17344,8 +17391,8 @@ var rootTsConfigNames = ["tsconfig.json", "jsconfig.json"], DEFAULT_INFERRED_OPT
|
|
|
17344
17391
|
let chains = getReferencesChains(project.getCommandLine(), rootTsConfig, []);
|
|
17345
17392
|
chains = chains.reverse();
|
|
17346
17393
|
for (let chain of chains)
|
|
17347
|
-
for (let
|
|
17348
|
-
let tsconfig = chain[
|
|
17394
|
+
for (let i2 = chain.length - 1; i2 >= 0; i2--) {
|
|
17395
|
+
let tsconfig = chain[i2];
|
|
17349
17396
|
if (!checked.has(tsconfig) && (checked.add(tsconfig), match(tsconfig)))
|
|
17350
17397
|
return tsconfig;
|
|
17351
17398
|
}
|
|
@@ -17620,7 +17667,17 @@ function getSharedComponentMetaManager() {
|
|
|
17620
17667
|
|
|
17621
17668
|
// src/componentManifest/generator.ts
|
|
17622
17669
|
var manifests = async (existingManifests = {}, options) => {
|
|
17623
|
-
let { manifestEntries, presets, watch: watch2 } = options, typescriptOptions = await presets?.apply("typescript", {}) ?? {},
|
|
17670
|
+
let { manifestEntries, presets, watch: watch2 } = options, typescriptOptions = await presets?.apply("typescript", {}) ?? {}, features = await presets?.apply("features", {});
|
|
17671
|
+
if (features?.experimentalDocgenServer)
|
|
17672
|
+
return {
|
|
17673
|
+
...existingManifests,
|
|
17674
|
+
components: {
|
|
17675
|
+
v: 0,
|
|
17676
|
+
components: {},
|
|
17677
|
+
meta: { docgen: "react-component-meta", durationMs: 0 }
|
|
17678
|
+
}
|
|
17679
|
+
};
|
|
17680
|
+
let docgenEngine = features?.experimentalReactComponentMeta ? "react-component-meta" : typescriptOptions.reactDocgen || "react-docgen";
|
|
17624
17681
|
invalidateCache(), invalidateParser();
|
|
17625
17682
|
let startTime = performance.now(), manager = docgenEngine === "react-component-meta" ? await getSharedComponentMetaManager() : void 0, entriesByUniqueComponent = [
|
|
17626
17683
|
...selectComponentEntriesByComponentId(manifestEntries).values()
|
|
@@ -17660,21 +17717,19 @@ var manifests = async (existingManifests = {}, options) => {
|
|
|
17660
17717
|
componentName,
|
|
17661
17718
|
allComponents,
|
|
17662
17719
|
subcomponents
|
|
17663
|
-
}) =>
|
|
17664
|
-
|
|
17665
|
-
|
|
17666
|
-
|
|
17667
|
-
|
|
17668
|
-
|
|
17669
|
-
|
|
17670
|
-
|
|
17671
|
-
|
|
17672
|
-
|
|
17673
|
-
|
|
17674
|
-
|
|
17675
|
-
|
|
17676
|
-
})
|
|
17677
|
-
)
|
|
17720
|
+
}) => buildReactComponentDocgenFromResolved({
|
|
17721
|
+
entry,
|
|
17722
|
+
storyPath,
|
|
17723
|
+
storyFilePath,
|
|
17724
|
+
storyFile,
|
|
17725
|
+
csf,
|
|
17726
|
+
componentName,
|
|
17727
|
+
component,
|
|
17728
|
+
allComponents,
|
|
17729
|
+
subcomponents,
|
|
17730
|
+
docgenEngine,
|
|
17731
|
+
filterStoryIds: manifestEntryIds
|
|
17732
|
+
})
|
|
17678
17733
|
).filter((component) => component !== void 0);
|
|
17679
17734
|
manager && watch2 && manager.startWatching();
|
|
17680
17735
|
let durationMs = Math.round(performance.now() - startTime);
|
|
@@ -17769,55 +17824,23 @@ import { STORY_FILE_TEST_REGEXP, getStoryImportPathFromEntry as getStoryImportPa
|
|
|
17769
17824
|
|
|
17770
17825
|
// src/docgen/buildDocgen.ts
|
|
17771
17826
|
import { getStoryImportPathFromEntry as getStoryImportPathFromEntry2 } from "storybook/internal/common";
|
|
17772
|
-
function
|
|
17773
|
-
return
|
|
17774
|
-
name: prop.name,
|
|
17775
|
-
required: prop.required,
|
|
17776
|
-
type: prop.type,
|
|
17777
|
-
description: prop.description,
|
|
17778
|
-
defaultValue: prop.defaultValue,
|
|
17779
|
-
parent: prop.parent,
|
|
17780
|
-
declarations: prop.declarations
|
|
17781
|
-
})) : [];
|
|
17782
|
-
}
|
|
17783
|
-
function mapSubcomponentToDocgen(sub) {
|
|
17784
|
-
return {
|
|
17785
|
-
name: sub.name,
|
|
17786
|
-
path: sub.path,
|
|
17787
|
-
description: sub.description,
|
|
17788
|
-
summary: sub.summary,
|
|
17789
|
-
import: sub.import,
|
|
17790
|
-
jsDocTags: sub.jsDocTags,
|
|
17791
|
-
props: mapProps(sub.reactComponentMeta),
|
|
17792
|
-
error: sub.error
|
|
17793
|
-
};
|
|
17827
|
+
function extractArgTypesFromComponentMeta(componentMeta) {
|
|
17828
|
+
return componentMeta ? extractArgTypes({ __docgenInfo: componentMeta }) ?? void 0 : void 0;
|
|
17794
17829
|
}
|
|
17795
|
-
function
|
|
17796
|
-
let
|
|
17797
|
-
|
|
17798
|
-
|
|
17799
|
-
|
|
17800
|
-
|
|
17801
|
-
|
|
17802
|
-
|
|
17803
|
-
})) : void 0, subcomponents = resolved.subcomponents && Object.keys(resolved.subcomponents).length > 0 ? Object.fromEntries(
|
|
17804
|
-
Object.entries(resolved.subcomponents).map(([key, sub]) => [
|
|
17805
|
-
key,
|
|
17806
|
-
mapSubcomponentToDocgen(sub)
|
|
17830
|
+
function addArgTypesFromComponentMeta(payload) {
|
|
17831
|
+
let argTypes = extractArgTypesFromComponentMeta(payload.reactComponentMeta), subcomponents = payload.subcomponents ? Object.fromEntries(
|
|
17832
|
+
Object.entries(payload.subcomponents).map(([name, subcomponent]) => [
|
|
17833
|
+
name,
|
|
17834
|
+
{
|
|
17835
|
+
...subcomponent,
|
|
17836
|
+
argTypes: extractArgTypesFromComponentMeta(subcomponent.reactComponentMeta)
|
|
17837
|
+
}
|
|
17807
17838
|
])
|
|
17808
17839
|
) : void 0;
|
|
17809
17840
|
return {
|
|
17810
|
-
|
|
17811
|
-
|
|
17812
|
-
|
|
17813
|
-
import: resolved.import,
|
|
17814
|
-
description: resolved.description ?? "",
|
|
17815
|
-
summary: resolved.summary,
|
|
17816
|
-
jsDocTags: resolved.jsDocTags,
|
|
17817
|
-
props: mapProps(resolved.reactComponentMeta),
|
|
17818
|
-
error: resolved.error,
|
|
17819
|
-
...subcomponents ? { subcomponents } : {},
|
|
17820
|
-
...stories ? { stories } : {}
|
|
17841
|
+
...payload,
|
|
17842
|
+
...argTypes ? { argTypes } : {},
|
|
17843
|
+
...subcomponents ? { subcomponents } : {}
|
|
17821
17844
|
};
|
|
17822
17845
|
}
|
|
17823
17846
|
async function buildDocgenPayload(input, context) {
|
|
@@ -17854,7 +17877,7 @@ async function buildDocgenPayload(input, context) {
|
|
|
17854
17877
|
subcomponents,
|
|
17855
17878
|
docgenEngine: "react-component-meta"
|
|
17856
17879
|
});
|
|
17857
|
-
return
|
|
17880
|
+
return addArgTypesFromComponentMeta(componentDocgen);
|
|
17858
17881
|
}
|
|
17859
17882
|
|
|
17860
17883
|
// src/docgen/preset.ts
|