@telia-ace/alliance-internal-node-utilities 1.1.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,45 +0,0 @@
1
- import{a as ps,b as ds,g as it}from"./chunk-LH7O6ZUA.js";var Or=ps((Wt,Gt)=>{"use strict";(function(e,t,r){typeof Wt=="object"?(Gt.exports=r(),Gt.exports.default=r()):typeof define=="function"&&define.amd?define(r):t[e]=r()})("slugify",Wt,function(){var e=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xA2":"cent","\xA3":"pound","\xA4":"currency","\xA5":"yen","\xA9":"(c)","\xAA":"a","\xAE":"(r)","\xBA":"o","\xC0":"A","\xC1":"A","\xC2":"A","\xC3":"A","\xC4":"A","\xC5":"A","\xC6":"AE","\xC7":"C","\xC8":"E","\xC9":"E","\xCA":"E","\xCB":"E","\xCC":"I","\xCD":"I","\xCE":"I","\xCF":"I","\xD0":"D","\xD1":"N","\xD2":"O","\xD3":"O","\xD4":"O","\xD5":"O","\xD6":"O","\xD8":"O","\xD9":"U","\xDA":"U","\xDB":"U","\xDC":"U","\xDD":"Y","\xDE":"TH","\xDF":"ss","\xE0":"a","\xE1":"a","\xE2":"a","\xE3":"a","\xE4":"a","\xE5":"a","\xE6":"ae","\xE7":"c","\xE8":"e","\xE9":"e","\xEA":"e","\xEB":"e","\xEC":"i","\xED":"i","\xEE":"i","\xEF":"i","\xF0":"d","\xF1":"n","\xF2":"o","\xF3":"o","\xF4":"o","\xF5":"o","\xF6":"o","\xF8":"o","\xF9":"u","\xFA":"u","\xFB":"u","\xFC":"u","\xFD":"y","\xFE":"th","\xFF":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010C":"C","\u010D":"c","\u010E":"D","\u010F":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011A":"E","\u011B":"e","\u011E":"G","\u011F":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012A":"i","\u012B":"i","\u012E":"I","\u012F":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013B":"L","\u013C":"l","\u013D":"L","\u013E":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014C":"O","\u014D":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015A":"S","\u015B":"s","\u015E":"S","\u015F":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016A":"u","\u016B":"u","\u016E":"U","\u016F":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017A":"z","\u017B":"Z","\u017C":"z","\u017D":"Z","\u017E":"z","\u018F":"E","\u0192":"f","\u01A0":"O","\u01A1":"o","\u01AF":"U","\u01B0":"u","\u01C8":"LJ","\u01C9":"lj","\u01CB":"NJ","\u01CC":"nj","\u0218":"S","\u0219":"s","\u021A":"T","\u021B":"t","\u0259":"e","\u02DA":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038A":"I","\u038C":"O","\u038E":"Y","\u038F":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039A":"K","\u039B":"L","\u039C":"M","\u039D":"N","\u039E":"3","\u039F":"O","\u03A0":"P","\u03A1":"R","\u03A3":"S","\u03A4":"T","\u03A5":"Y","\u03A6":"F","\u03A7":"X","\u03A8":"PS","\u03A9":"W","\u03AA":"I","\u03AB":"Y","\u03AC":"a","\u03AD":"e","\u03AE":"h","\u03AF":"i","\u03B0":"y","\u03B1":"a","\u03B2":"b","\u03B3":"g","\u03B4":"d","\u03B5":"e","\u03B6":"z","\u03B7":"h","\u03B8":"8","\u03B9":"i","\u03BA":"k","\u03BB":"l","\u03BC":"m","\u03BD":"n","\u03BE":"3","\u03BF":"o","\u03C0":"p","\u03C1":"r","\u03C2":"s","\u03C3":"s","\u03C4":"t","\u03C5":"y","\u03C6":"f","\u03C7":"x","\u03C8":"ps","\u03C9":"w","\u03CA":"i","\u03CB":"y","\u03CC":"o","\u03CD":"y","\u03CE":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040A":"NJ","\u040B":"C","\u040F":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041A":"K","\u041B":"L","\u041C":"M","\u041D":"N","\u041E":"O","\u041F":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042A":"U","\u042B":"Y","\u042C":"","\u042D":"E","\u042E":"Yu","\u042F":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043A":"k","\u043B":"l","\u043C":"m","\u043D":"n","\u043E":"o","\u043F":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044A":"u","\u044B":"y","\u044C":"","\u044D":"e","\u044E":"yu","\u044F":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045A":"nj","\u045B":"c","\u045D":"u","\u045F":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049A":"KH","\u049B":"kh","\u04A2":"NG","\u04A3":"ng","\u04AE":"UE","\u04AF":"ue","\u04B0":"U","\u04B1":"u","\u04BA":"H","\u04BB":"h","\u04D8":"AE","\u04D9":"ae","\u04E8":"OE","\u04E9":"oe","\u0531":"A","\u0532":"B","\u0533":"G","\u0534":"D","\u0535":"E","\u0536":"Z","\u0537":"E'","\u0538":"Y'","\u0539":"T'","\u053A":"JH","\u053B":"I","\u053C":"L","\u053D":"X","\u053E":"C'","\u053F":"K","\u0540":"H","\u0541":"D'","\u0542":"GH","\u0543":"TW","\u0544":"M","\u0545":"Y","\u0546":"N","\u0547":"SH","\u0549":"CH","\u054A":"P","\u054B":"J","\u054C":"R'","\u054D":"S","\u054E":"V","\u054F":"T","\u0550":"R","\u0551":"C","\u0553":"P'","\u0554":"Q'","\u0555":"O''","\u0556":"F","\u0587":"EV","\u0621":"a","\u0622":"aa","\u0623":"a","\u0624":"u","\u0625":"i","\u0626":"e","\u0627":"a","\u0628":"b","\u0629":"h","\u062A":"t","\u062B":"th","\u062C":"j","\u062D":"h","\u062E":"kh","\u062F":"d","\u0630":"th","\u0631":"r","\u0632":"z","\u0633":"s","\u0634":"sh","\u0635":"s","\u0636":"dh","\u0637":"t","\u0638":"z","\u0639":"a","\u063A":"gh","\u0641":"f","\u0642":"q","\u0643":"k","\u0644":"l","\u0645":"m","\u0646":"n","\u0647":"h","\u0648":"w","\u0649":"a","\u064A":"y","\u064B":"an","\u064C":"on","\u064D":"en","\u064E":"a","\u064F":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u067E":"p","\u0686":"ch","\u0698":"zh","\u06A9":"k","\u06AF":"g","\u06CC":"y","\u06F0":"0","\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9","\u0E3F":"baht","\u10D0":"a","\u10D1":"b","\u10D2":"g","\u10D3":"d","\u10D4":"e","\u10D5":"v","\u10D6":"z","\u10D7":"t","\u10D8":"i","\u10D9":"k","\u10DA":"l","\u10DB":"m","\u10DC":"n","\u10DD":"o","\u10DE":"p","\u10DF":"zh","\u10E0":"r","\u10E1":"s","\u10E2":"t","\u10E3":"u","\u10E4":"f","\u10E5":"k","\u10E6":"gh","\u10E7":"q","\u10E8":"sh","\u10E9":"ch","\u10EA":"ts","\u10EB":"dz","\u10EC":"ts","\u10ED":"ch","\u10EE":"kh","\u10EF":"j","\u10F0":"h","\u1E62":"S","\u1E63":"s","\u1E80":"W","\u1E81":"w","\u1E82":"W","\u1E83":"w","\u1E84":"W","\u1E85":"w","\u1E9E":"SS","\u1EA0":"A","\u1EA1":"a","\u1EA2":"A","\u1EA3":"a","\u1EA4":"A","\u1EA5":"a","\u1EA6":"A","\u1EA7":"a","\u1EA8":"A","\u1EA9":"a","\u1EAA":"A","\u1EAB":"a","\u1EAC":"A","\u1EAD":"a","\u1EAE":"A","\u1EAF":"a","\u1EB0":"A","\u1EB1":"a","\u1EB2":"A","\u1EB3":"a","\u1EB4":"A","\u1EB5":"a","\u1EB6":"A","\u1EB7":"a","\u1EB8":"E","\u1EB9":"e","\u1EBA":"E","\u1EBB":"e","\u1EBC":"E","\u1EBD":"e","\u1EBE":"E","\u1EBF":"e","\u1EC0":"E","\u1EC1":"e","\u1EC2":"E","\u1EC3":"e","\u1EC4":"E","\u1EC5":"e","\u1EC6":"E","\u1EC7":"e","\u1EC8":"I","\u1EC9":"i","\u1ECA":"I","\u1ECB":"i","\u1ECC":"O","\u1ECD":"o","\u1ECE":"O","\u1ECF":"o","\u1ED0":"O","\u1ED1":"o","\u1ED2":"O","\u1ED3":"o","\u1ED4":"O","\u1ED5":"o","\u1ED6":"O","\u1ED7":"o","\u1ED8":"O","\u1ED9":"o","\u1EDA":"O","\u1EDB":"o","\u1EDC":"O","\u1EDD":"o","\u1EDE":"O","\u1EDF":"o","\u1EE0":"O","\u1EE1":"o","\u1EE2":"O","\u1EE3":"o","\u1EE4":"U","\u1EE5":"u","\u1EE6":"U","\u1EE7":"u","\u1EE8":"U","\u1EE9":"u","\u1EEA":"U","\u1EEB":"u","\u1EEC":"U","\u1EED":"u","\u1EEE":"U","\u1EEF":"u","\u1EF0":"U","\u1EF1":"u","\u1EF2":"Y","\u1EF3":"y","\u1EF4":"Y","\u1EF5":"y","\u1EF6":"Y","\u1EF7":"y","\u1EF8":"Y","\u1EF9":"y","\u2013":"-","\u2018":"'","\u2019":"'","\u201C":"\\"","\u201D":"\\"","\u201E":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20A0":"ecu","\u20A2":"cruzeiro","\u20A3":"french franc","\u20A4":"lira","\u20A5":"mill","\u20A6":"naira","\u20A7":"peseta","\u20A8":"rupee","\u20A9":"won","\u20AA":"new shequel","\u20AB":"dong","\u20AC":"euro","\u20AD":"kip","\u20AE":"tugrik","\u20AF":"drachma","\u20B0":"penny","\u20B1":"peso","\u20B2":"guarani","\u20B3":"austral","\u20B4":"hryvnia","\u20B5":"cedi","\u20B8":"kazakhstani tenge","\u20B9":"indian rupee","\u20BA":"turkish lira","\u20BD":"russian ruble","\u20BF":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221E":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\uFDFC":"rial","\uFEF5":"laa","\uFEF7":"laa","\uFEF9":"lai","\uFEFB":"la"}`),t=JSON.parse('{"bg":{"\u0419":"Y","\u0426":"Ts","\u0429":"Sht","\u042A":"A","\u042C":"Y","\u0439":"y","\u0446":"ts","\u0449":"sht","\u044A":"a","\u044C":"y"},"de":{"\xC4":"AE","\xE4":"ae","\xD6":"OE","\xF6":"oe","\xDC":"UE","\xFC":"ue","\xDF":"ss","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221E":"unendlich","\u2665":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xA2":"centavos","\xA3":"libras","\xA4":"moneda","\u20A3":"francos","\u2211":"suma","\u221E":"infinito","\u2665":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xA2":"centime","\xA3":"livre","\xA4":"devise","\u20A3":"franc","\u2211":"somme","\u221E":"infini","\u2665":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xA2":"centavo","\u2211":"soma","\xA3":"libra","\u221E":"infinito","\u2665":"amor"},"uk":{"\u0418":"Y","\u0438":"y","\u0419":"Y","\u0439":"y","\u0426":"Ts","\u0446":"ts","\u0425":"Kh","\u0445":"kh","\u0429":"Shch","\u0449":"shch","\u0413":"H","\u0433":"h"},"vi":{"\u0110":"D","\u0111":"d"},"da":{"\xD8":"OE","\xF8":"oe","\xC5":"AA","\xE5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xF8rre end"},"nb":{"&":"og","\xC5":"AA","\xC6":"AE","\xD8":"OE","\xE5":"aa","\xE6":"ae","\xF8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xC5":"AA","\xC4":"AE","\xD6":"OE","\xE5":"aa","\xE4":"ae","\xF6":"oe"}}');function r(i,s){if(typeof i!="string")throw new Error("slugify: string argument expected");s=typeof s=="string"?{replacement:s}:s||{};var n=t[s.locale]||{},a=s.replacement===void 0?"-":s.replacement,u=s.trim===void 0?!0:s.trim,c=i.normalize().split("").reduce(function(l,h){var f=n[h];return f===void 0&&(f=e[h]),f===void 0&&(f=h),f===a&&(f=" "),l+f.replace(s.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return s.strict&&(c=c.replace(/[^A-Za-z0-9\s]/g,"")),u&&(c=c.trim()),c=c.replace(/\s+/g,a),s.lower&&(c=c.toLowerCase()),c}return r.extend=function(i){Object.assign(e,i)},r})});var Lr=ds(Or(),1);function Vr(e,t="-"){return(0,Lr.default)(e,{strict:!0,replacement:t,lower:!0})}import{existsSync as ms,rmSync as gs,writeFileSync as xs}from"node:fs";import{resolve as vs}from"node:path";function Oo(e){let t=vs(process.cwd(),"index.html");ms(t)&&gs(t,{force:!0});let r=bs(e);return xs(t,r),t}function ys(e){return e.reduce((t,{appImport:r,manifestImport:i},s)=>{let n=r+`
2
- `+i;return s===0?n:t+`
3
- `+n},"")}function _s(e){return"const apps = ["+e.reduce((r,{appVariableName:i,manifestVariableName:s})=>{let n=`{ app: ${i}, manifest: ${s} },`;return r+`
4
- `+n},"")+`
5
- ];`}function bs(e){let t=e.map(({packageName:s,appImportPath:n,manifestImportPath:a})=>{let u=Vr(s,""),c=`${u}App`,l=`${u}Manifest`;return{packageName:s,appVariableName:c,manifestVariableName:l,appImport:`import ${c} from '${Dr(n)}';`,manifestImport:`import ${l} from '${Dr(a)}';`}}),r=ys(t),i=_s(t);return ws.replaceAll("$imports;",r).replaceAll("$apps;",i)}var ws=`
6
- <!doctype html>
7
- <html lang="en">
8
- <head>
9
- <meta charset="UTF-8" />
10
- <link rel="icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAGcElEQVRYha2Xe4xUVx3HP7/fPTOzDLO7sw8RlzWlZEtp2dCy0qIVWltKU/UPDZH6ijXWEK2odPcPa2qbhpi2kSa7blSStsFUjNq0lWCMaVMx8rAm22IJMJRHCqFC6BJ22eEx+5p7z88/7sywC7uwgCe5mXsz5/y+j/M753eOcJ2tK5sDyBrME2gBmkBq43/tnMERgXdAjrbn518yXq4RNA3cB/J54HNiMhfEicm4oAYghmHexN4Dew5k01giUybQlc1h0CbI9zC+Imi9mCAIYhoHsnI4KcNjYoDhxWPxsxFY1Z5vHQVwVwSu3Qdid4E8rSb3i6mqKYwBjpWX1V/QZBiYYWIIiifCw8Mm/vS7L/W237FqJno58M5srgmxP4npjsAHDwTeaeAdagGBdwQWoBYgFqCmqGlMqvTE3+U+ipbeE+ngB42Lde6kDnRmcwisAHlBfdBYCYxStp3y7xjTJ51RA0XxgGCkasQFSfkW8NQlBDqzORVYK6ZPqAU6ThUyqd0TN7mQDRZ/CULzvVVeRO68xIGubE6BbjH9oVqA+thaQccpvjLwRDTit2RG/fxVGR3sLc4ELuRAV90+gJ/G4K4EHpRs1wr7qwW/uH36uaxPzwz0xNZhHUfAzJZgsjZWrqXEiTP9WlRP1Bb+pCacs2KaCwvmD/5+cLhCoCubU0G61QJXyWYkVv9/Av/UEzVh2+PVDmDPr875ob4oD6UcMLhfTdqU8dket+sDD6rwS7vrfMs30i4qRhzfMhwe3FhwQG+FgMDKytIyKe1o1zffZlB3swvve7mehgVJZ95zatdouG31gHpvoHYUwHVmc4AsqoCXYK9HtzhYsDoTLnqyRl1a1QxOvjMavrmyT4sFr6hhsA/AZUbqKKTy9ZfCXhuFpntS4WfWZWloTcTTa8bh14fCrY/2a3E4UlOLt2jYCeCGE+cBBuPhdk2gZjDjjmS46KkampelnEhMPhwy3/PkGb/vhXPO4zGJ60KyTo5nPpk8wg5wPz57M13Z3PuGzRtTxEovV3BBoXlZKrytvZqmpSknKhVCJ3tGwu2rBxjYHzrEymUZw9Py0LQtD6yb7aG8CoR/mNgKs1LHEomJ4M2M9McDf9PX0n7eI9OpbXEVxQCFE5F/d+0Zf+iPgy7e/GPDjVj9rGXJcO7D6b+yLu7vABavrd10/O8jz5/cFqXNFBGr1HYzQ0SoviEIm5dXceOXpvGJpSkNEjJuGy+ciPzu7nN+/4aCRkM2vsaUrM/coH7ed9Ond3WffbPyF8CxQ/1Y5F8b/C9fHthlFPvFB05JNzqtvSnBxxYmmN4UVCwe60b/7mK4d/15Dr82qH50fHkva/fiSc00v/SlGr97fX79ytdb1owjAHDwX71tVbWuJ9OQdMl0gmTKESQUVWGsxQDD/ZE/snnIH/xdgVP/KU5yqCnBi2f6bPF3b6jxe17Mhx9sKizsyLceKPeqDP7bF/rfa2xLvHrLN6sfmr08o0GDqAaCIYRD3g/sD/1Hb49w7K1hev89otEoTi6To+V5n3l3Mryru1r3vpjn8KbCZjU5MLbfuBCd2VyzIHsTgauZ3pAkkXIanScc6Tf1RfRiJyYHN4Iq/O2PZ/zc71Rpz89P+30bz4QmdltHvvXQpARKJB5R0w0XSvL4cjwV+FnLU+HiZ2tUpxtbf9Tnj20vOJPo2fZ8688u7n3pmdB42Yt/xUuESVQ+yVJexZNtVmbQ2JYIH9zcGC5/pd71Hxjxm5f1cnzboDPx7xs8M9G4CSV1ZnOZICE7GNXbKweTMU7EA6USoemeVLhgTYame1Nu4MBI2PN0ng+3DDovIZFG5w37bEe+dc+UCQC8/ZtjzX07i/88saU4J8yLXiAhaCC+fn7Sz/7iNFq+mqZ6TuD6do+Gu7vPcuQvBRf62LlIQ2/Y1zvyra9OhnPZSf1g58k5I6ftDSnqnNFTaOACqmclfP0tSa3KBjrc5/2Hbwz7Q38ocHLniDM8XjxeIrxG3rA16vXXj529dVKMK2bVL2fkmhrmJ/9cPy91Z2ZGwhMqQx95TudC8gdCZx4obbMVAhqNGvaoCr99bKD1svGntK4647vg84J8X021PBXlK5gJGJWr11GDb3fkW7dPJfaUi3539iARxSUCz4AsERMVpHwDxMTyhq0HftGRbz071bhXfeooXVJvBR4EbgSGgR6Bt9qvArjc/gfZzPoCTDB+AgAAAABJRU5ErkJggg=="/>
11
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
12
- <title>Alliance Portal</title>
13
- </head>
14
-
15
- <body>
16
- <script type="module">
17
- import createFramework from '@telia-ace/alliance-framework/create-framework';
18
- import '@telia-ace/alliance-ui/components';
19
- import { addCssVariables } from '@telia-ace/alliance-ui/voca/foundations';
20
-
21
- $imports;
22
-
23
- addCssVariables();
24
-
25
- $apps;
26
-
27
- createFramework(apps);
28
- </script>
29
- </body>
30
- </html>
31
- `.trim();function Dr(e){return e.replaceAll("\\","\\\\")}import{statSync as _a,promises as ba}from"node:fs";var ks=/^[A-Za-z]:\//;function qt(e=""){return e&&e.replace(/\\/g,"/").replace(ks,t=>t.toUpperCase())}var Es=/^[/\\]{2}/,Ss=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,jr=/^[A-Za-z]:$/;var Ht=function(e){if(e.length===0)return".";e=qt(e);let t=e.match(Es),r=Q(e),i=e[e.length-1]==="/";return e=Kt(e,!r),e.length===0?r?"/":i?"./":".":(i&&(e+="/"),jr.test(e)&&(e+="/"),t?r?`//${e}`:`//./${e}`:r&&!Q(e)?`/${e}`:e)},vt=function(...e){if(e.length===0)return".";let t;for(let r of e)r&&r.length>0&&(t===void 0?t=r:t+=`/${r}`);return t===void 0?".":Ht(t.replace(/\/\/+/g,"/"))};function Cs(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}var yt=function(...e){e=e.map(i=>qt(i));let t="",r=!1;for(let i=e.length-1;i>=-1&&!r;i--){let s=i>=0?e[i]:Cs();!s||s.length===0||(t=`${s}/${t}`,r=Q(s))}return t=Kt(t,!r),r&&!Q(t)?`/${t}`:t.length>0?t:"."};function Kt(e,t){let r="",i=0,s=-1,n=0,a=null;for(let u=0;u<=e.length;++u){if(u<e.length)a=e[u];else{if(a==="/")break;a="/"}if(a==="/"){if(!(s===u-1||n===1))if(n===2){if(r.length<2||i!==2||r[r.length-1]!=="."||r[r.length-2]!=="."){if(r.length>2){let c=r.lastIndexOf("/");c===-1?(r="",i=0):(r=r.slice(0,c),i=r.length-1-r.lastIndexOf("/")),s=u,n=0;continue}else if(r.length>0){r="",i=0,s=u,n=0;continue}}t&&(r+=r.length>0?"/..":"..",i=2)}else r.length>0?r+=`/${e.slice(s+1,u)}`:r=e.slice(s+1,u),i=u-s-1;s=u,n=0}else a==="."&&n!==-1?++n:n=-1}return r}var Q=function(e){return Ss.test(e)};var _t=function(e){let t=qt(e).replace(/\/$/,"").split("/").slice(0,-1);return t.length===1&&jr.test(t[0])&&(t[0]+="/"),t.join("/")||(Q(e)?"/":".")};var Ts=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,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,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,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,406,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,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,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,983,6,110,6,6,9,4759,9,787719,239],Zr=[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,68,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,349,41,7,1,79,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,159,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,264,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,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,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,757,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],Is="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",zr="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",Yt={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"},Qt="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",Ps={5:Qt,"5module":Qt+" export import",6:Qt+" const class extends export import super"},Ns=/^in(stanceof)?$/,Rs=new RegExp("["+zr+"]"),Os=new RegExp("["+zr+Is+"]");function Jt(e,t){for(var r=65536,i=0;i<t.length;i+=2){if(r+=t[i],r>e)return!1;if(r+=t[i+1],r>=e)return!0}return!1}function de(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Rs.test(String.fromCharCode(e)):t===!1?!1:Jt(e,Zr)}function $e(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&&Os.test(String.fromCharCode(e)):t===!1?!1:Jt(e,Zr)||Jt(e,Ts)}var T=function(t,r){r===void 0&&(r={}),this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null};function X(e,t){return new T(e,{beforeExpr:!0,binop:t})}var J={beforeExpr:!0},G={startsExpr:!0},rr={};function A(e,t){return t===void 0&&(t={}),t.keyword=e,rr[e]=new T(e,t)}var o={num:new T("num",G),regexp:new T("regexp",G),string:new T("string",G),name:new T("name",G),privateId:new T("privateId",G),eof:new T("eof"),bracketL:new T("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new T("]"),braceL:new T("{",{beforeExpr:!0,startsExpr:!0}),braceR:new T("}"),parenL:new T("(",{beforeExpr:!0,startsExpr:!0}),parenR:new T(")"),comma:new T(",",J),semi:new T(";",J),colon:new T(":",J),dot:new T("."),question:new T("?",J),questionDot:new T("?."),arrow:new T("=>",J),template:new T("template"),invalidTemplate:new T("invalidTemplate"),ellipsis:new T("...",J),backQuote:new T("`",G),dollarBraceL:new T("${",{beforeExpr:!0,startsExpr:!0}),eq:new T("=",{beforeExpr:!0,isAssign:!0}),assign:new T("_=",{beforeExpr:!0,isAssign:!0}),incDec:new T("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new T("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:X("||",1),logicalAND:X("&&",2),bitwiseOR:X("|",3),bitwiseXOR:X("^",4),bitwiseAND:X("&",5),equality:X("==/!=/===/!==",6),relational:X("</>/<=/>=",7),bitShift:X("<</>>/>>>",8),plusMin:new T("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:X("%",10),star:X("*",10),slash:X("/",10),starstar:new T("**",{beforeExpr:!0}),coalesce:X("??",1),_break:A("break"),_case:A("case",J),_catch:A("catch"),_continue:A("continue"),_debugger:A("debugger"),_default:A("default",J),_do:A("do",{isLoop:!0,beforeExpr:!0}),_else:A("else",J),_finally:A("finally"),_for:A("for",{isLoop:!0}),_function:A("function",G),_if:A("if"),_return:A("return",J),_switch:A("switch"),_throw:A("throw",J),_try:A("try"),_var:A("var"),_const:A("const"),_while:A("while",{isLoop:!0}),_with:A("with"),_new:A("new",{beforeExpr:!0,startsExpr:!0}),_this:A("this",G),_super:A("super",G),_class:A("class",G),_extends:A("extends",J),_export:A("export"),_import:A("import",G),_null:A("null",G),_true:A("true",G),_false:A("false",G),_in:A("in",{beforeExpr:!0,binop:7}),_instanceof:A("instanceof",{beforeExpr:!0,binop:7}),_typeof:A("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:A("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:A("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},re=/\r\n?|\n|\u2028|\u2029/,Ls=new RegExp(re.source,"g");function Ze(e){return e===10||e===13||e===8232||e===8233}function Wr(e,t,r){r===void 0&&(r=e.length);for(var i=t;i<r;i++){var s=e.charCodeAt(i);if(Ze(s))return i<r-1&&s===13&&e.charCodeAt(i+1)===10?i+2:i+1}return-1}var Gr=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,ee=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,qr=Object.prototype,Vs=qr.hasOwnProperty,Ds=qr.toString,ot=Object.hasOwn||function(e,t){return Vs.call(e,t)},Mr=Array.isArray||function(e){return Ds.call(e)==="[object Array]"},Br=Object.create(null);function _e(e){return Br[e]||(Br[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function be(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var js=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,nt=function(t,r){this.line=t,this.column=r};nt.prototype.offset=function(t){return new nt(this.line,this.column+t)};var St=function(t,r,i){this.start=r,this.end=i,t.sourceFile!==null&&(this.source=t.sourceFile)};function Hr(e,t){for(var r=1,i=0;;){var s=Wr(e,i,t);if(s<0)return new nt(r,t-i);++r,i=s}}var er={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},Fr=!1;function Ms(e){var t={};for(var r in er)t[r]=e&&ot(e,r)?e[r]:er[r];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!Fr&&typeof console=="object"&&console.warn&&(Fr=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
32
- 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),Mr(t.onToken)){var i=t.onToken;t.onToken=function(s){return i.push(s)}}return Mr(t.onComment)&&(t.onComment=Bs(t,t.onComment)),t}function Bs(e,t){return function(r,i,s,n,a,u){var c={type:r?"Block":"Line",value:i,start:s,end:n};e.locations&&(c.loc=new St(this,a,u)),e.ranges&&(c.range=[s,n]),t.push(c)}}var at=1,ze=2,ir=4,Kr=8,Yr=16,Qr=32,sr=64,Xr=128,ut=256,nr=at|ze|ut;function ar(e,t){return ze|(e?ir:0)|(t?Kr:0)}var wt=0,or=1,ge=2,Jr=3,ei=4,ti=5,M=function(t,r,i){this.options=t=Ms(t),this.sourceFile=t.sourceFile,this.keywords=_e(Ps[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var s="";t.allowReserved!==!0&&(s=Yt[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(s+=" await")),this.reservedWords=_e(s);var n=(s?s+" ":"")+Yt.strict;this.reservedWordsStrict=_e(n),this.reservedWordsStrictBind=_e(n+" "+Yt.strictBind),this.input=String(r),this.containsEsc=!1,i?(this.pos=i,this.lineStart=this.input.lastIndexOf(`
33
- `,i-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(re).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=o.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=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(at),this.regexpState=null,this.privateNameStack=[]},he={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}};M.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};he.inFunction.get=function(){return(this.currentVarScope().flags&ze)>0};he.inGenerator.get=function(){return(this.currentVarScope().flags&Kr)>0&&!this.currentVarScope().inClassFieldInit};he.inAsync.get=function(){return(this.currentVarScope().flags&ir)>0&&!this.currentVarScope().inClassFieldInit};he.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&ut)return!1;if(t.flags&ze)return(t.flags&ir)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};he.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,r=e.inClassFieldInit;return(t&sr)>0||r||this.options.allowSuperOutsideMethod};he.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Xr)>0};he.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};he.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,r=e.inClassFieldInit;return(t&(ze|ut))>0||r};he.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&ut)>0};M.extend=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];for(var i=this,s=0;s<t.length;s++)i=t[s](i);return i};M.parse=function(t,r){return new this(r,t).parse()};M.parseExpressionAt=function(t,r,i){var s=new this(i,t,r);return s.nextToken(),s.parseExpression()};M.tokenizer=function(t,r){return new this(r,t)};Object.defineProperties(M.prototype,he);var Z=M.prototype,Fs=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;Z.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){ee.lastIndex=e,e+=ee.exec(this.input)[0].length;var t=Fs.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){ee.lastIndex=e+t[0].length;var r=ee.exec(this.input),i=r.index+r[0].length,s=this.input.charAt(i);return s===";"||s==="}"||re.test(r[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(s)||s==="!"&&this.input.charAt(i+1)==="=")}e+=t[0].length,ee.lastIndex=e,e+=ee.exec(this.input)[0].length,this.input[e]===";"&&e++}};Z.eat=function(e){return this.type===e?(this.next(),!0):!1};Z.isContextual=function(e){return this.type===o.name&&this.value===e&&!this.containsEsc};Z.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};Z.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};Z.canInsertSemicolon=function(){return this.type===o.eof||this.type===o.braceR||re.test(this.input.slice(this.lastTokEnd,this.start))};Z.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};Z.semicolon=function(){!this.eat(o.semi)&&!this.insertSemicolon()&&this.unexpected()};Z.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};Z.expect=function(e){this.eat(e)||this.unexpected()};Z.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var Ct=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Z.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var r=t?e.parenthesizedAssign:e.parenthesizedBind;r>-1&&this.raiseRecoverable(r,t?"Assigning to rvalue":"Parenthesized pattern")}};Z.checkExpressionErrors=function(e,t){if(!e)return!1;var r=e.shorthandAssign,i=e.doubleProto;if(!t)return r>=0||i>=0;r>=0&&this.raise(r,"Shorthand property assignments are valid only in destructuring patterns"),i>=0&&this.raiseRecoverable(i,"Redefinition of __proto__ property")};Z.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")};Z.isSimpleAssignTarget=function(e){return e.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(e.expression):e.type==="Identifier"||e.type==="MemberExpression"};var x=M.prototype;x.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==o.eof;){var r=this.parseStatement(null,!0,t);e.body.push(r)}if(this.inModule)for(var i=0,s=Object.keys(this.undefinedExports);i<s.length;i+=1){var n=s[i];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 ur={kind:"loop"},Us={kind:"switch"};x.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;ee.lastIndex=this.pos;var t=ee.exec(this.input),r=this.pos+t[0].length,i=this.input.charCodeAt(r);if(i===91||i===92)return!0;if(e)return!1;if(i===123||i>55295&&i<56320)return!0;if(de(i,!0)){for(var s=r+1;$e(i=this.input.charCodeAt(s),!0);)++s;if(i===92||i>55295&&i<56320)return!0;var n=this.input.slice(r,s);if(!Ns.test(n))return!0}return!1};x.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;ee.lastIndex=this.pos;var e=ee.exec(this.input),t=this.pos+e[0].length,r;return!re.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!($e(r=this.input.charCodeAt(t+8))||r>55295&&r<56320))};x.parseStatement=function(e,t,r){var i=this.type,s=this.startNode(),n;switch(this.isLet(e)&&(i=o._var,n="let"),i){case o._break:case o._continue:return this.parseBreakContinueStatement(s,i.keyword);case o._debugger:return this.parseDebuggerStatement(s);case o._do:return this.parseDoStatement(s);case o._for:return this.parseForStatement(s);case o._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!e);case o._class:return e&&this.unexpected(),this.parseClass(s,!0);case o._if:return this.parseIfStatement(s);case o._return:return this.parseReturnStatement(s);case o._switch:return this.parseSwitchStatement(s);case o._throw:return this.parseThrowStatement(s);case o._try:return this.parseTryStatement(s);case o._const:case o._var:return n=n||this.value,e&&n!=="var"&&this.unexpected(),this.parseVarStatement(s,n);case o._while:return this.parseWhileStatement(s);case o._with:return this.parseWithStatement(s);case o.braceL:return this.parseBlock(!0,s);case o.semi:return this.parseEmptyStatement(s);case o._export:case o._import:if(this.options.ecmaVersion>10&&i===o._import){ee.lastIndex=this.pos;var a=ee.exec(this.input),u=this.pos+a[0].length,c=this.input.charCodeAt(u);if(c===40||c===46)return this.parseExpressionStatement(s,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'")),i===o._import?this.parseImport(s):this.parseExport(s,r);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(s,!0,!e);var l=this.value,h=this.parseExpression();return i===o.name&&h.type==="Identifier"&&this.eat(o.colon)?this.parseLabeledStatement(s,l,h,e):this.parseExpressionStatement(s,h)}};x.parseBreakContinueStatement=function(e,t){var r=t==="break";this.next(),this.eat(o.semi)||this.insertSemicolon()?e.label=null:this.type!==o.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var i=0;i<this.labels.length;++i){var s=this.labels[i];if((e.label==null||s.name===e.label.name)&&(s.kind!=null&&(r||s.kind==="loop")||e.label&&r))break}return i===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,r?"BreakStatement":"ContinueStatement")};x.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};x.parseDoStatement=function(e){return this.next(),this.labels.push(ur),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(o._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(o.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};x.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(ur),this.enterScope(0),this.expect(o.parenL),this.type===o.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var r=this.isLet();if(this.type===o._var||this.type===o._const||r){var i=this.startNode(),s=r?"let":this.value;return this.next(),this.parseVar(i,!0,s),this.finishNode(i,"VariableDeclaration"),(this.type===o._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&i.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===o._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,i)):(t>-1&&this.unexpected(t),this.parseFor(e,i))}var n=this.isContextual("let"),a=!1,u=new Ct,c=this.parseExpression(t>-1?"await":!0,u);return this.type===o._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===o._in?t>-1&&this.unexpected(t):e.await=t>-1),n&&a&&this.raise(c.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(c,!1,u),this.checkLValPattern(c),this.parseForIn(e,c)):(this.checkExpressionErrors(u,!0),t>-1&&this.unexpected(t),this.parseFor(e,c))};x.parseFunctionStatement=function(e,t,r){return this.next(),this.parseFunction(e,st|(r?0:tr),!1,t)};x.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(o._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};x.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(o.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};x.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(o.braceL),this.labels.push(Us),this.enterScope(0);for(var t,r=!1;this.type!==o.braceR;)if(this.type===o._case||this.type===o._default){var i=this.type===o._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),i?t.test=this.parseExpression():(r&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),r=!0,t.test=null),this.expect(o.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")};x.parseThrowStatement=function(e){return this.next(),re.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 $s=[];x.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?Qr:0),this.checkLValPattern(e,t?ei:ge),this.expect(o.parenR),e};x.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===o._catch){var t=this.startNode();this.next(),this.eat(o.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(o._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};x.parseVarStatement=function(e,t,r){return this.next(),this.parseVar(e,!1,t,r),this.semicolon(),this.finishNode(e,"VariableDeclaration")};x.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(ur),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};x.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")};x.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};x.parseLabeledStatement=function(e,t,r,i){for(var s=0,n=this.labels;s<n.length;s+=1){var a=n[s];a.name===t&&this.raise(r.start,"Label '"+t+"' is already declared")}for(var u=this.type.isLoop?"loop":this.type===o._switch?"switch":null,c=this.labels.length-1;c>=0;c--){var l=this.labels[c];if(l.statementStart===e.start)l.statementStart=this.start,l.kind=u;else break}return this.labels.push({name:t,kind:u,statementStart:this.start}),e.body=this.parseStatement(i?i.indexOf("label")===-1?i+"label":i:"label"),this.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")};x.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};x.parseBlock=function(e,t,r){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(o.braceL),e&&this.enterScope(0);this.type!==o.braceR;){var i=this.parseStatement(null);t.body.push(i)}return r&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};x.parseFor=function(e,t){return e.init=t,this.expect(o.semi),e.test=this.type===o.semi?null:this.parseExpression(),this.expect(o.semi),e.update=this.type===o.parenR?null:this.parseExpression(),this.expect(o.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};x.parseForIn=function(e,t){var r=this.type===o._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!r||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(r?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssign(),this.expect(o.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")};x.parseVar=function(e,t,r,i){for(e.declarations=[],e.kind=r;;){var s=this.startNode();if(this.parseVarId(s,r),this.eat(o.eq)?s.init=this.parseMaybeAssign(t):!i&&r==="const"&&!(this.type===o._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!i&&s.id.type!=="Identifier"&&!(t&&(this.type===o._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):s.init=null,e.declarations.push(this.finishNode(s,"VariableDeclarator")),!this.eat(o.comma))break}return e};x.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?or:ge,!1)};var st=1,tr=2,ri=4;x.parseFunction=function(e,t,r,i,s){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!i)&&(this.type===o.star&&t&tr&&this.unexpected(),e.generator=this.eat(o.star)),this.options.ecmaVersion>=8&&(e.async=!!i),t&st&&(e.id=t&ri&&this.type!==o.name?null:this.parseIdent(),e.id&&!(t&tr)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?or:ge:Jr));var n=this.yieldPos,a=this.awaitPos,u=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ar(e.async,e.generator)),t&st||(e.id=this.type===o.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,r,!1,s),this.yieldPos=n,this.awaitPos=a,this.awaitIdentPos=u,this.finishNode(e,t&st?"FunctionDeclaration":"FunctionExpression")};x.parseFunctionParams=function(e){this.expect(o.parenL),e.params=this.parseBindingList(o.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};x.parseClass=function(e,t){this.next();var r=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var i=this.enterClassBody(),s=this.startNode(),n=!1;for(s.body=[],this.expect(o.braceL);this.type!==o.braceR;){var a=this.parseClassElement(e.superClass!==null);a&&(s.body.push(a),a.type==="MethodDefinition"&&a.kind==="constructor"?(n&&this.raiseRecoverable(a.start,"Duplicate constructor in the same class"),n=!0):a.key&&a.key.type==="PrivateIdentifier"&&Zs(i,a)&&this.raiseRecoverable(a.key.start,"Identifier '#"+a.key.name+"' has already been declared"))}return this.strict=r,this.next(),e.body=this.finishNode(s,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};x.parseClassElement=function(e){if(this.eat(o.semi))return null;var t=this.options.ecmaVersion,r=this.startNode(),i="",s=!1,n=!1,a="method",u=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(o.braceL))return this.parseClassStaticBlock(r),r;this.isClassElementNameStart()||this.type===o.star?u=!0:i="static"}if(r.static=u,!i&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===o.star)&&!this.canInsertSemicolon()?n=!0:i="async"),!i&&(t>=9||!n)&&this.eat(o.star)&&(s=!0),!i&&!n&&!s){var c=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?a=c:i=c)}if(i?(r.computed=!1,r.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),r.key.name=i,this.finishNode(r.key,"Identifier")):this.parseClassElementName(r),t<13||this.type===o.parenL||a!=="method"||s||n){var l=!r.static&&kt(r,"constructor"),h=l&&e;l&&a!=="method"&&this.raise(r.key.start,"Constructor can't have get/set modifier"),r.kind=l?"constructor":a,this.parseClassMethod(r,s,n,h)}else this.parseClassField(r);return r};x.isClassElementNameStart=function(){return this.type===o.name||this.type===o.privateId||this.type===o.num||this.type===o.string||this.type===o.bracketL||this.type.keyword};x.parseClassElementName=function(e){this.type===o.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)};x.parseClassMethod=function(e,t,r,i){var s=e.key;e.kind==="constructor"?(t&&this.raise(s.start,"Constructor can't be a generator"),r&&this.raise(s.start,"Constructor can't be an async method")):e.static&&kt(e,"prototype")&&this.raise(s.start,"Classes may not have a static property named prototype");var n=e.value=this.parseMethod(t,r,i);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")};x.parseClassField=function(e){if(kt(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&kt(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(o.eq)){var t=this.currentThisScope(),r=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=r}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};x.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(ut|sr);this.type!==o.braceR;){var r=this.parseStatement(null);e.body.push(r)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};x.parseClassId=function(e,t){this.type===o.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,ge,!1)):(t===!0&&this.unexpected(),e.id=null)};x.parseClassSuper=function(e){e.superClass=this.eat(o._extends)?this.parseExprSubscripts(null,!1):null};x.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};x.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,r=e.used;if(this.options.checkPrivateFields)for(var i=this.privateNameStack.length,s=i===0?null:this.privateNameStack[i-1],n=0;n<r.length;++n){var a=r[n];ot(t,a.name)||(s?s.used.push(a):this.raiseRecoverable(a.start,"Private field '#"+a.name+"' must be declared in an enclosing class"))}};function Zs(e,t){var r=t.key.name,i=e[r],s="true";return t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")&&(s=(t.static?"s":"i")+t.kind),i==="iget"&&s==="iset"||i==="iset"&&s==="iget"||i==="sget"&&s==="sset"||i==="sset"&&s==="sget"?(e[r]="true",!1):i?!0:(e[r]=s,!1)}function kt(e,t){var r=e.computed,i=e.key;return!r&&(i.type==="Identifier"&&i.name===t||i.type==="Literal"&&i.value===t)}x.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!==o.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};x.parseExport=function(e,t){if(this.next(),this.eat(o.star))return this.parseExportAllDeclaration(e,t);if(this.eat(o._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;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==o.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var r=0,i=e.specifiers;r<i.length;r+=1){var s=i[r];this.checkUnreserved(s.local),this.checkLocalExport(s.local),s.local.type==="Literal"&&this.raise(s.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};x.parseExportDeclaration=function(e){return this.parseStatement(null)};x.parseExportDefaultDeclaration=function(){var e;if(this.type===o._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,st|ri,!1,e)}else if(this.type===o._class){var r=this.startNode();return this.parseClass(r,"nullableID")}else{var i=this.parseMaybeAssign();return this.semicolon(),i}};x.checkExport=function(e,t,r){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),ot(e,t)&&this.raiseRecoverable(r,"Duplicate export '"+t+"'"),e[t]=!0)};x.checkPatternExport=function(e,t){var r=t.type;if(r==="Identifier")this.checkExport(e,t,t.start);else if(r==="ObjectPattern")for(var i=0,s=t.properties;i<s.length;i+=1){var n=s[i];this.checkPatternExport(e,n)}else if(r==="ArrayPattern")for(var a=0,u=t.elements;a<u.length;a+=1){var c=u[a];c&&this.checkPatternExport(e,c)}else r==="Property"?this.checkPatternExport(e,t.value):r==="AssignmentPattern"?this.checkPatternExport(e,t.left):r==="RestElement"&&this.checkPatternExport(e,t.argument)};x.checkVariableExport=function(e,t){if(e)for(var r=0,i=t;r<i.length;r+=1){var s=i[r];this.checkPatternExport(e,s.id)}};x.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};x.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")};x.parseExportSpecifiers=function(e){var t=[],r=!0;for(this.expect(o.braceL);!this.eat(o.braceR);){if(r)r=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;t.push(this.parseExportSpecifier(e))}return t};x.parseImport=function(e){return this.next(),this.type===o.string?(e.specifiers=$s,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===o.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")};x.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,ge),this.finishNode(e,"ImportSpecifier")};x.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,ge),this.finishNode(e,"ImportDefaultSpecifier")};x.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,ge),this.finishNode(e,"ImportNamespaceSpecifier")};x.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===o.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(o.comma)))return e;if(this.type===o.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(o.braceL);!this.eat(o.braceR);){if(t)t=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;e.push(this.parseImportSpecifier())}return e};x.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===o.string){var e=this.parseLiteral(this.value);return js.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};x.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)};x.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var ie=M.prototype;ie.toAssignable=function(e,t,r){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",r&&this.checkPatternErrors(r,!0);for(var i=0,s=e.properties;i<s.length;i+=1){var n=s[i];this.toAssignable(n,t),n.type==="RestElement"&&(n.argument.type==="ArrayPattern"||n.argument.type==="ObjectPattern")&&this.raise(n.argument.start,"Unexpected token")}break;case"Property":e.kind!=="init"&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",r&&this.checkPatternErrors(r,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern"&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":e.operator!=="="&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,r);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else r&&this.checkPatternErrors(r,!0);return e};ie.toAssignableList=function(e,t){for(var r=e.length,i=0;i<r;i++){var s=e[i];s&&this.toAssignable(s,t)}if(r){var n=e[r-1];this.options.ecmaVersion===6&&t&&n&&n.type==="RestElement"&&n.argument.type!=="Identifier"&&this.unexpected(n.argument.start)}return e};ie.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};ie.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==o.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};ie.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case o.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(o.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case o.braceL:return this.parseObj(!0)}return this.parseIdent()};ie.parseBindingList=function(e,t,r,i){for(var s=[],n=!0;!this.eat(e);)if(n?n=!1:this.expect(o.comma),t&&this.type===o.comma)s.push(null);else{if(r&&this.afterTrailingComma(e))break;if(this.type===o.ellipsis){var a=this.parseRestBinding();this.parseBindingListItem(a),s.push(a),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}else s.push(this.parseAssignableListItem(i))}return s};ie.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};ie.parseBindingListItem=function(e){return e};ie.parseMaybeDefault=function(e,t,r){if(r=r||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(o.eq))return r;var i=this.startNodeAt(e,t);return i.left=r,i.right=this.parseMaybeAssign(),this.finishNode(i,"AssignmentPattern")};ie.checkLValSimple=function(e,t,r){t===void 0&&(t=wt);var i=t!==wt;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(i?"Binding ":"Assigning to ")+e.name+" in strict mode"),i&&(t===ge&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),r&&(ot(r,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),r[e.name]=!0),t!==ti&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":i&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return i&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,r);default:this.raise(e.start,(i?"Binding":"Assigning to")+" rvalue")}};ie.checkLValPattern=function(e,t,r){switch(t===void 0&&(t=wt),e.type){case"ObjectPattern":for(var i=0,s=e.properties;i<s.length;i+=1){var n=s[i];this.checkLValInnerPattern(n,t,r)}break;case"ArrayPattern":for(var a=0,u=e.elements;a<u.length;a+=1){var c=u[a];c&&this.checkLValInnerPattern(c,t,r)}break;default:this.checkLValSimple(e,t,r)}};ie.checkLValInnerPattern=function(e,t,r){switch(t===void 0&&(t=wt),e.type){case"Property":this.checkLValInnerPattern(e.value,t,r);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,r);break;case"RestElement":this.checkLValPattern(e.argument,t,r);break;default:this.checkLValPattern(e,t,r)}};var oe=function(t,r,i,s,n){this.token=t,this.isExpr=!!r,this.preserveSpace=!!i,this.override=s,this.generator=!!n},V={b_stat:new oe("{",!1),b_expr:new oe("{",!0),b_tmpl:new oe("${",!1),p_stat:new oe("(",!1),p_expr:new oe("(",!0),q_tmpl:new oe("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new oe("function",!1),f_expr:new oe("function",!0),f_expr_gen:new oe("function",!0,!1,null,!0),f_gen:new oe("function",!1,!1,null,!0)},We=M.prototype;We.initialContext=function(){return[V.b_stat]};We.curContext=function(){return this.context[this.context.length-1]};We.braceIsBlock=function(e){var t=this.curContext();return t===V.f_expr||t===V.f_stat?!0:e===o.colon&&(t===V.b_stat||t===V.b_expr)?!t.isExpr:e===o._return||e===o.name&&this.exprAllowed?re.test(this.input.slice(this.lastTokEnd,this.start)):e===o._else||e===o.semi||e===o.eof||e===o.parenR||e===o.arrow?!0:e===o.braceL?t===V.b_stat:e===o._var||e===o._const||e===o.name?!1:!this.exprAllowed};We.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1};We.updateContext=function(e){var t,r=this.type;r.keyword&&e===o.dot?this.exprAllowed=!1:(t=r.updateContext)?t.call(this,e):this.exprAllowed=r.beforeExpr};We.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)};o.parenR.updateContext=o.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===V.b_stat&&this.curContext().token==="function"&&(e=this.context.pop()),this.exprAllowed=!e.isExpr};o.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?V.b_stat:V.b_expr),this.exprAllowed=!0};o.dollarBraceL.updateContext=function(){this.context.push(V.b_tmpl),this.exprAllowed=!0};o.parenL.updateContext=function(e){var t=e===o._if||e===o._for||e===o._with||e===o._while;this.context.push(t?V.p_stat:V.p_expr),this.exprAllowed=!0};o.incDec.updateContext=function(){};o._function.updateContext=o._class.updateContext=function(e){e.beforeExpr&&e!==o._else&&!(e===o.semi&&this.curContext()!==V.p_stat)&&!(e===o._return&&re.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===o.colon||e===o.braceL)&&this.curContext()===V.b_stat)?this.context.push(V.f_expr):this.context.push(V.f_stat),this.exprAllowed=!1};o.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0};o.backQuote.updateContext=function(){this.curContext()===V.q_tmpl?this.context.pop():this.context.push(V.q_tmpl),this.exprAllowed=!1};o.star.updateContext=function(e){if(e===o._function){var t=this.context.length-1;this.context[t]===V.f_expr?this.context[t]=V.f_expr_gen:this.context[t]=V.f_gen}this.exprAllowed=!0};o.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==o.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var b=M.prototype;b.checkPropClash=function(e,t,r){if(!(this.options.ecmaVersion>=9&&e.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var i=e.key,s;switch(i.type){case"Identifier":s=i.name;break;case"Literal":s=String(i.value);break;default:return}var n=e.kind;if(this.options.ecmaVersion>=6){s==="__proto__"&&n==="init"&&(t.proto&&(r?r.doubleProto<0&&(r.doubleProto=i.start):this.raiseRecoverable(i.start,"Redefinition of __proto__ property")),t.proto=!0);return}s="$"+s;var a=t[s];if(a){var u;n==="init"?u=this.strict&&a.init||a.get||a.set:u=a.init||a[n],u&&this.raiseRecoverable(i.start,"Redefinition of property")}else a=t[s]={init:!1,get:!1,set:!1};a[n]=!0}};b.parseExpression=function(e,t){var r=this.start,i=this.startLoc,s=this.parseMaybeAssign(e,t);if(this.type===o.comma){var n=this.startNodeAt(r,i);for(n.expressions=[s];this.eat(o.comma);)n.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(n,"SequenceExpression")}return s};b.parseMaybeAssign=function(e,t,r){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var i=!1,s=-1,n=-1,a=-1;t?(s=t.parenthesizedAssign,n=t.trailingComma,a=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new Ct,i=!0);var u=this.start,c=this.startLoc;(this.type===o.parenL||this.type===o.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var l=this.parseMaybeConditional(e,t);if(r&&(l=r.call(this,l,u,c)),this.type.isAssign){var h=this.startNodeAt(u,c);return h.operator=this.value,this.type===o.eq&&(l=this.toAssignable(l,!1,t)),i||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=l.start&&(t.shorthandAssign=-1),this.type===o.eq?this.checkLValPattern(l):this.checkLValSimple(l),h.left=l,this.next(),h.right=this.parseMaybeAssign(e),a>-1&&(t.doubleProto=a),this.finishNode(h,"AssignmentExpression")}else i&&this.checkExpressionErrors(t,!0);return s>-1&&(t.parenthesizedAssign=s),n>-1&&(t.trailingComma=n),l};b.parseMaybeConditional=function(e,t){var r=this.start,i=this.startLoc,s=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return s;if(this.eat(o.question)){var n=this.startNodeAt(r,i);return n.test=s,n.consequent=this.parseMaybeAssign(),this.expect(o.colon),n.alternate=this.parseMaybeAssign(e),this.finishNode(n,"ConditionalExpression")}return s};b.parseExprOps=function(e,t){var r=this.start,i=this.startLoc,s=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||s.start===r&&s.type==="ArrowFunctionExpression"?s:this.parseExprOp(s,r,i,-1,e)};b.parseExprOp=function(e,t,r,i,s){var n=this.type.binop;if(n!=null&&(!s||this.type!==o._in)&&n>i){var a=this.type===o.logicalOR||this.type===o.logicalAND,u=this.type===o.coalesce;u&&(n=o.logicalAND.binop);var c=this.value;this.next();var l=this.start,h=this.startLoc,f=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,s),l,h,n,s),N=this.buildBinary(t,r,e,f,c,a||u);return(a&&this.type===o.coalesce||u&&(this.type===o.logicalOR||this.type===o.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(N,t,r,i,s)}return e};b.buildBinary=function(e,t,r,i,s,n){i.type==="PrivateIdentifier"&&this.raise(i.start,"Private identifier can only be left side of binary expression");var a=this.startNodeAt(e,t);return a.left=r,a.operator=s,a.right=i,this.finishNode(a,n?"LogicalExpression":"BinaryExpression")};b.parseMaybeUnary=function(e,t,r,i){var s=this.start,n=this.startLoc,a;if(this.isContextual("await")&&this.canAwait)a=this.parseAwait(i),t=!0;else if(this.type.prefix){var u=this.startNode(),c=this.type===o.incDec;u.operator=this.value,u.prefix=!0,this.next(),u.argument=this.parseMaybeUnary(null,!0,c,i),this.checkExpressionErrors(e,!0),c?this.checkLValSimple(u.argument):this.strict&&u.operator==="delete"&&u.argument.type==="Identifier"?this.raiseRecoverable(u.start,"Deleting local variable in strict mode"):u.operator==="delete"&&ii(u.argument)?this.raiseRecoverable(u.start,"Private fields can not be deleted"):t=!0,a=this.finishNode(u,c?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===o.privateId)(i||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),a=this.parsePrivateIdent(),this.type!==o._in&&this.unexpected();else{if(a=this.parseExprSubscripts(e,i),this.checkExpressionErrors(e))return a;for(;this.type.postfix&&!this.canInsertSemicolon();){var l=this.startNodeAt(s,n);l.operator=this.value,l.prefix=!1,l.argument=a,this.checkLValSimple(a),this.next(),a=this.finishNode(l,"UpdateExpression")}}if(!r&&this.eat(o.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(s,n,a,this.parseMaybeUnary(null,!1,!1,i),"**",!1);else return a};function ii(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&ii(e.expression)}b.parseExprSubscripts=function(e,t){var r=this.start,i=this.startLoc,s=this.parseExprAtom(e,t);if(s.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return s;var n=this.parseSubscripts(s,r,i,!1,t);return e&&n.type==="MemberExpression"&&(e.parenthesizedAssign>=n.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=n.start&&(e.parenthesizedBind=-1),e.trailingComma>=n.start&&(e.trailingComma=-1)),n};b.parseSubscripts=function(e,t,r,i,s){for(var n=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,a=!1;;){var u=this.parseSubscript(e,t,r,i,n,a,s);if(u.optional&&(a=!0),u===e||u.type==="ArrowFunctionExpression"){if(a){var c=this.startNodeAt(t,r);c.expression=u,u=this.finishNode(c,"ChainExpression")}return u}e=u}};b.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(o.arrow)};b.parseSubscriptAsyncArrow=function(e,t,r,i){return this.parseArrowExpression(this.startNodeAt(e,t),r,!0,i)};b.parseSubscript=function(e,t,r,i,s,n,a){var u=this.options.ecmaVersion>=11,c=u&&this.eat(o.questionDot);i&&c&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var l=this.eat(o.bracketL);if(l||c&&this.type!==o.parenL&&this.type!==o.backQuote||this.eat(o.dot)){var h=this.startNodeAt(t,r);h.object=e,l?(h.property=this.parseExpression(),this.expect(o.bracketR)):this.type===o.privateId&&e.type!=="Super"?h.property=this.parsePrivateIdent():h.property=this.parseIdent(this.options.allowReserved!=="never"),h.computed=!!l,u&&(h.optional=c),e=this.finishNode(h,"MemberExpression")}else if(!i&&this.eat(o.parenL)){var f=new Ct,N=this.yieldPos,O=this.awaitPos,B=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var H=this.parseExprList(o.parenR,this.options.ecmaVersion>=8,!1,f);if(s&&!c&&this.shouldParseAsyncArrow())return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=N,this.awaitPos=O,this.awaitIdentPos=B,this.parseSubscriptAsyncArrow(t,r,H,a);this.checkExpressionErrors(f,!0),this.yieldPos=N||this.yieldPos,this.awaitPos=O||this.awaitPos,this.awaitIdentPos=B||this.awaitIdentPos;var ae=this.startNodeAt(t,r);ae.callee=e,ae.arguments=H,u&&(ae.optional=c),e=this.finishNode(ae,"CallExpression")}else if(this.type===o.backQuote){(c||n)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var le=this.startNodeAt(t,r);le.tag=e,le.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(le,"TaggedTemplateExpression")}return e};b.parseExprAtom=function(e,t,r){this.type===o.slash&&this.readRegexp();var i,s=this.potentialArrowAt===this.start;switch(this.type){case o._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),i=this.startNode(),this.next(),this.type===o.parenL&&!this.allowDirectSuper&&this.raise(i.start,"super() call outside constructor of a subclass"),this.type!==o.dot&&this.type!==o.bracketL&&this.type!==o.parenL&&this.unexpected(),this.finishNode(i,"Super");case o._this:return i=this.startNode(),this.next(),this.finishNode(i,"ThisExpression");case o.name:var n=this.start,a=this.startLoc,u=this.containsEsc,c=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!u&&c.name==="async"&&!this.canInsertSemicolon()&&this.eat(o._function))return this.overrideContext(V.f_expr),this.parseFunction(this.startNodeAt(n,a),0,!1,!0,t);if(s&&!this.canInsertSemicolon()){if(this.eat(o.arrow))return this.parseArrowExpression(this.startNodeAt(n,a),[c],!1,t);if(this.options.ecmaVersion>=8&&c.name==="async"&&this.type===o.name&&!u&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return c=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(o.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(n,a),[c],!0,t)}return c;case o.regexp:var l=this.value;return i=this.parseLiteral(l.value),i.regex={pattern:l.pattern,flags:l.flags},i;case o.num:case o.string:return this.parseLiteral(this.value);case o._null:case o._true:case o._false:return i=this.startNode(),i.value=this.type===o._null?null:this.type===o._true,i.raw=this.type.keyword,this.next(),this.finishNode(i,"Literal");case o.parenL:var h=this.start,f=this.parseParenAndDistinguishExpression(s,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(f)&&(e.parenthesizedAssign=h),e.parenthesizedBind<0&&(e.parenthesizedBind=h)),f;case o.bracketL:return i=this.startNode(),this.next(),i.elements=this.parseExprList(o.bracketR,!0,!0,e),this.finishNode(i,"ArrayExpression");case o.braceL:return this.overrideContext(V.b_expr),this.parseObj(!1,e);case o._function:return i=this.startNode(),this.next(),this.parseFunction(i,0);case o._class:return this.parseClass(this.startNode(),!1);case o._new:return this.parseNew();case o.backQuote:return this.parseTemplate();case o._import:return this.options.ecmaVersion>=11?this.parseExprImport(r):this.unexpected();default:return this.parseExprAtomDefault()}};b.parseExprAtomDefault=function(){this.unexpected()};b.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===o.parenL&&!e)return this.parseDynamicImport(t);if(this.type===o.dot){var r=this.startNodeAt(t.start,t.loc&&t.loc.start);return r.name="import",t.meta=this.finishNode(r,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};b.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(o.parenR)){var t=this.start;this.eat(o.comma)&&this.eat(o.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};b.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};b.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};b.parseParenExpression=function(){this.expect(o.parenL);var e=this.parseExpression();return this.expect(o.parenR),e};b.shouldParseArrow=function(e){return!this.canInsertSemicolon()};b.parseParenAndDistinguishExpression=function(e,t){var r=this.start,i=this.startLoc,s,n=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a=this.start,u=this.startLoc,c=[],l=!0,h=!1,f=new Ct,N=this.yieldPos,O=this.awaitPos,B;for(this.yieldPos=0,this.awaitPos=0;this.type!==o.parenR;)if(l?l=!1:this.expect(o.comma),n&&this.afterTrailingComma(o.parenR,!0)){h=!0;break}else if(this.type===o.ellipsis){B=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else c.push(this.parseMaybeAssign(!1,f,this.parseParenItem));var H=this.lastTokEnd,ae=this.lastTokEndLoc;if(this.expect(o.parenR),e&&this.shouldParseArrow(c)&&this.eat(o.arrow))return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=N,this.awaitPos=O,this.parseParenArrowList(r,i,c,t);(!c.length||h)&&this.unexpected(this.lastTokStart),B&&this.unexpected(B),this.checkExpressionErrors(f,!0),this.yieldPos=N||this.yieldPos,this.awaitPos=O||this.awaitPos,c.length>1?(s=this.startNodeAt(a,u),s.expressions=c,this.finishNodeAt(s,"SequenceExpression",H,ae)):s=c[0]}else s=this.parseParenExpression();if(this.options.preserveParens){var le=this.startNodeAt(r,i);return le.expression=s,this.finishNode(le,"ParenthesizedExpression")}else return s};b.parseParenItem=function(e){return e};b.parseParenArrowList=function(e,t,r,i){return this.parseArrowExpression(this.startNodeAt(e,t),r,!1,i)};var zs=[];b.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===o.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var r=this.containsEsc;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'"),r&&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")}var i=this.start,s=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),i,s,!0,!1),this.eat(o.parenL)?e.arguments=this.parseExprList(o.parenR,this.options.ecmaVersion>=8,!1):e.arguments=zs,this.finishNode(e,"NewExpression")};b.parseTemplateElement=function(e){var t=e.isTagged,r=this.startNode();return this.type===o.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),r.value={raw:this.value,cooked:null}):r.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
34
- `),cooked:this.value},this.next(),r.tail=this.type===o.backQuote,this.finishNode(r,"TemplateElement")};b.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var r=this.startNode();this.next(),r.expressions=[];var i=this.parseTemplateElement({isTagged:t});for(r.quasis=[i];!i.tail;)this.type===o.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(o.dollarBraceL),r.expressions.push(this.parseExpression()),this.expect(o.braceR),r.quasis.push(i=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(r,"TemplateLiteral")};b.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===o.name||this.type===o.num||this.type===o.string||this.type===o.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===o.star)&&!re.test(this.input.slice(this.lastTokEnd,this.start))};b.parseObj=function(e,t){var r=this.startNode(),i=!0,s={};for(r.properties=[],this.next();!this.eat(o.braceR);){if(i)i=!1;else if(this.expect(o.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(o.braceR))break;var n=this.parseProperty(e,t);e||this.checkPropClash(n,s,t),r.properties.push(n)}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")};b.parseProperty=function(e,t){var r=this.startNode(),i,s,n,a;if(this.options.ecmaVersion>=9&&this.eat(o.ellipsis))return e?(r.argument=this.parseIdent(!1),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(r,"RestElement")):(r.argument=this.parseMaybeAssign(!1,t),this.type===o.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(r,"SpreadElement"));this.options.ecmaVersion>=6&&(r.method=!1,r.shorthand=!1,(e||t)&&(n=this.start,a=this.startLoc),e||(i=this.eat(o.star)));var u=this.containsEsc;return this.parsePropertyName(r),!e&&!u&&this.options.ecmaVersion>=8&&!i&&this.isAsyncProp(r)?(s=!0,i=this.options.ecmaVersion>=9&&this.eat(o.star),this.parsePropertyName(r)):s=!1,this.parsePropertyValue(r,e,i,s,n,a,t,u),this.finishNode(r,"Property")};b.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var t=e.kind==="get"?0:1;if(e.value.params.length!==t){var r=e.value.start;e.kind==="get"?this.raiseRecoverable(r,"getter should have no params"):this.raiseRecoverable(r,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};b.parsePropertyValue=function(e,t,r,i,s,n,a,u){(r||i)&&this.type===o.colon&&this.unexpected(),this.eat(o.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),e.kind="init"):this.options.ecmaVersion>=6&&this.type===o.parenL?(t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(r,i)):!t&&!u&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==o.comma&&this.type!==o.braceR&&this.type!==o.eq?((r||i)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((r||i)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=s),e.kind="init",t?e.value=this.parseMaybeDefault(s,n,this.copyNode(e.key)):this.type===o.eq&&a?(a.shorthandAssign<0&&(a.shorthandAssign=this.start),e.value=this.parseMaybeDefault(s,n,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected()};b.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(o.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(o.bracketR),e.key;e.computed=!1}return e.key=this.type===o.num||this.type===o.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};b.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};b.parseMethod=function(e,t,r){var i=this.startNode(),s=this.yieldPos,n=this.awaitPos,a=this.awaitIdentPos;return this.initFunction(i),this.options.ecmaVersion>=6&&(i.generator=e),this.options.ecmaVersion>=8&&(i.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ar(t,i.generator)|sr|(r?Xr:0)),this.expect(o.parenL),i.params=this.parseBindingList(o.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(i,!1,!0,!1),this.yieldPos=s,this.awaitPos=n,this.awaitIdentPos=a,this.finishNode(i,"FunctionExpression")};b.parseArrowExpression=function(e,t,r,i){var s=this.yieldPos,n=this.awaitPos,a=this.awaitIdentPos;return this.enterScope(ar(r,!1)|Yr),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!r),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,i),this.yieldPos=s,this.awaitPos=n,this.awaitIdentPos=a,this.finishNode(e,"ArrowFunctionExpression")};b.parseFunctionBody=function(e,t,r,i){var s=t&&this.type!==o.braceL,n=this.strict,a=!1;if(s)e.body=this.parseMaybeAssign(i),e.expression=!0,this.checkParams(e,!1);else{var u=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!n||u)&&(a=this.strictDirective(this.end),a&&u&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var c=this.labels;this.labels=[],a&&(this.strict=!0),this.checkParams(e,!n&&!a&&!t&&!r&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,ti),e.body=this.parseBlock(!1,void 0,a&&!n),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=c}this.exitScope()};b.isSimpleParamList=function(e){for(var t=0,r=e;t<r.length;t+=1){var i=r[t];if(i.type!=="Identifier")return!1}return!0};b.checkParams=function(e,t){for(var r=Object.create(null),i=0,s=e.params;i<s.length;i+=1){var n=s[i];this.checkLValInnerPattern(n,or,t?null:r)}};b.parseExprList=function(e,t,r,i){for(var s=[],n=!0;!this.eat(e);){if(n)n=!1;else if(this.expect(o.comma),t&&this.afterTrailingComma(e))break;var a=void 0;r&&this.type===o.comma?a=null:this.type===o.ellipsis?(a=this.parseSpread(i),i&&this.type===o.comma&&i.trailingComma<0&&(i.trailingComma=this.start)):a=this.parseMaybeAssign(!1,i),s.push(a)}return s};b.checkUnreserved=function(e){var t=e.start,r=e.end,i=e.name;if(this.inGenerator&&i==="yield"&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&i==="await"&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().inClassFieldInit&&i==="arguments"&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(i==="arguments"||i==="await")&&this.raise(t,"Cannot use "+i+" in class static initialization block"),this.keywords.test(i)&&this.raise(t,"Unexpected keyword '"+i+"'"),!(this.options.ecmaVersion<6&&this.input.slice(t,r).indexOf("\\")!==-1)){var s=this.strict?this.reservedWordsStrict:this.reservedWords;s.test(i)&&(!this.inAsync&&i==="await"&&this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+i+"' is reserved"))}};b.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,"Identifier"),e||(this.checkUnreserved(t),t.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t};b.parseIdentNode=function(){var e=this.startNode();return this.type===o.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=o.name):this.unexpected(),e};b.parsePrivateIdent=function(){var e=this.startNode();return this.type===o.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e};b.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===o.semi||this.canInsertSemicolon()||this.type!==o.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(o.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")};b.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var Et=M.prototype;Et.raise=function(e,t){var r=Hr(this.input,e);t+=" ("+r.line+":"+r.column+")";var i=new SyntaxError(t);throw i.pos=e,i.loc=r,i.raisedAt=this.pos,i};Et.raiseRecoverable=Et.raise;Et.curPosition=function(){if(this.options.locations)return new nt(this.curLine,this.pos-this.lineStart)};var we=M.prototype,Ws=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[],this.inClassFieldInit=!1};we.enterScope=function(e){this.scopeStack.push(new Ws(e))};we.exitScope=function(){this.scopeStack.pop()};we.treatFunctionsAsVarInScope=function(e){return e.flags&ze||!this.inModule&&e.flags&at};we.declareName=function(e,t,r){var i=!1;if(t===ge){var s=this.currentScope();i=s.lexical.indexOf(e)>-1||s.functions.indexOf(e)>-1||s.var.indexOf(e)>-1,s.lexical.push(e),this.inModule&&s.flags&at&&delete this.undefinedExports[e]}else if(t===ei){var n=this.currentScope();n.lexical.push(e)}else if(t===Jr){var a=this.currentScope();this.treatFunctionsAsVar?i=a.lexical.indexOf(e)>-1:i=a.lexical.indexOf(e)>-1||a.var.indexOf(e)>-1,a.functions.push(e)}else for(var u=this.scopeStack.length-1;u>=0;--u){var c=this.scopeStack[u];if(c.lexical.indexOf(e)>-1&&!(c.flags&Qr&&c.lexical[0]===e)||!this.treatFunctionsAsVarInScope(c)&&c.functions.indexOf(e)>-1){i=!0;break}if(c.var.push(e),this.inModule&&c.flags&at&&delete this.undefinedExports[e],c.flags&nr)break}i&&this.raiseRecoverable(r,"Identifier '"+e+"' has already been declared")};we.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};we.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};we.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&nr)return t}};we.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&nr&&!(t.flags&Yr))return t}};var At=function(t,r,i){this.type="",this.start=r,this.end=0,t.options.locations&&(this.loc=new St(t,i)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[r,0])},ct=M.prototype;ct.startNode=function(){return new At(this,this.start,this.startLoc)};ct.startNodeAt=function(e,t){return new At(this,e,t)};function si(e,t,r,i){return e.type=t,e.end=r,this.options.locations&&(e.loc.end=i),this.options.ranges&&(e.range[1]=r),e}ct.finishNode=function(e,t){return si.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};ct.finishNodeAt=function(e,t,r,i){return si.call(this,e,t,r,i)};ct.copyNode=function(e){var t=new At(this,e.start,this.startLoc);for(var r in e)t[r]=e[r];return t};var ni="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",ai=ni+" Extended_Pictographic",oi=ai,ui=oi+" EBase EComp EMod EPres ExtPict",ci=ui,Gs=ci,qs={9:ni,10:ai,11:oi,12:ui,13:ci,14:Gs},Hs="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Ks={9:"",10:"",11:"",12:"",13:"",14:Hs},Ur="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",li="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",hi=li+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",fi=hi+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",pi=fi+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",di=pi+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Ys=di+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz",Qs={9:li,10:hi,11:fi,12:pi,13:di,14:Ys},mi={};function Xs(e){var t=mi[e]={binary:_e(qs[e]+" "+Ur),binaryOfStrings:_e(Ks[e]),nonBinary:{General_Category:_e(Ur),Script:_e(Qs[e])}};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}for(bt=0,Xt=[9,10,11,12,13,14];bt<Xt.length;bt+=1)$r=Xt[bt],Xs($r);var $r,bt,Xt,g=M.prototype,fe=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=mi[t.options.ecmaVersion>=14?14:t.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=[],this.backReferenceNames=[]};fe.prototype.reset=function(t,r,i){var s=i.indexOf("v")!==-1,n=i.indexOf("u")!==-1;this.start=t|0,this.source=r+"",this.flags=i,s&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=n&&this.parser.options.ecmaVersion>=9)};fe.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};fe.prototype.at=function(t,r){r===void 0&&(r=!1);var i=this.source,s=i.length;if(t>=s)return-1;var n=i.charCodeAt(t);if(!(r||this.switchU)||n<=55295||n>=57344||t+1>=s)return n;var a=i.charCodeAt(t+1);return a>=56320&&a<=57343?(n<<10)+a-56613888:n};fe.prototype.nextIndex=function(t,r){r===void 0&&(r=!1);var i=this.source,s=i.length;if(t>=s)return s;var n=i.charCodeAt(t),a;return!(r||this.switchU)||n<=55295||n>=57344||t+1>=s||(a=i.charCodeAt(t+1))<56320||a>57343?t+1:t+2};fe.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)};fe.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};fe.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};fe.prototype.eat=function(t,r){return r===void 0&&(r=!1),this.current(r)===t?(this.advance(r),!0):!1};fe.prototype.eatChars=function(t,r){r===void 0&&(r=!1);for(var i=this.pos,s=0,n=t;s<n.length;s+=1){var a=n[s],u=this.at(i,r);if(u===-1||u!==a)return!1;i=this.nextIndex(i,r)}return this.pos=i,!0};g.validateRegExpFlags=function(e){for(var t=e.validFlags,r=e.flags,i=!1,s=!1,n=0;n<r.length;n++){var a=r.charAt(n);t.indexOf(a)===-1&&this.raise(e.start,"Invalid regular expression flag"),r.indexOf(a,n+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),a==="u"&&(i=!0),a==="v"&&(s=!0)}this.options.ecmaVersion>=15&&i&&s&&this.raise(e.start,"Invalid regular expression flag")};g.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))};g.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,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");for(var t=0,r=e.backReferenceNames;t<r.length;t+=1){var i=r[t];e.groupNames.indexOf(i)===-1&&e.raise("Invalid named capture referenced")}};g.regexp_disjunction=function(e){for(this.regexp_alternative(e);e.eat(124);)this.regexp_alternative(e);this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")};g.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););};g.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1};g.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var r=!1;if(this.options.ecmaVersion>=9&&(r=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!r,!0}return e.pos=t,!1};g.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};g.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};g.regexp_eatBracedQuantifier=function(e,t){var r=e.pos;if(e.eat(123)){var i=0,s=-1;if(this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(s=e.lastIntValue),e.eat(125)))return s!==-1&&s<i&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=r}return!1};g.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)};g.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1};g.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)&&e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}e.pos=t}return!1};g.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};g.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};g.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};g.regexp_eatSyntaxCharacter=function(e){var t=e.current();return gi(t)?(e.lastIntValue=t,e.advance(),!0):!1};function gi(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}g.regexp_eatPatternCharacters=function(e){for(var t=e.pos,r=0;(r=e.current())!==-1&&!gi(r);)e.advance();return e.pos!==t};g.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1};g.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e)){e.groupNames.indexOf(e.lastStringValue)!==-1&&e.raise("Duplicate capture group name"),e.groupNames.push(e.lastStringValue);return}e.raise("Invalid group")}};g.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};g.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=be(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=be(e.lastIntValue);return!0}return!1};g.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,i=e.current(r);return e.advance(r),i===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(i=e.lastIntValue),Js(i)?(e.lastIntValue=i,!0):(e.pos=t,!1)};function Js(e){return de(e,!0)||e===36||e===95}g.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,i=e.current(r);return e.advance(r),i===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(i=e.lastIntValue),en(i)?(e.lastIntValue=i,!0):(e.pos=t,!1)};function en(e){return $e(e,!0)||e===36||e===95||e===8204||e===8205}g.regexp_eatAtomEscape=function(e){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)};g.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var r=e.lastIntValue;if(e.switchU)return r>e.maxBackReference&&(e.maxBackReference=r),!0;if(r<=e.numCapturingParens)return!0;e.pos=t}return!1};g.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};g.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};g.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};g.regexp_eatZero=function(e){return e.current()===48&&!Tt(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};g.regexp_eatControlEscape=function(e){var t=e.current();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};g.regexp_eatControlLetter=function(e){var t=e.current();return xi(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function xi(e){return e>=65&&e<=90||e>=97&&e<=122}g.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var r=e.pos,i=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var s=e.lastIntValue;if(i&&s>=55296&&s<=56319){var n=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(a>=56320&&a<=57343)return e.lastIntValue=(s-55296)*1024+(a-56320)+65536,!0}e.pos=n,e.lastIntValue=s}return!0}if(i&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&tn(e.lastIntValue))return!0;i&&e.raise("Invalid unicode escape"),e.pos=r}return!1};function tn(e){return e>=0&&e<=1114111}g.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1};g.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var vi=0,me=1,te=2;g.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(rn(t))return e.lastIntValue=-1,e.advance(),me;var r=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((r=t===80)||t===112)){e.lastIntValue=-1,e.advance();var i;if(e.eat(123)&&(i=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return r&&i===te&&e.raise("Invalid property name"),i;e.raise("Invalid property name")}return vi};function rn(e){return e===100||e===68||e===115||e===83||e===119||e===87}g.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var r=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,r,i),me}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var s=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,s)}return vi};g.regexp_validateUnicodePropertyNameAndValue=function(e,t,r){ot(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(r)||e.raise("Invalid property value")};g.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return me;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return te;e.raise("Invalid property name")};g.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";yi(t=e.current());)e.lastStringValue+=be(t),e.advance();return e.lastStringValue!==""};function yi(e){return xi(e)||e===95}g.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";sn(t=e.current());)e.lastStringValue+=be(t),e.advance();return e.lastStringValue!==""};function sn(e){return yi(e)||Tt(e)}g.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};g.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),r=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&r===te&&e.raise("Negated character class may contain strings"),!0}return!1};g.regexp_classContents=function(e){return e.current()===93?me:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),me)};g.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var r=e.lastIntValue;e.switchU&&(t===-1||r===-1)&&e.raise("Invalid character class"),t!==-1&&r!==-1&&t>r&&e.raise("Range out of order in character class")}}};g.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var r=e.current();(r===99||wi(r))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var i=e.current();return i!==93?(e.lastIntValue=i,e.advance(),!0):!1};g.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};g.regexp_classSetExpression=function(e){var t=me,r;if(!this.regexp_eatClassSetRange(e))if(r=this.regexp_eatClassSetOperand(e)){r===te&&(t=te);for(var i=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(r=this.regexp_eatClassSetOperand(e))){r!==te&&(t=me);continue}e.raise("Invalid character in character class")}if(i!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(i!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(r=this.regexp_eatClassSetOperand(e),!r)return t;r===te&&(t=te)}};g.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var i=e.lastIntValue;return r!==-1&&i!==-1&&r>i&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1};g.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?me:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};g.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var r=e.eat(94),i=this.regexp_classContents(e);if(e.eat(93))return r&&i===te&&e.raise("Negated character class may contain strings"),i;e.pos=t}if(e.eat(92)){var s=this.regexp_eatCharacterClassEscape(e);if(s)return s;e.pos=t}return null};g.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var r=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return r}else e.raise("Invalid escape");e.pos=t}return null};g.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===te&&(t=te);return t};g.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?me:te};g.regexp_eatClassSetCharacter=function(e){var t=e.pos;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);var r=e.current();return r<0||r===e.lookahead()&&nn(r)||an(r)?!1:(e.advance(),e.lastIntValue=r,!0)};function nn(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function an(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}g.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return on(t)?(e.lastIntValue=t,e.advance(),!0):!1};function on(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}g.regexp_eatClassControlLetter=function(e){var t=e.current();return Tt(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};g.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1};g.regexp_eatDecimalDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;Tt(r=e.current());)e.lastIntValue=10*e.lastIntValue+(r-48),e.advance();return e.pos!==t};function Tt(e){return e>=48&&e<=57}g.regexp_eatHexDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;_i(r=e.current());)e.lastIntValue=16*e.lastIntValue+bi(r),e.advance();return e.pos!==t};function _i(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function bi(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}g.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var r=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+r*8+e.lastIntValue:e.lastIntValue=t*8+r}else e.lastIntValue=t;return!0}return!1};g.regexp_eatOctalDigit=function(e){var t=e.current();return wi(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function wi(e){return e>=48&&e<=55}g.regexp_eatFixedHexDigits=function(e,t){var r=e.pos;e.lastIntValue=0;for(var i=0;i<t;++i){var s=e.current();if(!_i(s))return e.pos=r,!1;e.lastIntValue=16*e.lastIntValue+bi(s),e.advance()}return!0};var cr=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new St(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},S=M.prototype;S.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new cr(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};S.getToken=function(){return this.next(),new cr(this)};typeof Symbol<"u"&&(S[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===o.eof,value:t}}}});S.nextToken=function(){var e=this.curContext();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(o.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};S.readToken=function(e){return de(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};S.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888};S.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(r===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations)for(var i=void 0,s=t;(i=Wr(this.input,s,this.pos))>-1;)++this.curLine,s=this.lineStart=i;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,r),t,this.pos,e,this.curPosition())};S.skipLineComment=function(e){for(var t=this.pos,r=this.options.onComment&&this.curPosition(),i=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!Ze(i);)i=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,r,this.curPosition())};S.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(e>8&&e<14||e>=5760&&Gr.test(String.fromCharCode(e)))++this.pos;else break e}}};S.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var r=this.type;this.type=e,this.value=t,this.updateContext(r)};S.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(o.ellipsis)):(++this.pos,this.finishToken(o.dot))};S.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(o.assign,2):this.finishOp(o.slash,1)};S.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),r=1,i=e===42?o.star:o.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++r,i=o.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(o.assign,r+1):this.finishOp(i,r)};S.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(o.assign,3)}return this.finishOp(e===124?o.logicalOR:o.logicalAND,2)}return t===61?this.finishOp(o.assign,2):this.finishOp(e===124?o.bitwiseOR:o.bitwiseAND,1)};S.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(o.assign,2):this.finishOp(o.bitwiseXOR,1)};S.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||re.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(o.incDec,2):t===61?this.finishOp(o.assign,2):this.finishOp(o.plusMin,1)};S.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),r=1;return t===e?(r=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+r)===61?this.finishOp(o.assign,r+1):this.finishOp(o.bitShift,r)):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&&(r=2),this.finishOp(o.relational,r))};S.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(o.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(o.arrow)):this.finishOp(e===61?o.eq:o.prefix,1)};S.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var r=this.input.charCodeAt(this.pos+2);if(r<48||r>57)return this.finishOp(o.questionDot,2)}if(t===63){if(e>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61)return this.finishOp(o.assign,3)}return this.finishOp(o.coalesce,2)}}return this.finishOp(o.question,1)};S.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),de(t,!0)||t===92))return this.finishToken(o.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+be(t)+"'")};S.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(o.parenL);case 41:return++this.pos,this.finishToken(o.parenR);case 59:return++this.pos,this.finishToken(o.semi);case 44:return++this.pos,this.finishToken(o.comma);case 91:return++this.pos,this.finishToken(o.bracketL);case 93:return++this.pos,this.finishToken(o.bracketR);case 123:return++this.pos,this.finishToken(o.braceL);case 125:return++this.pos,this.finishToken(o.braceR);case 58:return++this.pos,this.finishToken(o.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(o.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(o.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+be(e)+"'")};S.finishOp=function(e,t){var r=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,r)};S.readRegexp=function(){for(var e,t,r=this.pos;;){this.pos>=this.input.length&&this.raise(r,"Unterminated regular expression");var i=this.input.charAt(this.pos);if(re.test(i)&&this.raise(r,"Unterminated regular expression"),e)e=!1;else{if(i==="[")t=!0;else if(i==="]"&&t)t=!1;else if(i==="/"&&!t)break;e=i==="\\"}++this.pos}var s=this.input.slice(r,this.pos);++this.pos;var n=this.pos,a=this.readWord1();this.containsEsc&&this.unexpected(n);var u=this.regexpState||(this.regexpState=new fe(this));u.reset(r,s,a),this.validateRegExpFlags(u),this.validateRegExpPattern(u);var c=null;try{c=new RegExp(s,a)}catch{}return this.finishToken(o.regexp,{pattern:s,flags:a,value:c})};S.readInt=function(e,t,r){for(var i=this.options.ecmaVersion>=12&&t===void 0,s=r&&this.input.charCodeAt(this.pos)===48,n=this.pos,a=0,u=0,c=0,l=t??1/0;c<l;++c,++this.pos){var h=this.input.charCodeAt(this.pos),f=void 0;if(i&&h===95){s&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),u===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),c===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),u=h;continue}if(h>=97?f=h-97+10:h>=65?f=h-65+10:h>=48&&h<=57?f=h-48:f=1/0,f>=e)break;u=h,a=a*e+f}return i&&u===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===n||t!=null&&this.pos-n!==t?null:a};function un(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function ki(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}S.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var r=this.readInt(e);return r==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(r=ki(this.input.slice(t,this.pos)),++this.pos):de(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(o.num,r)};S.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var r=this.pos-t>=2&&this.input.charCodeAt(t)===48;r&&this.strict&&this.raise(t,"Invalid number");var i=this.input.charCodeAt(this.pos);if(!r&&!e&&this.options.ecmaVersion>=11&&i===110){var s=ki(this.input.slice(t,this.pos));return++this.pos,de(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(o.num,s)}r&&/[89]/.test(this.input.slice(t,this.pos))&&(r=!1),i===46&&!r&&(++this.pos,this.readInt(10),i=this.input.charCodeAt(this.pos)),(i===69||i===101)&&!r&&(i=this.input.charCodeAt(++this.pos),(i===43||i===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),de(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var n=un(this.input.slice(t,this.pos),r);return this.finishToken(o.num,n)};S.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var r=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(r,"Code point out of bounds")}else t=this.readHexChar(4);return t};S.readString=function(e){for(var t="",r=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var i=this.input.charCodeAt(this.pos);if(i===e)break;i===92?(t+=this.input.slice(r,this.pos),t+=this.readEscapedChar(!1),r=this.pos):i===8232||i===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Ze(i)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(r,this.pos++),this.finishToken(o.string,t)};var Ei={};S.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===Ei)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};S.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Ei;this.raise(e,t)};S.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var r=this.input.charCodeAt(this.pos);if(r===96||r===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===o.template||this.type===o.invalidTemplate)?r===36?(this.pos+=2,this.finishToken(o.dollarBraceL)):(++this.pos,this.finishToken(o.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(o.template,e));if(r===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Ze(r)){switch(e+=this.input.slice(t,this.pos),++this.pos,r){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
35
- `;break;default:e+=String.fromCharCode(r);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};S.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(o.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")};S.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
36
- `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return be(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var r=this.pos-1;this.invalidStringToken(r,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],s=parseInt(i,8);return s>255&&(i=i.slice(0,-1),s=parseInt(i,8)),this.pos+=i.length-1,t=this.input.charCodeAt(this.pos),(i!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-i.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(s)}return Ze(t)?"":String.fromCharCode(t)}};S.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);return r===null&&this.invalidStringToken(t,"Bad character escape sequence"),r};S.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,r=this.pos,i=this.options.ecmaVersion>=6;this.pos<this.input.length;){var s=this.fullCharCodeAtPos();if($e(s,i))this.pos+=s<=65535?1:2;else if(s===92){this.containsEsc=!0,e+=this.input.slice(r,this.pos);var n=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var a=this.readCodePoint();(t?de:$e)(a,i)||this.invalidStringToken(n,"Invalid Unicode escape"),e+=be(a),r=this.pos}else break;t=!1}return e+this.input.slice(r,this.pos)};S.readWord=function(){var e=this.readWord1(),t=o.name;return this.keywords.test(e)&&(t=rr[e]),this.finishToken(t,e)};var cn="8.11.3";M.acorn={Parser:M,version:cn,defaultOptions:er,Position:nt,SourceLocation:St,getLineInfo:Hr,Node:At,TokenType:T,tokTypes:o,keywordTypes:rr,TokContext:oe,tokContexts:V,isIdentifierChar:$e,isIdentifierStart:de,Token:cr,isNewLine:Ze,lineBreak:re,lineBreakG:Ls,nonASCIIwhitespace:Gr};import{builtinModules as xr,createRequire as uu}from"node:module";import mn,{realpathSync as gn,statSync as vr,promises as lu}from"node:fs";var ru=String.fromCharCode;var ln=/\/$|\/\?|\/#/,hn=/^\.?\//;function fn(e="",t){return t?ln.test(e):e.endsWith("/")}function pn(e="",t){if(!t)return e.endsWith("/")?e:e+"/";if(fn(e,!0))return e||"/";let r=e,i="",s=e.indexOf("#");if(s>=0&&(r=e.slice(0,s),i=e.slice(s),!r))return i;let[n,...a]=r.split("?");return n+"/"+(a.length>0?`?${a.join("?")}`:"")+i}function dn(e){return e&&e!=="/"}function Si(e,...t){let r=e||"";for(let i of t.filter(s=>dn(s)))if(r){let s=i.replace(hn,"");r=pn(r)+s}else r=i;return r}var iu=Symbol.for("ufo:protocolRelative");import{fileURLToPath as I,URL as D,pathToFileURL as Rt}from"node:url";import ke from"node:assert";import Te from"node:process";import yr,{dirname as xu}from"node:path";import xn from"node:v8";import{format as vn,inspect as dr}from"node:util";var Bi=new Set(xr);function mr(e){return e.replace(/\\/g,"/")}var yn={}.hasOwnProperty,_n=/^([A-Z][a-z\d]*)+$/,bn=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),z={};function lr(e,t="and"){return e.length<3?e.join(` ${t} `):`${e.slice(0,-1).join(", ")}, ${t} ${e[e.length-1]}`}var Fi=new Map,wn="__node_internal_",Ci;z.ERR_INVALID_ARG_TYPE=se("ERR_INVALID_ARG_TYPE",(e,t,r)=>{ke(typeof e=="string","'name' must be a string"),Array.isArray(t)||(t=[t]);let i="The ";if(e.endsWith(" argument"))i+=`${e} `;else{let u=e.includes(".")?"property":"argument";i+=`"${e}" ${u} `}i+="must be ";let s=[],n=[],a=[];for(let u of t)ke(typeof u=="string","All expected entries have to be of type string"),bn.has(u)?s.push(u.toLowerCase()):_n.exec(u)===null?(ke(u!=="object",'The value "object" should be written as "Object"'),a.push(u)):n.push(u);if(n.length>0){let u=s.indexOf("object");u!==-1&&(s.slice(u,1),n.push("Object"))}return s.length>0&&(i+=`${s.length>1?"one of type":"of type"} ${lr(s,"or")}`,(n.length>0||a.length>0)&&(i+=" or ")),n.length>0&&(i+=`an instance of ${lr(n,"or")}`,a.length>0&&(i+=" or ")),a.length>0&&(a.length>1?i+=`one of ${lr(a,"or")}`:(a[0].toLowerCase()!==a[0]&&(i+="an "),i+=`${a[0]}`)),i+=`. Received ${An(r)}`,i},TypeError);z.ERR_INVALID_MODULE_SPECIFIER=se("ERR_INVALID_MODULE_SPECIFIER",(e,t,r=void 0)=>`Invalid module "${e}" ${t}${r?` imported from ${r}`:""}`,TypeError);z.ERR_INVALID_PACKAGE_CONFIG=se("ERR_INVALID_PACKAGE_CONFIG",(e,t,r)=>`Invalid package config ${e}${t?` while importing ${t}`:""}${r?`. ${r}`:""}`,Error);z.ERR_INVALID_PACKAGE_TARGET=se("ERR_INVALID_PACKAGE_TARGET",(e,t,r,i=!1,s=void 0)=>{let n=typeof r=="string"&&!i&&r.length>0&&!r.startsWith("./");return t==="."?(ke(i===!1),`Invalid "exports" main target ${JSON.stringify(r)} defined in the package config ${e}package.json${s?` imported from ${s}`:""}${n?'; targets must start with "./"':""}`):`Invalid "${i?"imports":"exports"}" target ${JSON.stringify(r)} defined for '${t}' in the package config ${e}package.json${s?` imported from ${s}`:""}${n?'; targets must start with "./"':""}`},Error);z.ERR_MODULE_NOT_FOUND=se("ERR_MODULE_NOT_FOUND",(e,t,r=!1)=>`Cannot find ${r?"module":"package"} '${e}' imported from ${t}`,Error);z.ERR_NETWORK_IMPORT_DISALLOWED=se("ERR_NETWORK_IMPORT_DISALLOWED","import of '%s' by %s is not supported: %s",Error);z.ERR_PACKAGE_IMPORT_NOT_DEFINED=se("ERR_PACKAGE_IMPORT_NOT_DEFINED",(e,t,r)=>`Package import specifier "${e}" is not defined${t?` in package ${t}package.json`:""} imported from ${r}`,TypeError);z.ERR_PACKAGE_PATH_NOT_EXPORTED=se("ERR_PACKAGE_PATH_NOT_EXPORTED",(e,t,r=void 0)=>t==="."?`No "exports" main defined in ${e}package.json${r?` imported from ${r}`:""}`:`Package subpath '${t}' is not defined by "exports" in ${e}package.json${r?` imported from ${r}`:""}`,Error);z.ERR_UNSUPPORTED_DIR_IMPORT=se("ERR_UNSUPPORTED_DIR_IMPORT","Directory import '%s' is not supported resolving ES modules imported from %s",Error);z.ERR_UNSUPPORTED_RESOLVE_REQUEST=se("ERR_UNSUPPORTED_RESOLVE_REQUEST",'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',TypeError);z.ERR_UNKNOWN_FILE_EXTENSION=se("ERR_UNKNOWN_FILE_EXTENSION",(e,t)=>`Unknown file extension "${e}" for ${t}`,TypeError);z.ERR_INVALID_ARG_VALUE=se("ERR_INVALID_ARG_VALUE",(e,t,r="is invalid")=>{let i=dr(t);return i.length>128&&(i=`${i.slice(0,128)}...`),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${i}`},TypeError);function se(e,t,r){return Fi.set(e,t),kn(r,e)}function kn(e,t){return r;function r(...i){let s=Error.stackTraceLimit;gr()&&(Error.stackTraceLimit=0);let n=new e;gr()&&(Error.stackTraceLimit=s);let a=Cn(t,i,n);return Object.defineProperties(n,{message:{value:a,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),Sn(n),n.code=t,n}}function gr(){try{if(xn.startupSnapshot.isBuildingSnapshot())return!1}catch{}let e=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");return e===void 0?Object.isExtensible(Error):yn.call(e,"writable")&&e.writable!==void 0?e.writable:e.set!==void 0}function En(e){let t=wn+e.name;return Object.defineProperty(e,"name",{value:t}),e}var Sn=En(function(e){let t=gr();return t&&(Ci=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY),Error.captureStackTrace(e),t&&(Error.stackTraceLimit=Ci),e});function Cn(e,t,r){let i=Fi.get(e);if(ke(i!==void 0,"expected `message` to be found"),typeof i=="function")return ke(i.length<=t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${i.length}).`),Reflect.apply(i,r,t);let s=/%[dfijoOs]/g,n=0;for(;s.exec(i)!==null;)n++;return ke(n===t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${n}).`),t.length===0?i:(t.unshift(i),Reflect.apply(vn,null,t))}function An(e){if(e==null)return String(e);if(typeof e=="function"&&e.name)return`function ${e.name}`;if(typeof e=="object")return e.constructor&&e.constructor.name?`an instance of ${e.constructor.name}`:`${dr(e,{depth:-1})}`;let t=dr(e,{colors:!1});return t.length>28&&(t=`${t.slice(0,25)}...`),`type ${typeof e} (${t})`}var lt={}.hasOwnProperty,{ERR_INVALID_PACKAGE_CONFIG:Tn}=z,Ai=new Map;function Ui(e,{base:t,specifier:r}){let i=Ai.get(e);if(i)return i;let s;try{s=mn.readFileSync(yr.toNamespacedPath(e),"utf8")}catch(a){let u=a;if(u.code!=="ENOENT")throw u}let n={exists:!1,pjsonPath:e,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};if(s!==void 0){let a;try{a=JSON.parse(s)}catch(u){let c=u,l=new Tn(e,(t?`"${r}" from `:"")+I(t||r),c.message);throw l.cause=c,l}n.exists=!0,lt.call(a,"name")&&typeof a.name=="string"&&(n.name=a.name),lt.call(a,"main")&&typeof a.main=="string"&&(n.main=a.main),lt.call(a,"exports")&&(n.exports=a.exports),lt.call(a,"imports")&&(n.imports=a.imports),lt.call(a,"type")&&(a.type==="commonjs"||a.type==="module")&&(n.type=a.type)}return Ai.set(e,n),n}function _r(e){let t=new URL("package.json",e);for(;!t.pathname.endsWith("node_modules/package.json");){let s=Ui(I(t),{specifier:e});if(s.exists)return s;let n=t;if(t=new URL("../package.json",t),t.pathname===n.pathname)break}return{pjsonPath:I(t),exists:!1,type:"none"}}function Ti(e){return _r(e).type}var{ERR_UNKNOWN_FILE_EXTENSION:In}=z,Pn={}.hasOwnProperty,Nn={__proto__:null,".cjs":"commonjs",".js":"module",".json":"json",".mjs":"module"};function Rn(e){return e&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(e)?"module":e==="application/json"?"json":null}var Ii={__proto__:null,"data:":On,"file:":Vn,"http:":Pi,"https:":Pi,"node:"(){return"builtin"}};function On(e){let{1:t}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(e.pathname)||[null,null,null];return Rn(t)}function Ln(e){let t=e.pathname,r=t.length;for(;r--;){let i=t.codePointAt(r);if(i===47)return"";if(i===46)return t.codePointAt(r-1)===47?"":t.slice(r)}return""}function Vn(e,t,r){let i=Ln(e);if(i===".js"){let a=Ti(e);return a!=="none"?a:"commonjs"}if(i===""){let a=Ti(e);return a==="none"||a==="commonjs"?"commonjs":"module"}let s=Nn[i];if(s)return s;if(r)return;let n=I(e);throw new In(i,n)}function Pi(){}function Dn(e,t){let r=e.protocol;return Pn.call(Ii,r)&&Ii[r](e,t,!0)||null}var It=RegExp.prototype[Symbol.replace],{ERR_NETWORK_IMPORT_DISALLOWED:_u,ERR_INVALID_MODULE_SPECIFIER:Ot,ERR_INVALID_PACKAGE_CONFIG:$i,ERR_INVALID_PACKAGE_TARGET:jn,ERR_MODULE_NOT_FOUND:br,ERR_PACKAGE_IMPORT_NOT_DEFINED:Mn,ERR_PACKAGE_PATH_NOT_EXPORTED:Bn,ERR_UNSUPPORTED_DIR_IMPORT:Fn,ERR_UNSUPPORTED_RESOLVE_REQUEST:Ni}=z,Zi={}.hasOwnProperty,Ri=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i,Oi=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,Un=/^\.|%|\\/,Pt=/\*/g,$n=/%2f|%5c/i,Li=new Set,Zn=/[/\\]{2}/;function Vi(e,t,r,i,s,n,a){if(Te.noDeprecation)return;let u=I(i),c=Zn.exec(a?e:t)!==null;Te.emitWarning(`Use of deprecated ${c?"double slash":"leading or trailing slash matching"} resolving "${e}" for module request "${t}" ${t===r?"":`matched to "${r}" `}in the "${s?"imports":"exports"}" field module resolution of the package at ${u}${n?` imported from ${I(n)}`:""}.`,"DeprecationWarning","DEP0166")}function Di(e,t,r,i){if(Te.noDeprecation||Dn(e,{parentURL:r.href})!=="module")return;let n=I(e.href),a=I(new D(".",t)),u=I(r);i?yr.resolve(a,i)!==n&&Te.emitWarning(`Package ${a} has a "main" field set to "${i}", excluding the full filename and extension to the resolved file at "${n.slice(a.length)}", imported from ${u}.
37
- Automatic extension resolution of the "main" field is deprecated for ES modules.`,"DeprecationWarning","DEP0151"):Te.emitWarning(`No "main" or "exports" field defined in the package.json for ${a} resolving the main entry point "${n.slice(a.length)}", imported from ${u}.
38
- Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function zi(e){try{return vr(e)}catch{}}function hr(e){let t=vr(e,{throwIfNoEntry:!1}),r=t?t.isFile():void 0;return r??!1}function zn(e,t,r){let i;if(t.main!==void 0){if(i=new D(t.main,e),hr(i))return i;let a=[`./${t.main}.js`,`./${t.main}.json`,`./${t.main}.node`,`./${t.main}/index.js`,`./${t.main}/index.json`,`./${t.main}/index.node`],u=-1;for(;++u<a.length&&(i=new D(a[u],e),!hr(i));)i=void 0;if(i)return Di(i,e,r,t.main),i}let s=["./index.js","./index.json","./index.node"],n=-1;for(;++n<s.length&&(i=new D(s[n],e),!hr(i));)i=void 0;if(i)return Di(i,e,r,t.main),i;throw new br(I(new D(".",e)),I(r))}function Wn(e,t,r){if($n.exec(e.pathname)!==null)throw new Ot(e.pathname,'must not include encoded "/" or "\\" characters',I(t));let i;try{i=I(e)}catch(n){let a=n;throw Object.defineProperty(a,"input",{value:String(e)}),Object.defineProperty(a,"module",{value:String(t)}),a}let s=zi(i.endsWith("/")?i.slice(-1):i);if(s&&s.isDirectory()){let n=new Fn(i,I(t));throw n.url=String(e),n}if(!s||!s.isFile()){let n=new br(i||e.pathname,t&&I(t),!0);throw n.url=String(e),n}if(!r){let n=gn(i),{search:a,hash:u}=e;e=Rt(n+(i.endsWith(yr.sep)?"/":"")),e.search=a,e.hash=u}return e}function Gn(e,t,r){return new Mn(e,t&&I(new D(".",t)),I(r))}function fr(e,t,r){return new Bn(I(new D(".",t)),e,r&&I(r))}function qn(e,t,r,i,s){let n=`request is not a valid match in pattern "${t}" for the "${i?"imports":"exports"}" resolution of ${I(r)}`;throw new Ot(e,n,s&&I(s))}function ht(e,t,r,i,s){return t=typeof t=="object"&&t!==null?JSON.stringify(t,null,""):`${t}`,new jn(I(new D(".",r)),e,t,i,s&&I(s))}function Hn(e,t,r,i,s,n,a,u,c){if(t!==""&&!n&&e[e.length-1]!=="/")throw ht(r,e,i,a,s);if(!e.startsWith("./")){if(a&&!e.startsWith("../")&&!e.startsWith("/")){let N=!1;try{new D(e),N=!0}catch{}if(!N){let O=n?It.call(Pt,e,()=>t):e+t;return Gi(O,i,c)}}throw ht(r,e,i,a,s)}if(Ri.exec(e.slice(2))!==null)if(Oi.exec(e.slice(2))===null){if(!u){let N=n?r.replace("*",()=>t):r+t,O=n?It.call(Pt,e,()=>t):e;Vi(O,N,r,i,a,s,!0)}}else throw ht(r,e,i,a,s);let l=new D(e,i),h=l.pathname,f=new D(".",i).pathname;if(!h.startsWith(f))throw ht(r,e,i,a,s);if(t==="")return l;if(Ri.exec(t)!==null){let N=n?r.replace("*",()=>t):r+t;if(Oi.exec(t)===null){if(!u){let O=n?It.call(Pt,e,()=>t):e;Vi(O,N,r,i,a,s,!1)}}else qn(N,r,i,a,s)}return n?new D(It.call(Pt,l.href,()=>t)):new D(t,l)}function Kn(e){let t=Number(e);return`${t}`!==e?!1:t>=0&&t<4294967295}function Ge(e,t,r,i,s,n,a,u,c){if(typeof t=="string")return Hn(t,r,i,e,s,n,a,u,c);if(Array.isArray(t)){let l=t;if(l.length===0)return null;let h,f=-1;for(;++f<l.length;){let N=l[f],O;try{O=Ge(e,N,r,i,s,n,a,u,c)}catch(B){let H=B;if(h=H,H.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw B}if(O!==void 0){if(O===null){h=null;continue}return O}}if(h==null)return null;throw h}if(typeof t=="object"&&t!==null){let l=Object.getOwnPropertyNames(t),h=-1;for(;++h<l.length;){let f=l[h];if(Kn(f))throw new $i(I(e),s,'"exports" cannot contain numeric property keys.')}for(h=-1;++h<l.length;){let f=l[h];if(f==="default"||c&&c.has(f)){let N=t[f],O=Ge(e,N,r,i,s,n,a,u,c);if(O===void 0)continue;return O}}return null}if(t===null)return null;throw ht(i,t,e,a,s)}function Yn(e,t,r){if(typeof e=="string"||Array.isArray(e))return!0;if(typeof e!="object"||e===null)return!1;let i=Object.getOwnPropertyNames(e),s=!1,n=0,a=-1;for(;++a<i.length;){let u=i[a],c=u===""||u[0]!==".";if(n++===0)s=c;else if(s!==c)throw new $i(I(t),r,`"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return s}function Qn(e,t,r){if(Te.noDeprecation)return;let i=I(t);Li.has(i+"|"+e)||(Li.add(i+"|"+e),Te.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${i}${r?` imported from ${I(r)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155"))}function ji(e,t,r,i,s){let n=r.exports;if(Yn(n,e,i)&&(n={".":n}),Zi.call(n,t)&&!t.includes("*")&&!t.endsWith("/")){let h=n[t],f=Ge(e,h,"",t,i,!1,!1,!1,s);if(f==null)throw fr(t,e,i);return f}let a="",u="",c=Object.getOwnPropertyNames(n),l=-1;for(;++l<c.length;){let h=c[l],f=h.indexOf("*");if(f!==-1&&t.startsWith(h.slice(0,f))){t.endsWith("/")&&Qn(t,e,i);let N=h.slice(f+1);t.length>=h.length&&t.endsWith(N)&&Wi(a,h)===1&&h.lastIndexOf("*")===f&&(a=h,u=t.slice(f,t.length-N.length))}}if(a){let h=n[a],f=Ge(e,h,u,a,i,!0,!1,t.endsWith("/"),s);if(f==null)throw fr(t,e,i);return f}throw fr(t,e,i)}function Wi(e,t){let r=e.indexOf("*"),i=t.indexOf("*"),s=r===-1?e.length:r+1,n=i===-1?t.length:i+1;return s>n?-1:n>s||r===-1?1:i===-1||e.length>t.length?-1:t.length>e.length?1:0}function Xn(e,t,r){if(e==="#"||e.startsWith("#/")||e.endsWith("/")){let n="is not a valid internal imports specifier name";throw new Ot(e,n,I(t))}let i,s=_r(t);if(s.exists){i=Rt(s.pjsonPath);let n=s.imports;if(n)if(Zi.call(n,e)&&!e.includes("*")){let a=Ge(i,n[e],"",e,t,!1,!0,!1,r);if(a!=null)return a}else{let a="",u="",c=Object.getOwnPropertyNames(n),l=-1;for(;++l<c.length;){let h=c[l],f=h.indexOf("*");if(f!==-1&&e.startsWith(h.slice(0,-1))){let N=h.slice(f+1);e.length>=h.length&&e.endsWith(N)&&Wi(a,h)===1&&h.lastIndexOf("*")===f&&(a=h,u=e.slice(f,e.length-N.length))}}if(a){let h=n[a],f=Ge(i,h,u,a,t,!0,!0,!1,r);if(f!=null)return f}}}throw Gn(e,i,t)}function Jn(e,t){let r=e.indexOf("/"),i=!0,s=!1;e[0]==="@"&&(s=!0,r===-1||e.length===0?i=!1:r=e.indexOf("/",r+1));let n=r===-1?e:e.slice(0,r);if(Un.exec(n)!==null&&(i=!1),!i)throw new Ot(e,"is not a valid package name",I(t));let a="."+(r===-1?"":e.slice(r));return{packageName:n,packageSubpath:a,isScoped:s}}function Gi(e,t,r){if(xr.includes(e))return new D("node:"+e);let{packageName:i,packageSubpath:s,isScoped:n}=Jn(e,t),a=_r(t);if(a.exists){let h=Rt(a.pjsonPath);if(a.name===i&&a.exports!==void 0&&a.exports!==null)return ji(h,s,a,t,r)}let u=new D("./node_modules/"+i+"/package.json",t),c=I(u),l;do{let h=zi(c.slice(0,-13));if(!h||!h.isDirectory()){l=c,u=new D((n?"../../../../node_modules/":"../../../node_modules/")+i+"/package.json",u),c=I(u);continue}let f=Ui(c,{base:t,specifier:e});return f.exports!==void 0&&f.exports!==null?ji(u,s,f,t,r):s==="."?zn(u,f,t):new D(s,u)}while(c.length!==l.length);throw new br(i,I(t),!1)}function ea(e){return e[0]==="."&&(e.length===1||e[1]==="/"||e[1]==="."&&(e.length===2||e[2]==="/"))}function ta(e){return e===""?!1:e[0]==="/"?!0:ea(e)}function ra(e,t,r,i){let s=t.protocol,a=s==="data:"||s==="http:"||s==="https:",u;if(ta(e))try{u=new D(e,t)}catch(c){let l=new Ni(e,t);throw l.cause=c,l}else if(s==="file:"&&e[0]==="#")u=Xn(e,t,r);else try{u=new D(e)}catch(c){if(a&&!xr.includes(e)){let l=new Ni(e,t);throw l.cause=c,l}u=Gi(e,t,r)}return ke(u!==void 0,"expected to be defined"),u.protocol!=="file:"?u:Wn(u,t,i)}function Nt(e){return typeof e=="string"&&!e.startsWith("file://")?mr(e):mr(I(e))}function pr(e){return Rt(Nt(e)).toString()}function ia(e){return typeof e!="string"&&(e=e.toString()),/(node|data|http|https|file):/.test(e)?e:Bi.has(e)?"node:"+e:"file://"+encodeURI(mr(e))}var sa=new Set(["node","import"]),na=[".mjs",".cjs",".js",".json"],aa=new Set(["ERR_MODULE_NOT_FOUND","ERR_UNSUPPORTED_DIR_IMPORT","MODULE_NOT_FOUND","ERR_PACKAGE_PATH_NOT_EXPORTED"]);function Mi(e,t,r){try{return ra(e,t,r)}catch(i){if(!aa.has(i?.code))throw i}}function oa(e,t={}){if(typeof e!="string")if(e instanceof URL)e=Nt(e);else throw new TypeError("input must be a `string` or `URL`");if(/(node|data|http|https):/.test(e))return e;if(Bi.has(e))return"node:"+e;if(e.startsWith("file://")&&(e=Nt(e)),Q(e))try{if(vr(e).isFile())return pr(e)}catch(a){if(a?.code!=="ENOENT")throw a}let r=t.conditions?new Set(t.conditions):sa,i=(Array.isArray(t.url)?t.url:[t.url]).filter(Boolean).map(a=>new URL(ia(a.toString())));i.length===0&&i.push(new URL(pr(process.cwd())));let s=[...i];for(let a of i)a.protocol==="file:"&&s.push(new URL("./",a),new URL(Si(a.pathname,"_index.js"),a),new URL("node_modules",a));let n;for(let a of s){if(n=Mi(e,a,r),n)break;for(let u of["","/index"]){for(let c of t.extensions||na)if(n=Mi(e+u+c,a,r),n)break;if(n)break}if(n)break}if(!n){let a=new Error(`Cannot find module ${e} imported from ${s.join(", ")}`);throw a.code="ERR_MODULE_NOT_FOUND",a}return pr(n)}function ua(e,t){return oa(e,t)}function ca(e,t){return Nt(ua(e,t))}function Lt(e,t){try{return Promise.resolve(ca(e,t))}catch(r){return Promise.reject(r)}}var la=Symbol.for("__confbox_fmt__"),ha=/^(\s+)/,fa=/(\s+)$/;function pa(e,t={}){let r=t.indent===void 0&&t.preserveIndentation!==!1&&e.slice(0,t?.sampleSize||1024),i=t.preserveWhitespace===!1?void 0:{start:ha.exec(e)?.[0]||"",end:fa.exec(e)?.[0]||""};return{sample:r,whiteSpace:i}}function wr(e,t,r){!t||typeof t!="object"||Object.defineProperty(t,la,{enumerable:!1,configurable:!0,writable:!0,value:pa(e,r)})}function da(e,t=!1){let r=e.length,i=0,s="",n=0,a=16,u=0,c=0,l=0,h=0,f=0;function N(_,L){let C=0,F=0;for(;C<_||!L;){let $=e.charCodeAt(i);if($>=48&&$<=57)F=F*16+$-48;else if($>=65&&$<=70)F=F*16+$-65+10;else if($>=97&&$<=102)F=F*16+$-97+10;else break;i++,C++}return C<_&&(F=-1),F}function O(_){i=_,s="",n=0,a=16,f=0}function B(){let _=i;if(e.charCodeAt(i)===48)i++;else for(i++;i<e.length&&qe(e.charCodeAt(i));)i++;if(i<e.length&&e.charCodeAt(i)===46)if(i++,i<e.length&&qe(e.charCodeAt(i)))for(i++;i<e.length&&qe(e.charCodeAt(i));)i++;else return f=3,e.substring(_,i);let L=i;if(i<e.length&&(e.charCodeAt(i)===69||e.charCodeAt(i)===101))if(i++,(i<e.length&&e.charCodeAt(i)===43||e.charCodeAt(i)===45)&&i++,i<e.length&&qe(e.charCodeAt(i))){for(i++;i<e.length&&qe(e.charCodeAt(i));)i++;L=i}else f=3;return e.substring(_,L)}function H(){let _="",L=i;for(;;){if(i>=r){_+=e.substring(L,i),f=2;break}let C=e.charCodeAt(i);if(C===34){_+=e.substring(L,i),i++;break}if(C===92){if(_+=e.substring(L,i),i++,i>=r){f=2;break}switch(e.charCodeAt(i++)){case 34:_+='"';break;case 92:_+="\\";break;case 47:_+="/";break;case 98:_+="\b";break;case 102:_+="\f";break;case 110:_+=`
39
- `;break;case 114:_+="\r";break;case 116:_+=" ";break;case 117:let F=N(4,!0);F>=0?_+=String.fromCharCode(F):f=4;break;default:f=5}L=i;continue}if(C>=0&&C<=31)if(ft(C)){_+=e.substring(L,i),f=2;break}else f=6;i++}return _}function ae(){if(s="",f=0,n=i,c=u,h=l,i>=r)return n=r,a=17;let _=e.charCodeAt(i);if(kr(_)){do i++,s+=String.fromCharCode(_),_=e.charCodeAt(i);while(kr(_));return a=15}if(ft(_))return i++,s+=String.fromCharCode(_),_===13&&e.charCodeAt(i)===10&&(i++,s+=`
40
- `),u++,l=i,a=14;switch(_){case 123:return i++,a=1;case 125:return i++,a=2;case 91:return i++,a=3;case 93:return i++,a=4;case 58:return i++,a=6;case 44:return i++,a=5;case 34:return i++,s=H(),a=10;case 47:let L=i-1;if(e.charCodeAt(i+1)===47){for(i+=2;i<r&&!ft(e.charCodeAt(i));)i++;return s=e.substring(L,i),a=12}if(e.charCodeAt(i+1)===42){i+=2;let C=r-1,F=!1;for(;i<C;){let $=e.charCodeAt(i);if($===42&&e.charCodeAt(i+1)===47){i+=2,F=!0;break}i++,ft($)&&($===13&&e.charCodeAt(i)===10&&i++,u++,l=i)}return F||(i++,f=1),s=e.substring(L,i),a=13}return s+=String.fromCharCode(_),i++,a=16;case 45:if(s+=String.fromCharCode(_),i++,i===r||!qe(e.charCodeAt(i)))return a=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return s+=B(),a=11;default:for(;i<r&&le(_);)i++,_=e.charCodeAt(i);if(n!==i){switch(s=e.substring(n,i),s){case"true":return a=8;case"false":return a=9;case"null":return a=7}return a=16}return s+=String.fromCharCode(_),i++,a=16}}function le(_){if(kr(_)||ft(_))return!1;switch(_){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function gt(){let _;do _=ae();while(_>=12&&_<=15);return _}return{setPosition:O,getPosition:()=>i,scan:t?gt:ae,getToken:()=>a,getTokenValue:()=>s,getTokenOffset:()=>n,getTokenLength:()=>i-n,getTokenStartLine:()=>c,getTokenStartCharacter:()=>n-h,getTokenError:()=>f}}function kr(e){return e===32||e===9}function ft(e){return e===10||e===13}function qe(e){return e>=48&&e<=57}var qi;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(qi||(qi={})),new Array(20).fill(0).map((e,t)=>" ".repeat(t));var He=200;new Array(He).fill(0).map((e,t)=>`
41
- `+" ".repeat(t)),new Array(He).fill(0).map((e,t)=>"\r"+" ".repeat(t)),new Array(He).fill(0).map((e,t)=>`\r
42
- `+" ".repeat(t)),new Array(He).fill(0).map((e,t)=>`
43
- `+" ".repeat(t)),new Array(He).fill(0).map((e,t)=>"\r"+" ".repeat(t)),new Array(He).fill(0).map((e,t)=>`\r
44
- `+" ".repeat(t));var Vt;(function(e){e.DEFAULT={allowTrailingComma:!1}})(Vt||(Vt={}));function ma(e,t=[],r=Vt.DEFAULT){let i=null,s=[],n=[];function a(u){Array.isArray(s)?s.push(u):i!==null&&(s[i]=u)}return ga(e,{onObjectBegin:()=>{let u={};a(u),n.push(s),s=u,i=null},onObjectProperty:u=>{i=u},onObjectEnd:()=>{s=n.pop()},onArrayBegin:()=>{let u=[];a(u),n.push(s),s=u,i=null},onArrayEnd:()=>{s=n.pop()},onLiteralValue:a,onError:(u,c,l)=>{t.push({error:u,offset:c,length:l})}},r),s[0]}function ga(e,t,r=Vt.DEFAULT){let i=da(e,!1),s=[];function n(R){return R?()=>R(i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter()):()=>!0}function a(R){return R?()=>R(i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter(),()=>s.slice()):()=>!0}function u(R){return R?j=>R(j,i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter()):()=>!0}function c(R){return R?j=>R(j,i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter(),()=>s.slice()):()=>!0}let l=a(t.onObjectBegin),h=c(t.onObjectProperty),f=n(t.onObjectEnd),N=a(t.onArrayBegin),O=n(t.onArrayEnd),B=c(t.onLiteralValue),H=u(t.onSeparator),ae=n(t.onComment),le=u(t.onError),gt=r&&r.disallowComments,_=r&&r.allowTrailingComma;function L(){for(;;){let R=i.scan();switch(i.getTokenError()){case 4:C(14);break;case 5:C(15);break;case 3:C(13);break;case 1:gt||C(11);break;case 2:C(12);break;case 6:C(16);break}switch(R){case 12:case 13:gt?C(10):ae();break;case 16:C(1);break;case 15:case 14:break;default:return R}}}function C(R,j=[],Rr=[]){if(le(R),j.length+Rr.length>0){let xt=i.getToken();for(;xt!==17;){if(j.indexOf(xt)!==-1){L();break}else if(Rr.indexOf(xt)!==-1)break;xt=L()}}}function F(R){let j=i.getTokenValue();return R?B(j):(h(j),s.push(j)),L(),!0}function $(){switch(i.getToken()){case 11:let R=i.getTokenValue(),j=Number(R);isNaN(j)&&(C(2),j=0),B(j);break;case 7:B(null);break;case 8:B(!0);break;case 9:B(!1);break;default:return!1}return L(),!0}function ls(){return i.getToken()!==10?(C(3,[],[2,5]),!1):(F(!1),i.getToken()===6?(H(":"),L(),zt()||C(4,[],[2,5])):C(5,[],[2,5]),s.pop(),!0)}function hs(){l(),L();let R=!1;for(;i.getToken()!==2&&i.getToken()!==17;){if(i.getToken()===5){if(R||C(4,[],[]),H(","),L(),i.getToken()===2&&_)break}else R&&C(6,[],[]);ls()||C(4,[],[2,5]),R=!0}return f(),i.getToken()!==2?C(7,[2],[]):L(),!0}function fs(){N(),L();let R=!0,j=!1;for(;i.getToken()!==4&&i.getToken()!==17;){if(i.getToken()===5){if(j||C(4,[],[]),H(","),L(),i.getToken()===4&&_)break}else j&&C(6,[],[]);R?(s.push(0),R=!1):s[s.length-1]++,zt()||C(4,[],[4,5]),j=!0}return O(),R||s.pop(),i.getToken()!==4?C(8,[4],[]):L(),!0}function zt(){switch(i.getToken()){case 3:return fs();case 1:return hs();case 10:return F(!0);default:return $()}}return L(),i.getToken()===17?r.allowEmptyContent?!0:(C(4,[],[]),!1):zt()?(i.getToken()!==17&&C(9,[],[]),!0):(C(4,[],[]),!1)}var Hi;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(Hi||(Hi={}));var Ki;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(Ki||(Ki={}));var xa=ma,Yi;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(Yi||(Yi={}));function Er(e,t){let r=JSON.parse(e,t?.reviver);return wr(e,r,t),r}function Sr(e,t){let r=xa(e,t?.errors,t);return wr(e,r,t),r}var wa={startingFrom:".",rootPattern:/^node_modules$/,reverse:!1,test:e=>{try{if(_a(e).isFile())return!0}catch{}}};async function Qi(e,t={}){let r=Array.isArray(e)?e:[e],i={...wa,...t},s=yt(i.startingFrom),n=s[0]==="/",a=s.split("/").filter(Boolean);n&&(a[0]="/"+a[0]);let u=a.findIndex(c=>c.match(i.rootPattern));if(u===-1&&(u=0),i.reverse)for(let c=u+1;c<=a.length;c++)for(let l of r){let h=vt(...a.slice(0,c),l);if(await i.test(h))return h}else for(let c=a.length;c>u;c--)for(let l of r){let h=vt(...a.slice(0,c),l);if(await i.test(h))return h}throw new Error(`Cannot find matching ${e} in ${i.startingFrom} or parent directories`)}function Cr(e,t={}){return Qi(e,t)}var ka=new Map;async function Ru(e,t={}){let r=await Ea(e,t),i=t.cache&&typeof t.cache!="boolean"?t.cache:ka;if(t.cache&&i.has(r))return i.get(r);let s=await ba.readFile(r,"utf8"),n;try{n=Er(s)}catch{n=Sr(s)}return i.set(r,n),n}async function Ea(e=process.cwd(),t={}){let r=Q(e)?e:await Lt(e,t);return Cr("package.json",{startingFrom:r,...t})}var Sa=["yarn.lock","package-lock.json","pnpm-lock.yaml","npm-shrinkwrap.json","bun.lockb"];async function Ca(e=process.cwd(),t={}){let i={startingFrom:Q(e)?e:await Lt(e,t),...t};try{return await Cr(Sa,i)}catch{}throw new Error("No lockfile found from "+e)}async function Xi(e=process.cwd(),t={}){let r=Q(e)?e:await Lt(e,t),i={startingFrom:r,...t};try{let s=await Cr(".git/config",i);return yt(s,"../..")}catch{}try{let s=await Ca(r,{...i,reverse:!0});return _t(s)}catch{}try{let s=await Qi(r,i);return _t(s)}catch{}throw new Error("Cannot detect workspace root from "+e)}import{existsSync as Aa,rmSync as Ji,writeFileSync as Ta}from"node:fs";import{resolve as es}from"node:path";async function Ia(e,t){let r=es(process.cwd(),`${t}.mjs`);try{Ta(r,e);let i=await import(`file:///${r}`);return Ji(r,{force:!0}),i}catch(i){try{Ji(r,{force:!0})}catch{}it.error("something went wrong when creating temp module for app manifest import"),it.error(i),process.exit(1)}}async function Mu(e){let t=[],r=[],i=await Xi();for(let s of e){let n=`manifest${e.indexOf(s)}`,a=`pkgjson${e.indexOf(s)}`,u=`export${e.indexOf(s)}`;t.push(`import ${n} from '${s}/manifest';`),t.push(`delete ${n}['$schema'];`);let c=es(i,`node_modules/${s}/package.json`),l=Aa(c)?c:`./node_modules/${s}/package.json`;t.push(`import ${a} from '${l}' assert { type: "json" };`),t.push(`const ${u} = { ...${n}, version: ${a}.version };`),r.push(u)}return t.push(`export default [${r.join(", ")}];`),Ia(t.join(`
45
- `),"app-manifests").then(s=>s.default)}var P;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{let n={};for(let a of s)n[a]=a;return n},e.getValidEnumValues=s=>{let n=e.objectKeys(s).filter(u=>typeof s[s[u]]!="number"),a={};for(let u of n)a[u]=s[u];return e.objectValues(a)},e.objectValues=s=>e.objectKeys(s).map(function(n){return s[n]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let n=[];for(let a in s)Object.prototype.hasOwnProperty.call(s,a)&&n.push(a);return n},e.find=(s,n)=>{for(let a of s)if(n(a))return a},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function i(s,n=" | "){return s.map(a=>typeof a=="string"?`'${a}'`:a).join(n)}e.joinValues=i,e.jsonStringifyReplacer=(s,n)=>typeof n=="bigint"?n.toString():n})(P||(P={}));var Tr;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Tr||(Tr={}));var d=P.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ee=e=>{switch(typeof e){case"undefined":return d.undefined;case"string":return d.string;case"number":return isNaN(e)?d.nan:d.number;case"boolean":return d.boolean;case"function":return d.function;case"bigint":return d.bigint;case"symbol":return d.symbol;case"object":return Array.isArray(e)?d.array:e===null?d.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?d.promise:typeof Map<"u"&&e instanceof Map?d.map:typeof Set<"u"&&e instanceof Set?d.set:typeof Date<"u"&&e instanceof Date?d.date:d.object;default:return d.unknown}},p=P.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Pa=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),K=class extends Error{constructor(t){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){let r=t||function(n){return n.message},i={_errors:[]},s=n=>{for(let a of n.issues)if(a.code==="invalid_union")a.unionErrors.map(s);else if(a.code==="invalid_return_type")s(a.returnTypeError);else if(a.code==="invalid_arguments")s(a.argumentsError);else if(a.path.length===0)i._errors.push(r(a));else{let u=i,c=0;for(;c<a.path.length;){let l=a.path[c];c===a.path.length-1?(u[l]=u[l]||{_errors:[]},u[l]._errors.push(r(a))):u[l]=u[l]||{_errors:[]},u=u[l],c++}}};return s(this),i}toString(){return this.message}get message(){return JSON.stringify(this.issues,P.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},i=[];for(let s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(t(s))):i.push(t(s));return{formErrors:i,fieldErrors:r}}get formErrors(){return this.flatten()}};K.create=e=>new K(e);var pt=(e,t)=>{let r;switch(e.code){case p.invalid_type:e.received===d.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case p.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,P.jsonStringifyReplacer)}`;break;case p.unrecognized_keys:r=`Unrecognized key(s) in object: ${P.joinValues(e.keys,", ")}`;break;case p.invalid_union:r="Invalid input";break;case p.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${P.joinValues(e.options)}`;break;case p.invalid_enum_value:r=`Invalid enum value. Expected ${P.joinValues(e.options)}, received '${e.received}'`;break;case p.invalid_arguments:r="Invalid function arguments";break;case p.invalid_return_type:r="Invalid function return type";break;case p.invalid_date:r="Invalid date";break;case p.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:P.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case p.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case p.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case p.custom:r="Invalid input";break;case p.invalid_intersection_types:r="Intersection results could not be merged";break;case p.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case p.not_finite:r="Number must be finite";break;default:r=t.defaultError,P.assertNever(e)}return{message:r}},is=pt;function Na(e){is=e}function jt(){return is}var Mt=e=>{let{data:t,path:r,errorMaps:i,issueData:s}=e,n=[...r,...s.path||[]],a={...s,path:n},u="",c=i.filter(l=>!!l).slice().reverse();for(let l of c)u=l(a,{data:t,defaultError:u}).message;return{...s,path:n,message:s.message||u}},Ra=[];function m(e,t){let r=Mt({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,jt(),pt].filter(i=>!!i)});e.common.issues.push(r)}var U=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let i=[];for(let s of r){if(s.status==="aborted")return w;s.status==="dirty"&&t.dirty(),i.push(s.value)}return{status:t.value,value:i}}static async mergeObjectAsync(t,r){let i=[];for(let s of r)i.push({key:await s.key,value:await s.value});return e.mergeObjectSync(t,i)}static mergeObjectSync(t,r){let i={};for(let s of r){let{key:n,value:a}=s;if(n.status==="aborted"||a.status==="aborted")return w;n.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),n.value!=="__proto__"&&(typeof a.value<"u"||s.alwaysSet)&&(i[n.value]=a.value)}return{status:t.value,value:i}}},w=Object.freeze({status:"aborted"}),ss=e=>({status:"dirty",value:e}),W=e=>({status:"valid",value:e}),Ir=e=>e.status==="aborted",Pr=e=>e.status==="dirty",dt=e=>e.status==="valid",Bt=e=>typeof Promise<"u"&&e instanceof Promise,v;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(v||(v={}));var ne=class{constructor(t,r,i,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=i,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},ts=(e,t)=>{if(dt(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new K(e.common.issues);return this._error=r,this._error}}};function k(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:i,description:s}=e;if(t&&(r||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(a,u)=>a.code!=="invalid_type"?{message:u.defaultError}:typeof u.data>"u"?{message:i??u.defaultError}:{message:r??u.defaultError},description:s}}var E=class{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Ee(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Ee(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new U,ctx:{common:t.parent.common,data:t.data,parsedType:Ee(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(Bt(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let i=this.safeParse(t,r);if(i.success)return i.data;throw i.error}safeParse(t,r){var i;let s={common:{issues:[],async:(i=r?.async)!==null&&i!==void 0?i:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ee(t)},n=this._parseSync({data:t,path:s.path,parent:s});return ts(s,n)}async parseAsync(t,r){let i=await this.safeParseAsync(t,r);if(i.success)return i.data;throw i.error}async safeParseAsync(t,r){let i={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ee(t)},s=this._parse({data:t,path:i.path,parent:i}),n=await(Bt(s)?s:Promise.resolve(s));return ts(i,n)}refine(t,r){let i=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,n)=>{let a=t(s),u=()=>n.addIssue({code:p.custom,...i(s)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(u(),!1)):a?!0:(u(),!1)})}refinement(t,r){return this._refinement((i,s)=>t(i)?!0:(s.addIssue(typeof r=="function"?r(i,s):r),!1))}_refinement(t){return new Y({schema:this,typeName:y.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return ue.create(this,this._def)}nullable(){return ye.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ve.create(this,this._def)}promise(){return Ae.create(this,this._def)}or(t){return Ve.create([this,t],this._def)}and(t){return De.create(this,t,this._def)}transform(t){return new Y({...k(this._def),schema:this,typeName:y.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Ue({...k(this._def),innerType:this,defaultValue:r,typeName:y.ZodDefault})}brand(){return new Zt({typeName:y.ZodBranded,type:this,...k(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new et({...k(this._def),innerType:this,catchValue:r,typeName:y.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return mt.create(this,t)}readonly(){return rt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Oa=/^c[^\s-]{8,}$/i,La=/^[a-z][a-z0-9]*$/,Va=/^[0-9A-HJKMNP-TV-Z]{26}$/,Da=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ja=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ma="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Ar,Ba=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,Fa=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Ua=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function $a(e,t){return!!((t==="v4"||!t)&&Ba.test(e)||(t==="v6"||!t)&&Fa.test(e))}var Se=class e extends E{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==d.string){let n=this._getOrReturnCtx(t);return m(n,{code:p.invalid_type,expected:d.string,received:n.parsedType}),w}let i=new U,s;for(let n of this._def.checks)if(n.kind==="min")t.data.length<n.value&&(s=this._getOrReturnCtx(t,s),m(s,{code:p.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),i.dirty());else if(n.kind==="max")t.data.length>n.value&&(s=this._getOrReturnCtx(t,s),m(s,{code:p.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),i.dirty());else if(n.kind==="length"){let a=t.data.length>n.value,u=t.data.length<n.value;(a||u)&&(s=this._getOrReturnCtx(t,s),a?m(s,{code:p.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):u&&m(s,{code:p.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),i.dirty())}else if(n.kind==="email")ja.test(t.data)||(s=this._getOrReturnCtx(t,s),m(s,{validation:"email",code:p.invalid_string,message:n.message}),i.dirty());else if(n.kind==="emoji")Ar||(Ar=new RegExp(Ma,"u")),Ar.test(t.data)||(s=this._getOrReturnCtx(t,s),m(s,{validation:"emoji",code:p.invalid_string,message:n.message}),i.dirty());else if(n.kind==="uuid")Da.test(t.data)||(s=this._getOrReturnCtx(t,s),m(s,{validation:"uuid",code:p.invalid_string,message:n.message}),i.dirty());else if(n.kind==="cuid")Oa.test(t.data)||(s=this._getOrReturnCtx(t,s),m(s,{validation:"cuid",code:p.invalid_string,message:n.message}),i.dirty());else if(n.kind==="cuid2")La.test(t.data)||(s=this._getOrReturnCtx(t,s),m(s,{validation:"cuid2",code:p.invalid_string,message:n.message}),i.dirty());else if(n.kind==="ulid")Va.test(t.data)||(s=this._getOrReturnCtx(t,s),m(s,{validation:"ulid",code:p.invalid_string,message:n.message}),i.dirty());else if(n.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),m(s,{validation:"url",code:p.invalid_string,message:n.message}),i.dirty()}else n.kind==="regex"?(n.regex.lastIndex=0,n.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),m(s,{validation:"regex",code:p.invalid_string,message:n.message}),i.dirty())):n.kind==="trim"?t.data=t.data.trim():n.kind==="includes"?t.data.includes(n.value,n.position)||(s=this._getOrReturnCtx(t,s),m(s,{code:p.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),i.dirty()):n.kind==="toLowerCase"?t.data=t.data.toLowerCase():n.kind==="toUpperCase"?t.data=t.data.toUpperCase():n.kind==="startsWith"?t.data.startsWith(n.value)||(s=this._getOrReturnCtx(t,s),m(s,{code:p.invalid_string,validation:{startsWith:n.value},message:n.message}),i.dirty()):n.kind==="endsWith"?t.data.endsWith(n.value)||(s=this._getOrReturnCtx(t,s),m(s,{code:p.invalid_string,validation:{endsWith:n.value},message:n.message}),i.dirty()):n.kind==="datetime"?Ua(n).test(t.data)||(s=this._getOrReturnCtx(t,s),m(s,{code:p.invalid_string,validation:"datetime",message:n.message}),i.dirty()):n.kind==="ip"?$a(t.data,n.version)||(s=this._getOrReturnCtx(t,s),m(s,{validation:"ip",code:p.invalid_string,message:n.message}),i.dirty()):P.assertNever(n);return{status:i.value,value:t.data}}_regex(t,r,i){return this.refinement(s=>t.test(s),{validation:r,code:p.invalid_string,...v.errToObj(i)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...v.errToObj(t)})}url(t){return this._addCheck({kind:"url",...v.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...v.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...v.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...v.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...v.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...v.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...v.errToObj(t)})}datetime(t){var r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(r=t?.offset)!==null&&r!==void 0?r:!1,...v.errToObj(t?.message)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...v.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...v.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...v.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...v.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...v.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...v.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...v.errToObj(r)})}nonempty(t){return this.min(1,v.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Se.create=e=>{var t;return new Se({checks:[],typeName:y.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...k(e)})};function Za(e,t){let r=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,s=r>i?r:i,n=parseInt(e.toFixed(s).replace(".","")),a=parseInt(t.toFixed(s).replace(".",""));return n%a/Math.pow(10,s)}var Ie=class e extends E{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==d.number){let n=this._getOrReturnCtx(t);return m(n,{code:p.invalid_type,expected:d.number,received:n.parsedType}),w}let i,s=new U;for(let n of this._def.checks)n.kind==="int"?P.isInteger(t.data)||(i=this._getOrReturnCtx(t,i),m(i,{code:p.invalid_type,expected:"integer",received:"float",message:n.message}),s.dirty()):n.kind==="min"?(n.inclusive?t.data<n.value:t.data<=n.value)&&(i=this._getOrReturnCtx(t,i),m(i,{code:p.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),s.dirty()):n.kind==="max"?(n.inclusive?t.data>n.value:t.data>=n.value)&&(i=this._getOrReturnCtx(t,i),m(i,{code:p.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),s.dirty()):n.kind==="multipleOf"?Za(t.data,n.value)!==0&&(i=this._getOrReturnCtx(t,i),m(i,{code:p.not_multiple_of,multipleOf:n.value,message:n.message}),s.dirty()):n.kind==="finite"?Number.isFinite(t.data)||(i=this._getOrReturnCtx(t,i),m(i,{code:p.not_finite,message:n.message}),s.dirty()):P.assertNever(n);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,v.toString(r))}gt(t,r){return this.setLimit("min",t,!1,v.toString(r))}lte(t,r){return this.setLimit("max",t,!0,v.toString(r))}lt(t,r){return this.setLimit("max",t,!1,v.toString(r))}setLimit(t,r,i,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:i,message:v.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:v.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:v.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:v.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:v.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:v.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:v.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:v.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:v.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:v.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&P.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(r===null||i.value>r)&&(r=i.value):i.kind==="max"&&(t===null||i.value<t)&&(t=i.value)}return Number.isFinite(r)&&Number.isFinite(t)}};Ie.create=e=>new Ie({checks:[],typeName:y.ZodNumber,coerce:e?.coerce||!1,...k(e)});var Pe=class e extends E{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==d.bigint){let n=this._getOrReturnCtx(t);return m(n,{code:p.invalid_type,expected:d.bigint,received:n.parsedType}),w}let i,s=new U;for(let n of this._def.checks)n.kind==="min"?(n.inclusive?t.data<n.value:t.data<=n.value)&&(i=this._getOrReturnCtx(t,i),m(i,{code:p.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),s.dirty()):n.kind==="max"?(n.inclusive?t.data>n.value:t.data>=n.value)&&(i=this._getOrReturnCtx(t,i),m(i,{code:p.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),s.dirty()):n.kind==="multipleOf"?t.data%n.value!==BigInt(0)&&(i=this._getOrReturnCtx(t,i),m(i,{code:p.not_multiple_of,multipleOf:n.value,message:n.message}),s.dirty()):P.assertNever(n);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,v.toString(r))}gt(t,r){return this.setLimit("min",t,!1,v.toString(r))}lte(t,r){return this.setLimit("max",t,!0,v.toString(r))}lt(t,r){return this.setLimit("max",t,!1,v.toString(r))}setLimit(t,r,i,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:i,message:v.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:v.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:v.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:v.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:v.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:v.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Pe.create=e=>{var t;return new Pe({checks:[],typeName:y.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...k(e)})};var Ne=class extends E{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==d.boolean){let i=this._getOrReturnCtx(t);return m(i,{code:p.invalid_type,expected:d.boolean,received:i.parsedType}),w}return W(t.data)}};Ne.create=e=>new Ne({typeName:y.ZodBoolean,coerce:e?.coerce||!1,...k(e)});var Re=class e extends E{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==d.date){let n=this._getOrReturnCtx(t);return m(n,{code:p.invalid_type,expected:d.date,received:n.parsedType}),w}if(isNaN(t.data.getTime())){let n=this._getOrReturnCtx(t);return m(n,{code:p.invalid_date}),w}let i=new U,s;for(let n of this._def.checks)n.kind==="min"?t.data.getTime()<n.value&&(s=this._getOrReturnCtx(t,s),m(s,{code:p.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),i.dirty()):n.kind==="max"?t.data.getTime()>n.value&&(s=this._getOrReturnCtx(t,s),m(s,{code:p.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),i.dirty()):P.assertNever(n);return{status:i.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:v.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:v.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};Re.create=e=>new Re({checks:[],coerce:e?.coerce||!1,typeName:y.ZodDate,...k(e)});var Ye=class extends E{_parse(t){if(this._getType(t)!==d.symbol){let i=this._getOrReturnCtx(t);return m(i,{code:p.invalid_type,expected:d.symbol,received:i.parsedType}),w}return W(t.data)}};Ye.create=e=>new Ye({typeName:y.ZodSymbol,...k(e)});var Oe=class extends E{_parse(t){if(this._getType(t)!==d.undefined){let i=this._getOrReturnCtx(t);return m(i,{code:p.invalid_type,expected:d.undefined,received:i.parsedType}),w}return W(t.data)}};Oe.create=e=>new Oe({typeName:y.ZodUndefined,...k(e)});var Le=class extends E{_parse(t){if(this._getType(t)!==d.null){let i=this._getOrReturnCtx(t);return m(i,{code:p.invalid_type,expected:d.null,received:i.parsedType}),w}return W(t.data)}};Le.create=e=>new Le({typeName:y.ZodNull,...k(e)});var Ce=class extends E{constructor(){super(...arguments),this._any=!0}_parse(t){return W(t.data)}};Ce.create=e=>new Ce({typeName:y.ZodAny,...k(e)});var xe=class extends E{constructor(){super(...arguments),this._unknown=!0}_parse(t){return W(t.data)}};xe.create=e=>new xe({typeName:y.ZodUnknown,...k(e)});var ce=class extends E{_parse(t){let r=this._getOrReturnCtx(t);return m(r,{code:p.invalid_type,expected:d.never,received:r.parsedType}),w}};ce.create=e=>new ce({typeName:y.ZodNever,...k(e)});var Qe=class extends E{_parse(t){if(this._getType(t)!==d.undefined){let i=this._getOrReturnCtx(t);return m(i,{code:p.invalid_type,expected:d.void,received:i.parsedType}),w}return W(t.data)}};Qe.create=e=>new Qe({typeName:y.ZodVoid,...k(e)});var ve=class e extends E{_parse(t){let{ctx:r,status:i}=this._processInputParams(t),s=this._def;if(r.parsedType!==d.array)return m(r,{code:p.invalid_type,expected:d.array,received:r.parsedType}),w;if(s.exactLength!==null){let a=r.data.length>s.exactLength.value,u=r.data.length<s.exactLength.value;(a||u)&&(m(r,{code:a?p.too_big:p.too_small,minimum:u?s.exactLength.value:void 0,maximum:a?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),i.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(m(r,{code:p.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),i.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(m(r,{code:p.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),i.dirty()),r.common.async)return Promise.all([...r.data].map((a,u)=>s.type._parseAsync(new ne(r,a,r.path,u)))).then(a=>U.mergeArray(i,a));let n=[...r.data].map((a,u)=>s.type._parseSync(new ne(r,a,r.path,u)));return U.mergeArray(i,n)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:v.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:v.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:v.toString(r)}})}nonempty(t){return this.min(1,t)}};ve.create=(e,t)=>new ve({type:e,minLength:null,maxLength:null,exactLength:null,typeName:y.ZodArray,...k(t)});function Ke(e){if(e instanceof q){let t={};for(let r in e.shape){let i=e.shape[r];t[r]=ue.create(Ke(i))}return new q({...e._def,shape:()=>t})}else return e instanceof ve?new ve({...e._def,type:Ke(e.element)}):e instanceof ue?ue.create(Ke(e.unwrap())):e instanceof ye?ye.create(Ke(e.unwrap())):e instanceof pe?pe.create(e.items.map(t=>Ke(t))):e}var q=class e extends E{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=P.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==d.object){let l=this._getOrReturnCtx(t);return m(l,{code:p.invalid_type,expected:d.object,received:l.parsedType}),w}let{status:i,ctx:s}=this._processInputParams(t),{shape:n,keys:a}=this._getCached(),u=[];if(!(this._def.catchall instanceof ce&&this._def.unknownKeys==="strip"))for(let l in s.data)a.includes(l)||u.push(l);let c=[];for(let l of a){let h=n[l],f=s.data[l];c.push({key:{status:"valid",value:l},value:h._parse(new ne(s,f,s.path,l)),alwaysSet:l in s.data})}if(this._def.catchall instanceof ce){let l=this._def.unknownKeys;if(l==="passthrough")for(let h of u)c.push({key:{status:"valid",value:h},value:{status:"valid",value:s.data[h]}});else if(l==="strict")u.length>0&&(m(s,{code:p.unrecognized_keys,keys:u}),i.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let l=this._def.catchall;for(let h of u){let f=s.data[h];c.push({key:{status:"valid",value:h},value:l._parse(new ne(s,f,s.path,h)),alwaysSet:h in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let l=[];for(let h of c){let f=await h.key;l.push({key:f,value:await h.value,alwaysSet:h.alwaysSet})}return l}).then(l=>U.mergeObjectSync(i,l)):U.mergeObjectSync(i,c)}get shape(){return this._def.shape()}strict(t){return v.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,i)=>{var s,n,a,u;let c=(a=(n=(s=this._def).errorMap)===null||n===void 0?void 0:n.call(s,r,i).message)!==null&&a!==void 0?a:i.defaultError;return r.code==="unrecognized_keys"?{message:(u=v.errToObj(t).message)!==null&&u!==void 0?u:c}:{message:c}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:y.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};return P.objectKeys(t).forEach(i=>{t[i]&&this.shape[i]&&(r[i]=this.shape[i])}),new e({...this._def,shape:()=>r})}omit(t){let r={};return P.objectKeys(this.shape).forEach(i=>{t[i]||(r[i]=this.shape[i])}),new e({...this._def,shape:()=>r})}deepPartial(){return Ke(this)}partial(t){let r={};return P.objectKeys(this.shape).forEach(i=>{let s=this.shape[i];t&&!t[i]?r[i]=s:r[i]=s.optional()}),new e({...this._def,shape:()=>r})}required(t){let r={};return P.objectKeys(this.shape).forEach(i=>{if(t&&!t[i])r[i]=this.shape[i];else{let n=this.shape[i];for(;n instanceof ue;)n=n._def.innerType;r[i]=n}}),new e({...this._def,shape:()=>r})}keyof(){return ns(P.objectKeys(this.shape))}};q.create=(e,t)=>new q({shape:()=>e,unknownKeys:"strip",catchall:ce.create(),typeName:y.ZodObject,...k(t)});q.strictCreate=(e,t)=>new q({shape:()=>e,unknownKeys:"strict",catchall:ce.create(),typeName:y.ZodObject,...k(t)});q.lazycreate=(e,t)=>new q({shape:e,unknownKeys:"strip",catchall:ce.create(),typeName:y.ZodObject,...k(t)});var Ve=class extends E{_parse(t){let{ctx:r}=this._processInputParams(t),i=this._def.options;function s(n){for(let u of n)if(u.result.status==="valid")return u.result;for(let u of n)if(u.result.status==="dirty")return r.common.issues.push(...u.ctx.common.issues),u.result;let a=n.map(u=>new K(u.ctx.common.issues));return m(r,{code:p.invalid_union,unionErrors:a}),w}if(r.common.async)return Promise.all(i.map(async n=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await n._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(s);{let n,a=[];for(let c of i){let l={...r,common:{...r.common,issues:[]},parent:null},h=c._parseSync({data:r.data,path:r.path,parent:l});if(h.status==="valid")return h;h.status==="dirty"&&!n&&(n={result:h,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(n)return r.common.issues.push(...n.ctx.common.issues),n.result;let u=a.map(c=>new K(c));return m(r,{code:p.invalid_union,unionErrors:u}),w}}get options(){return this._def.options}};Ve.create=(e,t)=>new Ve({options:e,typeName:y.ZodUnion,...k(t)});var Dt=e=>e instanceof je?Dt(e.schema):e instanceof Y?Dt(e.innerType()):e instanceof Me?[e.value]:e instanceof Be?e.options:e instanceof Fe?Object.keys(e.enum):e instanceof Ue?Dt(e._def.innerType):e instanceof Oe?[void 0]:e instanceof Le?[null]:null,Ft=class e extends E{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==d.object)return m(r,{code:p.invalid_type,expected:d.object,received:r.parsedType}),w;let i=this.discriminator,s=r.data[i],n=this.optionsMap.get(s);return n?r.common.async?n._parseAsync({data:r.data,path:r.path,parent:r}):n._parseSync({data:r.data,path:r.path,parent:r}):(m(r,{code:p.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),w)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,i){let s=new Map;for(let n of r){let a=Dt(n.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let u of a){if(s.has(u))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(u)}`);s.set(u,n)}}return new e({typeName:y.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...k(i)})}};function Nr(e,t){let r=Ee(e),i=Ee(t);if(e===t)return{valid:!0,data:e};if(r===d.object&&i===d.object){let s=P.objectKeys(t),n=P.objectKeys(e).filter(u=>s.indexOf(u)!==-1),a={...e,...t};for(let u of n){let c=Nr(e[u],t[u]);if(!c.valid)return{valid:!1};a[u]=c.data}return{valid:!0,data:a}}else if(r===d.array&&i===d.array){if(e.length!==t.length)return{valid:!1};let s=[];for(let n=0;n<e.length;n++){let a=e[n],u=t[n],c=Nr(a,u);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===d.date&&i===d.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var De=class extends E{_parse(t){let{status:r,ctx:i}=this._processInputParams(t),s=(n,a)=>{if(Ir(n)||Ir(a))return w;let u=Nr(n.value,a.value);return u.valid?((Pr(n)||Pr(a))&&r.dirty(),{status:r.value,value:u.data}):(m(i,{code:p.invalid_intersection_types}),w)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([n,a])=>s(n,a)):s(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}};De.create=(e,t,r)=>new De({left:e,right:t,typeName:y.ZodIntersection,...k(r)});var pe=class e extends E{_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==d.array)return m(i,{code:p.invalid_type,expected:d.array,received:i.parsedType}),w;if(i.data.length<this._def.items.length)return m(i,{code:p.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),w;!this._def.rest&&i.data.length>this._def.items.length&&(m(i,{code:p.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let n=[...i.data].map((a,u)=>{let c=this._def.items[u]||this._def.rest;return c?c._parse(new ne(i,a,i.path,u)):null}).filter(a=>!!a);return i.common.async?Promise.all(n).then(a=>U.mergeArray(r,a)):U.mergeArray(r,n)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};pe.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new pe({items:e,typeName:y.ZodTuple,rest:null,...k(t)})};var Ut=class e extends E{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==d.object)return m(i,{code:p.invalid_type,expected:d.object,received:i.parsedType}),w;let s=[],n=this._def.keyType,a=this._def.valueType;for(let u in i.data)s.push({key:n._parse(new ne(i,u,i.path,u)),value:a._parse(new ne(i,i.data[u],i.path,u))});return i.common.async?U.mergeObjectAsync(r,s):U.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,i){return r instanceof E?new e({keyType:t,valueType:r,typeName:y.ZodRecord,...k(i)}):new e({keyType:Se.create(),valueType:t,typeName:y.ZodRecord,...k(r)})}},Xe=class extends E{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==d.map)return m(i,{code:p.invalid_type,expected:d.map,received:i.parsedType}),w;let s=this._def.keyType,n=this._def.valueType,a=[...i.data.entries()].map(([u,c],l)=>({key:s._parse(new ne(i,u,i.path,[l,"key"])),value:n._parse(new ne(i,c,i.path,[l,"value"]))}));if(i.common.async){let u=new Map;return Promise.resolve().then(async()=>{for(let c of a){let l=await c.key,h=await c.value;if(l.status==="aborted"||h.status==="aborted")return w;(l.status==="dirty"||h.status==="dirty")&&r.dirty(),u.set(l.value,h.value)}return{status:r.value,value:u}})}else{let u=new Map;for(let c of a){let l=c.key,h=c.value;if(l.status==="aborted"||h.status==="aborted")return w;(l.status==="dirty"||h.status==="dirty")&&r.dirty(),u.set(l.value,h.value)}return{status:r.value,value:u}}}};Xe.create=(e,t,r)=>new Xe({valueType:t,keyType:e,typeName:y.ZodMap,...k(r)});var Je=class e extends E{_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==d.set)return m(i,{code:p.invalid_type,expected:d.set,received:i.parsedType}),w;let s=this._def;s.minSize!==null&&i.data.size<s.minSize.value&&(m(i,{code:p.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&i.data.size>s.maxSize.value&&(m(i,{code:p.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());let n=this._def.valueType;function a(c){let l=new Set;for(let h of c){if(h.status==="aborted")return w;h.status==="dirty"&&r.dirty(),l.add(h.value)}return{status:r.value,value:l}}let u=[...i.data.values()].map((c,l)=>n._parse(new ne(i,c,i.path,l)));return i.common.async?Promise.all(u).then(c=>a(c)):a(u)}min(t,r){return new e({...this._def,minSize:{value:t,message:v.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:v.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Je.create=(e,t)=>new Je({valueType:e,minSize:null,maxSize:null,typeName:y.ZodSet,...k(t)});var $t=class e extends E{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==d.function)return m(r,{code:p.invalid_type,expected:d.function,received:r.parsedType}),w;function i(u,c){return Mt({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,jt(),pt].filter(l=>!!l),issueData:{code:p.invalid_arguments,argumentsError:c}})}function s(u,c){return Mt({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,jt(),pt].filter(l=>!!l),issueData:{code:p.invalid_return_type,returnTypeError:c}})}let n={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof Ae){let u=this;return W(async function(...c){let l=new K([]),h=await u._def.args.parseAsync(c,n).catch(O=>{throw l.addIssue(i(c,O)),l}),f=await Reflect.apply(a,this,h);return await u._def.returns._def.type.parseAsync(f,n).catch(O=>{throw l.addIssue(s(f,O)),l})})}else{let u=this;return W(function(...c){let l=u._def.args.safeParse(c,n);if(!l.success)throw new K([i(c,l.error)]);let h=Reflect.apply(a,this,l.data),f=u._def.returns.safeParse(h,n);if(!f.success)throw new K([s(h,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:pe.create(t).rest(xe.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,i){return new e({args:t||pe.create([]).rest(xe.create()),returns:r||xe.create(),typeName:y.ZodFunction,...k(i)})}},je=class extends E{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};je.create=(e,t)=>new je({getter:e,typeName:y.ZodLazy,...k(t)});var Me=class extends E{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return m(r,{received:r.data,code:p.invalid_literal,expected:this._def.value}),w}return{status:"valid",value:t.data}}get value(){return this._def.value}};Me.create=(e,t)=>new Me({value:e,typeName:y.ZodLiteral,...k(t)});function ns(e,t){return new Be({values:e,typeName:y.ZodEnum,...k(t)})}var Be=class e extends E{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),i=this._def.values;return m(r,{expected:P.joinValues(i),received:r.parsedType,code:p.invalid_type}),w}if(this._def.values.indexOf(t.data)===-1){let r=this._getOrReturnCtx(t),i=this._def.values;return m(r,{received:r.data,code:p.invalid_enum_value,options:i}),w}return W(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t){return e.create(t)}exclude(t){return e.create(this.options.filter(r=>!t.includes(r)))}};Be.create=ns;var Fe=class extends E{_parse(t){let r=P.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(t);if(i.parsedType!==d.string&&i.parsedType!==d.number){let s=P.objectValues(r);return m(i,{expected:P.joinValues(s),received:i.parsedType,code:p.invalid_type}),w}if(r.indexOf(t.data)===-1){let s=P.objectValues(r);return m(i,{received:i.data,code:p.invalid_enum_value,options:s}),w}return W(t.data)}get enum(){return this._def.values}};Fe.create=(e,t)=>new Fe({values:e,typeName:y.ZodNativeEnum,...k(t)});var Ae=class extends E{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==d.promise&&r.common.async===!1)return m(r,{code:p.invalid_type,expected:d.promise,received:r.parsedType}),w;let i=r.parsedType===d.promise?r.data:Promise.resolve(r.data);return W(i.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Ae.create=(e,t)=>new Ae({type:e,typeName:y.ZodPromise,...k(t)});var Y=class extends E{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===y.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:i}=this._processInputParams(t),s=this._def.effect||null,n={addIssue:a=>{m(i,a),a.fatal?r.abort():r.dirty()},get path(){return i.path}};if(n.addIssue=n.addIssue.bind(n),s.type==="preprocess"){let a=s.transform(i.data,n);return i.common.issues.length?{status:"dirty",value:i.data}:i.common.async?Promise.resolve(a).then(u=>this._def.schema._parseAsync({data:u,path:i.path,parent:i})):this._def.schema._parseSync({data:a,path:i.path,parent:i})}if(s.type==="refinement"){let a=u=>{let c=s.refinement(u,n);if(i.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(i.common.async===!1){let u=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return u.status==="aborted"?w:(u.status==="dirty"&&r.dirty(),a(u.value),{status:r.value,value:u.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(u=>u.status==="aborted"?w:(u.status==="dirty"&&r.dirty(),a(u.value).then(()=>({status:r.value,value:u.value}))))}if(s.type==="transform")if(i.common.async===!1){let a=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!dt(a))return a;let u=s.transform(a.value,n);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:u}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(a=>dt(a)?Promise.resolve(s.transform(a.value,n)).then(u=>({status:r.value,value:u})):a);P.assertNever(s)}};Y.create=(e,t,r)=>new Y({schema:e,typeName:y.ZodEffects,effect:t,...k(r)});Y.createWithPreprocess=(e,t,r)=>new Y({schema:t,effect:{type:"preprocess",transform:e},typeName:y.ZodEffects,...k(r)});var ue=class extends E{_parse(t){return this._getType(t)===d.undefined?W(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};ue.create=(e,t)=>new ue({innerType:e,typeName:y.ZodOptional,...k(t)});var ye=class extends E{_parse(t){return this._getType(t)===d.null?W(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};ye.create=(e,t)=>new ye({innerType:e,typeName:y.ZodNullable,...k(t)});var Ue=class extends E{_parse(t){let{ctx:r}=this._processInputParams(t),i=r.data;return r.parsedType===d.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Ue.create=(e,t)=>new Ue({innerType:e,typeName:y.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...k(t)});var et=class extends E{_parse(t){let{ctx:r}=this._processInputParams(t),i={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return Bt(s)?s.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new K(i.common.issues)},input:i.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new K(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}};et.create=(e,t)=>new et({innerType:e,typeName:y.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...k(t)});var tt=class extends E{_parse(t){if(this._getType(t)!==d.nan){let i=this._getOrReturnCtx(t);return m(i,{code:p.invalid_type,expected:d.nan,received:i.parsedType}),w}return{status:"valid",value:t.data}}};tt.create=e=>new tt({typeName:y.ZodNaN,...k(e)});var za=Symbol("zod_brand"),Zt=class extends E{_parse(t){let{ctx:r}=this._processInputParams(t),i=r.data;return this._def.type._parse({data:i,path:r.path,parent:r})}unwrap(){return this._def.type}},mt=class e extends E{_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.common.async)return(async()=>{let n=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return n.status==="aborted"?w:n.status==="dirty"?(r.dirty(),ss(n.value)):this._def.out._parseAsync({data:n.value,path:i.path,parent:i})})();{let s=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return s.status==="aborted"?w:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:i.path,parent:i})}}static create(t,r){return new e({in:t,out:r,typeName:y.ZodPipeline})}},rt=class extends E{_parse(t){let r=this._def.innerType._parse(t);return dt(r)&&(r.value=Object.freeze(r.value)),r}};rt.create=(e,t)=>new rt({innerType:e,typeName:y.ZodReadonly,...k(t)});var as=(e,t={},r)=>e?Ce.create().superRefine((i,s)=>{var n,a;if(!e(i)){let u=typeof t=="function"?t(i):typeof t=="string"?{message:t}:t,c=(a=(n=u.fatal)!==null&&n!==void 0?n:r)!==null&&a!==void 0?a:!0,l=typeof u=="string"?{message:u}:u;s.addIssue({code:"custom",...l,fatal:c})}}):Ce.create(),Wa={object:q.lazycreate},y;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(y||(y={}));var Ga=(e,t={message:`Input not instance of ${e.name}`})=>as(r=>r instanceof e,t),os=Se.create,us=Ie.create,qa=tt.create,Ha=Pe.create,cs=Ne.create,Ka=Re.create,Ya=Ye.create,Qa=Oe.create,Xa=Le.create,Ja=Ce.create,eo=xe.create,to=ce.create,ro=Qe.create,io=ve.create,so=q.create,no=q.strictCreate,ao=Ve.create,oo=Ft.create,uo=De.create,co=pe.create,lo=Ut.create,ho=Xe.create,fo=Je.create,po=$t.create,mo=je.create,go=Me.create,xo=Be.create,vo=Fe.create,yo=Ae.create,rs=Y.create,_o=ue.create,bo=ye.create,wo=Y.createWithPreprocess,ko=mt.create,Eo=()=>os().optional(),So=()=>us().optional(),Co=()=>cs().optional(),Ao={string:e=>Se.create({...e,coerce:!0}),number:e=>Ie.create({...e,coerce:!0}),boolean:e=>Ne.create({...e,coerce:!0}),bigint:e=>Pe.create({...e,coerce:!0}),date:e=>Re.create({...e,coerce:!0})},To=w,Fu=Object.freeze({__proto__:null,defaultErrorMap:pt,setErrorMap:Na,getErrorMap:jt,makeIssue:Mt,EMPTY_PATH:Ra,addIssueToContext:m,ParseStatus:U,INVALID:w,DIRTY:ss,OK:W,isAborted:Ir,isDirty:Pr,isValid:dt,isAsync:Bt,get util(){return P},get objectUtil(){return Tr},ZodParsedType:d,getParsedType:Ee,ZodType:E,ZodString:Se,ZodNumber:Ie,ZodBigInt:Pe,ZodBoolean:Ne,ZodDate:Re,ZodSymbol:Ye,ZodUndefined:Oe,ZodNull:Le,ZodAny:Ce,ZodUnknown:xe,ZodNever:ce,ZodVoid:Qe,ZodArray:ve,ZodObject:q,ZodUnion:Ve,ZodDiscriminatedUnion:Ft,ZodIntersection:De,ZodTuple:pe,ZodRecord:Ut,ZodMap:Xe,ZodSet:Je,ZodFunction:$t,ZodLazy:je,ZodLiteral:Me,ZodEnum:Be,ZodNativeEnum:Fe,ZodPromise:Ae,ZodEffects:Y,ZodTransformer:Y,ZodOptional:ue,ZodNullable:ye,ZodDefault:Ue,ZodCatch:et,ZodNaN:tt,BRAND:za,ZodBranded:Zt,ZodPipeline:mt,ZodReadonly:rt,custom:as,Schema:E,ZodSchema:E,late:Wa,get ZodFirstPartyTypeKind(){return y},coerce:Ao,any:Ja,array:io,bigint:Ha,boolean:cs,date:Ka,discriminatedUnion:oo,effect:rs,enum:xo,function:po,instanceof:Ga,intersection:uo,lazy:mo,literal:go,map:ho,nan:qa,nativeEnum:vo,never:to,null:Xa,nullable:bo,number:us,object:so,oboolean:Co,onumber:So,optional:_o,ostring:Eo,pipeline:ko,preprocess:wo,promise:yo,record:lo,set:fo,strictObject:no,string:os,symbol:Ya,transformer:rs,tuple:co,undefined:Qa,union:ao,unknown:eo,void:ro,NEVER:To,ZodIssueCode:p,quotelessJson:Pa,ZodError:K});export{Fu as a,Vr as b,Oo as c,Ru as d,Mu as e};