@powerlines/plugin-automd 0.1.283 → 0.1.285

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.
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/.pnpm/acorn@8.15.0/node_modules/acorn/dist/acorn.mjs
1
+ //#region ../../node_modules/.pnpm/acorn@8.16.0/node_modules/acorn/dist/acorn.mjs
2
2
  var astralIdentifierCodes = [
3
3
  509,
4
4
  0,
@@ -30,8 +30,8 @@ var astralIdentifierCodes = [
30
30
  4,
31
31
  318,
32
32
  1,
33
- 80,
34
- 3,
33
+ 78,
34
+ 5,
35
35
  71,
36
36
  10,
37
37
  50,
@@ -176,7 +176,9 @@ var astralIdentifierCodes = [
176
176
  10,
177
177
  47,
178
178
  15,
179
- 343,
179
+ 199,
180
+ 7,
181
+ 137,
180
182
  9,
181
183
  54,
182
184
  7,
@@ -208,7 +210,9 @@ var astralIdentifierCodes = [
208
210
  4,
209
211
  9,
210
212
  9,
211
- 330,
213
+ 55,
214
+ 9,
215
+ 266,
212
216
  3,
213
217
  10,
214
218
  1,
@@ -308,7 +312,15 @@ var astralIdentifierCodes = [
308
312
  1,
309
313
  2,
310
314
  9,
311
- 726,
315
+ 233,
316
+ 0,
317
+ 3,
318
+ 0,
319
+ 8,
320
+ 1,
321
+ 6,
322
+ 0,
323
+ 475,
312
324
  6,
313
325
  110,
314
326
  6,
@@ -418,7 +430,9 @@ var astralIdentifierStartCodes = [
418
430
  21,
419
431
  11,
420
432
  25,
421
- 71,
433
+ 7,
434
+ 25,
435
+ 39,
422
436
  55,
423
437
  7,
424
438
  1,
@@ -463,8 +477,8 @@ var astralIdentifierStartCodes = [
463
477
  7,
464
478
  1,
465
479
  17,
466
- 2,
467
- 60,
480
+ 5,
481
+ 57,
468
482
  28,
469
483
  11,
470
484
  0,
@@ -648,7 +662,9 @@ var astralIdentifierStartCodes = [
648
662
  31,
649
663
  15,
650
664
  0,
651
- 328,
665
+ 24,
666
+ 43,
667
+ 261,
652
668
  18,
653
669
  16,
654
670
  0,
@@ -696,7 +712,11 @@ var astralIdentifierStartCodes = [
696
712
  44,
697
713
  212,
698
714
  63,
699
- 129,
715
+ 33,
716
+ 24,
717
+ 3,
718
+ 24,
719
+ 45,
700
720
  74,
701
721
  6,
702
722
  0,
@@ -706,13 +726,15 @@ var astralIdentifierStartCodes = [
706
726
  1,
707
727
  2,
708
728
  0,
709
- 29,
710
- 6135,
711
- 9,
712
- 1237,
729
+ 15,
730
+ 4,
731
+ 10,
732
+ 7381,
713
733
  42,
714
- 9,
715
- 8936,
734
+ 31,
735
+ 98,
736
+ 114,
737
+ 8702,
716
738
  3,
717
739
  2,
718
740
  6,
@@ -820,7 +842,19 @@ var astralIdentifierStartCodes = [
820
842
  29,
821
843
  3,
822
844
  0,
823
- 496,
845
+ 208,
846
+ 30,
847
+ 2,
848
+ 2,
849
+ 2,
850
+ 1,
851
+ 2,
852
+ 6,
853
+ 3,
854
+ 4,
855
+ 10,
856
+ 1,
857
+ 225,
824
858
  6,
825
859
  2,
826
860
  3,
@@ -903,12 +937,10 @@ var astralIdentifierStartCodes = [
903
937
  4421,
904
938
  42719,
905
939
  33,
906
- 4153,
907
- 7,
908
- 221,
940
+ 4381,
941
+ 3,
942
+ 5773,
909
943
  3,
910
- 5761,
911
- 15,
912
944
  7472,
913
945
  16,
914
946
  621,
@@ -917,10 +949,10 @@ var astralIdentifierStartCodes = [
917
949
  1507,
918
950
  4938,
919
951
  6,
920
- 4191
952
+ 8489
921
953
  ];
922
- var nonASCIIidentifierChars = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";
923
- var nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟍꟐꟑꟓꟕ-Ƛꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";
954
+ var nonASCIIidentifierChars = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";
955
+ var nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";
924
956
  var reservedWords = {
925
957
  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",
926
958
  5: "class enum extends super const export import",
@@ -1223,6 +1255,7 @@ function getOptions(opts) {
1223
1255
  };
1224
1256
  }
1225
1257
  if (isArray(options.onComment)) options.onComment = pushComment(options, options.onComment);
1258
+ if (options.sourceType === "commonjs" && options.allowAwaitOutsideFunction) throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");
1226
1259
  return options;
1227
1260
  }
1228
1261
  function pushComment(options, array) {
@@ -1238,7 +1271,7 @@ function pushComment(options, array) {
1238
1271
  array.push(comment);
1239
1272
  };
1240
1273
  }
1241
- var SCOPE_TOP = 1, SCOPE_FUNCTION = 2, SCOPE_ASYNC = 4, SCOPE_GENERATOR = 8, SCOPE_ARROW = 16, SCOPE_SIMPLE_CATCH = 32, SCOPE_SUPER = 64, SCOPE_DIRECT_SUPER = 128, SCOPE_CLASS_STATIC_BLOCK = 256, SCOPE_CLASS_FIELD_INIT = 512, SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
1274
+ var SCOPE_TOP = 1, SCOPE_FUNCTION = 2, SCOPE_ASYNC = 4, SCOPE_GENERATOR = 8, SCOPE_ARROW = 16, SCOPE_SIMPLE_CATCH = 32, SCOPE_SUPER = 64, SCOPE_DIRECT_SUPER = 128, SCOPE_CLASS_STATIC_BLOCK = 256, SCOPE_CLASS_FIELD_INIT = 512, SCOPE_SWITCH = 1024, SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
1242
1275
  function functionFlags(async, generator) {
1243
1276
  return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0);
1244
1277
  }
@@ -1283,7 +1316,7 @@ var Parser = function Parser$1(options, input, startPos) {
1283
1316
  this.undefinedExports = Object.create(null);
1284
1317
  if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") this.skipLineComment(2);
1285
1318
  this.scopeStack = [];
1286
- this.enterScope(SCOPE_TOP);
1319
+ this.enterScope(this.options.sourceType === "commonjs" ? SCOPE_FUNCTION : SCOPE_TOP);
1287
1320
  this.regexpState = null;
1288
1321
  this.privateNameStack = [];
1289
1322
  };
@@ -1292,10 +1325,12 @@ var prototypeAccessors = {
1292
1325
  inGenerator: { configurable: true },
1293
1326
  inAsync: { configurable: true },
1294
1327
  canAwait: { configurable: true },
1328
+ allowReturn: { configurable: true },
1295
1329
  allowSuper: { configurable: true },
1296
1330
  allowDirectSuper: { configurable: true },
1297
1331
  treatFunctionsAsVar: { configurable: true },
1298
1332
  allowNewDotTarget: { configurable: true },
1333
+ allowUsing: { configurable: true },
1299
1334
  inClassStaticBlock: { configurable: true }
1300
1335
  };
1301
1336
  Parser.prototype.parse = function parse() {
@@ -1320,6 +1355,11 @@ prototypeAccessors.canAwait.get = function() {
1320
1355
  }
1321
1356
  return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
1322
1357
  };
1358
+ prototypeAccessors.allowReturn.get = function() {
1359
+ if (this.inFunction) return true;
1360
+ if (this.options.allowReturnOutsideFunction && this.currentVarScope().flags & SCOPE_TOP) return true;
1361
+ return false;
1362
+ };
1323
1363
  prototypeAccessors.allowSuper.get = function() {
1324
1364
  return (this.currentThisScope().flags & SCOPE_SUPER) > 0 || this.options.allowSuperOutsideMethod;
1325
1365
  };
@@ -1336,6 +1376,12 @@ prototypeAccessors.allowNewDotTarget.get = function() {
1336
1376
  }
1337
1377
  return false;
1338
1378
  };
1379
+ prototypeAccessors.allowUsing.get = function() {
1380
+ var flags = this.currentScope().flags;
1381
+ if (flags & SCOPE_SWITCH) return false;
1382
+ if (!this.inModule && flags & SCOPE_TOP) return false;
1383
+ return true;
1384
+ };
1339
1385
  prototypeAccessors.inClassStaticBlock.get = function() {
1340
1386
  return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK) > 0;
1341
1387
  };
@@ -1460,7 +1506,7 @@ pp$8.parseTopLevel = function(node) {
1460
1506
  }
1461
1507
  this.adaptDirectivePrologue(node.body);
1462
1508
  this.next();
1463
- node.sourceType = this.options.sourceType;
1509
+ node.sourceType = this.options.sourceType === "commonjs" ? "script" : this.options.sourceType;
1464
1510
  return this.finishNode(node, "Program");
1465
1511
  };
1466
1512
  var loopLabel = { kind: "loop" }, switchLabel = { kind: "switch" };
@@ -1468,15 +1514,17 @@ pp$8.isLet = function(context) {
1468
1514
  if (this.options.ecmaVersion < 6 || !this.isContextual("let")) return false;
1469
1515
  skipWhiteSpace.lastIndex = this.pos;
1470
1516
  var skip = skipWhiteSpace.exec(this.input);
1471
- var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
1517
+ var next = this.pos + skip[0].length, nextCh = this.fullCharCodeAt(next);
1472
1518
  if (nextCh === 91 || nextCh === 92) return true;
1473
1519
  if (context) return false;
1474
- if (nextCh === 123 || nextCh > 55295 && nextCh < 56320) return true;
1475
- if (isIdentifierStart(nextCh, true)) {
1476
- var pos = next + 1;
1477
- while (isIdentifierChar(nextCh = this.input.charCodeAt(pos), true)) ++pos;
1478
- if (nextCh === 92 || nextCh > 55295 && nextCh < 56320) return true;
1479
- var ident = this.input.slice(next, pos);
1520
+ if (nextCh === 123) return true;
1521
+ if (isIdentifierStart(nextCh)) {
1522
+ var start = next;
1523
+ do
1524
+ next += nextCh <= 65535 ? 1 : 2;
1525
+ while (isIdentifierChar(nextCh = this.fullCharCodeAt(next)));
1526
+ if (nextCh === 92) return true;
1527
+ var ident = this.input.slice(start, next);
1480
1528
  if (!keywordRelationalOperator.test(ident)) return true;
1481
1529
  }
1482
1530
  return false;
@@ -1486,7 +1534,7 @@ pp$8.isAsyncFunction = function() {
1486
1534
  skipWhiteSpace.lastIndex = this.pos;
1487
1535
  var skip = skipWhiteSpace.exec(this.input);
1488
1536
  var next = this.pos + skip[0].length, after;
1489
- return !lineBreak.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 55295 && after < 56320));
1537
+ return !lineBreak.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar(after = this.fullCharCodeAt(next + 8)) || after === 92));
1490
1538
  };
1491
1539
  pp$8.isUsingKeyword = function(isAwaitUsing, isFor) {
1492
1540
  if (this.options.ecmaVersion < 17 || !this.isContextual(isAwaitUsing ? "await" : "using")) return false;
@@ -1495,20 +1543,23 @@ pp$8.isUsingKeyword = function(isAwaitUsing, isFor) {
1495
1543
  var next = this.pos + skip[0].length;
1496
1544
  if (lineBreak.test(this.input.slice(this.pos, next))) return false;
1497
1545
  if (isAwaitUsing) {
1498
- var awaitEndPos = next + 5, after;
1499
- if (this.input.slice(next, awaitEndPos) !== "using" || awaitEndPos === this.input.length || isIdentifierChar(after = this.input.charCodeAt(awaitEndPos)) || after > 55295 && after < 56320) return false;
1500
- skipWhiteSpace.lastIndex = awaitEndPos;
1546
+ var usingEndPos = next + 5, after;
1547
+ if (this.input.slice(next, usingEndPos) !== "using" || usingEndPos === this.input.length || isIdentifierChar(after = this.fullCharCodeAt(usingEndPos)) || after === 92) return false;
1548
+ skipWhiteSpace.lastIndex = usingEndPos;
1501
1549
  var skipAfterUsing = skipWhiteSpace.exec(this.input);
1502
- if (skipAfterUsing && lineBreak.test(this.input.slice(awaitEndPos, awaitEndPos + skipAfterUsing[0].length))) return false;
1503
- }
1504
- if (isFor) {
1505
- var ofEndPos = next + 2, after$1;
1506
- if (this.input.slice(next, ofEndPos) === "of") {
1507
- if (ofEndPos === this.input.length || !isIdentifierChar(after$1 = this.input.charCodeAt(ofEndPos)) && !(after$1 > 55295 && after$1 < 56320)) return false;
1508
- }
1509
- }
1510
- var ch = this.input.charCodeAt(next);
1511
- return isIdentifierStart(ch, true) || ch === 92;
1550
+ next = usingEndPos + skipAfterUsing[0].length;
1551
+ if (skipAfterUsing && lineBreak.test(this.input.slice(usingEndPos, next))) return false;
1552
+ }
1553
+ var ch = this.fullCharCodeAt(next);
1554
+ if (!isIdentifierStart(ch) && ch !== 92) return false;
1555
+ var idStart = next;
1556
+ do
1557
+ next += ch <= 65535 ? 1 : 2;
1558
+ while (isIdentifierChar(ch = this.fullCharCodeAt(next)));
1559
+ if (ch === 92) return true;
1560
+ var id = this.input.slice(idStart, next);
1561
+ if (keywordRelationalOperator.test(id) || isFor && id === "of") return false;
1562
+ return true;
1512
1563
  };
1513
1564
  pp$8.isAwaitUsing = function(isFor) {
1514
1565
  return this.isUsingKeyword(true, isFor);
@@ -1569,7 +1620,7 @@ pp$8.parseStatement = function(context, topLevel, exports) {
1569
1620
  }
1570
1621
  var usingKind = this.isAwaitUsing(false) ? "await using" : this.isUsing(false) ? "using" : null;
1571
1622
  if (usingKind) {
1572
- if (topLevel && this.options.sourceType === "script") this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script`");
1623
+ if (!this.allowUsing) this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script` or in the bare case statement");
1573
1624
  if (usingKind === "await using") {
1574
1625
  if (!this.canAwait) this.raise(this.start, "Await using cannot appear outside of async function");
1575
1626
  this.next();
@@ -1643,7 +1694,10 @@ pp$8.parseForStatement = function(node) {
1643
1694
  if (usingKind) {
1644
1695
  var init$2 = this.startNode();
1645
1696
  this.next();
1646
- if (usingKind === "await using") this.next();
1697
+ if (usingKind === "await using") {
1698
+ if (!this.canAwait) this.raise(this.start, "Await using cannot appear outside of async function");
1699
+ this.next();
1700
+ }
1647
1701
  this.parseVar(init$2, true, usingKind);
1648
1702
  this.finishNode(init$2, "VariableDeclaration");
1649
1703
  return this.parseForAfterInit(node, init$2, awaitAt);
@@ -1690,7 +1744,7 @@ pp$8.parseIfStatement = function(node) {
1690
1744
  return this.finishNode(node, "IfStatement");
1691
1745
  };
1692
1746
  pp$8.parseReturnStatement = function(node) {
1693
- if (!this.inFunction && !this.options.allowReturnOutsideFunction) this.raise(this.start, "'return' outside of function");
1747
+ if (!this.allowReturn) this.raise(this.start, "'return' outside of function");
1694
1748
  this.next();
1695
1749
  if (this.eat(types$1.semi) || this.insertSemicolon()) node.argument = null;
1696
1750
  else {
@@ -1705,7 +1759,7 @@ pp$8.parseSwitchStatement = function(node) {
1705
1759
  node.cases = [];
1706
1760
  this.expect(types$1.braceL);
1707
1761
  this.labels.push(switchLabel);
1708
- this.enterScope(0);
1762
+ this.enterScope(SCOPE_SWITCH);
1709
1763
  var cur;
1710
1764
  for (var sawDefault = false; this.type !== types$1.braceR;) if (this.type === types$1._case || this.type === types$1._default) {
1711
1765
  var isCase = this.type === types$1._case;
@@ -3446,7 +3500,7 @@ pp$2.copyNode = function(node) {
3446
3500
  for (var prop in node) newNode[prop] = node[prop];
3447
3501
  return newNode;
3448
3502
  };
3449
- var scriptValuesAddedInUnicode = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz";
3503
+ var scriptValuesAddedInUnicode = "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";
3450
3504
  var ecma9BinaryProperties = "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";
3451
3505
  var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic";
3452
3506
  var ecma11BinaryProperties = ecma10BinaryProperties;
@@ -4452,12 +4506,15 @@ pp.readToken = function(code) {
4452
4506
  if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92) return this.readWord();
4453
4507
  return this.getTokenFromCode(code);
4454
4508
  };
4455
- pp.fullCharCodeAtPos = function() {
4456
- var code = this.input.charCodeAt(this.pos);
4509
+ pp.fullCharCodeAt = function(pos) {
4510
+ var code = this.input.charCodeAt(pos);
4457
4511
  if (code <= 55295 || code >= 56320) return code;
4458
- var next = this.input.charCodeAt(this.pos + 1);
4512
+ var next = this.input.charCodeAt(pos + 1);
4459
4513
  return next <= 56319 || next >= 57344 ? code : (code << 10) + next - 56613888;
4460
4514
  };
4515
+ pp.fullCharCodeAtPos = function() {
4516
+ return this.fullCharCodeAt(this.pos);
4517
+ };
4461
4518
  pp.skipBlockComment = function() {
4462
4519
  var startLoc = this.options.onComment && this.curPosition();
4463
4520
  var start = this.pos, end = this.input.indexOf("*/", this.pos += 2);
@@ -5001,7 +5058,7 @@ pp.readWord = function() {
5001
5058
  if (this.keywords.test(word)) type = keywords[word];
5002
5059
  return this.finishToken(type, word);
5003
5060
  };
5004
- var version = "8.15.0";
5061
+ var version = "8.16.0";
5005
5062
  Parser.acorn = {
5006
5063
  Parser,
5007
5064
  version,