@dpuse/dpuse-development 0.3.487 → 0.3.491
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dpuse-development.es.js +740 -749
- package/dist/dpuse-development.es.js.map +1 -1
- package/package.json +14 -14
|
@@ -36,7 +36,7 @@ function m(e, t, n) {
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
//#endregion
|
|
39
|
-
//#region node_modules/@dpuse/dpuse-shared/dist/
|
|
39
|
+
//#region node_modules/@dpuse/dpuse-shared/dist/locale-CrC0-wPd.js
|
|
40
40
|
var h;
|
|
41
41
|
/* @__NO_SIDE_EFFECTS__ */
|
|
42
42
|
function g(e) {
|
|
@@ -276,11 +276,11 @@ function C(e, t) {
|
|
|
276
276
|
};
|
|
277
277
|
}
|
|
278
278
|
/* @__NO_SIDE_EFFECTS__ */
|
|
279
|
-
function
|
|
279
|
+
function fe(e, t) {
|
|
280
280
|
return {
|
|
281
281
|
kind: "schema",
|
|
282
282
|
type: "optional",
|
|
283
|
-
reference:
|
|
283
|
+
reference: fe,
|
|
284
284
|
expects: `(${e.expects} | undefined)`,
|
|
285
285
|
async: !1,
|
|
286
286
|
wrapped: e,
|
|
@@ -294,11 +294,11 @@ function w(e, t) {
|
|
|
294
294
|
};
|
|
295
295
|
}
|
|
296
296
|
/* @__NO_SIDE_EFFECTS__ */
|
|
297
|
-
function
|
|
297
|
+
function pe(e, t, n) {
|
|
298
298
|
return {
|
|
299
299
|
kind: "schema",
|
|
300
300
|
type: "record",
|
|
301
|
-
reference:
|
|
301
|
+
reference: pe,
|
|
302
302
|
expects: "Object",
|
|
303
303
|
async: !1,
|
|
304
304
|
key: e,
|
|
@@ -350,11 +350,11 @@ function fe(e, t, n) {
|
|
|
350
350
|
};
|
|
351
351
|
}
|
|
352
352
|
/* @__NO_SIDE_EFFECTS__ */
|
|
353
|
-
function
|
|
353
|
+
function w(e) {
|
|
354
354
|
return {
|
|
355
355
|
kind: "schema",
|
|
356
356
|
type: "string",
|
|
357
|
-
reference:
|
|
357
|
+
reference: w,
|
|
358
358
|
expects: "string",
|
|
359
359
|
async: !1,
|
|
360
360
|
message: e,
|
|
@@ -367,17 +367,17 @@ function T(e) {
|
|
|
367
367
|
};
|
|
368
368
|
}
|
|
369
369
|
/* @__NO_SIDE_EFFECTS__ */
|
|
370
|
-
function
|
|
370
|
+
function me(e) {
|
|
371
371
|
let t;
|
|
372
372
|
if (e) for (let n of e) t ? t.push(...n.issues) : t = n.issues;
|
|
373
373
|
return t;
|
|
374
374
|
}
|
|
375
375
|
/* @__NO_SIDE_EFFECTS__ */
|
|
376
|
-
function
|
|
376
|
+
function he(e, t) {
|
|
377
377
|
return {
|
|
378
378
|
kind: "schema",
|
|
379
379
|
type: "union",
|
|
380
|
-
reference:
|
|
380
|
+
reference: he,
|
|
381
381
|
expects: /* @__PURE__ */ ae(e.map((e) => e.expects), "|"),
|
|
382
382
|
async: !1,
|
|
383
383
|
options: e,
|
|
@@ -399,40 +399,21 @@ function me(e, t) {
|
|
|
399
399
|
if (n) return n;
|
|
400
400
|
if (r) {
|
|
401
401
|
if (r.length === 1) return r[0];
|
|
402
|
-
y(this, "type", e, t, { issues: /* @__PURE__ */
|
|
402
|
+
y(this, "type", e, t, { issues: /* @__PURE__ */ me(r) }), e.typed = !0;
|
|
403
403
|
} else if (i?.length === 1) return i[0];
|
|
404
|
-
else y(this, "type", e, t, { issues: /* @__PURE__ */
|
|
404
|
+
else y(this, "type", e, t, { issues: /* @__PURE__ */ me(i) });
|
|
405
405
|
return e;
|
|
406
406
|
}
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
|
-
var
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
"en-us": /* @__PURE__ */ T(),
|
|
413
|
-
"es-es": /* @__PURE__ */ T()
|
|
409
|
+
var ge = /* @__PURE__ */ C({
|
|
410
|
+
en: /* @__PURE__ */ w(),
|
|
411
|
+
es: /* @__PURE__ */ w()
|
|
414
412
|
}), _e = /* @__PURE__ */ C({
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
}), ve = he([
|
|
420
|
-
"amber",
|
|
421
|
-
"green",
|
|
422
|
-
"red",
|
|
423
|
-
"other"
|
|
424
|
-
]), ye = he([
|
|
425
|
-
"alpha",
|
|
426
|
-
"beta",
|
|
427
|
-
"generalAvailability",
|
|
428
|
-
"notApplicable",
|
|
429
|
-
"preAlpha",
|
|
430
|
-
"proposed",
|
|
431
|
-
"releaseCandidate",
|
|
432
|
-
"unavailable",
|
|
433
|
-
"underReview"
|
|
434
|
-
]);
|
|
435
|
-
he([
|
|
413
|
+
en: /* @__PURE__ */ fe(/* @__PURE__ */ w()),
|
|
414
|
+
es: /* @__PURE__ */ fe(/* @__PURE__ */ w())
|
|
415
|
+
}), T = (e) => /* @__PURE__ */ he(e.map((e) => /* @__PURE__ */ ue(e)));
|
|
416
|
+
T([
|
|
436
417
|
"app",
|
|
437
418
|
"connector",
|
|
438
419
|
"connectorConnection",
|
|
@@ -457,32 +438,44 @@ he([
|
|
|
457
438
|
"presenterPresentation",
|
|
458
439
|
"tool"
|
|
459
440
|
]);
|
|
460
|
-
var
|
|
461
|
-
|
|
441
|
+
var ve = T([
|
|
442
|
+
"amber",
|
|
443
|
+
"green",
|
|
444
|
+
"red",
|
|
445
|
+
"other"
|
|
446
|
+
]), ye = T([
|
|
447
|
+
"alpha",
|
|
448
|
+
"beta",
|
|
449
|
+
"generalAvailability",
|
|
450
|
+
"notApplicable",
|
|
451
|
+
"preAlpha",
|
|
452
|
+
"proposed",
|
|
453
|
+
"releaseCandidate",
|
|
454
|
+
"unavailable",
|
|
455
|
+
"underReview"
|
|
456
|
+
]), be = /* @__PURE__ */ C({
|
|
457
|
+
color: ve,
|
|
458
|
+
label: /* @__PURE__ */ w()
|
|
459
|
+
}), xe = /* @__PURE__ */ C({
|
|
460
|
+
id: /* @__PURE__ */ w(),
|
|
462
461
|
label: _e,
|
|
463
462
|
description: _e,
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
color: ve,
|
|
471
|
-
label: /* @__PURE__ */ T()
|
|
472
|
-
})),
|
|
473
|
-
statusId: ye
|
|
474
|
-
};
|
|
475
|
-
({ ...be });
|
|
476
|
-
var xe = /* @__PURE__ */ C({
|
|
477
|
-
id: /* @__PURE__ */ T(),
|
|
463
|
+
icon: /* @__PURE__ */ S(/* @__PURE__ */ w()),
|
|
464
|
+
iconDark: /* @__PURE__ */ S(/* @__PURE__ */ w()),
|
|
465
|
+
order: /* @__PURE__ */ de(),
|
|
466
|
+
path: /* @__PURE__ */ w()
|
|
467
|
+
}), Se = {
|
|
468
|
+
id: /* @__PURE__ */ w(),
|
|
478
469
|
label: _e,
|
|
479
470
|
description: _e,
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
471
|
+
firstCreatedAt: /* @__PURE__ */ S(/* @__PURE__ */ de()),
|
|
472
|
+
icon: /* @__PURE__ */ S(/* @__PURE__ */ w()),
|
|
473
|
+
iconDark: /* @__PURE__ */ S(/* @__PURE__ */ w()),
|
|
474
|
+
lastUpdatedAt: /* @__PURE__ */ S(/* @__PURE__ */ de()),
|
|
475
|
+
status: /* @__PURE__ */ S(be),
|
|
476
|
+
statusId: /* @__PURE__ */ S(ye)
|
|
477
|
+
};
|
|
478
|
+
({ ...Se }), T([
|
|
486
479
|
"app",
|
|
487
480
|
"engine",
|
|
488
481
|
"connector",
|
|
@@ -490,35 +483,36 @@ he([
|
|
|
490
483
|
"presenter",
|
|
491
484
|
"tool"
|
|
492
485
|
]);
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
486
|
+
//#endregion
|
|
487
|
+
//#region node_modules/@dpuse/dpuse-shared/dist/moduleConfig.schema-Ct8Q53dE.js
|
|
488
|
+
var Ce = {
|
|
489
|
+
...Se,
|
|
490
|
+
version: /* @__PURE__ */ w()
|
|
496
491
|
};
|
|
497
|
-
({ ...
|
|
492
|
+
({ ...Ce });
|
|
498
493
|
//#endregion
|
|
499
|
-
//#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-
|
|
500
|
-
var
|
|
501
|
-
|
|
494
|
+
//#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-connector.es.js
|
|
495
|
+
var we = T([
|
|
496
|
+
"application",
|
|
497
|
+
"curatedDataset",
|
|
498
|
+
"database",
|
|
499
|
+
"fileStore"
|
|
500
|
+
]), Te = /* @__PURE__ */ C({ label: ge }), Ee = /* @__PURE__ */ C({
|
|
501
|
+
authMethodId: T([
|
|
502
502
|
"apiKey",
|
|
503
503
|
"disabled",
|
|
504
504
|
"oAuth2",
|
|
505
505
|
"none"
|
|
506
506
|
]),
|
|
507
|
-
activeConnectionCount: /* @__PURE__ */
|
|
508
|
-
canDescribe: /* @__PURE__ */
|
|
509
|
-
id: /* @__PURE__ */
|
|
510
|
-
label: /* @__PURE__ */
|
|
507
|
+
activeConnectionCount: /* @__PURE__ */ fe(/* @__PURE__ */ de()),
|
|
508
|
+
canDescribe: /* @__PURE__ */ fe(/* @__PURE__ */ le()),
|
|
509
|
+
id: /* @__PURE__ */ fe(/* @__PURE__ */ w()),
|
|
510
|
+
label: /* @__PURE__ */ fe(ge),
|
|
511
511
|
maxConnectionCount: /* @__PURE__ */ S(/* @__PURE__ */ de()),
|
|
512
|
-
params: /* @__PURE__ */
|
|
513
|
-
}),
|
|
514
|
-
"application",
|
|
515
|
-
"curatedDataset",
|
|
516
|
-
"database",
|
|
517
|
-
"fileStore"
|
|
518
|
-
]), Te = he([
|
|
512
|
+
params: /* @__PURE__ */ fe(/* @__PURE__ */ ce(/* @__PURE__ */ pe(/* @__PURE__ */ w(), /* @__PURE__ */ w())))
|
|
513
|
+
}), De = T([
|
|
519
514
|
"abortOperation",
|
|
520
515
|
"auditObjectContent",
|
|
521
|
-
"authenticateConnection",
|
|
522
516
|
"createObject",
|
|
523
517
|
"describeConnection",
|
|
524
518
|
"dropObject",
|
|
@@ -531,68 +525,65 @@ var Ce = /* @__PURE__ */ C({
|
|
|
531
525
|
"retrieveChunks",
|
|
532
526
|
"retrieveRecords",
|
|
533
527
|
"upsertRecords"
|
|
534
|
-
]),
|
|
528
|
+
]), Oe = T([
|
|
535
529
|
"bidirectional",
|
|
536
530
|
"destination",
|
|
537
531
|
"source",
|
|
538
532
|
"unknown"
|
|
539
|
-
]),
|
|
540
|
-
|
|
541
|
-
label: _e
|
|
542
|
-
}), Oe = /* @__PURE__ */ C({
|
|
543
|
-
...Se,
|
|
533
|
+
]), ke = /* @__PURE__ */ C({
|
|
534
|
+
...Ce,
|
|
544
535
|
typeId: /* @__PURE__ */ ue("connector"),
|
|
545
|
-
category: /* @__PURE__ */ S(
|
|
536
|
+
category: /* @__PURE__ */ S(Te),
|
|
546
537
|
categoryId: we,
|
|
547
|
-
implementations: /* @__PURE__ */
|
|
548
|
-
operations: /* @__PURE__ */ ce(
|
|
549
|
-
usageId:
|
|
550
|
-
vendorAccountURL: /* @__PURE__ */ S(/* @__PURE__ */
|
|
551
|
-
vendorDocumentationURL: /* @__PURE__ */ S(/* @__PURE__ */
|
|
552
|
-
vendorHomeURL: /* @__PURE__ */ S(/* @__PURE__ */
|
|
553
|
-
}),
|
|
554
|
-
...
|
|
538
|
+
implementations: /* @__PURE__ */ pe(/* @__PURE__ */ w(), Ee),
|
|
539
|
+
operations: /* @__PURE__ */ ce(De),
|
|
540
|
+
usageId: Oe,
|
|
541
|
+
vendorAccountURL: /* @__PURE__ */ S(/* @__PURE__ */ w()),
|
|
542
|
+
vendorDocumentationURL: /* @__PURE__ */ S(/* @__PURE__ */ w()),
|
|
543
|
+
vendorHomeURL: /* @__PURE__ */ S(/* @__PURE__ */ w())
|
|
544
|
+
}), Ae = T(["list"]), je = /* @__PURE__ */ C({
|
|
545
|
+
...Se,
|
|
555
546
|
typeId: /* @__PURE__ */ ue("contextModelGroup"),
|
|
556
547
|
modelRefs: /* @__PURE__ */ ce(xe),
|
|
557
548
|
order: /* @__PURE__ */ de()
|
|
558
|
-
}),
|
|
559
|
-
...
|
|
549
|
+
}), Me = /* @__PURE__ */ C({
|
|
550
|
+
...Ce,
|
|
560
551
|
typeId: /* @__PURE__ */ ue("context"),
|
|
561
|
-
models: /* @__PURE__ */ ce(
|
|
562
|
-
operations: /* @__PURE__ */ ce(
|
|
563
|
-
}),
|
|
552
|
+
models: /* @__PURE__ */ ce(je),
|
|
553
|
+
operations: /* @__PURE__ */ ce(Ae)
|
|
554
|
+
}), Ne = T([
|
|
564
555
|
"list",
|
|
565
556
|
"render",
|
|
566
557
|
"setColorMode"
|
|
567
|
-
]),
|
|
568
|
-
...
|
|
558
|
+
]), Pe = /* @__PURE__ */ C({
|
|
559
|
+
...Ce,
|
|
569
560
|
typeId: /* @__PURE__ */ ue("presenter"),
|
|
570
561
|
presentations: /* @__PURE__ */ ce(xe),
|
|
571
|
-
operations: /* @__PURE__ */ ce(
|
|
572
|
-
}),
|
|
573
|
-
Node: () =>
|
|
562
|
+
operations: /* @__PURE__ */ ce(Ne)
|
|
563
|
+
}), Fe = /* @__PURE__ */ l({
|
|
564
|
+
Node: () => Zt,
|
|
574
565
|
Parser: () => F,
|
|
575
|
-
Position: () =>
|
|
576
|
-
SourceLocation: () =>
|
|
566
|
+
Position: () => ct,
|
|
567
|
+
SourceLocation: () => lt,
|
|
577
568
|
TokContext: () => B,
|
|
578
|
-
Token: () =>
|
|
569
|
+
Token: () => Vn,
|
|
579
570
|
TokenType: () => D,
|
|
580
|
-
defaultOptions: () =>
|
|
581
|
-
getLineInfo: () =>
|
|
582
|
-
isIdentifierChar: () =>
|
|
571
|
+
defaultOptions: () => dt,
|
|
572
|
+
getLineInfo: () => ut,
|
|
573
|
+
isIdentifierChar: () => qe,
|
|
583
574
|
isIdentifierStart: () => E,
|
|
584
|
-
isNewLine: () =>
|
|
585
|
-
keywordTypes: () =>
|
|
575
|
+
isNewLine: () => Xe,
|
|
576
|
+
keywordTypes: () => Je,
|
|
586
577
|
lineBreak: () => N,
|
|
587
|
-
lineBreakG: () =>
|
|
588
|
-
nonASCIIwhitespace: () =>
|
|
589
|
-
parse: () =>
|
|
590
|
-
parseExpressionAt: () =>
|
|
578
|
+
lineBreakG: () => Ye,
|
|
579
|
+
nonASCIIwhitespace: () => Qe,
|
|
580
|
+
parse: () => Kn,
|
|
581
|
+
parseExpressionAt: () => qn,
|
|
591
582
|
tokContexts: () => V,
|
|
592
583
|
tokTypes: () => M,
|
|
593
|
-
tokenizer: () =>
|
|
594
|
-
version: () =>
|
|
595
|
-
}),
|
|
584
|
+
tokenizer: () => Jn,
|
|
585
|
+
version: () => Gn
|
|
586
|
+
}), Ie = [
|
|
596
587
|
509,
|
|
597
588
|
0,
|
|
598
589
|
227,
|
|
@@ -923,7 +914,7 @@ var Ce = /* @__PURE__ */ C({
|
|
|
923
914
|
9,
|
|
924
915
|
787719,
|
|
925
916
|
239
|
|
926
|
-
],
|
|
917
|
+
], Le = [
|
|
927
918
|
0,
|
|
928
919
|
11,
|
|
929
920
|
2,
|
|
@@ -1542,18 +1533,18 @@ var Ce = /* @__PURE__ */ C({
|
|
|
1542
1533
|
4938,
|
|
1543
1534
|
6,
|
|
1544
1535
|
8489
|
|
1545
|
-
],
|
|
1536
|
+
], Re = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・", ze = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", Be = {
|
|
1546
1537
|
3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
|
|
1547
1538
|
5: "class enum extends super const export import",
|
|
1548
1539
|
6: "enum",
|
|
1549
1540
|
strict: "implements interface let package private protected public static yield",
|
|
1550
1541
|
strictBind: "eval arguments"
|
|
1551
|
-
},
|
|
1552
|
-
5:
|
|
1553
|
-
"5module":
|
|
1554
|
-
6:
|
|
1555
|
-
},
|
|
1556
|
-
function
|
|
1542
|
+
}, Ve = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this", He = {
|
|
1543
|
+
5: Ve,
|
|
1544
|
+
"5module": Ve + " export import",
|
|
1545
|
+
6: Ve + " const class extends export import super"
|
|
1546
|
+
}, Ue = /^in(stanceof)?$/, We = RegExp("[" + ze + "]"), Ge = RegExp("[" + ze + Re + "]");
|
|
1547
|
+
function Ke(e, t) {
|
|
1557
1548
|
for (var n = 65536, r = 0; r < t.length; r += 2) {
|
|
1558
1549
|
if (n += t[r], n > e) return !1;
|
|
1559
1550
|
if (n += t[r + 1], n >= e) return !0;
|
|
@@ -1561,10 +1552,10 @@ function Ge(e, t) {
|
|
|
1561
1552
|
return !1;
|
|
1562
1553
|
}
|
|
1563
1554
|
function E(e, t) {
|
|
1564
|
-
return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 &&
|
|
1555
|
+
return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && We.test(String.fromCharCode(e)) : t === !1 ? !1 : Ke(e, Le);
|
|
1565
1556
|
}
|
|
1566
|
-
function
|
|
1567
|
-
return e < 48 ? e === 36 : e < 58 ? !0 : e < 65 ? !1 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 &&
|
|
1557
|
+
function qe(e, t) {
|
|
1558
|
+
return e < 48 ? e === 36 : e < 58 ? !0 : e < 65 ? !1 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && Ge.test(String.fromCharCode(e)) : t === !1 ? !1 : Ke(e, Le) || Ke(e, Ie);
|
|
1568
1559
|
}
|
|
1569
1560
|
var D = function(e, t) {
|
|
1570
1561
|
t === void 0 && (t = {}), this.label = e, this.keyword = t.keyword, this.beforeExpr = !!t.beforeExpr, this.startsExpr = !!t.startsExpr, this.isLoop = !!t.isLoop, this.isAssign = !!t.isAssign, this.prefix = !!t.prefix, this.postfix = !!t.postfix, this.binop = t.binop || null, this.updateContext = null;
|
|
@@ -1575,9 +1566,9 @@ function O(e, t) {
|
|
|
1575
1566
|
binop: t
|
|
1576
1567
|
});
|
|
1577
1568
|
}
|
|
1578
|
-
var k = { beforeExpr: !0 }, A = { startsExpr: !0 },
|
|
1569
|
+
var k = { beforeExpr: !0 }, A = { startsExpr: !0 }, Je = {};
|
|
1579
1570
|
function j(e, t) {
|
|
1580
|
-
return t === void 0 && (t = {}), t.keyword = e,
|
|
1571
|
+
return t === void 0 && (t = {}), t.keyword = e, Je[e] = new D(e, t);
|
|
1581
1572
|
}
|
|
1582
1573
|
var M = {
|
|
1583
1574
|
num: new D("num", A),
|
|
@@ -1712,46 +1703,46 @@ var M = {
|
|
|
1712
1703
|
prefix: !0,
|
|
1713
1704
|
startsExpr: !0
|
|
1714
1705
|
})
|
|
1715
|
-
}, N = /\r\n?|\n|\u2028|\u2029/,
|
|
1716
|
-
function
|
|
1706
|
+
}, N = /\r\n?|\n|\u2028|\u2029/, Ye = new RegExp(N.source, "g");
|
|
1707
|
+
function Xe(e) {
|
|
1717
1708
|
return e === 10 || e === 13 || e === 8232 || e === 8233;
|
|
1718
1709
|
}
|
|
1719
|
-
function
|
|
1710
|
+
function Ze(e, t, n) {
|
|
1720
1711
|
n === void 0 && (n = e.length);
|
|
1721
1712
|
for (var r = t; r < n; r++) {
|
|
1722
1713
|
var i = e.charCodeAt(r);
|
|
1723
|
-
if (
|
|
1714
|
+
if (Xe(i)) return r < n - 1 && i === 13 && e.charCodeAt(r + 1) === 10 ? r + 2 : r + 1;
|
|
1724
1715
|
}
|
|
1725
1716
|
return -1;
|
|
1726
1717
|
}
|
|
1727
|
-
var
|
|
1728
|
-
return
|
|
1729
|
-
}),
|
|
1730
|
-
return
|
|
1731
|
-
}),
|
|
1732
|
-
function it(e) {
|
|
1733
|
-
return rt[e] || (rt[e] = RegExp("^(?:" + e.replace(/ /g, "|") + ")$"));
|
|
1734
|
-
}
|
|
1718
|
+
var Qe = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, P = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, $e = Object.prototype, et = $e.hasOwnProperty, tt = $e.toString, nt = Object.hasOwn || (function(e, t) {
|
|
1719
|
+
return et.call(e, t);
|
|
1720
|
+
}), rt = Array.isArray || (function(e) {
|
|
1721
|
+
return tt.call(e) === "[object Array]";
|
|
1722
|
+
}), it = Object.create(null);
|
|
1735
1723
|
function at(e) {
|
|
1724
|
+
return it[e] || (it[e] = RegExp("^(?:" + e.replace(/ /g, "|") + ")$"));
|
|
1725
|
+
}
|
|
1726
|
+
function ot(e) {
|
|
1736
1727
|
return e <= 65535 ? String.fromCharCode(e) : (e -= 65536, String.fromCharCode((e >> 10) + 55296, (e & 1023) + 56320));
|
|
1737
1728
|
}
|
|
1738
|
-
var
|
|
1729
|
+
var st = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/, ct = function(e, t) {
|
|
1739
1730
|
this.line = e, this.column = t;
|
|
1740
1731
|
};
|
|
1741
|
-
|
|
1742
|
-
return new
|
|
1732
|
+
ct.prototype.offset = function(e) {
|
|
1733
|
+
return new ct(this.line, this.column + e);
|
|
1743
1734
|
};
|
|
1744
|
-
var
|
|
1735
|
+
var lt = function(e, t, n) {
|
|
1745
1736
|
this.start = t, this.end = n, e.sourceFile !== null && (this.source = e.sourceFile);
|
|
1746
1737
|
};
|
|
1747
|
-
function
|
|
1738
|
+
function ut(e, t) {
|
|
1748
1739
|
for (var n = 1, r = 0;;) {
|
|
1749
|
-
var i =
|
|
1750
|
-
if (i < 0) return new
|
|
1740
|
+
var i = Ze(e, r, t);
|
|
1741
|
+
if (i < 0) return new ct(n, t - r);
|
|
1751
1742
|
++n, r = i;
|
|
1752
1743
|
}
|
|
1753
1744
|
}
|
|
1754
|
-
var
|
|
1745
|
+
var dt = {
|
|
1755
1746
|
ecmaVersion: null,
|
|
1756
1747
|
sourceType: "script",
|
|
1757
1748
|
onInsertedSemicolon: null,
|
|
@@ -1771,20 +1762,20 @@ var ut = {
|
|
|
1771
1762
|
sourceFile: null,
|
|
1772
1763
|
directSourceFile: null,
|
|
1773
1764
|
preserveParens: !1
|
|
1774
|
-
},
|
|
1775
|
-
function
|
|
1765
|
+
}, ft = !1;
|
|
1766
|
+
function pt(e) {
|
|
1776
1767
|
var t = {};
|
|
1777
|
-
for (var n in
|
|
1778
|
-
if (t.ecmaVersion === "latest" ? t.ecmaVersion = 1e8 : t.ecmaVersion == null ? (!
|
|
1768
|
+
for (var n in dt) t[n] = e && nt(e, n) ? e[n] : dt[n];
|
|
1769
|
+
if (t.ecmaVersion === "latest" ? t.ecmaVersion = 1e8 : t.ecmaVersion == null ? (!ft && typeof console == "object" && console.warn && (ft = !0, console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")), t.ecmaVersion = 11) : t.ecmaVersion >= 2015 && (t.ecmaVersion -= 2009), t.allowReserved ??= t.ecmaVersion < 5, (!e || e.allowHashBang == null) && (t.allowHashBang = t.ecmaVersion >= 14), rt(t.onToken)) {
|
|
1779
1770
|
var r = t.onToken;
|
|
1780
1771
|
t.onToken = function(e) {
|
|
1781
1772
|
return r.push(e);
|
|
1782
1773
|
};
|
|
1783
1774
|
}
|
|
1784
|
-
if (
|
|
1775
|
+
if (rt(t.onComment) && (t.onComment = mt(t, t.onComment)), t.sourceType === "commonjs" && t.allowAwaitOutsideFunction) throw Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");
|
|
1785
1776
|
return t;
|
|
1786
1777
|
}
|
|
1787
|
-
function
|
|
1778
|
+
function mt(e, t) {
|
|
1788
1779
|
return function(n, r, i, a, o, s) {
|
|
1789
1780
|
var c = {
|
|
1790
1781
|
type: n ? "Block" : "Line",
|
|
@@ -1792,19 +1783,19 @@ function pt(e, t) {
|
|
|
1792
1783
|
start: i,
|
|
1793
1784
|
end: a
|
|
1794
1785
|
};
|
|
1795
|
-
e.locations && (c.loc = new
|
|
1786
|
+
e.locations && (c.loc = new lt(this, o, s)), e.ranges && (c.range = [i, a]), t.push(c);
|
|
1796
1787
|
};
|
|
1797
1788
|
}
|
|
1798
|
-
var
|
|
1799
|
-
function
|
|
1800
|
-
return
|
|
1789
|
+
var ht = 1, gt = 2, _t = 4, vt = 8, yt = 16, bt = 32, xt = 64, St = 128, Ct = 256, wt = 512, Tt = 1024, Et = ht | gt | Ct;
|
|
1790
|
+
function Dt(e, t) {
|
|
1791
|
+
return gt | (e ? _t : 0) | (t ? vt : 0);
|
|
1801
1792
|
}
|
|
1802
|
-
var
|
|
1803
|
-
this.options = e =
|
|
1793
|
+
var Ot = 0, kt = 1, At = 2, jt = 3, Mt = 4, Nt = 5, F = function(e, t, n) {
|
|
1794
|
+
this.options = e = pt(e), this.sourceFile = e.sourceFile, this.keywords = at(He[e.ecmaVersion >= 6 ? 6 : e.sourceType === "module" ? "5module" : 5]);
|
|
1804
1795
|
var r = "";
|
|
1805
|
-
e.allowReserved !== !0 && (r =
|
|
1806
|
-
var i = (r ? r + " " : "") +
|
|
1807
|
-
this.reservedWordsStrict =
|
|
1796
|
+
e.allowReserved !== !0 && (r = Be[e.ecmaVersion >= 6 ? 6 : e.ecmaVersion === 5 ? 5 : 3], e.sourceType === "module" && (r += " await")), this.reservedWords = at(r);
|
|
1797
|
+
var i = (r ? r + " " : "") + Be.strict;
|
|
1798
|
+
this.reservedWordsStrict = at(i), this.reservedWordsStrictBind = at(i + " " + Be.strictBind), this.input = String(t), this.containsEsc = !1, n ? (this.pos = n, this.lineStart = this.input.lastIndexOf("\n", n - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(N).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = M.eof, this.value = null, this.start = this.end = this.pos, this.startLoc = this.endLoc = this.curPosition(), this.lastTokEndLoc = this.lastTokStartLoc = null, this.lastTokStart = this.lastTokEnd = this.pos, this.context = this.initialContext(), this.exprAllowed = !0, this.inModule = e.sourceType === "module", this.strict = this.inModule || this.strictDirective(this.pos), this.potentialArrowAt = -1, this.potentialArrowInForAwait = !1, this.yieldPos = this.awaitPos = this.awaitIdentPos = 0, this.labels = [], this.undefinedExports = Object.create(null), this.pos === 0 && e.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(this.options.sourceType === "commonjs" ? gt : ht), this.regexpState = null, this.privateNameStack = [];
|
|
1808
1799
|
}, I = {
|
|
1809
1800
|
inFunction: { configurable: !0 },
|
|
1810
1801
|
inGenerator: { configurable: !0 },
|
|
@@ -1822,37 +1813,37 @@ F.prototype.parse = function() {
|
|
|
1822
1813
|
var e = this.options.program || this.startNode();
|
|
1823
1814
|
return this.nextToken(), this.parseTopLevel(e);
|
|
1824
1815
|
}, I.inFunction.get = function() {
|
|
1825
|
-
return (this.currentVarScope().flags &
|
|
1816
|
+
return (this.currentVarScope().flags & gt) > 0;
|
|
1826
1817
|
}, I.inGenerator.get = function() {
|
|
1827
|
-
return (this.currentVarScope().flags &
|
|
1818
|
+
return (this.currentVarScope().flags & vt) > 0;
|
|
1828
1819
|
}, I.inAsync.get = function() {
|
|
1829
|
-
return (this.currentVarScope().flags &
|
|
1820
|
+
return (this.currentVarScope().flags & _t) > 0;
|
|
1830
1821
|
}, I.canAwait.get = function() {
|
|
1831
1822
|
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
|
|
1832
1823
|
var t = this.scopeStack[e].flags;
|
|
1833
|
-
if (t & (
|
|
1834
|
-
if (t &
|
|
1824
|
+
if (t & (Ct | wt)) return !1;
|
|
1825
|
+
if (t & gt) return (t & _t) > 0;
|
|
1835
1826
|
}
|
|
1836
1827
|
return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
|
|
1837
1828
|
}, I.allowReturn.get = function() {
|
|
1838
|
-
return !!(this.inFunction || this.options.allowReturnOutsideFunction && this.currentVarScope().flags &
|
|
1829
|
+
return !!(this.inFunction || this.options.allowReturnOutsideFunction && this.currentVarScope().flags & ht);
|
|
1839
1830
|
}, I.allowSuper.get = function() {
|
|
1840
|
-
return (this.currentThisScope().flags &
|
|
1831
|
+
return (this.currentThisScope().flags & xt) > 0 || this.options.allowSuperOutsideMethod;
|
|
1841
1832
|
}, I.allowDirectSuper.get = function() {
|
|
1842
|
-
return (this.currentThisScope().flags &
|
|
1833
|
+
return (this.currentThisScope().flags & St) > 0;
|
|
1843
1834
|
}, I.treatFunctionsAsVar.get = function() {
|
|
1844
1835
|
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
1845
1836
|
}, I.allowNewDotTarget.get = function() {
|
|
1846
1837
|
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
|
|
1847
1838
|
var t = this.scopeStack[e].flags;
|
|
1848
|
-
if (t & (
|
|
1839
|
+
if (t & (Ct | wt) || t & gt && !(t & yt)) return !0;
|
|
1849
1840
|
}
|
|
1850
1841
|
return !1;
|
|
1851
1842
|
}, I.allowUsing.get = function() {
|
|
1852
1843
|
var e = this.currentScope().flags;
|
|
1853
|
-
return !(e &
|
|
1844
|
+
return !(e & Tt || !this.inModule && e & ht);
|
|
1854
1845
|
}, I.inClassStaticBlock.get = function() {
|
|
1855
|
-
return (this.currentVarScope().flags &
|
|
1846
|
+
return (this.currentVarScope().flags & Ct) > 0;
|
|
1856
1847
|
}, F.extend = function() {
|
|
1857
1848
|
for (var e = [], t = arguments.length; t--;) e[t] = arguments[t];
|
|
1858
1849
|
for (var n = this, r = 0; r < e.length; r++) n = e[r](n);
|
|
@@ -1865,12 +1856,12 @@ F.prototype.parse = function() {
|
|
|
1865
1856
|
}, F.tokenizer = function(e, t) {
|
|
1866
1857
|
return new this(t, e);
|
|
1867
1858
|
}, Object.defineProperties(F.prototype, I);
|
|
1868
|
-
var L = F.prototype,
|
|
1859
|
+
var L = F.prototype, Pt = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
1869
1860
|
L.strictDirective = function(e) {
|
|
1870
1861
|
if (this.options.ecmaVersion < 5) return !1;
|
|
1871
1862
|
for (;;) {
|
|
1872
1863
|
P.lastIndex = e, e += P.exec(this.input)[0].length;
|
|
1873
|
-
var t =
|
|
1864
|
+
var t = Pt.exec(this.input.slice(e));
|
|
1874
1865
|
if (!t) return !1;
|
|
1875
1866
|
if ((t[1] || t[2]) === "use strict") {
|
|
1876
1867
|
P.lastIndex = e + t[0].length;
|
|
@@ -1900,7 +1891,7 @@ L.strictDirective = function(e) {
|
|
|
1900
1891
|
}, L.unexpected = function(e) {
|
|
1901
1892
|
this.raise(e ?? this.start, "Unexpected token");
|
|
1902
1893
|
};
|
|
1903
|
-
var
|
|
1894
|
+
var Ft = function() {
|
|
1904
1895
|
this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
1905
1896
|
};
|
|
1906
1897
|
L.checkPatternErrors = function(e, t) {
|
|
@@ -1932,7 +1923,7 @@ R.parseTopLevel = function(e) {
|
|
|
1932
1923
|
}
|
|
1933
1924
|
return this.adaptDirectivePrologue(e.body), this.next(), e.sourceType = this.options.sourceType === "commonjs" ? "script" : this.options.sourceType, this.finishNode(e, "Program");
|
|
1934
1925
|
};
|
|
1935
|
-
var
|
|
1926
|
+
var It = { kind: "loop" }, Lt = { kind: "switch" };
|
|
1936
1927
|
R.isLet = function(e) {
|
|
1937
1928
|
if (this.options.ecmaVersion < 6 || !this.isContextual("let")) return !1;
|
|
1938
1929
|
P.lastIndex = this.pos;
|
|
@@ -1944,17 +1935,17 @@ R.isLet = function(e) {
|
|
|
1944
1935
|
var i = n;
|
|
1945
1936
|
do
|
|
1946
1937
|
n += r <= 65535 ? 1 : 2;
|
|
1947
|
-
while (
|
|
1938
|
+
while (qe(r = this.fullCharCodeAt(n)));
|
|
1948
1939
|
if (r === 92) return !0;
|
|
1949
1940
|
var a = this.input.slice(i, n);
|
|
1950
|
-
if (!
|
|
1941
|
+
if (!Ue.test(a)) return !0;
|
|
1951
1942
|
}
|
|
1952
1943
|
return !1;
|
|
1953
1944
|
}, R.isAsyncFunction = function() {
|
|
1954
1945
|
if (this.options.ecmaVersion < 8 || !this.isContextual("async")) return !1;
|
|
1955
1946
|
P.lastIndex = this.pos;
|
|
1956
1947
|
var e = P.exec(this.input), t = this.pos + e[0].length, n;
|
|
1957
|
-
return !N.test(this.input.slice(this.pos, t)) && this.input.slice(t, t + 8) === "function" && (t + 8 === this.input.length || !(
|
|
1948
|
+
return !N.test(this.input.slice(this.pos, t)) && this.input.slice(t, t + 8) === "function" && (t + 8 === this.input.length || !(qe(n = this.fullCharCodeAt(t + 8)) || n === 92));
|
|
1958
1949
|
}, R.isUsingKeyword = function(e, t) {
|
|
1959
1950
|
if (this.options.ecmaVersion < 17 || !this.isContextual(e ? "await" : "using")) return !1;
|
|
1960
1951
|
P.lastIndex = this.pos;
|
|
@@ -1962,7 +1953,7 @@ R.isLet = function(e) {
|
|
|
1962
1953
|
if (N.test(this.input.slice(this.pos, r))) return !1;
|
|
1963
1954
|
if (e) {
|
|
1964
1955
|
var i = r + 5, a;
|
|
1965
|
-
if (this.input.slice(r, i) !== "using" || i === this.input.length ||
|
|
1956
|
+
if (this.input.slice(r, i) !== "using" || i === this.input.length || qe(a = this.fullCharCodeAt(i)) || a === 92) return !1;
|
|
1966
1957
|
P.lastIndex = i;
|
|
1967
1958
|
var o = P.exec(this.input);
|
|
1968
1959
|
if (r = i + o[0].length, o && N.test(this.input.slice(i, r))) return !1;
|
|
@@ -1972,10 +1963,10 @@ R.isLet = function(e) {
|
|
|
1972
1963
|
var c = r;
|
|
1973
1964
|
do
|
|
1974
1965
|
r += s <= 65535 ? 1 : 2;
|
|
1975
|
-
while (
|
|
1966
|
+
while (qe(s = this.fullCharCodeAt(r)));
|
|
1976
1967
|
if (s === 92) return !0;
|
|
1977
1968
|
var l = this.input.slice(c, r);
|
|
1978
|
-
return !(
|
|
1969
|
+
return !(Ue.test(l) || t && l === "of");
|
|
1979
1970
|
}, R.isAwaitUsing = function(e) {
|
|
1980
1971
|
return this.isUsingKeyword(!0, e);
|
|
1981
1972
|
}, R.isUsing = function(e) {
|
|
@@ -2027,11 +2018,11 @@ R.isLet = function(e) {
|
|
|
2027
2018
|
}, R.parseDebuggerStatement = function(e) {
|
|
2028
2019
|
return this.next(), this.semicolon(), this.finishNode(e, "DebuggerStatement");
|
|
2029
2020
|
}, R.parseDoStatement = function(e) {
|
|
2030
|
-
return this.next(), this.labels.push(
|
|
2021
|
+
return this.next(), this.labels.push(It), e.body = this.parseStatement("do"), this.labels.pop(), this.expect(M._while), e.test = this.parseParenExpression(), this.options.ecmaVersion >= 6 ? this.eat(M.semi) : this.semicolon(), this.finishNode(e, "DoWhileStatement");
|
|
2031
2022
|
}, R.parseForStatement = function(e) {
|
|
2032
2023
|
this.next();
|
|
2033
2024
|
var t = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
|
|
2034
|
-
if (this.labels.push(
|
|
2025
|
+
if (this.labels.push(It), this.enterScope(0), this.expect(M.parenL), this.type === M.semi) return t > -1 && this.unexpected(t), this.parseFor(e, null);
|
|
2035
2026
|
var n = this.isLet();
|
|
2036
2027
|
if (this.type === M._var || this.type === M._const || n) {
|
|
2037
2028
|
var r = this.startNode(), i = n ? "let" : this.value;
|
|
@@ -2042,18 +2033,18 @@ R.isLet = function(e) {
|
|
|
2042
2033
|
var c = this.startNode();
|
|
2043
2034
|
return this.next(), s === "await using" && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.parseVar(c, !0, s), this.finishNode(c, "VariableDeclaration"), this.parseForAfterInit(e, c, t);
|
|
2044
2035
|
}
|
|
2045
|
-
var l = this.containsEsc, u = new
|
|
2036
|
+
var l = this.containsEsc, u = new Ft(), d = this.start, f = t > -1 ? this.parseExprSubscripts(u, "await") : this.parseExpression(!0, u);
|
|
2046
2037
|
return this.type === M._in || (o = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (t > -1 ? (this.type === M._in && this.unexpected(t), e.await = !0) : o && this.options.ecmaVersion >= 8 && (f.start === d && !l && f.type === "Identifier" && f.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (e.await = !1)), a && o && this.raise(f.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(f, !1, u), this.checkLValPattern(f), this.parseForIn(e, f)) : (this.checkExpressionErrors(u, !0), t > -1 && this.unexpected(t), this.parseFor(e, f));
|
|
2047
2038
|
}, R.parseForAfterInit = function(e, t, n) {
|
|
2048
2039
|
return (this.type === M._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && t.declarations.length === 1 ? (this.options.ecmaVersion >= 9 && (this.type === M._in ? n > -1 && this.unexpected(n) : e.await = n > -1), this.parseForIn(e, t)) : (n > -1 && this.unexpected(n), this.parseFor(e, t));
|
|
2049
2040
|
}, R.parseFunctionStatement = function(e, t, n) {
|
|
2050
|
-
return this.next(), this.parseFunction(e,
|
|
2041
|
+
return this.next(), this.parseFunction(e, zt | (n ? 0 : Bt), !1, t);
|
|
2051
2042
|
}, R.parseIfStatement = function(e) {
|
|
2052
2043
|
return this.next(), e.test = this.parseParenExpression(), e.consequent = this.parseStatement("if"), e.alternate = this.eat(M._else) ? this.parseStatement("if") : null, this.finishNode(e, "IfStatement");
|
|
2053
2044
|
}, R.parseReturnStatement = function(e) {
|
|
2054
2045
|
return this.allowReturn || this.raise(this.start, "'return' outside of function"), this.next(), this.eat(M.semi) || this.insertSemicolon() ? e.argument = null : (e.argument = this.parseExpression(), this.semicolon()), this.finishNode(e, "ReturnStatement");
|
|
2055
2046
|
}, R.parseSwitchStatement = function(e) {
|
|
2056
|
-
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(M.braceL), this.labels.push(
|
|
2047
|
+
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(M.braceL), this.labels.push(Lt), this.enterScope(Tt);
|
|
2057
2048
|
for (var t, n = !1; this.type !== M.braceR;) if (this.type === M._case || this.type === M._default) {
|
|
2058
2049
|
var r = this.type === M._case;
|
|
2059
2050
|
t && this.finishNode(t, "SwitchCase"), e.cases.push(t = this.startNode()), t.consequent = [], this.next(), r ? t.test = this.parseExpression() : (n && this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"), n = !0, t.test = null), this.expect(M.colon);
|
|
@@ -2062,10 +2053,10 @@ R.isLet = function(e) {
|
|
|
2062
2053
|
}, R.parseThrowStatement = function(e) {
|
|
2063
2054
|
return this.next(), N.test(this.input.slice(this.lastTokEnd, this.start)) && this.raise(this.lastTokEnd, "Illegal newline after throw"), e.argument = this.parseExpression(), this.semicolon(), this.finishNode(e, "ThrowStatement");
|
|
2064
2055
|
};
|
|
2065
|
-
var
|
|
2056
|
+
var Rt = [];
|
|
2066
2057
|
R.parseCatchClauseParam = function() {
|
|
2067
2058
|
var e = this.parseBindingAtom(), t = e.type === "Identifier";
|
|
2068
|
-
return this.enterScope(t ?
|
|
2059
|
+
return this.enterScope(t ? bt : 0), this.checkLValPattern(e, t ? Mt : At), this.expect(M.parenR), e;
|
|
2069
2060
|
}, R.parseTryStatement = function(e) {
|
|
2070
2061
|
if (this.next(), e.block = this.parseBlock(), e.handler = null, this.type === M._catch) {
|
|
2071
2062
|
var t = this.startNode();
|
|
@@ -2075,7 +2066,7 @@ R.parseCatchClauseParam = function() {
|
|
|
2075
2066
|
}, R.parseVarStatement = function(e, t, n) {
|
|
2076
2067
|
return this.next(), this.parseVar(e, !1, t, n), this.semicolon(), this.finishNode(e, "VariableDeclaration");
|
|
2077
2068
|
}, R.parseWhileStatement = function(e) {
|
|
2078
|
-
return this.next(), e.test = this.parseParenExpression(), this.labels.push(
|
|
2069
|
+
return this.next(), e.test = this.parseParenExpression(), this.labels.push(It), e.body = this.parseStatement("while"), this.labels.pop(), this.finishNode(e, "WhileStatement");
|
|
2079
2070
|
}, R.parseWithStatement = function(e) {
|
|
2080
2071
|
return this.strict && this.raise(this.start, "'with' in strict mode"), this.next(), e.object = this.parseParenExpression(), e.body = this.parseStatement("with"), this.finishNode(e, "WithStatement");
|
|
2081
2072
|
}, R.parseEmptyStatement = function(e) {
|
|
@@ -2112,13 +2103,13 @@ R.parseCatchClauseParam = function() {
|
|
|
2112
2103
|
}
|
|
2113
2104
|
return e;
|
|
2114
2105
|
}, R.parseVarId = function(e, t) {
|
|
2115
|
-
e.id = t === "using" || t === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, t === "var" ?
|
|
2106
|
+
e.id = t === "using" || t === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, t === "var" ? kt : At, !1);
|
|
2116
2107
|
};
|
|
2117
|
-
var
|
|
2108
|
+
var zt = 1, Bt = 2, Vt = 4;
|
|
2118
2109
|
R.parseFunction = function(e, t, n, r, i) {
|
|
2119
|
-
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !r) && (this.type === M.star && t &
|
|
2110
|
+
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !r) && (this.type === M.star && t & Bt && this.unexpected(), e.generator = this.eat(M.star)), this.options.ecmaVersion >= 8 && (e.async = !!r), t & zt && (e.id = t & Vt && this.type !== M.name ? null : this.parseIdent(), e.id && !(t & Bt) && this.checkLValSimple(e.id, this.strict || e.generator || e.async ? this.treatFunctionsAsVar ? kt : At : jt));
|
|
2120
2111
|
var a = this.yieldPos, o = this.awaitPos, s = this.awaitIdentPos;
|
|
2121
|
-
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
2112
|
+
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Dt(e.async, e.generator)), t & zt || (e.id = this.type === M.name ? this.parseIdent() : null), this.parseFunctionParams(e), this.parseFunctionBody(e, n, !1, i), this.yieldPos = a, this.awaitPos = o, this.awaitIdentPos = s, this.finishNode(e, t & zt ? "FunctionDeclaration" : "FunctionExpression");
|
|
2122
2113
|
}, R.parseFunctionParams = function(e) {
|
|
2123
2114
|
this.expect(M.parenL), e.params = this.parseBindingList(M.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams();
|
|
2124
2115
|
}, R.parseClass = function(e, t) {
|
|
@@ -2128,7 +2119,7 @@ R.parseFunction = function(e, t, n, r, i) {
|
|
|
2128
2119
|
var r = this.enterClassBody(), i = this.startNode(), a = !1;
|
|
2129
2120
|
for (i.body = [], this.expect(M.braceL); this.type !== M.braceR;) {
|
|
2130
2121
|
var o = this.parseClassElement(e.superClass !== null);
|
|
2131
|
-
o && (i.body.push(o), o.type === "MethodDefinition" && o.kind === "constructor" ? (a && this.raiseRecoverable(o.start, "Duplicate constructor in the same class"), a = !0) : o.key && o.key.type === "PrivateIdentifier" &&
|
|
2122
|
+
o && (i.body.push(o), o.type === "MethodDefinition" && o.kind === "constructor" ? (a && this.raiseRecoverable(o.start, "Duplicate constructor in the same class"), a = !0) : o.key && o.key.type === "PrivateIdentifier" && Ht(r, o) && this.raiseRecoverable(o.key.start, "Identifier '#" + o.key.name + "' has already been declared"));
|
|
2132
2123
|
}
|
|
2133
2124
|
return this.strict = n, this.next(), e.body = this.finishNode(i, "ClassBody"), this.exitClassBody(), this.finishNode(e, t ? "ClassDeclaration" : "ClassExpression");
|
|
2134
2125
|
}, R.parseClassElement = function(e) {
|
|
@@ -2143,7 +2134,7 @@ R.parseFunction = function(e, t, n, r, i) {
|
|
|
2143
2134
|
(this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ? o = c : r = c);
|
|
2144
2135
|
}
|
|
2145
2136
|
if (r ? (n.computed = !1, n.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), n.key.name = r, this.finishNode(n.key, "Identifier")) : this.parseClassElementName(n), t < 13 || this.type === M.parenL || o !== "method" || i || a) {
|
|
2146
|
-
var l = !n.static &&
|
|
2137
|
+
var l = !n.static && Ut(n, "constructor"), u = l && e;
|
|
2147
2138
|
l && o !== "method" && this.raise(n.key.start, "Constructor can't have get/set modifier"), n.kind = l ? "constructor" : o, this.parseClassMethod(n, i, a, u);
|
|
2148
2139
|
} else this.parseClassField(n);
|
|
2149
2140
|
return n;
|
|
@@ -2153,21 +2144,21 @@ R.parseFunction = function(e, t, n, r, i) {
|
|
|
2153
2144
|
this.type === M.privateId ? (this.value === "constructor" && this.raise(this.start, "Classes can't have an element named '#constructor'"), e.computed = !1, e.key = this.parsePrivateIdent()) : this.parsePropertyName(e);
|
|
2154
2145
|
}, R.parseClassMethod = function(e, t, n, r) {
|
|
2155
2146
|
var i = e.key;
|
|
2156
|
-
e.kind === "constructor" ? (t && this.raise(i.start, "Constructor can't be a generator"), n && this.raise(i.start, "Constructor can't be an async method")) : e.static &&
|
|
2147
|
+
e.kind === "constructor" ? (t && this.raise(i.start, "Constructor can't be a generator"), n && this.raise(i.start, "Constructor can't be an async method")) : e.static && Ut(e, "prototype") && this.raise(i.start, "Classes may not have a static property named prototype");
|
|
2157
2148
|
var a = e.value = this.parseMethod(t, n, r);
|
|
2158
2149
|
return e.kind === "get" && a.params.length !== 0 && this.raiseRecoverable(a.start, "getter should have no params"), e.kind === "set" && a.params.length !== 1 && this.raiseRecoverable(a.start, "setter should have exactly one param"), e.kind === "set" && a.params[0].type === "RestElement" && this.raiseRecoverable(a.params[0].start, "Setter cannot use rest params"), this.finishNode(e, "MethodDefinition");
|
|
2159
2150
|
}, R.parseClassField = function(e) {
|
|
2160
|
-
return
|
|
2151
|
+
return Ut(e, "constructor") ? this.raise(e.key.start, "Classes can't have a field named 'constructor'") : e.static && Ut(e, "prototype") && this.raise(e.key.start, "Classes can't have a static field named 'prototype'"), this.eat(M.eq) ? (this.enterScope(wt | xt), e.value = this.parseMaybeAssign(), this.exitScope()) : e.value = null, this.semicolon(), this.finishNode(e, "PropertyDefinition");
|
|
2161
2152
|
}, R.parseClassStaticBlock = function(e) {
|
|
2162
2153
|
e.body = [];
|
|
2163
2154
|
var t = this.labels;
|
|
2164
|
-
for (this.labels = [], this.enterScope(
|
|
2155
|
+
for (this.labels = [], this.enterScope(Ct | xt); this.type !== M.braceR;) {
|
|
2165
2156
|
var n = this.parseStatement(null);
|
|
2166
2157
|
e.body.push(n);
|
|
2167
2158
|
}
|
|
2168
2159
|
return this.next(), this.exitScope(), this.labels = t, this.finishNode(e, "StaticBlock");
|
|
2169
2160
|
}, R.parseClassId = function(e, t) {
|
|
2170
|
-
this.type === M.name ? (e.id = this.parseIdent(), t && this.checkLValSimple(e.id,
|
|
2161
|
+
this.type === M.name ? (e.id = this.parseIdent(), t && this.checkLValSimple(e.id, At, !1)) : (t === !0 && this.unexpected(), e.id = null);
|
|
2171
2162
|
}, R.parseClassSuper = function(e) {
|
|
2172
2163
|
e.superClass = this.eat(M._extends) ? this.parseExprSubscripts(null, !1) : null;
|
|
2173
2164
|
}, R.enterClassBody = function() {
|
|
@@ -2180,14 +2171,14 @@ R.parseFunction = function(e, t, n, r, i) {
|
|
|
2180
2171
|
var e = this.privateNameStack.pop(), t = e.declared, n = e.used;
|
|
2181
2172
|
if (this.options.checkPrivateFields) for (var r = this.privateNameStack.length, i = r === 0 ? null : this.privateNameStack[r - 1], a = 0; a < n.length; ++a) {
|
|
2182
2173
|
var o = n[a];
|
|
2183
|
-
|
|
2174
|
+
nt(t, o.name) || (i ? i.used.push(o) : this.raiseRecoverable(o.start, "Private field '#" + o.name + "' must be declared in an enclosing class"));
|
|
2184
2175
|
}
|
|
2185
2176
|
};
|
|
2186
|
-
function
|
|
2177
|
+
function Ht(e, t) {
|
|
2187
2178
|
var n = t.key.name, r = e[n], i = "true";
|
|
2188
2179
|
return t.type === "MethodDefinition" && (t.kind === "get" || t.kind === "set") && (i = (t.static ? "s" : "i") + t.kind), r === "iget" && i === "iset" || r === "iset" && i === "iget" || r === "sget" && i === "sset" || r === "sset" && i === "sget" ? (e[n] = "true", !1) : r ? !0 : (e[n] = i, !1);
|
|
2189
2180
|
}
|
|
2190
|
-
function
|
|
2181
|
+
function Ut(e, t) {
|
|
2191
2182
|
var n = e.computed, r = e.key;
|
|
2192
2183
|
return !n && (r.type === "Identifier" && r.name === t || r.type === "Literal" && r.value === t);
|
|
2193
2184
|
}
|
|
@@ -2215,7 +2206,7 @@ R.parseExportAllDeclaration = function(e, t) {
|
|
|
2215
2206
|
var e;
|
|
2216
2207
|
if (this.type === M._function || (e = this.isAsyncFunction())) {
|
|
2217
2208
|
var t = this.startNode();
|
|
2218
|
-
return this.next(), e && this.next(), this.parseFunction(t,
|
|
2209
|
+
return this.next(), e && this.next(), this.parseFunction(t, zt | Vt, !1, e);
|
|
2219
2210
|
} else if (this.type === M._class) {
|
|
2220
2211
|
var n = this.startNode();
|
|
2221
2212
|
return this.parseClass(n, "nullableID");
|
|
@@ -2224,7 +2215,7 @@ R.parseExportAllDeclaration = function(e, t) {
|
|
|
2224
2215
|
return this.semicolon(), r;
|
|
2225
2216
|
}
|
|
2226
2217
|
}, R.checkExport = function(e, t, n) {
|
|
2227
|
-
e && (typeof t != "string" && (t = t.type === "Identifier" ? t.name : t.value),
|
|
2218
|
+
e && (typeof t != "string" && (t = t.type === "Identifier" ? t.name : t.value), nt(e, t) && this.raiseRecoverable(n, "Duplicate export '" + t + "'"), e[t] = !0);
|
|
2228
2219
|
}, R.checkPatternExport = function(e, t) {
|
|
2229
2220
|
var n = t.type;
|
|
2230
2221
|
if (n === "Identifier") this.checkExport(e, t, t.start);
|
|
@@ -2256,16 +2247,16 @@ R.parseExportAllDeclaration = function(e, t) {
|
|
|
2256
2247
|
}
|
|
2257
2248
|
return t;
|
|
2258
2249
|
}, R.parseImport = function(e) {
|
|
2259
|
-
return this.next(), this.type === M.string ? (e.specifiers =
|
|
2250
|
+
return this.next(), this.type === M.string ? (e.specifiers = Rt, e.source = this.parseExprAtom()) : (e.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), e.source = this.type === M.string ? this.parseExprAtom() : this.unexpected()), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(e, "ImportDeclaration");
|
|
2260
2251
|
}, R.parseImportSpecifier = function() {
|
|
2261
2252
|
var e = this.startNode();
|
|
2262
|
-
return e.imported = this.parseModuleExportName(), this.eatContextual("as") ? e.local = this.parseIdent() : (this.checkUnreserved(e.imported), e.local = e.imported), this.checkLValSimple(e.local,
|
|
2253
|
+
return e.imported = this.parseModuleExportName(), this.eatContextual("as") ? e.local = this.parseIdent() : (this.checkUnreserved(e.imported), e.local = e.imported), this.checkLValSimple(e.local, At), this.finishNode(e, "ImportSpecifier");
|
|
2263
2254
|
}, R.parseImportDefaultSpecifier = function() {
|
|
2264
2255
|
var e = this.startNode();
|
|
2265
|
-
return e.local = this.parseIdent(), this.checkLValSimple(e.local,
|
|
2256
|
+
return e.local = this.parseIdent(), this.checkLValSimple(e.local, At), this.finishNode(e, "ImportDefaultSpecifier");
|
|
2266
2257
|
}, R.parseImportNamespaceSpecifier = function() {
|
|
2267
2258
|
var e = this.startNode();
|
|
2268
|
-
return this.next(), this.expectContextual("as"), e.local = this.parseIdent(), this.checkLValSimple(e.local,
|
|
2259
|
+
return this.next(), this.expectContextual("as"), e.local = this.parseIdent(), this.checkLValSimple(e.local, At), this.finishNode(e, "ImportNamespaceSpecifier");
|
|
2269
2260
|
}, R.parseImportSpecifiers = function() {
|
|
2270
2261
|
var e = [], t = !0;
|
|
2271
2262
|
if (this.type === M.name && (e.push(this.parseImportDefaultSpecifier()), !this.eat(M.comma))) return e;
|
|
@@ -2284,7 +2275,7 @@ R.parseExportAllDeclaration = function(e, t) {
|
|
|
2284
2275
|
if (n) n = !1;
|
|
2285
2276
|
else if (this.expect(M.comma), this.afterTrailingComma(M.braceR)) break;
|
|
2286
2277
|
var r = this.parseImportAttribute(), i = r.key.type === "Identifier" ? r.key.name : r.key.value;
|
|
2287
|
-
|
|
2278
|
+
nt(t, i) && this.raiseRecoverable(r.key.start, "Duplicate attribute key '" + i + "'"), t[i] = !0, e.push(r);
|
|
2288
2279
|
}
|
|
2289
2280
|
return e;
|
|
2290
2281
|
}, R.parseImportAttribute = function() {
|
|
@@ -2293,7 +2284,7 @@ R.parseExportAllDeclaration = function(e, t) {
|
|
|
2293
2284
|
}, R.parseModuleExportName = function() {
|
|
2294
2285
|
if (this.options.ecmaVersion >= 13 && this.type === M.string) {
|
|
2295
2286
|
var e = this.parseLiteral(this.value);
|
|
2296
|
-
return
|
|
2287
|
+
return st.test(e.value) && this.raise(e.start, "An export name cannot include a lone surrogate."), e;
|
|
2297
2288
|
}
|
|
2298
2289
|
return this.parseIdent(!0);
|
|
2299
2290
|
}, R.adaptDirectivePrologue = function(e) {
|
|
@@ -2384,11 +2375,11 @@ z.toAssignable = function(e, t, n) {
|
|
|
2384
2375
|
var r = this.startNodeAt(e, t);
|
|
2385
2376
|
return r.left = n, r.right = this.parseMaybeAssign(), this.finishNode(r, "AssignmentPattern");
|
|
2386
2377
|
}, z.checkLValSimple = function(e, t, n) {
|
|
2387
|
-
t === void 0 && (t =
|
|
2388
|
-
var r = t !==
|
|
2378
|
+
t === void 0 && (t = Ot);
|
|
2379
|
+
var r = t !== Ot;
|
|
2389
2380
|
switch (e.type) {
|
|
2390
2381
|
case "Identifier":
|
|
2391
|
-
this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (r ? "Binding " : "Assigning to ") + e.name + " in strict mode"), r && (t ===
|
|
2382
|
+
this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (r ? "Binding " : "Assigning to ") + e.name + " in strict mode"), r && (t === At && e.name === "let" && this.raiseRecoverable(e.start, "let is disallowed as a lexically bound name"), n && (nt(n, e.name) && this.raiseRecoverable(e.start, "Argument name clash"), n[e.name] = !0), t !== Nt && this.declareName(e.name, t, e.start));
|
|
2392
2383
|
break;
|
|
2393
2384
|
case "ChainExpression":
|
|
2394
2385
|
this.raiseRecoverable(e.start, "Optional chaining cannot appear in left-hand side");
|
|
@@ -2400,7 +2391,7 @@ z.toAssignable = function(e, t, n) {
|
|
|
2400
2391
|
default: this.raise(e.start, (r ? "Binding" : "Assigning to") + " rvalue");
|
|
2401
2392
|
}
|
|
2402
2393
|
}, z.checkLValPattern = function(e, t, n) {
|
|
2403
|
-
switch (t === void 0 && (t =
|
|
2394
|
+
switch (t === void 0 && (t = Ot), e.type) {
|
|
2404
2395
|
case "ObjectPattern":
|
|
2405
2396
|
for (var r = 0, i = e.properties; r < i.length; r += 1) {
|
|
2406
2397
|
var a = i[r];
|
|
@@ -2416,7 +2407,7 @@ z.toAssignable = function(e, t, n) {
|
|
|
2416
2407
|
default: this.checkLValSimple(e, t, n);
|
|
2417
2408
|
}
|
|
2418
2409
|
}, z.checkLValInnerPattern = function(e, t, n) {
|
|
2419
|
-
switch (t === void 0 && (t =
|
|
2410
|
+
switch (t === void 0 && (t = Ot), e.type) {
|
|
2420
2411
|
case "Property":
|
|
2421
2412
|
this.checkLValInnerPattern(e.value, t, n);
|
|
2422
2413
|
break;
|
|
@@ -2444,24 +2435,24 @@ var B = function(e, t, n, r, i) {
|
|
|
2444
2435
|
f_expr: new B("function", !0),
|
|
2445
2436
|
f_expr_gen: new B("function", !0, !1, null, !0),
|
|
2446
2437
|
f_gen: new B("function", !1, !1, null, !0)
|
|
2447
|
-
},
|
|
2448
|
-
|
|
2438
|
+
}, Wt = F.prototype;
|
|
2439
|
+
Wt.initialContext = function() {
|
|
2449
2440
|
return [V.b_stat];
|
|
2450
|
-
},
|
|
2441
|
+
}, Wt.curContext = function() {
|
|
2451
2442
|
return this.context[this.context.length - 1];
|
|
2452
|
-
},
|
|
2443
|
+
}, Wt.braceIsBlock = function(e) {
|
|
2453
2444
|
var t = this.curContext();
|
|
2454
2445
|
return t === V.f_expr || t === V.f_stat ? !0 : e === M.colon && (t === V.b_stat || t === V.b_expr) ? !t.isExpr : e === M._return || e === M.name && this.exprAllowed ? N.test(this.input.slice(this.lastTokEnd, this.start)) : e === M._else || e === M.semi || e === M.eof || e === M.parenR || e === M.arrow ? !0 : e === M.braceL ? t === V.b_stat : e === M._var || e === M._const || e === M.name ? !1 : !this.exprAllowed;
|
|
2455
|
-
},
|
|
2446
|
+
}, Wt.inGeneratorContext = function() {
|
|
2456
2447
|
for (var e = this.context.length - 1; e >= 1; e--) {
|
|
2457
2448
|
var t = this.context[e];
|
|
2458
2449
|
if (t.token === "function") return t.generator;
|
|
2459
2450
|
}
|
|
2460
2451
|
return !1;
|
|
2461
|
-
},
|
|
2452
|
+
}, Wt.updateContext = function(e) {
|
|
2462
2453
|
var t, n = this.type;
|
|
2463
2454
|
n.keyword && e === M.dot ? this.exprAllowed = !1 : (t = n.updateContext) ? t.call(this, e) : this.exprAllowed = n.beforeExpr;
|
|
2464
|
-
},
|
|
2455
|
+
}, Wt.overrideContext = function(e) {
|
|
2465
2456
|
this.curContext() !== e && (this.context[this.context.length - 1] = e);
|
|
2466
2457
|
}, M.parenR.updateContext = M.braceR.updateContext = function() {
|
|
2467
2458
|
if (this.context.length === 1) {
|
|
@@ -2533,7 +2524,7 @@ H.checkPropClash = function(e, t, n) {
|
|
|
2533
2524
|
this.exprAllowed = !1;
|
|
2534
2525
|
}
|
|
2535
2526
|
var r = !1, i = -1, a = -1, o = -1;
|
|
2536
|
-
t ? (i = t.parenthesizedAssign, a = t.trailingComma, o = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new
|
|
2527
|
+
t ? (i = t.parenthesizedAssign, a = t.trailingComma, o = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new Ft(), r = !0);
|
|
2537
2528
|
var s = this.start, c = this.startLoc;
|
|
2538
2529
|
(this.type === M.parenL || this.type === M.name) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = e === "await");
|
|
2539
2530
|
var l = this.parseMaybeConditional(e, t);
|
|
@@ -2573,7 +2564,7 @@ H.checkPropClash = function(e, t, n) {
|
|
|
2573
2564
|
if (this.isContextual("await") && this.canAwait) o = this.parseAwait(r), t = !0;
|
|
2574
2565
|
else if (this.type.prefix) {
|
|
2575
2566
|
var s = this.startNode(), c = this.type === M.incDec;
|
|
2576
|
-
s.operator = this.value, s.prefix = !0, this.next(), s.argument = this.parseMaybeUnary(null, !0, c, r), this.checkExpressionErrors(e, !0), c ? this.checkLValSimple(s.argument) : this.strict && s.operator === "delete" &&
|
|
2567
|
+
s.operator = this.value, s.prefix = !0, this.next(), s.argument = this.parseMaybeUnary(null, !0, c, r), this.checkExpressionErrors(e, !0), c ? this.checkLValSimple(s.argument) : this.strict && s.operator === "delete" && Gt(s.argument) ? this.raiseRecoverable(s.start, "Deleting local variable in strict mode") : s.operator === "delete" && Kt(s.argument) ? this.raiseRecoverable(s.start, "Private fields can not be deleted") : t = !0, o = this.finishNode(s, c ? "UpdateExpression" : "UnaryExpression");
|
|
2577
2568
|
} else if (!t && this.type === M.privateId) (r || this.privateNameStack.length === 0) && this.options.checkPrivateFields && this.unexpected(), o = this.parsePrivateIdent(), this.type !== M._in && this.unexpected();
|
|
2578
2569
|
else {
|
|
2579
2570
|
if (o = this.parseExprSubscripts(e, r), this.checkExpressionErrors(e)) return o;
|
|
@@ -2586,11 +2577,11 @@ H.checkPropClash = function(e, t, n) {
|
|
|
2586
2577
|
else return this.buildBinary(i, a, o, this.parseMaybeUnary(null, !1, !1, r), "**", !1);
|
|
2587
2578
|
else return o;
|
|
2588
2579
|
};
|
|
2589
|
-
function Wt(e) {
|
|
2590
|
-
return e.type === "Identifier" || e.type === "ParenthesizedExpression" && Wt(e.expression);
|
|
2591
|
-
}
|
|
2592
2580
|
function Gt(e) {
|
|
2593
|
-
return e.type === "
|
|
2581
|
+
return e.type === "Identifier" || e.type === "ParenthesizedExpression" && Gt(e.expression);
|
|
2582
|
+
}
|
|
2583
|
+
function Kt(e) {
|
|
2584
|
+
return e.type === "MemberExpression" && e.property.type === "PrivateIdentifier" || e.type === "ChainExpression" && Kt(e.expression) || e.type === "ParenthesizedExpression" && Kt(e.expression);
|
|
2594
2585
|
}
|
|
2595
2586
|
H.parseExprSubscripts = function(e, t) {
|
|
2596
2587
|
var n = this.start, r = this.startLoc, i = this.parseExprAtom(e, t);
|
|
@@ -2621,7 +2612,7 @@ H.parseExprSubscripts = function(e, t) {
|
|
|
2621
2612
|
var u = this.startNodeAt(t, n);
|
|
2622
2613
|
u.object = e, l ? (u.property = this.parseExpression(), this.expect(M.bracketR)) : this.type === M.privateId && e.type !== "Super" ? u.property = this.parsePrivateIdent() : u.property = this.parseIdent(this.options.allowReserved !== "never"), u.computed = !!l, s && (u.optional = c), e = this.finishNode(u, "MemberExpression");
|
|
2623
2614
|
} else if (!r && this.eat(M.parenL)) {
|
|
2624
|
-
var d = new
|
|
2615
|
+
var d = new Ft(), f = this.yieldPos, p = this.awaitPos, m = this.awaitIdentPos;
|
|
2625
2616
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
2626
2617
|
var h = this.parseExprList(M.parenR, this.options.ecmaVersion >= 8, !1, d);
|
|
2627
2618
|
if (i && !c && this.shouldParseAsyncArrow()) return this.checkPatternErrors(d, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = f, this.awaitPos = p, this.awaitIdentPos = m, this.parseSubscriptAsyncArrow(t, n, h, o);
|
|
@@ -2704,7 +2695,7 @@ H.parseExprSubscripts = function(e, t) {
|
|
|
2704
2695
|
var n = this.start, r = this.startLoc, i, a = this.options.ecmaVersion >= 8;
|
|
2705
2696
|
if (this.options.ecmaVersion >= 6) {
|
|
2706
2697
|
this.next();
|
|
2707
|
-
var o = this.start, s = this.startLoc, c = [], l = !0, u = !1, d = new
|
|
2698
|
+
var o = this.start, s = this.startLoc, c = [], l = !0, u = !1, d = new Ft(), f = this.yieldPos, p = this.awaitPos, m;
|
|
2708
2699
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== M.parenR;) if (l ? l = !1 : this.expect(M.comma), a && this.afterTrailingComma(M.parenR, !0)) {
|
|
2709
2700
|
u = !0;
|
|
2710
2701
|
break;
|
|
@@ -2725,7 +2716,7 @@ H.parseExprSubscripts = function(e, t) {
|
|
|
2725
2716
|
}, H.parseParenArrowList = function(e, t, n, r) {
|
|
2726
2717
|
return this.parseArrowExpression(this.startNodeAt(e, t), n, !1, r);
|
|
2727
2718
|
};
|
|
2728
|
-
var
|
|
2719
|
+
var qt = [];
|
|
2729
2720
|
H.parseNew = function() {
|
|
2730
2721
|
this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
|
|
2731
2722
|
var e = this.startNode();
|
|
@@ -2736,7 +2727,7 @@ H.parseNew = function() {
|
|
|
2736
2727
|
return e.property = this.parseIdent(!0), e.property.name !== "target" && this.raiseRecoverable(e.property.start, "The only valid meta property for new is 'new.target'"), n && this.raiseRecoverable(e.start, "'new.target' must not contain escaped characters"), this.allowNewDotTarget || this.raiseRecoverable(e.start, "'new.target' can only be used in functions and class static block"), this.finishNode(e, "MetaProperty");
|
|
2737
2728
|
}
|
|
2738
2729
|
var r = this.start, i = this.startLoc;
|
|
2739
|
-
return e.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), r, i, !0, !1), this.eat(M.parenL) ? e.arguments = this.parseExprList(M.parenR, this.options.ecmaVersion >= 8, !1) : e.arguments =
|
|
2730
|
+
return e.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), r, i, !0, !1), this.eat(M.parenL) ? e.arguments = this.parseExprList(M.parenR, this.options.ecmaVersion >= 8, !1) : e.arguments = qt, this.finishNode(e, "NewExpression");
|
|
2740
2731
|
}, H.parseTemplateElement = function(e) {
|
|
2741
2732
|
var t = e.isTagged, n = this.startNode();
|
|
2742
2733
|
return this.type === M.invalidTemplate ? (t || this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"), n.value = {
|
|
@@ -2792,10 +2783,10 @@ H.parseNew = function() {
|
|
|
2792
2783
|
e.id = null, this.options.ecmaVersion >= 6 && (e.generator = e.expression = !1), this.options.ecmaVersion >= 8 && (e.async = !1);
|
|
2793
2784
|
}, H.parseMethod = function(e, t, n) {
|
|
2794
2785
|
var r = this.startNode(), i = this.yieldPos, a = this.awaitPos, o = this.awaitIdentPos;
|
|
2795
|
-
return this.initFunction(r), this.options.ecmaVersion >= 6 && (r.generator = e), this.options.ecmaVersion >= 8 && (r.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
2786
|
+
return this.initFunction(r), this.options.ecmaVersion >= 6 && (r.generator = e), this.options.ecmaVersion >= 8 && (r.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Dt(t, r.generator) | xt | (n ? St : 0)), this.expect(M.parenL), r.params = this.parseBindingList(M.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(r, !1, !0, !1), this.yieldPos = i, this.awaitPos = a, this.awaitIdentPos = o, this.finishNode(r, "FunctionExpression");
|
|
2796
2787
|
}, H.parseArrowExpression = function(e, t, n, r) {
|
|
2797
2788
|
var i = this.yieldPos, a = this.awaitPos, o = this.awaitIdentPos;
|
|
2798
|
-
return this.enterScope(
|
|
2789
|
+
return this.enterScope(Dt(n, !1) | yt), this.initFunction(e), this.options.ecmaVersion >= 8 && (e.async = !!n), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, e.params = this.toAssignableList(t, !0), this.parseFunctionBody(e, !0, !1, r), this.yieldPos = i, this.awaitPos = a, this.awaitIdentPos = o, this.finishNode(e, "ArrowFunctionExpression");
|
|
2799
2790
|
}, H.parseFunctionBody = function(e, t, n, r) {
|
|
2800
2791
|
var i = t && this.type !== M.braceL, a = this.strict, o = !1;
|
|
2801
2792
|
if (i) e.body = this.parseMaybeAssign(r), e.expression = !0, this.checkParams(e, !1);
|
|
@@ -2803,7 +2794,7 @@ H.parseNew = function() {
|
|
|
2803
2794
|
var s = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(e.params);
|
|
2804
2795
|
(!a || s) && (o = this.strictDirective(this.end), o && s && this.raiseRecoverable(e.start, "Illegal 'use strict' directive in function with non-simple parameter list"));
|
|
2805
2796
|
var c = this.labels;
|
|
2806
|
-
this.labels = [], o && (this.strict = !0), this.checkParams(e, !a && !o && !t && !n && this.isSimpleParamList(e.params)), this.strict && e.id && this.checkLValSimple(e.id,
|
|
2797
|
+
this.labels = [], o && (this.strict = !0), this.checkParams(e, !a && !o && !t && !n && this.isSimpleParamList(e.params)), this.strict && e.id && this.checkLValSimple(e.id, Nt), e.body = this.parseBlock(!1, void 0, o && !a), e.expression = !1, this.adaptDirectivePrologue(e.body.body), this.labels = c;
|
|
2807
2798
|
}
|
|
2808
2799
|
this.exitScope();
|
|
2809
2800
|
}, H.isSimpleParamList = function(e) {
|
|
@@ -2812,7 +2803,7 @@ H.parseNew = function() {
|
|
|
2812
2803
|
}, H.checkParams = function(e, t) {
|
|
2813
2804
|
for (var n = Object.create(null), r = 0, i = e.params; r < i.length; r += 1) {
|
|
2814
2805
|
var a = i[r];
|
|
2815
|
-
this.checkLValInnerPattern(a,
|
|
2806
|
+
this.checkLValInnerPattern(a, kt, t ? null : n);
|
|
2816
2807
|
}
|
|
2817
2808
|
}, H.parseExprList = function(e, t, n, r) {
|
|
2818
2809
|
for (var i = [], a = !0; !this.eat(e);) {
|
|
@@ -2824,7 +2815,7 @@ H.parseNew = function() {
|
|
|
2824
2815
|
return i;
|
|
2825
2816
|
}, H.checkUnreserved = function(e) {
|
|
2826
2817
|
var t = e.start, n = e.end, r = e.name;
|
|
2827
|
-
this.inGenerator && r === "yield" && this.raiseRecoverable(t, "Cannot use 'yield' as identifier inside a generator"), this.inAsync && r === "await" && this.raiseRecoverable(t, "Cannot use 'await' as identifier inside an async function"), !(this.currentThisScope().flags &
|
|
2818
|
+
this.inGenerator && r === "yield" && this.raiseRecoverable(t, "Cannot use 'yield' as identifier inside a generator"), this.inAsync && r === "await" && this.raiseRecoverable(t, "Cannot use 'await' as identifier inside an async function"), !(this.currentThisScope().flags & Et) && r === "arguments" && this.raiseRecoverable(t, "Cannot use 'arguments' in class field initializer"), this.inClassStaticBlock && (r === "arguments" || r === "await") && this.raise(t, "Cannot use " + r + " in class static initialization block"), this.keywords.test(r) && this.raise(t, "Unexpected keyword '" + r + "'"), !(this.options.ecmaVersion < 6 && this.input.slice(t, n).indexOf("\\") !== -1) && (this.strict ? this.reservedWordsStrict : this.reservedWords).test(r) && (!this.inAsync && r === "await" && this.raiseRecoverable(t, "Cannot use keyword 'await' outside an async function"), this.raiseRecoverable(t, "The keyword '" + r + "' is reserved"));
|
|
2828
2819
|
}, H.parseIdent = function(e) {
|
|
2829
2820
|
var t = this.parseIdentNode();
|
|
2830
2821
|
return this.next(!!e), this.finishNode(t, "Identifier"), e || (this.checkUnreserved(t), t.name === "await" && !this.awaitIdentPos && (this.awaitIdentPos = t.start)), t;
|
|
@@ -2843,139 +2834,139 @@ H.parseNew = function() {
|
|
|
2843
2834
|
var t = this.startNode();
|
|
2844
2835
|
return this.next(), t.argument = this.parseMaybeUnary(null, !0, !1, e), this.finishNode(t, "AwaitExpression");
|
|
2845
2836
|
};
|
|
2846
|
-
var
|
|
2847
|
-
|
|
2848
|
-
var n =
|
|
2837
|
+
var Jt = F.prototype;
|
|
2838
|
+
Jt.raise = function(e, t) {
|
|
2839
|
+
var n = ut(this.input, e);
|
|
2849
2840
|
t += " (" + n.line + ":" + n.column + ")", this.sourceFile && (t += " in " + this.sourceFile);
|
|
2850
2841
|
var r = SyntaxError(t);
|
|
2851
2842
|
throw r.pos = e, r.loc = n, r.raisedAt = this.pos, r;
|
|
2852
|
-
},
|
|
2853
|
-
if (this.options.locations) return new
|
|
2843
|
+
}, Jt.raiseRecoverable = Jt.raise, Jt.curPosition = function() {
|
|
2844
|
+
if (this.options.locations) return new ct(this.curLine, this.pos - this.lineStart);
|
|
2854
2845
|
};
|
|
2855
|
-
var
|
|
2846
|
+
var Yt = F.prototype, Xt = function(e) {
|
|
2856
2847
|
this.flags = e, this.var = [], this.lexical = [], this.functions = [];
|
|
2857
2848
|
};
|
|
2858
|
-
|
|
2859
|
-
this.scopeStack.push(new
|
|
2860
|
-
},
|
|
2849
|
+
Yt.enterScope = function(e) {
|
|
2850
|
+
this.scopeStack.push(new Xt(e));
|
|
2851
|
+
}, Yt.exitScope = function() {
|
|
2861
2852
|
this.scopeStack.pop();
|
|
2862
|
-
},
|
|
2863
|
-
return e.flags &
|
|
2864
|
-
},
|
|
2853
|
+
}, Yt.treatFunctionsAsVarInScope = function(e) {
|
|
2854
|
+
return e.flags & gt || !this.inModule && e.flags & ht;
|
|
2855
|
+
}, Yt.declareName = function(e, t, n) {
|
|
2865
2856
|
var r = !1;
|
|
2866
|
-
if (t ===
|
|
2857
|
+
if (t === At) {
|
|
2867
2858
|
var i = this.currentScope();
|
|
2868
|
-
r = i.lexical.indexOf(e) > -1 || i.functions.indexOf(e) > -1 || i.var.indexOf(e) > -1, i.lexical.push(e), this.inModule && i.flags &
|
|
2869
|
-
} else if (t ===
|
|
2870
|
-
else if (t ===
|
|
2859
|
+
r = i.lexical.indexOf(e) > -1 || i.functions.indexOf(e) > -1 || i.var.indexOf(e) > -1, i.lexical.push(e), this.inModule && i.flags & ht && delete this.undefinedExports[e];
|
|
2860
|
+
} else if (t === Mt) this.currentScope().lexical.push(e);
|
|
2861
|
+
else if (t === jt) {
|
|
2871
2862
|
var a = this.currentScope();
|
|
2872
2863
|
r = this.treatFunctionsAsVar ? a.lexical.indexOf(e) > -1 : a.lexical.indexOf(e) > -1 || a.var.indexOf(e) > -1, a.functions.push(e);
|
|
2873
2864
|
} else for (var o = this.scopeStack.length - 1; o >= 0; --o) {
|
|
2874
2865
|
var s = this.scopeStack[o];
|
|
2875
|
-
if (s.lexical.indexOf(e) > -1 && !(s.flags &
|
|
2866
|
+
if (s.lexical.indexOf(e) > -1 && !(s.flags & bt && s.lexical[0] === e) || !this.treatFunctionsAsVarInScope(s) && s.functions.indexOf(e) > -1) {
|
|
2876
2867
|
r = !0;
|
|
2877
2868
|
break;
|
|
2878
2869
|
}
|
|
2879
|
-
if (s.var.push(e), this.inModule && s.flags &
|
|
2870
|
+
if (s.var.push(e), this.inModule && s.flags & ht && delete this.undefinedExports[e], s.flags & Et) break;
|
|
2880
2871
|
}
|
|
2881
2872
|
r && this.raiseRecoverable(n, "Identifier '" + e + "' has already been declared");
|
|
2882
|
-
},
|
|
2873
|
+
}, Yt.checkLocalExport = function(e) {
|
|
2883
2874
|
this.scopeStack[0].lexical.indexOf(e.name) === -1 && this.scopeStack[0].var.indexOf(e.name) === -1 && (this.undefinedExports[e.name] = e);
|
|
2884
|
-
},
|
|
2875
|
+
}, Yt.currentScope = function() {
|
|
2885
2876
|
return this.scopeStack[this.scopeStack.length - 1];
|
|
2886
|
-
},
|
|
2877
|
+
}, Yt.currentVarScope = function() {
|
|
2887
2878
|
for (var e = this.scopeStack.length - 1;; e--) {
|
|
2888
2879
|
var t = this.scopeStack[e];
|
|
2889
|
-
if (t.flags & (
|
|
2880
|
+
if (t.flags & (Et | wt | Ct)) return t;
|
|
2890
2881
|
}
|
|
2891
|
-
},
|
|
2882
|
+
}, Yt.currentThisScope = function() {
|
|
2892
2883
|
for (var e = this.scopeStack.length - 1;; e--) {
|
|
2893
2884
|
var t = this.scopeStack[e];
|
|
2894
|
-
if (t.flags & (
|
|
2885
|
+
if (t.flags & (Et | wt | Ct) && !(t.flags & yt)) return t;
|
|
2895
2886
|
}
|
|
2896
2887
|
};
|
|
2897
|
-
var
|
|
2898
|
-
this.type = "", this.start = t, this.end = 0, e.options.locations && (this.loc = new
|
|
2899
|
-
},
|
|
2900
|
-
|
|
2901
|
-
return new
|
|
2902
|
-
},
|
|
2903
|
-
return new
|
|
2888
|
+
var Zt = function(e, t, n) {
|
|
2889
|
+
this.type = "", this.start = t, this.end = 0, e.options.locations && (this.loc = new lt(e, n)), e.options.directSourceFile && (this.sourceFile = e.options.directSourceFile), e.options.ranges && (this.range = [t, 0]);
|
|
2890
|
+
}, Qt = F.prototype;
|
|
2891
|
+
Qt.startNode = function() {
|
|
2892
|
+
return new Zt(this, this.start, this.startLoc);
|
|
2893
|
+
}, Qt.startNodeAt = function(e, t) {
|
|
2894
|
+
return new Zt(this, e, t);
|
|
2904
2895
|
};
|
|
2905
|
-
function
|
|
2896
|
+
function $t(e, t, n, r) {
|
|
2906
2897
|
return e.type = t, e.end = n, this.options.locations && (e.loc.end = r), this.options.ranges && (e.range[1] = n), e;
|
|
2907
2898
|
}
|
|
2908
|
-
|
|
2909
|
-
return
|
|
2910
|
-
},
|
|
2911
|
-
return
|
|
2912
|
-
},
|
|
2913
|
-
var t = new
|
|
2899
|
+
Qt.finishNode = function(e, t) {
|
|
2900
|
+
return $t.call(this, e, t, this.lastTokEnd, this.lastTokEndLoc);
|
|
2901
|
+
}, Qt.finishNodeAt = function(e, t, n, r) {
|
|
2902
|
+
return $t.call(this, e, t, n, r);
|
|
2903
|
+
}, Qt.copyNode = function(e) {
|
|
2904
|
+
var t = new Zt(this, e.start, this.startLoc);
|
|
2914
2905
|
for (var n in e) t[n] = e[n];
|
|
2915
2906
|
return t;
|
|
2916
2907
|
};
|
|
2917
|
-
var
|
|
2918
|
-
9:
|
|
2919
|
-
10:
|
|
2920
|
-
11:
|
|
2921
|
-
12:
|
|
2922
|
-
13:
|
|
2908
|
+
var en = "Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz", tn = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS", nn = tn + " Extended_Pictographic", rn = nn, an = rn + " EBase EComp EMod EPres ExtPict", on = an, sn = {
|
|
2909
|
+
9: tn,
|
|
2910
|
+
10: nn,
|
|
2911
|
+
11: rn,
|
|
2912
|
+
12: an,
|
|
2913
|
+
13: on,
|
|
2923
2914
|
14: on
|
|
2924
|
-
}, cn =
|
|
2915
|
+
}, cn = {
|
|
2925
2916
|
9: "",
|
|
2926
2917
|
10: "",
|
|
2927
2918
|
11: "",
|
|
2928
2919
|
12: "",
|
|
2929
2920
|
13: "",
|
|
2930
|
-
14:
|
|
2931
|
-
},
|
|
2932
|
-
9:
|
|
2933
|
-
10:
|
|
2934
|
-
11:
|
|
2935
|
-
12:
|
|
2936
|
-
13:
|
|
2937
|
-
14:
|
|
2938
|
-
},
|
|
2939
|
-
function
|
|
2940
|
-
var t =
|
|
2941
|
-
binary:
|
|
2942
|
-
binaryOfStrings:
|
|
2921
|
+
14: "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"
|
|
2922
|
+
}, ln = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu", un = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb", dn = un + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", fn = dn + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", pn = fn + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", mn = pn + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith", hn = {
|
|
2923
|
+
9: un,
|
|
2924
|
+
10: dn,
|
|
2925
|
+
11: fn,
|
|
2926
|
+
12: pn,
|
|
2927
|
+
13: mn,
|
|
2928
|
+
14: mn + " " + en
|
|
2929
|
+
}, gn = {};
|
|
2930
|
+
function _n(e) {
|
|
2931
|
+
var t = gn[e] = {
|
|
2932
|
+
binary: at(sn[e] + " " + ln),
|
|
2933
|
+
binaryOfStrings: at(cn[e]),
|
|
2943
2934
|
nonBinary: {
|
|
2944
|
-
General_Category:
|
|
2945
|
-
Script:
|
|
2935
|
+
General_Category: at(ln),
|
|
2936
|
+
Script: at(hn[e])
|
|
2946
2937
|
}
|
|
2947
2938
|
};
|
|
2948
2939
|
t.nonBinary.Script_Extensions = t.nonBinary.Script, t.nonBinary.gc = t.nonBinary.General_Category, t.nonBinary.sc = t.nonBinary.Script, t.nonBinary.scx = t.nonBinary.Script_Extensions;
|
|
2949
2940
|
}
|
|
2950
|
-
for (var
|
|
2941
|
+
for (var vn = 0, yn = [
|
|
2951
2942
|
9,
|
|
2952
2943
|
10,
|
|
2953
2944
|
11,
|
|
2954
2945
|
12,
|
|
2955
2946
|
13,
|
|
2956
2947
|
14
|
|
2957
|
-
];
|
|
2958
|
-
var
|
|
2959
|
-
|
|
2948
|
+
]; vn < yn.length; vn += 1) {
|
|
2949
|
+
var bn = yn[vn];
|
|
2950
|
+
_n(bn);
|
|
2960
2951
|
}
|
|
2961
|
-
var U = F.prototype,
|
|
2952
|
+
var U = F.prototype, xn = function(e, t) {
|
|
2962
2953
|
this.parent = e, this.base = t || this;
|
|
2963
2954
|
};
|
|
2964
|
-
|
|
2955
|
+
xn.prototype.separatedFrom = function(e) {
|
|
2965
2956
|
for (var t = this; t; t = t.parent) for (var n = e; n; n = n.parent) if (t.base === n.base && t !== n) return !0;
|
|
2966
2957
|
return !1;
|
|
2967
|
-
},
|
|
2968
|
-
return new
|
|
2958
|
+
}, xn.prototype.sibling = function() {
|
|
2959
|
+
return new xn(this.parent, this.base);
|
|
2969
2960
|
};
|
|
2970
|
-
var
|
|
2971
|
-
this.parser = e, this.validFlags = "gim" + (e.options.ecmaVersion >= 6 ? "uy" : "") + (e.options.ecmaVersion >= 9 ? "s" : "") + (e.options.ecmaVersion >= 13 ? "d" : "") + (e.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties =
|
|
2961
|
+
var W = function(e) {
|
|
2962
|
+
this.parser = e, this.validFlags = "gim" + (e.options.ecmaVersion >= 6 ? "uy" : "") + (e.options.ecmaVersion >= 9 ? "s" : "") + (e.options.ecmaVersion >= 13 ? "d" : "") + (e.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties = gn[e.options.ecmaVersion >= 14 ? 14 : e.options.ecmaVersion], this.source = "", this.flags = "", this.start = 0, this.switchU = !1, this.switchV = !1, this.switchN = !1, this.pos = 0, this.lastIntValue = 0, this.lastStringValue = "", this.lastAssertionIsQuantifiable = !1, this.numCapturingParens = 0, this.maxBackReference = 0, this.groupNames = Object.create(null), this.backReferenceNames = [], this.branchID = null;
|
|
2972
2963
|
};
|
|
2973
|
-
|
|
2964
|
+
W.prototype.reset = function(e, t, n) {
|
|
2974
2965
|
var r = n.indexOf("v") !== -1, i = n.indexOf("u") !== -1;
|
|
2975
2966
|
this.start = e | 0, this.source = t + "", this.flags = n, r && this.parser.options.ecmaVersion >= 15 ? (this.switchU = !0, this.switchV = !0, this.switchN = !0) : (this.switchU = i && this.parser.options.ecmaVersion >= 6, this.switchV = !1, this.switchN = i && this.parser.options.ecmaVersion >= 9);
|
|
2976
|
-
},
|
|
2967
|
+
}, W.prototype.raise = function(e) {
|
|
2977
2968
|
this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + e);
|
|
2978
|
-
},
|
|
2969
|
+
}, W.prototype.at = function(e, t) {
|
|
2979
2970
|
t === void 0 && (t = !1);
|
|
2980
2971
|
var n = this.source, r = n.length;
|
|
2981
2972
|
if (e >= r) return -1;
|
|
@@ -2983,21 +2974,21 @@ wn.prototype.reset = function(e, t, n) {
|
|
|
2983
2974
|
if (!(t || this.switchU) || i <= 55295 || i >= 57344 || e + 1 >= r) return i;
|
|
2984
2975
|
var a = n.charCodeAt(e + 1);
|
|
2985
2976
|
return a >= 56320 && a <= 57343 ? (i << 10) + a - 56613888 : i;
|
|
2986
|
-
},
|
|
2977
|
+
}, W.prototype.nextIndex = function(e, t) {
|
|
2987
2978
|
t === void 0 && (t = !1);
|
|
2988
2979
|
var n = this.source, r = n.length;
|
|
2989
2980
|
if (e >= r) return r;
|
|
2990
2981
|
var i = n.charCodeAt(e), a;
|
|
2991
2982
|
return !(t || this.switchU) || i <= 55295 || i >= 57344 || e + 1 >= r || (a = n.charCodeAt(e + 1)) < 56320 || a > 57343 ? e + 1 : e + 2;
|
|
2992
|
-
},
|
|
2983
|
+
}, W.prototype.current = function(e) {
|
|
2993
2984
|
return e === void 0 && (e = !1), this.at(this.pos, e);
|
|
2994
|
-
},
|
|
2985
|
+
}, W.prototype.lookahead = function(e) {
|
|
2995
2986
|
return e === void 0 && (e = !1), this.at(this.nextIndex(this.pos, e), e);
|
|
2996
|
-
},
|
|
2987
|
+
}, W.prototype.advance = function(e) {
|
|
2997
2988
|
e === void 0 && (e = !1), this.pos = this.nextIndex(this.pos, e);
|
|
2998
|
-
},
|
|
2989
|
+
}, W.prototype.eat = function(e, t) {
|
|
2999
2990
|
return t === void 0 && (t = !1), this.current(t) === e ? (this.advance(t), !0) : !1;
|
|
3000
|
-
},
|
|
2991
|
+
}, W.prototype.eatChars = function(e, t) {
|
|
3001
2992
|
t === void 0 && (t = !1);
|
|
3002
2993
|
for (var n = this.pos, r = 0, i = e; r < i.length; r += 1) {
|
|
3003
2994
|
var a = i[r], o = this.at(n, t);
|
|
@@ -3012,12 +3003,12 @@ wn.prototype.reset = function(e, t, n) {
|
|
|
3012
3003
|
}
|
|
3013
3004
|
this.options.ecmaVersion >= 15 && r && i && this.raise(e.start, "Invalid regular expression flag");
|
|
3014
3005
|
};
|
|
3015
|
-
function
|
|
3006
|
+
function Sn(e) {
|
|
3016
3007
|
for (var t in e) return !0;
|
|
3017
3008
|
return !1;
|
|
3018
3009
|
}
|
|
3019
3010
|
U.validateRegExpPattern = function(e) {
|
|
3020
|
-
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 &&
|
|
3011
|
+
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 && Sn(e.groupNames) && (e.switchN = !0, this.regexp_pattern(e));
|
|
3021
3012
|
}, U.regexp_pattern = function(e) {
|
|
3022
3013
|
e.pos = 0, e.lastIntValue = 0, e.lastStringValue = "", e.lastAssertionIsQuantifiable = !1, e.numCapturingParens = 0, e.maxBackReference = 0, e.groupNames = Object.create(null), e.backReferenceNames.length = 0, e.branchID = null, this.regexp_disjunction(e), e.pos !== e.source.length && (e.eat(41) && e.raise("Unmatched ')'"), (e.eat(93) || e.eat(125)) && e.raise("Lone quantifier brackets")), e.maxBackReference > e.numCapturingParens && e.raise("Invalid escape");
|
|
3023
3014
|
for (var t = 0, n = e.backReferenceNames; t < n.length; t += 1) {
|
|
@@ -3026,7 +3017,7 @@ U.validateRegExpPattern = function(e) {
|
|
|
3026
3017
|
}
|
|
3027
3018
|
}, U.regexp_disjunction = function(e) {
|
|
3028
3019
|
var t = this.options.ecmaVersion >= 16;
|
|
3029
|
-
for (t && (e.branchID = new
|
|
3020
|
+
for (t && (e.branchID = new xn(e.branchID, null)), this.regexp_alternative(e); e.eat(124);) t && (e.branchID = e.branchID.sibling()), this.regexp_alternative(e);
|
|
3030
3021
|
t && (e.branchID = e.branchID.parent), this.regexp_eatQuantifier(e, !0) && e.raise("Nothing to repeat"), e.eat(123) && e.raise("Lone quantifier brackets");
|
|
3031
3022
|
}, U.regexp_alternative = function(e) {
|
|
3032
3023
|
for (; e.pos < e.source.length && this.regexp_eatTerm(e););
|
|
@@ -3101,10 +3092,10 @@ U.validateRegExpPattern = function(e) {
|
|
|
3101
3092
|
}
|
|
3102
3093
|
return !1;
|
|
3103
3094
|
}, U.regexp_eatModifiers = function(e) {
|
|
3104
|
-
for (var t = "", n = 0; (n = e.current()) !== -1 &&
|
|
3095
|
+
for (var t = "", n = 0; (n = e.current()) !== -1 && Cn(n);) t += ot(n), e.advance();
|
|
3105
3096
|
return t;
|
|
3106
3097
|
};
|
|
3107
|
-
function
|
|
3098
|
+
function Cn(e) {
|
|
3108
3099
|
return e === 105 || e === 109 || e === 115;
|
|
3109
3100
|
}
|
|
3110
3101
|
U.regexp_eatExtendedAtom = function(e) {
|
|
@@ -3113,13 +3104,13 @@ U.regexp_eatExtendedAtom = function(e) {
|
|
|
3113
3104
|
return this.regexp_eatBracedQuantifier(e, !0) && e.raise("Nothing to repeat"), !1;
|
|
3114
3105
|
}, U.regexp_eatSyntaxCharacter = function(e) {
|
|
3115
3106
|
var t = e.current();
|
|
3116
|
-
return
|
|
3107
|
+
return wn(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
3117
3108
|
};
|
|
3118
|
-
function
|
|
3109
|
+
function wn(e) {
|
|
3119
3110
|
return e === 36 || e >= 40 && e <= 43 || e === 46 || e === 63 || e >= 91 && e <= 94 || e >= 123 && e <= 125;
|
|
3120
3111
|
}
|
|
3121
3112
|
U.regexp_eatPatternCharacters = function(e) {
|
|
3122
|
-
for (var t = e.pos, n = 0; (n = e.current()) !== -1 && !
|
|
3113
|
+
for (var t = e.pos, n = 0; (n = e.current()) !== -1 && !wn(n);) e.advance();
|
|
3123
3114
|
return e.pos !== t;
|
|
3124
3115
|
}, U.regexp_eatExtendedPatternCharacter = function(e) {
|
|
3125
3116
|
var t = e.current();
|
|
@@ -3140,23 +3131,23 @@ U.regexp_eatPatternCharacters = function(e) {
|
|
|
3140
3131
|
return !1;
|
|
3141
3132
|
}, U.regexp_eatRegExpIdentifierName = function(e) {
|
|
3142
3133
|
if (e.lastStringValue = "", this.regexp_eatRegExpIdentifierStart(e)) {
|
|
3143
|
-
for (e.lastStringValue +=
|
|
3134
|
+
for (e.lastStringValue += ot(e.lastIntValue); this.regexp_eatRegExpIdentifierPart(e);) e.lastStringValue += ot(e.lastIntValue);
|
|
3144
3135
|
return !0;
|
|
3145
3136
|
}
|
|
3146
3137
|
return !1;
|
|
3147
3138
|
}, U.regexp_eatRegExpIdentifierStart = function(e) {
|
|
3148
3139
|
var t = e.pos, n = this.options.ecmaVersion >= 11, r = e.current(n);
|
|
3149
|
-
return e.advance(n), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, n) && (r = e.lastIntValue),
|
|
3140
|
+
return e.advance(n), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, n) && (r = e.lastIntValue), Tn(r) ? (e.lastIntValue = r, !0) : (e.pos = t, !1);
|
|
3150
3141
|
};
|
|
3151
|
-
function
|
|
3142
|
+
function Tn(e) {
|
|
3152
3143
|
return E(e, !0) || e === 36 || e === 95;
|
|
3153
3144
|
}
|
|
3154
3145
|
U.regexp_eatRegExpIdentifierPart = function(e) {
|
|
3155
3146
|
var t = e.pos, n = this.options.ecmaVersion >= 11, r = e.current(n);
|
|
3156
|
-
return e.advance(n), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, n) && (r = e.lastIntValue),
|
|
3147
|
+
return e.advance(n), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, n) && (r = e.lastIntValue), En(r) ? (e.lastIntValue = r, !0) : (e.pos = t, !1);
|
|
3157
3148
|
};
|
|
3158
|
-
function
|
|
3159
|
-
return
|
|
3149
|
+
function En(e) {
|
|
3150
|
+
return qe(e, !0) || e === 36 || e === 95 || e === 8204 || e === 8205;
|
|
3160
3151
|
}
|
|
3161
3152
|
U.regexp_eatAtomEscape = function(e) {
|
|
3162
3153
|
return this.regexp_eatBackReference(e) || this.regexp_eatCharacterClassEscape(e) || this.regexp_eatCharacterEscape(e) || e.switchN && this.regexp_eatKGroupName(e) ? !0 : (e.switchU && (e.current() === 99 && e.raise("Invalid unicode escape"), e.raise("Invalid escape")), !1);
|
|
@@ -3185,15 +3176,15 @@ U.regexp_eatAtomEscape = function(e) {
|
|
|
3185
3176
|
}
|
|
3186
3177
|
return !1;
|
|
3187
3178
|
}, U.regexp_eatZero = function(e) {
|
|
3188
|
-
return e.current() === 48 && !
|
|
3179
|
+
return e.current() === 48 && !Ln(e.lookahead()) ? (e.lastIntValue = 0, e.advance(), !0) : !1;
|
|
3189
3180
|
}, U.regexp_eatControlEscape = function(e) {
|
|
3190
3181
|
var t = e.current();
|
|
3191
3182
|
return t === 116 ? (e.lastIntValue = 9, e.advance(), !0) : t === 110 ? (e.lastIntValue = 10, e.advance(), !0) : t === 118 ? (e.lastIntValue = 11, e.advance(), !0) : t === 102 ? (e.lastIntValue = 12, e.advance(), !0) : t === 114 ? (e.lastIntValue = 13, e.advance(), !0) : !1;
|
|
3192
3183
|
}, U.regexp_eatControlLetter = function(e) {
|
|
3193
3184
|
var t = e.current();
|
|
3194
|
-
return
|
|
3185
|
+
return Dn(t) ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
|
|
3195
3186
|
};
|
|
3196
|
-
function
|
|
3187
|
+
function Dn(e) {
|
|
3197
3188
|
return e >= 65 && e <= 90 || e >= 97 && e <= 122;
|
|
3198
3189
|
}
|
|
3199
3190
|
U.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
@@ -3212,12 +3203,12 @@ U.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
|
3212
3203
|
}
|
|
3213
3204
|
return !0;
|
|
3214
3205
|
}
|
|
3215
|
-
if (r && e.eat(123) && this.regexp_eatHexDigits(e) && e.eat(125) &&
|
|
3206
|
+
if (r && e.eat(123) && this.regexp_eatHexDigits(e) && e.eat(125) && On(e.lastIntValue)) return !0;
|
|
3216
3207
|
r && e.raise("Invalid unicode escape"), e.pos = n;
|
|
3217
3208
|
}
|
|
3218
3209
|
return !1;
|
|
3219
3210
|
};
|
|
3220
|
-
function
|
|
3211
|
+
function On(e) {
|
|
3221
3212
|
return e >= 0 && e <= 1114111;
|
|
3222
3213
|
}
|
|
3223
3214
|
U.regexp_eatIdentityEscape = function(e) {
|
|
@@ -3235,20 +3226,20 @@ U.regexp_eatIdentityEscape = function(e) {
|
|
|
3235
3226
|
}
|
|
3236
3227
|
return !1;
|
|
3237
3228
|
};
|
|
3238
|
-
var
|
|
3229
|
+
var kn = 0, An = 1, G = 2;
|
|
3239
3230
|
U.regexp_eatCharacterClassEscape = function(e) {
|
|
3240
3231
|
var t = e.current();
|
|
3241
|
-
if (
|
|
3232
|
+
if (jn(t)) return e.lastIntValue = -1, e.advance(), An;
|
|
3242
3233
|
var n = !1;
|
|
3243
3234
|
if (e.switchU && this.options.ecmaVersion >= 9 && ((n = t === 80) || t === 112)) {
|
|
3244
3235
|
e.lastIntValue = -1, e.advance();
|
|
3245
3236
|
var r;
|
|
3246
|
-
if (e.eat(123) && (r = this.regexp_eatUnicodePropertyValueExpression(e)) && e.eat(125)) return n && r ===
|
|
3237
|
+
if (e.eat(123) && (r = this.regexp_eatUnicodePropertyValueExpression(e)) && e.eat(125)) return n && r === G && e.raise("Invalid property name"), r;
|
|
3247
3238
|
e.raise("Invalid property name");
|
|
3248
3239
|
}
|
|
3249
|
-
return
|
|
3240
|
+
return kn;
|
|
3250
3241
|
};
|
|
3251
|
-
function
|
|
3242
|
+
function jn(e) {
|
|
3252
3243
|
return e === 100 || e === 68 || e === 115 || e === 83 || e === 119 || e === 87;
|
|
3253
3244
|
}
|
|
3254
3245
|
U.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
@@ -3257,46 +3248,46 @@ U.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
|
3257
3248
|
var n = e.lastStringValue;
|
|
3258
3249
|
if (this.regexp_eatUnicodePropertyValue(e)) {
|
|
3259
3250
|
var r = e.lastStringValue;
|
|
3260
|
-
return this.regexp_validateUnicodePropertyNameAndValue(e, n, r),
|
|
3251
|
+
return this.regexp_validateUnicodePropertyNameAndValue(e, n, r), An;
|
|
3261
3252
|
}
|
|
3262
3253
|
}
|
|
3263
3254
|
if (e.pos = t, this.regexp_eatLoneUnicodePropertyNameOrValue(e)) {
|
|
3264
3255
|
var i = e.lastStringValue;
|
|
3265
3256
|
return this.regexp_validateUnicodePropertyNameOrValue(e, i);
|
|
3266
3257
|
}
|
|
3267
|
-
return
|
|
3258
|
+
return kn;
|
|
3268
3259
|
}, U.regexp_validateUnicodePropertyNameAndValue = function(e, t, n) {
|
|
3269
|
-
|
|
3260
|
+
nt(e.unicodeProperties.nonBinary, t) || e.raise("Invalid property name"), e.unicodeProperties.nonBinary[t].test(n) || e.raise("Invalid property value");
|
|
3270
3261
|
}, U.regexp_validateUnicodePropertyNameOrValue = function(e, t) {
|
|
3271
|
-
if (e.unicodeProperties.binary.test(t)) return
|
|
3272
|
-
if (e.switchV && e.unicodeProperties.binaryOfStrings.test(t)) return
|
|
3262
|
+
if (e.unicodeProperties.binary.test(t)) return An;
|
|
3263
|
+
if (e.switchV && e.unicodeProperties.binaryOfStrings.test(t)) return G;
|
|
3273
3264
|
e.raise("Invalid property name");
|
|
3274
3265
|
}, U.regexp_eatUnicodePropertyName = function(e) {
|
|
3275
3266
|
var t = 0;
|
|
3276
|
-
for (e.lastStringValue = "";
|
|
3267
|
+
for (e.lastStringValue = ""; Mn(t = e.current());) e.lastStringValue += ot(t), e.advance();
|
|
3277
3268
|
return e.lastStringValue !== "";
|
|
3278
3269
|
};
|
|
3279
|
-
function
|
|
3280
|
-
return
|
|
3270
|
+
function Mn(e) {
|
|
3271
|
+
return Dn(e) || e === 95;
|
|
3281
3272
|
}
|
|
3282
3273
|
U.regexp_eatUnicodePropertyValue = function(e) {
|
|
3283
3274
|
var t = 0;
|
|
3284
|
-
for (e.lastStringValue = "";
|
|
3275
|
+
for (e.lastStringValue = ""; Nn(t = e.current());) e.lastStringValue += ot(t), e.advance();
|
|
3285
3276
|
return e.lastStringValue !== "";
|
|
3286
3277
|
};
|
|
3287
|
-
function
|
|
3288
|
-
return
|
|
3278
|
+
function Nn(e) {
|
|
3279
|
+
return Mn(e) || Ln(e);
|
|
3289
3280
|
}
|
|
3290
3281
|
U.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
3291
3282
|
return this.regexp_eatUnicodePropertyValue(e);
|
|
3292
3283
|
}, U.regexp_eatCharacterClass = function(e) {
|
|
3293
3284
|
if (e.eat(91)) {
|
|
3294
3285
|
var t = e.eat(94), n = this.regexp_classContents(e);
|
|
3295
|
-
return e.eat(93) || e.raise("Unterminated character class"), t && n ===
|
|
3286
|
+
return e.eat(93) || e.raise("Unterminated character class"), t && n === G && e.raise("Negated character class may contain strings"), !0;
|
|
3296
3287
|
}
|
|
3297
3288
|
return !1;
|
|
3298
3289
|
}, U.regexp_classContents = function(e) {
|
|
3299
|
-
return e.current() === 93 ?
|
|
3290
|
+
return e.current() === 93 ? An : e.switchV ? this.regexp_classSetExpression(e) : (this.regexp_nonEmptyClassRanges(e), An);
|
|
3300
3291
|
}, U.regexp_nonEmptyClassRanges = function(e) {
|
|
3301
3292
|
for (; this.regexp_eatClassAtom(e);) {
|
|
3302
3293
|
var t = e.lastIntValue;
|
|
@@ -3311,7 +3302,7 @@ U.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
|
3311
3302
|
if (this.regexp_eatClassEscape(e)) return !0;
|
|
3312
3303
|
if (e.switchU) {
|
|
3313
3304
|
var n = e.current();
|
|
3314
|
-
(n === 99 ||
|
|
3305
|
+
(n === 99 || Bn(n)) && e.raise("Invalid class escape"), e.raise("Invalid escape");
|
|
3315
3306
|
}
|
|
3316
3307
|
e.pos = t;
|
|
3317
3308
|
}
|
|
@@ -3327,12 +3318,12 @@ U.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
|
3327
3318
|
}
|
|
3328
3319
|
return this.regexp_eatCharacterClassEscape(e) || this.regexp_eatCharacterEscape(e);
|
|
3329
3320
|
}, U.regexp_classSetExpression = function(e) {
|
|
3330
|
-
var t =
|
|
3321
|
+
var t = An, n;
|
|
3331
3322
|
if (!this.regexp_eatClassSetRange(e)) if (n = this.regexp_eatClassSetOperand(e)) {
|
|
3332
|
-
n ===
|
|
3323
|
+
n === G && (t = G);
|
|
3333
3324
|
for (var r = e.pos; e.eatChars([38, 38]);) {
|
|
3334
3325
|
if (e.current() !== 38 && (n = this.regexp_eatClassSetOperand(e))) {
|
|
3335
|
-
n !==
|
|
3326
|
+
n !== G && (t = An);
|
|
3336
3327
|
continue;
|
|
3337
3328
|
}
|
|
3338
3329
|
e.raise("Invalid character in character class");
|
|
@@ -3343,7 +3334,7 @@ U.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
|
3343
3334
|
} else e.raise("Invalid character in character class");
|
|
3344
3335
|
for (;;) if (!this.regexp_eatClassSetRange(e)) {
|
|
3345
3336
|
if (n = this.regexp_eatClassSetOperand(e), !n) return t;
|
|
3346
|
-
n ===
|
|
3337
|
+
n === G && (t = G);
|
|
3347
3338
|
}
|
|
3348
3339
|
}, U.regexp_eatClassSetRange = function(e) {
|
|
3349
3340
|
var t = e.pos;
|
|
@@ -3357,12 +3348,12 @@ U.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
|
3357
3348
|
}
|
|
3358
3349
|
return !1;
|
|
3359
3350
|
}, U.regexp_eatClassSetOperand = function(e) {
|
|
3360
|
-
return this.regexp_eatClassSetCharacter(e) ?
|
|
3351
|
+
return this.regexp_eatClassSetCharacter(e) ? An : this.regexp_eatClassStringDisjunction(e) || this.regexp_eatNestedClass(e);
|
|
3361
3352
|
}, U.regexp_eatNestedClass = function(e) {
|
|
3362
3353
|
var t = e.pos;
|
|
3363
3354
|
if (e.eat(91)) {
|
|
3364
3355
|
var n = e.eat(94), r = this.regexp_classContents(e);
|
|
3365
|
-
if (e.eat(93)) return n && r ===
|
|
3356
|
+
if (e.eat(93)) return n && r === G && e.raise("Negated character class may contain strings"), r;
|
|
3366
3357
|
e.pos = t;
|
|
3367
3358
|
}
|
|
3368
3359
|
if (e.eat(92)) {
|
|
@@ -3382,33 +3373,33 @@ U.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
|
3382
3373
|
}
|
|
3383
3374
|
return null;
|
|
3384
3375
|
}, U.regexp_classStringDisjunctionContents = function(e) {
|
|
3385
|
-
for (var t = this.regexp_classString(e); e.eat(124);) this.regexp_classString(e) ===
|
|
3376
|
+
for (var t = this.regexp_classString(e); e.eat(124);) this.regexp_classString(e) === G && (t = G);
|
|
3386
3377
|
return t;
|
|
3387
3378
|
}, U.regexp_classString = function(e) {
|
|
3388
3379
|
for (var t = 0; this.regexp_eatClassSetCharacter(e);) t++;
|
|
3389
|
-
return t === 1 ?
|
|
3380
|
+
return t === 1 ? An : G;
|
|
3390
3381
|
}, U.regexp_eatClassSetCharacter = function(e) {
|
|
3391
3382
|
var t = e.pos;
|
|
3392
3383
|
if (e.eat(92)) return this.regexp_eatCharacterEscape(e) || this.regexp_eatClassSetReservedPunctuator(e) ? !0 : e.eat(98) ? (e.lastIntValue = 8, !0) : (e.pos = t, !1);
|
|
3393
3384
|
var n = e.current();
|
|
3394
|
-
return n < 0 || n === e.lookahead() &&
|
|
3385
|
+
return n < 0 || n === e.lookahead() && Pn(n) || Fn(n) ? !1 : (e.advance(), e.lastIntValue = n, !0);
|
|
3395
3386
|
};
|
|
3396
|
-
function
|
|
3387
|
+
function Pn(e) {
|
|
3397
3388
|
return e === 33 || e >= 35 && e <= 38 || e >= 42 && e <= 44 || e === 46 || e >= 58 && e <= 64 || e === 94 || e === 96 || e === 126;
|
|
3398
3389
|
}
|
|
3399
|
-
function
|
|
3390
|
+
function Fn(e) {
|
|
3400
3391
|
return e === 40 || e === 41 || e === 45 || e === 47 || e >= 91 && e <= 93 || e >= 123 && e <= 125;
|
|
3401
3392
|
}
|
|
3402
3393
|
U.regexp_eatClassSetReservedPunctuator = function(e) {
|
|
3403
3394
|
var t = e.current();
|
|
3404
|
-
return
|
|
3395
|
+
return In(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
3405
3396
|
};
|
|
3406
|
-
function
|
|
3397
|
+
function In(e) {
|
|
3407
3398
|
return e === 33 || e === 35 || e === 37 || e === 38 || e === 44 || e === 45 || e >= 58 && e <= 62 || e === 64 || e === 96 || e === 126;
|
|
3408
3399
|
}
|
|
3409
3400
|
U.regexp_eatClassControlLetter = function(e) {
|
|
3410
3401
|
var t = e.current();
|
|
3411
|
-
return
|
|
3402
|
+
return Ln(t) || t === 95 ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
|
|
3412
3403
|
}, U.regexp_eatHexEscapeSequence = function(e) {
|
|
3413
3404
|
var t = e.pos;
|
|
3414
3405
|
if (e.eat(120)) {
|
|
@@ -3418,21 +3409,21 @@ U.regexp_eatClassControlLetter = function(e) {
|
|
|
3418
3409
|
return !1;
|
|
3419
3410
|
}, U.regexp_eatDecimalDigits = function(e) {
|
|
3420
3411
|
var t = e.pos, n = 0;
|
|
3421
|
-
for (e.lastIntValue = 0;
|
|
3412
|
+
for (e.lastIntValue = 0; Ln(n = e.current());) e.lastIntValue = 10 * e.lastIntValue + (n - 48), e.advance();
|
|
3422
3413
|
return e.pos !== t;
|
|
3423
3414
|
};
|
|
3424
|
-
function
|
|
3415
|
+
function Ln(e) {
|
|
3425
3416
|
return e >= 48 && e <= 57;
|
|
3426
3417
|
}
|
|
3427
3418
|
U.regexp_eatHexDigits = function(e) {
|
|
3428
3419
|
var t = e.pos, n = 0;
|
|
3429
|
-
for (e.lastIntValue = 0;
|
|
3420
|
+
for (e.lastIntValue = 0; Rn(n = e.current());) e.lastIntValue = 16 * e.lastIntValue + zn(n), e.advance();
|
|
3430
3421
|
return e.pos !== t;
|
|
3431
3422
|
};
|
|
3432
|
-
function
|
|
3423
|
+
function Rn(e) {
|
|
3433
3424
|
return e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102;
|
|
3434
3425
|
}
|
|
3435
|
-
function
|
|
3426
|
+
function zn(e) {
|
|
3436
3427
|
return e >= 65 && e <= 70 ? 10 + (e - 65) : e >= 97 && e <= 102 ? 10 + (e - 97) : e - 48;
|
|
3437
3428
|
}
|
|
3438
3429
|
U.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
@@ -3447,9 +3438,9 @@ U.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
|
3447
3438
|
return !1;
|
|
3448
3439
|
}, U.regexp_eatOctalDigit = function(e) {
|
|
3449
3440
|
var t = e.current();
|
|
3450
|
-
return
|
|
3441
|
+
return Bn(t) ? (e.lastIntValue = t - 48, e.advance(), !0) : (e.lastIntValue = 0, !1);
|
|
3451
3442
|
};
|
|
3452
|
-
function
|
|
3443
|
+
function Bn(e) {
|
|
3453
3444
|
return e >= 48 && e <= 55;
|
|
3454
3445
|
}
|
|
3455
3446
|
U.regexp_eatFixedHexDigits = function(e, t) {
|
|
@@ -3457,19 +3448,19 @@ U.regexp_eatFixedHexDigits = function(e, t) {
|
|
|
3457
3448
|
e.lastIntValue = 0;
|
|
3458
3449
|
for (var r = 0; r < t; ++r) {
|
|
3459
3450
|
var i = e.current();
|
|
3460
|
-
if (!
|
|
3461
|
-
e.lastIntValue = 16 * e.lastIntValue +
|
|
3451
|
+
if (!Rn(i)) return e.pos = n, !1;
|
|
3452
|
+
e.lastIntValue = 16 * e.lastIntValue + zn(i), e.advance();
|
|
3462
3453
|
}
|
|
3463
3454
|
return !0;
|
|
3464
3455
|
};
|
|
3465
|
-
var
|
|
3466
|
-
this.type = e.type, this.value = e.value, this.start = e.start, this.end = e.end, e.options.locations && (this.loc = new
|
|
3467
|
-
},
|
|
3468
|
-
|
|
3469
|
-
!e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new
|
|
3470
|
-
},
|
|
3471
|
-
return this.next(), new
|
|
3472
|
-
}, typeof Symbol < "u" && (
|
|
3456
|
+
var Vn = function(e) {
|
|
3457
|
+
this.type = e.type, this.value = e.value, this.start = e.start, this.end = e.end, e.options.locations && (this.loc = new lt(e, e.startLoc, e.endLoc)), e.options.ranges && (this.range = [e.start, e.end]);
|
|
3458
|
+
}, K = F.prototype;
|
|
3459
|
+
K.next = function(e) {
|
|
3460
|
+
!e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new Vn(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
|
|
3461
|
+
}, K.getToken = function() {
|
|
3462
|
+
return this.next(), new Vn(this);
|
|
3463
|
+
}, typeof Symbol < "u" && (K[Symbol.iterator] = function() {
|
|
3473
3464
|
var e = this;
|
|
3474
3465
|
return { next: function() {
|
|
3475
3466
|
var t = e.getToken();
|
|
@@ -3478,28 +3469,28 @@ G.next = function(e) {
|
|
|
3478
3469
|
value: t
|
|
3479
3470
|
};
|
|
3480
3471
|
} };
|
|
3481
|
-
}),
|
|
3472
|
+
}), K.nextToken = function() {
|
|
3482
3473
|
var e = this.curContext();
|
|
3483
3474
|
if ((!e || !e.preserveSpace) && this.skipSpace(), this.start = this.pos, this.options.locations && (this.startLoc = this.curPosition()), this.pos >= this.input.length) return this.finishToken(M.eof);
|
|
3484
3475
|
if (e.override) return e.override(this);
|
|
3485
3476
|
this.readToken(this.fullCharCodeAtPos());
|
|
3486
|
-
},
|
|
3477
|
+
}, K.readToken = function(e) {
|
|
3487
3478
|
return E(e, this.options.ecmaVersion >= 6) || e === 92 ? this.readWord() : this.getTokenFromCode(e);
|
|
3488
|
-
},
|
|
3479
|
+
}, K.fullCharCodeAt = function(e) {
|
|
3489
3480
|
var t = this.input.charCodeAt(e);
|
|
3490
3481
|
if (t <= 55295 || t >= 56320) return t;
|
|
3491
3482
|
var n = this.input.charCodeAt(e + 1);
|
|
3492
3483
|
return n <= 56319 || n >= 57344 ? t : (t << 10) + n - 56613888;
|
|
3493
|
-
},
|
|
3484
|
+
}, K.fullCharCodeAtPos = function() {
|
|
3494
3485
|
return this.fullCharCodeAt(this.pos);
|
|
3495
|
-
},
|
|
3486
|
+
}, K.skipBlockComment = function() {
|
|
3496
3487
|
var e = this.options.onComment && this.curPosition(), t = this.pos, n = this.input.indexOf("*/", this.pos += 2);
|
|
3497
|
-
if (n === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = n + 2, this.options.locations) for (var r = void 0, i = t; (r =
|
|
3488
|
+
if (n === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = n + 2, this.options.locations) for (var r = void 0, i = t; (r = Ze(this.input, i, this.pos)) > -1;) ++this.curLine, i = this.lineStart = r;
|
|
3498
3489
|
this.options.onComment && this.options.onComment(!0, this.input.slice(t + 2, n), t, this.pos, e, this.curPosition());
|
|
3499
|
-
},
|
|
3500
|
-
for (var t = this.pos, n = this.options.onComment && this.curPosition(), r = this.input.charCodeAt(this.pos += e); this.pos < this.input.length && !
|
|
3490
|
+
}, K.skipLineComment = function(e) {
|
|
3491
|
+
for (var t = this.pos, n = this.options.onComment && this.curPosition(), r = this.input.charCodeAt(this.pos += e); this.pos < this.input.length && !Xe(r);) r = this.input.charCodeAt(++this.pos);
|
|
3501
3492
|
this.options.onComment && this.options.onComment(!1, this.input.slice(t + e, this.pos), t, this.pos, n, this.curPosition());
|
|
3502
|
-
},
|
|
3493
|
+
}, K.skipSpace = function() {
|
|
3503
3494
|
loop: for (; this.pos < this.input.length;) {
|
|
3504
3495
|
var e = this.input.charCodeAt(this.pos);
|
|
3505
3496
|
switch (e) {
|
|
@@ -3524,40 +3515,40 @@ G.next = function(e) {
|
|
|
3524
3515
|
default: break loop;
|
|
3525
3516
|
}
|
|
3526
3517
|
break;
|
|
3527
|
-
default: if (e > 8 && e < 14 || e >= 5760 &&
|
|
3518
|
+
default: if (e > 8 && e < 14 || e >= 5760 && Qe.test(String.fromCharCode(e))) ++this.pos;
|
|
3528
3519
|
else break loop;
|
|
3529
3520
|
}
|
|
3530
3521
|
}
|
|
3531
|
-
},
|
|
3522
|
+
}, K.finishToken = function(e, t) {
|
|
3532
3523
|
this.end = this.pos, this.options.locations && (this.endLoc = this.curPosition());
|
|
3533
3524
|
var n = this.type;
|
|
3534
3525
|
this.type = e, this.value = t, this.updateContext(n);
|
|
3535
|
-
},
|
|
3526
|
+
}, K.readToken_dot = function() {
|
|
3536
3527
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
3537
3528
|
if (e >= 48 && e <= 57) return this.readNumber(!0);
|
|
3538
3529
|
var t = this.input.charCodeAt(this.pos + 2);
|
|
3539
3530
|
return this.options.ecmaVersion >= 6 && e === 46 && t === 46 ? (this.pos += 3, this.finishToken(M.ellipsis)) : (++this.pos, this.finishToken(M.dot));
|
|
3540
|
-
},
|
|
3531
|
+
}, K.readToken_slash = function() {
|
|
3541
3532
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
3542
3533
|
return this.exprAllowed ? (++this.pos, this.readRegexp()) : e === 61 ? this.finishOp(M.assign, 2) : this.finishOp(M.slash, 1);
|
|
3543
|
-
},
|
|
3534
|
+
}, K.readToken_mult_modulo_exp = function(e) {
|
|
3544
3535
|
var t = this.input.charCodeAt(this.pos + 1), n = 1, r = e === 42 ? M.star : M.modulo;
|
|
3545
3536
|
return this.options.ecmaVersion >= 7 && e === 42 && t === 42 && (++n, r = M.starstar, t = this.input.charCodeAt(this.pos + 2)), t === 61 ? this.finishOp(M.assign, n + 1) : this.finishOp(r, n);
|
|
3546
|
-
},
|
|
3537
|
+
}, K.readToken_pipe_amp = function(e) {
|
|
3547
3538
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
3548
3539
|
return t === e ? this.options.ecmaVersion >= 12 && this.input.charCodeAt(this.pos + 2) === 61 ? this.finishOp(M.assign, 3) : this.finishOp(e === 124 ? M.logicalOR : M.logicalAND, 2) : t === 61 ? this.finishOp(M.assign, 2) : this.finishOp(e === 124 ? M.bitwiseOR : M.bitwiseAND, 1);
|
|
3549
|
-
},
|
|
3540
|
+
}, K.readToken_caret = function() {
|
|
3550
3541
|
return this.input.charCodeAt(this.pos + 1) === 61 ? this.finishOp(M.assign, 2) : this.finishOp(M.bitwiseXOR, 1);
|
|
3551
|
-
},
|
|
3542
|
+
}, K.readToken_plus_min = function(e) {
|
|
3552
3543
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
3553
3544
|
return t === e ? t === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || N.test(this.input.slice(this.lastTokEnd, this.pos))) ? (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : this.finishOp(M.incDec, 2) : t === 61 ? this.finishOp(M.assign, 2) : this.finishOp(M.plusMin, 1);
|
|
3554
|
-
},
|
|
3545
|
+
}, K.readToken_lt_gt = function(e) {
|
|
3555
3546
|
var t = this.input.charCodeAt(this.pos + 1), n = 1;
|
|
3556
3547
|
return t === e ? (n = e === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2, this.input.charCodeAt(this.pos + n) === 61 ? this.finishOp(M.assign, n + 1) : this.finishOp(M.bitShift, n)) : t === 33 && e === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && this.input.charCodeAt(this.pos + 3) === 45 ? (this.skipLineComment(4), this.skipSpace(), this.nextToken()) : (t === 61 && (n = 2), this.finishOp(M.relational, n));
|
|
3557
|
-
},
|
|
3548
|
+
}, K.readToken_eq_excl = function(e) {
|
|
3558
3549
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
3559
3550
|
return t === 61 ? this.finishOp(M.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2) : e === 61 && t === 62 && this.options.ecmaVersion >= 6 ? (this.pos += 2, this.finishToken(M.arrow)) : this.finishOp(e === 61 ? M.eq : M.prefix, 1);
|
|
3560
|
-
},
|
|
3551
|
+
}, K.readToken_question = function() {
|
|
3561
3552
|
var e = this.options.ecmaVersion;
|
|
3562
3553
|
if (e >= 11) {
|
|
3563
3554
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
@@ -3568,11 +3559,11 @@ G.next = function(e) {
|
|
|
3568
3559
|
if (t === 63) return e >= 12 && this.input.charCodeAt(this.pos + 2) === 61 ? this.finishOp(M.assign, 3) : this.finishOp(M.coalesce, 2);
|
|
3569
3560
|
}
|
|
3570
3561
|
return this.finishOp(M.question, 1);
|
|
3571
|
-
},
|
|
3562
|
+
}, K.readToken_numberSign = function() {
|
|
3572
3563
|
var e = this.options.ecmaVersion, t = 35;
|
|
3573
3564
|
if (e >= 13 && (++this.pos, t = this.fullCharCodeAtPos(), E(t, !0) || t === 92)) return this.finishToken(M.privateId, this.readWord1());
|
|
3574
|
-
this.raise(this.pos, "Unexpected character '" +
|
|
3575
|
-
},
|
|
3565
|
+
this.raise(this.pos, "Unexpected character '" + ot(t) + "'");
|
|
3566
|
+
}, K.getTokenFromCode = function(e) {
|
|
3576
3567
|
switch (e) {
|
|
3577
3568
|
case 46: return this.readToken_dot();
|
|
3578
3569
|
case 40: return ++this.pos, this.finishToken(M.parenL);
|
|
@@ -3621,11 +3612,11 @@ G.next = function(e) {
|
|
|
3621
3612
|
case 126: return this.finishOp(M.prefix, 1);
|
|
3622
3613
|
case 35: return this.readToken_numberSign();
|
|
3623
3614
|
}
|
|
3624
|
-
this.raise(this.pos, "Unexpected character '" +
|
|
3625
|
-
},
|
|
3615
|
+
this.raise(this.pos, "Unexpected character '" + ot(e) + "'");
|
|
3616
|
+
}, K.finishOp = function(e, t) {
|
|
3626
3617
|
var n = this.input.slice(this.pos, this.pos + t);
|
|
3627
3618
|
return this.pos += t, this.finishToken(e, n);
|
|
3628
|
-
},
|
|
3619
|
+
}, K.readRegexp = function() {
|
|
3629
3620
|
for (var e, t, n = this.pos;;) {
|
|
3630
3621
|
this.pos >= this.input.length && this.raise(n, "Unterminated regular expression");
|
|
3631
3622
|
var r = this.input.charAt(this.pos);
|
|
@@ -3642,7 +3633,7 @@ G.next = function(e) {
|
|
|
3642
3633
|
++this.pos;
|
|
3643
3634
|
var a = this.pos, o = this.readWord1();
|
|
3644
3635
|
this.containsEsc && this.unexpected(a);
|
|
3645
|
-
var s = this.regexpState ||= new
|
|
3636
|
+
var s = this.regexpState ||= new W(this);
|
|
3646
3637
|
s.reset(n, i, o), this.validateRegExpFlags(s), this.validateRegExpPattern(s);
|
|
3647
3638
|
var c = null;
|
|
3648
3639
|
try {
|
|
@@ -3653,7 +3644,7 @@ G.next = function(e) {
|
|
|
3653
3644
|
flags: o,
|
|
3654
3645
|
value: c
|
|
3655
3646
|
});
|
|
3656
|
-
},
|
|
3647
|
+
}, K.readInt = function(e, t, n) {
|
|
3657
3648
|
for (var r = this.options.ecmaVersion >= 12 && t === void 0, i = n && this.input.charCodeAt(this.pos) === 48, a = this.pos, o = 0, s = 0, c = 0, l = t ?? Infinity; c < l; ++c, ++this.pos) {
|
|
3658
3649
|
var u = this.input.charCodeAt(this.pos), d = void 0;
|
|
3659
3650
|
if (r && u === 95) {
|
|
@@ -3665,31 +3656,31 @@ G.next = function(e) {
|
|
|
3665
3656
|
}
|
|
3666
3657
|
return r && s === 95 && this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"), this.pos === a || t != null && this.pos - a !== t ? null : o;
|
|
3667
3658
|
};
|
|
3668
|
-
function
|
|
3659
|
+
function Hn(e, t) {
|
|
3669
3660
|
return t ? parseInt(e, 8) : parseFloat(e.replace(/_/g, ""));
|
|
3670
3661
|
}
|
|
3671
|
-
function
|
|
3662
|
+
function Un(e) {
|
|
3672
3663
|
return typeof BigInt == "function" ? BigInt(e.replace(/_/g, "")) : null;
|
|
3673
3664
|
}
|
|
3674
|
-
|
|
3665
|
+
K.readRadixNumber = function(e) {
|
|
3675
3666
|
var t = this.pos;
|
|
3676
3667
|
this.pos += 2;
|
|
3677
3668
|
var n = this.readInt(e);
|
|
3678
|
-
return n ?? this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (n =
|
|
3679
|
-
},
|
|
3669
|
+
return n ?? this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (n = Un(this.input.slice(t, this.pos)), ++this.pos) : E(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(M.num, n);
|
|
3670
|
+
}, K.readNumber = function(e) {
|
|
3680
3671
|
var t = this.pos;
|
|
3681
3672
|
!e && this.readInt(10, void 0, !0) === null && this.raise(t, "Invalid number");
|
|
3682
3673
|
var n = this.pos - t >= 2 && this.input.charCodeAt(t) === 48;
|
|
3683
3674
|
n && this.strict && this.raise(t, "Invalid number");
|
|
3684
3675
|
var r = this.input.charCodeAt(this.pos);
|
|
3685
3676
|
if (!n && !e && this.options.ecmaVersion >= 11 && r === 110) {
|
|
3686
|
-
var i =
|
|
3677
|
+
var i = Un(this.input.slice(t, this.pos));
|
|
3687
3678
|
return ++this.pos, E(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(M.num, i);
|
|
3688
3679
|
}
|
|
3689
3680
|
n && /[89]/.test(this.input.slice(t, this.pos)) && (n = !1), r === 46 && !n && (++this.pos, this.readInt(10), r = this.input.charCodeAt(this.pos)), (r === 69 || r === 101) && !n && (r = this.input.charCodeAt(++this.pos), (r === 43 || r === 45) && ++this.pos, this.readInt(10) === null && this.raise(t, "Invalid number")), E(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number");
|
|
3690
|
-
var a =
|
|
3681
|
+
var a = Hn(this.input.slice(t, this.pos), n);
|
|
3691
3682
|
return this.finishToken(M.num, a);
|
|
3692
|
-
},
|
|
3683
|
+
}, K.readCodePoint = function() {
|
|
3693
3684
|
var e = this.input.charCodeAt(this.pos), t;
|
|
3694
3685
|
if (e === 123) {
|
|
3695
3686
|
this.options.ecmaVersion < 6 && this.unexpected();
|
|
@@ -3697,35 +3688,35 @@ G.readRadixNumber = function(e) {
|
|
|
3697
3688
|
t = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos), ++this.pos, t > 1114111 && this.invalidStringToken(n, "Code point out of bounds");
|
|
3698
3689
|
} else t = this.readHexChar(4);
|
|
3699
3690
|
return t;
|
|
3700
|
-
},
|
|
3691
|
+
}, K.readString = function(e) {
|
|
3701
3692
|
for (var t = "", n = ++this.pos;;) {
|
|
3702
3693
|
this.pos >= this.input.length && this.raise(this.start, "Unterminated string constant");
|
|
3703
3694
|
var r = this.input.charCodeAt(this.pos);
|
|
3704
3695
|
if (r === e) break;
|
|
3705
|
-
r === 92 ? (t += this.input.slice(n, this.pos), t += this.readEscapedChar(!1), n = this.pos) : r === 8232 || r === 8233 ? (this.options.ecmaVersion < 10 && this.raise(this.start, "Unterminated string constant"), ++this.pos, this.options.locations && (this.curLine++, this.lineStart = this.pos)) : (
|
|
3696
|
+
r === 92 ? (t += this.input.slice(n, this.pos), t += this.readEscapedChar(!1), n = this.pos) : r === 8232 || r === 8233 ? (this.options.ecmaVersion < 10 && this.raise(this.start, "Unterminated string constant"), ++this.pos, this.options.locations && (this.curLine++, this.lineStart = this.pos)) : (Xe(r) && this.raise(this.start, "Unterminated string constant"), ++this.pos);
|
|
3706
3697
|
}
|
|
3707
3698
|
return t += this.input.slice(n, this.pos++), this.finishToken(M.string, t);
|
|
3708
3699
|
};
|
|
3709
|
-
var
|
|
3710
|
-
|
|
3700
|
+
var Wn = {};
|
|
3701
|
+
K.tryReadTemplateToken = function() {
|
|
3711
3702
|
this.inTemplateElement = !0;
|
|
3712
3703
|
try {
|
|
3713
3704
|
this.readTmplToken();
|
|
3714
3705
|
} catch (e) {
|
|
3715
|
-
if (e ===
|
|
3706
|
+
if (e === Wn) this.readInvalidTemplateToken();
|
|
3716
3707
|
else throw e;
|
|
3717
3708
|
}
|
|
3718
3709
|
this.inTemplateElement = !1;
|
|
3719
|
-
},
|
|
3720
|
-
if (this.inTemplateElement && this.options.ecmaVersion >= 9) throw
|
|
3710
|
+
}, K.invalidStringToken = function(e, t) {
|
|
3711
|
+
if (this.inTemplateElement && this.options.ecmaVersion >= 9) throw Wn;
|
|
3721
3712
|
this.raise(e, t);
|
|
3722
|
-
},
|
|
3713
|
+
}, K.readTmplToken = function() {
|
|
3723
3714
|
for (var e = "", t = this.pos;;) {
|
|
3724
3715
|
this.pos >= this.input.length && this.raise(this.start, "Unterminated template");
|
|
3725
3716
|
var n = this.input.charCodeAt(this.pos);
|
|
3726
3717
|
if (n === 96 || n === 36 && this.input.charCodeAt(this.pos + 1) === 123) return this.pos === this.start && (this.type === M.template || this.type === M.invalidTemplate) ? n === 36 ? (this.pos += 2, this.finishToken(M.dollarBraceL)) : (++this.pos, this.finishToken(M.backQuote)) : (e += this.input.slice(t, this.pos), this.finishToken(M.template, e));
|
|
3727
3718
|
if (n === 92) e += this.input.slice(t, this.pos), e += this.readEscapedChar(!0), t = this.pos;
|
|
3728
|
-
else if (
|
|
3719
|
+
else if (Xe(n)) {
|
|
3729
3720
|
switch (e += this.input.slice(t, this.pos), ++this.pos, n) {
|
|
3730
3721
|
case 13: this.input.charCodeAt(this.pos) === 10 && ++this.pos;
|
|
3731
3722
|
case 10:
|
|
@@ -3738,7 +3729,7 @@ G.tryReadTemplateToken = function() {
|
|
|
3738
3729
|
this.options.locations && (++this.curLine, this.lineStart = this.pos), t = this.pos;
|
|
3739
3730
|
} else ++this.pos;
|
|
3740
3731
|
}
|
|
3741
|
-
},
|
|
3732
|
+
}, K.readInvalidTemplateToken = function() {
|
|
3742
3733
|
for (; this.pos < this.input.length; this.pos++) switch (this.input[this.pos]) {
|
|
3743
3734
|
case "\\":
|
|
3744
3735
|
++this.pos;
|
|
@@ -3753,13 +3744,13 @@ G.tryReadTemplateToken = function() {
|
|
|
3753
3744
|
break;
|
|
3754
3745
|
}
|
|
3755
3746
|
this.raise(this.start, "Unterminated template");
|
|
3756
|
-
},
|
|
3747
|
+
}, K.readEscapedChar = function(e) {
|
|
3757
3748
|
var t = this.input.charCodeAt(++this.pos);
|
|
3758
3749
|
switch (++this.pos, t) {
|
|
3759
3750
|
case 110: return "\n";
|
|
3760
3751
|
case 114: return "\r";
|
|
3761
3752
|
case 120: return String.fromCharCode(this.readHexChar(2));
|
|
3762
|
-
case 117: return
|
|
3753
|
+
case 117: return ot(this.readCodePoint());
|
|
3763
3754
|
case 116: return " ";
|
|
3764
3755
|
case 98: return "\b";
|
|
3765
3756
|
case 118: return "\v";
|
|
@@ -3776,64 +3767,64 @@ G.tryReadTemplateToken = function() {
|
|
|
3776
3767
|
var r = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0], i = parseInt(r, 8);
|
|
3777
3768
|
return i > 255 && (r = r.slice(0, -1), i = parseInt(r, 8)), this.pos += r.length - 1, t = this.input.charCodeAt(this.pos), (r !== "0" || t === 56 || t === 57) && (this.strict || e) && this.invalidStringToken(this.pos - 1 - r.length, e ? "Octal literal in template string" : "Octal literal in strict mode"), String.fromCharCode(i);
|
|
3778
3769
|
}
|
|
3779
|
-
return
|
|
3770
|
+
return Xe(t) ? (this.options.locations && (this.lineStart = this.pos, ++this.curLine), "") : String.fromCharCode(t);
|
|
3780
3771
|
}
|
|
3781
|
-
},
|
|
3772
|
+
}, K.readHexChar = function(e) {
|
|
3782
3773
|
var t = this.pos, n = this.readInt(16, e);
|
|
3783
3774
|
return n === null && this.invalidStringToken(t, "Bad character escape sequence"), n;
|
|
3784
|
-
},
|
|
3775
|
+
}, K.readWord1 = function() {
|
|
3785
3776
|
this.containsEsc = !1;
|
|
3786
3777
|
for (var e = "", t = !0, n = this.pos, r = this.options.ecmaVersion >= 6; this.pos < this.input.length;) {
|
|
3787
3778
|
var i = this.fullCharCodeAtPos();
|
|
3788
|
-
if (
|
|
3779
|
+
if (qe(i, r)) this.pos += i <= 65535 ? 1 : 2;
|
|
3789
3780
|
else if (i === 92) {
|
|
3790
3781
|
this.containsEsc = !0, e += this.input.slice(n, this.pos);
|
|
3791
3782
|
var a = this.pos;
|
|
3792
3783
|
this.input.charCodeAt(++this.pos) !== 117 && this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX"), ++this.pos;
|
|
3793
3784
|
var o = this.readCodePoint();
|
|
3794
|
-
(t ? E :
|
|
3785
|
+
(t ? E : qe)(o, r) || this.invalidStringToken(a, "Invalid Unicode escape"), e += ot(o), n = this.pos;
|
|
3795
3786
|
} else break;
|
|
3796
3787
|
t = !1;
|
|
3797
3788
|
}
|
|
3798
3789
|
return e + this.input.slice(n, this.pos);
|
|
3799
|
-
},
|
|
3790
|
+
}, K.readWord = function() {
|
|
3800
3791
|
var e = this.readWord1(), t = M.name;
|
|
3801
|
-
return this.keywords.test(e) && (t =
|
|
3792
|
+
return this.keywords.test(e) && (t = Je[e]), this.finishToken(t, e);
|
|
3802
3793
|
};
|
|
3803
|
-
var
|
|
3794
|
+
var Gn = "8.16.0";
|
|
3804
3795
|
F.acorn = {
|
|
3805
3796
|
Parser: F,
|
|
3806
|
-
version:
|
|
3807
|
-
defaultOptions:
|
|
3808
|
-
Position:
|
|
3809
|
-
SourceLocation:
|
|
3810
|
-
getLineInfo:
|
|
3811
|
-
Node:
|
|
3797
|
+
version: Gn,
|
|
3798
|
+
defaultOptions: dt,
|
|
3799
|
+
Position: ct,
|
|
3800
|
+
SourceLocation: lt,
|
|
3801
|
+
getLineInfo: ut,
|
|
3802
|
+
Node: Zt,
|
|
3812
3803
|
TokenType: D,
|
|
3813
3804
|
tokTypes: M,
|
|
3814
|
-
keywordTypes:
|
|
3805
|
+
keywordTypes: Je,
|
|
3815
3806
|
TokContext: B,
|
|
3816
3807
|
tokContexts: V,
|
|
3817
|
-
isIdentifierChar:
|
|
3808
|
+
isIdentifierChar: qe,
|
|
3818
3809
|
isIdentifierStart: E,
|
|
3819
|
-
Token:
|
|
3820
|
-
isNewLine:
|
|
3810
|
+
Token: Vn,
|
|
3811
|
+
isNewLine: Xe,
|
|
3821
3812
|
lineBreak: N,
|
|
3822
|
-
lineBreakG:
|
|
3823
|
-
nonASCIIwhitespace:
|
|
3813
|
+
lineBreakG: Ye,
|
|
3814
|
+
nonASCIIwhitespace: Qe
|
|
3824
3815
|
};
|
|
3825
|
-
function
|
|
3816
|
+
function Kn(e, t) {
|
|
3826
3817
|
return F.parse(e, t);
|
|
3827
3818
|
}
|
|
3828
|
-
function
|
|
3819
|
+
function qn(e, t, n) {
|
|
3829
3820
|
return F.parseExpressionAt(e, t, n);
|
|
3830
3821
|
}
|
|
3831
|
-
function
|
|
3822
|
+
function Jn(e, t) {
|
|
3832
3823
|
return F.tokenizer(e, t);
|
|
3833
3824
|
}
|
|
3834
3825
|
//#endregion
|
|
3835
3826
|
//#region node_modules/acorn-typescript/lib/index.mjs
|
|
3836
|
-
function
|
|
3827
|
+
function Yn(e, t) {
|
|
3837
3828
|
for (var n = 0; n < t.length; n++) {
|
|
3838
3829
|
var r = t[n];
|
|
3839
3830
|
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, typeof (i = function(e, t) {
|
|
@@ -3849,36 +3840,36 @@ function Qn(e, t) {
|
|
|
3849
3840
|
}
|
|
3850
3841
|
var i;
|
|
3851
3842
|
}
|
|
3852
|
-
function
|
|
3853
|
-
return
|
|
3843
|
+
function Xn() {
|
|
3844
|
+
return Xn = Object.assign ? Object.assign.bind() : function(e) {
|
|
3854
3845
|
for (var t = 1; t < arguments.length; t++) {
|
|
3855
3846
|
var n = arguments[t];
|
|
3856
3847
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
3857
3848
|
}
|
|
3858
3849
|
return e;
|
|
3859
|
-
},
|
|
3850
|
+
}, Xn.apply(this, arguments);
|
|
3860
3851
|
}
|
|
3861
|
-
function
|
|
3862
|
-
e.prototype = Object.create(t.prototype), e.prototype.constructor = e,
|
|
3852
|
+
function Zn(e, t) {
|
|
3853
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, Qn(e, t);
|
|
3863
3854
|
}
|
|
3864
|
-
function
|
|
3865
|
-
return
|
|
3855
|
+
function Qn(e, t) {
|
|
3856
|
+
return Qn = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
3866
3857
|
return e.__proto__ = t, e;
|
|
3867
|
-
},
|
|
3858
|
+
}, Qn(e, t);
|
|
3868
3859
|
}
|
|
3869
|
-
function
|
|
3860
|
+
function $n(e, t) {
|
|
3870
3861
|
(t == null || t > e.length) && (t = e.length);
|
|
3871
3862
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
3872
3863
|
return r;
|
|
3873
3864
|
}
|
|
3874
|
-
function
|
|
3865
|
+
function er(e, t) {
|
|
3875
3866
|
var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
3876
3867
|
if (n) return (n = n.call(e)).next.bind(n);
|
|
3877
3868
|
if (Array.isArray(e) || (n = function(e, t) {
|
|
3878
3869
|
if (e) {
|
|
3879
|
-
if (typeof e == "string") return
|
|
3870
|
+
if (typeof e == "string") return $n(e, t);
|
|
3880
3871
|
var n = Object.prototype.toString.call(e).slice(8, -1);
|
|
3881
|
-
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ?
|
|
3872
|
+
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? $n(e, t) : void 0;
|
|
3882
3873
|
}
|
|
3883
3874
|
}(e)) || t && e && typeof e.length == "number") {
|
|
3884
3875
|
n && (e = n);
|
|
@@ -3892,28 +3883,28 @@ function rr(e, t) {
|
|
|
3892
3883
|
}
|
|
3893
3884
|
throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
3894
3885
|
}
|
|
3895
|
-
var
|
|
3896
|
-
function
|
|
3886
|
+
var q = !0;
|
|
3887
|
+
function J(e, t) {
|
|
3897
3888
|
return t === void 0 && (t = {}), new D("name", t);
|
|
3898
3889
|
}
|
|
3899
|
-
var
|
|
3900
|
-
function
|
|
3901
|
-
var t =
|
|
3890
|
+
var tr = /* @__PURE__ */ new WeakMap();
|
|
3891
|
+
function nr(e) {
|
|
3892
|
+
var t = tr.get(e.Parser.acorn || e);
|
|
3902
3893
|
if (!t) {
|
|
3903
3894
|
var n = {
|
|
3904
|
-
assert:
|
|
3905
|
-
asserts:
|
|
3906
|
-
global:
|
|
3907
|
-
keyof:
|
|
3908
|
-
readonly:
|
|
3909
|
-
unique:
|
|
3910
|
-
abstract:
|
|
3911
|
-
declare:
|
|
3912
|
-
enum:
|
|
3913
|
-
module:
|
|
3914
|
-
namespace:
|
|
3915
|
-
interface:
|
|
3916
|
-
type:
|
|
3895
|
+
assert: J(0, { startsExpr: q }),
|
|
3896
|
+
asserts: J(0, { startsExpr: q }),
|
|
3897
|
+
global: J(0, { startsExpr: q }),
|
|
3898
|
+
keyof: J(0, { startsExpr: q }),
|
|
3899
|
+
readonly: J(0, { startsExpr: q }),
|
|
3900
|
+
unique: J(0, { startsExpr: q }),
|
|
3901
|
+
abstract: J(0, { startsExpr: q }),
|
|
3902
|
+
declare: J(0, { startsExpr: q }),
|
|
3903
|
+
enum: J(0, { startsExpr: q }),
|
|
3904
|
+
module: J(0, { startsExpr: q }),
|
|
3905
|
+
namespace: J(0, { startsExpr: q }),
|
|
3906
|
+
interface: J(0, { startsExpr: q }),
|
|
3907
|
+
type: J(0, { startsExpr: q })
|
|
3917
3908
|
}, r = {
|
|
3918
3909
|
at: new D("@"),
|
|
3919
3910
|
jsxName: new D("jsxName"),
|
|
@@ -3931,18 +3922,18 @@ function ar(e) {
|
|
|
3931
3922
|
var t = this.context.pop();
|
|
3932
3923
|
t === i.tc_oTag && e === M.slash || t === i.tc_cTag ? (this.context.pop(), this.exprAllowed = this.curContext() === i.tc_expr) : this.exprAllowed = !0;
|
|
3933
3924
|
}, t = {
|
|
3934
|
-
tokTypes:
|
|
3935
|
-
tokContexts:
|
|
3925
|
+
tokTypes: Xn({}, n, r),
|
|
3926
|
+
tokContexts: Xn({}, i),
|
|
3936
3927
|
keywordsRegExp: a,
|
|
3937
3928
|
tokenIsLiteralPropertyName: function(e) {
|
|
3938
3929
|
return [
|
|
3939
3930
|
M.name,
|
|
3940
3931
|
M.string,
|
|
3941
3932
|
M.num
|
|
3942
|
-
].concat(Object.values(
|
|
3933
|
+
].concat(Object.values(Je), Object.values(n)).includes(e);
|
|
3943
3934
|
},
|
|
3944
3935
|
tokenIsKeywordOrIdentifier: function(e) {
|
|
3945
|
-
return [M.name].concat(Object.values(
|
|
3936
|
+
return [M.name].concat(Object.values(Je), Object.values(n)).includes(e);
|
|
3946
3937
|
},
|
|
3947
3938
|
tokenIsIdentifier: function(e) {
|
|
3948
3939
|
return [].concat(Object.values(n), [M.name]).includes(e);
|
|
@@ -3972,18 +3963,18 @@ function ar(e) {
|
|
|
3972
3963
|
}
|
|
3973
3964
|
return t;
|
|
3974
3965
|
}
|
|
3975
|
-
var
|
|
3966
|
+
var rr = 1024, ir = RegExp("(?=(" + (/* @__PURE__ */ RegExp("(?:[^\\S\\n\\r\\u2028\\u2029]|\\/\\/.*|\\/\\*.*?\\*\\/)*", "y")).source + "))\\1(?=[\\n\\r\\u2028\\u2029]|\\/\\*(?!.*?\\*\\/)|$)", "y"), ar = function() {
|
|
3976
3967
|
this.shorthandAssign = void 0, this.trailingComma = void 0, this.parenthesizedAssign = void 0, this.parenthesizedBind = void 0, this.doubleProto = void 0, this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
3977
3968
|
};
|
|
3978
|
-
function
|
|
3969
|
+
function or(e, t) {
|
|
3979
3970
|
var n = t.key.name, r = e[n], i = "true";
|
|
3980
3971
|
return t.type !== "MethodDefinition" || t.kind !== "get" && t.kind !== "set" || (i = (t.static ? "s" : "i") + t.kind), r === "iget" && i === "iset" || r === "iset" && i === "iget" || r === "sget" && i === "sset" || r === "sset" && i === "sget" ? (e[n] = "true", !1) : !!r || (e[n] = i, !1);
|
|
3981
3972
|
}
|
|
3982
|
-
function
|
|
3973
|
+
function sr(e, t) {
|
|
3983
3974
|
var n = e.key;
|
|
3984
3975
|
return !e.computed && (n.type === "Identifier" && n.name === t || n.type === "Literal" && n.value === t);
|
|
3985
3976
|
}
|
|
3986
|
-
var
|
|
3977
|
+
var Y = {
|
|
3987
3978
|
AbstractMethodHasImplementation: function(e) {
|
|
3988
3979
|
return "Method '" + e.methodName + "' cannot have an implementation because it is marked abstract.";
|
|
3989
3980
|
},
|
|
@@ -4084,7 +4075,7 @@ var J = {
|
|
|
4084
4075
|
return "Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got " + e.type + ".";
|
|
4085
4076
|
},
|
|
4086
4077
|
LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations."
|
|
4087
|
-
},
|
|
4078
|
+
}, cr = {
|
|
4088
4079
|
quot: "\"",
|
|
4089
4080
|
amp: "&",
|
|
4090
4081
|
apos: "'",
|
|
@@ -4338,38 +4329,38 @@ var J = {
|
|
|
4338
4329
|
clubs: "♣",
|
|
4339
4330
|
hearts: "♥",
|
|
4340
4331
|
diams: "♦"
|
|
4341
|
-
},
|
|
4342
|
-
function
|
|
4343
|
-
return e && (e.type === "JSXIdentifier" ? e.name : e.type === "JSXNamespacedName" ? e.namespace.name + ":" + e.name.name : e.type === "JSXMemberExpression" ?
|
|
4332
|
+
}, lr = /^[\da-fA-F]+$/, ur = /^\d+$/;
|
|
4333
|
+
function dr(e) {
|
|
4334
|
+
return e && (e.type === "JSXIdentifier" ? e.name : e.type === "JSXNamespacedName" ? e.namespace.name + ":" + e.name.name : e.type === "JSXMemberExpression" ? dr(e.object) + "." + dr(e.property) : void 0);
|
|
4344
4335
|
}
|
|
4345
|
-
var
|
|
4346
|
-
function
|
|
4336
|
+
var fr = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
|
|
4337
|
+
function pr(e) {
|
|
4347
4338
|
if (!e) throw Error("Assert fail");
|
|
4348
4339
|
}
|
|
4349
|
-
function
|
|
4340
|
+
function mr(e) {
|
|
4350
4341
|
return e === "accessor";
|
|
4351
4342
|
}
|
|
4352
|
-
function
|
|
4343
|
+
function hr(e) {
|
|
4353
4344
|
return e === "in" || e === "out";
|
|
4354
4345
|
}
|
|
4355
|
-
function
|
|
4346
|
+
function gr(e, t) {
|
|
4356
4347
|
return 2 | (e ? 4 : 0) | (t ? 8 : 0);
|
|
4357
4348
|
}
|
|
4358
|
-
function
|
|
4349
|
+
function _r(e) {
|
|
4359
4350
|
if (e.type !== "MemberExpression") return !1;
|
|
4360
4351
|
var t = e.property;
|
|
4361
|
-
return (!e.computed || !(t.type !== "TemplateLiteral" || t.expressions.length > 0)) &&
|
|
4352
|
+
return (!e.computed || !(t.type !== "TemplateLiteral" || t.expressions.length > 0)) && vr(e.object);
|
|
4362
4353
|
}
|
|
4363
|
-
function
|
|
4364
|
-
return e.type === "Identifier" || e.type === "MemberExpression" && !e.computed &&
|
|
4354
|
+
function vr(e) {
|
|
4355
|
+
return e.type === "Identifier" || e.type === "MemberExpression" && !e.computed && vr(e.object);
|
|
4365
4356
|
}
|
|
4366
|
-
function
|
|
4357
|
+
function yr(e) {
|
|
4367
4358
|
return e === "private" || e === "public" || e === "protected";
|
|
4368
4359
|
}
|
|
4369
|
-
function
|
|
4360
|
+
function br(e) {
|
|
4370
4361
|
var t = e || {}, n = t.dts, r = n !== void 0 && n, i = t.allowSatisfies, a = i !== void 0 && i;
|
|
4371
4362
|
return function(t) {
|
|
4372
|
-
var n = t.acorn ||
|
|
4363
|
+
var n = t.acorn || Fe, i = nr(n), o = n.tokTypes, s = n.keywordTypes, c = n.isIdentifierStart, l = n.lineBreak, u = n.isNewLine, d = n.tokContexts, f = n.isIdentifierChar, p = i.tokTypes, m = i.tokContexts, h = i.keywordsRegExp, g = i.tokenIsLiteralPropertyName, ee = i.tokenIsTemplate, _ = i.tokenIsTSDeclarationStart, v = i.tokenIsIdentifier, te = i.tokenIsKeywordOrIdentifier, ne = i.tokenIsTSTypeOperator;
|
|
4373
4364
|
function re(e, t, n) {
|
|
4374
4365
|
n === void 0 && (n = e.length);
|
|
4375
4366
|
for (var r = t; r < n; r++) {
|
|
@@ -4380,11 +4371,11 @@ function Cr(e) {
|
|
|
4380
4371
|
}
|
|
4381
4372
|
return t = function(e, t, n) {
|
|
4382
4373
|
var r = n.tokTypes, i = t.tokTypes;
|
|
4383
|
-
return function(e) {
|
|
4374
|
+
/*#__PURE__*/ return function(e) {
|
|
4384
4375
|
function t() {
|
|
4385
4376
|
return e.apply(this, arguments) || this;
|
|
4386
4377
|
}
|
|
4387
|
-
|
|
4378
|
+
Zn(t, e);
|
|
4388
4379
|
var n = t.prototype;
|
|
4389
4380
|
return n.takeDecorators = function(e) {
|
|
4390
4381
|
var t = this.decoratorStack[this.decoratorStack.length - 1];
|
|
@@ -4423,11 +4414,11 @@ function Cr(e) {
|
|
|
4423
4414
|
allowNamespaces: !0,
|
|
4424
4415
|
allowNamespacedObjects: !0
|
|
4425
4416
|
}, r || {});
|
|
4426
|
-
return function(e) {
|
|
4417
|
+
/*#__PURE__*/ return function(e) {
|
|
4427
4418
|
function t() {
|
|
4428
4419
|
return e.apply(this, arguments) || this;
|
|
4429
4420
|
}
|
|
4430
|
-
|
|
4421
|
+
Zn(t, e);
|
|
4431
4422
|
var n = t.prototype;
|
|
4432
4423
|
return n.jsx_readToken = function() {
|
|
4433
4424
|
for (var e = "", t = this.pos;;) {
|
|
@@ -4460,7 +4451,7 @@ function Cr(e) {
|
|
|
4460
4451
|
r !== "&" && this.raise(this.pos, "Entity must start with an ampersand");
|
|
4461
4452
|
for (var i = ++this.pos; this.pos < this.input.length && n++ < 10;) {
|
|
4462
4453
|
if ((r = this.input[this.pos++]) === ";") {
|
|
4463
|
-
t[0] === "#" ? t[1] === "x" ? (t = t.substr(2),
|
|
4454
|
+
t[0] === "#" ? t[1] === "x" ? (t = t.substr(2), lr.test(t) && (e = String.fromCharCode(parseInt(t, 16)))) : (t = t.substr(1), ur.test(t) && (e = String.fromCharCode(parseInt(t, 10)))) : e = cr[t];
|
|
4464
4455
|
break;
|
|
4465
4456
|
}
|
|
4466
4457
|
t += r;
|
|
@@ -4534,7 +4525,7 @@ function Cr(e) {
|
|
|
4534
4525
|
break;
|
|
4535
4526
|
default: this.unexpected();
|
|
4536
4527
|
}
|
|
4537
|
-
|
|
4528
|
+
dr(s.name) !== dr(o.name) && this.raise(s.start, "Expected corresponding JSX closing tag for <" + dr(o.name) + ">");
|
|
4538
4529
|
}
|
|
4539
4530
|
var c = o.name ? "Element" : "Fragment";
|
|
4540
4531
|
return n["opening" + c] = o, n["closing" + c] = s, n.children = r, this.type === i.relational && this.value === "<" && this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag"), this.finishNode(n, "JSX" + c);
|
|
@@ -4548,11 +4539,11 @@ function Cr(e) {
|
|
|
4548
4539
|
}(n);
|
|
4549
4540
|
}(n, i, t, e?.jsx), t = function(e, t, n) {
|
|
4550
4541
|
var r = t.tokTypes, i = n.tokTypes;
|
|
4551
|
-
return function(e) {
|
|
4542
|
+
/*#__PURE__*/ return function(e) {
|
|
4552
4543
|
function t() {
|
|
4553
4544
|
return e.apply(this, arguments) || this;
|
|
4554
4545
|
}
|
|
4555
|
-
|
|
4546
|
+
Zn(t, e);
|
|
4556
4547
|
var n = t.prototype;
|
|
4557
4548
|
return n.parseMaybeImportAttributes = function(e) {
|
|
4558
4549
|
if (this.type === i._with || this.type === r.assert) {
|
|
@@ -4583,10 +4574,10 @@ function Cr(e) {
|
|
|
4583
4574
|
}(i), {
|
|
4584
4575
|
allowedModifiers: ["const"],
|
|
4585
4576
|
disallowedModifiers: ["in", "out"],
|
|
4586
|
-
errorTemplate:
|
|
4577
|
+
errorTemplate: Y.InvalidModifierOnTypeParameterPositions
|
|
4587
4578
|
}), i;
|
|
4588
4579
|
}
|
|
4589
|
-
|
|
4580
|
+
Zn(t, e);
|
|
4590
4581
|
var ie, y, b, x = t.prototype;
|
|
4591
4582
|
return x.getTokenFromCodeInType = function(t) {
|
|
4592
4583
|
return t === 62 || t === 60 ? this.finishOp(o.relational, 1) : e.prototype.getTokenFromCode.call(this, t);
|
|
@@ -4654,14 +4645,14 @@ function Cr(e) {
|
|
|
4654
4645
|
return this.nextTokenStartSince(this.pos);
|
|
4655
4646
|
}, x.tsHasSomeModifiers = function(e, t) {
|
|
4656
4647
|
return t.some(function(t) {
|
|
4657
|
-
return
|
|
4648
|
+
return yr(t) ? e.accessibility === t : !!e[t];
|
|
4658
4649
|
});
|
|
4659
4650
|
}, x.tsIsStartOfStaticBlocks = function() {
|
|
4660
4651
|
return this.isContextual("static") && this.lookaheadCharCode() === 123;
|
|
4661
4652
|
}, x.tsCheckForInvalidTypeCasts = function(e) {
|
|
4662
4653
|
var t = this;
|
|
4663
4654
|
e.forEach(function(e) {
|
|
4664
|
-
e?.type === "TSTypeCastExpression" && t.raise(e.typeAnnotation.start,
|
|
4655
|
+
e?.type === "TSTypeCastExpression" && t.raise(e.typeAnnotation.start, Y.UnexpectedTypeAnnotation);
|
|
4665
4656
|
});
|
|
4666
4657
|
}, x.atPossibleAsyncArrow = function(e) {
|
|
4667
4658
|
return e.type === "Identifier" && e.name === "async" && this.lastTokEndLoc.column === e.end && !this.canInsertSemicolon() && e.end - e.start == 5 && e.start === this.potentialArrowAt;
|
|
@@ -4702,7 +4693,7 @@ function Cr(e) {
|
|
|
4702
4693
|
}, x.isAbstractConstructorSignature = function() {
|
|
4703
4694
|
return this.ts_isContextual(p.abstract) && this.lookahead().type === o._new;
|
|
4704
4695
|
}, x.nextTokenStartSince = function(e) {
|
|
4705
|
-
return
|
|
4696
|
+
return fr.lastIndex = e, fr.test(this.input) ? fr.lastIndex : e;
|
|
4706
4697
|
}, x.lookaheadCharCode = function() {
|
|
4707
4698
|
return this.input.charCodeAt(this.nextTokenStart());
|
|
4708
4699
|
}, x.compareLookaheadState = function(e, t) {
|
|
@@ -4786,7 +4777,7 @@ function Cr(e) {
|
|
|
4786
4777
|
}, x.isLineTerminator = function() {
|
|
4787
4778
|
return this.eat(o.semi) || e.prototype.canInsertSemicolon.call(this);
|
|
4788
4779
|
}, x.hasFollowingLineBreak = function() {
|
|
4789
|
-
return
|
|
4780
|
+
return ir.lastIndex = this.end, ir.test(this.input);
|
|
4790
4781
|
}, x.addExtra = function(e, t, n, r) {
|
|
4791
4782
|
if (r === void 0 && (r = !0), e) {
|
|
4792
4783
|
var i = e.extra = e.extra || {};
|
|
@@ -4878,7 +4869,7 @@ function Cr(e) {
|
|
|
4878
4869
|
}
|
|
4879
4870
|
return this.next(), e.prototype.exitScope.call(this), this.finishNode(t, "TSModuleBlock");
|
|
4880
4871
|
}, x.tsParseAmbientExternalModuleDeclaration = function(t) {
|
|
4881
|
-
return this.ts_isContextual(p.global) ? (t.global = !0, t.id = this.parseIdent()) : this.match(o.string) ? t.id = this.parseLiteral(this.value) : this.unexpected(), this.match(o.braceL) ? (e.prototype.enterScope.call(this,
|
|
4872
|
+
return this.ts_isContextual(p.global) ? (t.global = !0, t.id = this.parseIdent()) : this.match(o.string) ? t.id = this.parseLiteral(this.value) : this.unexpected(), this.match(o.braceL) ? (e.prototype.enterScope.call(this, rr), t.body = this.tsParseModuleBlock(), e.prototype.exitScope.call(this)) : e.prototype.semicolon.call(this), this.finishNode(t, "TSModuleDeclaration");
|
|
4882
4873
|
}, x.tsTryParseDeclare = function(e) {
|
|
4883
4874
|
var t = this;
|
|
4884
4875
|
if (!this.isLineTerminator()) {
|
|
@@ -4979,7 +4970,7 @@ function Cr(e) {
|
|
|
4979
4970
|
}, x.tsParseBindingListForSignature = function() {
|
|
4980
4971
|
var t = this;
|
|
4981
4972
|
return e.prototype.parseBindingList.call(this, o.parenR, !0, !0).map(function(e) {
|
|
4982
|
-
return e.type !== "Identifier" && e.type !== "RestElement" && e.type !== "ObjectPattern" && e.type !== "ArrayPattern" && t.raise(e.start,
|
|
4973
|
+
return e.type !== "Identifier" && e.type !== "RestElement" && e.type !== "ObjectPattern" && e.type !== "ArrayPattern" && t.raise(e.start, Y.UnsupportedSignatureParameterKind(e.type)), e;
|
|
4983
4974
|
});
|
|
4984
4975
|
}, x.tsParseTypePredicateAsserts = function() {
|
|
4985
4976
|
if (this.type !== p.asserts) return !1;
|
|
@@ -5025,7 +5016,7 @@ function Cr(e) {
|
|
|
5025
5016
|
if (this.lookahead().type !== o._const) return null;
|
|
5026
5017
|
this.next();
|
|
5027
5018
|
var e = this.tsParseTypeReference();
|
|
5028
|
-
return e.typeParameters && this.raise(e.typeName.start,
|
|
5019
|
+
return e.typeParameters && this.raise(e.typeName.start, Y.CannotFindName({ name: "const" })), e;
|
|
5029
5020
|
}, x.tsParseFunctionOrConstructorType = function(e, t) {
|
|
5030
5021
|
var n = this, r = this.startNode();
|
|
5031
5022
|
return e === "TSConstructorType" && (r.abstract = !!t, t && this.next(), this.next()), this.tsInAllowConditionalTypesContext(function() {
|
|
@@ -5041,7 +5032,7 @@ function Cr(e) {
|
|
|
5041
5032
|
switch (e.typeAnnotation.type) {
|
|
5042
5033
|
case "TSTupleType":
|
|
5043
5034
|
case "TSArrayType": return;
|
|
5044
|
-
default: this.raise(e.start,
|
|
5035
|
+
default: this.raise(e.start, Y.UnexpectedReadonly);
|
|
5045
5036
|
}
|
|
5046
5037
|
}, x.tsParseTypeOperator = function() {
|
|
5047
5038
|
var e = this.startNode(), t = this.value;
|
|
@@ -5074,7 +5065,7 @@ function Cr(e) {
|
|
|
5074
5065
|
}(), this.finishNode(t, "TSLiteralType");
|
|
5075
5066
|
}, x.tsParseImportType = function() {
|
|
5076
5067
|
var e = this.startNode();
|
|
5077
|
-
return this.expect(o._import), this.expect(o.parenL), this.match(o.string) || this.raise(this.start,
|
|
5068
|
+
return this.expect(o._import), this.expect(o.parenL), this.match(o.string) || this.raise(this.start, Y.UnsupportedImportTypeArgument), e.argument = this.parseExprAtom(), this.expect(o.parenR), this.eat(o.dot) && (e.qualifier = this.tsParseEntityName()), this.tsMatchLeftRelational() && (e.typeParameters = this.tsParseTypeArguments()), this.finishNode(e, "TSImportType");
|
|
5078
5069
|
}, x.tsParseTypeQuery = function() {
|
|
5079
5070
|
var e = this.startNode();
|
|
5080
5071
|
return this.expect(o._typeof), e.exprName = this.match(o._import) ? this.tsParseImportType() : this.tsParseEntityName(), !this.hasPrecedingLineBreak() && this.tsMatchLeftRelational() && (e.typeParameters = this.tsParseTypeArguments()), this.finishNode(e, "TSTypeQuery");
|
|
@@ -5091,7 +5082,7 @@ function Cr(e) {
|
|
|
5091
5082
|
var e = this.startLoc, t = this.start, n = this.eat(o.ellipsis), r = this.tsParseType(), i = this.eat(o.question);
|
|
5092
5083
|
if (this.eat(o.colon)) {
|
|
5093
5084
|
var a = this.startNodeAtNode(r);
|
|
5094
|
-
a.optional = i, r.type !== "TSTypeReference" || r.typeParameters || r.typeName.type !== "Identifier" ? (this.raise(r.start,
|
|
5085
|
+
a.optional = i, r.type !== "TSTypeReference" || r.typeParameters || r.typeName.type !== "Identifier" ? (this.raise(r.start, Y.InvalidTupleMemberLabel), a.label = r) : a.label = r.typeName, a.elementType = this.tsParseType(), r = this.finishNode(a, "TSNamedTupleMember");
|
|
5095
5086
|
} else if (i) {
|
|
5096
5087
|
var s = this.startNodeAtNode(r);
|
|
5097
5088
|
s.typeAnnotation = r, r = this.finishNode(s, "TSOptionalType");
|
|
@@ -5107,11 +5098,11 @@ function Cr(e) {
|
|
|
5107
5098
|
var n = !1, r = null;
|
|
5108
5099
|
return t.elementTypes.forEach(function(t) {
|
|
5109
5100
|
var i = t.type;
|
|
5110
|
-
!n || i === "TSRestType" || i === "TSOptionalType" || i === "TSNamedTupleMember" && t.optional || e.raise(t.start,
|
|
5101
|
+
!n || i === "TSRestType" || i === "TSOptionalType" || i === "TSNamedTupleMember" && t.optional || e.raise(t.start, Y.OptionalTypeBeforeRequired), n ||= i === "TSNamedTupleMember" && t.optional || i === "TSOptionalType";
|
|
5111
5102
|
var a = i;
|
|
5112
5103
|
i === "TSRestType" && (a = (t = t.typeAnnotation).type);
|
|
5113
5104
|
var o = a === "TSNamedTupleMember";
|
|
5114
|
-
r ??= o, r !== o && e.raise(t.start,
|
|
5105
|
+
r ??= o, r !== o && e.raise(t.start, Y.MixedLabeledAndUnlabeledElements);
|
|
5115
5106
|
}), this.finishNode(t, "TSTupleType");
|
|
5116
5107
|
}, x.tsParseTemplateLiteralType = function() {
|
|
5117
5108
|
var e = this.startNode();
|
|
@@ -5194,7 +5185,7 @@ function Cr(e) {
|
|
|
5194
5185
|
return this.tsIsStartOfFunctionType() ? this.tsParseFunctionOrConstructorType("TSFunctionType") : this.match(o._new) ? this.tsParseFunctionOrConstructorType("TSConstructorType") : this.isAbstractConstructorSignature() ? this.tsParseFunctionOrConstructorType("TSConstructorType", !0) : this.tsParseUnionTypeOrHigher();
|
|
5195
5186
|
}, x.tsParseType = function() {
|
|
5196
5187
|
var e = this;
|
|
5197
|
-
|
|
5188
|
+
pr(this.inType);
|
|
5198
5189
|
var t = this.tsParseNonConditionalType();
|
|
5199
5190
|
if (this.inDisallowConditionalTypesContext || this.hasPrecedingLineBreak() || !this.eat(o._extends)) return t;
|
|
5200
5191
|
var n = this.startNodeAtNode(t);
|
|
@@ -5228,7 +5219,7 @@ function Cr(e) {
|
|
|
5228
5219
|
modified: e,
|
|
5229
5220
|
allowedModifiers: [],
|
|
5230
5221
|
disallowedModifiers: ["in", "out"],
|
|
5231
|
-
errorTemplate:
|
|
5222
|
+
errorTemplate: Y.InvalidModifierOnTypeParameterPositions
|
|
5232
5223
|
});
|
|
5233
5224
|
}, x.tsParseTypeParameter = function(e) {
|
|
5234
5225
|
e === void 0 && (e = this.tsParseNoneModifiers.bind(this));
|
|
@@ -5238,7 +5229,7 @@ function Cr(e) {
|
|
|
5238
5229
|
var t = this.startNode();
|
|
5239
5230
|
this.tsMatchLeftRelational() || this.matchJsx("jsxTagStart") ? this.next() : this.unexpected();
|
|
5240
5231
|
var n = { value: -1 };
|
|
5241
|
-
return t.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this, e), !1, !0, n), t.params.length === 0 && this.raise(this.start,
|
|
5232
|
+
return t.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this, e), !1, !0, n), t.params.length === 0 && this.raise(this.start, Y.EmptyTypeParameters), n.value !== -1 && this.addExtra(t, "trailingComma", n.value), this.finishNode(t, "TSTypeParameterDeclaration");
|
|
5242
5233
|
}, x.tsTryParseTypeParameters = function(e) {
|
|
5243
5234
|
if (this.tsMatchLeftRelational()) return this.tsParseTypeParameters(e);
|
|
5244
5235
|
}, x.tsTryParse = function(e) {
|
|
@@ -5262,14 +5253,14 @@ function Cr(e) {
|
|
|
5262
5253
|
t[a] = n[a];
|
|
5263
5254
|
}
|
|
5264
5255
|
}, x.tsParseModifiers = function(e) {
|
|
5265
|
-
for (var t = this, n = e.modified, r = e.allowedModifiers, i = e.disallowedModifiers, a = e.stopOnStartOfClassStaticBlock, o = e.errorTemplate, s = o === void 0 ?
|
|
5266
|
-
r === i && n[a] && t.raise(e.column,
|
|
5256
|
+
for (var t = this, n = e.modified, r = e.allowedModifiers, i = e.disallowedModifiers, a = e.stopOnStartOfClassStaticBlock, o = e.errorTemplate, s = o === void 0 ? Y.InvalidModifierOnTypeMember : o, c = {}, l = function(e, r, i, a) {
|
|
5257
|
+
r === i && n[a] && t.raise(e.column, Y.InvalidModifiersOrder({ orderedModifiers: [i, a] }));
|
|
5267
5258
|
}, u = function(e, r, i, a) {
|
|
5268
|
-
(n[i] && r === a || n[a] && r === i) && t.raise(e.column,
|
|
5259
|
+
(n[i] && r === a || n[a] && r === i) && t.raise(e.column, Y.IncompatibleModifiers({ modifiers: [i, a] }));
|
|
5269
5260
|
};;) {
|
|
5270
5261
|
var d = this.startLoc, f = this.tsParseModifier(r.concat(i ?? []), a);
|
|
5271
5262
|
if (!f) break;
|
|
5272
|
-
|
|
5263
|
+
yr(f) ? n.accessibility ? this.raise(this.start, Y.DuplicateAccessibilityModifier()) : (l(d, f, f, "override"), l(d, f, f, "static"), l(d, f, f, "readonly"), l(d, f, f, "accessor"), c.accessibility = f, n.accessibility = f) : hr(f) ? n[f] ? this.raise(this.start, Y.DuplicateModifier({ modifier: f })) : (l(d, f, "in", "out"), c[f] = f, n[f] = !0) : mr(f) ? n[f] ? this.raise(this.start, Y.DuplicateModifier({ modifier: f })) : (u(d, f, "accessor", "readonly"), u(d, f, "accessor", "static"), u(d, f, "accessor", "override"), c[f] = f, n[f] = !0) : Object.hasOwnProperty.call(n, f) ? this.raise(this.start, Y.DuplicateModifier({ modifier: f })) : (l(d, f, "static", "readonly"), l(d, f, "static", "override"), l(d, f, "override", "readonly"), l(d, f, "abstract", "override"), u(d, f, "declare", "override"), u(d, f, "static", "abstract"), c[f] = f, n[f] = !0), i != null && i.includes(f) && this.raise(this.start, s);
|
|
5273
5264
|
}
|
|
5274
5265
|
return c;
|
|
5275
5266
|
}, x.tsParseInOutModifiers = function(e) {
|
|
@@ -5285,7 +5276,7 @@ function Cr(e) {
|
|
|
5285
5276
|
"abstract",
|
|
5286
5277
|
"override"
|
|
5287
5278
|
],
|
|
5288
|
-
errorTemplate:
|
|
5279
|
+
errorTemplate: Y.InvalidModifierOnTypeParameter
|
|
5289
5280
|
});
|
|
5290
5281
|
}, x.tsParseTypeArguments = function() {
|
|
5291
5282
|
var e = this, t = this.startNode();
|
|
@@ -5293,13 +5284,13 @@ function Cr(e) {
|
|
|
5293
5284
|
return e.tsInNoContext(function() {
|
|
5294
5285
|
return e.expect(o.relational), e.tsParseDelimitedList("TypeParametersOrArguments", e.tsParseType.bind(e));
|
|
5295
5286
|
});
|
|
5296
|
-
}), t.params.length === 0 && this.raise(this.start,
|
|
5287
|
+
}), t.params.length === 0 && this.raise(this.start, Y.EmptyTypeArguments), this.exprAllowed = !1, this.expect(o.relational), this.finishNode(t, "TSTypeParameterInstantiation");
|
|
5297
5288
|
}, x.tsParseHeritageClause = function(e) {
|
|
5298
5289
|
var t = this, n = this.start, r = this.tsParseDelimitedList("HeritageClauseElement", function() {
|
|
5299
5290
|
var e = t.startNode();
|
|
5300
5291
|
return e.expression = t.tsParseEntityName(), t.tsMatchLeftRelational() && (e.typeParameters = t.tsParseTypeArguments()), t.finishNode(e, "TSExpressionWithTypeArguments");
|
|
5301
5292
|
});
|
|
5302
|
-
return r.length || this.raise(n,
|
|
5293
|
+
return r.length || this.raise(n, Y.EmptyHeritageClauseType({ token: e })), r;
|
|
5303
5294
|
}, x.tsParseTypeMemberSemicolon = function() {
|
|
5304
5295
|
this.eat(o.comma) || this.isLineTerminator() || this.expect(o.semi);
|
|
5305
5296
|
}, x.tsTryParseAndCatch = function(e) {
|
|
@@ -5313,18 +5304,18 @@ function Cr(e) {
|
|
|
5313
5304
|
this.eat(o.question) && (e.optional = !0);
|
|
5314
5305
|
var n = e;
|
|
5315
5306
|
if (this.match(o.parenL) || this.tsMatchLeftRelational()) {
|
|
5316
|
-
t && this.raise(e.start,
|
|
5307
|
+
t && this.raise(e.start, Y.ReadonlyForMethodSignature);
|
|
5317
5308
|
var r = n;
|
|
5318
|
-
r.kind && this.tsMatchLeftRelational() && this.raise(this.start,
|
|
5309
|
+
r.kind && this.tsMatchLeftRelational() && this.raise(this.start, Y.AccesorCannotHaveTypeParameters), this.tsFillSignature(o.colon, r), this.tsParseTypeMemberSemicolon();
|
|
5319
5310
|
var i = "parameters", a = "typeAnnotation";
|
|
5320
|
-
if (r.kind === "get") r[i].length > 0 && (this.raise(this.start, "A 'get' accesor must not have any formal parameters."), this.isThisParam(r[i][0]) && this.raise(this.start,
|
|
5311
|
+
if (r.kind === "get") r[i].length > 0 && (this.raise(this.start, "A 'get' accesor must not have any formal parameters."), this.isThisParam(r[i][0]) && this.raise(this.start, Y.AccesorCannotDeclareThisParameter));
|
|
5321
5312
|
else if (r.kind === "set") {
|
|
5322
5313
|
if (r[i].length !== 1) this.raise(this.start, "A 'get' accesor must not have any formal parameters.");
|
|
5323
5314
|
else {
|
|
5324
5315
|
var s = r[i][0];
|
|
5325
|
-
this.isThisParam(s) && this.raise(this.start,
|
|
5316
|
+
this.isThisParam(s) && this.raise(this.start, Y.AccesorCannotDeclareThisParameter), s.type === "Identifier" && s.optional && this.raise(this.start, Y.SetAccesorCannotHaveOptionalParameter), s.type === "RestElement" && this.raise(this.start, Y.SetAccesorCannotHaveRestParameter);
|
|
5326
5317
|
}
|
|
5327
|
-
r[a] && this.raise(r[a].start,
|
|
5318
|
+
r[a] && this.raise(r[a].start, Y.SetAccesorCannotHaveReturnType);
|
|
5328
5319
|
} else r.kind = "method";
|
|
5329
5320
|
return this.finishNode(r, "TSMethodSignature");
|
|
5330
5321
|
}
|
|
@@ -5361,7 +5352,7 @@ function Cr(e) {
|
|
|
5361
5352
|
return this.expect(o.braceR), e;
|
|
5362
5353
|
}, x.tsParseInterfaceDeclaration = function(e, t) {
|
|
5363
5354
|
if (t === void 0 && (t = {}), this.hasFollowingLineBreak()) return null;
|
|
5364
|
-
this.expectContextual("interface"), t.declare && (e.declare = !0), v(this.type) ? (e.id = this.parseIdent(), this.checkLValSimple(e.id, 7)) : (e.id = null, this.raise(this.start,
|
|
5355
|
+
this.expectContextual("interface"), t.declare && (e.declare = !0), v(this.type) ? (e.id = this.parseIdent(), this.checkLValSimple(e.id, 7)) : (e.id = null, this.raise(this.start, Y.MissingInterfaceName)), e.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this)), this.eat(o._extends) && (e.extends = this.tsParseHeritageClause("extends"));
|
|
5365
5356
|
var n = this.startNode();
|
|
5366
5357
|
return n.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)), e.body = this.finishNode(n, "TSInterfaceBody"), this.finishNode(e, "TSInterfaceDeclaration");
|
|
5367
5358
|
}, x.tsParseAbstractDeclaration = function(e) {
|
|
@@ -5379,7 +5370,7 @@ function Cr(e) {
|
|
|
5379
5370
|
break;
|
|
5380
5371
|
case "global":
|
|
5381
5372
|
if (this.match(o.braceL)) {
|
|
5382
|
-
e.prototype.enterScope.call(this,
|
|
5373
|
+
e.prototype.enterScope.call(this, rr);
|
|
5383
5374
|
var i = t;
|
|
5384
5375
|
return i.global = !0, i.id = n, i.body = this.tsParseModuleBlock(), e.prototype.exitScope.call(this), this.finishNode(i, "TSModuleDeclaration");
|
|
5385
5376
|
}
|
|
@@ -5418,7 +5409,7 @@ function Cr(e) {
|
|
|
5418
5409
|
if (n === void 0 && (n = !1), t.id = this.parseIdent(), n || this.checkLValSimple(t.id, 8), this.eat(o.dot)) {
|
|
5419
5410
|
var r = this.startNode();
|
|
5420
5411
|
this.tsParseModuleOrNamespaceDeclaration(r, !0), t.body = r;
|
|
5421
|
-
} else e.prototype.enterScope.call(this,
|
|
5412
|
+
} else e.prototype.enterScope.call(this, rr), t.body = this.tsParseModuleBlock(), e.prototype.exitScope.call(this);
|
|
5422
5413
|
return this.finishNode(t, "TSModuleDeclaration");
|
|
5423
5414
|
}, x.checkLValSimple = function(t, n, r) {
|
|
5424
5415
|
return n === void 0 && (n = 0), e.prototype.checkLValSimple.call(this, t, n, r);
|
|
@@ -5452,7 +5443,7 @@ function Cr(e) {
|
|
|
5452
5443
|
}, x.tsParseImportEqualsDeclaration = function(t, n) {
|
|
5453
5444
|
t.isExport = n || !1, t.id = this.parseIdent(), this.checkLValSimple(t.id, 2), e.prototype.expect.call(this, o.eq);
|
|
5454
5445
|
var r = this.tsParseModuleReference();
|
|
5455
|
-
return t.importKind === "type" && r.type !== "TSExternalModuleReference" && this.raise(r.start,
|
|
5446
|
+
return t.importKind === "type" && r.type !== "TSExternalModuleReference" && this.raise(r.start, Y.ImportAliasHasImportType), t.moduleReference = r, e.prototype.semicolon.call(this), this.finishNode(t, "TSImportEqualsDeclaration");
|
|
5456
5447
|
}, x.isExportDefaultSpecifier = function() {
|
|
5457
5448
|
if (this.tsIsDeclarationStart()) return !1;
|
|
5458
5449
|
var e = this.type;
|
|
@@ -5479,13 +5470,13 @@ function Cr(e) {
|
|
|
5479
5470
|
}, x.parseFunction = function(e, t, n, r, i) {
|
|
5480
5471
|
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !r) && (this.type === o.star && 2 & t && this.unexpected(), e.generator = this.eat(o.star)), this.options.ecmaVersion >= 8 && (e.async = !!r), 1 & t && (e.id = 4 & t && this.type !== o.name ? null : this.parseIdent());
|
|
5481
5472
|
var a = this.yieldPos, s = this.awaitPos, c = this.awaitIdentPos, l = this.maybeInArrowParameters;
|
|
5482
|
-
this.maybeInArrowParameters = !1, this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
5473
|
+
this.maybeInArrowParameters = !1, this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(gr(e.async, e.generator)), 1 & t || (e.id = this.type === o.name ? this.parseIdent() : null), this.parseFunctionParams(e);
|
|
5483
5474
|
var u = 1 & t;
|
|
5484
5475
|
return this.parseFunctionBody(e, n, !1, i, { isFunctionDeclaration: u }), this.yieldPos = a, this.awaitPos = s, this.awaitIdentPos = c, 1 & t && e.id && !(2 & t) && this.checkLValSimple(e.id, e.body ? this.strict || e.generator || e.async ? this.treatFunctionsAsVar ? 1 : 2 : 3 : 0), this.maybeInArrowParameters = l, this.finishNode(e, u ? "FunctionDeclaration" : "FunctionExpression");
|
|
5485
5476
|
}, x.parseFunctionBody = function(t, n, r, i, a) {
|
|
5486
5477
|
n === void 0 && (n = !1), r === void 0 && (r = !1), i === void 0 && (i = !1), this.match(o.colon) && (t.returnType = this.tsParseTypeOrTypePredicateAnnotation(o.colon));
|
|
5487
5478
|
var s = a != null && a.isFunctionDeclaration ? "TSDeclareFunction" : a != null && a.isClassMethod ? "TSDeclareMethod" : void 0;
|
|
5488
|
-
return s && !this.match(o.braceL) && this.isLineTerminator() ? this.finishNode(t, s) : s === "TSDeclareFunction" && this.isAmbientContext && (this.raise(t.start,
|
|
5479
|
+
return s && !this.match(o.braceL) && this.isLineTerminator() ? this.finishNode(t, s) : s === "TSDeclareFunction" && this.isAmbientContext && (this.raise(t.start, Y.DeclareFunctionHasImplementation), t.declare) ? (e.prototype.parseFunctionBody.call(this, t, n, r, !1), this.finishNode(t, s)) : (e.prototype.parseFunctionBody.call(this, t, n, r, i), t);
|
|
5489
5480
|
}, x.parseNew = function() {
|
|
5490
5481
|
var e;
|
|
5491
5482
|
this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
|
|
@@ -5526,7 +5517,7 @@ function Cr(e) {
|
|
|
5526
5517
|
return this.importOrExportOuterKind = "value", r;
|
|
5527
5518
|
}
|
|
5528
5519
|
}
|
|
5529
|
-
return this.next(), this.type === o.string ? (e.specifiers = [], e.source = this.parseExprAtom()) : (e.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), e.source = this.type === o.string ? this.parseExprAtom() : this.unexpected()), this.parseMaybeImportAttributes(e), this.semicolon(), this.finishNode(e, "ImportDeclaration"), this.importOrExportOuterKind = "value", e.importKind === "type" && e.specifiers.length > 1 && e.specifiers[0].type === "ImportDefaultSpecifier" && this.raise(e.start,
|
|
5520
|
+
return this.next(), this.type === o.string ? (e.specifiers = [], e.source = this.parseExprAtom()) : (e.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), e.source = this.type === o.string ? this.parseExprAtom() : this.unexpected()), this.parseMaybeImportAttributes(e), this.semicolon(), this.finishNode(e, "ImportDeclaration"), this.importOrExportOuterKind = "value", e.importKind === "type" && e.specifiers.length > 1 && e.specifiers[0].type === "ImportDefaultSpecifier" && this.raise(e.start, Y.TypeImportCannotSpecifyDefaultAndNamed), e;
|
|
5530
5521
|
}, x.parseExportDefaultDeclaration = function() {
|
|
5531
5522
|
if (this.isAbstractClass()) {
|
|
5532
5523
|
var t = this.startNode();
|
|
@@ -5566,7 +5557,7 @@ function Cr(e) {
|
|
|
5566
5557
|
else {
|
|
5567
5558
|
if (e.declaration = null, e.specifiers = this.parseExportSpecifiers(t), this.eatContextual("from")) this.type !== o.string && this.unexpected(), e.source = this.parseExprAtom(), this.parseMaybeImportAttributes(e);
|
|
5568
5559
|
else {
|
|
5569
|
-
for (var s, c =
|
|
5560
|
+
for (var s, c = er(e.specifiers); !(s = c()).done;) {
|
|
5570
5561
|
var l = s.value;
|
|
5571
5562
|
this.checkUnreserved(l.local), this.checkLocalExport(l.local), l.local.type === "Literal" && this.raise(l.local.start, "A string literal cannot be used as an exported binding without `from`.");
|
|
5572
5563
|
}
|
|
@@ -5579,7 +5570,7 @@ function Cr(e) {
|
|
|
5579
5570
|
e && (typeof t != "string" && (t = t.type === "Identifier" ? t.name : t.value), e[t] = !0);
|
|
5580
5571
|
}, x.parseMaybeDefault = function(t, n, r) {
|
|
5581
5572
|
var i = e.prototype.parseMaybeDefault.call(this, t, n, r);
|
|
5582
|
-
return i.type === "AssignmentPattern" && i.typeAnnotation && i.right.start < i.typeAnnotation.start && this.raise(i.typeAnnotation.start,
|
|
5573
|
+
return i.type === "AssignmentPattern" && i.typeAnnotation && i.right.start < i.typeAnnotation.start && this.raise(i.typeAnnotation.start, Y.TypeAnnotationAfterAssign), i;
|
|
5583
5574
|
}, x.typeCastToParameter = function(e) {
|
|
5584
5575
|
return e.expression.typeAnnotation = e.typeAnnotation, this.resetEndLocation(e.expression, e.typeAnnotation.end), e.expression;
|
|
5585
5576
|
}, x.toAssignableList = function(t, n) {
|
|
@@ -5628,9 +5619,9 @@ function Cr(e) {
|
|
|
5628
5619
|
this.next(), e.prototype.parseVar.call(this, t, !1, n, r || i), this.semicolon();
|
|
5629
5620
|
var a = this.finishNode(t, "VariableDeclaration");
|
|
5630
5621
|
if (!i) return a;
|
|
5631
|
-
for (var o, s =
|
|
5622
|
+
for (var o, s = er(a.declarations); !(o = s()).done;) {
|
|
5632
5623
|
var c = o.value, l = c.init;
|
|
5633
|
-
l && (n !== "const" || c.id.typeAnnotation ? this.raise(l.start,
|
|
5624
|
+
l && (n !== "const" || c.id.typeAnnotation ? this.raise(l.start, Y.InitializerNotAllowedInAmbientContext) : l.type !== "StringLiteral" && l.type !== "BooleanLiteral" && l.type !== "NumericLiteral" && l.type !== "BigIntLiteral" && (l.type !== "TemplateLiteral" || l.expressions.length > 0) && !_r(l) && this.raise(l.start, Y.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference));
|
|
5634
5625
|
}
|
|
5635
5626
|
return a;
|
|
5636
5627
|
}, x.parseStatement = function(t, n, r) {
|
|
@@ -5651,7 +5642,7 @@ function Cr(e) {
|
|
|
5651
5642
|
"private"
|
|
5652
5643
|
]);
|
|
5653
5644
|
}, x.parsePostMemberNameModifiers = function(e) {
|
|
5654
|
-
this.eat(o.question) && (e.optional = !0), e.readonly && this.match(o.parenL) && this.raise(e.start,
|
|
5645
|
+
this.eat(o.question) && (e.optional = !0), e.readonly && this.match(o.parenL) && this.raise(e.start, Y.ClassMethodHasReadonly), e.declare && this.match(o.parenL) && this.raise(e.start, Y.ClassMethodHasDeclare);
|
|
5655
5646
|
}, x.parseExpressionStatement = function(t, n) {
|
|
5656
5647
|
return (n.type === "Identifier" ? this.tsParseExpressionStatement(t, n) : void 0) || e.prototype.parseExpressionStatement.call(this, t, n);
|
|
5657
5648
|
}, x.shouldParseExportStatement = function() {
|
|
@@ -5683,7 +5674,7 @@ function Cr(e) {
|
|
|
5683
5674
|
return t.parseExportDeclaration(e);
|
|
5684
5675
|
});
|
|
5685
5676
|
var n = this.start, r = this.startLoc, i = this.eatContextual("declare");
|
|
5686
|
-
!i || !this.ts_isContextual(p.declare) && this.shouldParseExportStatement() || this.raise(this.start,
|
|
5677
|
+
!i || !this.ts_isContextual(p.declare) && this.shouldParseExportStatement() || this.raise(this.start, Y.ExpectedAmbientAfterExportDeclare);
|
|
5687
5678
|
var a = v(this.type) && this.tsTryParseExportDeclaration() || this.parseStatement(null);
|
|
5688
5679
|
return a ? ((a.type === "TSInterfaceDeclaration" || a.type === "TSTypeAliasDeclaration" || i) && (e.exportKind = "type"), i && (this.resetStartLocation(a, n, r), a.declare = !0), a) : null;
|
|
5689
5680
|
}, x.parseClassId = function(t, n) {
|
|
@@ -5697,19 +5688,19 @@ function Cr(e) {
|
|
|
5697
5688
|
var t = this.tsTryParseTypeAnnotation();
|
|
5698
5689
|
t && (e.typeAnnotation = t);
|
|
5699
5690
|
}, x.parseClassField = function(t) {
|
|
5700
|
-
if (t.key.type === "PrivateIdentifier") t.abstract && this.raise(t.start,
|
|
5701
|
-
else if (this.parseClassPropertyAnnotation(t), this.isAmbientContext && (!t.readonly || t.typeAnnotation) && this.match(o.eq) && this.raise(this.start,
|
|
5691
|
+
if (t.key.type === "PrivateIdentifier") t.abstract && this.raise(t.start, Y.PrivateElementHasAbstract), t.accessibility && this.raise(t.start, Y.PrivateElementHasAccessibility({ modifier: t.accessibility })), this.parseClassPropertyAnnotation(t);
|
|
5692
|
+
else if (this.parseClassPropertyAnnotation(t), this.isAmbientContext && (!t.readonly || t.typeAnnotation) && this.match(o.eq) && this.raise(this.start, Y.DeclareClassFieldHasInitializer), t.abstract && this.match(o.eq)) {
|
|
5702
5693
|
var n = t.key;
|
|
5703
|
-
this.raise(this.start,
|
|
5694
|
+
this.raise(this.start, Y.AbstractPropertyHasInitializer({ propertyName: n.type !== "Identifier" || t.computed ? "[" + this.input.slice(n.start, n.end) + "]" : n.name }));
|
|
5704
5695
|
}
|
|
5705
5696
|
return e.prototype.parseClassField.call(this, t);
|
|
5706
5697
|
}, x.parseClassMethod = function(e, t, n, r) {
|
|
5707
5698
|
var i = e.kind === "constructor", a = e.key.type === "PrivateIdentifier", o = this.tsTryParseTypeParameters();
|
|
5708
|
-
a ? (o && (e.typeParameters = o), e.accessibility && this.raise(e.start,
|
|
5699
|
+
a ? (o && (e.typeParameters = o), e.accessibility && this.raise(e.start, Y.PrivateMethodsHasAccessibility({ modifier: e.accessibility }))) : o && i && this.raise(o.start, Y.ConstructorHasTypeParameters);
|
|
5709
5700
|
var s = e.declare, c = e.kind;
|
|
5710
|
-
!(s !== void 0 && s) || c !== "get" && c !== "set" || this.raise(e.start,
|
|
5701
|
+
!(s !== void 0 && s) || c !== "get" && c !== "set" || this.raise(e.start, Y.DeclareAccessor({ kind: c })), o && (e.typeParameters = o);
|
|
5711
5702
|
var l = e.key;
|
|
5712
|
-
e.kind === "constructor" ? (t && this.raise(l.start, "Constructor can't be a generator"), n && this.raise(l.start, "Constructor can't be an async method")) : e.static &&
|
|
5703
|
+
e.kind === "constructor" ? (t && this.raise(l.start, "Constructor can't be a generator"), n && this.raise(l.start, "Constructor can't be an async method")) : e.static && sr(e, "prototype") && this.raise(l.start, "Classes may not have a static property named prototype");
|
|
5713
5704
|
var u = e.value = this.parseMethod(t, n, r, !0, e);
|
|
5714
5705
|
return e.kind === "get" && u.params.length !== 0 && this.raiseRecoverable(u.start, "getter should have no params"), e.kind === "set" && u.params.length !== 1 && this.raiseRecoverable(u.start, "setter should have exactly one param"), e.kind === "set" && u.params[0].type === "RestElement" && this.raiseRecoverable(u.params[0].start, "Setter cannot use rest params"), this.finishNode(e, "MethodDefinition");
|
|
5715
5706
|
}, x.isClassMethod = function() {
|
|
@@ -5733,23 +5724,23 @@ function Cr(e) {
|
|
|
5733
5724
|
allowedModifiers: d,
|
|
5734
5725
|
disallowedModifiers: ["in", "out"],
|
|
5735
5726
|
stopOnStartOfClassStaticBlock: !0,
|
|
5736
|
-
errorTemplate:
|
|
5727
|
+
errorTemplate: Y.InvalidModifierOnTypeParameterPositions
|
|
5737
5728
|
}).static;
|
|
5738
5729
|
var f = function() {
|
|
5739
5730
|
if (!n.tsIsStartOfStaticBlocks()) {
|
|
5740
5731
|
var f = n.tsTryParseIndexSignature(a);
|
|
5741
|
-
if (f) return a.abstract && n.raise(a.start,
|
|
5742
|
-
if (!n.inAbstractClass && a.abstract && n.raise(a.start,
|
|
5732
|
+
if (f) return a.abstract && n.raise(a.start, Y.IndexSignatureHasAbstract), a.accessibility && n.raise(a.start, Y.IndexSignatureHasAccessibility({ modifier: a.accessibility })), a.declare && n.raise(a.start, Y.IndexSignatureHasDeclare), a.override && n.raise(a.start, Y.IndexSignatureHasOverride), f;
|
|
5733
|
+
if (!n.inAbstractClass && a.abstract && n.raise(a.start, Y.NonAbstractClassHasAbstractMethod), a.override && t && n.raise(a.start, Y.OverrideNotInSubClass), a.static = r, r && (n.isClassElementNameStart() || n.type === o.star || (s = "static")), !s && i >= 8 && n.eatContextual("async") && (!n.isClassElementNameStart() && n.type !== o.star || n.canInsertSemicolon() ? s = "async" : l = !0), !s && (i >= 9 || !l) && n.eat(o.star) && (c = !0), !s && !l && !c) {
|
|
5743
5734
|
var p = n.value;
|
|
5744
5735
|
(n.eatContextual("get") || n.eatContextual("set")) && (n.isClassElementNameStart() ? u = p : s = p);
|
|
5745
5736
|
}
|
|
5746
5737
|
if (s ? (a.computed = !1, a.key = n.startNodeAt(n.lastTokStart, n.lastTokStartLoc), a.key.name = s, n.finishNode(a.key, "Identifier")) : n.parseClassElementName(a), n.parsePostMemberNameModifiers(a), n.isClassMethod() || i < 13 || n.type === o.parenL || u !== "method" || c || l) {
|
|
5747
|
-
var m = !a.static &&
|
|
5738
|
+
var m = !a.static && sr(a, "constructor"), h = m && t;
|
|
5748
5739
|
m && u !== "method" && n.raise(a.key.start, "Constructor can't have get/set modifier"), a.kind = m ? "constructor" : u, n.parseClassMethod(a, c, l, h);
|
|
5749
5740
|
} else n.parseClassField(a);
|
|
5750
5741
|
return a;
|
|
5751
5742
|
}
|
|
5752
|
-
if (n.next(), n.next(), n.tsHasSomeModifiers(a, d) && n.raise(n.start,
|
|
5743
|
+
if (n.next(), n.next(), n.tsHasSomeModifiers(a, d) && n.raise(n.start, Y.StaticBlockCannotHaveModifier), i >= 13) return e.prototype.parseClassStaticBlock.call(n, a), a;
|
|
5753
5744
|
};
|
|
5754
5745
|
return a.declare ? this.tsInAmbientContext(f) : f(), a;
|
|
5755
5746
|
}, x.isClassElementNameStart = function() {
|
|
@@ -5766,7 +5757,7 @@ function Cr(e) {
|
|
|
5766
5757
|
}, x.parseArrowExpression = function(e, t, n, r) {
|
|
5767
5758
|
this.match(o.colon) && (e.returnType = this.tsParseTypeAnnotation());
|
|
5768
5759
|
var i = this.yieldPos, a = this.awaitPos, s = this.awaitIdentPos;
|
|
5769
|
-
this.enterScope(16 |
|
|
5760
|
+
this.enterScope(16 | gr(n, !1)), this.initFunction(e);
|
|
5770
5761
|
var c = this.maybeInArrowParameters;
|
|
5771
5762
|
return this.options.ecmaVersion >= 8 && (e.async = !!n), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.maybeInArrowParameters = !0, e.params = this.toAssignableList(t, !0), this.maybeInArrowParameters = !1, this.parseFunctionBody(e, !0, !1, r), this.yieldPos = i, this.awaitPos = a, this.awaitIdentPos = s, this.maybeInArrowParameters = c, this.finishNode(e, "ArrowFunctionExpression");
|
|
5772
5763
|
}, x.parseMaybeAssignOrigin = function(e, t, n) {
|
|
@@ -5775,7 +5766,7 @@ function Cr(e) {
|
|
|
5775
5766
|
this.exprAllowed = !1;
|
|
5776
5767
|
}
|
|
5777
5768
|
var r = !1, i = -1, a = -1, s = -1;
|
|
5778
|
-
t ? (i = t.parenthesizedAssign, a = t.trailingComma, s = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new
|
|
5769
|
+
t ? (i = t.parenthesizedAssign, a = t.trailingComma, s = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new ar(), r = !0);
|
|
5779
5770
|
var c = this.start, l = this.startLoc;
|
|
5780
5771
|
(this.type === o.parenL || v(this.type)) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = e === "await");
|
|
5781
5772
|
var u = this.parseMaybeConditional(e, t);
|
|
@@ -5802,7 +5793,7 @@ function Cr(e) {
|
|
|
5802
5793
|
return (a.type !== "ArrowFunctionExpression" || (i = a.extra) != null && i.parenthesized) && r(), f?.params.length !== 0 && p.resetStartLocationFromNode(a, f), a.typeParameters = f, a;
|
|
5803
5794
|
}, l);
|
|
5804
5795
|
if (!g.error && !g.aborted) return f && this.reportReservedArrowTypeParam(f), g.node;
|
|
5805
|
-
if (!u && (
|
|
5796
|
+
if (!u && (pr(!0), !(d = this.tryParse(function() {
|
|
5806
5797
|
return p.parseMaybeAssignOrigin(e, t, n);
|
|
5807
5798
|
}, l)).error)) return d.node;
|
|
5808
5799
|
if ((a = u) != null && a.node) return this.setLookaheadState(u.failState), u.node;
|
|
@@ -5823,20 +5814,20 @@ function Cr(e) {
|
|
|
5823
5814
|
"override",
|
|
5824
5815
|
"readonly"
|
|
5825
5816
|
]
|
|
5826
|
-
}), n = s.accessibility, o = s.override, a = s.readonly, !1 === e && (n || a || o) && this.raise(i.start,
|
|
5817
|
+
}), n = s.accessibility, o = s.override, a = s.readonly, !1 === e && (n || a || o) && this.raise(i.start, Y.UnexpectedParameterModifier);
|
|
5827
5818
|
}
|
|
5828
5819
|
var c = this.parseMaybeDefault(r, i);
|
|
5829
5820
|
this.parseBindingListItem(c);
|
|
5830
5821
|
var l = this.parseMaybeDefault(c.start, c.loc, c);
|
|
5831
5822
|
if (t.length && (l.decorators = t), n || a || o) {
|
|
5832
5823
|
var u = this.startNodeAt(r, i);
|
|
5833
|
-
return n && (u.accessibility = n), a && (u.readonly = a), o && (u.override = o), l.type !== "Identifier" && l.type !== "AssignmentPattern" && this.raise(u.start,
|
|
5824
|
+
return n && (u.accessibility = n), a && (u.readonly = a), o && (u.override = o), l.type !== "Identifier" && l.type !== "AssignmentPattern" && this.raise(u.start, Y.UnsupportedParameterPropertyKind), u.parameter = l, this.finishNode(u, "TSParameterProperty");
|
|
5834
5825
|
}
|
|
5835
5826
|
return l;
|
|
5836
5827
|
}, x.checkLValInnerPattern = function(t, n, r) {
|
|
5837
5828
|
n === void 0 && (n = 0), t.type === "TSParameterProperty" ? this.checkLValInnerPattern(t.parameter, n, r) : e.prototype.checkLValInnerPattern.call(this, t, n, r);
|
|
5838
5829
|
}, x.parseBindingListItem = function(e) {
|
|
5839
|
-
this.eat(o.question) && (e.type === "Identifier" || this.isAmbientContext || this.inType || this.raise(e.start,
|
|
5830
|
+
this.eat(o.question) && (e.type === "Identifier" || this.isAmbientContext || this.inType || this.raise(e.start, Y.PatternIsOptional), e.optional = !0);
|
|
5840
5831
|
var t = this.tsTryParseTypeAnnotation();
|
|
5841
5832
|
return t && (e.typeAnnotation = t), this.resetEndLocation(e), e;
|
|
5842
5833
|
}, x.isAssignable = function(e, t) {
|
|
@@ -5867,12 +5858,12 @@ function Cr(e) {
|
|
|
5867
5858
|
default: return !1;
|
|
5868
5859
|
}
|
|
5869
5860
|
}, x.toAssignable = function(t, n, r) {
|
|
5870
|
-
switch (n === void 0 && (n = !1), r === void 0 && (r = new
|
|
5861
|
+
switch (n === void 0 && (n = !1), r === void 0 && (r = new ar()), t.type) {
|
|
5871
5862
|
case "ParenthesizedExpression": return this.toAssignableParenthesizedExpression(t, n, r);
|
|
5872
5863
|
case "TSAsExpression":
|
|
5873
5864
|
case "TSSatisfiesExpression":
|
|
5874
5865
|
case "TSNonNullExpression":
|
|
5875
|
-
case "TSTypeAssertion": return n || this.raise(t.start,
|
|
5866
|
+
case "TSTypeAssertion": return n || this.raise(t.start, Y.UnexpectedTypeCastInParameter), this.toAssignable(t.expression, n, r);
|
|
5876
5867
|
case "MemberExpression": break;
|
|
5877
5868
|
case "AssignmentExpression": return n || t.left.type !== "TSTypeCastExpression" || (t.left = this.typeCastToParameter(t.left)), e.prototype.toAssignable.call(this, t, n, r);
|
|
5878
5869
|
case "TSTypeCastExpression": return this.typeCastToParameter(t);
|
|
@@ -5924,7 +5915,7 @@ function Cr(e) {
|
|
|
5924
5915
|
if (this.options.ecmaVersion >= 6) {
|
|
5925
5916
|
var s = this.maybeInArrowParameters;
|
|
5926
5917
|
this.maybeInArrowParameters = !0, this.next();
|
|
5927
|
-
var c, l = this.start, u = this.startLoc, d = [], f = !0, p = !1, m = new
|
|
5918
|
+
var c, l = this.start, u = this.startLoc, d = [], f = !0, p = !1, m = new ar(), h = this.yieldPos, g = this.awaitPos;
|
|
5928
5919
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== o.parenR;) {
|
|
5929
5920
|
if (f ? f = !1 : this.expect(o.comma), a && this.afterTrailingComma(o.parenR, !0)) {
|
|
5930
5921
|
p = !0;
|
|
@@ -5993,7 +5984,7 @@ function Cr(e) {
|
|
|
5993
5984
|
return u.typeParameters = a, u;
|
|
5994
5985
|
}
|
|
5995
5986
|
if (!r && c.eat(o.parenL)) {
|
|
5996
|
-
var p = new
|
|
5987
|
+
var p = new ar(), m = c.startNodeAt(t, n);
|
|
5997
5988
|
return m.callee = e, m.arguments = c.parseExprList(o.parenR, c.options.ecmaVersion >= 8, !1, p), c.tsCheckForInvalidTypeCasts(m.arguments), m.typeParameters = a, l && (m.optional = d), c.checkExpressionErrors(p, !0), e = c.finishNode(m, "CallExpression");
|
|
5998
5989
|
}
|
|
5999
5990
|
var h = c.type;
|
|
@@ -6002,7 +5993,7 @@ function Cr(e) {
|
|
|
6002
5993
|
return _.expression = e, _.typeParameters = a, c.finishNode(_, "TSInstantiationExpression");
|
|
6003
5994
|
}
|
|
6004
5995
|
});
|
|
6005
|
-
if (f && this.unexpected(f), p) return p.type === "TSInstantiationExpression" && (this.match(o.dot) || this.match(o.questionDot) && this.lookaheadCharCode() !== 40) && this.raise(this.start,
|
|
5996
|
+
if (f && this.unexpected(f), p) return p.type === "TSInstantiationExpression" && (this.match(o.dot) || this.match(o.questionDot) && this.lookaheadCharCode() !== 40) && this.raise(this.start, Y.InvalidPropertyAccessAfterInstantiationExpression), e = p;
|
|
6006
5997
|
}
|
|
6007
5998
|
var m = this.options.ecmaVersion >= 11, h = m && this.eat(o.questionDot);
|
|
6008
5999
|
r && h && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
@@ -6013,7 +6004,7 @@ function Cr(e) {
|
|
|
6013
6004
|
} else if (!r && this.eat(o.parenL)) {
|
|
6014
6005
|
var v = this.maybeInArrowParameters;
|
|
6015
6006
|
this.maybeInArrowParameters = !0;
|
|
6016
|
-
var te = new
|
|
6007
|
+
var te = new ar(), ne = this.yieldPos, re = this.awaitPos, ie = this.awaitIdentPos;
|
|
6017
6008
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
6018
6009
|
var y = this.parseExprList(o.parenR, this.options.ecmaVersion >= 8, !1, te);
|
|
6019
6010
|
if (i && !h && this.shouldParseAsyncArrow()) this.checkPatternErrors(te, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = ne, this.awaitPos = re, this.awaitIdentPos = ie, e = this.parseSubscriptAsyncArrow(t, n, y, s);
|
|
@@ -6059,7 +6050,7 @@ function Cr(e) {
|
|
|
6059
6050
|
for (this.expect(o.braceL); this.type !== o.braceR;) if (this.match(p.at)) c.push(this.parseDecorator());
|
|
6060
6051
|
else {
|
|
6061
6052
|
var l = this.parseClassElement(e.superClass !== null);
|
|
6062
|
-
c.length && (l.decorators = c, this.resetStartLocationFromNode(l, c[0]), c = []), l && (a.body.push(l), l.type === "MethodDefinition" && l.kind === "constructor" && l.value.type === "FunctionExpression" ? (s && this.raiseRecoverable(l.start, "Duplicate constructor in the same class"), s = !0, l.decorators && l.decorators.length > 0 && this.raise(l.start, "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?")) : l.key && l.key.type === "PrivateIdentifier" &&
|
|
6053
|
+
c.length && (l.decorators = c, this.resetStartLocationFromNode(l, c[0]), c = []), l && (a.body.push(l), l.type === "MethodDefinition" && l.kind === "constructor" && l.value.type === "FunctionExpression" ? (s && this.raiseRecoverable(l.start, "Duplicate constructor in the same class"), s = !0, l.decorators && l.decorators.length > 0 && this.raise(l.start, "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?")) : l.key && l.key.type === "PrivateIdentifier" && or(i, l) && this.raiseRecoverable(l.key.start, "Identifier '#" + l.key.name + "' has already been declared"));
|
|
6063
6054
|
}
|
|
6064
6055
|
return this.strict = r, this.next(), c.length && this.raise(this.start, "Decorators must be attached to a class element."), e.body = this.finishNode(a, "ClassBody"), this.exitClassBody(), this.finishNode(e, t ? "ClassDeclaration" : "ClassExpression");
|
|
6065
6056
|
} finally {
|
|
@@ -6070,9 +6061,9 @@ function Cr(e) {
|
|
|
6070
6061
|
return e && (t.typeParameters = e), t;
|
|
6071
6062
|
}, x.parseMethod = function(e, t, n, r, i) {
|
|
6072
6063
|
var a = this.startNode(), s = this.yieldPos, c = this.awaitPos, l = this.awaitIdentPos;
|
|
6073
|
-
if (this.initFunction(a), this.options.ecmaVersion >= 6 && (a.generator = e), this.options.ecmaVersion >= 8 && (a.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(64 |
|
|
6064
|
+
if (this.initFunction(a), this.options.ecmaVersion >= 6 && (a.generator = e), this.options.ecmaVersion >= 8 && (a.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(64 | gr(t, a.generator) | (n ? 128 : 0)), this.expect(o.parenL), a.params = this.parseClassFunctionParams(), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(a, !1, !0, !1, { isClassMethod: r }), this.yieldPos = s, this.awaitPos = c, this.awaitIdentPos = l, i && i.abstract && a.body) {
|
|
6074
6065
|
var u = i.key;
|
|
6075
|
-
this.raise(i.start,
|
|
6066
|
+
this.raise(i.start, Y.AbstractMethodHasImplementation({ methodName: u.type !== "Identifier" || i.computed ? "[" + this.input.slice(u.start, u.end) + "]" : u.name }));
|
|
6076
6067
|
}
|
|
6077
6068
|
return this.finishNode(a, "FunctionExpression");
|
|
6078
6069
|
}, t.parse = function(e, t) {
|
|
@@ -6109,7 +6100,7 @@ function Cr(e) {
|
|
|
6109
6100
|
te(this.type) ? (c = !0, s = d, i = n ? this.parseIdent() : this.parseModuleExportName(), l = !1) : (i = f, l = !1);
|
|
6110
6101
|
} else te(this.type) ? (l = !1, i = n ? this.parseIdent() : this.parseModuleExportName()) : (c = !0, s = d);
|
|
6111
6102
|
} else te(this.type) && (c = !0, n ? (s = e.prototype.parseIdent.call(this, !0), this.isContextual("as") || this.checkUnreserved(s)) : s = this.parseModuleExportName());
|
|
6112
|
-
c && r && this.raise(u, n ?
|
|
6103
|
+
c && r && this.raise(u, n ? Y.TypeModifierIsUsedInTypeImports : Y.TypeModifierIsUsedInTypeExports), t[a] = s, t[o] = i, t[n ? "importKind" : "exportKind"] = c ? "type" : "value", l && this.eatContextual("as") && (t[o] = n ? this.parseIdent() : this.parseModuleExportName()), t[o] || (t[o] = this.copyNode(t[a])), n && this.checkLValSimple(t[o], 2);
|
|
6113
6104
|
}, x.raiseCommonCheck = function(t, n, r) {
|
|
6114
6105
|
return n === "Comma is not permitted after the rest element" ? this.isAmbientContext && this.match(o.comma) && this.lookaheadCharCode() === 41 ? void this.next() : e.prototype.raise.call(this, t, n) : r ? e.prototype.raiseRecoverable.call(this, t, n) : e.prototype.raise.call(this, t, n);
|
|
6115
6106
|
}, x.raiseRecoverable = function(e, t) {
|
|
@@ -6136,11 +6127,11 @@ function Cr(e) {
|
|
|
6136
6127
|
for (r.attributes = []; this.type !== o.slash && this.type !== p.jsxTagEnd;) r.attributes.push(this.jsx_parseAttribute());
|
|
6137
6128
|
return r.selfClosing = this.eat(o.slash), this.expect(p.jsxTagEnd), this.finishNode(r, i ? "JSXOpeningElement" : "JSXOpeningFragment");
|
|
6138
6129
|
}, x.enterScope = function(t) {
|
|
6139
|
-
t ===
|
|
6130
|
+
t === rr && this.importsStack.push([]), e.prototype.enterScope.call(this, t);
|
|
6140
6131
|
var n = e.prototype.currentScope.call(this);
|
|
6141
6132
|
n.types = [], n.enums = [], n.constEnums = [], n.classes = [], n.exportOnlyBindings = [];
|
|
6142
6133
|
}, x.exitScope = function() {
|
|
6143
|
-
e.prototype.currentScope.call(this).flags ===
|
|
6134
|
+
e.prototype.currentScope.call(this).flags === rr && this.importsStack.pop(), e.prototype.exitScope.call(this);
|
|
6144
6135
|
}, x.hasImport = function(e, t) {
|
|
6145
6136
|
var n = this.importsStack.length;
|
|
6146
6137
|
if (this.importsStack[n - 1].indexOf(e) > -1) return !0;
|
|
@@ -6178,13 +6169,13 @@ function Cr(e) {
|
|
|
6178
6169
|
get: function() {
|
|
6179
6170
|
return i;
|
|
6180
6171
|
}
|
|
6181
|
-
}]) &&
|
|
6172
|
+
}]) && Yn(ie.prototype, y), b && Yn(ie, b), Object.defineProperty(ie, "prototype", { writable: !1 }), t;
|
|
6182
6173
|
}(t);
|
|
6183
6174
|
};
|
|
6184
6175
|
}
|
|
6185
6176
|
//#endregion
|
|
6186
6177
|
//#region src/utilities/index.ts
|
|
6187
|
-
var
|
|
6178
|
+
var xr = [
|
|
6188
6179
|
{
|
|
6189
6180
|
idPrefix: "dpuse-app",
|
|
6190
6181
|
typeId: "app",
|
|
@@ -6251,8 +6242,8 @@ var wr = [
|
|
|
6251
6242
|
isPublished: !0,
|
|
6252
6243
|
uploadGroupName: void 0
|
|
6253
6244
|
}
|
|
6254
|
-
],
|
|
6255
|
-
async function
|
|
6245
|
+
], Sr = r(i);
|
|
6246
|
+
async function Cr(e) {
|
|
6256
6247
|
let r;
|
|
6257
6248
|
try {
|
|
6258
6249
|
r = await t.readdir(e, { withFileTypes: !0 });
|
|
@@ -6272,17 +6263,17 @@ async function Er(e) {
|
|
|
6272
6263
|
}
|
|
6273
6264
|
}));
|
|
6274
6265
|
}
|
|
6275
|
-
async function
|
|
6266
|
+
async function wr(e, n) {
|
|
6276
6267
|
return t.readdir(e, n);
|
|
6277
6268
|
}
|
|
6278
|
-
async function
|
|
6269
|
+
async function X(e, n, r = [], i) {
|
|
6279
6270
|
let a = `${n} ${r.join(" ")}`;
|
|
6280
|
-
e !== void 0 &&
|
|
6281
|
-
let { stdout: o, stderr: s } = await
|
|
6271
|
+
e !== void 0 && $(`${e} - exec(${a})`);
|
|
6272
|
+
let { stdout: o, stderr: s } = await Sr(a);
|
|
6282
6273
|
i === void 0 ? o.trim() && console.log(o.trim()) : await t.writeFile(i, o.trim(), "utf8"), s.trim() && console.error(s.trim());
|
|
6283
6274
|
}
|
|
6284
|
-
async function
|
|
6285
|
-
return
|
|
6275
|
+
async function Z(e, t, n = [], r = !1, i = !1) {
|
|
6276
|
+
return $(`${e} - spawn(${t} ${n.join(" ")})`), new Promise((e, o) => {
|
|
6286
6277
|
a(t, n, {
|
|
6287
6278
|
shell: i,
|
|
6288
6279
|
stdio: "inherit"
|
|
@@ -6291,47 +6282,47 @@ async function X(e, t, n = [], r = !1, i = !1) {
|
|
|
6291
6282
|
});
|
|
6292
6283
|
});
|
|
6293
6284
|
}
|
|
6294
|
-
async function
|
|
6285
|
+
async function Q(e) {
|
|
6295
6286
|
return JSON.parse(await t.readFile(e, "utf8"));
|
|
6296
6287
|
}
|
|
6297
|
-
async function
|
|
6288
|
+
async function Tr(e) {
|
|
6298
6289
|
return await t.readFile(e, "utf8");
|
|
6299
6290
|
}
|
|
6300
|
-
async function
|
|
6291
|
+
async function Er(e) {
|
|
6301
6292
|
try {
|
|
6302
6293
|
await t.unlink(e);
|
|
6303
6294
|
} catch (e) {
|
|
6304
6295
|
if (e.code !== "ENOENT") throw e;
|
|
6305
6296
|
}
|
|
6306
6297
|
}
|
|
6307
|
-
async function
|
|
6298
|
+
async function Dr(e, n) {
|
|
6308
6299
|
await t.writeFile(e, JSON.stringify(n, void 0, 4), "utf8");
|
|
6309
6300
|
}
|
|
6310
|
-
async function
|
|
6301
|
+
async function Or(e, n) {
|
|
6311
6302
|
await t.writeFile(e, n, "utf8");
|
|
6312
6303
|
}
|
|
6313
|
-
function
|
|
6304
|
+
function kr(e) {
|
|
6314
6305
|
let t = "─".repeat(Math.max(e.length + 60, 60));
|
|
6315
6306
|
console.info(`\n[36m${t}`), console.info(`▶️ ${e}`), console.info(`${t}[0m`);
|
|
6316
6307
|
}
|
|
6317
|
-
function
|
|
6308
|
+
function Ar(e) {
|
|
6318
6309
|
console.info(`\n✅ ${e}\n`);
|
|
6319
6310
|
}
|
|
6320
|
-
function
|
|
6311
|
+
function $(e) {
|
|
6321
6312
|
console.info(`\n${e}\n`);
|
|
6322
6313
|
}
|
|
6323
|
-
function
|
|
6324
|
-
let t =
|
|
6314
|
+
function jr(e) {
|
|
6315
|
+
let t = xr.find((t) => e.startsWith(t.idPrefix));
|
|
6325
6316
|
if (!t) throw Error(`Failed to locate module type configuration for identifier '${e}'.`);
|
|
6326
6317
|
return t;
|
|
6327
6318
|
}
|
|
6328
|
-
function
|
|
6329
|
-
let t = F.extend(
|
|
6319
|
+
function Mr(e) {
|
|
6320
|
+
let t = F.extend(br()).parse(e, {
|
|
6330
6321
|
ecmaVersion: "latest",
|
|
6331
6322
|
sourceType: "module",
|
|
6332
6323
|
locations: !0
|
|
6333
6324
|
}), n = [];
|
|
6334
|
-
return
|
|
6325
|
+
return Nr(t, (e) => {
|
|
6335
6326
|
if (e.type !== "MethodDefinition") return;
|
|
6336
6327
|
let t = e, r = t.key;
|
|
6337
6328
|
if (r.type !== "Identifier") return;
|
|
@@ -6339,7 +6330,7 @@ function Fr(e) {
|
|
|
6339
6330
|
i && i !== "constructor" && t.accessibility !== "private" && n.push(i);
|
|
6340
6331
|
}), n;
|
|
6341
6332
|
}
|
|
6342
|
-
function
|
|
6333
|
+
function Nr(e, t) {
|
|
6343
6334
|
t(e);
|
|
6344
6335
|
for (let [n, r] of Object.entries(e)) {
|
|
6345
6336
|
if ([
|
|
@@ -6352,55 +6343,55 @@ function Ir(e, t) {
|
|
|
6352
6343
|
let e = r;
|
|
6353
6344
|
if (Array.isArray(e)) for (let n of e) {
|
|
6354
6345
|
let e = n;
|
|
6355
|
-
e && typeof e.type == "string" &&
|
|
6346
|
+
e && typeof e.type == "string" && Nr(e, t);
|
|
6356
6347
|
}
|
|
6357
|
-
else e && typeof e == "object" && typeof e.type == "string" &&
|
|
6348
|
+
else e && typeof e == "object" && typeof e.type == "string" && Nr(e, t);
|
|
6358
6349
|
}
|
|
6359
6350
|
}
|
|
6360
|
-
function
|
|
6351
|
+
function Pr(e, t, n, r) {
|
|
6361
6352
|
let i = e.indexOf(n), a = e.indexOf(r);
|
|
6362
6353
|
if (i === -1 || a === -1) throw Error(`Markers ${n}-${r} not found in content.`);
|
|
6363
6354
|
return `${e.slice(0, Math.max(0, i + n.length))}\n${t}\n${e.slice(Math.max(0, a))}`;
|
|
6364
6355
|
}
|
|
6365
6356
|
//#endregion
|
|
6366
6357
|
//#region src/utilities/cloudflare.ts
|
|
6367
|
-
async function
|
|
6368
|
-
let e = await
|
|
6358
|
+
async function Fr() {
|
|
6359
|
+
let e = await Q("config.json"), t = {
|
|
6369
6360
|
body: JSON.stringify(e),
|
|
6370
6361
|
headers: { "Content-Type": "application/json" },
|
|
6371
6362
|
method: "PUT"
|
|
6372
|
-
}, n = await fetch(`https://api.dpuse.app/
|
|
6363
|
+
}, n = await fetch(`https://api.dpuse.app/configs/${e.id}`, t);
|
|
6373
6364
|
if (!n.ok) throw Error(await n.text());
|
|
6374
6365
|
}
|
|
6375
|
-
async function
|
|
6366
|
+
async function Ir(e) {
|
|
6376
6367
|
let t = e.id, n = {
|
|
6377
6368
|
body: JSON.stringify(e),
|
|
6378
6369
|
headers: { "Content-Type": "application/json" },
|
|
6379
6370
|
method: "PUT"
|
|
6380
|
-
}, r = await fetch(`https://api.dpuse.app/
|
|
6371
|
+
}, r = await fetch(`https://api.dpuse.app/configs/${t}`, n);
|
|
6381
6372
|
if (!r.ok) throw Error(await r.text());
|
|
6382
6373
|
}
|
|
6383
|
-
async function
|
|
6374
|
+
async function Lr(e, t) {
|
|
6384
6375
|
let n = `v${e.version}`;
|
|
6385
6376
|
async function r(e, r = "") {
|
|
6386
|
-
let i = await
|
|
6377
|
+
let i = await wr(e, { withFileTypes: !0 });
|
|
6387
6378
|
for (let a of i) {
|
|
6388
6379
|
let i = `${e}/${a.name}`, o = r ? `${r}/${a.name}` : a.name;
|
|
6389
6380
|
if (a.isDirectory()) continue;
|
|
6390
6381
|
let s = `${t}_${n}/${o}`.replaceAll("\\", "/"), c = a.name.endsWith(".css") ? "text/css" : "application/octet-stream", l = a.name.endsWith(".js") ? "application/javascript" : c;
|
|
6391
|
-
console.info(`⚙️ Uploading '${o}' → '${s}'...`), await
|
|
6382
|
+
console.info(`⚙️ Uploading '${o}' → '${s}'...`), await X(void 0, `wrangler r2 object put "${s}" --file="${i}" --content-type ${l} --jurisdiction=eu --remote`);
|
|
6392
6383
|
}
|
|
6393
6384
|
}
|
|
6394
6385
|
await r("dist");
|
|
6395
6386
|
}
|
|
6396
6387
|
//#endregion
|
|
6397
6388
|
//#region src/operations/manageProject.ts
|
|
6398
|
-
var
|
|
6389
|
+
var Rr = new Set([
|
|
6399
6390
|
"createObject",
|
|
6400
6391
|
"dropObject",
|
|
6401
6392
|
"removeRecords",
|
|
6402
6393
|
"upsertRecords"
|
|
6403
|
-
]),
|
|
6394
|
+
]), zr = new Set([
|
|
6404
6395
|
"auditObjectContent",
|
|
6405
6396
|
"findObjectFolderPath",
|
|
6406
6397
|
"getReadableStream",
|
|
@@ -6410,142 +6401,142 @@ var Vr = new Set([
|
|
|
6410
6401
|
"retrieveChunks",
|
|
6411
6402
|
"retrieveRecords"
|
|
6412
6403
|
]);
|
|
6413
|
-
async function
|
|
6404
|
+
async function Br() {
|
|
6414
6405
|
try {
|
|
6415
|
-
|
|
6406
|
+
kr("Build Project"), await Z("1️⃣ Bundle project", "vite", ["build"]), Ar("Project built.");
|
|
6416
6407
|
} catch (e) {
|
|
6417
6408
|
console.error("❌ Error building project.", e), process.exit(1);
|
|
6418
6409
|
}
|
|
6419
6410
|
}
|
|
6420
|
-
async function
|
|
6411
|
+
async function Vr() {
|
|
6421
6412
|
try {
|
|
6422
|
-
|
|
6423
|
-
let e = await
|
|
6424
|
-
await
|
|
6425
|
-
let n =
|
|
6413
|
+
kr("Release Project");
|
|
6414
|
+
let e = await Q("package.json"), t = await Q("config.json");
|
|
6415
|
+
await Xr("1️⃣", e);
|
|
6416
|
+
let n = jr(t.id);
|
|
6426
6417
|
switch (n.typeId) {
|
|
6427
6418
|
case "connector":
|
|
6428
|
-
t = await
|
|
6419
|
+
t = await Ur("2️⃣", e);
|
|
6429
6420
|
break;
|
|
6430
6421
|
case "context":
|
|
6431
|
-
t = await
|
|
6422
|
+
t = await Wr("2️⃣", e);
|
|
6432
6423
|
break;
|
|
6433
6424
|
case "presenter":
|
|
6434
|
-
t = await
|
|
6425
|
+
t = await Gr("2️⃣", e);
|
|
6435
6426
|
break;
|
|
6436
|
-
default: t = await
|
|
6427
|
+
default: t = await Hr("2️⃣", e);
|
|
6437
6428
|
}
|
|
6438
|
-
if (await
|
|
6429
|
+
if (await Z("3️⃣ Bundle project", "vite", ["build"]), await X("4️⃣ Stage changes", "git", ["add", "."]), await X("5️⃣ Commit changes", "git", [
|
|
6439
6430
|
"commit",
|
|
6440
6431
|
"-m",
|
|
6441
6432
|
`"v${e.version}"`
|
|
6442
|
-
]), await
|
|
6433
|
+
]), await X("6️⃣ Push changes", "git", [
|
|
6443
6434
|
"push",
|
|
6444
6435
|
"origin",
|
|
6445
6436
|
"main:main"
|
|
6446
|
-
]), n.typeId === "app")
|
|
6447
|
-
else if (n.typeId === "engine")
|
|
6448
|
-
else if (n.uploadGroupName === void 0)
|
|
6437
|
+
]), n.typeId === "app") $("7️⃣ Register module"), await Fr();
|
|
6438
|
+
else if (n.typeId === "engine") $("7️⃣ Register module"), await Lr(e, `dpuse-engine-eu/${n.uploadGroupName}`), await Ir(t);
|
|
6439
|
+
else if (n.uploadGroupName === void 0) $("7️⃣ Registration NOT required.");
|
|
6449
6440
|
else {
|
|
6450
|
-
|
|
6441
|
+
$("7️⃣ Register module");
|
|
6451
6442
|
let r = t.id.split("-").slice(2).join("-");
|
|
6452
|
-
await
|
|
6443
|
+
await Lr(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await Ir(t);
|
|
6453
6444
|
}
|
|
6454
6445
|
if (n.isPublished) {
|
|
6455
6446
|
let e = ".npmrc";
|
|
6456
6447
|
try {
|
|
6457
|
-
await
|
|
6448
|
+
await Or(e, `registry=https://registry.npmjs.org/\n//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN ?? ""}`), await Z("8️⃣ Publish to npm", "npm", [
|
|
6458
6449
|
"publish",
|
|
6459
6450
|
"--access",
|
|
6460
6451
|
"public"
|
|
6461
6452
|
]);
|
|
6462
6453
|
} finally {
|
|
6463
|
-
await
|
|
6454
|
+
await Er(e);
|
|
6464
6455
|
}
|
|
6465
|
-
} else
|
|
6466
|
-
|
|
6456
|
+
} else $(`8️⃣ Publishing NOT required for package with type identifier of '${n.typeId}'.`);
|
|
6457
|
+
Ar(`Project version '${e.version}' released.`);
|
|
6467
6458
|
} catch (e) {
|
|
6468
6459
|
console.error("❌ Error releasing project.", e), process.exit(1);
|
|
6469
6460
|
}
|
|
6470
6461
|
}
|
|
6471
|
-
async function
|
|
6472
|
-
|
|
6473
|
-
let n = await
|
|
6474
|
-
return t.name != null && (n.id = t.name.replace("@dpuse/", "").replace("@dpuse/", "")), t.version != null && (n.version = t.version), await
|
|
6462
|
+
async function Hr(e, t) {
|
|
6463
|
+
$(`${e} Build project configuration`);
|
|
6464
|
+
let n = await Q("config.json");
|
|
6465
|
+
return t.name != null && (n.id = t.name.replace("@dpuse/", "").replace("@dpuse/", "")), t.version != null && (n.version = t.version), await Dr("config.json", n), n;
|
|
6475
6466
|
}
|
|
6476
|
-
async function
|
|
6477
|
-
|
|
6478
|
-
let [n, r] = await Promise.all([
|
|
6467
|
+
async function Ur(e, t) {
|
|
6468
|
+
$(`${e} Build connector project configuration`);
|
|
6469
|
+
let [n, r] = await Promise.all([Q("config.json"), Tr("src/index.ts")]), i = /* @__PURE__ */ m(ke, n);
|
|
6479
6470
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid.");
|
|
6480
|
-
let a =
|
|
6481
|
-
return await
|
|
6471
|
+
let a = Mr(r);
|
|
6472
|
+
return await qr(t, n, a, Kr(a));
|
|
6482
6473
|
}
|
|
6483
|
-
async function
|
|
6484
|
-
|
|
6485
|
-
let [n, r] = await Promise.all([
|
|
6474
|
+
async function Wr(e, t) {
|
|
6475
|
+
$(`${e} Build context project configuration`);
|
|
6476
|
+
let [n, r] = await Promise.all([Q("config.json"), Tr("src/index.ts")]), i = /* @__PURE__ */ m(Me, n);
|
|
6486
6477
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid.");
|
|
6487
|
-
return await
|
|
6478
|
+
return await qr(t, n, Mr(r));
|
|
6488
6479
|
}
|
|
6489
|
-
async function
|
|
6490
|
-
|
|
6491
|
-
let [n, r] = await Promise.all([
|
|
6480
|
+
async function Gr(e, t) {
|
|
6481
|
+
$(`${e} Build presenter project configuration`);
|
|
6482
|
+
let [n, r] = await Promise.all([Q("config.json"), Tr("src/index.ts")]), i = /* @__PURE__ */ m(Pe, n);
|
|
6492
6483
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid.");
|
|
6493
|
-
return await
|
|
6484
|
+
return await qr(t, n, Mr(r));
|
|
6494
6485
|
}
|
|
6495
|
-
function
|
|
6486
|
+
function Kr(e) {
|
|
6496
6487
|
let t = !1, n = !1;
|
|
6497
|
-
for (let r of e)
|
|
6488
|
+
for (let r of e) zr.has(r) && (t = !0), Rr.has(r) && (n = !0);
|
|
6498
6489
|
return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
|
|
6499
6490
|
}
|
|
6500
|
-
async function
|
|
6501
|
-
return n.length > 0 ? (console.info(`ℹ️ Implements ${n.length} operations:`), console.table(n)) : console.warn("⚠️ Implements no operations."), r === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports '${r}' usage.`), e.name != null && (t.id = e.name.replace("@dpuse/", "").replace("@dpuse/", "")), e.version != null && (t.version = e.version), t.operations = n, t.usageId = r ?? "unknown", await
|
|
6491
|
+
async function qr(e, t, n, r) {
|
|
6492
|
+
return n.length > 0 ? (console.info(`ℹ️ Implements ${n.length} operations:`), console.table(n)) : console.warn("⚠️ Implements no operations."), r === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports '${r}' usage.`), e.name != null && (t.id = e.name.replace("@dpuse/", "").replace("@dpuse/", "")), e.version != null && (t.version = e.version), t.operations = n, t.usageId = r ?? "unknown", await Dr("config.json", t), t;
|
|
6502
6493
|
}
|
|
6503
|
-
async function
|
|
6494
|
+
async function Jr() {
|
|
6504
6495
|
try {
|
|
6505
|
-
|
|
6506
|
-
let e = await
|
|
6507
|
-
switch (
|
|
6496
|
+
kr("Synchronise Project with GitHub");
|
|
6497
|
+
let e = await Q("package.json"), t = await Q("config.json");
|
|
6498
|
+
switch (await Xr("1️⃣", e), jr(t.id).typeId) {
|
|
6508
6499
|
case "connector":
|
|
6509
|
-
await
|
|
6500
|
+
await Ur("2️⃣", e);
|
|
6510
6501
|
break;
|
|
6511
6502
|
case "context":
|
|
6512
|
-
await
|
|
6503
|
+
await Wr("2️⃣", e);
|
|
6513
6504
|
break;
|
|
6514
6505
|
case "presenter":
|
|
6515
|
-
await
|
|
6506
|
+
await Gr("2️⃣", e);
|
|
6516
6507
|
break;
|
|
6517
|
-
default: await
|
|
6508
|
+
default: await Hr("2️⃣", e);
|
|
6518
6509
|
}
|
|
6519
|
-
await
|
|
6510
|
+
await X("3️⃣ Stage changes", "git", ["add", "."]), await X("4️⃣ Commit changes", "git", [
|
|
6520
6511
|
"commit",
|
|
6521
6512
|
"-m",
|
|
6522
6513
|
`"v${e.version}"`
|
|
6523
|
-
]), await
|
|
6514
|
+
]), await X("5️⃣ Push changes", "git", [
|
|
6524
6515
|
"push",
|
|
6525
6516
|
"origin",
|
|
6526
6517
|
"main:main"
|
|
6527
|
-
]),
|
|
6518
|
+
]), Ar(`Project version '${e.version}' synchronised with GitHub.`);
|
|
6528
6519
|
} catch (e) {
|
|
6529
6520
|
console.error("❌ Error synchronising project with GitHub.", e), process.exit(1);
|
|
6530
6521
|
}
|
|
6531
6522
|
}
|
|
6532
|
-
function
|
|
6523
|
+
function Yr() {
|
|
6533
6524
|
try {
|
|
6534
|
-
|
|
6525
|
+
kr("Test Project"), console.error("\n❌ No tests implemented.\n");
|
|
6535
6526
|
} catch (e) {
|
|
6536
6527
|
console.error("❌ Error testing project.", e), process.exit(1);
|
|
6537
6528
|
}
|
|
6538
6529
|
}
|
|
6539
|
-
async function
|
|
6540
|
-
if (
|
|
6530
|
+
async function Xr(e, t, n = "./") {
|
|
6531
|
+
if ($(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`), await Dr(`${n}package.json`, t);
|
|
6541
6532
|
else {
|
|
6542
6533
|
let e = t.version, r = t.version.split(".");
|
|
6543
|
-
t.version = `${r[0]}.${r[1]}.${Number(r[2]) + 1}`, console.info(`Project version bumped from '${e}' to '${t.version}'.`), await
|
|
6534
|
+
t.version = `${r[0]}.${r[1]}.${Number(r[2]) + 1}`, console.info(`Project version bumped from '${e}' to '${t.version}'.`), await Dr(`${n}package.json`, t);
|
|
6544
6535
|
}
|
|
6545
6536
|
}
|
|
6546
6537
|
//#endregion
|
|
6547
6538
|
//#region src/operations/auditDependencies.ts
|
|
6548
|
-
var
|
|
6539
|
+
var Zr = {
|
|
6549
6540
|
critical: {
|
|
6550
6541
|
color: "D32F2F",
|
|
6551
6542
|
label: "critical"
|
|
@@ -6566,16 +6557,16 @@ var ei = {
|
|
|
6566
6557
|
color: "616161",
|
|
6567
6558
|
label: "unknown"
|
|
6568
6559
|
}
|
|
6569
|
-
},
|
|
6570
|
-
async function
|
|
6560
|
+
}, Qr = "<!-- OWASP_BADGES_START -->", $r = "<!-- OWASP_BADGES_END -->";
|
|
6561
|
+
async function ei() {
|
|
6571
6562
|
try {
|
|
6572
|
-
|
|
6573
|
-
let e = await
|
|
6563
|
+
kr("Audit Dependencies");
|
|
6564
|
+
let e = await Q("package.json"), t = [];
|
|
6574
6565
|
try {
|
|
6575
|
-
let e = (await
|
|
6566
|
+
let e = (await wr("dependency-check-bin")).toSorted((e, t) => e.localeCompare(t)).at(-1);
|
|
6576
6567
|
e != null && e !== "" && t.push("--owasp-bin", `dependency-check-bin/${e}/dependency-check/bin/dependency-check.sh`);
|
|
6577
6568
|
} catch {}
|
|
6578
|
-
await
|
|
6569
|
+
await Z("1️⃣", "owasp-dependency-check", [
|
|
6579
6570
|
...t,
|
|
6580
6571
|
"--out",
|
|
6581
6572
|
"dependency-check-reports",
|
|
@@ -6585,14 +6576,14 @@ async function ri() {
|
|
|
6585
6576
|
"--nodePackageSkipDevDependencies",
|
|
6586
6577
|
"--nvdApiKey",
|
|
6587
6578
|
process.env.OWASP_NVD_API_KEY ?? ""
|
|
6588
|
-
]), await
|
|
6579
|
+
]), await ti("2️⃣"), await Z("3️⃣ Check using 'npm audit'", "npm", ["audit"]), Ar("Dependencies audited.");
|
|
6589
6580
|
} catch (e) {
|
|
6590
6581
|
console.error("❌ Error auditing dependencies.", e), process.exit(1);
|
|
6591
6582
|
}
|
|
6592
6583
|
}
|
|
6593
|
-
async function
|
|
6594
|
-
|
|
6595
|
-
let t = await
|
|
6584
|
+
async function ti(e) {
|
|
6585
|
+
$(`${e} Insert OWASP Badge(s) into 'README.md'`);
|
|
6586
|
+
let t = await Q("dependency-check-reports/dependency-check-report.json"), n = {
|
|
6596
6587
|
critical: 0,
|
|
6597
6588
|
high: 0,
|
|
6598
6589
|
moderate: 0,
|
|
@@ -6603,14 +6594,14 @@ async function ii(e) {
|
|
|
6603
6594
|
let e = t.severity?.toLowerCase() ?? "unknown";
|
|
6604
6595
|
e in n ? n[e]++ : n.unknown++;
|
|
6605
6596
|
}
|
|
6606
|
-
let r = await
|
|
6607
|
-
await
|
|
6597
|
+
let r = await ni(n);
|
|
6598
|
+
await Or("README.md", Pr(await Tr("./README.md"), r.join(" "), Qr, $r)), console.info("OWASP audit badge(s) inserted into 'README.md'");
|
|
6608
6599
|
}
|
|
6609
|
-
async function
|
|
6610
|
-
let t = await
|
|
6600
|
+
async function ni(e) {
|
|
6601
|
+
let t = await Q("config.json"), n = [];
|
|
6611
6602
|
if (Object.values(e).reduce((e, t) => e + t, 0) === 0) console.info("No vulnerabilities found."), n.push(`[](https://dpuse.github.io/${t.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
6612
6603
|
else for (let [r, i] of Object.entries(e)) {
|
|
6613
|
-
let e =
|
|
6604
|
+
let e = Zr[r];
|
|
6614
6605
|
if (console.warn(`⚠️ ${i} ${e.label} vulnerability(ies) found.`), i === 0) continue;
|
|
6615
6606
|
let a = `https://img.shields.io/badge/OWASP-${i}%20${e.label}-${e.color}`;
|
|
6616
6607
|
n.push(`[](https://dpuse.github.io/${t.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
@@ -6619,35 +6610,35 @@ async function ai(e) {
|
|
|
6619
6610
|
}
|
|
6620
6611
|
//#endregion
|
|
6621
6612
|
//#region src/operations/checkDependencies.ts
|
|
6622
|
-
async function
|
|
6613
|
+
async function ri() {
|
|
6623
6614
|
try {
|
|
6624
|
-
|
|
6615
|
+
kr("Check Dependencies"), await Z("1️⃣ Check using 'npm outdated'", "npm", ["outdated"], !0), await Z("2️⃣ Check using 'npm-check-updates'", "npm-check-updates", [
|
|
6625
6616
|
"-i",
|
|
6626
6617
|
"--dep",
|
|
6627
6618
|
"dev,prod,peer,optional"
|
|
6628
|
-
]),
|
|
6619
|
+
]), Ar("Dependencies checked.");
|
|
6629
6620
|
} catch (e) {
|
|
6630
6621
|
console.error("❌ Error checking dependencies.", e), process.exit(1);
|
|
6631
6622
|
}
|
|
6632
6623
|
}
|
|
6633
6624
|
//#endregion
|
|
6634
6625
|
//#region src/operations/documentDependencies.ts
|
|
6635
|
-
var
|
|
6636
|
-
async function
|
|
6626
|
+
var ii = "<!-- DEPENDENCY_LICENSES_START -->", ai = "<!-- DEPENDENCY_LICENSES_END -->";
|
|
6627
|
+
async function oi(e = [], t = !0) {
|
|
6637
6628
|
try {
|
|
6638
|
-
|
|
6629
|
+
kr("Document Dependencies");
|
|
6639
6630
|
let n = e.flatMap((e) => ["--allowed", `'${e}'`]);
|
|
6640
|
-
await
|
|
6631
|
+
await X("1️⃣ Generate 'licenses.json' file", "license-report", [
|
|
6641
6632
|
"--config",
|
|
6642
6633
|
`'${s(new o(import.meta.resolve("@dpuse/dpuse-development/license-report-config")))}'`,
|
|
6643
6634
|
"--only=prod,peer",
|
|
6644
6635
|
"--output=json"
|
|
6645
|
-
], "licenses/licenses.json"), await
|
|
6636
|
+
], "licenses/licenses.json"), await X("2️⃣ Check 'licenses.json' file", "license-report-check", [
|
|
6646
6637
|
"--source",
|
|
6647
6638
|
"licenses/licenses.json",
|
|
6648
6639
|
"--output=table",
|
|
6649
6640
|
...n
|
|
6650
|
-
]), t ? (await
|
|
6641
|
+
]), t ? (await X("3️⃣ Generate 'licenseTree.json' file", "license-report-recursive", [
|
|
6651
6642
|
"--only=prod,peer",
|
|
6652
6643
|
"--output=tree",
|
|
6653
6644
|
"--recurse",
|
|
@@ -6655,15 +6646,15 @@ async function li(e = [], t = !0) {
|
|
|
6655
6646
|
"--licensePeriod.value=n/a",
|
|
6656
6647
|
"--material.value=n/a",
|
|
6657
6648
|
"--relatedTo.value=n/a"
|
|
6658
|
-
], "licenses/licenseTree.json"), await
|
|
6649
|
+
], "licenses/licenseTree.json"), await X("4️⃣ Check 'licenseTree.json' file", "license-report-check", [
|
|
6659
6650
|
"--source",
|
|
6660
6651
|
"licenses/licenseTree.json",
|
|
6661
6652
|
"--output=table",
|
|
6662
6653
|
...n
|
|
6663
|
-
])) : (
|
|
6654
|
+
])) : ($("3️⃣ Skip 'licenses/licenseTree.json' file generate"), $("4️⃣ Skip 'licenses/licenseTree.json' file check"));
|
|
6664
6655
|
let r = process.env.GITHUB_TOKEN;
|
|
6665
6656
|
if (r == null || r === "" || r.startsWith("op://")) throw Error("GITHUB_TOKEN is not resolved. Run the script via \"npm run document\" to use 1Password resolution.");
|
|
6666
|
-
await
|
|
6657
|
+
await Cr("licenses/downloads"), await X("5️⃣ Download license files", "license-downloader", [
|
|
6667
6658
|
"--source",
|
|
6668
6659
|
"licenses/licenses.json",
|
|
6669
6660
|
"--licDir",
|
|
@@ -6671,15 +6662,15 @@ async function li(e = [], t = !0) {
|
|
|
6671
6662
|
"--githubToken.tokenEnvVar",
|
|
6672
6663
|
"GITHUB_TOKEN",
|
|
6673
6664
|
"--download"
|
|
6674
|
-
]), await
|
|
6665
|
+
]), await si("6️⃣", t), Ar("Dependencies documented.");
|
|
6675
6666
|
} catch (e) {
|
|
6676
6667
|
console.error("❌ Error documenting dependencies.", e), process.exit(1);
|
|
6677
6668
|
}
|
|
6678
6669
|
}
|
|
6679
|
-
async function
|
|
6680
|
-
|
|
6681
|
-
let n = await
|
|
6682
|
-
t && (i = await
|
|
6670
|
+
async function si(e, t) {
|
|
6671
|
+
$(`${e} Insert licenses into 'README.md'`);
|
|
6672
|
+
let n = await Q("licenses/licenses.json"), r = await Q("licenses/downloads/licenses.ext.json"), i = [];
|
|
6673
|
+
t && (i = await Q("licenses/licenseTree.json"));
|
|
6683
6674
|
let a = [...(() => {
|
|
6684
6675
|
let e = /* @__PURE__ */ new Map();
|
|
6685
6676
|
for (let t of n) e.set(t.name, { ...t });
|
|
@@ -6700,13 +6691,13 @@ async function ui(e, t) {
|
|
|
6700
6691
|
return e.values();
|
|
6701
6692
|
})()], o = "|Name|Type|Installed|Latest|Latest Released|Deps|Document|\n|:-|:-|:-:|:-:|:-|-:|:-|\n";
|
|
6702
6693
|
for (let e of a) {
|
|
6703
|
-
let t = e.installedVersion === e.remoteVersion ? e.installedVersion : `${e.installedVersion} ⚠️`, n = e.latestRemoteModified ?
|
|
6694
|
+
let t = e.installedVersion === e.remoteVersion ? e.installedVersion : `${e.installedVersion} ⚠️`, n = e.latestRemoteModified ? ci(e.latestRemoteModified.split("T")[0]) : "n/a", r = e.dependencyCount != null && e.dependencyCount >= 0 ? e.dependencyCount : "n/a", i;
|
|
6704
6695
|
i = e.licenseFileLink == null || e.licenseFileLink == "" ? "⚠️ No license file" : `[${e.licenseFileLink.slice(Math.max(0, e.licenseFileLink.lastIndexOf("/") + 1))}](${e.licenseFileLink})`, o += `|${e.name}|${e.licenseType}|${t}|${e.remoteVersion}|${n}|${r}|${i}|\n`;
|
|
6705
6696
|
}
|
|
6706
|
-
let s =
|
|
6707
|
-
await
|
|
6697
|
+
let s = Pr(await Tr("./README.md"), o, ii, ai);
|
|
6698
|
+
await Or("README.md", s), console.info("OWASP audit badge(s) inserted into 'README.md'"), await Or("README.md", s);
|
|
6708
6699
|
}
|
|
6709
|
-
function
|
|
6700
|
+
function ci(e) {
|
|
6710
6701
|
if (e == null || e === "") return "n/a";
|
|
6711
6702
|
let t = e.split("T")[0];
|
|
6712
6703
|
if (t == null || t === "") return "n/a";
|
|
@@ -6715,31 +6706,31 @@ function di(e) {
|
|
|
6715
6706
|
}
|
|
6716
6707
|
//#endregion
|
|
6717
6708
|
//#region src/operations/formatCode.ts
|
|
6718
|
-
async function
|
|
6709
|
+
async function li() {
|
|
6719
6710
|
try {
|
|
6720
|
-
|
|
6711
|
+
kr("Format Code"), await Z("1️⃣ Format", "prettier", [
|
|
6721
6712
|
"--write",
|
|
6722
6713
|
"*.json",
|
|
6723
6714
|
"*.md",
|
|
6724
6715
|
"*.ts",
|
|
6725
6716
|
...["app", "src"].filter((t) => e(t)).map((e) => `${e}/**`)
|
|
6726
|
-
]),
|
|
6717
|
+
]), Ar("Code formatted.");
|
|
6727
6718
|
} catch (e) {
|
|
6728
6719
|
console.error("❌ Error formatting code.", e), process.exit(1);
|
|
6729
6720
|
}
|
|
6730
6721
|
}
|
|
6731
6722
|
//#endregion
|
|
6732
6723
|
//#region src/operations/lintCode.ts
|
|
6733
|
-
async function
|
|
6724
|
+
async function ui() {
|
|
6734
6725
|
try {
|
|
6735
|
-
|
|
6726
|
+
kr("Lint Code"), await Z("1️⃣ Lint", "eslint", ["."]), Ar("Code linted.");
|
|
6736
6727
|
} catch (e) {
|
|
6737
6728
|
console.error("❌ Error linting code.", e), process.exit(1);
|
|
6738
6729
|
}
|
|
6739
6730
|
}
|
|
6740
6731
|
//#endregion
|
|
6741
6732
|
//#region src/operations/updateDPUseDependencies.ts
|
|
6742
|
-
var
|
|
6733
|
+
var di = [
|
|
6743
6734
|
"1️⃣",
|
|
6744
6735
|
"2️⃣",
|
|
6745
6736
|
"3️⃣",
|
|
@@ -6750,26 +6741,26 @@ var mi = [
|
|
|
6750
6741
|
"8️⃣",
|
|
6751
6742
|
"9️⃣"
|
|
6752
6743
|
];
|
|
6753
|
-
async function
|
|
6744
|
+
async function fi(e = []) {
|
|
6754
6745
|
try {
|
|
6755
|
-
|
|
6746
|
+
kr("Update '@dpuse/dpuse' Dependencies");
|
|
6756
6747
|
for (let [t, n] of e.entries()) {
|
|
6757
|
-
let e =
|
|
6758
|
-
n === "eslint" ? await
|
|
6748
|
+
let e = di.at(t) ?? "🔢";
|
|
6749
|
+
n === "eslint" ? await Z(`${e} Update '${n}'`, "npm", ["install", "@dpuse/eslint-config-dpuse@latest"]) : (await Z(`${e} Update '${n}'`, "npm", ["install", `@dpuse/dpuse-${n}@latest`]), n === "development" && await pi(jr((await Q("config.json")).id)));
|
|
6759
6750
|
}
|
|
6760
|
-
|
|
6751
|
+
Ar("'@dpuse/dpuse' dependencies updated.");
|
|
6761
6752
|
} catch (e) {
|
|
6762
6753
|
console.error("❌ Error updating '@dpuse/dpuse' dependencies.", e), process.exit(1);
|
|
6763
6754
|
}
|
|
6764
6755
|
}
|
|
6765
|
-
async function
|
|
6756
|
+
async function pi(e) {
|
|
6766
6757
|
let t = n.dirname(s(import.meta.url));
|
|
6767
|
-
await
|
|
6758
|
+
await mi(t, "../", ".editorconfig"), await mi(t, "../", ".gitattributes"), await (e.isPublished ? mi(t, "../", ".gitignore_published", ".gitignore2") : mi(t, "../", ".gitignore_unpublished", ".gitignore2")), await mi(t, "../", ".markdownlint.json"), await mi(t, "../", "LICENSE"), await mi(t, "../", "tsconfig.json", "tsconfig2.json"), e.typeId === "eslint" || (await mi(t, "../", "eslint.config.ts", "eslint.config2.ts"), await mi(t, "../", "vite.config.ts", "vite.config2.ts"), await mi(t, "../", "vitest.config.ts", "vitest.config2.ts"));
|
|
6768
6759
|
}
|
|
6769
|
-
async function
|
|
6770
|
-
let a = await
|
|
6760
|
+
async function mi(e, t, r, i) {
|
|
6761
|
+
let a = await Tr(n.resolve(e, `${t}${r}`)), o = n.resolve(process.cwd(), r.split("_")[0] ?? r), s = n.resolve(process.cwd(), i ?? r), c;
|
|
6771
6762
|
try {
|
|
6772
|
-
c = await
|
|
6763
|
+
c = await Tr(o);
|
|
6773
6764
|
} catch (e) {
|
|
6774
6765
|
if (e.code !== "ENOENT") throw e;
|
|
6775
6766
|
}
|
|
@@ -6777,11 +6768,11 @@ async function $(e, t, r, i) {
|
|
|
6777
6768
|
console.info(`ℹ️ File '${r.split("_")[0] ?? r}' is already up to date.`);
|
|
6778
6769
|
return;
|
|
6779
6770
|
}
|
|
6780
|
-
await
|
|
6771
|
+
await Or(s, a), console.info(`ℹ️ File '${i ?? r}' synchronised.`);
|
|
6781
6772
|
}
|
|
6782
6773
|
//#endregion
|
|
6783
6774
|
//#region src/index.ts
|
|
6784
|
-
async function
|
|
6775
|
+
async function hi(e) {
|
|
6785
6776
|
try {
|
|
6786
6777
|
console.info(`🚀 Building public directory index for identifier '${e}'...`);
|
|
6787
6778
|
let n = {};
|
|
@@ -6826,6 +6817,6 @@ async function _i(e) {
|
|
|
6826
6817
|
}
|
|
6827
6818
|
}
|
|
6828
6819
|
//#endregion
|
|
6829
|
-
export {
|
|
6820
|
+
export { ei as auditDependencies, hi as buildDirectoryIndex, Br as buildProject, ri as checkDependencies, oi as documentDependencies, li as formatCode, ui as lintCode, Vr as releaseProject, Jr as syncProjectWithGitHub, Yr as testProject, fi as updateDPUseDependencies };
|
|
6830
6821
|
|
|
6831
6822
|
//# sourceMappingURL=dpuse-development.es.js.map
|