form-designer-xinyi
Version:
基于vue3的设计器,可视化开发页面表单
846 lines • 169 kB
JavaScript
import { reactive as Bt, inject as pe, ref as Pe, onMounted as Re, watch as Oe, nextTick as fe, computed as de, defineComponent as Mt, provide as We, openBlock as Ge, createElementBlock as He, createVNode as Ut, unref as ze, mergeProps as qt, withCtx as jt, renderSlot as Ke, Fragment as Wt, renderList as Gt } from "vue";
import { Form as Ht } from "ant-design-vue";
import { a as tt, c as Qe, j as zt, f as Xe } from "./revoke-iScTU0eW.js";
var Kt = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239], it = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191], Qt = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・", st = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", Ae = {
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",
5: "class enum extends super const export import",
6: "enum",
strict: "implements interface let package private protected public static yield",
strictBind: "eval arguments"
}, Ee = "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", Xt = {
5: Ee,
"5module": Ee + " export import",
6: Ee + " const class extends export import super"
}, Yt = /^in(stanceof)?$/, $t = new RegExp("[" + st + "]"), Zt = new RegExp("[" + st + Qt + "]");
function Ne(e, t) {
for (var i = 65536, s = 0; s < t.length; s += 2) {
if (i += t[s], i > e)
return !1;
if (i += t[s + 1], i >= e)
return !0;
}
return !1;
}
function H(e, t) {
return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && $t.test(String.fromCharCode(e)) : t === !1 ? !1 : Ne(e, it);
}
function Z(e, t) {
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 && Zt.test(String.fromCharCode(e)) : t === !1 ? !1 : Ne(e, it) || Ne(e, Kt);
}
var E = function(t, i) {
i === void 0 && (i = {}), this.label = t, this.keyword = i.keyword, this.beforeExpr = !!i.beforeExpr, this.startsExpr = !!i.startsExpr, this.isLoop = !!i.isLoop, this.isAssign = !!i.isAssign, this.prefix = !!i.prefix, this.postfix = !!i.postfix, this.binop = i.binop || null, this.updateContext = null;
};
function M(e, t) {
return new E(e, { beforeExpr: !0, binop: t });
}
var U = { beforeExpr: !0 }, O = { startsExpr: !0 }, De = {};
function w(e, t) {
return t === void 0 && (t = {}), t.keyword = e, De[e] = new E(e, t);
}
var r = {
num: new E("num", O),
regexp: new E("regexp", O),
string: new E("string", O),
name: new E("name", O),
privateId: new E("privateId", O),
eof: new E("eof"),
// Punctuation token types.
bracketL: new E("[", { beforeExpr: !0, startsExpr: !0 }),
bracketR: new E("]"),
braceL: new E("{", { beforeExpr: !0, startsExpr: !0 }),
braceR: new E("}"),
parenL: new E("(", { beforeExpr: !0, startsExpr: !0 }),
parenR: new E(")"),
comma: new E(",", U),
semi: new E(";", U),
colon: new E(":", U),
dot: new E("."),
question: new E("?", U),
questionDot: new E("?."),
arrow: new E("=>", U),
template: new E("template"),
invalidTemplate: new E("invalidTemplate"),
ellipsis: new E("...", U),
backQuote: new E("`", O),
dollarBraceL: new E("${", { beforeExpr: !0, startsExpr: !0 }),
// Operators. These carry several kinds of properties to help the
// parser use them properly (the presence of these properties is
// what categorizes them as operators).
//
// `binop`, when present, specifies that this operator is a binary
// operator, and will refer to its precedence.
//
// `prefix` and `postfix` mark the operator as a prefix or postfix
// unary operator.
//
// `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
// binary operators with a very low precedence, that should result
// in AssignmentExpression nodes.
eq: new E("=", { beforeExpr: !0, isAssign: !0 }),
assign: new E("_=", { beforeExpr: !0, isAssign: !0 }),
incDec: new E("++/--", { prefix: !0, postfix: !0, startsExpr: !0 }),
prefix: new E("!/~", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
logicalOR: M("||", 1),
logicalAND: M("&&", 2),
bitwiseOR: M("|", 3),
bitwiseXOR: M("^", 4),
bitwiseAND: M("&", 5),
equality: M("==/!=/===/!==", 6),
relational: M("</>/<=/>=", 7),
bitShift: M("<</>>/>>>", 8),
plusMin: new E("+/-", { beforeExpr: !0, binop: 9, prefix: !0, startsExpr: !0 }),
modulo: M("%", 10),
star: M("*", 10),
slash: M("/", 10),
starstar: new E("**", { beforeExpr: !0 }),
coalesce: M("??", 1),
// Keyword token types.
_break: w("break"),
_case: w("case", U),
_catch: w("catch"),
_continue: w("continue"),
_debugger: w("debugger"),
_default: w("default", U),
_do: w("do", { isLoop: !0, beforeExpr: !0 }),
_else: w("else", U),
_finally: w("finally"),
_for: w("for", { isLoop: !0 }),
_function: w("function", O),
_if: w("if"),
_return: w("return", U),
_switch: w("switch"),
_throw: w("throw", U),
_try: w("try"),
_var: w("var"),
_const: w("const"),
_while: w("while", { isLoop: !0 }),
_with: w("with"),
_new: w("new", { beforeExpr: !0, startsExpr: !0 }),
_this: w("this", O),
_super: w("super", O),
_class: w("class", O),
_extends: w("extends", U),
_export: w("export"),
_import: w("import", O),
_null: w("null", O),
_true: w("true", O),
_false: w("false", O),
_in: w("in", { beforeExpr: !0, binop: 7 }),
_instanceof: w("instanceof", { beforeExpr: !0, binop: 7 }),
_typeof: w("typeof", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
_void: w("void", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
_delete: w("delete", { beforeExpr: !0, prefix: !0, startsExpr: !0 })
}, D = /\r\n?|\n|\u2028|\u2029/, Jt = new RegExp(D.source, "g");
function te(e) {
return e === 10 || e === 13 || e === 8232 || e === 8233;
}
function rt(e, t, i) {
i === void 0 && (i = e.length);
for (var s = t; s < i; s++) {
var a = e.charCodeAt(s);
if (te(a))
return s < i - 1 && a === 13 && e.charCodeAt(s + 1) === 10 ? s + 2 : s + 1;
}
return -1;
}
var at = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, V = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, nt = Object.prototype, ei = nt.hasOwnProperty, ti = nt.toString, ie = Object.hasOwn || function(e, t) {
return ei.call(e, t);
}, Ye = Array.isArray || function(e) {
return ti.call(e) === "[object Array]";
}, $e = /* @__PURE__ */ Object.create(null);
function $(e) {
return $e[e] || ($e[e] = new RegExp("^(?:" + e.replace(/ /g, "|") + ")$"));
}
function Q(e) {
return e <= 65535 ? String.fromCharCode(e) : (e -= 65536, String.fromCharCode((e >> 10) + 55296, (e & 1023) + 56320));
}
var ii = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/, ne = function(t, i) {
this.line = t, this.column = i;
};
ne.prototype.offset = function(t) {
return new ne(this.line, this.column + t);
};
var be = function(t, i, s) {
this.start = i, this.end = s, t.sourceFile !== null && (this.source = t.sourceFile);
};
function ut(e, t) {
for (var i = 1, s = 0; ; ) {
var a = rt(e, s, t);
if (a < 0)
return new ne(i, t - s);
++i, s = a;
}
}
var Ve = {
// `ecmaVersion` indicates the ECMAScript version to parse. Must be
// either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10
// (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"`
// (the latest version the library supports). This influences
// support for strict mode, the set of reserved words, and support
// for new syntax features.
ecmaVersion: null,
// `sourceType` indicates the mode the code should be parsed in.
// Can be either `"script"` or `"module"`. This influences global
// strict mode and parsing of `import` and `export` declarations.
sourceType: "script",
// `onInsertedSemicolon` can be a callback that will be called when
// a semicolon is automatically inserted. It will be passed the
// position of the inserted semicolon as an offset, and if
// `locations` is enabled, it is given the location as a `{line,
// column}` object as second argument.
onInsertedSemicolon: null,
// `onTrailingComma` is similar to `onInsertedSemicolon`, but for
// trailing commas.
onTrailingComma: null,
// By default, reserved words are only enforced if ecmaVersion >= 5.
// Set `allowReserved` to a boolean value to explicitly turn this on
// an off. When this option has the value "never", reserved words
// and keywords can also not be used as property names.
allowReserved: null,
// When enabled, a return at the top level is not considered an
// error.
allowReturnOutsideFunction: !1,
// When enabled, import/export statements are not constrained to
// appearing at the top of the program, and an import.meta expression
// in a script isn't considered an error.
allowImportExportEverywhere: !1,
// By default, await identifiers are allowed to appear at the top-level scope only if ecmaVersion >= 2022.
// When enabled, await identifiers are allowed to appear at the top-level scope,
// but they are still not allowed in non-async functions.
allowAwaitOutsideFunction: null,
// When enabled, super identifiers are not constrained to
// appearing in methods and do not raise an error when they appear elsewhere.
allowSuperOutsideMethod: null,
// When enabled, hashbang directive in the beginning of file is
// allowed and treated as a line comment. Enabled by default when
// `ecmaVersion` >= 2023.
allowHashBang: !1,
// By default, the parser will verify that private properties are
// only used in places where they are valid and have been declared.
// Set this to false to turn such checks off.
checkPrivateFields: !0,
// When `locations` is on, `loc` properties holding objects with
// `start` and `end` properties in `{line, column}` form (with
// line being 1-based and column 0-based) will be attached to the
// nodes.
locations: !1,
// A function can be passed as `onToken` option, which will
// cause Acorn to call that function with object in the same
// format as tokens returned from `tokenizer().getToken()`. Note
// that you are not allowed to call the parser from the
// callback—that will corrupt its internal state.
onToken: null,
// A function can be passed as `onComment` option, which will
// cause Acorn to call that function with `(block, text, start,
// end)` parameters whenever a comment is skipped. `block` is a
// boolean indicating whether this is a block (`/* */`) comment,
// `text` is the content of the comment, and `start` and `end` are
// character offsets that denote the start and end of the comment.
// When the `locations` option is on, two more parameters are
// passed, the full `{line, column}` locations of the start and
// end of the comments. Note that you are not allowed to call the
// parser from the callback—that will corrupt its internal state.
// When this option has an array as value, objects representing the
// comments are pushed to it.
onComment: null,
// Nodes have their start and end characters offsets recorded in
// `start` and `end` properties (directly on the node, rather than
// the `loc` object, which holds line/column data. To also add a
// [semi-standardized][range] `range` property holding a `[start,
// end]` array with the same numbers, set the `ranges` option to
// `true`.
//
// [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678
ranges: !1,
// It is possible to parse multiple files into a single AST by
// passing the tree produced by parsing the first file as
// `program` option in subsequent parses. This will add the
// toplevel forms of the parsed file to the `Program` (top) node
// of an existing parse tree.
program: null,
// When `locations` is on, you can pass this to record the source
// file in every node's `loc` object.
sourceFile: null,
// This value, if given, is stored in every node, whether
// `locations` is on or off.
directSourceFile: null,
// When enabled, parenthesized expressions are represented by
// (non-standard) ParenthesizedExpression nodes
preserveParens: !1
}, Ze = !1;
function si(e) {
var t = {};
for (var i in Ve)
t[i] = e && ie(e, i) ? e[i] : Ve[i];
if (t.ecmaVersion === "latest" ? t.ecmaVersion = 1e8 : t.ecmaVersion == null ? (!Ze && typeof console == "object" && console.warn && (Ze = !0, console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion = 11) : t.ecmaVersion >= 2015 && (t.ecmaVersion -= 2009), t.allowReserved == null && (t.allowReserved = t.ecmaVersion < 5), (!e || e.allowHashBang == null) && (t.allowHashBang = t.ecmaVersion >= 14), Ye(t.onToken)) {
var s = t.onToken;
t.onToken = function(a) {
return s.push(a);
};
}
return Ye(t.onComment) && (t.onComment = ri(t, t.onComment)), t;
}
function ri(e, t) {
return function(i, s, a, n, u, h) {
var c = {
type: i ? "Block" : "Line",
value: s,
start: a,
end: n
};
e.locations && (c.loc = new be(this, u, h)), e.ranges && (c.range = [a, n]), t.push(c);
};
}
var ue = 1, se = 2, Fe = 4, ot = 8, Be = 16, ht = 32, ye = 64, ct = 128, ee = 256, oe = 512, Se = ue | se | ee;
function Me(e, t) {
return se | (e ? Fe : 0) | (t ? ot : 0);
}
var xe = 0, Ue = 1, Y = 2, lt = 3, pt = 4, ft = 5, N = function(t, i, s) {
this.options = t = si(t), this.sourceFile = t.sourceFile, this.keywords = $(Xt[t.ecmaVersion >= 6 ? 6 : t.sourceType === "module" ? "5module" : 5]);
var a = "";
t.allowReserved !== !0 && (a = Ae[t.ecmaVersion >= 6 ? 6 : t.ecmaVersion === 5 ? 5 : 3], t.sourceType === "module" && (a += " await")), this.reservedWords = $(a);
var n = (a ? a + " " : "") + Ae.strict;
this.reservedWordsStrict = $(n), this.reservedWordsStrictBind = $(n + " " + Ae.strictBind), this.input = String(i), this.containsEsc = !1, s ? (this.pos = s, this.lineStart = this.input.lastIndexOf(`
`, s - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(D).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = r.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 = t.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 = /* @__PURE__ */ Object.create(null), this.pos === 0 && t.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(ue), this.regexpState = null, this.privateNameStack = [];
}, z = { inFunction: { configurable: !0 }, inGenerator: { configurable: !0 }, inAsync: { configurable: !0 }, canAwait: { configurable: !0 }, allowSuper: { configurable: !0 }, allowDirectSuper: { configurable: !0 }, treatFunctionsAsVar: { configurable: !0 }, allowNewDotTarget: { configurable: !0 }, inClassStaticBlock: { configurable: !0 } };
N.prototype.parse = function() {
var t = this.options.program || this.startNode();
return this.nextToken(), this.parseTopLevel(t);
};
z.inFunction.get = function() {
return (this.currentVarScope().flags & se) > 0;
};
z.inGenerator.get = function() {
return (this.currentVarScope().flags & ot) > 0;
};
z.inAsync.get = function() {
return (this.currentVarScope().flags & Fe) > 0;
};
z.canAwait.get = function() {
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
var t = this.scopeStack[e], i = t.flags;
if (i & (ee | oe))
return !1;
if (i & se)
return (i & Fe) > 0;
}
return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
};
z.allowSuper.get = function() {
var e = this.currentThisScope(), t = e.flags;
return (t & ye) > 0 || this.options.allowSuperOutsideMethod;
};
z.allowDirectSuper.get = function() {
return (this.currentThisScope().flags & ct) > 0;
};
z.treatFunctionsAsVar.get = function() {
return this.treatFunctionsAsVarInScope(this.currentScope());
};
z.allowNewDotTarget.get = function() {
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
var t = this.scopeStack[e], i = t.flags;
if (i & (ee | oe) || i & se && !(i & Be))
return !0;
}
return !1;
};
z.inClassStaticBlock.get = function() {
return (this.currentVarScope().flags & ee) > 0;
};
N.extend = function() {
for (var t = [], i = arguments.length; i--; ) t[i] = arguments[i];
for (var s = this, a = 0; a < t.length; a++)
s = t[a](s);
return s;
};
N.parse = function(t, i) {
return new this(i, t).parse();
};
N.parseExpressionAt = function(t, i, s) {
var a = new this(s, t, i);
return a.nextToken(), a.parseExpression();
};
N.tokenizer = function(t, i) {
return new this(i, t);
};
Object.defineProperties(N.prototype, z);
var T = N.prototype, ai = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
T.strictDirective = function(e) {
if (this.options.ecmaVersion < 5)
return !1;
for (; ; ) {
V.lastIndex = e, e += V.exec(this.input)[0].length;
var t = ai.exec(this.input.slice(e));
if (!t)
return !1;
if ((t[1] || t[2]) === "use strict") {
V.lastIndex = e + t[0].length;
var i = V.exec(this.input), s = i.index + i[0].length, a = this.input.charAt(s);
return a === ";" || a === "}" || D.test(i[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(a) || a === "!" && this.input.charAt(s + 1) === "=");
}
e += t[0].length, V.lastIndex = e, e += V.exec(this.input)[0].length, this.input[e] === ";" && e++;
}
};
T.eat = function(e) {
return this.type === e ? (this.next(), !0) : !1;
};
T.isContextual = function(e) {
return this.type === r.name && this.value === e && !this.containsEsc;
};
T.eatContextual = function(e) {
return this.isContextual(e) ? (this.next(), !0) : !1;
};
T.expectContextual = function(e) {
this.eatContextual(e) || this.unexpected();
};
T.canInsertSemicolon = function() {
return this.type === r.eof || this.type === r.braceR || D.test(this.input.slice(this.lastTokEnd, this.start));
};
T.insertSemicolon = function() {
if (this.canInsertSemicolon())
return this.options.onInsertedSemicolon && this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc), !0;
};
T.semicolon = function() {
!this.eat(r.semi) && !this.insertSemicolon() && this.unexpected();
};
T.afterTrailingComma = function(e, t) {
if (this.type === e)
return this.options.onTrailingComma && this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc), t || this.next(), !0;
};
T.expect = function(e) {
this.eat(e) || this.unexpected();
};
T.unexpected = function(e) {
this.raise(e ?? this.start, "Unexpected token");
};
var _e = function() {
this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
};
T.checkPatternErrors = function(e, t) {
if (e) {
e.trailingComma > -1 && this.raiseRecoverable(e.trailingComma, "Comma is not permitted after the rest element");
var i = t ? e.parenthesizedAssign : e.parenthesizedBind;
i > -1 && this.raiseRecoverable(i, t ? "Assigning to rvalue" : "Parenthesized pattern");
}
};
T.checkExpressionErrors = function(e, t) {
if (!e)
return !1;
var i = e.shorthandAssign, s = e.doubleProto;
if (!t)
return i >= 0 || s >= 0;
i >= 0 && this.raise(i, "Shorthand property assignments are valid only in destructuring patterns"), s >= 0 && this.raiseRecoverable(s, "Redefinition of __proto__ property");
};
T.checkYieldAwaitInDefaultParams = function() {
this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos) && this.raise(this.yieldPos, "Yield expression cannot be a default value"), this.awaitPos && this.raise(this.awaitPos, "Await expression cannot be a default value");
};
T.isSimpleAssignTarget = function(e) {
return e.type === "ParenthesizedExpression" ? this.isSimpleAssignTarget(e.expression) : e.type === "Identifier" || e.type === "MemberExpression";
};
var d = N.prototype;
d.parseTopLevel = function(e) {
var t = /* @__PURE__ */ Object.create(null);
for (e.body || (e.body = []); this.type !== r.eof; ) {
var i = this.parseStatement(null, !0, t);
e.body.push(i);
}
if (this.inModule)
for (var s = 0, a = Object.keys(this.undefinedExports); s < a.length; s += 1) {
var n = a[s];
this.raiseRecoverable(this.undefinedExports[n].start, "Export '" + n + "' is not defined");
}
return this.adaptDirectivePrologue(e.body), this.next(), e.sourceType = this.options.sourceType, this.finishNode(e, "Program");
};
var qe = { kind: "loop" }, ni = { kind: "switch" };
d.isLet = function(e) {
if (this.options.ecmaVersion < 6 || !this.isContextual("let"))
return !1;
V.lastIndex = this.pos;
var t = V.exec(this.input), i = this.pos + t[0].length, s = this.input.charCodeAt(i);
if (s === 91 || s === 92)
return !0;
if (e)
return !1;
if (s === 123 || s > 55295 && s < 56320)
return !0;
if (H(s, !0)) {
for (var a = i + 1; Z(s = this.input.charCodeAt(a), !0); )
++a;
if (s === 92 || s > 55295 && s < 56320)
return !0;
var n = this.input.slice(i, a);
if (!Yt.test(n))
return !0;
}
return !1;
};
d.isAsyncFunction = function() {
if (this.options.ecmaVersion < 8 || !this.isContextual("async"))
return !1;
V.lastIndex = this.pos;
var e = V.exec(this.input), t = this.pos + e[0].length, i;
return !D.test(this.input.slice(this.pos, t)) && this.input.slice(t, t + 8) === "function" && (t + 8 === this.input.length || !(Z(i = this.input.charCodeAt(t + 8)) || i > 55295 && i < 56320));
};
d.isUsingKeyword = function(e, t) {
if (this.options.ecmaVersion < 17 || !this.isContextual(e ? "await" : "using"))
return !1;
V.lastIndex = this.pos;
var i = V.exec(this.input), s = this.pos + i[0].length;
if (D.test(this.input.slice(this.pos, s)))
return !1;
if (e) {
var a = s + 5, n;
if (this.input.slice(s, a) !== "using" || a === this.input.length || Z(n = this.input.charCodeAt(a)) || n > 55295 && n < 56320)
return !1;
V.lastIndex = a;
var u = V.exec(this.input);
if (u && D.test(this.input.slice(a, a + u[0].length)))
return !1;
}
if (t) {
var h = s + 2, c;
if (this.input.slice(s, h) === "of" && (h === this.input.length || !Z(c = this.input.charCodeAt(h)) && !(c > 55295 && c < 56320)))
return !1;
}
var x = this.input.charCodeAt(s);
return H(x, !0) || x === 92;
};
d.isAwaitUsing = function(e) {
return this.isUsingKeyword(!0, e);
};
d.isUsing = function(e) {
return this.isUsingKeyword(!1, e);
};
d.parseStatement = function(e, t, i) {
var s = this.type, a = this.startNode(), n;
switch (this.isLet(e) && (s = r._var, n = "let"), s) {
case r._break:
case r._continue:
return this.parseBreakContinueStatement(a, s.keyword);
case r._debugger:
return this.parseDebuggerStatement(a);
case r._do:
return this.parseDoStatement(a);
case r._for:
return this.parseForStatement(a);
case r._function:
return e && (this.strict || e !== "if" && e !== "label") && this.options.ecmaVersion >= 6 && this.unexpected(), this.parseFunctionStatement(a, !1, !e);
case r._class:
return e && this.unexpected(), this.parseClass(a, !0);
case r._if:
return this.parseIfStatement(a);
case r._return:
return this.parseReturnStatement(a);
case r._switch:
return this.parseSwitchStatement(a);
case r._throw:
return this.parseThrowStatement(a);
case r._try:
return this.parseTryStatement(a);
case r._const:
case r._var:
return n = n || this.value, e && n !== "var" && this.unexpected(), this.parseVarStatement(a, n);
case r._while:
return this.parseWhileStatement(a);
case r._with:
return this.parseWithStatement(a);
case r.braceL:
return this.parseBlock(!0, a);
case r.semi:
return this.parseEmptyStatement(a);
case r._export:
case r._import:
if (this.options.ecmaVersion > 10 && s === r._import) {
V.lastIndex = this.pos;
var u = V.exec(this.input), h = this.pos + u[0].length, c = this.input.charCodeAt(h);
if (c === 40 || c === 46)
return this.parseExpressionStatement(a, this.parseExpression());
}
return this.options.allowImportExportEverywhere || (t || this.raise(this.start, "'import' and 'export' may only appear at the top level"), this.inModule || this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'")), s === r._import ? this.parseImport(a) : this.parseExport(a, i);
default:
if (this.isAsyncFunction())
return e && this.unexpected(), this.next(), this.parseFunctionStatement(a, !0, !e);
var x = this.isAwaitUsing(!1) ? "await using" : this.isUsing(!1) ? "using" : null;
if (x)
return t && this.options.sourceType === "script" && this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script`"), x === "await using" && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.next(), this.parseVar(a, !1, x), this.semicolon(), this.finishNode(a, "VariableDeclaration");
var g = this.value, m = this.parseExpression();
return s === r.name && m.type === "Identifier" && this.eat(r.colon) ? this.parseLabeledStatement(a, g, m, e) : this.parseExpressionStatement(a, m);
}
};
d.parseBreakContinueStatement = function(e, t) {
var i = t === "break";
this.next(), this.eat(r.semi) || this.insertSemicolon() ? e.label = null : this.type !== r.name ? this.unexpected() : (e.label = this.parseIdent(), this.semicolon());
for (var s = 0; s < this.labels.length; ++s) {
var a = this.labels[s];
if ((e.label == null || a.name === e.label.name) && (a.kind != null && (i || a.kind === "loop") || e.label && i))
break;
}
return s === this.labels.length && this.raise(e.start, "Unsyntactic " + t), this.finishNode(e, i ? "BreakStatement" : "ContinueStatement");
};
d.parseDebuggerStatement = function(e) {
return this.next(), this.semicolon(), this.finishNode(e, "DebuggerStatement");
};
d.parseDoStatement = function(e) {
return this.next(), this.labels.push(qe), e.body = this.parseStatement("do"), this.labels.pop(), this.expect(r._while), e.test = this.parseParenExpression(), this.options.ecmaVersion >= 6 ? this.eat(r.semi) : this.semicolon(), this.finishNode(e, "DoWhileStatement");
};
d.parseForStatement = function(e) {
this.next();
var t = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
if (this.labels.push(qe), this.enterScope(0), this.expect(r.parenL), this.type === r.semi)
return t > -1 && this.unexpected(t), this.parseFor(e, null);
var i = this.isLet();
if (this.type === r._var || this.type === r._const || i) {
var s = this.startNode(), a = i ? "let" : this.value;
return this.next(), this.parseVar(s, !0, a), this.finishNode(s, "VariableDeclaration"), this.parseForAfterInit(e, s, t);
}
var n = this.isContextual("let"), u = !1, h = this.isUsing(!0) ? "using" : this.isAwaitUsing(!0) ? "await using" : null;
if (h) {
var c = this.startNode();
return this.next(), h === "await using" && this.next(), this.parseVar(c, !0, h), this.finishNode(c, "VariableDeclaration"), this.parseForAfterInit(e, c, t);
}
var x = this.containsEsc, g = new _e(), m = this.start, S = t > -1 ? this.parseExprSubscripts(g, "await") : this.parseExpression(!0, g);
return this.type === r._in || (u = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (t > -1 ? (this.type === r._in && this.unexpected(t), e.await = !0) : u && this.options.ecmaVersion >= 8 && (S.start === m && !x && S.type === "Identifier" && S.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (e.await = !1)), n && u && this.raise(S.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(S, !1, g), this.checkLValPattern(S), this.parseForIn(e, S)) : (this.checkExpressionErrors(g, !0), t > -1 && this.unexpected(t), this.parseFor(e, S));
};
d.parseForAfterInit = function(e, t, i) {
return (this.type === r._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && t.declarations.length === 1 ? (this.options.ecmaVersion >= 9 && (this.type === r._in ? i > -1 && this.unexpected(i) : e.await = i > -1), this.parseForIn(e, t)) : (i > -1 && this.unexpected(i), this.parseFor(e, t));
};
d.parseFunctionStatement = function(e, t, i) {
return this.next(), this.parseFunction(e, ae | (i ? 0 : Le), !1, t);
};
d.parseIfStatement = function(e) {
return this.next(), e.test = this.parseParenExpression(), e.consequent = this.parseStatement("if"), e.alternate = this.eat(r._else) ? this.parseStatement("if") : null, this.finishNode(e, "IfStatement");
};
d.parseReturnStatement = function(e) {
return !this.inFunction && !this.options.allowReturnOutsideFunction && this.raise(this.start, "'return' outside of function"), this.next(), this.eat(r.semi) || this.insertSemicolon() ? e.argument = null : (e.argument = this.parseExpression(), this.semicolon()), this.finishNode(e, "ReturnStatement");
};
d.parseSwitchStatement = function(e) {
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(r.braceL), this.labels.push(ni), this.enterScope(0);
for (var t, i = !1; this.type !== r.braceR; )
if (this.type === r._case || this.type === r._default) {
var s = this.type === r._case;
t && this.finishNode(t, "SwitchCase"), e.cases.push(t = this.startNode()), t.consequent = [], this.next(), s ? t.test = this.parseExpression() : (i && this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"), i = !0, t.test = null), this.expect(r.colon);
} else
t || this.unexpected(), t.consequent.push(this.parseStatement(null));
return this.exitScope(), t && this.finishNode(t, "SwitchCase"), this.next(), this.labels.pop(), this.finishNode(e, "SwitchStatement");
};
d.parseThrowStatement = function(e) {
return this.next(), D.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");
};
var ui = [];
d.parseCatchClauseParam = function() {
var e = this.parseBindingAtom(), t = e.type === "Identifier";
return this.enterScope(t ? ht : 0), this.checkLValPattern(e, t ? pt : Y), this.expect(r.parenR), e;
};
d.parseTryStatement = function(e) {
if (this.next(), e.block = this.parseBlock(), e.handler = null, this.type === r._catch) {
var t = this.startNode();
this.next(), this.eat(r.parenL) ? t.param = this.parseCatchClauseParam() : (this.options.ecmaVersion < 10 && this.unexpected(), t.param = null, this.enterScope(0)), t.body = this.parseBlock(!1), this.exitScope(), e.handler = this.finishNode(t, "CatchClause");
}
return e.finalizer = this.eat(r._finally) ? this.parseBlock() : null, !e.handler && !e.finalizer && this.raise(e.start, "Missing catch or finally clause"), this.finishNode(e, "TryStatement");
};
d.parseVarStatement = function(e, t, i) {
return this.next(), this.parseVar(e, !1, t, i), this.semicolon(), this.finishNode(e, "VariableDeclaration");
};
d.parseWhileStatement = function(e) {
return this.next(), e.test = this.parseParenExpression(), this.labels.push(qe), e.body = this.parseStatement("while"), this.labels.pop(), this.finishNode(e, "WhileStatement");
};
d.parseWithStatement = function(e) {
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");
};
d.parseEmptyStatement = function(e) {
return this.next(), this.finishNode(e, "EmptyStatement");
};
d.parseLabeledStatement = function(e, t, i, s) {
for (var a = 0, n = this.labels; a < n.length; a += 1) {
var u = n[a];
u.name === t && this.raise(i.start, "Label '" + t + "' is already declared");
}
for (var h = this.type.isLoop ? "loop" : this.type === r._switch ? "switch" : null, c = this.labels.length - 1; c >= 0; c--) {
var x = this.labels[c];
if (x.statementStart === e.start)
x.statementStart = this.start, x.kind = h;
else
break;
}
return this.labels.push({ name: t, kind: h, statementStart: this.start }), e.body = this.parseStatement(s ? s.indexOf("label") === -1 ? s + "label" : s : "label"), this.labels.pop(), e.label = i, this.finishNode(e, "LabeledStatement");
};
d.parseExpressionStatement = function(e, t) {
return e.expression = t, this.semicolon(), this.finishNode(e, "ExpressionStatement");
};
d.parseBlock = function(e, t, i) {
for (e === void 0 && (e = !0), t === void 0 && (t = this.startNode()), t.body = [], this.expect(r.braceL), e && this.enterScope(0); this.type !== r.braceR; ) {
var s = this.parseStatement(null);
t.body.push(s);
}
return i && (this.strict = !1), this.next(), e && this.exitScope(), this.finishNode(t, "BlockStatement");
};
d.parseFor = function(e, t) {
return e.init = t, this.expect(r.semi), e.test = this.type === r.semi ? null : this.parseExpression(), this.expect(r.semi), e.update = this.type === r.parenR ? null : this.parseExpression(), this.expect(r.parenR), e.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(e, "ForStatement");
};
d.parseForIn = function(e, t) {
var i = this.type === r._in;
return this.next(), t.type === "VariableDeclaration" && t.declarations[0].init != null && (!i || this.options.ecmaVersion < 8 || this.strict || t.kind !== "var" || t.declarations[0].id.type !== "Identifier") && this.raise(
t.start,
(i ? "for-in" : "for-of") + " loop variable declaration may not have an initializer"
), e.left = t, e.right = i ? this.parseExpression() : this.parseMaybeAssign(), this.expect(r.parenR), e.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(e, i ? "ForInStatement" : "ForOfStatement");
};
d.parseVar = function(e, t, i, s) {
for (e.declarations = [], e.kind = i; ; ) {
var a = this.startNode();
if (this.parseVarId(a, i), this.eat(r.eq) ? a.init = this.parseMaybeAssign(t) : !s && i === "const" && !(this.type === r._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) ? this.unexpected() : !s && (i === "using" || i === "await using") && this.options.ecmaVersion >= 17 && this.type !== r._in && !this.isContextual("of") ? this.raise(this.lastTokEnd, "Missing initializer in " + i + " declaration") : !s && a.id.type !== "Identifier" && !(t && (this.type === r._in || this.isContextual("of"))) ? this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value") : a.init = null, e.declarations.push(this.finishNode(a, "VariableDeclarator")), !this.eat(r.comma))
break;
}
return e;
};
d.parseVarId = function(e, t) {
e.id = t === "using" || t === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, t === "var" ? Ue : Y, !1);
};
var ae = 1, Le = 2, dt = 4;
d.parseFunction = function(e, t, i, s, a) {
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !s) && (this.type === r.star && t & Le && this.unexpected(), e.generator = this.eat(r.star)), this.options.ecmaVersion >= 8 && (e.async = !!s), t & ae && (e.id = t & dt && this.type !== r.name ? null : this.parseIdent(), e.id && !(t & Le) && this.checkLValSimple(e.id, this.strict || e.generator || e.async ? this.treatFunctionsAsVar ? Ue : Y : lt));
var n = this.yieldPos, u = this.awaitPos, h = this.awaitIdentPos;
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Me(e.async, e.generator)), t & ae || (e.id = this.type === r.name ? this.parseIdent() : null), this.parseFunctionParams(e), this.parseFunctionBody(e, i, !1, a), this.yieldPos = n, this.awaitPos = u, this.awaitIdentPos = h, this.finishNode(e, t & ae ? "FunctionDeclaration" : "FunctionExpression");
};
d.parseFunctionParams = function(e) {
this.expect(r.parenL), e.params = this.parseBindingList(r.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams();
};
d.parseClass = function(e, t) {
this.next();
var i = this.strict;
this.strict = !0, this.parseClassId(e, t), this.parseClassSuper(e);
var s = this.enterClassBody(), a = this.startNode(), n = !1;
for (a.body = [], this.expect(r.braceL); this.type !== r.braceR; ) {
var u = this.parseClassElement(e.superClass !== null);
u && (a.body.push(u), u.type === "MethodDefinition" && u.kind === "constructor" ? (n && this.raiseRecoverable(u.start, "Duplicate constructor in the same class"), n = !0) : u.key && u.key.type === "PrivateIdentifier" && oi(s, u) && this.raiseRecoverable(u.key.start, "Identifier '#" + u.key.name + "' has already been declared"));
}
return this.strict = i, this.next(), e.body = this.finishNode(a, "ClassBody"), this.exitClassBody(), this.finishNode(e, t ? "ClassDeclaration" : "ClassExpression");
};
d.parseClassElement = function(e) {
if (this.eat(r.semi))
return null;
var t = this.options.ecmaVersion, i = this.startNode(), s = "", a = !1, n = !1, u = "method", h = !1;
if (this.eatContextual("static")) {
if (t >= 13 && this.eat(r.braceL))
return this.parseClassStaticBlock(i), i;
this.isClassElementNameStart() || this.type === r.star ? h = !0 : s = "static";
}
if (i.static = h, !s && t >= 8 && this.eatContextual("async") && ((this.isClassElementNameStart() || this.type === r.star) && !this.canInsertSemicolon() ? n = !0 : s = "async"), !s && (t >= 9 || !n) && this.eat(r.star) && (a = !0), !s && !n && !a) {
var c = this.value;
(this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ? u = c : s = c);
}
if (s ? (i.computed = !1, i.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), i.key.name = s, this.finishNode(i.key, "Identifier")) : this.parseClassElementName(i), t < 13 || this.type === r.parenL || u !== "method" || a || n) {
var x = !i.static && me(i, "constructor"), g = x && e;
x && u !== "method" && this.raise(i.key.start, "Constructor can't have get/set modifier"), i.kind = x ? "constructor" : u, this.parseClassMethod(i, a, n, g);
} else
this.parseClassField(i);
return i;
};
d.isClassElementNameStart = function() {
return this.type === r.name || this.type === r.privateId || this.type === r.num || this.type === r.string || this.type === r.bracketL || this.type.keyword;
};
d.parseClassElementName = function(e) {
this.type === r.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);
};
d.parseClassMethod = function(e, t, i, s) {
var a = e.key;
e.kind === "constructor" ? (t && this.raise(a.start, "Constructor can't be a generator"), i && this.raise(a.start, "Constructor can't be an async method")) : e.static && me(e, "prototype") && this.raise(a.start, "Classes may not have a static property named prototype");
var n = e.value = this.parseMethod(t, i, s);
return e.kind === "get" && n.params.length !== 0 && this.raiseRecoverable(n.start, "getter should have no params"), e.kind === "set" && n.params.length !== 1 && this.raiseRecoverable(n.start, "setter should have exactly one param"), e.kind === "set" && n.params[0].type === "RestElement" && this.raiseRecoverable(n.params[0].start, "Setter cannot use rest params"), this.finishNode(e, "MethodDefinition");
};
d.parseClassField = function(e) {
return me(e, "constructor") ? this.raise(e.key.start, "Classes can't have a field named 'constructor'") : e.static && me(e, "prototype") && this.raise(e.key.start, "Classes can't have a static field named 'prototype'"), this.eat(r.eq) ? (this.enterScope(oe | ye), e.value = this.parseMaybeAssign(), this.exitScope()) : e.value = null, this.semicolon(), this.finishNode(e, "PropertyDefinition");
};
d.parseClassStaticBlock = function(e) {
e.body = [];
var t = this.labels;
for (this.labels = [], this.enterScope(ee | ye); this.type !== r.braceR; ) {
var i = this.parseStatement(null);
e.body.push(i);
}
return this.next(), this.exitScope(), this.labels = t, this.finishNode(e, "StaticBlock");
};
d.parseClassId = function(e, t) {
this.type === r.name ? (e.id = this.parseIdent(), t && this.checkLValSimple(e.id, Y, !1)) : (t === !0 && this.unexpected(), e.id = null);
};
d.parseClassSuper = function(e) {
e.superClass = this.eat(r._extends) ? this.parseExprSubscripts(null, !1) : null;
};
d.enterClassBody = function() {
var e = { declared: /* @__PURE__ */ Object.create(null), used: [] };
return this.privateNameStack.push(e), e.declared;
};
d.exitClassBody = function() {
var e = this.privateNameStack.pop(), t = e.declared, i = e.used;
if (this.options.checkPrivateFields)
for (var s = this.privateNameStack.length, a = s === 0 ? null : this.privateNameStack[s - 1], n = 0; n < i.length; ++n) {
var u = i[n];
ie(t, u.name) || (a ? a.used.push(u) : this.raiseRecoverable(u.start, "Private field '#" + u.name + "' must be declared in an enclosing class"));
}
};
function oi(e, t) {
var i = t.key.name, s = e[i], a = "true";
return t.type === "MethodDefinition" && (t.kind === "get" || t.kind === "set") && (a = (t.static ? "s" : "i") + t.kind), s === "iget" && a === "iset" || s === "iset" && a === "iget" || s === "sget" && a === "sset" || s === "sset" && a === "sget" ? (e[i] = "true", !1) : s ? !0 : (e[i] = a, !1);
}
function me(e, t) {
var i = e.computed, s = e.key;
return !i && (s.type === "Identifier" && s.name === t || s.type === "Literal" && s.value === t);
}
d.parseExportAllDeclaration = function(e, t) {
return this.options.ecmaVersion >= 11 && (this.eatContextual("as") ? (e.exported = this.parseModuleExportName(), this.checkExport(t, e.exported, this.lastTokStart)) : e.exported = null), this.expectContextual("from"), this.type !== r.string && this.unexpected(), e.source = this.parseExprAtom(), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(e, "ExportAllDeclaration");
};
d.parseExport = function(e, t) {
if (this.next(), this.eat(r.star))
return this.parseExportAllDeclaration(e, t);
if (this.eat(r._default))
return this.checkExport(t, "default", this.lastTokStart), e.declaration = this.parseExportDefaultDeclaration(), this.finishNode(e, "ExportDefaultDeclaration");
if (this.shouldParseExportStatement())
e.declaration = this.parseExportDeclaration(e), e.declaration.type === "VariableDeclaration" ? this.checkVariableExport(t, e.declaration.declarations) : this.checkExport(t, e.declaration.id, e.declaration.id.start), e.specifiers = [], e.source = null, this.options.ecmaVersion >= 16 && (e.attributes = []);
else {
if (e.declaration = null, e.specifiers = this.parseExportSpecifiers(t), this.eatContextual("from"))
this.type !== r.string && this.unexpected(), e.source = this.parseExprAtom(), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause());
else {
for (var i = 0, s = e.specifiers; i < s.length; i += 1) {
var a = s[i];
this.checkUnreserved(a.local), this.checkLocalExport(a.local), a.local.type === "Literal" && this.raise(a.local.start, "A string literal cannot be used as an exported binding without `from`.");
}
e.source = null, this.options.ecmaVersion >= 16 && (e.attributes = []);
}
this.semicolon();
}
return this.finishNode(e, "ExportNamedDeclaration");
};
d.parseExportDeclaration = function(e) {
return this.parseStatement(null);
};
d.parseExportDefaultDeclaration = function() {
var e;
if (this.type === r._function || (e = this.isAsyncFunction())) {
var t = this.startNode();
return this.next(), e && this.next(), this.parseFunction(t, ae | dt, !1, e);
} else if (this.type === r._class) {
var i = this.startNode();
return this.parseClass(i, "nullableID");
} else {
var s = this.parseMaybeAssign();
return this.semicolon(), s;
}
};
d.checkExport = function(e, t, i) {
e && (typeof t != "string" && (t = t.type === "Identifier" ? t.name : t.value), ie(e, t) && this.raiseRecoverable(i, "Duplicate export '" + t + "'"), e[t] = !0);
};
d.checkPatternExport = function(e, t) {
var i = t.type;
if (i === "Identifier")
this.checkExport(e, t, t.start);
else if (i === "ObjectPattern")
for (var s = 0, a = t.properties; s < a.length; s += 1) {
var n = a[s];
this.checkPatternExport(e, n);
}
else if (i === "ArrayPattern")
for (var u = 0, h = t.elements; u < h.length; u += 1) {
var c = h[u];
c && this.checkPatternExport(e, c);
}
else i === "Property" ? this.che