prettier 2.1.1 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/parser-babel.js CHANGED
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):((t="undefined"!=typeof globalThis?globalThis:t||self).prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.babel=e())}(this,(function(){"use strict";var t=function(t,e){const s=new SyntaxError(t+" ("+e.start.line+":"+e.start.column+")");return s.loc=e,s};function e(t,e,s){return t(s={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&s.path)}},s.exports),s.exports}function s(t){return t&&t.default||t}var i=Object.freeze({__proto__:null,default:{EOL:"\n"}});const r=t=>{if("string"!=typeof t)throw new TypeError("Expected a string");const e=t.match(/(?:\r?\n)/g)||[];if(0===e.length)return;const s=e.filter(t=>"\r\n"===t).length;return s>e.length-s?"\r\n":"\n"};var a=r;a.graceful=t=>"string"==typeof t&&r(t)||"\n";var n=s(i),o=e((function(t,e){function s(){const t=n;return s=function(){return t},t}function i(){const t=(e=a)&&e.__esModule?e:{default:e};var e;return i=function(){return t},t}Object.defineProperty(e,"__esModule",{value:!0}),e.extract=function(t){const e=t.match(h);return e?e[0].trimLeft():""},e.strip=function(t){const e=t.match(h);return e&&e[0]?t.substring(e[0].length):t},e.parse=function(t){return f(t).pragmas},e.parseWithComments=f,e.print=function({comments:t="",pragmas:e={}}){const r=(0,i().default)(t)||s().EOL,a=Object.keys(e),n=a.map(t=>D(t,e[t])).reduce((t,e)=>t.concat(e),[]).map(t=>" * "+t+r).join("");if(!t){if(0===a.length)return"";if(1===a.length&&!Array.isArray(e[a[0]])){const t=e[a[0]];return"".concat("/**"," ").concat(D(a[0],t)[0]).concat(" */")}}const o=t.split(r).map(t=>"".concat(" *"," ").concat(t)).join(r)+r;return"/**"+r+(t?o:"")+(t&&a.length?" *"+r:"")+n+" */"};const r=/\*\/$/,o=/^\/\*\*/,h=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,c=/(^|\s+)\/\/([^\r\n]*)/g,p=/^(\r?\n)+/,u=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,l=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,d=/(\r?\n|^) *\* ?/g,m=[];function f(t){const e=(0,i().default)(t)||s().EOL;t=t.replace(o,"").replace(r,"").replace(d,"$1");let a="";for(;a!==t;)a=t,t=t.replace(u,"".concat(e,"$1 $2").concat(e));t=t.replace(p,"").trimRight();const n=Object.create(null),h=t.replace(l,"").replace(p,"").trimRight();let f;for(;f=l.exec(t);){const t=f[2].replace(c,"");"string"==typeof n[f[1]]||Array.isArray(n[f[1]])?n[f[1]]=m.concat(n[f[1]],t):n[f[1]]=t}return{comments:h,pragmas:n}}function D(t,e){return m.concat(e).map(e=>"@".concat(t," ").concat(e).trim())}})),h=t=>"string"==typeof t?t.replace((({onlyFirst:t=!1}={})=>{const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")})(),""):t;const c=t=>!Number.isNaN(t)&&(t>=4352&&(t<=4447||9001===t||9002===t||11904<=t&&t<=12871&&12351!==t||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141));var p=c,u=c;p.default=u;const l=t=>{if("string"!=typeof(t=t.replace(/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g," "))||0===t.length)return 0;t=h(t);let e=0;for(let s=0;s<t.length;s++){const i=t.codePointAt(s);i<=31||i>=127&&i<=159||(i>=768&&i<=879||(i>65535&&s++,e+=p(i)?2:1))}return e};var d=l,m=l;d.default=m;var f=t=>{if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};function D(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var y="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function x(){throw new Error("setTimeout has not been defined")}function g(){throw new Error("clearTimeout has not been defined")}var E=x,P=g;function b(t){if(E===setTimeout)return setTimeout(t,0);if((E===x||!E)&&setTimeout)return E=setTimeout,setTimeout(t,0);try{return E(t,0)}catch(e){try{return E.call(null,t,0)}catch(e){return E.call(this,t,0)}}}"function"==typeof y.setTimeout&&(E=setTimeout),"function"==typeof y.clearTimeout&&(P=clearTimeout);var C,T=[],A=!1,w=-1;function N(){A&&C&&(A=!1,C.length?T=C.concat(T):w=-1,T.length&&S())}function S(){if(!A){var t=b(N);A=!0;for(var e=T.length;e;){for(C=T,T=[];++w<e;)C&&C[w].run();w=-1,e=T.length}C=null,A=!1,function(t){if(P===clearTimeout)return clearTimeout(t);if((P===g||!P)&&clearTimeout)return P=clearTimeout,clearTimeout(t);try{P(t)}catch(e){try{return P.call(null,t)}catch(e){return P.call(this,t)}}}(t)}}function I(t,e){this.fun=t,this.array=e}I.prototype.run=function(){this.fun.apply(null,this.array)};function F(){}var v=F,k=F,L=F,O=F,R=F,M=F,B=F;var _=y.performance||{},j=_.now||_.mozNow||_.msNow||_.oNow||_.webkitNow||function(){return(new Date).getTime()};var U=new Date;var q={nextTick:function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var s=1;s<arguments.length;s++)e[s-1]=arguments[s];T.push(new I(t,e)),1!==T.length||A||b(S)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:v,addListener:k,once:L,off:O,removeListener:R,removeAllListeners:M,emit:B,binding:function(t){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var e=.001*j.call(_),s=Math.floor(e),i=Math.floor(e%1*1e9);return t&&(s-=t[0],(i-=t[1])<0&&(s--,i+=1e9)),[s,i]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-U)/1e3}};var V="object"==typeof q&&q.env&&q.env.NODE_DEBUG&&/\bsemver\b/i.test(q.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};var z={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH:16},H=e((function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:s}=z,i=(e=t.exports={}).re=[],r=e.src=[],a=e.t={};let n=0;const o=(t,e,s)=>{const o=n++;V(o,e),a[t]=o,r[o]=e,i[o]=new RegExp(e,s?"g":void 0)};o("NUMERICIDENTIFIER","0|[1-9]\\d*"),o("NUMERICIDENTIFIERLOOSE","[0-9]+"),o("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),o("MAINVERSION","(".concat(r[a.NUMERICIDENTIFIER],")\\.")+"(".concat(r[a.NUMERICIDENTIFIER],")\\.")+"(".concat(r[a.NUMERICIDENTIFIER],")")),o("MAINVERSIONLOOSE","(".concat(r[a.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(r[a.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(r[a.NUMERICIDENTIFIERLOOSE],")")),o("PRERELEASEIDENTIFIER","(?:".concat(r[a.NUMERICIDENTIFIER],"|").concat(r[a.NONNUMERICIDENTIFIER],")")),o("PRERELEASEIDENTIFIERLOOSE","(?:".concat(r[a.NUMERICIDENTIFIERLOOSE],"|").concat(r[a.NONNUMERICIDENTIFIER],")")),o("PRERELEASE","(?:-(".concat(r[a.PRERELEASEIDENTIFIER],"(?:\\.").concat(r[a.PRERELEASEIDENTIFIER],")*))")),o("PRERELEASELOOSE","(?:-?(".concat(r[a.PRERELEASEIDENTIFIERLOOSE],"(?:\\.").concat(r[a.PRERELEASEIDENTIFIERLOOSE],")*))")),o("BUILDIDENTIFIER","[0-9A-Za-z-]+"),o("BUILD","(?:\\+(".concat(r[a.BUILDIDENTIFIER],"(?:\\.").concat(r[a.BUILDIDENTIFIER],")*))")),o("FULLPLAIN","v?".concat(r[a.MAINVERSION]).concat(r[a.PRERELEASE],"?").concat(r[a.BUILD],"?")),o("FULL","^".concat(r[a.FULLPLAIN],"$")),o("LOOSEPLAIN","[v=\\s]*".concat(r[a.MAINVERSIONLOOSE]).concat(r[a.PRERELEASELOOSE],"?").concat(r[a.BUILD],"?")),o("LOOSE","^".concat(r[a.LOOSEPLAIN],"$")),o("GTLT","((?:<|>)?=?)"),o("XRANGEIDENTIFIERLOOSE","".concat(r[a.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),o("XRANGEIDENTIFIER","".concat(r[a.NUMERICIDENTIFIER],"|x|X|\\*")),o("XRANGEPLAIN","[v=\\s]*(".concat(r[a.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(r[a.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(r[a.XRANGEIDENTIFIER],")")+"(?:".concat(r[a.PRERELEASE],")?").concat(r[a.BUILD],"?")+")?)?"),o("XRANGEPLAINLOOSE","[v=\\s]*(".concat(r[a.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(r[a.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(r[a.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(r[a.PRERELEASELOOSE],")?").concat(r[a.BUILD],"?")+")?)?"),o("XRANGE","^".concat(r[a.GTLT],"\\s*").concat(r[a.XRANGEPLAIN],"$")),o("XRANGELOOSE","^".concat(r[a.GTLT],"\\s*").concat(r[a.XRANGEPLAINLOOSE],"$")),o("COERCE","".concat("(^|[^\\d])(\\d{1,").concat(s,"})")+"(?:\\.(\\d{1,".concat(s,"}))?")+"(?:\\.(\\d{1,".concat(s,"}))?")+"(?:$|[^\\d])"),o("COERCERTL",r[a.COERCE],!0),o("LONETILDE","(?:~>?)"),o("TILDETRIM","(\\s*)".concat(r[a.LONETILDE],"\\s+"),!0),e.tildeTrimReplace="$1~",o("TILDE","^".concat(r[a.LONETILDE]).concat(r[a.XRANGEPLAIN],"$")),o("TILDELOOSE","^".concat(r[a.LONETILDE]).concat(r[a.XRANGEPLAINLOOSE],"$")),o("LONECARET","(?:\\^)"),o("CARETTRIM","(\\s*)".concat(r[a.LONECARET],"\\s+"),!0),e.caretTrimReplace="$1^",o("CARET","^".concat(r[a.LONECARET]).concat(r[a.XRANGEPLAIN],"$")),o("CARETLOOSE","^".concat(r[a.LONECARET]).concat(r[a.XRANGEPLAINLOOSE],"$")),o("COMPARATORLOOSE","^".concat(r[a.GTLT],"\\s*(").concat(r[a.LOOSEPLAIN],")$|^$")),o("COMPARATOR","^".concat(r[a.GTLT],"\\s*(").concat(r[a.FULLPLAIN],")$|^$")),o("COMPARATORTRIM","(\\s*)".concat(r[a.GTLT],"\\s*(").concat(r[a.LOOSEPLAIN],"|").concat(r[a.XRANGEPLAIN],")"),!0),e.comparatorTrimReplace="$1$2$3",o("HYPHENRANGE","^\\s*(".concat(r[a.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(r[a.XRANGEPLAIN],")")+"\\s*$"),o("HYPHENRANGELOOSE","^\\s*(".concat(r[a.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(r[a.XRANGEPLAINLOOSE],")")+"\\s*$"),o("STAR","(<|>)?=?\\s*\\*"),o("GTE0","^\\s*>=\\s*0.0.0\\s*$"),o("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}));const G=/^[0-9]+$/,W=(t,e)=>{const s=G.test(t),i=G.test(e);return s&&i&&(t=+t,e=+e),t===e?0:s&&!i?-1:i&&!s?1:t<e?-1:1};var X={compareIdentifiers:W,rcompareIdentifiers:(t,e)=>W(e,t)};const{MAX_LENGTH:K,MAX_SAFE_INTEGER:$}=z,{re:J,t:Y}=H,{compareIdentifiers:Q}=X;class Z{constructor(t,e){if(e&&"object"==typeof e||(e={loose:!!e,includePrerelease:!1}),t instanceof Z){if(t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError("Invalid Version: ".concat(t));if(t.length>K)throw new TypeError("version is longer than ".concat(K," characters"));V("SemVer",t,e),this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease;const s=t.trim().match(e.loose?J[Y.LOOSE]:J[Y.FULL]);if(!s)throw new TypeError("Invalid Version: ".concat(t));if(this.raw=t,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>$||this.major<0)throw new TypeError("Invalid major version");if(this.minor>$||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>$||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(t=>{if(/^[0-9]+$/.test(t)){const e=+t;if(e>=0&&e<$)return e}return t}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version="".concat(this.major,".").concat(this.minor,".").concat(this.patch),this.prerelease.length&&(this.version+="-".concat(this.prerelease.join("."))),this.version}toString(){return this.version}compare(t){if(V("SemVer.compare",this.version,this.options,t),!(t instanceof Z)){if("string"==typeof t&&t===this.version)return 0;t=new Z(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof Z||(t=new Z(t,this.options)),Q(this.major,t.major)||Q(this.minor,t.minor)||Q(this.patch,t.patch)}comparePre(t){if(t instanceof Z||(t=new Z(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let e=0;do{const s=this.prerelease[e],i=t.prerelease[e];if(V("prerelease compare",e,s,i),void 0===s&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===s)return-1;if(s!==i)return Q(s,i)}while(++e)}compareBuild(t){t instanceof Z||(t=new Z(t,this.options));let e=0;do{const s=this.build[e],i=t.build[e];if(V("prerelease compare",e,s,i),void 0===s&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===s)return-1;if(s!==i)return Q(s,i)}while(++e)}inc(t,e){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e),this.inc("pre",e);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",e),this.inc("pre",e);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let t=this.prerelease.length;for(;--t>=0;)"number"==typeof this.prerelease[t]&&(this.prerelease[t]++,t=-2);-1===t&&this.prerelease.push(0)}e&&(this.prerelease[0]===e?isNaN(this.prerelease[1])&&(this.prerelease=[e,0]):this.prerelease=[e,0]);break;default:throw new Error("invalid increment argument: ".concat(t))}return this.format(),this.raw=this.version,this}}var tt=Z;var et=(t,e,s)=>new tt(t,s).compare(new tt(e,s));var st=(t,e,s)=>et(t,e,s)<0;var it=(t,e,s)=>et(t,e,s)>=0,rt="Prettier is an opinionated code formatter",at="./bin/prettier.js",nt={node:">=10.13.0"},ot=["index.js","standalone.js","src","bin"],ht={"@angular/compiler":"10.0.12","@babel/code-frame":"7.10.4","@babel/parser":"7.11.2","@glimmer/syntax":"0.59.0","@iarna/toml":"2.2.5","@typescript-eslint/typescript-estree":"3.10.0","angular-estree-parser":"2.2.0","angular-html-parser":"1.7.1",camelcase:"6.0.0",chalk:"4.1.0","ci-info":"watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540","cjk-regex":"2.0.0",cosmiconfig:"7.0.0",dashify:"2.0.0",diff:"4.0.2",editorconfig:"0.15.3","editorconfig-to-prettier":"0.1.1","escape-string-regexp":"4.0.0",esutils:"2.0.3","fast-glob":"3.2.4","fast-json-stable-stringify":"2.1.0","find-parent-dir":"0.3.0","flow-parser":"0.132.0","get-stream":"6.0.0",globby:"11.0.1",graphql:"15.3.0","html-element-attributes":"2.2.1","html-styles":"1.0.0","html-tag-names":"1.1.5","html-void-elements":"1.0.5",ignore:"4.0.6","jest-docblock":"26.0.0",json5:"2.1.3",leven:"3.1.0","lines-and-columns":"1.1.6","linguist-languages":"7.10.0",lodash:"4.17.20",mem:"6.1.0",minimatch:"3.0.4",minimist:"1.2.5","n-readlines":"1.0.0",outdent:"0.7.1","parse-srcset":"ikatyang/parse-srcset#54eb9c1cb21db5c62b4d0e275d7249516df6f0ee","please-upgrade-node":"3.2.0","postcss-less":"3.1.4","postcss-media-query-parser":"0.2.3","postcss-scss":"2.1.1","postcss-selector-parser":"2.2.3","postcss-values-parser":"2.0.1","regexp-util":"1.2.2","remark-footnotes":"2.0.0","remark-math":"1.0.6","remark-parse":"8.0.3",resolve:"1.17.0",semver:"7.3.2","string-width":"4.2.0",typescript:"4.0.2","unicode-regex":"3.0.0",unified:"9.2.0",vnopts:"1.0.2","yaml-unist-parser":"1.3.0"},ct={"@babel/core":"7.11.4","@babel/preset-env":"7.11.0","@babel/types":"7.11.0","@glimmer/reference":"0.59.0","@rollup/plugin-alias":"3.1.1","@rollup/plugin-babel":"5.2.0","@rollup/plugin-commonjs":"14.0.0","@rollup/plugin-json":"4.1.0","@rollup/plugin-node-resolve":"9.0.0","@rollup/plugin-replace":"2.3.3","@types/estree":"0.0.45","@types/node":"14.6.0","@typescript-eslint/types":"3.10.0","babel-loader":"8.1.0",benchmark:"2.1.4","builtin-modules":"3.1.0","cross-env":"7.0.2",cspell:"4.1.0",eslint:"7.7.0","eslint-config-prettier":"6.11.0","eslint-formatter-friendly":"7.0.0","eslint-plugin-import":"2.22.0","eslint-plugin-jest":"23.20.0","eslint-plugin-prettier-internal-rules":"file:scripts/tools/eslint-plugin-prettier-internal-rules","eslint-plugin-react":"7.20.6","eslint-plugin-unicorn":"21.0.0",execa:"4.0.3",jest:"26.4.2","jest-snapshot-serializer-ansi":"1.0.0","jest-snapshot-serializer-raw":"1.1.0","jest-watch-typeahead":"0.6.0","npm-run-all":"4.1.5",prettier:"2.1.0",rimraf:"3.0.2",rollup:"2.26.5","rollup-plugin-node-globals":"1.4.0","rollup-plugin-terser":"7.0.0",shelljs:"0.8.4","snapshot-diff":"0.8.1","strip-ansi":"6.0.0","synchronous-promise":"2.0.13",tempy:"0.6.0","terser-webpack-plugin":"4.1.0",webpack:"4.44.1"},pt={prepublishOnly:'echo "Error: must publish from dist/" && exit 1',"prepare-release":"yarn && yarn build && yarn test:dist",test:"jest","test:dev-package":"cross-env INSTALL_PACKAGE=1 jest","test:dist":"cross-env NODE_ENV=production jest","test:dist-standalone":"cross-env NODE_ENV=production TEST_STANDALONE=1 jest","test:integration":"jest tests_integration","perf:repeat":"yarn && yarn build && cross-env NODE_ENV=production node ./dist/bin-prettier.js --debug-repeat ${PERF_REPEAT:-1000} --loglevel debug ${PERF_FILE:-./index.js} > /dev/null","perf:repeat-inspect":"yarn && yarn build && cross-env NODE_ENV=production node --inspect-brk ./dist/bin-prettier.js --debug-repeat ${PERF_REPEAT:-1000} --loglevel debug ${PERF_FILE:-./index.js} > /dev/null","perf:benchmark":"yarn && yarn build && cross-env NODE_ENV=production node ./dist/bin-prettier.js --debug-benchmark --loglevel debug ${PERF_FILE:-./index.js} > /dev/null",lint:"run-p lint:*","lint:typecheck":"tsc","lint:eslint":"cross-env EFF_NO_LINK_RULES=true eslint . --format friendly","lint:changelog":"node ./scripts/lint-changelog.js","lint:prettier":'prettier . "!test*" --check',"lint:dist":'eslint --no-eslintrc --no-ignore --env=es6,browser --parser-options=ecmaVersion:2016 "dist/!(bin-prettier|index|third-party).js"',"lint:spellcheck":'cspell "**/*" ".github/**/*"',"lint:deps":"node ./scripts/check-deps.js",fix:"run-s fix:eslint fix:prettier","fix:eslint":"yarn lint:eslint --fix","fix:prettier":"yarn lint:prettier --write",build:"node ./scripts/build/build.js","build-docs":"node ./scripts/build-docs.js"},ut={name:"prettier",version:"2.1.1",description:rt,bin:at,repository:"prettier/prettier",homepage:"https://prettier.io",author:"James Long",license:"MIT",main:"./index.js",browser:"./standalone.js",unpkg:"./standalone.js",engines:nt,files:ot,dependencies:ht,devDependencies:ct,scripts:pt},lt=Object.freeze({__proto__:null,name:"prettier",version:"2.1.1",description:rt,bin:at,repository:"prettier/prettier",homepage:"https://prettier.io",author:"James Long",license:"MIT",main:"./index.js",browser:"./standalone.js",unpkg:"./standalone.js",engines:nt,files:ot,dependencies:ht,devDependencies:ct,scripts:pt,default:ut}),dt=e((function(t,e){function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]}function i(){return"undefined"!=typeof WeakMap?new WeakMap:{add:s,delete:s,get:s,set:s,has:function(t){return!1}}}Object.defineProperty(e,"__esModule",{value:!0});var r=Object.prototype.hasOwnProperty,a=function(t,e){return r.call(t,e)};function n(t,e){for(var s in e)a(e,s)&&(t[s]=e[s]);return t}var o=/^[ \t]*(?:\r\n|\r|\n)/,h=/(?:\r\n|\r|\n)[ \t]*$/,c=/^(?:[\r\n]|$)/,p=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,u=/^[ \t]*[\r\n][ \t\r\n]*$/;function l(t,e,s){var i=0,r=t[0].match(p);r&&(i=r[1].length);var a=new RegExp("(\\r\\n|\\r|\\n).{0,"+i+"}","g");e&&(t=t.slice(1));var n=s.newline,c=s.trimLeadingNewline,u=s.trimTrailingNewline,l="string"==typeof n,d=t.length;return t.map((function(t,e){return t=t.replace(a,"$1"),0===e&&c&&(t=t.replace(o,"")),e===d-1&&u&&(t=t.replace(h,"")),l&&(t=t.replace(/\r\n|\n|\r/g,(function(t){return n}))),t}))}function d(t,e){for(var s="",i=0,r=t.length;i<r;i++)s+=t[i],i<r-1&&(s+=e[i]);return s}function m(t){return a(t,"raw")&&a(t,"length")}var f=function t(e){var s=i(),r=i();return n((function i(a){for(var o=[],h=1;h<arguments.length;h++)o[h-1]=arguments[h];if(m(a)){var p=a,D=(o[0]===i||o[0]===f)&&u.test(p[0])&&c.test(p[1]),y=D?r:s,x=y.get(p);if(x||(x=l(p,D,e),y.set(p,x)),0===o.length)return x[0];var g=d(x,D?o.slice(1):o);return g}return t(n(n({},e),a||{}))}),{string:function(t){return l([t],!1,e)[0]}})}({trimLeadingNewline:!0,trimTrailingNewline:!0});e.outdent=f,e.default=f;try{t.exports=f,Object.defineProperty(f,"__esModule",{value:!0}),f.default=f,f.outdent=f}catch(t){}}));function mt(){const t=D(["\n Require either '@prettier' or '@format' to be present in the file's first docblock comment\n in order for it to be formatted.\n "]);return mt=function(){return t},t}function ft(){const t=D(["\n Format code starting at a given character offset.\n The range will extend backwards to the start of the first line containing the selected statement.\n This option cannot be used with --cursor-offset.\n "]);return ft=function(){return t},t}function Dt(){const t=D(["\n Format code ending at a given character offset (exclusive).\n The range will extend forwards to the end of the selected statement.\n This option cannot be used with --cursor-offset.\n "]);return Dt=function(){return t},t}function yt(){const t=D(["\n Custom directory that contains prettier plugins in node_modules subdirectory.\n Overrides default behavior when plugins are searched relatively to the location of Prettier.\n Multiple values are accepted.\n "]);return yt=function(){return t},t}function xt(){const t=D(["\n Maintain existing\n (mixed values within one file are normalised by looking at what's used after the first line)\n "]);return xt=function(){return t},t}function gt(){const t=D(["\n Print (to stderr) where a cursor at the given position would move to after formatting.\n This option cannot be used with --range-start and --range-end.\n "]);return gt=function(){return t},t}const{outdent:Et}=dt;var Pt={CATEGORY_CONFIG:"Config",CATEGORY_EDITOR:"Editor",CATEGORY_FORMAT:"Format",CATEGORY_OTHER:"Other",CATEGORY_OUTPUT:"Output",CATEGORY_GLOBAL:"Global",CATEGORY_SPECIAL:"Special",options:{cursorOffset:{since:"1.4.0",category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:Et(gt()),cliCategory:"Editor"},endOfLine:{since:"1.15.0",category:"Global",type:"choice",default:[{since:"1.15.0",value:"auto"},{since:"2.0.0",value:"lf"}],description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:Et(xt())}]},filepath:{since:"1.4.0",category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{since:"1.8.0",category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{since:"0.0.10",category:"Global",type:"choice",default:[{since:"0.0.10",value:"babylon"},{since:"1.13.0",value:void 0}],description:"Which parser to use.",exception:t=>"string"==typeof t||"function"==typeof t,choices:[{value:"flow",description:"Flow"},{value:"babel",since:"1.16.0",description:"JavaScript"},{value:"babel-flow",since:"1.16.0",description:"Flow"},{value:"babel-ts",since:"2.0.0",description:"TypeScript"},{value:"typescript",since:"1.4.0",description:"TypeScript"},{value:"css",since:"1.7.1",description:"CSS"},{value:"less",since:"1.7.1",description:"Less"},{value:"scss",since:"1.7.1",description:"SCSS"},{value:"json",since:"1.5.0",description:"JSON"},{value:"json5",since:"1.13.0",description:"JSON5"},{value:"json-stringify",since:"1.13.0",description:"JSON.stringify"},{value:"graphql",since:"1.5.0",description:"GraphQL"},{value:"markdown",since:"1.8.0",description:"Markdown"},{value:"mdx",since:"1.15.0",description:"MDX"},{value:"vue",since:"1.10.0",description:"Vue"},{value:"yaml",since:"1.14.0",description:"YAML"},{value:"glimmer",since:null,description:"Handlebars"},{value:"html",since:"1.15.0",description:"HTML"},{value:"angular",since:"1.15.0",description:"Angular"},{value:"lwc",since:"1.17.0",description:"Lightning Web Components"}]},plugins:{since:"1.10.0",type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:t=>"string"==typeof t||"object"==typeof t,cliName:"plugin",cliCategory:"Config"},pluginSearchDirs:{since:"1.13.0",type:"path",array:!0,default:[{value:[]}],category:"Global",description:Et(yt()),exception:t=>"string"==typeof t||"object"==typeof t,cliName:"plugin-search-dir",cliCategory:"Config"},printWidth:{since:"0.0.0",category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{since:"1.4.0",category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:Et(Dt()),cliCategory:"Editor"},rangeStart:{since:"1.4.0",category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:Et(ft()),cliCategory:"Editor"},requirePragma:{since:"1.7.0",category:"Special",type:"boolean",default:!1,description:Et(mt()),cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{since:"1.0.0",category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{since:"2.1.0",category:"Global",type:"choice",default:[{since:"2.1.0",value:"auto"}],description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}}},bt=s(lt);const Ct={compare:et,lt:st,gte:it},Tt=bt.version,At=Pt.options;var wt={getSupportInfo:function({plugins:t=[],showUnreleased:e=!1,showDeprecated:s=!1,showInternal:i=!1}={}){const r=Tt.split("-",1)[0],a=t.reduce((t,e)=>t.concat(e.languages||[]),[]).filter(c),n=(o=Object.assign({},...t.map(({options:t})=>t),At),h="name",Object.entries(o).map(([t,e])=>Object.assign({[h]:t},e))).filter(t=>c(t)&&p(t)).sort((t,e)=>t.name===e.name?0:t.name<e.name?-1:1).map((function(t){if(i)return t;return function(t,e){if(null==t)return{};var s,i,r={},a=Object.keys(t);for(i=0;i<a.length;i++)s=a[i],e.indexOf(s)>=0||(r[s]=t[s]);return r}(t,["cliName","cliCategory","cliDescription"])})).map(e=>{e=Object.assign({},e),Array.isArray(e.default)&&(e.default=1===e.default.length?e.default[0].value:e.default.filter(c).sort((t,e)=>Ct.compare(e.since,t.since))[0].value),Array.isArray(e.choices)&&(e.choices=e.choices.filter(t=>c(t)&&p(t)),"parser"===e.name&&function(t,e,s){const i=new Set(t.choices.map(t=>t.value));for(const r of e)if(r.parsers)for(const e of r.parsers)if(!i.has(e)){i.add(e);const a=s.find(t=>t.parsers&&t.parsers[e]);let n=r.name;a&&a.name&&(n+=" (plugin: ".concat(a.name,")")),t.choices.push({value:e,description:n})}}(e,a,t));const s=t.filter(t=>t.defaultOptions&&void 0!==t.defaultOptions[e.name]).reduce((t,s)=>(t[s.name]=s.defaultOptions[e.name],t),{});return Object.assign({},e,{pluginDefaults:s})});var o,h;return{languages:a,options:n};function c(t){return e||!("since"in t)||t.since&&Ct.gte(r,t.since)}function p(t){return s||!("deprecated"in t)||t.deprecated&&Ct.lt(r,t.deprecated)}}};const Nt=/[^\x20-\x7F]/;function St(t){return(e,s,i)=>{const r=i&&i.backwards;if(!1===s)return!1;const{length:a}=e;let n=s;for(;n>=0&&n<a;){const s=e.charAt(n);if(t instanceof RegExp){if(!t.test(s))return n}else if(!t.includes(s))return n;r?n--:n++}return(-1===n||n===a)&&n}}const It=St(/\s/),Ft=St(" \t"),vt=St(",; \t"),kt=St(/[^\n\r]/);function Lt(t,e){if(!1===e)return!1;if("/"===t.charAt(e)&&"*"===t.charAt(e+1))for(let s=e+2;s<t.length;++s)if("*"===t.charAt(s)&&"/"===t.charAt(s+1))return s+2;return e}function Ot(t,e){return!1!==e&&("/"===t.charAt(e)&&"/"===t.charAt(e+1)?kt(t,e):e)}function Rt(t,e,s){const i=s&&s.backwards;if(!1===e)return!1;const r=t.charAt(e);if(i){if("\r"===t.charAt(e-1)&&"\n"===r)return e-2;if("\n"===r||"\r"===r||"\u2028"===r||"\u2029"===r)return e-1}else{if("\r"===r&&"\n"===t.charAt(e+1))return e+2;if("\n"===r||"\r"===r||"\u2028"===r||"\u2029"===r)return e+1}return e}function Mt(t,e,s){const i=Ft(t,(s=s||{}).backwards?e-1:e,s);return i!==Rt(t,i,s)}function Bt(t,e){let s=null,i=e;for(;i!==s;)s=i,i=vt(t,i),i=Lt(t,i),i=Ft(t,i);return i=Ot(t,i),i=Rt(t,i),!1!==i&&Mt(t,i)}function _t(t,e){let s=null,i=e;for(;i!==s;)s=i,i=Ft(t,i),i=Lt(t,i),i=Ot(t,i),i=Rt(t,i);return i}function jt(t,e,s){return _t(t,s(e))}function Ut(t,e,s){let i=0;for(let r=s=s||0;r<t.length;++r)"\t"===t[r]?i=i+e-i%e:i++;return i}function qt(t,e){const s=t.slice(1,-1),i={quote:'"',regex:/"/g},r={quote:"'",regex:/'/g},a="'"===e?r:i,n=a===r?i:r;let o=a.quote;if(s.includes(a.quote)||s.includes(n.quote)){o=(s.match(a.regex)||[]).length>(s.match(n.regex)||[]).length?n.quote:a.quote}return o}function Vt(t,e,s){const i='"'===e?"'":'"',r=t.replace(/\\([\S\s])|(["'])/g,(t,r,a)=>r===i?r:a===e?"\\"+a:a||(s&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(r)?r:"\\"+r));return e+r+e}function zt(t){return t&&(t.comments&&t.comments.length>0&&t.comments.some(t=>Ht(t)&&!t.unignore)||t.prettierIgnore)}function Ht(t){return"prettier-ignore"===t.value.trim()}function Gt(t,e){(t.comments||(t.comments=[])).push(e),e.printed=!1,"JSXText"===t.type&&(e.printed=!0)}var Wt={replaceEndOfLineWith:function(t,e){const s=[];for(const i of t.split("\n"))0!==s.length&&s.push(e),s.push(i);return s},getStringWidth:function(t){return t?Nt.test(t)?d(t):t.length:0},getMaxContinuousCount:function(t,e){const s=t.match(new RegExp("(".concat(f(e),")+"),"g"));return null===s?0:s.reduce((t,s)=>Math.max(t,s.length/e.length),0)},getMinNotPresentContinuousCount:function(t,e){const s=t.match(new RegExp("(".concat(f(e),")+"),"g"));if(null===s)return 0;const i=new Map;let r=0;for(const t of s){const s=t.length/e.length;i.set(s,!0),s>r&&(r=s)}for(let t=1;t<r;t++)if(!i.get(t))return t;return r+1},getParserName:function(t,e){const s=wt.getSupportInfo({plugins:e.plugins}).languages.find(e=>e.name.toLowerCase()===t||e.aliases&&e.aliases.includes(t)||e.extensions&&e.extensions.some(e=>e===".".concat(t)));return s?s.parsers[0]:null},getPenultimate:t=>t[t.length-2],getLast:t=>t[t.length-1],getNextNonSpaceNonCommentCharacterIndexWithStartIndex:_t,getNextNonSpaceNonCommentCharacterIndex:jt,getNextNonSpaceNonCommentCharacter:function(t,e,s){return t.charAt(jt(t,e,s))},skip:St,skipWhitespace:It,skipSpaces:Ft,skipToLineEnd:vt,skipEverythingButNewLine:kt,skipInlineComment:Lt,skipTrailingComment:Ot,skipNewline:Rt,isNextLineEmptyAfterIndex:Bt,isNextLineEmpty:function(t,e,s){return Bt(t,s(e))},isPreviousLineEmpty:function(t,e,s){let i=s(e)-1;return i=Ft(t,i,{backwards:!0}),i=Rt(t,i,{backwards:!0}),i=Ft(t,i,{backwards:!0}),i!==Rt(t,i,{backwards:!0})},hasNewline:Mt,hasNewlineInRange:function(t,e,s){for(let i=e;i<s;++i)if("\n"===t.charAt(i))return!0;return!1},hasSpaces:function(t,e,s){return Ft(t,(s=s||{}).backwards?e-1:e,s)!==e},getAlignmentSize:Ut,getIndentSize:function(t,e){const s=t.lastIndexOf("\n");return-1===s?0:Ut(t.slice(s+1).match(/^[\t ]*/)[0],e)},getPreferredQuote:qt,printString:function(t,e,s){const i=t.slice(1,-1),r=!i.includes('"')&&!i.includes("'"),a="json"===e.parser?'"':e.__isInHtmlAttribute?"'":qt(t,e.singleQuote?"'":'"');return s?r?a+i+a:t:Vt(i,a,!("css"===e.parser||"less"===e.parser||"scss"===e.parser||e.embeddedInHtml))},printNumber:function(t){return t.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(\d)/,"$1$2$3").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")},hasIgnoreComment:function(t){return zt(t.getValue())},hasNodeIgnoreComment:zt,isNodeIgnoreComment:Ht,makeString:Vt,addLeadingComment:function(t,e){e.leading=!0,e.trailing=!1,Gt(t,e)},addDanglingComment:function(t,e,s){e.leading=!1,e.trailing=!1,s&&(e.marker=s),Gt(t,e)},addTrailingComment:function(t,e){e.leading=!1,e.trailing=!0,Gt(t,e)},isWithinParentArrayProperty:function(t,e){const s=t.getValue(),i=t.getParentNode();if(null==i)return!1;if(!Array.isArray(i[e]))return!1;const r=t.getName();return i[e][r]===s},isFrontMatterNode:function(t){return t&&"front-matter"===t.type},getShebang:function(t){if(!t.startsWith("#!"))return"";const e=t.indexOf("\n");return-1===e?t:t.slice(0,e)}};var Xt={guessEndOfLine:function(t){const e=t.indexOf("\r");return e>=0?"\n"===t.charAt(e+1)?"crlf":"cr":"lf"},convertEndOfLineToChars:function(t){switch(t){case"cr":return"\r";case"crlf":return"\r\n";default:return"\n"}},countEndOfLineChars:function(t,e){let s;if("\n"===e)s=/\n/g;else if("\r"===e)s=/\r/g;else{if("\r\n"!==e)throw new Error('Unexpected "eol" '.concat(JSON.stringify(e),"."));s=/\r\n/g}const i=t.match(s);return i?i.length:0},normalizeEndOfLine:function(t){return t.replace(/\r\n?/g,"\n")}};const{parseWithComments:Kt,strip:$t,extract:Jt,print:Yt}=o,{getShebang:Qt}=Wt,{normalizeEndOfLine:Zt}=Xt;function te(t){const e=Qt(t);e&&(t=t.slice(e.length+1));const s=Jt(t),{pragmas:i,comments:r}=Kt(s);return{shebang:e,text:t,pragmas:i,comments:r}}var ee={hasPragma:function(t){const e=Object.keys(te(t).pragmas);return e.includes("prettier")||e.includes("format")},insertPragma:function(t){const{shebang:e,text:s,pragmas:i,comments:r}=te(t),a=$t(s),n=Yt({pragmas:Object.assign({format:""},i),comments:r.trimStart()});return(e?"".concat(e,"\n"):"")+Zt(n)+(a.startsWith("\n")?"\n":"\n\n")+a}};function se(t,e){const{ignoreDecorators:s}=e||{};if(!s){const e=t.declaration&&t.declaration.decorators||t.decorators;if(e&&e.length>0)return se(e[0])}return t.range?t.range[0]:t.start}function ie(t){const e=t.range?t.range[1]:t.end;return t.typeAnnotation?Math.max(e,ie(t.typeAnnotation)):e}var re={locStart:se,locEnd:ie,composeLoc:function(t,e=t){const s=se(t);return[s,"number"==typeof e?s+e:ie(e)]}};const{getLast:ae,hasNewline:ne,getNextNonSpaceNonCommentCharacterIndexWithStartIndex:oe,getNextNonSpaceNonCommentCharacter:he,hasNewlineInRange:ce,isNodeIgnoreComment:pe,addLeadingComment:ue,addTrailingComment:le,addDanglingComment:de,getNextNonSpaceNonCommentCharacterIndex:me}=Wt;function fe(t,e){const s=(t.body||t.properties).filter(t=>"EmptyStatement"!==t.type);0===s.length?de(t,e):ue(s[0],e)}function De(t,e){"BlockStatement"===t.type?fe(t,e):ue(t,e)}function ye(t,e,s,i,r,a){if(!s||"IfStatement"!==s.type||!i)return!1;return")"===he(t,r,a.locEnd)?(le(e,r),!0):e===s.consequent&&i===s.alternate?("BlockStatement"===e.type?le(e,r):de(s,r),!0):"BlockStatement"===i.type?(fe(i,r),!0):"IfStatement"===i.type?(De(i.consequent,r),!0):s.consequent===i&&(ue(i,r),!0)}function xe(t,e,s,i,r,a){if(!s||"WhileStatement"!==s.type||!i)return!1;return")"===he(t,r,a.locEnd)?(le(e,r),!0):"BlockStatement"===i.type&&(fe(i,r),!0)}function ge(t,e,s,i){return!(!t||"TryStatement"!==t.type&&"CatchClause"!==t.type||!s)&&("CatchClause"===t.type&&e?(le(e,i),!0):"BlockStatement"===s.type?(fe(s,i),!0):"TryStatement"===s.type?(De(s.finalizer,i),!0):"CatchClause"===s.type&&(De(s.body,i),!0))}function Ee(t,e,s,i){if(t&&("ClassDeclaration"===t.type||"ClassExpression"===t.type||"DeclareClass"===t.type||"DeclareInterface"===t.type||"InterfaceDeclaration"===t.type||"TSInterfaceDeclaration"===t.type)){if(t.decorators&&t.decorators.length>0&&(!s||"Decorator"!==s.type))return le(t.decorators[t.decorators.length-1],i),!0;if(t.body&&s===t.body)return fe(t.body,i),!0;if(s)for(const r of["implements","extends","mixins"])if(t[r]&&s===t[r][0])return!e||e!==t.id&&e!==t.typeParameters&&e!==t.superClass?de(t,i,r):le(e,i),!0}return!1}function Pe(t,e,s,i,r){return(e&&s&&("Property"===e.type||"TSDeclareMethod"===e.type||"TSAbstractMethodDefinition"===e.type)&&"Identifier"===s.type&&e.key===s&&":"!==he(t,s,r.locEnd)||!(!s||!e||"Decorator"!==s.type||"ClassMethod"!==e.type&&"ClassProperty"!==e.type&&"TSAbstractClassProperty"!==e.type&&"TSAbstractMethodDefinition"!==e.type&&"TSDeclareMethod"!==e.type&&"MethodDefinition"!==e.type))&&(le(s,i),!0)}function be(t,e,s,i,r,a){if(e&&"FunctionTypeParam"===e.type&&s&&"FunctionTypeAnnotation"===s.type&&i&&"FunctionTypeParam"!==i.type)return le(e,r),!0;if(e&&("Identifier"===e.type||"AssignmentPattern"===e.type)&&s&&Ne(s)&&")"===he(t,r,a.locEnd))return le(e,r),!0;if(s&&"FunctionDeclaration"===s.type&&i&&"BlockStatement"===i.type){const e=(()=>{if(0!==(s.params||s.parameters).length)return oe(t,a.locEnd(ae(s.params||s.parameters)));const e=oe(t,a.locEnd(s.id));return!1!==e&&oe(t,e+1)})();if(a.locStart(r)>e)return fe(i,r),!0}return!1}function Ce(t,e){return!(!t||"ImportSpecifier"!==t.type)&&(ue(t,e),!0)}function Te(t,e){return!(!t||"LabeledStatement"!==t.type)&&(ue(t,e),!0)}function Ae(t,e,s,i){return e&&e.body&&0===e.body.length?(i?de(e,s):ue(e,s),!0):!(!t||"Program"!==t.type||0!==t.body.length||!t.directives||0!==t.directives.length)&&(i?de(t,s):ue(t,s),!0)}function we(t){return"Block"===t.type||"CommentBlock"===t.type}function Ne(t){return"ArrowFunctionExpression"===t.type||"FunctionExpression"===t.type||"FunctionDeclaration"===t.type||"ObjectMethod"===t.type||"ClassMethod"===t.type||"TSDeclareFunction"===t.type||"TSCallSignatureDeclaration"===t.type||"TSConstructSignatureDeclaration"===t.type||"TSConstructSignatureDeclaration"===t.type||"TSMethodSignature"===t.type||"TSConstructorType"===t.type||"TSFunctionType"===t.type||"TSDeclareMethod"===t.type}function Se(t){return we(t)&&"*"===t.value[0]&&/@type\b/.test(t.value)}var Ie={handleOwnLineComment:function(t,e,s,i,r){const{precedingNode:a,enclosingNode:n,followingNode:o}=t;return be(e,a,n,o,t,s)||function(t,e,s){if(t&&("MemberExpression"===t.type||"OptionalMemberExpression"===t.type)&&e&&"Identifier"===e.type)return ue(t,s),!0;return!1}(n,o,t)||ye(e,a,n,o,t,s)||xe(e,a,n,o,t,s)||ge(n,a,o,t)||Ee(n,a,o,t)||Ce(n,t)||function(t,e,s){if(t&&("ForInStatement"===t.type||"ForOfStatement"===t.type))return ue(t,s),!0;return!1}(n,0,t)||function(t,e,s,i){if(e&&("UnionTypeAnnotation"===e.type||"TSUnionType"===e.type))return pe(i)&&(s.prettierIgnore=!0,i.unignore=!0),!!t&&(le(t,i),!0);s&&("UnionTypeAnnotation"===s.type||"TSUnionType"===s.type)&&pe(i)&&(s.types[0].prettierIgnore=!0,i.unignore=!0);return!1}(a,n,o,t)||Ae(n,i,t,r)||function(t,e,s,i,r){if(s&&"ImportSpecifier"===s.type&&e&&"ImportDeclaration"===e.type&&ne(t,r.locEnd(i)))return le(s,i),!0;return!1}(e,n,a,t,s)||function(t,e){if(t&&"AssignmentPattern"===t.type)return ue(t,e),!0;return!1}(n,t)||Pe(e,n,a,t,s)||Te(n,t)},handleEndOfLineComment:function(t,e,s,i,r){const{precedingNode:a,enclosingNode:n,followingNode:o}=t;return function(t,e){if(t&&Se(e))return ue(t,e),!0;return!1}(o,t)||be(e,a,n,o,t,s)||function(t,e,s,i,r,a){const n=e&&!ce(r,a.locEnd(e),a.locStart(i));if((!e||!n)&&t&&("ConditionalExpression"===t.type||"TSConditionalType"===t.type)&&s)return ue(s,i),!0;return!1}(n,a,o,t,e,s)||Ce(n,t)||ye(e,a,n,o,t,s)||xe(e,a,n,o,t,s)||ge(n,a,o,t)||Ee(n,a,o,t)||Te(n,t)||function(t,e,s){if(e&&("CallExpression"===e.type||"OptionalCallExpression"===e.type)&&t&&e.callee===t&&e.arguments.length>0)return ue(e.arguments[0],s),!0;return!1}(a,n,t)||function(t,e){if(t&&("Property"===t.type||"ObjectProperty"===t.type))return ue(t,e),!0;return!1}(n,t)||Ae(n,i,t,r)||function(t,e,s){if(t&&"TypeAlias"===t.type)return ue(t,s),!0;return!1}(n,0,t)||function(t,e,s){if(t&&("VariableDeclarator"===t.type||"AssignmentExpression"===t.type)&&e&&("ObjectExpression"===e.type||"ArrayExpression"===e.type||"TemplateLiteral"===e.type||"TaggedTemplateExpression"===e.type||we(s)))return ue(e,s),!0;return!1}(n,o,t)},handleRemainingComment:function(t,e,s,i,r){const{precedingNode:a,enclosingNode:n,followingNode:o}=t;return!!(ye(e,a,n,o,t,s)||xe(e,a,n,o,t,s)||function(t,e,s){if(t&&("ObjectProperty"===t.type||"Property"===t.type)&&t.shorthand&&t.key===e&&"AssignmentPattern"===t.value.type)return le(t.value.left,s),!0;return!1}(n,a,t)||function(t,e,s,i){if(")"!==he(t,s,i.locEnd))return!1;if(e&&(Ne(e)&&0===(e.params||e.parameters).length||("CallExpression"===e.type||"OptionalCallExpression"===e.type||"NewExpression"===e.type)&&0===e.arguments.length))return de(e,s),!0;if(e&&"MethodDefinition"===e.type&&0===e.value.params.length)return de(e.value,s),!0;return!1}(e,n,t,s)||Pe(e,n,a,t,s)||Ae(n,i,t,r)||function(t,e,s,i){if(!e||"ArrowFunctionExpression"!==e.type)return!1;const r=me(t,s,i.locEnd);if(!1!==r&&"=>"===t.slice(r,r+2))return de(e,s),!0;return!1}(e,n,t,s)||function(t,e,s,i,r){if("("!==he(t,i,r.locEnd))return!1;if(s&&e&&("FunctionDeclaration"===e.type||"FunctionExpression"===e.type||"ClassMethod"===e.type||"MethodDefinition"===e.type||"ObjectMethod"===e.type))return le(s,i),!0;return!1}(e,n,a,t,s)||function(t,e,s,i,r){if(!e||"TSMappedType"!==e.type)return!1;if(i&&"TSTypeParameter"===i.type&&i.name)return ue(i.name,r),!0;if(s&&"TSTypeParameter"===s.type&&s.constraint)return le(s.constraint,r),!0;return!1}(0,n,a,o,t)||function(t,e){if(t&&("ContinueStatement"===t.type||"BreakStatement"===t.type)&&!t.label)return le(t,e),!0;return!1}(n,t)||function(t,e,s,i,r){if(!s&&e&&("TSMethodSignature"===e.type||"TSDeclareFunction"===e.type||"TSAbstractMethodDefinition"===e.type)&&";"===he(t,i,r.locEnd))return le(e,i),!0;return!1}(e,n,o,t,s))},hasLeadingComment:function(t,e=(()=>!0)){return t.leadingComments?t.leadingComments.some(e):!!t.comments&&t.comments.some(t=>t.leading&&e(t))},isBlockComment:we,isTypeCastComment:Se,getGapRegex:function(t){if(t&&"BinaryExpression"!==t.type&&"LogicalExpression"!==t.type)return/^[\s&(|]*$/},getCommentChildNodes:function(t,e){if(("typescript"===e.parser||"flow"===e.parser)&&"MethodDefinition"===t.type&&t.value&&"FunctionExpression"===t.value.type&&0===t.value.params.length&&!t.value.returnType&&(!t.value.typeParameters||0===t.value.typeParameters.length)&&t.value.body)return[...t.decorators||[],t.key,t.value.body]}};const{getLast:Fe,getNextNonSpaceNonCommentCharacter:ve,getShebang:ke}=Wt,{composeLoc:Le,locStart:Oe,locEnd:Re}=re,{isTypeCastComment:Me}=Ie;function Be(t,e){let s;if(Array.isArray(t))s=t.entries();else{if(!t||"object"!=typeof t||"string"!=typeof t.type)return t;s=Object.entries(t)}for(const[i,r]of s)t[i]=Be(r,e);return e(t)||t}function _e(t){return"LogicalExpression"===t.type&&"LogicalExpression"===t.right.type&&t.operator===t.right.operator}var je=function(t,e){if("typescript"!==e.parser&&"flow"!==e.parser||function(t,e){const s=ke(e.originalText);s&&t.comments.unshift({type:"Line",value:s.slice(2),range:[0,s.length]})}(t,e),"typescript"!==e.parser&&"flow"!==e.parser){const e=new Set;t=Be(t,t=>{t.leadingComments&&t.leadingComments.some(Me)&&e.add(Oe(t))}),t=Be(t,t=>{if("ParenthesizedExpression"===t.type){const s=Oe(t);if(!e.has(s)){const{expression:e}=t;return e.extra||(e.extra={}),e.extra.parenthesized=!0,e.extra.parenStart=s,e}}})}return t=Be(t,t=>{switch(t.type){case"LogicalExpression":if(_e(t))return function t(e){if(!_e(e))return e;return t({type:"LogicalExpression",operator:e.operator,left:t({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:Le(e.left,e.right.left)}),right:e.right.right,range:Le(e)})}(t);break;case"VariableDeclaration":{const s=Fe(t.declarations);s&&s.init&&function(t,s){if(";"===e.originalText[Re(s)])return;t.range=Le(t,s)}(t,s);break}case"TSParenthesizedType":return t.typeAnnotation.range=Le(t),t.typeAnnotation;case"TSUnionType":case"TSIntersectionType":if(1===t.types.length){const[e]=t.types;return e.range=Le(t),e}break;case"TSTypeParameter":"string"==typeof t.name&&(t.name={type:"Identifier",name:t.name,range:Le(t,t.name.length)});break;case"SequenceExpression":{const e=Fe(t.expressions);Re(t)>Re(e)&&(t.range=Le(t,e));break}case"ClassProperty":t.key&&"TSPrivateIdentifier"===t.key.type&&"?"===ve(e.originalText,t.key,Re)&&(t.optional=!0)}})},Ue=e((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});class s{constructor(t,e={}){this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.rightAssociative=!!e.rightAssociative,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=null!=e.binop?e.binop:null,this.updateContext=null}}const i=new Map;function r(t,e={}){e.keyword=t;const r=new s(t,e);return i.set(t,r),r}function a(t,e){return new s(t,{beforeExpr:true,binop:e})}const n={num:new s("num",{startsExpr:true}),bigint:new s("bigint",{startsExpr:true}),decimal:new s("decimal",{startsExpr:true}),regexp:new s("regexp",{startsExpr:true}),string:new s("string",{startsExpr:true}),name:new s("name",{startsExpr:true}),eof:new s("eof"),bracketL:new s("[",{beforeExpr:true,startsExpr:true}),bracketHashL:new s("#[",{beforeExpr:true,startsExpr:true}),bracketBarL:new s("[|",{beforeExpr:true,startsExpr:true}),bracketR:new s("]"),bracketBarR:new s("|]"),braceL:new s("{",{beforeExpr:true,startsExpr:true}),braceBarL:new s("{|",{beforeExpr:true,startsExpr:true}),braceHashL:new s("#{",{beforeExpr:true,startsExpr:true}),braceR:new s("}"),braceBarR:new s("|}"),parenL:new s("(",{beforeExpr:true,startsExpr:true}),parenR:new s(")"),comma:new s(",",{beforeExpr:true}),semi:new s(";",{beforeExpr:true}),colon:new s(":",{beforeExpr:true}),doubleColon:new s("::",{beforeExpr:true}),dot:new s("."),question:new s("?",{beforeExpr:true}),questionDot:new s("?."),arrow:new s("=>",{beforeExpr:true}),template:new s("template"),ellipsis:new s("...",{beforeExpr:true}),backQuote:new s("`",{startsExpr:true}),dollarBraceL:new s("${",{beforeExpr:true,startsExpr:true}),at:new s("@"),hash:new s("#",{startsExpr:true}),interpreterDirective:new s("#!..."),eq:new s("=",{beforeExpr:true,isAssign:true}),assign:new s("_=",{beforeExpr:true,isAssign:true}),incDec:new s("++/--",{prefix:true,postfix:!0,startsExpr:true}),bang:new s("!",{beforeExpr:true,prefix:true,startsExpr:true}),tilde:new s("~",{beforeExpr:true,prefix:true,startsExpr:true}),pipeline:a("|>",0),nullishCoalescing:a("??",1),logicalOR:a("||",1),logicalAND:a("&&",2),bitwiseOR:a("|",3),bitwiseXOR:a("^",4),bitwiseAND:a("&",5),equality:a("==/!=/===/!==",6),relational:a("</>/<=/>=",7),bitShift:a("<</>>/>>>",8),plusMin:new s("+/-",{beforeExpr:true,binop:9,prefix:true,startsExpr:true}),modulo:new s("%",{beforeExpr:true,binop:10,startsExpr:true}),star:a("*",10),slash:a("/",10),exponent:new s("**",{beforeExpr:true,binop:11,rightAssociative:!0}),_break:r("break"),_case:r("case",{beforeExpr:true}),_catch:r("catch"),_continue:r("continue"),_debugger:r("debugger"),_default:r("default",{beforeExpr:true}),_do:r("do",{isLoop:true,beforeExpr:true}),_else:r("else",{beforeExpr:true}),_finally:r("finally"),_for:r("for",{isLoop:true}),_function:r("function",{startsExpr:true}),_if:r("if"),_return:r("return",{beforeExpr:true}),_switch:r("switch"),_throw:r("throw",{beforeExpr:true,prefix:true,startsExpr:true}),_try:r("try"),_var:r("var"),_const:r("const"),_while:r("while",{isLoop:true}),_with:r("with"),_new:r("new",{beforeExpr:true,startsExpr:true}),_this:r("this",{startsExpr:true}),_super:r("super",{startsExpr:true}),_class:r("class",{startsExpr:true}),_extends:r("extends",{beforeExpr:true}),_export:r("export"),_import:r("import",{startsExpr:true}),_null:r("null",{startsExpr:true}),_true:r("true",{startsExpr:true}),_false:r("false",{startsExpr:true}),_in:r("in",{beforeExpr:true,binop:7}),_instanceof:r("instanceof",{beforeExpr:true,binop:7}),_typeof:r("typeof",{beforeExpr:true,prefix:true,startsExpr:true}),_void:r("void",{beforeExpr:true,prefix:true,startsExpr:true}),_delete:r("delete",{beforeExpr:true,prefix:true,startsExpr:true})},o=/\r\n?|[\n\u2028\u2029]/,h=new RegExp(o.source,"g");function c(t){switch(t){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}const p=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function u(t){switch(t){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}class l{constructor(t,e){this.line=t,this.column=e}}class d{constructor(t,e){this.start=t,this.end=e}}function m(t){return t[t.length-1]}const f=Object.freeze({ArgumentsDisallowedInInitializer:"'arguments' is not allowed in class field initializer",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function",AwaitExpressionFormalParameter:"await is not allowed in async function parameters",AwaitNotInAsyncFunction:"Can not use keyword 'await' outside an async function",BadGetterArity:"getter must not have any formal parameters",BadSetterArity:"setter must have exactly one formal parameter",BadSetterRestParameter:"setter function argument must not be a rest parameter",ConstructorClassField:"Classes may not have a field named 'constructor'",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'",ConstructorIsAccessor:"Class constructor may not be an accessor",ConstructorIsAsync:"Constructor can't be an async function",ConstructorIsGenerator:"Constructor can't be a generator",DeclarationMissingInitializer:"%0 require an initialization value",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.",DecoratorSemicolon:"Decorators must not be followed by a semicolon",DeletePrivateField:"Deleting a private field is not allowed",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:"`%0` has already been exported. Exported identifiers must be unique.",DuplicateProto:"Redefinition of __proto__ property",DuplicateRegExpFlags:"Duplicate regular expression flag",ElementAfterRest:"Rest element must be last element",EscapedCharNotAnIdentifier:"Invalid Unicode escape",ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block",IllegalBreakContinue:"Unsyntactic %0",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"'return' outside of function",ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments",ImportCallArity:"import() requires exactly %0",ImportCallNotNewExpression:"Cannot use new with import(...)",ImportCallSpreadArgument:"... is not allowed in import()",ImportMetaOutsideModule:"import.meta may appear only with 'sourceType: \"module\"'",ImportOutsideModule:"'import' and 'export' may appear only with 'sourceType: \"module\"'",InvalidBigIntLiteral:"Invalid BigIntLiteral",InvalidCodePoint:"Code point out of bounds",InvalidDecimal:"Invalid decimal",InvalidDigit:"Expected number in radix %0",InvalidEscapeSequence:"Bad character escape sequence",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template",InvalidEscapedReservedWord:"Escape sequence in keyword %0",InvalidIdentifier:"Invalid identifier %0",InvalidLhs:"Invalid left-hand side in %0",InvalidLhsBinding:"Binding invalid left-hand side in %0",InvalidNumber:"Invalid number",InvalidOrUnexpectedToken:"Unexpected character '%0'",InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern",InvalidPrivateFieldResolution:"Private name #%0 is not defined",InvalidPropertyBindingPattern:"Binding member expression",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions",InvalidRestAssignmentPattern:"Invalid rest operator's argument",LabelRedeclaration:"Label '%0' is already declared",LetInLexicalBinding:"'let' is not allowed to be used as a name in 'let' or 'const' declarations.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'",MalformedRegExpFlags:"Invalid regular expression flag",MissingClassName:"A class name is required",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values",ModuleAttributesWithDuplicateKeys:'Duplicate key "%0" is not allowed in module attributes',ModuleExportUndefined:"Export '%0' is not defined",MultipleDefaultsInSwitch:"Multiple default clauses",NewlineAfterThrow:"Illegal newline after throw",NoCatchOrFinally:"Missing catch or finally clause",NumberIdentifier:"Identifier directly after number",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences",ObsoleteAwaitStar:"await* has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"constructors in/after an Optional Chain are not allowed",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain",ParamDupe:"Argument name clash",PatternHasAccessor:"Object pattern can't contain getter or setter",PatternHasMethod:"Object pattern can't contain methods",PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding",PrimaryTopicRequiresSmartPipeline:"Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option.",PrivateInExpectedIn:"Private names are only allowed in property accesses (`obj.#%0`) or in `in` expressions (`#%0 in obj`)",PrivateNameRedeclaration:"Duplicate private name #%0",RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'",RecordNoProto:"'__proto__' is not allowed in Record expressions",RestTrailingComma:"Unexpected trailing comma after rest element",SloppyFunction:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement",StaticPrototype:"Classes may not have static property named prototype",StrictDelete:"Deleting local variable in strict mode",StrictEvalArguments:"Assigning to '%0' in strict mode",StrictEvalArgumentsBinding:"Binding '%0' in strict mode",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode",StrictWith:"'with' in strict mode",SuperNotAllowed:"super() is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super",TrailingDecorator:"Decorators must be attached to a class element",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal',UnexpectedDigitAfterHash:"Unexpected digit after hash token",UnexpectedImportExport:"'import' and 'export' may only appear at the top level",UnexpectedKeyword:"Unexpected keyword '%0'",UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context",UnexpectedNewTarget:"new.target can only be used in functions",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits",UnexpectedPrivateField:"Private names can only be used as the name of a class element (i.e. class C { #p = 42; #m() {} } )\n or a property of member expression (i.e. this.#p).",UnexpectedReservedWord:"Unexpected reserved word '%0'",UnexpectedSuper:"super is only allowed in object methods and classes",UnexpectedToken:"Unexpected token '%0'",UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"import can only be used in import() or import.meta",UnsupportedMetaProperty:"The only valid meta property for %0 is %0.%1",UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties",UnsupportedSuper:"super can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop])",UnterminatedComment:"Unterminated comment",UnterminatedRegExp:"Unterminated regular expression",UnterminatedString:"Unterminated string constant",UnterminatedTemplate:"Unterminated template",VarRedeclaration:"Identifier '%0' has already been declared",YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator",YieldInParameter:"yield is not allowed in generator parameters",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0"});function D(t){return null!=t&&"Property"===t.type&&"init"===t.kind&&!1===t.method}class y{constructor(t,e,s,i){this.token=t,this.isExpr=!!e,this.preserveSpace=!!s,this.override=i}}const x={braceStatement:new y("{",!1),braceExpression:new y("{",!0),templateQuasi:new y("${",!1),parenStatement:new y("(",!1),parenExpression:new y("(",!0),template:new y("`",!0,!0,t=>t.readTmplToken()),functionExpression:new y("function",!0),functionStatement:new y("function",!1)};n.parenR.updateContext=n.braceR.updateContext=function(){if(1===this.state.context.length)return void(this.state.exprAllowed=!0);let t=this.state.context.pop();t===x.braceStatement&&"function"===this.curContext().token&&(t=this.state.context.pop()),this.state.exprAllowed=!t.isExpr},n.name.updateContext=function(t){let e=!1;t!==n.dot&&("of"===this.state.value&&!this.state.exprAllowed&&t!==n._function&&t!==n._class||"yield"===this.state.value&&this.prodParam.hasYield)&&(e=!0),this.state.exprAllowed=e,this.state.isIterator&&(this.state.isIterator=!1)},n.braceL.updateContext=function(t){this.state.context.push(this.braceIsBlock(t)?x.braceStatement:x.braceExpression),this.state.exprAllowed=!0},n.dollarBraceL.updateContext=function(){this.state.context.push(x.templateQuasi),this.state.exprAllowed=!0},n.parenL.updateContext=function(t){const e=t===n._if||t===n._for||t===n._with||t===n._while;this.state.context.push(e?x.parenStatement:x.parenExpression),this.state.exprAllowed=!0},n.incDec.updateContext=function(){},n._function.updateContext=n._class.updateContext=function(t){t===n.dot||t===n.questionDot||(!t.beforeExpr||t===n.semi||t===n._else||t===n._return&&o.test(this.input.slice(this.state.lastTokEnd,this.state.start))||(t===n.colon||t===n.braceL)&&this.curContext()===x.b_stat?this.state.context.push(x.functionStatement):this.state.context.push(x.functionExpression)),this.state.exprAllowed=!1},n.backQuote.updateContext=function(){this.curContext()===x.template?this.state.context.pop():this.state.context.push(x.template),this.state.exprAllowed=!1},n.star.updateContext=function(){this.state.exprAllowed=!1};let g="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࣇऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-鿼ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-ꟊꟵ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",E="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿᫀᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_";const P=new RegExp("["+g+"]"),b=new RegExp("["+g+E+"]");g=E=null;const C=[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,157,310,10,21,11,7,153,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,107,20,28,22,13,52,76,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,85,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,230,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,35,56,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,190,0,80,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,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,8952,286,50,2,18,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,2357,44,11,6,17,0,370,43,1301,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,42717,35,4148,12,221,3,5761,15,7472,3104,541,1507,4938],T=[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,154,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,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,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,5319,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,262,6,10,9,419,13,1495,6,110,6,6,9,4759,9,787719,239];function A(t,e){let s=65536;for(let i=0,r=e.length;i<r;i+=2){if(s+=e[i],s>t)return!1;if(s+=e[i+1],s>=t)return!0}return!1}function w(t){return t<65?36===t:t<=90||(t<97?95===t:t<=122||(t<=65535?t>=170&&P.test(String.fromCharCode(t)):A(t,C)))}function N(t){return t<48?36===t:t<58||!(t<65)&&(t<=90||(t<97?95===t:t<=122||(t<=65535?t>=170&&b.test(String.fromCharCode(t)):A(t,C)||A(t,T))))}const S=["implements","interface","let","package","private","protected","public","static","yield"],I=["eval","arguments"],F=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"]),v=new Set(S),k=new Set(I);function L(t,e){return e&&"await"===t||"enum"===t}function O(t,e){return L(t,e)||v.has(t)}function R(t){return k.has(t)}function M(t,e){return O(t,e)||R(t)}const B=/^in(stanceof)?$/;const _=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),j=Object.freeze({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module",AssignReservedType:"Cannot overwrite reserved type %0",DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement",EnumBooleanMemberNotInitialized:"Boolean enum members need to be initialized. Use either `%0 = true,` or `%0 = false,` in enum `%1`.",EnumDuplicateMemberName:"Enum member names need to be unique, but the name `%0` has already been used before in enum `%1`.",EnumInconsistentMemberValues:"Enum `%0` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.",EnumInvalidExplicitType:"Enum type `%1` is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.",EnumInvalidExplicitTypeUnknownSupplied:"Supplied enum type is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.",EnumInvalidMemberInitializerPrimaryType:"Enum `%0` has type `%2`, so the initializer of `%1` needs to be a %2 literal.",EnumInvalidMemberInitializerSymbolType:"Symbol enum members cannot be initialized. Use `%1,` in enum `%0`.",EnumInvalidMemberInitializerUnknownType:"The enum member initializer for `%1` needs to be a literal (either a boolean, number, or string) in enum `%0`.",EnumInvalidMemberName:"Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `%0`, consider using `%1`, in enum `%2`.",EnumNumberMemberNotInitialized:"Number enum members need to be initialized, e.g. `%1 = 1` in enum `%0`.",EnumStringMemberInconsistentlyInitailized:"String enum members need to consistently either all use initializers, or use no initializers, in enum `%0`.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions",InexactVariance:"Explicit inexact syntax cannot have variance",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`",NestedFlowComment:"Cannot have a flow comment inside another flow comment",OptionalBindingPattern:"A binding pattern parameter cannot be optional in an implementation signature.",SpreadVariance:"Spread properties cannot have variance",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object",UnexpectedReservedType:"Unexpected reserved type %0",UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint"',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration",UnsupportedDeclareExportKind:"`declare export %0` is not supported. Use `%1` instead",UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module",UnterminatedFlowComment:"Unterminated flow-comment"});function U(t){return"type"===t.importKind||"typeof"===t.importKind}function q(t){return(t.type===n.name||!!t.type.keyword)&&"from"!==t.value}const V={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};const z=/\*?\s*@((?:no)?flow)\b/;const H={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},G=/^[\da-fA-F]+$/,W=/^\d+$/,X=Object.freeze({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression",MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>",MissingClosingTagElement:"Expected corresponding JSX closing tag for <%0>",UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text",UnterminatedJsxContent:"Unterminated JSX contents",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"});function K(t){return!!t&&("JSXOpeningFragment"===t.type||"JSXClosingFragment"===t.type)}function $(t){if("JSXIdentifier"===t.type)return t.name;if("JSXNamespacedName"===t.type)return t.namespace.name+":"+t.name.name;if("JSXMemberExpression"===t.type)return $(t.object)+"."+$(t.property);throw new Error("Node had unexpected type: "+t.type)}x.j_oTag=new y("<tag",!1),x.j_cTag=new y("</tag",!1),x.j_expr=new y("<tag>...</tag>",!0,!0),n.jsxName=new s("jsxName"),n.jsxText=new s("jsxText",{beforeExpr:!0}),n.jsxTagStart=new s("jsxTagStart",{startsExpr:!0}),n.jsxTagEnd=new s("jsxTagEnd"),n.jsxTagStart.updateContext=function(){this.state.context.push(x.j_expr),this.state.context.push(x.j_oTag),this.state.exprAllowed=!1},n.jsxTagEnd.updateContext=function(t){const e=this.state.context.pop();e===x.j_oTag&&t===n.slash||e===x.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===x.j_expr):this.state.exprAllowed=!0};class J{constructor(t){this.var=[],this.lexical=[],this.functions=[],this.flags=t}}class Y{constructor(t,e){this.scopeStack=[],this.undefinedExports=new Map,this.undefinedPrivateNames=new Map,this.raise=t,this.inModule=e}get inFunction(){return(2&this.currentVarScope().flags)>0}get allowSuper(){return(16&this.currentThisScope().flags)>0}get allowDirectSuper(){return(32&this.currentThisScope().flags)>0}get inClass(){return(64&this.currentThisScope().flags)>0}get inNonArrowFunction(){return(2&this.currentThisScope().flags)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(t){return new J(t)}enter(t){this.scopeStack.push(this.createScope(t))}exit(){this.scopeStack.pop()}treatFunctionsAsVarInScope(t){return!!(2&t.flags||!this.inModule&&1&t.flags)}declareName(t,e,s){let i=this.currentScope();if(8&e||16&e)this.checkRedeclarationInScope(i,t,e,s),16&e?i.functions.push(t):i.lexical.push(t),8&e&&this.maybeExportDefined(i,t);else if(4&e)for(let r=this.scopeStack.length-1;r>=0&&(i=this.scopeStack[r],this.checkRedeclarationInScope(i,t,e,s),i.var.push(t),this.maybeExportDefined(i,t),!(131&i.flags));--r);this.inModule&&1&i.flags&&this.undefinedExports.delete(t)}maybeExportDefined(t,e){this.inModule&&1&t.flags&&this.undefinedExports.delete(e)}checkRedeclarationInScope(t,e,s,i){this.isRedeclaredInScope(t,e,s)&&this.raise(i,f.VarRedeclaration,e)}isRedeclaredInScope(t,e,s){return!!(1&s)&&(8&s?t.lexical.indexOf(e)>-1||t.functions.indexOf(e)>-1||t.var.indexOf(e)>-1:16&s?t.lexical.indexOf(e)>-1||!this.treatFunctionsAsVarInScope(t)&&t.var.indexOf(e)>-1:t.lexical.indexOf(e)>-1&&!(8&t.flags&&t.lexical[0]===e)||!this.treatFunctionsAsVarInScope(t)&&t.functions.indexOf(e)>-1)}checkLocalExport(t){-1===this.scopeStack[0].lexical.indexOf(t.name)&&-1===this.scopeStack[0].var.indexOf(t.name)&&-1===this.scopeStack[0].functions.indexOf(t.name)&&this.undefinedExports.set(t.name,t.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScope(){for(let t=this.scopeStack.length-1;;t--){const e=this.scopeStack[t];if(131&e.flags)return e}}currentThisScope(){for(let t=this.scopeStack.length-1;;t--){const e=this.scopeStack[t];if((131&e.flags||64&e.flags)&&!(4&e.flags))return e}}}class Q extends J{constructor(...t){super(...t),this.types=[],this.enums=[],this.constEnums=[],this.classes=[],this.exportOnlyBindings=[]}}class Z extends Y{createScope(t){return new Q(t)}declareName(t,e,s){const i=this.currentScope();if(1024&e)return this.maybeExportDefined(i,t),void i.exportOnlyBindings.push(t);super.declareName(...arguments),2&e&&(1&e||(this.checkRedeclarationInScope(i,t,e,s),this.maybeExportDefined(i,t)),i.types.push(t)),256&e&&i.enums.push(t),512&e&&i.constEnums.push(t),128&e&&i.classes.push(t)}isRedeclaredInScope(t,e,s){if(t.enums.indexOf(e)>-1){if(256&s){return!!(512&s)!==t.constEnums.indexOf(e)>-1}return!0}return 128&s&&t.classes.indexOf(e)>-1?t.lexical.indexOf(e)>-1&&!!(1&s):!!(2&s&&t.types.indexOf(e)>-1)||super.isRedeclaredInScope(...arguments)}checkLocalExport(t){-1===this.scopeStack[0].types.indexOf(t.name)&&-1===this.scopeStack[0].exportOnlyBindings.indexOf(t.name)&&super.checkLocalExport(t)}}class tt{constructor(){this.stacks=[]}enter(t){this.stacks.push(t)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(2&this.currentFlags())>0}get hasYield(){return(1&this.currentFlags())>0}get hasReturn(){return(4&this.currentFlags())>0}}function et(t,e){return(t?2:0)|(e?1:0)}function st(t){if(null==t)throw new Error("Unexpected ".concat(t," value."));return t}function it(t){if(!t)throw new Error("Assert fail")}const rt=Object.freeze({ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier",DeclareClassFieldHasInitializer:"'declare' class fields cannot have an initializer",DuplicateModifier:"Duplicate modifier: '%0'",EmptyHeritageClauseType:"'%0' list cannot be empty.",IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier",IndexSignatureHasAccessibility:"Index signatures cannot have an accessibility modifier ('%0')",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MixedLabeledAndUnlabeledElements:"Tuple members must all have names or all not have names.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:"Private elements cannot have an accessibility modifier ('%0')",TemplateTypeHasSubstitution:"Template literal types cannot have any substitution",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:"Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got %0"});n.placeholder=new s("%%",{startsExpr:!0});function at(t,e){return t.some(t=>Array.isArray(t)?t[0]===e:t===e)}function nt(t,e,s){const i=t.find(t=>Array.isArray(t)?t[0]===e:t===e);return i&&Array.isArray(i)?i[1][s]:null}const ot=["minimal","smart","fsharp"],ht=["hash","bar"];const ct={estree:t=>class extends t{estreeParseRegExpLiteral({pattern:t,flags:e}){let s=null;try{s=new RegExp(t,e)}catch(t){}const i=this.estreeParseLiteral(s);return i.regex={pattern:t,flags:e},i}estreeParseBigIntLiteral(t){const e="undefined"!=typeof BigInt?BigInt(t):null,s=this.estreeParseLiteral(e);return s.bigint=String(s.value||t),s}estreeParseDecimalLiteral(t){const e=this.estreeParseLiteral(null);return e.decimal=String(e.value||t),e}estreeParseLiteral(t){return this.parseLiteral(t,"Literal")}directiveToStmt(t){const e=t.value,s=this.startNodeAt(t.start,t.loc.start),i=this.startNodeAt(e.start,e.loc.start);return i.value=e.value,i.raw=e.extra.raw,s.expression=this.finishNodeAt(i,"Literal",e.end,e.loc.end),s.directive=e.extra.raw.slice(1,-1),this.finishNodeAt(s,"ExpressionStatement",t.end,t.loc.end)}initFunction(t,e){super.initFunction(t,e),t.expression=!1}checkDeclaration(t){D(t)?this.checkDeclaration(t.value):super.checkDeclaration(t)}checkGetterSetterParams(t){const e=t,s="get"===e.kind?0:1,i=e.start;e.value.params.length!==s?"get"===t.kind?this.raise(i,f.BadGetterArity):this.raise(i,f.BadSetterArity):"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raise(i,f.BadSetterRestParameter)}checkLVal(t,e=64,s,i,r){switch(t.type){case"ObjectPattern":t.properties.forEach(t=>{this.checkLVal("Property"===t.type?t.value:t,e,s,"object destructuring pattern",r)});break;default:super.checkLVal(t,e,s,i,r)}}checkProto(t,e,s,i){t.method||super.checkProto(t,e,s,i)}isValidDirective(t){var e;return"ExpressionStatement"===t.type&&"Literal"===t.expression.type&&"string"==typeof t.expression.value&&!(null==(e=t.expression.extra)?void 0:e.parenthesized)}stmtToDirective(t){const e=super.stmtToDirective(t),s=t.expression.value;return e.value.value=s,e}parseBlockBody(t,e,s,i){super.parseBlockBody(t,e,s,i);const r=t.directives.map(t=>this.directiveToStmt(t));t.body=r.concat(t.body),delete t.directives}pushClassMethod(t,e,s,i,r,a){this.parseMethod(e,s,i,r,a,"ClassMethod",!0),e.typeParameters&&(e.value.typeParameters=e.typeParameters,delete e.typeParameters),t.body.push(e)}parseExprAtom(t){switch(this.state.type){case n.num:case n.string:return this.estreeParseLiteral(this.state.value);case n.regexp:return this.estreeParseRegExpLiteral(this.state.value);case n.bigint:return this.estreeParseBigIntLiteral(this.state.value);case n.decimal:return this.estreeParseDecimalLiteral(this.state.value);case n._null:return this.estreeParseLiteral(null);case n._true:return this.estreeParseLiteral(!0);case n._false:return this.estreeParseLiteral(!1);default:return super.parseExprAtom(t)}}parseLiteral(t,e,s,i){const r=super.parseLiteral(t,e,s,i);return r.raw=r.extra.raw,delete r.extra,r}parseFunctionBody(t,e,s=!1){super.parseFunctionBody(t,e,s),t.expression="BlockStatement"!==t.body.type}parseMethod(t,e,s,i,r,a,n=!1){let o=this.startNode();return o.kind=t.kind,o=super.parseMethod(o,e,s,i,r,a,n),o.type="FunctionExpression",delete o.kind,t.value=o,a="ClassMethod"===a?"MethodDefinition":a,this.finishNode(t,a)}parseObjectMethod(t,e,s,i,r){const a=super.parseObjectMethod(t,e,s,i,r);return a&&(a.type="Property","method"===a.kind&&(a.kind="init"),a.shorthand=!1),a}parseObjectProperty(t,e,s,i,r){const a=super.parseObjectProperty(t,e,s,i,r);return a&&(a.kind="init",a.type="Property"),a}toAssignable(t){return D(t)?(this.toAssignable(t.value),t):super.toAssignable(t)}toAssignableObjectExpressionProp(t,e){if("get"===t.kind||"set"===t.kind)throw this.raise(t.key.start,f.PatternHasAccessor);if(t.method)throw this.raise(t.key.start,f.PatternHasMethod);super.toAssignableObjectExpressionProp(t,e)}finishCallExpression(t,e){return super.finishCallExpression(t,e),"Import"===t.callee.type&&(t.type="ImportExpression",t.source=t.arguments[0],delete t.arguments,delete t.callee),t}toReferencedListDeep(t,e){t&&super.toReferencedListDeep(t,e)}parseExport(t){switch(super.parseExport(t),t.type){case"ExportAllDeclaration":t.exported=null;break;case"ExportNamedDeclaration":1===t.specifiers.length&&"ExportNamespaceSpecifier"===t.specifiers[0].type&&(t.type="ExportAllDeclaration",t.exported=t.specifiers[0].exported,delete t.specifiers)}return t}parseSubscript(t,e,s,i,r){const a=super.parseSubscript(t,e,s,i,r);if(r.optionalChainMember){if("OptionalMemberExpression"!==a.type&&"OptionalCallExpression"!==a.type||(a.type=a.type.substring(8)),r.stop){const t=this.startNodeAtNode(a);return t.expression=a,this.finishNode(t,"ChainExpression")}}else"MemberExpression"!==a.type&&"CallExpression"!==a.type||(a.optional=!1);return a}},jsx:t=>class extends t{jsxReadToken(){let t="",e=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,X.UnterminatedJsxContent);const s=this.input.charCodeAt(this.state.pos);switch(s){case 60:case 123:return this.state.pos===this.state.start?60===s&&this.state.exprAllowed?(++this.state.pos,this.finishToken(n.jsxTagStart)):super.getTokenFromCode(s):(t+=this.input.slice(e,this.state.pos),this.finishToken(n.jsxText,t));case 38:t+=this.input.slice(e,this.state.pos),t+=this.jsxReadEntity(),e=this.state.pos;break;default:c(s)?(t+=this.input.slice(e,this.state.pos),t+=this.jsxReadNewLine(!0),e=this.state.pos):++this.state.pos}}}jsxReadNewLine(t){const e=this.input.charCodeAt(this.state.pos);let s;return++this.state.pos,13===e&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,s=t?"\n":"\r\n"):s=String.fromCharCode(e),++this.state.curLine,this.state.lineStart=this.state.pos,s}jsxReadString(t){let e="",s=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,f.UnterminatedString);const i=this.input.charCodeAt(this.state.pos);if(i===t)break;38===i?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadEntity(),s=this.state.pos):c(i)?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadNewLine(!1),s=this.state.pos):++this.state.pos}return e+=this.input.slice(s,this.state.pos++),this.finishToken(n.string,e)}jsxReadEntity(){let t,e="",s=0,i=this.input[this.state.pos];const r=++this.state.pos;for(;this.state.pos<this.length&&s++<10;){if(i=this.input[this.state.pos++],";"===i){"#"===e[0]?"x"===e[1]?(e=e.substr(2),G.test(e)&&(t=String.fromCodePoint(parseInt(e,16)))):(e=e.substr(1),W.test(e)&&(t=String.fromCodePoint(parseInt(e,10)))):t=H[e];break}e+=i}return t||(this.state.pos=r,"&")}jsxReadWord(){let t;const e=this.state.pos;do{t=this.input.charCodeAt(++this.state.pos)}while(N(t)||45===t);return this.finishToken(n.jsxName,this.input.slice(e,this.state.pos))}jsxParseIdentifier(){const t=this.startNode();return this.match(n.jsxName)?t.name=this.state.value:this.state.type.keyword?t.name=this.state.type.keyword:this.unexpected(),this.next(),this.finishNode(t,"JSXIdentifier")}jsxParseNamespacedName(){const t=this.state.start,e=this.state.startLoc,s=this.jsxParseIdentifier();if(!this.eat(n.colon))return s;const i=this.startNodeAt(t,e);return i.namespace=s,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")}jsxParseElementName(){const t=this.state.start,e=this.state.startLoc;let s=this.jsxParseNamespacedName();if("JSXNamespacedName"===s.type)return s;for(;this.eat(n.dot);){const i=this.startNodeAt(t,e);i.object=s,i.property=this.jsxParseIdentifier(),s=this.finishNode(i,"JSXMemberExpression")}return s}jsxParseAttributeValue(){let t;switch(this.state.type){case n.braceL:return t=this.startNode(),this.next(),t=this.jsxParseExpressionContainer(t),"JSXEmptyExpression"===t.expression.type&&this.raise(t.start,X.AttributeIsEmpty),t;case n.jsxTagStart:case n.string:return this.parseExprAtom();default:throw this.raise(this.state.start,X.UnsupportedJsxValue)}}jsxParseEmptyExpression(){const t=this.startNodeAt(this.state.lastTokEnd,this.state.lastTokEndLoc);return this.finishNodeAt(t,"JSXEmptyExpression",this.state.start,this.state.startLoc)}jsxParseSpreadChild(t){return this.next(),t.expression=this.parseExpression(),this.expect(n.braceR),this.finishNode(t,"JSXSpreadChild")}jsxParseExpressionContainer(t){return this.match(n.braceR)?t.expression=this.jsxParseEmptyExpression():t.expression=this.parseExpression(),this.expect(n.braceR),this.finishNode(t,"JSXExpressionContainer")}jsxParseAttribute(){const t=this.startNode();return this.eat(n.braceL)?(this.expect(n.ellipsis),t.argument=this.parseMaybeAssign(),this.expect(n.braceR),this.finishNode(t,"JSXSpreadAttribute")):(t.name=this.jsxParseNamespacedName(),t.value=this.eat(n.eq)?this.jsxParseAttributeValue():null,this.finishNode(t,"JSXAttribute"))}jsxParseOpeningElementAt(t,e){const s=this.startNodeAt(t,e);return this.match(n.jsxTagEnd)?(this.expect(n.jsxTagEnd),this.finishNode(s,"JSXOpeningFragment")):(s.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(s))}jsxParseOpeningElementAfterName(t){const e=[];for(;!this.match(n.slash)&&!this.match(n.jsxTagEnd);)e.push(this.jsxParseAttribute());return t.attributes=e,t.selfClosing=this.eat(n.slash),this.expect(n.jsxTagEnd),this.finishNode(t,"JSXOpeningElement")}jsxParseClosingElementAt(t,e){const s=this.startNodeAt(t,e);return this.match(n.jsxTagEnd)?(this.expect(n.jsxTagEnd),this.finishNode(s,"JSXClosingFragment")):(s.name=this.jsxParseElementName(),this.expect(n.jsxTagEnd),this.finishNode(s,"JSXClosingElement"))}jsxParseElementAt(t,e){const s=this.startNodeAt(t,e),i=[],r=this.jsxParseOpeningElementAt(t,e);let a=null;if(!r.selfClosing){t:for(;;)switch(this.state.type){case n.jsxTagStart:if(t=this.state.start,e=this.state.startLoc,this.next(),this.eat(n.slash)){a=this.jsxParseClosingElementAt(t,e);break t}i.push(this.jsxParseElementAt(t,e));break;case n.jsxText:i.push(this.parseExprAtom());break;case n.braceL:{const t=this.startNode();this.next(),this.match(n.ellipsis)?i.push(this.jsxParseSpreadChild(t)):i.push(this.jsxParseExpressionContainer(t));break}default:throw this.unexpected()}K(r)&&!K(a)?this.raise(a.start,X.MissingClosingTagFragment):!K(r)&&K(a)?this.raise(a.start,X.MissingClosingTagElement,$(r.name)):K(r)||K(a)||$(a.name)!==$(r.name)&&this.raise(a.start,X.MissingClosingTagElement,$(r.name))}if(K(r)?(s.openingFragment=r,s.closingFragment=a):(s.openingElement=r,s.closingElement=a),s.children=i,this.isRelational("<"))throw this.raise(this.state.start,X.UnwrappedAdjacentJSXElements);return K(r)?this.finishNode(s,"JSXFragment"):this.finishNode(s,"JSXElement")}jsxParseElement(){const t=this.state.start,e=this.state.startLoc;return this.next(),this.jsxParseElementAt(t,e)}parseExprAtom(t){return this.match(n.jsxText)?this.parseLiteral(this.state.value,"JSXText"):this.match(n.jsxTagStart)?this.jsxParseElement():this.isRelational("<")&&33!==this.input.charCodeAt(this.state.pos)?(this.finishToken(n.jsxTagStart),this.jsxParseElement()):super.parseExprAtom(t)}getTokenFromCode(t){if(this.state.inPropertyName)return super.getTokenFromCode(t);const e=this.curContext();if(e===x.j_expr)return this.jsxReadToken();if(e===x.j_oTag||e===x.j_cTag){if(w(t))return this.jsxReadWord();if(62===t)return++this.state.pos,this.finishToken(n.jsxTagEnd);if((34===t||39===t)&&e===x.j_oTag)return this.jsxReadString(t)}return 60===t&&this.state.exprAllowed&&33!==this.input.charCodeAt(this.state.pos+1)?(++this.state.pos,this.finishToken(n.jsxTagStart)):super.getTokenFromCode(t)}updateContext(t){if(this.match(n.braceL)){const e=this.curContext();e===x.j_oTag?this.state.context.push(x.braceExpression):e===x.j_expr?this.state.context.push(x.templateQuasi):super.updateContext(t),this.state.exprAllowed=!0}else{if(!this.match(n.slash)||t!==n.jsxTagStart)return super.updateContext(t);this.state.context.length-=2,this.state.context.push(x.j_cTag),this.state.exprAllowed=!1}}},flow:t=>class extends t{constructor(t,e){super(t,e),this.flowPragma=void 0}shouldParseTypes(){return this.getPluginOption("flow","all")||"flow"===this.flowPragma}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(t,e){return t!==n.string&&t!==n.semi&&t!==n.interpreterDirective&&void 0===this.flowPragma&&(this.flowPragma=null),super.finishToken(t,e)}addComment(t){if(void 0===this.flowPragma){const e=z.exec(t.value);if(e)if("flow"===e[1])this.flowPragma="flow";else{if("noflow"!==e[1])throw new Error("Unexpected flow pragma");this.flowPragma="noflow"}else;}return super.addComment(t)}flowParseTypeInitialiser(t){const e=this.state.inType;this.state.inType=!0,this.expect(t||n.colon);const s=this.flowParseType();return this.state.inType=e,s}flowParsePredicate(){const t=this.startNode(),e=this.state.startLoc,s=this.state.start;this.expect(n.modulo);const i=this.state.startLoc;return this.expectContextual("checks"),e.line===i.line&&e.column===i.column-1||this.raise(s,j.UnexpectedSpaceBetweenModuloChecks),this.eat(n.parenL)?(t.value=this.parseExpression(),this.expect(n.parenR),this.finishNode(t,"DeclaredPredicate")):this.finishNode(t,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){const t=this.state.inType;this.state.inType=!0,this.expect(n.colon);let e=null,s=null;return this.match(n.modulo)?(this.state.inType=t,s=this.flowParsePredicate()):(e=this.flowParseType(),this.state.inType=t,this.match(n.modulo)&&(s=this.flowParsePredicate())),[e,s]}flowParseDeclareClass(t){return this.next(),this.flowParseInterfaceish(t,!0),this.finishNode(t,"DeclareClass")}flowParseDeclareFunction(t){this.next();const e=t.id=this.parseIdentifier(),s=this.startNode(),i=this.startNode();this.isRelational("<")?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,this.expect(n.parenL);const r=this.flowParseFunctionTypeParams();return s.params=r.params,s.rest=r.rest,this.expect(n.parenR),[s.returnType,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),i.typeAnnotation=this.finishNode(s,"FunctionTypeAnnotation"),e.typeAnnotation=this.finishNode(i,"TypeAnnotation"),this.resetEndLocation(e),this.semicolon(),this.finishNode(t,"DeclareFunction")}flowParseDeclare(t,e){if(this.match(n._class))return this.flowParseDeclareClass(t);if(this.match(n._function))return this.flowParseDeclareFunction(t);if(this.match(n._var))return this.flowParseDeclareVariable(t);if(this.eatContextual("module"))return this.match(n.dot)?this.flowParseDeclareModuleExports(t):(e&&this.raise(this.state.lastTokStart,j.NestedDeclareModule),this.flowParseDeclareModule(t));if(this.isContextual("type"))return this.flowParseDeclareTypeAlias(t);if(this.isContextual("opaque"))return this.flowParseDeclareOpaqueType(t);if(this.isContextual("interface"))return this.flowParseDeclareInterface(t);if(this.match(n._export))return this.flowParseDeclareExportDeclaration(t,e);throw this.unexpected()}flowParseDeclareVariable(t){return this.next(),t.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(t.id.name,5,t.id.start),this.semicolon(),this.finishNode(t,"DeclareVariable")}flowParseDeclareModule(t){this.scope.enter(0),this.match(n.string)?t.id=this.parseExprAtom():t.id=this.parseIdentifier();const e=t.body=this.startNode(),s=e.body=[];for(this.expect(n.braceL);!this.match(n.braceR);){let t=this.startNode();this.match(n._import)?(this.next(),this.isContextual("type")||this.match(n._typeof)||this.raise(this.state.lastTokStart,j.InvalidNonTypeImportInDeclareModule),this.parseImport(t)):(this.expectContextual("declare",j.UnsupportedStatementInDeclareModule),t=this.flowParseDeclare(t,!0)),s.push(t)}this.scope.exit(),this.expect(n.braceR),this.finishNode(e,"BlockStatement");let i=null,r=!1;return s.forEach(t=>{!function(t){return"DeclareExportAllDeclaration"===t.type||"DeclareExportDeclaration"===t.type&&(!t.declaration||"TypeAlias"!==t.declaration.type&&"InterfaceDeclaration"!==t.declaration.type)}(t)?"DeclareModuleExports"===t.type&&(r&&this.raise(t.start,j.DuplicateDeclareModuleExports),"ES"===i&&this.raise(t.start,j.AmbiguousDeclareModuleKind),i="CommonJS",r=!0):("CommonJS"===i&&this.raise(t.start,j.AmbiguousDeclareModuleKind),i="ES")}),t.kind=i||"CommonJS",this.finishNode(t,"DeclareModule")}flowParseDeclareExportDeclaration(t,e){if(this.expect(n._export),this.eat(n._default))return this.match(n._function)||this.match(n._class)?t.declaration=this.flowParseDeclare(this.startNode()):(t.declaration=this.flowParseType(),this.semicolon()),t.default=!0,this.finishNode(t,"DeclareExportDeclaration");if(this.match(n._const)||this.isLet()||(this.isContextual("type")||this.isContextual("interface"))&&!e){const t=this.state.value,e=V[t];throw this.raise(this.state.start,j.UnsupportedDeclareExportKind,t,e)}if(this.match(n._var)||this.match(n._function)||this.match(n._class)||this.isContextual("opaque"))return t.declaration=this.flowParseDeclare(this.startNode()),t.default=!1,this.finishNode(t,"DeclareExportDeclaration");if(this.match(n.star)||this.match(n.braceL)||this.isContextual("interface")||this.isContextual("type")||this.isContextual("opaque"))return"ExportNamedDeclaration"===(t=this.parseExport(t)).type&&(t.type="ExportDeclaration",t.default=!1,delete t.exportKind),t.type="Declare"+t.type,t;throw this.unexpected()}flowParseDeclareModuleExports(t){return this.next(),this.expectContextual("exports"),t.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(t,"DeclareModuleExports")}flowParseDeclareTypeAlias(t){return this.next(),this.flowParseTypeAlias(t),t.type="DeclareTypeAlias",t}flowParseDeclareOpaqueType(t){return this.next(),this.flowParseOpaqueType(t,!0),t.type="DeclareOpaqueType",t}flowParseDeclareInterface(t){return this.next(),this.flowParseInterfaceish(t),this.finishNode(t,"DeclareInterface")}flowParseInterfaceish(t,e=!1){if(t.id=this.flowParseRestrictedIdentifier(!e,!0),this.scope.declareName(t.id.name,e?17:9,t.id.start),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.extends=[],t.implements=[],t.mixins=[],this.eat(n._extends))do{t.extends.push(this.flowParseInterfaceExtends())}while(!e&&this.eat(n.comma));if(this.isContextual("mixins")){this.next();do{t.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(n.comma))}if(this.isContextual("implements")){this.next();do{t.implements.push(this.flowParseInterfaceExtends())}while(this.eat(n.comma))}t.body=this.flowParseObjectType({allowStatic:e,allowExact:!1,allowSpread:!1,allowProto:e,allowInexact:!1})}flowParseInterfaceExtends(){const t=this.startNode();return t.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,this.finishNode(t,"InterfaceExtends")}flowParseInterface(t){return this.flowParseInterfaceish(t),this.finishNode(t,"InterfaceDeclaration")}checkNotUnderscore(t){"_"===t&&this.raise(this.state.start,j.UnexpectedReservedUnderscore)}checkReservedType(t,e,s){_.has(t)&&this.raise(e,s?j.AssignReservedType:j.UnexpectedReservedType,t)}flowParseRestrictedIdentifier(t,e){return this.checkReservedType(this.state.value,this.state.start,e),this.parseIdentifier(t)}flowParseTypeAlias(t){return t.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(t.id.name,9,t.id.start),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.right=this.flowParseTypeInitialiser(n.eq),this.semicolon(),this.finishNode(t,"TypeAlias")}flowParseOpaqueType(t,e){return this.expectContextual("type"),t.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(t.id.name,9,t.id.start),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.supertype=null,this.match(n.colon)&&(t.supertype=this.flowParseTypeInitialiser(n.colon)),t.impltype=null,e||(t.impltype=this.flowParseTypeInitialiser(n.eq)),this.semicolon(),this.finishNode(t,"OpaqueType")}flowParseTypeParameter(t=!1){const e=this.state.start,s=this.startNode(),i=this.flowParseVariance(),r=this.flowParseTypeAnnotatableIdentifier();return s.name=r.name,s.variance=i,s.bound=r.typeAnnotation,this.match(n.eq)?(this.eat(n.eq),s.default=this.flowParseType()):t&&this.raise(e,j.MissingTypeParamDefault),this.finishNode(s,"TypeParameter")}flowParseTypeParameterDeclaration(){const t=this.state.inType,e=this.startNode();e.params=[],this.state.inType=!0,this.isRelational("<")||this.match(n.jsxTagStart)?this.next():this.unexpected();let s=!1;do{const t=this.flowParseTypeParameter(s);e.params.push(t),t.default&&(s=!0),this.isRelational(">")||this.expect(n.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){const t=this.startNode(),e=this.state.inType;t.params=[],this.state.inType=!0,this.expectRelational("<");const s=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.isRelational(">");)t.params.push(this.flowParseType()),this.isRelational(">")||this.expect(n.comma);return this.state.noAnonFunctionType=s,this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){const t=this.startNode(),e=this.state.inType;for(t.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)t.params.push(this.flowParseTypeOrImplicitInstantiation()),this.isRelational(">")||this.expect(n.comma);return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterInstantiation")}flowParseInterfaceType(){const t=this.startNode();if(this.expectContextual("interface"),t.extends=[],this.eat(n._extends))do{t.extends.push(this.flowParseInterfaceExtends())}while(this.eat(n.comma));return t.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(t,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(n.num)||this.match(n.string)?this.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(t,e,s){return t.static=e,this.lookahead().type===n.colon?(t.id=this.flowParseObjectPropertyKey(),t.key=this.flowParseTypeInitialiser()):(t.id=null,t.key=this.flowParseType()),this.expect(n.bracketR),t.value=this.flowParseTypeInitialiser(),t.variance=s,this.finishNode(t,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(t,e){return t.static=e,t.id=this.flowParseObjectPropertyKey(),this.expect(n.bracketR),this.expect(n.bracketR),this.isRelational("<")||this.match(n.parenL)?(t.method=!0,t.optional=!1,t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.start,t.loc.start))):(t.method=!1,this.eat(n.question)&&(t.optional=!0),t.value=this.flowParseTypeInitialiser()),this.finishNode(t,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(t){for(t.params=[],t.rest=null,t.typeParameters=null,this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(n.parenL);!this.match(n.parenR)&&!this.match(n.ellipsis);)t.params.push(this.flowParseFunctionTypeParam()),this.match(n.parenR)||this.expect(n.comma);return this.eat(n.ellipsis)&&(t.rest=this.flowParseFunctionTypeParam()),this.expect(n.parenR),t.returnType=this.flowParseTypeInitialiser(),this.finishNode(t,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(t,e){const s=this.startNode();return t.static=e,t.value=this.flowParseObjectTypeMethodish(s),this.finishNode(t,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:t,allowExact:e,allowSpread:s,allowProto:i,allowInexact:r}){const a=this.state.inType;this.state.inType=!0;const o=this.startNode();let h,c;o.callProperties=[],o.properties=[],o.indexers=[],o.internalSlots=[];let p=!1;for(e&&this.match(n.braceBarL)?(this.expect(n.braceBarL),h=n.braceBarR,c=!0):(this.expect(n.braceL),h=n.braceR,c=!1),o.exact=c;!this.match(h);){let e=!1,a=null,h=null;const u=this.startNode();if(i&&this.isContextual("proto")){const e=this.lookahead();e.type!==n.colon&&e.type!==n.question&&(this.next(),a=this.state.start,t=!1)}if(t&&this.isContextual("static")){const t=this.lookahead();t.type!==n.colon&&t.type!==n.question&&(this.next(),e=!0)}const l=this.flowParseVariance();if(this.eat(n.bracketL))null!=a&&this.unexpected(a),this.eat(n.bracketL)?(l&&this.unexpected(l.start),o.internalSlots.push(this.flowParseObjectTypeInternalSlot(u,e))):o.indexers.push(this.flowParseObjectTypeIndexer(u,e,l));else if(this.match(n.parenL)||this.isRelational("<"))null!=a&&this.unexpected(a),l&&this.unexpected(l.start),o.callProperties.push(this.flowParseObjectTypeCallProperty(u,e));else{let t="init";if(this.isContextual("get")||this.isContextual("set")){const e=this.lookahead();e.type!==n.name&&e.type!==n.string&&e.type!==n.num||(t=this.state.value,this.next())}const i=this.flowParseObjectTypeProperty(u,e,a,l,t,s,null!=r?r:!c);null===i?(p=!0,h=this.state.lastTokStart):o.properties.push(i)}this.flowObjectTypeSemicolon(),!h||this.match(n.braceR)||this.match(n.braceBarR)||this.raise(h,j.UnexpectedExplicitInexactInObject)}this.expect(h),s&&(o.inexact=p);const u=this.finishNode(o,"ObjectTypeAnnotation");return this.state.inType=a,u}flowParseObjectTypeProperty(t,e,s,i,r,a,o){if(this.eat(n.ellipsis)){return this.match(n.comma)||this.match(n.semi)||this.match(n.braceR)||this.match(n.braceBarR)?(a?o||this.raise(this.state.lastTokStart,j.InexactInsideExact):this.raise(this.state.lastTokStart,j.InexactInsideNonObject),i&&this.raise(i.start,j.InexactVariance),null):(a||this.raise(this.state.lastTokStart,j.UnexpectedSpreadType),null!=s&&this.unexpected(s),i&&this.raise(i.start,j.SpreadVariance),t.argument=this.flowParseType(),this.finishNode(t,"ObjectTypeSpreadProperty"))}{t.key=this.flowParseObjectPropertyKey(),t.static=e,t.proto=null!=s,t.kind=r;let a=!1;return this.isRelational("<")||this.match(n.parenL)?(t.method=!0,null!=s&&this.unexpected(s),i&&this.unexpected(i.start),t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.start,t.loc.start)),"get"!==r&&"set"!==r||this.flowCheckGetterSetterParams(t)):("init"!==r&&this.unexpected(),t.method=!1,this.eat(n.question)&&(a=!0),t.value=this.flowParseTypeInitialiser(),t.variance=i),t.optional=a,this.finishNode(t,"ObjectTypeProperty")}}flowCheckGetterSetterParams(t){const e="get"===t.kind?0:1,s=t.start;t.value.params.length+(t.value.rest?1:0)!==e&&("get"===t.kind?this.raise(s,f.BadGetterArity):this.raise(s,f.BadSetterArity)),"set"===t.kind&&t.value.rest&&this.raise(s,f.BadSetterRestParameter)}flowObjectTypeSemicolon(){this.eat(n.semi)||this.eat(n.comma)||this.match(n.braceR)||this.match(n.braceBarR)||this.unexpected()}flowParseQualifiedTypeIdentifier(t,e,s){t=t||this.state.start,e=e||this.state.startLoc;let i=s||this.flowParseRestrictedIdentifier(!0);for(;this.eat(n.dot);){const s=this.startNodeAt(t,e);s.qualification=i,s.id=this.flowParseRestrictedIdentifier(!0),i=this.finishNode(s,"QualifiedTypeIdentifier")}return i}flowParseGenericType(t,e,s){const i=this.startNodeAt(t,e);return i.typeParameters=null,i.id=this.flowParseQualifiedTypeIdentifier(t,e,s),this.isRelational("<")&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")}flowParseTypeofType(){const t=this.startNode();return this.expect(n._typeof),t.argument=this.flowParsePrimaryType(),this.finishNode(t,"TypeofTypeAnnotation")}flowParseTupleType(){const t=this.startNode();for(t.types=[],this.expect(n.bracketL);this.state.pos<this.length&&!this.match(n.bracketR)&&(t.types.push(this.flowParseType()),!this.match(n.bracketR));)this.expect(n.comma);return this.expect(n.bracketR),this.finishNode(t,"TupleTypeAnnotation")}flowParseFunctionTypeParam(){let t=null,e=!1,s=null;const i=this.startNode(),r=this.lookahead();return r.type===n.colon||r.type===n.question?(t=this.parseIdentifier(),this.eat(n.question)&&(e=!0),s=this.flowParseTypeInitialiser()):s=this.flowParseType(),i.name=t,i.optional=e,i.typeAnnotation=s,this.finishNode(i,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(t){const e=this.startNodeAt(t.start,t.loc.start);return e.name=null,e.optional=!1,e.typeAnnotation=t,this.finishNode(e,"FunctionTypeParam")}flowParseFunctionTypeParams(t=[]){let e=null;for(;!this.match(n.parenR)&&!this.match(n.ellipsis);)t.push(this.flowParseFunctionTypeParam()),this.match(n.parenR)||this.expect(n.comma);return this.eat(n.ellipsis)&&(e=this.flowParseFunctionTypeParam()),{params:t,rest:e}}flowIdentToTypeAnnotation(t,e,s,i){switch(i.name){case"any":return this.finishNode(s,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(s,"BooleanTypeAnnotation");case"mixed":return this.finishNode(s,"MixedTypeAnnotation");case"empty":return this.finishNode(s,"EmptyTypeAnnotation");case"number":return this.finishNode(s,"NumberTypeAnnotation");case"string":return this.finishNode(s,"StringTypeAnnotation");case"symbol":return this.finishNode(s,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(i.name),this.flowParseGenericType(t,e,i)}}flowParsePrimaryType(){const t=this.state.start,e=this.state.startLoc,s=this.startNode();let i,r,a=!1;const o=this.state.noAnonFunctionType;switch(this.state.type){case n.name:return this.isContextual("interface")?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(t,e,s,this.parseIdentifier());case n.braceL:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case n.braceBarL:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case n.bracketL:return this.state.noAnonFunctionType=!1,r=this.flowParseTupleType(),this.state.noAnonFunctionType=o,r;case n.relational:if("<"===this.state.value)return s.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(n.parenL),i=this.flowParseFunctionTypeParams(),s.params=i.params,s.rest=i.rest,this.expect(n.parenR),this.expect(n.arrow),s.returnType=this.flowParseType(),this.finishNode(s,"FunctionTypeAnnotation");break;case n.parenL:if(this.next(),!this.match(n.parenR)&&!this.match(n.ellipsis))if(this.match(n.name)){const t=this.lookahead().type;a=t!==n.question&&t!==n.colon}else a=!0;if(a){if(this.state.noAnonFunctionType=!1,r=this.flowParseType(),this.state.noAnonFunctionType=o,this.state.noAnonFunctionType||!(this.match(n.comma)||this.match(n.parenR)&&this.lookahead().type===n.arrow))return this.expect(n.parenR),r;this.eat(n.comma)}return i=r?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(r)]):this.flowParseFunctionTypeParams(),s.params=i.params,s.rest=i.rest,this.expect(n.parenR),this.expect(n.arrow),s.returnType=this.flowParseType(),s.typeParameters=null,this.finishNode(s,"FunctionTypeAnnotation");case n.string:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case n._true:case n._false:return s.value=this.match(n._true),this.next(),this.finishNode(s,"BooleanLiteralTypeAnnotation");case n.plusMin:if("-"===this.state.value){if(this.next(),this.match(n.num))return this.parseLiteral(-this.state.value,"NumberLiteralTypeAnnotation",s.start,s.loc.start);if(this.match(n.bigint))return this.parseLiteral(-this.state.value,"BigIntLiteralTypeAnnotation",s.start,s.loc.start);throw this.raise(this.state.start,j.UnexpectedSubtractionOperand)}throw this.unexpected();case n.num:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case n.bigint:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case n._void:return this.next(),this.finishNode(s,"VoidTypeAnnotation");case n._null:return this.next(),this.finishNode(s,"NullLiteralTypeAnnotation");case n._this:return this.next(),this.finishNode(s,"ThisTypeAnnotation");case n.star:return this.next(),this.finishNode(s,"ExistsTypeAnnotation");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType();if(this.state.type.keyword){const t=this.state.type.label;return this.next(),super.createIdentifier(s,t)}}throw this.unexpected()}flowParsePostfixType(){const t=this.state.start,e=this.state.startLoc;let s=this.flowParsePrimaryType();for(;this.match(n.bracketL)&&!this.canInsertSemicolon();){const i=this.startNodeAt(t,e);i.elementType=s,this.expect(n.bracketL),this.expect(n.bracketR),s=this.finishNode(i,"ArrayTypeAnnotation")}return s}flowParsePrefixType(){const t=this.startNode();return this.eat(n.question)?(t.typeAnnotation=this.flowParsePrefixType(),this.finishNode(t,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){const t=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(n.arrow)){const e=this.startNodeAt(t.start,t.loc.start);return e.params=[this.reinterpretTypeAsFunctionTypeParam(t)],e.rest=null,e.returnType=this.flowParseType(),e.typeParameters=null,this.finishNode(e,"FunctionTypeAnnotation")}return t}flowParseIntersectionType(){const t=this.startNode();this.eat(n.bitwiseAND);const e=this.flowParseAnonFunctionWithoutParens();for(t.types=[e];this.eat(n.bitwiseAND);)t.types.push(this.flowParseAnonFunctionWithoutParens());return 1===t.types.length?e:this.finishNode(t,"IntersectionTypeAnnotation")}flowParseUnionType(){const t=this.startNode();this.eat(n.bitwiseOR);const e=this.flowParseIntersectionType();for(t.types=[e];this.eat(n.bitwiseOR);)t.types.push(this.flowParseIntersectionType());return 1===t.types.length?e:this.finishNode(t,"UnionTypeAnnotation")}flowParseType(){const t=this.state.inType;this.state.inType=!0;const e=this.flowParseUnionType();return this.state.inType=t,this.state.exprAllowed=this.state.exprAllowed||this.state.noAnonFunctionType,e}flowParseTypeOrImplicitInstantiation(){if(this.state.type===n.name&&"_"===this.state.value){const t=this.state.start,e=this.state.startLoc,s=this.parseIdentifier();return this.flowParseGenericType(t,e,s)}return this.flowParseType()}flowParseTypeAnnotation(){const t=this.startNode();return t.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(t,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(t){const e=t?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(n.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e)),e}typeCastToParameter(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocation(t.expression,t.typeAnnotation.end,t.typeAnnotation.loc.end),t.expression}flowParseVariance(){let t=null;return this.match(n.plusMin)&&(t=this.startNode(),"+"===this.state.value?t.kind="plus":t.kind="minus",this.next(),this.finishNode(t,"Variance")),t}parseFunctionBody(t,e,s=!1){return e?this.forwardNoArrowParamsConversionAt(t,()=>super.parseFunctionBody(t,!0,s)):super.parseFunctionBody(t,!1,s)}parseFunctionBodyAndFinish(t,e,s=!1){if(this.match(n.colon)){const e=this.startNode();[e.typeAnnotation,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),t.returnType=e.typeAnnotation?this.finishNode(e,"TypeAnnotation"):null}super.parseFunctionBodyAndFinish(t,e,s)}parseStatement(t,e){if(this.state.strict&&this.match(n.name)&&"interface"===this.state.value){const t=this.startNode();return this.next(),this.flowParseInterface(t)}if(this.shouldParseEnums()&&this.isContextual("enum")){const t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}{const s=super.parseStatement(t,e);return void 0!==this.flowPragma||this.isValidDirective(s)||(this.flowPragma=null),s}}parseExpressionStatement(t,e){if("Identifier"===e.type)if("declare"===e.name){if(this.match(n._class)||this.match(n.name)||this.match(n._function)||this.match(n._var)||this.match(n._export))return this.flowParseDeclare(t)}else if(this.match(n.name)){if("interface"===e.name)return this.flowParseInterface(t);if("type"===e.name)return this.flowParseTypeAlias(t);if("opaque"===e.name)return this.flowParseOpaqueType(t,!1)}return super.parseExpressionStatement(t,e)}shouldParseExportDeclaration(){return this.isContextual("type")||this.isContextual("interface")||this.isContextual("opaque")||this.shouldParseEnums()&&this.isContextual("enum")||super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){return(!this.match(n.name)||!("type"===this.state.value||"interface"===this.state.value||"opaque"===this.state.value||this.shouldParseEnums()&&"enum"===this.state.value))&&super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual("enum")){const t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDefaultExpression()}parseConditional(t,e,s,i,r){if(!this.match(n.question))return t;if(r){const a=this.tryParse(()=>super.parseConditional(t,e,s,i));return a.node?(a.error&&(this.state=a.failState),a.node):(r.start=a.error.pos||this.state.start,t)}this.expect(n.question);const a=this.state.clone(),o=this.state.noArrowAt,h=this.startNodeAt(s,i);let{consequent:c,failed:p}=this.tryParseConditionalConsequent(),[u,l]=this.getArrowLikeExpressions(c);if(p||l.length>0){const t=[...o];if(l.length>0){this.state=a,this.state.noArrowAt=t;for(let e=0;e<l.length;e++)t.push(l[e].start);({consequent:c,failed:p}=this.tryParseConditionalConsequent()),[u,l]=this.getArrowLikeExpressions(c)}p&&u.length>1&&this.raise(a.start,j.AmbiguousConditionalArrow),p&&1===u.length&&(this.state=a,this.state.noArrowAt=t.concat(u[0].start),({consequent:c,failed:p}=this.tryParseConditionalConsequent()))}return this.getArrowLikeExpressions(c,!0),this.state.noArrowAt=o,this.expect(n.colon),h.test=t,h.consequent=c,h.alternate=this.forwardNoArrowParamsConversionAt(h,()=>this.parseMaybeAssign(e,void 0,void 0,void 0)),this.finishNode(h,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const t=this.parseMaybeAssign(),e=!this.match(n.colon);return this.state.noArrowParamsConversionAt.pop(),{consequent:t,failed:e}}getArrowLikeExpressions(t,e){const s=[t],i=[];for(;0!==s.length;){const t=s.pop();"ArrowFunctionExpression"===t.type?(t.typeParameters||!t.returnType?this.finishArrowValidation(t):i.push(t),s.push(t.body)):"ConditionalExpression"===t.type&&(s.push(t.consequent),s.push(t.alternate))}return e?(i.forEach(t=>this.finishArrowValidation(t)),[i,[]]):function(t,e){const s=[],i=[];for(let r=0;r<t.length;r++)(e(t[r],r,t)?s:i).push(t[r]);return[s,i]}(i,t=>t.params.every(t=>this.isAssignable(t,!0)))}finishArrowValidation(t){var e;this.toAssignableList(t.params,null==(e=t.extra)?void 0:e.trailingComma),this.scope.enter(6),super.checkParams(t,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(t,e){let s;return-1!==this.state.noArrowParamsConversionAt.indexOf(t.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),s=e(),this.state.noArrowParamsConversionAt.pop()):s=e(),s}parseParenItem(t,e,s){if(t=super.parseParenItem(t,e,s),this.eat(n.question)&&(t.optional=!0,this.resetEndLocation(t)),this.match(n.colon)){const i=this.startNodeAt(e,s);return i.expression=t,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return t}assertModuleNodeAllowed(t){"ImportDeclaration"===t.type&&("type"===t.importKind||"typeof"===t.importKind)||"ExportNamedDeclaration"===t.type&&"type"===t.exportKind||"ExportAllDeclaration"===t.type&&"type"===t.exportKind||super.assertModuleNodeAllowed(t)}parseExport(t){const e=super.parseExport(t);return"ExportNamedDeclaration"!==e.type&&"ExportAllDeclaration"!==e.type||(e.exportKind=e.exportKind||"value"),e}parseExportDeclaration(t){if(this.isContextual("type")){t.exportKind="type";const e=this.startNode();return this.next(),this.match(n.braceL)?(t.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(t),null):this.flowParseTypeAlias(e)}if(this.isContextual("opaque")){t.exportKind="type";const e=this.startNode();return this.next(),this.flowParseOpaqueType(e,!1)}if(this.isContextual("interface")){t.exportKind="type";const e=this.startNode();return this.next(),this.flowParseInterface(e)}if(this.shouldParseEnums()&&this.isContextual("enum")){t.exportKind="value";const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDeclaration(t)}eatExportStar(t){return!!super.eatExportStar(...arguments)||!(!this.isContextual("type")||this.lookahead().type!==n.star)&&(t.exportKind="type",this.next(),this.next(),!0)}maybeParseExportNamespaceSpecifier(t){const e=this.state.start,s=super.maybeParseExportNamespaceSpecifier(t);return s&&"type"===t.exportKind&&this.unexpected(e),s}parseClassId(t,e,s){super.parseClassId(t,e,s),this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(t,e,s,i){const r=this.state.start;if(this.isContextual("declare")){if(this.parseClassMemberFromModifier(t,e))return;e.declare=!0}super.parseClassMember(t,e,s,i),e.declare&&("ClassProperty"!==e.type&&"ClassPrivateProperty"!==e.type?this.raise(r,j.DeclareClassElement):e.value&&this.raise(e.value.start,j.DeclareClassFieldInitializer))}getTokenFromCode(t){const e=this.input.charCodeAt(this.state.pos+1);return 123===t&&124===e?this.finishOp(n.braceBarL,2):!this.state.inType||62!==t&&60!==t?this.state.inType&&63===t?this.finishOp(n.question,1):function(t,e){return 64===t&&64===e}(t,e)?(this.state.isIterator=!0,super.readWord()):super.getTokenFromCode(t):this.finishOp(n.relational,1)}isAssignable(t,e){switch(t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":return!0;case"ObjectExpression":{const e=t.properties.length-1;return t.properties.every((t,s)=>"ObjectMethod"!==t.type&&(s===e||"SpreadElement"===t.type)&&this.isAssignable(t))}case"ObjectProperty":return this.isAssignable(t.value);case"SpreadElement":return this.isAssignable(t.argument);case"ArrayExpression":return t.elements.every(t=>this.isAssignable(t));case"AssignmentExpression":return"="===t.operator;case"ParenthesizedExpression":case"TypeCastExpression":return this.isAssignable(t.expression);case"MemberExpression":case"OptionalMemberExpression":return!e;default:return!1}}toAssignable(t){return"TypeCastExpression"===t.type?super.toAssignable(this.typeCastToParameter(t)):super.toAssignable(t)}toAssignableList(t,e){for(let e=0;e<t.length;e++){const s=t[e];"TypeCastExpression"===(null==s?void 0:s.type)&&(t[e]=this.typeCastToParameter(s))}return super.toAssignableList(t,e)}toReferencedList(t,e){for(let i=0;i<t.length;i++){var s;const r=t[i];r&&"TypeCastExpression"===r.type&&!(null==(s=r.extra)?void 0:s.parenthesized)&&(t.length>1||!e)&&this.raise(r.typeAnnotation.start,j.TypeCastInPattern)}return t}checkLVal(t,e=64,s,i){if("TypeCastExpression"!==t.type)return super.checkLVal(t,e,s,i)}parseClassProperty(t){return this.match(n.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(t)}parseClassPrivateProperty(t){return this.match(n.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(t)}isClassMethod(){return this.isRelational("<")||super.isClassMethod()}isClassProperty(){return this.match(n.colon)||super.isClassProperty()}isNonstaticConstructor(t){return!this.match(n.colon)&&super.isNonstaticConstructor(t)}pushClassMethod(t,e,s,i,r,a){e.variance&&this.unexpected(e.variance.start),delete e.variance,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(t,e,s,i,r,a)}pushClassPrivateMethod(t,e,s,i){e.variance&&this.unexpected(e.variance.start),delete e.variance,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(t,e,s,i)}parseClassSuper(t){if(super.parseClassSuper(t),t.superClass&&this.isRelational("<")&&(t.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual("implements")){this.next();const e=t.implements=[];do{const t=this.startNode();t.id=this.flowParseRestrictedIdentifier(!0),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,e.push(this.finishNode(t,"ClassImplements"))}while(this.eat(n.comma))}}parsePropertyName(t,e){const s=this.flowParseVariance(),i=super.parsePropertyName(t,e);return t.variance=s,i}parseObjPropValue(t,e,s,i,r,a,o,h){let c;t.variance&&this.unexpected(t.variance.start),delete t.variance,this.isRelational("<")&&!o&&(c=this.flowParseTypeParameterDeclaration(),this.match(n.parenL)||this.unexpected()),super.parseObjPropValue(t,e,s,i,r,a,o,h),c&&((t.value||t).typeParameters=c)}parseAssignableListItemTypes(t){return this.eat(n.question)&&("Identifier"!==t.type&&this.raise(t.start,j.OptionalBindingPattern),t.optional=!0),this.match(n.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),this.resetEndLocation(t),t}parseMaybeDefault(t,e,s){const i=super.parseMaybeDefault(t,e,s);return"AssignmentPattern"===i.type&&i.typeAnnotation&&i.right.start<i.typeAnnotation.start&&this.raise(i.typeAnnotation.start,j.TypeBeforeInitializer),i}shouldParseDefaultImport(t){return U(t)?q(this.state):super.shouldParseDefaultImport(t)}parseImportSpecifierLocal(t,e,s,i){e.local=U(t)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),this.checkLVal(e.local,9,void 0,i),t.specifiers.push(this.finishNode(e,s))}maybeParseDefaultImportSpecifier(t){t.importKind="value";let e=null;if(this.match(n._typeof)?e="typeof":this.isContextual("type")&&(e="type"),e){const s=this.lookahead();"type"===e&&s.type===n.star&&this.unexpected(s.start),(q(s)||s.type===n.braceL||s.type===n.star)&&(this.next(),t.importKind=e)}return super.maybeParseDefaultImportSpecifier(t)}parseImportSpecifier(t){const e=this.startNode(),s=this.state.start,i=this.parseIdentifier(!0);let r=null;"type"===i.name?r="type":"typeof"===i.name&&(r="typeof");let a=!1;if(this.isContextual("as")&&!this.isLookaheadContextual("as")){const t=this.parseIdentifier(!0);null===r||this.match(n.name)||this.state.type.keyword?(e.imported=i,e.importKind=null,e.local=this.parseIdentifier()):(e.imported=t,e.importKind=r,e.local=t.__clone())}else null!==r&&(this.match(n.name)||this.state.type.keyword)?(e.imported=this.parseIdentifier(!0),e.importKind=r,this.eatContextual("as")?e.local=this.parseIdentifier():(a=!0,e.local=e.imported.__clone())):(a=!0,e.imported=i,e.importKind=null,e.local=e.imported.__clone());const o=U(t),h=U(e);o&&h&&this.raise(s,j.ImportTypeShorthandOnlyInPureImport),(o||h)&&this.checkReservedType(e.local.name,e.local.start,!0),!a||o||h||this.checkReservedWord(e.local.name,e.start,!0,!0),this.checkLVal(e.local,9,void 0,"import specifier"),t.specifiers.push(this.finishNode(e,"ImportSpecifier"))}parseFunctionParams(t,e){const s=t.kind;"get"!==s&&"set"!==s&&this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(t,e)}parseVarId(t,e){super.parseVarId(t,e),this.match(n.colon)&&(t.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t.id))}parseAsyncArrowFromCallExpression(t,e){if(this.match(n.colon)){const e=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,t.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=e}return super.parseAsyncArrowFromCallExpression(t,e)}shouldParseAsyncArrow(){return this.match(n.colon)||super.shouldParseAsyncArrow()}parseMaybeAssign(t,e,s,i){var r;let a,o=null;if(this.hasPlugin("jsx")&&(this.match(n.jsxTagStart)||this.isRelational("<"))){if(o=this.state.clone(),a=this.tryParse(()=>super.parseMaybeAssign(t,e,s,i),o),!a.error)return a.node;const{context:r}=this.state;r[r.length-1]===x.j_oTag?r.length-=2:r[r.length-1]===x.j_expr&&(r.length-=1)}if((null==(r=a)?void 0:r.error)||this.isRelational("<")){var h,c,p;let r;o=o||this.state.clone();const n=this.tryParse(()=>{r=this.flowParseTypeParameterDeclaration();const a=this.forwardNoArrowParamsConversionAt(r,()=>super.parseMaybeAssign(t,e,s,i));return a.typeParameters=r,this.resetStartLocationFromNode(a,r),a},o),u="ArrowFunctionExpression"===(null==(h=n.node)?void 0:h.type)?n.node:null;if(!n.error&&u)return u;if(null==(c=a)?void 0:c.node)return this.state=a.failState,a.node;if(u)return this.state=n.failState,u;if(null==(p=a)?void 0:p.thrown)throw a.error;if(n.thrown)throw n.error;throw this.raise(r.start,j.UnexpectedTokenAfterTypeParameter)}return super.parseMaybeAssign(t,e,s,i)}parseArrow(t){if(this.match(n.colon)){const e=this.tryParse(()=>{const e=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;const s=this.startNode();return[s.typeAnnotation,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=e,this.canInsertSemicolon()&&this.unexpected(),this.match(n.arrow)||this.unexpected(),s});if(e.thrown)return null;e.error&&(this.state=e.failState),t.returnType=e.node.typeAnnotation?this.finishNode(e.node,"TypeAnnotation"):null}return super.parseArrow(t)}shouldParseArrow(){return this.match(n.colon)||super.shouldParseArrow()}setArrowFunctionParameters(t,e){-1!==this.state.noArrowParamsConversionAt.indexOf(t.start)?t.params=e:super.setArrowFunctionParameters(t,e)}checkParams(t,e,s){if(!s||-1===this.state.noArrowParamsConversionAt.indexOf(t.start))return super.checkParams(...arguments)}parseParenAndDistinguishExpression(t){return super.parseParenAndDistinguishExpression(t&&-1===this.state.noArrowAt.indexOf(this.state.start))}parseSubscripts(t,e,s,i){if("Identifier"===t.type&&"async"===t.name&&-1!==this.state.noArrowAt.indexOf(e)){this.next();const i=this.startNodeAt(e,s);i.callee=t,i.arguments=this.parseCallExpressionArguments(n.parenR,!1),t=this.finishNode(i,"CallExpression")}else if("Identifier"===t.type&&"async"===t.name&&this.isRelational("<")){const r=this.state.clone(),a=this.tryParse(t=>this.parseAsyncArrowWithTypeParameters(e,s)||t(),r);if(!a.error&&!a.aborted)return a.node;const n=this.tryParse(()=>super.parseSubscripts(t,e,s,i),r);if(n.node&&!n.error)return n.node;if(a.node)return this.state=a.failState,a.node;if(n.node)return this.state=n.failState,n.node;throw a.error||n.error}return super.parseSubscripts(t,e,s,i)}parseSubscript(t,e,s,i,r){if(this.match(n.questionDot)&&this.isLookaheadRelational("<")){if(r.optionalChainMember=!0,i)return r.stop=!0,t;this.next();const a=this.startNodeAt(e,s);return a.callee=t,a.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(n.parenL),a.arguments=this.parseCallExpressionArguments(n.parenR,!1),a.optional=!0,this.finishCallExpression(a,!0)}if(!i&&this.shouldParseTypes()&&this.isRelational("<")){const i=this.startNodeAt(e,s);i.callee=t;const a=this.tryParse(()=>(i.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(n.parenL),i.arguments=this.parseCallExpressionArguments(n.parenR,!1),r.optionalChainMember&&(i.optional=!1),this.finishCallExpression(i,r.optionalChainMember)));if(a.node)return a.error&&(this.state=a.failState),a.node}return super.parseSubscript(t,e,s,i,r)}parseNewArguments(t){let e=null;this.shouldParseTypes()&&this.isRelational("<")&&(e=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),t.typeArguments=e,super.parseNewArguments(t)}parseAsyncArrowWithTypeParameters(t,e){const s=this.startNodeAt(t,e);if(this.parseFunctionParams(s),this.parseArrow(s))return this.parseArrowExpression(s,void 0,!0)}readToken_mult_modulo(t){const e=this.input.charCodeAt(this.state.pos+1);if(42===t&&47===e&&this.state.hasFlowComment)return this.state.hasFlowComment=!1,this.state.pos+=2,void this.nextToken();super.readToken_mult_modulo(t)}readToken_pipe_amp(t){const e=this.input.charCodeAt(this.state.pos+1);124!==t||125!==e?super.readToken_pipe_amp(t):this.finishOp(n.braceBarR,2)}parseTopLevel(t,e){const s=super.parseTopLevel(t,e);return this.state.hasFlowComment&&this.raise(this.state.pos,j.UnterminatedFlowComment),s}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment())return this.state.hasFlowComment&&this.unexpected(null,j.NestedFlowComment),this.hasFlowCommentCompletion(),this.state.pos+=this.skipFlowComment(),void(this.state.hasFlowComment=!0);if(this.state.hasFlowComment){const t=this.input.indexOf("*-/",this.state.pos+=2);if(-1===t)throw this.raise(this.state.pos-2,f.UnterminatedComment);this.state.pos=t+3}else super.skipBlockComment()}skipFlowComment(){const{pos:t}=this.state;let e=2;for(;[32,9].includes(this.input.charCodeAt(t+e));)e++;const s=this.input.charCodeAt(e+t),i=this.input.charCodeAt(e+t+1);return 58===s&&58===i?e+2:"flow-include"===this.input.slice(e+t,e+t+12)?e+12:58===s&&58!==i&&e}hasFlowCommentCompletion(){if(-1===this.input.indexOf("*/",this.state.pos))throw this.raise(this.state.pos,f.UnterminatedComment)}flowEnumErrorBooleanMemberNotInitialized(t,{enumName:e,memberName:s}){this.raise(t,j.EnumBooleanMemberNotInitialized,s,e)}flowEnumErrorInvalidMemberName(t,{enumName:e,memberName:s}){const i=s[0].toUpperCase()+s.slice(1);this.raise(t,j.EnumInvalidMemberName,s,i,e)}flowEnumErrorDuplicateMemberName(t,{enumName:e,memberName:s}){this.raise(t,j.EnumDuplicateMemberName,s,e)}flowEnumErrorInconsistentMemberValues(t,{enumName:e}){this.raise(t,j.EnumInconsistentMemberValues,e)}flowEnumErrorInvalidExplicitType(t,{enumName:e,suppliedType:s}){return this.raise(t,null===s?j.EnumInvalidExplicitTypeUnknownSupplied:j.EnumInvalidExplicitType,e,s)}flowEnumErrorInvalidMemberInitializer(t,{enumName:e,explicitType:s,memberName:i}){let r=null;switch(s){case"boolean":case"number":case"string":r=j.EnumInvalidMemberInitializerPrimaryType;break;case"symbol":r=j.EnumInvalidMemberInitializerSymbolType;break;default:r=j.EnumInvalidMemberInitializerUnknownType}return this.raise(t,r,e,i,s)}flowEnumErrorNumberMemberNotInitialized(t,{enumName:e,memberName:s}){this.raise(t,j.EnumNumberMemberNotInitialized,e,s)}flowEnumErrorStringMemberInconsistentlyInitailized(t,{enumName:e}){this.raise(t,j.EnumStringMemberInconsistentlyInitailized,e)}flowEnumMemberInit(){const t=this.state.start,e=()=>this.match(n.comma)||this.match(n.braceR);switch(this.state.type){case n.num:{const s=this.parseLiteral(this.state.value,"NumericLiteral");return e()?{type:"number",pos:s.start,value:s}:{type:"invalid",pos:t}}case n.string:{const s=this.parseLiteral(this.state.value,"StringLiteral");return e()?{type:"string",pos:s.start,value:s}:{type:"invalid",pos:t}}case n._true:case n._false:{const s=this.parseBooleanLiteral();return e()?{type:"boolean",pos:s.start,value:s}:{type:"invalid",pos:t}}default:return{type:"invalid",pos:t}}}flowEnumMemberRaw(){const t=this.state.start;return{id:this.parseIdentifier(!0),init:this.eat(n.eq)?this.flowEnumMemberInit():{type:"none",pos:t}}}flowEnumCheckExplicitTypeMismatch(t,e,s){const{explicitType:i}=e;null!==i&&i!==s&&this.flowEnumErrorInvalidMemberInitializer(t,e)}flowEnumMembers({enumName:t,explicitType:e}){const s=new Set,i={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};for(;!this.match(n.braceR);){const r=this.startNode(),{id:a,init:o}=this.flowEnumMemberRaw(),h=a.name;if(""===h)continue;/^[a-z]/.test(h)&&this.flowEnumErrorInvalidMemberName(a.start,{enumName:t,memberName:h}),s.has(h)&&this.flowEnumErrorDuplicateMemberName(a.start,{enumName:t,memberName:h}),s.add(h);const c={enumName:t,explicitType:e,memberName:h};switch(r.id=a,o.type){case"boolean":this.flowEnumCheckExplicitTypeMismatch(o.pos,c,"boolean"),r.init=o.value,i.booleanMembers.push(this.finishNode(r,"EnumBooleanMember"));break;case"number":this.flowEnumCheckExplicitTypeMismatch(o.pos,c,"number"),r.init=o.value,i.numberMembers.push(this.finishNode(r,"EnumNumberMember"));break;case"string":this.flowEnumCheckExplicitTypeMismatch(o.pos,c,"string"),r.init=o.value,i.stringMembers.push(this.finishNode(r,"EnumStringMember"));break;case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(o.pos,c);case"none":switch(e){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(o.pos,c);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(o.pos,c);break;default:i.defaultedMembers.push(this.finishNode(r,"EnumDefaultedMember"))}}this.match(n.braceR)||this.expect(n.comma)}return i}flowEnumStringMembers(t,e,{enumName:s}){if(0===t.length)return e;if(0===e.length)return t;if(e.length>t.length){for(let e=0;e<t.length;e++){const i=t[e];this.flowEnumErrorStringMemberInconsistentlyInitailized(i.start,{enumName:s})}return e}for(let t=0;t<e.length;t++){const i=e[t];this.flowEnumErrorStringMemberInconsistentlyInitailized(i.start,{enumName:s})}return t}flowEnumParseExplicitType({enumName:t}){if(this.eatContextual("of")){if(!this.match(n.name))throw this.flowEnumErrorInvalidExplicitType(this.state.start,{enumName:t,suppliedType:null});const{value:e}=this.state;return this.next(),"boolean"!==e&&"number"!==e&&"string"!==e&&"symbol"!==e&&this.flowEnumErrorInvalidExplicitType(this.state.start,{enumName:t,suppliedType:e}),e}return null}flowEnumBody(t,{enumName:e,nameLoc:s}){const i=this.flowEnumParseExplicitType({enumName:e});this.expect(n.braceL);const r=this.flowEnumMembers({enumName:e,explicitType:i});switch(i){case"boolean":return t.explicitType=!0,t.members=r.booleanMembers,this.expect(n.braceR),this.finishNode(t,"EnumBooleanBody");case"number":return t.explicitType=!0,t.members=r.numberMembers,this.expect(n.braceR),this.finishNode(t,"EnumNumberBody");case"string":return t.explicitType=!0,t.members=this.flowEnumStringMembers(r.stringMembers,r.defaultedMembers,{enumName:e}),this.expect(n.braceR),this.finishNode(t,"EnumStringBody");case"symbol":return t.members=r.defaultedMembers,this.expect(n.braceR),this.finishNode(t,"EnumSymbolBody");default:{const i=()=>(t.members=[],this.expect(n.braceR),this.finishNode(t,"EnumStringBody"));t.explicitType=!1;const a=r.booleanMembers.length,o=r.numberMembers.length,h=r.stringMembers.length,c=r.defaultedMembers.length;if(a||o||h||c){if(a||o){if(!o&&!h&&a>=c){for(let t=0,s=r.defaultedMembers;t<s.length;t++){const i=s[t];this.flowEnumErrorBooleanMemberNotInitialized(i.start,{enumName:e,memberName:i.id.name})}return t.members=r.booleanMembers,this.expect(n.braceR),this.finishNode(t,"EnumBooleanBody")}if(!a&&!h&&o>=c){for(let t=0,s=r.defaultedMembers;t<s.length;t++){const i=s[t];this.flowEnumErrorNumberMemberNotInitialized(i.start,{enumName:e,memberName:i.id.name})}return t.members=r.numberMembers,this.expect(n.braceR),this.finishNode(t,"EnumNumberBody")}return this.flowEnumErrorInconsistentMemberValues(s,{enumName:e}),i()}return t.members=this.flowEnumStringMembers(r.stringMembers,r.defaultedMembers,{enumName:e}),this.expect(n.braceR),this.finishNode(t,"EnumStringBody")}return i()}}}flowParseEnumDeclaration(t){const e=this.parseIdentifier();return t.id=e,t.body=this.flowEnumBody(this.startNode(),{enumName:e.name,nameLoc:e.start}),this.finishNode(t,"EnumDeclaration")}updateContext(t){this.match(n.name)&&"of"===this.state.value&&t===n.name&&"interface"===this.input.slice(this.state.lastTokStart,this.state.lastTokEnd)?this.state.exprAllowed=!1:super.updateContext(t)}},typescript:t=>class extends t{getScopeHandler(){return Z}tsIsIdentifier(){return this.match(n.name)}tsNextTokenCanFollowModifier(){return this.next(),!(this.hasPrecedingLineBreak()||this.match(n.parenL)||this.match(n.parenR)||this.match(n.colon)||this.match(n.eq)||this.match(n.question)||this.match(n.bang))}tsParseModifier(t){if(!this.match(n.name))return;const e=this.state.value;return-1!==t.indexOf(e)&&this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))?e:void 0}tsParseModifiers(t,e){for(;;){const s=this.state.start,i=this.tsParseModifier(e);if(!i)break;Object.hasOwnProperty.call(t,i)&&this.raise(s,rt.DuplicateModifier,i),t[i]=!0}}tsIsListTerminator(t){switch(t){case"EnumMembers":case"TypeMembers":return this.match(n.braceR);case"HeritageClauseElement":return this.match(n.braceL);case"TupleElementTypes":return this.match(n.bracketR);case"TypeParametersOrArguments":return this.isRelational(">")}throw new Error("Unreachable")}tsParseList(t,e){const s=[];for(;!this.tsIsListTerminator(t);)s.push(e());return s}tsParseDelimitedList(t,e){return st(this.tsParseDelimitedListWorker(t,e,!0))}tsParseDelimitedListWorker(t,e,s){const i=[];for(;!this.tsIsListTerminator(t);){const r=e();if(null==r)return;if(i.push(r),!this.eat(n.comma)){if(this.tsIsListTerminator(t))break;return void(s&&this.expect(n.comma))}}return i}tsParseBracketedList(t,e,s,i){i||(s?this.expect(n.bracketL):this.expectRelational("<"));const r=this.tsParseDelimitedList(t,e);return s?this.expect(n.bracketR):this.expectRelational(">"),r}tsParseImportType(){const t=this.startNode();return this.expect(n._import),this.expect(n.parenL),this.match(n.string)||this.raise(this.state.start,rt.UnsupportedImportTypeArgument),t.argument=this.parseExprAtom(),this.expect(n.parenR),this.eat(n.dot)&&(t.qualifier=this.tsParseEntityName(!0)),this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSImportType")}tsParseEntityName(t){let e=this.parseIdentifier();for(;this.eat(n.dot);){const s=this.startNodeAtNode(e);s.left=e,s.right=this.parseIdentifier(t),e=this.finishNode(s,"TSQualifiedName")}return e}tsParseTypeReference(){const t=this.startNode();return t.typeName=this.tsParseEntityName(!1),!this.hasPrecedingLineBreak()&&this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeReference")}tsParseThisTypePredicate(t){this.next();const e=this.startNodeAtNode(t);return e.parameterName=t,e.typeAnnotation=this.tsParseTypeAnnotation(!1),this.finishNode(e,"TSTypePredicate")}tsParseThisTypeNode(){const t=this.startNode();return this.next(),this.finishNode(t,"TSThisType")}tsParseTypeQuery(){const t=this.startNode();return this.expect(n._typeof),this.match(n._import)?t.exprName=this.tsParseImportType():t.exprName=this.tsParseEntityName(!0),this.finishNode(t,"TSTypeQuery")}tsParseTypeParameter(){const t=this.startNode();return t.name=this.parseIdentifierName(t.start),t.constraint=this.tsEatThenParseType(n._extends),t.default=this.tsEatThenParseType(n.eq),this.finishNode(t,"TSTypeParameter")}tsTryParseTypeParameters(){if(this.isRelational("<"))return this.tsParseTypeParameters()}tsParseTypeParameters(){const t=this.startNode();return this.isRelational("<")||this.match(n.jsxTagStart)?this.next():this.unexpected(),t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this),!1,!0),this.finishNode(t,"TSTypeParameterDeclaration")}tsTryNextParseConstantContext(){return this.lookahead().type===n._const?(this.next(),this.tsParseTypeReference()):null}tsFillSignature(t,e){const s=t===n.arrow;e.typeParameters=this.tsTryParseTypeParameters(),this.expect(n.parenL),e.parameters=this.tsParseBindingListForSignature(),(s||this.match(t))&&(e.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(t))}tsParseBindingListForSignature(){return this.parseBindingList(n.parenR,41).map(t=>("Identifier"!==t.type&&"RestElement"!==t.type&&"ObjectPattern"!==t.type&&"ArrayPattern"!==t.type&&this.raise(t.start,rt.UnsupportedSignatureParameterKind,t.type),t))}tsParseTypeMemberSemicolon(){this.eat(n.comma)||this.semicolon()}tsParseSignatureMember(t,e){return this.tsFillSignature(n.colon,e),this.tsParseTypeMemberSemicolon(),this.finishNode(e,t)}tsIsUnambiguouslyIndexSignature(){return this.next(),this.eat(n.name)&&this.match(n.colon)}tsTryParseIndexSignature(t){if(!this.match(n.bracketL)||!this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))return;this.expect(n.bracketL);const e=this.parseIdentifier();e.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(e),this.expect(n.bracketR),t.parameters=[e];const s=this.tsTryParseTypeAnnotation();return s&&(t.typeAnnotation=s),this.tsParseTypeMemberSemicolon(),this.finishNode(t,"TSIndexSignature")}tsParsePropertyOrMethodSignature(t,e){this.eat(n.question)&&(t.optional=!0);const s=t;if(e||!this.match(n.parenL)&&!this.isRelational("<")){const t=s;e&&(t.readonly=!0);const i=this.tsTryParseTypeAnnotation();return i&&(t.typeAnnotation=i),this.tsParseTypeMemberSemicolon(),this.finishNode(t,"TSPropertySignature")}{const t=s;return this.tsFillSignature(n.colon,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,"TSMethodSignature")}}tsParseTypeMember(){const t=this.startNode();if(this.match(n.parenL)||this.isRelational("<"))return this.tsParseSignatureMember("TSCallSignatureDeclaration",t);if(this.match(n._new)){const e=this.startNode();return this.next(),this.match(n.parenL)||this.isRelational("<")?this.tsParseSignatureMember("TSConstructSignatureDeclaration",t):(t.key=this.createIdentifier(e,"new"),this.tsParsePropertyOrMethodSignature(t,!1))}const e=!!this.tsParseModifier(["readonly"]),s=this.tsTryParseIndexSignature(t);return s?(e&&(t.readonly=!0),s):(this.parsePropertyName(t,!1),this.tsParsePropertyOrMethodSignature(t,e))}tsParseTypeLiteral(){const t=this.startNode();return t.members=this.tsParseObjectTypeMembers(),this.finishNode(t,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(n.braceL);const t=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(n.braceR),t}tsIsStartOfMappedType(){return this.next(),this.eat(n.plusMin)?this.isContextual("readonly"):(this.isContextual("readonly")&&this.next(),!!this.match(n.bracketL)&&(this.next(),!!this.tsIsIdentifier()&&(this.next(),this.match(n._in))))}tsParseMappedTypeParameter(){const t=this.startNode();return t.name=this.parseIdentifierName(t.start),t.constraint=this.tsExpectThenParseType(n._in),this.finishNode(t,"TSTypeParameter")}tsParseMappedType(){const t=this.startNode();return this.expect(n.braceL),this.match(n.plusMin)?(t.readonly=this.state.value,this.next(),this.expectContextual("readonly")):this.eatContextual("readonly")&&(t.readonly=!0),this.expect(n.bracketL),t.typeParameter=this.tsParseMappedTypeParameter(),this.expect(n.bracketR),this.match(n.plusMin)?(t.optional=this.state.value,this.next(),this.expect(n.question)):this.eat(n.question)&&(t.optional=!0),t.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(n.braceR),this.finishNode(t,"TSMappedType")}tsParseTupleType(){const t=this.startNode();t.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let e=!1,s=null;return t.elementTypes.forEach(t=>{var i;let{type:r}=t;!e||"TSRestType"===r||"TSOptionalType"===r||"TSNamedTupleMember"===r&&t.optional||this.raise(t.start,rt.OptionalTypeBeforeRequired),e=e||"TSNamedTupleMember"===r&&t.optional||"TSOptionalType"===r,"TSRestType"===r&&(r=(t=t.typeAnnotation).type);const a="TSNamedTupleMember"===r;s=null!=(i=s)?i:a,s!==a&&this.raise(t.start,rt.MixedLabeledAndUnlabeledElements)}),this.finishNode(t,"TSTupleType")}tsParseTupleElementType(){const{start:t,startLoc:e}=this.state,s=this.eat(n.ellipsis);let i=this.tsParseType();const r=this.eat(n.question);if(this.eat(n.colon)){const t=this.startNodeAtNode(i);t.optional=r,"TSTypeReference"!==i.type||i.typeParameters||"Identifier"!==i.typeName.type?(this.raise(i.start,rt.InvalidTupleMemberLabel),t.label=i):t.label=i.typeName,t.elementType=this.tsParseType(),i=this.finishNode(t,"TSNamedTupleMember")}else if(r){const t=this.startNodeAtNode(i);t.typeAnnotation=i,i=this.finishNode(t,"TSOptionalType")}if(s){const s=this.startNodeAt(t,e);s.typeAnnotation=i,i=this.finishNode(s,"TSRestType")}return i}tsParseParenthesizedType(){const t=this.startNode();return this.expect(n.parenL),t.typeAnnotation=this.tsParseType(),this.expect(n.parenR),this.finishNode(t,"TSParenthesizedType")}tsParseFunctionOrConstructorType(t){const e=this.startNode();return"TSConstructorType"===t&&this.expect(n._new),this.tsFillSignature(n.arrow,e),this.finishNode(e,t)}tsParseLiteralTypeNode(){const t=this.startNode();return t.literal=(()=>{switch(this.state.type){case n.num:case n.bigint:case n.string:case n._true:case n._false:return this.parseExprAtom();default:throw this.unexpected()}})(),this.finishNode(t,"TSLiteralType")}tsParseTemplateLiteralType(){const t=this.startNode(),e=this.parseTemplate(!1);return e.expressions.length>0&&this.raise(e.expressions[0].start,rt.TemplateTypeHasSubstitution),t.literal=e,this.finishNode(t,"TSLiteralType")}tsParseThisTypeOrThisTypePredicate(){const t=this.tsParseThisTypeNode();return this.isContextual("is")&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(t):t}tsParseNonArrayType(){switch(this.state.type){case n.name:case n._void:case n._null:{const t=this.match(n._void)?"TSVoidKeyword":this.match(n._null)?"TSNullKeyword":function(t){switch(t){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}(this.state.value);if(void 0!==t&&46!==this.lookaheadCharCode()){const e=this.startNode();return this.next(),this.finishNode(e,t)}return this.tsParseTypeReference()}case n.string:case n.num:case n.bigint:case n._true:case n._false:return this.tsParseLiteralTypeNode();case n.plusMin:if("-"===this.state.value){const t=this.startNode(),e=this.lookahead();if(e.type!==n.num&&e.type!==n.bigint)throw this.unexpected();return t.literal=this.parseMaybeUnary(),this.finishNode(t,"TSLiteralType")}break;case n._this:return this.tsParseThisTypeOrThisTypePredicate();case n._typeof:return this.tsParseTypeQuery();case n._import:return this.tsParseImportType();case n.braceL:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case n.bracketL:return this.tsParseTupleType();case n.parenL:return this.tsParseParenthesizedType();case n.backQuote:return this.tsParseTemplateLiteralType()}throw this.unexpected()}tsParseArrayTypeOrHigher(){let t=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(n.bracketL);)if(this.match(n.bracketR)){const e=this.startNodeAtNode(t);e.elementType=t,this.expect(n.bracketR),t=this.finishNode(e,"TSArrayType")}else{const e=this.startNodeAtNode(t);e.objectType=t,e.indexType=this.tsParseType(),this.expect(n.bracketR),t=this.finishNode(e,"TSIndexedAccessType")}return t}tsParseTypeOperator(t){const e=this.startNode();return this.expectContextual(t),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),"readonly"===t&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(t){switch(t.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(t.start,rt.UnexpectedReadonly)}}tsParseInferType(){const t=this.startNode();this.expectContextual("infer");const e=this.startNode();return e.name=this.parseIdentifierName(e.start),t.typeParameter=this.finishNode(e,"TSTypeParameter"),this.finishNode(t,"TSInferType")}tsParseTypeOperatorOrHigher(){const t=["keyof","unique","readonly"].find(t=>this.isContextual(t));return t?this.tsParseTypeOperator(t):this.isContextual("infer")?this.tsParseInferType():this.tsParseArrayTypeOrHigher()}tsParseUnionOrIntersectionType(t,e,s){this.eat(s);let i=e();if(this.match(s)){const r=[i];for(;this.eat(s);)r.push(e());const a=this.startNodeAtNode(i);a.types=r,i=this.finishNode(a,t)}return i}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),n.bitwiseAND)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),n.bitwiseOR)}tsIsStartOfFunctionType(){return!!this.isRelational("<")||this.match(n.parenL)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(this.match(n.name)||this.match(n._this))return this.next(),!0;if(this.match(n.braceL)){let t=1;for(this.next();t>0;)this.match(n.braceL)?++t:this.match(n.braceR)&&--t,this.next();return!0}if(this.match(n.bracketL)){let t=1;for(this.next();t>0;)this.match(n.bracketL)?++t:this.match(n.bracketR)&&--t,this.next();return!0}return!1}tsIsUnambiguouslyStartOfFunctionType(){if(this.next(),this.match(n.parenR)||this.match(n.ellipsis))return!0;if(this.tsSkipParameterStart()){if(this.match(n.colon)||this.match(n.comma)||this.match(n.question)||this.match(n.eq))return!0;if(this.match(n.parenR)&&(this.next(),this.match(n.arrow)))return!0}return!1}tsParseTypeOrTypePredicateAnnotation(t){return this.tsInType(()=>{const e=this.startNode();this.expect(t);const s=this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(s&&this.match(n._this)){let t=this.tsParseThisTypeOrThisTypePredicate();if("TSThisType"===t.type){const s=this.startNodeAtNode(e);s.parameterName=t,s.asserts=!0,t=this.finishNode(s,"TSTypePredicate")}else t.asserts=!0;return e.typeAnnotation=t,this.finishNode(e,"TSTypeAnnotation")}const i=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!i){if(!s)return this.tsParseTypeAnnotation(!1,e);const t=this.startNodeAtNode(e);return t.parameterName=this.parseIdentifier(),t.asserts=s,e.typeAnnotation=this.finishNode(t,"TSTypePredicate"),this.finishNode(e,"TSTypeAnnotation")}const r=this.tsParseTypeAnnotation(!1),a=this.startNodeAtNode(e);return a.parameterName=i,a.typeAnnotation=r,a.asserts=s,e.typeAnnotation=this.finishNode(a,"TSTypePredicate"),this.finishNode(e,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){return this.match(n.colon)?this.tsParseTypeOrTypePredicateAnnotation(n.colon):void 0}tsTryParseTypeAnnotation(){return this.match(n.colon)?this.tsParseTypeAnnotation():void 0}tsTryParseType(){return this.tsEatThenParseType(n.colon)}tsParseTypePredicatePrefix(){const t=this.parseIdentifier();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.next(),t}tsParseTypePredicateAsserts(){if(!this.match(n.name)||"asserts"!==this.state.value||this.hasPrecedingLineBreak())return!1;const t=this.state.containsEsc;return this.next(),!(!this.match(n.name)&&!this.match(n._this))&&(t&&this.raise(this.state.lastTokStart,f.InvalidEscapedReservedWord,"asserts"),!0)}tsParseTypeAnnotation(t=!0,e=this.startNode()){return this.tsInType(()=>{t&&this.expect(n.colon),e.typeAnnotation=this.tsParseType()}),this.finishNode(e,"TSTypeAnnotation")}tsParseType(){it(this.state.inType);const t=this.tsParseNonConditionalType();if(this.hasPrecedingLineBreak()||!this.eat(n._extends))return t;const e=this.startNodeAtNode(t);return e.checkType=t,e.extendsType=this.tsParseNonConditionalType(),this.expect(n.question),e.trueType=this.tsParseType(),this.expect(n.colon),e.falseType=this.tsParseType(),this.finishNode(e,"TSConditionalType")}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(n._new)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){const t=this.startNode(),e=this.tsTryNextParseConstantContext();return t.typeAnnotation=e||this.tsNextThenParseType(),this.expectRelational(">"),t.expression=this.parseMaybeUnary(),this.finishNode(t,"TSTypeAssertion")}tsParseHeritageClause(t){const e=this.state.start,s=this.tsParseDelimitedList("HeritageClauseElement",this.tsParseExpressionWithTypeArguments.bind(this));return s.length||this.raise(e,rt.EmptyHeritageClauseType,t),s}tsParseExpressionWithTypeArguments(){const t=this.startNode();return t.expression=this.tsParseEntityName(!1),this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSExpressionWithTypeArguments")}tsParseInterfaceDeclaration(t){t.id=this.parseIdentifier(),this.checkLVal(t.id,130,void 0,"typescript interface declaration"),t.typeParameters=this.tsTryParseTypeParameters(),this.eat(n._extends)&&(t.extends=this.tsParseHeritageClause("extends"));const e=this.startNode();return e.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),t.body=this.finishNode(e,"TSInterfaceBody"),this.finishNode(t,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(t){return t.id=this.parseIdentifier(),this.checkLVal(t.id,2,void 0,"typescript type alias"),t.typeParameters=this.tsTryParseTypeParameters(),t.typeAnnotation=this.tsExpectThenParseType(n.eq),this.semicolon(),this.finishNode(t,"TSTypeAliasDeclaration")}tsInNoContext(t){const e=this.state.context;this.state.context=[e[0]];try{return t()}finally{this.state.context=e}}tsInType(t){const e=this.state.inType;this.state.inType=!0;try{return t()}finally{this.state.inType=e}}tsEatThenParseType(t){return this.match(t)?this.tsNextThenParseType():void 0}tsExpectThenParseType(t){return this.tsDoThenParseType(()=>this.expect(t))}tsNextThenParseType(){return this.tsDoThenParseType(()=>this.next())}tsDoThenParseType(t){return this.tsInType(()=>(t(),this.tsParseType()))}tsParseEnumMember(){const t=this.startNode();return t.id=this.match(n.string)?this.parseExprAtom():this.parseIdentifier(!0),this.eat(n.eq)&&(t.initializer=this.parseMaybeAssign()),this.finishNode(t,"TSEnumMember")}tsParseEnumDeclaration(t,e){return e&&(t.const=!0),t.id=this.parseIdentifier(),this.checkLVal(t.id,e?779:267,void 0,"typescript enum declaration"),this.expect(n.braceL),t.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(n.braceR),this.finishNode(t,"TSEnumDeclaration")}tsParseModuleBlock(){const t=this.startNode();return this.scope.enter(0),this.expect(n.braceL),this.parseBlockOrModuleBlockBody(t.body=[],void 0,!0,n.braceR),this.scope.exit(),this.finishNode(t,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(t,e=!1){if(t.id=this.parseIdentifier(),e||this.checkLVal(t.id,1024,null,"module or namespace declaration"),this.eat(n.dot)){const e=this.startNode();this.tsParseModuleOrNamespaceDeclaration(e,!0),t.body=e}else this.scope.enter(128),this.prodParam.enter(0),t.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(t,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(t){return this.isContextual("global")?(t.global=!0,t.id=this.parseIdentifier()):this.match(n.string)?t.id=this.parseExprAtom():this.unexpected(),this.match(n.braceL)?(this.scope.enter(128),this.prodParam.enter(0),t.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(t,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(t,e){return t.isExport=e||!1,t.id=this.parseIdentifier(),this.checkLVal(t.id,9,void 0,"import equals declaration"),this.expect(n.eq),t.moduleReference=this.tsParseModuleReference(),this.semicolon(),this.finishNode(t,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual("require")&&40===this.lookaheadCharCode()}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){const t=this.startNode();if(this.expectContextual("require"),this.expect(n.parenL),!this.match(n.string))throw this.unexpected();return t.expression=this.parseExprAtom(),this.expect(n.parenR),this.finishNode(t,"TSExternalModuleReference")}tsLookAhead(t){const e=this.state.clone(),s=t();return this.state=e,s}tsTryParseAndCatch(t){const e=this.tryParse(e=>t()||e());if(!e.aborted&&e.node)return e.error&&(this.state=e.failState),e.node}tsTryParse(t){const e=this.state.clone(),s=t();return void 0!==s&&!1!==s?s:void(this.state=e)}tsTryParseDeclare(t){if(this.isLineTerminator())return;let e,s=this.state.type;switch(this.isContextual("let")&&(s=n._var,e="let"),s){case n._function:return this.parseFunctionStatement(t,!1,!0);case n._class:return t.declare=!0,this.parseClass(t,!0,!1);case n._const:if(this.match(n._const)&&this.isLookaheadContextual("enum"))return this.expect(n._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(t,!0);case n._var:return e=e||this.state.value,this.parseVarStatement(t,e);case n.name:{const e=this.state.value;return"global"===e?this.tsParseAmbientExternalModuleDeclaration(t):this.tsParseDeclaration(t,e,!0)}}}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0)}tsParseExpressionStatement(t,e){switch(e.name){case"declare":{const e=this.tsTryParseDeclare(t);if(e)return e.declare=!0,e;break}case"global":if(this.match(n.braceL)){this.scope.enter(128),this.prodParam.enter(0);const s=t;return s.global=!0,s.id=e,s.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(s,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(t,e.name,!1)}}tsParseDeclaration(t,e,s){switch(e){case"abstract":if(this.tsCheckLineTerminatorAndMatch(n._class,s)){const e=t;return e.abstract=!0,s&&(this.next(),this.match(n._class)||this.unexpected(null,n._class)),this.parseClass(e,!0,!1)}break;case"enum":if(s||this.match(n.name))return s&&this.next(),this.tsParseEnumDeclaration(t,!1);break;case"interface":if(this.tsCheckLineTerminatorAndMatch(n.name,s))return s&&this.next(),this.tsParseInterfaceDeclaration(t);break;case"module":if(s&&this.next(),this.match(n.string))return this.tsParseAmbientExternalModuleDeclaration(t);if(this.tsCheckLineTerminatorAndMatch(n.name,s))return this.tsParseModuleOrNamespaceDeclaration(t);break;case"namespace":if(this.tsCheckLineTerminatorAndMatch(n.name,s))return s&&this.next(),this.tsParseModuleOrNamespaceDeclaration(t);break;case"type":if(this.tsCheckLineTerminatorAndMatch(n.name,s))return s&&this.next(),this.tsParseTypeAliasDeclaration(t)}}tsCheckLineTerminatorAndMatch(t,e){return(e||this.match(t))&&!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(t,e){if(!this.isRelational("<"))return;const s=this.state.maybeInArrowParameters,i=this.state.yieldPos,r=this.state.awaitPos;this.state.maybeInArrowParameters=!0,this.state.yieldPos=-1,this.state.awaitPos=-1;const a=this.tsTryParseAndCatch(()=>{const s=this.startNodeAt(t,e);return s.typeParameters=this.tsParseTypeParameters(),super.parseFunctionParams(s),s.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(n.arrow),s});return this.state.maybeInArrowParameters=s,this.state.yieldPos=i,this.state.awaitPos=r,a?this.parseArrowExpression(a,null,!0):void 0}tsParseTypeArguments(){const t=this.startNode();return t.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expectRelational("<"),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),this.state.exprAllowed=!1,this.expectRelational(">"),this.finishNode(t,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){if(this.match(n.name))switch(this.state.value){case"abstract":case"declare":case"enum":case"interface":case"module":case"namespace":case"type":return!0}return!1}isExportDefaultSpecifier(){return!this.tsIsDeclarationStart()&&super.isExportDefaultSpecifier()}parseAssignableListItem(t,e){const s=this.state.start,i=this.state.startLoc;let r,a=!1;t&&(r=this.parseAccessModifier(),a=!!this.tsParseModifier(["readonly"]));const n=this.parseMaybeDefault();this.parseAssignableListItemTypes(n);const o=this.parseMaybeDefault(n.start,n.loc.start,n);if(r||a){const t=this.startNodeAt(s,i);return e.length&&(t.decorators=e),r&&(t.accessibility=r),a&&(t.readonly=a),"Identifier"!==o.type&&"AssignmentPattern"!==o.type&&this.raise(t.start,rt.UnsupportedParameterPropertyKind),t.parameter=o,this.finishNode(t,"TSParameterProperty")}return e.length&&(n.decorators=e),o}parseFunctionBodyAndFinish(t,e,s=!1){this.match(n.colon)&&(t.returnType=this.tsParseTypeOrTypePredicateAnnotation(n.colon));const i="FunctionDeclaration"===e?"TSDeclareFunction":"ClassMethod"===e?"TSDeclareMethod":void 0;i&&!this.match(n.braceL)&&this.isLineTerminator()?this.finishNode(t,i):super.parseFunctionBodyAndFinish(t,e,s)}registerFunctionStatementId(t){!t.body&&t.id?this.checkLVal(t.id,1024,null,"function name"):super.registerFunctionStatementId(...arguments)}parseSubscript(t,e,s,i,r){if(!this.hasPrecedingLineBreak()&&this.match(n.bang)){this.state.exprAllowed=!1,this.next();const i=this.startNodeAt(e,s);return i.expression=t,this.finishNode(i,"TSNonNullExpression")}if(this.isRelational("<")){const a=this.tsTryParseAndCatch(()=>{if(!i&&this.atPossibleAsyncArrow(t)){const t=this.tsTryParseGenericAsyncArrowFunction(e,s);if(t)return t}const a=this.startNodeAt(e,s);a.callee=t;const o=this.tsParseTypeArguments();if(o){if(!i&&this.eat(n.parenL))return a.arguments=this.parseCallExpressionArguments(n.parenR,!1),a.typeParameters=o,this.finishCallExpression(a,r.optionalChainMember);if(this.match(n.backQuote)){const i=this.parseTaggedTemplateExpression(t,e,s,r);return i.typeParameters=o,i}}this.unexpected()});if(a)return a}return super.parseSubscript(t,e,s,i,r)}parseNewArguments(t){if(this.isRelational("<")){const e=this.tsTryParseAndCatch(()=>{const t=this.tsParseTypeArguments();return this.match(n.parenL)||this.unexpected(),t});e&&(t.typeParameters=e)}super.parseNewArguments(t)}parseExprOp(t,e,s,i,r){if(st(n._in.binop)>i&&!this.hasPrecedingLineBreak()&&this.isContextual("as")){const a=this.startNodeAt(e,s);a.expression=t;const n=this.tsTryNextParseConstantContext();return a.typeAnnotation=n||this.tsNextThenParseType(),this.finishNode(a,"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(a,e,s,i,r)}return super.parseExprOp(t,e,s,i,r)}checkReservedWord(t,e,s,i){}checkDuplicateExports(){}parseImport(t){if(this.match(n.name)||this.match(n.star)||this.match(n.braceL)){const e=this.lookahead();if(this.match(n.name)&&e.type===n.eq)return this.tsParseImportEqualsDeclaration(t);!this.isContextual("type")||e.type===n.comma||e.type===n.name&&"from"===e.value?t.importKind="value":(t.importKind="type",this.next())}const e=super.parseImport(t);return"type"===e.importKind&&e.specifiers.length>1&&"ImportDefaultSpecifier"===e.specifiers[0].type&&this.raise(e.start,"A type-only import can specify a default import or named bindings, but not both."),e}parseExport(t){if(this.match(n._import))return this.expect(n._import),this.tsParseImportEqualsDeclaration(t,!0);if(this.eat(n.eq)){const e=t;return e.expression=this.parseExpression(),this.semicolon(),this.finishNode(e,"TSExportAssignment")}if(this.eatContextual("as")){const e=t;return this.expectContextual("namespace"),e.id=this.parseIdentifier(),this.semicolon(),this.finishNode(e,"TSNamespaceExportDeclaration")}return this.isContextual("type")&&this.lookahead().type===n.braceL?(this.next(),t.exportKind="type"):t.exportKind="value",super.parseExport(t)}isAbstractClass(){return this.isContextual("abstract")&&this.lookahead().type===n._class}parseExportDefaultExpression(){if(this.isAbstractClass()){const t=this.startNode();return this.next(),this.parseClass(t,!0,!0),t.abstract=!0,t}if("interface"===this.state.value){const t=this.tsParseDeclaration(this.startNode(),this.state.value,!0);if(t)return t}return super.parseExportDefaultExpression()}parseStatementContent(t,e){if(this.state.type===n._const){const t=this.lookahead();if(t.type===n.name&&"enum"===t.value){const t=this.startNode();return this.expect(n._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(t,!0)}}return super.parseStatementContent(t,e)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}parseClassMember(t,e,s,i){this.tsParseModifiers(e,["declare"]);const r=this.parseAccessModifier();r&&(e.accessibility=r),this.tsParseModifiers(e,["declare"]),super.parseClassMember(t,e,s,i)}parseClassMemberWithIsStatic(t,e,s,i,r){this.tsParseModifiers(e,["abstract","readonly","declare"]);const a=this.tsTryParseIndexSignature(e);if(a)return t.body.push(a),e.abstract&&this.raise(e.start,rt.IndexSignatureHasAbstract),i&&this.raise(e.start,rt.IndexSignatureHasStatic),void(e.accessibility&&this.raise(e.start,rt.IndexSignatureHasAccessibility,e.accessibility));super.parseClassMemberWithIsStatic(t,e,s,i,r)}parsePostMemberNameModifiers(t){this.eat(n.question)&&(t.optional=!0),t.readonly&&this.match(n.parenL)&&this.raise(t.start,rt.ClassMethodHasReadonly),t.declare&&this.match(n.parenL)&&this.raise(t.start,rt.ClassMethodHasDeclare)}parseExpressionStatement(t,e){return("Identifier"===e.type?this.tsParseExpressionStatement(t,e):void 0)||super.parseExpressionStatement(t,e)}shouldParseExportDeclaration(){return!!this.tsIsDeclarationStart()||super.shouldParseExportDeclaration()}parseConditional(t,e,s,i,r){if(!r||!this.match(n.question))return super.parseConditional(t,e,s,i,r);const a=this.tryParse(()=>super.parseConditional(t,e,s,i));return a.node?(a.error&&(this.state=a.failState),a.node):(r.start=a.error.pos||this.state.start,t)}parseParenItem(t,e,s){if(t=super.parseParenItem(t,e,s),this.eat(n.question)&&(t.optional=!0,this.resetEndLocation(t)),this.match(n.colon)){const i=this.startNodeAt(e,s);return i.expression=t,i.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(i,"TSTypeCastExpression")}return t}parseExportDeclaration(t){const e=this.state.start,s=this.state.startLoc,i=this.eatContextual("declare");let r;return this.match(n.name)&&(r=this.tsTryParseExportDeclaration()),r||(r=super.parseExportDeclaration(t)),r&&("TSInterfaceDeclaration"===r.type||"TSTypeAliasDeclaration"===r.type||i)&&(t.exportKind="type"),r&&i&&(this.resetStartLocation(r,e,s),r.declare=!0),r}parseClassId(t,e,s){if((!e||s)&&this.isContextual("implements"))return;super.parseClassId(t,e,s,t.declare?1024:139);const i=this.tsTryParseTypeParameters();i&&(t.typeParameters=i)}parseClassPropertyAnnotation(t){!t.optional&&this.eat(n.bang)&&(t.definite=!0);const e=this.tsTryParseTypeAnnotation();e&&(t.typeAnnotation=e)}parseClassProperty(t){return this.parseClassPropertyAnnotation(t),t.declare&&this.match(n.equal)&&this.raise(this.state.start,rt.DeclareClassFieldHasInitializer),super.parseClassProperty(t)}parseClassPrivateProperty(t){return t.abstract&&this.raise(t.start,rt.PrivateElementHasAbstract),t.accessibility&&this.raise(t.start,rt.PrivateElementHasAccessibility,t.accessibility),this.parseClassPropertyAnnotation(t),super.parseClassPrivateProperty(t)}pushClassMethod(t,e,s,i,r,a){const n=this.tsTryParseTypeParameters();n&&(e.typeParameters=n),super.pushClassMethod(t,e,s,i,r,a)}pushClassPrivateMethod(t,e,s,i){const r=this.tsTryParseTypeParameters();r&&(e.typeParameters=r),super.pushClassPrivateMethod(t,e,s,i)}parseClassSuper(t){super.parseClassSuper(t),t.superClass&&this.isRelational("<")&&(t.superTypeParameters=this.tsParseTypeArguments()),this.eatContextual("implements")&&(t.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(t,...e){const s=this.tsTryParseTypeParameters();s&&(t.typeParameters=s),super.parseObjPropValue(t,...e)}parseFunctionParams(t,e){const s=this.tsTryParseTypeParameters();s&&(t.typeParameters=s),super.parseFunctionParams(t,e)}parseVarId(t,e){super.parseVarId(t,e),"Identifier"===t.id.type&&this.eat(n.bang)&&(t.definite=!0);const s=this.tsTryParseTypeAnnotation();s&&(t.id.typeAnnotation=s,this.resetEndLocation(t.id))}parseAsyncArrowFromCallExpression(t,e){return this.match(n.colon)&&(t.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(t,e)}parseMaybeAssign(...t){var e,s,i,r,a,o,h;let c,p,u,l;if(this.match(n.jsxTagStart)){if(c=this.state.clone(),p=this.tryParse(()=>super.parseMaybeAssign(...t),c),!p.error)return p.node;const{context:e}=this.state;e[e.length-1]===x.j_oTag?e.length-=2:e[e.length-1]===x.j_expr&&(e.length-=1)}if(!(null==(e=p)?void 0:e.error)&&!this.isRelational("<"))return super.parseMaybeAssign(...t);c=c||this.state.clone();const d=this.tryParse(e=>{var s;l=this.tsParseTypeParameters();const i=super.parseMaybeAssign(...t);return("ArrowFunctionExpression"!==i.type||i.extra&&i.extra.parenthesized)&&e(),0!==(null==(s=l)?void 0:s.params.length)&&this.resetStartLocationFromNode(i,l),i.typeParameters=l,i},c);if(!d.error&&!d.aborted)return d.node;if(!p&&(it(!this.hasPlugin("jsx")),u=this.tryParse(()=>super.parseMaybeAssign(...t),c),!u.error))return u.node;if(null==(s=p)?void 0:s.node)return this.state=p.failState,p.node;if(d.node)return this.state=d.failState,d.node;if(null==(i=u)?void 0:i.node)return this.state=u.failState,u.node;if(null==(r=p)?void 0:r.thrown)throw p.error;if(d.thrown)throw d.error;if(null==(a=u)?void 0:a.thrown)throw u.error;throw(null==(o=p)?void 0:o.error)||d.error||(null==(h=u)?void 0:h.error)}parseMaybeUnary(t){return!this.hasPlugin("jsx")&&this.isRelational("<")?this.tsParseTypeAssertion():super.parseMaybeUnary(t)}parseArrow(t){if(this.match(n.colon)){const e=this.tryParse(t=>{const e=this.tsParseTypeOrTypePredicateAnnotation(n.colon);return!this.canInsertSemicolon()&&this.match(n.arrow)||t(),e});if(e.aborted)return;e.thrown||(e.error&&(this.state=e.failState),t.returnType=e.node)}return super.parseArrow(t)}parseAssignableListItemTypes(t){this.eat(n.question)&&("Identifier"!==t.type&&this.raise(t.start,rt.PatternIsOptional),t.optional=!0);const e=this.tsTryParseTypeAnnotation();return e&&(t.typeAnnotation=e),this.resetEndLocation(t),t}toAssignable(t){switch(t.type){case"TSTypeCastExpression":return super.toAssignable(this.typeCastToParameter(t));case"TSParameterProperty":return super.toAssignable(t);case"TSAsExpression":case"TSNonNullExpression":case"TSTypeAssertion":return t.expression=this.toAssignable(t.expression),t;default:return super.toAssignable(t)}}checkLVal(t,e=64,s,i){switch(t.type){case"TSTypeCastExpression":return;case"TSParameterProperty":return void this.checkLVal(t.parameter,e,s,"parameter property");case"TSAsExpression":case"TSNonNullExpression":case"TSTypeAssertion":return void this.checkLVal(t.expression,e,s,i);default:return void super.checkLVal(t,e,s,i)}}parseBindingAtom(){switch(this.state.type){case n._this:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseMaybeDecoratorArguments(t){if(this.isRelational("<")){const e=this.tsParseTypeArguments();if(this.match(n.parenL)){const s=super.parseMaybeDecoratorArguments(t);return s.typeParameters=e,s}this.unexpected(this.state.start,n.parenL)}return super.parseMaybeDecoratorArguments(t)}isClassMethod(){return this.isRelational("<")||super.isClassMethod()}isClassProperty(){return this.match(n.bang)||this.match(n.colon)||super.isClassProperty()}parseMaybeDefault(...t){const e=super.parseMaybeDefault(...t);return"AssignmentPattern"===e.type&&e.typeAnnotation&&e.right.start<e.typeAnnotation.start&&this.raise(e.typeAnnotation.start,rt.TypeAnnotationAfterAssign),e}getTokenFromCode(t){return!this.state.inType||62!==t&&60!==t?super.getTokenFromCode(t):this.finishOp(n.relational,1)}reScan_lt_gt(){if(this.match(n.relational)){const t=this.input.charCodeAt(this.state.start);60!==t&&62!==t||(this.state.pos-=1,this.readToken_lt_gt(t))}}toAssignableList(t){for(let e=0;e<t.length;e++){const s=t[e];if(s)switch(s.type){case"TSTypeCastExpression":t[e]=this.typeCastToParameter(s);break;case"TSAsExpression":case"TSTypeAssertion":this.state.maybeInArrowParameters?this.raise(s.start,rt.UnexpectedTypeCastInParameter):t[e]=this.typeCastToParameter(s)}}return super.toAssignableList(...arguments)}typeCastToParameter(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocation(t.expression,t.typeAnnotation.end,t.typeAnnotation.loc.end),t.expression}toReferencedList(t,e){for(let e=0;e<t.length;e++){const s=t[e];"TSTypeCastExpression"===(null==s?void 0:s.type)&&this.raise(s.start,rt.UnexpectedTypeAnnotation)}return t}shouldParseArrow(){return this.match(n.colon)||super.shouldParseArrow()}shouldParseAsyncArrow(){return this.match(n.colon)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(t){if(this.isRelational("<")){const e=this.tsTryParseAndCatch(()=>this.tsParseTypeArguments());e&&(t.typeParameters=e)}return super.jsxParseOpeningElementAfterName(t)}getGetterSetterExpectedParamCount(t){const e=super.getGetterSetterExpectedParamCount(t),s=t.params[0];return s&&"Identifier"===s.type&&"this"===s.name?e+1:e}parseCatchClauseParam(){const t=super.parseCatchClauseParam(),e=this.tsTryParseTypeAnnotation();return e&&(t.typeAnnotation=e),t}},v8intrinsic:t=>class extends t{parseV8Intrinsic(){if(this.match(n.modulo)){const t=this.state.start,e=this.startNode();if(this.eat(n.modulo),this.match(n.name)){const t=this.parseIdentifierName(this.state.start),s=this.createIdentifier(e,t);if(s.type="V8IntrinsicIdentifier",this.match(n.parenL))return s}this.unexpected(t)}}parseExprAtom(){return this.parseV8Intrinsic()||super.parseExprAtom(...arguments)}},placeholders:t=>class extends t{parsePlaceholder(t){if(this.match(n.placeholder)){const e=this.startNode();return this.next(),this.assertNoSpace("Unexpected space in placeholder."),e.name=super.parseIdentifier(!0),this.assertNoSpace("Unexpected space in placeholder."),this.expect(n.placeholder),this.finishPlaceholder(e,t)}}finishPlaceholder(t,e){const s=!(!t.expectedNode||"Placeholder"!==t.type);return t.expectedNode=e,s?t:this.finishNode(t,"Placeholder")}getTokenFromCode(t){return 37===t&&37===this.input.charCodeAt(this.state.pos+1)?this.finishOp(n.placeholder,2):super.getTokenFromCode(...arguments)}parseExprAtom(){return this.parsePlaceholder("Expression")||super.parseExprAtom(...arguments)}parseIdentifier(){return this.parsePlaceholder("Identifier")||super.parseIdentifier(...arguments)}checkReservedWord(t){void 0!==t&&super.checkReservedWord(...arguments)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom(...arguments)}checkLVal(t){"Placeholder"!==t.type&&super.checkLVal(...arguments)}toAssignable(t){return t&&"Placeholder"===t.type&&"Expression"===t.expectedNode?(t.expectedNode="Pattern",t):super.toAssignable(...arguments)}verifyBreakContinue(t){t.label&&"Placeholder"===t.label.type||super.verifyBreakContinue(...arguments)}parseExpressionStatement(t,e){if("Placeholder"!==e.type||e.extra&&e.extra.parenthesized)return super.parseExpressionStatement(...arguments);if(this.match(n.colon)){const s=t;return s.label=this.finishPlaceholder(e,"Identifier"),this.next(),s.body=this.parseStatement("label"),this.finishNode(s,"LabeledStatement")}return this.semicolon(),t.name=e.name,this.finishPlaceholder(t,"Statement")}parseBlock(){return this.parsePlaceholder("BlockStatement")||super.parseBlock(...arguments)}parseFunctionId(){return this.parsePlaceholder("Identifier")||super.parseFunctionId(...arguments)}parseClass(t,e,s){const i=e?"ClassDeclaration":"ClassExpression";this.next(),this.takeDecorators(t);const r=this.parsePlaceholder("Identifier");if(r)if(this.match(n._extends)||this.match(n.placeholder)||this.match(n.braceL))t.id=r;else{if(s||!e)return t.id=null,t.body=this.finishPlaceholder(r,"ClassBody"),this.finishNode(t,i);this.unexpected(null,"A class name is required")}else this.parseClassId(t,e,s);return this.parseClassSuper(t),t.body=this.parsePlaceholder("ClassBody")||this.parseClassBody(!!t.superClass),this.finishNode(t,i)}parseExport(t){const e=this.parsePlaceholder("Identifier");if(!e)return super.parseExport(...arguments);if(!this.isContextual("from")&&!this.match(n.comma))return t.specifiers=[],t.source=null,t.declaration=this.finishPlaceholder(e,"Declaration"),this.finishNode(t,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");const s=this.startNode();return s.exported=e,t.specifiers=[this.finishNode(s,"ExportDefaultSpecifier")],super.parseExport(t)}isExportDefaultSpecifier(){if(this.match(n._default)){const t=this.nextTokenStart();if(this.isUnparsedContextual(t,"from")&&this.input.startsWith(n.placeholder.label,this.nextTokenStartSince(t+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(t){return!!(t.specifiers&&t.specifiers.length>0)||super.maybeParseExportDefaultSpecifier(...arguments)}checkExport(t){const{specifiers:e}=t;(null==e?void 0:e.length)&&(t.specifiers=e.filter(t=>"Placeholder"===t.exported.type)),super.checkExport(t),t.specifiers=e}parseImport(t){const e=this.parsePlaceholder("Identifier");if(!e)return super.parseImport(...arguments);if(t.specifiers=[],!this.isContextual("from")&&!this.match(n.comma))return t.source=this.finishPlaceholder(e,"StringLiteral"),this.semicolon(),this.finishNode(t,"ImportDeclaration");const s=this.startNodeAtNode(e);if(s.local=e,this.finishNode(s,"ImportDefaultSpecifier"),t.specifiers.push(s),this.eat(n.comma)){this.maybeParseStarImportSpecifier(t)||this.parseNamedImportSpecifiers(t)}return this.expectContextual("from"),t.source=this.parseImportSource(),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource(...arguments)}}},pt=Object.keys(ct),ut={sourceType:"script",sourceFilename:void 0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createParenthesizedExpressions:!1,errorRecovery:!1};class lt{constructor(){this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.inParameters=!1,this.maybeInArrowParameters=!1,this.maybeInAsyncArrowHead=!1,this.inPipeline=!1,this.inType=!1,this.noAnonFunctionType=!1,this.inPropertyName=!1,this.hasFlowComment=!1,this.isIterator=!1,this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.soloAwait=!1,this.inFSharpPipelineDirectBody=!1,this.labels=[],this.decoratorStack=[[]],this.yieldPos=-1,this.awaitPos=-1,this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.commentPreviousNode=null,this.pos=0,this.lineStart=0,this.type=n.eof,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.lastTokStart=0,this.lastTokEnd=0,this.context=[x.braceStatement],this.exprAllowed=!0,this.containsEsc=!1,this.octalPositions=[],this.exportedIdentifiers=[],this.tokensLength=0}init(t){this.strict=!1!==t.strictMode&&"module"===t.sourceType,this.curLine=t.startLine,this.startLoc=this.endLoc=this.curPosition()}curPosition(){return new l(this.curLine,this.pos-this.lineStart)}clone(t){const e=new lt,s=Object.keys(this);for(let i=0,r=s.length;i<r;i++){const r=s[i];let a=this[r];!t&&Array.isArray(a)&&(a=a.slice()),e[r]=a}return e}}var dt=function(t){return t>=48&&t<=57};const mt=new Set(["g","m","s","i","y","u"]),ft={decBinOct:[46,66,69,79,95,98,101,111],hex:[46,88,95,120]},Dt={bin:[48,49]};Dt.oct=[...Dt.bin,50,51,52,53,54,55],Dt.dec=[...Dt.oct,56,57],Dt.hex=[...Dt.dec,65,66,67,68,69,70,97,98,99,100,101,102];class yt{constructor(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new d(t.startLoc,t.endLoc)}}class xt{constructor(){this.shorthandAssign=-1,this.doubleProto=-1}}class gt{constructor(t,e,s){this.type="",this.start=e,this.end=0,this.loc=new d(s),(null==t?void 0:t.options.ranges)&&(this.range=[e,0]),(null==t?void 0:t.filename)&&(this.loc.filename=t.filename)}__clone(){const t=new gt,e=Object.keys(this);for(let s=0,i=e.length;s<i;s++){const i=e[s];"leadingComments"!==i&&"trailingComments"!==i&&"innerComments"!==i&&(t[i]=this[i])}return t}}const Et=t=>"ParenthesizedExpression"===t.type?Et(t.expression):t;const Pt={kind:"loop"},bt={kind:"switch"};class Ct{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}}class Tt{constructor(t){this.stack=[],this.undefinedPrivateNames=new Map,this.raise=t}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new Ct)}exit(){const t=this.stack.pop(),e=this.current();for(let s=0,i=Array.from(t.undefinedPrivateNames);s<i.length;s++){const[t,r]=i[s];e?e.undefinedPrivateNames.has(t)||e.undefinedPrivateNames.set(t,r):this.raise(r,f.InvalidPrivateFieldResolution,t)}}declarePrivateName(t,e,s){const i=this.current();let r=i.privateNames.has(t);if(3&e){const s=r&&i.loneAccessors.get(t);if(s){const a=4&s,n=4&e;r=(3&s)===(3&e)||a!==n,r||i.loneAccessors.delete(t)}else r||i.loneAccessors.set(t,e)}r&&this.raise(s,f.PrivateNameRedeclaration,t),i.privateNames.add(t),i.undefinedPrivateNames.delete(t)}usePrivateName(t,e){let s;for(let e=0,i=this.stack;e<i.length;e++)if(s=i[e],s.privateNames.has(t))return;s?s.undefinedPrivateNames.set(t,e):this.raise(e,f.InvalidPrivateFieldResolution,t)}}class At extends class extends class extends class extends class extends class extends class extends class extends class extends class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(t){return this.plugins.has(t)}getPluginOption(t,e){if(this.hasPlugin(t))return this.plugins.get(t)[e]}}{addComment(t){this.filename&&(t.loc.filename=this.filename),this.state.trailingComments.push(t),this.state.leadingComments.push(t)}adjustCommentsAfterTrailingComma(t,e,s){if(0===this.state.leadingComments.length)return;let i=null,r=e.length;for(;null===i&&r>0;)i=e[--r];if(null===i)return;for(let t=0;t<this.state.leadingComments.length;t++)this.state.leadingComments[t].end<this.state.commentPreviousNode.end&&(this.state.leadingComments.splice(t,1),t--);const a=[];for(let e=0;e<this.state.leadingComments.length;e++){const i=this.state.leadingComments[e];i.end<t.end?(a.push(i),s||(this.state.leadingComments.splice(e,1),e--)):(void 0===t.trailingComments&&(t.trailingComments=[]),t.trailingComments.push(i))}s&&(this.state.leadingComments=[]),a.length>0?i.trailingComments=a:void 0!==i.trailingComments&&(i.trailingComments=[])}processComment(t){if("Program"===t.type&&t.body.length>0)return;const e=this.state.commentStack;let s,i,r,a,n;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=t.end?(r=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else if(e.length>0){const s=m(e);s.trailingComments&&s.trailingComments[0].start>=t.end&&(r=s.trailingComments,delete s.trailingComments)}for(e.length>0&&m(e).start>=t.start&&(s=e.pop());e.length>0&&m(e).start>=t.start;)i=e.pop();if(!i&&s&&(i=s),s)switch(t.type){case"ObjectExpression":this.adjustCommentsAfterTrailingComma(t,t.properties);break;case"ObjectPattern":this.adjustCommentsAfterTrailingComma(t,t.properties,!0);break;case"CallExpression":this.adjustCommentsAfterTrailingComma(t,t.arguments);break;case"ArrayExpression":this.adjustCommentsAfterTrailingComma(t,t.elements);break;case"ArrayPattern":this.adjustCommentsAfterTrailingComma(t,t.elements,!0)}else this.state.commentPreviousNode&&("ImportSpecifier"===this.state.commentPreviousNode.type&&"ImportSpecifier"!==t.type||"ExportSpecifier"===this.state.commentPreviousNode.type&&"ExportSpecifier"!==t.type)&&this.adjustCommentsAfterTrailingComma(t,[this.state.commentPreviousNode]);if(i){if(i.leadingComments)if(i!==t&&i.leadingComments.length>0&&m(i.leadingComments).end<=t.start)t.leadingComments=i.leadingComments,delete i.leadingComments;else for(a=i.leadingComments.length-2;a>=0;--a)if(i.leadingComments[a].end<=t.start){t.leadingComments=i.leadingComments.splice(0,a+1);break}}else if(this.state.leadingComments.length>0)if(m(this.state.leadingComments).end<=t.start){if(this.state.commentPreviousNode)for(n=0;n<this.state.leadingComments.length;n++)this.state.leadingComments[n].end<this.state.commentPreviousNode.end&&(this.state.leadingComments.splice(n,1),n--);this.state.leadingComments.length>0&&(t.leadingComments=this.state.leadingComments,this.state.leadingComments=[])}else{for(a=0;a<this.state.leadingComments.length&&!(this.state.leadingComments[a].end>t.start);a++);const e=this.state.leadingComments.slice(0,a);e.length&&(t.leadingComments=e),r=this.state.leadingComments.slice(a),0===r.length&&(r=null)}if(this.state.commentPreviousNode=t,r)if(r.length&&r[0].start>=t.start&&m(r).end<=t.end)t.innerComments=r;else{const e=r.findIndex(e=>e.end>=t.end);e>0?(t.innerComments=r.slice(0,e),t.trailingComments=r.slice(e)):t.trailingComments=r}e.push(t)}}{getLocationForPosition(t){let e;return e=t===this.state.start?this.state.startLoc:t===this.state.lastTokStart?this.state.lastTokStartLoc:t===this.state.end?this.state.endLoc:t===this.state.lastTokEnd?this.state.lastTokEndLoc:function(t,e){let s,i=1,r=0;for(h.lastIndex=0;(s=h.exec(t))&&s.index<e;)i++,r=h.lastIndex;return new l(i,e-r)}(this.input,t),e}raise(t,e,...s){return this.raiseWithData(t,void 0,e,...s)}raiseWithData(t,e,s,...i){const r=this.getLocationForPosition(t),a=s.replace(/%(\d+)/g,(t,e)=>i[e])+" (".concat(r.line,":").concat(r.column,")");return this._raise(Object.assign({loc:r,pos:t},e),a)}_raise(t,e){const s=new SyntaxError(e);if(Object.assign(s,t),this.options.errorRecovery)return this.isLookahead||this.state.errors.push(s),s;throw s}}{constructor(t,e){super(),this.tokens=[],this.state=new lt,this.state.init(t),this.input=e,this.length=e.length,this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.isLookahead||(this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new yt(this.state))),this.state.lastTokEnd=this.state.end,this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return!!this.match(t)&&(this.next(),!0)}match(t){return this.state.type===t}lookahead(){const t=this.state;this.state=t.clone(!0),this.isLookahead=!0,this.next(),this.isLookahead=!1;const e=this.state;return this.state=t,e}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(t){p.lastIndex=t;return t+p.exec(this.input)[0].length}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}setStrict(t){if(this.state.strict=t,this.match(n.num)||this.match(n.string)){for(this.state.pos=this.state.start;this.state.pos<this.state.lineStart;)this.state.lineStart=this.input.lastIndexOf("\n",this.state.lineStart-2)+1,--this.state.curLine;this.nextToken()}}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){const t=this.curContext();if((null==t?void 0:t.preserveSpace)||this.skipSpace(),this.state.octalPositions=[],this.state.start=this.state.pos,this.state.startLoc=this.state.curPosition(),this.state.pos>=this.length)return void this.finishToken(n.eof);const e=null==t?void 0:t.override;e?e(this):this.getTokenFromCode(this.input.codePointAt(this.state.pos))}pushComment(t,e,s,i,r,a){const n={type:t?"CommentBlock":"CommentLine",value:e,start:s,end:i,loc:new d(r,a)};this.options.tokens&&this.pushToken(n),this.state.comments.push(n),this.addComment(n)}skipBlockComment(){const t=this.state.curPosition(),e=this.state.pos,s=this.input.indexOf("*/",this.state.pos+2);if(-1===s)throw this.raise(e,f.UnterminatedComment);let i;for(this.state.pos=s+2,h.lastIndex=e;(i=h.exec(this.input))&&i.index<this.state.pos;)++this.state.curLine,this.state.lineStart=i.index+i[0].length;this.isLookahead||this.pushComment(!0,this.input.slice(e+2,s),e,this.state.pos,t,this.state.curPosition())}skipLineComment(t){const e=this.state.pos,s=this.state.curPosition();let i=this.input.charCodeAt(this.state.pos+=t);if(this.state.pos<this.length)for(;!c(i)&&++this.state.pos<this.length;)i=this.input.charCodeAt(this.state.pos);this.isLookahead||this.pushComment(!1,this.input.slice(e+t,this.state.pos),e,this.state.pos,s,this.state.curPosition())}skipSpace(){t:for(;this.state.pos<this.length;){const t=this.input.charCodeAt(this.state.pos);switch(t){case 32:case 160:case 9:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(!u(t))break t;++this.state.pos}}}finishToken(t,e){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();const s=this.state.type;this.state.type=t,this.state.value=e,this.isLookahead||this.updateContext(s)}readToken_numberSign(){if(0===this.state.pos&&this.readToken_interpreter())return;const t=this.state.pos+1,e=this.input.charCodeAt(t);if(e>=48&&e<=57)throw this.raise(this.state.pos,f.UnexpectedDigitAfterHash);if(123===e||91===e&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),"hash"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(this.state.pos,123===e?f.RecordExpressionHashIncorrectStartSyntaxType:f.TupleExpressionHashIncorrectStartSyntaxType);123===e?this.finishToken(n.braceHashL):this.finishToken(n.bracketHashL),this.state.pos+=2}else this.finishOp(n.hash,1)}readToken_dot(){const t=this.input.charCodeAt(this.state.pos+1);t>=48&&t<=57?this.readNumber(!0):46===t&&46===this.input.charCodeAt(this.state.pos+2)?(this.state.pos+=3,this.finishToken(n.ellipsis)):(++this.state.pos,this.finishToken(n.dot))}readToken_slash(){if(this.state.exprAllowed&&!this.state.inType)return++this.state.pos,void this.readRegexp();61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(n.assign,2):this.finishOp(n.slash,1)}readToken_interpreter(){if(0!==this.state.pos||this.length<2)return!1;let t=this.input.charCodeAt(this.state.pos+1);if(33!==t)return!1;const e=this.state.pos;for(this.state.pos+=1;!c(t)&&++this.state.pos<this.length;)t=this.input.charCodeAt(this.state.pos);const s=this.input.slice(e+2,this.state.pos);return this.finishToken(n.interpreterDirective,s),!0}readToken_mult_modulo(t){let e=42===t?n.star:n.modulo,s=1,i=this.input.charCodeAt(this.state.pos+1);const r=this.state.exprAllowed;42===t&&42===i&&(s++,i=this.input.charCodeAt(this.state.pos+2),e=n.exponent),61!==i||r||(s++,e=n.assign),this.finishOp(e,s)}readToken_pipe_amp(t){const e=this.input.charCodeAt(this.state.pos+1);if(e!==t){if(124===t){if(62===e)return void this.finishOp(n.pipeline,2);if(this.hasPlugin("recordAndTuple")&&125===e){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(this.state.pos,f.RecordExpressionBarIncorrectEndSyntaxType);return void this.finishOp(n.braceBarR,2)}if(this.hasPlugin("recordAndTuple")&&93===e){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(this.state.pos,f.TupleExpressionBarIncorrectEndSyntaxType);return void this.finishOp(n.bracketBarR,2)}}61!==e?this.finishOp(124===t?n.bitwiseOR:n.bitwiseAND,1):this.finishOp(n.assign,2)}else 61===this.input.charCodeAt(this.state.pos+2)?this.finishOp(n.assign,3):this.finishOp(124===t?n.logicalOR:n.logicalAND,2)}readToken_caret(){61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(n.assign,2):this.finishOp(n.bitwiseXOR,1)}readToken_plus_min(t){const e=this.input.charCodeAt(this.state.pos+1);if(e===t)return 45!==e||this.inModule||62!==this.input.charCodeAt(this.state.pos+2)||0!==this.state.lastTokEnd&&!o.test(this.input.slice(this.state.lastTokEnd,this.state.pos))?void this.finishOp(n.incDec,2):(this.skipLineComment(3),this.skipSpace(),void this.nextToken());61===e?this.finishOp(n.assign,2):this.finishOp(n.plusMin,1)}readToken_lt_gt(t){const e=this.input.charCodeAt(this.state.pos+1);let s=1;return e===t?(s=62===t&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+s)?void this.finishOp(n.assign,s+1):void this.finishOp(n.bitShift,s)):33!==e||60!==t||this.inModule||45!==this.input.charCodeAt(this.state.pos+2)||45!==this.input.charCodeAt(this.state.pos+3)?(61===e&&(s=2),void this.finishOp(n.relational,s)):(this.skipLineComment(4),this.skipSpace(),void this.nextToken())}readToken_eq_excl(t){const e=this.input.charCodeAt(this.state.pos+1);if(61!==e)return 61===t&&62===e?(this.state.pos+=2,void this.finishToken(n.arrow)):void this.finishOp(61===t?n.eq:n.bang,1);this.finishOp(n.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2)}readToken_question(){const t=this.input.charCodeAt(this.state.pos+1),e=this.input.charCodeAt(this.state.pos+2);63===t?61===e?this.finishOp(n.assign,3):this.finishOp(n.nullishCoalescing,2):46!==t||e>=48&&e<=57?(++this.state.pos,this.finishToken(n.question)):(this.state.pos+=2,this.finishToken(n.questionDot))}getTokenFromCode(t){switch(t){case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(n.parenL);case 41:return++this.state.pos,void this.finishToken(n.parenR);case 59:return++this.state.pos,void this.finishToken(n.semi);case 44:return++this.state.pos,void this.finishToken(n.comma);case 91:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(this.state.pos,f.TupleExpressionBarIncorrectStartSyntaxType);this.finishToken(n.bracketBarL),this.state.pos+=2}else++this.state.pos,this.finishToken(n.bracketL);return;case 93:return++this.state.pos,void this.finishToken(n.bracketR);case 123:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(this.state.pos,f.RecordExpressionBarIncorrectStartSyntaxType);this.finishToken(n.braceBarL),this.state.pos+=2}else++this.state.pos,this.finishToken(n.braceL);return;case 125:return++this.state.pos,void this.finishToken(n.braceR);case 58:return void(this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(n.doubleColon,2):(++this.state.pos,this.finishToken(n.colon)));case 63:return void this.readToken_question();case 96:return++this.state.pos,void this.finishToken(n.backQuote);case 48:{const t=this.input.charCodeAt(this.state.pos+1);if(120===t||88===t)return void this.readRadixNumber(16);if(111===t||79===t)return void this.readRadixNumber(8);if(98===t||66===t)return void this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return void this.readNumber(!1);case 34:case 39:return void this.readString(t);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(t);case 124:case 38:return void this.readToken_pipe_amp(t);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(t);case 60:case 62:return void this.readToken_lt_gt(t);case 61:case 33:return void this.readToken_eq_excl(t);case 126:return void this.finishOp(n.tilde,1);case 64:return++this.state.pos,void this.finishToken(n.at);case 35:return void this.readToken_numberSign();case 92:return void this.readWord();default:if(w(t))return void this.readWord()}throw this.raise(this.state.pos,f.InvalidOrUnexpectedToken,String.fromCodePoint(t))}finishOp(t,e){const s=this.input.slice(this.state.pos,this.state.pos+e);this.state.pos+=e,this.finishToken(t,s)}readRegexp(){const t=this.state.pos;let e,s;for(;;){if(this.state.pos>=this.length)throw this.raise(t,f.UnterminatedRegExp);const i=this.input.charAt(this.state.pos);if(o.test(i))throw this.raise(t,f.UnterminatedRegExp);if(e)e=!1;else{if("["===i)s=!0;else if("]"===i&&s)s=!1;else if("/"===i&&!s)break;e="\\"===i}++this.state.pos}const i=this.input.slice(t,this.state.pos);++this.state.pos;let r="";for(;this.state.pos<this.length;){const t=this.input[this.state.pos],e=this.input.codePointAt(this.state.pos);if(mt.has(t))r.indexOf(t)>-1&&this.raise(this.state.pos+1,f.DuplicateRegExpFlags);else{if(!N(e)&&92!==e)break;this.raise(this.state.pos+1,f.MalformedRegExpFlags)}++this.state.pos,r+=t}this.finishToken(n.regexp,{pattern:i,flags:r})}readInt(t,e,s,i=!0){const r=this.state.pos,a=16===t?ft.hex:ft.decBinOct,n=16===t?Dt.hex:10===t?Dt.dec:8===t?Dt.oct:Dt.bin;let o=!1,h=0;for(let r=0,c=null==e?1/0:e;r<c;++r){const e=this.input.charCodeAt(this.state.pos);let c;if(95!==e){if(c=e>=97?e-97+10:e>=65?e-65+10:dt(e)?e-48:1/0,c>=t)if(this.options.errorRecovery&&c<=9)c=0,this.raise(this.state.start+r+2,f.InvalidDigit,t);else{if(!s)break;c=0,o=!0}++this.state.pos,h=h*t+c}else{const t=this.input.charCodeAt(this.state.pos-1),e=this.input.charCodeAt(this.state.pos+1);(-1===n.indexOf(e)||a.indexOf(t)>-1||a.indexOf(e)>-1||Number.isNaN(e))&&this.raise(this.state.pos,f.UnexpectedNumericSeparator),i||this.raise(this.state.pos,f.NumericSeparatorInEscapeSequence),++this.state.pos}}return this.state.pos===r||null!=e&&this.state.pos-r!==e||o?null:h}readRadixNumber(t){const e=this.state.pos;let s=!1;this.state.pos+=2;const i=this.readInt(t);null==i&&this.raise(this.state.start+2,f.InvalidDigit,t);const r=this.input.charCodeAt(this.state.pos);if(110===r)++this.state.pos,s=!0;else if(109===r)throw this.raise(e,f.InvalidDecimal);if(w(this.input.codePointAt(this.state.pos)))throw this.raise(this.state.pos,f.NumberIdentifier);if(s){const t=this.input.slice(e,this.state.pos).replace(/[_n]/g,"");this.finishToken(n.bigint,t)}else this.finishToken(n.num,i)}readNumber(t){const e=this.state.pos;let s=!1,i=!1,r=!1,a=!1,o=!1;t||null!==this.readInt(10)||this.raise(e,f.InvalidNumber);const h=this.state.pos-e>=2&&48===this.input.charCodeAt(e);if(h){const t=this.input.slice(e,this.state.pos);if(this.state.strict)this.raise(e,f.StrictOctalLiteral);else{const s=t.indexOf("_");s>0&&this.raise(s+e,f.ZeroDigitNumericSeparator)}o=h&&!/[89]/.test(t)}let c=this.input.charCodeAt(this.state.pos);if(46!==c||o||(++this.state.pos,this.readInt(10),s=!0,c=this.input.charCodeAt(this.state.pos)),69!==c&&101!==c||o||(c=this.input.charCodeAt(++this.state.pos),43!==c&&45!==c||++this.state.pos,null===this.readInt(10)&&this.raise(e,f.InvalidNumber),s=!0,a=!0,c=this.input.charCodeAt(this.state.pos)),110===c&&((s||h)&&this.raise(e,f.InvalidBigIntLiteral),++this.state.pos,i=!0),109===c&&(this.expectPlugin("decimal",this.state.pos),(a||h)&&this.raise(e,f.InvalidDecimal),++this.state.pos,r=!0),w(this.input.codePointAt(this.state.pos)))throw this.raise(this.state.pos,f.NumberIdentifier);const p=this.input.slice(e,this.state.pos).replace(/[_mn]/g,"");if(i)return void this.finishToken(n.bigint,p);if(r)return void this.finishToken(n.decimal,p);const u=o?parseInt(p,8):parseFloat(p);this.finishToken(n.num,u)}readCodePoint(t){let e;if(123===this.input.charCodeAt(this.state.pos)){const s=++this.state.pos;if(e=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos,!0,t),++this.state.pos,null!==e&&e>1114111){if(!t)return null;this.raise(s,f.InvalidCodePoint)}}else e=this.readHexChar(4,!1,t);return e}readString(t){let e="",s=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,f.UnterminatedString);const i=this.input.charCodeAt(this.state.pos);if(i===t)break;if(92===i)e+=this.input.slice(s,this.state.pos),e+=this.readEscapedChar(!1),s=this.state.pos;else if(8232===i||8233===i)++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;else{if(c(i))throw this.raise(this.state.start,f.UnterminatedString);++this.state.pos}}e+=this.input.slice(s,this.state.pos++),this.finishToken(n.string,e)}readTmplToken(){let t="",e=this.state.pos,s=!1;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,f.UnterminatedTemplate);const i=this.input.charCodeAt(this.state.pos);if(96===i||36===i&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(n.template)?36===i?(this.state.pos+=2,void this.finishToken(n.dollarBraceL)):(++this.state.pos,void this.finishToken(n.backQuote)):(t+=this.input.slice(e,this.state.pos),void this.finishToken(n.template,s?null:t));if(92===i){t+=this.input.slice(e,this.state.pos);const i=this.readEscapedChar(!0);null===i?s=!0:t+=i,e=this.state.pos}else if(c(i)){switch(t+=this.input.slice(e,this.state.pos),++this.state.pos,i){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(i)}++this.state.curLine,this.state.lineStart=this.state.pos,e=this.state.pos}else++this.state.pos}}readEscapedChar(t){const e=!t,s=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,s){case 110:return"\n";case 114:return"\r";case 120:{const t=this.readHexChar(2,!1,e);return null===t?null:String.fromCharCode(t)}case 117:{const t=this.readCodePoint(e);return null===t?null:String.fromCodePoint(t)}case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:this.state.lineStart=this.state.pos,++this.state.curLine;case 8232:case 8233:return"";case 56:case 57:if(t)return null;this.state.strict&&this.raise(this.state.pos-1,f.StrictNumericEscape);default:if(s>=48&&s<=55){const e=this.state.pos-1;let s=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(s,8);i>255&&(s=s.slice(0,-1),i=parseInt(s,8)),this.state.pos+=s.length-1;const r=this.input.charCodeAt(this.state.pos);if("0"!==s||56===r||57===r){if(t)return null;this.state.strict?this.raise(e,f.StrictNumericEscape):this.state.octalPositions.push(e)}return String.fromCharCode(i)}return String.fromCharCode(s)}}readHexChar(t,e,s){const i=this.state.pos,r=this.readInt(16,t,e,!1);return null===r&&(s?this.raise(i,f.InvalidEscapeSequence):this.state.pos=i-1),r}readWord1(){let t="";this.state.containsEsc=!1;const e=this.state.pos;let s=this.state.pos;for(;this.state.pos<this.length;){const i=this.input.codePointAt(this.state.pos);if(N(i))this.state.pos+=i<=65535?1:2;else if(this.state.isIterator&&64===i)++this.state.pos;else{if(92!==i)break;{this.state.containsEsc=!0,t+=this.input.slice(s,this.state.pos);const i=this.state.pos,r=this.state.pos===e?w:N;if(117!==this.input.charCodeAt(++this.state.pos)){this.raise(this.state.pos,f.MissingUnicodeEscape);continue}++this.state.pos;const a=this.readCodePoint(!0);null!==a&&(r(a)||this.raise(i,f.EscapedCharNotAnIdentifier),t+=String.fromCodePoint(a)),s=this.state.pos}}}return t+this.input.slice(s,this.state.pos)}isIterator(t){return"@@iterator"===t||"@@asyncIterator"===t}readWord(){const t=this.readWord1(),e=i.get(t)||n.name;!this.state.isIterator||this.isIterator(t)&&this.state.inType||this.raise(this.state.pos,f.InvalidIdentifier,t),this.finishToken(e,t)}checkKeywordEscapes(){const t=this.state.type.keyword;t&&this.state.containsEsc&&this.raise(this.state.start,f.InvalidEscapedReservedWord,t)}braceIsBlock(t){const e=this.curContext();return e===x.functionExpression||e===x.functionStatement||(t!==n.colon||e!==x.braceStatement&&e!==x.braceExpression?t===n._return||t===n.name&&this.state.exprAllowed?o.test(this.input.slice(this.state.lastTokEnd,this.state.start)):t===n._else||t===n.semi||t===n.eof||t===n.parenR||t===n.arrow||(t===n.braceL?e===x.braceStatement:t!==n._var&&t!==n._const&&t!==n.name&&(t===n.relational||!this.state.exprAllowed)):!e.isExpr)}updateContext(t){const e=this.state.type;let s;!e.keyword||t!==n.dot&&t!==n.questionDot?(s=e.updateContext)?s.call(this,t):this.state.exprAllowed=e.beforeExpr:this.state.exprAllowed=!1}}{addExtra(t,e,s){if(!t)return;(t.extra=t.extra||{})[e]=s}isRelational(t){return this.match(n.relational)&&this.state.value===t}isLookaheadRelational(t){const e=this.nextTokenStart();if(this.input.charAt(e)===t){if(e+1===this.input.length)return!0;const s=this.input.charCodeAt(e+1);return s!==t.charCodeAt(0)&&61!==s}return!1}expectRelational(t){this.isRelational(t)?this.next():this.unexpected(null,n.relational)}isContextual(t){return this.match(n.name)&&this.state.value===t&&!this.state.containsEsc}isUnparsedContextual(t,e){const s=t+e.length;return this.input.slice(t,s)===e&&(s===this.input.length||!N(this.input.charCodeAt(s)))}isLookaheadContextual(t){const e=this.nextTokenStart();return this.isUnparsedContextual(e,t)}eatContextual(t){return this.isContextual(t)&&this.eat(n.name)}expectContextual(t,e){this.eatContextual(t)||this.unexpected(null,e)}canInsertSemicolon(){return this.match(n.eof)||this.match(n.braceR)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return o.test(this.input.slice(this.state.lastTokEnd,this.state.start))}isLineTerminator(){return this.eat(n.semi)||this.canInsertSemicolon()}semicolon(){this.isLineTerminator()||this.unexpected(null,n.semi)}expect(t,e){this.eat(t)||this.unexpected(e,t)}assertNoSpace(t="Unexpected space."){this.state.start>this.state.lastTokEnd&&this.raise(this.state.lastTokEnd,t)}unexpected(t,e="Unexpected token"){throw"string"!=typeof e&&(e='Unexpected token, expected "'.concat(e.label,'"')),this.raise(null!=t?t:this.state.start,e)}expectPlugin(t,e){if(!this.hasPlugin(t))throw this.raiseWithData(null!=e?e:this.state.start,{missingPlugin:[t]},"This experimental syntax requires enabling the parser plugin: '".concat(t,"'"));return!0}expectOnePlugin(t,e){if(!t.some(t=>this.hasPlugin(t)))throw this.raiseWithData(null!=e?e:this.state.start,{missingPlugin:t},"This experimental syntax requires enabling one of the following parser plugin(s): '".concat(t.join(", "),"'"))}checkYieldAwaitInDefaultParams(){-1!==this.state.yieldPos&&(-1===this.state.awaitPos||this.state.yieldPos<this.state.awaitPos)&&this.raise(this.state.yieldPos,f.YieldBindingIdentifier),-1!==this.state.awaitPos&&this.raise(this.state.awaitPos,f.AwaitBindingIdentifier)}tryParse(t,e=this.state.clone()){const s={node:null};try{const i=t((t=null)=>{throw s.node=t,s});if(this.state.errors.length>e.errors.length){const t=this.state;return this.state=e,{node:i,error:t.errors[e.errors.length],thrown:!1,aborted:!1,failState:t}}return{node:i,error:null,thrown:!1,aborted:!1,failState:null}}catch(t){const i=this.state;if(this.state=e,t instanceof SyntaxError)return{node:null,error:t,thrown:!0,aborted:!1,failState:i};if(t===s)return{node:s.node,error:null,thrown:!1,aborted:!0,failState:i};throw t}}checkExpressionErrors(t,e){if(!t)return!1;const{shorthandAssign:s,doubleProto:i}=t;if(!e)return s>=0||i>=0;s>=0&&this.unexpected(s),i>=0&&this.raise(i,f.DuplicateProto)}isLiteralPropertyName(){return this.match(n.name)||!!this.state.type.keyword||this.match(n.string)||this.match(n.num)||this.match(n.bigint)||this.match(n.decimal)}}{startNode(){return new gt(this,this.state.start,this.state.startLoc)}startNodeAt(t,e){return new gt(this,t,e)}startNodeAtNode(t){return this.startNodeAt(t.start,t.loc.start)}finishNode(t,e){return this.finishNodeAt(t,e,this.state.lastTokEnd,this.state.lastTokEndLoc)}finishNodeAt(t,e,s,i){return t.type=e,t.end=s,t.loc.end=i,this.options.ranges&&(t.range[1]=s),this.processComment(t),t}resetStartLocation(t,e,s){t.start=e,t.loc.start=s,this.options.ranges&&(t.range[0]=e)}resetEndLocation(t,e=this.state.lastTokEnd,s=this.state.lastTokEndLoc){t.end=e,t.loc.end=s,this.options.ranges&&(t.range[1]=e)}resetStartLocationFromNode(t,e){this.resetStartLocation(t,e.start,e.loc.start)}}{toAssignable(t){var e,s;let i=void 0;switch(("ParenthesizedExpression"===t.type||(null==(e=t.extra)?void 0:e.parenthesized))&&(i=Et(t),"Identifier"!==i.type&&"MemberExpression"!==i.type&&this.raise(t.start,f.InvalidParenthesizedAssignment)),t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":t.type="ObjectPattern";for(let e=0,s=t.properties.length,i=s-1;e<s;e++){var r;const s=t.properties[e],a=e===i;this.toAssignableObjectExpressionProp(s,a),a&&"RestElement"===s.type&&(null==(r=t.extra)?void 0:r.trailingComma)&&this.raiseRestNotLast(t.extra.trailingComma)}break;case"ObjectProperty":this.toAssignable(t.value);break;case"SpreadElement":{this.checkToRestConversion(t),t.type="RestElement";const e=t.argument;this.toAssignable(e);break}case"ArrayExpression":t.type="ArrayPattern",this.toAssignableList(t.elements,null==(s=t.extra)?void 0:s.trailingComma);break;case"AssignmentExpression":"="!==t.operator&&this.raise(t.left.end,f.MissingEqInAssignment),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left);break;case"ParenthesizedExpression":this.toAssignable(i)}return t}toAssignableObjectExpressionProp(t,e){if("ObjectMethod"===t.type){const e="get"===t.kind||"set"===t.kind?f.PatternHasAccessor:f.PatternHasMethod;this.raise(t.key.start,e)}else"SpreadElement"!==t.type||e?this.toAssignable(t):this.raiseRestNotLast(t.start)}toAssignableList(t,e){let s=t.length;if(s){const i=t[s-1];if("RestElement"===(null==i?void 0:i.type))--s;else if("SpreadElement"===(null==i?void 0:i.type)){i.type="RestElement";const t=i.argument;this.toAssignable(t),"Identifier"!==t.type&&"MemberExpression"!==t.type&&"ArrayPattern"!==t.type&&"ObjectPattern"!==t.type&&this.unexpected(t.start),e&&this.raiseTrailingCommaAfterRest(e),--s}}for(let e=0;e<s;e++){const s=t[e];s&&(this.toAssignable(s),"RestElement"===s.type&&this.raiseRestNotLast(s.start))}return t}toReferencedList(t,e){return t}toReferencedListDeep(t,e){this.toReferencedList(t,e);for(let e=0;e<t.length;e++){const s=t[e];"ArrayExpression"===(null==s?void 0:s.type)&&this.toReferencedListDeep(s.elements)}}parseSpread(t,e){const s=this.startNode();return this.next(),s.argument=this.parseMaybeAssign(!1,t,void 0,e),this.finishNode(s,"SpreadElement")}parseRestBinding(){const t=this.startNode();return this.next(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")}parseBindingAtom(){switch(this.state.type){case n.bracketL:{const t=this.startNode();return this.next(),t.elements=this.parseBindingList(n.bracketR,93,!0),this.finishNode(t,"ArrayPattern")}case n.braceL:return this.parseObjectLike(n.braceR,!0)}return this.parseIdentifier()}parseBindingList(t,e,s,i){const r=[];let a=!0;for(;!this.eat(t);)if(a?a=!1:this.expect(n.comma),s&&this.match(n.comma))r.push(null);else{if(this.eat(t))break;if(this.match(n.ellipsis)){r.push(this.parseAssignableListItemTypes(this.parseRestBinding())),this.checkCommaAfterRest(e),this.expect(t);break}{const t=[];for(this.match(n.at)&&this.hasPlugin("decorators")&&this.raise(this.state.start,f.UnsupportedParameterDecorator);this.match(n.at);)t.push(this.parseDecorator());r.push(this.parseAssignableListItem(i,t))}}return r}parseAssignableListItem(t,e){const s=this.parseMaybeDefault();this.parseAssignableListItemTypes(s);const i=this.parseMaybeDefault(s.start,s.loc.start,s);return e.length&&(s.decorators=e),i}parseAssignableListItemTypes(t){return t}parseMaybeDefault(t,e,s){var i,r,a;if(e=null!=(i=e)?i:this.state.startLoc,t=null!=(r=t)?r:this.state.start,s=null!=(a=s)?a:this.parseBindingAtom(),!this.eat(n.eq))return s;const o=this.startNodeAt(t,e);return o.left=s,o.right=this.parseMaybeAssign(),this.finishNode(o,"AssignmentPattern")}checkLVal(t,e=64,s,i,r,a=!1){switch(t.type){case"Identifier":if(this.state.strict&&(a?M(t.name,this.inModule):R(t.name))&&this.raise(t.start,64===e?f.StrictEvalArguments:f.StrictEvalArgumentsBinding,t.name),s){const e="_".concat(t.name);s[e]?this.raise(t.start,f.ParamDupe):s[e]=!0}r&&"let"===t.name&&this.raise(t.start,f.LetInLexicalBinding),64&e||this.scope.declareName(t.name,e,t.start);break;case"MemberExpression":64!==e&&this.raise(t.start,f.InvalidPropertyBindingPattern);break;case"ObjectPattern":for(let i=0,a=t.properties;i<a.length;i++){let t=a[i];if("ObjectProperty"===t.type)t=t.value;else if("ObjectMethod"===t.type)continue;this.checkLVal(t,e,s,"object destructuring pattern",r)}break;case"ArrayPattern":for(let i=0,a=t.elements;i<a.length;i++){const t=a[i];t&&this.checkLVal(t,e,s,"array destructuring pattern",r)}break;case"AssignmentPattern":this.checkLVal(t.left,e,s,"assignment pattern");break;case"RestElement":this.checkLVal(t.argument,e,s,"rest element");break;case"ParenthesizedExpression":this.checkLVal(t.expression,e,s,"parenthesized expression");break;default:this.raise(t.start,64===e?f.InvalidLhs:f.InvalidLhsBinding,i)}}checkToRestConversion(t){"Identifier"!==t.argument.type&&"MemberExpression"!==t.argument.type&&this.raise(t.argument.start,f.InvalidRestAssignmentPattern)}checkCommaAfterRest(t){this.match(n.comma)&&(this.lookaheadCharCode()===t?this.raiseTrailingCommaAfterRest(this.state.start):this.raiseRestNotLast(this.state.start))}raiseRestNotLast(t){throw this.raise(t,f.ElementAfterRest)}raiseTrailingCommaAfterRest(t){this.raise(t,f.RestTrailingComma)}}{checkProto(t,e,s,i){if("SpreadElement"===t.type||"ObjectMethod"===t.type||t.computed||t.shorthand)return;const r=t.key;if("__proto__"===("Identifier"===r.type?r.name:r.value)){if(e)return void this.raise(r.start,f.RecordNoProto);s.used&&(i?-1===i.doubleProto&&(i.doubleProto=r.start):this.raise(r.start,f.DuplicateProto)),s.used=!0}}shouldExitDescending(t,e){return"ArrowFunctionExpression"===t.type&&t.start===e}getExpression(){let t=0;this.hasPlugin("topLevelAwait")&&this.inModule&&(t|=2),this.scope.enter(1),this.prodParam.enter(t),this.nextToken();const e=this.parseExpression();return this.match(n.eof)||this.unexpected(),e.comments=this.state.comments,e.errors=this.state.errors,e}parseExpression(t,e){const s=this.state.start,i=this.state.startLoc,r=this.parseMaybeAssign(t,e);if(this.match(n.comma)){const a=this.startNodeAt(s,i);for(a.expressions=[r];this.eat(n.comma);)a.expressions.push(this.parseMaybeAssign(t,e));return this.toReferencedList(a.expressions),this.finishNode(a,"SequenceExpression")}return r}parseMaybeAssign(t,e,s,i){const r=this.state.start,a=this.state.startLoc;if(this.isContextual("yield")){if(this.prodParam.hasYield){let e=this.parseYield(t);return s&&(e=s.call(this,e,r,a)),e}this.state.exprAllowed=!1}let o;e?o=!1:(e=new xt,o=!0),(this.match(n.parenL)||this.match(n.name))&&(this.state.potentialArrowAt=this.state.start);let h=this.parseMaybeConditional(t,e,i);if(s&&(h=s.call(this,h,r,a)),this.state.type.isAssign){const s=this.startNodeAt(r,a),i=this.state.value;return s.operator=i,this.match(n.eq)?(s.left=this.toAssignable(h),e.doubleProto=-1):s.left=h,e.shorthandAssign>=s.left.start&&(e.shorthandAssign=-1),this.checkLVal(h,void 0,void 0,"assignment expression"),this.next(),s.right=this.parseMaybeAssign(t),this.finishNode(s,"AssignmentExpression")}return o&&this.checkExpressionErrors(e,!0),h}parseMaybeConditional(t,e,s){const i=this.state.start,r=this.state.startLoc,a=this.state.potentialArrowAt,n=this.parseExprOps(t,e);return this.shouldExitDescending(n,a)?n:this.parseConditional(n,t,i,r,s)}parseConditional(t,e,s,i,r){if(this.eat(n.question)){const r=this.startNodeAt(s,i);return r.test=t,r.consequent=this.parseMaybeAssign(),this.expect(n.colon),r.alternate=this.parseMaybeAssign(e),this.finishNode(r,"ConditionalExpression")}return t}parseExprOps(t,e){const s=this.state.start,i=this.state.startLoc,r=this.state.potentialArrowAt,a=this.parseMaybeUnary(e);return this.shouldExitDescending(a,r)?a:this.parseExprOp(a,s,i,-1,t)}parseExprOp(t,e,s,i,r){let a=this.state.type.binop;if(!(null==a||r&&this.match(n._in))&&a>i){const o=this.state.type;if(o===n.pipeline){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return t;this.state.inPipeline=!0,this.checkPipelineAtInfixOperator(t,e)}const h=this.startNodeAt(e,s);h.left=t,h.operator=this.state.value,o!==n.exponent||"UnaryExpression"!==t.type||!this.options.createParenthesizedExpressions&&t.extra&&t.extra.parenthesized||this.raise(t.argument.start,f.UnexpectedTokenUnaryExponentiation);const c=o===n.logicalOR||o===n.logicalAND,p=o===n.nullishCoalescing;if(p&&(a=n.logicalAND.binop),this.next(),o===n.pipeline&&"minimal"===this.getPluginOption("pipelineOperator","proposal")&&this.match(n.name)&&"await"===this.state.value&&this.prodParam.hasAwait)throw this.raise(this.state.start,f.UnexpectedAwaitAfterPipelineBody);h.right=this.parseExprOpRightExpr(o,a,r),this.finishNode(h,c||p?"LogicalExpression":"BinaryExpression");const u=this.state.type;if(p&&(u===n.logicalOR||u===n.logicalAND)||c&&u===n.nullishCoalescing)throw this.raise(this.state.start,f.MixingCoalesceWithLogical);return this.parseExprOp(h,e,s,i,r)}return t}parseExprOpRightExpr(t,e,s){const i=this.state.start,r=this.state.startLoc;switch(t){case n.pipeline:switch(this.getPluginOption("pipelineOperator","proposal")){case"smart":return this.withTopicPermittingContext(()=>this.parseSmartPipelineBody(this.parseExprOpBaseRightExpr(t,e,s),i,r));case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(e,s))}default:return this.parseExprOpBaseRightExpr(t,e,s)}}parseExprOpBaseRightExpr(t,e,s){const i=this.state.start,r=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnary(),i,r,t.rightAssociative?e-1:e,s)}parseMaybeUnary(t){if(this.isContextual("await")&&this.isAwaitAllowed())return this.parseAwait();const e=this.match(n.incDec),s=this.startNode();if(this.state.type.prefix){s.operator=this.state.value,s.prefix=!0,this.match(n._throw)&&this.expectPlugin("throwExpressions");const i=this.match(n._delete);if(this.next(),s.argument=this.parseMaybeUnary(),this.checkExpressionErrors(t,!0),this.state.strict&&i){const t=s.argument;"Identifier"===t.type?this.raise(s.start,f.StrictDelete):"MemberExpression"!==t.type&&"OptionalMemberExpression"!==t.type||"PrivateName"!==t.property.type||this.raise(s.start,f.DeletePrivateField)}if(!e)return this.finishNode(s,"UnaryExpression")}return this.parseUpdate(s,e,t)}parseUpdate(t,e,s){if(e)return this.checkLVal(t.argument,void 0,void 0,"prefix operation"),this.finishNode(t,"UpdateExpression");const i=this.state.start,r=this.state.startLoc;let a=this.parseExprSubscripts(s);if(this.checkExpressionErrors(s,!1))return a;for(;this.state.type.postfix&&!this.canInsertSemicolon();){const t=this.startNodeAt(i,r);t.operator=this.state.value,t.prefix=!1,t.argument=a,this.checkLVal(a,void 0,void 0,"postfix operation"),this.next(),a=this.finishNode(t,"UpdateExpression")}return a}parseExprSubscripts(t){const e=this.state.start,s=this.state.startLoc,i=this.state.potentialArrowAt,r=this.parseExprAtom(t);return this.shouldExitDescending(r,i)?r:this.parseSubscripts(r,e,s)}parseSubscripts(t,e,s,i){const r={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(t),stop:!1};do{const a=this.state.maybeInAsyncArrowHead;r.maybeAsyncArrow&&(this.state.maybeInAsyncArrowHead=!0),t=this.parseSubscript(t,e,s,i,r),r.maybeAsyncArrow=!1,this.state.maybeInAsyncArrowHead=a}while(!r.stop);return t}parseSubscript(t,e,s,i,r){if(!i&&this.eat(n.doubleColon))return this.parseBind(t,e,s,i,r);if(this.match(n.backQuote))return this.parseTaggedTemplateExpression(t,e,s,r);let a=!1;if(this.match(n.questionDot)){if(r.optionalChainMember=a=!0,i&&40===this.lookaheadCharCode())return r.stop=!0,t;this.next()}return!i&&this.match(n.parenL)?this.parseCoverCallAndAsyncArrowHead(t,e,s,r,a):a||this.match(n.bracketL)||this.eat(n.dot)?this.parseMember(t,e,s,r,a):(r.stop=!0,t)}parseMember(t,e,s,i,r){const a=this.startNodeAt(e,s),o=this.eat(n.bracketL);a.object=t,a.computed=o;const h=o?this.parseExpression():this.parseMaybePrivateName(!0);return"PrivateName"===h.type&&("Super"===a.object.type&&this.raise(e,f.SuperPrivateField),this.classScope.usePrivateName(h.id.name,h.start)),a.property=h,o&&this.expect(n.bracketR),i.optionalChainMember?(a.optional=r,this.finishNode(a,"OptionalMemberExpression")):this.finishNode(a,"MemberExpression")}parseBind(t,e,s,i,r){const a=this.startNodeAt(e,s);return a.object=t,a.callee=this.parseNoCallExpr(),r.stop=!0,this.parseSubscripts(this.finishNode(a,"BindExpression"),e,s,i)}parseCoverCallAndAsyncArrowHead(t,e,s,i,r){const a=this.state.maybeInArrowParameters,o=this.state.yieldPos,h=this.state.awaitPos;this.state.maybeInArrowParameters=!0,this.state.yieldPos=-1,this.state.awaitPos=-1,this.next();let c=this.startNodeAt(e,s);return c.callee=t,i.optionalChainMember&&(c.optional=r),c.arguments=r?this.parseCallExpressionArguments(n.parenR,!1):this.parseCallExpressionArguments(n.parenR,i.maybeAsyncArrow,"Import"===t.type,"Super"!==t.type,c),this.finishCallExpression(c,i.optionalChainMember),i.maybeAsyncArrow&&this.shouldParseAsyncArrow()&&!r?(i.stop=!0,c=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e,s),c),this.checkYieldAwaitInDefaultParams(),this.state.yieldPos=o,this.state.awaitPos=h):(this.toReferencedListDeep(c.arguments),-1!==o&&(this.state.yieldPos=o),(this.isAwaitAllowed()||a)&&-1===h||(this.state.awaitPos=h)),this.state.maybeInArrowParameters=a,c}parseTaggedTemplateExpression(t,e,s,i){const r=this.startNodeAt(e,s);return r.tag=t,r.quasi=this.parseTemplate(!0),i.optionalChainMember&&this.raise(e,f.OptionalChainingNoTemplate),this.finishNode(r,"TaggedTemplateExpression")}atPossibleAsyncArrow(t){return"Identifier"===t.type&&"async"===t.name&&this.state.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start==5&&t.start===this.state.potentialArrowAt}finishCallExpression(t,e){if("Import"===t.callee.type)if(2===t.arguments.length&&this.expectPlugin("moduleAttributes"),0===t.arguments.length||t.arguments.length>2)this.raise(t.start,f.ImportCallArity,this.hasPlugin("moduleAttributes")?"one or two arguments":"one argument");else for(let e=0,s=t.arguments;e<s.length;e++){const t=s[e];"SpreadElement"===t.type&&this.raise(t.start,f.ImportCallSpreadArgument)}return this.finishNode(t,e?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(t,e,s,i,r){const a=[];let o,h=!0;const c=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(t);){if(h)h=!1;else if(this.expect(n.comma),this.match(t)){s&&!this.hasPlugin("moduleAttributes")&&this.raise(this.state.lastTokStart,f.ImportCallArgumentTrailingComma),r&&this.addExtra(r,"trailingComma",this.state.lastTokStart),this.next();break}this.match(n.parenL)&&!o&&(o=this.state.start),a.push(this.parseExprListItem(!1,e?new xt:void 0,e?{start:0}:void 0,i))}return e&&o&&this.shouldParseAsyncArrow()&&this.unexpected(),this.state.inFSharpPipelineDirectBody=c,a}shouldParseAsyncArrow(){return this.match(n.arrow)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(t,e){var s;return this.expect(n.arrow),this.parseArrowExpression(t,e.arguments,!0,null==(s=e.extra)?void 0:s.trailingComma),t}parseNoCallExpr(){const t=this.state.start,e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,e,!0)}parseExprAtom(t){this.state.type===n.slash&&this.readRegexp();const e=this.state.potentialArrowAt===this.state.start;let s;switch(this.state.type){case n._super:return this.parseSuper();case n._import:return s=this.startNode(),this.next(),this.match(n.dot)?this.parseImportMetaProperty(s):(this.match(n.parenL)||this.raise(this.state.lastTokStart,f.UnsupportedImport),this.finishNode(s,"Import"));case n._this:return s=this.startNode(),this.next(),this.finishNode(s,"ThisExpression");case n.name:{const t=this.state.containsEsc,s=this.parseIdentifier();if(!t&&"async"===s.name&&!this.canInsertSemicolon()){if(this.match(n._function)){const t=this.state.context.length-1;if(this.state.context[t]!==x.functionStatement)throw new Error("Internal error");return this.state.context[t]=x.functionExpression,this.next(),this.parseFunction(this.startNodeAtNode(s),void 0,!0)}if(this.match(n.name))return this.parseAsyncArrowUnaryFunction(s)}return e&&this.match(n.arrow)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(s),[s],!1)):s}case n._do:return this.parseDo();case n.regexp:{const t=this.state.value;return s=this.parseLiteral(t.value,"RegExpLiteral"),s.pattern=t.pattern,s.flags=t.flags,s}case n.num:return this.parseLiteral(this.state.value,"NumericLiteral");case n.bigint:return this.parseLiteral(this.state.value,"BigIntLiteral");case n.decimal:return this.parseLiteral(this.state.value,"DecimalLiteral");case n.string:return this.parseLiteral(this.state.value,"StringLiteral");case n._null:return s=this.startNode(),this.next(),this.finishNode(s,"NullLiteral");case n._true:case n._false:return this.parseBooleanLiteral();case n.parenL:return this.parseParenAndDistinguishExpression(e);case n.bracketBarL:case n.bracketHashL:return this.parseArrayLike(this.state.type===n.bracketBarL?n.bracketBarR:n.bracketR,!1,!0,t);case n.bracketL:return this.parseArrayLike(n.bracketR,!0,!1,t);case n.braceBarL:case n.braceHashL:return this.parseObjectLike(this.state.type===n.braceBarL?n.braceBarR:n.braceR,!1,!0,t);case n.braceL:return this.parseObjectLike(n.braceR,!1,!1,t);case n._function:return this.parseFunctionOrFunctionSent();case n.at:this.parseDecorators();case n._class:return s=this.startNode(),this.takeDecorators(s),this.parseClass(s,!1);case n._new:return this.parseNewOrNewTarget();case n.backQuote:return this.parseTemplate(!1);case n.doubleColon:{s=this.startNode(),this.next(),s.object=null;const t=s.callee=this.parseNoCallExpr();if("MemberExpression"===t.type)return this.finishNode(s,"BindExpression");throw this.raise(t.start,f.UnsupportedBind)}case n.hash:{if(this.state.inPipeline)return s=this.startNode(),"smart"!==this.getPluginOption("pipelineOperator","proposal")&&this.raise(s.start,f.PrimaryTopicRequiresSmartPipeline),this.next(),this.primaryTopicReferenceIsAllowedInCurrentTopicContext()||this.raise(s.start,f.PrimaryTopicNotAllowed),this.registerTopicReference(),this.finishNode(s,"PipelinePrimaryTopicReference");const t=this.input.codePointAt(this.state.end);if(w(t)||92===t){const t=this.state.start;if(s=this.parseMaybePrivateName(!0),this.match(n._in))this.expectPlugin("privateIn"),this.classScope.usePrivateName(s.id.name,s.start);else{if(!this.hasPlugin("privateIn"))throw this.unexpected(t);this.raise(this.state.start,f.PrivateInExpectedIn,s.id.name)}return s}}case n.relational:if("<"===this.state.value){const t=this.input.codePointAt(this.nextTokenStart());(w(t)||62===t)&&this.expectOnePlugin(["jsx","flow","typescript"])}default:throw this.unexpected()}}parseAsyncArrowUnaryFunction(t){const e=this.startNodeAtNode(t),s=this.state.maybeInArrowParameters,i=this.state.maybeInAsyncArrowHead,r=this.state.yieldPos,a=this.state.awaitPos;this.state.maybeInArrowParameters=!0,this.state.maybeInAsyncArrowHead=!0,this.state.yieldPos=-1,this.state.awaitPos=-1;const o=[this.parseIdentifier()];return this.hasPrecedingLineBreak()&&this.raise(this.state.pos,f.LineTerminatorBeforeArrow),this.expect(n.arrow),this.checkYieldAwaitInDefaultParams(),this.state.maybeInArrowParameters=s,this.state.maybeInAsyncArrowHead=i,this.state.yieldPos=r,this.state.awaitPos=a,this.parseArrowExpression(e,o,!0),e}parseDo(){this.expectPlugin("doExpressions");const t=this.startNode();this.next();const e=this.state.labels;return this.state.labels=[],t.body=this.parseBlock(),this.state.labels=e,this.finishNode(t,"DoExpression")}parseSuper(){const t=this.startNode();return this.next(),!this.match(n.parenL)||this.scope.allowDirectSuper||this.options.allowSuperOutsideMethod?this.scope.allowSuper||this.options.allowSuperOutsideMethod||this.raise(t.start,f.UnexpectedSuper):this.raise(t.start,f.SuperNotAllowed),this.match(n.parenL)||this.match(n.bracketL)||this.match(n.dot)||this.raise(t.start,f.UnsupportedSuper),this.finishNode(t,"Super")}parseBooleanLiteral(){const t=this.startNode();return t.value=this.match(n._true),this.next(),this.finishNode(t,"BooleanLiteral")}parseMaybePrivateName(t){if(this.match(n.hash)){this.expectOnePlugin(["classPrivateProperties","classPrivateMethods"]),t||this.raise(this.state.pos,f.UnexpectedPrivateField);const e=this.startNode();return this.next(),this.assertNoSpace("Unexpected space between # and identifier"),e.id=this.parseIdentifier(!0),this.finishNode(e,"PrivateName")}return this.parseIdentifier(!0)}parseFunctionOrFunctionSent(){const t=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(n.dot)){const e=this.createIdentifier(this.startNodeAtNode(t),"function");return this.next(),this.parseMetaProperty(t,e,"sent")}return this.parseFunction(t)}parseMetaProperty(t,e,s){t.meta=e,"function"===e.name&&"sent"===s&&(this.isContextual(s)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected());const i=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==s||i)&&this.raise(t.property.start,f.UnsupportedMetaProperty,e.name,s),this.finishNode(t,"MetaProperty")}parseImportMetaProperty(t){const e=this.createIdentifier(this.startNodeAtNode(t),"import");return this.next(),this.isContextual("meta")&&(this.inModule||this.raiseWithData(e.start,{code:"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"},f.ImportMetaOutsideModule),this.sawUnambiguousESM=!0),this.parseMetaProperty(t,e,"meta")}parseLiteral(t,e,s,i){s=s||this.state.start,i=i||this.state.startLoc;const r=this.startNodeAt(s,i);return this.addExtra(r,"rawValue",t),this.addExtra(r,"raw",this.input.slice(s,this.state.end)),r.value=t,this.next(),this.finishNode(r,e)}parseParenAndDistinguishExpression(t){const e=this.state.start,s=this.state.startLoc;let i;this.next();const r=this.state.maybeInArrowParameters,a=this.state.yieldPos,o=this.state.awaitPos,h=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.yieldPos=-1,this.state.awaitPos=-1,this.state.inFSharpPipelineDirectBody=!1;const c=this.state.start,p=this.state.startLoc,u=[],l=new xt,d={start:0};let m,f,D=!0;for(;!this.match(n.parenR);){if(D)D=!1;else if(this.expect(n.comma,d.start||null),this.match(n.parenR)){f=this.state.start;break}if(this.match(n.ellipsis)){const t=this.state.start,e=this.state.startLoc;m=this.state.start,u.push(this.parseParenItem(this.parseRestBinding(),t,e)),this.checkCommaAfterRest(41);break}u.push(this.parseMaybeAssign(!1,l,this.parseParenItem,d))}const y=this.state.lastTokEnd,x=this.state.lastTokEndLoc;this.expect(n.parenR),this.state.maybeInArrowParameters=r,this.state.inFSharpPipelineDirectBody=h;let g=this.startNodeAt(e,s);if(t&&this.shouldParseArrow()&&(g=this.parseArrow(g))){this.isAwaitAllowed()||this.state.maybeInAsyncArrowHead||(this.state.awaitPos=o),this.checkYieldAwaitInDefaultParams(),this.state.yieldPos=a,this.state.awaitPos=o;for(let t=0;t<u.length;t++){const e=u[t];e.extra&&e.extra.parenthesized&&this.unexpected(e.extra.parenStart)}return this.parseArrowExpression(g,u,!1),g}if(-1!==a&&(this.state.yieldPos=a),-1!==o&&(this.state.awaitPos=o),u.length||this.unexpected(this.state.lastTokStart),f&&this.unexpected(f),m&&this.unexpected(m),this.checkExpressionErrors(l,!0),d.start&&this.unexpected(d.start),this.toReferencedListDeep(u,!0),u.length>1?(i=this.startNodeAt(c,p),i.expressions=u,this.finishNodeAt(i,"SequenceExpression",y,x)):i=u[0],!this.options.createParenthesizedExpressions)return this.addExtra(i,"parenthesized",!0),this.addExtra(i,"parenStart",e),i;const E=this.startNodeAt(e,s);return E.expression=i,this.finishNode(E,"ParenthesizedExpression"),E}shouldParseArrow(){return!this.canInsertSemicolon()}parseArrow(t){if(this.eat(n.arrow))return t}parseParenItem(t,e,s){return t}parseNewOrNewTarget(){const t=this.startNode();if(this.next(),this.match(n.dot)){const e=this.createIdentifier(this.startNodeAtNode(t),"new");this.next();const s=this.parseMetaProperty(t,e,"target");if(!this.scope.inNonArrowFunction&&!this.scope.inClass){let t=f.UnexpectedNewTarget;this.hasPlugin("classProperties")&&(t+=" or class properties"),this.raise(s.start,t)}return s}return this.parseNew(t)}parseNew(t){return t.callee=this.parseNoCallExpr(),"Import"===t.callee.type?this.raise(t.callee.start,f.ImportCallNotNewExpression):"OptionalMemberExpression"===t.callee.type||"OptionalCallExpression"===t.callee.type?this.raise(this.state.lastTokEnd,f.OptionalChainingNoNew):this.eat(n.questionDot)&&this.raise(this.state.start,f.OptionalChainingNoNew),this.parseNewArguments(t),this.finishNode(t,"NewExpression")}parseNewArguments(t){if(this.eat(n.parenL)){const e=this.parseExprList(n.parenR);this.toReferencedList(e),t.arguments=e}else t.arguments=[]}parseTemplateElement(t){const e=this.startNode();return null===this.state.value&&(t||this.raise(this.state.start+1,f.InvalidEscapeSequenceTemplate)),e.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),e.tail=this.match(n.backQuote),this.finishNode(e,"TemplateElement")}parseTemplate(t){const e=this.startNode();this.next(),e.expressions=[];let s=this.parseTemplateElement(t);for(e.quasis=[s];!s.tail;)this.expect(n.dollarBraceL),e.expressions.push(this.parseExpression()),this.expect(n.braceR),e.quasis.push(s=this.parseTemplateElement(t));return this.next(),this.finishNode(e,"TemplateLiteral")}parseObjectLike(t,e,s,i){s&&this.expectPlugin("recordAndTuple");const r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const a=Object.create(null);let o=!0;const h=this.startNode();for(h.properties=[],this.next();!this.eat(t);){if(o)o=!1;else if(this.expect(n.comma),this.match(t)){this.addExtra(h,"trailingComma",this.state.lastTokStart),this.next();break}const r=this.parsePropertyDefinition(e,i);e||this.checkProto(r,s,a,i),s&&"ObjectProperty"!==r.type&&"SpreadElement"!==r.type&&this.raise(r.start,f.InvalidRecordProperty),r.shorthand&&this.addExtra(r,"shorthand",!0),h.properties.push(r)}this.state.inFSharpPipelineDirectBody=r;let c="ObjectExpression";return e?c="ObjectPattern":s&&(c="RecordExpression"),this.finishNode(h,c)}maybeAsyncOrAccessorProp(t){return!t.computed&&"Identifier"===t.key.type&&(this.isLiteralPropertyName()||this.match(n.bracketL)||this.match(n.star))}parsePropertyDefinition(t,e){let s=[];if(this.match(n.at))for(this.hasPlugin("decorators")&&this.raise(this.state.start,f.UnsupportedPropertyDecorator);this.match(n.at);)s.push(this.parseDecorator());const i=this.startNode();let r,a,o=!1,h=!1,c=!1;if(this.match(n.ellipsis))return s.length&&this.unexpected(),t?(this.next(),i.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(i,"RestElement")):this.parseSpread();s.length&&(i.decorators=s,s=[]),i.method=!1,(t||e)&&(r=this.state.start,a=this.state.startLoc),t||(o=this.eat(n.star));const p=this.state.containsEsc;return this.parsePropertyName(i,!1),t||o||p||!this.maybeAsyncOrAccessorProp(i)||("async"!==i.key.name||this.hasPrecedingLineBreak()?"get"!==i.key.name&&"set"!==i.key.name||(c=!0,o=this.eat(n.star),i.kind=i.key.name,this.parsePropertyName(i,!1)):(h=!0,o=this.eat(n.star),this.parsePropertyName(i,!1))),this.parseObjPropValue(i,r,a,o,h,t,c,e),i}getGetterSetterExpectedParamCount(t){return"get"===t.kind?0:1}checkGetterSetterParams(t){const e=this.getGetterSetterExpectedParamCount(t),s=t.start;t.params.length!==e&&("get"===t.kind?this.raise(s,f.BadGetterArity):this.raise(s,f.BadSetterArity)),"set"===t.kind&&"RestElement"===t.params[t.params.length-1].type&&this.raise(s,f.BadSetterRestParameter)}parseObjectMethod(t,e,s,i,r){return r?(e&&this.unexpected(),this.parseMethod(t,!1,!1,!1,!1,"ObjectMethod"),this.checkGetterSetterParams(t),t):s||e||this.match(n.parenL)?(i&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,!1,"ObjectMethod")):void 0}parseObjectProperty(t,e,s,i,r){return t.shorthand=!1,this.eat(n.colon)?(t.value=i?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssign(!1,r),this.finishNode(t,"ObjectProperty")):t.computed||"Identifier"!==t.key.type?void 0:(this.checkReservedWord(t.key.name,t.key.start,!0,!1),i?t.value=this.parseMaybeDefault(e,s,t.key.__clone()):this.match(n.eq)&&r?(-1===r.shorthandAssign&&(r.shorthandAssign=this.state.start),t.value=this.parseMaybeDefault(e,s,t.key.__clone())):t.value=t.key.__clone(),t.shorthand=!0,this.finishNode(t,"ObjectProperty"))}parseObjPropValue(t,e,s,i,r,a,n,o){const h=this.parseObjectMethod(t,i,r,a,n)||this.parseObjectProperty(t,e,s,a,o);return h||this.unexpected(),h}parsePropertyName(t,e){if(this.eat(n.bracketL))t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(n.bracketR);else{const s=this.state.inPropertyName;this.state.inPropertyName=!0,t.key=this.match(n.num)||this.match(n.string)||this.match(n.bigint)||this.match(n.decimal)?this.parseExprAtom():this.parseMaybePrivateName(e),"PrivateName"!==t.key.type&&(t.computed=!1),this.state.inPropertyName=s}return t.key}initFunction(t,e){t.id=null,t.generator=!1,t.async=!!e}parseMethod(t,e,s,i,r,a,n=!1){const o=this.state.yieldPos,h=this.state.awaitPos;this.state.yieldPos=-1,this.state.awaitPos=-1,this.initFunction(t,s),t.generator=!!e;const c=i;return this.scope.enter(18|(n?64:0)|(r?32:0)),this.prodParam.enter(et(s,t.generator)),this.parseFunctionParams(t,c),this.parseFunctionBodyAndFinish(t,a,!0),this.prodParam.exit(),this.scope.exit(),this.state.yieldPos=o,this.state.awaitPos=h,t}parseArrayLike(t,e,s,i){s&&this.expectPlugin("recordAndTuple");const r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const a=this.startNode();return this.next(),a.elements=this.parseExprList(t,!s,i,a),e&&!this.state.maybeInArrowParameters&&this.toReferencedList(a.elements),this.state.inFSharpPipelineDirectBody=r,this.finishNode(a,s?"TupleExpression":"ArrayExpression")}parseArrowExpression(t,e,s,i){this.scope.enter(6),this.prodParam.enter(et(s,!1)),this.initFunction(t,s);const r=this.state.maybeInArrowParameters,a=this.state.yieldPos,n=this.state.awaitPos;return e&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(t,e,i)),this.state.maybeInArrowParameters=!1,this.state.yieldPos=-1,this.state.awaitPos=-1,this.parseFunctionBody(t,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=r,this.state.yieldPos=a,this.state.awaitPos=n,this.finishNode(t,"ArrowFunctionExpression")}setArrowFunctionParameters(t,e,s){t.params=this.toAssignableList(e,s)}parseFunctionBodyAndFinish(t,e,s=!1){this.parseFunctionBody(t,!1,s),this.finishNode(t,e)}parseFunctionBody(t,e,s=!1){const i=e&&!this.match(n.braceL),r=this.state.inParameters;if(this.state.inParameters=!1,i)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,e,!1);else{const i=this.state.strict,r=this.state.labels;this.state.labels=[],this.prodParam.enter(4|this.prodParam.currentFlags()),t.body=this.parseBlock(!0,!1,r=>{const a=!this.isSimpleParamList(t.params);if(r&&a){const e="method"!==t.kind&&"constructor"!==t.kind||!t.key?t.start:t.key.end;this.raise(e,f.IllegalLanguageModeDirective)}const n=!i&&this.state.strict;this.checkParams(t,!(this.state.strict||e||s||a),e,n),this.state.strict&&t.id&&this.checkLVal(t.id,65,void 0,"function name",void 0,n)}),this.prodParam.exit(),this.state.labels=r}this.state.inParameters=r}isSimpleParamList(t){for(let e=0,s=t.length;e<s;e++)if("Identifier"!==t[e].type)return!1;return!0}checkParams(t,e,s,i=!0){const r=Object.create(null);for(let s=0;s<t.params.length;s++)this.checkLVal(t.params[s],5,e?null:r,"function parameter list",void 0,i)}parseExprList(t,e,s,i){const r=[];let a=!0;for(;!this.eat(t);){if(a)a=!1;else if(this.expect(n.comma),this.match(t)){i&&this.addExtra(i,"trailingComma",this.state.lastTokStart),this.next();break}r.push(this.parseExprListItem(e,s))}return r}parseExprListItem(t,e,s,i){let r;if(this.match(n.comma))t||this.raise(this.state.pos,f.UnexpectedToken,","),r=null;else if(this.match(n.ellipsis)){const t=this.state.start,i=this.state.startLoc;r=this.parseParenItem(this.parseSpread(e,s),t,i)}else if(this.match(n.question)){this.expectPlugin("partialApplication"),i||this.raise(this.state.start,f.UnexpectedArgumentPlaceholder);const t=this.startNode();this.next(),r=this.finishNode(t,"ArgumentPlaceholder")}else r=this.parseMaybeAssign(!1,e,this.parseParenItem,s);return r}parseIdentifier(t){const e=this.startNode(),s=this.parseIdentifierName(e.start,t);return this.createIdentifier(e,s)}createIdentifier(t,e){return t.name=e,t.loc.identifierName=e,this.finishNode(t,"Identifier")}parseIdentifierName(t,e){let s;if(this.match(n.name))s=this.state.value;else{if(!this.state.type.keyword)throw this.unexpected();{s=this.state.type.keyword;const t=this.state.context;"class"!==s&&"function"!==s||"function"!==t[t.length-1].token||t.pop()}}return e?this.state.type=n.name:this.checkReservedWord(s,this.state.start,!!this.state.type.keyword,!1),this.next(),s}checkReservedWord(t,e,s,i){if(this.prodParam.hasYield&&"yield"===t)return void this.raise(e,f.YieldBindingIdentifier);if("await"===t){if(this.prodParam.hasAwait)return void this.raise(e,f.AwaitBindingIdentifier);-1===this.state.awaitPos&&(this.state.maybeInAsyncArrowHead||this.isAwaitAllowed())&&(this.state.awaitPos=this.state.start)}if(this.scope.inClass&&!this.scope.inNonArrowFunction&&"arguments"===t)return void this.raise(e,f.ArgumentsDisallowedInInitializer);if(s&&function(t){return F.has(t)}(t))return void this.raise(e,f.UnexpectedKeyword,t);(this.state.strict?i?M:O:L)(t,this.inModule)&&(this.prodParam.hasAwait||"await"!==t?this.raise(e,f.UnexpectedReservedWord,t):this.raise(e,f.AwaitNotInAsyncFunction))}isAwaitAllowed(){return this.scope.inFunction?this.prodParam.hasAwait:!!this.options.allowAwaitOutsideFunction||!!this.hasPlugin("topLevelAwait")&&(this.inModule&&this.prodParam.hasAwait)}parseAwait(){const t=this.startNode();return this.next(),this.state.inParameters?this.raise(t.start,f.AwaitExpressionFormalParameter):-1===this.state.awaitPos&&(this.state.awaitPos=t.start),this.eat(n.star)&&this.raise(t.start,f.ObsoleteAwaitStar),this.scope.inFunction||this.options.allowAwaitOutsideFunction||(this.hasPrecedingLineBreak()||this.match(n.plusMin)||this.match(n.parenL)||this.match(n.bracketL)||this.match(n.backQuote)||this.match(n.regexp)||this.match(n.slash)||this.hasPlugin("v8intrinsic")&&this.match(n.modulo)?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(t.argument=this.parseMaybeUnary()),this.finishNode(t,"AwaitExpression")}parseYield(t){const e=this.startNode();return this.state.inParameters?this.raise(e.start,f.YieldInParameter):-1===this.state.yieldPos&&(this.state.yieldPos=e.start),this.next(),this.match(n.semi)||!this.match(n.star)&&!this.state.type.startsExpr||this.hasPrecedingLineBreak()?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(n.star),e.argument=this.parseMaybeAssign(t)),this.finishNode(e,"YieldExpression")}checkPipelineAtInfixOperator(t,e){"smart"===this.getPluginOption("pipelineOperator","proposal")&&"SequenceExpression"===t.type&&this.raise(e,f.PipelineHeadSequenceExpression)}parseSmartPipelineBody(t,e,s){const i=this.checkSmartPipelineBodyStyle(t);return this.checkSmartPipelineBodyEarlyErrors(t,i,e),this.parseSmartPipelineBodyInStyle(t,i,e,s)}checkSmartPipelineBodyEarlyErrors(t,e,s){if(this.match(n.arrow))throw this.raise(this.state.start,f.PipelineBodyNoArrow);"PipelineTopicExpression"===e&&"SequenceExpression"===t.type&&this.raise(s,f.PipelineBodySequenceExpression)}parseSmartPipelineBodyInStyle(t,e,s,i){const r=this.startNodeAt(s,i);switch(e){case"PipelineBareFunction":r.callee=t;break;case"PipelineBareConstructor":r.callee=t.callee;break;case"PipelineBareAwaitedFunction":r.callee=t.argument;break;case"PipelineTopicExpression":this.topicReferenceWasUsedInCurrentTopicContext()||this.raise(s,f.PipelineTopicUnused),r.expression=t;break;default:throw new Error("Internal @babel/parser error: Unknown pipeline style (".concat(e,")"))}return this.finishNode(r,e)}checkSmartPipelineBodyStyle(t){return t.type,this.isSimpleReference(t)?"PipelineBareFunction":"PipelineTopicExpression"}isSimpleReference(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}}withTopicPermittingContext(t){const e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}withTopicForbiddingContext(t){const e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}withSoloAwaitPermittingContext(t){const e=this.state.soloAwait;this.state.soloAwait=!0;try{return t()}finally{this.state.soloAwait=e}}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}primaryTopicReferenceIsAllowedInCurrentTopicContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentTopicContext(){return null!=this.state.topicContext.maxTopicIndex&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(t,e){const s=this.state.start,i=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const a=this.parseExprOp(this.parseMaybeUnary(),s,i,t,e);return this.state.inFSharpPipelineDirectBody=r,a}}{parseTopLevel(t,e){if(e.sourceType=this.options.sourceType,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,n.eof),this.inModule&&!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(let t=0,e=Array.from(this.scope.undefinedExports);t<e.length;t++){const[s]=e[t],i=this.scope.undefinedExports.get(s);this.raise(i,f.ModuleExportUndefined,s)}return t.program=this.finishNode(e,"Program"),t.comments=this.state.comments,this.options.tokens&&(t.tokens=this.tokens),this.finishNode(t,"File")}stmtToDirective(t){const e=t.expression,s=this.startNodeAt(e.start,e.loc.start),i=this.startNodeAt(t.start,t.loc.start),r=this.input.slice(e.start,e.end),a=s.value=r.slice(1,-1);return this.addExtra(s,"raw",r),this.addExtra(s,"rawValue",a),i.value=this.finishNodeAt(s,"DirectiveLiteral",e.end,e.loc.end),this.finishNodeAt(i,"Directive",t.end,t.loc.end)}parseInterpreterDirective(){if(!this.match(n.interpreterDirective))return null;const t=this.startNode();return t.value=this.state.value,this.next(),this.finishNode(t,"InterpreterDirective")}isLet(t){if(!this.isContextual("let"))return!1;const e=this.nextTokenStart(),s=this.input.charCodeAt(e);if(91===s)return!0;if(t)return!1;if(123===s)return!0;if(w(s)){let t=e+1;for(;N(this.input.charCodeAt(t));)++t;const s=this.input.slice(e,t);if(!B.test(s))return!0}return!1}parseStatement(t,e){return this.match(n.at)&&this.parseDecorators(!0),this.parseStatementContent(t,e)}parseStatementContent(t,e){let s=this.state.type;const i=this.startNode();let r;switch(this.isLet(t)&&(s=n._var,r="let"),s){case n._break:case n._continue:return this.parseBreakContinueStatement(i,s.keyword);case n._debugger:return this.parseDebuggerStatement(i);case n._do:return this.parseDoStatement(i);case n._for:return this.parseForStatement(i);case n._function:if(46===this.lookaheadCharCode())break;return t&&(this.state.strict?this.raise(this.state.start,f.StrictFunction):"if"!==t&&"label"!==t&&this.raise(this.state.start,f.SloppyFunction)),this.parseFunctionStatement(i,!1,!t);case n._class:return t&&this.unexpected(),this.parseClass(i,!0);case n._if:return this.parseIfStatement(i);case n._return:return this.parseReturnStatement(i);case n._switch:return this.parseSwitchStatement(i);case n._throw:return this.parseThrowStatement(i);case n._try:return this.parseTryStatement(i);case n._const:case n._var:return r=r||this.state.value,t&&"var"!==r&&this.raise(this.state.start,f.UnexpectedLexicalDeclaration),this.parseVarStatement(i,r);case n._while:return this.parseWhileStatement(i);case n._with:return this.parseWithStatement(i);case n.braceL:return this.parseBlock();case n.semi:return this.parseEmptyStatement(i);case n._import:{const t=this.lookaheadCharCode();if(40===t||46===t)break}case n._export:{let t;return this.options.allowImportExportEverywhere||e||this.raise(this.state.start,f.UnexpectedImportExport),this.next(),s===n._import?(t=this.parseImport(i),"ImportDeclaration"!==t.type||t.importKind&&"value"!==t.importKind||(this.sawUnambiguousESM=!0)):(t=this.parseExport(i),("ExportNamedDeclaration"!==t.type||t.exportKind&&"value"!==t.exportKind)&&("ExportAllDeclaration"!==t.type||t.exportKind&&"value"!==t.exportKind)&&"ExportDefaultDeclaration"!==t.type||(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(i),t}default:if(this.isAsyncFunction())return t&&this.raise(this.state.start,f.AsyncFunctionInSingleStatementContext),this.next(),this.parseFunctionStatement(i,!0,!t)}const a=this.state.value,o=this.parseExpression();return s===n.name&&"Identifier"===o.type&&this.eat(n.colon)?this.parseLabeledStatement(i,a,o,t):this.parseExpressionStatement(i,o)}assertModuleNodeAllowed(t){this.options.allowImportExportEverywhere||this.inModule||this.raiseWithData(t.start,{code:"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"},f.ImportOutsideModule)}takeDecorators(t){const e=this.state.decoratorStack[this.state.decoratorStack.length-1];e.length&&(t.decorators=e,this.resetStartLocationFromNode(t,e[0]),this.state.decoratorStack[this.state.decoratorStack.length-1]=[])}canHaveLeadingDecorator(){return this.match(n._class)}parseDecorators(t){const e=this.state.decoratorStack[this.state.decoratorStack.length-1];for(;this.match(n.at);){const t=this.parseDecorator();e.push(t)}if(this.match(n._export))t||this.unexpected(),this.hasPlugin("decorators")&&!this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(this.state.start,f.DecoratorExportClass);else if(!this.canHaveLeadingDecorator())throw this.raise(this.state.start,f.UnexpectedLeadingDecorator)}parseDecorator(){this.expectOnePlugin(["decorators-legacy","decorators"]);const t=this.startNode();if(this.next(),this.hasPlugin("decorators")){this.state.decoratorStack.push([]);const e=this.state.start,s=this.state.startLoc;let i;if(this.eat(n.parenL))i=this.parseExpression(),this.expect(n.parenR);else for(i=this.parseIdentifier(!1);this.eat(n.dot);){const t=this.startNodeAt(e,s);t.object=i,t.property=this.parseIdentifier(!0),t.computed=!1,i=this.finishNode(t,"MemberExpression")}t.expression=this.parseMaybeDecoratorArguments(i),this.state.decoratorStack.pop()}else t.expression=this.parseExprSubscripts();return this.finishNode(t,"Decorator")}parseMaybeDecoratorArguments(t){if(this.eat(n.parenL)){const e=this.startNodeAtNode(t);return e.callee=t,e.arguments=this.parseCallExpressionArguments(n.parenR,!1),this.toReferencedList(e.arguments),this.finishNode(e,"CallExpression")}return t}parseBreakContinueStatement(t,e){const s="break"===e;return this.next(),this.isLineTerminator()?t.label=null:(t.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(t,e),this.finishNode(t,s?"BreakStatement":"ContinueStatement")}verifyBreakContinue(t,e){const s="break"===e;let i;for(i=0;i<this.state.labels.length;++i){const e=this.state.labels[i];if(null==t.label||e.name===t.label.name){if(null!=e.kind&&(s||"loop"===e.kind))break;if(t.label&&s)break}}i===this.state.labels.length&&this.raise(t.start,f.IllegalBreakContinue,e)}parseDebuggerStatement(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")}parseHeaderExpression(){this.expect(n.parenL);const t=this.parseExpression();return this.expect(n.parenR),t}parseDoStatement(t){return this.next(),this.state.labels.push(Pt),t.body=this.withTopicForbiddingContext(()=>this.parseStatement("do")),this.state.labels.pop(),this.expect(n._while),t.test=this.parseHeaderExpression(),this.eat(n.semi),this.finishNode(t,"DoWhileStatement")}parseForStatement(t){this.next(),this.state.labels.push(Pt);let e=-1;if(this.isAwaitAllowed()&&this.eatContextual("await")&&(e=this.state.lastTokStart),this.scope.enter(0),this.expect(n.parenL),this.match(n.semi))return e>-1&&this.unexpected(e),this.parseFor(t,null);const s=this.isLet();if(this.match(n._var)||this.match(n._const)||s){const i=this.startNode(),r=s?"let":this.state.value;return this.next(),this.parseVar(i,!0,r),this.finishNode(i,"VariableDeclaration"),(this.match(n._in)||this.isContextual("of"))&&1===i.declarations.length?this.parseForIn(t,i,e):(e>-1&&this.unexpected(e),this.parseFor(t,i))}const i=new xt,r=this.parseExpression(!0,i);if(this.match(n._in)||this.isContextual("of")){this.toAssignable(r);const s=this.isContextual("of")?"for-of statement":"for-in statement";return this.checkLVal(r,void 0,void 0,s),this.parseForIn(t,r,e)}return this.checkExpressionErrors(i,!0),e>-1&&this.unexpected(e),this.parseFor(t,r)}parseFunctionStatement(t,e,s){return this.next(),this.parseFunction(t,1|(s?0:2),e)}parseIfStatement(t){return this.next(),t.test=this.parseHeaderExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(n._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")}parseReturnStatement(t){return this.prodParam.hasReturn||this.options.allowReturnOutsideFunction||this.raise(this.state.start,f.IllegalReturn),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")}parseSwitchStatement(t){this.next(),t.discriminant=this.parseHeaderExpression();const e=t.cases=[];let s,i;for(this.expect(n.braceL),this.state.labels.push(bt),this.scope.enter(0);!this.match(n.braceR);)if(this.match(n._case)||this.match(n._default)){const t=this.match(n._case);s&&this.finishNode(s,"SwitchCase"),e.push(s=this.startNode()),s.consequent=[],this.next(),t?s.test=this.parseExpression():(i&&this.raise(this.state.lastTokStart,f.MultipleDefaultsInSwitch),i=!0,s.test=null),this.expect(n.colon)}else s?s.consequent.push(this.parseStatement(null)):this.unexpected();return this.scope.exit(),s&&this.finishNode(s,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")}parseThrowStatement(t){return this.next(),o.test(this.input.slice(this.state.lastTokEnd,this.state.start))&&this.raise(this.state.lastTokEnd,f.NewlineAfterThrow),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")}parseCatchClauseParam(){const t=this.parseBindingAtom(),e="Identifier"===t.type;return this.scope.enter(e?8:0),this.checkLVal(t,9,null,"catch clause"),t}parseTryStatement(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(n._catch)){const e=this.startNode();this.next(),this.match(n.parenL)?(this.expect(n.parenL),e.param=this.parseCatchClauseParam(),this.expect(n.parenR)):(e.param=null,this.scope.enter(0)),e.body=this.withTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(n._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,f.NoCatchOrFinally),this.finishNode(t,"TryStatement")}parseVarStatement(t,e){return this.next(),this.parseVar(t,!1,e),this.semicolon(),this.finishNode(t,"VariableDeclaration")}parseWhileStatement(t){return this.next(),t.test=this.parseHeaderExpression(),this.state.labels.push(Pt),t.body=this.withTopicForbiddingContext(()=>this.parseStatement("while")),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}parseWithStatement(t){return this.state.strict&&this.raise(this.state.start,f.StrictWith),this.next(),t.object=this.parseHeaderExpression(),t.body=this.withTopicForbiddingContext(()=>this.parseStatement("with")),this.finishNode(t,"WithStatement")}parseEmptyStatement(t){return this.next(),this.finishNode(t,"EmptyStatement")}parseLabeledStatement(t,e,s,i){for(let t=0,i=this.state.labels;t<i.length;t++){i[t].name===e&&this.raise(s.start,f.LabelRedeclaration,e)}const r=this.state.type.isLoop?"loop":this.match(n._switch)?"switch":null;for(let e=this.state.labels.length-1;e>=0;e--){const s=this.state.labels[e];if(s.statementStart!==t.start)break;s.statementStart=this.state.start,s.kind=r}return this.state.labels.push({name:e,kind:r,statementStart:this.state.start}),t.body=this.parseStatement(i?-1===i.indexOf("label")?i+"label":i:"label"),this.state.labels.pop(),t.label=s,this.finishNode(t,"LabeledStatement")}parseExpressionStatement(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")}parseBlock(t=!1,e=!0,s){const i=this.startNode();return this.expect(n.braceL),e&&this.scope.enter(0),this.parseBlockBody(i,t,!1,n.braceR,s),e&&this.scope.exit(),this.finishNode(i,"BlockStatement")}isValidDirective(t){return"ExpressionStatement"===t.type&&"StringLiteral"===t.expression.type&&!t.expression.extra.parenthesized}parseBlockBody(t,e,s,i,r){const a=t.body=[],n=t.directives=[];this.parseBlockOrModuleBlockBody(a,e?n:void 0,s,i,r)}parseBlockOrModuleBlockBody(t,e,s,i,r){const a=[],n=this.state.strict;let o=!1,h=!1;for(;!this.match(i);){!h&&this.state.octalPositions.length&&a.push(...this.state.octalPositions);const i=this.parseStatement(null,s);if(e&&!h&&this.isValidDirective(i)){const t=this.stmtToDirective(i);e.push(t),o||"use strict"!==t.value.value||(o=!0,this.setStrict(!0))}else h=!0,t.push(i)}if(this.state.strict&&a.length)for(let t=0;t<a.length;t++){const e=a[t];this.raise(e,f.StrictOctalLiteral)}r&&r.call(this,o),n||this.setStrict(!1),this.next()}parseFor(t,e){return t.init=e,this.expect(n.semi),t.test=this.match(n.semi)?null:this.parseExpression(),this.expect(n.semi),t.update=this.match(n.parenR)?null:this.parseExpression(),this.expect(n.parenR),t.body=this.withTopicForbiddingContext(()=>this.parseStatement("for")),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,"ForStatement")}parseForIn(t,e,s){const i=this.match(n._in);return this.next(),i?s>-1&&this.unexpected(s):t.await=s>-1,"VariableDeclaration"!==e.type||null==e.declarations[0].init||i&&!this.state.strict&&"var"===e.kind&&"Identifier"===e.declarations[0].id.type?"AssignmentPattern"===e.type&&this.raise(e.start,f.InvalidLhs,"for-loop"):this.raise(e.start,f.ForInOfLoopInitializer,i?"for-in":"for-of"),t.left=e,t.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(n.parenR),t.body=this.withTopicForbiddingContext(()=>this.parseStatement("for")),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,i?"ForInStatement":"ForOfStatement")}parseVar(t,e,s){const i=t.declarations=[],r=this.hasPlugin("typescript");for(t.kind=s;;){const t=this.startNode();if(this.parseVarId(t,s),this.eat(n.eq)?t.init=this.parseMaybeAssign(e):("const"!==s||this.match(n._in)||this.isContextual("of")?"Identifier"===t.id.type||e&&(this.match(n._in)||this.isContextual("of"))||this.raise(this.state.lastTokEnd,f.DeclarationMissingInitializer,"Complex binding patterns"):r||this.unexpected(),t.init=null),i.push(this.finishNode(t,"VariableDeclarator")),!this.eat(n.comma))break}return t}parseVarId(t,e){t.id=this.parseBindingAtom(),this.checkLVal(t.id,"var"===e?5:9,void 0,"variable declaration","var"!==e)}parseFunction(t,e=0,s=!1){const i=1&e,r=2&e,a=!(!i||4&e);this.initFunction(t,s),this.match(n.star)&&r&&this.raise(this.state.start,f.GeneratorInSingleStatementContext),t.generator=this.eat(n.star),i&&(t.id=this.parseFunctionId(a));const o=this.state.maybeInArrowParameters,h=this.state.yieldPos,c=this.state.awaitPos;return this.state.maybeInArrowParameters=!1,this.state.yieldPos=-1,this.state.awaitPos=-1,this.scope.enter(2),this.prodParam.enter(et(s,t.generator)),i||(t.id=this.parseFunctionId()),this.parseFunctionParams(t),this.withTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(t,i?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),i&&!r&&this.registerFunctionStatementId(t),this.state.maybeInArrowParameters=o,this.state.yieldPos=h,this.state.awaitPos=c,t}parseFunctionId(t){return t||this.match(n.name)?this.parseIdentifier():null}parseFunctionParams(t,e){const s=this.state.inParameters;this.state.inParameters=!0,this.expect(n.parenL),t.params=this.parseBindingList(n.parenR,41,!1,e),this.state.inParameters=s,this.checkYieldAwaitInDefaultParams()}registerFunctionStatementId(t){t.id&&this.scope.declareName(t.id.name,this.state.strict||t.generator||t.async?this.scope.treatFunctionsAsVar?5:9:17,t.id.start)}parseClass(t,e,s){this.next(),this.takeDecorators(t);const i=this.state.strict;return this.state.strict=!0,this.parseClassId(t,e,s),this.parseClassSuper(t),t.body=this.parseClassBody(!!t.superClass,i),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(n.eq)||this.match(n.semi)||this.match(n.braceR)}isClassMethod(){return this.match(n.parenL)}isNonstaticConstructor(t){return!(t.computed||t.static||"constructor"!==t.key.name&&"constructor"!==t.key.value)}parseClassBody(t,e){this.classScope.enter();const s={hadConstructor:!1};let i=[];const r=this.startNode();if(r.body=[],this.expect(n.braceL),this.withTopicForbiddingContext(()=>{for(;!this.match(n.braceR);){if(this.eat(n.semi)){if(i.length>0)throw this.raise(this.state.lastTokEnd,f.DecoratorSemicolon);continue}if(this.match(n.at)){i.push(this.parseDecorator());continue}const e=this.startNode();i.length&&(e.decorators=i,this.resetStartLocationFromNode(e,i[0]),i=[]),this.parseClassMember(r,e,s,t),"constructor"===e.kind&&e.decorators&&e.decorators.length>0&&this.raise(e.start,f.DecoratorConstructor)}}),this.state.strict=e,this.next(),i.length)throw this.raise(this.state.start,f.TrailingDecorator);return this.classScope.exit(),this.finishNode(r,"ClassBody")}maybeClassModifier(t){return!t.computed&&"Identifier"===t.key.type&&(this.isLiteralPropertyName()||this.match(n.bracketL)||this.match(n.star)||this.match(n.hash))}parseClassMemberFromModifier(t,e){const s=this.parseIdentifier(!0);if(this.isClassMethod()){const i=e;return i.kind="method",i.computed=!1,i.key=s,i.static=!1,this.pushClassMethod(t,i,!1,!1,!1,!1),!0}if(this.isClassProperty()){const i=e;return i.computed=!1,i.key=s,i.static=!1,t.body.push(this.parseClassProperty(i)),!0}return!1}parseClassMember(t,e,s,i){const r=this.isContextual("static");r&&this.parseClassMemberFromModifier(t,e)||this.parseClassMemberWithIsStatic(t,e,s,r,i)}parseClassMemberWithIsStatic(t,e,s,i,r){const a=e,o=e,h=e,c=e,p=a,u=a;if(e.static=i,this.eat(n.star))return p.kind="method",this.parseClassElementName(p),"PrivateName"===p.key.type?void this.pushClassPrivateMethod(t,o,!0,!1):(this.isNonstaticConstructor(a)&&this.raise(a.key.start,f.ConstructorIsGenerator),void this.pushClassMethod(t,a,!0,!1,!1,!1));const l=this.state.containsEsc,d=this.parseClassElementName(e),m="PrivateName"===d.type,D="Identifier"===d.type,y=this.state.start;if(this.parsePostMemberNameModifiers(u),this.isClassMethod()){if(p.kind="method",m)return void this.pushClassPrivateMethod(t,o,!1,!1);const e=this.isNonstaticConstructor(a);let i=!1;e&&(a.kind="constructor",s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(d.start,f.DuplicateConstructor),s.hadConstructor=!0,i=r),this.pushClassMethod(t,a,!1,!1,e,i)}else if(this.isClassProperty())m?this.pushClassPrivateProperty(t,c):this.pushClassProperty(t,h);else if(!D||"async"!==d.name||l||this.isLineTerminator())!D||"get"!==d.name&&"set"!==d.name||l||this.match(n.star)&&this.isLineTerminator()?this.isLineTerminator()?m?this.pushClassPrivateProperty(t,c):this.pushClassProperty(t,h):this.unexpected():(p.kind=d.name,this.parseClassElementName(a),"PrivateName"===p.key.type?this.pushClassPrivateMethod(t,o,!1,!1):(this.isNonstaticConstructor(a)&&this.raise(a.key.start,f.ConstructorIsAccessor),this.pushClassMethod(t,a,!1,!1,!1,!1)),this.checkGetterSetterParams(a));else{const e=this.eat(n.star);u.optional&&this.unexpected(y),p.kind="method",this.parseClassElementName(p),this.parsePostMemberNameModifiers(u),"PrivateName"===p.key.type?this.pushClassPrivateMethod(t,o,e,!0):(this.isNonstaticConstructor(a)&&this.raise(a.key.start,f.ConstructorIsAsync),this.pushClassMethod(t,a,e,!0,!1,!1))}}parseClassElementName(t){const e=this.parsePropertyName(t,!0);return t.computed||!t.static||"prototype"!==e.name&&"prototype"!==e.value||this.raise(e.start,f.StaticPrototype),"PrivateName"===e.type&&"constructor"===e.id.name&&this.raise(e.start,f.ConstructorClassPrivateField),e}pushClassProperty(t,e){e.computed||"constructor"!==e.key.name&&"constructor"!==e.key.value||this.raise(e.key.start,f.ConstructorClassField),t.body.push(this.parseClassProperty(e))}pushClassPrivateProperty(t,e){this.expectPlugin("classPrivateProperties",e.key.start);const s=this.parseClassPrivateProperty(e);t.body.push(s),this.classScope.declarePrivateName(s.key.id.name,0,s.key.start)}pushClassMethod(t,e,s,i,r,a){t.body.push(this.parseMethod(e,s,i,r,a,"ClassMethod",!0))}pushClassPrivateMethod(t,e,s,i){this.expectPlugin("classPrivateMethods",e.key.start);const r=this.parseMethod(e,s,i,!1,!1,"ClassPrivateMethod",!0);t.body.push(r);const a="get"===r.kind?r.static?6:2:"set"===r.kind?r.static?5:1:0;this.classScope.declarePrivateName(r.key.id.name,a,r.key.start)}parsePostMemberNameModifiers(t){}parseAccessModifier(){}parseClassPrivateProperty(t){return this.scope.enter(80),this.prodParam.enter(0),t.value=this.eat(n.eq)?this.parseMaybeAssign():null,this.semicolon(),this.prodParam.exit(),this.scope.exit(),this.finishNode(t,"ClassPrivateProperty")}parseClassProperty(t){return t.typeAnnotation||this.expectPlugin("classProperties"),this.scope.enter(80),this.prodParam.enter(0),this.match(n.eq)?(this.expectPlugin("classProperties"),this.next(),t.value=this.parseMaybeAssign()):t.value=null,this.semicolon(),this.prodParam.exit(),this.scope.exit(),this.finishNode(t,"ClassProperty")}parseClassId(t,e,s,i=139){this.match(n.name)?(t.id=this.parseIdentifier(),e&&this.checkLVal(t.id,i,void 0,"class name")):s||!e?t.id=null:this.unexpected(null,f.MissingClassName)}parseClassSuper(t){t.superClass=this.eat(n._extends)?this.parseExprSubscripts():null}parseExport(t){const e=this.maybeParseExportDefaultSpecifier(t),s=!e||this.eat(n.comma),i=s&&this.eatExportStar(t),r=i&&this.maybeParseExportNamespaceSpecifier(t),a=s&&(!r||this.eat(n.comma)),o=e||i;if(i&&!r)return e&&this.unexpected(),this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration");const h=this.maybeParseExportNamedSpecifiers(t);if(e&&s&&!i&&!h||r&&a&&!h)throw this.unexpected(null,n.braceL);let c;if(o||h?(c=!1,this.parseExportFrom(t,o)):c=this.maybeParseExportDeclaration(t),o||h||c)return this.checkExport(t,!0,!1,!!t.source),this.finishNode(t,"ExportNamedDeclaration");if(this.eat(n._default))return t.declaration=this.parseExportDefaultExpression(),this.checkExport(t,!0,!0),this.finishNode(t,"ExportDefaultDeclaration");throw this.unexpected(null,n.braceL)}eatExportStar(t){return this.eat(n.star)}maybeParseExportDefaultSpecifier(t){if(this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom");const e=this.startNode();return e.exported=this.parseIdentifier(!0),t.specifiers=[this.finishNode(e,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(t){if(this.isContextual("as")){t.specifiers||(t.specifiers=[]);const e=this.startNodeAt(this.state.lastTokStart,this.state.lastTokStartLoc);return this.next(),e.exported=this.parseIdentifier(!0),t.specifiers.push(this.finishNode(e,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(t){return!!this.match(n.braceL)&&(t.specifiers||(t.specifiers=[]),t.specifiers.push(...this.parseExportSpecifiers()),t.source=null,t.declaration=null,!0)}maybeParseExportDeclaration(t){if(this.shouldParseExportDeclaration()){if(this.isContextual("async")){const t=this.nextTokenStart();this.isUnparsedContextual(t,"function")||this.unexpected(t,n._function)}return t.specifiers=[],t.source=null,t.declaration=this.parseExportDeclaration(t),!0}return!1}isAsyncFunction(){if(!this.isContextual("async"))return!1;const t=this.nextTokenStart();return!o.test(this.input.slice(this.state.pos,t))&&this.isUnparsedContextual(t,"function")}parseExportDefaultExpression(){const t=this.startNode(),e=this.isAsyncFunction();if(this.match(n._function)||e)return this.next(),e&&this.next(),this.parseFunction(t,5,e);if(this.match(n._class))return this.parseClass(t,!0,!0);if(this.match(n.at))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(this.state.start,f.DecoratorBeforeExport),this.parseDecorators(!1),this.parseClass(t,!0,!0);if(this.match(n._const)||this.match(n._var)||this.isLet())throw this.raise(this.state.start,f.UnsupportedDefaultExport);{const t=this.parseMaybeAssign();return this.semicolon(),t}}parseExportDeclaration(t){return this.parseStatement(null)}isExportDefaultSpecifier(){if(this.match(n.name)){const t=this.state.value;if("async"===t&&!this.state.containsEsc||"let"===t)return!1;if(("type"===t||"interface"===t)&&!this.state.containsEsc){const t=this.lookahead();if(t.type===n.name&&"from"!==t.value||t.type===n.braceL)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(n._default))return!1;const t=this.nextTokenStart(),e=this.isUnparsedContextual(t,"from");if(44===this.input.charCodeAt(t)||this.match(n.name)&&e)return!0;if(this.match(n._default)&&e){const e=this.input.charCodeAt(this.nextTokenStartSince(t+4));return 34===e||39===e}return!1}parseExportFrom(t,e){this.eatContextual("from")?(t.source=this.parseImportSource(),this.checkExport(t)):e?this.unexpected():t.source=null,this.semicolon()}shouldParseExportDeclaration(){if(this.match(n.at)&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))){if(!this.getPluginOption("decorators","decoratorsBeforeExport"))return!0;this.unexpected(this.state.start,f.DecoratorBeforeExport)}return"var"===this.state.type.keyword||"const"===this.state.type.keyword||"function"===this.state.type.keyword||"class"===this.state.type.keyword||this.isLet()||this.isAsyncFunction()}checkExport(t,e,s,i){if(e)if(s){if(this.checkDuplicateExports(t,"default"),this.hasPlugin("exportDefaultFrom")){var r;const e=t.declaration;"Identifier"!==e.type||"from"!==e.name||e.end-e.start!=4||(null==(r=e.extra)?void 0:r.parenthesized)||this.raise(e.start,f.ExportDefaultFromAsIdentifier)}}else if(t.specifiers&&t.specifiers.length)for(let e=0,s=t.specifiers;e<s.length;e++){const t=s[e];this.checkDuplicateExports(t,t.exported.name),!i&&t.local&&(this.checkReservedWord(t.local.name,t.local.start,!0,!1),this.scope.checkLocalExport(t.local))}else if(t.declaration)if("FunctionDeclaration"===t.declaration.type||"ClassDeclaration"===t.declaration.type){const e=t.declaration.id;if(!e)throw new Error("Assertion failure");this.checkDuplicateExports(t,e.name)}else if("VariableDeclaration"===t.declaration.type)for(let e=0,s=t.declaration.declarations;e<s.length;e++){const t=s[e];this.checkDeclaration(t.id)}if(this.state.decoratorStack[this.state.decoratorStack.length-1].length){const e=t.declaration&&("ClassDeclaration"===t.declaration.type||"ClassExpression"===t.declaration.type);if(!t.declaration||!e)throw this.raise(t.start,f.UnsupportedDecoratorExport);this.takeDecorators(t.declaration)}}checkDeclaration(t){if("Identifier"===t.type)this.checkDuplicateExports(t,t.name);else if("ObjectPattern"===t.type)for(let e=0,s=t.properties;e<s.length;e++){const t=s[e];this.checkDeclaration(t)}else if("ArrayPattern"===t.type)for(let e=0,s=t.elements;e<s.length;e++){const t=s[e];t&&this.checkDeclaration(t)}else"ObjectProperty"===t.type?this.checkDeclaration(t.value):"RestElement"===t.type?this.checkDeclaration(t.argument):"AssignmentPattern"===t.type&&this.checkDeclaration(t.left)}checkDuplicateExports(t,e){this.state.exportedIdentifiers.indexOf(e)>-1&&this.raise(t.start,"default"===e?f.DuplicateDefaultExport:f.DuplicateExport,e),this.state.exportedIdentifiers.push(e)}parseExportSpecifiers(){const t=[];let e=!0;for(this.expect(n.braceL);!this.eat(n.braceR);){if(e)e=!1;else if(this.expect(n.comma),this.eat(n.braceR))break;const s=this.startNode();s.local=this.parseIdentifier(!0),s.exported=this.eatContextual("as")?this.parseIdentifier(!0):s.local.__clone(),t.push(this.finishNode(s,"ExportSpecifier"))}return t}parseImport(t){if(t.specifiers=[],!this.match(n.string)){const e=!this.maybeParseDefaultImportSpecifier(t)||this.eat(n.comma),s=e&&this.maybeParseStarImportSpecifier(t);e&&!s&&this.parseNamedImportSpecifiers(t),this.expectContextual("from")}t.source=this.parseImportSource();const e=this.maybeParseModuleAttributes();return e&&(t.attributes=e),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.match(n.string)||this.unexpected(),this.parseExprAtom()}shouldParseDefaultImport(t){return this.match(n.name)}parseImportSpecifierLocal(t,e,s,i){e.local=this.parseIdentifier(),this.checkLVal(e.local,9,void 0,i),t.specifiers.push(this.finishNode(e,s))}maybeParseModuleAttributes(){if(!this.match(n._with)||this.hasPrecedingLineBreak())return this.hasPlugin("moduleAttributes")?[]:null;this.expectPlugin("moduleAttributes"),this.next();const t=[],e=new Set;do{const s=this.startNode();if(s.key=this.parseIdentifier(!0),"type"!==s.key.name&&this.raise(s.key.start,f.ModuleAttributeDifferentFromType,s.key.name),e.has(s.key.name)&&this.raise(s.key.start,f.ModuleAttributesWithDuplicateKeys,s.key.name),e.add(s.key.name),this.expect(n.colon),!this.match(n.string))throw this.unexpected(this.state.start,f.ModuleAttributeInvalidValue);s.value=this.parseLiteral(this.state.value,"StringLiteral"),this.finishNode(s,"ImportAttribute"),t.push(s)}while(this.eat(n.comma));return t}maybeParseDefaultImportSpecifier(t){return!!this.shouldParseDefaultImport(t)&&(this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier","default import specifier"),!0)}maybeParseStarImportSpecifier(t){if(this.match(n.star)){const e=this.startNode();return this.next(),this.expectContextual("as"),this.parseImportSpecifierLocal(t,e,"ImportNamespaceSpecifier","import namespace specifier"),!0}return!1}parseNamedImportSpecifiers(t){let e=!0;for(this.expect(n.braceL);!this.eat(n.braceR);){if(e)e=!1;else{if(this.eat(n.colon))throw this.raise(this.state.start,f.DestructureNamedImport);if(this.expect(n.comma),this.eat(n.braceR))break}this.parseImportSpecifier(t)}}parseImportSpecifier(t){const e=this.startNode();e.imported=this.parseIdentifier(!0),this.eatContextual("as")?e.local=this.parseIdentifier():(this.checkReservedWord(e.imported.name,e.start,!0,!0),e.local=e.imported.__clone()),this.checkLVal(e.local,9,void 0,"import specifier"),t.specifiers.push(this.finishNode(e,"ImportSpecifier"))}}{constructor(t,e){super(t=function(t){const e={};for(let s=0,i=Object.keys(ut);s<i.length;s++){const r=i[s];e[r]=t&&null!=t[r]?t[r]:ut[r]}return e}(t),e);const s=this.getScopeHandler();this.options=t,this.inModule="module"===this.options.sourceType,this.scope=new s(this.raise.bind(this),this.inModule),this.prodParam=new tt,this.classScope=new Tt(this.raise.bind(this)),this.plugins=function(t){const e=new Map;for(let s=0;s<t.length;s++){const i=t[s],[r,a]=Array.isArray(i)?i:[i,{}];e.has(r)||e.set(r,a||{})}return e}(this.options.plugins),this.filename=t.sourceFilename}getScopeHandler(){return Y}parse(){let t=0;this.hasPlugin("topLevelAwait")&&this.inModule&&(t|=2),this.scope.enter(1),this.prodParam.enter(t);const e=this.startNode(),s=this.startNode();return this.nextToken(),e.errors=null,this.parseTopLevel(e,s),e.errors=this.state.errors,e}}function wt(t,e){let s=At;return(null==t?void 0:t.plugins)&&(!function(t){if(at(t,"decorators")){if(at(t,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");const e=nt(t,"decorators","decoratorsBeforeExport");if(null==e)throw new Error("The 'decorators' plugin requires a 'decoratorsBeforeExport' option, whose value must be a boolean. If you are migrating from Babylon/Babel 6 or want to use the old decorators proposal, you should use the 'decorators-legacy' plugin instead of 'decorators'.");if("boolean"!=typeof e)throw new Error("'decoratorsBeforeExport' must be a boolean.")}if(at(t,"flow")&&at(t,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(at(t,"placeholders")&&at(t,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(at(t,"pipelineOperator")&&!ot.includes(nt(t,"pipelineOperator","proposal")))throw new Error("'pipelineOperator' requires 'proposal' option whose value should be one of: "+ot.map(t=>"'".concat(t,"'")).join(", "));if(at(t,"moduleAttributes")&&"may-2020"!==nt(t,"moduleAttributes","version"))throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.");if(at(t,"recordAndTuple")&&!ht.includes(nt(t,"recordAndTuple","syntaxType")))throw new Error("'recordAndTuple' requires 'syntaxType' option whose value should be one of: "+ht.map(t=>"'".concat(t,"'")).join(", "))}(t.plugins),s=function(t){const e=pt.filter(e=>at(t,e)),s=e.join("/");let i=Nt[s];if(!i){i=At;for(let t=0;t<e.length;t++){const s=e[t];i=ct[s](i)}Nt[s]=i}return i}(t.plugins)),new s(t,e)}const Nt={};e.parse=function(t,e){var s;if("unambiguous"!==(null==(s=e)?void 0:s.sourceType))return wt(e,t).parse();e=Object.assign({},e);try{e.sourceType="module";const s=wt(e,t),i=s.parse();if(s.sawUnambiguousESM)return i;if(s.ambiguousScriptDifferentAst)try{return e.sourceType="script",wt(e,t).parse()}catch(t){}else i.program.sourceType="script";return i}catch(s){try{return e.sourceType="script",wt(e,t).parse()}catch(t){}throw s}},e.parseExpression=function(t,e){const s=wt(e,t);return s.options.strictMode&&(s.state.strict=!0),s.getExpression()},e.tokTypes=n}));const{hasPragma:qe}=ee,{locStart:Ve,locEnd:ze}=re;function He(e,...s){return(i,r,a)=>{const n=Ue,o=a&&"script"===a.__babelSourceType?"script":"module";let h;try{h=function(t,e){let s;for(let i=0;i<e.length;i++)try{return $e(t(e[i]))}catch(t){s||(s=t)}throw s}(t=>n[e](i,t),function(t,e,s){if(!t)return e;const i=[];for(const t of e)for(const e of s)i.push([...t,e]);return i}(i.includes("|>"),s,[["pipelineOperator",{proposal:"smart"}],["pipelineOperator",{proposal:"minimal"}],["pipelineOperator",{proposal:"fsharp"}]]).map(t=>function({sourceType:t,extraPlugins:e=[]}){return{sourceType:t,allowAwaitOutsideFunction:!0,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,plugins:["doExpressions","classProperties","exportDefaultFrom","functionBind","functionSent","classPrivateProperties","throwExpressions","classPrivateMethods","v8intrinsic","partialApplication",["decorators",{decoratorsBeforeExport:!1}],"privateIn",["moduleAttributes",{version:"may-2020"}],["recordAndTuple",{syntaxType:"hash"}],"decimal",...e],tokens:!0,ranges:!0}}({sourceType:o,extraPlugins:t})))}catch(e){throw t(e.message.replace(/ \(.*\)/,""),e.loc?{start:{line:e.loc.line,column:e.loc.column+1}}:{start:{line:0,column:0}})}return je(h,Object.assign({},a,{originalText:i}))}}const Ge=He("parse",["jsx","flow"]),We=He("parse",["jsx",["flow",{all:!0,enums:!0}]]),Xe=He("parse",["jsx","typescript"],["typescript"]),Ke=He("parseExpression",["jsx"]);function $e(t){if(t.errors)for(const e of t.errors)if("string"==typeof e.message&&(e.message.startsWith("Did not expect a type annotation here.")||e.message.startsWith("The only accepted module attribute is `type`")))throw e;return t}function Je(e,s){switch(e.type){case"ArrayExpression":return e.elements.forEach(i);case"ObjectExpression":return e.properties.forEach(i);case"ObjectProperty":if(e.computed)throw r("computed");if(e.shorthand)throw r("shorthand");return[e.key,e.value].forEach(i);case"UnaryExpression":switch(e.operator){case"+":case"-":return i(e.argument);default:throw r("operator")}case"Identifier":if(s&&"ObjectProperty"===s.type&&s.key===e)return;throw r();case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":return;default:throw r()}function i(t){return Je(t,e)}function r(s){const i=s?"".concat(e.type," with ").concat(s,"=").concat(JSON.stringify(e[s])):e.type;return t("".concat(i," is not allowed in JSON."),{start:{line:e.loc.start.line,column:e.loc.start.column+1}})}}const Ye={parse:Ge,astFormat:"estree",hasPragma:qe,locStart:Ve,locEnd:ze},Qe=Object.assign({},Ye,{parse:We}),Ze=Object.assign({},Ye,{parse:Xe}),ts=Object.assign({},Ye,{parse:Ke});return{parsers:{babel:Ye,"babel-flow":Qe,"babel-ts":Ze,json:Object.assign({},ts,{hasPragma:()=>!0}),json5:ts,"json-stringify":{parse:function(t,e,s){const i=Ke(t,e,s);return i.comments.forEach(Je),Je(i),i},astFormat:"estree-json",locStart:Ve,locEnd:ze},__js_expression:ts,__vue_expression:ts,__vue_event_binding:Ye}}}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):((t="undefined"!=typeof globalThis?globalThis:t||self).prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.babel=e())}(this,(function(){"use strict";var t=function(t,e){for(var s=-1,r=e.length,i=t.length;++s<r;)t[i+s]=e[s];return t},e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(t){return t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function r(t){var e={exports:{}};return t(e,e.exports),e.exports}var i="object"==typeof e&&e&&e.Object===Object&&e,a="object"==typeof self&&self&&self.Object===Object&&self,n=(i||a||Function("return this")()).Symbol,o=Object.prototype,u=o.hasOwnProperty,h=o.toString,c=n?n.toStringTag:void 0;var p=function(t){var e=u.call(t,c),s=t[c];try{t[c]=void 0;var r=!0}catch(t){}var i=h.call(t);return r&&(e?t[c]=s:delete t[c]),i},l=Object.prototype.toString;var d=function(t){return l.call(t)},D=n?n.toStringTag:void 0;var m=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":D&&D in Object(t)?p(t):d(t)};var f=function(t){return null!=t&&"object"==typeof t};var y=function(t){return f(t)&&"[object Arguments]"==m(t)},A=Object.prototype,E=A.hasOwnProperty,C=A.propertyIsEnumerable,x=y(function(){return arguments}())?y:function(t){return f(t)&&E.call(t,"callee")&&!C.call(t,"callee")},F=Array.isArray,g=n?n.isConcatSpreadable:void 0;var b=function(t){return F(t)||x(t)||!!(g&&t&&t[g])};var P=function e(s,r,i,a,n){var o=-1,u=s.length;for(i||(i=b),n||(n=[]);++o<u;){var h=s[o];r>0&&i(h)?r>1?e(h,r-1,i,a,n):t(n,h):a||(n[n.length]=h)}return n};var T=function(t){return(null==t?0:t.length)?P(t,1):[]};var w=function(...t){let e;for(const[s,r]of t.entries())try{return{result:r()}}catch(t){0===s&&(e=t)}return{error:e}},B=t=>"string"==typeof t?t.replace((({onlyFirst:t=!1}={})=>{const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")})(),""):t;const S=t=>!Number.isNaN(t)&&(t>=4352&&(t<=4447||9001===t||9002===t||11904<=t&&t<=12871&&12351!==t||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141));var N=S,I=S;N.default=I;const v=t=>{if("string"!=typeof t||0===t.length)return 0;if(0===(t=B(t)).length)return 0;t=t.replace(/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g," ");let e=0;for(let s=0;s<t.length;s++){const r=t.codePointAt(s);r<=31||r>=127&&r<=159||(r>=768&&r<=879||(r>65535&&s++,e+=N(r)?2:1))}return e};var k=v,L=v;k.default=L;var O=t=>{if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};var M=t=>t[t.length-1];function R(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var j=function(t){for(var e=-1,s=null==t?0:t.length,r={};++e<s;){var i=t[e];r[i[0]]=i[1]}return r},_=void 0!==_?_:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function U(){throw new Error("setTimeout has not been defined")}function q(){throw new Error("clearTimeout has not been defined")}var V=U,H=q;function z(t){if(V===setTimeout)return setTimeout(t,0);if((V===U||!V)&&setTimeout)return V=setTimeout,setTimeout(t,0);try{return V(t,0)}catch(e){try{return V.call(null,t,0)}catch(e){return V.call(this,t,0)}}}"function"==typeof _.setTimeout&&(V=setTimeout),"function"==typeof _.clearTimeout&&(H=clearTimeout);var W,G=[],K=!1,X=-1;function J(){K&&W&&(K=!1,W.length?G=W.concat(G):X=-1,G.length&&$())}function $(){if(!K){var t=z(J);K=!0;for(var e=G.length;e;){for(W=G,G=[];++X<e;)W&&W[X].run();X=-1,e=G.length}W=null,K=!1,function(t){if(H===clearTimeout)return clearTimeout(t);if((H===q||!H)&&clearTimeout)return H=clearTimeout,clearTimeout(t);try{H(t)}catch(e){try{return H.call(null,t)}catch(e){return H.call(this,t)}}}(t)}}function Y(t,e){this.fun=t,this.array=e}Y.prototype.run=function(){this.fun.apply(null,this.array)};function Q(){}var Z=Q,tt=Q,et=Q,st=Q,rt=Q,it=Q,at=Q;var nt=_.performance||{},ot=nt.now||nt.mozNow||nt.msNow||nt.oNow||nt.webkitNow||function(){return(new Date).getTime()};var ut=new Date;var ht={nextTick:function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var s=1;s<arguments.length;s++)e[s-1]=arguments[s];G.push(new Y(t,e)),1!==G.length||K||z($)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Z,addListener:tt,once:et,off:st,removeListener:rt,removeAllListeners:it,emit:at,binding:function(t){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var e=.001*ot.call(nt),s=Math.floor(e),r=Math.floor(e%1*1e9);return t&&(s-=t[0],(r-=t[1])<0&&(s--,r+=1e9)),[s,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-ut)/1e3}};var ct="object"==typeof ht&&ht.env&&ht.env.NODE_DEBUG&&/\bsemver\b/i.test(ht.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};var pt={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH:16},lt=r((function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:s}=pt,r=(e=t.exports={}).re=[],i=e.src=[],a=e.t={};let n=0;const o=(t,e,s)=>{const o=n++;ct(o,e),a[t]=o,i[o]=e,r[o]=new RegExp(e,s?"g":void 0)};o("NUMERICIDENTIFIER","0|[1-9]\\d*"),o("NUMERICIDENTIFIERLOOSE","[0-9]+"),o("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),o("MAINVERSION","(".concat(i[a.NUMERICIDENTIFIER],")\\.")+"(".concat(i[a.NUMERICIDENTIFIER],")\\.")+"(".concat(i[a.NUMERICIDENTIFIER],")")),o("MAINVERSIONLOOSE","(".concat(i[a.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(i[a.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(i[a.NUMERICIDENTIFIERLOOSE],")")),o("PRERELEASEIDENTIFIER","(?:".concat(i[a.NUMERICIDENTIFIER],"|").concat(i[a.NONNUMERICIDENTIFIER],")")),o("PRERELEASEIDENTIFIERLOOSE","(?:".concat(i[a.NUMERICIDENTIFIERLOOSE],"|").concat(i[a.NONNUMERICIDENTIFIER],")")),o("PRERELEASE","(?:-(".concat(i[a.PRERELEASEIDENTIFIER],"(?:\\.").concat(i[a.PRERELEASEIDENTIFIER],")*))")),o("PRERELEASELOOSE","(?:-?(".concat(i[a.PRERELEASEIDENTIFIERLOOSE],"(?:\\.").concat(i[a.PRERELEASEIDENTIFIERLOOSE],")*))")),o("BUILDIDENTIFIER","[0-9A-Za-z-]+"),o("BUILD","(?:\\+(".concat(i[a.BUILDIDENTIFIER],"(?:\\.").concat(i[a.BUILDIDENTIFIER],")*))")),o("FULLPLAIN","v?".concat(i[a.MAINVERSION]).concat(i[a.PRERELEASE],"?").concat(i[a.BUILD],"?")),o("FULL","^".concat(i[a.FULLPLAIN],"$")),o("LOOSEPLAIN","[v=\\s]*".concat(i[a.MAINVERSIONLOOSE]).concat(i[a.PRERELEASELOOSE],"?").concat(i[a.BUILD],"?")),o("LOOSE","^".concat(i[a.LOOSEPLAIN],"$")),o("GTLT","((?:<|>)?=?)"),o("XRANGEIDENTIFIERLOOSE","".concat(i[a.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),o("XRANGEIDENTIFIER","".concat(i[a.NUMERICIDENTIFIER],"|x|X|\\*")),o("XRANGEPLAIN","[v=\\s]*(".concat(i[a.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(i[a.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(i[a.XRANGEIDENTIFIER],")")+"(?:".concat(i[a.PRERELEASE],")?").concat(i[a.BUILD],"?")+")?)?"),o("XRANGEPLAINLOOSE","[v=\\s]*(".concat(i[a.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(i[a.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(i[a.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(i[a.PRERELEASELOOSE],")?").concat(i[a.BUILD],"?")+")?)?"),o("XRANGE","^".concat(i[a.GTLT],"\\s*").concat(i[a.XRANGEPLAIN],"$")),o("XRANGELOOSE","^".concat(i[a.GTLT],"\\s*").concat(i[a.XRANGEPLAINLOOSE],"$")),o("COERCE","".concat("(^|[^\\d])(\\d{1,").concat(s,"})")+"(?:\\.(\\d{1,".concat(s,"}))?")+"(?:\\.(\\d{1,".concat(s,"}))?")+"(?:$|[^\\d])"),o("COERCERTL",i[a.COERCE],!0),o("LONETILDE","(?:~>?)"),o("TILDETRIM","(\\s*)".concat(i[a.LONETILDE],"\\s+"),!0),e.tildeTrimReplace="$1~",o("TILDE","^".concat(i[a.LONETILDE]).concat(i[a.XRANGEPLAIN],"$")),o("TILDELOOSE","^".concat(i[a.LONETILDE]).concat(i[a.XRANGEPLAINLOOSE],"$")),o("LONECARET","(?:\\^)"),o("CARETTRIM","(\\s*)".concat(i[a.LONECARET],"\\s+"),!0),e.caretTrimReplace="$1^",o("CARET","^".concat(i[a.LONECARET]).concat(i[a.XRANGEPLAIN],"$")),o("CARETLOOSE","^".concat(i[a.LONECARET]).concat(i[a.XRANGEPLAINLOOSE],"$")),o("COMPARATORLOOSE","^".concat(i[a.GTLT],"\\s*(").concat(i[a.LOOSEPLAIN],")$|^$")),o("COMPARATOR","^".concat(i[a.GTLT],"\\s*(").concat(i[a.FULLPLAIN],")$|^$")),o("COMPARATORTRIM","(\\s*)".concat(i[a.GTLT],"\\s*(").concat(i[a.LOOSEPLAIN],"|").concat(i[a.XRANGEPLAIN],")"),!0),e.comparatorTrimReplace="$1$2$3",o("HYPHENRANGE","^\\s*(".concat(i[a.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(i[a.XRANGEPLAIN],")")+"\\s*$"),o("HYPHENRANGELOOSE","^\\s*(".concat(i[a.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(i[a.XRANGEPLAINLOOSE],")")+"\\s*$"),o("STAR","(<|>)?=?\\s*\\*"),o("GTE0","^\\s*>=\\s*0.0.0\\s*$"),o("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}));const dt=["includePrerelease","loose","rtl"];var Dt=t=>t?"object"!=typeof t?{loose:!0}:dt.filter((e=>t[e])).reduce(((t,e)=>(t[e]=!0,t)),{}):{};const mt=/^[0-9]+$/,ft=(t,e)=>{const s=mt.test(t),r=mt.test(e);return s&&r&&(t=+t,e=+e),t===e?0:s&&!r?-1:r&&!s?1:t<e?-1:1};var yt={compareIdentifiers:ft,rcompareIdentifiers:(t,e)=>ft(e,t)};const{MAX_LENGTH:At,MAX_SAFE_INTEGER:Et}=pt,{re:Ct,t:xt}=lt,{compareIdentifiers:Ft}=yt;class gt{constructor(t,e){if(e=Dt(e),t instanceof gt){if(t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError("Invalid Version: ".concat(t));if(t.length>At)throw new TypeError("version is longer than ".concat(At," characters"));ct("SemVer",t,e),this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease;const s=t.trim().match(e.loose?Ct[xt.LOOSE]:Ct[xt.FULL]);if(!s)throw new TypeError("Invalid Version: ".concat(t));if(this.raw=t,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>Et||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Et||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Et||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map((t=>{if(/^[0-9]+$/.test(t)){const e=+t;if(e>=0&&e<Et)return e}return t})):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version="".concat(this.major,".").concat(this.minor,".").concat(this.patch),this.prerelease.length&&(this.version+="-".concat(this.prerelease.join("."))),this.version}toString(){return this.version}compare(t){if(ct("SemVer.compare",this.version,this.options,t),!(t instanceof gt)){if("string"==typeof t&&t===this.version)return 0;t=new gt(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof gt||(t=new gt(t,this.options)),Ft(this.major,t.major)||Ft(this.minor,t.minor)||Ft(this.patch,t.patch)}comparePre(t){if(t instanceof gt||(t=new gt(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let e=0;do{const s=this.prerelease[e],r=t.prerelease[e];if(ct("prerelease compare",e,s,r),void 0===s&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===s)return-1;if(s!==r)return Ft(s,r)}while(++e)}compareBuild(t){t instanceof gt||(t=new gt(t,this.options));let e=0;do{const s=this.build[e],r=t.build[e];if(ct("prerelease compare",e,s,r),void 0===s&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===s)return-1;if(s!==r)return Ft(s,r)}while(++e)}inc(t,e){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e),this.inc("pre",e);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",e),this.inc("pre",e);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let t=this.prerelease.length;for(;--t>=0;)"number"==typeof this.prerelease[t]&&(this.prerelease[t]++,t=-2);-1===t&&this.prerelease.push(0)}e&&(this.prerelease[0]===e?isNaN(this.prerelease[1])&&(this.prerelease=[e,0]):this.prerelease=[e,0]);break;default:throw new Error("invalid increment argument: ".concat(t))}return this.format(),this.raw=this.version,this}}var bt=gt;var Pt=(t,e,s)=>new bt(t,s).compare(new bt(e,s));var Tt=(t,e,s)=>Pt(t,e,s)<0;var wt,Bt,St,Nt,It,vt,kt=(t,e,s)=>Pt(t,e,s)>=0,Lt="2.3.0",Ot=r((function(t,e){function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]}function r(){return"undefined"!=typeof WeakMap?new WeakMap:{add:s,delete:s,get:s,set:s,has:function(t){return!1}}}Object.defineProperty(e,"__esModule",{value:!0}),e.outdent=void 0;var i=Object.prototype.hasOwnProperty,a=function(t,e){return i.call(t,e)};function n(t,e){for(var s in e)a(e,s)&&(t[s]=e[s]);return t}var o=/^[ \t]*(?:\r\n|\r|\n)/,u=/(?:\r\n|\r|\n)[ \t]*$/,h=/^(?:[\r\n]|$)/,c=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,p=/^[ \t]*[\r\n][ \t\r\n]*$/;function l(t,e,s){var r=0,i=t[0].match(c);i&&(r=i[1].length);var a=new RegExp("(\\r\\n|\\r|\\n).{0,"+r+"}","g");e&&(t=t.slice(1));var n=s.newline,h=s.trimLeadingNewline,p=s.trimTrailingNewline,l="string"==typeof n,d=t.length;return t.map((function(t,e){return t=t.replace(a,"$1"),0===e&&h&&(t=t.replace(o,"")),e===d-1&&p&&(t=t.replace(u,"")),l&&(t=t.replace(/\r\n|\n|\r/g,(function(t){return n}))),t}))}function d(t,e){for(var s="",r=0,i=t.length;r<i;r++)s+=t[r],r<i-1&&(s+=e[r]);return s}function D(t){return a(t,"raw")&&a(t,"length")}var m=function t(e){var s=r(),i=r();return n((function r(a){for(var o=[],u=1;u<arguments.length;u++)o[u-1]=arguments[u];if(D(a)){var c=a,f=(o[0]===r||o[0]===m)&&p.test(c[0])&&h.test(c[1]),y=f?i:s,A=y.get(c);if(A||(A=l(c,f,e),y.set(c,A)),0===o.length)return A[0];var E=d(A,f?o.slice(1):o);return E}return t(n(n({},e),a||{}))}),{string:function(t){return l([t],!1,e)[0]}})}({trimLeadingNewline:!0,trimTrailingNewline:!0});e.outdent=m,e.default=m;try{t.exports=m,Object.defineProperty(m,"__esModule",{value:!0}),m.default=m,m.outdent=m}catch(t){}}));const{outdent:Mt}=Ot,Rt="Config",jt="Editor",_t="Other",Ut="Global",qt="Special",Vt={cursorOffset:{since:"1.4.0",category:qt,type:"int",default:-1,range:{start:-1,end:Number.POSITIVE_INFINITY,step:1},description:Mt(wt||(wt=R(["\n Print (to stderr) where a cursor at the given position would move to after formatting.\n This option cannot be used with --range-start and --range-end.\n "]))),cliCategory:jt},endOfLine:{since:"1.15.0",category:Ut,type:"choice",default:[{since:"1.15.0",value:"auto"},{since:"2.0.0",value:"lf"}],description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:Mt(Bt||(Bt=R(["\n Maintain existing\n (mixed values within one file are normalised by looking at what's used after the first line)\n "])))}]},filepath:{since:"1.4.0",category:qt,type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:_t,cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{since:"1.8.0",category:qt,type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:_t},parser:{since:"0.0.10",category:Ut,type:"choice",default:[{since:"0.0.10",value:"babylon"},{since:"1.13.0",value:void 0}],description:"Which parser to use.",exception:t=>"string"==typeof t||"function"==typeof t,choices:[{value:"flow",description:"Flow"},{value:"babel",since:"1.16.0",description:"JavaScript"},{value:"babel-flow",since:"1.16.0",description:"Flow"},{value:"babel-ts",since:"2.0.0",description:"TypeScript"},{value:"typescript",since:"1.4.0",description:"TypeScript"},{value:"espree",since:"2.2.0",description:"JavaScript"},{value:"meriyah",since:"2.2.0",description:"JavaScript"},{value:"css",since:"1.7.1",description:"CSS"},{value:"less",since:"1.7.1",description:"Less"},{value:"scss",since:"1.7.1",description:"SCSS"},{value:"json",since:"1.5.0",description:"JSON"},{value:"json5",since:"1.13.0",description:"JSON5"},{value:"json-stringify",since:"1.13.0",description:"JSON.stringify"},{value:"graphql",since:"1.5.0",description:"GraphQL"},{value:"markdown",since:"1.8.0",description:"Markdown"},{value:"mdx",since:"1.15.0",description:"MDX"},{value:"vue",since:"1.10.0",description:"Vue"},{value:"yaml",since:"1.14.0",description:"YAML"},{value:"glimmer",since:"2.3.0",description:"Ember / Handlebars"},{value:"html",since:"1.15.0",description:"HTML"},{value:"angular",since:"1.15.0",description:"Angular"},{value:"lwc",since:"1.17.0",description:"Lightning Web Components"}]},plugins:{since:"1.10.0",type:"path",array:!0,default:[{value:[]}],category:Ut,description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:t=>"string"==typeof t||"object"==typeof t,cliName:"plugin",cliCategory:Rt},pluginSearchDirs:{since:"1.13.0",type:"path",array:!0,default:[{value:[]}],category:Ut,description:Mt(St||(St=R(["\n Custom directory that contains prettier plugins in node_modules subdirectory.\n Overrides default behavior when plugins are searched relatively to the location of Prettier.\n Multiple values are accepted.\n "]))),exception:t=>"string"==typeof t||"object"==typeof t,cliName:"plugin-search-dir",cliCategory:Rt},printWidth:{since:"0.0.0",category:Ut,type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:Number.POSITIVE_INFINITY,step:1}},rangeEnd:{since:"1.4.0",category:qt,type:"int",default:Number.POSITIVE_INFINITY,range:{start:0,end:Number.POSITIVE_INFINITY,step:1},description:Mt(Nt||(Nt=R(["\n Format code ending at a given character offset (exclusive).\n The range will extend forwards to the end of the selected statement.\n This option cannot be used with --cursor-offset.\n "]))),cliCategory:jt},rangeStart:{since:"1.4.0",category:qt,type:"int",default:0,range:{start:0,end:Number.POSITIVE_INFINITY,step:1},description:Mt(It||(It=R(["\n Format code starting at a given character offset.\n The range will extend backwards to the start of the first line containing the selected statement.\n This option cannot be used with --cursor-offset.\n "]))),cliCategory:jt},requirePragma:{since:"1.7.0",category:qt,type:"boolean",default:!1,description:Mt(vt||(vt=R(["\n Require either '@prettier' or '@format' to be present in the file's first docblock comment\n in order for it to be formatted.\n "]))),cliCategory:_t},tabWidth:{type:"int",category:Ut,default:2,description:"Number of spaces per indentation level.",range:{start:0,end:Number.POSITIVE_INFINITY,step:1}},useTabs:{since:"1.0.0",category:Ut,type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{since:"2.1.0",category:Ut,type:"choice",default:[{since:"2.1.0",value:"auto"}],description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};const Ht={compare:Pt,lt:Tt,gte:kt},zt=Lt,Wt={CATEGORY_CONFIG:Rt,CATEGORY_EDITOR:jt,CATEGORY_FORMAT:"Format",CATEGORY_OTHER:_t,CATEGORY_OUTPUT:"Output",CATEGORY_GLOBAL:Ut,CATEGORY_SPECIAL:qt,options:Vt}.options;var Gt={getSupportInfo:function({plugins:t=[],showUnreleased:e=!1,showDeprecated:s=!1,showInternal:r=!1}={}){const i=zt.split("-",1)[0],a=t.reduce(((t,e)=>[...t,...e.languages||[]]),[]).filter(h),n=(o=Object.assign({},...t.map((({options:t})=>t)),Wt),u="name",Object.entries(o).map((([t,e])=>Object.assign({[u]:t},e)))).filter((t=>h(t)&&c(t))).sort(((t,e)=>t.name===e.name?0:t.name<e.name?-1:1)).map((function(t){if(r)return t;return function(t,e){if(null==t)return{};var s,r,i={},a=Object.keys(t);for(r=0;r<a.length;r++)s=a[r],e.indexOf(s)>=0||(i[s]=t[s]);return i}(t,["cliName","cliCategory","cliDescription"])})).map((e=>{e=Object.assign({},e),Array.isArray(e.default)&&(e.default=1===e.default.length?e.default[0].value:e.default.filter(h).sort(((t,e)=>Ht.compare(e.since,t.since)))[0].value),Array.isArray(e.choices)&&(e.choices=e.choices.filter((t=>h(t)&&c(t))),"parser"===e.name&&function(t,e,s){const r=new Set(t.choices.map((t=>t.value)));for(const i of e)if(i.parsers)for(const e of i.parsers)if(!r.has(e)){r.add(e);const a=s.find((t=>t.parsers&&t.parsers[e]));let n=i.name;a&&a.name&&(n+=" (plugin: ".concat(a.name,")")),t.choices.push({value:e,description:n})}}(e,a,t));const s=j(t.filter((t=>t.defaultOptions&&void 0!==t.defaultOptions[e.name])).map((t=>[t.name,t.defaultOptions[e.name]])));return Object.assign({},e,{pluginDefaults:s})}));var o,u;return{languages:a,options:n};function h(t){return e||!("since"in t)||t.since&&Ht.gte(i,t.since)}function c(t){return s||!("deprecated"in t)||t.deprecated&&Ht.lt(i,t.deprecated)}}};const{getSupportInfo:Kt}=Gt,Xt=/[^\x20-\x7F]/;function Jt(t){return(e,s,r)=>{const i=r&&r.backwards;if(!1===s)return!1;const{length:a}=e;let n=s;for(;n>=0&&n<a;){const s=e.charAt(n);if(t instanceof RegExp){if(!t.test(s))return n}else if(!t.includes(s))return n;i?n--:n++}return(-1===n||n===a)&&n}}const $t=Jt(/\s/),Yt=Jt(" \t"),Qt=Jt(",; \t"),Zt=Jt(/[^\n\r]/);function te(t,e){if(!1===e)return!1;if("/"===t.charAt(e)&&"*"===t.charAt(e+1))for(let s=e+2;s<t.length;++s)if("*"===t.charAt(s)&&"/"===t.charAt(s+1))return s+2;return e}function ee(t,e){return!1!==e&&("/"===t.charAt(e)&&"/"===t.charAt(e+1)?Zt(t,e):e)}function se(t,e,s){const r=s&&s.backwards;if(!1===e)return!1;const i=t.charAt(e);if(r){if("\r"===t.charAt(e-1)&&"\n"===i)return e-2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return e-1}else{if("\r"===i&&"\n"===t.charAt(e+1))return e+2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return e+1}return e}function re(t,e,s={}){const r=Yt(t,s.backwards?e-1:e,s);return r!==se(t,r,s)}function ie(t,e){let s=null,r=e;for(;r!==s;)s=r,r=Qt(t,r),r=te(t,r),r=Yt(t,r);return r=ee(t,r),r=se(t,r),!1!==r&&re(t,r)}function ae(t,e){let s=null,r=e;for(;r!==s;)s=r,r=Yt(t,r),r=te(t,r),r=ee(t,r),r=se(t,r);return r}function ne(t,e,s){return ae(t,s(e))}function oe(t,e,s=0){let r=0;for(let i=s;i<t.length;++i)"\t"===t[i]?r=r+e-r%e:r++;return r}function ue(t,e){const s=t.slice(1,-1),r={quote:'"',regex:/"/g},i={quote:"'",regex:/'/g},a="'"===e?i:r,n=a===i?r:i;let o=a.quote;if(s.includes(a.quote)||s.includes(n.quote)){o=(s.match(a.regex)||[]).length>(s.match(n.regex)||[]).length?n.quote:a.quote}return o}function he(t,e,s){const r='"'===e?"'":'"',i=t.replace(/\\([\S\s])|(["'])/g,((t,i,a)=>i===r?i:a===e?"\\"+a:a||(s&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(i)?i:"\\"+i)));return e+i+e}function ce(t,e){(t.comments||(t.comments=[])).push(e),e.printed=!1,e.nodeDescription=function(t){const e=t.type||t.kind||"(unknown type)";let s=String(t.name||t.id&&("object"==typeof t.id?t.id.name:t.id)||t.key&&("object"==typeof t.key?t.key.name:t.key)||t.value&&("object"==typeof t.value?"":String(t.value))||t.operator||"");s.length>20&&(s=s.slice(0,19)+"\u2026");return e+(s?" "+s:"")}(t)}var pe={inferParserByLanguage:function(t,e){const{languages:s}=Kt({plugins:e.plugins}),r=s.find((({name:e})=>e.toLowerCase()===t))||s.find((({aliases:e})=>Array.isArray(e)&&e.includes(t)))||s.find((({extensions:e})=>Array.isArray(e)&&e.includes(".".concat(t))));return r&&r.parsers[0]},replaceEndOfLineWith:function(t,e){const s=[];for(const r of t.split("\n"))s.length>0&&s.push(e),s.push(r);return s},getStringWidth:function(t){return t?Xt.test(t)?k(t):t.length:0},getMaxContinuousCount:function(t,e){const s=t.match(new RegExp("(".concat(O(e),")+"),"g"));return null===s?0:s.reduce(((t,s)=>Math.max(t,s.length/e.length)),0)},getMinNotPresentContinuousCount:function(t,e){const s=t.match(new RegExp("(".concat(O(e),")+"),"g"));if(null===s)return 0;const r=new Map;let i=0;for(const t of s){const s=t.length/e.length;r.set(s,!0),s>i&&(i=s)}for(let t=1;t<i;t++)if(!r.get(t))return t;return i+1},getPenultimate:t=>t[t.length-2],getLast:M,getNextNonSpaceNonCommentCharacterIndexWithStartIndex:ae,getNextNonSpaceNonCommentCharacterIndex:ne,getNextNonSpaceNonCommentCharacter:function(t,e,s){return t.charAt(ne(t,e,s))},skip:Jt,skipWhitespace:$t,skipSpaces:Yt,skipToLineEnd:Qt,skipEverythingButNewLine:Zt,skipInlineComment:te,skipTrailingComment:ee,skipNewline:se,isNextLineEmptyAfterIndex:ie,isNextLineEmpty:function(t,e,s){return ie(t,s(e))},isPreviousLineEmpty:function(t,e,s){let r=s(e)-1;return r=Yt(t,r,{backwards:!0}),r=se(t,r,{backwards:!0}),r=Yt(t,r,{backwards:!0}),r!==se(t,r,{backwards:!0})},hasNewline:re,hasNewlineInRange:function(t,e,s){for(let r=e;r<s;++r)if("\n"===t.charAt(r))return!0;return!1},hasSpaces:function(t,e,s={}){return Yt(t,s.backwards?e-1:e,s)!==e},getAlignmentSize:oe,getIndentSize:function(t,e){const s=t.lastIndexOf("\n");return-1===s?0:oe(t.slice(s+1).match(/^[\t ]*/)[0],e)},getPreferredQuote:ue,printString:function(t,e){return he(t.slice(1,-1),"json"===e.parser||"json5"===e.parser&&"preserve"===e.quoteProps&&!e.singleQuote?'"':e.__isInHtmlAttribute?"'":ue(t,e.singleQuote?"'":'"'),!("css"===e.parser||"less"===e.parser||"scss"===e.parser||e.__embeddedInHtml))},printNumber:function(t){return t.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(\d)/,"$1$2$3").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")},makeString:he,addLeadingComment:function(t,e){e.leading=!0,e.trailing=!1,ce(t,e)},addDanglingComment:function(t,e,s){e.leading=!1,e.trailing=!1,s&&(e.marker=s),ce(t,e)},addTrailingComment:function(t,e){e.leading=!1,e.trailing=!0,ce(t,e)},isFrontMatterNode:function(t){return t&&"front-matter"===t.type},getShebang:function(t){if(!t.startsWith("#!"))return"";const e=t.indexOf("\n");return-1===e?t:t.slice(0,e)},isNonEmptyArray:function(t){return Array.isArray(t)&&t.length>0},createGroupIdMapper:function(t){const e=new WeakMap;return function(s){return e.has(s)||e.set(s,Symbol(t)),e.get(s)}}};var le=function(t,e){const s=new SyntaxError(t+" ("+e.start.line+":"+e.start.column+")");return s.loc=e,s};const{isNonEmptyArray:de}=pe;function De(t,e){const{ignoreDecorators:s}=e||{};if(!s){const e=t.declaration&&t.declaration.decorators||t.decorators;if(de(e))return De(e[0])}return t.range?t.range[0]:t.start}function me(t){return t.range?t.range[1]:t.end}function fe(t,e){return De(t)===De(e)}var ye={locStart:De,locEnd:me,hasSameLocStart:fe,hasSameLoc:function(t,e){return fe(t,e)&&function(t,e){return me(t)===me(e)}(t,e)}},Ae=r((function(t){!function(){function e(t){if(null==t)return!1;switch(t.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function s(t){switch(t.type){case"IfStatement":return null!=t.alternate?t.alternate:t.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return t.body}return null}t.exports={isExpression:function(t){if(null==t)return!1;switch(t.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1},isStatement:e,isIterationStatement:function(t){if(null==t)return!1;switch(t.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1},isSourceElement:function(t){return e(t)||null!=t&&"FunctionDeclaration"===t.type},isProblematicIfStatement:function(t){var e;if("IfStatement"!==t.type)return!1;if(null==t.alternate)return!1;e=t.consequent;do{if("IfStatement"===e.type&&null==e.alternate)return!0;e=s(e)}while(e);return!1},trailingStatement:s}}()})),Ee=r((function(t){!function(){var e,s,r,i,a,n;function o(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(Math.floor((t-65536)/1024)+55296)+String.fromCharCode((t-65536)%1024+56320)}for(s={NonAsciiIdentifierStart:/[\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\u0561-\u0587\u05D0-\u05EA\u05F0-\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\u08A0-\u08B4\u08B6-\u08BD\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\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\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\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\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\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-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\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\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\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-\uAB65\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]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},e={NonAsciiIdentifierStart:/[\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\u0561-\u0587\u05D0-\u05EA\u05F0-\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\u08A0-\u08B4\u08B6-\u08BD\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\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\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\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\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\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-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\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-\u2C2E\u2C30-\u2C5E\u2C60-\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-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\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-\uAB65\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]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},r=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],i=new Array(128),n=0;n<128;++n)i[n]=n>=97&&n<=122||n>=65&&n<=90||36===n||95===n;for(a=new Array(128),n=0;n<128;++n)a[n]=n>=97&&n<=122||n>=65&&n<=90||n>=48&&n<=57||36===n||95===n;t.exports={isDecimalDigit:function(t){return 48<=t&&t<=57},isHexDigit:function(t){return 48<=t&&t<=57||97<=t&&t<=102||65<=t&&t<=70},isOctalDigit:function(t){return t>=48&&t<=55},isWhiteSpace:function(t){return 32===t||9===t||11===t||12===t||160===t||t>=5760&&r.indexOf(t)>=0},isLineTerminator:function(t){return 10===t||13===t||8232===t||8233===t},isIdentifierStartES5:function(t){return t<128?i[t]:s.NonAsciiIdentifierStart.test(o(t))},isIdentifierPartES5:function(t){return t<128?a[t]:s.NonAsciiIdentifierPart.test(o(t))},isIdentifierStartES6:function(t){return t<128?i[t]:e.NonAsciiIdentifierStart.test(o(t))},isIdentifierPartES6:function(t){return t<128?a[t]:e.NonAsciiIdentifierPart.test(o(t))}}}()})),Ce=r((function(t){!function(){var e=Ee;function s(t,e){return!(!e&&"yield"===t)&&r(t,e)}function r(t,e){if(e&&function(t){switch(t){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}(t))return!0;switch(t.length){case 2:return"if"===t||"in"===t||"do"===t;case 3:return"var"===t||"for"===t||"new"===t||"try"===t;case 4:return"this"===t||"else"===t||"case"===t||"void"===t||"with"===t||"enum"===t;case 5:return"while"===t||"break"===t||"catch"===t||"throw"===t||"const"===t||"yield"===t||"class"===t||"super"===t;case 6:return"return"===t||"typeof"===t||"delete"===t||"switch"===t||"export"===t||"import"===t;case 7:return"default"===t||"finally"===t||"extends"===t;case 8:return"function"===t||"continue"===t||"debugger"===t;case 10:return"instanceof"===t;default:return!1}}function i(t,e){return"null"===t||"true"===t||"false"===t||s(t,e)}function a(t,e){return"null"===t||"true"===t||"false"===t||r(t,e)}function n(t){var s,r,i;if(0===t.length)return!1;if(i=t.charCodeAt(0),!e.isIdentifierStartES5(i))return!1;for(s=1,r=t.length;s<r;++s)if(i=t.charCodeAt(s),!e.isIdentifierPartES5(i))return!1;return!0}function o(t){var s,r,i,a,n;if(0===t.length)return!1;for(n=e.isIdentifierStartES6,s=0,r=t.length;s<r;++s){if(55296<=(i=t.charCodeAt(s))&&i<=56319){if(++s>=r)return!1;if(!(56320<=(a=t.charCodeAt(s))&&a<=57343))return!1;i=1024*(i-55296)+(a-56320)+65536}if(!n(i))return!1;n=e.isIdentifierPartES6}return!0}t.exports={isKeywordES5:s,isKeywordES6:r,isReservedWordES5:i,isReservedWordES6:a,isRestrictedWord:function(t){return"eval"===t||"arguments"===t},isIdentifierNameES5:n,isIdentifierNameES6:o,isIdentifierES5:function(t,e){return n(t)&&!i(t,e)},isIdentifierES6:function(t,e){return o(t)&&!a(t,e)}}}()}));const xe=r((function(t,e){e.ast=Ae,e.code=Ee,e.keyword=Ce})).keyword.isIdentifierNameES5,{getLast:Fe,hasNewline:ge,skipWhitespace:be,isNonEmptyArray:Pe,isNextLineEmptyAfterIndex:Te}=pe,{locStart:we,locEnd:Be,hasSameLocStart:Se}=ye,Ne="(?:(?=.)\\s)",Ie=new RegExp("^".concat(Ne,"*:")),ve=new RegExp("^".concat(Ne,"*::"));function ke(t){return"AssignmentExpression"===t.type||"BinaryExpression"===t.type||"LogicalExpression"===t.type||"NGPipeExpression"===t.type||"ConditionalExpression"===t.type||Xe(t)||Je(t)||"SequenceExpression"===t.type||"TaggedTemplateExpression"===t.type||"BindExpression"===t.type||"UpdateExpression"===t.type&&!t.prefix||"TSAsExpression"===t.type||"TSNonNullExpression"===t.type}function Le(t){return"Block"===t.type||"CommentBlock"===t.type||"MultiLine"===t.type}function Oe(t){return"Line"===t.type||"CommentLine"===t.type||"SingleLine"===t.type||"HashbangComment"===t.type||"HTMLOpen"===t.type||"HTMLClose"===t.type}const Me=new Set(["ExportDefaultDeclaration","ExportDefaultSpecifier","DeclareExportDeclaration","ExportNamedDeclaration","ExportAllDeclaration"]);function Re(t){return t&&Me.has(t.type)}function je(t){return"NumericLiteral"===t.type||"Literal"===t.type&&"number"==typeof t.value}function _e(t){return"StringLiteral"===t.type||"Literal"===t.type&&"string"==typeof t.value}function Ue(t){return"FunctionExpression"===t.type||"ArrowFunctionExpression"===t.type}function qe(t){return Xe(t)&&"Identifier"===t.callee.type&&("async"===t.callee.name||"inject"===t.callee.name||"fakeAsync"===t.callee.name)}function Ve(t){return"JSXElement"===t.type||"JSXFragment"===t.type}function He(t){return"get"===t.kind||"set"===t.kind}function ze(t){return He(t)||Se(t,t.value)}const We=new Set(["BinaryExpression","LogicalExpression","NGPipeExpression"]);const Ge=new Set(["AnyTypeAnnotation","TSAnyKeyword","NullLiteralTypeAnnotation","TSNullKeyword","ThisTypeAnnotation","TSThisType","NumberTypeAnnotation","TSNumberKeyword","VoidTypeAnnotation","TSVoidKeyword","BooleanTypeAnnotation","TSBooleanKeyword","BigIntTypeAnnotation","TSBigIntKeyword","SymbolTypeAnnotation","TSSymbolKeyword","StringTypeAnnotation","TSStringKeyword","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType","EmptyTypeAnnotation","MixedTypeAnnotation","TSNeverKeyword","TSObjectKeyword","TSUndefinedKeyword","TSUnknownKeyword"]);const Ke=/^(skip|[fx]?(it|describe|test))$/;function Xe(t){return t&&("CallExpression"===t.type||"OptionalCallExpression"===t.type)}function Je(t){return t&&("MemberExpression"===t.type||"OptionalMemberExpression"===t.type)}function $e(t,e){return Ve(e)?hs(e):ls(e,cs.Leading,(e=>ge(t,Be(e))))}function Ye(t){return/^(\d+|\d+\.\d+)$/.test(t)}function Qe(t){return t.quasis.some((t=>t.value.raw.includes("\n")))}function Ze(t){return t.extra?t.extra.raw:t.raw}const ts={"==":!0,"!=":!0,"===":!0,"!==":!0},es={"*":!0,"/":!0,"%":!0},ss={">>":!0,">>>":!0,"<<":!0};const rs={};for(const[t,e]of[["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].entries())for(const s of e)rs[s]=t;function is(t){return rs[t]}const as=new WeakMap;function ns(t){if(as.has(t))return as.get(t);const e=[];return t.this&&e.push(t.this),Array.isArray(t.parameters)?e.push(...t.parameters):Array.isArray(t.params)&&e.push(...t.params),t.rest&&e.push(t.rest),as.set(t,e),e}const os=new WeakMap;function us(t){return"prettier-ignore"===t.value.trim()&&!t.unignore}function hs(t){return t&&(t.prettierIgnore||ls(t,cs.PrettierIgnore))}const cs={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},ps=(t,e)=>{if("function"==typeof t&&(e=t,t=0),t||e)return(s,r,i)=>!(t&cs.Leading&&!s.leading||t&cs.Trailing&&!s.trailing||t&cs.Dangling&&(s.leading||s.trailing)||t&cs.Block&&!Le(s)||t&cs.Line&&!Oe(s)||t&cs.First&&0!==r||t&cs.Last&&r!==i.length-1||t&cs.PrettierIgnore&&!us(s)||e&&!e(s))};function ls(t,e,s){if(!t||!Pe(t.comments))return!1;const r=ps(e,s);return!r||t.comments.some(r)}function ds(t,e,s){if(!t||!Array.isArray(t.comments))return[];const r=ps(e,s);return r?t.comments.filter(r):t.comments}function Ds(t){return Xe(t)||"NewExpression"===t.type||"ImportExpression"===t.type}var ms={getFunctionParameters:ns,iterateFunctionParametersPath:function(t,e){const s=t.getValue();let r=0;const i=t=>e(t,r++);s.this&&t.call(i,"this"),Array.isArray(s.parameters)?t.each(i,"parameters"):Array.isArray(s.params)&&t.each(i,"params"),s.rest&&t.call(i,"rest")},getCallArguments:function(t){if(os.has(t))return os.get(t);const e="ImportExpression"===t.type?[t.source]:t.arguments;return os.set(t,e),e},iterateCallArgumentsPath:function(t,e){"ImportExpression"===t.getValue().type?t.call((t=>e(t,0)),"source"):t.each(e,"arguments")},hasRestParameter:function(t){if(t.rest)return!0;const e=ns(t);return e.length>0&&"RestElement"===Fe(e).type},getLeftSidePathName:function(t,e){if(e.expressions)return["expressions",0];if(e.left)return["left"];if(e.test)return["test"];if(e.object)return["object"];if(e.callee)return["callee"];if(e.tag)return["tag"];if(e.argument)return["argument"];if(e.expression)return["expression"];throw new Error("Unexpected node has no left side.")},getParentExportDeclaration:function(t){const e=t.getParentNode();return"declaration"===t.getName()&&Re(e)?e:null},getTypeScriptMappedTypeModifier:function(t,e){return"+"===t?"+"+e:"-"===t?"-"+e:e},hasFlowAnnotationComment:function(t){return t&&Le(t[0])&&ve.test(t[0].value)},hasFlowShorthandAnnotationComment:function(t){return t.extra&&t.extra.parenthesized&&Pe(t.trailingComments)&&Le(t.trailingComments[0])&&Ie.test(t.trailingComments[0].value)},hasLeadingOwnLineComment:$e,hasNakedLeftSide:ke,hasNode:function t(e,s){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e))return e.some((e=>t(e,s)));const r=s(e);return"boolean"==typeof r?r:Object.values(e).some((e=>t(e,s)))},hasIgnoreComment:function(t){return hs(t.getValue())},hasNodeIgnoreComment:hs,identity:function(t){return t},isBinaryish:function(t){return We.has(t.type)},isBlockComment:Le,isCallLikeExpression:Ds,isLineComment:Oe,isPrettierIgnoreComment:us,isCallExpression:Xe,isMemberExpression:Je,isExportDeclaration:Re,isFlowAnnotationComment:function(t,e){const s=we(e),r=be(t,Be(e));return!1!==r&&"/*"===t.slice(s,s+2)&&"*/"===t.slice(r,r+2)},isFunctionCompositionArgs:function(t){if(t.length<=1)return!1;let e=0;for(const s of t)if(Ue(s)){if(e+=1,e>1)return!0}else if(Xe(s))for(const t of s.arguments)if(Ue(t))return!0;return!1},isFunctionNotation:ze,isFunctionOrArrowExpression:Ue,isGetterOrSetter:He,isJestEachTemplateLiteral:function(t,e){const s=/^[fx]?(describe|it|test)$/;return"TaggedTemplateExpression"===e.type&&e.quasi===t&&"MemberExpression"===e.tag.type&&"Identifier"===e.tag.property.type&&"each"===e.tag.property.name&&("Identifier"===e.tag.object.type&&s.test(e.tag.object.name)||"MemberExpression"===e.tag.object.type&&"Identifier"===e.tag.object.property.type&&("only"===e.tag.object.property.name||"skip"===e.tag.object.property.name)&&"Identifier"===e.tag.object.object.type&&s.test(e.tag.object.object.name))},isJsxNode:Ve,isLiteral:function(t){return"BooleanLiteral"===t.type||"DirectiveLiteral"===t.type||"Literal"===t.type||"NullLiteral"===t.type||"NumericLiteral"===t.type||"BigIntLiteral"===t.type||"DecimalLiteral"===t.type||"RegExpLiteral"===t.type||"StringLiteral"===t.type||"TemplateLiteral"===t.type||"TSTypeLiteral"===t.type||"JSXText"===t.type},isLongCurriedCallExpression:function(t){const e=t.getValue(),s=t.getParentNode();return Xe(e)&&Xe(s)&&s.callee===e&&e.arguments.length>s.arguments.length&&s.arguments.length>0},isSimpleCallArgument:function t(e,s){if(s>=2)return!1;const r=e=>t(e,s+1),i="Literal"===e.type&&"regex"in e&&e.regex.pattern||"RegExpLiteral"===e.type&&e.pattern;return!(i&&i.length>5)&&("Literal"===e.type||"BigIntLiteral"===e.type||"DecimalLiteral"===e.type||"BooleanLiteral"===e.type||"NullLiteral"===e.type||"NumericLiteral"===e.type||"RegExpLiteral"===e.type||"StringLiteral"===e.type||"Identifier"===e.type||"ThisExpression"===e.type||"Super"===e.type||"PrivateName"===e.type||"PrivateIdentifier"===e.type||"ArgumentPlaceholder"===e.type||"Import"===e.type||("TemplateLiteral"===e.type?e.quasis.every((t=>!t.value.raw.includes("\n")))&&e.expressions.every(r):"ObjectExpression"===e.type?e.properties.every((t=>!t.computed&&(t.shorthand||t.value&&r(t.value)))):"ArrayExpression"===e.type?e.elements.every((t=>null===t||r(t))):"ImportExpression"===e.type?r(e.source):Ds(e)?t(e.callee,s)&&e.arguments.every(r):Je(e)?t(e.object,s)&&t(e.property,s):"UnaryExpression"!==e.type||"!"!==e.operator&&"-"!==e.operator?"TSNonNullExpression"===e.type&&t(e.expression,s):t(e.argument,s)))},isMemberish:function(t){return Je(t)||"BindExpression"===t.type&&Boolean(t.object)},isNumericLiteral:je,isSignedNumericLiteral:function(t){return"UnaryExpression"===t.type&&("+"===t.operator||"-"===t.operator)&&je(t.argument)},isObjectType:function(t){return"ObjectTypeAnnotation"===t.type||"TSTypeLiteral"===t.type},isObjectTypePropertyAFunction:function(t){return!("ObjectTypeProperty"!==t.type&&"ObjectTypeInternalSlot"!==t.type||"FunctionTypeAnnotation"!==t.value.type||t.static||ze(t))},isSimpleType:function(t){return!!t&&(!("GenericTypeAnnotation"!==t.type&&"TSTypeReference"!==t.type||t.typeParameters)||!!Ge.has(t.type))},isSimpleNumber:Ye,isSimpleTemplateLiteral:function(t){let e="expressions";"TSTemplateLiteralType"===t.type&&(e="types");const s=t[e];return 0!==s.length&&s.every((t=>{if(ls(t))return!1;if("Identifier"===t.type||"ThisExpression"===t.type)return!0;if(Je(t)){let e=t;for(;Je(e);){if("Identifier"!==e.property.type&&"Literal"!==e.property.type&&"StringLiteral"!==e.property.type&&"NumericLiteral"!==e.property.type)return!1;if(e=e.object,ls(e))return!1}return"Identifier"===e.type||"ThisExpression"===e.type}return!1}))},isStringLiteral:_e,isStringPropSafeToUnquote:function(t,e){return"json"!==e.parser&&_e(t.key)&&Ze(t.key).slice(1,-1)===t.key.value&&(xe(t.key.value)&&!(("typescript"===e.parser||"babel-ts"===e.parser)&&"ClassProperty"===t.type)||Ye(t.key.value)&&String(Number(t.key.value))===t.key.value&&("babel"===e.parser||"espree"===e.parser||"meriyah"===e.parser))},isTemplateOnItsOwnLine:function(t,e){return("TemplateLiteral"===t.type&&Qe(t)||"TaggedTemplateExpression"===t.type&&Qe(t.quasi))&&!ge(e,we(t),{backwards:!0})},isTestCall:function t(e,s){if("CallExpression"!==e.type)return!1;if(1===e.arguments.length){if(qe(e)&&s&&t(s))return Ue(e.arguments[0]);if(function(t){return"Identifier"===t.callee.type&&/^(before|after)(Each|All)$/.test(t.callee.name)&&1===t.arguments.length}(e))return qe(e.arguments[0])}else if((2===e.arguments.length||3===e.arguments.length)&&("Identifier"===e.callee.type&&Ke.test(e.callee.name)||function(t){return Je(t.callee)&&"Identifier"===t.callee.object.type&&"Identifier"===t.callee.property.type&&Ke.test(t.callee.object.name)&&("only"===t.callee.property.name||"skip"===t.callee.property.name)}(e))&&(function(t){return"TemplateLiteral"===t.type}(e.arguments[0])||_e(e.arguments[0])))return!(e.arguments[2]&&!je(e.arguments[2]))&&((2===e.arguments.length?Ue(e.arguments[1]):function(t){return"FunctionExpression"===t.type||"ArrowFunctionExpression"===t.type&&"BlockStatement"===t.body.type}(e.arguments[1])&&ns(e.arguments[1]).length<=1)||qe(e.arguments[1]));return!1},isTheOnlyJsxElementInMarkdown:function(t,e){if("markdown"!==t.parentParser&&"mdx"!==t.parentParser)return!1;const s=e.getNode();if(!s.expression||!Ve(s.expression))return!1;const r=e.getParentNode();return"Program"===r.type&&1===r.body.length},isTSXFile:function(t){return t.filepath&&/\.tsx$/i.test(t.filepath)},isTypeAnnotationAFunction:function(t){return!("TypeAnnotation"!==t.type&&"TSTypeAnnotation"!==t.type||"FunctionTypeAnnotation"!==t.typeAnnotation.type||t.static||Se(t,t.typeAnnotation))},isNextLineEmpty:(t,{originalText:e})=>Te(e,Be(t)),needsHardlineAfterDanglingComment:function(t){if(!ls(t))return!1;const e=Fe(ds(t,cs.Dangling));return e&&!Le(e)},rawText:Ze,returnArgumentHasLeadingComment:function(t,e){if($e(t.originalText,e))return!0;if(ke(e)){let r,i=e;for(;r=(s=i).expressions?s.expressions[0]:s.left||s.test||s.callee||s.object||s.tag||s.argument||s.expression;)if(i=r,$e(t.originalText,i))return!0}var s;return!1},shouldPrintComma:function(t,e="es5"){return"es5"===t.trailingComma&&"es5"===e||"all"===t.trailingComma&&("all"===e||"es5"===e)},isBitwiseOperator:function(t){return Boolean(ss[t])||"|"===t||"^"===t||"&"===t},shouldFlatten:function(t,e){return is(e)===is(t)&&("**"!==t&&((!ts[t]||!ts[e])&&(!("%"===e&&es[t]||"%"===t&&es[e])&&((e===t||!es[e]||!es[t])&&(!ss[t]||!ss[e])))))},startsWithNoLookaheadToken:function t(e,s){switch((e=function(t){for(;t.left;)t=t.left;return t}(e)).type){case"FunctionExpression":case"ClassExpression":case"DoExpression":return s;case"ObjectExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return t(e.object,s);case"TaggedTemplateExpression":return"FunctionExpression"!==e.tag.type&&t(e.tag,s);case"CallExpression":case"OptionalCallExpression":return"FunctionExpression"!==e.callee.type&&t(e.callee,s);case"ConditionalExpression":return t(e.test,s);case"UpdateExpression":return!e.prefix&&t(e.argument,s);case"BindExpression":return e.object&&t(e.object,s);case"SequenceExpression":return t(e.expressions[0],s);case"TSAsExpression":case"TSNonNullExpression":return t(e.expression,s);default:return!1}},getPrecedence:is,hasComment:ls,getComments:ds,CommentCheckFlags:cs};const{getLast:fs,hasNewline:ys,getNextNonSpaceNonCommentCharacterIndexWithStartIndex:As,getNextNonSpaceNonCommentCharacter:Es,hasNewlineInRange:Cs,addLeadingComment:xs,addTrailingComment:Fs,addDanglingComment:gs,getNextNonSpaceNonCommentCharacterIndex:bs,isNonEmptyArray:Ps}=pe,{isBlockComment:Ts,getFunctionParameters:ws,isPrettierIgnoreComment:Bs,isJsxNode:Ss,hasFlowShorthandAnnotationComment:Ns,hasFlowAnnotationComment:Is,hasIgnoreComment:vs,isCallLikeExpression:ks,getCallArguments:Ls,isCallExpression:Os,isMemberExpression:Ms}=ms,{locStart:Rs,locEnd:js}=ye;function _s(t,e){const s=(t.body||t.properties).find((({type:t})=>"EmptyStatement"!==t));s?xs(s,e):gs(t,e)}function Us(t,e){"BlockStatement"===t.type?_s(t,e):xs(t,e)}function qs({comment:t,followingNode:e}){return!(!e||!fr(t))&&(xs(e,t),!0)}function Vs({comment:t,precedingNode:e,enclosingNode:s,followingNode:r,text:i}){if(!s||"IfStatement"!==s.type||!r)return!1;return")"===Es(i,t,js)?(Fs(e,t),!0):e===s.consequent&&r===s.alternate?("BlockStatement"===e.type?Fs(e,t):gs(s,t),!0):"BlockStatement"===r.type?(_s(r,t),!0):"IfStatement"===r.type?(Us(r.consequent,t),!0):s.consequent===r&&(xs(r,t),!0)}function Hs({comment:t,precedingNode:e,enclosingNode:s,followingNode:r,text:i}){if(!s||"WhileStatement"!==s.type||!r)return!1;return")"===Es(i,t,js)?(Fs(e,t),!0):"BlockStatement"===r.type?(_s(r,t),!0):s.body===r&&(xs(r,t),!0)}function zs({comment:t,precedingNode:e,enclosingNode:s,followingNode:r}){return!(!s||"TryStatement"!==s.type&&"CatchClause"!==s.type||!r)&&("CatchClause"===s.type&&e?(Fs(e,t),!0):"BlockStatement"===r.type?(_s(r,t),!0):"TryStatement"===r.type?(Us(r.finalizer,t),!0):"CatchClause"===r.type&&(Us(r.body,t),!0))}function Ws({comment:t,enclosingNode:e,followingNode:s}){return!(!Ms(e)||!s||"Identifier"!==s.type)&&(xs(e,t),!0)}function Gs({comment:t,precedingNode:e,enclosingNode:s,followingNode:r,text:i}){const a=e&&!Cs(i,js(e),Rs(t));return!(e&&a||!s||"ConditionalExpression"!==s.type&&"TSConditionalType"!==s.type||!r)&&(xs(r,t),!0)}function Ks({comment:t,precedingNode:e,enclosingNode:s}){return!(!s||"ObjectProperty"!==s.type&&"Property"!==s.type||!s.shorthand||s.key!==e||"AssignmentPattern"!==s.value.type)&&(Fs(s.value.left,t),!0)}function Xs({comment:t,precedingNode:e,enclosingNode:s,followingNode:r}){if(s&&("ClassDeclaration"===s.type||"ClassExpression"===s.type||"DeclareClass"===s.type||"DeclareInterface"===s.type||"InterfaceDeclaration"===s.type||"TSInterfaceDeclaration"===s.type)){if(Ps(s.decorators)&&(!r||"Decorator"!==r.type))return Fs(fs(s.decorators),t),!0;if(s.body&&r===s.body)return _s(s.body,t),!0;if(r)for(const i of["implements","extends","mixins"])if(s[i]&&r===s[i][0])return!e||e!==s.id&&e!==s.typeParameters&&e!==s.superClass?gs(s,t,i):Fs(e,t),!0}return!1}function Js({comment:t,precedingNode:e,enclosingNode:s,text:r}){return(s&&e&&("Property"===s.type||"TSDeclareMethod"===s.type||"TSAbstractMethodDefinition"===s.type)&&"Identifier"===e.type&&s.key===e&&":"!==Es(r,e,js)||!(!e||!s||"Decorator"!==e.type||"ClassMethod"!==s.type&&"ClassProperty"!==s.type&&"PropertyDefinition"!==s.type&&"TSAbstractClassProperty"!==s.type&&"TSAbstractMethodDefinition"!==s.type&&"TSDeclareMethod"!==s.type&&"MethodDefinition"!==s.type))&&(Fs(e,t),!0)}function $s({comment:t,precedingNode:e,enclosingNode:s,text:r}){return"("===Es(r,t,js)&&(!(!e||!s||"FunctionDeclaration"!==s.type&&"FunctionExpression"!==s.type&&"ClassMethod"!==s.type&&"MethodDefinition"!==s.type&&"ObjectMethod"!==s.type)&&(Fs(e,t),!0))}function Ys({comment:t,enclosingNode:e,text:s}){if(!e||"ArrowFunctionExpression"!==e.type)return!1;const r=bs(s,t,js);return!1!==r&&"=>"===s.slice(r,r+2)&&(gs(e,t),!0)}function Qs({comment:t,enclosingNode:e,text:s}){return")"===Es(s,t,js)&&(e&&(mr(e)&&0===ws(e).length||ks(e)&&0===Ls(e).length)?(gs(e,t),!0):!(!e||"MethodDefinition"!==e.type&&"TSAbstractMethodDefinition"!==e.type||0!==ws(e.value).length)&&(gs(e.value,t),!0))}function Zs({comment:t,precedingNode:e,enclosingNode:s,followingNode:r,text:i}){if(e&&"FunctionTypeParam"===e.type&&s&&"FunctionTypeAnnotation"===s.type&&r&&"FunctionTypeParam"!==r.type)return Fs(e,t),!0;if(e&&("Identifier"===e.type||"AssignmentPattern"===e.type)&&s&&mr(s)&&")"===Es(i,t,js))return Fs(e,t),!0;if(s&&"FunctionDeclaration"===s.type&&r&&"BlockStatement"===r.type){const e=(()=>{const t=ws(s);if(t.length>0)return As(i,js(fs(t)));const e=As(i,js(s.id));return!1!==e&&As(i,e+1)})();if(Rs(t)>e)return _s(r,t),!0}return!1}function tr({comment:t,enclosingNode:e}){return!(!e||"ImportSpecifier"!==e.type)&&(xs(e,t),!0)}function er({comment:t,enclosingNode:e}){return!(!e||"LabeledStatement"!==e.type)&&(xs(e,t),!0)}function sr({comment:t,enclosingNode:e}){return!(!e||"ContinueStatement"!==e.type&&"BreakStatement"!==e.type||e.label)&&(Fs(e,t),!0)}function rr({comment:t,precedingNode:e,enclosingNode:s}){return!!(Os(s)&&e&&s.callee===e&&s.arguments.length>0)&&(xs(s.arguments[0],t),!0)}function ir({comment:t,precedingNode:e,enclosingNode:s,followingNode:r}){return!s||"UnionTypeAnnotation"!==s.type&&"TSUnionType"!==s.type?(r&&("UnionTypeAnnotation"===r.type||"TSUnionType"===r.type)&&Bs(t)&&(r.types[0].prettierIgnore=!0,t.unignore=!0),!1):(Bs(t)&&(r.prettierIgnore=!0,t.unignore=!0),!!e&&(Fs(e,t),!0))}function ar({comment:t,enclosingNode:e}){return!(!e||"Property"!==e.type&&"ObjectProperty"!==e.type)&&(xs(e,t),!0)}function nr({comment:t,enclosingNode:e,followingNode:s,ast:r,isLastComment:i}){return r&&r.body&&0===r.body.length?(i?gs(r,t):xs(r,t),!0):e&&"Program"===e.type&&0===e.body.length&&e.directives&&0===e.directives.length?(i?gs(e,t):xs(e,t),!0):!(!s||"Program"!==s.type||0!==s.body.length||!e||"ModuleExpression"!==e.type)&&(gs(s,t),!0)}function or({comment:t,enclosingNode:e}){return!(!e||"ForInStatement"!==e.type&&"ForOfStatement"!==e.type)&&(xs(e,t),!0)}function ur({comment:t,precedingNode:e,enclosingNode:s,text:r}){return!!(e&&"ImportSpecifier"===e.type&&s&&"ImportDeclaration"===s.type&&ys(r,js(t)))&&(Fs(e,t),!0)}function hr({comment:t,enclosingNode:e}){return!(!e||"AssignmentPattern"!==e.type)&&(xs(e,t),!0)}function cr({comment:t,enclosingNode:e}){return!(!e||"TypeAlias"!==e.type)&&(xs(e,t),!0)}function pr({comment:t,enclosingNode:e,followingNode:s}){return!(!e||"VariableDeclarator"!==e.type&&"AssignmentExpression"!==e.type||!s||"ObjectExpression"!==s.type&&"ArrayExpression"!==s.type&&"TemplateLiteral"!==s.type&&"TaggedTemplateExpression"!==s.type&&!Ts(t))&&(xs(s,t),!0)}function lr({comment:t,enclosingNode:e,followingNode:s,text:r}){return!(s||!e||"TSMethodSignature"!==e.type&&"TSDeclareFunction"!==e.type&&"TSAbstractMethodDefinition"!==e.type||";"!==Es(r,t,js))&&(Fs(e,t),!0)}function dr({comment:t,enclosingNode:e,followingNode:s}){if(Bs(t)&&e&&"TSMappedType"===e.type&&s&&"TSTypeParameter"===s.type&&s.constraint)return e.prettierIgnore=!0,t.unignore=!0,!0}function Dr({comment:t,precedingNode:e,enclosingNode:s,followingNode:r}){return!(!s||"TSMappedType"!==s.type)&&(r&&"TSTypeParameter"===r.type&&r.name?(xs(r.name,t),!0):!(!e||"TSTypeParameter"!==e.type||!e.constraint)&&(Fs(e.constraint,t),!0))}function mr(t){return"ArrowFunctionExpression"===t.type||"FunctionExpression"===t.type||"FunctionDeclaration"===t.type||"ObjectMethod"===t.type||"ClassMethod"===t.type||"TSDeclareFunction"===t.type||"TSCallSignatureDeclaration"===t.type||"TSConstructSignatureDeclaration"===t.type||"TSMethodSignature"===t.type||"TSConstructorType"===t.type||"TSFunctionType"===t.type||"TSDeclareMethod"===t.type}function fr(t){return Ts(t)&&"*"===t.value[0]&&/@type\b/.test(t.value)}var yr={handleOwnLineComment:function(t){return[dr,Zs,Ws,Vs,Hs,zs,Xs,tr,or,ir,nr,ur,hr,Js,er].some((e=>e(t)))},handleEndOfLineComment:function(t){return[qs,Zs,Gs,tr,Vs,Hs,zs,Xs,er,rr,ar,nr,cr,pr].some((e=>e(t)))},handleRemainingComment:function(t){return[dr,Vs,Hs,Ks,Qs,Js,nr,Ys,$s,Dr,sr,lr].some((e=>e(t)))},isTypeCastComment:fr,getCommentChildNodes:function(t,e){if(("typescript"===e.parser||"flow"===e.parser||"espree"===e.parser||"meriyah"===e.parser)&&"MethodDefinition"===t.type&&t.value&&"FunctionExpression"===t.value.type&&0===ws(t.value).length&&!t.value.returnType&&!Ps(t.value.typeParameters)&&t.value.body)return[...t.decorators||[],t.key,t.value.body]},willPrintOwnComments:function(t){const e=t.getValue(),s=t.getParentNode();return(e&&(Ss(e)||Ns(e)||Os(s)&&(Is(e.leadingComments)||Is(e.trailingComments)))||s&&("JSXSpreadAttribute"===s.type||"JSXSpreadChild"===s.type||"UnionTypeAnnotation"===s.type||"TSUnionType"===s.type||("ClassDeclaration"===s.type||"ClassExpression"===s.type)&&s.superClass===e))&&(!vs(t)||"UnionTypeAnnotation"===s.type||"TSUnionType"===s.type)}};const{getLast:Ar,getNextNonSpaceNonCommentCharacter:Er}=pe,{locStart:Cr,locEnd:xr}=ye,{isTypeCastComment:Fr}=yr;function gr(t){return"CallExpression"===t.type?(t.type="OptionalCallExpression",t.callee=gr(t.callee)):"MemberExpression"===t.type?(t.type="OptionalMemberExpression",t.object=gr(t.object)):"TSNonNullExpression"===t.type&&(t.expression=gr(t.expression)),t}function br(t,e){let s;if(Array.isArray(t))s=t.entries();else{if(!t||"object"!=typeof t||"string"!=typeof t.type)return t;s=Object.entries(t)}for(const[r,i]of s)t[r]=br(i,e);return Array.isArray(t)?t:e(t)||t}function Pr(t){return"LogicalExpression"===t.type&&"LogicalExpression"===t.right.type&&t.operator===t.right.operator}function Tr(t){return Pr(t)?Tr({type:"LogicalExpression",operator:t.operator,left:Tr({type:"LogicalExpression",operator:t.operator,left:t.left,right:t.right.left,range:[Cr(t.left),xr(t.right.left)]}),right:t.right.right,range:[Cr(t),xr(t)]}):t}var wr,Br=function(t,e){if("typescript"===e.parser&&e.originalText.includes("@")){const{esTreeNodeToTSNodeMap:s,tsNodeToESTreeNodeMap:r}=e.tsParseResult;t=br(t,(t=>{const e=s.get(t);if(!e)return;const i=e.decorators;if(!Array.isArray(i))return;const a=r.get(e);if(a!==t)return;const n=a.decorators;if(!Array.isArray(n)||n.length!==i.length||i.some((t=>{const e=r.get(t);return!e||!n.includes(e)}))){const{start:t,end:e}=a.loc;throw le("Leading decorators must be attached to a class declaration",{start:{line:t.line,column:t.column+1},end:{line:e.line,column:e.column+1}})}}))}if("typescript"!==e.parser&&"flow"!==e.parser&&"espree"!==e.parser&&"meriyah"!==e.parser){const e=new Set;t=br(t,(t=>{t.leadingComments&&t.leadingComments.some(Fr)&&e.add(Cr(t))})),t=br(t,(t=>{if("ParenthesizedExpression"===t.type){const{expression:s}=t;if("TypeCastExpression"===s.type)return s.range=t.range,s;const r=Cr(t);if(!e.has(r))return s.extra=Object.assign({},s.extra,{parenthesized:!0}),s}}))}return t=br(t,(t=>{switch(t.type){case"ChainExpression":return gr(t.expression);case"LogicalExpression":if(Pr(t))return Tr(t);break;case"VariableDeclaration":{const s=Ar(t.declarations);s&&s.init&&function(t,s){if(";"===e.originalText[xr(s)])return;t.range=[Cr(t),xr(s)]}(t,s);break}case"TSParenthesizedType":return t.typeAnnotation.range=[Cr(t),xr(t)],t.typeAnnotation;case"TSTypeParameter":if("string"==typeof t.name){const e=Cr(t);t.name={type:"Identifier",name:t.name,range:[e,e+t.name.length]}}break;case"SequenceExpression":{const e=Ar(t.expressions);t.range=[Cr(t),Math.min(xr(e),xr(t))];break}case"ClassProperty":t.key&&"TSPrivateIdentifier"===t.key.type&&"?"===Er(e.originalText,t.key,xr)&&(t.optional=!0)}}))};function Sr(){if(void 0===wr){var t=new ArrayBuffer(2),e=new Uint8Array(t),s=new Uint16Array(t);if(e[0]=1,e[1]=2,258===s[0])wr="BE";else{if(513!==s[0])throw new Error("unable to figure out endianess");wr="LE"}}return wr}function Nr(){return void 0!==_.location?_.location.hostname:""}function Ir(){return[]}function vr(){return 0}function kr(){return Number.MAX_VALUE}function Lr(){return Number.MAX_VALUE}function Or(){return[]}function Mr(){return"Browser"}function Rr(){return void 0!==_.navigator?_.navigator.appVersion:""}function jr(){}function _r(){}function Ur(){return"javascript"}function qr(){return"browser"}function Vr(){return"/tmp"}var Hr=Vr,zr={EOL:"\n",arch:Ur,platform:qr,tmpdir:Hr,tmpDir:Vr,networkInterfaces:jr,getNetworkInterfaces:_r,release:Rr,type:Mr,cpus:Or,totalmem:Lr,freemem:kr,uptime:vr,loadavg:Ir,hostname:Nr,endianness:Sr},Wr=Object.freeze({__proto__:null,endianness:Sr,hostname:Nr,loadavg:Ir,uptime:vr,freemem:kr,totalmem:Lr,cpus:Or,type:Mr,release:Rr,networkInterfaces:jr,getNetworkInterfaces:_r,arch:Ur,platform:qr,tmpDir:Vr,tmpdir:Hr,EOL:"\n",default:zr});const Gr=t=>{if("string"!=typeof t)throw new TypeError("Expected a string");const e=t.match(/(?:\r?\n)/g)||[];if(0===e.length)return;const s=e.filter((t=>"\r\n"===t)).length;return s>e.length-s?"\r\n":"\n"};var Kr=Gr;Kr.graceful=t=>"string"==typeof t&&Gr(t)||"\n";var Xr=s(Wr),Jr=function(t){const e=t.match(ii);return e?e[0].trimLeft():""},$r=function(t){const e=t.match(ii);return e&&e[0]?t.substring(e[0].length):t},Yr=function(t){return pi(t).pragmas},Qr=pi,Zr=function({comments:t="",pragmas:e={}}){const s=(0,ei().default)(t)||ti().EOL,r=" *",i=Object.keys(e),a=i.map((t=>li(t,e[t]))).reduce(((t,e)=>t.concat(e)),[]).map((t=>" * "+t+s)).join("");if(!t){if(0===i.length)return"";if(1===i.length&&!Array.isArray(e[i[0]])){const t=e[i[0]];return"".concat("/**"," ").concat(li(i[0],t)[0]).concat(" */")}}const n=t.split(s).map((t=>"".concat(r," ").concat(t))).join(s)+s;return"/**"+s+(t?n:"")+(t&&i.length?r+s:"")+a+" */"};function ti(){const t=Xr;return ti=function(){return t},t}function ei(){const t=(e=Kr)&&e.__esModule?e:{default:e};var e;return ei=function(){return t},t}const si=/\*\/$/,ri=/^\/\*\*/,ii=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,ai=/(^|\s+)\/\/([^\r\n]*)/g,ni=/^(\r?\n)+/,oi=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,ui=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,hi=/(\r?\n|^) *\* ?/g,ci=[];function pi(t){const e=(0,ei().default)(t)||ti().EOL;t=t.replace(ri,"").replace(si,"").replace(hi,"$1");let s="";for(;s!==t;)s=t,t=t.replace(oi,"".concat(e,"$1 $2").concat(e));t=t.replace(ni,"").trimRight();const r=Object.create(null),i=t.replace(ui,"").replace(ni,"").trimRight();let a;for(;a=ui.exec(t);){const t=a[2].replace(ai,"");"string"==typeof r[a[1]]||Array.isArray(r[a[1]])?r[a[1]]=ci.concat(r[a[1]],t):r[a[1]]=t}return{comments:i,pragmas:r}}function li(t,e){return ci.concat(e).map((e=>"@".concat(t," ").concat(e).trim()))}var di=Object.defineProperty({extract:Jr,strip:$r,parse:Yr,parseWithComments:Qr,print:Zr},"__esModule",{value:!0});var Di={guessEndOfLine:function(t){const e=t.indexOf("\r");return e>=0?"\n"===t.charAt(e+1)?"crlf":"cr":"lf"},convertEndOfLineToChars:function(t){switch(t){case"cr":return"\r";case"crlf":return"\r\n";default:return"\n"}},countEndOfLineChars:function(t,e){let s;if("\n"===e)s=/\n/g;else if("\r"===e)s=/\r/g;else{if("\r\n"!==e)throw new Error('Unexpected "eol" '.concat(JSON.stringify(e),"."));s=/\r\n/g}const r=t.match(s);return r?r.length:0},normalizeEndOfLine:function(t){return t.replace(/\r\n?/g,"\n")}};const{parseWithComments:mi,strip:fi,extract:yi,print:Ai}=di,{getShebang:Ei}=pe,{normalizeEndOfLine:Ci}=Di;function xi(t){const e=Ei(t);e&&(t=t.slice(e.length+1));const s=yi(t),{pragmas:r,comments:i}=mi(s);return{shebang:e,text:t,pragmas:r,comments:i}}var Fi={hasPragma:function(t){const e=Object.keys(xi(t).pragmas);return e.includes("prettier")||e.includes("format")},insertPragma:function(t){const{shebang:e,text:s,pragmas:r,comments:i}=xi(t),a=fi(s),n=Ai({pragmas:Object.assign({format:""},r),comments:i.trimStart()});return(e?"".concat(e,"\n"):"")+Ci(n)+(a.startsWith("\n")?"\n":"\n\n")+a}};const{hasPragma:gi}=Fi,{locStart:bi,locEnd:Pi}=ye;var Ti=function(t){return t="function"==typeof t?{parse:t}:t,Object.assign({astFormat:"estree",hasPragma:gi,locStart:bi,locEnd:Pi},t)};var wi=function(t){const{message:e,loc:s}=t;return le(e.replace(/ \(.*\)/,""),{start:{line:s?s.line:0,column:s?s.column+1:0}})};const Bi=!0,Si=!0,Ni=!0,Ii=!0;class vi{constructor(t,e={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.updateContext=void 0,this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.rightAssociative=!!e.rightAssociative,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=null!=e.binop?e.binop:null,this.updateContext=null}}const ki=new Map;function Li(t,e={}){e.keyword=t;const s=new vi(t,e);return ki.set(t,s),s}function Oi(t,e){return new vi(t,{beforeExpr:Bi,binop:e})}const Mi={num:new vi("num",{startsExpr:Si}),bigint:new vi("bigint",{startsExpr:Si}),decimal:new vi("decimal",{startsExpr:Si}),regexp:new vi("regexp",{startsExpr:Si}),string:new vi("string",{startsExpr:Si}),name:new vi("name",{startsExpr:Si}),eof:new vi("eof"),bracketL:new vi("[",{beforeExpr:Bi,startsExpr:Si}),bracketHashL:new vi("#[",{beforeExpr:Bi,startsExpr:Si}),bracketBarL:new vi("[|",{beforeExpr:Bi,startsExpr:Si}),bracketR:new vi("]"),bracketBarR:new vi("|]"),braceL:new vi("{",{beforeExpr:Bi,startsExpr:Si}),braceBarL:new vi("{|",{beforeExpr:Bi,startsExpr:Si}),braceHashL:new vi("#{",{beforeExpr:Bi,startsExpr:Si}),braceR:new vi("}"),braceBarR:new vi("|}"),parenL:new vi("(",{beforeExpr:Bi,startsExpr:Si}),parenR:new vi(")"),comma:new vi(",",{beforeExpr:Bi}),semi:new vi(";",{beforeExpr:Bi}),colon:new vi(":",{beforeExpr:Bi}),doubleColon:new vi("::",{beforeExpr:Bi}),dot:new vi("."),question:new vi("?",{beforeExpr:Bi}),questionDot:new vi("?."),arrow:new vi("=>",{beforeExpr:Bi}),template:new vi("template"),ellipsis:new vi("...",{beforeExpr:Bi}),backQuote:new vi("`",{startsExpr:Si}),dollarBraceL:new vi("${",{beforeExpr:Bi,startsExpr:Si}),at:new vi("@"),hash:new vi("#",{startsExpr:Si}),interpreterDirective:new vi("#!..."),eq:new vi("=",{beforeExpr:Bi,isAssign:true}),assign:new vi("_=",{beforeExpr:Bi,isAssign:true}),incDec:new vi("++/--",{prefix:Ii,postfix:!0,startsExpr:Si}),bang:new vi("!",{beforeExpr:Bi,prefix:Ii,startsExpr:Si}),tilde:new vi("~",{beforeExpr:Bi,prefix:Ii,startsExpr:Si}),pipeline:Oi("|>",0),nullishCoalescing:Oi("??",1),logicalOR:Oi("||",1),logicalAND:Oi("&&",2),bitwiseOR:Oi("|",3),bitwiseXOR:Oi("^",4),bitwiseAND:Oi("&",5),equality:Oi("==/!=/===/!==",6),relational:Oi("</>/<=/>=",7),bitShift:Oi("<</>>/>>>",8),plusMin:new vi("+/-",{beforeExpr:Bi,binop:9,prefix:Ii,startsExpr:Si}),modulo:new vi("%",{beforeExpr:Bi,binop:10,startsExpr:Si}),star:new vi("*",{binop:10}),slash:Oi("/",10),exponent:new vi("**",{beforeExpr:Bi,binop:11,rightAssociative:!0}),_break:Li("break"),_case:Li("case",{beforeExpr:Bi}),_catch:Li("catch"),_continue:Li("continue"),_debugger:Li("debugger"),_default:Li("default",{beforeExpr:Bi}),_do:Li("do",{isLoop:Ni,beforeExpr:Bi}),_else:Li("else",{beforeExpr:Bi}),_finally:Li("finally"),_for:Li("for",{isLoop:Ni}),_function:Li("function",{startsExpr:Si}),_if:Li("if"),_return:Li("return",{beforeExpr:Bi}),_switch:Li("switch"),_throw:Li("throw",{beforeExpr:Bi,prefix:Ii,startsExpr:Si}),_try:Li("try"),_var:Li("var"),_const:Li("const"),_while:Li("while",{isLoop:Ni}),_with:Li("with"),_new:Li("new",{beforeExpr:Bi,startsExpr:Si}),_this:Li("this",{startsExpr:Si}),_super:Li("super",{startsExpr:Si}),_class:Li("class",{startsExpr:Si}),_extends:Li("extends",{beforeExpr:Bi}),_export:Li("export"),_import:Li("import",{startsExpr:Si}),_null:Li("null",{startsExpr:Si}),_true:Li("true",{startsExpr:Si}),_false:Li("false",{startsExpr:Si}),_in:Li("in",{beforeExpr:Bi,binop:7}),_instanceof:Li("instanceof",{beforeExpr:Bi,binop:7}),_typeof:Li("typeof",{beforeExpr:Bi,prefix:Ii,startsExpr:Si}),_void:Li("void",{beforeExpr:Bi,prefix:Ii,startsExpr:Si}),_delete:Li("delete",{beforeExpr:Bi,prefix:Ii,startsExpr:Si})},Ri=/\r\n?|[\n\u2028\u2029]/,ji=new RegExp(Ri.source,"g");function _i(t){switch(t){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}const Ui=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function qi(t){switch(t){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}class Vi{constructor(t,e){this.line=void 0,this.column=void 0,this.line=t,this.column=e}}class Hi{constructor(t,e){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=e}}function zi(t){return t[t.length-1]}const Wi=Object.freeze({SyntaxError:"BABEL_PARSER_SYNTAX_ERROR",SourceTypeModuleError:"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"}),Gi=Xi({AccessorIsGenerator:"A %0ter cannot be a generator.",ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accesor must not have any formal parameters.",BadSetterArity:"A 'set' accesor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accesor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:"'%0' require an initialization value.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:"`%0` has already been exported. Exported identifiers must be unique.",DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:"A string literal cannot be used as an exported binding without `from`.\n- Did you mean `export { '%0' as '%1' } from 'some-module'`?",ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:"'%0' loop variable declaration may not have an initializer.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:"Unsyntactic %0.",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportBindingIsString:'A string literal cannot be used as an imported binding.\n- Did you mean `import { "%0" as foo }`?',ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:"`import()` requires exactly %0.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidDecimal:"Invalid decimal.",InvalidDigit:"Expected number in radix %0.",InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:"Escape sequence in keyword %0.",InvalidIdentifier:"Invalid identifier %0.",InvalidLhs:"Invalid left-hand side in %0.",InvalidLhsBinding:"Binding invalid left-hand side in %0.",InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:"Unexpected character '%0'.",InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:"Private name #%0 is not defined.",InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:"Label '%0' is already declared.",LetInLexicalBinding:"'let' is not allowed to be used as a name in 'let' or 'const' declarations.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:'Duplicate key "%0" is not allowed in module attributes.',ModuleExportNameHasLoneSurrogate:"An export name cannot include a lone surrogate, found '\\u%0'.",ModuleExportUndefined:"Export '%0' is not defined.",MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:"Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option.",PrivateInExpectedIn:"Private names are only allowed in property accesses (`obj.#%0`) or in `in` expressions (`#%0 in obj`).",PrivateNameRedeclaration:"Duplicate private name #%0.",RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",StaticPrototype:"Classes may not have static property named prototype.",StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:"Assigning to '%0' in strict mode.",StrictEvalArgumentsBinding:"Binding '%0' in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:"Unexpected keyword '%0'.",UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Private names can only be used as the name of a class element (i.e. class C { #p = 42; #m() {} } )\n or a property of member expression (i.e. this.#p).",UnexpectedReservedWord:"Unexpected reserved word '%0'.",UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:"Unexpected token '%0'.",UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:"The only valid meta property for %0 is %0.%1.",UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",VarRedeclaration:"Identifier '%0' has already been declared.",YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},Wi.SyntaxError),Ki=Xi({ImportMetaOutsideModule:"import.meta may appear only with 'sourceType: \"module\"'",ImportOutsideModule:"'import' and 'export' may appear only with 'sourceType: \"module\"'"},Wi.SourceTypeModuleError);function Xi(t,e){const s={};return Object.keys(t).forEach((r=>{s[r]=Object.freeze({code:e,reasonCode:r,template:t[r]})})),Object.freeze(s)}class Ji{constructor(t,e,s,r){this.token=void 0,this.isExpr=void 0,this.preserveSpace=void 0,this.override=void 0,this.token=t,this.isExpr=!!e,this.preserveSpace=!!s,this.override=r}}const $i={braceStatement:new Ji("{",!1),braceExpression:new Ji("{",!0),recordExpression:new Ji("#{",!0),templateQuasi:new Ji("${",!1),parenStatement:new Ji("(",!1),parenExpression:new Ji("(",!0),template:new Ji("`",!0,!0,(t=>t.readTmplToken())),functionExpression:new Ji("function",!0),functionStatement:new Ji("function",!1)};Mi.parenR.updateContext=Mi.braceR.updateContext=function(){if(1===this.state.context.length)return void(this.state.exprAllowed=!0);let t=this.state.context.pop();t===$i.braceStatement&&"function"===this.curContext().token&&(t=this.state.context.pop()),this.state.exprAllowed=!t.isExpr},Mi.name.updateContext=function(t){let e=!1;t!==Mi.dot&&("of"!==this.state.value||this.state.exprAllowed||t===Mi._function||t===Mi._class||(e=!0)),this.state.exprAllowed=e,this.state.isIterator&&(this.state.isIterator=!1)},Mi.braceL.updateContext=function(t){this.state.context.push(this.braceIsBlock(t)?$i.braceStatement:$i.braceExpression),this.state.exprAllowed=!0},Mi.dollarBraceL.updateContext=function(){this.state.context.push($i.templateQuasi),this.state.exprAllowed=!0},Mi.parenL.updateContext=function(t){const e=t===Mi._if||t===Mi._for||t===Mi._with||t===Mi._while;this.state.context.push(e?$i.parenStatement:$i.parenExpression),this.state.exprAllowed=!0},Mi.incDec.updateContext=function(){},Mi._function.updateContext=Mi._class.updateContext=function(t){!t.beforeExpr||t===Mi.semi||t===Mi._else||t===Mi._return&&this.hasPrecedingLineBreak()||(t===Mi.colon||t===Mi.braceL)&&this.curContext()===$i.b_stat?this.state.context.push($i.functionStatement):this.state.context.push($i.functionExpression),this.state.exprAllowed=!1},Mi.backQuote.updateContext=function(){this.curContext()===$i.template?this.state.context.pop():this.state.context.push($i.template),this.state.exprAllowed=!1},Mi.braceHashL.updateContext=function(){this.state.context.push($i.recordExpression),this.state.exprAllowed=!0};let Yi="\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\u08a0-\u08b4\u08b6-\u08c7\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\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\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-\u170c\u170e-\u1711\u1720-\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-\u1b4b\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-\u2c2e\u2c30-\u2c5e\u2c60-\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-\u9ffc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7ca\ua7f5-\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",Qi="\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\u08d3-\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\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\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-\u0ecd\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-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf\u1ac0\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-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\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";const Zi=new RegExp("["+Yi+"]"),ta=new RegExp("["+Yi+Qi+"]");Yi=Qi=null;const ea=[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,157,310,10,21,11,7,153,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,107,20,28,22,13,52,76,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,85,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,230,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,35,56,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,190,0,80,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,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,8952,286,50,2,18,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,2357,44,11,6,17,0,370,43,1301,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,42717,35,4148,12,221,3,5761,15,7472,3104,541,1507,4938],sa=[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,154,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,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,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,5319,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,262,6,10,9,419,13,1495,6,110,6,6,9,4759,9,787719,239];function ra(t,e){let s=65536;for(let r=0,i=e.length;r<i;r+=2){if(s+=e[r],s>t)return!1;if(s+=e[r+1],s>=t)return!0}return!1}function ia(t){return t<65?36===t:t<=90||(t<97?95===t:t<=122||(t<=65535?t>=170&&Zi.test(String.fromCharCode(t)):ra(t,ea)))}function aa(t){return t<48?36===t:t<58||!(t<65)&&(t<=90||(t<97?95===t:t<=122||(t<=65535?t>=170&&ta.test(String.fromCharCode(t)):ra(t,ea)||ra(t,sa))))}const na=["implements","interface","let","package","private","protected","public","static","yield"],oa=["eval","arguments"],ua=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"]),ha=new Set(na),ca=new Set(oa);function pa(t,e){return e&&"await"===t||"enum"===t}function la(t,e){return pa(t,e)||ha.has(t)}function da(t){return ca.has(t)}function Da(t,e){return la(t,e)||da(t)}function ma(t){return ua.has(t)}const fa=/^in(stanceof)?$/;const ya=256,Aa=128,Ea=1024,Ca=2048;class xa{constructor(t){this.flags=void 0,this.var=[],this.lexical=[],this.functions=[],this.flags=t}}class Fa{constructor(t,e){this.scopeStack=[],this.undefinedExports=new Map,this.undefinedPrivateNames=new Map,this.raise=t,this.inModule=e}get inFunction(){return(2&this.currentVarScope().flags)>0}get allowSuper(){return(16&this.currentThisScope().flags)>0}get allowDirectSuper(){return(32&this.currentThisScope().flags)>0}get inClass(){return(64&this.currentThisScope().flags)>0}get inStaticBlock(){return(128&this.currentThisScope().flags)>0}get inNonArrowFunction(){return(2&this.currentThisScope().flags)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(t){return new xa(t)}enter(t){this.scopeStack.push(this.createScope(t))}exit(){this.scopeStack.pop()}treatFunctionsAsVarInScope(t){return!!(2&t.flags||!this.inModule&&1&t.flags)}declareName(t,e,s){let r=this.currentScope();if(8&e||16&e)this.checkRedeclarationInScope(r,t,e,s),16&e?r.functions.push(t):r.lexical.push(t),8&e&&this.maybeExportDefined(r,t);else if(4&e)for(let i=this.scopeStack.length-1;i>=0&&(r=this.scopeStack[i],this.checkRedeclarationInScope(r,t,e,s),r.var.push(t),this.maybeExportDefined(r,t),!(259&r.flags));--i);this.inModule&&1&r.flags&&this.undefinedExports.delete(t)}maybeExportDefined(t,e){this.inModule&&1&t.flags&&this.undefinedExports.delete(e)}checkRedeclarationInScope(t,e,s,r){this.isRedeclaredInScope(t,e,s)&&this.raise(r,Gi.VarRedeclaration,e)}isRedeclaredInScope(t,e,s){return!!(1&s)&&(8&s?t.lexical.indexOf(e)>-1||t.functions.indexOf(e)>-1||t.var.indexOf(e)>-1:16&s?t.lexical.indexOf(e)>-1||!this.treatFunctionsAsVarInScope(t)&&t.var.indexOf(e)>-1:t.lexical.indexOf(e)>-1&&!(8&t.flags&&t.lexical[0]===e)||!this.treatFunctionsAsVarInScope(t)&&t.functions.indexOf(e)>-1)}checkLocalExport(t){-1===this.scopeStack[0].lexical.indexOf(t.name)&&-1===this.scopeStack[0].var.indexOf(t.name)&&-1===this.scopeStack[0].functions.indexOf(t.name)&&this.undefinedExports.set(t.name,t.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScope(){for(let t=this.scopeStack.length-1;;t--){const e=this.scopeStack[t];if(259&e.flags)return e}}currentThisScope(){for(let t=this.scopeStack.length-1;;t--){const e=this.scopeStack[t];if((259&e.flags||64&e.flags)&&!(4&e.flags))return e}}}class ga extends xa{constructor(...t){super(...t),this.declareFunctions=[]}}class ba extends Fa{createScope(t){return new ga(t)}declareName(t,e,s){const r=this.currentScope();if(e&Ca)return this.checkRedeclarationInScope(r,t,e,s),this.maybeExportDefined(r,t),void r.declareFunctions.push(t);super.declareName(...arguments)}isRedeclaredInScope(t,e,s){return!!super.isRedeclaredInScope(...arguments)||!!(s&Ca)&&(!t.declareFunctions.includes(e)&&(t.lexical.includes(e)||t.functions.includes(e)))}checkLocalExport(t){-1===this.scopeStack[0].declareFunctions.indexOf(t.name)&&super.checkLocalExport(t)}}const Pa=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),Ta=Xi({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:"Cannot overwrite reserved type %0.",DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:"Boolean enum members need to be initialized. Use either `%0 = true,` or `%0 = false,` in enum `%1`.",EnumDuplicateMemberName:"Enum member names need to be unique, but the name `%0` has already been used before in enum `%1`.",EnumInconsistentMemberValues:"Enum `%0` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.",EnumInvalidExplicitType:"Enum type `%1` is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.",EnumInvalidExplicitTypeUnknownSupplied:"Supplied enum type is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.",EnumInvalidMemberInitializerPrimaryType:"Enum `%0` has type `%2`, so the initializer of `%1` needs to be a %2 literal.",EnumInvalidMemberInitializerSymbolType:"Symbol enum members cannot be initialized. Use `%1,` in enum `%0`.",EnumInvalidMemberInitializerUnknownType:"The enum member initializer for `%1` needs to be a literal (either a boolean, number, or string) in enum `%0`.",EnumInvalidMemberName:"Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `%0`, consider using `%1`, in enum `%2`.",EnumNumberMemberNotInitialized:"Number enum members need to be initialized, e.g. `%1 = 1` in enum `%0`.",EnumStringMemberInconsistentlyInitailized:"String enum members need to consistently either all use initializers, or use no initializers, in enum `%0`.",GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",OptionalBindingPattern:"A binding pattern parameter cannot be optional in an implementation signature.",SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:"Unexpected reserved type %0.",UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:"`declare export %0` is not supported. Use `%1` instead.",UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."},Wi.SyntaxError);function wa(t){return"type"===t.importKind||"typeof"===t.importKind}function Ba(t){return(t.type===Mi.name||!!t.type.keyword)&&"from"!==t.value}const Sa={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};const Na=/\*?\s*@((?:no)?flow)\b/;const Ia={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02c6",tilde:"\u02dc",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039a",Lambda:"\u039b",Mu:"\u039c",Nu:"\u039d",Xi:"\u039e",Omicron:"\u039f",Pi:"\u03a0",Rho:"\u03a1",Sigma:"\u03a3",Tau:"\u03a4",Upsilon:"\u03a5",Phi:"\u03a6",Chi:"\u03a7",Psi:"\u03a8",Omega:"\u03a9",alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03b5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigmaf:"\u03c2",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03c6",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",thetasym:"\u03d1",upsih:"\u03d2",piv:"\u03d6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200c",zwj:"\u200d",lrm:"\u200e",rlm:"\u200f",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201a",ldquo:"\u201c",rdquo:"\u201d",bdquo:"\u201e",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203a",oline:"\u203e",frasl:"\u2044",euro:"\u20ac",image:"\u2111",weierp:"\u2118",real:"\u211c",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21b5",lArr:"\u21d0",uArr:"\u21d1",rArr:"\u21d2",dArr:"\u21d3",hArr:"\u21d4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220b",prod:"\u220f",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221a",prop:"\u221d",infin:"\u221e",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222a",int:"\u222b",there4:"\u2234",sim:"\u223c",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22a5",sdot:"\u22c5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230a",rfloor:"\u230b",lang:"\u2329",rang:"\u232a",loz:"\u25ca",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},va=/^[\da-fA-F]+$/,ka=/^\d+$/,La=Xi({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:"Expected corresponding JSX closing tag for <%0>.",MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"},Wi.SyntaxError);function Oa(t){return!!t&&("JSXOpeningFragment"===t.type||"JSXClosingFragment"===t.type)}function Ma(t){if("JSXIdentifier"===t.type)return t.name;if("JSXNamespacedName"===t.type)return t.namespace.name+":"+t.name.name;if("JSXMemberExpression"===t.type)return Ma(t.object)+"."+Ma(t.property);throw new Error("Node had unexpected type: "+t.type)}$i.j_oTag=new Ji("<tag",!1),$i.j_cTag=new Ji("</tag",!1),$i.j_expr=new Ji("<tag>...</tag>",!0,!0),Mi.jsxName=new vi("jsxName"),Mi.jsxText=new vi("jsxText",{beforeExpr:!0}),Mi.jsxTagStart=new vi("jsxTagStart",{startsExpr:!0}),Mi.jsxTagEnd=new vi("jsxTagEnd"),Mi.jsxTagStart.updateContext=function(){this.state.context.push($i.j_expr),this.state.context.push($i.j_oTag),this.state.exprAllowed=!1},Mi.jsxTagEnd.updateContext=function(t){const e=this.state.context.pop();e===$i.j_oTag&&t===Mi.slash||e===$i.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===$i.j_expr):this.state.exprAllowed=!0};class Ra extends xa{constructor(...t){super(...t),this.types=[],this.enums=[],this.constEnums=[],this.classes=[],this.exportOnlyBindings=[]}}class ja extends Fa{createScope(t){return new Ra(t)}declareName(t,e,s){const r=this.currentScope();if(e&Ea)return this.maybeExportDefined(r,t),void r.exportOnlyBindings.push(t);super.declareName(...arguments),2&e&&(1&e||(this.checkRedeclarationInScope(r,t,e,s),this.maybeExportDefined(r,t)),r.types.push(t)),256&e&&r.enums.push(t),512&e&&r.constEnums.push(t),e&Aa&&r.classes.push(t)}isRedeclaredInScope(t,e,s){if(t.enums.indexOf(e)>-1){if(256&s){return!!(512&s)!==t.constEnums.indexOf(e)>-1}return!0}return s&Aa&&t.classes.indexOf(e)>-1?t.lexical.indexOf(e)>-1&&!!(1&s):!!(2&s&&t.types.indexOf(e)>-1)||super.isRedeclaredInScope(...arguments)}checkLocalExport(t){-1===this.scopeStack[0].types.indexOf(t.name)&&-1===this.scopeStack[0].exportOnlyBindings.indexOf(t.name)&&super.checkLocalExport(t)}}class _a{constructor(){this.stacks=[]}enter(t){this.stacks.push(t)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(2&this.currentFlags())>0}get hasYield(){return(1&this.currentFlags())>0}get hasReturn(){return(4&this.currentFlags())>0}get hasIn(){return(8&this.currentFlags())>0}}function Ua(t,e){return(t?2:0)|(e?1:0)}function qa(t){if(null==t)throw new Error("Unexpected ".concat(t," value."));return t}function Va(t){if(!t)throw new Error("Assert fail")}const Ha=Xi({AbstractMethodHasImplementation:"Method '%0' cannot have an implementation because it is marked abstract.",AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:"'declare' is not allowed in %0ters.",DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:"Accessibility modifier already seen.",DuplicateModifier:"Duplicate modifier: '%0'.",EmptyHeritageClauseType:"'%0' list cannot be empty.",EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",IncompatibleModifiers:"'%0' modifier cannot be used with '%1' modifier.",IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:"Index signatures cannot have an accessibility modifier ('%0').",IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InvalidModifierOnTypeMember:"'%0' modifier cannot appear on a type member.",InvalidModifiersOrder:"'%0' modifier must precede '%1' modifier.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MixedLabeledAndUnlabeledElements:"Tuple members must all have names or all not have names.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:"Private elements cannot have an accessibility modifier ('%0').",ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:"Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got %0."},Wi.SyntaxError);function za(t){return"private"===t||"public"===t||"protected"===t}Mi.placeholder=new vi("%%",{startsExpr:!0});const Wa=Xi({ClassNameIsRequired:"A class name is required."},Wi.SyntaxError);function Ga(t,e){return t.some((t=>Array.isArray(t)?t[0]===e:t===e))}function Ka(t,e,s){const r=t.find((t=>Array.isArray(t)?t[0]===e:t===e));return r&&Array.isArray(r)?r[1][s]:null}const Xa=["minimal","smart","fsharp"],Ja=["hash","bar"];const $a={estree:t=>class extends t{estreeParseRegExpLiteral({pattern:t,flags:e}){let s=null;try{s=new RegExp(t,e)}catch(t){}const r=this.estreeParseLiteral(s);return r.regex={pattern:t,flags:e},r}estreeParseBigIntLiteral(t){let e;try{e=BigInt(t)}catch(t){e=null}const s=this.estreeParseLiteral(e);return s.bigint=String(s.value||t),s}estreeParseDecimalLiteral(t){const e=this.estreeParseLiteral(null);return e.decimal=String(e.value||t),e}estreeParseLiteral(t){return this.parseLiteral(t,"Literal")}directiveToStmt(t){const e=t.value,s=this.startNodeAt(t.start,t.loc.start),r=this.startNodeAt(e.start,e.loc.start);return r.value=e.extra.expressionValue,r.raw=e.extra.raw,s.expression=this.finishNodeAt(r,"Literal",e.end,e.loc.end),s.directive=e.extra.raw.slice(1,-1),this.finishNodeAt(s,"ExpressionStatement",t.end,t.loc.end)}initFunction(t,e){super.initFunction(t,e),t.expression=!1}checkDeclaration(t){null!=t&&this.isObjectProperty(t)?this.checkDeclaration(t.value):super.checkDeclaration(t)}getObjectOrClassMethodParams(t){return t.value.params}isValidDirective(t){var e;return"ExpressionStatement"===t.type&&"Literal"===t.expression.type&&"string"==typeof t.expression.value&&!(null!=(e=t.expression.extra)&&e.parenthesized)}stmtToDirective(t){const e=super.stmtToDirective(t),s=t.expression.value;return this.addExtra(e.value,"expressionValue",s),e}parseBlockBody(t,...e){super.parseBlockBody(t,...e);const s=t.directives.map((t=>this.directiveToStmt(t)));t.body=s.concat(t.body),delete t.directives}pushClassMethod(t,e,s,r,i,a){this.parseMethod(e,s,r,i,a,"ClassMethod",!0),e.typeParameters&&(e.value.typeParameters=e.typeParameters,delete e.typeParameters),t.body.push(e)}parseExprAtom(t){switch(this.state.type){case Mi.num:case Mi.string:return this.estreeParseLiteral(this.state.value);case Mi.regexp:return this.estreeParseRegExpLiteral(this.state.value);case Mi.bigint:return this.estreeParseBigIntLiteral(this.state.value);case Mi.decimal:return this.estreeParseDecimalLiteral(this.state.value);case Mi._null:return this.estreeParseLiteral(null);case Mi._true:return this.estreeParseLiteral(!0);case Mi._false:return this.estreeParseLiteral(!1);default:return super.parseExprAtom(t)}}parseMaybePrivateName(...t){const e=super.parseMaybePrivateName(...t);return"PrivateName"===e.type&&this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(t){const e=super.getPrivateNameSV(t);return delete(t=t).id,t.name=e,t.type="PrivateIdentifier",t}isPrivateName(t){return this.getPluginOption("estree","classFeatures")?"PrivateIdentifier"===t.type:super.isPrivateName(t)}getPrivateNameSV(t){return this.getPluginOption("estree","classFeatures")?t.name:super.getPrivateNameSV(t)}parseLiteral(t,e,s,r){const i=super.parseLiteral(t,e,s,r);return i.raw=i.extra.raw,delete i.extra,i}parseFunctionBody(t,e,s=!1){super.parseFunctionBody(t,e,s),t.expression="BlockStatement"!==t.body.type}parseMethod(t,e,s,r,i,a,n=!1){let o=this.startNode();return o.kind=t.kind,o=super.parseMethod(o,e,s,r,i,a,n),o.type="FunctionExpression",delete o.kind,t.value=o,"ClassPrivateMethod"===a&&(t.computed=!1),a="MethodDefinition",this.finishNode(t,a)}parseClassProperty(...t){const e=super.parseClassProperty(...t);return this.getPluginOption("estree","classFeatures")&&(e.type="PropertyDefinition"),e}parseClassPrivateProperty(...t){const e=super.parseClassPrivateProperty(...t);return this.getPluginOption("estree","classFeatures")&&(e.type="PropertyDefinition",e.computed=!1),e}parseObjectMethod(t,e,s,r,i){const a=super.parseObjectMethod(t,e,s,r,i);return a&&(a.type="Property","method"===a.kind&&(a.kind="init"),a.shorthand=!1),a}parseObjectProperty(t,e,s,r,i){const a=super.parseObjectProperty(t,e,s,r,i);return a&&(a.kind="init",a.type="Property"),a}toAssignable(t,e=!1){return null!=t&&this.isObjectProperty(t)?(this.toAssignable(t.value,e),t):super.toAssignable(t,e)}toAssignableObjectExpressionProp(t,...e){"get"===t.kind||"set"===t.kind?this.raise(t.key.start,Gi.PatternHasAccessor):t.method?this.raise(t.key.start,Gi.PatternHasMethod):super.toAssignableObjectExpressionProp(t,...e)}finishCallExpression(t,e){return super.finishCallExpression(t,e),"Import"===t.callee.type&&(t.type="ImportExpression",t.source=t.arguments[0],delete t.arguments,delete t.callee),t}toReferencedArguments(t){"ImportExpression"!==t.type&&super.toReferencedArguments(t)}parseExport(t){switch(super.parseExport(t),t.type){case"ExportAllDeclaration":t.exported=null;break;case"ExportNamedDeclaration":1===t.specifiers.length&&"ExportNamespaceSpecifier"===t.specifiers[0].type&&(t.type="ExportAllDeclaration",t.exported=t.specifiers[0].exported,delete t.specifiers)}return t}parseSubscript(t,e,s,r,i){const a=super.parseSubscript(t,e,s,r,i);if(i.optionalChainMember){if("OptionalMemberExpression"!==a.type&&"OptionalCallExpression"!==a.type||(a.type=a.type.substring(8)),i.stop){const t=this.startNodeAtNode(a);return t.expression=a,this.finishNode(t,"ChainExpression")}}else"MemberExpression"!==a.type&&"CallExpression"!==a.type||(a.optional=!1);return a}hasPropertyAsPrivateName(t){return"ChainExpression"===t.type&&(t=t.expression),super.hasPropertyAsPrivateName(t)}isOptionalChain(t){return"ChainExpression"===t.type}isObjectProperty(t){return"Property"===t.type&&"init"===t.kind&&!t.method}isObjectMethod(t){return t.method||"get"===t.kind||"set"===t.kind}},jsx:t=>class extends t{jsxReadToken(){let t="",e=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,La.UnterminatedJsxContent);const s=this.input.charCodeAt(this.state.pos);switch(s){case 60:case 123:return this.state.pos===this.state.start?60===s&&this.state.exprAllowed?(++this.state.pos,this.finishToken(Mi.jsxTagStart)):super.getTokenFromCode(s):(t+=this.input.slice(e,this.state.pos),this.finishToken(Mi.jsxText,t));case 38:t+=this.input.slice(e,this.state.pos),t+=this.jsxReadEntity(),e=this.state.pos;break;case 62:case 125:default:_i(s)?(t+=this.input.slice(e,this.state.pos),t+=this.jsxReadNewLine(!0),e=this.state.pos):++this.state.pos}}}jsxReadNewLine(t){const e=this.input.charCodeAt(this.state.pos);let s;return++this.state.pos,13===e&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,s=t?"\n":"\r\n"):s=String.fromCharCode(e),++this.state.curLine,this.state.lineStart=this.state.pos,s}jsxReadString(t){let e="",s=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,Gi.UnterminatedString);const r=this.input.charCodeAt(this.state.pos);if(r===t)break;38===r?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadEntity(),s=this.state.pos):_i(r)?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadNewLine(!1),s=this.state.pos):++this.state.pos}return e+=this.input.slice(s,this.state.pos++),this.finishToken(Mi.string,e)}jsxReadEntity(){let t,e="",s=0,r=this.input[this.state.pos];const i=++this.state.pos;for(;this.state.pos<this.length&&s++<10;){if(r=this.input[this.state.pos++],";"===r){"#"===e[0]?"x"===e[1]?(e=e.substr(2),va.test(e)&&(t=String.fromCodePoint(parseInt(e,16)))):(e=e.substr(1),ka.test(e)&&(t=String.fromCodePoint(parseInt(e,10)))):t=Ia[e];break}e+=r}return t||(this.state.pos=i,"&")}jsxReadWord(){let t;const e=this.state.pos;do{t=this.input.charCodeAt(++this.state.pos)}while(aa(t)||45===t);return this.finishToken(Mi.jsxName,this.input.slice(e,this.state.pos))}jsxParseIdentifier(){const t=this.startNode();return this.match(Mi.jsxName)?t.name=this.state.value:this.state.type.keyword?t.name=this.state.type.keyword:this.unexpected(),this.next(),this.finishNode(t,"JSXIdentifier")}jsxParseNamespacedName(){const t=this.state.start,e=this.state.startLoc,s=this.jsxParseIdentifier();if(!this.eat(Mi.colon))return s;const r=this.startNodeAt(t,e);return r.namespace=s,r.name=this.jsxParseIdentifier(),this.finishNode(r,"JSXNamespacedName")}jsxParseElementName(){const t=this.state.start,e=this.state.startLoc;let s=this.jsxParseNamespacedName();if("JSXNamespacedName"===s.type)return s;for(;this.eat(Mi.dot);){const r=this.startNodeAt(t,e);r.object=s,r.property=this.jsxParseIdentifier(),s=this.finishNode(r,"JSXMemberExpression")}return s}jsxParseAttributeValue(){let t;switch(this.state.type){case Mi.braceL:return t=this.startNode(),this.next(),t=this.jsxParseExpressionContainer(t),"JSXEmptyExpression"===t.expression.type&&this.raise(t.start,La.AttributeIsEmpty),t;case Mi.jsxTagStart:case Mi.string:return this.parseExprAtom();default:throw this.raise(this.state.start,La.UnsupportedJsxValue)}}jsxParseEmptyExpression(){const t=this.startNodeAt(this.state.lastTokEnd,this.state.lastTokEndLoc);return this.finishNodeAt(t,"JSXEmptyExpression",this.state.start,this.state.startLoc)}jsxParseSpreadChild(t){return this.next(),t.expression=this.parseExpression(),this.expect(Mi.braceR),this.finishNode(t,"JSXSpreadChild")}jsxParseExpressionContainer(t){if(this.match(Mi.braceR))t.expression=this.jsxParseEmptyExpression();else{const e=this.parseExpression();t.expression=e}return this.expect(Mi.braceR),this.finishNode(t,"JSXExpressionContainer")}jsxParseAttribute(){const t=this.startNode();return this.eat(Mi.braceL)?(this.expect(Mi.ellipsis),t.argument=this.parseMaybeAssignAllowIn(),this.expect(Mi.braceR),this.finishNode(t,"JSXSpreadAttribute")):(t.name=this.jsxParseNamespacedName(),t.value=this.eat(Mi.eq)?this.jsxParseAttributeValue():null,this.finishNode(t,"JSXAttribute"))}jsxParseOpeningElementAt(t,e){const s=this.startNodeAt(t,e);return this.match(Mi.jsxTagEnd)?(this.expect(Mi.jsxTagEnd),this.finishNode(s,"JSXOpeningFragment")):(s.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(s))}jsxParseOpeningElementAfterName(t){const e=[];for(;!this.match(Mi.slash)&&!this.match(Mi.jsxTagEnd);)e.push(this.jsxParseAttribute());return t.attributes=e,t.selfClosing=this.eat(Mi.slash),this.expect(Mi.jsxTagEnd),this.finishNode(t,"JSXOpeningElement")}jsxParseClosingElementAt(t,e){const s=this.startNodeAt(t,e);return this.match(Mi.jsxTagEnd)?(this.expect(Mi.jsxTagEnd),this.finishNode(s,"JSXClosingFragment")):(s.name=this.jsxParseElementName(),this.expect(Mi.jsxTagEnd),this.finishNode(s,"JSXClosingElement"))}jsxParseElementAt(t,e){const s=this.startNodeAt(t,e),r=[],i=this.jsxParseOpeningElementAt(t,e);let a=null;if(!i.selfClosing){t:for(;;)switch(this.state.type){case Mi.jsxTagStart:if(t=this.state.start,e=this.state.startLoc,this.next(),this.eat(Mi.slash)){a=this.jsxParseClosingElementAt(t,e);break t}r.push(this.jsxParseElementAt(t,e));break;case Mi.jsxText:r.push(this.parseExprAtom());break;case Mi.braceL:{const t=this.startNode();this.next(),this.match(Mi.ellipsis)?r.push(this.jsxParseSpreadChild(t)):r.push(this.jsxParseExpressionContainer(t));break}default:throw this.unexpected()}Oa(i)&&!Oa(a)?this.raise(a.start,La.MissingClosingTagFragment):!Oa(i)&&Oa(a)?this.raise(a.start,La.MissingClosingTagElement,Ma(i.name)):Oa(i)||Oa(a)||Ma(a.name)!==Ma(i.name)&&this.raise(a.start,La.MissingClosingTagElement,Ma(i.name))}if(Oa(i)?(s.openingFragment=i,s.closingFragment=a):(s.openingElement=i,s.closingElement=a),s.children=r,this.isRelational("<"))throw this.raise(this.state.start,La.UnwrappedAdjacentJSXElements);return Oa(i)?this.finishNode(s,"JSXFragment"):this.finishNode(s,"JSXElement")}jsxParseElement(){const t=this.state.start,e=this.state.startLoc;return this.next(),this.jsxParseElementAt(t,e)}parseExprAtom(t){return this.match(Mi.jsxText)?this.parseLiteral(this.state.value,"JSXText"):this.match(Mi.jsxTagStart)?this.jsxParseElement():this.isRelational("<")&&33!==this.input.charCodeAt(this.state.pos)?(this.finishToken(Mi.jsxTagStart),this.jsxParseElement()):super.parseExprAtom(t)}getTokenFromCode(t){if(this.state.inPropertyName)return super.getTokenFromCode(t);const e=this.curContext();if(e===$i.j_expr)return this.jsxReadToken();if(e===$i.j_oTag||e===$i.j_cTag){if(ia(t))return this.jsxReadWord();if(62===t)return++this.state.pos,this.finishToken(Mi.jsxTagEnd);if((34===t||39===t)&&e===$i.j_oTag)return this.jsxReadString(t)}return 60===t&&this.state.exprAllowed&&33!==this.input.charCodeAt(this.state.pos+1)?(++this.state.pos,this.finishToken(Mi.jsxTagStart)):super.getTokenFromCode(t)}updateContext(t){if(this.match(Mi.braceL)){const e=this.curContext();e===$i.j_oTag?this.state.context.push($i.braceExpression):e===$i.j_expr?this.state.context.push($i.templateQuasi):super.updateContext(t),this.state.exprAllowed=!0}else{if(!this.match(Mi.slash)||t!==Mi.jsxTagStart)return super.updateContext(t);this.state.context.length-=2,this.state.context.push($i.j_cTag),this.state.exprAllowed=!1}}},flow:t=>class extends t{constructor(...t){super(...t),this.flowPragma=void 0}getScopeHandler(){return ba}shouldParseTypes(){return this.getPluginOption("flow","all")||"flow"===this.flowPragma}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(t,e){return t!==Mi.string&&t!==Mi.semi&&t!==Mi.interpreterDirective&&void 0===this.flowPragma&&(this.flowPragma=null),super.finishToken(t,e)}addComment(t){if(void 0===this.flowPragma){const e=Na.exec(t.value);if(e)if("flow"===e[1])this.flowPragma="flow";else{if("noflow"!==e[1])throw new Error("Unexpected flow pragma");this.flowPragma="noflow"}else;}return super.addComment(t)}flowParseTypeInitialiser(t){const e=this.state.inType;this.state.inType=!0,this.expect(t||Mi.colon);const s=this.flowParseType();return this.state.inType=e,s}flowParsePredicate(){const t=this.startNode(),e=this.state.start;return this.next(),this.expectContextual("checks"),this.state.lastTokStart>e+1&&this.raise(e,Ta.UnexpectedSpaceBetweenModuloChecks),this.eat(Mi.parenL)?(t.value=this.parseExpression(),this.expect(Mi.parenR),this.finishNode(t,"DeclaredPredicate")):this.finishNode(t,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){const t=this.state.inType;this.state.inType=!0,this.expect(Mi.colon);let e=null,s=null;return this.match(Mi.modulo)?(this.state.inType=t,s=this.flowParsePredicate()):(e=this.flowParseType(),this.state.inType=t,this.match(Mi.modulo)&&(s=this.flowParsePredicate())),[e,s]}flowParseDeclareClass(t){return this.next(),this.flowParseInterfaceish(t,!0),this.finishNode(t,"DeclareClass")}flowParseDeclareFunction(t){this.next();const e=t.id=this.parseIdentifier(),s=this.startNode(),r=this.startNode();this.isRelational("<")?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,this.expect(Mi.parenL);const i=this.flowParseFunctionTypeParams();return s.params=i.params,s.rest=i.rest,s.this=i._this,this.expect(Mi.parenR),[s.returnType,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),r.typeAnnotation=this.finishNode(s,"FunctionTypeAnnotation"),e.typeAnnotation=this.finishNode(r,"TypeAnnotation"),this.resetEndLocation(e),this.semicolon(),this.scope.declareName(t.id.name,2048,t.id.start),this.finishNode(t,"DeclareFunction")}flowParseDeclare(t,e){if(this.match(Mi._class))return this.flowParseDeclareClass(t);if(this.match(Mi._function))return this.flowParseDeclareFunction(t);if(this.match(Mi._var))return this.flowParseDeclareVariable(t);if(this.eatContextual("module"))return this.match(Mi.dot)?this.flowParseDeclareModuleExports(t):(e&&this.raise(this.state.lastTokStart,Ta.NestedDeclareModule),this.flowParseDeclareModule(t));if(this.isContextual("type"))return this.flowParseDeclareTypeAlias(t);if(this.isContextual("opaque"))return this.flowParseDeclareOpaqueType(t);if(this.isContextual("interface"))return this.flowParseDeclareInterface(t);if(this.match(Mi._export))return this.flowParseDeclareExportDeclaration(t,e);throw this.unexpected()}flowParseDeclareVariable(t){return this.next(),t.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(t.id.name,5,t.id.start),this.semicolon(),this.finishNode(t,"DeclareVariable")}flowParseDeclareModule(t){this.scope.enter(0),this.match(Mi.string)?t.id=this.parseExprAtom():t.id=this.parseIdentifier();const e=t.body=this.startNode(),s=e.body=[];for(this.expect(Mi.braceL);!this.match(Mi.braceR);){let t=this.startNode();this.match(Mi._import)?(this.next(),this.isContextual("type")||this.match(Mi._typeof)||this.raise(this.state.lastTokStart,Ta.InvalidNonTypeImportInDeclareModule),this.parseImport(t)):(this.expectContextual("declare",Ta.UnsupportedStatementInDeclareModule),t=this.flowParseDeclare(t,!0)),s.push(t)}this.scope.exit(),this.expect(Mi.braceR),this.finishNode(e,"BlockStatement");let r=null,i=!1;return s.forEach((t=>{!function(t){return"DeclareExportAllDeclaration"===t.type||"DeclareExportDeclaration"===t.type&&(!t.declaration||"TypeAlias"!==t.declaration.type&&"InterfaceDeclaration"!==t.declaration.type)}(t)?"DeclareModuleExports"===t.type&&(i&&this.raise(t.start,Ta.DuplicateDeclareModuleExports),"ES"===r&&this.raise(t.start,Ta.AmbiguousDeclareModuleKind),r="CommonJS",i=!0):("CommonJS"===r&&this.raise(t.start,Ta.AmbiguousDeclareModuleKind),r="ES")})),t.kind=r||"CommonJS",this.finishNode(t,"DeclareModule")}flowParseDeclareExportDeclaration(t,e){if(this.expect(Mi._export),this.eat(Mi._default))return this.match(Mi._function)||this.match(Mi._class)?t.declaration=this.flowParseDeclare(this.startNode()):(t.declaration=this.flowParseType(),this.semicolon()),t.default=!0,this.finishNode(t,"DeclareExportDeclaration");if(this.match(Mi._const)||this.isLet()||(this.isContextual("type")||this.isContextual("interface"))&&!e){const t=this.state.value,e=Sa[t];throw this.raise(this.state.start,Ta.UnsupportedDeclareExportKind,t,e)}if(this.match(Mi._var)||this.match(Mi._function)||this.match(Mi._class)||this.isContextual("opaque"))return t.declaration=this.flowParseDeclare(this.startNode()),t.default=!1,this.finishNode(t,"DeclareExportDeclaration");if(this.match(Mi.star)||this.match(Mi.braceL)||this.isContextual("interface")||this.isContextual("type")||this.isContextual("opaque"))return"ExportNamedDeclaration"===(t=this.parseExport(t)).type&&(t.type="ExportDeclaration",t.default=!1,delete t.exportKind),t.type="Declare"+t.type,t;throw this.unexpected()}flowParseDeclareModuleExports(t){return this.next(),this.expectContextual("exports"),t.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(t,"DeclareModuleExports")}flowParseDeclareTypeAlias(t){return this.next(),this.flowParseTypeAlias(t),t.type="DeclareTypeAlias",t}flowParseDeclareOpaqueType(t){return this.next(),this.flowParseOpaqueType(t,!0),t.type="DeclareOpaqueType",t}flowParseDeclareInterface(t){return this.next(),this.flowParseInterfaceish(t),this.finishNode(t,"DeclareInterface")}flowParseInterfaceish(t,e=!1){if(t.id=this.flowParseRestrictedIdentifier(!e,!0),this.scope.declareName(t.id.name,e?17:9,t.id.start),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.extends=[],t.implements=[],t.mixins=[],this.eat(Mi._extends))do{t.extends.push(this.flowParseInterfaceExtends())}while(!e&&this.eat(Mi.comma));if(this.isContextual("mixins")){this.next();do{t.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(Mi.comma))}if(this.isContextual("implements")){this.next();do{t.implements.push(this.flowParseInterfaceExtends())}while(this.eat(Mi.comma))}t.body=this.flowParseObjectType({allowStatic:e,allowExact:!1,allowSpread:!1,allowProto:e,allowInexact:!1})}flowParseInterfaceExtends(){const t=this.startNode();return t.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,this.finishNode(t,"InterfaceExtends")}flowParseInterface(t){return this.flowParseInterfaceish(t),this.finishNode(t,"InterfaceDeclaration")}checkNotUnderscore(t){"_"===t&&this.raise(this.state.start,Ta.UnexpectedReservedUnderscore)}checkReservedType(t,e,s){Pa.has(t)&&this.raise(e,s?Ta.AssignReservedType:Ta.UnexpectedReservedType,t)}flowParseRestrictedIdentifier(t,e){return this.checkReservedType(this.state.value,this.state.start,e),this.parseIdentifier(t)}flowParseTypeAlias(t){return t.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(t.id.name,9,t.id.start),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.right=this.flowParseTypeInitialiser(Mi.eq),this.semicolon(),this.finishNode(t,"TypeAlias")}flowParseOpaqueType(t,e){return this.expectContextual("type"),t.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(t.id.name,9,t.id.start),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.supertype=null,this.match(Mi.colon)&&(t.supertype=this.flowParseTypeInitialiser(Mi.colon)),t.impltype=null,e||(t.impltype=this.flowParseTypeInitialiser(Mi.eq)),this.semicolon(),this.finishNode(t,"OpaqueType")}flowParseTypeParameter(t=!1){const e=this.state.start,s=this.startNode(),r=this.flowParseVariance(),i=this.flowParseTypeAnnotatableIdentifier();return s.name=i.name,s.variance=r,s.bound=i.typeAnnotation,this.match(Mi.eq)?(this.eat(Mi.eq),s.default=this.flowParseType()):t&&this.raise(e,Ta.MissingTypeParamDefault),this.finishNode(s,"TypeParameter")}flowParseTypeParameterDeclaration(){const t=this.state.inType,e=this.startNode();e.params=[],this.state.inType=!0,this.isRelational("<")||this.match(Mi.jsxTagStart)?this.next():this.unexpected();let s=!1;do{const t=this.flowParseTypeParameter(s);e.params.push(t),t.default&&(s=!0),this.isRelational(">")||this.expect(Mi.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){const t=this.startNode(),e=this.state.inType;t.params=[],this.state.inType=!0,this.expectRelational("<");const s=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.isRelational(">");)t.params.push(this.flowParseType()),this.isRelational(">")||this.expect(Mi.comma);return this.state.noAnonFunctionType=s,this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){const t=this.startNode(),e=this.state.inType;for(t.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)t.params.push(this.flowParseTypeOrImplicitInstantiation()),this.isRelational(">")||this.expect(Mi.comma);return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterInstantiation")}flowParseInterfaceType(){const t=this.startNode();if(this.expectContextual("interface"),t.extends=[],this.eat(Mi._extends))do{t.extends.push(this.flowParseInterfaceExtends())}while(this.eat(Mi.comma));return t.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(t,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(Mi.num)||this.match(Mi.string)?this.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(t,e,s){return t.static=e,this.lookahead().type===Mi.colon?(t.id=this.flowParseObjectPropertyKey(),t.key=this.flowParseTypeInitialiser()):(t.id=null,t.key=this.flowParseType()),this.expect(Mi.bracketR),t.value=this.flowParseTypeInitialiser(),t.variance=s,this.finishNode(t,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(t,e){return t.static=e,t.id=this.flowParseObjectPropertyKey(),this.expect(Mi.bracketR),this.expect(Mi.bracketR),this.isRelational("<")||this.match(Mi.parenL)?(t.method=!0,t.optional=!1,t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.start,t.loc.start))):(t.method=!1,this.eat(Mi.question)&&(t.optional=!0),t.value=this.flowParseTypeInitialiser()),this.finishNode(t,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(t){for(t.params=[],t.rest=null,t.typeParameters=null,t.this=null,this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(Mi.parenL),this.match(Mi._this)&&(t.this=this.flowParseFunctionTypeParam(!0),t.this.name=null,this.match(Mi.parenR)||this.expect(Mi.comma));!this.match(Mi.parenR)&&!this.match(Mi.ellipsis);)t.params.push(this.flowParseFunctionTypeParam(!1)),this.match(Mi.parenR)||this.expect(Mi.comma);return this.eat(Mi.ellipsis)&&(t.rest=this.flowParseFunctionTypeParam(!1)),this.expect(Mi.parenR),t.returnType=this.flowParseTypeInitialiser(),this.finishNode(t,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(t,e){const s=this.startNode();return t.static=e,t.value=this.flowParseObjectTypeMethodish(s),this.finishNode(t,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:t,allowExact:e,allowSpread:s,allowProto:r,allowInexact:i}){const a=this.state.inType;this.state.inType=!0;const n=this.startNode();let o,u;n.callProperties=[],n.properties=[],n.indexers=[],n.internalSlots=[];let h=!1;for(e&&this.match(Mi.braceBarL)?(this.expect(Mi.braceBarL),o=Mi.braceBarR,u=!0):(this.expect(Mi.braceL),o=Mi.braceR,u=!1),n.exact=u;!this.match(o);){let e=!1,a=null,o=null;const c=this.startNode();if(r&&this.isContextual("proto")){const e=this.lookahead();e.type!==Mi.colon&&e.type!==Mi.question&&(this.next(),a=this.state.start,t=!1)}if(t&&this.isContextual("static")){const t=this.lookahead();t.type!==Mi.colon&&t.type!==Mi.question&&(this.next(),e=!0)}const p=this.flowParseVariance();if(this.eat(Mi.bracketL))null!=a&&this.unexpected(a),this.eat(Mi.bracketL)?(p&&this.unexpected(p.start),n.internalSlots.push(this.flowParseObjectTypeInternalSlot(c,e))):n.indexers.push(this.flowParseObjectTypeIndexer(c,e,p));else if(this.match(Mi.parenL)||this.isRelational("<"))null!=a&&this.unexpected(a),p&&this.unexpected(p.start),n.callProperties.push(this.flowParseObjectTypeCallProperty(c,e));else{let t="init";if(this.isContextual("get")||this.isContextual("set")){const e=this.lookahead();e.type!==Mi.name&&e.type!==Mi.string&&e.type!==Mi.num||(t=this.state.value,this.next())}const r=this.flowParseObjectTypeProperty(c,e,a,p,t,s,null!=i?i:!u);null===r?(h=!0,o=this.state.lastTokStart):n.properties.push(r)}this.flowObjectTypeSemicolon(),!o||this.match(Mi.braceR)||this.match(Mi.braceBarR)||this.raise(o,Ta.UnexpectedExplicitInexactInObject)}this.expect(o),s&&(n.inexact=h);const c=this.finishNode(n,"ObjectTypeAnnotation");return this.state.inType=a,c}flowParseObjectTypeProperty(t,e,s,r,i,a,n){if(this.eat(Mi.ellipsis)){return this.match(Mi.comma)||this.match(Mi.semi)||this.match(Mi.braceR)||this.match(Mi.braceBarR)?(a?n||this.raise(this.state.lastTokStart,Ta.InexactInsideExact):this.raise(this.state.lastTokStart,Ta.InexactInsideNonObject),r&&this.raise(r.start,Ta.InexactVariance),null):(a||this.raise(this.state.lastTokStart,Ta.UnexpectedSpreadType),null!=s&&this.unexpected(s),r&&this.raise(r.start,Ta.SpreadVariance),t.argument=this.flowParseType(),this.finishNode(t,"ObjectTypeSpreadProperty"))}{t.key=this.flowParseObjectPropertyKey(),t.static=e,t.proto=null!=s,t.kind=i;let n=!1;return this.isRelational("<")||this.match(Mi.parenL)?(t.method=!0,null!=s&&this.unexpected(s),r&&this.unexpected(r.start),t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.start,t.loc.start)),"get"!==i&&"set"!==i||this.flowCheckGetterSetterParams(t),!a&&"constructor"===t.key.name&&t.value.this&&this.raise(t.value.this.start,Ta.ThisParamBannedInConstructor)):("init"!==i&&this.unexpected(),t.method=!1,this.eat(Mi.question)&&(n=!0),t.value=this.flowParseTypeInitialiser(),t.variance=r),t.optional=n,this.finishNode(t,"ObjectTypeProperty")}}flowCheckGetterSetterParams(t){const e="get"===t.kind?0:1,s=t.start,r=t.value.params.length+(t.value.rest?1:0);t.value.this&&this.raise(t.value.this.start,"get"===t.kind?Ta.GetterMayNotHaveThisParam:Ta.SetterMayNotHaveThisParam),r!==e&&("get"===t.kind?this.raise(s,Gi.BadGetterArity):this.raise(s,Gi.BadSetterArity)),"set"===t.kind&&t.value.rest&&this.raise(s,Gi.BadSetterRestParameter)}flowObjectTypeSemicolon(){this.eat(Mi.semi)||this.eat(Mi.comma)||this.match(Mi.braceR)||this.match(Mi.braceBarR)||this.unexpected()}flowParseQualifiedTypeIdentifier(t,e,s){t=t||this.state.start,e=e||this.state.startLoc;let r=s||this.flowParseRestrictedIdentifier(!0);for(;this.eat(Mi.dot);){const s=this.startNodeAt(t,e);s.qualification=r,s.id=this.flowParseRestrictedIdentifier(!0),r=this.finishNode(s,"QualifiedTypeIdentifier")}return r}flowParseGenericType(t,e,s){const r=this.startNodeAt(t,e);return r.typeParameters=null,r.id=this.flowParseQualifiedTypeIdentifier(t,e,s),this.isRelational("<")&&(r.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(r,"GenericTypeAnnotation")}flowParseTypeofType(){const t=this.startNode();return this.expect(Mi._typeof),t.argument=this.flowParsePrimaryType(),this.finishNode(t,"TypeofTypeAnnotation")}flowParseTupleType(){const t=this.startNode();for(t.types=[],this.expect(Mi.bracketL);this.state.pos<this.length&&!this.match(Mi.bracketR)&&(t.types.push(this.flowParseType()),!this.match(Mi.bracketR));)this.expect(Mi.comma);return this.expect(Mi.bracketR),this.finishNode(t,"TupleTypeAnnotation")}flowParseFunctionTypeParam(t){let e=null,s=!1,r=null;const i=this.startNode(),a=this.lookahead(),n=this.state.type===Mi._this;return a.type===Mi.colon||a.type===Mi.question?(n&&!t&&this.raise(i.start,Ta.ThisParamMustBeFirst),e=this.parseIdentifier(n),this.eat(Mi.question)&&(s=!0,n&&this.raise(i.start,Ta.ThisParamMayNotBeOptional)),r=this.flowParseTypeInitialiser()):r=this.flowParseType(),i.name=e,i.optional=s,i.typeAnnotation=r,this.finishNode(i,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(t){const e=this.startNodeAt(t.start,t.loc.start);return e.name=null,e.optional=!1,e.typeAnnotation=t,this.finishNode(e,"FunctionTypeParam")}flowParseFunctionTypeParams(t=[]){let e=null,s=null;for(this.match(Mi._this)&&(s=this.flowParseFunctionTypeParam(!0),s.name=null,this.match(Mi.parenR)||this.expect(Mi.comma));!this.match(Mi.parenR)&&!this.match(Mi.ellipsis);)t.push(this.flowParseFunctionTypeParam(!1)),this.match(Mi.parenR)||this.expect(Mi.comma);return this.eat(Mi.ellipsis)&&(e=this.flowParseFunctionTypeParam(!1)),{params:t,rest:e,_this:s}}flowIdentToTypeAnnotation(t,e,s,r){switch(r.name){case"any":return this.finishNode(s,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(s,"BooleanTypeAnnotation");case"mixed":return this.finishNode(s,"MixedTypeAnnotation");case"empty":return this.finishNode(s,"EmptyTypeAnnotation");case"number":return this.finishNode(s,"NumberTypeAnnotation");case"string":return this.finishNode(s,"StringTypeAnnotation");case"symbol":return this.finishNode(s,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(r.name),this.flowParseGenericType(t,e,r)}}flowParsePrimaryType(){const t=this.state.start,e=this.state.startLoc,s=this.startNode();let r,i,a=!1;const n=this.state.noAnonFunctionType;switch(this.state.type){case Mi.name:return this.isContextual("interface")?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(t,e,s,this.parseIdentifier());case Mi.braceL:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case Mi.braceBarL:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case Mi.bracketL:return this.state.noAnonFunctionType=!1,i=this.flowParseTupleType(),this.state.noAnonFunctionType=n,i;case Mi.relational:if("<"===this.state.value)return s.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(Mi.parenL),r=this.flowParseFunctionTypeParams(),s.params=r.params,s.rest=r.rest,s.this=r._this,this.expect(Mi.parenR),this.expect(Mi.arrow),s.returnType=this.flowParseType(),this.finishNode(s,"FunctionTypeAnnotation");break;case Mi.parenL:if(this.next(),!this.match(Mi.parenR)&&!this.match(Mi.ellipsis))if(this.match(Mi.name)||this.match(Mi._this)){const t=this.lookahead().type;a=t!==Mi.question&&t!==Mi.colon}else a=!0;if(a){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=n,this.state.noAnonFunctionType||!(this.match(Mi.comma)||this.match(Mi.parenR)&&this.lookahead().type===Mi.arrow))return this.expect(Mi.parenR),i;this.eat(Mi.comma)}return r=i?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]):this.flowParseFunctionTypeParams(),s.params=r.params,s.rest=r.rest,s.this=r._this,this.expect(Mi.parenR),this.expect(Mi.arrow),s.returnType=this.flowParseType(),s.typeParameters=null,this.finishNode(s,"FunctionTypeAnnotation");case Mi.string:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case Mi._true:case Mi._false:return s.value=this.match(Mi._true),this.next(),this.finishNode(s,"BooleanLiteralTypeAnnotation");case Mi.plusMin:if("-"===this.state.value){if(this.next(),this.match(Mi.num))return this.parseLiteral(-this.state.value,"NumberLiteralTypeAnnotation",s.start,s.loc.start);if(this.match(Mi.bigint))return this.parseLiteral(-this.state.value,"BigIntLiteralTypeAnnotation",s.start,s.loc.start);throw this.raise(this.state.start,Ta.UnexpectedSubtractionOperand)}throw this.unexpected();case Mi.num:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case Mi.bigint:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case Mi._void:return this.next(),this.finishNode(s,"VoidTypeAnnotation");case Mi._null:return this.next(),this.finishNode(s,"NullLiteralTypeAnnotation");case Mi._this:return this.next(),this.finishNode(s,"ThisTypeAnnotation");case Mi.star:return this.next(),this.finishNode(s,"ExistsTypeAnnotation");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType();if(this.state.type.keyword){const t=this.state.type.label;return this.next(),super.createIdentifier(s,t)}}throw this.unexpected()}flowParsePostfixType(){const t=this.state.start,e=this.state.startLoc;let s=this.flowParsePrimaryType(),r=!1;for(;(this.match(Mi.bracketL)||this.match(Mi.questionDot))&&!this.canInsertSemicolon();){const i=this.startNodeAt(t,e),a=this.eat(Mi.questionDot);r=r||a,this.expect(Mi.bracketL),!a&&this.match(Mi.bracketR)?(i.elementType=s,this.next(),s=this.finishNode(i,"ArrayTypeAnnotation")):(i.objectType=s,i.indexType=this.flowParseType(),this.expect(Mi.bracketR),r?(i.optional=a,s=this.finishNode(i,"OptionalIndexedAccessType")):s=this.finishNode(i,"IndexedAccessType"))}return s}flowParsePrefixType(){const t=this.startNode();return this.eat(Mi.question)?(t.typeAnnotation=this.flowParsePrefixType(),this.finishNode(t,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){const t=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(Mi.arrow)){const e=this.startNodeAt(t.start,t.loc.start);return e.params=[this.reinterpretTypeAsFunctionTypeParam(t)],e.rest=null,e.this=null,e.returnType=this.flowParseType(),e.typeParameters=null,this.finishNode(e,"FunctionTypeAnnotation")}return t}flowParseIntersectionType(){const t=this.startNode();this.eat(Mi.bitwiseAND);const e=this.flowParseAnonFunctionWithoutParens();for(t.types=[e];this.eat(Mi.bitwiseAND);)t.types.push(this.flowParseAnonFunctionWithoutParens());return 1===t.types.length?e:this.finishNode(t,"IntersectionTypeAnnotation")}flowParseUnionType(){const t=this.startNode();this.eat(Mi.bitwiseOR);const e=this.flowParseIntersectionType();for(t.types=[e];this.eat(Mi.bitwiseOR);)t.types.push(this.flowParseIntersectionType());return 1===t.types.length?e:this.finishNode(t,"UnionTypeAnnotation")}flowParseType(){const t=this.state.inType;this.state.inType=!0;const e=this.flowParseUnionType();return this.state.inType=t,this.state.exprAllowed=this.state.exprAllowed||this.state.noAnonFunctionType,e}flowParseTypeOrImplicitInstantiation(){if(this.state.type===Mi.name&&"_"===this.state.value){const t=this.state.start,e=this.state.startLoc,s=this.parseIdentifier();return this.flowParseGenericType(t,e,s)}return this.flowParseType()}flowParseTypeAnnotation(){const t=this.startNode();return t.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(t,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(t){const e=t?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(Mi.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e)),e}typeCastToParameter(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocation(t.expression,t.typeAnnotation.end,t.typeAnnotation.loc.end),t.expression}flowParseVariance(){let t=null;return this.match(Mi.plusMin)&&(t=this.startNode(),"+"===this.state.value?t.kind="plus":t.kind="minus",this.next(),this.finishNode(t,"Variance")),t}parseFunctionBody(t,e,s=!1){return e?this.forwardNoArrowParamsConversionAt(t,(()=>super.parseFunctionBody(t,!0,s))):super.parseFunctionBody(t,!1,s)}parseFunctionBodyAndFinish(t,e,s=!1){if(this.match(Mi.colon)){const e=this.startNode();[e.typeAnnotation,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),t.returnType=e.typeAnnotation?this.finishNode(e,"TypeAnnotation"):null}super.parseFunctionBodyAndFinish(t,e,s)}parseStatement(t,e){if(this.state.strict&&this.match(Mi.name)&&"interface"===this.state.value){const t=this.lookahead();if(t.type===Mi.name||ma(t.value)){const t=this.startNode();return this.next(),this.flowParseInterface(t)}}else if(this.shouldParseEnums()&&this.isContextual("enum")){const t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}const s=super.parseStatement(t,e);return void 0!==this.flowPragma||this.isValidDirective(s)||(this.flowPragma=null),s}parseExpressionStatement(t,e){if("Identifier"===e.type)if("declare"===e.name){if(this.match(Mi._class)||this.match(Mi.name)||this.match(Mi._function)||this.match(Mi._var)||this.match(Mi._export))return this.flowParseDeclare(t)}else if(this.match(Mi.name)){if("interface"===e.name)return this.flowParseInterface(t);if("type"===e.name)return this.flowParseTypeAlias(t);if("opaque"===e.name)return this.flowParseOpaqueType(t,!1)}return super.parseExpressionStatement(t,e)}shouldParseExportDeclaration(){return this.isContextual("type")||this.isContextual("interface")||this.isContextual("opaque")||this.shouldParseEnums()&&this.isContextual("enum")||super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){return(!this.match(Mi.name)||!("type"===this.state.value||"interface"===this.state.value||"opaque"===this.state.value||this.shouldParseEnums()&&"enum"===this.state.value))&&super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual("enum")){const t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDefaultExpression()}parseConditional(t,e,s,r){if(!this.match(Mi.question))return t;if(r){const i=this.tryParse((()=>super.parseConditional(t,e,s)));return i.node?(i.error&&(this.state=i.failState),i.node):(r.start=i.error.pos||this.state.start,t)}this.expect(Mi.question);const i=this.state.clone(),a=this.state.noArrowAt,n=this.startNodeAt(e,s);let{consequent:o,failed:u}=this.tryParseConditionalConsequent(),[h,c]=this.getArrowLikeExpressions(o);if(u||c.length>0){const t=[...a];if(c.length>0){this.state=i,this.state.noArrowAt=t;for(let e=0;e<c.length;e++)t.push(c[e].start);({consequent:o,failed:u}=this.tryParseConditionalConsequent()),[h,c]=this.getArrowLikeExpressions(o)}u&&h.length>1&&this.raise(i.start,Ta.AmbiguousConditionalArrow),u&&1===h.length&&(this.state=i,this.state.noArrowAt=t.concat(h[0].start),({consequent:o,failed:u}=this.tryParseConditionalConsequent()))}return this.getArrowLikeExpressions(o,!0),this.state.noArrowAt=a,this.expect(Mi.colon),n.test=t,n.consequent=o,n.alternate=this.forwardNoArrowParamsConversionAt(n,(()=>this.parseMaybeAssign(void 0,void 0,void 0))),this.finishNode(n,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const t=this.parseMaybeAssignAllowIn(),e=!this.match(Mi.colon);return this.state.noArrowParamsConversionAt.pop(),{consequent:t,failed:e}}getArrowLikeExpressions(t,e){const s=[t],r=[];for(;0!==s.length;){const t=s.pop();"ArrowFunctionExpression"===t.type?(t.typeParameters||!t.returnType?this.finishArrowValidation(t):r.push(t),s.push(t.body)):"ConditionalExpression"===t.type&&(s.push(t.consequent),s.push(t.alternate))}return e?(r.forEach((t=>this.finishArrowValidation(t))),[r,[]]):function(t,e){const s=[],r=[];for(let i=0;i<t.length;i++)(e(t[i],i,t)?s:r).push(t[i]);return[s,r]}(r,(t=>t.params.every((t=>this.isAssignable(t,!0)))))}finishArrowValidation(t){var e;this.toAssignableList(t.params,null==(e=t.extra)?void 0:e.trailingComma,!1),this.scope.enter(6),super.checkParams(t,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(t,e){let s;return-1!==this.state.noArrowParamsConversionAt.indexOf(t.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),s=e(),this.state.noArrowParamsConversionAt.pop()):s=e(),s}parseParenItem(t,e,s){if(t=super.parseParenItem(t,e,s),this.eat(Mi.question)&&(t.optional=!0,this.resetEndLocation(t)),this.match(Mi.colon)){const r=this.startNodeAt(e,s);return r.expression=t,r.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(r,"TypeCastExpression")}return t}assertModuleNodeAllowed(t){"ImportDeclaration"===t.type&&("type"===t.importKind||"typeof"===t.importKind)||"ExportNamedDeclaration"===t.type&&"type"===t.exportKind||"ExportAllDeclaration"===t.type&&"type"===t.exportKind||super.assertModuleNodeAllowed(t)}parseExport(t){const e=super.parseExport(t);return"ExportNamedDeclaration"!==e.type&&"ExportAllDeclaration"!==e.type||(e.exportKind=e.exportKind||"value"),e}parseExportDeclaration(t){if(this.isContextual("type")){t.exportKind="type";const e=this.startNode();return this.next(),this.match(Mi.braceL)?(t.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(t),null):this.flowParseTypeAlias(e)}if(this.isContextual("opaque")){t.exportKind="type";const e=this.startNode();return this.next(),this.flowParseOpaqueType(e,!1)}if(this.isContextual("interface")){t.exportKind="type";const e=this.startNode();return this.next(),this.flowParseInterface(e)}if(this.shouldParseEnums()&&this.isContextual("enum")){t.exportKind="value";const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDeclaration(t)}eatExportStar(t){return!!super.eatExportStar(...arguments)||!(!this.isContextual("type")||this.lookahead().type!==Mi.star)&&(t.exportKind="type",this.next(),this.next(),!0)}maybeParseExportNamespaceSpecifier(t){const e=this.state.start,s=super.maybeParseExportNamespaceSpecifier(t);return s&&"type"===t.exportKind&&this.unexpected(e),s}parseClassId(t,e,s){super.parseClassId(t,e,s),this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(t,e,s){const r=this.state.start;if(this.isContextual("declare")){if(this.parseClassMemberFromModifier(t,e))return;e.declare=!0}super.parseClassMember(t,e,s),e.declare&&("ClassProperty"!==e.type&&"ClassPrivateProperty"!==e.type&&"PropertyDefinition"!==e.type?this.raise(r,Ta.DeclareClassElement):e.value&&this.raise(e.value.start,Ta.DeclareClassFieldInitializer))}getTokenFromCode(t){const e=this.input.charCodeAt(this.state.pos+1);return 123===t&&124===e?this.finishOp(Mi.braceBarL,2):!this.state.inType||62!==t&&60!==t?this.state.inType&&63===t?46===e?this.finishOp(Mi.questionDot,2):this.finishOp(Mi.question,1):function(t,e){return 64===t&&64===e}(t,e)?(this.state.isIterator=!0,super.readWord()):super.getTokenFromCode(t):this.finishOp(Mi.relational,1)}isAssignable(t,e){switch(t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":return!0;case"ObjectExpression":{const e=t.properties.length-1;return t.properties.every(((t,s)=>"ObjectMethod"!==t.type&&(s===e||"SpreadElement"===t.type)&&this.isAssignable(t)))}case"ObjectProperty":return this.isAssignable(t.value);case"SpreadElement":return this.isAssignable(t.argument);case"ArrayExpression":return t.elements.every((t=>this.isAssignable(t)));case"AssignmentExpression":return"="===t.operator;case"ParenthesizedExpression":case"TypeCastExpression":return this.isAssignable(t.expression);case"MemberExpression":case"OptionalMemberExpression":return!e;default:return!1}}toAssignable(t,e=!1){return"TypeCastExpression"===t.type?super.toAssignable(this.typeCastToParameter(t),e):super.toAssignable(t,e)}toAssignableList(t,e,s){for(let e=0;e<t.length;e++){const s=t[e];"TypeCastExpression"===(null==s?void 0:s.type)&&(t[e]=this.typeCastToParameter(s))}return super.toAssignableList(t,e,s)}toReferencedList(t,e){for(let r=0;r<t.length;r++){var s;const i=t[r];!i||"TypeCastExpression"!==i.type||null!=(s=i.extra)&&s.parenthesized||!(t.length>1)&&e||this.raise(i.typeAnnotation.start,Ta.TypeCastInPattern)}return t}parseArrayLike(t,e,s,r){const i=super.parseArrayLike(t,e,s,r);return e&&!this.state.maybeInArrowParameters&&this.toReferencedList(i.elements),i}checkLVal(t,...e){if("TypeCastExpression"!==t.type)return super.checkLVal(t,...e)}parseClassProperty(t){return this.match(Mi.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(t)}parseClassPrivateProperty(t){return this.match(Mi.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(t)}isClassMethod(){return this.isRelational("<")||super.isClassMethod()}isClassProperty(){return this.match(Mi.colon)||super.isClassProperty()}isNonstaticConstructor(t){return!this.match(Mi.colon)&&super.isNonstaticConstructor(t)}pushClassMethod(t,e,s,r,i,a){if(e.variance&&this.unexpected(e.variance.start),delete e.variance,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(t,e,s,r,i,a),e.params&&i){const t=e.params;t.length>0&&this.isThisParam(t[0])&&this.raise(e.start,Ta.ThisParamBannedInConstructor)}else if("MethodDefinition"===e.type&&i&&e.value.params){const t=e.value.params;t.length>0&&this.isThisParam(t[0])&&this.raise(e.start,Ta.ThisParamBannedInConstructor)}}pushClassPrivateMethod(t,e,s,r){e.variance&&this.unexpected(e.variance.start),delete e.variance,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(t,e,s,r)}parseClassSuper(t){if(super.parseClassSuper(t),t.superClass&&this.isRelational("<")&&(t.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual("implements")){this.next();const e=t.implements=[];do{const t=this.startNode();t.id=this.flowParseRestrictedIdentifier(!0),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,e.push(this.finishNode(t,"ClassImplements"))}while(this.eat(Mi.comma))}}checkGetterSetterParams(t){super.checkGetterSetterParams(t);const e=this.getObjectOrClassMethodParams(t);if(e.length>0){const s=e[0];this.isThisParam(s)&&"get"===t.kind?this.raise(s.start,Ta.GetterMayNotHaveThisParam):this.isThisParam(s)&&this.raise(s.start,Ta.SetterMayNotHaveThisParam)}}parsePropertyName(t,e){const s=this.flowParseVariance(),r=super.parsePropertyName(t,e);return t.variance=s,r}parseObjPropValue(t,e,s,r,i,a,n,o){let u;t.variance&&this.unexpected(t.variance.start),delete t.variance,this.isRelational("<")&&!n&&(u=this.flowParseTypeParameterDeclaration(),this.match(Mi.parenL)||this.unexpected()),super.parseObjPropValue(t,e,s,r,i,a,n,o),u&&((t.value||t).typeParameters=u)}parseAssignableListItemTypes(t){return this.eat(Mi.question)&&("Identifier"!==t.type&&this.raise(t.start,Ta.OptionalBindingPattern),this.isThisParam(t)&&this.raise(t.start,Ta.ThisParamMayNotBeOptional),t.optional=!0),this.match(Mi.colon)?t.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(t)&&this.raise(t.start,Ta.ThisParamAnnotationRequired),this.match(Mi.eq)&&this.isThisParam(t)&&this.raise(t.start,Ta.ThisParamNoDefault),this.resetEndLocation(t),t}parseMaybeDefault(t,e,s){const r=super.parseMaybeDefault(t,e,s);return"AssignmentPattern"===r.type&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(r.typeAnnotation.start,Ta.TypeBeforeInitializer),r}shouldParseDefaultImport(t){return wa(t)?Ba(this.state):super.shouldParseDefaultImport(t)}parseImportSpecifierLocal(t,e,s,r){e.local=wa(t)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),this.checkLVal(e.local,r,9),t.specifiers.push(this.finishNode(e,s))}maybeParseDefaultImportSpecifier(t){t.importKind="value";let e=null;if(this.match(Mi._typeof)?e="typeof":this.isContextual("type")&&(e="type"),e){const s=this.lookahead();"type"===e&&s.type===Mi.star&&this.unexpected(s.start),(Ba(s)||s.type===Mi.braceL||s.type===Mi.star)&&(this.next(),t.importKind=e)}return super.maybeParseDefaultImportSpecifier(t)}parseImportSpecifier(t){const e=this.startNode(),s=this.state.start,r=this.parseModuleExportName();let i=null;"Identifier"===r.type&&("type"===r.name?i="type":"typeof"===r.name&&(i="typeof"));let a=!1;if(this.isContextual("as")&&!this.isLookaheadContextual("as")){const t=this.parseIdentifier(!0);null===i||this.match(Mi.name)||this.state.type.keyword?(e.imported=r,e.importKind=null,e.local=this.parseIdentifier()):(e.imported=t,e.importKind=i,e.local=t.__clone())}else if(null!==i&&(this.match(Mi.name)||this.state.type.keyword))e.imported=this.parseIdentifier(!0),e.importKind=i,this.eatContextual("as")?e.local=this.parseIdentifier():(a=!0,e.local=e.imported.__clone());else{if("StringLiteral"===r.type)throw this.raise(e.start,Gi.ImportBindingIsString,r.value);a=!0,e.imported=r,e.importKind=null,e.local=e.imported.__clone()}const n=wa(t),o=wa(e);n&&o&&this.raise(s,Ta.ImportTypeShorthandOnlyInPureImport),(n||o)&&this.checkReservedType(e.local.name,e.local.start,!0),!a||n||o||this.checkReservedWord(e.local.name,e.start,!0,!0),this.checkLVal(e.local,"import specifier",9),t.specifiers.push(this.finishNode(e,"ImportSpecifier"))}parseBindingAtom(){switch(this.state.type){case Mi._this:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(t,e){const s=t.kind;"get"!==s&&"set"!==s&&this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(t,e)}parseVarId(t,e){super.parseVarId(t,e),this.match(Mi.colon)&&(t.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t.id))}parseAsyncArrowFromCallExpression(t,e){if(this.match(Mi.colon)){const e=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,t.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=e}return super.parseAsyncArrowFromCallExpression(t,e)}shouldParseAsyncArrow(){return this.match(Mi.colon)||super.shouldParseAsyncArrow()}parseMaybeAssign(t,e,s){var r;let i,a=null;if(this.hasPlugin("jsx")&&(this.match(Mi.jsxTagStart)||this.isRelational("<"))){if(a=this.state.clone(),i=this.tryParse((()=>super.parseMaybeAssign(t,e,s)),a),!i.error)return i.node;const{context:r}=this.state;r[r.length-1]===$i.j_oTag?r.length-=2:r[r.length-1]===$i.j_expr&&(r.length-=1)}if(null!=(r=i)&&r.error||this.isRelational("<")){var n,o;let r;a=a||this.state.clone();const u=this.tryParse((i=>{var a;r=this.flowParseTypeParameterDeclaration();const n=this.forwardNoArrowParamsConversionAt(r,(()=>{const i=super.parseMaybeAssign(t,e,s);return this.resetStartLocationFromNode(i,r),i}));"ArrowFunctionExpression"!==n.type&&null!=(a=n.extra)&&a.parenthesized&&i();const o=this.maybeUnwrapTypeCastExpression(n);return o.typeParameters=r,this.resetStartLocationFromNode(o,r),n}),a);let h=null;if(u.node&&"ArrowFunctionExpression"===this.maybeUnwrapTypeCastExpression(u.node).type){if(!u.error&&!u.aborted)return u.node.async&&this.raise(r.start,Ta.UnexpectedTypeParameterBeforeAsyncArrowFunction),u.node;h=u.node}if(null!=(n=i)&&n.node)return this.state=i.failState,i.node;if(h)return this.state=u.failState,h;if(null!=(o=i)&&o.thrown)throw i.error;if(u.thrown)throw u.error;throw this.raise(r.start,Ta.UnexpectedTokenAfterTypeParameter)}return super.parseMaybeAssign(t,e,s)}parseArrow(t){if(this.match(Mi.colon)){const e=this.tryParse((()=>{const e=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;const s=this.startNode();return[s.typeAnnotation,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=e,this.canInsertSemicolon()&&this.unexpected(),this.match(Mi.arrow)||this.unexpected(),s}));if(e.thrown)return null;e.error&&(this.state=e.failState),t.returnType=e.node.typeAnnotation?this.finishNode(e.node,"TypeAnnotation"):null}return super.parseArrow(t)}shouldParseArrow(){return this.match(Mi.colon)||super.shouldParseArrow()}setArrowFunctionParameters(t,e){-1!==this.state.noArrowParamsConversionAt.indexOf(t.start)?t.params=e:super.setArrowFunctionParameters(t,e)}checkParams(t,e,s){if(!s||-1===this.state.noArrowParamsConversionAt.indexOf(t.start)){for(let e=0;e<t.params.length;e++)this.isThisParam(t.params[e])&&e>0&&this.raise(t.params[e].start,Ta.ThisParamMustBeFirst);return super.checkParams(...arguments)}}parseParenAndDistinguishExpression(t){return super.parseParenAndDistinguishExpression(t&&-1===this.state.noArrowAt.indexOf(this.state.start))}parseSubscripts(t,e,s,r){if("Identifier"===t.type&&"async"===t.name&&-1!==this.state.noArrowAt.indexOf(e)){this.next();const r=this.startNodeAt(e,s);r.callee=t,r.arguments=this.parseCallExpressionArguments(Mi.parenR,!1),t=this.finishNode(r,"CallExpression")}else if("Identifier"===t.type&&"async"===t.name&&this.isRelational("<")){const i=this.state.clone(),a=this.tryParse((t=>this.parseAsyncArrowWithTypeParameters(e,s)||t()),i);if(!a.error&&!a.aborted)return a.node;const n=this.tryParse((()=>super.parseSubscripts(t,e,s,r)),i);if(n.node&&!n.error)return n.node;if(a.node)return this.state=a.failState,a.node;if(n.node)return this.state=n.failState,n.node;throw a.error||n.error}return super.parseSubscripts(t,e,s,r)}parseSubscript(t,e,s,r,i){if(this.match(Mi.questionDot)&&this.isLookaheadToken_lt()){if(i.optionalChainMember=!0,r)return i.stop=!0,t;this.next();const a=this.startNodeAt(e,s);return a.callee=t,a.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(Mi.parenL),a.arguments=this.parseCallExpressionArguments(Mi.parenR,!1),a.optional=!0,this.finishCallExpression(a,!0)}if(!r&&this.shouldParseTypes()&&this.isRelational("<")){const r=this.startNodeAt(e,s);r.callee=t;const a=this.tryParse((()=>(r.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(Mi.parenL),r.arguments=this.parseCallExpressionArguments(Mi.parenR,!1),i.optionalChainMember&&(r.optional=!1),this.finishCallExpression(r,i.optionalChainMember))));if(a.node)return a.error&&(this.state=a.failState),a.node}return super.parseSubscript(t,e,s,r,i)}parseNewArguments(t){let e=null;this.shouldParseTypes()&&this.isRelational("<")&&(e=this.tryParse((()=>this.flowParseTypeParameterInstantiationCallOrNew())).node),t.typeArguments=e,super.parseNewArguments(t)}parseAsyncArrowWithTypeParameters(t,e){const s=this.startNodeAt(t,e);if(this.parseFunctionParams(s),this.parseArrow(s))return this.parseArrowExpression(s,void 0,!0)}readToken_mult_modulo(t){const e=this.input.charCodeAt(this.state.pos+1);if(42===t&&47===e&&this.state.hasFlowComment)return this.state.hasFlowComment=!1,this.state.pos+=2,void this.nextToken();super.readToken_mult_modulo(t)}readToken_pipe_amp(t){const e=this.input.charCodeAt(this.state.pos+1);124!==t||125!==e?super.readToken_pipe_amp(t):this.finishOp(Mi.braceBarR,2)}parseTopLevel(t,e){const s=super.parseTopLevel(t,e);return this.state.hasFlowComment&&this.raise(this.state.pos,Ta.UnterminatedFlowComment),s}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment())return this.state.hasFlowComment&&this.unexpected(null,Ta.NestedFlowComment),this.hasFlowCommentCompletion(),this.state.pos+=this.skipFlowComment(),void(this.state.hasFlowComment=!0);if(this.state.hasFlowComment){const t=this.input.indexOf("*-/",this.state.pos+=2);if(-1===t)throw this.raise(this.state.pos-2,Gi.UnterminatedComment);this.state.pos=t+3}else super.skipBlockComment()}skipFlowComment(){const{pos:t}=this.state;let e=2;for(;[32,9].includes(this.input.charCodeAt(t+e));)e++;const s=this.input.charCodeAt(e+t),r=this.input.charCodeAt(e+t+1);return 58===s&&58===r?e+2:"flow-include"===this.input.slice(e+t,e+t+12)?e+12:58===s&&58!==r&&e}hasFlowCommentCompletion(){if(-1===this.input.indexOf("*/",this.state.pos))throw this.raise(this.state.pos,Gi.UnterminatedComment)}flowEnumErrorBooleanMemberNotInitialized(t,{enumName:e,memberName:s}){this.raise(t,Ta.EnumBooleanMemberNotInitialized,s,e)}flowEnumErrorInvalidMemberName(t,{enumName:e,memberName:s}){const r=s[0].toUpperCase()+s.slice(1);this.raise(t,Ta.EnumInvalidMemberName,s,r,e)}flowEnumErrorDuplicateMemberName(t,{enumName:e,memberName:s}){this.raise(t,Ta.EnumDuplicateMemberName,s,e)}flowEnumErrorInconsistentMemberValues(t,{enumName:e}){this.raise(t,Ta.EnumInconsistentMemberValues,e)}flowEnumErrorInvalidExplicitType(t,{enumName:e,suppliedType:s}){return this.raise(t,null===s?Ta.EnumInvalidExplicitTypeUnknownSupplied:Ta.EnumInvalidExplicitType,e,s)}flowEnumErrorInvalidMemberInitializer(t,{enumName:e,explicitType:s,memberName:r}){let i=null;switch(s){case"boolean":case"number":case"string":i=Ta.EnumInvalidMemberInitializerPrimaryType;break;case"symbol":i=Ta.EnumInvalidMemberInitializerSymbolType;break;default:i=Ta.EnumInvalidMemberInitializerUnknownType}return this.raise(t,i,e,r,s)}flowEnumErrorNumberMemberNotInitialized(t,{enumName:e,memberName:s}){this.raise(t,Ta.EnumNumberMemberNotInitialized,e,s)}flowEnumErrorStringMemberInconsistentlyInitailized(t,{enumName:e}){this.raise(t,Ta.EnumStringMemberInconsistentlyInitailized,e)}flowEnumMemberInit(){const t=this.state.start,e=()=>this.match(Mi.comma)||this.match(Mi.braceR);switch(this.state.type){case Mi.num:{const s=this.parseLiteral(this.state.value,"NumericLiteral");return e()?{type:"number",pos:s.start,value:s}:{type:"invalid",pos:t}}case Mi.string:{const s=this.parseLiteral(this.state.value,"StringLiteral");return e()?{type:"string",pos:s.start,value:s}:{type:"invalid",pos:t}}case Mi._true:case Mi._false:{const s=this.parseBooleanLiteral();return e()?{type:"boolean",pos:s.start,value:s}:{type:"invalid",pos:t}}default:return{type:"invalid",pos:t}}}flowEnumMemberRaw(){const t=this.state.start;return{id:this.parseIdentifier(!0),init:this.eat(Mi.eq)?this.flowEnumMemberInit():{type:"none",pos:t}}}flowEnumCheckExplicitTypeMismatch(t,e,s){const{explicitType:r}=e;null!==r&&r!==s&&this.flowEnumErrorInvalidMemberInitializer(t,e)}flowEnumMembers({enumName:t,explicitType:e}){const s=new Set,r={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};let i=!1;for(;!this.match(Mi.braceR);){if(this.eat(Mi.ellipsis)){i=!0;break}const a=this.startNode(),{id:n,init:o}=this.flowEnumMemberRaw(),u=n.name;if(""===u)continue;/^[a-z]/.test(u)&&this.flowEnumErrorInvalidMemberName(n.start,{enumName:t,memberName:u}),s.has(u)&&this.flowEnumErrorDuplicateMemberName(n.start,{enumName:t,memberName:u}),s.add(u);const h={enumName:t,explicitType:e,memberName:u};switch(a.id=n,o.type){case"boolean":this.flowEnumCheckExplicitTypeMismatch(o.pos,h,"boolean"),a.init=o.value,r.booleanMembers.push(this.finishNode(a,"EnumBooleanMember"));break;case"number":this.flowEnumCheckExplicitTypeMismatch(o.pos,h,"number"),a.init=o.value,r.numberMembers.push(this.finishNode(a,"EnumNumberMember"));break;case"string":this.flowEnumCheckExplicitTypeMismatch(o.pos,h,"string"),a.init=o.value,r.stringMembers.push(this.finishNode(a,"EnumStringMember"));break;case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(o.pos,h);case"none":switch(e){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(o.pos,h);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(o.pos,h);break;default:r.defaultedMembers.push(this.finishNode(a,"EnumDefaultedMember"))}}this.match(Mi.braceR)||this.expect(Mi.comma)}return{members:r,hasUnknownMembers:i}}flowEnumStringMembers(t,e,{enumName:s}){if(0===t.length)return e;if(0===e.length)return t;if(e.length>t.length){for(const e of t)this.flowEnumErrorStringMemberInconsistentlyInitailized(e.start,{enumName:s});return e}for(const t of e)this.flowEnumErrorStringMemberInconsistentlyInitailized(t.start,{enumName:s});return t}flowEnumParseExplicitType({enumName:t}){if(this.eatContextual("of")){if(!this.match(Mi.name))throw this.flowEnumErrorInvalidExplicitType(this.state.start,{enumName:t,suppliedType:null});const{value:e}=this.state;return this.next(),"boolean"!==e&&"number"!==e&&"string"!==e&&"symbol"!==e&&this.flowEnumErrorInvalidExplicitType(this.state.start,{enumName:t,suppliedType:e}),e}return null}flowEnumBody(t,{enumName:e,nameLoc:s}){const r=this.flowEnumParseExplicitType({enumName:e});this.expect(Mi.braceL);const{members:i,hasUnknownMembers:a}=this.flowEnumMembers({enumName:e,explicitType:r});switch(t.hasUnknownMembers=a,r){case"boolean":return t.explicitType=!0,t.members=i.booleanMembers,this.expect(Mi.braceR),this.finishNode(t,"EnumBooleanBody");case"number":return t.explicitType=!0,t.members=i.numberMembers,this.expect(Mi.braceR),this.finishNode(t,"EnumNumberBody");case"string":return t.explicitType=!0,t.members=this.flowEnumStringMembers(i.stringMembers,i.defaultedMembers,{enumName:e}),this.expect(Mi.braceR),this.finishNode(t,"EnumStringBody");case"symbol":return t.members=i.defaultedMembers,this.expect(Mi.braceR),this.finishNode(t,"EnumSymbolBody");default:{const r=()=>(t.members=[],this.expect(Mi.braceR),this.finishNode(t,"EnumStringBody"));t.explicitType=!1;const a=i.booleanMembers.length,n=i.numberMembers.length,o=i.stringMembers.length,u=i.defaultedMembers.length;if(a||n||o||u){if(a||n){if(!n&&!o&&a>=u){for(const t of i.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(t.start,{enumName:e,memberName:t.id.name});return t.members=i.booleanMembers,this.expect(Mi.braceR),this.finishNode(t,"EnumBooleanBody")}if(!a&&!o&&n>=u){for(const t of i.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(t.start,{enumName:e,memberName:t.id.name});return t.members=i.numberMembers,this.expect(Mi.braceR),this.finishNode(t,"EnumNumberBody")}return this.flowEnumErrorInconsistentMemberValues(s,{enumName:e}),r()}return t.members=this.flowEnumStringMembers(i.stringMembers,i.defaultedMembers,{enumName:e}),this.expect(Mi.braceR),this.finishNode(t,"EnumStringBody")}return r()}}}flowParseEnumDeclaration(t){const e=this.parseIdentifier();return t.id=e,t.body=this.flowEnumBody(this.startNode(),{enumName:e.name,nameLoc:e.start}),this.finishNode(t,"EnumDeclaration")}updateContext(t){this.match(Mi.name)&&"of"===this.state.value&&t===Mi.name&&"interface"===this.input.slice(this.state.lastTokStart,this.state.lastTokEnd)?this.state.exprAllowed=!1:super.updateContext(t)}isLookaheadToken_lt(){const t=this.nextTokenStart();if(60===this.input.charCodeAt(t)){const e=this.input.charCodeAt(t+1);return 60!==e&&61!==e}return!1}maybeUnwrapTypeCastExpression(t){return"TypeCastExpression"===t.type?t.expression:t}},typescript:t=>class extends t{getScopeHandler(){return ja}tsIsIdentifier(){return this.match(Mi.name)}tsTokenCanFollowModifier(){return(this.match(Mi.bracketL)||this.match(Mi.braceL)||this.match(Mi.star)||this.match(Mi.ellipsis)||this.match(Mi.hash)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(),this.tsTokenCanFollowModifier()}tsParseModifier(t){if(!this.match(Mi.name))return;const e=this.state.value;return-1!==t.indexOf(e)&&this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))?e:void 0}tsParseModifiers(t,e,s,r){const i=(e,s,r,i)=>{s===r&&t[i]&&this.raise(e,Ha.InvalidModifiersOrder,r,i)},a=(e,s,r,i)=>{(t[r]&&s===i||t[i]&&s===r)&&this.raise(e,Ha.IncompatibleModifiers,r,i)};for(;;){const n=this.state.start,o=this.tsParseModifier(e.concat(null!=s?s:[]));if(!o)break;za(o)?t.accessibility?this.raise(n,Ha.DuplicateAccessibilityModifier):(i(n,o,o,"override"),i(n,o,o,"static"),t.accessibility=o):(Object.hasOwnProperty.call(t,o)?this.raise(n,Ha.DuplicateModifier,o):(i(n,o,"static","readonly"),i(n,o,"static","override"),i(n,o,"override","readonly"),i(n,o,"abstract","override"),a(n,o,"declare","override"),a(n,o,"static","abstract")),t[o]=!0),null!=s&&s.includes(o)&&this.raise(n,r,o)}}tsIsListTerminator(t){switch(t){case"EnumMembers":case"TypeMembers":return this.match(Mi.braceR);case"HeritageClauseElement":return this.match(Mi.braceL);case"TupleElementTypes":return this.match(Mi.bracketR);case"TypeParametersOrArguments":return this.isRelational(">")}throw new Error("Unreachable")}tsParseList(t,e){const s=[];for(;!this.tsIsListTerminator(t);)s.push(e());return s}tsParseDelimitedList(t,e){return qa(this.tsParseDelimitedListWorker(t,e,!0))}tsParseDelimitedListWorker(t,e,s){const r=[];for(;!this.tsIsListTerminator(t);){const i=e();if(null==i)return;if(r.push(i),!this.eat(Mi.comma)){if(this.tsIsListTerminator(t))break;return void(s&&this.expect(Mi.comma))}}return r}tsParseBracketedList(t,e,s,r){r||(s?this.expect(Mi.bracketL):this.expectRelational("<"));const i=this.tsParseDelimitedList(t,e);return s?this.expect(Mi.bracketR):this.expectRelational(">"),i}tsParseImportType(){const t=this.startNode();return this.expect(Mi._import),this.expect(Mi.parenL),this.match(Mi.string)||this.raise(this.state.start,Ha.UnsupportedImportTypeArgument),t.argument=this.parseExprAtom(),this.expect(Mi.parenR),this.eat(Mi.dot)&&(t.qualifier=this.tsParseEntityName(!0)),this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSImportType")}tsParseEntityName(t){let e=this.parseIdentifier();for(;this.eat(Mi.dot);){const s=this.startNodeAtNode(e);s.left=e,s.right=this.parseIdentifier(t),e=this.finishNode(s,"TSQualifiedName")}return e}tsParseTypeReference(){const t=this.startNode();return t.typeName=this.tsParseEntityName(!1),!this.hasPrecedingLineBreak()&&this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeReference")}tsParseThisTypePredicate(t){this.next();const e=this.startNodeAtNode(t);return e.parameterName=t,e.typeAnnotation=this.tsParseTypeAnnotation(!1),e.asserts=!1,this.finishNode(e,"TSTypePredicate")}tsParseThisTypeNode(){const t=this.startNode();return this.next(),this.finishNode(t,"TSThisType")}tsParseTypeQuery(){const t=this.startNode();return this.expect(Mi._typeof),this.match(Mi._import)?t.exprName=this.tsParseImportType():t.exprName=this.tsParseEntityName(!0),this.finishNode(t,"TSTypeQuery")}tsParseTypeParameter(){const t=this.startNode();return t.name=this.parseIdentifierName(t.start),t.constraint=this.tsEatThenParseType(Mi._extends),t.default=this.tsEatThenParseType(Mi.eq),this.finishNode(t,"TSTypeParameter")}tsTryParseTypeParameters(){if(this.isRelational("<"))return this.tsParseTypeParameters()}tsParseTypeParameters(){const t=this.startNode();return this.isRelational("<")||this.match(Mi.jsxTagStart)?this.next():this.unexpected(),t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this),!1,!0),0===t.params.length&&this.raise(t.start,Ha.EmptyTypeParameters),this.finishNode(t,"TSTypeParameterDeclaration")}tsTryNextParseConstantContext(){return this.lookahead().type===Mi._const?(this.next(),this.tsParseTypeReference()):null}tsFillSignature(t,e){const s=t===Mi.arrow;e.typeParameters=this.tsTryParseTypeParameters(),this.expect(Mi.parenL),e.parameters=this.tsParseBindingListForSignature(),(s||this.match(t))&&(e.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(t))}tsParseBindingListForSignature(){return this.parseBindingList(Mi.parenR,41).map((t=>("Identifier"!==t.type&&"RestElement"!==t.type&&"ObjectPattern"!==t.type&&"ArrayPattern"!==t.type&&this.raise(t.start,Ha.UnsupportedSignatureParameterKind,t.type),t)))}tsParseTypeMemberSemicolon(){this.eat(Mi.comma)||this.isLineTerminator()||this.expect(Mi.semi)}tsParseSignatureMember(t,e){return this.tsFillSignature(Mi.colon,e),this.tsParseTypeMemberSemicolon(),this.finishNode(e,t)}tsIsUnambiguouslyIndexSignature(){return this.next(),this.eat(Mi.name)&&this.match(Mi.colon)}tsTryParseIndexSignature(t){if(!this.match(Mi.bracketL)||!this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))return;this.expect(Mi.bracketL);const e=this.parseIdentifier();e.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(e),this.expect(Mi.bracketR),t.parameters=[e];const s=this.tsTryParseTypeAnnotation();return s&&(t.typeAnnotation=s),this.tsParseTypeMemberSemicolon(),this.finishNode(t,"TSIndexSignature")}tsParsePropertyOrMethodSignature(t,e){this.eat(Mi.question)&&(t.optional=!0);const s=t;if(this.match(Mi.parenL)||this.isRelational("<")){e&&this.raise(t.start,Ha.ReadonlyForMethodSignature);const r=s;if(r.kind&&this.isRelational("<")&&this.raise(this.state.pos,Ha.AccesorCannotHaveTypeParameters),this.tsFillSignature(Mi.colon,r),this.tsParseTypeMemberSemicolon(),"get"===r.kind)r.parameters.length>0&&(this.raise(this.state.pos,Gi.BadGetterArity),this.isThisParam(r.parameters[0])&&this.raise(this.state.pos,Ha.AccesorCannotDeclareThisParameter));else if("set"===r.kind){if(1!==r.parameters.length)this.raise(this.state.pos,Gi.BadSetterArity);else{const t=r.parameters[0];this.isThisParam(t)&&this.raise(this.state.pos,Ha.AccesorCannotDeclareThisParameter),"Identifier"===t.type&&t.optional&&this.raise(this.state.pos,Ha.SetAccesorCannotHaveOptionalParameter),"RestElement"===t.type&&this.raise(this.state.pos,Ha.SetAccesorCannotHaveRestParameter)}r.typeAnnotation&&this.raise(r.typeAnnotation.start,Ha.SetAccesorCannotHaveReturnType)}else r.kind="method";return this.finishNode(r,"TSMethodSignature")}{const t=s;e&&(t.readonly=!0);const r=this.tsTryParseTypeAnnotation();return r&&(t.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(t,"TSPropertySignature")}}tsParseTypeMember(){const t=this.startNode();if(this.match(Mi.parenL)||this.isRelational("<"))return this.tsParseSignatureMember("TSCallSignatureDeclaration",t);if(this.match(Mi._new)){const e=this.startNode();return this.next(),this.match(Mi.parenL)||this.isRelational("<")?this.tsParseSignatureMember("TSConstructSignatureDeclaration",t):(t.key=this.createIdentifier(e,"new"),this.tsParsePropertyOrMethodSignature(t,!1))}this.tsParseModifiers(t,["readonly"],["declare","abstract","private","protected","public","static","override"],Ha.InvalidModifierOnTypeMember);const e=this.tsTryParseIndexSignature(t);return e||(this.parsePropertyName(t,!1),t.computed||"Identifier"!==t.key.type||"get"!==t.key.name&&"set"!==t.key.name||!this.tsTokenCanFollowModifier()||(t.kind=t.key.name,this.parsePropertyName(t,!1)),this.tsParsePropertyOrMethodSignature(t,!!t.readonly))}tsParseTypeLiteral(){const t=this.startNode();return t.members=this.tsParseObjectTypeMembers(),this.finishNode(t,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(Mi.braceL);const t=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(Mi.braceR),t}tsIsStartOfMappedType(){return this.next(),this.eat(Mi.plusMin)?this.isContextual("readonly"):(this.isContextual("readonly")&&this.next(),!!this.match(Mi.bracketL)&&(this.next(),!!this.tsIsIdentifier()&&(this.next(),this.match(Mi._in))))}tsParseMappedTypeParameter(){const t=this.startNode();return t.name=this.parseIdentifierName(t.start),t.constraint=this.tsExpectThenParseType(Mi._in),this.finishNode(t,"TSTypeParameter")}tsParseMappedType(){const t=this.startNode();return this.expect(Mi.braceL),this.match(Mi.plusMin)?(t.readonly=this.state.value,this.next(),this.expectContextual("readonly")):this.eatContextual("readonly")&&(t.readonly=!0),this.expect(Mi.bracketL),t.typeParameter=this.tsParseMappedTypeParameter(),t.nameType=this.eatContextual("as")?this.tsParseType():null,this.expect(Mi.bracketR),this.match(Mi.plusMin)?(t.optional=this.state.value,this.next(),this.expect(Mi.question)):this.eat(Mi.question)&&(t.optional=!0),t.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(Mi.braceR),this.finishNode(t,"TSMappedType")}tsParseTupleType(){const t=this.startNode();t.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let e=!1,s=null;return t.elementTypes.forEach((t=>{var r;let{type:i}=t;!e||"TSRestType"===i||"TSOptionalType"===i||"TSNamedTupleMember"===i&&t.optional||this.raise(t.start,Ha.OptionalTypeBeforeRequired),e=e||"TSNamedTupleMember"===i&&t.optional||"TSOptionalType"===i,"TSRestType"===i&&(i=(t=t.typeAnnotation).type);const a="TSNamedTupleMember"===i;s=null!=(r=s)?r:a,s!==a&&this.raise(t.start,Ha.MixedLabeledAndUnlabeledElements)})),this.finishNode(t,"TSTupleType")}tsParseTupleElementType(){const{start:t,startLoc:e}=this.state,s=this.eat(Mi.ellipsis);let r=this.tsParseType();const i=this.eat(Mi.question);if(this.eat(Mi.colon)){const t=this.startNodeAtNode(r);t.optional=i,"TSTypeReference"!==r.type||r.typeParameters||"Identifier"!==r.typeName.type?(this.raise(r.start,Ha.InvalidTupleMemberLabel),t.label=r):t.label=r.typeName,t.elementType=this.tsParseType(),r=this.finishNode(t,"TSNamedTupleMember")}else if(i){const t=this.startNodeAtNode(r);t.typeAnnotation=r,r=this.finishNode(t,"TSOptionalType")}if(s){const s=this.startNodeAt(t,e);s.typeAnnotation=r,r=this.finishNode(s,"TSRestType")}return r}tsParseParenthesizedType(){const t=this.startNode();return this.expect(Mi.parenL),t.typeAnnotation=this.tsParseType(),this.expect(Mi.parenR),this.finishNode(t,"TSParenthesizedType")}tsParseFunctionOrConstructorType(t,e){const s=this.startNode();return"TSConstructorType"===t&&(s.abstract=!!e,e&&this.next(),this.next()),this.tsFillSignature(Mi.arrow,s),this.finishNode(s,t)}tsParseLiteralTypeNode(){const t=this.startNode();return t.literal=(()=>{switch(this.state.type){case Mi.num:case Mi.bigint:case Mi.string:case Mi._true:case Mi._false:return this.parseExprAtom();default:throw this.unexpected()}})(),this.finishNode(t,"TSLiteralType")}tsParseTemplateLiteralType(){const t=this.startNode();return t.literal=this.parseTemplate(!1),this.finishNode(t,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){const t=this.tsParseThisTypeNode();return this.isContextual("is")&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(t):t}tsParseNonArrayType(){switch(this.state.type){case Mi.name:case Mi._void:case Mi._null:{const t=this.match(Mi._void)?"TSVoidKeyword":this.match(Mi._null)?"TSNullKeyword":function(t){switch(t){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}(this.state.value);if(void 0!==t&&46!==this.lookaheadCharCode()){const e=this.startNode();return this.next(),this.finishNode(e,t)}return this.tsParseTypeReference()}case Mi.string:case Mi.num:case Mi.bigint:case Mi._true:case Mi._false:return this.tsParseLiteralTypeNode();case Mi.plusMin:if("-"===this.state.value){const t=this.startNode(),e=this.lookahead();if(e.type!==Mi.num&&e.type!==Mi.bigint)throw this.unexpected();return t.literal=this.parseMaybeUnary(),this.finishNode(t,"TSLiteralType")}break;case Mi._this:return this.tsParseThisTypeOrThisTypePredicate();case Mi._typeof:return this.tsParseTypeQuery();case Mi._import:return this.tsParseImportType();case Mi.braceL:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case Mi.bracketL:return this.tsParseTupleType();case Mi.parenL:return this.tsParseParenthesizedType();case Mi.backQuote:return this.tsParseTemplateLiteralType()}throw this.unexpected()}tsParseArrayTypeOrHigher(){let t=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(Mi.bracketL);)if(this.match(Mi.bracketR)){const e=this.startNodeAtNode(t);e.elementType=t,this.expect(Mi.bracketR),t=this.finishNode(e,"TSArrayType")}else{const e=this.startNodeAtNode(t);e.objectType=t,e.indexType=this.tsParseType(),this.expect(Mi.bracketR),t=this.finishNode(e,"TSIndexedAccessType")}return t}tsParseTypeOperator(t){const e=this.startNode();return this.expectContextual(t),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),"readonly"===t&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(t){switch(t.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(t.start,Ha.UnexpectedReadonly)}}tsParseInferType(){const t=this.startNode();this.expectContextual("infer");const e=this.startNode();return e.name=this.parseIdentifierName(e.start),t.typeParameter=this.finishNode(e,"TSTypeParameter"),this.finishNode(t,"TSInferType")}tsParseTypeOperatorOrHigher(){const t=["keyof","unique","readonly"].find((t=>this.isContextual(t)));return t?this.tsParseTypeOperator(t):this.isContextual("infer")?this.tsParseInferType():this.tsParseArrayTypeOrHigher()}tsParseUnionOrIntersectionType(t,e,s){const r=this.startNode(),i=this.eat(s),a=[];do{a.push(e())}while(this.eat(s));return 1!==a.length||i?(r.types=a,this.finishNode(r,t)):a[0]}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),Mi.bitwiseAND)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),Mi.bitwiseOR)}tsIsStartOfFunctionType(){return!!this.isRelational("<")||this.match(Mi.parenL)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(this.match(Mi.name)||this.match(Mi._this))return this.next(),!0;if(this.match(Mi.braceL)){let t=1;for(this.next();t>0;)this.match(Mi.braceL)?++t:this.match(Mi.braceR)&&--t,this.next();return!0}if(this.match(Mi.bracketL)){let t=1;for(this.next();t>0;)this.match(Mi.bracketL)?++t:this.match(Mi.bracketR)&&--t,this.next();return!0}return!1}tsIsUnambiguouslyStartOfFunctionType(){if(this.next(),this.match(Mi.parenR)||this.match(Mi.ellipsis))return!0;if(this.tsSkipParameterStart()){if(this.match(Mi.colon)||this.match(Mi.comma)||this.match(Mi.question)||this.match(Mi.eq))return!0;if(this.match(Mi.parenR)&&(this.next(),this.match(Mi.arrow)))return!0}return!1}tsParseTypeOrTypePredicateAnnotation(t){return this.tsInType((()=>{const e=this.startNode();this.expect(t);const s=this.startNode(),r=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(r&&this.match(Mi._this)){let t=this.tsParseThisTypeOrThisTypePredicate();return"TSThisType"===t.type?(s.parameterName=t,s.asserts=!0,t=this.finishNode(s,"TSTypePredicate")):(this.resetStartLocationFromNode(t,s),t.asserts=!0),e.typeAnnotation=t,this.finishNode(e,"TSTypeAnnotation")}const i=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!i)return r?(s.parameterName=this.parseIdentifier(),s.asserts=r,e.typeAnnotation=this.finishNode(s,"TSTypePredicate"),this.finishNode(e,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,e);const a=this.tsParseTypeAnnotation(!1);return s.parameterName=i,s.typeAnnotation=a,s.asserts=r,e.typeAnnotation=this.finishNode(s,"TSTypePredicate"),this.finishNode(e,"TSTypeAnnotation")}))}tsTryParseTypeOrTypePredicateAnnotation(){return this.match(Mi.colon)?this.tsParseTypeOrTypePredicateAnnotation(Mi.colon):void 0}tsTryParseTypeAnnotation(){return this.match(Mi.colon)?this.tsParseTypeAnnotation():void 0}tsTryParseType(){return this.tsEatThenParseType(Mi.colon)}tsParseTypePredicatePrefix(){const t=this.parseIdentifier();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.next(),t}tsParseTypePredicateAsserts(){if(!this.match(Mi.name)||"asserts"!==this.state.value||this.hasPrecedingLineBreak())return!1;const t=this.state.containsEsc;return this.next(),!(!this.match(Mi.name)&&!this.match(Mi._this))&&(t&&this.raise(this.state.lastTokStart,Gi.InvalidEscapedReservedWord,"asserts"),!0)}tsParseTypeAnnotation(t=!0,e=this.startNode()){return this.tsInType((()=>{t&&this.expect(Mi.colon),e.typeAnnotation=this.tsParseType()})),this.finishNode(e,"TSTypeAnnotation")}tsParseType(){Va(this.state.inType);const t=this.tsParseNonConditionalType();if(this.hasPrecedingLineBreak()||!this.eat(Mi._extends))return t;const e=this.startNodeAtNode(t);return e.checkType=t,e.extendsType=this.tsParseNonConditionalType(),this.expect(Mi.question),e.trueType=this.tsParseType(),this.expect(Mi.colon),e.falseType=this.tsParseType(),this.finishNode(e,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual("abstract")&&this.lookahead().type===Mi._new}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(Mi._new)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){const t=this.startNode(),e=this.tsTryNextParseConstantContext();return t.typeAnnotation=e||this.tsNextThenParseType(),this.expectRelational(">"),t.expression=this.parseMaybeUnary(),this.finishNode(t,"TSTypeAssertion")}tsParseHeritageClause(t){const e=this.state.start,s=this.tsParseDelimitedList("HeritageClauseElement",this.tsParseExpressionWithTypeArguments.bind(this));return s.length||this.raise(e,Ha.EmptyHeritageClauseType,t),s}tsParseExpressionWithTypeArguments(){const t=this.startNode();return t.expression=this.tsParseEntityName(!1),this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSExpressionWithTypeArguments")}tsParseInterfaceDeclaration(t){t.id=this.parseIdentifier(),this.checkLVal(t.id,"typescript interface declaration",130),t.typeParameters=this.tsTryParseTypeParameters(),this.eat(Mi._extends)&&(t.extends=this.tsParseHeritageClause("extends"));const e=this.startNode();return e.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),t.body=this.finishNode(e,"TSInterfaceBody"),this.finishNode(t,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(t){return t.id=this.parseIdentifier(),this.checkLVal(t.id,"typescript type alias",2),t.typeParameters=this.tsTryParseTypeParameters(),t.typeAnnotation=this.tsInType((()=>{if(this.expect(Mi.eq),this.isContextual("intrinsic")&&this.lookahead().type!==Mi.dot){const t=this.startNode();return this.next(),this.finishNode(t,"TSIntrinsicKeyword")}return this.tsParseType()})),this.semicolon(),this.finishNode(t,"TSTypeAliasDeclaration")}tsInNoContext(t){const e=this.state.context;this.state.context=[e[0]];try{return t()}finally{this.state.context=e}}tsInType(t){const e=this.state.inType;this.state.inType=!0;try{return t()}finally{this.state.inType=e}}tsEatThenParseType(t){return this.match(t)?this.tsNextThenParseType():void 0}tsExpectThenParseType(t){return this.tsDoThenParseType((()=>this.expect(t)))}tsNextThenParseType(){return this.tsDoThenParseType((()=>this.next()))}tsDoThenParseType(t){return this.tsInType((()=>(t(),this.tsParseType())))}tsParseEnumMember(){const t=this.startNode();return t.id=this.match(Mi.string)?this.parseExprAtom():this.parseIdentifier(!0),this.eat(Mi.eq)&&(t.initializer=this.parseMaybeAssignAllowIn()),this.finishNode(t,"TSEnumMember")}tsParseEnumDeclaration(t,e){return e&&(t.const=!0),t.id=this.parseIdentifier(),this.checkLVal(t.id,"typescript enum declaration",e?779:267),this.expect(Mi.braceL),t.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(Mi.braceR),this.finishNode(t,"TSEnumDeclaration")}tsParseModuleBlock(){const t=this.startNode();return this.scope.enter(0),this.expect(Mi.braceL),this.parseBlockOrModuleBlockBody(t.body=[],void 0,!0,Mi.braceR),this.scope.exit(),this.finishNode(t,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(t,e=!1){if(t.id=this.parseIdentifier(),e||this.checkLVal(t.id,"module or namespace declaration",1024),this.eat(Mi.dot)){const e=this.startNode();this.tsParseModuleOrNamespaceDeclaration(e,!0),t.body=e}else this.scope.enter(ya),this.prodParam.enter(0),t.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(t,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(t){return this.isContextual("global")?(t.global=!0,t.id=this.parseIdentifier()):this.match(Mi.string)?t.id=this.parseExprAtom():this.unexpected(),this.match(Mi.braceL)?(this.scope.enter(ya),this.prodParam.enter(0),t.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(t,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(t,e){t.isExport=e||!1,t.id=this.parseIdentifier(),this.checkLVal(t.id,"import equals declaration",9),this.expect(Mi.eq);const s=this.tsParseModuleReference();return"type"===t.importKind&&"TSExternalModuleReference"!==s.type&&this.raise(s.start,Ha.ImportAliasHasImportType),t.moduleReference=s,this.semicolon(),this.finishNode(t,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual("require")&&40===this.lookaheadCharCode()}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){const t=this.startNode();if(this.expectContextual("require"),this.expect(Mi.parenL),!this.match(Mi.string))throw this.unexpected();return t.expression=this.parseExprAtom(),this.expect(Mi.parenR),this.finishNode(t,"TSExternalModuleReference")}tsLookAhead(t){const e=this.state.clone(),s=t();return this.state=e,s}tsTryParseAndCatch(t){const e=this.tryParse((e=>t()||e()));if(!e.aborted&&e.node)return e.error&&(this.state=e.failState),e.node}tsTryParse(t){const e=this.state.clone(),s=t();return void 0!==s&&!1!==s?s:void(this.state=e)}tsTryParseDeclare(t){if(this.isLineTerminator())return;let e,s=this.state.type;return this.isContextual("let")&&(s=Mi._var,e="let"),this.tsInAmbientContext((()=>{switch(s){case Mi._function:return t.declare=!0,this.parseFunctionStatement(t,!1,!0);case Mi._class:return t.declare=!0,this.parseClass(t,!0,!1);case Mi._const:if(this.match(Mi._const)&&this.isLookaheadContextual("enum"))return this.expect(Mi._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(t,!0);case Mi._var:return e=e||this.state.value,this.parseVarStatement(t,e);case Mi.name:{const e=this.state.value;return"global"===e?this.tsParseAmbientExternalModuleDeclaration(t):this.tsParseDeclaration(t,e,!0)}}}))}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0)}tsParseExpressionStatement(t,e){switch(e.name){case"declare":{const e=this.tsTryParseDeclare(t);if(e)return e.declare=!0,e;break}case"global":if(this.match(Mi.braceL)){this.scope.enter(ya),this.prodParam.enter(0);const s=t;return s.global=!0,s.id=e,s.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(s,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(t,e.name,!1)}}tsParseDeclaration(t,e,s){switch(e){case"abstract":if(this.tsCheckLineTerminator(s)&&(this.match(Mi._class)||this.match(Mi.name)))return this.tsParseAbstractDeclaration(t);break;case"enum":if(s||this.match(Mi.name))return s&&this.next(),this.tsParseEnumDeclaration(t,!1);break;case"interface":if(this.tsCheckLineTerminator(s)&&this.match(Mi.name))return this.tsParseInterfaceDeclaration(t);break;case"module":if(this.tsCheckLineTerminator(s)){if(this.match(Mi.string))return this.tsParseAmbientExternalModuleDeclaration(t);if(this.match(Mi.name))return this.tsParseModuleOrNamespaceDeclaration(t)}break;case"namespace":if(this.tsCheckLineTerminator(s)&&this.match(Mi.name))return this.tsParseModuleOrNamespaceDeclaration(t);break;case"type":if(this.tsCheckLineTerminator(s)&&this.match(Mi.name))return this.tsParseTypeAliasDeclaration(t)}}tsCheckLineTerminator(t){return t?!this.hasFollowingLineBreak()&&(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(t,e){if(!this.isRelational("<"))return;const s=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;const r=this.tsTryParseAndCatch((()=>{const s=this.startNodeAt(t,e);return s.typeParameters=this.tsParseTypeParameters(),super.parseFunctionParams(s),s.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(Mi.arrow),s}));return this.state.maybeInArrowParameters=s,r?this.parseArrowExpression(r,null,!0):void 0}tsParseTypeArguments(){const t=this.startNode();return t.params=this.tsInType((()=>this.tsInNoContext((()=>(this.expectRelational("<"),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))))),0===t.params.length&&this.raise(t.start,Ha.EmptyTypeArguments),this.state.exprAllowed=!1,this.expectRelational(">"),this.finishNode(t,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){if(this.match(Mi.name))switch(this.state.value){case"abstract":case"declare":case"enum":case"interface":case"module":case"namespace":case"type":return!0}return!1}isExportDefaultSpecifier(){return!this.tsIsDeclarationStart()&&super.isExportDefaultSpecifier()}parseAssignableListItem(t,e){const s=this.state.start,r=this.state.startLoc;let i,a=!1;void 0!==t&&(i=this.parseAccessModifier(),a=!!this.tsParseModifier(["readonly"]),!1===t&&(i||a)&&this.raise(s,Ha.UnexpectedParameterModifier));const n=this.parseMaybeDefault();this.parseAssignableListItemTypes(n);const o=this.parseMaybeDefault(n.start,n.loc.start,n);if(i||a){const t=this.startNodeAt(s,r);return e.length&&(t.decorators=e),i&&(t.accessibility=i),a&&(t.readonly=a),"Identifier"!==o.type&&"AssignmentPattern"!==o.type&&this.raise(t.start,Ha.UnsupportedParameterPropertyKind),t.parameter=o,this.finishNode(t,"TSParameterProperty")}return e.length&&(n.decorators=e),o}parseFunctionBodyAndFinish(t,e,s=!1){this.match(Mi.colon)&&(t.returnType=this.tsParseTypeOrTypePredicateAnnotation(Mi.colon));const r="FunctionDeclaration"===e?"TSDeclareFunction":"ClassMethod"===e?"TSDeclareMethod":void 0;r&&!this.match(Mi.braceL)&&this.isLineTerminator()?this.finishNode(t,r):"TSDeclareFunction"===r&&this.state.isAmbientContext&&(this.raise(t.start,Ha.DeclareFunctionHasImplementation),t.declare)?super.parseFunctionBodyAndFinish(t,r,s):super.parseFunctionBodyAndFinish(t,e,s)}registerFunctionStatementId(t){!t.body&&t.id?this.checkLVal(t.id,"function name",1024):super.registerFunctionStatementId(...arguments)}tsCheckForInvalidTypeCasts(t){t.forEach((t=>{"TSTypeCastExpression"===(null==t?void 0:t.type)&&this.raise(t.typeAnnotation.start,Ha.UnexpectedTypeAnnotation)}))}toReferencedList(t,e){return this.tsCheckForInvalidTypeCasts(t),t}parseArrayLike(...t){const e=super.parseArrayLike(...t);return"ArrayExpression"===e.type&&this.tsCheckForInvalidTypeCasts(e.elements),e}parseSubscript(t,e,s,r,i){if(!this.hasPrecedingLineBreak()&&this.match(Mi.bang)){this.state.exprAllowed=!1,this.next();const r=this.startNodeAt(e,s);return r.expression=t,this.finishNode(r,"TSNonNullExpression")}if(this.isRelational("<")){const a=this.tsTryParseAndCatch((()=>{if(!r&&this.atPossibleAsyncArrow(t)){const t=this.tsTryParseGenericAsyncArrowFunction(e,s);if(t)return t}const a=this.startNodeAt(e,s);a.callee=t;const n=this.tsParseTypeArguments();if(n){if(!r&&this.eat(Mi.parenL))return a.arguments=this.parseCallExpressionArguments(Mi.parenR,!1),this.tsCheckForInvalidTypeCasts(a.arguments),a.typeParameters=n,i.optionalChainMember&&(a.optional=!1),this.finishCallExpression(a,i.optionalChainMember);if(this.match(Mi.backQuote)){const r=this.parseTaggedTemplateExpression(t,e,s,i);return r.typeParameters=n,r}}this.unexpected()}));if(a)return a}return super.parseSubscript(t,e,s,r,i)}parseNewArguments(t){if(this.isRelational("<")){const e=this.tsTryParseAndCatch((()=>{const t=this.tsParseTypeArguments();return this.match(Mi.parenL)||this.unexpected(),t}));e&&(t.typeParameters=e)}super.parseNewArguments(t)}parseExprOp(t,e,s,r){if(qa(Mi._in.binop)>r&&!this.hasPrecedingLineBreak()&&this.isContextual("as")){const i=this.startNodeAt(e,s);i.expression=t;const a=this.tsTryNextParseConstantContext();return i.typeAnnotation=a||this.tsNextThenParseType(),this.finishNode(i,"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(i,e,s,r)}return super.parseExprOp(t,e,s,r)}checkReservedWord(t,e,s,r){}checkDuplicateExports(){}parseImport(t){if(t.importKind="value",this.match(Mi.name)||this.match(Mi.star)||this.match(Mi.braceL)){let e=this.lookahead();if(!this.isContextual("type")||e.type===Mi.comma||e.type===Mi.name&&"from"===e.value||e.type===Mi.eq||(t.importKind="type",this.next(),e=this.lookahead()),this.match(Mi.name)&&e.type===Mi.eq)return this.tsParseImportEqualsDeclaration(t)}const e=super.parseImport(t);return"type"===e.importKind&&e.specifiers.length>1&&"ImportDefaultSpecifier"===e.specifiers[0].type&&this.raise(e.start,Ha.TypeImportCannotSpecifyDefaultAndNamed),e}parseExport(t){if(this.match(Mi._import))return this.next(),this.isContextual("type")&&61!==this.lookaheadCharCode()?(t.importKind="type",this.next()):t.importKind="value",this.tsParseImportEqualsDeclaration(t,!0);if(this.eat(Mi.eq)){const e=t;return e.expression=this.parseExpression(),this.semicolon(),this.finishNode(e,"TSExportAssignment")}if(this.eatContextual("as")){const e=t;return this.expectContextual("namespace"),e.id=this.parseIdentifier(),this.semicolon(),this.finishNode(e,"TSNamespaceExportDeclaration")}return this.isContextual("type")&&this.lookahead().type===Mi.braceL?(this.next(),t.exportKind="type"):t.exportKind="value",super.parseExport(t)}isAbstractClass(){return this.isContextual("abstract")&&this.lookahead().type===Mi._class}parseExportDefaultExpression(){if(this.isAbstractClass()){const t=this.startNode();return this.next(),t.abstract=!0,this.parseClass(t,!0,!0),t}if("interface"===this.state.value){const t=this.tsParseDeclaration(this.startNode(),this.state.value,!0);if(t)return t}return super.parseExportDefaultExpression()}parseStatementContent(t,e){if(this.state.type===Mi._const){const t=this.lookahead();if(t.type===Mi.name&&"enum"===t.value){const t=this.startNode();return this.expect(Mi._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(t,!0)}}return super.parseStatementContent(t,e)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(t,e){return e.some((e=>za(e)?t.accessibility===e:!!t[e]))}parseClassMember(t,e,s){const r=["declare","private","public","protected","override","abstract","readonly"];this.tsParseModifiers(e,r.concat(["static"]));const i=()=>{const i=!!e.static;i&&this.eat(Mi.braceL)?(this.tsHasSomeModifiers(e,r)&&this.raise(this.state.pos,Ha.StaticBlockCannotHaveModifier),this.parseClassStaticBlock(t,e)):this.parseClassMemberWithIsStatic(t,e,s,i)};e.declare?this.tsInAmbientContext(i):i()}parseClassMemberWithIsStatic(t,e,s,r){const i=this.tsTryParseIndexSignature(e);if(i)return t.body.push(i),e.abstract&&this.raise(e.start,Ha.IndexSignatureHasAbstract),e.accessibility&&this.raise(e.start,Ha.IndexSignatureHasAccessibility,e.accessibility),e.declare&&this.raise(e.start,Ha.IndexSignatureHasDeclare),void(e.override&&this.raise(e.start,Ha.IndexSignatureHasOverride));!this.state.inAbstractClass&&e.abstract&&this.raise(e.start,Ha.NonAbstractClassHasAbstractMethod),e.override&&(s.hadSuperClass||this.raise(e.start,Ha.OverrideNotInSubClass)),super.parseClassMemberWithIsStatic(t,e,s,r)}parsePostMemberNameModifiers(t){this.eat(Mi.question)&&(t.optional=!0),t.readonly&&this.match(Mi.parenL)&&this.raise(t.start,Ha.ClassMethodHasReadonly),t.declare&&this.match(Mi.parenL)&&this.raise(t.start,Ha.ClassMethodHasDeclare)}parseExpressionStatement(t,e){return("Identifier"===e.type?this.tsParseExpressionStatement(t,e):void 0)||super.parseExpressionStatement(t,e)}shouldParseExportDeclaration(){return!!this.tsIsDeclarationStart()||super.shouldParseExportDeclaration()}parseConditional(t,e,s,r){if(!r||!this.match(Mi.question))return super.parseConditional(t,e,s,r);const i=this.tryParse((()=>super.parseConditional(t,e,s)));return i.node?(i.error&&(this.state=i.failState),i.node):(r.start=i.error.pos||this.state.start,t)}parseParenItem(t,e,s){if(t=super.parseParenItem(t,e,s),this.eat(Mi.question)&&(t.optional=!0,this.resetEndLocation(t)),this.match(Mi.colon)){const r=this.startNodeAt(e,s);return r.expression=t,r.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(r,"TSTypeCastExpression")}return t}parseExportDeclaration(t){const e=this.state.start,s=this.state.startLoc,r=this.eatContextual("declare");if(r&&(this.isContextual("declare")||!this.shouldParseExportDeclaration()))throw this.raise(this.state.start,Ha.ExpectedAmbientAfterExportDeclare);let i;return this.match(Mi.name)&&(i=this.tsTryParseExportDeclaration()),i||(i=super.parseExportDeclaration(t)),i&&("TSInterfaceDeclaration"===i.type||"TSTypeAliasDeclaration"===i.type||r)&&(t.exportKind="type"),i&&r&&(this.resetStartLocation(i,e,s),i.declare=!0),i}parseClassId(t,e,s){if((!e||s)&&this.isContextual("implements"))return;super.parseClassId(t,e,s,t.declare?1024:139);const r=this.tsTryParseTypeParameters();r&&(t.typeParameters=r)}parseClassPropertyAnnotation(t){!t.optional&&this.eat(Mi.bang)&&(t.definite=!0);const e=this.tsTryParseTypeAnnotation();e&&(t.typeAnnotation=e)}parseClassProperty(t){return this.parseClassPropertyAnnotation(t),this.state.isAmbientContext&&this.match(Mi.eq)&&this.raise(this.state.start,Ha.DeclareClassFieldHasInitializer),super.parseClassProperty(t)}parseClassPrivateProperty(t){return t.abstract&&this.raise(t.start,Ha.PrivateElementHasAbstract),t.accessibility&&this.raise(t.start,Ha.PrivateElementHasAccessibility,t.accessibility),this.parseClassPropertyAnnotation(t),super.parseClassPrivateProperty(t)}pushClassMethod(t,e,s,r,i,a){const n=this.tsTryParseTypeParameters();n&&i&&this.raise(n.start,Ha.ConstructorHasTypeParameters),!e.declare||"get"!==e.kind&&"set"!==e.kind||this.raise(e.start,Ha.DeclareAccessor,e.kind),n&&(e.typeParameters=n),super.pushClassMethod(t,e,s,r,i,a)}pushClassPrivateMethod(t,e,s,r){const i=this.tsTryParseTypeParameters();i&&(e.typeParameters=i),super.pushClassPrivateMethod(t,e,s,r)}parseClassSuper(t){super.parseClassSuper(t),t.superClass&&this.isRelational("<")&&(t.superTypeParameters=this.tsParseTypeArguments()),this.eatContextual("implements")&&(t.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(t,...e){const s=this.tsTryParseTypeParameters();s&&(t.typeParameters=s),super.parseObjPropValue(t,...e)}parseFunctionParams(t,e){const s=this.tsTryParseTypeParameters();s&&(t.typeParameters=s),super.parseFunctionParams(t,e)}parseVarId(t,e){super.parseVarId(t,e),"Identifier"===t.id.type&&this.eat(Mi.bang)&&(t.definite=!0);const s=this.tsTryParseTypeAnnotation();s&&(t.id.typeAnnotation=s,this.resetEndLocation(t.id))}parseAsyncArrowFromCallExpression(t,e){return this.match(Mi.colon)&&(t.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(t,e)}parseMaybeAssign(...t){var e,s,r,i,a,n,o;let u,h,c,p;if(this.hasPlugin("jsx")&&(this.match(Mi.jsxTagStart)||this.isRelational("<"))){if(u=this.state.clone(),h=this.tryParse((()=>super.parseMaybeAssign(...t)),u),!h.error)return h.node;const{context:e}=this.state;e[e.length-1]===$i.j_oTag?e.length-=2:e[e.length-1]===$i.j_expr&&(e.length-=1)}if(!(null!=(e=h)&&e.error||this.isRelational("<")))return super.parseMaybeAssign(...t);u=u||this.state.clone();const l=this.tryParse((e=>{var s,r;p=this.tsParseTypeParameters();const i=super.parseMaybeAssign(...t);return("ArrowFunctionExpression"!==i.type||null!=(s=i.extra)&&s.parenthesized)&&e(),0!==(null==(r=p)?void 0:r.params.length)&&this.resetStartLocationFromNode(i,p),i.typeParameters=p,i}),u);if(!l.error&&!l.aborted)return l.node;if(!h&&(Va(!this.hasPlugin("jsx")),c=this.tryParse((()=>super.parseMaybeAssign(...t)),u),!c.error))return c.node;if(null!=(s=h)&&s.node)return this.state=h.failState,h.node;if(l.node)return this.state=l.failState,l.node;if(null!=(r=c)&&r.node)return this.state=c.failState,c.node;if(null!=(i=h)&&i.thrown)throw h.error;if(l.thrown)throw l.error;if(null!=(a=c)&&a.thrown)throw c.error;throw(null==(n=h)?void 0:n.error)||l.error||(null==(o=c)?void 0:o.error)}parseMaybeUnary(t){return!this.hasPlugin("jsx")&&this.isRelational("<")?this.tsParseTypeAssertion():super.parseMaybeUnary(t)}parseArrow(t){if(this.match(Mi.colon)){const e=this.tryParse((t=>{const e=this.tsParseTypeOrTypePredicateAnnotation(Mi.colon);return!this.canInsertSemicolon()&&this.match(Mi.arrow)||t(),e}));if(e.aborted)return;e.thrown||(e.error&&(this.state=e.failState),t.returnType=e.node)}return super.parseArrow(t)}parseAssignableListItemTypes(t){this.eat(Mi.question)&&("Identifier"===t.type||this.state.isAmbientContext||this.state.inType||this.raise(t.start,Ha.PatternIsOptional),t.optional=!0);const e=this.tsTryParseTypeAnnotation();return e&&(t.typeAnnotation=e),this.resetEndLocation(t),t}toAssignable(t,e=!1){switch(t.type){case"TSTypeCastExpression":return super.toAssignable(this.typeCastToParameter(t),e);case"TSParameterProperty":return super.toAssignable(t,e);case"ParenthesizedExpression":return this.toAssignableParenthesizedExpression(t,e);case"TSAsExpression":case"TSNonNullExpression":case"TSTypeAssertion":return t.expression=this.toAssignable(t.expression,e),t;default:return super.toAssignable(t,e)}}toAssignableParenthesizedExpression(t,e){switch(t.expression.type){case"TSAsExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":return t.expression=this.toAssignable(t.expression,e),t;default:return super.toAssignable(t,e)}}checkLVal(t,e,...s){var r;switch(t.type){case"TSTypeCastExpression":return;case"TSParameterProperty":return void this.checkLVal(t.parameter,"parameter property",...s);case"TSAsExpression":case"TSTypeAssertion":if(!(s[0]||"parenthesized expression"===e||null!=(r=t.extra)&&r.parenthesized)){this.raise(t.start,Gi.InvalidLhs,e);break}return void this.checkLVal(t.expression,"parenthesized expression",...s);case"TSNonNullExpression":return void this.checkLVal(t.expression,e,...s);default:return void super.checkLVal(t,e,...s)}}parseBindingAtom(){switch(this.state.type){case Mi._this:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseMaybeDecoratorArguments(t){if(this.isRelational("<")){const e=this.tsParseTypeArguments();if(this.match(Mi.parenL)){const s=super.parseMaybeDecoratorArguments(t);return s.typeParameters=e,s}this.unexpected(this.state.start,Mi.parenL)}return super.parseMaybeDecoratorArguments(t)}checkCommaAfterRest(t){this.state.isAmbientContext&&this.match(Mi.comma)&&this.lookaheadCharCode()===t?this.next():super.checkCommaAfterRest(t)}isClassMethod(){return this.isRelational("<")||super.isClassMethod()}isClassProperty(){return this.match(Mi.bang)||this.match(Mi.colon)||super.isClassProperty()}parseMaybeDefault(...t){const e=super.parseMaybeDefault(...t);return"AssignmentPattern"===e.type&&e.typeAnnotation&&e.right.start<e.typeAnnotation.start&&this.raise(e.typeAnnotation.start,Ha.TypeAnnotationAfterAssign),e}getTokenFromCode(t){return!this.state.inType||62!==t&&60!==t?super.getTokenFromCode(t):this.finishOp(Mi.relational,1)}reScan_lt_gt(){if(this.match(Mi.relational)){const t=this.input.charCodeAt(this.state.start);60!==t&&62!==t||(this.state.pos-=1,this.readToken_lt_gt(t))}}toAssignableList(t){for(let e=0;e<t.length;e++){const s=t[e];if(s)switch(s.type){case"TSTypeCastExpression":t[e]=this.typeCastToParameter(s);break;case"TSAsExpression":case"TSTypeAssertion":this.state.maybeInArrowParameters?this.raise(s.start,Ha.UnexpectedTypeCastInParameter):t[e]=this.typeCastToParameter(s)}}return super.toAssignableList(...arguments)}typeCastToParameter(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocation(t.expression,t.typeAnnotation.end,t.typeAnnotation.loc.end),t.expression}shouldParseArrow(){return this.match(Mi.colon)||super.shouldParseArrow()}shouldParseAsyncArrow(){return this.match(Mi.colon)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(t){if(this.isRelational("<")){const e=this.tsTryParseAndCatch((()=>this.tsParseTypeArguments()));e&&(t.typeParameters=e)}return super.jsxParseOpeningElementAfterName(t)}getGetterSetterExpectedParamCount(t){const e=super.getGetterSetterExpectedParamCount(t),s=this.getObjectOrClassMethodParams(t)[0];return s&&this.isThisParam(s)?e+1:e}parseCatchClauseParam(){const t=super.parseCatchClauseParam(),e=this.tsTryParseTypeAnnotation();return e&&(t.typeAnnotation=e,this.resetEndLocation(t)),t}tsInAmbientContext(t){const e=this.state.isAmbientContext;this.state.isAmbientContext=!0;try{return t()}finally{this.state.isAmbientContext=e}}parseClass(t,...e){const s=this.state.inAbstractClass;this.state.inAbstractClass=!!t.abstract;try{return super.parseClass(t,...e)}finally{this.state.inAbstractClass=s}}tsParseAbstractDeclaration(t){if(this.match(Mi._class))return t.abstract=!0,this.parseClass(t,!0,!1);if(this.isContextual("interface")){if(!this.hasFollowingLineBreak())return t.abstract=!0,this.raise(t.start,Ha.NonClassMethodPropertyHasAbstractModifer),this.next(),this.tsParseInterfaceDeclaration(t)}else this.unexpected(null,Mi._class)}parseMethod(...t){const e=super.parseMethod(...t);if(e.abstract){if(this.hasPlugin("estree")?!!e.value.body:!!e.body){const{key:t}=e;this.raise(e.start,Ha.AbstractMethodHasImplementation,"Identifier"===t.type?t.name:"[".concat(this.input.slice(t.start,t.end),"]"))}}return e}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}},v8intrinsic:t=>class extends t{parseV8Intrinsic(){if(this.match(Mi.modulo)){const t=this.state.start,e=this.startNode();if(this.eat(Mi.modulo),this.match(Mi.name)){const t=this.parseIdentifierName(this.state.start),s=this.createIdentifier(e,t);if(s.type="V8IntrinsicIdentifier",this.match(Mi.parenL))return s}this.unexpected(t)}}parseExprAtom(){return this.parseV8Intrinsic()||super.parseExprAtom(...arguments)}},placeholders:t=>class extends t{parsePlaceholder(t){if(this.match(Mi.placeholder)){const e=this.startNode();return this.next(),this.assertNoSpace("Unexpected space in placeholder."),e.name=super.parseIdentifier(!0),this.assertNoSpace("Unexpected space in placeholder."),this.expect(Mi.placeholder),this.finishPlaceholder(e,t)}}finishPlaceholder(t,e){const s=!(!t.expectedNode||"Placeholder"!==t.type);return t.expectedNode=e,s?t:this.finishNode(t,"Placeholder")}getTokenFromCode(t){return 37===t&&37===this.input.charCodeAt(this.state.pos+1)?this.finishOp(Mi.placeholder,2):super.getTokenFromCode(...arguments)}parseExprAtom(){return this.parsePlaceholder("Expression")||super.parseExprAtom(...arguments)}parseIdentifier(){return this.parsePlaceholder("Identifier")||super.parseIdentifier(...arguments)}checkReservedWord(t){void 0!==t&&super.checkReservedWord(...arguments)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom(...arguments)}checkLVal(t){"Placeholder"!==t.type&&super.checkLVal(...arguments)}toAssignable(t){return t&&"Placeholder"===t.type&&"Expression"===t.expectedNode?(t.expectedNode="Pattern",t):super.toAssignable(...arguments)}isLet(t){if(super.isLet(t))return!0;if(!this.isContextual("let"))return!1;if(t)return!1;return this.lookahead().type===Mi.placeholder}verifyBreakContinue(t){t.label&&"Placeholder"===t.label.type||super.verifyBreakContinue(...arguments)}parseExpressionStatement(t,e){if("Placeholder"!==e.type||e.extra&&e.extra.parenthesized)return super.parseExpressionStatement(...arguments);if(this.match(Mi.colon)){const s=t;return s.label=this.finishPlaceholder(e,"Identifier"),this.next(),s.body=this.parseStatement("label"),this.finishNode(s,"LabeledStatement")}return this.semicolon(),t.name=e.name,this.finishPlaceholder(t,"Statement")}parseBlock(){return this.parsePlaceholder("BlockStatement")||super.parseBlock(...arguments)}parseFunctionId(){return this.parsePlaceholder("Identifier")||super.parseFunctionId(...arguments)}parseClass(t,e,s){const r=e?"ClassDeclaration":"ClassExpression";this.next(),this.takeDecorators(t);const i=this.state.strict,a=this.parsePlaceholder("Identifier");if(a)if(this.match(Mi._extends)||this.match(Mi.placeholder)||this.match(Mi.braceL))t.id=a;else{if(s||!e)return t.id=null,t.body=this.finishPlaceholder(a,"ClassBody"),this.finishNode(t,r);this.unexpected(null,Wa.ClassNameIsRequired)}else this.parseClassId(t,e,s);return this.parseClassSuper(t),t.body=this.parsePlaceholder("ClassBody")||this.parseClassBody(!!t.superClass,i),this.finishNode(t,r)}parseExport(t){const e=this.parsePlaceholder("Identifier");if(!e)return super.parseExport(...arguments);if(!this.isContextual("from")&&!this.match(Mi.comma))return t.specifiers=[],t.source=null,t.declaration=this.finishPlaceholder(e,"Declaration"),this.finishNode(t,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");const s=this.startNode();return s.exported=e,t.specifiers=[this.finishNode(s,"ExportDefaultSpecifier")],super.parseExport(t)}isExportDefaultSpecifier(){if(this.match(Mi._default)){const t=this.nextTokenStart();if(this.isUnparsedContextual(t,"from")&&this.input.startsWith(Mi.placeholder.label,this.nextTokenStartSince(t+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(t){return!!(t.specifiers&&t.specifiers.length>0)||super.maybeParseExportDefaultSpecifier(...arguments)}checkExport(t){const{specifiers:e}=t;null!=e&&e.length&&(t.specifiers=e.filter((t=>"Placeholder"===t.exported.type))),super.checkExport(t),t.specifiers=e}parseImport(t){const e=this.parsePlaceholder("Identifier");if(!e)return super.parseImport(...arguments);if(t.specifiers=[],!this.isContextual("from")&&!this.match(Mi.comma))return t.source=this.finishPlaceholder(e,"StringLiteral"),this.semicolon(),this.finishNode(t,"ImportDeclaration");const s=this.startNodeAtNode(e);if(s.local=e,this.finishNode(s,"ImportDefaultSpecifier"),t.specifiers.push(s),this.eat(Mi.comma)){this.maybeParseStarImportSpecifier(t)||this.parseNamedImportSpecifiers(t)}return this.expectContextual("from"),t.source=this.parseImportSource(),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource(...arguments)}}},Ya=Object.keys($a),Qa={sourceType:"script",sourceFilename:void 0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createParenthesizedExpressions:!1,errorRecovery:!1};class Za{constructor(){this.strict=void 0,this.curLine=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.maybeInArrowParameters=!1,this.inPipeline=!1,this.inType=!1,this.noAnonFunctionType=!1,this.inPropertyName=!1,this.hasFlowComment=!1,this.isIterator=!1,this.isAmbientContext=!1,this.inAbstractClass=!1,this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.soloAwait=!1,this.inFSharpPipelineDirectBody=!1,this.labels=[],this.decoratorStack=[[]],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.commentPreviousNode=null,this.pos=0,this.lineStart=0,this.type=Mi.eof,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.lastTokStart=0,this.lastTokEnd=0,this.context=[$i.braceStatement],this.exprAllowed=!0,this.containsEsc=!1,this.strictErrors=new Map,this.exportedIdentifiers=[],this.tokensLength=0}init(t){this.strict=!1!==t.strictMode&&"module"===t.sourceType,this.curLine=t.startLine,this.startLoc=this.endLoc=this.curPosition()}curPosition(){return new Vi(this.curLine,this.pos-this.lineStart)}clone(t){const e=new Za,s=Object.keys(this);for(let r=0,i=s.length;r<i;r++){const i=s[r];let a=this[i];!t&&Array.isArray(a)&&(a=a.slice()),e[i]=a}return e}}var tn=function(t){return t>=48&&t<=57};const en=new Set(["g","m","s","i","y","u"]),sn={decBinOct:[46,66,69,79,95,98,101,111],hex:[46,88,95,120]},rn={bin:[48,49]};rn.oct=[...rn.bin,50,51,52,53,54,55],rn.dec=[...rn.oct,56,57],rn.hex=[...rn.dec,65,66,67,68,69,70,97,98,99,100,101,102];class an{constructor(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new Hi(t.startLoc,t.endLoc)}}class nn{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}}class on{constructor(t){this.stack=[],this.undefinedPrivateNames=new Map,this.raise=t}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new nn)}exit(){const t=this.stack.pop(),e=this.current();for(const[s,r]of Array.from(t.undefinedPrivateNames))e?e.undefinedPrivateNames.has(s)||e.undefinedPrivateNames.set(s,r):this.raise(r,Gi.InvalidPrivateFieldResolution,s)}declarePrivateName(t,e,s){const r=this.current();let i=r.privateNames.has(t);if(3&e){const s=i&&r.loneAccessors.get(t);if(s){const a=4&s,n=4&e;i=(3&s)===(3&e)||a!==n,i||r.loneAccessors.delete(t)}else i||r.loneAccessors.set(t,e)}i&&this.raise(s,Gi.PrivateNameRedeclaration,t),r.privateNames.add(t),r.undefinedPrivateNames.delete(t)}usePrivateName(t,e){let s;for(s of this.stack)if(s.privateNames.has(t))return;s?s.undefinedPrivateNames.set(t,e):this.raise(e,Gi.InvalidPrivateFieldResolution,t)}}class un{constructor(t=0){this.type=void 0,this.type=t}canBeArrowParameterDeclaration(){return 2===this.type||1===this.type}isCertainlyParameterDeclaration(){return 3===this.type}}class hn extends un{constructor(t){super(t),this.errors=new Map}recordDeclarationError(t,e){this.errors.set(t,e)}clearDeclarationError(t){this.errors.delete(t)}iterateErrors(t){this.errors.forEach(t)}}class cn{constructor(t){this.stack=[new un],this.raise=t}enter(t){this.stack.push(t)}exit(){this.stack.pop()}recordParameterInitializerError(t,e){const{stack:s}=this;let r=s.length-1,i=s[r];for(;!i.isCertainlyParameterDeclaration();){if(!i.canBeArrowParameterDeclaration())return;i.recordDeclarationError(t,e),i=s[--r]}this.raise(t,e)}recordParenthesizedIdentifierError(t,e){const{stack:s}=this,r=s[s.length-1];if(r.isCertainlyParameterDeclaration())this.raise(t,e);else{if(!r.canBeArrowParameterDeclaration())return;r.recordDeclarationError(t,e)}}recordAsyncArrowParametersError(t,e){const{stack:s}=this;let r=s.length-1,i=s[r];for(;i.canBeArrowParameterDeclaration();)2===i.type&&i.recordDeclarationError(t,e),i=s[--r]}validateAsPattern(){const{stack:t}=this,e=t[t.length-1];e.canBeArrowParameterDeclaration()&&e.iterateErrors(((e,s)=>{this.raise(s,e);let r=t.length-2,i=t[r];for(;i.canBeArrowParameterDeclaration();)i.clearDeclarationError(s),i=t[--r]}))}}function pn(){return new un}class ln{constructor(){this.shorthandAssign=-1,this.doubleProto=-1}}class dn{constructor(t,e,s){this.type=void 0,this.start=void 0,this.end=void 0,this.loc=void 0,this.range=void 0,this.leadingComments=void 0,this.trailingComments=void 0,this.innerComments=void 0,this.extra=void 0,this.type="",this.start=e,this.end=0,this.loc=new Hi(s),null!=t&&t.options.ranges&&(this.range=[e,0]),null!=t&&t.filename&&(this.loc.filename=t.filename)}__clone(){const t=new dn,e=Object.keys(this);for(let s=0,r=e.length;s<r;s++){const r=e[s];"leadingComments"!==r&&"trailingComments"!==r&&"innerComments"!==r&&(t[r]=this[r])}return t}}const Dn=t=>"ParenthesizedExpression"===t.type?Dn(t.expression):t;const mn={kind:"loop"},fn={kind:"switch"},yn=/[\uD800-\uDFFF]/u;class An extends class extends class extends class extends class extends class extends class extends class extends class extends class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(t){return this.plugins.has(t)}getPluginOption(t,e){if(this.hasPlugin(t))return this.plugins.get(t)[e]}}{addComment(t){this.filename&&(t.loc.filename=this.filename),this.state.trailingComments.push(t),this.state.leadingComments.push(t)}adjustCommentsAfterTrailingComma(t,e,s){if(0===this.state.leadingComments.length)return;let r=null,i=e.length;for(;null===r&&i>0;)r=e[--i];if(null===r)return;for(let t=0;t<this.state.leadingComments.length;t++)this.state.leadingComments[t].end<this.state.commentPreviousNode.end&&(this.state.leadingComments.splice(t,1),t--);const a=[];for(let e=0;e<this.state.leadingComments.length;e++){const r=this.state.leadingComments[e];r.end<t.end?(a.push(r),s||(this.state.leadingComments.splice(e,1),e--)):(void 0===t.trailingComments&&(t.trailingComments=[]),t.trailingComments.push(r))}s&&(this.state.leadingComments=[]),a.length>0?r.trailingComments=a:void 0!==r.trailingComments&&(r.trailingComments=[])}processComment(t){if("Program"===t.type&&t.body.length>0)return;const e=this.state.commentStack;let s,r,i,a,n;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=t.end?(i=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else if(e.length>0){const s=zi(e);s.trailingComments&&s.trailingComments[0].start>=t.end&&(i=s.trailingComments,delete s.trailingComments)}for(e.length>0&&zi(e).start>=t.start&&(s=e.pop());e.length>0&&zi(e).start>=t.start;)r=e.pop();if(!r&&s&&(r=s),s)switch(t.type){case"ObjectExpression":this.adjustCommentsAfterTrailingComma(t,t.properties);break;case"ObjectPattern":this.adjustCommentsAfterTrailingComma(t,t.properties,!0);break;case"CallExpression":this.adjustCommentsAfterTrailingComma(t,t.arguments);break;case"ArrayExpression":this.adjustCommentsAfterTrailingComma(t,t.elements);break;case"ArrayPattern":this.adjustCommentsAfterTrailingComma(t,t.elements,!0)}else this.state.commentPreviousNode&&("ImportSpecifier"===this.state.commentPreviousNode.type&&"ImportSpecifier"!==t.type||"ExportSpecifier"===this.state.commentPreviousNode.type&&"ExportSpecifier"!==t.type)&&this.adjustCommentsAfterTrailingComma(t,[this.state.commentPreviousNode]);if(r){if(r.leadingComments)if(r!==t&&r.leadingComments.length>0&&zi(r.leadingComments).end<=t.start)t.leadingComments=r.leadingComments,delete r.leadingComments;else for(a=r.leadingComments.length-2;a>=0;--a)if(r.leadingComments[a].end<=t.start){t.leadingComments=r.leadingComments.splice(0,a+1);break}}else if(this.state.leadingComments.length>0)if(zi(this.state.leadingComments).end<=t.start){if(this.state.commentPreviousNode)for(n=0;n<this.state.leadingComments.length;n++)this.state.leadingComments[n].end<this.state.commentPreviousNode.end&&(this.state.leadingComments.splice(n,1),n--);this.state.leadingComments.length>0&&(t.leadingComments=this.state.leadingComments,this.state.leadingComments=[])}else{for(a=0;a<this.state.leadingComments.length&&!(this.state.leadingComments[a].end>t.start);a++);const e=this.state.leadingComments.slice(0,a);e.length&&(t.leadingComments=e),i=this.state.leadingComments.slice(a),0===i.length&&(i=null)}if(this.state.commentPreviousNode=t,i)if(i.length&&i[0].start>=t.start&&zi(i).end<=t.end)t.innerComments=i;else{const e=i.findIndex((e=>e.end>=t.end));e>0?(t.innerComments=i.slice(0,e),t.trailingComments=i.slice(e)):t.trailingComments=i}e.push(t)}}{getLocationForPosition(t){let e;return e=t===this.state.start?this.state.startLoc:t===this.state.lastTokStart?this.state.lastTokStartLoc:t===this.state.end?this.state.endLoc:t===this.state.lastTokEnd?this.state.lastTokEndLoc:function(t,e){let s,r=1,i=0;for(ji.lastIndex=0;(s=ji.exec(t))&&s.index<e;)r++,i=ji.lastIndex;return new Vi(r,e-i)}(this.input,t),e}raise(t,{code:e,reasonCode:s,template:r},...i){return this.raiseWithData(t,{code:e,reasonCode:s},r,...i)}raiseOverwrite(t,{code:e,template:s},...r){const i=this.getLocationForPosition(t),a=s.replace(/%(\d+)/g,((t,e)=>r[e]))+" (".concat(i.line,":").concat(i.column,")");if(this.options.errorRecovery){const e=this.state.errors;for(let s=e.length-1;s>=0;s--){const r=e[s];if(r.pos===t)return Object.assign(r,{message:a});if(r.pos<t)break}}return this._raise({code:e,loc:i,pos:t},a)}raiseWithData(t,e,s,...r){const i=this.getLocationForPosition(t),a=s.replace(/%(\d+)/g,((t,e)=>r[e]))+" (".concat(i.line,":").concat(i.column,")");return this._raise(Object.assign({loc:i,pos:t},e),a)}_raise(t,e){const s=new SyntaxError(e);if(Object.assign(s,t),this.options.errorRecovery)return this.isLookahead||this.state.errors.push(s),s;throw s}}{constructor(t,e){super(),this.isLookahead=void 0,this.tokens=[],this.state=new Za,this.state.init(t),this.input=e,this.length=e.length,this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.isLookahead||(this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new an(this.state))),this.state.lastTokEnd=this.state.end,this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return!!this.match(t)&&(this.next(),!0)}match(t){return this.state.type===t}lookahead(){const t=this.state;this.state=t.clone(!0),this.isLookahead=!0,this.next(),this.isLookahead=!1;const e=this.state;return this.state=t,e}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(t){Ui.lastIndex=t;return t+Ui.exec(this.input)[0].length}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}setStrict(t){this.state.strict=t,t&&(this.state.strictErrors.forEach(((t,e)=>this.raise(e,t))),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){const t=this.curContext();if(null!=t&&t.preserveSpace||this.skipSpace(),this.state.start=this.state.pos,this.state.startLoc=this.state.curPosition(),this.state.pos>=this.length)return void this.finishToken(Mi.eof);const e=null==t?void 0:t.override;e?e(this):this.getTokenFromCode(this.input.codePointAt(this.state.pos))}pushComment(t,e,s,r,i,a){const n={type:t?"CommentBlock":"CommentLine",value:e,start:s,end:r,loc:new Hi(i,a)};this.options.tokens&&this.pushToken(n),this.state.comments.push(n),this.addComment(n)}skipBlockComment(){const t=this.state.curPosition(),e=this.state.pos,s=this.input.indexOf("*/",this.state.pos+2);if(-1===s)throw this.raise(e,Gi.UnterminatedComment);let r;for(this.state.pos=s+2,ji.lastIndex=e;(r=ji.exec(this.input))&&r.index<this.state.pos;)++this.state.curLine,this.state.lineStart=r.index+r[0].length;this.isLookahead||this.pushComment(!0,this.input.slice(e+2,s),e,this.state.pos,t,this.state.curPosition())}skipLineComment(t){const e=this.state.pos,s=this.state.curPosition();let r=this.input.charCodeAt(this.state.pos+=t);if(this.state.pos<this.length)for(;!_i(r)&&++this.state.pos<this.length;)r=this.input.charCodeAt(this.state.pos);this.isLookahead||this.pushComment(!1,this.input.slice(e+t,this.state.pos),e,this.state.pos,s,this.state.curPosition())}skipSpace(){t:for(;this.state.pos<this.length;){const t=this.input.charCodeAt(this.state.pos);switch(t){case 32:case 160:case 9:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(!qi(t))break t;++this.state.pos}}}finishToken(t,e){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();const s=this.state.type;this.state.type=t,this.state.value=e,this.isLookahead||this.updateContext(s)}readToken_numberSign(){if(0===this.state.pos&&this.readToken_interpreter())return;const t=this.state.pos+1,e=this.input.charCodeAt(t);if(e>=48&&e<=57)throw this.raise(this.state.pos,Gi.UnexpectedDigitAfterHash);if(123===e||91===e&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),"hash"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(this.state.pos,123===e?Gi.RecordExpressionHashIncorrectStartSyntaxType:Gi.TupleExpressionHashIncorrectStartSyntaxType);123===e?this.finishToken(Mi.braceHashL):this.finishToken(Mi.bracketHashL),this.state.pos+=2}else this.finishOp(Mi.hash,1)}readToken_dot(){const t=this.input.charCodeAt(this.state.pos+1);t>=48&&t<=57?this.readNumber(!0):46===t&&46===this.input.charCodeAt(this.state.pos+2)?(this.state.pos+=3,this.finishToken(Mi.ellipsis)):(++this.state.pos,this.finishToken(Mi.dot))}readToken_slash(){if(this.state.exprAllowed&&!this.state.inType)return++this.state.pos,void this.readRegexp();61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(Mi.assign,2):this.finishOp(Mi.slash,1)}readToken_interpreter(){if(0!==this.state.pos||this.length<2)return!1;let t=this.input.charCodeAt(this.state.pos+1);if(33!==t)return!1;const e=this.state.pos;for(this.state.pos+=1;!_i(t)&&++this.state.pos<this.length;)t=this.input.charCodeAt(this.state.pos);const s=this.input.slice(e+2,this.state.pos);return this.finishToken(Mi.interpreterDirective,s),!0}readToken_mult_modulo(t){let e=42===t?Mi.star:Mi.modulo,s=1,r=this.input.charCodeAt(this.state.pos+1);const i=this.state.exprAllowed;42===t&&42===r&&(s++,r=this.input.charCodeAt(this.state.pos+2),e=Mi.exponent),61!==r||i||(s++,e=Mi.assign),this.finishOp(e,s)}readToken_pipe_amp(t){const e=this.input.charCodeAt(this.state.pos+1);if(e!==t){if(124===t){if(62===e)return void this.finishOp(Mi.pipeline,2);if(this.hasPlugin("recordAndTuple")&&125===e){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(this.state.pos,Gi.RecordExpressionBarIncorrectEndSyntaxType);return void this.finishOp(Mi.braceBarR,2)}if(this.hasPlugin("recordAndTuple")&&93===e){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(this.state.pos,Gi.TupleExpressionBarIncorrectEndSyntaxType);return void this.finishOp(Mi.bracketBarR,2)}}61!==e?this.finishOp(124===t?Mi.bitwiseOR:Mi.bitwiseAND,1):this.finishOp(Mi.assign,2)}else 61===this.input.charCodeAt(this.state.pos+2)?this.finishOp(Mi.assign,3):this.finishOp(124===t?Mi.logicalOR:Mi.logicalAND,2)}readToken_caret(){61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(Mi.assign,2):this.finishOp(Mi.bitwiseXOR,1)}readToken_plus_min(t){const e=this.input.charCodeAt(this.state.pos+1);if(e===t)return 45!==e||this.inModule||62!==this.input.charCodeAt(this.state.pos+2)||0!==this.state.lastTokEnd&&!this.hasPrecedingLineBreak()?void this.finishOp(Mi.incDec,2):(this.skipLineComment(3),this.skipSpace(),void this.nextToken());61===e?this.finishOp(Mi.assign,2):this.finishOp(Mi.plusMin,1)}readToken_lt_gt(t){const e=this.input.charCodeAt(this.state.pos+1);let s=1;return e===t?(s=62===t&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+s)?void this.finishOp(Mi.assign,s+1):void this.finishOp(Mi.bitShift,s)):33!==e||60!==t||this.inModule||45!==this.input.charCodeAt(this.state.pos+2)||45!==this.input.charCodeAt(this.state.pos+3)?(61===e&&(s=2),void this.finishOp(Mi.relational,s)):(this.skipLineComment(4),this.skipSpace(),void this.nextToken())}readToken_eq_excl(t){const e=this.input.charCodeAt(this.state.pos+1);if(61!==e)return 61===t&&62===e?(this.state.pos+=2,void this.finishToken(Mi.arrow)):void this.finishOp(61===t?Mi.eq:Mi.bang,1);this.finishOp(Mi.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2)}readToken_question(){const t=this.input.charCodeAt(this.state.pos+1),e=this.input.charCodeAt(this.state.pos+2);63===t?61===e?this.finishOp(Mi.assign,3):this.finishOp(Mi.nullishCoalescing,2):46!==t||e>=48&&e<=57?(++this.state.pos,this.finishToken(Mi.question)):(this.state.pos+=2,this.finishToken(Mi.questionDot))}getTokenFromCode(t){switch(t){case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(Mi.parenL);case 41:return++this.state.pos,void this.finishToken(Mi.parenR);case 59:return++this.state.pos,void this.finishToken(Mi.semi);case 44:return++this.state.pos,void this.finishToken(Mi.comma);case 91:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(this.state.pos,Gi.TupleExpressionBarIncorrectStartSyntaxType);this.finishToken(Mi.bracketBarL),this.state.pos+=2}else++this.state.pos,this.finishToken(Mi.bracketL);return;case 93:return++this.state.pos,void this.finishToken(Mi.bracketR);case 123:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(this.state.pos,Gi.RecordExpressionBarIncorrectStartSyntaxType);this.finishToken(Mi.braceBarL),this.state.pos+=2}else++this.state.pos,this.finishToken(Mi.braceL);return;case 125:return++this.state.pos,void this.finishToken(Mi.braceR);case 58:return void(this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(Mi.doubleColon,2):(++this.state.pos,this.finishToken(Mi.colon)));case 63:return void this.readToken_question();case 96:return++this.state.pos,void this.finishToken(Mi.backQuote);case 48:{const t=this.input.charCodeAt(this.state.pos+1);if(120===t||88===t)return void this.readRadixNumber(16);if(111===t||79===t)return void this.readRadixNumber(8);if(98===t||66===t)return void this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return void this.readNumber(!1);case 34:case 39:return void this.readString(t);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(t);case 124:case 38:return void this.readToken_pipe_amp(t);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(t);case 60:case 62:return void this.readToken_lt_gt(t);case 61:case 33:return void this.readToken_eq_excl(t);case 126:return void this.finishOp(Mi.tilde,1);case 64:return++this.state.pos,void this.finishToken(Mi.at);case 35:return void this.readToken_numberSign();case 92:return void this.readWord();default:if(ia(t))return void this.readWord()}throw this.raise(this.state.pos,Gi.InvalidOrUnexpectedToken,String.fromCodePoint(t))}finishOp(t,e){const s=this.input.slice(this.state.pos,this.state.pos+e);this.state.pos+=e,this.finishToken(t,s)}readRegexp(){const t=this.state.pos;let e,s;for(;;){if(this.state.pos>=this.length)throw this.raise(t,Gi.UnterminatedRegExp);const r=this.input.charAt(this.state.pos);if(Ri.test(r))throw this.raise(t,Gi.UnterminatedRegExp);if(e)e=!1;else{if("["===r)s=!0;else if("]"===r&&s)s=!1;else if("/"===r&&!s)break;e="\\"===r}++this.state.pos}const r=this.input.slice(t,this.state.pos);++this.state.pos;let i="";for(;this.state.pos<this.length;){const t=this.input[this.state.pos],e=this.input.codePointAt(this.state.pos);if(en.has(t))i.indexOf(t)>-1&&this.raise(this.state.pos+1,Gi.DuplicateRegExpFlags);else{if(!aa(e)&&92!==e)break;this.raise(this.state.pos+1,Gi.MalformedRegExpFlags)}++this.state.pos,i+=t}this.finishToken(Mi.regexp,{pattern:r,flags:i})}readInt(t,e,s,r=!0){const i=this.state.pos,a=16===t?sn.hex:sn.decBinOct,n=16===t?rn.hex:10===t?rn.dec:8===t?rn.oct:rn.bin;let o=!1,u=0;for(let i=0,h=null==e?1/0:e;i<h;++i){const e=this.input.charCodeAt(this.state.pos);let h;if(95!==e){if(h=e>=97?e-97+10:e>=65?e-65+10:tn(e)?e-48:1/0,h>=t)if(this.options.errorRecovery&&h<=9)h=0,this.raise(this.state.start+i+2,Gi.InvalidDigit,t);else{if(!s)break;h=0,o=!0}++this.state.pos,u=u*t+h}else{const t=this.input.charCodeAt(this.state.pos-1),e=this.input.charCodeAt(this.state.pos+1);(-1===n.indexOf(e)||a.indexOf(t)>-1||a.indexOf(e)>-1||Number.isNaN(e))&&this.raise(this.state.pos,Gi.UnexpectedNumericSeparator),r||this.raise(this.state.pos,Gi.NumericSeparatorInEscapeSequence),++this.state.pos}}return this.state.pos===i||null!=e&&this.state.pos-i!==e||o?null:u}readRadixNumber(t){const e=this.state.pos;let s=!1;this.state.pos+=2;const r=this.readInt(t);null==r&&this.raise(this.state.start+2,Gi.InvalidDigit,t);const i=this.input.charCodeAt(this.state.pos);if(110===i)++this.state.pos,s=!0;else if(109===i)throw this.raise(e,Gi.InvalidDecimal);if(ia(this.input.codePointAt(this.state.pos)))throw this.raise(this.state.pos,Gi.NumberIdentifier);if(s){const t=this.input.slice(e,this.state.pos).replace(/[_n]/g,"");this.finishToken(Mi.bigint,t)}else this.finishToken(Mi.num,r)}readNumber(t){const e=this.state.pos;let s=!1,r=!1,i=!1,a=!1,n=!1;t||null!==this.readInt(10)||this.raise(e,Gi.InvalidNumber);const o=this.state.pos-e>=2&&48===this.input.charCodeAt(e);if(o){const t=this.input.slice(e,this.state.pos);if(this.recordStrictModeErrors(e,Gi.StrictOctalLiteral),!this.state.strict){const s=t.indexOf("_");s>0&&this.raise(s+e,Gi.ZeroDigitNumericSeparator)}n=o&&!/[89]/.test(t)}let u=this.input.charCodeAt(this.state.pos);if(46!==u||n||(++this.state.pos,this.readInt(10),s=!0,u=this.input.charCodeAt(this.state.pos)),69!==u&&101!==u||n||(u=this.input.charCodeAt(++this.state.pos),43!==u&&45!==u||++this.state.pos,null===this.readInt(10)&&this.raise(e,Gi.InvalidOrMissingExponent),s=!0,a=!0,u=this.input.charCodeAt(this.state.pos)),110===u&&((s||o)&&this.raise(e,Gi.InvalidBigIntLiteral),++this.state.pos,r=!0),109===u&&(this.expectPlugin("decimal",this.state.pos),(a||o)&&this.raise(e,Gi.InvalidDecimal),++this.state.pos,i=!0),ia(this.input.codePointAt(this.state.pos)))throw this.raise(this.state.pos,Gi.NumberIdentifier);const h=this.input.slice(e,this.state.pos).replace(/[_mn]/g,"");if(r)return void this.finishToken(Mi.bigint,h);if(i)return void this.finishToken(Mi.decimal,h);const c=n?parseInt(h,8):parseFloat(h);this.finishToken(Mi.num,c)}readCodePoint(t){let e;if(123===this.input.charCodeAt(this.state.pos)){const s=++this.state.pos;if(e=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos,!0,t),++this.state.pos,null!==e&&e>1114111){if(!t)return null;this.raise(s,Gi.InvalidCodePoint)}}else e=this.readHexChar(4,!1,t);return e}readString(t){let e="",s=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,Gi.UnterminatedString);const r=this.input.charCodeAt(this.state.pos);if(r===t)break;if(92===r)e+=this.input.slice(s,this.state.pos),e+=this.readEscapedChar(!1),s=this.state.pos;else if(8232===r||8233===r)++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;else{if(_i(r))throw this.raise(this.state.start,Gi.UnterminatedString);++this.state.pos}}e+=this.input.slice(s,this.state.pos++),this.finishToken(Mi.string,e)}readTmplToken(){let t="",e=this.state.pos,s=!1;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,Gi.UnterminatedTemplate);const r=this.input.charCodeAt(this.state.pos);if(96===r||36===r&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(Mi.template)?36===r?(this.state.pos+=2,void this.finishToken(Mi.dollarBraceL)):(++this.state.pos,void this.finishToken(Mi.backQuote)):(t+=this.input.slice(e,this.state.pos),void this.finishToken(Mi.template,s?null:t));if(92===r){t+=this.input.slice(e,this.state.pos);const r=this.readEscapedChar(!0);null===r?s=!0:t+=r,e=this.state.pos}else if(_i(r)){switch(t+=this.input.slice(e,this.state.pos),++this.state.pos,r){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(r)}++this.state.curLine,this.state.lineStart=this.state.pos,e=this.state.pos}else++this.state.pos}}recordStrictModeErrors(t,e){this.state.strict&&!this.state.strictErrors.has(t)?this.raise(t,e):this.state.strictErrors.set(t,e)}readEscapedChar(t){const e=!t,s=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,s){case 110:return"\n";case 114:return"\r";case 120:{const t=this.readHexChar(2,!1,e);return null===t?null:String.fromCharCode(t)}case 117:{const t=this.readCodePoint(e);return null===t?null:String.fromCodePoint(t)}case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:this.state.lineStart=this.state.pos,++this.state.curLine;case 8232:case 8233:return"";case 56:case 57:if(t)return null;this.recordStrictModeErrors(this.state.pos-1,Gi.StrictNumericEscape);default:if(s>=48&&s<=55){const e=this.state.pos-1;let s=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);r>255&&(s=s.slice(0,-1),r=parseInt(s,8)),this.state.pos+=s.length-1;const i=this.input.charCodeAt(this.state.pos);if("0"!==s||56===i||57===i){if(t)return null;this.recordStrictModeErrors(e,Gi.StrictNumericEscape)}return String.fromCharCode(r)}return String.fromCharCode(s)}}readHexChar(t,e,s){const r=this.state.pos,i=this.readInt(16,t,e,!1);return null===i&&(s?this.raise(r,Gi.InvalidEscapeSequence):this.state.pos=r-1),i}readWord1(){let t="";this.state.containsEsc=!1;const e=this.state.pos;let s=this.state.pos;for(;this.state.pos<this.length;){const r=this.input.codePointAt(this.state.pos);if(aa(r))this.state.pos+=r<=65535?1:2;else if(this.state.isIterator&&64===r)++this.state.pos;else{if(92!==r)break;{this.state.containsEsc=!0,t+=this.input.slice(s,this.state.pos);const r=this.state.pos,i=this.state.pos===e?ia:aa;if(117!==this.input.charCodeAt(++this.state.pos)){this.raise(this.state.pos,Gi.MissingUnicodeEscape);continue}++this.state.pos;const a=this.readCodePoint(!0);null!==a&&(i(a)||this.raise(r,Gi.EscapedCharNotAnIdentifier),t+=String.fromCodePoint(a)),s=this.state.pos}}}return t+this.input.slice(s,this.state.pos)}isIterator(t){return"@@iterator"===t||"@@asyncIterator"===t}readWord(){const t=this.readWord1(),e=ki.get(t)||Mi.name;!this.state.isIterator||this.isIterator(t)&&this.state.inType||this.raise(this.state.pos,Gi.InvalidIdentifier,t),this.finishToken(e,t)}checkKeywordEscapes(){const t=this.state.type.keyword;t&&this.state.containsEsc&&this.raise(this.state.start,Gi.InvalidEscapedReservedWord,t)}braceIsBlock(t){const e=this.curContext();return e===$i.functionExpression||e===$i.functionStatement||(t!==Mi.colon||e!==$i.braceStatement&&e!==$i.braceExpression?t===Mi._return||t===Mi.name&&this.state.exprAllowed?this.hasPrecedingLineBreak():t===Mi._else||t===Mi.semi||t===Mi.eof||t===Mi.parenR||t===Mi.arrow||(t===Mi.braceL?e===$i.braceStatement:t!==Mi._var&&t!==Mi._const&&t!==Mi.name&&(t===Mi.relational||!this.state.exprAllowed)):!e.isExpr)}updateContext(t){const e=this.state.type;let s;!e.keyword||t!==Mi.dot&&t!==Mi.questionDot?(s=e.updateContext)?s.call(this,t):this.state.exprAllowed=e.beforeExpr:this.state.exprAllowed=!1}}{addExtra(t,e,s){if(!t)return;(t.extra=t.extra||{})[e]=s}isRelational(t){return this.match(Mi.relational)&&this.state.value===t}expectRelational(t){this.isRelational(t)?this.next():this.unexpected(null,Mi.relational)}isContextual(t){return this.match(Mi.name)&&this.state.value===t&&!this.state.containsEsc}isUnparsedContextual(t,e){const s=t+e.length;return this.input.slice(t,s)===e&&(s===this.input.length||!aa(this.input.charCodeAt(s)))}isLookaheadContextual(t){const e=this.nextTokenStart();return this.isUnparsedContextual(e,t)}eatContextual(t){return this.isContextual(t)&&this.eat(Mi.name)}expectContextual(t,e){this.eatContextual(t)||this.unexpected(null,e)}canInsertSemicolon(){return this.match(Mi.eof)||this.match(Mi.braceR)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return Ri.test(this.input.slice(this.state.lastTokEnd,this.state.start))}hasFollowingLineBreak(){return Ri.test(this.input.slice(this.state.end,this.nextTokenStart()))}isLineTerminator(){return this.eat(Mi.semi)||this.canInsertSemicolon()}semicolon(t=!0){(t?this.isLineTerminator():this.eat(Mi.semi))||this.raise(this.state.lastTokEnd,Gi.MissingSemicolon)}expect(t,e){this.eat(t)||this.unexpected(e,t)}assertNoSpace(t="Unexpected space."){this.state.start>this.state.lastTokEnd&&this.raise(this.state.lastTokEnd,{code:Wi.SyntaxError,reasonCode:"UnexpectedSpace",template:t})}unexpected(t,e={code:Wi.SyntaxError,reasonCode:"UnexpectedToken",template:"Unexpected token"}){throw e instanceof vi&&(e={code:Wi.SyntaxError,reasonCode:"UnexpectedToken",template:'Unexpected token, expected "'.concat(e.label,'"')}),this.raise(null!=t?t:this.state.start,e)}expectPlugin(t,e){if(!this.hasPlugin(t))throw this.raiseWithData(null!=e?e:this.state.start,{missingPlugin:[t]},"This experimental syntax requires enabling the parser plugin: '".concat(t,"'"));return!0}expectOnePlugin(t,e){if(!t.some((t=>this.hasPlugin(t))))throw this.raiseWithData(null!=e?e:this.state.start,{missingPlugin:t},"This experimental syntax requires enabling one of the following parser plugin(s): '".concat(t.join(", "),"'"))}tryParse(t,e=this.state.clone()){const s={node:null};try{const r=t(((t=null)=>{throw s.node=t,s}));if(this.state.errors.length>e.errors.length){const t=this.state;return this.state=e,{node:r,error:t.errors[e.errors.length],thrown:!1,aborted:!1,failState:t}}return{node:r,error:null,thrown:!1,aborted:!1,failState:null}}catch(t){const r=this.state;if(this.state=e,t instanceof SyntaxError)return{node:null,error:t,thrown:!0,aborted:!1,failState:r};if(t===s)return{node:s.node,error:null,thrown:!1,aborted:!0,failState:r};throw t}}checkExpressionErrors(t,e){if(!t)return!1;const{shorthandAssign:s,doubleProto:r}=t;if(!e)return s>=0||r>=0;s>=0&&this.unexpected(s),r>=0&&this.raise(r,Gi.DuplicateProto)}isLiteralPropertyName(){return this.match(Mi.name)||!!this.state.type.keyword||this.match(Mi.string)||this.match(Mi.num)||this.match(Mi.bigint)||this.match(Mi.decimal)}isPrivateName(t){return"PrivateName"===t.type}getPrivateNameSV(t){return t.id.name}hasPropertyAsPrivateName(t){return("MemberExpression"===t.type||"OptionalMemberExpression"===t.type)&&this.isPrivateName(t.property)}isOptionalChain(t){return"OptionalMemberExpression"===t.type||"OptionalCallExpression"===t.type}isObjectProperty(t){return"ObjectProperty"===t.type}isObjectMethod(t){return"ObjectMethod"===t.type}initializeScopes(t="module"===this.options.sourceType){const e=this.state.labels;this.state.labels=[];const s=this.state.exportedIdentifiers;this.state.exportedIdentifiers=[];const r=this.inModule;this.inModule=t;const i=this.scope,a=this.getScopeHandler();this.scope=new a(this.raise.bind(this),this.inModule);const n=this.prodParam;this.prodParam=new _a;const o=this.classScope;this.classScope=new on(this.raise.bind(this));const u=this.expressionScope;return this.expressionScope=new cn(this.raise.bind(this)),()=>{this.state.labels=e,this.state.exportedIdentifiers=s,this.inModule=r,this.scope=i,this.prodParam=n,this.classScope=o,this.expressionScope=u}}enterInitialScopes(){let t=0;this.hasPlugin("topLevelAwait")&&this.inModule&&(t|=2),this.scope.enter(1),this.prodParam.enter(t)}}{startNode(){return new dn(this,this.state.start,this.state.startLoc)}startNodeAt(t,e){return new dn(this,t,e)}startNodeAtNode(t){return this.startNodeAt(t.start,t.loc.start)}finishNode(t,e){return this.finishNodeAt(t,e,this.state.lastTokEnd,this.state.lastTokEndLoc)}finishNodeAt(t,e,s,r){return t.type=e,t.end=s,t.loc.end=r,this.options.ranges&&(t.range[1]=s),this.processComment(t),t}resetStartLocation(t,e,s){t.start=e,t.loc.start=s,this.options.ranges&&(t.range[0]=e)}resetEndLocation(t,e=this.state.lastTokEnd,s=this.state.lastTokEndLoc){t.end=e,t.loc.end=s,this.options.ranges&&(t.range[1]=e)}resetStartLocationFromNode(t,e){this.resetStartLocation(t,e.start,e.loc.start)}}{toAssignable(t,e=!1){var s,r;let i;switch(("ParenthesizedExpression"===t.type||null!=(s=t.extra)&&s.parenthesized)&&(i=Dn(t),e?"Identifier"===i.type?this.expressionScope.recordParenthesizedIdentifierError(t.start,Gi.InvalidParenthesizedAssignment):"MemberExpression"!==i.type&&this.raise(t.start,Gi.InvalidParenthesizedAssignment):this.raise(t.start,Gi.InvalidParenthesizedAssignment)),t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":t.type="ObjectPattern";for(let s=0,r=t.properties.length,i=r-1;s<r;s++){var a;const r=t.properties[s],n=s===i;this.toAssignableObjectExpressionProp(r,n,e),n&&"RestElement"===r.type&&null!=(a=t.extra)&&a.trailingComma&&this.raiseRestNotLast(t.extra.trailingComma)}break;case"ObjectProperty":this.toAssignable(t.value,e);break;case"SpreadElement":{this.checkToRestConversion(t),t.type="RestElement";const s=t.argument;this.toAssignable(s,e);break}case"ArrayExpression":t.type="ArrayPattern",this.toAssignableList(t.elements,null==(r=t.extra)?void 0:r.trailingComma,e);break;case"AssignmentExpression":"="!==t.operator&&this.raise(t.left.end,Gi.MissingEqInAssignment),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(i,e)}return t}toAssignableObjectExpressionProp(t,e,s){if("ObjectMethod"===t.type){const e="get"===t.kind||"set"===t.kind?Gi.PatternHasAccessor:Gi.PatternHasMethod;this.raise(t.key.start,e)}else"SpreadElement"!==t.type||e?this.toAssignable(t,s):this.raiseRestNotLast(t.start)}toAssignableList(t,e,s){let r=t.length;if(r){const i=t[r-1];if("RestElement"===(null==i?void 0:i.type))--r;else if("SpreadElement"===(null==i?void 0:i.type)){i.type="RestElement";let t=i.argument;this.toAssignable(t,s),t=Dn(t),"Identifier"!==t.type&&"MemberExpression"!==t.type&&"ArrayPattern"!==t.type&&"ObjectPattern"!==t.type&&this.unexpected(t.start),e&&this.raiseTrailingCommaAfterRest(e),--r}}for(let e=0;e<r;e++){const r=t[e];r&&(this.toAssignable(r,s),"RestElement"===r.type&&this.raiseRestNotLast(r.start))}return t}toReferencedList(t,e){return t}toReferencedListDeep(t,e){this.toReferencedList(t,e);for(const e of t)"ArrayExpression"===(null==e?void 0:e.type)&&this.toReferencedListDeep(e.elements)}parseSpread(t,e){const s=this.startNode();return this.next(),s.argument=this.parseMaybeAssignAllowIn(t,void 0,e),this.finishNode(s,"SpreadElement")}parseRestBinding(){const t=this.startNode();return this.next(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")}parseBindingAtom(){switch(this.state.type){case Mi.bracketL:{const t=this.startNode();return this.next(),t.elements=this.parseBindingList(Mi.bracketR,93,!0),this.finishNode(t,"ArrayPattern")}case Mi.braceL:return this.parseObjectLike(Mi.braceR,!0)}return this.parseIdentifier()}parseBindingList(t,e,s,r){const i=[];let a=!0;for(;!this.eat(t);)if(a?a=!1:this.expect(Mi.comma),s&&this.match(Mi.comma))i.push(null);else{if(this.eat(t))break;if(this.match(Mi.ellipsis)){i.push(this.parseAssignableListItemTypes(this.parseRestBinding())),this.checkCommaAfterRest(e),this.expect(t);break}{const t=[];for(this.match(Mi.at)&&this.hasPlugin("decorators")&&this.raise(this.state.start,Gi.UnsupportedParameterDecorator);this.match(Mi.at);)t.push(this.parseDecorator());i.push(this.parseAssignableListItem(r,t))}}return i}parseAssignableListItem(t,e){const s=this.parseMaybeDefault();this.parseAssignableListItemTypes(s);const r=this.parseMaybeDefault(s.start,s.loc.start,s);return e.length&&(s.decorators=e),r}parseAssignableListItemTypes(t){return t}parseMaybeDefault(t,e,s){var r,i,a;if(e=null!=(r=e)?r:this.state.startLoc,t=null!=(i=t)?i:this.state.start,s=null!=(a=s)?a:this.parseBindingAtom(),!this.eat(Mi.eq))return s;const n=this.startNodeAt(t,e);return n.left=s,n.right=this.parseMaybeAssignAllowIn(),this.finishNode(n,"AssignmentPattern")}checkLVal(t,e,s=64,r,i,a=!1){switch(t.type){case"Identifier":{const{name:e}=t;this.state.strict&&(a?Da(e,this.inModule):da(e))&&this.raise(t.start,64===s?Gi.StrictEvalArguments:Gi.StrictEvalArgumentsBinding,e),r&&(r.has(e)?this.raise(t.start,Gi.ParamDupe):r.add(e)),i&&"let"===e&&this.raise(t.start,Gi.LetInLexicalBinding),64&s||this.scope.declareName(e,s,t.start);break}case"MemberExpression":64!==s&&this.raise(t.start,Gi.InvalidPropertyBindingPattern);break;case"ObjectPattern":for(let e of t.properties){if(this.isObjectProperty(e))e=e.value;else if(this.isObjectMethod(e))continue;this.checkLVal(e,"object destructuring pattern",s,r,i)}break;case"ArrayPattern":for(const e of t.elements)e&&this.checkLVal(e,"array destructuring pattern",s,r,i);break;case"AssignmentPattern":this.checkLVal(t.left,"assignment pattern",s,r);break;case"RestElement":this.checkLVal(t.argument,"rest element",s,r);break;case"ParenthesizedExpression":this.checkLVal(t.expression,"parenthesized expression",s,r);break;default:this.raise(t.start,64===s?Gi.InvalidLhs:Gi.InvalidLhsBinding,e)}}checkToRestConversion(t){"Identifier"!==t.argument.type&&"MemberExpression"!==t.argument.type&&this.raise(t.argument.start,Gi.InvalidRestAssignmentPattern)}checkCommaAfterRest(t){this.match(Mi.comma)&&(this.lookaheadCharCode()===t?this.raiseTrailingCommaAfterRest(this.state.start):this.raiseRestNotLast(this.state.start))}raiseRestNotLast(t){throw this.raise(t,Gi.ElementAfterRest)}raiseTrailingCommaAfterRest(t){this.raise(t,Gi.RestTrailingComma)}}{checkProto(t,e,s,r){if("SpreadElement"===t.type||this.isObjectMethod(t)||t.computed||t.shorthand)return;const i=t.key;if("__proto__"===("Identifier"===i.type?i.name:i.value)){if(e)return void this.raise(i.start,Gi.RecordNoProto);s.used&&(r?-1===r.doubleProto&&(r.doubleProto=i.start):this.raise(i.start,Gi.DuplicateProto)),s.used=!0}}shouldExitDescending(t,e){return"ArrowFunctionExpression"===t.type&&t.start===e}getExpression(){let t=0;this.hasPlugin("topLevelAwait")&&this.inModule&&(t|=2),this.scope.enter(1),this.prodParam.enter(t),this.nextToken();const e=this.parseExpression();return this.match(Mi.eof)||this.unexpected(),e.comments=this.state.comments,e.errors=this.state.errors,this.options.tokens&&(e.tokens=this.tokens),e}parseExpression(t,e){return t?this.disallowInAnd((()=>this.parseExpressionBase(e))):this.allowInAnd((()=>this.parseExpressionBase(e)))}parseExpressionBase(t){const e=this.state.start,s=this.state.startLoc,r=this.parseMaybeAssign(t);if(this.match(Mi.comma)){const i=this.startNodeAt(e,s);for(i.expressions=[r];this.eat(Mi.comma);)i.expressions.push(this.parseMaybeAssign(t));return this.toReferencedList(i.expressions),this.finishNode(i,"SequenceExpression")}return r}parseMaybeAssignDisallowIn(t,e,s){return this.disallowInAnd((()=>this.parseMaybeAssign(t,e,s)))}parseMaybeAssignAllowIn(t,e,s){return this.allowInAnd((()=>this.parseMaybeAssign(t,e,s)))}parseMaybeAssign(t,e,s){const r=this.state.start,i=this.state.startLoc;if(this.isContextual("yield")&&this.prodParam.hasYield){this.state.exprAllowed=!0;let t=this.parseYield();return e&&(t=e.call(this,t,r,i)),t}let a;t?a=!1:(t=new ln,a=!0),(this.match(Mi.parenL)||this.match(Mi.name))&&(this.state.potentialArrowAt=this.state.start);let n=this.parseMaybeConditional(t,s);if(e&&(n=e.call(this,n,r,i)),this.state.type.isAssign){const e=this.startNodeAt(r,i),s=this.state.value;return e.operator=s,this.match(Mi.eq)?(e.left=this.toAssignable(n,!0),t.doubleProto=-1):e.left=n,t.shorthandAssign>=e.left.start&&(t.shorthandAssign=-1),this.checkLVal(n,"assignment expression"),this.next(),e.right=this.parseMaybeAssign(),this.finishNode(e,"AssignmentExpression")}return a&&this.checkExpressionErrors(t,!0),n}parseMaybeConditional(t,e){const s=this.state.start,r=this.state.startLoc,i=this.state.potentialArrowAt,a=this.parseExprOps(t);return this.shouldExitDescending(a,i)?a:this.parseConditional(a,s,r,e)}parseConditional(t,e,s,r){if(this.eat(Mi.question)){const r=this.startNodeAt(e,s);return r.test=t,r.consequent=this.parseMaybeAssignAllowIn(),this.expect(Mi.colon),r.alternate=this.parseMaybeAssign(),this.finishNode(r,"ConditionalExpression")}return t}parseExprOps(t){const e=this.state.start,s=this.state.startLoc,r=this.state.potentialArrowAt,i=this.parseMaybeUnary(t);return this.shouldExitDescending(i,r)?i:this.parseExprOp(i,e,s,-1)}parseExprOp(t,e,s,r){let i=this.state.type.binop;if(null!=i&&(this.prodParam.hasIn||!this.match(Mi._in))&&i>r){const a=this.state.type;if(a===Mi.pipeline){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return t;this.state.inPipeline=!0,this.checkPipelineAtInfixOperator(t,e)}const n=this.startNodeAt(e,s);n.left=t,n.operator=this.state.value;const o=a===Mi.logicalOR||a===Mi.logicalAND,u=a===Mi.nullishCoalescing;if(u&&(i=Mi.logicalAND.binop),this.next(),a===Mi.pipeline&&"minimal"===this.getPluginOption("pipelineOperator","proposal")&&this.match(Mi.name)&&"await"===this.state.value&&this.prodParam.hasAwait)throw this.raise(this.state.start,Gi.UnexpectedAwaitAfterPipelineBody);n.right=this.parseExprOpRightExpr(a,i),this.finishNode(n,o||u?"LogicalExpression":"BinaryExpression");const h=this.state.type;if(u&&(h===Mi.logicalOR||h===Mi.logicalAND)||o&&h===Mi.nullishCoalescing)throw this.raise(this.state.start,Gi.MixingCoalesceWithLogical);return this.parseExprOp(n,e,s,r)}return t}parseExprOpRightExpr(t,e){const s=this.state.start,r=this.state.startLoc;switch(t){case Mi.pipeline:switch(this.getPluginOption("pipelineOperator","proposal")){case"smart":return this.withTopicPermittingContext((()=>this.parseSmartPipelineBody(this.parseExprOpBaseRightExpr(t,e),s,r)));case"fsharp":return this.withSoloAwaitPermittingContext((()=>this.parseFSharpPipelineBody(e)))}default:return this.parseExprOpBaseRightExpr(t,e)}}parseExprOpBaseRightExpr(t,e){const s=this.state.start,r=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnary(),s,r,t.rightAssociative?e-1:e)}checkExponentialAfterUnary(t){this.match(Mi.exponent)&&this.raise(t.argument.start,Gi.UnexpectedTokenUnaryExponentiation)}parseMaybeUnary(t,e){const s=this.state.start,r=this.state.startLoc,i=this.isContextual("await");if(i&&this.isAwaitAllowed()){this.next();const t=this.parseAwait(s,r);return e||this.checkExponentialAfterUnary(t),t}if(this.isContextual("module")&&123===this.lookaheadCharCode()&&!this.hasFollowingLineBreak())return this.parseModuleExpression();const a=this.match(Mi.incDec),n=this.startNode();if(this.state.type.prefix){n.operator=this.state.value,n.prefix=!0,this.match(Mi._throw)&&this.expectPlugin("throwExpressions");const s=this.match(Mi._delete);if(this.next(),n.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),this.state.strict&&s){const t=n.argument;"Identifier"===t.type?this.raise(n.start,Gi.StrictDelete):this.hasPropertyAsPrivateName(t)&&this.raise(n.start,Gi.DeletePrivateField)}if(!a)return e||this.checkExponentialAfterUnary(n),this.finishNode(n,"UnaryExpression")}const o=this.parseUpdate(n,a,t);if(i){if((this.hasPlugin("v8intrinsic")?this.state.type.startsExpr:this.state.type.startsExpr&&!this.match(Mi.modulo))&&!this.isAmbiguousAwait())return this.raiseOverwrite(s,this.hasPlugin("topLevelAwait")?Gi.AwaitNotInAsyncContext:Gi.AwaitNotInAsyncFunction),this.parseAwait(s,r)}return o}parseUpdate(t,e,s){if(e)return this.checkLVal(t.argument,"prefix operation"),this.finishNode(t,"UpdateExpression");const r=this.state.start,i=this.state.startLoc;let a=this.parseExprSubscripts(s);if(this.checkExpressionErrors(s,!1))return a;for(;this.state.type.postfix&&!this.canInsertSemicolon();){const t=this.startNodeAt(r,i);t.operator=this.state.value,t.prefix=!1,t.argument=a,this.checkLVal(a,"postfix operation"),this.next(),a=this.finishNode(t,"UpdateExpression")}return a}parseExprSubscripts(t){const e=this.state.start,s=this.state.startLoc,r=this.state.potentialArrowAt,i=this.parseExprAtom(t);return this.shouldExitDescending(i,r)?i:this.parseSubscripts(i,e,s)}parseSubscripts(t,e,s,r){const i={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(t),stop:!1};do{t=this.parseSubscript(t,e,s,r,i),i.maybeAsyncArrow=!1}while(!i.stop);return t}parseSubscript(t,e,s,r,i){if(!r&&this.eat(Mi.doubleColon))return this.parseBind(t,e,s,r,i);if(this.match(Mi.backQuote))return this.parseTaggedTemplateExpression(t,e,s,i);let a=!1;if(this.match(Mi.questionDot)){if(r&&40===this.lookaheadCharCode())return i.stop=!0,t;i.optionalChainMember=a=!0,this.next()}return!r&&this.match(Mi.parenL)?this.parseCoverCallAndAsyncArrowHead(t,e,s,i,a):a||this.match(Mi.bracketL)||this.eat(Mi.dot)?this.parseMember(t,e,s,i,a):(i.stop=!0,t)}parseMember(t,e,s,r,i){const a=this.startNodeAt(e,s),n=this.eat(Mi.bracketL);a.object=t,a.computed=n;const o=n?this.parseExpression():this.parseMaybePrivateName(!0);return this.isPrivateName(o)&&("Super"===a.object.type&&this.raise(e,Gi.SuperPrivateField),this.classScope.usePrivateName(this.getPrivateNameSV(o),o.start)),a.property=o,n&&this.expect(Mi.bracketR),r.optionalChainMember?(a.optional=i,this.finishNode(a,"OptionalMemberExpression")):this.finishNode(a,"MemberExpression")}parseBind(t,e,s,r,i){const a=this.startNodeAt(e,s);return a.object=t,a.callee=this.parseNoCallExpr(),i.stop=!0,this.parseSubscripts(this.finishNode(a,"BindExpression"),e,s,r)}parseCoverCallAndAsyncArrowHead(t,e,s,r,i){const a=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0,this.next();let n=this.startNodeAt(e,s);return n.callee=t,r.maybeAsyncArrow&&this.expressionScope.enter(new hn(2)),r.optionalChainMember&&(n.optional=i),n.arguments=i?this.parseCallExpressionArguments(Mi.parenR,!1):this.parseCallExpressionArguments(Mi.parenR,r.maybeAsyncArrow,"Import"===t.type,"Super"!==t.type,n),this.finishCallExpression(n,r.optionalChainMember),r.maybeAsyncArrow&&this.shouldParseAsyncArrow()&&!i?(r.stop=!0,this.expressionScope.validateAsPattern(),this.expressionScope.exit(),n=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e,s),n)):(r.maybeAsyncArrow&&this.expressionScope.exit(),this.toReferencedArguments(n)),this.state.maybeInArrowParameters=a,n}toReferencedArguments(t,e){this.toReferencedListDeep(t.arguments,e)}parseTaggedTemplateExpression(t,e,s,r){const i=this.startNodeAt(e,s);return i.tag=t,i.quasi=this.parseTemplate(!0),r.optionalChainMember&&this.raise(e,Gi.OptionalChainingNoTemplate),this.finishNode(i,"TaggedTemplateExpression")}atPossibleAsyncArrow(t){return"Identifier"===t.type&&"async"===t.name&&this.state.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start==5&&t.start===this.state.potentialArrowAt}finishCallExpression(t,e){if("Import"===t.callee.type)if(2===t.arguments.length&&(this.hasPlugin("moduleAttributes")||this.expectPlugin("importAssertions")),0===t.arguments.length||t.arguments.length>2)this.raise(t.start,Gi.ImportCallArity,this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?"one or two arguments":"one argument");else for(const e of t.arguments)"SpreadElement"===e.type&&this.raise(e.start,Gi.ImportCallSpreadArgument);return this.finishNode(t,e?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(t,e,s,r,i){const a=[];let n=!0;const o=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(t);){if(n)n=!1;else if(this.expect(Mi.comma),this.match(t)){!s||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")||this.raise(this.state.lastTokStart,Gi.ImportCallArgumentTrailingComma),i&&this.addExtra(i,"trailingComma",this.state.lastTokStart),this.next();break}a.push(this.parseExprListItem(!1,e?new ln:void 0,e?{start:0}:void 0,r))}return this.state.inFSharpPipelineDirectBody=o,a}shouldParseAsyncArrow(){return this.match(Mi.arrow)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(t,e){var s;return this.expect(Mi.arrow),this.parseArrowExpression(t,e.arguments,!0,null==(s=e.extra)?void 0:s.trailingComma),t}parseNoCallExpr(){const t=this.state.start,e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,e,!0)}parseExprAtom(t){this.state.type===Mi.slash&&this.readRegexp();const e=this.state.potentialArrowAt===this.state.start;let s;switch(this.state.type){case Mi._super:return this.parseSuper();case Mi._import:return s=this.startNode(),this.next(),this.match(Mi.dot)?this.parseImportMetaProperty(s):(this.match(Mi.parenL)||this.raise(this.state.lastTokStart,Gi.UnsupportedImport),this.finishNode(s,"Import"));case Mi._this:return s=this.startNode(),this.next(),this.finishNode(s,"ThisExpression");case Mi.name:{const t=this.state.containsEsc,s=this.parseIdentifier();if(!t&&"async"===s.name&&!this.canInsertSemicolon()){if(this.match(Mi._function)){const t=this.state.context.length-1;if(this.state.context[t]!==$i.functionStatement)throw new Error("Internal error");return this.state.context[t]=$i.functionExpression,this.next(),this.parseFunction(this.startNodeAtNode(s),void 0,!0)}if(this.match(Mi.name))return 61===this.lookaheadCharCode()?this.parseAsyncArrowUnaryFunction(s):s;if(this.match(Mi._do))return this.parseDo(!0)}return e&&this.match(Mi.arrow)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(s),[s],!1)):s}case Mi._do:return this.parseDo(!1);case Mi.regexp:{const t=this.state.value;return s=this.parseLiteral(t.value,"RegExpLiteral"),s.pattern=t.pattern,s.flags=t.flags,s}case Mi.num:return this.parseLiteral(this.state.value,"NumericLiteral");case Mi.bigint:return this.parseLiteral(this.state.value,"BigIntLiteral");case Mi.decimal:return this.parseLiteral(this.state.value,"DecimalLiteral");case Mi.string:return this.parseLiteral(this.state.value,"StringLiteral");case Mi._null:return s=this.startNode(),this.next(),this.finishNode(s,"NullLiteral");case Mi._true:case Mi._false:return this.parseBooleanLiteral();case Mi.parenL:return this.parseParenAndDistinguishExpression(e);case Mi.bracketBarL:case Mi.bracketHashL:return this.parseArrayLike(this.state.type===Mi.bracketBarL?Mi.bracketBarR:Mi.bracketR,!1,!0,t);case Mi.bracketL:return this.parseArrayLike(Mi.bracketR,!0,!1,t);case Mi.braceBarL:case Mi.braceHashL:return this.parseObjectLike(this.state.type===Mi.braceBarL?Mi.braceBarR:Mi.braceR,!1,!0,t);case Mi.braceL:return this.parseObjectLike(Mi.braceR,!1,!1,t);case Mi._function:return this.parseFunctionOrFunctionSent();case Mi.at:this.parseDecorators();case Mi._class:return s=this.startNode(),this.takeDecorators(s),this.parseClass(s,!1);case Mi._new:return this.parseNewOrNewTarget();case Mi.backQuote:return this.parseTemplate(!1);case Mi.doubleColon:{s=this.startNode(),this.next(),s.object=null;const t=s.callee=this.parseNoCallExpr();if("MemberExpression"===t.type)return this.finishNode(s,"BindExpression");throw this.raise(t.start,Gi.UnsupportedBind)}case Mi.hash:{if(this.state.inPipeline)return s=this.startNode(),"smart"!==this.getPluginOption("pipelineOperator","proposal")&&this.raise(s.start,Gi.PrimaryTopicRequiresSmartPipeline),this.next(),this.primaryTopicReferenceIsAllowedInCurrentTopicContext()||this.raise(s.start,Gi.PrimaryTopicNotAllowed),this.registerTopicReference(),this.finishNode(s,"PipelinePrimaryTopicReference");const t=this.input.codePointAt(this.state.end);if(ia(t)||92===t){const t=this.state.start;if(s=this.parseMaybePrivateName(!0),this.match(Mi._in))this.expectPlugin("privateIn"),this.classScope.usePrivateName(this.getPrivateNameSV(s),s.start);else{if(!this.hasPlugin("privateIn"))throw this.unexpected(t);this.raise(this.state.start,Gi.PrivateInExpectedIn,this.getPrivateNameSV(s))}return s}}case Mi.relational:if("<"===this.state.value){const t=this.input.codePointAt(this.nextTokenStart());(ia(t)||62===t)&&this.expectOnePlugin(["jsx","flow","typescript"])}default:throw this.unexpected()}}parseAsyncArrowUnaryFunction(t){const e=this.startNodeAtNode(t);this.prodParam.enter(Ua(!0,this.prodParam.hasYield));const s=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(this.state.pos,Gi.LineTerminatorBeforeArrow),this.expect(Mi.arrow),this.parseArrowExpression(e,s,!0),e}parseDo(t){this.expectPlugin("doExpressions"),t&&this.expectPlugin("asyncDoExpressions");const e=this.startNode();e.async=t,this.next();const s=this.state.labels;return this.state.labels=[],t?(this.prodParam.enter(2),e.body=this.parseBlock(),this.prodParam.exit()):e.body=this.parseBlock(),this.state.labels=s,this.finishNode(e,"DoExpression")}parseSuper(){const t=this.startNode();return this.next(),!this.match(Mi.parenL)||this.scope.allowDirectSuper||this.options.allowSuperOutsideMethod?this.scope.allowSuper||this.options.allowSuperOutsideMethod||this.raise(t.start,Gi.UnexpectedSuper):this.raise(t.start,Gi.SuperNotAllowed),this.match(Mi.parenL)||this.match(Mi.bracketL)||this.match(Mi.dot)||this.raise(t.start,Gi.UnsupportedSuper),this.finishNode(t,"Super")}parseBooleanLiteral(){const t=this.startNode();return t.value=this.match(Mi._true),this.next(),this.finishNode(t,"BooleanLiteral")}parseMaybePrivateName(t){if(this.match(Mi.hash)){t||this.raise(this.state.pos,Gi.UnexpectedPrivateField);const e=this.startNode();return this.next(),this.assertNoSpace("Unexpected space between # and identifier"),e.id=this.parseIdentifier(!0),this.finishNode(e,"PrivateName")}return this.parseIdentifier(!0)}parseFunctionOrFunctionSent(){const t=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(Mi.dot)){const e=this.createIdentifier(this.startNodeAtNode(t),"function");return this.next(),this.parseMetaProperty(t,e,"sent")}return this.parseFunction(t)}parseMetaProperty(t,e,s){t.meta=e,"function"===e.name&&"sent"===s&&(this.isContextual(s)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected());const r=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==s||r)&&this.raise(t.property.start,Gi.UnsupportedMetaProperty,e.name,s),this.finishNode(t,"MetaProperty")}parseImportMetaProperty(t){const e=this.createIdentifier(this.startNodeAtNode(t),"import");return this.next(),this.isContextual("meta")&&(this.inModule||this.raise(e.start,Ki.ImportMetaOutsideModule),this.sawUnambiguousESM=!0),this.parseMetaProperty(t,e,"meta")}parseLiteral(t,e,s,r){s=s||this.state.start,r=r||this.state.startLoc;const i=this.startNodeAt(s,r);return this.addExtra(i,"rawValue",t),this.addExtra(i,"raw",this.input.slice(s,this.state.end)),i.value=t,this.next(),this.finishNode(i,e)}parseParenAndDistinguishExpression(t){const e=this.state.start,s=this.state.startLoc;let r;this.next(),this.expressionScope.enter(new hn(1));const i=this.state.maybeInArrowParameters,a=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;const n=this.state.start,o=this.state.startLoc,u=[],h=new ln,c={start:0};let p,l,d=!0;for(;!this.match(Mi.parenR);){if(d)d=!1;else if(this.expect(Mi.comma,c.start||null),this.match(Mi.parenR)){l=this.state.start;break}if(this.match(Mi.ellipsis)){const t=this.state.start,e=this.state.startLoc;p=this.state.start,u.push(this.parseParenItem(this.parseRestBinding(),t,e)),this.checkCommaAfterRest(41);break}u.push(this.parseMaybeAssignAllowIn(h,this.parseParenItem,c))}const D=this.state.lastTokEnd,m=this.state.lastTokEndLoc;this.expect(Mi.parenR),this.state.maybeInArrowParameters=i,this.state.inFSharpPipelineDirectBody=a;let f=this.startNodeAt(e,s);if(t&&this.shouldParseArrow()&&(f=this.parseArrow(f)))return this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(f,u,!1),f;if(this.expressionScope.exit(),u.length||this.unexpected(this.state.lastTokStart),l&&this.unexpected(l),p&&this.unexpected(p),this.checkExpressionErrors(h,!0),c.start&&this.unexpected(c.start),this.toReferencedListDeep(u,!0),u.length>1?(r=this.startNodeAt(n,o),r.expressions=u,this.finishNodeAt(r,"SequenceExpression",D,m)):r=u[0],!this.options.createParenthesizedExpressions)return this.addExtra(r,"parenthesized",!0),this.addExtra(r,"parenStart",e),r;const y=this.startNodeAt(e,s);return y.expression=r,this.finishNode(y,"ParenthesizedExpression"),y}shouldParseArrow(){return!this.canInsertSemicolon()}parseArrow(t){if(this.eat(Mi.arrow))return t}parseParenItem(t,e,s){return t}parseNewOrNewTarget(){const t=this.startNode();if(this.next(),this.match(Mi.dot)){const e=this.createIdentifier(this.startNodeAtNode(t),"new");this.next();const s=this.parseMetaProperty(t,e,"target");return this.scope.inNonArrowFunction||this.scope.inClass||this.raise(s.start,Gi.UnexpectedNewTarget),s}return this.parseNew(t)}parseNew(t){return t.callee=this.parseNoCallExpr(),"Import"===t.callee.type?this.raise(t.callee.start,Gi.ImportCallNotNewExpression):this.isOptionalChain(t.callee)?this.raise(this.state.lastTokEnd,Gi.OptionalChainingNoNew):this.eat(Mi.questionDot)&&this.raise(this.state.start,Gi.OptionalChainingNoNew),this.parseNewArguments(t),this.finishNode(t,"NewExpression")}parseNewArguments(t){if(this.eat(Mi.parenL)){const e=this.parseExprList(Mi.parenR);this.toReferencedList(e),t.arguments=e}else t.arguments=[]}parseTemplateElement(t){const e=this.startNode();return null===this.state.value&&(t||this.raise(this.state.start+1,Gi.InvalidEscapeSequenceTemplate)),e.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),e.tail=this.match(Mi.backQuote),this.finishNode(e,"TemplateElement")}parseTemplate(t){const e=this.startNode();this.next(),e.expressions=[];let s=this.parseTemplateElement(t);for(e.quasis=[s];!s.tail;)this.expect(Mi.dollarBraceL),e.expressions.push(this.parseTemplateSubstitution()),this.expect(Mi.braceR),e.quasis.push(s=this.parseTemplateElement(t));return this.next(),this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,e,s,r){s&&this.expectPlugin("recordAndTuple");const i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const a=Object.create(null);let n=!0;const o=this.startNode();for(o.properties=[],this.next();!this.match(t);){if(n)n=!1;else if(this.expect(Mi.comma),this.match(t)){this.addExtra(o,"trailingComma",this.state.lastTokStart);break}const i=this.parsePropertyDefinition(e,r);e||this.checkProto(i,s,a,r),s&&!this.isObjectProperty(i)&&"SpreadElement"!==i.type&&this.raise(i.start,Gi.InvalidRecordProperty),i.shorthand&&this.addExtra(i,"shorthand",!0),o.properties.push(i)}this.state.exprAllowed=!1,this.next(),this.state.inFSharpPipelineDirectBody=i;let u="ObjectExpression";return e?u="ObjectPattern":s&&(u="RecordExpression"),this.finishNode(o,u)}maybeAsyncOrAccessorProp(t){return!t.computed&&"Identifier"===t.key.type&&(this.isLiteralPropertyName()||this.match(Mi.bracketL)||this.match(Mi.star))}parsePropertyDefinition(t,e){let s=[];if(this.match(Mi.at))for(this.hasPlugin("decorators")&&this.raise(this.state.start,Gi.UnsupportedPropertyDecorator);this.match(Mi.at);)s.push(this.parseDecorator());const r=this.startNode();let i,a,n=!1,o=!1,u=!1;if(this.match(Mi.ellipsis))return s.length&&this.unexpected(),t?(this.next(),r.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(r,"RestElement")):this.parseSpread();s.length&&(r.decorators=s,s=[]),r.method=!1,(t||e)&&(i=this.state.start,a=this.state.startLoc),t||(n=this.eat(Mi.star));const h=this.state.containsEsc,c=this.parsePropertyName(r,!1);if(!t&&!n&&!h&&this.maybeAsyncOrAccessorProp(r)){const t=c.name;"async"!==t||this.hasPrecedingLineBreak()||(o=!0,n=this.eat(Mi.star),this.parsePropertyName(r,!1)),"get"!==t&&"set"!==t||(u=!0,r.kind=t,this.match(Mi.star)&&(n=!0,this.raise(this.state.pos,Gi.AccessorIsGenerator,t),this.next()),this.parsePropertyName(r,!1))}return this.parseObjPropValue(r,i,a,n,o,t,u,e),r}getGetterSetterExpectedParamCount(t){return"get"===t.kind?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var e;const s=this.getGetterSetterExpectedParamCount(t),r=this.getObjectOrClassMethodParams(t),i=t.start;r.length!==s&&("get"===t.kind?this.raise(i,Gi.BadGetterArity):this.raise(i,Gi.BadSetterArity)),"set"===t.kind&&"RestElement"===(null==(e=r[r.length-1])?void 0:e.type)&&this.raise(i,Gi.BadSetterRestParameter)}parseObjectMethod(t,e,s,r,i){return i?(this.parseMethod(t,e,!1,!1,!1,"ObjectMethod"),this.checkGetterSetterParams(t),t):s||e||this.match(Mi.parenL)?(r&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,!1,"ObjectMethod")):void 0}parseObjectProperty(t,e,s,r,i){return t.shorthand=!1,this.eat(Mi.colon)?(t.value=r?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssignAllowIn(i),this.finishNode(t,"ObjectProperty")):t.computed||"Identifier"!==t.key.type?void 0:(this.checkReservedWord(t.key.name,t.key.start,!0,!1),r?t.value=this.parseMaybeDefault(e,s,t.key.__clone()):this.match(Mi.eq)&&i?(-1===i.shorthandAssign&&(i.shorthandAssign=this.state.start),t.value=this.parseMaybeDefault(e,s,t.key.__clone())):t.value=t.key.__clone(),t.shorthand=!0,this.finishNode(t,"ObjectProperty"))}parseObjPropValue(t,e,s,r,i,a,n,o){const u=this.parseObjectMethod(t,r,i,a,n)||this.parseObjectProperty(t,e,s,a,o);return u||this.unexpected(),u}parsePropertyName(t,e){if(this.eat(Mi.bracketL))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(Mi.bracketR);else{const s=this.state.inPropertyName;this.state.inPropertyName=!0,t.key=this.match(Mi.num)||this.match(Mi.string)||this.match(Mi.bigint)||this.match(Mi.decimal)?this.parseExprAtom():this.parseMaybePrivateName(e),this.isPrivateName(t.key)||(t.computed=!1),this.state.inPropertyName=s}return t.key}initFunction(t,e){t.id=null,t.generator=!1,t.async=!!e}parseMethod(t,e,s,r,i,a,n=!1){this.initFunction(t,s),t.generator=!!e;const o=r;return this.scope.enter(18|(n?64:0)|(i?32:0)),this.prodParam.enter(Ua(s,t.generator)),this.parseFunctionParams(t,o),this.parseFunctionBodyAndFinish(t,a,!0),this.prodParam.exit(),this.scope.exit(),t}parseArrayLike(t,e,s,r){s&&this.expectPlugin("recordAndTuple");const i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const a=this.startNode();return this.next(),a.elements=this.parseExprList(t,!s,r,a),this.state.inFSharpPipelineDirectBody=i,this.finishNode(a,s?"TupleExpression":"ArrayExpression")}parseArrowExpression(t,e,s,r){this.scope.enter(6);let i=Ua(s,!1);!this.match(Mi.bracketL)&&this.prodParam.hasIn&&(i|=8),this.prodParam.enter(i),this.initFunction(t,s);const a=this.state.maybeInArrowParameters;return e&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(t,e,r)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(t,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=a,this.finishNode(t,"ArrowFunctionExpression")}setArrowFunctionParameters(t,e,s){t.params=this.toAssignableList(e,s,!1)}parseFunctionBodyAndFinish(t,e,s=!1){this.parseFunctionBody(t,!1,s),this.finishNode(t,e)}parseFunctionBody(t,e,s=!1){const r=e&&!this.match(Mi.braceL);if(this.expressionScope.enter(pn()),r)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,e,!1);else{const r=this.state.strict,i=this.state.labels;this.state.labels=[],this.prodParam.enter(4|this.prodParam.currentFlags()),t.body=this.parseBlock(!0,!1,(i=>{const a=!this.isSimpleParamList(t.params);if(i&&a){const e="method"!==t.kind&&"constructor"!==t.kind||!t.key?t.start:t.key.end;this.raise(e,Gi.IllegalLanguageModeDirective)}const n=!r&&this.state.strict;this.checkParams(t,!(this.state.strict||e||s||a),e,n),this.state.strict&&t.id&&this.checkLVal(t.id,"function name",65,void 0,void 0,n)})),this.prodParam.exit(),this.expressionScope.exit(),this.state.labels=i}}isSimpleParamList(t){for(let e=0,s=t.length;e<s;e++)if("Identifier"!==t[e].type)return!1;return!0}checkParams(t,e,s,r=!0){const i=new Set;for(const s of t.params)this.checkLVal(s,"function parameter list",5,e?null:i,void 0,r)}parseExprList(t,e,s,r){const i=[];let a=!0;for(;!this.eat(t);){if(a)a=!1;else if(this.expect(Mi.comma),this.match(t)){r&&this.addExtra(r,"trailingComma",this.state.lastTokStart),this.next();break}i.push(this.parseExprListItem(e,s))}return i}parseExprListItem(t,e,s,r){let i;if(this.match(Mi.comma))t||this.raise(this.state.pos,Gi.UnexpectedToken,","),i=null;else if(this.match(Mi.ellipsis)){const t=this.state.start,r=this.state.startLoc;i=this.parseParenItem(this.parseSpread(e,s),t,r)}else if(this.match(Mi.question)){this.expectPlugin("partialApplication"),r||this.raise(this.state.start,Gi.UnexpectedArgumentPlaceholder);const t=this.startNode();this.next(),i=this.finishNode(t,"ArgumentPlaceholder")}else i=this.parseMaybeAssignAllowIn(e,this.parseParenItem,s);return i}parseIdentifier(t){const e=this.startNode(),s=this.parseIdentifierName(e.start,t);return this.createIdentifier(e,s)}createIdentifier(t,e){return t.name=e,t.loc.identifierName=e,this.finishNode(t,"Identifier")}parseIdentifierName(t,e){let s;const{start:r,type:i}=this.state;if(i===Mi.name)s=this.state.value;else{if(!i.keyword)throw this.unexpected();{s=i.keyword;const t=this.curContext();i!==Mi._class&&i!==Mi._function||t!==$i.functionStatement&&t!==$i.functionExpression||this.state.context.pop()}}return e?this.state.type=Mi.name:this.checkReservedWord(s,r,!!i.keyword,!1),this.next(),s}checkReservedWord(t,e,s,r){if(this.prodParam.hasYield&&"yield"===t)return void this.raise(e,Gi.YieldBindingIdentifier);if("await"===t){if(this.prodParam.hasAwait)return void this.raise(e,Gi.AwaitBindingIdentifier);if(this.scope.inStaticBlock&&!this.scope.inNonArrowFunction)return void this.raise(e,Gi.AwaitBindingIdentifierInStaticBlock);this.expressionScope.recordAsyncArrowParametersError(e,Gi.AwaitBindingIdentifier)}if(this.scope.inClass&&!this.scope.inNonArrowFunction&&"arguments"===t)return void this.raise(e,Gi.ArgumentsInClass);if(s&&ma(t))return void this.raise(e,Gi.UnexpectedKeyword,t);(this.state.strict?r?Da:la:pa)(t,this.inModule)&&this.raise(e,Gi.UnexpectedReservedWord,t)}isAwaitAllowed(){return!!this.prodParam.hasAwait||!(!this.options.allowAwaitOutsideFunction||this.scope.inFunction)}parseAwait(t,e){const s=this.startNodeAt(t,e);return this.expressionScope.recordParameterInitializerError(s.start,Gi.AwaitExpressionFormalParameter),this.eat(Mi.star)&&this.raise(s.start,Gi.ObsoleteAwaitStar),this.scope.inFunction||this.options.allowAwaitOutsideFunction||(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(s.argument=this.parseMaybeUnary(null,!0)),this.finishNode(s,"AwaitExpression")}isAmbiguousAwait(){return this.hasPrecedingLineBreak()||this.match(Mi.plusMin)||this.match(Mi.parenL)||this.match(Mi.bracketL)||this.match(Mi.backQuote)||this.match(Mi.regexp)||this.match(Mi.slash)||this.hasPlugin("v8intrinsic")&&this.match(Mi.modulo)}parseYield(){const t=this.startNode();return this.expressionScope.recordParameterInitializerError(t.start,Gi.YieldInParameter),this.next(),this.match(Mi.semi)||!this.match(Mi.star)&&!this.state.type.startsExpr||this.hasPrecedingLineBreak()?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(Mi.star),t.argument=this.parseMaybeAssign()),this.finishNode(t,"YieldExpression")}checkPipelineAtInfixOperator(t,e){"smart"===this.getPluginOption("pipelineOperator","proposal")&&"SequenceExpression"===t.type&&this.raise(e,Gi.PipelineHeadSequenceExpression)}parseSmartPipelineBody(t,e,s){return this.checkSmartPipelineBodyEarlyErrors(t,e),this.parseSmartPipelineBodyInStyle(t,e,s)}checkSmartPipelineBodyEarlyErrors(t,e){if(this.match(Mi.arrow))throw this.raise(this.state.start,Gi.PipelineBodyNoArrow);"SequenceExpression"===t.type&&this.raise(e,Gi.PipelineBodySequenceExpression)}parseSmartPipelineBodyInStyle(t,e,s){const r=this.startNodeAt(e,s),i=this.isSimpleReference(t);return i?r.callee=t:(this.topicReferenceWasUsedInCurrentTopicContext()||this.raise(e,Gi.PipelineTopicUnused),r.expression=t),this.finishNode(r,i?"PipelineBareFunction":"PipelineTopicExpression")}isSimpleReference(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}}withTopicPermittingContext(t){const e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}withTopicForbiddingContext(t){const e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}withSoloAwaitPermittingContext(t){const e=this.state.soloAwait;this.state.soloAwait=!0;try{return t()}finally{this.state.soloAwait=e}}allowInAnd(t){const e=this.prodParam.currentFlags();if(8&~e){this.prodParam.enter(8|e);try{return t()}finally{this.prodParam.exit()}}return t()}disallowInAnd(t){const e=this.prodParam.currentFlags();if(8&e){this.prodParam.enter(-9&e);try{return t()}finally{this.prodParam.exit()}}return t()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}primaryTopicReferenceIsAllowedInCurrentTopicContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentTopicContext(){return null!=this.state.topicContext.maxTopicIndex&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(t){const e=this.state.start,s=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const i=this.parseExprOp(this.parseMaybeUnary(),e,s,t);return this.state.inFSharpPipelineDirectBody=r,i}parseModuleExpression(){this.expectPlugin("moduleBlocks");const t=this.startNode();this.next(),this.eat(Mi.braceL);const e=this.initializeScopes(!0);this.enterInitialScopes();const s=this.startNode();try{t.body=this.parseProgram(s,Mi.braceR,"module")}finally{e()}return this.eat(Mi.braceR),this.finishNode(t,"ModuleExpression")}}{parseTopLevel(t,e){return t.program=this.parseProgram(e),t.comments=this.state.comments,this.options.tokens&&(t.tokens=this.tokens),this.finishNode(t,"File")}parseProgram(t,e=Mi.eof,s=this.options.sourceType){if(t.sourceType=s,t.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(t,!0,!0,e),this.inModule&&!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(const[t]of Array.from(this.scope.undefinedExports)){const e=this.scope.undefinedExports.get(t);this.raise(e,Gi.ModuleExportUndefined,t)}return this.finishNode(t,"Program")}stmtToDirective(t){const e=t.expression,s=this.startNodeAt(e.start,e.loc.start),r=this.startNodeAt(t.start,t.loc.start),i=this.input.slice(e.start,e.end),a=s.value=i.slice(1,-1);return this.addExtra(s,"raw",i),this.addExtra(s,"rawValue",a),r.value=this.finishNodeAt(s,"DirectiveLiteral",e.end,e.loc.end),this.finishNodeAt(r,"Directive",t.end,t.loc.end)}parseInterpreterDirective(){if(!this.match(Mi.interpreterDirective))return null;const t=this.startNode();return t.value=this.state.value,this.next(),this.finishNode(t,"InterpreterDirective")}isLet(t){return!!this.isContextual("let")&&this.isLetKeyword(t)}isLetKeyword(t){const e=this.nextTokenStart(),s=this.input.charCodeAt(e);if(91===s)return!0;if(t)return!1;if(123===s)return!0;if(ia(s)){let t=e+1;for(;aa(this.input.charCodeAt(t));)++t;const s=this.input.slice(e,t);if(!fa.test(s))return!0}return!1}parseStatement(t,e){return this.match(Mi.at)&&this.parseDecorators(!0),this.parseStatementContent(t,e)}parseStatementContent(t,e){let s=this.state.type;const r=this.startNode();let i;switch(this.isLet(t)&&(s=Mi._var,i="let"),s){case Mi._break:case Mi._continue:return this.parseBreakContinueStatement(r,s.keyword);case Mi._debugger:return this.parseDebuggerStatement(r);case Mi._do:return this.parseDoStatement(r);case Mi._for:return this.parseForStatement(r);case Mi._function:if(46===this.lookaheadCharCode())break;return t&&(this.state.strict?this.raise(this.state.start,Gi.StrictFunction):"if"!==t&&"label"!==t&&this.raise(this.state.start,Gi.SloppyFunction)),this.parseFunctionStatement(r,!1,!t);case Mi._class:return t&&this.unexpected(),this.parseClass(r,!0);case Mi._if:return this.parseIfStatement(r);case Mi._return:return this.parseReturnStatement(r);case Mi._switch:return this.parseSwitchStatement(r);case Mi._throw:return this.parseThrowStatement(r);case Mi._try:return this.parseTryStatement(r);case Mi._const:case Mi._var:return i=i||this.state.value,t&&"var"!==i&&this.raise(this.state.start,Gi.UnexpectedLexicalDeclaration),this.parseVarStatement(r,i);case Mi._while:return this.parseWhileStatement(r);case Mi._with:return this.parseWithStatement(r);case Mi.braceL:return this.parseBlock();case Mi.semi:return this.parseEmptyStatement(r);case Mi._import:{const t=this.lookaheadCharCode();if(40===t||46===t)break}case Mi._export:{let t;return this.options.allowImportExportEverywhere||e||this.raise(this.state.start,Gi.UnexpectedImportExport),this.next(),s===Mi._import?(t=this.parseImport(r),"ImportDeclaration"!==t.type||t.importKind&&"value"!==t.importKind||(this.sawUnambiguousESM=!0)):(t=this.parseExport(r),("ExportNamedDeclaration"!==t.type||t.exportKind&&"value"!==t.exportKind)&&("ExportAllDeclaration"!==t.type||t.exportKind&&"value"!==t.exportKind)&&"ExportDefaultDeclaration"!==t.type||(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(r),t}default:if(this.isAsyncFunction())return t&&this.raise(this.state.start,Gi.AsyncFunctionInSingleStatementContext),this.next(),this.parseFunctionStatement(r,!0,!t)}const a=this.state.value,n=this.parseExpression();return s===Mi.name&&"Identifier"===n.type&&this.eat(Mi.colon)?this.parseLabeledStatement(r,a,n,t):this.parseExpressionStatement(r,n)}assertModuleNodeAllowed(t){this.options.allowImportExportEverywhere||this.inModule||this.raise(t.start,Ki.ImportOutsideModule)}takeDecorators(t){const e=this.state.decoratorStack[this.state.decoratorStack.length-1];e.length&&(t.decorators=e,this.resetStartLocationFromNode(t,e[0]),this.state.decoratorStack[this.state.decoratorStack.length-1]=[])}canHaveLeadingDecorator(){return this.match(Mi._class)}parseDecorators(t){const e=this.state.decoratorStack[this.state.decoratorStack.length-1];for(;this.match(Mi.at);){const t=this.parseDecorator();e.push(t)}if(this.match(Mi._export))t||this.unexpected(),this.hasPlugin("decorators")&&!this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(this.state.start,Gi.DecoratorExportClass);else if(!this.canHaveLeadingDecorator())throw this.raise(this.state.start,Gi.UnexpectedLeadingDecorator)}parseDecorator(){this.expectOnePlugin(["decorators-legacy","decorators"]);const t=this.startNode();if(this.next(),this.hasPlugin("decorators")){this.state.decoratorStack.push([]);const e=this.state.start,s=this.state.startLoc;let r;if(this.eat(Mi.parenL))r=this.parseExpression(),this.expect(Mi.parenR);else for(r=this.parseIdentifier(!1);this.eat(Mi.dot);){const t=this.startNodeAt(e,s);t.object=r,t.property=this.parseIdentifier(!0),t.computed=!1,r=this.finishNode(t,"MemberExpression")}t.expression=this.parseMaybeDecoratorArguments(r),this.state.decoratorStack.pop()}else t.expression=this.parseExprSubscripts();return this.finishNode(t,"Decorator")}parseMaybeDecoratorArguments(t){if(this.eat(Mi.parenL)){const e=this.startNodeAtNode(t);return e.callee=t,e.arguments=this.parseCallExpressionArguments(Mi.parenR,!1),this.toReferencedList(e.arguments),this.finishNode(e,"CallExpression")}return t}parseBreakContinueStatement(t,e){const s="break"===e;return this.next(),this.isLineTerminator()?t.label=null:(t.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(t,e),this.finishNode(t,s?"BreakStatement":"ContinueStatement")}verifyBreakContinue(t,e){const s="break"===e;let r;for(r=0;r<this.state.labels.length;++r){const e=this.state.labels[r];if(null==t.label||e.name===t.label.name){if(null!=e.kind&&(s||"loop"===e.kind))break;if(t.label&&s)break}}r===this.state.labels.length&&this.raise(t.start,Gi.IllegalBreakContinue,e)}parseDebuggerStatement(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")}parseHeaderExpression(){this.expect(Mi.parenL);const t=this.parseExpression();return this.expect(Mi.parenR),t}parseDoStatement(t){return this.next(),this.state.labels.push(mn),t.body=this.withTopicForbiddingContext((()=>this.parseStatement("do"))),this.state.labels.pop(),this.expect(Mi._while),t.test=this.parseHeaderExpression(),this.eat(Mi.semi),this.finishNode(t,"DoWhileStatement")}parseForStatement(t){this.next(),this.state.labels.push(mn);let e=-1;if(this.isAwaitAllowed()&&this.eatContextual("await")&&(e=this.state.lastTokStart),this.scope.enter(0),this.expect(Mi.parenL),this.match(Mi.semi))return e>-1&&this.unexpected(e),this.parseFor(t,null);const s=this.isContextual("let"),r=s&&this.isLetKeyword();if(this.match(Mi._var)||this.match(Mi._const)||r){const s=this.startNode(),i=r?"let":this.state.value;return this.next(),this.parseVar(s,!0,i),this.finishNode(s,"VariableDeclaration"),(this.match(Mi._in)||this.isContextual("of"))&&1===s.declarations.length?this.parseForIn(t,s,e):(e>-1&&this.unexpected(e),this.parseFor(t,s))}const i=this.match(Mi.name)&&!this.state.containsEsc,a=new ln,n=this.parseExpression(!0,a),o=this.isContextual("of");if(o&&(s?this.raise(n.start,Gi.ForOfLet):-1===e&&i&&"Identifier"===n.type&&"async"===n.name&&this.raise(n.start,Gi.ForOfAsync)),o||this.match(Mi._in)){this.toAssignable(n,!0);const s=o?"for-of statement":"for-in statement";return this.checkLVal(n,s),this.parseForIn(t,n,e)}return this.checkExpressionErrors(a,!0),e>-1&&this.unexpected(e),this.parseFor(t,n)}parseFunctionStatement(t,e,s){return this.next(),this.parseFunction(t,1|(s?0:2),e)}parseIfStatement(t){return this.next(),t.test=this.parseHeaderExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(Mi._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")}parseReturnStatement(t){return this.prodParam.hasReturn||this.options.allowReturnOutsideFunction||this.raise(this.state.start,Gi.IllegalReturn),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")}parseSwitchStatement(t){this.next(),t.discriminant=this.parseHeaderExpression();const e=t.cases=[];let s,r;for(this.expect(Mi.braceL),this.state.labels.push(fn),this.scope.enter(0);!this.match(Mi.braceR);)if(this.match(Mi._case)||this.match(Mi._default)){const t=this.match(Mi._case);s&&this.finishNode(s,"SwitchCase"),e.push(s=this.startNode()),s.consequent=[],this.next(),t?s.test=this.parseExpression():(r&&this.raise(this.state.lastTokStart,Gi.MultipleDefaultsInSwitch),r=!0,s.test=null),this.expect(Mi.colon)}else s?s.consequent.push(this.parseStatement(null)):this.unexpected();return this.scope.exit(),s&&this.finishNode(s,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")}parseThrowStatement(t){return this.next(),this.hasPrecedingLineBreak()&&this.raise(this.state.lastTokEnd,Gi.NewlineAfterThrow),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")}parseCatchClauseParam(){const t=this.parseBindingAtom(),e="Identifier"===t.type;return this.scope.enter(e?8:0),this.checkLVal(t,"catch clause",9),t}parseTryStatement(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(Mi._catch)){const e=this.startNode();this.next(),this.match(Mi.parenL)?(this.expect(Mi.parenL),e.param=this.parseCatchClauseParam(),this.expect(Mi.parenR)):(e.param=null,this.scope.enter(0)),e.body=this.withTopicForbiddingContext((()=>this.parseBlock(!1,!1))),this.scope.exit(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(Mi._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,Gi.NoCatchOrFinally),this.finishNode(t,"TryStatement")}parseVarStatement(t,e){return this.next(),this.parseVar(t,!1,e),this.semicolon(),this.finishNode(t,"VariableDeclaration")}parseWhileStatement(t){return this.next(),t.test=this.parseHeaderExpression(),this.state.labels.push(mn),t.body=this.withTopicForbiddingContext((()=>this.parseStatement("while"))),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}parseWithStatement(t){return this.state.strict&&this.raise(this.state.start,Gi.StrictWith),this.next(),t.object=this.parseHeaderExpression(),t.body=this.withTopicForbiddingContext((()=>this.parseStatement("with"))),this.finishNode(t,"WithStatement")}parseEmptyStatement(t){return this.next(),this.finishNode(t,"EmptyStatement")}parseLabeledStatement(t,e,s,r){for(const t of this.state.labels)t.name===e&&this.raise(s.start,Gi.LabelRedeclaration,e);const i=this.state.type.isLoop?"loop":this.match(Mi._switch)?"switch":null;for(let e=this.state.labels.length-1;e>=0;e--){const s=this.state.labels[e];if(s.statementStart!==t.start)break;s.statementStart=this.state.start,s.kind=i}return this.state.labels.push({name:e,kind:i,statementStart:this.state.start}),t.body=this.parseStatement(r?-1===r.indexOf("label")?r+"label":r:"label"),this.state.labels.pop(),t.label=s,this.finishNode(t,"LabeledStatement")}parseExpressionStatement(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")}parseBlock(t=!1,e=!0,s){const r=this.startNode();return t&&this.state.strictErrors.clear(),this.expect(Mi.braceL),e&&this.scope.enter(0),this.parseBlockBody(r,t,!1,Mi.braceR,s),e&&this.scope.exit(),this.finishNode(r,"BlockStatement")}isValidDirective(t){return"ExpressionStatement"===t.type&&"StringLiteral"===t.expression.type&&!t.expression.extra.parenthesized}parseBlockBody(t,e,s,r,i){const a=t.body=[],n=t.directives=[];this.parseBlockOrModuleBlockBody(a,e?n:void 0,s,r,i)}parseBlockOrModuleBlockBody(t,e,s,r,i){const a=this.state.strict;let n=!1,o=!1;for(;!this.match(r);){const r=this.parseStatement(null,s);if(e&&!o){if(this.isValidDirective(r)){const t=this.stmtToDirective(r);e.push(t),n||"use strict"!==t.value.value||(n=!0,this.setStrict(!0));continue}o=!0,this.state.strictErrors.clear()}t.push(r)}i&&i.call(this,n),a||this.setStrict(!1),this.next()}parseFor(t,e){return t.init=e,this.semicolon(!1),t.test=this.match(Mi.semi)?null:this.parseExpression(),this.semicolon(!1),t.update=this.match(Mi.parenR)?null:this.parseExpression(),this.expect(Mi.parenR),t.body=this.withTopicForbiddingContext((()=>this.parseStatement("for"))),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,"ForStatement")}parseForIn(t,e,s){const r=this.match(Mi._in);return this.next(),r?s>-1&&this.unexpected(s):t.await=s>-1,"VariableDeclaration"!==e.type||null==e.declarations[0].init||r&&!this.state.strict&&"var"===e.kind&&"Identifier"===e.declarations[0].id.type?"AssignmentPattern"===e.type&&this.raise(e.start,Gi.InvalidLhs,"for-loop"):this.raise(e.start,Gi.ForInOfLoopInitializer,r?"for-in":"for-of"),t.left=e,t.right=r?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(Mi.parenR),t.body=this.withTopicForbiddingContext((()=>this.parseStatement("for"))),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,r?"ForInStatement":"ForOfStatement")}parseVar(t,e,s){const r=t.declarations=[],i=this.hasPlugin("typescript");for(t.kind=s;;){const t=this.startNode();if(this.parseVarId(t,s),this.eat(Mi.eq)?t.init=e?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():("const"!==s||this.match(Mi._in)||this.isContextual("of")?"Identifier"===t.id.type||e&&(this.match(Mi._in)||this.isContextual("of"))||this.raise(this.state.lastTokEnd,Gi.DeclarationMissingInitializer,"Complex binding patterns"):i||this.raise(this.state.lastTokEnd,Gi.DeclarationMissingInitializer,"Const declarations"),t.init=null),r.push(this.finishNode(t,"VariableDeclarator")),!this.eat(Mi.comma))break}return t}parseVarId(t,e){t.id=this.parseBindingAtom(),this.checkLVal(t.id,"variable declaration","var"===e?5:9,void 0,"var"!==e)}parseFunction(t,e=0,s=!1){const r=1&e,i=2&e,a=!(!r||4&e);this.initFunction(t,s),this.match(Mi.star)&&i&&this.raise(this.state.start,Gi.GeneratorInSingleStatementContext),t.generator=this.eat(Mi.star),r&&(t.id=this.parseFunctionId(a));const n=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(Ua(s,t.generator)),r||(t.id=this.parseFunctionId()),this.parseFunctionParams(t,!1),this.withTopicForbiddingContext((()=>{this.parseFunctionBodyAndFinish(t,r?"FunctionDeclaration":"FunctionExpression")})),this.prodParam.exit(),this.scope.exit(),r&&!i&&this.registerFunctionStatementId(t),this.state.maybeInArrowParameters=n,t}parseFunctionId(t){return t||this.match(Mi.name)?this.parseIdentifier():null}parseFunctionParams(t,e){this.expect(Mi.parenL),this.expressionScope.enter(new un(3)),t.params=this.parseBindingList(Mi.parenR,41,!1,e),this.expressionScope.exit()}registerFunctionStatementId(t){t.id&&this.scope.declareName(t.id.name,this.state.strict||t.generator||t.async?this.scope.treatFunctionsAsVar?5:9:17,t.id.start)}parseClass(t,e,s){this.next(),this.takeDecorators(t);const r=this.state.strict;return this.state.strict=!0,this.parseClassId(t,e,s),this.parseClassSuper(t),t.body=this.parseClassBody(!!t.superClass,r),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(Mi.eq)||this.match(Mi.semi)||this.match(Mi.braceR)}isClassMethod(){return this.match(Mi.parenL)}isNonstaticConstructor(t){return!(t.computed||t.static||"constructor"!==t.key.name&&"constructor"!==t.key.value)}parseClassBody(t,e){this.classScope.enter();const s={hadConstructor:!1,hadSuperClass:t};let r=[];const i=this.startNode();if(i.body=[],this.expect(Mi.braceL),this.withTopicForbiddingContext((()=>{for(;!this.match(Mi.braceR);){if(this.eat(Mi.semi)){if(r.length>0)throw this.raise(this.state.lastTokEnd,Gi.DecoratorSemicolon);continue}if(this.match(Mi.at)){r.push(this.parseDecorator());continue}const t=this.startNode();r.length&&(t.decorators=r,this.resetStartLocationFromNode(t,r[0]),r=[]),this.parseClassMember(i,t,s),"constructor"===t.kind&&t.decorators&&t.decorators.length>0&&this.raise(t.start,Gi.DecoratorConstructor)}})),this.state.strict=e,this.next(),r.length)throw this.raise(this.state.start,Gi.TrailingDecorator);return this.classScope.exit(),this.finishNode(i,"ClassBody")}parseClassMemberFromModifier(t,e){const s=this.parseIdentifier(!0);if(this.isClassMethod()){const r=e;return r.kind="method",r.computed=!1,r.key=s,r.static=!1,this.pushClassMethod(t,r,!1,!1,!1,!1),!0}if(this.isClassProperty()){const r=e;return r.computed=!1,r.key=s,r.static=!1,t.body.push(this.parseClassProperty(r)),!0}return!1}parseClassMember(t,e,s){const r=this.isContextual("static");if(r){if(this.parseClassMemberFromModifier(t,e))return;if(this.eat(Mi.braceL))return void this.parseClassStaticBlock(t,e)}this.parseClassMemberWithIsStatic(t,e,s,r)}parseClassMemberWithIsStatic(t,e,s,r){const i=e,a=e,n=e,o=e,u=i,h=i;if(e.static=r,this.eat(Mi.star))return u.kind="method",this.parseClassElementName(u),this.isPrivateName(u.key)?void this.pushClassPrivateMethod(t,a,!0,!1):(this.isNonstaticConstructor(i)&&this.raise(i.key.start,Gi.ConstructorIsGenerator),void this.pushClassMethod(t,i,!0,!1,!1,!1));const c=this.state.containsEsc,p=this.parseClassElementName(e),l=this.isPrivateName(p),d="Identifier"===p.type,D=this.state.start;if(this.parsePostMemberNameModifiers(h),this.isClassMethod()){if(u.kind="method",l)return void this.pushClassPrivateMethod(t,a,!1,!1);const r=this.isNonstaticConstructor(i);let n=!1;r&&(i.kind="constructor",s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(p.start,Gi.DuplicateConstructor),r&&this.hasPlugin("typescript")&&e.override&&this.raise(p.start,Gi.OverrideOnConstructor),s.hadConstructor=!0,n=s.hadSuperClass),this.pushClassMethod(t,i,!1,!1,r,n)}else if(this.isClassProperty())l?this.pushClassPrivateProperty(t,o):this.pushClassProperty(t,n);else if(!d||"async"!==p.name||c||this.isLineTerminator())!d||"get"!==p.name&&"set"!==p.name||c||this.match(Mi.star)&&this.isLineTerminator()?this.isLineTerminator()?l?this.pushClassPrivateProperty(t,o):this.pushClassProperty(t,n):this.unexpected():(u.kind=p.name,this.parseClassElementName(i),this.isPrivateName(u.key)?this.pushClassPrivateMethod(t,a,!1,!1):(this.isNonstaticConstructor(i)&&this.raise(i.key.start,Gi.ConstructorIsAccessor),this.pushClassMethod(t,i,!1,!1,!1,!1)),this.checkGetterSetterParams(i));else{const e=this.eat(Mi.star);h.optional&&this.unexpected(D),u.kind="method",this.parseClassElementName(u),this.parsePostMemberNameModifiers(h),this.isPrivateName(u.key)?this.pushClassPrivateMethod(t,a,e,!0):(this.isNonstaticConstructor(i)&&this.raise(i.key.start,Gi.ConstructorIsAsync),this.pushClassMethod(t,i,e,!0,!1,!1))}}parseClassElementName(t){const e=this.parsePropertyName(t,!0);return t.computed||!t.static||"prototype"!==e.name&&"prototype"!==e.value||this.raise(e.start,Gi.StaticPrototype),this.isPrivateName(e)&&"constructor"===this.getPrivateNameSV(e)&&this.raise(e.start,Gi.ConstructorClassPrivateField),e}parseClassStaticBlock(t,e){var s;this.expectPlugin("classStaticBlock",e.start),this.scope.enter(208);const r=this.state.labels;this.state.labels=[],this.prodParam.enter(0);const i=e.body=[];this.parseBlockOrModuleBlockBody(i,void 0,!1,Mi.braceR),this.prodParam.exit(),this.scope.exit(),this.state.labels=r,t.body.push(this.finishNode(e,"StaticBlock")),null!=(s=e.decorators)&&s.length&&this.raise(e.start,Gi.DecoratorStaticBlock)}pushClassProperty(t,e){e.computed||"constructor"!==e.key.name&&"constructor"!==e.key.value||this.raise(e.key.start,Gi.ConstructorClassField),t.body.push(this.parseClassProperty(e))}pushClassPrivateProperty(t,e){const s=this.parseClassPrivateProperty(e);t.body.push(s),this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),0,s.key.start)}pushClassMethod(t,e,s,r,i,a){t.body.push(this.parseMethod(e,s,r,i,a,"ClassMethod",!0))}pushClassPrivateMethod(t,e,s,r){const i=this.parseMethod(e,s,r,!1,!1,"ClassPrivateMethod",!0);t.body.push(i);const a="get"===i.kind?i.static?6:2:"set"===i.kind?i.static?5:1:0;this.classScope.declarePrivateName(this.getPrivateNameSV(i.key),a,i.key.start)}parsePostMemberNameModifiers(t){}parseClassPrivateProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassPrivateProperty")}parseClassProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassProperty")}parseInitializer(t){this.scope.enter(80),this.expressionScope.enter(pn()),this.prodParam.enter(0),t.value=this.eat(Mi.eq)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(t,e,s,r=139){this.match(Mi.name)?(t.id=this.parseIdentifier(),e&&this.checkLVal(t.id,"class name",r)):s||!e?t.id=null:this.unexpected(null,Gi.MissingClassName)}parseClassSuper(t){t.superClass=this.eat(Mi._extends)?this.parseExprSubscripts():null}parseExport(t){const e=this.maybeParseExportDefaultSpecifier(t),s=!e||this.eat(Mi.comma),r=s&&this.eatExportStar(t),i=r&&this.maybeParseExportNamespaceSpecifier(t),a=s&&(!i||this.eat(Mi.comma)),n=e||r;if(r&&!i)return e&&this.unexpected(),this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration");const o=this.maybeParseExportNamedSpecifiers(t);if(e&&s&&!r&&!o||i&&a&&!o)throw this.unexpected(null,Mi.braceL);let u;if(n||o?(u=!1,this.parseExportFrom(t,n)):u=this.maybeParseExportDeclaration(t),n||o||u)return this.checkExport(t,!0,!1,!!t.source),this.finishNode(t,"ExportNamedDeclaration");if(this.eat(Mi._default))return t.declaration=this.parseExportDefaultExpression(),this.checkExport(t,!0,!0),this.finishNode(t,"ExportDefaultDeclaration");throw this.unexpected(null,Mi.braceL)}eatExportStar(t){return this.eat(Mi.star)}maybeParseExportDefaultSpecifier(t){if(this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom");const e=this.startNode();return e.exported=this.parseIdentifier(!0),t.specifiers=[this.finishNode(e,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(t){if(this.isContextual("as")){t.specifiers||(t.specifiers=[]);const e=this.startNodeAt(this.state.lastTokStart,this.state.lastTokStartLoc);return this.next(),e.exported=this.parseModuleExportName(),t.specifiers.push(this.finishNode(e,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(t){return!!this.match(Mi.braceL)&&(t.specifiers||(t.specifiers=[]),t.specifiers.push(...this.parseExportSpecifiers()),t.source=null,t.declaration=null,!0)}maybeParseExportDeclaration(t){return!!this.shouldParseExportDeclaration()&&(t.specifiers=[],t.source=null,t.declaration=this.parseExportDeclaration(t),!0)}isAsyncFunction(){if(!this.isContextual("async"))return!1;const t=this.nextTokenStart();return!Ri.test(this.input.slice(this.state.pos,t))&&this.isUnparsedContextual(t,"function")}parseExportDefaultExpression(){const t=this.startNode(),e=this.isAsyncFunction();if(this.match(Mi._function)||e)return this.next(),e&&this.next(),this.parseFunction(t,5,e);if(this.match(Mi._class))return this.parseClass(t,!0,!0);if(this.match(Mi.at))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(this.state.start,Gi.DecoratorBeforeExport),this.parseDecorators(!1),this.parseClass(t,!0,!0);if(this.match(Mi._const)||this.match(Mi._var)||this.isLet())throw this.raise(this.state.start,Gi.UnsupportedDefaultExport);{const t=this.parseMaybeAssignAllowIn();return this.semicolon(),t}}parseExportDeclaration(t){return this.parseStatement(null)}isExportDefaultSpecifier(){if(this.match(Mi.name)){const t=this.state.value;if("async"===t&&!this.state.containsEsc||"let"===t)return!1;if(("type"===t||"interface"===t)&&!this.state.containsEsc){const t=this.lookahead();if(t.type===Mi.name&&"from"!==t.value||t.type===Mi.braceL)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(Mi._default))return!1;const t=this.nextTokenStart(),e=this.isUnparsedContextual(t,"from");if(44===this.input.charCodeAt(t)||this.match(Mi.name)&&e)return!0;if(this.match(Mi._default)&&e){const e=this.input.charCodeAt(this.nextTokenStartSince(t+4));return 34===e||39===e}return!1}parseExportFrom(t,e){if(this.eatContextual("from")){t.source=this.parseImportSource(),this.checkExport(t);const e=this.maybeParseImportAssertions();e&&(t.assertions=e)}else e?this.unexpected():t.source=null;this.semicolon()}shouldParseExportDeclaration(){if(this.match(Mi.at)&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))){if(!this.getPluginOption("decorators","decoratorsBeforeExport"))return!0;this.unexpected(this.state.start,Gi.DecoratorBeforeExport)}return"var"===this.state.type.keyword||"const"===this.state.type.keyword||"function"===this.state.type.keyword||"class"===this.state.type.keyword||this.isLet()||this.isAsyncFunction()}checkExport(t,e,s,r){if(e)if(s){if(this.checkDuplicateExports(t,"default"),this.hasPlugin("exportDefaultFrom")){var i;const e=t.declaration;"Identifier"!==e.type||"from"!==e.name||e.end-e.start!=4||null!=(i=e.extra)&&i.parenthesized||this.raise(e.start,Gi.ExportDefaultFromAsIdentifier)}}else if(t.specifiers&&t.specifiers.length)for(const e of t.specifiers){const{exported:t}=e,s="Identifier"===t.type?t.name:t.value;if(this.checkDuplicateExports(e,s),!r&&e.local){const{local:t}=e;"StringLiteral"===t.type?this.raise(e.start,Gi.ExportBindingIsString,t.value,s):(this.checkReservedWord(t.name,t.start,!0,!1),this.scope.checkLocalExport(t))}}else if(t.declaration)if("FunctionDeclaration"===t.declaration.type||"ClassDeclaration"===t.declaration.type){const e=t.declaration.id;if(!e)throw new Error("Assertion failure");this.checkDuplicateExports(t,e.name)}else if("VariableDeclaration"===t.declaration.type)for(const e of t.declaration.declarations)this.checkDeclaration(e.id);if(this.state.decoratorStack[this.state.decoratorStack.length-1].length)throw this.raise(t.start,Gi.UnsupportedDecoratorExport)}checkDeclaration(t){if("Identifier"===t.type)this.checkDuplicateExports(t,t.name);else if("ObjectPattern"===t.type)for(const e of t.properties)this.checkDeclaration(e);else if("ArrayPattern"===t.type)for(const e of t.elements)e&&this.checkDeclaration(e);else"ObjectProperty"===t.type?this.checkDeclaration(t.value):"RestElement"===t.type?this.checkDeclaration(t.argument):"AssignmentPattern"===t.type&&this.checkDeclaration(t.left)}checkDuplicateExports(t,e){this.state.exportedIdentifiers.indexOf(e)>-1&&this.raise(t.start,"default"===e?Gi.DuplicateDefaultExport:Gi.DuplicateExport,e),this.state.exportedIdentifiers.push(e)}parseExportSpecifiers(){const t=[];let e=!0;for(this.expect(Mi.braceL);!this.eat(Mi.braceR);){if(e)e=!1;else if(this.expect(Mi.comma),this.eat(Mi.braceR))break;const s=this.startNode();s.local=this.parseModuleExportName(),s.exported=this.eatContextual("as")?this.parseModuleExportName():s.local.__clone(),t.push(this.finishNode(s,"ExportSpecifier"))}return t}parseModuleExportName(){if(this.match(Mi.string)){const t=this.parseLiteral(this.state.value,"StringLiteral"),e=t.value.match(yn);return e&&this.raise(t.start,Gi.ModuleExportNameHasLoneSurrogate,e[0].charCodeAt(0).toString(16)),t}return this.parseIdentifier(!0)}parseImport(t){if(t.specifiers=[],!this.match(Mi.string)){const e=!this.maybeParseDefaultImportSpecifier(t)||this.eat(Mi.comma),s=e&&this.maybeParseStarImportSpecifier(t);e&&!s&&this.parseNamedImportSpecifiers(t),this.expectContextual("from")}t.source=this.parseImportSource();const e=this.maybeParseImportAssertions();if(e)t.assertions=e;else{const e=this.maybeParseModuleAttributes();e&&(t.attributes=e)}return this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.match(Mi.string)||this.unexpected(),this.parseExprAtom()}shouldParseDefaultImport(t){return this.match(Mi.name)}parseImportSpecifierLocal(t,e,s,r){e.local=this.parseIdentifier(),this.checkLVal(e.local,r,9),t.specifiers.push(this.finishNode(e,s))}parseAssertEntries(){const t=[],e=new Set;do{if(this.match(Mi.braceR))break;const s=this.startNode(),r=this.state.value;if(this.match(Mi.string)?s.key=this.parseLiteral(r,"StringLiteral"):s.key=this.parseIdentifier(!0),this.expect(Mi.colon),"type"!==r&&this.raise(s.key.start,Gi.ModuleAttributeDifferentFromType,r),e.has(r)&&this.raise(s.key.start,Gi.ModuleAttributesWithDuplicateKeys,r),e.add(r),!this.match(Mi.string))throw this.unexpected(this.state.start,Gi.ModuleAttributeInvalidValue);s.value=this.parseLiteral(this.state.value,"StringLiteral"),this.finishNode(s,"ImportAttribute"),t.push(s)}while(this.eat(Mi.comma));return t}maybeParseModuleAttributes(){if(!this.match(Mi._with)||this.hasPrecedingLineBreak())return this.hasPlugin("moduleAttributes")?[]:null;this.expectPlugin("moduleAttributes"),this.next();const t=[],e=new Set;do{const s=this.startNode();if(s.key=this.parseIdentifier(!0),"type"!==s.key.name&&this.raise(s.key.start,Gi.ModuleAttributeDifferentFromType,s.key.name),e.has(s.key.name)&&this.raise(s.key.start,Gi.ModuleAttributesWithDuplicateKeys,s.key.name),e.add(s.key.name),this.expect(Mi.colon),!this.match(Mi.string))throw this.unexpected(this.state.start,Gi.ModuleAttributeInvalidValue);s.value=this.parseLiteral(this.state.value,"StringLiteral"),this.finishNode(s,"ImportAttribute"),t.push(s)}while(this.eat(Mi.comma));return t}maybeParseImportAssertions(){if(!this.isContextual("assert")||this.hasPrecedingLineBreak())return this.hasPlugin("importAssertions")?[]:null;this.expectPlugin("importAssertions"),this.next(),this.eat(Mi.braceL);const t=this.parseAssertEntries();return this.eat(Mi.braceR),t}maybeParseDefaultImportSpecifier(t){return!!this.shouldParseDefaultImport(t)&&(this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier","default import specifier"),!0)}maybeParseStarImportSpecifier(t){if(this.match(Mi.star)){const e=this.startNode();return this.next(),this.expectContextual("as"),this.parseImportSpecifierLocal(t,e,"ImportNamespaceSpecifier","import namespace specifier"),!0}return!1}parseNamedImportSpecifiers(t){let e=!0;for(this.expect(Mi.braceL);!this.eat(Mi.braceR);){if(e)e=!1;else{if(this.eat(Mi.colon))throw this.raise(this.state.start,Gi.DestructureNamedImport);if(this.expect(Mi.comma),this.eat(Mi.braceR))break}this.parseImportSpecifier(t)}}parseImportSpecifier(t){const e=this.startNode();if(e.imported=this.parseModuleExportName(),this.eatContextual("as"))e.local=this.parseIdentifier();else{const{imported:t}=e;if("StringLiteral"===t.type)throw this.raise(e.start,Gi.ImportBindingIsString,t.value);this.checkReservedWord(t.name,e.start,!0,!0),e.local=t.__clone()}this.checkLVal(e.local,"import specifier",9),t.specifiers.push(this.finishNode(e,"ImportSpecifier"))}isThisParam(t){return"Identifier"===t.type&&"this"===t.name}}{constructor(t,e){super(t=function(t){const e={};for(const s of Object.keys(Qa))e[s]=t&&null!=t[s]?t[s]:Qa[s];return e}(t),e),this.options=t,this.initializeScopes(),this.plugins=function(t){const e=new Map;for(const s of t){const[t,r]=Array.isArray(s)?s:[s,{}];e.has(t)||e.set(t,r||{})}return e}(this.options.plugins),this.filename=t.sourceFilename}getScopeHandler(){return Fa}parse(){this.enterInitialScopes();const t=this.startNode(),e=this.startNode();return this.nextToken(),t.errors=null,this.parseTopLevel(t,e),t.errors=this.state.errors,t}}function En(t,e){let s=An;return null!=t&&t.plugins&&(!function(t){if(Ga(t,"decorators")){if(Ga(t,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");const e=Ka(t,"decorators","decoratorsBeforeExport");if(null==e)throw new Error("The 'decorators' plugin requires a 'decoratorsBeforeExport' option, whose value must be a boolean. If you are migrating from Babylon/Babel 6 or want to use the old decorators proposal, you should use the 'decorators-legacy' plugin instead of 'decorators'.");if("boolean"!=typeof e)throw new Error("'decoratorsBeforeExport' must be a boolean.")}if(Ga(t,"flow")&&Ga(t,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(Ga(t,"placeholders")&&Ga(t,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(Ga(t,"pipelineOperator")&&!Xa.includes(Ka(t,"pipelineOperator","proposal")))throw new Error("'pipelineOperator' requires 'proposal' option whose value should be one of: "+Xa.map((t=>"'".concat(t,"'"))).join(", "));if(Ga(t,"moduleAttributes")){if(Ga(t,"importAssertions"))throw new Error("Cannot combine importAssertions and moduleAttributes plugins.");if("may-2020"!==Ka(t,"moduleAttributes","version"))throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(Ga(t,"recordAndTuple")&&!Ja.includes(Ka(t,"recordAndTuple","syntaxType")))throw new Error("'recordAndTuple' requires 'syntaxType' option whose value should be one of: "+Ja.map((t=>"'".concat(t,"'"))).join(", "));if(Ga(t,"asyncDoExpressions")&&!Ga(t,"doExpressions")){const t=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw t.missingPlugins="doExpressions",t}}(t.plugins),s=function(t){const e=Ya.filter((e=>Ga(t,e))),s=e.join("/");let r=Cn[s];if(!r){r=An;for(const t of e)r=$a[t](r);Cn[s]=r}return r}(t.plugins)),new s(t,e)}const Cn={};var xn=function(t,e){var s;if("unambiguous"!==(null==(s=e)?void 0:s.sourceType))return En(e,t).parse();e=Object.assign({},e);try{e.sourceType="module";const s=En(e,t),r=s.parse();if(s.sawUnambiguousESM)return r;if(s.ambiguousScriptDifferentAst)try{return e.sourceType="script",En(e,t).parse()}catch(t){}else r.program.sourceType="script";return r}catch(s){try{return e.sourceType="script",En(e,t).parse()}catch(t){}throw s}},Fn=function(t,e){const s=En(e,t);return s.options.strictMode&&(s.state.strict=!0),s.getExpression()},gn=Mi,bn=Object.defineProperty({parse:xn,parseExpression:Fn,tokTypes:gn},"__esModule",{value:!0});const{isNonEmptyArray:Pn}=pe;function Tn(t={}){const{allowComments:e=!0}=t;return function(t){let s;try{s=bn.parseExpression(t,{tokens:!0,ranges:!0})}catch(t){throw wi(t)}if(!e&&Pn(s.comments))throw wn(s.comments[0],"Comment");return Bn(s),s}}function wn(t,e){const[s,r]=[t.loc.start,t.loc.end].map((({line:t,column:e})=>({line:t,column:e+1})));return le("".concat(e," is not allowed in JSON."),{start:s,end:r})}function Bn(t){switch(t.type){case"ArrayExpression":for(const e of t.elements)null!==e&&Bn(e);return;case"ObjectExpression":for(const e of t.properties)Bn(e);return;case"ObjectProperty":if(t.computed)throw wn(t.key,"Computed key");if(t.shorthand)throw wn(t.key,"Shorthand property");return"Identifier"!==t.key.type&&Bn(t.key),void Bn(t.value);case"UnaryExpression":{const{operator:e,argument:s}=t;if("+"!==e&&"-"!==e)throw wn(t,"Operator '".concat(t.operator,"'"));if("NumericLiteral"===s.type||"Identifier"===s.type&&("Infinity"===s.name||"NaN"===s.name))return;throw wn(s,"Operator '".concat(e,"' before '").concat(s.type,"'"))}case"Identifier":if("Infinity"!==t.name&&"NaN"!==t.name&&"undefined"!==t.name)throw wn(t,"Identifier '".concat(t.name,"'"));return;case"TemplateLiteral":if(Pn(t.expressions))throw wn(t.expressions[0],"'TemplateLiteral' with expression");for(const e of t.quasis)Bn(e);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw wn(t,"'".concat(t.type,"'"))}}const Sn=Tn();var Nn={json:Ti({parse:Sn,hasPragma:()=>!0}),json5:Ti(Sn),"json-stringify":Ti({parse:Tn({allowComments:!1}),astFormat:"estree-json"})};const{getNextNonSpaceNonCommentCharacterIndexWithStartIndex:In,getShebang:vn}=pe,kn={sourceType:"module",allowAwaitOutsideFunction:!0,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","v8intrinsic","partialApplication",["decorators",{decoratorsBeforeExport:!1}],"privateIn","importAssertions",["recordAndTuple",{syntaxType:"hash"}],"decimal","classStaticBlock","moduleBlocks","asyncDoExpressions"],tokens:!0,ranges:!0},Ln=[["pipelineOperator",{proposal:"smart"}],["pipelineOperator",{proposal:"minimal"}],["pipelineOperator",{proposal:"fsharp"}]],On=t=>Object.assign({},kn,{plugins:[...kn.plugins,...t]}),Mn=/@(?:no)?flow\b/;function Rn(t,...e){return(s,r,i={})=>{if("babel"===i.parser&&function(t,e){if(e.filepath&&e.filepath.endsWith(".js.flow"))return!0;const s=vn(t);s&&(t=t.slice(s.length));const r=In(t,0);return!1!==r&&(t=t.slice(0,r)),Mn.test(t)}(s,i))return i.parser="babel-flow",_n(s,r,i);let a=e;"script"===i.__babelSourceType&&(a=a.map((t=>Object.assign({},t,{sourceType:"script"})))),s.includes("|>")&&(a=T(Ln.map((t=>a.map((e=>Object.assign({},e,{plugins:[...e.plugins,t]})))))));const{result:n,error:o}=w(...a.map((e=>()=>function(t,e,s){const r=(0,bn[t])(e,s),i=r.errors.find((t=>!Vn.has(t.reasonCode)));if(i)throw i;return r}(t,s,e))));if(!n)throw wi(o);return Br(n,Object.assign({},i,{originalText:s}))}}const jn=Rn("parse",On(["jsx","flow"])),_n=Rn("parse",On(["jsx",["flow",{all:!0,enums:!0}]])),Un=Rn("parse",On(["jsx","typescript"]),On(["typescript"])),qn=Rn("parseExpression",On(["jsx"])),Vn=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","EmptyTypeArguments","EmptyTypeParameters","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","UnexpectedParameterModifier","MixedLabeledAndUnlabeledElements","InvalidTupleMemberLabel","NonClassMethodPropertyHasAbstractModifer","ReadonlyForMethodSignature","ClassMethodHasDeclare","ClassMethodHasReadonly","InvalidModifierOnTypeMember","DuplicateAccessibilityModifier","IndexSignatureHasDeclare","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","LineTerminatorBeforeArrow","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","UnsupportedPropertyDecorator","OptionalTypeBeforeRequired","PatternIsOptional","OptionalBindingPattern","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","DeclareFunctionHasImplementation","ConstructorClassField","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport"]),Hn=Ti(jn),zn=Ti(qn);return{parsers:Object.assign({babel:Hn,"babel-flow":Ti(_n),"babel-ts":Ti(Un)},Nn,{__js_expression:zn,__vue_expression:zn,__vue_event_binding:Hn})}}));