@lithent/hmr-parser 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/helper/calculator.d.ts +1 -1
- package/dist/lithentHmrParser.mjs +788 -803
- package/dist/lithentHmrParser.mjs.map +1 -1
- package/dist/lithentHmrParser.umd.js +45 -57
- package/dist/lithentHmrParser.umd.js.map +1 -1
- package/package.json +15 -12
- package/src/helper/calculator.ts +5 -21
- package/src/strings.ts +19 -31
- package/src/tests/mark.test.ts +9 -10
- package/src/tests/nomark.test.tsx +5 -7
- package/src/transform/componentRegister.ts +1 -1
|
@@ -44,8 +44,8 @@ function nn(t) {
|
|
|
44
44
|
if (n > 0 && e.write(rn), o.length === 0) continue;
|
|
45
45
|
let u = 0;
|
|
46
46
|
for (let p = 0; p < o.length; p++) {
|
|
47
|
-
const
|
|
48
|
-
p > 0 && e.write(tn), u = We(e,
|
|
47
|
+
const y = o[p];
|
|
48
|
+
p > 0 && e.write(tn), u = We(e, y[0], u), y.length !== 1 && (r = We(e, y[1], r), s = We(e, y[2], s), i = We(e, y[3], i), y.length !== 4 && (a = We(e, y[4], a)));
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
return e.flush();
|
|
@@ -331,8 +331,8 @@ class jt {
|
|
|
331
331
|
if (dn(e) && (r = e, e = void 0), e === void 0 && (this._ensureindentStr(), e = this.indentStr || " "), e === "") return this;
|
|
332
332
|
r = r || {};
|
|
333
333
|
const i = {};
|
|
334
|
-
r.exclude && (typeof r.exclude[0] == "number" ? [r.exclude] : r.exclude).forEach((
|
|
335
|
-
for (let E =
|
|
334
|
+
r.exclude && (typeof r.exclude[0] == "number" ? [r.exclude] : r.exclude).forEach((y) => {
|
|
335
|
+
for (let E = y[0]; E < y[1]; E += 1)
|
|
336
336
|
i[E] = !0;
|
|
337
337
|
});
|
|
338
338
|
let a = r.indentStart !== !1;
|
|
@@ -347,9 +347,9 @@ class jt {
|
|
|
347
347
|
else
|
|
348
348
|
for (o = u.start; o < p; ) {
|
|
349
349
|
if (!i[o]) {
|
|
350
|
-
const
|
|
351
|
-
|
|
352
|
-
` ? a = !0 :
|
|
350
|
+
const y = this.original[o];
|
|
351
|
+
y === `
|
|
352
|
+
` ? a = !0 : y !== "\r" && a && (a = !1, o === u.start || (this._splitChunk(u, o), u = u.next), u.prependRight(e));
|
|
353
353
|
}
|
|
354
354
|
o += 1;
|
|
355
355
|
}
|
|
@@ -667,17 +667,11 @@ const __lithentBoundaryStoreKey = \`__lithent_hmr_boundary__\${__lithentModuleId
|
|
|
667
667
|
const __lithentDisposeStoreKey = \`__lithent_hmr_dispose__\${__lithentModuleId}\`;
|
|
668
668
|
const __lithentGlobalStore =
|
|
669
669
|
typeof globalThis === 'object'
|
|
670
|
-
?
|
|
670
|
+
? globalThis
|
|
671
671
|
: undefined;
|
|
672
672
|
|
|
673
|
-
const __lithentEnsureHotData = ()
|
|
674
|
-
const hot =
|
|
675
|
-
(import.meta.hot as
|
|
676
|
-
| {
|
|
677
|
-
data?: Record<string, unknown>;
|
|
678
|
-
__lithentData?: Record<string, unknown>;
|
|
679
|
-
}
|
|
680
|
-
| undefined) ?? undefined;
|
|
673
|
+
const __lithentEnsureHotData = () => {
|
|
674
|
+
const hot = import.meta.hot ?? undefined;
|
|
681
675
|
if (!hot) return undefined;
|
|
682
676
|
|
|
683
677
|
const existing = hot.data;
|
|
@@ -686,7 +680,7 @@ const __lithentEnsureHotData = (): Record<string, unknown> | undefined => {
|
|
|
686
680
|
}
|
|
687
681
|
|
|
688
682
|
try {
|
|
689
|
-
const target
|
|
683
|
+
const target = {};
|
|
690
684
|
hot.data = target;
|
|
691
685
|
return target;
|
|
692
686
|
} catch {
|
|
@@ -696,11 +690,10 @@ const __lithentEnsureHotData = (): Record<string, unknown> | undefined => {
|
|
|
696
690
|
};
|
|
697
691
|
|
|
698
692
|
const __lithentHotData = __lithentEnsureHotData();
|
|
699
|
-
type __LithentBoundaryController = ReturnType<typeof createBoundary>;
|
|
700
693
|
|
|
701
|
-
const counterBoundary
|
|
702
|
-
|
|
703
|
-
|
|
694
|
+
const counterBoundary =
|
|
695
|
+
__lithentHotData?.counterBoundary ||
|
|
696
|
+
__lithentGlobalStore?.[__lithentBoundaryStoreKey] ||
|
|
704
697
|
createBoundary(__lithentModuleId);
|
|
705
698
|
|
|
706
699
|
if (__lithentHotData) {
|
|
@@ -712,18 +705,18 @@ if (__lithentGlobalStore) {
|
|
|
712
705
|
}
|
|
713
706
|
|
|
714
707
|
let disposeApp =
|
|
715
|
-
|
|
716
|
-
|
|
708
|
+
__lithentHotData?.disposeApp ||
|
|
709
|
+
__lithentGlobalStore?.[__lithentDisposeStoreKey];
|
|
717
710
|
|
|
718
|
-
const __lithentRenderOnce =
|
|
711
|
+
const __lithentRenderOnce = (factory) => {
|
|
719
712
|
if (disposeApp) {
|
|
720
|
-
return disposeApp
|
|
713
|
+
return disposeApp;
|
|
721
714
|
}
|
|
722
715
|
|
|
723
716
|
const result = factory();
|
|
724
717
|
|
|
725
718
|
if (typeof result === 'function') {
|
|
726
|
-
disposeApp = result
|
|
719
|
+
disposeApp = result;
|
|
727
720
|
|
|
728
721
|
if (__lithentHotData) {
|
|
729
722
|
__lithentHotData.disposeApp = disposeApp;
|
|
@@ -740,10 +733,7 @@ const __lithentRenderOnce = <T,>(factory: () => T) => {
|
|
|
740
733
|
const __lithentModuleHotStore =
|
|
741
734
|
__lithentHotData
|
|
742
735
|
? ((__lithentHotData.components =
|
|
743
|
-
|
|
744
|
-
string,
|
|
745
|
-
TagFunction | undefined
|
|
746
|
-
> | undefined) ?? {}) as Record<string, TagFunction | undefined>)
|
|
736
|
+
__lithentHotData.components ?? {}))
|
|
747
737
|
: undefined;
|
|
748
738
|
|
|
749
739
|
const __lithentHmrTargets = ${JSON.stringify(Array.from(r))};
|
|
@@ -755,8 +745,8 @@ const __lithentSetupHmrHooks = () => {
|
|
|
755
745
|
|
|
756
746
|
import.meta.hot.accept(mod => {
|
|
757
747
|
let applied = false;
|
|
758
|
-
const nextModule =
|
|
759
|
-
const missing
|
|
748
|
+
const nextModule = mod ?? {};
|
|
749
|
+
const missing = [];
|
|
760
750
|
const knownNames = new Set([
|
|
761
751
|
...${JSON.stringify(Array.from(new Set(e)))},
|
|
762
752
|
...__lithentHmrTargets,
|
|
@@ -765,9 +755,9 @@ const __lithentSetupHmrHooks = () => {
|
|
|
765
755
|
for (const name of knownNames) {
|
|
766
756
|
const nextCtor =
|
|
767
757
|
name === 'default'
|
|
768
|
-
?
|
|
769
|
-
:
|
|
770
|
-
|
|
758
|
+
? nextModule.default
|
|
759
|
+
: nextModule[name] ||
|
|
760
|
+
__lithentModuleHotStore?.[name];
|
|
771
761
|
|
|
772
762
|
if (!nextCtor) {
|
|
773
763
|
missing.push(name);
|
|
@@ -784,9 +774,7 @@ const __lithentSetupHmrHooks = () => {
|
|
|
784
774
|
queueMicrotask(() => {
|
|
785
775
|
let retried = false;
|
|
786
776
|
for (const name of missing) {
|
|
787
|
-
const retryCtor = __lithentModuleHotStore?.[name]
|
|
788
|
-
| TagFunction
|
|
789
|
-
| undefined;
|
|
777
|
+
const retryCtor = __lithentModuleHotStore?.[name];
|
|
790
778
|
if (retryCtor && counterBoundary.update(retryCtor)) {
|
|
791
779
|
retried = true;
|
|
792
780
|
}
|
|
@@ -1174,14 +1162,14 @@ function gn({
|
|
|
1174
1162
|
}
|
|
1175
1163
|
return function a(n, o) {
|
|
1176
1164
|
const u = new SyntaxError();
|
|
1177
|
-
return u.code = e, u.reasonCode = r, u.loc = n, u.pos = n.index, u.syntaxPlugin = s, i && (u.missingPlugin = o.missingPlugin), Ks(u, "clone", function(
|
|
1165
|
+
return u.code = e, u.reasonCode = r, u.loc = n, u.pos = n.index, u.syntaxPlugin = s, i && (u.missingPlugin = o.missingPlugin), Ks(u, "clone", function(y = {}) {
|
|
1178
1166
|
var E;
|
|
1179
1167
|
const {
|
|
1180
|
-
line:
|
|
1181
|
-
column:
|
|
1182
|
-
index:
|
|
1183
|
-
} = (E =
|
|
1184
|
-
return a(new Ne(
|
|
1168
|
+
line: P,
|
|
1169
|
+
column: g,
|
|
1170
|
+
index: C
|
|
1171
|
+
} = (E = y.loc) != null ? E : n;
|
|
1172
|
+
return a(new Ne(P, g, C), Object.assign({}, o, y.details));
|
|
1185
1173
|
}), Ks(u, "details", o), Object.defineProperty(u, "message", {
|
|
1186
1174
|
configurable: !0,
|
|
1187
1175
|
get() {
|
|
@@ -1367,9 +1355,9 @@ var Nn = (t) => class extends t {
|
|
|
1367
1355
|
let p = this.startNode();
|
|
1368
1356
|
p.kind = r.kind, p = super.parseMethod(p, s, i, a, n, o, u), p.type = "FunctionExpression", delete p.kind, r.value = p;
|
|
1369
1357
|
const {
|
|
1370
|
-
typeParameters:
|
|
1358
|
+
typeParameters: y
|
|
1371
1359
|
} = r;
|
|
1372
|
-
return
|
|
1360
|
+
return y && (delete r.typeParameters, p.typeParameters = y, this.resetStartLocationFromNode(p, y)), o === "ClassPrivateMethod" && (r.computed = !1), this.finishNode(r, "MethodDefinition");
|
|
1373
1361
|
}
|
|
1374
1362
|
nameIsConstructor(r) {
|
|
1375
1363
|
return r.type === "Literal" ? r.value === "constructor" : super.nameIsConstructor(r);
|
|
@@ -2492,42 +2480,42 @@ const Ys = {
|
|
|
2492
2480
|
};
|
|
2493
2481
|
function Xs(t, e, r, s, i, a) {
|
|
2494
2482
|
const n = r, o = s, u = i;
|
|
2495
|
-
let p = "",
|
|
2483
|
+
let p = "", y = null, E = r;
|
|
2496
2484
|
const {
|
|
2497
|
-
length:
|
|
2485
|
+
length: P
|
|
2498
2486
|
} = e;
|
|
2499
2487
|
for (; ; ) {
|
|
2500
|
-
if (r >=
|
|
2488
|
+
if (r >= P) {
|
|
2501
2489
|
a.unterminated(n, o, u), p += e.slice(E, r);
|
|
2502
2490
|
break;
|
|
2503
2491
|
}
|
|
2504
|
-
const
|
|
2505
|
-
if (io(t,
|
|
2492
|
+
const g = e.charCodeAt(r);
|
|
2493
|
+
if (io(t, g, e, r)) {
|
|
2506
2494
|
p += e.slice(E, r);
|
|
2507
2495
|
break;
|
|
2508
2496
|
}
|
|
2509
|
-
if (
|
|
2497
|
+
if (g === 92) {
|
|
2510
2498
|
p += e.slice(E, r);
|
|
2511
|
-
const
|
|
2512
|
-
|
|
2499
|
+
const C = ao(e, r, s, i, t === "template", a);
|
|
2500
|
+
C.ch === null && !y ? y = {
|
|
2513
2501
|
pos: r,
|
|
2514
2502
|
lineStart: s,
|
|
2515
2503
|
curLine: i
|
|
2516
|
-
} : p +=
|
|
2504
|
+
} : p += C.ch, {
|
|
2517
2505
|
pos: r,
|
|
2518
2506
|
lineStart: s,
|
|
2519
2507
|
curLine: i
|
|
2520
|
-
} =
|
|
2521
|
-
} else
|
|
2522
|
-
`, ++r,
|
|
2508
|
+
} = C, E = r;
|
|
2509
|
+
} else g === 8232 || g === 8233 ? (++r, ++i, s = r) : g === 10 || g === 13 ? t === "template" ? (p += e.slice(E, r) + `
|
|
2510
|
+
`, ++r, g === 13 && e.charCodeAt(r) === 10 && ++r, ++i, E = s = r) : a.unterminated(n, o, u) : ++r;
|
|
2523
2511
|
}
|
|
2524
2512
|
return {
|
|
2525
2513
|
pos: r,
|
|
2526
2514
|
str: p,
|
|
2527
|
-
firstInvalidLoc:
|
|
2515
|
+
firstInvalidLoc: y,
|
|
2528
2516
|
lineStart: s,
|
|
2529
2517
|
curLine: i,
|
|
2530
|
-
containsInvalid: !!
|
|
2518
|
+
containsInvalid: !!y
|
|
2531
2519
|
};
|
|
2532
2520
|
}
|
|
2533
2521
|
function io(t, e, r, s) {
|
|
@@ -2585,15 +2573,15 @@ function ao(t, e, r, s, i, a) {
|
|
|
2585
2573
|
default:
|
|
2586
2574
|
if (u >= 48 && u <= 55) {
|
|
2587
2575
|
const p = e - 1;
|
|
2588
|
-
let E = /^[0-7]+/.exec(t.slice(p, e + 2))[0],
|
|
2589
|
-
|
|
2590
|
-
const
|
|
2591
|
-
if (E !== "0" ||
|
|
2576
|
+
let E = /^[0-7]+/.exec(t.slice(p, e + 2))[0], P = parseInt(E, 8);
|
|
2577
|
+
P > 255 && (E = E.slice(0, -1), P = parseInt(E, 8)), e += E.length - 1;
|
|
2578
|
+
const g = t.charCodeAt(e);
|
|
2579
|
+
if (E !== "0" || g === 56 || g === 57) {
|
|
2592
2580
|
if (i)
|
|
2593
2581
|
return o(null);
|
|
2594
2582
|
a.strictNumericEscape(p, r, s);
|
|
2595
2583
|
}
|
|
2596
|
-
return o(String.fromCharCode(
|
|
2584
|
+
return o(String.fromCharCode(P));
|
|
2597
2585
|
}
|
|
2598
2586
|
return o(String.fromCharCode(u));
|
|
2599
2587
|
}
|
|
@@ -2610,15 +2598,15 @@ function Lr(t, e, r, s, i, a, n, o) {
|
|
|
2610
2598
|
};
|
|
2611
2599
|
}
|
|
2612
2600
|
function Xi(t, e, r, s, i, a, n, o, u, p) {
|
|
2613
|
-
const
|
|
2614
|
-
let
|
|
2601
|
+
const y = e, E = i === 16 ? Ys.hex : Ys.decBinOct, P = i === 16 ? xt.hex : i === 10 ? xt.dec : i === 8 ? xt.oct : xt.bin;
|
|
2602
|
+
let g = !1, C = 0;
|
|
2615
2603
|
for (let A = 0, O = a ?? 1 / 0; A < O; ++A) {
|
|
2616
2604
|
const I = t.charCodeAt(e);
|
|
2617
|
-
let
|
|
2605
|
+
let N;
|
|
2618
2606
|
if (I === 95 && o !== "bail") {
|
|
2619
2607
|
const B = t.charCodeAt(e - 1), K = t.charCodeAt(e + 1);
|
|
2620
2608
|
if (o) {
|
|
2621
|
-
if (Number.isNaN(K) || !
|
|
2609
|
+
if (Number.isNaN(K) || !P(K) || E.has(B) || E.has(K)) {
|
|
2622
2610
|
if (p) return {
|
|
2623
2611
|
n: null,
|
|
2624
2612
|
pos: e
|
|
@@ -2635,26 +2623,26 @@ function Xi(t, e, r, s, i, a, n, o, u, p) {
|
|
|
2635
2623
|
++e;
|
|
2636
2624
|
continue;
|
|
2637
2625
|
}
|
|
2638
|
-
if (I >= 97 ?
|
|
2639
|
-
if (
|
|
2626
|
+
if (I >= 97 ? N = I - 97 + 10 : I >= 65 ? N = I - 65 + 10 : so(I) ? N = I - 48 : N = 1 / 0, N >= i) {
|
|
2627
|
+
if (N <= 9 && p)
|
|
2640
2628
|
return {
|
|
2641
2629
|
n: null,
|
|
2642
2630
|
pos: e
|
|
2643
2631
|
};
|
|
2644
|
-
if (
|
|
2645
|
-
|
|
2632
|
+
if (N <= 9 && u.invalidDigit(e, r, s, i))
|
|
2633
|
+
N = 0;
|
|
2646
2634
|
else if (n)
|
|
2647
|
-
|
|
2635
|
+
N = 0, g = !0;
|
|
2648
2636
|
else
|
|
2649
2637
|
break;
|
|
2650
2638
|
}
|
|
2651
|
-
++e,
|
|
2639
|
+
++e, C = C * i + N;
|
|
2652
2640
|
}
|
|
2653
|
-
return e ===
|
|
2641
|
+
return e === y || a != null && e - y !== a || g ? {
|
|
2654
2642
|
n: null,
|
|
2655
2643
|
pos: e
|
|
2656
2644
|
} : {
|
|
2657
|
-
n:
|
|
2645
|
+
n: C,
|
|
2658
2646
|
pos: e
|
|
2659
2647
|
};
|
|
2660
2648
|
}
|
|
@@ -3202,14 +3190,14 @@ class oo extends eo {
|
|
|
3202
3190
|
let o = "";
|
|
3203
3191
|
const u = () => ie(e, a + 2 - r);
|
|
3204
3192
|
for (; a < this.length; ) {
|
|
3205
|
-
const p = this.codePointAtPos(a),
|
|
3193
|
+
const p = this.codePointAtPos(a), y = String.fromCharCode(p);
|
|
3206
3194
|
if (no.has(p))
|
|
3207
|
-
p === 118 ? o.includes("u") && this.raise(x.IncompatibleRegExpUVFlags, u()) : p === 117 && o.includes("v") && this.raise(x.IncompatibleRegExpUVFlags, u()), o.includes(
|
|
3195
|
+
p === 118 ? o.includes("u") && this.raise(x.IncompatibleRegExpUVFlags, u()) : p === 117 && o.includes("v") && this.raise(x.IncompatibleRegExpUVFlags, u()), o.includes(y) && this.raise(x.DuplicateRegExpFlags, u());
|
|
3208
3196
|
else if (Ve(p) || p === 92)
|
|
3209
3197
|
this.raise(x.MalformedRegExpFlags, u());
|
|
3210
3198
|
else
|
|
3211
3199
|
break;
|
|
3212
|
-
++a, o +=
|
|
3200
|
+
++a, o += y;
|
|
3213
3201
|
}
|
|
3214
3202
|
this.state.pos = a, this.finishToken(138, {
|
|
3215
3203
|
pattern: n,
|
|
@@ -3251,17 +3239,17 @@ class oo extends eo {
|
|
|
3251
3239
|
!e && this.readInt(10) === null && this.raise(x.InvalidNumber, this.state.curPosition());
|
|
3252
3240
|
const u = this.state.pos - r >= 2 && this.input.charCodeAt(r) === 48;
|
|
3253
3241
|
if (u) {
|
|
3254
|
-
const
|
|
3242
|
+
const g = this.input.slice(r, this.state.pos);
|
|
3255
3243
|
if (this.recordStrictModeErrors(x.StrictOctalLiteral, s), !this.state.strict) {
|
|
3256
|
-
const
|
|
3257
|
-
|
|
3244
|
+
const C = g.indexOf("_");
|
|
3245
|
+
C > 0 && this.raise(x.ZeroDigitNumericSeparator, ie(s, C));
|
|
3258
3246
|
}
|
|
3259
|
-
o = u && !/[89]/.test(
|
|
3247
|
+
o = u && !/[89]/.test(g);
|
|
3260
3248
|
}
|
|
3261
3249
|
let p = this.input.charCodeAt(this.state.pos);
|
|
3262
3250
|
if (p === 46 && !o && (++this.state.pos, this.readInt(10), i = !0, p = this.input.charCodeAt(this.state.pos)), (p === 69 || p === 101) && !o && (p = this.input.charCodeAt(++this.state.pos), (p === 43 || p === 45) && ++this.state.pos, this.readInt(10) === null && this.raise(x.InvalidOrMissingExponent, s), i = !0, n = !0, p = this.input.charCodeAt(this.state.pos)), p === 110 && ((i || u) && this.raise(x.InvalidBigIntLiteral, s), ++this.state.pos, a = !0), p === 109) {
|
|
3263
3251
|
this.expectPlugin("decimal", this.state.curPosition()), (n || u) && this.raise(x.InvalidDecimal, s), ++this.state.pos;
|
|
3264
|
-
var
|
|
3252
|
+
var y = !0;
|
|
3265
3253
|
}
|
|
3266
3254
|
if (Te(this.codePointAtPos(this.state.pos)))
|
|
3267
3255
|
throw this.raise(x.NumberIdentifier, this.state.curPosition());
|
|
@@ -3270,12 +3258,12 @@ class oo extends eo {
|
|
|
3270
3258
|
this.finishToken(136, E);
|
|
3271
3259
|
return;
|
|
3272
3260
|
}
|
|
3273
|
-
if (
|
|
3261
|
+
if (y) {
|
|
3274
3262
|
this.finishToken(137, E);
|
|
3275
3263
|
return;
|
|
3276
3264
|
}
|
|
3277
|
-
const
|
|
3278
|
-
this.finishToken(135,
|
|
3265
|
+
const P = o ? parseInt(E, 8) : parseFloat(E);
|
|
3266
|
+
this.finishToken(135, P);
|
|
3279
3267
|
}
|
|
3280
3268
|
readCodePoint(e) {
|
|
3281
3269
|
const {
|
|
@@ -3419,8 +3407,8 @@ class uo {
|
|
|
3419
3407
|
if (r & 3) {
|
|
3420
3408
|
const u = o && a.get(e);
|
|
3421
3409
|
if (u) {
|
|
3422
|
-
const p = u & 4,
|
|
3423
|
-
o = E ===
|
|
3410
|
+
const p = u & 4, y = r & 4, E = u & 3, P = r & 3;
|
|
3411
|
+
o = E === P || p !== y, o || a.delete(e);
|
|
3424
3412
|
} else o || a.set(e, r);
|
|
3425
3413
|
}
|
|
3426
3414
|
o && this.parser.raise(x.PrivateNameRedeclaration, s, {
|
|
@@ -4159,37 +4147,37 @@ var Io = (t) => class extends t {
|
|
|
4159
4147
|
this.state.inType = !0;
|
|
4160
4148
|
const u = this.startNode();
|
|
4161
4149
|
u.callProperties = [], u.properties = [], u.indexers = [], u.internalSlots = [];
|
|
4162
|
-
let p,
|
|
4163
|
-
for (s && this.match(6) ? (this.expect(6), p = 9,
|
|
4164
|
-
let
|
|
4150
|
+
let p, y, E = !1;
|
|
4151
|
+
for (s && this.match(6) ? (this.expect(6), p = 9, y = !0) : (this.expect(5), p = 8, y = !1), u.exact = y; !this.match(p); ) {
|
|
4152
|
+
let g = !1, C = null, A = null;
|
|
4165
4153
|
const O = this.startNode();
|
|
4166
4154
|
if (a && this.isContextual(118)) {
|
|
4167
|
-
const
|
|
4168
|
-
|
|
4155
|
+
const N = this.lookahead();
|
|
4156
|
+
N.type !== 14 && N.type !== 17 && (this.next(), C = this.state.startLoc, r = !1);
|
|
4169
4157
|
}
|
|
4170
4158
|
if (r && this.isContextual(106)) {
|
|
4171
|
-
const
|
|
4172
|
-
|
|
4159
|
+
const N = this.lookahead();
|
|
4160
|
+
N.type !== 14 && N.type !== 17 && (this.next(), g = !0);
|
|
4173
4161
|
}
|
|
4174
4162
|
const I = this.flowParseVariance();
|
|
4175
4163
|
if (this.eat(0))
|
|
4176
|
-
|
|
4164
|
+
C != null && this.unexpected(C), this.eat(0) ? (I && this.unexpected(I.loc.start), u.internalSlots.push(this.flowParseObjectTypeInternalSlot(O, g))) : u.indexers.push(this.flowParseObjectTypeIndexer(O, g, I));
|
|
4177
4165
|
else if (this.match(10) || this.match(47))
|
|
4178
|
-
|
|
4166
|
+
C != null && this.unexpected(C), I && this.unexpected(I.loc.start), u.callProperties.push(this.flowParseObjectTypeCallProperty(O, g));
|
|
4179
4167
|
else {
|
|
4180
|
-
let
|
|
4168
|
+
let N = "init";
|
|
4181
4169
|
if (this.isContextual(99) || this.isContextual(104)) {
|
|
4182
4170
|
const K = this.lookahead();
|
|
4183
|
-
Fi(K.type) && (
|
|
4171
|
+
Fi(K.type) && (N = this.state.value, this.next());
|
|
4184
4172
|
}
|
|
4185
|
-
const B = this.flowParseObjectTypeProperty(O,
|
|
4173
|
+
const B = this.flowParseObjectTypeProperty(O, g, C, I, N, i, n ?? !y);
|
|
4186
4174
|
B === null ? (E = !0, A = this.state.lastTokStartLoc) : u.properties.push(B);
|
|
4187
4175
|
}
|
|
4188
4176
|
this.flowObjectTypeSemicolon(), A && !this.match(8) && !this.match(9) && this.raise(_.UnexpectedExplicitInexactInObject, A);
|
|
4189
4177
|
}
|
|
4190
4178
|
this.expect(p), i && (u.inexact = E);
|
|
4191
|
-
const
|
|
4192
|
-
return this.state.inType = o,
|
|
4179
|
+
const P = this.finishNode(u, "ObjectTypeAnnotation");
|
|
4180
|
+
return this.state.inType = o, P;
|
|
4193
4181
|
}
|
|
4194
4182
|
flowParseObjectTypeProperty(r, s, i, a, n, o, u) {
|
|
4195
4183
|
if (this.eat(21))
|
|
@@ -4482,8 +4470,8 @@ var Io = (t) => class extends t {
|
|
|
4482
4470
|
parseConditional(r, s, i) {
|
|
4483
4471
|
if (!this.match(17)) return r;
|
|
4484
4472
|
if (this.state.maybeInArrowParameters) {
|
|
4485
|
-
const
|
|
4486
|
-
if (
|
|
4473
|
+
const P = this.lookaheadCharCode();
|
|
4474
|
+
if (P === 44 || P === 61 || P === 58 || P === 41)
|
|
4487
4475
|
return this.setOptionalParametersError(i), r;
|
|
4488
4476
|
}
|
|
4489
4477
|
this.expect(17);
|
|
@@ -4491,19 +4479,19 @@ var Io = (t) => class extends t {
|
|
|
4491
4479
|
let {
|
|
4492
4480
|
consequent: u,
|
|
4493
4481
|
failed: p
|
|
4494
|
-
} = this.tryParseConditionalConsequent(), [
|
|
4482
|
+
} = this.tryParseConditionalConsequent(), [y, E] = this.getArrowLikeExpressions(u);
|
|
4495
4483
|
if (p || E.length > 0) {
|
|
4496
|
-
const
|
|
4484
|
+
const P = [...n];
|
|
4497
4485
|
if (E.length > 0) {
|
|
4498
|
-
this.state = a, this.state.noArrowAt =
|
|
4499
|
-
for (let
|
|
4500
|
-
|
|
4486
|
+
this.state = a, this.state.noArrowAt = P;
|
|
4487
|
+
for (let g = 0; g < E.length; g++)
|
|
4488
|
+
P.push(E[g].start);
|
|
4501
4489
|
({
|
|
4502
4490
|
consequent: u,
|
|
4503
4491
|
failed: p
|
|
4504
|
-
} = this.tryParseConditionalConsequent()), [
|
|
4492
|
+
} = this.tryParseConditionalConsequent()), [y, E] = this.getArrowLikeExpressions(u);
|
|
4505
4493
|
}
|
|
4506
|
-
p &&
|
|
4494
|
+
p && y.length > 1 && this.raise(_.AmbiguousConditionalArrow, a.startLoc), p && y.length === 1 && (this.state = a, P.push(y[0].start), this.state.noArrowAt = P, {
|
|
4507
4495
|
consequent: u,
|
|
4508
4496
|
failed: p
|
|
4509
4497
|
} = this.tryParseConditionalConsequent());
|
|
@@ -4681,8 +4669,8 @@ var Io = (t) => class extends t {
|
|
|
4681
4669
|
r.variance && this.unexpected(r.variance.loc.start), delete r.variance;
|
|
4682
4670
|
let p;
|
|
4683
4671
|
this.match(47) && !o && (p = this.flowParseTypeParameterDeclaration(), this.match(10) || this.unexpected());
|
|
4684
|
-
const
|
|
4685
|
-
return p && ((
|
|
4672
|
+
const y = super.parseObjPropValue(r, s, i, a, n, o, u);
|
|
4673
|
+
return p && ((y.value || y).typeParameters = p), y;
|
|
4686
4674
|
}
|
|
4687
4675
|
parseFunctionParamType(r) {
|
|
4688
4676
|
return this.eat(17) && (r.type !== "Identifier" && this.raise(_.PatternIsOptional, r), this.isThisParam(r) && this.raise(_.ThisParamMayNotBeOptional, r), r.optional = !0), this.match(14) ? r.typeAnnotation = this.flowParseTypeAnnotation() : this.isThisParam(r) && this.raise(_.ThisParamAnnotationRequired, r), this.match(29) && this.isThisParam(r) && this.raise(_.ThisParamNoDefault, r), this.resetEndLocation(r), r;
|
|
@@ -4734,8 +4722,8 @@ var Io = (t) => class extends t {
|
|
|
4734
4722
|
}
|
|
4735
4723
|
this.eatContextual(93) ? r.local = this.parseIdentifier() : (p = !0, r.local = xe(r.imported));
|
|
4736
4724
|
}
|
|
4737
|
-
const
|
|
4738
|
-
return i &&
|
|
4725
|
+
const y = Js(r);
|
|
4726
|
+
return i && y && this.raise(_.ImportTypeShorthandOnlyInPureImport, r), (i || y) && this.checkReservedType(r.local.name, r.local.loc.start, !0), p && !i && !y && this.checkReservedWord(r.local.name, r.loc.start, !0, !0), this.finishImportSpecifier(r, "ImportSpecifier");
|
|
4739
4727
|
}
|
|
4740
4728
|
parseBindingAtom() {
|
|
4741
4729
|
switch (this.state.type) {
|
|
@@ -4769,35 +4757,35 @@ var Io = (t) => class extends t {
|
|
|
4769
4757
|
if (a = this.state.clone(), n = this.tryParse(() => super.parseMaybeAssign(r, s), a), !n.error) return n.node;
|
|
4770
4758
|
const {
|
|
4771
4759
|
context: p
|
|
4772
|
-
} = this.state,
|
|
4773
|
-
(
|
|
4760
|
+
} = this.state, y = p[p.length - 1];
|
|
4761
|
+
(y === q.j_oTag || y === q.j_expr) && p.pop();
|
|
4774
4762
|
}
|
|
4775
4763
|
if ((i = n) != null && i.error || this.match(47)) {
|
|
4776
4764
|
var o, u;
|
|
4777
4765
|
a = a || this.state.clone();
|
|
4778
4766
|
let p;
|
|
4779
|
-
const
|
|
4780
|
-
var
|
|
4767
|
+
const y = this.tryParse((P) => {
|
|
4768
|
+
var g;
|
|
4781
4769
|
p = this.flowParseTypeParameterDeclaration();
|
|
4782
|
-
const
|
|
4770
|
+
const C = this.forwardNoArrowParamsConversionAt(p, () => {
|
|
4783
4771
|
const O = super.parseMaybeAssign(r, s);
|
|
4784
4772
|
return this.resetStartLocationFromNode(O, p), O;
|
|
4785
4773
|
});
|
|
4786
|
-
(
|
|
4787
|
-
const A = this.maybeUnwrapTypeCastExpression(
|
|
4788
|
-
return A.type !== "ArrowFunctionExpression" &&
|
|
4774
|
+
(g = C.extra) != null && g.parenthesized && P();
|
|
4775
|
+
const A = this.maybeUnwrapTypeCastExpression(C);
|
|
4776
|
+
return A.type !== "ArrowFunctionExpression" && P(), A.typeParameters = p, this.resetStartLocationFromNode(A, p), C;
|
|
4789
4777
|
}, a);
|
|
4790
4778
|
let E = null;
|
|
4791
|
-
if (
|
|
4792
|
-
if (!
|
|
4793
|
-
return
|
|
4794
|
-
E =
|
|
4779
|
+
if (y.node && this.maybeUnwrapTypeCastExpression(y.node).type === "ArrowFunctionExpression") {
|
|
4780
|
+
if (!y.error && !y.aborted)
|
|
4781
|
+
return y.node.async && this.raise(_.UnexpectedTypeParameterBeforeAsyncArrowFunction, p), y.node;
|
|
4782
|
+
E = y.node;
|
|
4795
4783
|
}
|
|
4796
4784
|
if ((o = n) != null && o.node)
|
|
4797
4785
|
return this.state = n.failState, n.node;
|
|
4798
4786
|
if (E)
|
|
4799
|
-
return this.state =
|
|
4800
|
-
throw (u = n) != null && u.thrown ? n.error :
|
|
4787
|
+
return this.state = y.failState, E;
|
|
4788
|
+
throw (u = n) != null && u.thrown ? n.error : y.thrown ? y.error : this.raise(_.UnexpectedTokenAfterTypeParameter, p);
|
|
4801
4789
|
}
|
|
4802
4790
|
return super.parseMaybeAssign(r, s);
|
|
4803
4791
|
}
|
|
@@ -5016,21 +5004,21 @@ var Io = (t) => class extends t {
|
|
|
5016
5004
|
const o = this.startNode(), {
|
|
5017
5005
|
id: u,
|
|
5018
5006
|
init: p
|
|
5019
|
-
} = this.flowEnumMemberRaw(),
|
|
5020
|
-
if (
|
|
5007
|
+
} = this.flowEnumMemberRaw(), y = u.name;
|
|
5008
|
+
if (y === "")
|
|
5021
5009
|
continue;
|
|
5022
|
-
/^[a-z]/.test(
|
|
5023
|
-
memberName:
|
|
5024
|
-
suggestion:
|
|
5010
|
+
/^[a-z]/.test(y) && this.raise(_.EnumInvalidMemberName, u, {
|
|
5011
|
+
memberName: y,
|
|
5012
|
+
suggestion: y[0].toUpperCase() + y.slice(1),
|
|
5025
5013
|
enumName: r
|
|
5026
|
-
}), i.has(
|
|
5027
|
-
memberName:
|
|
5014
|
+
}), i.has(y) && this.raise(_.EnumDuplicateMemberName, u, {
|
|
5015
|
+
memberName: y,
|
|
5028
5016
|
enumName: r
|
|
5029
|
-
}), i.add(
|
|
5017
|
+
}), i.add(y);
|
|
5030
5018
|
const E = {
|
|
5031
5019
|
enumName: r,
|
|
5032
5020
|
explicitType: s,
|
|
5033
|
-
memberName:
|
|
5021
|
+
memberName: y
|
|
5034
5022
|
};
|
|
5035
5023
|
switch (o.id = u, p.type) {
|
|
5036
5024
|
case "boolean": {
|
|
@@ -5129,25 +5117,25 @@ var Io = (t) => class extends t {
|
|
|
5129
5117
|
default: {
|
|
5130
5118
|
const p = () => (r.members = [], this.expect(8), this.finishNode(r, "EnumStringBody"));
|
|
5131
5119
|
r.explicitType = !1;
|
|
5132
|
-
const
|
|
5133
|
-
if (!
|
|
5120
|
+
const y = o.booleanMembers.length, E = o.numberMembers.length, P = o.stringMembers.length, g = o.defaultedMembers.length;
|
|
5121
|
+
if (!y && !E && !P && !g)
|
|
5134
5122
|
return p();
|
|
5135
|
-
if (!
|
|
5123
|
+
if (!y && !E)
|
|
5136
5124
|
return r.members = this.flowEnumStringMembers(o.stringMembers, o.defaultedMembers, {
|
|
5137
5125
|
enumName: i
|
|
5138
5126
|
}), this.expect(8), this.finishNode(r, "EnumStringBody");
|
|
5139
|
-
if (!E && !
|
|
5140
|
-
for (const
|
|
5141
|
-
this.flowEnumErrorBooleanMemberNotInitialized(
|
|
5127
|
+
if (!E && !P && y >= g) {
|
|
5128
|
+
for (const C of o.defaultedMembers)
|
|
5129
|
+
this.flowEnumErrorBooleanMemberNotInitialized(C.loc.start, {
|
|
5142
5130
|
enumName: i,
|
|
5143
|
-
memberName:
|
|
5131
|
+
memberName: C.id.name
|
|
5144
5132
|
});
|
|
5145
5133
|
return r.members = o.booleanMembers, this.expect(8), this.finishNode(r, "EnumBooleanBody");
|
|
5146
|
-
} else if (!
|
|
5147
|
-
for (const
|
|
5148
|
-
this.flowEnumErrorNumberMemberNotInitialized(
|
|
5134
|
+
} else if (!y && !P && E >= g) {
|
|
5135
|
+
for (const C of o.defaultedMembers)
|
|
5136
|
+
this.flowEnumErrorNumberMemberNotInitialized(C.loc.start, {
|
|
5149
5137
|
enumName: i,
|
|
5150
|
-
memberName:
|
|
5138
|
+
memberName: C.id.name
|
|
5151
5139
|
});
|
|
5152
5140
|
return r.members = o.numberMembers, this.expect(8), this.finishNode(r, "EnumNumberBody");
|
|
5153
5141
|
} else
|
|
@@ -5787,8 +5775,8 @@ class Oo extends xo {
|
|
|
5787
5775
|
e.type = "ObjectPattern";
|
|
5788
5776
|
for (let o = 0, u = e.properties.length, p = u - 1; o < u; o++) {
|
|
5789
5777
|
var n;
|
|
5790
|
-
const
|
|
5791
|
-
this.toAssignableObjectExpressionProp(
|
|
5778
|
+
const y = e.properties[o], E = o === p;
|
|
5779
|
+
this.toAssignableObjectExpressionProp(y, E, r), E && y.type === "RestElement" && (n = e.extra) != null && n.trailingCommaLoc && this.raise(x.RestTrailingComma, e.extra.trailingCommaLoc);
|
|
5792
5780
|
}
|
|
5793
5781
|
break;
|
|
5794
5782
|
case "ObjectProperty": {
|
|
@@ -5984,24 +5972,24 @@ class Oo extends xo {
|
|
|
5984
5972
|
i && (i.has(A) ? this.raise(x.ParamDupe, e) : i.add(A));
|
|
5985
5973
|
return;
|
|
5986
5974
|
}
|
|
5987
|
-
const
|
|
5988
|
-
if (
|
|
5989
|
-
if (
|
|
5975
|
+
const y = this.isValidLVal(u, !(n || (o = e.extra) != null && o.parenthesized) && r.type === "AssignmentExpression", s);
|
|
5976
|
+
if (y === !0) return;
|
|
5977
|
+
if (y === !1) {
|
|
5990
5978
|
const A = s === 64 ? x.InvalidLhs : x.InvalidLhsBinding;
|
|
5991
5979
|
this.raise(A, e, {
|
|
5992
5980
|
ancestor: r
|
|
5993
5981
|
});
|
|
5994
5982
|
return;
|
|
5995
5983
|
}
|
|
5996
|
-
let E,
|
|
5997
|
-
typeof
|
|
5998
|
-
const
|
|
5984
|
+
let E, P;
|
|
5985
|
+
typeof y == "string" ? (E = y, P = u === "ParenthesizedExpression") : [E, P] = y;
|
|
5986
|
+
const g = u === "ArrayPattern" || u === "ObjectPattern" ? {
|
|
5999
5987
|
type: u
|
|
6000
|
-
} : r,
|
|
6001
|
-
if (Array.isArray(
|
|
6002
|
-
for (const A of
|
|
6003
|
-
A && this.checkLVal(A,
|
|
6004
|
-
else
|
|
5988
|
+
} : r, C = e[E];
|
|
5989
|
+
if (Array.isArray(C))
|
|
5990
|
+
for (const A of C)
|
|
5991
|
+
A && this.checkLVal(A, g, s, i, a, P);
|
|
5992
|
+
else C && this.checkLVal(C, g, s, i, a, P);
|
|
6005
5993
|
}
|
|
6006
5994
|
checkIdentifier(e, r, s = !1) {
|
|
6007
5995
|
this.state.strict && (s ? $i(e.name, this.inModule) : Vi(e.name)) && (r === 64 ? this.raise(x.StrictEvalArguments, e, {
|
|
@@ -6214,28 +6202,28 @@ var Mo = (t) => class extends t {
|
|
|
6214
6202
|
stopOnStartOfClassStaticBlock: i,
|
|
6215
6203
|
errorTemplate: a = k.InvalidModifierOnTypeMember
|
|
6216
6204
|
}, n) {
|
|
6217
|
-
const o = (p,
|
|
6218
|
-
|
|
6219
|
-
orderedModifiers: [E,
|
|
6205
|
+
const o = (p, y, E, P) => {
|
|
6206
|
+
y === E && n[P] && this.raise(k.InvalidModifiersOrder, p, {
|
|
6207
|
+
orderedModifiers: [E, P]
|
|
6220
6208
|
});
|
|
6221
|
-
}, u = (p,
|
|
6222
|
-
(n[E] &&
|
|
6223
|
-
modifiers: [E,
|
|
6209
|
+
}, u = (p, y, E, P) => {
|
|
6210
|
+
(n[E] && y === P || n[P] && y === E) && this.raise(k.IncompatibleModifiers, p, {
|
|
6211
|
+
modifiers: [E, P]
|
|
6224
6212
|
});
|
|
6225
6213
|
};
|
|
6226
6214
|
for (; ; ) {
|
|
6227
6215
|
const {
|
|
6228
6216
|
startLoc: p
|
|
6229
|
-
} = this.state,
|
|
6230
|
-
if (!
|
|
6231
|
-
Ws(
|
|
6232
|
-
modifier:
|
|
6233
|
-
}) : (o(p,
|
|
6234
|
-
modifier:
|
|
6235
|
-
}), n[
|
|
6236
|
-
modifier:
|
|
6237
|
-
}) : (o(p,
|
|
6238
|
-
modifier:
|
|
6217
|
+
} = this.state, y = this.tsParseModifier(r.concat(s ?? []), i);
|
|
6218
|
+
if (!y) break;
|
|
6219
|
+
Ws(y) ? n.accessibility ? this.raise(k.DuplicateAccessibilityModifier, p, {
|
|
6220
|
+
modifier: y
|
|
6221
|
+
}) : (o(p, y, y, "override"), o(p, y, y, "static"), o(p, y, y, "readonly"), n.accessibility = y) : ko(y) ? (n[y] && this.raise(k.DuplicateModifier, p, {
|
|
6222
|
+
modifier: y
|
|
6223
|
+
}), n[y] = !0, o(p, y, "in", "out")) : (hasOwnProperty.call(n, y) ? this.raise(k.DuplicateModifier, p, {
|
|
6224
|
+
modifier: y
|
|
6225
|
+
}) : (o(p, y, "static", "readonly"), o(p, y, "static", "override"), o(p, y, "override", "readonly"), o(p, y, "abstract", "override"), u(p, y, "declare", "override"), u(p, y, "static", "abstract")), n[y] = !0), s != null && s.includes(y) && this.raise(a, p, {
|
|
6226
|
+
modifier: y
|
|
6239
6227
|
});
|
|
6240
6228
|
}
|
|
6241
6229
|
}
|
|
@@ -6453,13 +6441,13 @@ var Mo = (t) => class extends t {
|
|
|
6453
6441
|
startLoc: i
|
|
6454
6442
|
} = this.state;
|
|
6455
6443
|
let a, n, o, u;
|
|
6456
|
-
const
|
|
6457
|
-
if (
|
|
6444
|
+
const y = ue(this.state.type) ? this.lookaheadCharCode() : null;
|
|
6445
|
+
if (y === 58)
|
|
6458
6446
|
a = !0, o = !1, n = this.parseIdentifier(!0), this.expect(14), u = this.tsParseType();
|
|
6459
|
-
else if (
|
|
6447
|
+
else if (y === 63) {
|
|
6460
6448
|
o = !0;
|
|
6461
|
-
const E = this.state.value,
|
|
6462
|
-
this.lookaheadCharCode() === 58 ? (a = !0, n = this.createIdentifier(this.startNodeAt(i), E), this.expect(17), this.expect(14), u = this.tsParseType()) : (a = !1, u =
|
|
6449
|
+
const E = this.state.value, P = this.tsParseNonArrayType();
|
|
6450
|
+
this.lookaheadCharCode() === 58 ? (a = !0, n = this.createIdentifier(this.startNodeAt(i), E), this.expect(17), this.expect(14), u = this.tsParseType()) : (a = !1, u = P, this.expect(17));
|
|
6463
6451
|
} else
|
|
6464
6452
|
u = this.tsParseType(), o = this.eat(17), a = this.eat(14);
|
|
6465
6453
|
if (a) {
|
|
@@ -6953,12 +6941,12 @@ var Mo = (t) => class extends t {
|
|
|
6953
6941
|
!(r & 4) && (n || u || o) && this.raise(k.UnexpectedParameterModifier, i);
|
|
6954
6942
|
const p = this.parseMaybeDefault();
|
|
6955
6943
|
r & 2 && this.parseFunctionParamType(p);
|
|
6956
|
-
const
|
|
6944
|
+
const y = this.parseMaybeDefault(p.loc.start, p);
|
|
6957
6945
|
if (n || u || o) {
|
|
6958
6946
|
const E = this.startNodeAt(i);
|
|
6959
|
-
return s.length && (E.decorators = s), n && (E.accessibility = n), u && (E.readonly = u), o && (E.override = o),
|
|
6947
|
+
return s.length && (E.decorators = s), n && (E.accessibility = n), u && (E.readonly = u), o && (E.override = o), y.type !== "Identifier" && y.type !== "AssignmentPattern" && this.raise(k.UnsupportedParameterPropertyKind, E), E.parameter = y, this.finishNode(E, "TSParameterProperty");
|
|
6960
6948
|
}
|
|
6961
|
-
return s.length && (p.decorators = s),
|
|
6949
|
+
return s.length && (p.decorators = s), y;
|
|
6962
6950
|
}
|
|
6963
6951
|
isSimpleParameter(r) {
|
|
6964
6952
|
return r.type === "TSParameterProperty" && super.isSimpleParameter(r.parameter) || super.isSimpleParameter(r);
|
|
@@ -7006,9 +6994,9 @@ var Mo = (t) => class extends t {
|
|
|
7006
6994
|
let o;
|
|
7007
6995
|
const u = this.tsTryParseAndCatch(() => {
|
|
7008
6996
|
if (!i && this.atPossibleAsyncArrow(r)) {
|
|
7009
|
-
const
|
|
7010
|
-
if (
|
|
7011
|
-
return
|
|
6997
|
+
const P = this.tsTryParseGenericAsyncArrowFunction(s);
|
|
6998
|
+
if (P)
|
|
6999
|
+
return P;
|
|
7012
7000
|
}
|
|
7013
7001
|
const p = this.tsParseTypeArgumentsInExpression();
|
|
7014
7002
|
if (!p) return;
|
|
@@ -7017,15 +7005,15 @@ var Mo = (t) => class extends t {
|
|
|
7017
7005
|
return;
|
|
7018
7006
|
}
|
|
7019
7007
|
if (Ft(this.state.type)) {
|
|
7020
|
-
const
|
|
7021
|
-
return
|
|
7008
|
+
const P = super.parseTaggedTemplateExpression(r, s, a);
|
|
7009
|
+
return P.typeParameters = p, P;
|
|
7022
7010
|
}
|
|
7023
7011
|
if (!i && this.eat(10)) {
|
|
7024
|
-
const
|
|
7025
|
-
return
|
|
7012
|
+
const P = this.startNodeAt(s);
|
|
7013
|
+
return P.callee = r, P.arguments = this.parseCallExpressionArguments(11), this.tsCheckForInvalidTypeCasts(P.arguments), P.typeParameters = p, a.optionalChainMember && (P.optional = n), this.finishCallExpression(P, a.optionalChainMember);
|
|
7026
7014
|
}
|
|
7027
|
-
const
|
|
7028
|
-
if (
|
|
7015
|
+
const y = this.state.type;
|
|
7016
|
+
if (y === 48 || y === 52 || y !== 10 && Or(y) && !this.hasPrecedingLineBreak())
|
|
7029
7017
|
return;
|
|
7030
7018
|
const E = this.startNodeAt(s);
|
|
7031
7019
|
return E.expression = r, E.typeParameters = p, this.finishNode(E, "TSInstantiationExpression");
|
|
@@ -7243,10 +7231,10 @@ var Mo = (t) => class extends t {
|
|
|
7243
7231
|
u && n && this.raise(k.ConstructorHasTypeParameters, u);
|
|
7244
7232
|
const {
|
|
7245
7233
|
declare: p = !1,
|
|
7246
|
-
kind:
|
|
7234
|
+
kind: y
|
|
7247
7235
|
} = s;
|
|
7248
|
-
p && (
|
|
7249
|
-
kind:
|
|
7236
|
+
p && (y === "get" || y === "set") && this.raise(k.DeclareAccessor, s, {
|
|
7237
|
+
kind: y
|
|
7250
7238
|
}), u && (s.typeParameters = u), super.pushClassMethod(r, s, i, a, n, o);
|
|
7251
7239
|
}
|
|
7252
7240
|
pushClassPrivateMethod(r, s, i, a) {
|
|
@@ -7277,35 +7265,35 @@ var Mo = (t) => class extends t {
|
|
|
7277
7265
|
}
|
|
7278
7266
|
parseMaybeAssign(r, s) {
|
|
7279
7267
|
var i, a, n, o, u;
|
|
7280
|
-
let p,
|
|
7268
|
+
let p, y, E;
|
|
7281
7269
|
if (this.hasPlugin("jsx") && (this.match(143) || this.match(47))) {
|
|
7282
|
-
if (p = this.state.clone(),
|
|
7270
|
+
if (p = this.state.clone(), y = this.tryParse(() => super.parseMaybeAssign(r, s), p), !y.error) return y.node;
|
|
7283
7271
|
const {
|
|
7284
|
-
context:
|
|
7285
|
-
} = this.state, A =
|
|
7286
|
-
(A === q.j_oTag || A === q.j_expr) &&
|
|
7272
|
+
context: C
|
|
7273
|
+
} = this.state, A = C[C.length - 1];
|
|
7274
|
+
(A === q.j_oTag || A === q.j_expr) && C.pop();
|
|
7287
7275
|
}
|
|
7288
|
-
if (!((i =
|
|
7276
|
+
if (!((i = y) != null && i.error) && !this.match(47))
|
|
7289
7277
|
return super.parseMaybeAssign(r, s);
|
|
7290
7278
|
(!p || p === this.state) && (p = this.state.clone());
|
|
7291
|
-
let
|
|
7292
|
-
const
|
|
7279
|
+
let P;
|
|
7280
|
+
const g = this.tryParse((C) => {
|
|
7293
7281
|
var A, O;
|
|
7294
|
-
|
|
7282
|
+
P = this.tsParseTypeParameters(this.tsParseConstModifier);
|
|
7295
7283
|
const I = super.parseMaybeAssign(r, s);
|
|
7296
|
-
return (I.type !== "ArrowFunctionExpression" || (A = I.extra) != null && A.parenthesized) &&
|
|
7284
|
+
return (I.type !== "ArrowFunctionExpression" || (A = I.extra) != null && A.parenthesized) && C(), ((O = P) == null ? void 0 : O.params.length) !== 0 && this.resetStartLocationFromNode(I, P), I.typeParameters = P, I;
|
|
7297
7285
|
}, p);
|
|
7298
|
-
if (!
|
|
7299
|
-
return
|
|
7300
|
-
if (!
|
|
7286
|
+
if (!g.error && !g.aborted)
|
|
7287
|
+
return P && this.reportReservedArrowTypeParam(P), g.node;
|
|
7288
|
+
if (!y && (qs(!this.hasPlugin("jsx")), E = this.tryParse(() => super.parseMaybeAssign(r, s), p), !E.error))
|
|
7301
7289
|
return E.node;
|
|
7302
|
-
if ((a =
|
|
7303
|
-
return this.state =
|
|
7304
|
-
if (
|
|
7305
|
-
return this.state =
|
|
7290
|
+
if ((a = y) != null && a.node)
|
|
7291
|
+
return this.state = y.failState, y.node;
|
|
7292
|
+
if (g.node)
|
|
7293
|
+
return this.state = g.failState, P && this.reportReservedArrowTypeParam(P), g.node;
|
|
7306
7294
|
if ((n = E) != null && n.node)
|
|
7307
7295
|
return this.state = E.failState, E.node;
|
|
7308
|
-
throw ((o =
|
|
7296
|
+
throw ((o = y) == null ? void 0 : o.error) || g.error || ((u = E) == null ? void 0 : u.error);
|
|
7309
7297
|
}
|
|
7310
7298
|
reportReservedArrowTypeParam(r) {
|
|
7311
7299
|
var s;
|
|
@@ -7519,10 +7507,10 @@ var Mo = (t) => class extends t {
|
|
|
7519
7507
|
const p = super.parseMethod(r, s, i, a, n, o, u);
|
|
7520
7508
|
if (p.abstract && (this.hasPlugin("estree") ? p.value : p).body) {
|
|
7521
7509
|
const {
|
|
7522
|
-
key:
|
|
7510
|
+
key: P
|
|
7523
7511
|
} = p;
|
|
7524
7512
|
this.raise(k.AbstractMethodHasImplementation, p, {
|
|
7525
|
-
methodName:
|
|
7513
|
+
methodName: P.type === "Identifier" && !p.computed ? P.name : `[${this.input.slice(this.offsetToSourcePos(P.start), this.offsetToSourcePos(P.end))}]`
|
|
7526
7514
|
});
|
|
7527
7515
|
}
|
|
7528
7516
|
return p;
|
|
@@ -7547,18 +7535,18 @@ var Mo = (t) => class extends t {
|
|
|
7547
7535
|
}
|
|
7548
7536
|
parseTypeOnlyImportExportSpecifier(r, s, i) {
|
|
7549
7537
|
const a = s ? "imported" : "local", n = s ? "local" : "exported";
|
|
7550
|
-
let o = r[a], u, p = !1,
|
|
7538
|
+
let o = r[a], u, p = !1, y = !0;
|
|
7551
7539
|
const E = o.loc.start;
|
|
7552
7540
|
if (this.isContextual(93)) {
|
|
7553
|
-
const
|
|
7541
|
+
const g = this.parseIdentifier();
|
|
7554
7542
|
if (this.isContextual(93)) {
|
|
7555
|
-
const
|
|
7556
|
-
ue(this.state.type) ? (p = !0, o =
|
|
7557
|
-
} else ue(this.state.type) ? (
|
|
7543
|
+
const C = this.parseIdentifier();
|
|
7544
|
+
ue(this.state.type) ? (p = !0, o = g, u = s ? this.parseIdentifier() : this.parseModuleExportName(), y = !1) : (u = C, y = !1);
|
|
7545
|
+
} else ue(this.state.type) ? (y = !1, u = s ? this.parseIdentifier() : this.parseModuleExportName()) : (p = !0, o = g);
|
|
7558
7546
|
} else ue(this.state.type) && (p = !0, s ? (o = this.parseIdentifier(!0), this.isContextual(93) || this.checkReservedWord(o.name, o.loc.start, !0, !0)) : o = this.parseModuleExportName());
|
|
7559
7547
|
p && i && this.raise(s ? k.TypeModifierIsUsedInTypeImports : k.TypeModifierIsUsedInTypeExports, E), r[a] = o, r[n] = u;
|
|
7560
|
-
const
|
|
7561
|
-
r[
|
|
7548
|
+
const P = s ? "importKind" : "exportKind";
|
|
7549
|
+
r[P] = p ? "type" : "value", y && this.eatContextual(93) && (r[n] = s ? this.parseIdentifier() : this.parseModuleExportName()), r[n] || (r[n] = xe(r[a])), s && this.checkIdentifier(r[n], p ? 4098 : 4096);
|
|
7562
7550
|
}
|
|
7563
7551
|
};
|
|
7564
7552
|
function _o(t) {
|
|
@@ -7920,8 +7908,8 @@ class Vo extends Oo {
|
|
|
7920
7908
|
}]) && this.state.type === 96 && this.prodParam.hasAwait)
|
|
7921
7909
|
throw this.raise(x.UnexpectedAwaitAfterPipelineBody, this.state.startLoc);
|
|
7922
7910
|
n.right = this.parseExprOpRightExpr(i, a);
|
|
7923
|
-
const p = this.finishNode(n, o || u ? "LogicalExpression" : "BinaryExpression"),
|
|
7924
|
-
if (u && (
|
|
7911
|
+
const p = this.finishNode(n, o || u ? "LogicalExpression" : "BinaryExpression"), y = this.state.type;
|
|
7912
|
+
if (u && (y === 41 || y === 42) || o && y === 40)
|
|
7925
7913
|
throw this.raise(x.MixingCoalesceWithLogical, this.state.startLoc);
|
|
7926
7914
|
return this.parseExprOp(p, r, s);
|
|
7927
7915
|
}
|
|
@@ -8061,8 +8049,8 @@ class Vo extends Oo {
|
|
|
8061
8049
|
optionalChainMember: p
|
|
8062
8050
|
} = s;
|
|
8063
8051
|
u && (this.expressionScope.enter(ho()), n = new kt()), p && (o.optional = i), i ? o.arguments = this.parseCallExpressionArguments(11) : o.arguments = this.parseCallExpressionArguments(11, e.type !== "Super", o, n);
|
|
8064
|
-
let
|
|
8065
|
-
return u && this.shouldParseAsyncArrow() && !i ? (s.stop = !0, this.checkDestructuringPrivate(n), this.expressionScope.validateAsPattern(), this.expressionScope.exit(),
|
|
8052
|
+
let y = this.finishCallExpression(o, p);
|
|
8053
|
+
return u && this.shouldParseAsyncArrow() && !i ? (s.stop = !0, this.checkDestructuringPrivate(n), this.expressionScope.validateAsPattern(), this.expressionScope.exit(), y = this.parseAsyncArrowFromCallExpression(this.startNodeAt(r), y)) : (u && (this.checkExpressionErrors(n, !0), this.expressionScope.exit()), this.toReferencedArguments(y)), this.state.maybeInArrowParameters = a, y;
|
|
8066
8054
|
}
|
|
8067
8055
|
toReferencedArguments(e, r) {
|
|
8068
8056
|
this.toReferencedListDeep(e.arguments, r);
|
|
@@ -8333,7 +8321,7 @@ class Vo extends Oo {
|
|
|
8333
8321
|
const i = this.state.maybeInArrowParameters, a = this.state.inFSharpPipelineDirectBody;
|
|
8334
8322
|
this.state.maybeInArrowParameters = !0, this.state.inFSharpPipelineDirectBody = !1;
|
|
8335
8323
|
const n = this.state.startLoc, o = [], u = new kt();
|
|
8336
|
-
let p = !0,
|
|
8324
|
+
let p = !0, y, E;
|
|
8337
8325
|
for (; !this.match(11); ) {
|
|
8338
8326
|
if (p)
|
|
8339
8327
|
p = !1;
|
|
@@ -8342,16 +8330,16 @@ class Vo extends Oo {
|
|
|
8342
8330
|
break;
|
|
8343
8331
|
}
|
|
8344
8332
|
if (this.match(21)) {
|
|
8345
|
-
const
|
|
8346
|
-
if (
|
|
8333
|
+
const C = this.state.startLoc;
|
|
8334
|
+
if (y = this.state.startLoc, o.push(this.parseParenItem(this.parseRestBinding(), C)), !this.checkCommaAfterRest(41))
|
|
8347
8335
|
break;
|
|
8348
8336
|
} else
|
|
8349
8337
|
o.push(this.parseMaybeAssignAllowIn(u, this.parseParenItem));
|
|
8350
8338
|
}
|
|
8351
|
-
const
|
|
8339
|
+
const P = this.state.lastTokEndLoc;
|
|
8352
8340
|
this.expect(11), this.state.maybeInArrowParameters = i, this.state.inFSharpPipelineDirectBody = a;
|
|
8353
|
-
let
|
|
8354
|
-
return e && this.shouldParseArrow(o) && (
|
|
8341
|
+
let g = this.startNodeAt(r);
|
|
8342
|
+
return e && this.shouldParseArrow(o) && (g = this.parseArrow(g)) ? (this.checkDestructuringPrivate(u), this.expressionScope.validateAsPattern(), this.expressionScope.exit(), this.parseArrowExpression(g, o, !1), g) : (this.expressionScope.exit(), o.length || this.unexpected(this.state.lastTokStartLoc), E && this.unexpected(E), y && this.unexpected(y), this.checkExpressionErrors(u, !0), this.toReferencedListDeep(o, !0), o.length > 1 ? (s = this.startNodeAt(n), s.expressions = o, this.finishNode(s, "SequenceExpression"), this.resetEndLocation(s, P)) : s = o[0], this.wrapParenthesis(r, s));
|
|
8355
8343
|
}
|
|
8356
8344
|
wrapParenthesis(e, r) {
|
|
8357
8345
|
if (!(this.optionFlags & 512))
|
|
@@ -8399,9 +8387,9 @@ class Vo extends Oo {
|
|
|
8399
8387
|
value: a
|
|
8400
8388
|
} = this.state, n = r + 1, o = this.startNodeAt(ie(s, 1));
|
|
8401
8389
|
a === null && (e || this.raise(x.InvalidEscapeSequenceTemplate, ie(this.state.firstInvalidTemplateEscapePos, 1)));
|
|
8402
|
-
const u = this.match(24), p = u ? -1 : -2,
|
|
8390
|
+
const u = this.match(24), p = u ? -1 : -2, y = i + p;
|
|
8403
8391
|
o.value = {
|
|
8404
|
-
raw: this.input.slice(n,
|
|
8392
|
+
raw: this.input.slice(n, y).replace(/\r\n?/g, `
|
|
8405
8393
|
`),
|
|
8406
8394
|
cooked: a === null ? null : a.slice(1, p)
|
|
8407
8395
|
}, o.tail = u, this.next();
|
|
@@ -8433,8 +8421,8 @@ class Vo extends Oo {
|
|
|
8433
8421
|
this.addTrailingCommaExtraToNode(u);
|
|
8434
8422
|
break;
|
|
8435
8423
|
}
|
|
8436
|
-
let
|
|
8437
|
-
r ?
|
|
8424
|
+
let y;
|
|
8425
|
+
r ? y = this.parseBindingProperty() : (y = this.parsePropertyDefinition(i), this.checkProto(y, s, n, i)), s && !this.isObjectProperty(y) && y.type !== "SpreadElement" && this.raise(x.InvalidRecordProperty, y), y.shorthand && this.addExtra(y, "shorthand", !0), u.properties.push(y);
|
|
8438
8426
|
}
|
|
8439
8427
|
this.next(), this.state.inFSharpPipelineDirectBody = a;
|
|
8440
8428
|
let p = "ObjectExpression";
|
|
@@ -8462,9 +8450,9 @@ class Vo extends Oo {
|
|
|
8462
8450
|
if (this.parsePropertyName(s, e), !o && !u && this.maybeAsyncOrAccessorProp(s)) {
|
|
8463
8451
|
const {
|
|
8464
8452
|
key: p
|
|
8465
|
-
} = s,
|
|
8466
|
-
|
|
8467
|
-
kind:
|
|
8453
|
+
} = s, y = p.name;
|
|
8454
|
+
y === "async" && !this.hasPrecedingLineBreak() && (i = !0, this.resetPreviousNodeTrailingComments(p), o = this.eat(55), this.parsePropertyName(s)), (y === "get" || y === "set") && (a = !0, this.resetPreviousNodeTrailingComments(p), s.kind = y, this.match(55) && (o = !0, this.raise(x.AccessorIsGenerator, this.state.curPosition(), {
|
|
8455
|
+
kind: y
|
|
8468
8456
|
}), this.next()), this.parsePropertyName(s));
|
|
8469
8457
|
}
|
|
8470
8458
|
return this.parseObjPropValue(s, n, o, i, !1, a, e);
|
|
@@ -8871,18 +8859,18 @@ function Xo(t, e, r) {
|
|
|
8871
8859
|
start: o,
|
|
8872
8860
|
value: u,
|
|
8873
8861
|
end: p
|
|
8874
|
-
} = i,
|
|
8862
|
+
} = i, y = o + 1, E = ie(n.start, 1);
|
|
8875
8863
|
t.splice(s, 1, new ve({
|
|
8876
8864
|
type: ye(27),
|
|
8877
8865
|
value: "#",
|
|
8878
8866
|
start: o,
|
|
8879
|
-
end:
|
|
8867
|
+
end: y,
|
|
8880
8868
|
startLoc: n.start,
|
|
8881
8869
|
endLoc: E
|
|
8882
8870
|
}), new ve({
|
|
8883
8871
|
type: ye(132),
|
|
8884
8872
|
value: u,
|
|
8885
|
-
start:
|
|
8873
|
+
start: y,
|
|
8886
8874
|
end: p,
|
|
8887
8875
|
startLoc: E,
|
|
8888
8876
|
endLoc: n.end
|
|
@@ -8895,43 +8883,43 @@ function Xo(t, e, r) {
|
|
|
8895
8883
|
start: o,
|
|
8896
8884
|
value: u,
|
|
8897
8885
|
end: p
|
|
8898
|
-
} = i,
|
|
8899
|
-
let
|
|
8900
|
-
e.charCodeAt(o - r) === 96 ?
|
|
8886
|
+
} = i, y = o + 1, E = ie(n.start, 1);
|
|
8887
|
+
let P;
|
|
8888
|
+
e.charCodeAt(o - r) === 96 ? P = new ve({
|
|
8901
8889
|
type: ye(22),
|
|
8902
8890
|
value: "`",
|
|
8903
8891
|
start: o,
|
|
8904
|
-
end:
|
|
8892
|
+
end: y,
|
|
8905
8893
|
startLoc: n.start,
|
|
8906
8894
|
endLoc: E
|
|
8907
|
-
}) :
|
|
8895
|
+
}) : P = new ve({
|
|
8908
8896
|
type: ye(8),
|
|
8909
8897
|
value: "}",
|
|
8910
8898
|
start: o,
|
|
8911
|
-
end:
|
|
8899
|
+
end: y,
|
|
8912
8900
|
startLoc: n.start,
|
|
8913
8901
|
endLoc: E
|
|
8914
8902
|
});
|
|
8915
|
-
let
|
|
8916
|
-
a === 24 ? (
|
|
8903
|
+
let g, C, A, O;
|
|
8904
|
+
a === 24 ? (C = p - 1, A = ie(n.end, -1), g = u === null ? null : u.slice(1, -1), O = new ve({
|
|
8917
8905
|
type: ye(22),
|
|
8918
8906
|
value: "`",
|
|
8919
|
-
start:
|
|
8907
|
+
start: C,
|
|
8920
8908
|
end: p,
|
|
8921
8909
|
startLoc: A,
|
|
8922
8910
|
endLoc: n.end
|
|
8923
|
-
})) : (
|
|
8911
|
+
})) : (C = p - 2, A = ie(n.end, -2), g = u === null ? null : u.slice(1, -2), O = new ve({
|
|
8924
8912
|
type: ye(23),
|
|
8925
8913
|
value: "${",
|
|
8926
|
-
start:
|
|
8914
|
+
start: C,
|
|
8927
8915
|
end: p,
|
|
8928
8916
|
startLoc: A,
|
|
8929
8917
|
endLoc: n.end
|
|
8930
|
-
})), t.splice(s, 1,
|
|
8918
|
+
})), t.splice(s, 1, P, new ve({
|
|
8931
8919
|
type: ye(20),
|
|
8932
|
-
value:
|
|
8933
|
-
start:
|
|
8934
|
-
end:
|
|
8920
|
+
value: g,
|
|
8921
|
+
start: y,
|
|
8922
|
+
end: C,
|
|
8935
8923
|
startLoc: E,
|
|
8936
8924
|
endLoc: A
|
|
8937
8925
|
}), O), s += 2;
|
|
@@ -9071,15 +9059,15 @@ class Jo extends Vo {
|
|
|
9071
9059
|
case 100: {
|
|
9072
9060
|
if (this.state.containsEsc)
|
|
9073
9061
|
break;
|
|
9074
|
-
const
|
|
9075
|
-
if (E !== 91 && (!a && this.hasFollowingLineBreak() || !this.chStartsBindingIdentifier(E,
|
|
9062
|
+
const y = this.nextTokenStart(), E = this.codePointAtPos(y);
|
|
9063
|
+
if (E !== 91 && (!a && this.hasFollowingLineBreak() || !this.chStartsBindingIdentifier(E, y) && E !== 123))
|
|
9076
9064
|
break;
|
|
9077
9065
|
}
|
|
9078
9066
|
case 75:
|
|
9079
9067
|
a || this.raise(x.UnexpectedLexicalDeclaration, this.state.startLoc);
|
|
9080
9068
|
case 74: {
|
|
9081
|
-
const
|
|
9082
|
-
return this.parseVarStatement(i,
|
|
9069
|
+
const y = this.state.value;
|
|
9070
|
+
return this.parseVarStatement(i, y);
|
|
9083
9071
|
}
|
|
9084
9072
|
case 92:
|
|
9085
9073
|
return this.parseWhileStatement(i);
|
|
@@ -9090,14 +9078,14 @@ class Jo extends Vo {
|
|
|
9090
9078
|
case 13:
|
|
9091
9079
|
return this.parseEmptyStatement(i);
|
|
9092
9080
|
case 83: {
|
|
9093
|
-
const
|
|
9094
|
-
if (
|
|
9081
|
+
const y = this.lookaheadCharCode();
|
|
9082
|
+
if (y === 40 || y === 46)
|
|
9095
9083
|
break;
|
|
9096
9084
|
}
|
|
9097
9085
|
case 82: {
|
|
9098
9086
|
!(this.optionFlags & 8) && !o && this.raise(x.UnexpectedImportExport, this.state.startLoc), this.next();
|
|
9099
|
-
let
|
|
9100
|
-
return s === 83 ? (
|
|
9087
|
+
let y;
|
|
9088
|
+
return s === 83 ? (y = this.parseImport(i), y.type === "ImportDeclaration" && (!y.importKind || y.importKind === "value") && (this.sawUnambiguousESM = !0)) : (y = this.parseExport(i, r), (y.type === "ExportNamedDeclaration" && (!y.exportKind || y.exportKind === "value") || y.type === "ExportAllDeclaration" && (!y.exportKind || y.exportKind === "value") || y.type === "ExportDefaultDeclaration") && (this.sawUnambiguousESM = !0)), this.assertModuleNodeAllowed(y), y;
|
|
9101
9089
|
}
|
|
9102
9090
|
default:
|
|
9103
9091
|
if (this.isAsyncFunction())
|
|
@@ -9197,13 +9185,13 @@ class Jo extends Vo {
|
|
|
9197
9185
|
return r !== null && this.unexpected(r), this.parseFor(e, null);
|
|
9198
9186
|
const s = this.isContextual(100);
|
|
9199
9187
|
{
|
|
9200
|
-
const u = this.isContextual(96) && this.startsAwaitUsing(), p = u || this.isContextual(107) && this.startsUsingForOf(),
|
|
9201
|
-
if (this.match(74) || this.match(75) ||
|
|
9188
|
+
const u = this.isContextual(96) && this.startsAwaitUsing(), p = u || this.isContextual(107) && this.startsUsingForOf(), y = s && this.hasFollowingBindingAtom() || p;
|
|
9189
|
+
if (this.match(74) || this.match(75) || y) {
|
|
9202
9190
|
const E = this.startNode();
|
|
9203
|
-
let
|
|
9204
|
-
u ? (
|
|
9205
|
-
const
|
|
9206
|
-
return
|
|
9191
|
+
let P;
|
|
9192
|
+
u ? (P = "await using", this.recordAwaitIfAllowed() || this.raise(x.AwaitUsingNotInAsyncContext, this.state.startLoc), this.next()) : P = this.state.value, this.next(), this.parseVar(E, !0, P);
|
|
9193
|
+
const g = this.finishNode(E, "VariableDeclaration"), C = this.match(58);
|
|
9194
|
+
return C && p && this.raise(x.ForInUsing, g), (C || this.isContextual(102)) && g.declarations.length === 1 ? this.parseForIn(e, g, r) : (r !== null && this.unexpected(r), this.parseFor(e, g));
|
|
9207
9195
|
}
|
|
9208
9196
|
}
|
|
9209
9197
|
const i = this.isContextual(95), a = new kt(), n = this.parseExpression(!0, a), o = this.isContextual(102);
|
|
@@ -9307,8 +9295,8 @@ class Jo extends Vo {
|
|
|
9307
9295
|
const p = s ? this.parseModuleItem() : this.parseStatementListItem();
|
|
9308
9296
|
if (r && !u) {
|
|
9309
9297
|
if (this.isValidDirective(p)) {
|
|
9310
|
-
const
|
|
9311
|
-
r.push(
|
|
9298
|
+
const y = this.stmtToDirective(p);
|
|
9299
|
+
r.push(y), !o && y.value.value === "use strict" && (o = !0, this.setStrict(!0));
|
|
9312
9300
|
continue;
|
|
9313
9301
|
}
|
|
9314
9302
|
u = !0, this.state.strictErrors.clear();
|
|
@@ -9435,40 +9423,40 @@ class Jo extends Vo {
|
|
|
9435
9423
|
this.parseClassMemberWithIsStatic(e, r, s, i);
|
|
9436
9424
|
}
|
|
9437
9425
|
parseClassMemberWithIsStatic(e, r, s, i) {
|
|
9438
|
-
const a = r, n = r, o = r, u = r, p = r,
|
|
9426
|
+
const a = r, n = r, o = r, u = r, p = r, y = a, E = a;
|
|
9439
9427
|
if (r.static = i, this.parsePropertyNamePrefixOperator(r), this.eat(55)) {
|
|
9440
|
-
|
|
9428
|
+
y.kind = "method";
|
|
9441
9429
|
const I = this.match(139);
|
|
9442
|
-
if (this.parseClassElementName(
|
|
9430
|
+
if (this.parseClassElementName(y), I) {
|
|
9443
9431
|
this.pushClassPrivateMethod(e, n, !0, !1);
|
|
9444
9432
|
return;
|
|
9445
9433
|
}
|
|
9446
9434
|
this.isNonstaticConstructor(a) && this.raise(x.ConstructorIsGenerator, a.key), this.pushClassMethod(e, a, !0, !1, !1, !1);
|
|
9447
9435
|
return;
|
|
9448
9436
|
}
|
|
9449
|
-
const
|
|
9437
|
+
const P = !this.state.containsEsc && W(this.state.type), g = this.parseClassElementName(r), C = P ? g.name : null, A = this.isPrivateName(g), O = this.state.startLoc;
|
|
9450
9438
|
if (this.parsePostMemberNameModifiers(E), this.isClassMethod()) {
|
|
9451
|
-
if (
|
|
9439
|
+
if (y.kind = "method", A) {
|
|
9452
9440
|
this.pushClassPrivateMethod(e, n, !1, !1);
|
|
9453
9441
|
return;
|
|
9454
9442
|
}
|
|
9455
9443
|
const I = this.isNonstaticConstructor(a);
|
|
9456
|
-
let
|
|
9457
|
-
I && (a.kind = "constructor", s.hadConstructor && !this.hasPlugin("typescript") && this.raise(x.DuplicateConstructor,
|
|
9444
|
+
let N = !1;
|
|
9445
|
+
I && (a.kind = "constructor", s.hadConstructor && !this.hasPlugin("typescript") && this.raise(x.DuplicateConstructor, g), I && this.hasPlugin("typescript") && r.override && this.raise(x.OverrideOnConstructor, g), s.hadConstructor = !0, N = s.hadSuperClass), this.pushClassMethod(e, a, !1, !1, I, N);
|
|
9458
9446
|
} else if (this.isClassProperty())
|
|
9459
9447
|
A ? this.pushClassPrivateProperty(e, u) : this.pushClassProperty(e, o);
|
|
9460
|
-
else if (
|
|
9461
|
-
this.resetPreviousNodeTrailingComments(
|
|
9448
|
+
else if (C === "async" && !this.isLineTerminator()) {
|
|
9449
|
+
this.resetPreviousNodeTrailingComments(g);
|
|
9462
9450
|
const I = this.eat(55);
|
|
9463
|
-
E.optional && this.unexpected(O),
|
|
9464
|
-
const
|
|
9465
|
-
this.parseClassElementName(
|
|
9466
|
-
} else if ((
|
|
9467
|
-
this.resetPreviousNodeTrailingComments(
|
|
9451
|
+
E.optional && this.unexpected(O), y.kind = "method";
|
|
9452
|
+
const N = this.match(139);
|
|
9453
|
+
this.parseClassElementName(y), this.parsePostMemberNameModifiers(E), N ? this.pushClassPrivateMethod(e, n, I, !0) : (this.isNonstaticConstructor(a) && this.raise(x.ConstructorIsAsync, a.key), this.pushClassMethod(e, a, I, !0, !1, !1));
|
|
9454
|
+
} else if ((C === "get" || C === "set") && !(this.match(55) && this.isLineTerminator())) {
|
|
9455
|
+
this.resetPreviousNodeTrailingComments(g), y.kind = C;
|
|
9468
9456
|
const I = this.match(139);
|
|
9469
9457
|
this.parseClassElementName(a), I ? this.pushClassPrivateMethod(e, n, !1, !1) : (this.isNonstaticConstructor(a) && this.raise(x.ConstructorIsAccessor, a.key), this.pushClassMethod(e, a, !1, !1, !1, !1)), this.checkGetterSetterParams(a);
|
|
9470
|
-
} else if (
|
|
9471
|
-
this.expectPlugin("decoratorAutoAccessors"), this.resetPreviousNodeTrailingComments(
|
|
9458
|
+
} else if (C === "accessor" && !this.isLineTerminator()) {
|
|
9459
|
+
this.expectPlugin("decoratorAutoAccessors"), this.resetPreviousNodeTrailingComments(g);
|
|
9472
9460
|
const I = this.match(139);
|
|
9473
9461
|
this.parseClassElementName(o), this.pushClassAccessorProperty(e, p, I);
|
|
9474
9462
|
} else this.isLineTerminator() ? A ? this.pushClassPrivateProperty(e, u) : this.pushClassProperty(e, o) : this.unexpected();
|
|
@@ -9549,31 +9537,31 @@ class Jo extends Vo {
|
|
|
9549
9537
|
throw this.raise(x.UnsupportedDecoratorExport, e);
|
|
9550
9538
|
return this.parseExportFrom(e, !0), this.finishNode(e, "ExportAllDeclaration");
|
|
9551
9539
|
}
|
|
9552
|
-
const
|
|
9553
|
-
i && a && !n && !
|
|
9540
|
+
const y = this.maybeParseExportNamedSpecifiers(e);
|
|
9541
|
+
i && a && !n && !y && this.unexpected(null, 5), o && u && this.unexpected(null, 98);
|
|
9554
9542
|
let E;
|
|
9555
|
-
if (p ||
|
|
9543
|
+
if (p || y) {
|
|
9556
9544
|
if (E = !1, r)
|
|
9557
9545
|
throw this.raise(x.UnsupportedDecoratorExport, e);
|
|
9558
9546
|
this.parseExportFrom(e, p);
|
|
9559
9547
|
} else
|
|
9560
9548
|
E = this.maybeParseExportDeclaration(e);
|
|
9561
|
-
if (p ||
|
|
9562
|
-
var
|
|
9563
|
-
const
|
|
9564
|
-
if (this.checkExport(
|
|
9565
|
-
this.maybeTakeDecorators(r,
|
|
9549
|
+
if (p || y || E) {
|
|
9550
|
+
var P;
|
|
9551
|
+
const g = e;
|
|
9552
|
+
if (this.checkExport(g, !0, !1, !!g.source), ((P = g.declaration) == null ? void 0 : P.type) === "ClassDeclaration")
|
|
9553
|
+
this.maybeTakeDecorators(r, g.declaration, g);
|
|
9566
9554
|
else if (r)
|
|
9567
9555
|
throw this.raise(x.UnsupportedDecoratorExport, e);
|
|
9568
|
-
return this.finishNode(
|
|
9556
|
+
return this.finishNode(g, "ExportNamedDeclaration");
|
|
9569
9557
|
}
|
|
9570
9558
|
if (this.eat(65)) {
|
|
9571
|
-
const
|
|
9572
|
-
if (
|
|
9573
|
-
this.maybeTakeDecorators(r,
|
|
9559
|
+
const g = e, C = this.parseExportDefaultExpression();
|
|
9560
|
+
if (g.declaration = C, C.type === "ClassDeclaration")
|
|
9561
|
+
this.maybeTakeDecorators(r, C, g);
|
|
9574
9562
|
else if (r)
|
|
9575
9563
|
throw this.raise(x.UnsupportedDecoratorExport, e);
|
|
9576
|
-
return this.checkExport(
|
|
9564
|
+
return this.checkExport(g, !0, !0), this.finishNode(g, "ExportDefaultDeclaration");
|
|
9577
9565
|
}
|
|
9578
9566
|
this.unexpected(null, 5);
|
|
9579
9567
|
}
|
|
@@ -9682,12 +9670,12 @@ class Jo extends Vo {
|
|
|
9682
9670
|
} = o, p = u.type === "Identifier" ? u.name : u.value;
|
|
9683
9671
|
if (this.checkDuplicateExports(o, p), !i && o.local) {
|
|
9684
9672
|
const {
|
|
9685
|
-
local:
|
|
9673
|
+
local: y
|
|
9686
9674
|
} = o;
|
|
9687
|
-
|
|
9688
|
-
localName:
|
|
9675
|
+
y.type !== "Identifier" ? this.raise(x.ExportBindingIsString, o, {
|
|
9676
|
+
localName: y.value,
|
|
9689
9677
|
exportName: p
|
|
9690
|
-
}) : (this.checkReservedWord(
|
|
9678
|
+
}) : (this.checkReservedWord(y.name, y.loc.start, !0, !1), this.scope.checkLocalExport(y));
|
|
9691
9679
|
}
|
|
9692
9680
|
}
|
|
9693
9681
|
else if (e.declaration) {
|
|
@@ -10032,16 +10020,16 @@ const Zo = (t) => {
|
|
|
10032
10020
|
return !1;
|
|
10033
10021
|
}, el = (t, e, r, s) => {
|
|
10034
10022
|
const i = [];
|
|
10035
|
-
let a = !1, n =
|
|
10023
|
+
let a = !1, n = 0, o = 0, u = null;
|
|
10036
10024
|
for (const P of t.program.body) {
|
|
10037
10025
|
if (P.type === "ImportDeclaration") {
|
|
10038
|
-
|
|
10026
|
+
n = P.end ?? n, u == null && (u = P.start ?? null), P.source.value === r && (a = !0);
|
|
10039
10027
|
continue;
|
|
10040
10028
|
}
|
|
10041
10029
|
if (P.type === "ExpressionStatement" && P.expression.type === "StringLiteral") {
|
|
10042
|
-
const
|
|
10043
|
-
if (typeof
|
|
10044
|
-
|
|
10030
|
+
const g = P;
|
|
10031
|
+
if (typeof g.directive == "string") {
|
|
10032
|
+
o = g.end ?? o;
|
|
10045
10033
|
continue;
|
|
10046
10034
|
}
|
|
10047
10035
|
}
|
|
@@ -10049,20 +10037,18 @@ const Zo = (t) => {
|
|
|
10049
10037
|
}
|
|
10050
10038
|
a || i.push(
|
|
10051
10039
|
`import { createBoundary } from '${r}';`
|
|
10052
|
-
), n || i.push(
|
|
10053
|
-
`import type { TagFunction } from '${s}';`
|
|
10054
10040
|
);
|
|
10055
|
-
const
|
|
10056
|
-
let
|
|
10041
|
+
const p = u ?? o ?? 0, y = n || o || 0;
|
|
10042
|
+
let E = "";
|
|
10057
10043
|
if (i.length) {
|
|
10058
|
-
const P =
|
|
10044
|
+
const P = p > 0 ? e[p - 1] : void 0, g = p > 0 && P !== `
|
|
10059
10045
|
`;
|
|
10060
|
-
|
|
10061
|
-
` : "",
|
|
10062
|
-
`),
|
|
10046
|
+
E += g ? `
|
|
10047
|
+
` : "", E += i.join(`
|
|
10048
|
+
`), E += `
|
|
10063
10049
|
`;
|
|
10064
10050
|
}
|
|
10065
|
-
return { importInsertionPos:
|
|
10051
|
+
return { importInsertionPos: p, blockInsertionPos: y, headerSnippet: E };
|
|
10066
10052
|
}, ta = (t, e, r) => {
|
|
10067
10053
|
const s = Qo(t, {
|
|
10068
10054
|
sourceType: "module",
|
|
@@ -10071,8 +10057,7 @@ const Zo = (t) => {
|
|
|
10071
10057
|
}), i = Zo(s), a = i.length > 0 ? i : ["default"], { importInsertionPos: n, blockInsertionPos: o, headerSnippet: u } = el(
|
|
10072
10058
|
s,
|
|
10073
10059
|
t,
|
|
10074
|
-
e
|
|
10075
|
-
r
|
|
10060
|
+
e
|
|
10076
10061
|
);
|
|
10077
10062
|
return {
|
|
10078
10063
|
ast: s,
|
|
@@ -10093,15 +10078,15 @@ const Zo = (t) => {
|
|
|
10093
10078
|
importInsertionPos: o,
|
|
10094
10079
|
blockInsertionPos: u,
|
|
10095
10080
|
headerSnippet: p
|
|
10096
|
-
} = ta(e, s
|
|
10081
|
+
} = ta(e, s), y = r.exec(e), E = y != null && y[1] ? y[1].split(",").map((g) => g.trim()).filter(Boolean) : [];
|
|
10097
10082
|
return {
|
|
10098
10083
|
targetExports: E.length ? E : n,
|
|
10099
|
-
shouldTransform: !!
|
|
10084
|
+
shouldTransform: !!y || ea(a),
|
|
10100
10085
|
importInsertionPos: o,
|
|
10101
10086
|
blockInsertionPos: u,
|
|
10102
10087
|
headerSnippet: p,
|
|
10103
10088
|
ast: a,
|
|
10104
|
-
match:
|
|
10089
|
+
match: y ?? null
|
|
10105
10090
|
};
|
|
10106
10091
|
}, rl = (t) => {
|
|
10107
10092
|
const { code: e, boundaryImportSpecifier: r, tagFunctionImportSpecifier: s } = t, {
|
|
@@ -10110,7 +10095,7 @@ const Zo = (t) => {
|
|
|
10110
10095
|
importInsertionPos: n,
|
|
10111
10096
|
blockInsertionPos: o,
|
|
10112
10097
|
headerSnippet: u
|
|
10113
|
-
} = ta(e, r
|
|
10098
|
+
} = ta(e, r);
|
|
10114
10099
|
return {
|
|
10115
10100
|
targetExports: a,
|
|
10116
10101
|
shouldTransform: ea(i),
|
|
@@ -10138,13 +10123,13 @@ const Zo = (t) => {
|
|
|
10138
10123
|
mountCallback(() => () => unregister());
|
|
10139
10124
|
}
|
|
10140
10125
|
`), u) {
|
|
10141
|
-
const E = `__lithentHotComponent_${u}`,
|
|
10142
|
-
const ${E} = ${u}
|
|
10126
|
+
const E = `__lithentHotComponent_${u}`, P = `
|
|
10127
|
+
const ${E} = ${u};
|
|
10143
10128
|
if (__lithentModuleHotStore) {
|
|
10144
10129
|
__lithentModuleHotStore["${u}"] = ${E};
|
|
10145
10130
|
}
|
|
10146
10131
|
`;
|
|
10147
|
-
t.appendRight(p,
|
|
10132
|
+
t.appendRight(p, P);
|
|
10148
10133
|
}
|
|
10149
10134
|
}
|
|
10150
10135
|
};
|
|
@@ -12487,20 +12472,20 @@ function Yd(t, e, r) {
|
|
|
12487
12472
|
if (i.push(a), i.length < s.length || !r && i.length > s.length) return !1;
|
|
12488
12473
|
for (let o = 0, u = i.length - 1; o < s.length; o++, u--) {
|
|
12489
12474
|
const p = i[u];
|
|
12490
|
-
let
|
|
12475
|
+
let y;
|
|
12491
12476
|
if ((0, Me.isIdentifier)(p))
|
|
12492
|
-
|
|
12477
|
+
y = p.name;
|
|
12493
12478
|
else if ((0, Me.isStringLiteral)(p))
|
|
12494
|
-
|
|
12479
|
+
y = p.value;
|
|
12495
12480
|
else if ((0, Me.isThisExpression)(p))
|
|
12496
|
-
|
|
12481
|
+
y = "this";
|
|
12497
12482
|
else if ((0, Me.isSuper)(p))
|
|
12498
|
-
|
|
12483
|
+
y = "super";
|
|
12499
12484
|
else if ((0, Me.isPrivateName)(p))
|
|
12500
|
-
|
|
12485
|
+
y = "#" + p.id.name;
|
|
12501
12486
|
else
|
|
12502
12487
|
return !1;
|
|
12503
|
-
if (s[o] !==
|
|
12488
|
+
if (s[o] !== y) return !1;
|
|
12504
12489
|
}
|
|
12505
12490
|
return !0;
|
|
12506
12491
|
}
|
|
@@ -12714,42 +12699,42 @@ const ii = {
|
|
|
12714
12699
|
};
|
|
12715
12700
|
function oh(t, e, r, s, i, a) {
|
|
12716
12701
|
const n = r, o = s, u = i;
|
|
12717
|
-
let p = "",
|
|
12702
|
+
let p = "", y = null, E = r;
|
|
12718
12703
|
const {
|
|
12719
|
-
length:
|
|
12704
|
+
length: P
|
|
12720
12705
|
} = e;
|
|
12721
12706
|
for (; ; ) {
|
|
12722
|
-
if (r >=
|
|
12707
|
+
if (r >= P) {
|
|
12723
12708
|
a.unterminated(n, o, u), p += e.slice(E, r);
|
|
12724
12709
|
break;
|
|
12725
12710
|
}
|
|
12726
|
-
const
|
|
12727
|
-
if (lh(t,
|
|
12711
|
+
const g = e.charCodeAt(r);
|
|
12712
|
+
if (lh(t, g, e, r)) {
|
|
12728
12713
|
p += e.slice(E, r);
|
|
12729
12714
|
break;
|
|
12730
12715
|
}
|
|
12731
|
-
if (
|
|
12716
|
+
if (g === 92) {
|
|
12732
12717
|
p += e.slice(E, r);
|
|
12733
|
-
const
|
|
12734
|
-
|
|
12718
|
+
const C = uh(e, r, s, i, t === "template", a);
|
|
12719
|
+
C.ch === null && !y ? y = {
|
|
12735
12720
|
pos: r,
|
|
12736
12721
|
lineStart: s,
|
|
12737
12722
|
curLine: i
|
|
12738
|
-
} : p +=
|
|
12723
|
+
} : p += C.ch, {
|
|
12739
12724
|
pos: r,
|
|
12740
12725
|
lineStart: s,
|
|
12741
12726
|
curLine: i
|
|
12742
|
-
} =
|
|
12743
|
-
} else
|
|
12744
|
-
`, ++r,
|
|
12727
|
+
} = C, E = r;
|
|
12728
|
+
} else g === 8232 || g === 8233 ? (++r, ++i, s = r) : g === 10 || g === 13 ? t === "template" ? (p += e.slice(E, r) + `
|
|
12729
|
+
`, ++r, g === 13 && e.charCodeAt(r) === 10 && ++r, ++i, E = s = r) : a.unterminated(n, o, u) : ++r;
|
|
12745
12730
|
}
|
|
12746
12731
|
return {
|
|
12747
12732
|
pos: r,
|
|
12748
12733
|
str: p,
|
|
12749
|
-
firstInvalidLoc:
|
|
12734
|
+
firstInvalidLoc: y,
|
|
12750
12735
|
lineStart: s,
|
|
12751
12736
|
curLine: i,
|
|
12752
|
-
containsInvalid: !!
|
|
12737
|
+
containsInvalid: !!y
|
|
12753
12738
|
};
|
|
12754
12739
|
}
|
|
12755
12740
|
function lh(t, e, r, s) {
|
|
@@ -12807,15 +12792,15 @@ function uh(t, e, r, s, i, a) {
|
|
|
12807
12792
|
default:
|
|
12808
12793
|
if (u >= 48 && u <= 55) {
|
|
12809
12794
|
const p = e - 1;
|
|
12810
|
-
let E = /^[0-7]+/.exec(t.slice(p, e + 2))[0],
|
|
12811
|
-
|
|
12812
|
-
const
|
|
12813
|
-
if (E !== "0" ||
|
|
12795
|
+
let E = /^[0-7]+/.exec(t.slice(p, e + 2))[0], P = parseInt(E, 8);
|
|
12796
|
+
P > 255 && (E = E.slice(0, -1), P = parseInt(E, 8)), e += E.length - 1;
|
|
12797
|
+
const g = t.charCodeAt(e);
|
|
12798
|
+
if (E !== "0" || g === 56 || g === 57) {
|
|
12814
12799
|
if (i)
|
|
12815
12800
|
return o(null);
|
|
12816
12801
|
a.strictNumericEscape(p, r, s);
|
|
12817
12802
|
}
|
|
12818
|
-
return o(String.fromCharCode(
|
|
12803
|
+
return o(String.fromCharCode(P));
|
|
12819
12804
|
}
|
|
12820
12805
|
return o(String.fromCharCode(u));
|
|
12821
12806
|
}
|
|
@@ -12832,15 +12817,15 @@ function Mr(t, e, r, s, i, a, n, o) {
|
|
|
12832
12817
|
};
|
|
12833
12818
|
}
|
|
12834
12819
|
function fa(t, e, r, s, i, a, n, o, u, p) {
|
|
12835
|
-
const
|
|
12836
|
-
let
|
|
12820
|
+
const y = e, E = i === 16 ? ii.hex : ii.decBinOct, P = i === 16 ? It.hex : i === 10 ? It.dec : i === 8 ? It.oct : It.bin;
|
|
12821
|
+
let g = !1, C = 0;
|
|
12837
12822
|
for (let A = 0, O = a ?? 1 / 0; A < O; ++A) {
|
|
12838
12823
|
const I = t.charCodeAt(e);
|
|
12839
|
-
let
|
|
12824
|
+
let N;
|
|
12840
12825
|
if (I === 95 && o !== "bail") {
|
|
12841
12826
|
const B = t.charCodeAt(e - 1), K = t.charCodeAt(e + 1);
|
|
12842
12827
|
if (o) {
|
|
12843
|
-
if (Number.isNaN(K) || !
|
|
12828
|
+
if (Number.isNaN(K) || !P(K) || E.has(B) || E.has(K)) {
|
|
12844
12829
|
if (p) return {
|
|
12845
12830
|
n: null,
|
|
12846
12831
|
pos: e
|
|
@@ -12857,26 +12842,26 @@ function fa(t, e, r, s, i, a, n, o, u, p) {
|
|
|
12857
12842
|
++e;
|
|
12858
12843
|
continue;
|
|
12859
12844
|
}
|
|
12860
|
-
if (I >= 97 ?
|
|
12861
|
-
if (
|
|
12845
|
+
if (I >= 97 ? N = I - 97 + 10 : I >= 65 ? N = I - 65 + 10 : nh(I) ? N = I - 48 : N = 1 / 0, N >= i) {
|
|
12846
|
+
if (N <= 9 && p)
|
|
12862
12847
|
return {
|
|
12863
12848
|
n: null,
|
|
12864
12849
|
pos: e
|
|
12865
12850
|
};
|
|
12866
|
-
if (
|
|
12867
|
-
|
|
12851
|
+
if (N <= 9 && u.invalidDigit(e, r, s, i))
|
|
12852
|
+
N = 0;
|
|
12868
12853
|
else if (n)
|
|
12869
|
-
|
|
12854
|
+
N = 0, g = !0;
|
|
12870
12855
|
else
|
|
12871
12856
|
break;
|
|
12872
12857
|
}
|
|
12873
|
-
++e,
|
|
12858
|
+
++e, C = C * i + N;
|
|
12874
12859
|
}
|
|
12875
|
-
return e ===
|
|
12860
|
+
return e === y || a != null && e - y !== a || g ? {
|
|
12876
12861
|
n: null,
|
|
12877
12862
|
pos: e
|
|
12878
12863
|
} : {
|
|
12879
|
-
n:
|
|
12864
|
+
n: C,
|
|
12880
12865
|
pos: e
|
|
12881
12866
|
};
|
|
12882
12867
|
}
|
|
@@ -12931,10 +12916,10 @@ function be() {
|
|
|
12931
12916
|
if (ai) return Y;
|
|
12932
12917
|
ai = 1, Object.defineProperty(Y, "__esModule", {
|
|
12933
12918
|
value: !0
|
|
12934
|
-
}), Y.allExpandedTypes = Y.VISITOR_KEYS = Y.NODE_UNION_SHAPES__PRIVATE = Y.NODE_PARENT_VALIDATIONS = Y.NODE_FIELDS = Y.FLIPPED_ALIAS_KEYS = Y.DEPRECATED_KEYS = Y.BUILDER_KEYS = Y.ALIAS_KEYS = void 0, Y.arrayOf = A, Y.arrayOfType = O, Y.assertEach =
|
|
12919
|
+
}), Y.allExpandedTypes = Y.VISITOR_KEYS = Y.NODE_UNION_SHAPES__PRIVATE = Y.NODE_PARENT_VALIDATIONS = Y.NODE_FIELDS = Y.FLIPPED_ALIAS_KEYS = Y.DEPRECATED_KEYS = Y.BUILDER_KEYS = Y.ALIAS_KEYS = void 0, Y.arrayOf = A, Y.arrayOfType = O, Y.assertEach = N, Y.assertNodeOrValueType = Re, Y.assertNodeType = re, Y.assertOneOf = B, Y.assertOptionalChainStart = Je, Y.assertShape = ne, Y.assertValueType = Pe, Y.chain = yt, Y.default = mt, Y.defineAliasedType = mr, Y.validate = E, Y.validateArrayOfType = I, Y.validateOptional = g, Y.validateOptionalType = C, Y.validateType = P;
|
|
12935
12920
|
var t = ut(), e = ts();
|
|
12936
12921
|
const r = Y.VISITOR_KEYS = {}, s = Y.ALIAS_KEYS = {}, i = Y.FLIPPED_ALIAS_KEYS = {}, a = Y.NODE_FIELDS = {}, n = Y.BUILDER_KEYS = {}, o = Y.DEPRECATED_KEYS = {}, u = Y.NODE_PARENT_VALIDATIONS = {}, p = Y.NODE_UNION_SHAPES__PRIVATE = {};
|
|
12937
|
-
function
|
|
12922
|
+
function y(L) {
|
|
12938
12923
|
return Array.isArray(L) ? "array" : L === null ? "null" : typeof L;
|
|
12939
12924
|
}
|
|
12940
12925
|
function E(L) {
|
|
@@ -12942,23 +12927,23 @@ function be() {
|
|
|
12942
12927
|
validate: L
|
|
12943
12928
|
};
|
|
12944
12929
|
}
|
|
12945
|
-
function
|
|
12930
|
+
function P(...L) {
|
|
12946
12931
|
return E(re(...L));
|
|
12947
12932
|
}
|
|
12948
|
-
function
|
|
12933
|
+
function g(L) {
|
|
12949
12934
|
return {
|
|
12950
12935
|
validate: L,
|
|
12951
12936
|
optional: !0
|
|
12952
12937
|
};
|
|
12953
12938
|
}
|
|
12954
|
-
function
|
|
12939
|
+
function C(...L) {
|
|
12955
12940
|
return {
|
|
12956
12941
|
validate: re(...L),
|
|
12957
12942
|
optional: !0
|
|
12958
12943
|
};
|
|
12959
12944
|
}
|
|
12960
12945
|
function A(L) {
|
|
12961
|
-
return yt(Pe("array"),
|
|
12946
|
+
return yt(Pe("array"), N(L));
|
|
12962
12947
|
}
|
|
12963
12948
|
function O(...L) {
|
|
12964
12949
|
return A(re(...L));
|
|
@@ -12966,7 +12951,7 @@ function be() {
|
|
|
12966
12951
|
function I(...L) {
|
|
12967
12952
|
return E(O(...L));
|
|
12968
12953
|
}
|
|
12969
|
-
function
|
|
12954
|
+
function N(L) {
|
|
12970
12955
|
const j = process.env.BABEL_TYPES_8_BREAKING ? e.validateChild : () => {
|
|
12971
12956
|
};
|
|
12972
12957
|
function J(R, H, Z) {
|
|
@@ -13019,7 +13004,7 @@ function be() {
|
|
|
13019
13004
|
}
|
|
13020
13005
|
function Re(...L) {
|
|
13021
13006
|
function j(J, R, H) {
|
|
13022
|
-
const Z =
|
|
13007
|
+
const Z = y(H);
|
|
13023
13008
|
for (const G of L)
|
|
13024
13009
|
if (Z === G || (0, t.default)(G, H)) {
|
|
13025
13010
|
(0, e.validateChild)(J, R, H);
|
|
@@ -13031,8 +13016,8 @@ function be() {
|
|
|
13031
13016
|
}
|
|
13032
13017
|
function Pe(L) {
|
|
13033
13018
|
function j(J, R, H) {
|
|
13034
|
-
if (
|
|
13035
|
-
throw new TypeError(`Property ${R} expected type of ${L} but got ${
|
|
13019
|
+
if (y(H) !== L)
|
|
13020
|
+
throw new TypeError(`Property ${R} expected type of ${L} but got ${y(H)}`);
|
|
13036
13021
|
}
|
|
13037
13022
|
return j.type = L, j;
|
|
13038
13023
|
}
|
|
@@ -13128,7 +13113,7 @@ ${G.join(`
|
|
|
13128
13113
|
R[z] = R[z] || {};
|
|
13129
13114
|
for (const z of Object.keys(R)) {
|
|
13130
13115
|
const Q = R[z];
|
|
13131
|
-
Q.default !== void 0 && !G.includes(z) && (Q.optional = !0), Q.default === void 0 ? Q.default = null : !Q.validate && Q.default != null && (Q.validate = Pe(
|
|
13116
|
+
Q.default !== void 0 && !G.includes(z) && (Q.optional = !0), Q.default === void 0 ? Q.default = null : !Q.validate && Q.default != null && (Q.validate = Pe(y(Q.default)));
|
|
13132
13117
|
for (const fe of Object.keys(Q))
|
|
13133
13118
|
if (!yr.has(fe))
|
|
13134
13119
|
throw new Error(`Unknown field key "${fe}" on ${L}.${z}`);
|
|
@@ -13184,8 +13169,8 @@ function Jt() {
|
|
|
13184
13169
|
operator: {
|
|
13185
13170
|
validate: process.env.BABEL_TYPES_8_BREAKING ? Object.assign(function() {
|
|
13186
13171
|
const A = (0, a.assertOneOf)(...i.ASSIGNMENT_OPERATORS), O = (0, a.assertOneOf)("=");
|
|
13187
|
-
return function(I,
|
|
13188
|
-
((0, t.default)("Pattern", I.left) ? O : A)(I,
|
|
13172
|
+
return function(I, N, B) {
|
|
13173
|
+
((0, t.default)("Pattern", I.left) ? O : A)(I, N, B);
|
|
13189
13174
|
};
|
|
13190
13175
|
}(), {
|
|
13191
13176
|
oneOf: i.ASSIGNMENT_OPERATORS
|
|
@@ -13210,8 +13195,8 @@ function Jt() {
|
|
|
13210
13195
|
left: {
|
|
13211
13196
|
validate: function() {
|
|
13212
13197
|
const A = (0, a.assertNodeType)("Expression"), O = (0, a.assertNodeType)("Expression", "PrivateName");
|
|
13213
|
-
return Object.assign(function(
|
|
13214
|
-
(
|
|
13198
|
+
return Object.assign(function(N, B, K) {
|
|
13199
|
+
(N.operator === "in" ? O : A)(N, B, K);
|
|
13215
13200
|
}, {
|
|
13216
13201
|
oneOfNodeTypes: ["Expression", "PrivateName"]
|
|
13217
13202
|
});
|
|
@@ -13426,7 +13411,7 @@ function Jt() {
|
|
|
13426
13411
|
}
|
|
13427
13412
|
});
|
|
13428
13413
|
te.functionTypeAnnotationCommon = p;
|
|
13429
|
-
const
|
|
13414
|
+
const y = () => Object.assign({}, u(), {
|
|
13430
13415
|
declare: {
|
|
13431
13416
|
validate: (0, a.assertValueType)("boolean"),
|
|
13432
13417
|
optional: !0
|
|
@@ -13436,10 +13421,10 @@ function Jt() {
|
|
|
13436
13421
|
optional: !0
|
|
13437
13422
|
}
|
|
13438
13423
|
});
|
|
13439
|
-
te.functionDeclarationCommon =
|
|
13424
|
+
te.functionDeclarationCommon = y, o("FunctionDeclaration", {
|
|
13440
13425
|
builder: ["id", "params", "body", "generator", "async"],
|
|
13441
13426
|
visitor: ["id", "typeParameters", "params", "predicate", "returnType", "body"],
|
|
13442
|
-
fields: Object.assign({},
|
|
13427
|
+
fields: Object.assign({}, y(), p(), {
|
|
13443
13428
|
body: {
|
|
13444
13429
|
validate: (0, a.assertNodeType)("BlockStatement")
|
|
13445
13430
|
},
|
|
@@ -13451,8 +13436,8 @@ function Jt() {
|
|
|
13451
13436
|
aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"],
|
|
13452
13437
|
validate: process.env.BABEL_TYPES_8_BREAKING ? function() {
|
|
13453
13438
|
const A = (0, a.assertNodeType)("Identifier");
|
|
13454
|
-
return function(O, I,
|
|
13455
|
-
(0, t.default)("ExportDefaultDeclaration", O) || A(
|
|
13439
|
+
return function(O, I, N) {
|
|
13440
|
+
(0, t.default)("ExportDefaultDeclaration", O) || A(N, "id", N.id);
|
|
13456
13441
|
};
|
|
13457
13442
|
}() : void 0
|
|
13458
13443
|
}), o("FunctionExpression", {
|
|
@@ -13501,9 +13486,9 @@ function Jt() {
|
|
|
13501
13486
|
}
|
|
13502
13487
|
}),
|
|
13503
13488
|
validate: process.env.BABEL_TYPES_8_BREAKING ? function(A, O, I) {
|
|
13504
|
-
const
|
|
13505
|
-
if (!
|
|
13506
|
-
const [, B] =
|
|
13489
|
+
const N = /\.(\w+)$/.exec(O.toString());
|
|
13490
|
+
if (!N) return;
|
|
13491
|
+
const [, B] = N, K = {
|
|
13507
13492
|
computed: !1
|
|
13508
13493
|
};
|
|
13509
13494
|
if (B === "property") {
|
|
@@ -13589,9 +13574,9 @@ function Jt() {
|
|
|
13589
13574
|
},
|
|
13590
13575
|
flags: {
|
|
13591
13576
|
validate: process.env.BABEL_TYPES_8_BREAKING ? (0, a.chain)((0, a.assertValueType)("string"), Object.assign(function(A, O, I) {
|
|
13592
|
-
const
|
|
13593
|
-
if (
|
|
13594
|
-
throw new TypeError(`"${
|
|
13577
|
+
const N = /[^dgimsuvy]/.exec(I);
|
|
13578
|
+
if (N)
|
|
13579
|
+
throw new TypeError(`"${N[0]}" is not a valid RegExp flag`);
|
|
13595
13580
|
}, {
|
|
13596
13581
|
type: "string"
|
|
13597
13582
|
})) : (0, a.assertValueType)("string"),
|
|
@@ -13643,8 +13628,8 @@ function Jt() {
|
|
|
13643
13628
|
},
|
|
13644
13629
|
property: {
|
|
13645
13630
|
validate: function() {
|
|
13646
|
-
const A = (0, a.assertNodeType)("Identifier", "PrivateName"), O = (0, a.assertNodeType)("Expression"), I = function(
|
|
13647
|
-
(
|
|
13631
|
+
const A = (0, a.assertNodeType)("Identifier", "PrivateName"), O = (0, a.assertNodeType)("Expression"), I = function(N, B, K) {
|
|
13632
|
+
(N.computed ? O : A)(N, B, K);
|
|
13648
13633
|
};
|
|
13649
13634
|
return I.oneOfNodeTypes = ["Expression", "Identifier", "PrivateName"], I;
|
|
13650
13635
|
}()
|
|
@@ -13701,8 +13686,8 @@ function Jt() {
|
|
|
13701
13686
|
},
|
|
13702
13687
|
key: {
|
|
13703
13688
|
validate: function() {
|
|
13704
|
-
const A = (0, a.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral"), O = (0, a.assertNodeType)("Expression"), I = function(
|
|
13705
|
-
(
|
|
13689
|
+
const A = (0, a.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral"), O = (0, a.assertNodeType)("Expression"), I = function(N, B, K) {
|
|
13690
|
+
(N.computed ? O : A)(N, B, K);
|
|
13706
13691
|
};
|
|
13707
13692
|
return I.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral"], I;
|
|
13708
13693
|
}()
|
|
@@ -13745,8 +13730,8 @@ function Jt() {
|
|
|
13745
13730
|
key: {
|
|
13746
13731
|
validate: function() {
|
|
13747
13732
|
const A = (0, a.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral", "DecimalLiteral", "PrivateName"), O = (0, a.assertNodeType)("Expression");
|
|
13748
|
-
return Object.assign(function(
|
|
13749
|
-
(
|
|
13733
|
+
return Object.assign(function(N, B, K) {
|
|
13734
|
+
(N.computed ? O : A)(N, B, K);
|
|
13750
13735
|
}, {
|
|
13751
13736
|
oneOfNodeTypes: ["Expression", "Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral", "DecimalLiteral", "PrivateName"]
|
|
13752
13737
|
});
|
|
@@ -13777,7 +13762,7 @@ function Jt() {
|
|
|
13777
13762
|
aliases: ["UserWhitespacable", "Property", "ObjectMember"],
|
|
13778
13763
|
validate: process.env.BABEL_TYPES_8_BREAKING ? function() {
|
|
13779
13764
|
const A = (0, a.assertNodeType)("Identifier", "Pattern", "TSAsExpression", "TSSatisfiesExpression", "TSNonNullExpression", "TSTypeAssertion"), O = (0, a.assertNodeType)("Expression");
|
|
13780
|
-
return function(I,
|
|
13765
|
+
return function(I, N, B) {
|
|
13781
13766
|
((0, t.default)("ObjectPattern", I) ? A : O)(B, "value", B.value);
|
|
13782
13767
|
};
|
|
13783
13768
|
}() : void 0
|
|
@@ -13794,9 +13779,9 @@ function Jt() {
|
|
|
13794
13779
|
validate: process.env.BABEL_TYPES_8_BREAKING ? function(A, O) {
|
|
13795
13780
|
const I = /(\w+)\[(\d+)\]/.exec(O.toString());
|
|
13796
13781
|
if (!I) throw new Error("Internal Babel error: malformed key.");
|
|
13797
|
-
const [,
|
|
13798
|
-
if (A[
|
|
13799
|
-
throw new TypeError(`RestElement must be last element of ${
|
|
13782
|
+
const [, N, B] = I;
|
|
13783
|
+
if (A[N].length > +B + 1)
|
|
13784
|
+
throw new TypeError(`RestElement must be last element of ${N}`);
|
|
13800
13785
|
} : void 0
|
|
13801
13786
|
}), o("ReturnStatement", {
|
|
13802
13787
|
visitor: ["argument"],
|
|
@@ -13916,15 +13901,15 @@ function Jt() {
|
|
|
13916
13901
|
},
|
|
13917
13902
|
validate: process.env.BABEL_TYPES_8_BREAKING ? (() => {
|
|
13918
13903
|
const A = (0, a.assertNodeType)("Identifier", "Placeholder"), O = (0, a.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern", "Placeholder"), I = (0, a.assertNodeType)("Identifier", "VoidPattern", "Placeholder");
|
|
13919
|
-
return function(
|
|
13904
|
+
return function(N, B, K) {
|
|
13920
13905
|
const {
|
|
13921
13906
|
kind: re,
|
|
13922
13907
|
declarations: Re
|
|
13923
|
-
} = K, Pe = (0, t.default)("ForXStatement",
|
|
13908
|
+
} = K, Pe = (0, t.default)("ForXStatement", N, {
|
|
13924
13909
|
left: K
|
|
13925
13910
|
});
|
|
13926
13911
|
if (Pe && Re.length !== 1)
|
|
13927
|
-
throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${
|
|
13912
|
+
throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${N.type}`);
|
|
13928
13913
|
for (const ne of Re)
|
|
13929
13914
|
re === "const" || re === "let" || re === "var" ? !Pe && !ne.init ? A(ne, "id", ne.id) : O(ne, "id", ne.id) : I(ne, "id", ne.id);
|
|
13930
13915
|
};
|
|
@@ -14095,12 +14080,12 @@ function Jt() {
|
|
|
14095
14080
|
},
|
|
14096
14081
|
validate: process.env.BABEL_TYPES_8_BREAKING ? function() {
|
|
14097
14082
|
const A = (0, a.assertNodeType)("Identifier");
|
|
14098
|
-
return function(O, I,
|
|
14099
|
-
(0, t.default)("ExportDefaultDeclaration", O) || A(
|
|
14083
|
+
return function(O, I, N) {
|
|
14084
|
+
(0, t.default)("ExportDefaultDeclaration", O) || A(N, "id", N.id);
|
|
14100
14085
|
};
|
|
14101
14086
|
}() : void 0
|
|
14102
14087
|
});
|
|
14103
|
-
const
|
|
14088
|
+
const P = te.importAttributes = {
|
|
14104
14089
|
attributes: {
|
|
14105
14090
|
optional: !0,
|
|
14106
14091
|
validate: (0, a.arrayOfType)("ImportAttribute")
|
|
@@ -14120,7 +14105,7 @@ function Jt() {
|
|
|
14120
14105
|
validate: (0, a.assertNodeType)("StringLiteral")
|
|
14121
14106
|
},
|
|
14122
14107
|
exportKind: (0, a.validateOptional)((0, a.assertOneOf)("type", "value"))
|
|
14123
|
-
},
|
|
14108
|
+
}, P)
|
|
14124
14109
|
}), o("ExportDefaultDeclaration", {
|
|
14125
14110
|
visitor: ["declaration"],
|
|
14126
14111
|
aliases: ["Statement", "Declaration", "ImportOrExportDeclaration", "ExportDeclaration"],
|
|
@@ -14144,13 +14129,13 @@ function Jt() {
|
|
|
14144
14129
|
oneOfNodeTypes: ["Declaration"]
|
|
14145
14130
|
})) : (0, a.assertNodeType)("Declaration")
|
|
14146
14131
|
}
|
|
14147
|
-
},
|
|
14132
|
+
}, P, {
|
|
14148
14133
|
specifiers: {
|
|
14149
14134
|
default: [],
|
|
14150
14135
|
validate: (0, a.arrayOf)(function() {
|
|
14151
14136
|
const A = (0, a.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier"), O = (0, a.assertNodeType)("ExportSpecifier");
|
|
14152
|
-
return process.env.BABEL_TYPES_8_BREAKING ? Object.assign(function(I,
|
|
14153
|
-
(I.source ? A : O)(I,
|
|
14137
|
+
return process.env.BABEL_TYPES_8_BREAKING ? Object.assign(function(I, N, B) {
|
|
14138
|
+
(I.source ? A : O)(I, N, B);
|
|
14154
14139
|
}, {
|
|
14155
14140
|
oneOfNodeTypes: ["ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier"]
|
|
14156
14141
|
}) : A;
|
|
@@ -14187,8 +14172,8 @@ function Jt() {
|
|
|
14187
14172
|
if (!process.env.BABEL_TYPES_8_BREAKING)
|
|
14188
14173
|
return (0, a.assertNodeType)("VariableDeclaration", "LVal");
|
|
14189
14174
|
const A = (0, a.assertNodeType)("VariableDeclaration"), O = (0, a.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern", "TSAsExpression", "TSSatisfiesExpression", "TSTypeAssertion", "TSNonNullExpression");
|
|
14190
|
-
return Object.assign(function(I,
|
|
14191
|
-
(0, t.default)("VariableDeclaration", B) ? A(I,
|
|
14175
|
+
return Object.assign(function(I, N, B) {
|
|
14176
|
+
(0, t.default)("VariableDeclaration", B) ? A(I, N, B) : O(I, N, B);
|
|
14192
14177
|
}, {
|
|
14193
14178
|
oneOfNodeTypes: ["VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern", "TSAsExpression", "TSSatisfiesExpression", "TSTypeAssertion", "TSNonNullExpression"]
|
|
14194
14179
|
});
|
|
@@ -14208,7 +14193,7 @@ function Jt() {
|
|
|
14208
14193
|
builder: ["specifiers", "source"],
|
|
14209
14194
|
visitor: ["specifiers", "source", "attributes", "assertions"],
|
|
14210
14195
|
aliases: ["Statement", "Declaration", "ImportOrExportDeclaration"],
|
|
14211
|
-
fields: Object.assign({},
|
|
14196
|
+
fields: Object.assign({}, P, {
|
|
14212
14197
|
module: {
|
|
14213
14198
|
optional: !0,
|
|
14214
14199
|
validate: (0, a.assertValueType)("boolean")
|
|
@@ -14280,20 +14265,20 @@ function Jt() {
|
|
|
14280
14265
|
fields: {
|
|
14281
14266
|
meta: {
|
|
14282
14267
|
validate: process.env.BABEL_TYPES_8_BREAKING ? (0, a.chain)((0, a.assertNodeType)("Identifier"), Object.assign(function(A, O, I) {
|
|
14283
|
-
let
|
|
14268
|
+
let N;
|
|
14284
14269
|
switch (I.name) {
|
|
14285
14270
|
case "function":
|
|
14286
|
-
|
|
14271
|
+
N = "sent";
|
|
14287
14272
|
break;
|
|
14288
14273
|
case "new":
|
|
14289
|
-
|
|
14274
|
+
N = "target";
|
|
14290
14275
|
break;
|
|
14291
14276
|
case "import":
|
|
14292
|
-
|
|
14277
|
+
N = "meta";
|
|
14293
14278
|
break;
|
|
14294
14279
|
}
|
|
14295
14280
|
if (!(0, t.default)("Identifier", A.property, {
|
|
14296
|
-
name:
|
|
14281
|
+
name: N
|
|
14297
14282
|
}))
|
|
14298
14283
|
throw new TypeError("Unrecognised MetaProperty");
|
|
14299
14284
|
}, {
|
|
@@ -14305,7 +14290,7 @@ function Jt() {
|
|
|
14305
14290
|
}
|
|
14306
14291
|
}
|
|
14307
14292
|
});
|
|
14308
|
-
const
|
|
14293
|
+
const g = () => ({
|
|
14309
14294
|
abstract: {
|
|
14310
14295
|
validate: (0, a.assertValueType)("boolean"),
|
|
14311
14296
|
optional: !0
|
|
@@ -14330,14 +14315,14 @@ function Jt() {
|
|
|
14330
14315
|
key: {
|
|
14331
14316
|
validate: (0, a.chain)(function() {
|
|
14332
14317
|
const A = (0, a.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral"), O = (0, a.assertNodeType)("Expression");
|
|
14333
|
-
return function(I,
|
|
14334
|
-
(I.computed ? O : A)(I,
|
|
14318
|
+
return function(I, N, B) {
|
|
14319
|
+
(I.computed ? O : A)(I, N, B);
|
|
14335
14320
|
};
|
|
14336
14321
|
}(), (0, a.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral", "Expression"))
|
|
14337
14322
|
}
|
|
14338
14323
|
});
|
|
14339
|
-
te.classMethodOrPropertyCommon =
|
|
14340
|
-
const
|
|
14324
|
+
te.classMethodOrPropertyCommon = g;
|
|
14325
|
+
const C = () => Object.assign({}, u(), g(), {
|
|
14341
14326
|
params: (0, a.validateArrayOfType)("FunctionParameter", "TSParameterProperty"),
|
|
14342
14327
|
kind: {
|
|
14343
14328
|
validate: (0, a.assertOneOf)("get", "set", "method", "constructor"),
|
|
@@ -14352,12 +14337,12 @@ function Jt() {
|
|
|
14352
14337
|
optional: !0
|
|
14353
14338
|
}
|
|
14354
14339
|
});
|
|
14355
|
-
return te.classMethodOrDeclareMethodCommon =
|
|
14340
|
+
return te.classMethodOrDeclareMethodCommon = C, o("ClassMethod", Object.assign({
|
|
14356
14341
|
aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
|
|
14357
14342
|
builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"],
|
|
14358
14343
|
visitor: ["decorators", "key", "typeParameters", "params", "returnType", "body"]
|
|
14359
14344
|
}, n(), {
|
|
14360
|
-
fields: Object.assign({},
|
|
14345
|
+
fields: Object.assign({}, C(), p(), {
|
|
14361
14346
|
body: {
|
|
14362
14347
|
validate: (0, a.assertNodeType)("BlockStatement")
|
|
14363
14348
|
}
|
|
@@ -14410,7 +14395,7 @@ function Jt() {
|
|
|
14410
14395
|
}
|
|
14411
14396
|
}), function(O) {
|
|
14412
14397
|
const I = O.value.raw;
|
|
14413
|
-
let
|
|
14398
|
+
let N = !1;
|
|
14414
14399
|
const B = () => {
|
|
14415
14400
|
throw new Error("Internal @babel/types error.");
|
|
14416
14401
|
}, {
|
|
@@ -14418,7 +14403,7 @@ function Jt() {
|
|
|
14418
14403
|
firstInvalidLoc: re
|
|
14419
14404
|
} = (0, s.readStringContents)("template", I, 0, 0, 0, {
|
|
14420
14405
|
unterminated() {
|
|
14421
|
-
|
|
14406
|
+
N = !0;
|
|
14422
14407
|
},
|
|
14423
14408
|
strictNumericEscape: B,
|
|
14424
14409
|
invalidEscapeSequence: B,
|
|
@@ -14427,7 +14412,7 @@ function Jt() {
|
|
|
14427
14412
|
invalidDigit: B,
|
|
14428
14413
|
invalidCodePoint: B
|
|
14429
14414
|
});
|
|
14430
|
-
if (!
|
|
14415
|
+
if (!N) throw new Error("Invalid raw");
|
|
14431
14416
|
O.value.cooked = re ? null : K;
|
|
14432
14417
|
})
|
|
14433
14418
|
},
|
|
@@ -14505,8 +14490,8 @@ Expected ${I.length + 1} quasis but got ${A.quasis.length}`);
|
|
|
14505
14490
|
property: {
|
|
14506
14491
|
validate: function() {
|
|
14507
14492
|
const A = (0, a.assertNodeType)("Identifier"), O = (0, a.assertNodeType)("Expression");
|
|
14508
|
-
return Object.assign(function(
|
|
14509
|
-
(
|
|
14493
|
+
return Object.assign(function(N, B, K) {
|
|
14494
|
+
(N.computed ? O : A)(N, B, K);
|
|
14510
14495
|
}, {
|
|
14511
14496
|
oneOfNodeTypes: ["Expression", "Identifier"]
|
|
14512
14497
|
});
|
|
@@ -14546,7 +14531,7 @@ Expected ${I.length + 1} quasis but got ${A.quasis.length}`);
|
|
|
14546
14531
|
builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
|
|
14547
14532
|
aliases: ["Property"]
|
|
14548
14533
|
}, n(), {
|
|
14549
|
-
fields: Object.assign({},
|
|
14534
|
+
fields: Object.assign({}, g(), {
|
|
14550
14535
|
value: {
|
|
14551
14536
|
validate: (0, a.assertNodeType)("Expression"),
|
|
14552
14537
|
optional: !0
|
|
@@ -14581,12 +14566,12 @@ Expected ${I.length + 1} quasis but got ${A.quasis.length}`);
|
|
|
14581
14566
|
builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
|
|
14582
14567
|
aliases: ["Property", "Accessor"]
|
|
14583
14568
|
}, n(!0), {
|
|
14584
|
-
fields: Object.assign({},
|
|
14569
|
+
fields: Object.assign({}, g(), {
|
|
14585
14570
|
key: {
|
|
14586
14571
|
validate: (0, a.chain)(function() {
|
|
14587
14572
|
const A = (0, a.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral", "PrivateName"), O = (0, a.assertNodeType)("Expression");
|
|
14588
|
-
return function(I,
|
|
14589
|
-
(I.computed ? O : A)(I,
|
|
14573
|
+
return function(I, N, B) {
|
|
14574
|
+
(I.computed ? O : A)(I, N, B);
|
|
14590
14575
|
};
|
|
14591
14576
|
}(), (0, a.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral", "Expression", "PrivateName"))
|
|
14592
14577
|
},
|
|
@@ -14664,7 +14649,7 @@ Expected ${I.length + 1} quasis but got ${A.quasis.length}`);
|
|
|
14664
14649
|
builder: ["kind", "key", "params", "body", "static"],
|
|
14665
14650
|
visitor: ["decorators", "key", "typeParameters", "params", "returnType", "body"],
|
|
14666
14651
|
aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"],
|
|
14667
|
-
fields: Object.assign({},
|
|
14652
|
+
fields: Object.assign({}, C(), p(), {
|
|
14668
14653
|
kind: {
|
|
14669
14654
|
validate: (0, a.assertOneOf)("get", "set", "method"),
|
|
14670
14655
|
default: "method"
|
|
@@ -15542,8 +15527,8 @@ function Ph() {
|
|
|
15542
15527
|
}
|
|
15543
15528
|
});
|
|
15544
15529
|
const p = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"];
|
|
15545
|
-
for (const
|
|
15546
|
-
s(
|
|
15530
|
+
for (const g of p)
|
|
15531
|
+
s(g, {
|
|
15547
15532
|
aliases: ["TSType", "TSBaseType"],
|
|
15548
15533
|
visitor: [],
|
|
15549
15534
|
fields: {}
|
|
@@ -15553,13 +15538,13 @@ function Ph() {
|
|
|
15553
15538
|
visitor: [],
|
|
15554
15539
|
fields: {}
|
|
15555
15540
|
});
|
|
15556
|
-
const
|
|
15541
|
+
const y = {
|
|
15557
15542
|
aliases: ["TSType"],
|
|
15558
15543
|
visitor: ["typeParameters", "parameters", "typeAnnotation"]
|
|
15559
15544
|
};
|
|
15560
|
-
s("TSFunctionType", Object.assign({},
|
|
15545
|
+
s("TSFunctionType", Object.assign({}, y, {
|
|
15561
15546
|
fields: n()
|
|
15562
|
-
})), s("TSConstructorType", Object.assign({},
|
|
15547
|
+
})), s("TSConstructorType", Object.assign({}, y, {
|
|
15563
15548
|
fields: Object.assign({}, n(), {
|
|
15564
15549
|
abstract: (0, t.validateOptional)(i)
|
|
15565
15550
|
})
|
|
@@ -15692,10 +15677,10 @@ function Ph() {
|
|
|
15692
15677
|
fields: {
|
|
15693
15678
|
quasis: (0, t.validateArrayOfType)("TemplateElement"),
|
|
15694
15679
|
types: {
|
|
15695
|
-
validate: (0, t.chain)((0, t.assertValueType)("array"), (0, t.assertEach)((0, t.assertNodeType)("TSType")), function(
|
|
15696
|
-
if (
|
|
15697
|
-
throw new TypeError(`Number of ${
|
|
15698
|
-
Expected ${A.length + 1} quasis but got ${
|
|
15680
|
+
validate: (0, t.chain)((0, t.assertValueType)("array"), (0, t.assertEach)((0, t.assertNodeType)("TSType")), function(g, C, A) {
|
|
15681
|
+
if (g.quasis.length !== A.length + 1)
|
|
15682
|
+
throw new TypeError(`Number of ${g.type} quasis should be exactly one more than the number of types.
|
|
15683
|
+
Expected ${A.length + 1} quasis but got ${g.quasis.length}`);
|
|
15699
15684
|
})
|
|
15700
15685
|
}
|
|
15701
15686
|
}
|
|
@@ -15705,8 +15690,8 @@ Expected ${A.length + 1} quasis but got ${P.quasis.length}`);
|
|
|
15705
15690
|
fields: {
|
|
15706
15691
|
literal: {
|
|
15707
15692
|
validate: function() {
|
|
15708
|
-
const
|
|
15709
|
-
(0, r.default)("UnaryExpression", K) ? (
|
|
15693
|
+
const g = (0, t.assertNodeType)("NumericLiteral", "BigIntLiteral"), C = (0, t.assertOneOf)("-"), A = (0, t.assertNodeType)("NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral", "TemplateLiteral"), O = function(N, B, K) {
|
|
15694
|
+
(0, r.default)("UnaryExpression", K) ? (C(K, "operator", K.operator), g(K, "argument", K.argument)) : A(N, B, K);
|
|
15710
15695
|
};
|
|
15711
15696
|
return O.oneOfNodeTypes = ["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral", "TemplateLiteral", "UnaryExpression"], O;
|
|
15712
15697
|
}()
|
|
@@ -15751,7 +15736,7 @@ Expected ${A.length + 1} quasis but got ${P.quasis.length}`);
|
|
|
15751
15736
|
typeParameters: (0, t.validateOptionalType)("TSTypeParameterInstantiation")
|
|
15752
15737
|
}
|
|
15753
15738
|
});
|
|
15754
|
-
const
|
|
15739
|
+
const P = {
|
|
15755
15740
|
aliases: ["Expression", "LVal", "PatternLike"],
|
|
15756
15741
|
visitor: ["expression", "typeAnnotation"],
|
|
15757
15742
|
fields: {
|
|
@@ -15759,7 +15744,7 @@ Expected ${A.length + 1} quasis but got ${P.quasis.length}`);
|
|
|
15759
15744
|
typeAnnotation: (0, t.validateType)("TSType")
|
|
15760
15745
|
}
|
|
15761
15746
|
};
|
|
15762
|
-
return s("TSAsExpression",
|
|
15747
|
+
return s("TSAsExpression", P), s("TSSatisfiesExpression", P), s("TSTypeAssertion", {
|
|
15763
15748
|
aliases: ["Expression", "LVal", "PatternLike"],
|
|
15764
15749
|
visitor: ["typeAnnotation", "expression"],
|
|
15765
15750
|
fields: {
|
|
@@ -16009,10 +15994,10 @@ function ts() {
|
|
|
16009
15994
|
}
|
|
16010
15995
|
function r(a, n, o, u, p) {
|
|
16011
15996
|
if (a != null && a.validate && !(a.optional && u == null) && (a.validate(n, o, u), p)) {
|
|
16012
|
-
var
|
|
15997
|
+
var y;
|
|
16013
15998
|
const E = u.type;
|
|
16014
15999
|
if (E == null) return;
|
|
16015
|
-
(
|
|
16000
|
+
(y = t.NODE_PARENT_VALIDATIONS[E]) == null || y.call(t.NODE_PARENT_VALIDATIONS, n, o, u);
|
|
16016
16001
|
}
|
|
16017
16002
|
}
|
|
16018
16003
|
function s(a, n, o, u) {
|
|
@@ -18554,9 +18539,9 @@ function l0() {
|
|
|
18554
18539
|
/[^ \t]/.exec(a[u]) && (n = u);
|
|
18555
18540
|
let o = "";
|
|
18556
18541
|
for (let u = 0; u < a.length; u++) {
|
|
18557
|
-
const p = a[u],
|
|
18558
|
-
let
|
|
18559
|
-
|
|
18542
|
+
const p = a[u], y = u === 0, E = u === a.length - 1, P = u === n;
|
|
18543
|
+
let g = p.replace(/\t/g, " ");
|
|
18544
|
+
y || (g = g.replace(/^ +/, "")), E || (g = g.replace(/ +$/, "")), g && (P || (g += " "), o += g);
|
|
18560
18545
|
}
|
|
18561
18546
|
o && i.push((0, e.inherits)((0, t.stringLiteral)(o), s));
|
|
18562
18547
|
}
|
|
@@ -18604,318 +18589,318 @@ function d0(t) {
|
|
|
18604
18589
|
throw new TypeError(`Not a valid node of type "${r}"`);
|
|
18605
18590
|
}
|
|
18606
18591
|
}
|
|
18607
|
-
var
|
|
18608
|
-
Object.defineProperty(
|
|
18592
|
+
var h = {};
|
|
18593
|
+
Object.defineProperty(h, "__esModule", {
|
|
18609
18594
|
value: !0
|
|
18610
18595
|
});
|
|
18611
|
-
|
|
18612
|
-
|
|
18613
|
-
|
|
18614
|
-
|
|
18615
|
-
|
|
18616
|
-
|
|
18617
|
-
|
|
18618
|
-
|
|
18619
|
-
|
|
18620
|
-
|
|
18621
|
-
|
|
18622
|
-
|
|
18623
|
-
|
|
18624
|
-
|
|
18625
|
-
|
|
18626
|
-
|
|
18627
|
-
|
|
18628
|
-
|
|
18629
|
-
|
|
18630
|
-
|
|
18631
|
-
|
|
18632
|
-
|
|
18633
|
-
|
|
18634
|
-
|
|
18635
|
-
|
|
18636
|
-
|
|
18637
|
-
|
|
18638
|
-
|
|
18639
|
-
|
|
18640
|
-
|
|
18641
|
-
|
|
18642
|
-
|
|
18643
|
-
|
|
18644
|
-
|
|
18645
|
-
|
|
18646
|
-
|
|
18647
|
-
|
|
18648
|
-
|
|
18649
|
-
|
|
18650
|
-
|
|
18651
|
-
|
|
18652
|
-
|
|
18653
|
-
|
|
18654
|
-
|
|
18655
|
-
|
|
18656
|
-
|
|
18657
|
-
|
|
18658
|
-
|
|
18659
|
-
|
|
18660
|
-
|
|
18661
|
-
|
|
18662
|
-
|
|
18663
|
-
|
|
18664
|
-
|
|
18665
|
-
|
|
18666
|
-
|
|
18667
|
-
|
|
18668
|
-
|
|
18669
|
-
|
|
18670
|
-
|
|
18671
|
-
|
|
18672
|
-
|
|
18673
|
-
|
|
18674
|
-
|
|
18675
|
-
|
|
18676
|
-
|
|
18677
|
-
|
|
18678
|
-
|
|
18679
|
-
|
|
18680
|
-
|
|
18681
|
-
|
|
18682
|
-
|
|
18683
|
-
|
|
18684
|
-
|
|
18685
|
-
|
|
18686
|
-
|
|
18687
|
-
|
|
18688
|
-
|
|
18689
|
-
|
|
18690
|
-
|
|
18691
|
-
|
|
18692
|
-
|
|
18693
|
-
|
|
18694
|
-
|
|
18695
|
-
|
|
18696
|
-
|
|
18697
|
-
|
|
18698
|
-
|
|
18699
|
-
|
|
18700
|
-
|
|
18701
|
-
|
|
18702
|
-
|
|
18703
|
-
|
|
18704
|
-
|
|
18705
|
-
|
|
18706
|
-
|
|
18707
|
-
|
|
18708
|
-
|
|
18709
|
-
|
|
18710
|
-
|
|
18711
|
-
|
|
18712
|
-
|
|
18713
|
-
|
|
18714
|
-
|
|
18715
|
-
|
|
18716
|
-
|
|
18717
|
-
|
|
18718
|
-
|
|
18719
|
-
|
|
18720
|
-
|
|
18721
|
-
|
|
18722
|
-
|
|
18723
|
-
|
|
18724
|
-
|
|
18725
|
-
|
|
18726
|
-
|
|
18727
|
-
|
|
18728
|
-
|
|
18729
|
-
|
|
18730
|
-
|
|
18731
|
-
|
|
18732
|
-
|
|
18733
|
-
|
|
18734
|
-
|
|
18735
|
-
|
|
18736
|
-
|
|
18737
|
-
|
|
18738
|
-
|
|
18739
|
-
|
|
18740
|
-
|
|
18741
|
-
|
|
18742
|
-
|
|
18743
|
-
|
|
18744
|
-
|
|
18745
|
-
|
|
18746
|
-
|
|
18747
|
-
|
|
18748
|
-
|
|
18749
|
-
|
|
18750
|
-
|
|
18751
|
-
|
|
18752
|
-
|
|
18753
|
-
|
|
18754
|
-
|
|
18755
|
-
|
|
18756
|
-
|
|
18757
|
-
|
|
18758
|
-
|
|
18759
|
-
|
|
18760
|
-
|
|
18761
|
-
|
|
18762
|
-
|
|
18763
|
-
|
|
18764
|
-
|
|
18765
|
-
|
|
18766
|
-
|
|
18767
|
-
|
|
18768
|
-
|
|
18769
|
-
|
|
18770
|
-
|
|
18771
|
-
|
|
18772
|
-
|
|
18773
|
-
|
|
18774
|
-
|
|
18775
|
-
|
|
18776
|
-
|
|
18777
|
-
|
|
18778
|
-
|
|
18779
|
-
|
|
18780
|
-
|
|
18781
|
-
|
|
18782
|
-
|
|
18783
|
-
|
|
18784
|
-
|
|
18785
|
-
|
|
18786
|
-
|
|
18787
|
-
|
|
18788
|
-
|
|
18789
|
-
|
|
18790
|
-
|
|
18791
|
-
|
|
18792
|
-
|
|
18793
|
-
|
|
18794
|
-
|
|
18795
|
-
|
|
18796
|
-
|
|
18797
|
-
|
|
18798
|
-
|
|
18799
|
-
|
|
18800
|
-
|
|
18801
|
-
|
|
18802
|
-
|
|
18803
|
-
|
|
18804
|
-
|
|
18805
|
-
|
|
18806
|
-
|
|
18807
|
-
|
|
18808
|
-
|
|
18809
|
-
|
|
18810
|
-
|
|
18811
|
-
|
|
18812
|
-
|
|
18813
|
-
|
|
18814
|
-
|
|
18815
|
-
|
|
18816
|
-
|
|
18817
|
-
|
|
18818
|
-
|
|
18819
|
-
|
|
18820
|
-
|
|
18821
|
-
|
|
18822
|
-
|
|
18823
|
-
|
|
18824
|
-
|
|
18825
|
-
|
|
18826
|
-
|
|
18827
|
-
|
|
18828
|
-
|
|
18829
|
-
|
|
18830
|
-
|
|
18831
|
-
|
|
18832
|
-
|
|
18833
|
-
|
|
18834
|
-
|
|
18835
|
-
|
|
18836
|
-
|
|
18837
|
-
|
|
18838
|
-
|
|
18839
|
-
|
|
18840
|
-
|
|
18841
|
-
|
|
18842
|
-
|
|
18843
|
-
|
|
18844
|
-
|
|
18845
|
-
|
|
18846
|
-
|
|
18847
|
-
|
|
18848
|
-
|
|
18849
|
-
|
|
18850
|
-
|
|
18851
|
-
|
|
18852
|
-
|
|
18853
|
-
|
|
18854
|
-
|
|
18855
|
-
|
|
18856
|
-
|
|
18857
|
-
|
|
18858
|
-
|
|
18859
|
-
|
|
18860
|
-
|
|
18861
|
-
|
|
18862
|
-
|
|
18863
|
-
|
|
18864
|
-
|
|
18865
|
-
|
|
18866
|
-
|
|
18867
|
-
|
|
18868
|
-
|
|
18869
|
-
|
|
18870
|
-
|
|
18871
|
-
|
|
18872
|
-
|
|
18873
|
-
|
|
18874
|
-
|
|
18875
|
-
|
|
18876
|
-
|
|
18877
|
-
|
|
18878
|
-
|
|
18879
|
-
|
|
18880
|
-
|
|
18881
|
-
|
|
18882
|
-
|
|
18883
|
-
|
|
18884
|
-
|
|
18885
|
-
|
|
18886
|
-
|
|
18887
|
-
|
|
18888
|
-
|
|
18889
|
-
|
|
18890
|
-
|
|
18891
|
-
|
|
18892
|
-
|
|
18893
|
-
|
|
18894
|
-
|
|
18895
|
-
|
|
18896
|
-
|
|
18897
|
-
|
|
18898
|
-
|
|
18899
|
-
|
|
18900
|
-
|
|
18901
|
-
|
|
18902
|
-
|
|
18903
|
-
|
|
18904
|
-
|
|
18905
|
-
|
|
18906
|
-
|
|
18907
|
-
|
|
18908
|
-
|
|
18909
|
-
|
|
18910
|
-
|
|
18911
|
-
|
|
18912
|
-
|
|
18913
|
-
|
|
18914
|
-
|
|
18915
|
-
|
|
18916
|
-
|
|
18917
|
-
|
|
18918
|
-
|
|
18596
|
+
h.assertAccessor = kg;
|
|
18597
|
+
h.assertAnyTypeAnnotation = zx;
|
|
18598
|
+
h.assertArgumentPlaceholder = IE;
|
|
18599
|
+
h.assertArrayExpression = y0;
|
|
18600
|
+
h.assertArrayPattern = dx;
|
|
18601
|
+
h.assertArrayTypeAnnotation = Gx;
|
|
18602
|
+
h.assertArrowFunctionExpression = hx;
|
|
18603
|
+
h.assertAssignmentExpression = m0;
|
|
18604
|
+
h.assertAssignmentPattern = fx;
|
|
18605
|
+
h.assertAwaitExpression = Fx;
|
|
18606
|
+
h.assertBigIntLiteral = jx;
|
|
18607
|
+
h.assertBinary = eg;
|
|
18608
|
+
h.assertBinaryExpression = T0;
|
|
18609
|
+
h.assertBindExpression = vE;
|
|
18610
|
+
h.assertBlock = sg;
|
|
18611
|
+
h.assertBlockParent = rg;
|
|
18612
|
+
h.assertBlockStatement = E0;
|
|
18613
|
+
h.assertBooleanLiteral = V0;
|
|
18614
|
+
h.assertBooleanLiteralTypeAnnotation = Zx;
|
|
18615
|
+
h.assertBooleanTypeAnnotation = Qx;
|
|
18616
|
+
h.assertBreakStatement = P0;
|
|
18617
|
+
h.assertCallExpression = g0;
|
|
18618
|
+
h.assertCatchClause = A0;
|
|
18619
|
+
h.assertClass = wg;
|
|
18620
|
+
h.assertClassAccessorProperty = Yx;
|
|
18621
|
+
h.assertClassBody = yx;
|
|
18622
|
+
h.assertClassDeclaration = Tx;
|
|
18623
|
+
h.assertClassExpression = mx;
|
|
18624
|
+
h.assertClassImplements = tb;
|
|
18625
|
+
h.assertClassMethod = wx;
|
|
18626
|
+
h.assertClassPrivateMethod = Jx;
|
|
18627
|
+
h.assertClassPrivateProperty = Xx;
|
|
18628
|
+
h.assertClassProperty = $x;
|
|
18629
|
+
h.assertCompletionStatement = ng;
|
|
18630
|
+
h.assertConditional = og;
|
|
18631
|
+
h.assertConditionalExpression = I0;
|
|
18632
|
+
h.assertContinueStatement = v0;
|
|
18633
|
+
h.assertDebuggerStatement = N0;
|
|
18634
|
+
h.assertDecimalLiteral = LE;
|
|
18635
|
+
h.assertDeclaration = mg;
|
|
18636
|
+
h.assertDeclareClass = rb;
|
|
18637
|
+
h.assertDeclareExportAllDeclaration = pb;
|
|
18638
|
+
h.assertDeclareExportDeclaration = cb;
|
|
18639
|
+
h.assertDeclareFunction = sb;
|
|
18640
|
+
h.assertDeclareInterface = ib;
|
|
18641
|
+
h.assertDeclareModule = ab;
|
|
18642
|
+
h.assertDeclareModuleExports = nb;
|
|
18643
|
+
h.assertDeclareOpaqueType = lb;
|
|
18644
|
+
h.assertDeclareTypeAlias = ob;
|
|
18645
|
+
h.assertDeclareVariable = ub;
|
|
18646
|
+
h.assertDeclaredPredicate = fb;
|
|
18647
|
+
h.assertDecorator = NE;
|
|
18648
|
+
h.assertDirective = x0;
|
|
18649
|
+
h.assertDirectiveLiteral = b0;
|
|
18650
|
+
h.assertDoExpression = CE;
|
|
18651
|
+
h.assertDoWhileStatement = C0;
|
|
18652
|
+
h.assertEmptyStatement = w0;
|
|
18653
|
+
h.assertEmptyTypeAnnotation = gb;
|
|
18654
|
+
h.assertEnumBody = Kg;
|
|
18655
|
+
h.assertEnumBooleanBody = Gb;
|
|
18656
|
+
h.assertEnumBooleanMember = tE;
|
|
18657
|
+
h.assertEnumDeclaration = zb;
|
|
18658
|
+
h.assertEnumDefaultedMember = iE;
|
|
18659
|
+
h.assertEnumMember = Ug;
|
|
18660
|
+
h.assertEnumNumberBody = Qb;
|
|
18661
|
+
h.assertEnumNumberMember = rE;
|
|
18662
|
+
h.assertEnumStringBody = Zb;
|
|
18663
|
+
h.assertEnumStringMember = sE;
|
|
18664
|
+
h.assertEnumSymbolBody = eE;
|
|
18665
|
+
h.assertExistsTypeAnnotation = db;
|
|
18666
|
+
h.assertExportAllDeclaration = Sx;
|
|
18667
|
+
h.assertExportDeclaration = Dg;
|
|
18668
|
+
h.assertExportDefaultDeclaration = xx;
|
|
18669
|
+
h.assertExportDefaultSpecifier = wE;
|
|
18670
|
+
h.assertExportNamedDeclaration = bx;
|
|
18671
|
+
h.assertExportNamespaceSpecifier = Kx;
|
|
18672
|
+
h.assertExportSpecifier = Ex;
|
|
18673
|
+
h.assertExpression = ZP;
|
|
18674
|
+
h.assertExpressionStatement = O0;
|
|
18675
|
+
h.assertExpressionWrapper = cg;
|
|
18676
|
+
h.assertFile = D0;
|
|
18677
|
+
h.assertFlow = _g;
|
|
18678
|
+
h.assertFlowBaseAnnotation = Fg;
|
|
18679
|
+
h.assertFlowDeclaration = Rg;
|
|
18680
|
+
h.assertFlowPredicate = jg;
|
|
18681
|
+
h.assertFlowType = Bg;
|
|
18682
|
+
h.assertFor = pg;
|
|
18683
|
+
h.assertForInStatement = L0;
|
|
18684
|
+
h.assertForOfStatement = Px;
|
|
18685
|
+
h.assertForStatement = k0;
|
|
18686
|
+
h.assertForXStatement = fg;
|
|
18687
|
+
h.assertFunction = dg;
|
|
18688
|
+
h.assertFunctionDeclaration = M0;
|
|
18689
|
+
h.assertFunctionExpression = _0;
|
|
18690
|
+
h.assertFunctionParameter = Tg;
|
|
18691
|
+
h.assertFunctionParent = hg;
|
|
18692
|
+
h.assertFunctionTypeAnnotation = hb;
|
|
18693
|
+
h.assertFunctionTypeParam = yb;
|
|
18694
|
+
h.assertGenericTypeAnnotation = mb;
|
|
18695
|
+
h.assertIdentifier = B0;
|
|
18696
|
+
h.assertIfStatement = F0;
|
|
18697
|
+
h.assertImmutable = Pg;
|
|
18698
|
+
h.assertImport = Rx;
|
|
18699
|
+
h.assertImportAttribute = Hx;
|
|
18700
|
+
h.assertImportDeclaration = gx;
|
|
18701
|
+
h.assertImportDefaultSpecifier = Ax;
|
|
18702
|
+
h.assertImportExpression = Nx;
|
|
18703
|
+
h.assertImportNamespaceSpecifier = Ix;
|
|
18704
|
+
h.assertImportOrExportDeclaration = Og;
|
|
18705
|
+
h.assertImportSpecifier = vx;
|
|
18706
|
+
h.assertIndexedAccessType = aE;
|
|
18707
|
+
h.assertInferredPredicate = Tb;
|
|
18708
|
+
h.assertInterfaceDeclaration = xb;
|
|
18709
|
+
h.assertInterfaceExtends = Sb;
|
|
18710
|
+
h.assertInterfaceTypeAnnotation = bb;
|
|
18711
|
+
h.assertInterpreterDirective = S0;
|
|
18712
|
+
h.assertIntersectionTypeAnnotation = Eb;
|
|
18713
|
+
h.assertJSX = Vg;
|
|
18714
|
+
h.assertJSXAttribute = oE;
|
|
18715
|
+
h.assertJSXClosingElement = lE;
|
|
18716
|
+
h.assertJSXClosingFragment = EE;
|
|
18717
|
+
h.assertJSXElement = uE;
|
|
18718
|
+
h.assertJSXEmptyExpression = cE;
|
|
18719
|
+
h.assertJSXExpressionContainer = pE;
|
|
18720
|
+
h.assertJSXFragment = xE;
|
|
18721
|
+
h.assertJSXIdentifier = dE;
|
|
18722
|
+
h.assertJSXMemberExpression = hE;
|
|
18723
|
+
h.assertJSXNamespacedName = yE;
|
|
18724
|
+
h.assertJSXOpeningElement = mE;
|
|
18725
|
+
h.assertJSXOpeningFragment = bE;
|
|
18726
|
+
h.assertJSXSpreadAttribute = TE;
|
|
18727
|
+
h.assertJSXSpreadChild = fE;
|
|
18728
|
+
h.assertJSXText = SE;
|
|
18729
|
+
h.assertLVal = xg;
|
|
18730
|
+
h.assertLabeledStatement = R0;
|
|
18731
|
+
h.assertLiteral = Eg;
|
|
18732
|
+
h.assertLogicalExpression = Y0;
|
|
18733
|
+
h.assertLoop = lg;
|
|
18734
|
+
h.assertMemberExpression = X0;
|
|
18735
|
+
h.assertMetaProperty = Cx;
|
|
18736
|
+
h.assertMethod = Ag;
|
|
18737
|
+
h.assertMiscellaneous = $g;
|
|
18738
|
+
h.assertMixedTypeAnnotation = Pb;
|
|
18739
|
+
h.assertModuleDeclaration = Qg;
|
|
18740
|
+
h.assertModuleExpression = kE;
|
|
18741
|
+
h.assertModuleSpecifier = Lg;
|
|
18742
|
+
h.assertNewExpression = J0;
|
|
18743
|
+
h.assertNoop = PE;
|
|
18744
|
+
h.assertNullLiteral = U0;
|
|
18745
|
+
h.assertNullLiteralTypeAnnotation = eb;
|
|
18746
|
+
h.assertNullableTypeAnnotation = Ab;
|
|
18747
|
+
h.assertNumberLiteral = Wg;
|
|
18748
|
+
h.assertNumberLiteralTypeAnnotation = Ib;
|
|
18749
|
+
h.assertNumberTypeAnnotation = vb;
|
|
18750
|
+
h.assertNumericLiteral = K0;
|
|
18751
|
+
h.assertObjectExpression = W0;
|
|
18752
|
+
h.assertObjectMember = Ig;
|
|
18753
|
+
h.assertObjectMethod = H0;
|
|
18754
|
+
h.assertObjectPattern = Ox;
|
|
18755
|
+
h.assertObjectProperty = z0;
|
|
18756
|
+
h.assertObjectTypeAnnotation = Nb;
|
|
18757
|
+
h.assertObjectTypeCallProperty = wb;
|
|
18758
|
+
h.assertObjectTypeIndexer = Ob;
|
|
18759
|
+
h.assertObjectTypeInternalSlot = Cb;
|
|
18760
|
+
h.assertObjectTypeProperty = Db;
|
|
18761
|
+
h.assertObjectTypeSpreadProperty = Lb;
|
|
18762
|
+
h.assertOpaqueType = kb;
|
|
18763
|
+
h.assertOptionalCallExpression = Vx;
|
|
18764
|
+
h.assertOptionalIndexedAccessType = nE;
|
|
18765
|
+
h.assertOptionalMemberExpression = Ux;
|
|
18766
|
+
h.assertParenthesizedExpression = ex;
|
|
18767
|
+
h.assertPattern = Cg;
|
|
18768
|
+
h.assertPatternLike = Sg;
|
|
18769
|
+
h.assertPipelineBareFunction = BE;
|
|
18770
|
+
h.assertPipelinePrimaryTopicReference = FE;
|
|
18771
|
+
h.assertPipelineTopicExpression = _E;
|
|
18772
|
+
h.assertPlaceholder = gE;
|
|
18773
|
+
h.assertPrivate = Mg;
|
|
18774
|
+
h.assertPrivateName = qx;
|
|
18775
|
+
h.assertProgram = q0;
|
|
18776
|
+
h.assertProperty = vg;
|
|
18777
|
+
h.assertPureish = yg;
|
|
18778
|
+
h.assertQualifiedTypeIdentifier = Mb;
|
|
18779
|
+
h.assertRecordExpression = OE;
|
|
18780
|
+
h.assertRegExpLiteral = $0;
|
|
18781
|
+
h.assertRegexLiteral = Hg;
|
|
18782
|
+
h.assertRestElement = G0;
|
|
18783
|
+
h.assertRestProperty = zg;
|
|
18784
|
+
h.assertReturnStatement = Q0;
|
|
18785
|
+
h.assertScopable = tg;
|
|
18786
|
+
h.assertSequenceExpression = Z0;
|
|
18787
|
+
h.assertSpreadElement = Dx;
|
|
18788
|
+
h.assertSpreadProperty = Gg;
|
|
18789
|
+
h.assertStandardized = QP;
|
|
18790
|
+
h.assertStatement = ig;
|
|
18791
|
+
h.assertStaticBlock = Wx;
|
|
18792
|
+
h.assertStringLiteral = j0;
|
|
18793
|
+
h.assertStringLiteralTypeAnnotation = _b;
|
|
18794
|
+
h.assertStringTypeAnnotation = Bb;
|
|
18795
|
+
h.assertSuper = Lx;
|
|
18796
|
+
h.assertSwitchCase = tx;
|
|
18797
|
+
h.assertSwitchStatement = rx;
|
|
18798
|
+
h.assertSymbolTypeAnnotation = Fb;
|
|
18799
|
+
h.assertTSAnyKeyword = WE;
|
|
18800
|
+
h.assertTSArrayType = hP;
|
|
18801
|
+
h.assertTSAsExpression = MP;
|
|
18802
|
+
h.assertTSBaseType = qg;
|
|
18803
|
+
h.assertTSBigIntKeyword = zE;
|
|
18804
|
+
h.assertTSBooleanKeyword = HE;
|
|
18805
|
+
h.assertTSCallSignatureDeclaration = $E;
|
|
18806
|
+
h.assertTSConditionalType = EP;
|
|
18807
|
+
h.assertTSConstructSignatureDeclaration = YE;
|
|
18808
|
+
h.assertTSConstructorType = uP;
|
|
18809
|
+
h.assertTSDeclareFunction = KE;
|
|
18810
|
+
h.assertTSDeclareMethod = UE;
|
|
18811
|
+
h.assertTSEntityName = bg;
|
|
18812
|
+
h.assertTSEnumBody = FP;
|
|
18813
|
+
h.assertTSEnumDeclaration = RP;
|
|
18814
|
+
h.assertTSEnumMember = jP;
|
|
18815
|
+
h.assertTSExportAssignment = JP;
|
|
18816
|
+
h.assertTSExpressionWithTypeArguments = wP;
|
|
18817
|
+
h.assertTSExternalModuleReference = YP;
|
|
18818
|
+
h.assertTSFunctionType = lP;
|
|
18819
|
+
h.assertTSImportEqualsDeclaration = $P;
|
|
18820
|
+
h.assertTSImportType = VP;
|
|
18821
|
+
h.assertTSIndexSignature = qE;
|
|
18822
|
+
h.assertTSIndexedAccessType = IP;
|
|
18823
|
+
h.assertTSInferType = PP;
|
|
18824
|
+
h.assertTSInstantiationExpression = kP;
|
|
18825
|
+
h.assertTSInterfaceBody = DP;
|
|
18826
|
+
h.assertTSInterfaceDeclaration = OP;
|
|
18827
|
+
h.assertTSIntersectionType = bP;
|
|
18828
|
+
h.assertTSIntrinsicKeyword = GE;
|
|
18829
|
+
h.assertTSLiteralType = CP;
|
|
18830
|
+
h.assertTSMappedType = vP;
|
|
18831
|
+
h.assertTSMethodSignature = JE;
|
|
18832
|
+
h.assertTSModuleBlock = UP;
|
|
18833
|
+
h.assertTSModuleDeclaration = KP;
|
|
18834
|
+
h.assertTSNamedTupleMember = SP;
|
|
18835
|
+
h.assertTSNamespaceExportDeclaration = qP;
|
|
18836
|
+
h.assertTSNeverKeyword = QE;
|
|
18837
|
+
h.assertTSNonNullExpression = XP;
|
|
18838
|
+
h.assertTSNullKeyword = ZE;
|
|
18839
|
+
h.assertTSNumberKeyword = eP;
|
|
18840
|
+
h.assertTSObjectKeyword = tP;
|
|
18841
|
+
h.assertTSOptionalType = mP;
|
|
18842
|
+
h.assertTSParameterProperty = jE;
|
|
18843
|
+
h.assertTSParenthesizedType = gP;
|
|
18844
|
+
h.assertTSPropertySignature = XE;
|
|
18845
|
+
h.assertTSQualifiedName = VE;
|
|
18846
|
+
h.assertTSRestType = TP;
|
|
18847
|
+
h.assertTSSatisfiesExpression = _P;
|
|
18848
|
+
h.assertTSStringKeyword = rP;
|
|
18849
|
+
h.assertTSSymbolKeyword = sP;
|
|
18850
|
+
h.assertTSTemplateLiteralType = NP;
|
|
18851
|
+
h.assertTSThisType = oP;
|
|
18852
|
+
h.assertTSTupleType = yP;
|
|
18853
|
+
h.assertTSType = Jg;
|
|
18854
|
+
h.assertTSTypeAliasDeclaration = LP;
|
|
18855
|
+
h.assertTSTypeAnnotation = WP;
|
|
18856
|
+
h.assertTSTypeAssertion = BP;
|
|
18857
|
+
h.assertTSTypeElement = Xg;
|
|
18858
|
+
h.assertTSTypeLiteral = dP;
|
|
18859
|
+
h.assertTSTypeOperator = AP;
|
|
18860
|
+
h.assertTSTypeParameter = GP;
|
|
18861
|
+
h.assertTSTypeParameterDeclaration = zP;
|
|
18862
|
+
h.assertTSTypeParameterInstantiation = HP;
|
|
18863
|
+
h.assertTSTypePredicate = pP;
|
|
18864
|
+
h.assertTSTypeQuery = fP;
|
|
18865
|
+
h.assertTSTypeReference = cP;
|
|
18866
|
+
h.assertTSUndefinedKeyword = iP;
|
|
18867
|
+
h.assertTSUnionType = xP;
|
|
18868
|
+
h.assertTSUnknownKeyword = aP;
|
|
18869
|
+
h.assertTSVoidKeyword = nP;
|
|
18870
|
+
h.assertTaggedTemplateExpression = kx;
|
|
18871
|
+
h.assertTemplateElement = Mx;
|
|
18872
|
+
h.assertTemplateLiteral = _x;
|
|
18873
|
+
h.assertTerminatorless = ag;
|
|
18874
|
+
h.assertThisExpression = sx;
|
|
18875
|
+
h.assertThisTypeAnnotation = Rb;
|
|
18876
|
+
h.assertThrowStatement = ix;
|
|
18877
|
+
h.assertTopicReference = ME;
|
|
18878
|
+
h.assertTryStatement = ax;
|
|
18879
|
+
h.assertTupleExpression = DE;
|
|
18880
|
+
h.assertTupleTypeAnnotation = jb;
|
|
18881
|
+
h.assertTypeAlias = Ub;
|
|
18882
|
+
h.assertTypeAnnotation = Vb;
|
|
18883
|
+
h.assertTypeCastExpression = $b;
|
|
18884
|
+
h.assertTypeParameter = Yb;
|
|
18885
|
+
h.assertTypeParameterDeclaration = Xb;
|
|
18886
|
+
h.assertTypeParameterInstantiation = Jb;
|
|
18887
|
+
h.assertTypeScript = Yg;
|
|
18888
|
+
h.assertTypeofTypeAnnotation = Kb;
|
|
18889
|
+
h.assertUnaryExpression = nx;
|
|
18890
|
+
h.assertUnaryLike = Ng;
|
|
18891
|
+
h.assertUnionTypeAnnotation = qb;
|
|
18892
|
+
h.assertUpdateExpression = ox;
|
|
18893
|
+
h.assertUserWhitespacable = gg;
|
|
18894
|
+
h.assertV8IntrinsicIdentifier = AE;
|
|
18895
|
+
h.assertVariableDeclaration = lx;
|
|
18896
|
+
h.assertVariableDeclarator = ux;
|
|
18897
|
+
h.assertVariance = Wb;
|
|
18898
|
+
h.assertVoidPattern = RE;
|
|
18899
|
+
h.assertVoidTypeAnnotation = Hb;
|
|
18900
|
+
h.assertWhile = ug;
|
|
18901
|
+
h.assertWhileStatement = cx;
|
|
18902
|
+
h.assertWithStatement = px;
|
|
18903
|
+
h.assertYieldExpression = Bx;
|
|
18919
18904
|
var h0 = ut(), dt = Ye;
|
|
18920
18905
|
function m(t, e, r) {
|
|
18921
18906
|
if (!(0, h0.default)(t, e, r))
|
|
@@ -19951,13 +19936,13 @@ function ga(t) {
|
|
|
19951
19936
|
}
|
|
19952
19937
|
const u = "typeParameters";
|
|
19953
19938
|
if ((0, Ue.isTSTypeReference)(o) && o[u]) {
|
|
19954
|
-
const p = o[u],
|
|
19955
|
-
if (r.has(
|
|
19956
|
-
let E = r.get(
|
|
19957
|
-
const
|
|
19958
|
-
|
|
19939
|
+
const p = o[u], y = Pa(o.typeName);
|
|
19940
|
+
if (r.has(y)) {
|
|
19941
|
+
let E = r.get(y);
|
|
19942
|
+
const P = E[u];
|
|
19943
|
+
P ? (P.params.push(...p.params), P.params = ga(P.params)) : E = p;
|
|
19959
19944
|
} else
|
|
19960
|
-
r.set(
|
|
19945
|
+
r.set(y, o);
|
|
19961
19946
|
continue;
|
|
19962
19947
|
}
|
|
19963
19948
|
a.push(o);
|
|
@@ -20531,8 +20516,8 @@ function xs(t, e, r, s) {
|
|
|
20531
20516
|
const o = xs.keys[n.type];
|
|
20532
20517
|
if (o)
|
|
20533
20518
|
for (let u = 0; u < o.length; u++) {
|
|
20534
|
-
const p = o[u],
|
|
20535
|
-
|
|
20519
|
+
const p = o[u], y = n[p];
|
|
20520
|
+
y && (Array.isArray(y) ? i.push(...y) : i.push(y));
|
|
20536
20521
|
}
|
|
20537
20522
|
}
|
|
20538
20523
|
return a;
|
|
@@ -20997,7 +20982,7 @@ function ks() {
|
|
|
20997
20982
|
}), Object.defineProperty(t, "addComments", {
|
|
20998
20983
|
enumerable: !0,
|
|
20999
20984
|
get: function() {
|
|
21000
|
-
return
|
|
20985
|
+
return N.default;
|
|
21001
20986
|
}
|
|
21002
20987
|
}), Object.defineProperty(t, "appendToMemberExpression", {
|
|
21003
20988
|
enumerable: !0,
|
|
@@ -21017,12 +21002,12 @@ function ks() {
|
|
|
21017
21002
|
}), Object.defineProperty(t, "clone", {
|
|
21018
21003
|
enumerable: !0,
|
|
21019
21004
|
get: function() {
|
|
21020
|
-
return
|
|
21005
|
+
return g.default;
|
|
21021
21006
|
}
|
|
21022
21007
|
}), Object.defineProperty(t, "cloneDeep", {
|
|
21023
21008
|
enumerable: !0,
|
|
21024
21009
|
get: function() {
|
|
21025
|
-
return
|
|
21010
|
+
return C.default;
|
|
21026
21011
|
}
|
|
21027
21012
|
}), Object.defineProperty(t, "cloneDeepWithoutLoc", {
|
|
21028
21013
|
enumerable: !0,
|
|
@@ -21032,7 +21017,7 @@ function ks() {
|
|
|
21032
21017
|
}), Object.defineProperty(t, "cloneNode", {
|
|
21033
21018
|
enumerable: !0,
|
|
21034
21019
|
get: function() {
|
|
21035
|
-
return
|
|
21020
|
+
return P.default;
|
|
21036
21021
|
}
|
|
21037
21022
|
}), Object.defineProperty(t, "cloneWithoutLoc", {
|
|
21038
21023
|
enumerable: !0,
|
|
@@ -21275,7 +21260,7 @@ function ks() {
|
|
|
21275
21260
|
return J.default;
|
|
21276
21261
|
}
|
|
21277
21262
|
});
|
|
21278
|
-
var r = Vt, s = Gr, i = u0(), a = rs, n =
|
|
21263
|
+
var r = Vt, s = Gr, i = u0(), a = rs, n = h;
|
|
21279
21264
|
Object.keys(n).forEach(function(D) {
|
|
21280
21265
|
D === "default" || D === "__esModule" || Object.prototype.hasOwnProperty.call(e, D) || D in t && t[D] === n[D] || Object.defineProperty(t, D, {
|
|
21281
21266
|
enumerable: !0,
|
|
@@ -21284,12 +21269,12 @@ function ks() {
|
|
|
21284
21269
|
}
|
|
21285
21270
|
});
|
|
21286
21271
|
});
|
|
21287
|
-
var o = zt, u = ss, p = is,
|
|
21288
|
-
Object.keys(
|
|
21289
|
-
D === "default" || D === "__esModule" || Object.prototype.hasOwnProperty.call(e, D) || D in t && t[D] ===
|
|
21272
|
+
var o = zt, u = ss, p = is, y = Qt;
|
|
21273
|
+
Object.keys(y).forEach(function(D) {
|
|
21274
|
+
D === "default" || D === "__esModule" || Object.prototype.hasOwnProperty.call(e, D) || D in t && t[D] === y[D] || Object.defineProperty(t, D, {
|
|
21290
21275
|
enumerable: !0,
|
|
21291
21276
|
get: function() {
|
|
21292
|
-
return
|
|
21277
|
+
return y[D];
|
|
21293
21278
|
}
|
|
21294
21279
|
});
|
|
21295
21280
|
});
|
|
@@ -21302,7 +21287,7 @@ function ks() {
|
|
|
21302
21287
|
}
|
|
21303
21288
|
});
|
|
21304
21289
|
});
|
|
21305
|
-
var
|
|
21290
|
+
var P = Ee, g = ns, C = os, A = ls, O = us, I = cs, N = Zt, B = er, K = tr, re = rr, Re = sr, Pe = ps, ne = v;
|
|
21306
21291
|
Object.keys(ne).forEach(function(D) {
|
|
21307
21292
|
D === "default" || D === "__esModule" || Object.prototype.hasOwnProperty.call(e, D) || D in t && t[D] === ne[D] || Object.defineProperty(t, D, {
|
|
21308
21293
|
enumerable: !0,
|
|
@@ -21408,12 +21393,12 @@ const Y1 = (t, e) => {
|
|
|
21408
21393
|
const n = a.init.arguments[0];
|
|
21409
21394
|
if (n.type !== "ArrowFunctionExpression" || n.body.type !== "BlockStatement")
|
|
21410
21395
|
return;
|
|
21411
|
-
const o = n.body, u = n.params[1], p = q1(u, e),
|
|
21396
|
+
const o = n.body, u = n.params[1], p = q1(u, e), y = o.body.length > 0 ? o.body[0].start ?? o.start ?? 0 : o.start ?? 0, E = a.id && a.id.type === "Identifier" ? a.id.name : null, P = i.end ?? o.end ?? y;
|
|
21412
21397
|
r.push({
|
|
21413
|
-
insertPos:
|
|
21398
|
+
insertPos: y,
|
|
21414
21399
|
propsExpression: p,
|
|
21415
21400
|
componentName: E,
|
|
21416
|
-
declarationEnd:
|
|
21401
|
+
declarationEnd: P
|
|
21417
21402
|
});
|
|
21418
21403
|
};
|
|
21419
21404
|
for (const i of t.program.body) {
|
|
@@ -21440,18 +21425,18 @@ const Y1 = (t, e) => {
|
|
|
21440
21425
|
)
|
|
21441
21426
|
), p = new jt(t.code);
|
|
21442
21427
|
Ca(p, e.ast, t.code);
|
|
21443
|
-
const
|
|
21428
|
+
const y = _i(
|
|
21444
21429
|
s,
|
|
21445
21430
|
u
|
|
21446
21431
|
).trimStart();
|
|
21447
21432
|
n && p.appendLeft(a, n);
|
|
21448
|
-
const E = r.index > 0 ? t.code[r.index - 1] : void 0,
|
|
21449
|
-
`,
|
|
21433
|
+
const E = r.index > 0 ? t.code[r.index - 1] : void 0, P = r.index > 0 && E !== `
|
|
21434
|
+
`, C = (t.code[r.index + r[0].length] ?? null) === `
|
|
21450
21435
|
` ? `
|
|
21451
21436
|
` : `
|
|
21452
21437
|
|
|
21453
|
-
`, A = `${
|
|
21454
|
-
` : ""}${
|
|
21438
|
+
`, A = `${P ? `
|
|
21439
|
+
` : ""}${y}${C}`;
|
|
21455
21440
|
return p.overwrite(r.index, r.index + r[0].length, A), ra(p, o, t.code, a), {
|
|
21456
21441
|
transformed: !0,
|
|
21457
21442
|
code: p.toString(),
|
|
@@ -21472,20 +21457,20 @@ const Y1 = (t, e) => {
|
|
|
21472
21457
|
new Set(
|
|
21473
21458
|
u.map((A) => A.componentName).filter((A) => !!A)
|
|
21474
21459
|
)
|
|
21475
|
-
),
|
|
21476
|
-
Ca(
|
|
21460
|
+
), y = new jt(t.code);
|
|
21461
|
+
Ca(y, o, t.code);
|
|
21477
21462
|
const E = _i(
|
|
21478
21463
|
r,
|
|
21479
21464
|
p
|
|
21480
|
-
).trimStart(),
|
|
21465
|
+
).trimStart(), P = a > 0 ? t.code[a - 1] : void 0, C = `${a > 0 && P !== `
|
|
21481
21466
|
` ? `
|
|
21482
21467
|
` : ""}${E}
|
|
21483
21468
|
|
|
21484
21469
|
`;
|
|
21485
|
-
return !n && !
|
|
21470
|
+
return !n && !C.trim().length ? { transformed: !1, code: t.code, map: null } : (n ? a === i ? y.appendLeft(i, `${n}${C}`) : (y.appendLeft(i, n), y.appendLeft(a, C)) : y.appendLeft(a, C), ra(y, u, t.code, i), {
|
|
21486
21471
|
transformed: !0,
|
|
21487
|
-
code:
|
|
21488
|
-
map:
|
|
21472
|
+
code: y.toString(),
|
|
21473
|
+
map: y.generateMap({ hires: !0 })
|
|
21489
21474
|
});
|
|
21490
21475
|
}, sI = (t) => {
|
|
21491
21476
|
const e = W1(t);
|