forge-sync 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js ADDED
@@ -0,0 +1,48 @@
1
+ #!/usr/bin/env node
2
+ "use strict";var Mn=Object.create;var ue=Object.defineProperty;var jn=Object.getOwnPropertyDescriptor;var $n=Object.getOwnPropertyNames;var Fn=Object.getPrototypeOf,Bn=Object.prototype.hasOwnProperty;var Ds=(l,f)=>()=>(l&&(f=l(l=0)),f);var qn=(l,f)=>()=>(f||l((f={exports:{}}).exports,f),f.exports),Je=(l,f)=>{for(var x in f)ue(l,x,{get:f[x],enumerable:!0})},Vs=(l,f,x,_)=>{if(f&&typeof f=="object"||typeof f=="function")for(let g of $n(f))!Bn.call(l,g)&&g!==x&&ue(l,g,{get:()=>f[g],enumerable:!(_=jn(f,g))||_.enumerable});return l};var Ot=(l,f,x)=>(x=l!=null?Mn(Fn(l)):{},Vs(f||!l||!l.__esModule?ue(x,"default",{value:l,enumerable:!0}):x,l)),Wn=l=>Vs(ue({},"__esModule",{value:!0}),l);var Ms=qn((aa,Us)=>{"use strict";(()=>{var l={"./node_modules/.pnpm/mlly@1.8.0/node_modules/mlly/dist lazy recursive":function(g){function E(C){return Promise.resolve().then(function(){var D=new Error("Cannot find module '"+C+"'");throw D.code="MODULE_NOT_FOUND",D})}E.keys=()=>[],E.resolve=E,E.id="./node_modules/.pnpm/mlly@1.8.0/node_modules/mlly/dist lazy recursive",g.exports=E}},f={};function x(g){var E=f[g];if(E!==void 0)return E.exports;var C=f[g]={exports:{}};return l[g](C,C.exports,x),C.exports}x.n=g=>{var E=g&&g.__esModule?()=>g.default:()=>g;return x.d(E,{a:E}),E},x.d=(g,E)=>{for(var C in E)x.o(E,C)&&!x.o(g,C)&&Object.defineProperty(g,C,{enumerable:!0,get:E[C]})},x.o=(g,E)=>Object.prototype.hasOwnProperty.call(g,E);var _={};(()=>{"use strict";var vs,_s,bs,Es,Ss,ws,Cs,ks,Is,Rs,As,pe,Ps,Ts;x.d(_,{default:()=>ys});let g=require("os");var E=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239],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,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],D="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",G={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},et="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",Q={5:et,"5module":et+" export import",6:et+" const class extends export import super"},V=/^in(stanceof)?$/,F=new RegExp("["+D+"]"),N=new RegExp("["+D+"\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\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65]");function B(t,e){for(var i=65536,s=0;s<e.length;s+=2){if((i+=e[s])>t)return!1;if((i+=e[s+1])>=t)return!0}return!1}function M(t,e){return t<65?t===36:t<91||(t<97?t===95:t<123||(t<=65535?t>=170&&F.test(String.fromCharCode(t)):e!==!1&&B(t,C)))}function H(t,e){return t<48?t===36:t<58||!(t<65)&&(t<91||(t<97?t===95:t<123||(t<=65535?t>=170&&N.test(String.fromCharCode(t)):e!==!1&&(B(t,C)||B(t,E)))))}var R=function(t,e){e===void 0&&(e={}),this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop||null,this.updateContext=null};function Z(t,e){return new R(t,{beforeExpr:!0,binop:e})}var q={beforeExpr:!0},X={startsExpr:!0},_e={};function P(t,e){return e===void 0&&(e={}),e.keyword=t,_e[t]=new R(t,e)}var n={num:new R("num",X),regexp:new R("regexp",X),string:new R("string",X),name:new R("name",X),privateId:new R("privateId",X),eof:new R("eof"),bracketL:new R("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new R("]"),braceL:new R("{",{beforeExpr:!0,startsExpr:!0}),braceR:new R("}"),parenL:new R("(",{beforeExpr:!0,startsExpr:!0}),parenR:new R(")"),comma:new R(",",q),semi:new R(";",q),colon:new R(":",q),dot:new R("."),question:new R("?",q),questionDot:new R("?."),arrow:new R("=>",q),template:new R("template"),invalidTemplate:new R("invalidTemplate"),ellipsis:new R("...",q),backQuote:new R("`",X),dollarBraceL:new R("${",{beforeExpr:!0,startsExpr:!0}),eq:new R("=",{beforeExpr:!0,isAssign:!0}),assign:new R("_=",{beforeExpr:!0,isAssign:!0}),incDec:new R("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new R("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:Z("||",1),logicalAND:Z("&&",2),bitwiseOR:Z("|",3),bitwiseXOR:Z("^",4),bitwiseAND:Z("&",5),equality:Z("==/!=/===/!==",6),relational:Z("</>/<=/>=",7),bitShift:Z("<</>>/>>>",8),plusMin:new R("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:Z("%",10),star:Z("*",10),slash:Z("/",10),starstar:new R("**",{beforeExpr:!0}),coalesce:Z("??",1),_break:P("break"),_case:P("case",q),_catch:P("catch"),_continue:P("continue"),_debugger:P("debugger"),_default:P("default",q),_do:P("do",{isLoop:!0,beforeExpr:!0}),_else:P("else",q),_finally:P("finally"),_for:P("for",{isLoop:!0}),_function:P("function",X),_if:P("if"),_return:P("return",q),_switch:P("switch"),_throw:P("throw",q),_try:P("try"),_var:P("var"),_const:P("const"),_while:P("while",{isLoop:!0}),_with:P("with"),_new:P("new",{beforeExpr:!0,startsExpr:!0}),_this:P("this",X),_super:P("super",X),_class:P("class",X),_extends:P("extends",q),_export:P("export"),_import:P("import",X),_null:P("null",X),_true:P("true",X),_false:P("false",X),_in:P("in",{beforeExpr:!0,binop:7}),_instanceof:P("instanceof",{beforeExpr:!0,binop:7}),_typeof:P("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:P("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:P("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},tt=/\r\n?|\n|\u2028|\u2029/,cr=new RegExp(tt.source,"g");function wt(t){return t===10||t===13||t===8232||t===8233}function ri(t,e,i){i===void 0&&(i=t.length);for(var s=e;s<i;s++){var r=t.charCodeAt(s);if(wt(r))return s<i-1&&r===13&&t.charCodeAt(s+1)===10?s+2:s+1}return-1}var ni=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,K=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,ai=Object.prototype,hr=ai.hasOwnProperty,pr=ai.toString,Ct=Object.hasOwn||function(t,e){return hr.call(t,e)},oi=Array.isArray||function(t){return pr.call(t)==="[object Array]"},ci=Object.create(null);function ut(t){return ci[t]||(ci[t]=new RegExp("^(?:"+t.replace(/ /g,"|")+")$"))}function ct(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}var lr=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Vt=function(t,e){this.line=t,this.column=e};Vt.prototype.offset=function(t){return new Vt(this.line,this.column+t)};var Yt=function(t,e,i){this.start=e,this.end=i,t.sourceFile!==null&&(this.source=t.sourceFile)};function hi(t,e){for(var i=1,s=0;;){var r=ri(t,s,e);if(r<0)return new Vt(i,e-s);++i,s=r}}var be={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},pi=!1;function ur(t){var e={};for(var i in be)e[i]=t&&Ct(t,i)?t[i]:be[i];if(e.ecmaVersion==="latest"?e.ecmaVersion=1e8:e.ecmaVersion==null?(!pi&&typeof console=="object"&&console.warn&&(pi=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
3
+ Defaulting to 2020, but this will stop working in the future.`)),e.ecmaVersion=11):e.ecmaVersion>=2015&&(e.ecmaVersion-=2009),e.allowReserved==null&&(e.allowReserved=e.ecmaVersion<5),t&&t.allowHashBang!=null||(e.allowHashBang=e.ecmaVersion>=14),oi(e.onToken)){var s=e.onToken;e.onToken=function(r){return s.push(r)}}return oi(e.onComment)&&(e.onComment=(function(r,a){return function(o,c,h,u,p,m){var d={type:o?"Block":"Line",value:c,start:h,end:u};r.locations&&(d.loc=new Yt(this,p,m)),r.ranges&&(d.range=[h,u]),a.push(d)}})(e,e.onComment)),e}var fr=256,li=259;function Ee(t,e){return 2|(t?4:0)|(e?8:0)}var W=function(t,e,i){this.options=t=ur(t),this.sourceFile=t.sourceFile,this.keywords=ut(Q[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var s="";t.allowReserved!==!0&&(s=G[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(s+=" await")),this.reservedWords=ut(s);var r=(s?s+" ":"")+G.strict;this.reservedWordsStrict=ut(r),this.reservedWordsStrictBind=ut(r+" "+G.strictBind),this.input=String(e),this.containsEsc=!1,i?(this.pos=i,this.lineStart=this.input.lastIndexOf(`
4
+ `,i-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(tt).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=n.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null,this.privateNameStack=[]},nt={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};W.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)},nt.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},nt.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},nt.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},nt.canAwait.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t].flags;if(768&e)return!1;if(2&e)return(4&e)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},nt.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0||this.options.allowSuperOutsideMethod},nt.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},nt.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},nt.allowNewDotTarget.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t].flags;if(768&e||2&e&&!(16&e))return!0}return!1},nt.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&fr)>0},W.extend=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];for(var i=this,s=0;s<t.length;s++)i=t[s](i);return i},W.parse=function(t,e){return new this(e,t).parse()},W.parseExpressionAt=function(t,e,i){var s=new this(i,t,e);return s.nextToken(),s.parseExpression()},W.tokenizer=function(t,e){return new this(e,t)},Object.defineProperties(W.prototype,nt);var z=W.prototype,dr=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;z.strictDirective=function(t){if(this.options.ecmaVersion<5)return!1;for(;;){K.lastIndex=t,t+=K.exec(this.input)[0].length;var e=dr.exec(this.input.slice(t));if(!e)return!1;if((e[1]||e[2])==="use strict"){K.lastIndex=t+e[0].length;var i=K.exec(this.input),s=i.index+i[0].length,r=this.input.charAt(s);return r===";"||r==="}"||tt.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(r)||r==="!"&&this.input.charAt(s+1)==="=")}t+=e[0].length,K.lastIndex=t,t+=K.exec(this.input)[0].length,this.input[t]===";"&&t++}},z.eat=function(t){return this.type===t&&(this.next(),!0)},z.isContextual=function(t){return this.type===n.name&&this.value===t&&!this.containsEsc},z.eatContextual=function(t){return!!this.isContextual(t)&&(this.next(),!0)},z.expectContextual=function(t){this.eatContextual(t)||this.unexpected()},z.canInsertSemicolon=function(){return this.type===n.eof||this.type===n.braceR||tt.test(this.input.slice(this.lastTokEnd,this.start))},z.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},z.semicolon=function(){this.eat(n.semi)||this.insertSemicolon()||this.unexpected()},z.afterTrailingComma=function(t,e){if(this.type===t)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),e||this.next(),!0},z.expect=function(t){this.eat(t)||this.unexpected()},z.unexpected=function(t){this.raise(t!=null?t:this.start,"Unexpected token")};var Qt=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};z.checkPatternErrors=function(t,e){if(t){t.trailingComma>-1&&this.raiseRecoverable(t.trailingComma,"Comma is not permitted after the rest element");var i=e?t.parenthesizedAssign:t.parenthesizedBind;i>-1&&this.raiseRecoverable(i,e?"Assigning to rvalue":"Parenthesized pattern")}},z.checkExpressionErrors=function(t,e){if(!t)return!1;var i=t.shorthandAssign,s=t.doubleProto;if(!e)return i>=0||s>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),s>=0&&this.raiseRecoverable(s,"Redefinition of __proto__ property")},z.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},z.isSimpleAssignTarget=function(t){return t.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(t.expression):t.type==="Identifier"||t.type==="MemberExpression"};var v=W.prototype;v.parseTopLevel=function(t){var e=Object.create(null);for(t.body||(t.body=[]);this.type!==n.eof;){var i=this.parseStatement(null,!0,e);t.body.push(i)}if(this.inModule)for(var s=0,r=Object.keys(this.undefinedExports);s<r.length;s+=1){var a=r[s];this.raiseRecoverable(this.undefinedExports[a].start,"Export '"+a+"' is not defined")}return this.adaptDirectivePrologue(t.body),this.next(),t.sourceType=this.options.sourceType,this.finishNode(t,"Program")};var Se={kind:"loop"},mr={kind:"switch"};v.isLet=function(t){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;K.lastIndex=this.pos;var e=K.exec(this.input),i=this.pos+e[0].length,s=this.input.charCodeAt(i);if(s===91||s===92)return!0;if(t)return!1;if(s===123||s>55295&&s<56320)return!0;if(M(s,!0)){for(var r=i+1;H(s=this.input.charCodeAt(r),!0);)++r;if(s===92||s>55295&&s<56320)return!0;var a=this.input.slice(i,r);if(!V.test(a))return!0}return!1},v.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;K.lastIndex=this.pos;var t,e=K.exec(this.input),i=this.pos+e[0].length;return!(tt.test(this.input.slice(this.pos,i))||this.input.slice(i,i+8)!=="function"||i+8!==this.input.length&&(H(t=this.input.charCodeAt(i+8))||t>55295&&t<56320))},v.isUsingKeyword=function(t,e){if(this.options.ecmaVersion<17||!this.isContextual(t?"await":"using"))return!1;K.lastIndex=this.pos;var i=K.exec(this.input),s=this.pos+i[0].length;if(tt.test(this.input.slice(this.pos,s)))return!1;if(t){var r,a=s+5;if(this.input.slice(s,a)!=="using"||a===this.input.length||H(r=this.input.charCodeAt(a))||r>55295&&r<56320)return!1;K.lastIndex=a;var o=K.exec(this.input);if(o&&tt.test(this.input.slice(a,a+o[0].length)))return!1}if(e){var c,h=s+2;if(!(this.input.slice(s,h)!=="of"||h!==this.input.length&&(H(c=this.input.charCodeAt(h))||c>55295&&c<56320)))return!1}var u=this.input.charCodeAt(s);return M(u,!0)||u===92},v.isAwaitUsing=function(t){return this.isUsingKeyword(!0,t)},v.isUsing=function(t){return this.isUsingKeyword(!1,t)},v.parseStatement=function(t,e,i){var s,r=this.type,a=this.startNode();switch(this.isLet(t)&&(r=n._var,s="let"),r){case n._break:case n._continue:return this.parseBreakContinueStatement(a,r.keyword);case n._debugger:return this.parseDebuggerStatement(a);case n._do:return this.parseDoStatement(a);case n._for:return this.parseForStatement(a);case n._function:return t&&(this.strict||t!=="if"&&t!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(a,!1,!t);case n._class:return t&&this.unexpected(),this.parseClass(a,!0);case n._if:return this.parseIfStatement(a);case n._return:return this.parseReturnStatement(a);case n._switch:return this.parseSwitchStatement(a);case n._throw:return this.parseThrowStatement(a);case n._try:return this.parseTryStatement(a);case n._const:case n._var:return s=s||this.value,t&&s!=="var"&&this.unexpected(),this.parseVarStatement(a,s);case n._while:return this.parseWhileStatement(a);case n._with:return this.parseWithStatement(a);case n.braceL:return this.parseBlock(!0,a);case n.semi:return this.parseEmptyStatement(a);case n._export:case n._import:if(this.options.ecmaVersion>10&&r===n._import){K.lastIndex=this.pos;var o=K.exec(this.input),c=this.pos+o[0].length,h=this.input.charCodeAt(c);if(h===40||h===46)return this.parseExpressionStatement(a,this.parseExpression())}return this.options.allowImportExportEverywhere||(e||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===n._import?this.parseImport(a):this.parseExport(a,i);default:if(this.isAsyncFunction())return t&&this.unexpected(),this.next(),this.parseFunctionStatement(a,!0,!t);var u=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(u)return e&&this.options.sourceType==="script"&&this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script`"),u==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(a,!1,u),this.semicolon(),this.finishNode(a,"VariableDeclaration");var p=this.value,m=this.parseExpression();return r===n.name&&m.type==="Identifier"&&this.eat(n.colon)?this.parseLabeledStatement(a,p,m,t):this.parseExpressionStatement(a,m)}},v.parseBreakContinueStatement=function(t,e){var i=e==="break";this.next(),this.eat(n.semi)||this.insertSemicolon()?t.label=null:this.type!==n.name?this.unexpected():(t.label=this.parseIdent(),this.semicolon());for(var s=0;s<this.labels.length;++s){var r=this.labels[s];if((t.label==null||r.name===t.label.name)&&(r.kind!=null&&(i||r.kind==="loop")||t.label&&i))break}return s===this.labels.length&&this.raise(t.start,"Unsyntactic "+e),this.finishNode(t,i?"BreakStatement":"ContinueStatement")},v.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")},v.parseDoStatement=function(t){return this.next(),this.labels.push(Se),t.body=this.parseStatement("do"),this.labels.pop(),this.expect(n._while),t.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(n.semi):this.semicolon(),this.finishNode(t,"DoWhileStatement")},v.parseForStatement=function(t){this.next();var e=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Se),this.enterScope(0),this.expect(n.parenL),this.type===n.semi)return e>-1&&this.unexpected(e),this.parseFor(t,null);var i=this.isLet();if(this.type===n._var||this.type===n._const||i){var s=this.startNode(),r=i?"let":this.value;return this.next(),this.parseVar(s,!0,r),this.finishNode(s,"VariableDeclaration"),this.parseForAfterInit(t,s,e)}var a=this.isContextual("let"),o=!1,c=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(c){var h=this.startNode();return this.next(),c==="await using"&&this.next(),this.parseVar(h,!0,c),this.finishNode(h,"VariableDeclaration"),this.parseForAfterInit(t,h,e)}var u=this.containsEsc,p=new Qt,m=this.start,d=e>-1?this.parseExprSubscripts(p,"await"):this.parseExpression(!0,p);return this.type===n._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(e>-1?(this.type===n._in&&this.unexpected(e),t.await=!0):o&&this.options.ecmaVersion>=8&&(d.start!==m||u||d.type!=="Identifier"||d.name!=="async"?this.options.ecmaVersion>=9&&(t.await=!1):this.unexpected()),a&&o&&this.raise(d.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(d,!1,p),this.checkLValPattern(d),this.parseForIn(t,d)):(this.checkExpressionErrors(p,!0),e>-1&&this.unexpected(e),this.parseFor(t,d))},v.parseForAfterInit=function(t,e,i){return(this.type===n._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&e.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===n._in?i>-1&&this.unexpected(i):t.await=i>-1),this.parseForIn(t,e)):(i>-1&&this.unexpected(i),this.parseFor(t,e))},v.parseFunctionStatement=function(t,e,i){return this.next(),this.parseFunction(t,Ut|(i?0:we),!1,e)},v.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(n._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")},v.parseReturnStatement=function(t){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(n.semi)||this.insertSemicolon()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")},v.parseSwitchStatement=function(t){var e;this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(n.braceL),this.labels.push(mr),this.enterScope(0);for(var i=!1;this.type!==n.braceR;)if(this.type===n._case||this.type===n._default){var s=this.type===n._case;e&&this.finishNode(e,"SwitchCase"),t.cases.push(e=this.startNode()),e.consequent=[],this.next(),s?e.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,e.test=null),this.expect(n.colon)}else e||this.unexpected(),e.consequent.push(this.parseStatement(null));return this.exitScope(),e&&this.finishNode(e,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(t,"SwitchStatement")},v.parseThrowStatement=function(t){return this.next(),tt.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var gr=[];v.parseCatchClauseParam=function(){var t=this.parseBindingAtom(),e=t.type==="Identifier";return this.enterScope(e?32:0),this.checkLValPattern(t,e?4:2),this.expect(n.parenR),t},v.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===n._catch){var e=this.startNode();this.next(),this.eat(n.parenL)?e.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),e.param=null,this.enterScope(0)),e.body=this.parseBlock(!1),this.exitScope(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(n._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")},v.parseVarStatement=function(t,e,i){return this.next(),this.parseVar(t,!1,e,i),this.semicolon(),this.finishNode(t,"VariableDeclaration")},v.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(Se),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")},v.parseWithStatement=function(t){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement("with"),this.finishNode(t,"WithStatement")},v.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")},v.parseLabeledStatement=function(t,e,i,s){for(var r=0,a=this.labels;r<a.length;r+=1)a[r].name===e&&this.raise(i.start,"Label '"+e+"' is already declared");for(var o=this.type.isLoop?"loop":this.type===n._switch?"switch":null,c=this.labels.length-1;c>=0;c--){var h=this.labels[c];if(h.statementStart!==t.start)break;h.statementStart=this.start,h.kind=o}return this.labels.push({name:e,kind:o,statementStart:this.start}),t.body=this.parseStatement(s?s.indexOf("label")===-1?s+"label":s:"label"),this.labels.pop(),t.label=i,this.finishNode(t,"LabeledStatement")},v.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")},v.parseBlock=function(t,e,i){for(t===void 0&&(t=!0),e===void 0&&(e=this.startNode()),e.body=[],this.expect(n.braceL),t&&this.enterScope(0);this.type!==n.braceR;){var s=this.parseStatement(null);e.body.push(s)}return i&&(this.strict=!1),this.next(),t&&this.exitScope(),this.finishNode(e,"BlockStatement")},v.parseFor=function(t,e){return t.init=e,this.expect(n.semi),t.test=this.type===n.semi?null:this.parseExpression(),this.expect(n.semi),t.update=this.type===n.parenR?null:this.parseExpression(),this.expect(n.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")},v.parseForIn=function(t,e){var i=this.type===n._in;return this.next(),e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!i||this.options.ecmaVersion<8||this.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(e.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer"),t.left=e,t.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(n.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,i?"ForInStatement":"ForOfStatement")},v.parseVar=function(t,e,i,s){for(t.declarations=[],t.kind=i;;){var r=this.startNode();if(this.parseVarId(r,i),this.eat(n.eq)?r.init=this.parseMaybeAssign(e):s||i!=="const"||this.type===n._in||this.options.ecmaVersion>=6&&this.isContextual("of")?s||i!=="using"&&i!=="await using"||!(this.options.ecmaVersion>=17)||this.type===n._in||this.isContextual("of")?s||r.id.type==="Identifier"||e&&(this.type===n._in||this.isContextual("of"))?r.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.raise(this.lastTokEnd,"Missing initializer in "+i+" declaration"):this.unexpected(),t.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(n.comma))break}return t},v.parseVarId=function(t,e){t.id=e==="using"||e==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(t.id,e==="var"?1:2,!1)};var Ut=1,we=2;function xr(t,e){var i=e.key.name,s=t[i],r="true";return e.type!=="MethodDefinition"||e.kind!=="get"&&e.kind!=="set"||(r=(e.static?"s":"i")+e.kind),s==="iget"&&r==="iset"||s==="iset"&&r==="iget"||s==="sget"&&r==="sset"||s==="sset"&&r==="sget"?(t[i]="true",!1):!!s||(t[i]=r,!1)}function Zt(t,e){var i=t.computed,s=t.key;return!i&&(s.type==="Identifier"&&s.name===e||s.type==="Literal"&&s.value===e)}v.parseFunction=function(t,e,i,s,r){this.initFunction(t),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!s)&&(this.type===n.star&&e&we&&this.unexpected(),t.generator=this.eat(n.star)),this.options.ecmaVersion>=8&&(t.async=!!s),e&Ut&&(t.id=4&e&&this.type!==n.name?null:this.parseIdent(),!t.id||e&we||this.checkLValSimple(t.id,this.strict||t.generator||t.async?this.treatFunctionsAsVar?1:2:3));var a=this.yieldPos,o=this.awaitPos,c=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Ee(t.async,t.generator)),e&Ut||(t.id=this.type===n.name?this.parseIdent():null),this.parseFunctionParams(t),this.parseFunctionBody(t,i,!1,r),this.yieldPos=a,this.awaitPos=o,this.awaitIdentPos=c,this.finishNode(t,e&Ut?"FunctionDeclaration":"FunctionExpression")},v.parseFunctionParams=function(t){this.expect(n.parenL),t.params=this.parseBindingList(n.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},v.parseClass=function(t,e){this.next();var i=this.strict;this.strict=!0,this.parseClassId(t,e),this.parseClassSuper(t);var s=this.enterClassBody(),r=this.startNode(),a=!1;for(r.body=[],this.expect(n.braceL);this.type!==n.braceR;){var o=this.parseClassElement(t.superClass!==null);o&&(r.body.push(o),o.type==="MethodDefinition"&&o.kind==="constructor"?(a&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),a=!0):o.key&&o.key.type==="PrivateIdentifier"&&xr(s,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=i,this.next(),t.body=this.finishNode(r,"ClassBody"),this.exitClassBody(),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")},v.parseClassElement=function(t){if(this.eat(n.semi))return null;var e=this.options.ecmaVersion,i=this.startNode(),s="",r=!1,a=!1,o="method",c=!1;if(this.eatContextual("static")){if(e>=13&&this.eat(n.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===n.star?c=!0:s="static"}if(i.static=c,!s&&e>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==n.star||this.canInsertSemicolon()?s="async":a=!0),!s&&(e>=9||!a)&&this.eat(n.star)&&(r=!0),!s&&!a&&!r){var h=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=h:s=h)}if(s?(i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=s,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),e<13||this.type===n.parenL||o!=="method"||r||a){var u=!i.static&&Zt(i,"constructor"),p=u&&t;u&&o!=="method"&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=u?"constructor":o,this.parseClassMethod(i,r,a,p)}else this.parseClassField(i);return i},v.isClassElementNameStart=function(){return this.type===n.name||this.type===n.privateId||this.type===n.num||this.type===n.string||this.type===n.bracketL||this.type.keyword},v.parseClassElementName=function(t){this.type===n.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),t.computed=!1,t.key=this.parsePrivateIdent()):this.parsePropertyName(t)},v.parseClassMethod=function(t,e,i,s){var r=t.key;t.kind==="constructor"?(e&&this.raise(r.start,"Constructor can't be a generator"),i&&this.raise(r.start,"Constructor can't be an async method")):t.static&&Zt(t,"prototype")&&this.raise(r.start,"Classes may not have a static property named prototype");var a=t.value=this.parseMethod(e,i,s);return t.kind==="get"&&a.params.length!==0&&this.raiseRecoverable(a.start,"getter should have no params"),t.kind==="set"&&a.params.length!==1&&this.raiseRecoverable(a.start,"setter should have exactly one param"),t.kind==="set"&&a.params[0].type==="RestElement"&&this.raiseRecoverable(a.params[0].start,"Setter cannot use rest params"),this.finishNode(t,"MethodDefinition")},v.parseClassField=function(t){return Zt(t,"constructor")?this.raise(t.key.start,"Classes can't have a field named 'constructor'"):t.static&&Zt(t,"prototype")&&this.raise(t.key.start,"Classes can't have a static field named 'prototype'"),this.eat(n.eq)?(this.enterScope(576),t.value=this.parseMaybeAssign(),this.exitScope()):t.value=null,this.semicolon(),this.finishNode(t,"PropertyDefinition")},v.parseClassStaticBlock=function(t){t.body=[];var e=this.labels;for(this.labels=[],this.enterScope(320);this.type!==n.braceR;){var i=this.parseStatement(null);t.body.push(i)}return this.next(),this.exitScope(),this.labels=e,this.finishNode(t,"StaticBlock")},v.parseClassId=function(t,e){this.type===n.name?(t.id=this.parseIdent(),e&&this.checkLValSimple(t.id,2,!1)):(e===!0&&this.unexpected(),t.id=null)},v.parseClassSuper=function(t){t.superClass=this.eat(n._extends)?this.parseExprSubscripts(null,!1):null},v.enterClassBody=function(){var t={declared:Object.create(null),used:[]};return this.privateNameStack.push(t),t.declared},v.exitClassBody=function(){var t=this.privateNameStack.pop(),e=t.declared,i=t.used;if(this.options.checkPrivateFields)for(var s=this.privateNameStack.length,r=s===0?null:this.privateNameStack[s-1],a=0;a<i.length;++a){var o=i[a];Ct(e,o.name)||(r?r.used.push(o):this.raiseRecoverable(o.start,"Private field '#"+o.name+"' must be declared in an enclosing class"))}},v.parseExportAllDeclaration=function(t,e){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(t.exported=this.parseModuleExportName(),this.checkExport(e,t.exported,this.lastTokStart)):t.exported=null),this.expectContextual("from"),this.type!==n.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ExportAllDeclaration")},v.parseExport=function(t,e){if(this.next(),this.eat(n.star))return this.parseExportAllDeclaration(t,e);if(this.eat(n._default))return this.checkExport(e,"default",this.lastTokStart),t.declaration=this.parseExportDefaultDeclaration(),this.finishNode(t,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())t.declaration=this.parseExportDeclaration(t),t.declaration.type==="VariableDeclaration"?this.checkVariableExport(e,t.declaration.declarations):this.checkExport(e,t.declaration.id,t.declaration.id.start),t.specifiers=[],t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[]);else{if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))this.type!==n.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause());else{for(var i=0,s=t.specifiers;i<s.length;i+=1){var r=s[i];this.checkUnreserved(r.local),this.checkLocalExport(r.local),r.local.type==="Literal"&&this.raise(r.local.start,"A string literal cannot be used as an exported binding without `from`.")}t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[])}this.semicolon()}return this.finishNode(t,"ExportNamedDeclaration")},v.parseExportDeclaration=function(t){return this.parseStatement(null)},v.parseExportDefaultDeclaration=function(){var t;if(this.type===n._function||(t=this.isAsyncFunction())){var e=this.startNode();return this.next(),t&&this.next(),this.parseFunction(e,4|Ut,!1,t)}if(this.type===n._class){var i=this.startNode();return this.parseClass(i,"nullableID")}var s=this.parseMaybeAssign();return this.semicolon(),s},v.checkExport=function(t,e,i){t&&(typeof e!="string"&&(e=e.type==="Identifier"?e.name:e.value),Ct(t,e)&&this.raiseRecoverable(i,"Duplicate export '"+e+"'"),t[e]=!0)},v.checkPatternExport=function(t,e){var i=e.type;if(i==="Identifier")this.checkExport(t,e,e.start);else if(i==="ObjectPattern")for(var s=0,r=e.properties;s<r.length;s+=1){var a=r[s];this.checkPatternExport(t,a)}else if(i==="ArrayPattern")for(var o=0,c=e.elements;o<c.length;o+=1){var h=c[o];h&&this.checkPatternExport(t,h)}else i==="Property"?this.checkPatternExport(t,e.value):i==="AssignmentPattern"?this.checkPatternExport(t,e.left):i==="RestElement"&&this.checkPatternExport(t,e.argument)},v.checkVariableExport=function(t,e){if(t)for(var i=0,s=e;i<s.length;i+=1){var r=s[i];this.checkPatternExport(t,r.id)}},v.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()},v.parseExportSpecifier=function(t){var e=this.startNode();return e.local=this.parseModuleExportName(),e.exported=this.eatContextual("as")?this.parseModuleExportName():e.local,this.checkExport(t,e.exported,e.exported.start),this.finishNode(e,"ExportSpecifier")},v.parseExportSpecifiers=function(t){var e=[],i=!0;for(this.expect(n.braceL);!this.eat(n.braceR);){if(i)i=!1;else if(this.expect(n.comma),this.afterTrailingComma(n.braceR))break;e.push(this.parseExportSpecifier(t))}return e},v.parseImport=function(t){return this.next(),this.type===n.string?(t.specifiers=gr,t.source=this.parseExprAtom()):(t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.type===n.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ImportDeclaration")},v.parseImportSpecifier=function(){var t=this.startNode();return t.imported=this.parseModuleExportName(),this.eatContextual("as")?t.local=this.parseIdent():(this.checkUnreserved(t.imported),t.local=t.imported),this.checkLValSimple(t.local,2),this.finishNode(t,"ImportSpecifier")},v.parseImportDefaultSpecifier=function(){var t=this.startNode();return t.local=this.parseIdent(),this.checkLValSimple(t.local,2),this.finishNode(t,"ImportDefaultSpecifier")},v.parseImportNamespaceSpecifier=function(){var t=this.startNode();return this.next(),this.expectContextual("as"),t.local=this.parseIdent(),this.checkLValSimple(t.local,2),this.finishNode(t,"ImportNamespaceSpecifier")},v.parseImportSpecifiers=function(){var t=[],e=!0;if(this.type===n.name&&(t.push(this.parseImportDefaultSpecifier()),!this.eat(n.comma)))return t;if(this.type===n.star)return t.push(this.parseImportNamespaceSpecifier()),t;for(this.expect(n.braceL);!this.eat(n.braceR);){if(e)e=!1;else if(this.expect(n.comma),this.afterTrailingComma(n.braceR))break;t.push(this.parseImportSpecifier())}return t},v.parseWithClause=function(){var t=[];if(!this.eat(n._with))return t;this.expect(n.braceL);for(var e={},i=!0;!this.eat(n.braceR);){if(i)i=!1;else if(this.expect(n.comma),this.afterTrailingComma(n.braceR))break;var s=this.parseImportAttribute(),r=s.key.type==="Identifier"?s.key.name:s.key.value;Ct(e,r)&&this.raiseRecoverable(s.key.start,"Duplicate attribute key '"+r+"'"),e[r]=!0,t.push(s)}return t},v.parseImportAttribute=function(){var t=this.startNode();return t.key=this.type===n.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(n.colon),this.type!==n.string&&this.unexpected(),t.value=this.parseExprAtom(),this.finishNode(t,"ImportAttribute")},v.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===n.string){var t=this.parseLiteral(this.value);return lr.test(t.value)&&this.raise(t.start,"An export name cannot include a lone surrogate."),t}return this.parseIdent(!0)},v.adaptDirectivePrologue=function(t){for(var e=0;e<t.length&&this.isDirectiveCandidate(t[e]);++e)t[e].directive=t[e].expression.raw.slice(1,-1)},v.isDirectiveCandidate=function(t){return this.options.ecmaVersion>=5&&t.type==="ExpressionStatement"&&t.expression.type==="Literal"&&typeof t.expression.value=="string"&&(this.input[t.start]==='"'||this.input[t.start]==="'")};var it=W.prototype;it.toAssignable=function(t,e,i){if(this.options.ecmaVersion>=6&&t)switch(t.type){case"Identifier":this.inAsync&&t.name==="await"&&this.raise(t.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var s=0,r=t.properties;s<r.length;s+=1){var a=r[s];this.toAssignable(a,e),a.type!=="RestElement"||a.argument.type!=="ArrayPattern"&&a.argument.type!=="ObjectPattern"||this.raise(a.argument.start,"Unexpected token")}break;case"Property":t.kind!=="init"&&this.raise(t.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(t.value,e);break;case"ArrayExpression":t.type="ArrayPattern",i&&this.checkPatternErrors(i,!0),this.toAssignableList(t.elements,e);break;case"SpreadElement":t.type="RestElement",this.toAssignable(t.argument,e),t.argument.type==="AssignmentPattern"&&this.raise(t.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":t.operator!=="="&&this.raise(t.left.end,"Only '=' operator can be used for specifying default value."),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(t.expression,e,i);break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!e)break;default:this.raise(t.start,"Assigning to rvalue")}else i&&this.checkPatternErrors(i,!0);return t},it.toAssignableList=function(t,e){for(var i=t.length,s=0;s<i;s++){var r=t[s];r&&this.toAssignable(r,e)}if(i){var a=t[i-1];this.options.ecmaVersion===6&&e&&a&&a.type==="RestElement"&&a.argument.type!=="Identifier"&&this.unexpected(a.argument.start)}return t},it.parseSpread=function(t){var e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(!1,t),this.finishNode(e,"SpreadElement")},it.parseRestBinding=function(){var t=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==n.name&&this.unexpected(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")},it.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case n.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(n.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case n.braceL:return this.parseObj(!0)}return this.parseIdent()},it.parseBindingList=function(t,e,i,s){for(var r=[],a=!0;!this.eat(t);)if(a?a=!1:this.expect(n.comma),e&&this.type===n.comma)r.push(null);else{if(i&&this.afterTrailingComma(t))break;if(this.type===n.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),r.push(o),this.type===n.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(t);break}r.push(this.parseAssignableListItem(s))}return r},it.parseAssignableListItem=function(t){var e=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(e),e},it.parseBindingListItem=function(t){return t},it.parseMaybeDefault=function(t,e,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(n.eq))return i;var s=this.startNodeAt(t,e);return s.left=i,s.right=this.parseMaybeAssign(),this.finishNode(s,"AssignmentPattern")},it.checkLValSimple=function(t,e,i){e===void 0&&(e=0);var s=e!==0;switch(t.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(t.name)&&this.raiseRecoverable(t.start,(s?"Binding ":"Assigning to ")+t.name+" in strict mode"),s&&(e===2&&t.name==="let"&&this.raiseRecoverable(t.start,"let is disallowed as a lexically bound name"),i&&(Ct(i,t.name)&&this.raiseRecoverable(t.start,"Argument name clash"),i[t.name]=!0),e!==5&&this.declareName(t.name,e,t.start));break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":s&&this.raiseRecoverable(t.start,"Binding member expression");break;case"ParenthesizedExpression":return s&&this.raiseRecoverable(t.start,"Binding parenthesized expression"),this.checkLValSimple(t.expression,e,i);default:this.raise(t.start,(s?"Binding":"Assigning to")+" rvalue")}},it.checkLValPattern=function(t,e,i){switch(e===void 0&&(e=0),t.type){case"ObjectPattern":for(var s=0,r=t.properties;s<r.length;s+=1){var a=r[s];this.checkLValInnerPattern(a,e,i)}break;case"ArrayPattern":for(var o=0,c=t.elements;o<c.length;o+=1){var h=c[o];h&&this.checkLValInnerPattern(h,e,i)}break;default:this.checkLValSimple(t,e,i)}},it.checkLValInnerPattern=function(t,e,i){switch(e===void 0&&(e=0),t.type){case"Property":this.checkLValInnerPattern(t.value,e,i);break;case"AssignmentPattern":this.checkLValPattern(t.left,e,i);break;case"RestElement":this.checkLValPattern(t.argument,e,i);break;default:this.checkLValPattern(t,e,i)}};var rt=function(t,e,i,s,r){this.token=t,this.isExpr=!!e,this.preserveSpace=!!i,this.override=s,this.generator=!!r},U={b_stat:new rt("{",!1),b_expr:new rt("{",!0),b_tmpl:new rt("${",!1),p_stat:new rt("(",!1),p_expr:new rt("(",!0),q_tmpl:new rt("`",!0,!0,function(t){return t.tryReadTemplateToken()}),f_stat:new rt("function",!1),f_expr:new rt("function",!0),f_expr_gen:new rt("function",!0,!1,null,!0),f_gen:new rt("function",!1,!1,null,!0)},kt=W.prototype;kt.initialContext=function(){return[U.b_stat]},kt.curContext=function(){return this.context[this.context.length-1]},kt.braceIsBlock=function(t){var e=this.curContext();return e===U.f_expr||e===U.f_stat||(t!==n.colon||e!==U.b_stat&&e!==U.b_expr?t===n._return||t===n.name&&this.exprAllowed?tt.test(this.input.slice(this.lastTokEnd,this.start)):t===n._else||t===n.semi||t===n.eof||t===n.parenR||t===n.arrow||(t===n.braceL?e===U.b_stat:t!==n._var&&t!==n._const&&t!==n.name&&!this.exprAllowed):!e.isExpr)},kt.inGeneratorContext=function(){for(var t=this.context.length-1;t>=1;t--){var e=this.context[t];if(e.token==="function")return e.generator}return!1},kt.updateContext=function(t){var e,i=this.type;i.keyword&&t===n.dot?this.exprAllowed=!1:(e=i.updateContext)?e.call(this,t):this.exprAllowed=i.beforeExpr},kt.overrideContext=function(t){this.curContext()!==t&&(this.context[this.context.length-1]=t)},n.parenR.updateContext=n.braceR.updateContext=function(){if(this.context.length!==1){var t=this.context.pop();t===U.b_stat&&this.curContext().token==="function"&&(t=this.context.pop()),this.exprAllowed=!t.isExpr}else this.exprAllowed=!0},n.braceL.updateContext=function(t){this.context.push(this.braceIsBlock(t)?U.b_stat:U.b_expr),this.exprAllowed=!0},n.dollarBraceL.updateContext=function(){this.context.push(U.b_tmpl),this.exprAllowed=!0},n.parenL.updateContext=function(t){var e=t===n._if||t===n._for||t===n._with||t===n._while;this.context.push(e?U.p_stat:U.p_expr),this.exprAllowed=!0},n.incDec.updateContext=function(){},n._function.updateContext=n._class.updateContext=function(t){!t.beforeExpr||t===n._else||t===n.semi&&this.curContext()!==U.p_stat||t===n._return&&tt.test(this.input.slice(this.lastTokEnd,this.start))||(t===n.colon||t===n.braceL)&&this.curContext()===U.b_stat?this.context.push(U.f_stat):this.context.push(U.f_expr),this.exprAllowed=!1},n.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0},n.backQuote.updateContext=function(){this.curContext()===U.q_tmpl?this.context.pop():this.context.push(U.q_tmpl),this.exprAllowed=!1},n.star.updateContext=function(t){if(t===n._function){var e=this.context.length-1;this.context[e]===U.f_expr?this.context[e]=U.f_expr_gen:this.context[e]=U.f_gen}this.exprAllowed=!0},n.name.updateContext=function(t){var e=!1;this.options.ecmaVersion>=6&&t!==n.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(e=!0),this.exprAllowed=e};var S=W.prototype;function ui(t){return t.type==="Identifier"||t.type==="ParenthesizedExpression"&&ui(t.expression)}function Ce(t){return t.type==="MemberExpression"&&t.property.type==="PrivateIdentifier"||t.type==="ChainExpression"&&Ce(t.expression)||t.type==="ParenthesizedExpression"&&Ce(t.expression)}S.checkPropClash=function(t,e,i){if(!(this.options.ecmaVersion>=9&&t.type==="SpreadElement"||this.options.ecmaVersion>=6&&(t.computed||t.method||t.shorthand))){var s,r=t.key;switch(r.type){case"Identifier":s=r.name;break;case"Literal":s=String(r.value);break;default:return}var a=t.kind;if(this.options.ecmaVersion>=6)s==="__proto__"&&a==="init"&&(e.proto&&(i?i.doubleProto<0&&(i.doubleProto=r.start):this.raiseRecoverable(r.start,"Redefinition of __proto__ property")),e.proto=!0);else{var o=e[s="$"+s];o?(a==="init"?this.strict&&o.init||o.get||o.set:o.init||o[a])&&this.raiseRecoverable(r.start,"Redefinition of property"):o=e[s]={init:!1,get:!1,set:!1},o[a]=!0}}},S.parseExpression=function(t,e){var i=this.start,s=this.startLoc,r=this.parseMaybeAssign(t,e);if(this.type===n.comma){var a=this.startNodeAt(i,s);for(a.expressions=[r];this.eat(n.comma);)a.expressions.push(this.parseMaybeAssign(t,e));return this.finishNode(a,"SequenceExpression")}return r},S.parseMaybeAssign=function(t,e,i){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(t);this.exprAllowed=!1}var s=!1,r=-1,a=-1,o=-1;e?(r=e.parenthesizedAssign,a=e.trailingComma,o=e.doubleProto,e.parenthesizedAssign=e.trailingComma=-1):(e=new Qt,s=!0);var c=this.start,h=this.startLoc;this.type!==n.parenL&&this.type!==n.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=t==="await");var u=this.parseMaybeConditional(t,e);if(i&&(u=i.call(this,u,c,h)),this.type.isAssign){var p=this.startNodeAt(c,h);return p.operator=this.value,this.type===n.eq&&(u=this.toAssignable(u,!1,e)),s||(e.parenthesizedAssign=e.trailingComma=e.doubleProto=-1),e.shorthandAssign>=u.start&&(e.shorthandAssign=-1),this.type===n.eq?this.checkLValPattern(u):this.checkLValSimple(u),p.left=u,this.next(),p.right=this.parseMaybeAssign(t),o>-1&&(e.doubleProto=o),this.finishNode(p,"AssignmentExpression")}return s&&this.checkExpressionErrors(e,!0),r>-1&&(e.parenthesizedAssign=r),a>-1&&(e.trailingComma=a),u},S.parseMaybeConditional=function(t,e){var i=this.start,s=this.startLoc,r=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return r;if(this.eat(n.question)){var a=this.startNodeAt(i,s);return a.test=r,a.consequent=this.parseMaybeAssign(),this.expect(n.colon),a.alternate=this.parseMaybeAssign(t),this.finishNode(a,"ConditionalExpression")}return r},S.parseExprOps=function(t,e){var i=this.start,s=this.startLoc,r=this.parseMaybeUnary(e,!1,!1,t);return this.checkExpressionErrors(e)||r.start===i&&r.type==="ArrowFunctionExpression"?r:this.parseExprOp(r,i,s,-1,t)},S.parseExprOp=function(t,e,i,s,r){var a=this.type.binop;if(a!=null&&(!r||this.type!==n._in)&&a>s){var o=this.type===n.logicalOR||this.type===n.logicalAND,c=this.type===n.coalesce;c&&(a=n.logicalAND.binop);var h=this.value;this.next();var u=this.start,p=this.startLoc,m=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,r),u,p,a,r),d=this.buildBinary(e,i,t,m,h,o||c);return(o&&this.type===n.coalesce||c&&(this.type===n.logicalOR||this.type===n.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(d,e,i,s,r)}return t},S.buildBinary=function(t,e,i,s,r,a){s.type==="PrivateIdentifier"&&this.raise(s.start,"Private identifier can only be left side of binary expression");var o=this.startNodeAt(t,e);return o.left=i,o.operator=r,o.right=s,this.finishNode(o,a?"LogicalExpression":"BinaryExpression")},S.parseMaybeUnary=function(t,e,i,s){var r,a=this.start,o=this.startLoc;if(this.isContextual("await")&&this.canAwait)r=this.parseAwait(s),e=!0;else if(this.type.prefix){var c=this.startNode(),h=this.type===n.incDec;c.operator=this.value,c.prefix=!0,this.next(),c.argument=this.parseMaybeUnary(null,!0,h,s),this.checkExpressionErrors(t,!0),h?this.checkLValSimple(c.argument):this.strict&&c.operator==="delete"&&ui(c.argument)?this.raiseRecoverable(c.start,"Deleting local variable in strict mode"):c.operator==="delete"&&Ce(c.argument)?this.raiseRecoverable(c.start,"Private fields can not be deleted"):e=!0,r=this.finishNode(c,h?"UpdateExpression":"UnaryExpression")}else if(e||this.type!==n.privateId){if(r=this.parseExprSubscripts(t,s),this.checkExpressionErrors(t))return r;for(;this.type.postfix&&!this.canInsertSemicolon();){var u=this.startNodeAt(a,o);u.operator=this.value,u.prefix=!1,u.argument=r,this.checkLValSimple(r),this.next(),r=this.finishNode(u,"UpdateExpression")}}else(s||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),r=this.parsePrivateIdent(),this.type!==n._in&&this.unexpected();return i||!this.eat(n.starstar)?r:e?void this.unexpected(this.lastTokStart):this.buildBinary(a,o,r,this.parseMaybeUnary(null,!1,!1,s),"**",!1)},S.parseExprSubscripts=function(t,e){var i=this.start,s=this.startLoc,r=this.parseExprAtom(t,e);if(r.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return r;var a=this.parseSubscripts(r,i,s,!1,e);return t&&a.type==="MemberExpression"&&(t.parenthesizedAssign>=a.start&&(t.parenthesizedAssign=-1),t.parenthesizedBind>=a.start&&(t.parenthesizedBind=-1),t.trailingComma>=a.start&&(t.trailingComma=-1)),a},S.parseSubscripts=function(t,e,i,s,r){for(var a=this.options.ecmaVersion>=8&&t.type==="Identifier"&&t.name==="async"&&this.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&this.potentialArrowAt===t.start,o=!1;;){var c=this.parseSubscript(t,e,i,s,a,o,r);if(c.optional&&(o=!0),c===t||c.type==="ArrowFunctionExpression"){if(o){var h=this.startNodeAt(e,i);h.expression=c,c=this.finishNode(h,"ChainExpression")}return c}t=c}},S.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(n.arrow)},S.parseSubscriptAsyncArrow=function(t,e,i,s){return this.parseArrowExpression(this.startNodeAt(t,e),i,!0,s)},S.parseSubscript=function(t,e,i,s,r,a,o){var c=this.options.ecmaVersion>=11,h=c&&this.eat(n.questionDot);s&&h&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var u=this.eat(n.bracketL);if(u||h&&this.type!==n.parenL&&this.type!==n.backQuote||this.eat(n.dot)){var p=this.startNodeAt(e,i);p.object=t,u?(p.property=this.parseExpression(),this.expect(n.bracketR)):this.type===n.privateId&&t.type!=="Super"?p.property=this.parsePrivateIdent():p.property=this.parseIdent(this.options.allowReserved!=="never"),p.computed=!!u,c&&(p.optional=h),t=this.finishNode(p,"MemberExpression")}else if(!s&&this.eat(n.parenL)){var m=new Qt,d=this.yieldPos,w=this.awaitPos,O=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var k=this.parseExprList(n.parenR,this.options.ecmaVersion>=8,!1,m);if(r&&!h&&this.shouldParseAsyncArrow())return this.checkPatternErrors(m,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=d,this.awaitPos=w,this.awaitIdentPos=O,this.parseSubscriptAsyncArrow(e,i,k,o);this.checkExpressionErrors(m,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=w||this.awaitPos,this.awaitIdentPos=O||this.awaitIdentPos;var L=this.startNodeAt(e,i);L.callee=t,L.arguments=k,c&&(L.optional=h),t=this.finishNode(L,"CallExpression")}else if(this.type===n.backQuote){(h||a)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var T=this.startNodeAt(e,i);T.tag=t,T.quasi=this.parseTemplate({isTagged:!0}),t=this.finishNode(T,"TaggedTemplateExpression")}return t},S.parseExprAtom=function(t,e,i){this.type===n.slash&&this.readRegexp();var s,r=this.potentialArrowAt===this.start;switch(this.type){case n._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),s=this.startNode(),this.next(),this.type!==n.parenL||this.allowDirectSuper||this.raise(s.start,"super() call outside constructor of a subclass"),this.type!==n.dot&&this.type!==n.bracketL&&this.type!==n.parenL&&this.unexpected(),this.finishNode(s,"Super");case n._this:return s=this.startNode(),this.next(),this.finishNode(s,"ThisExpression");case n.name:var a=this.start,o=this.startLoc,c=this.containsEsc,h=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!c&&h.name==="async"&&!this.canInsertSemicolon()&&this.eat(n._function))return this.overrideContext(U.f_expr),this.parseFunction(this.startNodeAt(a,o),0,!1,!0,e);if(r&&!this.canInsertSemicolon()){if(this.eat(n.arrow))return this.parseArrowExpression(this.startNodeAt(a,o),[h],!1,e);if(this.options.ecmaVersion>=8&&h.name==="async"&&this.type===n.name&&!c&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return h=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(n.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,o),[h],!0,e)}return h;case n.regexp:var u=this.value;return(s=this.parseLiteral(u.value)).regex={pattern:u.pattern,flags:u.flags},s;case n.num:case n.string:return this.parseLiteral(this.value);case n._null:case n._true:case n._false:return(s=this.startNode()).value=this.type===n._null?null:this.type===n._true,s.raw=this.type.keyword,this.next(),this.finishNode(s,"Literal");case n.parenL:var p=this.start,m=this.parseParenAndDistinguishExpression(r,e);return t&&(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(m)&&(t.parenthesizedAssign=p),t.parenthesizedBind<0&&(t.parenthesizedBind=p)),m;case n.bracketL:return s=this.startNode(),this.next(),s.elements=this.parseExprList(n.bracketR,!0,!0,t),this.finishNode(s,"ArrayExpression");case n.braceL:return this.overrideContext(U.b_expr),this.parseObj(!1,t);case n._function:return s=this.startNode(),this.next(),this.parseFunction(s,0);case n._class:return this.parseClass(this.startNode(),!1);case n._new:return this.parseNew();case n.backQuote:return this.parseTemplate();case n._import:return this.options.ecmaVersion>=11?this.parseExprImport(i):this.unexpected();default:return this.parseExprAtomDefault()}},S.parseExprAtomDefault=function(){this.unexpected()},S.parseExprImport=function(t){var e=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===n.parenL&&!t)return this.parseDynamicImport(e);if(this.type===n.dot){var i=this.startNodeAt(e.start,e.loc&&e.loc.start);return i.name="import",e.meta=this.finishNode(i,"Identifier"),this.parseImportMeta(e)}this.unexpected()},S.parseDynamicImport=function(t){if(this.next(),t.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(n.parenR)?t.options=null:(this.expect(n.comma),this.afterTrailingComma(n.parenR)?t.options=null:(t.options=this.parseMaybeAssign(),this.eat(n.parenR)||(this.expect(n.comma),this.afterTrailingComma(n.parenR)||this.unexpected())));else if(!this.eat(n.parenR)){var e=this.start;this.eat(n.comma)&&this.eat(n.parenR)?this.raiseRecoverable(e,"Trailing comma is not allowed in import()"):this.unexpected(e)}return this.finishNode(t,"ImportExpression")},S.parseImportMeta=function(t){this.next();var e=this.containsEsc;return t.property=this.parseIdent(!0),t.property.name!=="meta"&&this.raiseRecoverable(t.property.start,"The only valid meta property for import is 'import.meta'"),e&&this.raiseRecoverable(t.start,"'import.meta' must not contain escaped characters"),this.options.sourceType==="module"||this.options.allowImportExportEverywhere||this.raiseRecoverable(t.start,"Cannot use 'import.meta' outside a module"),this.finishNode(t,"MetaProperty")},S.parseLiteral=function(t){var e=this.startNode();return e.value=t,e.raw=this.input.slice(this.start,this.end),e.raw.charCodeAt(e.raw.length-1)===110&&(e.bigint=e.value!=null?e.value.toString():e.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(e,"Literal")},S.parseParenExpression=function(){this.expect(n.parenL);var t=this.parseExpression();return this.expect(n.parenR),t},S.shouldParseArrow=function(t){return!this.canInsertSemicolon()},S.parseParenAndDistinguishExpression=function(t,e){var i,s=this.start,r=this.startLoc,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o,c=this.start,h=this.startLoc,u=[],p=!0,m=!1,d=new Qt,w=this.yieldPos,O=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==n.parenR;){if(p?p=!1:this.expect(n.comma),a&&this.afterTrailingComma(n.parenR,!0)){m=!0;break}if(this.type===n.ellipsis){o=this.start,u.push(this.parseParenItem(this.parseRestBinding())),this.type===n.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}u.push(this.parseMaybeAssign(!1,d,this.parseParenItem))}var k=this.lastTokEnd,L=this.lastTokEndLoc;if(this.expect(n.parenR),t&&this.shouldParseArrow(u)&&this.eat(n.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=w,this.awaitPos=O,this.parseParenArrowList(s,r,u,e);u.length&&!m||this.unexpected(this.lastTokStart),o&&this.unexpected(o),this.checkExpressionErrors(d,!0),this.yieldPos=w||this.yieldPos,this.awaitPos=O||this.awaitPos,u.length>1?((i=this.startNodeAt(c,h)).expressions=u,this.finishNodeAt(i,"SequenceExpression",k,L)):i=u[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var T=this.startNodeAt(s,r);return T.expression=i,this.finishNode(T,"ParenthesizedExpression")}return i},S.parseParenItem=function(t){return t},S.parseParenArrowList=function(t,e,i,s){return this.parseArrowExpression(this.startNodeAt(t,e),i,!1,s)};var yr=[];S.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var t=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===n.dot){var e=this.startNodeAt(t.start,t.loc&&t.loc.start);e.name="new",t.meta=this.finishNode(e,"Identifier"),this.next();var i=this.containsEsc;return t.property=this.parseIdent(!0),t.property.name!=="target"&&this.raiseRecoverable(t.property.start,"The only valid meta property for new is 'new.target'"),i&&this.raiseRecoverable(t.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(t.start,"'new.target' can only be used in functions and class static block"),this.finishNode(t,"MetaProperty")}var s=this.start,r=this.startLoc;return t.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),s,r,!0,!1),this.eat(n.parenL)?t.arguments=this.parseExprList(n.parenR,this.options.ecmaVersion>=8,!1):t.arguments=yr,this.finishNode(t,"NewExpression")},S.parseTemplateElement=function(t){var e=t.isTagged,i=this.startNode();return this.type===n.invalidTemplate?(e||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),i.value={raw:this.value.replace(/\r\n?/g,`
5
+ `),cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
6
+ `),cooked:this.value},this.next(),i.tail=this.type===n.backQuote,this.finishNode(i,"TemplateElement")},S.parseTemplate=function(t){t===void 0&&(t={});var e=t.isTagged;e===void 0&&(e=!1);var i=this.startNode();this.next(),i.expressions=[];var s=this.parseTemplateElement({isTagged:e});for(i.quasis=[s];!s.tail;)this.type===n.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(n.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(n.braceR),i.quasis.push(s=this.parseTemplateElement({isTagged:e}));return this.next(),this.finishNode(i,"TemplateLiteral")},S.isAsyncProp=function(t){return!t.computed&&t.key.type==="Identifier"&&t.key.name==="async"&&(this.type===n.name||this.type===n.num||this.type===n.string||this.type===n.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===n.star)&&!tt.test(this.input.slice(this.lastTokEnd,this.start))},S.parseObj=function(t,e){var i=this.startNode(),s=!0,r={};for(i.properties=[],this.next();!this.eat(n.braceR);){if(s)s=!1;else if(this.expect(n.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(n.braceR))break;var a=this.parseProperty(t,e);t||this.checkPropClash(a,r,e),i.properties.push(a)}return this.finishNode(i,t?"ObjectPattern":"ObjectExpression")},S.parseProperty=function(t,e){var i,s,r,a,o=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(n.ellipsis))return t?(o.argument=this.parseIdent(!1),this.type===n.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(o,"RestElement")):(o.argument=this.parseMaybeAssign(!1,e),this.type===n.comma&&e&&e.trailingComma<0&&(e.trailingComma=this.start),this.finishNode(o,"SpreadElement"));this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(t||e)&&(r=this.start,a=this.startLoc),t||(i=this.eat(n.star)));var c=this.containsEsc;return this.parsePropertyName(o),!t&&!c&&this.options.ecmaVersion>=8&&!i&&this.isAsyncProp(o)?(s=!0,i=this.options.ecmaVersion>=9&&this.eat(n.star),this.parsePropertyName(o)):s=!1,this.parsePropertyValue(o,t,i,s,r,a,e,c),this.finishNode(o,"Property")},S.parseGetterSetter=function(t){var e=t.key.name;this.parsePropertyName(t),t.value=this.parseMethod(!1),t.kind=e;var i=t.kind==="get"?0:1;if(t.value.params.length!==i){var s=t.value.start;t.kind==="get"?this.raiseRecoverable(s,"getter should have no params"):this.raiseRecoverable(s,"setter should have exactly one param")}else t.kind==="set"&&t.value.params[0].type==="RestElement"&&this.raiseRecoverable(t.value.params[0].start,"Setter cannot use rest params")},S.parsePropertyValue=function(t,e,i,s,r,a,o,c){(i||s)&&this.type===n.colon&&this.unexpected(),this.eat(n.colon)?(t.value=e?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),t.kind="init"):this.options.ecmaVersion>=6&&this.type===n.parenL?(e&&this.unexpected(),t.method=!0,t.value=this.parseMethod(i,s),t.kind="init"):e||c||!(this.options.ecmaVersion>=5)||t.computed||t.key.type!=="Identifier"||t.key.name!=="get"&&t.key.name!=="set"||this.type===n.comma||this.type===n.braceR||this.type===n.eq?this.options.ecmaVersion>=6&&!t.computed&&t.key.type==="Identifier"?((i||s)&&this.unexpected(),this.checkUnreserved(t.key),t.key.name!=="await"||this.awaitIdentPos||(this.awaitIdentPos=r),e?t.value=this.parseMaybeDefault(r,a,this.copyNode(t.key)):this.type===n.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),t.value=this.parseMaybeDefault(r,a,this.copyNode(t.key))):t.value=this.copyNode(t.key),t.kind="init",t.shorthand=!0):this.unexpected():((i||s)&&this.unexpected(),this.parseGetterSetter(t))},S.parsePropertyName=function(t){if(this.options.ecmaVersion>=6){if(this.eat(n.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(n.bracketR),t.key;t.computed=!1}return t.key=this.type===n.num||this.type===n.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},S.initFunction=function(t){t.id=null,this.options.ecmaVersion>=6&&(t.generator=t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)},S.parseMethod=function(t,e,i){var s=this.startNode(),r=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(s),this.options.ecmaVersion>=6&&(s.generator=t),this.options.ecmaVersion>=8&&(s.async=!!e),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|Ee(e,s.generator)|(i?128:0)),this.expect(n.parenL),s.params=this.parseBindingList(n.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(s,!1,!0,!1),this.yieldPos=r,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(s,"FunctionExpression")},S.parseArrowExpression=function(t,e,i,s){var r=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(16|Ee(i,!1)),this.initFunction(t),this.options.ecmaVersion>=8&&(t.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,t.params=this.toAssignableList(e,!0),this.parseFunctionBody(t,!0,!1,s),this.yieldPos=r,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(t,"ArrowFunctionExpression")},S.parseFunctionBody=function(t,e,i,s){var r=e&&this.type!==n.braceL,a=this.strict,o=!1;if(r)t.body=this.parseMaybeAssign(s),t.expression=!0,this.checkParams(t,!1);else{var c=this.options.ecmaVersion>=7&&!this.isSimpleParamList(t.params);a&&!c||(o=this.strictDirective(this.end))&&c&&this.raiseRecoverable(t.start,"Illegal 'use strict' directive in function with non-simple parameter list");var h=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(t,!a&&!o&&!e&&!i&&this.isSimpleParamList(t.params)),this.strict&&t.id&&this.checkLValSimple(t.id,5),t.body=this.parseBlock(!1,void 0,o&&!a),t.expression=!1,this.adaptDirectivePrologue(t.body.body),this.labels=h}this.exitScope()},S.isSimpleParamList=function(t){for(var e=0,i=t;e<i.length;e+=1)if(i[e].type!=="Identifier")return!1;return!0},S.checkParams=function(t,e){for(var i=Object.create(null),s=0,r=t.params;s<r.length;s+=1){var a=r[s];this.checkLValInnerPattern(a,1,e?null:i)}},S.parseExprList=function(t,e,i,s){for(var r=[],a=!0;!this.eat(t);){if(a)a=!1;else if(this.expect(n.comma),e&&this.afterTrailingComma(t))break;var o=void 0;i&&this.type===n.comma?o=null:this.type===n.ellipsis?(o=this.parseSpread(s),s&&this.type===n.comma&&s.trailingComma<0&&(s.trailingComma=this.start)):o=this.parseMaybeAssign(!1,s),r.push(o)}return r},S.checkUnreserved=function(t){var e=t.start,i=t.end,s=t.name;this.inGenerator&&s==="yield"&&this.raiseRecoverable(e,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&s==="await"&&this.raiseRecoverable(e,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().flags&li||s!=="arguments"||this.raiseRecoverable(e,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||s!=="arguments"&&s!=="await"||this.raise(e,"Cannot use "+s+" in class static initialization block"),this.keywords.test(s)&&this.raise(e,"Unexpected keyword '"+s+"'"),this.options.ecmaVersion<6&&this.input.slice(e,i).indexOf("\\")!==-1||(this.strict?this.reservedWordsStrict:this.reservedWords).test(s)&&(this.inAsync||s!=="await"||this.raiseRecoverable(e,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(e,"The keyword '"+s+"' is reserved"))},S.parseIdent=function(t){var e=this.parseIdentNode();return this.next(!!t),this.finishNode(e,"Identifier"),t||(this.checkUnreserved(e),e.name!=="await"||this.awaitIdentPos||(this.awaitIdentPos=e.start)),e},S.parseIdentNode=function(){var t=this.startNode();return this.type===n.name?t.name=this.value:this.type.keyword?(t.name=this.type.keyword,t.name!=="class"&&t.name!=="function"||this.lastTokEnd===this.lastTokStart+1&&this.input.charCodeAt(this.lastTokStart)===46||this.context.pop(),this.type=n.name):this.unexpected(),t},S.parsePrivateIdent=function(){var t=this.startNode();return this.type===n.privateId?t.name=this.value:this.unexpected(),this.next(),this.finishNode(t,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(t.start,"Private field '#"+t.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(t)),t},S.parseYield=function(t){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type===n.semi||this.canInsertSemicolon()||this.type!==n.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(n.star),e.argument=this.parseMaybeAssign(t)),this.finishNode(e,"YieldExpression")},S.parseAwait=function(t){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0,!1,t),this.finishNode(e,"AwaitExpression")};var Xt=W.prototype;Xt.raise=function(t,e){var i=hi(this.input,t);e+=" ("+i.line+":"+i.column+")",this.sourceFile&&(e+=" in "+this.sourceFile);var s=new SyntaxError(e);throw s.pos=t,s.loc=i,s.raisedAt=this.pos,s},Xt.raiseRecoverable=Xt.raise,Xt.curPosition=function(){if(this.options.locations)return new Vt(this.curLine,this.pos-this.lineStart)};var ft=W.prototype,vr=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};ft.enterScope=function(t){this.scopeStack.push(new vr(t))},ft.exitScope=function(){this.scopeStack.pop()},ft.treatFunctionsAsVarInScope=function(t){return 2&t.flags||!this.inModule&&1&t.flags},ft.declareName=function(t,e,i){var s=!1;if(e===2){var r=this.currentScope();s=r.lexical.indexOf(t)>-1||r.functions.indexOf(t)>-1||r.var.indexOf(t)>-1,r.lexical.push(t),this.inModule&&1&r.flags&&delete this.undefinedExports[t]}else if(e===4)this.currentScope().lexical.push(t);else if(e===3){var a=this.currentScope();s=this.treatFunctionsAsVar?a.lexical.indexOf(t)>-1:a.lexical.indexOf(t)>-1||a.var.indexOf(t)>-1,a.functions.push(t)}else for(var o=this.scopeStack.length-1;o>=0;--o){var c=this.scopeStack[o];if(c.lexical.indexOf(t)>-1&&!(32&c.flags&&c.lexical[0]===t)||!this.treatFunctionsAsVarInScope(c)&&c.functions.indexOf(t)>-1){s=!0;break}if(c.var.push(t),this.inModule&&1&c.flags&&delete this.undefinedExports[t],c.flags&li)break}s&&this.raiseRecoverable(i,"Identifier '"+t+"' has already been declared")},ft.checkLocalExport=function(t){this.scopeStack[0].lexical.indexOf(t.name)===-1&&this.scopeStack[0].var.indexOf(t.name)===-1&&(this.undefinedExports[t.name]=t)},ft.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},ft.currentVarScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(771&e.flags)return e}},ft.currentThisScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(771&e.flags&&!(16&e.flags))return e}};var te=function(t,e,i){this.type="",this.start=e,this.end=0,t.options.locations&&(this.loc=new Yt(t,i)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[e,0])},Mt=W.prototype;function fi(t,e,i,s){return t.type=e,t.end=i,this.options.locations&&(t.loc.end=s),this.options.ranges&&(t.range[1]=i),t}Mt.startNode=function(){return new te(this,this.start,this.startLoc)},Mt.startNodeAt=function(t,e){return new te(this,t,e)},Mt.finishNode=function(t,e){return fi.call(this,t,e,this.lastTokEnd,this.lastTokEndLoc)},Mt.finishNodeAt=function(t,e,i,s){return fi.call(this,t,e,i,s)},Mt.copyNode=function(t){var e=new te(this,t.start,this.startLoc);for(var i in t)e[i]=t[i];return e};var di="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",ke=di+" Extended_Pictographic",Ie=ke+" EBase EComp EMod EPres ExtPict",_r={9:di,10:ke,11:ke,12:Ie,13:Ie,14:Ie},br={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},mi="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",gi="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",xi=gi+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",yi=xi+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",vi=yi+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",_i=vi+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Er={9:gi,10:xi,11:yi,12:vi,13:_i,14:_i+" Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz"},bi={};function Sr(t){var e=bi[t]={binary:ut(_r[t]+" "+mi),binaryOfStrings:ut(br[t]),nonBinary:{General_Category:ut(mi),Script:ut(Er[t])}};e.nonBinary.Script_Extensions=e.nonBinary.Script,e.nonBinary.gc=e.nonBinary.General_Category,e.nonBinary.sc=e.nonBinary.Script,e.nonBinary.scx=e.nonBinary.Script_Extensions}for(var Re=0,Ei=[9,10,11,12,13,14];Re<Ei.length;Re+=1)Sr(Ei[Re]);var y=W.prototype,ee=function(t,e){this.parent=t,this.base=e||this};ee.prototype.separatedFrom=function(t){for(var e=this;e;e=e.parent)for(var i=t;i;i=i.parent)if(e.base===i.base&&e!==i)return!0;return!1},ee.prototype.sibling=function(){return new ee(this.parent,this.base)};var at=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=bi[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};function wr(t){return t===105||t===109||t===115}function Si(t){return t===36||t>=40&&t<=43||t===46||t===63||t>=91&&t<=94||t>=123&&t<=125}function wi(t){return t>=65&&t<=90||t>=97&&t<=122}at.prototype.reset=function(t,e,i){var s=i.indexOf("v")!==-1,r=i.indexOf("u")!==-1;this.start=0|t,this.source=e+"",this.flags=i,s&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=r&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=r&&this.parser.options.ecmaVersion>=9)},at.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)},at.prototype.at=function(t,e){e===void 0&&(e=!1);var i=this.source,s=i.length;if(t>=s)return-1;var r=i.charCodeAt(t);if(!e&&!this.switchU||r<=55295||r>=57344||t+1>=s)return r;var a=i.charCodeAt(t+1);return a>=56320&&a<=57343?(r<<10)+a-56613888:r},at.prototype.nextIndex=function(t,e){e===void 0&&(e=!1);var i=this.source,s=i.length;if(t>=s)return s;var r,a=i.charCodeAt(t);return!e&&!this.switchU||a<=55295||a>=57344||t+1>=s||(r=i.charCodeAt(t+1))<56320||r>57343?t+1:t+2},at.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)},at.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)},at.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)},at.prototype.eat=function(t,e){return e===void 0&&(e=!1),this.current(e)===t&&(this.advance(e),!0)},at.prototype.eatChars=function(t,e){e===void 0&&(e=!1);for(var i=this.pos,s=0,r=t;s<r.length;s+=1){var a=r[s],o=this.at(i,e);if(o===-1||o!==a)return!1;i=this.nextIndex(i,e)}return this.pos=i,!0},y.validateRegExpFlags=function(t){for(var e=t.validFlags,i=t.flags,s=!1,r=!1,a=0;a<i.length;a++){var o=i.charAt(a);e.indexOf(o)===-1&&this.raise(t.start,"Invalid regular expression flag"),i.indexOf(o,a+1)>-1&&this.raise(t.start,"Duplicate regular expression flag"),o==="u"&&(s=!0),o==="v"&&(r=!0)}this.options.ecmaVersion>=15&&s&&r&&this.raise(t.start,"Invalid regular expression flag")},y.validateRegExpPattern=function(t){this.regexp_pattern(t),!t.switchN&&this.options.ecmaVersion>=9&&(function(e){for(var i in e)return!0;return!1})(t.groupNames)&&(t.switchN=!0,this.regexp_pattern(t))},y.regexp_pattern=function(t){t.pos=0,t.lastIntValue=0,t.lastStringValue="",t.lastAssertionIsQuantifiable=!1,t.numCapturingParens=0,t.maxBackReference=0,t.groupNames=Object.create(null),t.backReferenceNames.length=0,t.branchID=null,this.regexp_disjunction(t),t.pos!==t.source.length&&(t.eat(41)&&t.raise("Unmatched ')'"),(t.eat(93)||t.eat(125))&&t.raise("Lone quantifier brackets")),t.maxBackReference>t.numCapturingParens&&t.raise("Invalid escape");for(var e=0,i=t.backReferenceNames;e<i.length;e+=1){var s=i[e];t.groupNames[s]||t.raise("Invalid named capture referenced")}},y.regexp_disjunction=function(t){var e=this.options.ecmaVersion>=16;for(e&&(t.branchID=new ee(t.branchID,null)),this.regexp_alternative(t);t.eat(124);)e&&(t.branchID=t.branchID.sibling()),this.regexp_alternative(t);e&&(t.branchID=t.branchID.parent),this.regexp_eatQuantifier(t,!0)&&t.raise("Nothing to repeat"),t.eat(123)&&t.raise("Lone quantifier brackets")},y.regexp_alternative=function(t){for(;t.pos<t.source.length&&this.regexp_eatTerm(t););},y.regexp_eatTerm=function(t){return this.regexp_eatAssertion(t)?(t.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(t)&&t.switchU&&t.raise("Invalid quantifier"),!0):!!(t.switchU?this.regexp_eatAtom(t):this.regexp_eatExtendedAtom(t))&&(this.regexp_eatQuantifier(t),!0)},y.regexp_eatAssertion=function(t){var e=t.pos;if(t.lastAssertionIsQuantifiable=!1,t.eat(94)||t.eat(36))return!0;if(t.eat(92)){if(t.eat(66)||t.eat(98))return!0;t.pos=e}if(t.eat(40)&&t.eat(63)){var i=!1;if(this.options.ecmaVersion>=9&&(i=t.eat(60)),t.eat(61)||t.eat(33))return this.regexp_disjunction(t),t.eat(41)||t.raise("Unterminated group"),t.lastAssertionIsQuantifiable=!i,!0}return t.pos=e,!1},y.regexp_eatQuantifier=function(t,e){return e===void 0&&(e=!1),!!this.regexp_eatQuantifierPrefix(t,e)&&(t.eat(63),!0)},y.regexp_eatQuantifierPrefix=function(t,e){return t.eat(42)||t.eat(43)||t.eat(63)||this.regexp_eatBracedQuantifier(t,e)},y.regexp_eatBracedQuantifier=function(t,e){var i=t.pos;if(t.eat(123)){var s=0,r=-1;if(this.regexp_eatDecimalDigits(t)&&(s=t.lastIntValue,t.eat(44)&&this.regexp_eatDecimalDigits(t)&&(r=t.lastIntValue),t.eat(125)))return r!==-1&&r<s&&!e&&t.raise("numbers out of order in {} quantifier"),!0;t.switchU&&!e&&t.raise("Incomplete quantifier"),t.pos=i}return!1},y.regexp_eatAtom=function(t){return this.regexp_eatPatternCharacters(t)||t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)},y.regexp_eatReverseSolidusAtomEscape=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatAtomEscape(t))return!0;t.pos=e}return!1},y.regexp_eatUncapturingGroup=function(t){var e=t.pos;if(t.eat(40)){if(t.eat(63)){if(this.options.ecmaVersion>=16){var i=this.regexp_eatModifiers(t),s=t.eat(45);if(i||s){for(var r=0;r<i.length;r++){var a=i.charAt(r);i.indexOf(a,r+1)>-1&&t.raise("Duplicate regular expression modifiers")}if(s){var o=this.regexp_eatModifiers(t);i||o||t.current()!==58||t.raise("Invalid regular expression modifiers");for(var c=0;c<o.length;c++){var h=o.charAt(c);(o.indexOf(h,c+1)>-1||i.indexOf(h)>-1)&&t.raise("Duplicate regular expression modifiers")}}}}if(t.eat(58)){if(this.regexp_disjunction(t),t.eat(41))return!0;t.raise("Unterminated group")}}t.pos=e}return!1},y.regexp_eatCapturingGroup=function(t){if(t.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(t):t.current()===63&&t.raise("Invalid group"),this.regexp_disjunction(t),t.eat(41))return t.numCapturingParens+=1,!0;t.raise("Unterminated group")}return!1},y.regexp_eatModifiers=function(t){for(var e="",i=0;(i=t.current())!==-1&&wr(i);)e+=ct(i),t.advance();return e},y.regexp_eatExtendedAtom=function(t){return t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)||this.regexp_eatInvalidBracedQuantifier(t)||this.regexp_eatExtendedPatternCharacter(t)},y.regexp_eatInvalidBracedQuantifier=function(t){return this.regexp_eatBracedQuantifier(t,!0)&&t.raise("Nothing to repeat"),!1},y.regexp_eatSyntaxCharacter=function(t){var e=t.current();return!!Si(e)&&(t.lastIntValue=e,t.advance(),!0)},y.regexp_eatPatternCharacters=function(t){for(var e=t.pos,i=0;(i=t.current())!==-1&&!Si(i);)t.advance();return t.pos!==e},y.regexp_eatExtendedPatternCharacter=function(t){var e=t.current();return!(e===-1||e===36||e>=40&&e<=43||e===46||e===63||e===91||e===94||e===124)&&(t.advance(),!0)},y.regexp_groupSpecifier=function(t){if(t.eat(63)){this.regexp_eatGroupName(t)||t.raise("Invalid group");var e=this.options.ecmaVersion>=16,i=t.groupNames[t.lastStringValue];if(i)if(e)for(var s=0,r=i;s<r.length;s+=1)r[s].separatedFrom(t.branchID)||t.raise("Duplicate capture group name");else t.raise("Duplicate capture group name");e?(i||(t.groupNames[t.lastStringValue]=[])).push(t.branchID):t.groupNames[t.lastStringValue]=!0}},y.regexp_eatGroupName=function(t){if(t.lastStringValue="",t.eat(60)){if(this.regexp_eatRegExpIdentifierName(t)&&t.eat(62))return!0;t.raise("Invalid capture group name")}return!1},y.regexp_eatRegExpIdentifierName=function(t){if(t.lastStringValue="",this.regexp_eatRegExpIdentifierStart(t)){for(t.lastStringValue+=ct(t.lastIntValue);this.regexp_eatRegExpIdentifierPart(t);)t.lastStringValue+=ct(t.lastIntValue);return!0}return!1},y.regexp_eatRegExpIdentifierStart=function(t){var e=t.pos,i=this.options.ecmaVersion>=11,s=t.current(i);return t.advance(i),s===92&&this.regexp_eatRegExpUnicodeEscapeSequence(t,i)&&(s=t.lastIntValue),(function(r){return M(r,!0)||r===36||r===95})(s)?(t.lastIntValue=s,!0):(t.pos=e,!1)},y.regexp_eatRegExpIdentifierPart=function(t){var e=t.pos,i=this.options.ecmaVersion>=11,s=t.current(i);return t.advance(i),s===92&&this.regexp_eatRegExpUnicodeEscapeSequence(t,i)&&(s=t.lastIntValue),(function(r){return H(r,!0)||r===36||r===95||r===8204||r===8205})(s)?(t.lastIntValue=s,!0):(t.pos=e,!1)},y.regexp_eatAtomEscape=function(t){return!!(this.regexp_eatBackReference(t)||this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)||t.switchN&&this.regexp_eatKGroupName(t))||(t.switchU&&(t.current()===99&&t.raise("Invalid unicode escape"),t.raise("Invalid escape")),!1)},y.regexp_eatBackReference=function(t){var e=t.pos;if(this.regexp_eatDecimalEscape(t)){var i=t.lastIntValue;if(t.switchU)return i>t.maxBackReference&&(t.maxBackReference=i),!0;if(i<=t.numCapturingParens)return!0;t.pos=e}return!1},y.regexp_eatKGroupName=function(t){if(t.eat(107)){if(this.regexp_eatGroupName(t))return t.backReferenceNames.push(t.lastStringValue),!0;t.raise("Invalid named reference")}return!1},y.regexp_eatCharacterEscape=function(t){return this.regexp_eatControlEscape(t)||this.regexp_eatCControlLetter(t)||this.regexp_eatZero(t)||this.regexp_eatHexEscapeSequence(t)||this.regexp_eatRegExpUnicodeEscapeSequence(t,!1)||!t.switchU&&this.regexp_eatLegacyOctalEscapeSequence(t)||this.regexp_eatIdentityEscape(t)},y.regexp_eatCControlLetter=function(t){var e=t.pos;if(t.eat(99)){if(this.regexp_eatControlLetter(t))return!0;t.pos=e}return!1},y.regexp_eatZero=function(t){return t.current()===48&&!ie(t.lookahead())&&(t.lastIntValue=0,t.advance(),!0)},y.regexp_eatControlEscape=function(t){var e=t.current();return e===116?(t.lastIntValue=9,t.advance(),!0):e===110?(t.lastIntValue=10,t.advance(),!0):e===118?(t.lastIntValue=11,t.advance(),!0):e===102?(t.lastIntValue=12,t.advance(),!0):e===114&&(t.lastIntValue=13,t.advance(),!0)},y.regexp_eatControlLetter=function(t){var e=t.current();return!!wi(e)&&(t.lastIntValue=e%32,t.advance(),!0)},y.regexp_eatRegExpUnicodeEscapeSequence=function(t,e){e===void 0&&(e=!1);var i,s=t.pos,r=e||t.switchU;if(t.eat(117)){if(this.regexp_eatFixedHexDigits(t,4)){var a=t.lastIntValue;if(r&&a>=55296&&a<=56319){var o=t.pos;if(t.eat(92)&&t.eat(117)&&this.regexp_eatFixedHexDigits(t,4)){var c=t.lastIntValue;if(c>=56320&&c<=57343)return t.lastIntValue=1024*(a-55296)+(c-56320)+65536,!0}t.pos=o,t.lastIntValue=a}return!0}if(r&&t.eat(123)&&this.regexp_eatHexDigits(t)&&t.eat(125)&&(i=t.lastIntValue)>=0&&i<=1114111)return!0;r&&t.raise("Invalid unicode escape"),t.pos=s}return!1},y.regexp_eatIdentityEscape=function(t){if(t.switchU)return!!this.regexp_eatSyntaxCharacter(t)||!!t.eat(47)&&(t.lastIntValue=47,!0);var e=t.current();return!(e===99||t.switchN&&e===107)&&(t.lastIntValue=e,t.advance(),!0)},y.regexp_eatDecimalEscape=function(t){t.lastIntValue=0;var e=t.current();if(e>=49&&e<=57){do t.lastIntValue=10*t.lastIntValue+(e-48),t.advance();while((e=t.current())>=48&&e<=57);return!0}return!1};function Ci(t){return wi(t)||t===95}function Cr(t){return Ci(t)||ie(t)}function ie(t){return t>=48&&t<=57}function ki(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function Ii(t){return t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:t-48}function Ri(t){return t>=48&&t<=55}y.regexp_eatCharacterClassEscape=function(t){var e=t.current();if((function(r){return r===100||r===68||r===115||r===83||r===119||r===87})(e))return t.lastIntValue=-1,t.advance(),1;var i=!1;if(t.switchU&&this.options.ecmaVersion>=9&&((i=e===80)||e===112)){var s;if(t.lastIntValue=-1,t.advance(),t.eat(123)&&(s=this.regexp_eatUnicodePropertyValueExpression(t))&&t.eat(125))return i&&s===2&&t.raise("Invalid property name"),s;t.raise("Invalid property name")}return 0},y.regexp_eatUnicodePropertyValueExpression=function(t){var e=t.pos;if(this.regexp_eatUnicodePropertyName(t)&&t.eat(61)){var i=t.lastStringValue;if(this.regexp_eatUnicodePropertyValue(t)){var s=t.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(t,i,s),1}}if(t.pos=e,this.regexp_eatLoneUnicodePropertyNameOrValue(t)){var r=t.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(t,r)}return 0},y.regexp_validateUnicodePropertyNameAndValue=function(t,e,i){Ct(t.unicodeProperties.nonBinary,e)||t.raise("Invalid property name"),t.unicodeProperties.nonBinary[e].test(i)||t.raise("Invalid property value")},y.regexp_validateUnicodePropertyNameOrValue=function(t,e){return t.unicodeProperties.binary.test(e)?1:t.switchV&&t.unicodeProperties.binaryOfStrings.test(e)?2:void t.raise("Invalid property name")},y.regexp_eatUnicodePropertyName=function(t){var e=0;for(t.lastStringValue="";Ci(e=t.current());)t.lastStringValue+=ct(e),t.advance();return t.lastStringValue!==""},y.regexp_eatUnicodePropertyValue=function(t){var e=0;for(t.lastStringValue="";Cr(e=t.current());)t.lastStringValue+=ct(e),t.advance();return t.lastStringValue!==""},y.regexp_eatLoneUnicodePropertyNameOrValue=function(t){return this.regexp_eatUnicodePropertyValue(t)},y.regexp_eatCharacterClass=function(t){if(t.eat(91)){var e=t.eat(94),i=this.regexp_classContents(t);return t.eat(93)||t.raise("Unterminated character class"),e&&i===2&&t.raise("Negated character class may contain strings"),!0}return!1},y.regexp_classContents=function(t){return t.current()===93?1:t.switchV?this.regexp_classSetExpression(t):(this.regexp_nonEmptyClassRanges(t),1)},y.regexp_nonEmptyClassRanges=function(t){for(;this.regexp_eatClassAtom(t);){var e=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassAtom(t)){var i=t.lastIntValue;!t.switchU||e!==-1&&i!==-1||t.raise("Invalid character class"),e!==-1&&i!==-1&&e>i&&t.raise("Range out of order in character class")}}},y.regexp_eatClassAtom=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatClassEscape(t))return!0;if(t.switchU){var i=t.current();(i===99||Ri(i))&&t.raise("Invalid class escape"),t.raise("Invalid escape")}t.pos=e}var s=t.current();return s!==93&&(t.lastIntValue=s,t.advance(),!0)},y.regexp_eatClassEscape=function(t){var e=t.pos;if(t.eat(98))return t.lastIntValue=8,!0;if(t.switchU&&t.eat(45))return t.lastIntValue=45,!0;if(!t.switchU&&t.eat(99)){if(this.regexp_eatClassControlLetter(t))return!0;t.pos=e}return this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)},y.regexp_classSetExpression=function(t){var e,i=1;if(!this.regexp_eatClassSetRange(t))if(e=this.regexp_eatClassSetOperand(t)){e===2&&(i=2);for(var s=t.pos;t.eatChars([38,38]);)t.current()!==38&&(e=this.regexp_eatClassSetOperand(t))?e!==2&&(i=1):t.raise("Invalid character in character class");if(s!==t.pos)return i;for(;t.eatChars([45,45]);)this.regexp_eatClassSetOperand(t)||t.raise("Invalid character in character class");if(s!==t.pos)return i}else t.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(t)){if(!(e=this.regexp_eatClassSetOperand(t)))return i;e===2&&(i=2)}},y.regexp_eatClassSetRange=function(t){var e=t.pos;if(this.regexp_eatClassSetCharacter(t)){var i=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassSetCharacter(t)){var s=t.lastIntValue;return i!==-1&&s!==-1&&i>s&&t.raise("Range out of order in character class"),!0}t.pos=e}return!1},y.regexp_eatClassSetOperand=function(t){return this.regexp_eatClassSetCharacter(t)?1:this.regexp_eatClassStringDisjunction(t)||this.regexp_eatNestedClass(t)},y.regexp_eatNestedClass=function(t){var e=t.pos;if(t.eat(91)){var i=t.eat(94),s=this.regexp_classContents(t);if(t.eat(93))return i&&s===2&&t.raise("Negated character class may contain strings"),s;t.pos=e}if(t.eat(92)){var r=this.regexp_eatCharacterClassEscape(t);if(r)return r;t.pos=e}return null},y.regexp_eatClassStringDisjunction=function(t){var e=t.pos;if(t.eatChars([92,113])){if(t.eat(123)){var i=this.regexp_classStringDisjunctionContents(t);if(t.eat(125))return i}else t.raise("Invalid escape");t.pos=e}return null},y.regexp_classStringDisjunctionContents=function(t){for(var e=this.regexp_classString(t);t.eat(124);)this.regexp_classString(t)===2&&(e=2);return e},y.regexp_classString=function(t){for(var e=0;this.regexp_eatClassSetCharacter(t);)e++;return e===1?1:2},y.regexp_eatClassSetCharacter=function(t){var e=t.pos;if(t.eat(92))return!(!this.regexp_eatCharacterEscape(t)&&!this.regexp_eatClassSetReservedPunctuator(t))||(t.eat(98)?(t.lastIntValue=8,!0):(t.pos=e,!1));var i=t.current();return!(i<0||i===t.lookahead()&&(function(s){return s===33||s>=35&&s<=38||s>=42&&s<=44||s===46||s>=58&&s<=64||s===94||s===96||s===126})(i))&&!(function(s){return s===40||s===41||s===45||s===47||s>=91&&s<=93||s>=123&&s<=125})(i)&&(t.advance(),t.lastIntValue=i,!0)},y.regexp_eatClassSetReservedPunctuator=function(t){var e=t.current();return!!(function(i){return i===33||i===35||i===37||i===38||i===44||i===45||i>=58&&i<=62||i===64||i===96||i===126})(e)&&(t.lastIntValue=e,t.advance(),!0)},y.regexp_eatClassControlLetter=function(t){var e=t.current();return!(!ie(e)&&e!==95)&&(t.lastIntValue=e%32,t.advance(),!0)},y.regexp_eatHexEscapeSequence=function(t){var e=t.pos;if(t.eat(120)){if(this.regexp_eatFixedHexDigits(t,2))return!0;t.switchU&&t.raise("Invalid escape"),t.pos=e}return!1},y.regexp_eatDecimalDigits=function(t){var e=t.pos,i=0;for(t.lastIntValue=0;ie(i=t.current());)t.lastIntValue=10*t.lastIntValue+(i-48),t.advance();return t.pos!==e},y.regexp_eatHexDigits=function(t){var e=t.pos,i=0;for(t.lastIntValue=0;ki(i=t.current());)t.lastIntValue=16*t.lastIntValue+Ii(i),t.advance();return t.pos!==e},y.regexp_eatLegacyOctalEscapeSequence=function(t){if(this.regexp_eatOctalDigit(t)){var e=t.lastIntValue;if(this.regexp_eatOctalDigit(t)){var i=t.lastIntValue;e<=3&&this.regexp_eatOctalDigit(t)?t.lastIntValue=64*e+8*i+t.lastIntValue:t.lastIntValue=8*e+i}else t.lastIntValue=e;return!0}return!1},y.regexp_eatOctalDigit=function(t){var e=t.current();return Ri(e)?(t.lastIntValue=e-48,t.advance(),!0):(t.lastIntValue=0,!1)},y.regexp_eatFixedHexDigits=function(t,e){var i=t.pos;t.lastIntValue=0;for(var s=0;s<e;++s){var r=t.current();if(!ki(r))return t.pos=i,!1;t.lastIntValue=16*t.lastIntValue+Ii(r),t.advance()}return!0};var Ae=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new Yt(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},A=W.prototype;function Ai(t){return typeof BigInt!="function"?null:BigInt(t.replace(/_/g,""))}A.next=function(t){!t&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Ae(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},A.getToken=function(){return this.next(),new Ae(this)},typeof Symbol!="undefined"&&(A[Symbol.iterator]=function(){var t=this;return{next:function(){var e=t.getToken();return{done:e.type===n.eof,value:e}}}}),A.nextToken=function(){var t=this.curContext();return t&&t.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(n.eof):t.override?t.override(this):void this.readToken(this.fullCharCodeAtPos())},A.readToken=function(t){return M(t,this.options.ecmaVersion>=6)||t===92?this.readWord():this.getTokenFromCode(t)},A.fullCharCodeAtPos=function(){var t=this.input.charCodeAt(this.pos);if(t<=55295||t>=56320)return t;var e=this.input.charCodeAt(this.pos+1);return e<=56319||e>=57344?t:(t<<10)+e-56613888},A.skipBlockComment=function(){var t=this.options.onComment&&this.curPosition(),e=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(i===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=i+2,this.options.locations)for(var s=void 0,r=e;(s=ri(this.input,r,this.pos))>-1;)++this.curLine,r=this.lineStart=s;this.options.onComment&&this.options.onComment(!0,this.input.slice(e+2,i),e,this.pos,t,this.curPosition())},A.skipLineComment=function(t){for(var e=this.pos,i=this.options.onComment&&this.curPosition(),s=this.input.charCodeAt(this.pos+=t);this.pos<this.input.length&&!wt(s);)s=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(e+t,this.pos),e,this.pos,i,this.curPosition())},A.skipSpace=function(){t:for(;this.pos<this.input.length;){var t=this.input.charCodeAt(this.pos);switch(t){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(!(t>8&&t<14||t>=5760&&ni.test(String.fromCharCode(t))))break t;++this.pos}}},A.finishToken=function(t,e){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var i=this.type;this.type=t,this.value=e,this.updateContext(i)},A.readToken_dot=function(){var t=this.input.charCodeAt(this.pos+1);if(t>=48&&t<=57)return this.readNumber(!0);var e=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&t===46&&e===46?(this.pos+=3,this.finishToken(n.ellipsis)):(++this.pos,this.finishToken(n.dot))},A.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):t===61?this.finishOp(n.assign,2):this.finishOp(n.slash,1)},A.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),i=1,s=t===42?n.star:n.modulo;return this.options.ecmaVersion>=7&&t===42&&e===42&&(++i,s=n.starstar,e=this.input.charCodeAt(this.pos+2)),e===61?this.finishOp(n.assign,i+1):this.finishOp(s,i)},A.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?this.options.ecmaVersion>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(n.assign,3):this.finishOp(t===124?n.logicalOR:n.logicalAND,2):e===61?this.finishOp(n.assign,2):this.finishOp(t===124?n.bitwiseOR:n.bitwiseAND,1)},A.readToken_caret=function(){return this.input.charCodeAt(this.pos+1)===61?this.finishOp(n.assign,2):this.finishOp(n.bitwiseXOR,1)},A.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?e!==45||this.inModule||this.input.charCodeAt(this.pos+2)!==62||this.lastTokEnd!==0&&!tt.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(n.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):e===61?this.finishOp(n.assign,2):this.finishOp(n.plusMin,1)},A.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.pos+1),i=1;return e===t?(i=t===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+i)===61?this.finishOp(n.assign,i+1):this.finishOp(n.bitShift,i)):e!==33||t!==60||this.inModule||this.input.charCodeAt(this.pos+2)!==45||this.input.charCodeAt(this.pos+3)!==45?(e===61&&(i=2),this.finishOp(n.relational,i)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},A.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(n.equality,this.input.charCodeAt(this.pos+2)===61?3:2):t===61&&e===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(n.arrow)):this.finishOp(t===61?n.eq:n.prefix,1)},A.readToken_question=function(){var t=this.options.ecmaVersion;if(t>=11){var e=this.input.charCodeAt(this.pos+1);if(e===46){var i=this.input.charCodeAt(this.pos+2);if(i<48||i>57)return this.finishOp(n.questionDot,2)}if(e===63)return t>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(n.assign,3):this.finishOp(n.coalesce,2)}return this.finishOp(n.question,1)},A.readToken_numberSign=function(){var t=35;if(this.options.ecmaVersion>=13&&(++this.pos,M(t=this.fullCharCodeAtPos(),!0)||t===92))return this.finishToken(n.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+ct(t)+"'")},A.getTokenFromCode=function(t){switch(t){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(n.parenL);case 41:return++this.pos,this.finishToken(n.parenR);case 59:return++this.pos,this.finishToken(n.semi);case 44:return++this.pos,this.finishToken(n.comma);case 91:return++this.pos,this.finishToken(n.bracketL);case 93:return++this.pos,this.finishToken(n.bracketR);case 123:return++this.pos,this.finishToken(n.braceL);case 125:return++this.pos,this.finishToken(n.braceR);case 58:return++this.pos,this.finishToken(n.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(n.backQuote);case 48:var e=this.input.charCodeAt(this.pos+1);if(e===120||e===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(e===111||e===79)return this.readRadixNumber(8);if(e===98||e===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(t);case 124:case 38:return this.readToken_pipe_amp(t);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 63:return this.readToken_question();case 126:return this.finishOp(n.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+ct(t)+"'")},A.finishOp=function(t,e){var i=this.input.slice(this.pos,this.pos+e);return this.pos+=e,this.finishToken(t,i)},A.readRegexp=function(){for(var t,e,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var s=this.input.charAt(this.pos);if(tt.test(s)&&this.raise(i,"Unterminated regular expression"),t)t=!1;else{if(s==="[")e=!0;else if(s==="]"&&e)e=!1;else if(s==="/"&&!e)break;t=s==="\\"}++this.pos}var r=this.input.slice(i,this.pos);++this.pos;var a=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(a);var c=this.regexpState||(this.regexpState=new at(this));c.reset(i,r,o),this.validateRegExpFlags(c),this.validateRegExpPattern(c);var h=null;try{h=new RegExp(r,o)}catch{}return this.finishToken(n.regexp,{pattern:r,flags:o,value:h})},A.readInt=function(t,e,i){for(var s=this.options.ecmaVersion>=12&&e===void 0,r=i&&this.input.charCodeAt(this.pos)===48,a=this.pos,o=0,c=0,h=0,u=e==null?1/0:e;h<u;++h,++this.pos){var p=this.input.charCodeAt(this.pos),m=void 0;if(s&&p===95)r&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),c===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),h===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),c=p;else{if((m=p>=97?p-97+10:p>=65?p-65+10:p>=48&&p<=57?p-48:1/0)>=t)break;c=p,o=o*t+m}}return s&&c===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===a||e!=null&&this.pos-a!==e?null:o},A.readRadixNumber=function(t){var e=this.pos;this.pos+=2;var i=this.readInt(t);return i==null&&this.raise(this.start+2,"Expected number in radix "+t),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(i=Ai(this.input.slice(e,this.pos)),++this.pos):M(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(n.num,i)},A.readNumber=function(t){var e=this.pos;t||this.readInt(10,void 0,!0)!==null||this.raise(e,"Invalid number");var i=this.pos-e>=2&&this.input.charCodeAt(e)===48;i&&this.strict&&this.raise(e,"Invalid number");var s=this.input.charCodeAt(this.pos);if(!i&&!t&&this.options.ecmaVersion>=11&&s===110){var r=Ai(this.input.slice(e,this.pos));return++this.pos,M(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(n.num,r)}i&&/[89]/.test(this.input.slice(e,this.pos))&&(i=!1),s!==46||i||(++this.pos,this.readInt(10),s=this.input.charCodeAt(this.pos)),s!==69&&s!==101||i||((s=this.input.charCodeAt(++this.pos))!==43&&s!==45||++this.pos,this.readInt(10)===null&&this.raise(e,"Invalid number")),M(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var a,o=(a=this.input.slice(e,this.pos),i?parseInt(a,8):parseFloat(a.replace(/_/g,"")));return this.finishToken(n.num,o)},A.readCodePoint=function(){var t;if(this.input.charCodeAt(this.pos)===123){this.options.ecmaVersion<6&&this.unexpected();var e=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(e,"Code point out of bounds")}else t=this.readHexChar(4);return t},A.readString=function(t){for(var e="",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var s=this.input.charCodeAt(this.pos);if(s===t)break;s===92?(e+=this.input.slice(i,this.pos),e+=this.readEscapedChar(!1),i=this.pos):s===8232||s===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(wt(s)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return e+=this.input.slice(i,this.pos++),this.finishToken(n.string,e)};var Pi={};A.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t!==Pi)throw t;this.readInvalidTemplateToken()}this.inTemplateElement=!1},A.invalidStringToken=function(t,e){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Pi;this.raise(t,e)},A.readTmplToken=function(){for(var t="",e=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var i=this.input.charCodeAt(this.pos);if(i===96||i===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos!==this.start||this.type!==n.template&&this.type!==n.invalidTemplate?(t+=this.input.slice(e,this.pos),this.finishToken(n.template,t)):i===36?(this.pos+=2,this.finishToken(n.dollarBraceL)):(++this.pos,this.finishToken(n.backQuote));if(i===92)t+=this.input.slice(e,this.pos),t+=this.readEscapedChar(!0),e=this.pos;else if(wt(i)){switch(t+=this.input.slice(e,this.pos),++this.pos,i){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:t+=`
7
+ `;break;default:t+=String.fromCharCode(i)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),e=this.pos}else++this.pos}},A.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(n.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
8
+ `&&++this.pos;case`
9
+ `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,"Unterminated template")},A.readEscapedChar=function(t){var e=this.input.charCodeAt(++this.pos);switch(++this.pos,e){case 110:return`
10
+ `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return ct(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),t){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(e>=48&&e<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);return r>255&&(s=s.slice(0,-1),r=parseInt(s,8)),this.pos+=s.length-1,e=this.input.charCodeAt(this.pos),s==="0"&&e!==56&&e!==57||!this.strict&&!t||this.invalidStringToken(this.pos-1-s.length,t?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return wt(e)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(e)}},A.readHexChar=function(t){var e=this.pos,i=this.readInt(16,t);return i===null&&this.invalidStringToken(e,"Bad character escape sequence"),i},A.readWord1=function(){this.containsEsc=!1;for(var t="",e=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var r=this.fullCharCodeAtPos();if(H(r,s))this.pos+=r<=65535?1:2;else{if(r!==92)break;this.containsEsc=!0,t+=this.input.slice(i,this.pos);var a=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(e?M:H)(o,s)||this.invalidStringToken(a,"Invalid Unicode escape"),t+=ct(o),i=this.pos}e=!1}return t+this.input.slice(i,this.pos)},A.readWord=function(){var t=this.readWord1(),e=n.name;return this.keywords.test(t)&&(e=_e[t]),this.finishToken(e,t)},W.acorn={Parser:W,version:"8.15.0",defaultOptions:be,Position:Vt,SourceLocation:Yt,getLineInfo:hi,Node:te,TokenType:R,tokTypes:n,keywordTypes:_e,TokContext:rt,tokContexts:U,isIdentifierChar:H,isIdentifierStart:M,Token:Ae,isNewLine:wt,lineBreak:tt,lineBreakG:cr,nonASCIIwhitespace:ni};let It=require("module"),J=require("fs");String.fromCharCode;let kr=/\/$|\/\?|\/#/,Ir=/^\.?\//;function Rr(t="",e){return e?kr.test(t):t.endsWith("/")}function Ar(t="",e){if(!e)return t.endsWith("/")?t:t+"/";if(Rr(t,!0))return t||"/";let i=t,s="",r=t.indexOf("#");if(r!==-1&&(i=t.slice(0,r),s=t.slice(r),!i))return s;let[a,...o]=i.split("?");return a+"/"+(o.length>0?`?${o.join("?")}`:"")+s}function Pr(t){return t&&t!=="/"}function Ti(t,...e){let i=t||"";for(let s of e.filter(r=>Pr(r)))if(i){let r=s.replace(Ir,"");i=Ar(i)+r}else i=s;return i}let Tr=/^[A-Za-z]:\//;function Rt(t=""){return t&&t.replace(/\\/g,"/").replace(Tr,e=>e.toUpperCase())}let Lr=/^[/\\]{2}/,Nr=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,Li=/^[A-Za-z]:$/,Or=/.(\.[^./]+|\.)$/,Dr=function(t){if(t.length===0)return".";let e=(t=Rt(t)).match(Lr),i=vt(t),s=t[t.length-1]==="/";return(t=Ni(t,!i)).length===0?i?"/":s?"./":".":(s&&(t+="/"),Li.test(t)&&(t+="/"),e?i?`//${t}`:`//./${t}`:i&&!vt(t)?`/${t}`:t)},dt=function(...t){let e="";for(let i of t)if(i)if(e.length>0){let s=e[e.length-1]==="/",r=i[0]==="/";e+=s&&r?i.slice(1):s||r?i:`/${i}`}else e+=i;return Dr(e)};function Vr(){return typeof process!="undefined"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}let Ur=function(...t){let e="",i=!1;for(let s=(t=t.map(r=>Rt(r))).length-1;s>=-1&&!i;s--){let r=s>=0?t[s]:Vr();r&&r.length!==0&&(e=`${r}/${e}`,i=vt(r))}return e=Ni(e,!i),i&&!vt(e)?`/${e}`:e.length>0?e:"."};function Ni(t,e){let i="",s=0,r=-1,a=0,o=null;for(let c=0;c<=t.length;++c){if(c<t.length)o=t[c];else{if(o==="/")break;o="/"}if(o==="/"){if(!(r===c-1||a===1))if(a===2){if(i.length<2||s!==2||i[i.length-1]!=="."||i[i.length-2]!=="."){if(i.length>2){let h=i.lastIndexOf("/");h===-1?(i="",s=0):(i=i.slice(0,h),s=i.length-1-i.lastIndexOf("/")),r=c,a=0;continue}if(i.length>0){i="",s=0,r=c,a=0;continue}}e&&(i+=i.length>0?"/..":"..",s=2)}else i.length>0?i+=`/${t.slice(r+1,c)}`:i=t.slice(r+1,c),s=c-r-1;r=c,a=0}else o==="."&&a!==-1?++a:a=-1}return i}let vt=function(t){return Nr.test(t)},Oi=function(t){if(t==="..")return"";let e=Or.exec(Rt(t));return e&&e[1]||""},se=function(t){let e=Rt(t).replace(/\/$/,"").split("/").slice(0,-1);return e.length===1&&Li.test(e[0])&&(e[0]+="/"),e.join("/")||(vt(t)?"/":".")},Di=function(t,e){let i=Rt(t).split("/"),s="";for(let r=i.length-1;r>=0;r--){let a=i[r];if(a){s=a;break}}return e&&s.endsWith(e)?s.slice(0,-e.length):s},b=require("url"),mt=require("assert"),_t=require("process"),Pe=require("path"),Mr=require("v8"),re=require("util"),Vi=new Set(It.builtinModules);function Te(t){return t.replace(/\\/g,"/")}let jr={}.hasOwnProperty,$r=/^([A-Z][a-z\d]*)+$/,Fr=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),Y={};function Le(t,e="and"){return t.length<3?t.join(` ${e} `):`${t.slice(0,-1).join(", ")}, ${e} ${t[t.length-1]}`}let Ui=new Map,Mi;function st(t,e,i){return Ui.set(t,e),(function(s,r){return a;function a(...o){let c=Error.stackTraceLimit;Ne()&&(Error.stackTraceLimit=0);let h=new s;Ne()&&(Error.stackTraceLimit=c);let u=(function(p,m,d){let w=Ui.get(p);if(mt(w!==void 0,"expected `message` to be found"),typeof w=="function")return mt(w.length<=m.length,`Code: ${p}; The provided arguments length (${m.length}) does not match the required ones (${w.length}).`),Reflect.apply(w,d,m);let O=/%[dfijoOs]/g,k=0;for(;O.exec(w)!==null;)k++;return mt(k===m.length,`Code: ${p}; The provided arguments length (${m.length}) does not match the required ones (${k}).`),m.length===0?w:(m.unshift(w),Reflect.apply(re.format,null,m))})(r,o,h);return Object.defineProperties(h,{message:{value:u,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${r}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),Br(h),h.code=r,h}})(i,t)}function Ne(){try{if(Mr.startupSnapshot.isBuildingSnapshot())return!1}catch{}let t=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");return t===void 0?Object.isExtensible(Error):jr.call(t,"writable")&&t.writable!==void 0?t.writable:t.set!==void 0}Y.ERR_INVALID_ARG_TYPE=st("ERR_INVALID_ARG_TYPE",(t,e,i)=>{mt(typeof t=="string","'name' must be a string"),Array.isArray(e)||(e=[e]);let s="The ";if(t.endsWith(" argument"))s+=`${t} `;else{let c=t.includes(".")?"property":"argument";s+=`"${t}" ${c} `}s+="must be ";let r=[],a=[],o=[];for(let c of e)mt(typeof c=="string","All expected entries have to be of type string"),Fr.has(c)?r.push(c.toLowerCase()):$r.exec(c)===null?(mt(c!=="object",'The value "object" should be written as "Object"'),o.push(c)):a.push(c);if(a.length>0){let c=r.indexOf("object");c!==-1&&(r.slice(c,1),a.push("Object"))}return r.length>0&&(s+=`${r.length>1?"one of type":"of type"} ${Le(r,"or")}`,(a.length>0||o.length>0)&&(s+=" or ")),a.length>0&&(s+=`an instance of ${Le(a,"or")}`,o.length>0&&(s+=" or ")),o.length>0&&(o.length>1?s+=`one of ${Le(o,"or")}`:(o[0].toLowerCase()!==o[0]&&(s+="an "),s+=`${o[0]}`)),s+=`. Received ${(function(c){if(c==null)return String(c);if(typeof c=="function"&&c.name)return`function ${c.name}`;if(typeof c=="object")return c.constructor&&c.constructor.name?`an instance of ${c.constructor.name}`:`${(0,re.inspect)(c,{depth:-1})}`;let h=(0,re.inspect)(c,{colors:!1});return h.length>28&&(h=`${h.slice(0,25)}...`),`type ${typeof c} (${h})`})(i)}`,s},TypeError),Y.ERR_INVALID_MODULE_SPECIFIER=st("ERR_INVALID_MODULE_SPECIFIER",(t,e,i=void 0)=>`Invalid module "${t}" ${e}${i?` imported from ${i}`:""}`,TypeError),Y.ERR_INVALID_PACKAGE_CONFIG=st("ERR_INVALID_PACKAGE_CONFIG",(t,e,i)=>`Invalid package config ${t}${e?` while importing ${e}`:""}${i?`. ${i}`:""}`,Error),Y.ERR_INVALID_PACKAGE_TARGET=st("ERR_INVALID_PACKAGE_TARGET",(t,e,i,s=!1,r=void 0)=>{let a=typeof i=="string"&&!s&&i.length>0&&!i.startsWith("./");return e==="."?(mt(s===!1),`Invalid "exports" main target ${JSON.stringify(i)} defined in the package config ${t}package.json${r?` imported from ${r}`:""}${a?'; targets must start with "./"':""}`):`Invalid "${s?"imports":"exports"}" target ${JSON.stringify(i)} defined for '${e}' in the package config ${t}package.json${r?` imported from ${r}`:""}${a?'; targets must start with "./"':""}`},Error),Y.ERR_MODULE_NOT_FOUND=st("ERR_MODULE_NOT_FOUND",(t,e,i=!1)=>`Cannot find ${i?"module":"package"} '${t}' imported from ${e}`,Error),Y.ERR_NETWORK_IMPORT_DISALLOWED=st("ERR_NETWORK_IMPORT_DISALLOWED","import of '%s' by %s is not supported: %s",Error),Y.ERR_PACKAGE_IMPORT_NOT_DEFINED=st("ERR_PACKAGE_IMPORT_NOT_DEFINED",(t,e,i)=>`Package import specifier "${t}" is not defined${e?` in package ${e}package.json`:""} imported from ${i}`,TypeError),Y.ERR_PACKAGE_PATH_NOT_EXPORTED=st("ERR_PACKAGE_PATH_NOT_EXPORTED",(t,e,i=void 0)=>e==="."?`No "exports" main defined in ${t}package.json${i?` imported from ${i}`:""}`:`Package subpath '${e}' is not defined by "exports" in ${t}package.json${i?` imported from ${i}`:""}`,Error),Y.ERR_UNSUPPORTED_DIR_IMPORT=st("ERR_UNSUPPORTED_DIR_IMPORT","Directory import '%s' is not supported resolving ES modules imported from %s",Error),Y.ERR_UNSUPPORTED_RESOLVE_REQUEST=st("ERR_UNSUPPORTED_RESOLVE_REQUEST",'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',TypeError),Y.ERR_UNKNOWN_FILE_EXTENSION=st("ERR_UNKNOWN_FILE_EXTENSION",(t,e)=>`Unknown file extension "${t}" for ${e}`,TypeError),Y.ERR_INVALID_ARG_VALUE=st("ERR_INVALID_ARG_VALUE",(t,e,i="is invalid")=>{let s=(0,re.inspect)(e);return s.length>128&&(s=`${s.slice(0,128)}...`),`The ${t.includes(".")?"property":"argument"} '${t}' ${i}. Received ${s}`},TypeError);let Br=(function(t){let e="__node_internal_"+t.name;return Object.defineProperty(t,"name",{value:e}),t})(function(t){let e=Ne();return e&&(Mi=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY),Error.captureStackTrace(t),e&&(Error.stackTraceLimit=Mi),t}),jt={}.hasOwnProperty,{ERR_INVALID_PACKAGE_CONFIG:qr}=Y,ji=new Map;function $i(t,{base:e,specifier:i}){let s=ji.get(t);if(s)return s;let r;try{r=J.readFileSync(Pe.toNamespacedPath(t),"utf8")}catch(o){let c=o;if(c.code!=="ENOENT")throw c}let a={exists:!1,pjsonPath:t,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};if(r!==void 0){let o;try{o=JSON.parse(r)}catch(c){let h=c,u=new qr(t,(e?`"${i}" from `:"")+(0,b.fileURLToPath)(e||i),h.message);throw u.cause=h,u}a.exists=!0,jt.call(o,"name")&&typeof o.name=="string"&&(a.name=o.name),jt.call(o,"main")&&typeof o.main=="string"&&(a.main=o.main),jt.call(o,"exports")&&(a.exports=o.exports),jt.call(o,"imports")&&(a.imports=o.imports),!jt.call(o,"type")||o.type!=="commonjs"&&o.type!=="module"||(a.type=o.type)}return ji.set(t,a),a}function Oe(t){let e=new URL("package.json",t);for(;!e.pathname.endsWith("node_modules/package.json");){let i=$i((0,b.fileURLToPath)(e),{specifier:t});if(i.exists)return i;let s=e;if(e=new URL("../package.json",e),e.pathname===s.pathname)break}return{pjsonPath:(0,b.fileURLToPath)(e),exists:!1,type:"none"}}function Fi(t){return Oe(t).type}let{ERR_UNKNOWN_FILE_EXTENSION:Wr}=Y,Gr={}.hasOwnProperty,Hr={__proto__:null,".cjs":"commonjs",".js":"module",".json":"json",".mjs":"module"},Bi={__proto__:null,"data:":function(t){let{1:e}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(t.pathname)||[null,null,null];return(function(i){return i&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(i)?"module":i==="application/json"?"json":null})(e)},"file:":function(t,e,i){let s=(function(o){let c=o.pathname,h=c.length;for(;h--;){let u=c.codePointAt(h);if(u===47)return"";if(u===46)return c.codePointAt(h-1)===47?"":c.slice(h)}return""})(t);if(s===".js"){let o=Fi(t);return o!=="none"?o:"commonjs"}if(s===""){let o=Fi(t);return o==="none"||o==="commonjs"?"commonjs":"module"}let r=Hr[s];if(r)return r;if(i)return;let a=(0,b.fileURLToPath)(t);throw new Wr(s,a)},"http:":qi,"https:":qi,"node:":()=>"builtin"};function qi(){}let ne=RegExp.prototype[Symbol.replace],{ERR_INVALID_MODULE_SPECIFIER:ae,ERR_INVALID_PACKAGE_CONFIG:Wi,ERR_INVALID_PACKAGE_TARGET:Kr,ERR_MODULE_NOT_FOUND:De,ERR_PACKAGE_IMPORT_NOT_DEFINED:zr,ERR_PACKAGE_PATH_NOT_EXPORTED:Jr,ERR_UNSUPPORTED_DIR_IMPORT:Yr,ERR_UNSUPPORTED_RESOLVE_REQUEST:Gi}=Y,Hi={}.hasOwnProperty,Ki=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i,zi=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,Qr=/^\.|%|\\/,oe=/\*/g,Zr=/%2f|%5c/i,Ji=new Set,Xr=/[/\\]{2}/;function Yi(t,e,i,s,r,a,o){if(_t.noDeprecation)return;let c=(0,b.fileURLToPath)(s),h=Xr.exec(o?t:e)!==null;_t.emitWarning(`Use of deprecated ${h?"double slash":"leading or trailing slash matching"} resolving "${t}" for module request "${e}" ${e===i?"":`matched to "${i}" `}in the "${r?"imports":"exports"}" field module resolution of the package at ${c}${a?` imported from ${(0,b.fileURLToPath)(a)}`:""}.`,"DeprecationWarning","DEP0166")}function Qi(t,e,i,s){if(_t.noDeprecation||(function(h,u){let p=h.protocol;return Gr.call(Bi,p)&&Bi[p](h,u,!0)||null})(t,{parentURL:i.href})!=="module")return;let a=(0,b.fileURLToPath)(t.href),o=(0,b.fileURLToPath)(new b.URL(".",e)),c=(0,b.fileURLToPath)(i);s?Pe.resolve(o,s)!==a&&_t.emitWarning(`Package ${o} has a "main" field set to "${s}", excluding the full filename and extension to the resolved file at "${a.slice(o.length)}", imported from ${c}.
11
+ Automatic extension resolution of the "main" field is deprecated for ES modules.`,"DeprecationWarning","DEP0151"):_t.emitWarning(`No "main" or "exports" field defined in the package.json for ${o} resolving the main entry point "${a.slice(o.length)}", imported from ${c}.
12
+ Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function Zi(t){try{return(0,J.statSync)(t)}catch{}}function Ve(t){let e=(0,J.statSync)(t,{throwIfNoEntry:!1}),i=e?e.isFile():void 0;return i!=null&&i}function tn(t,e,i){let s;if(e.main!==void 0){if(s=new b.URL(e.main,t),Ve(s))return s;let o=[`./${e.main}.js`,`./${e.main}.json`,`./${e.main}.node`,`./${e.main}/index.js`,`./${e.main}/index.json`,`./${e.main}/index.node`],c=-1;for(;++c<o.length&&(s=new b.URL(o[c],t),!Ve(s));)s=void 0;if(s)return Qi(s,t,i,e.main),s}let r=["./index.js","./index.json","./index.node"],a=-1;for(;++a<r.length&&(s=new b.URL(r[a],t),!Ve(s));)s=void 0;if(s)return Qi(s,t,i,e.main),s;throw new De((0,b.fileURLToPath)(new b.URL(".",t)),(0,b.fileURLToPath)(i))}function Ue(t,e,i){return new Jr((0,b.fileURLToPath)(new b.URL(".",e)),t,i&&(0,b.fileURLToPath)(i))}function $t(t,e,i,s,r){return e=typeof e=="object"&&e!==null?JSON.stringify(e,null,""):`${e}`,new Kr((0,b.fileURLToPath)(new b.URL(".",i)),t,e,s,r&&(0,b.fileURLToPath)(r))}function en(t,e,i,s,r,a,o,c,h){if(e!==""&&!a&&t[t.length-1]!=="/")throw $t(i,t,s,o,r);if(!t.startsWith("./")){if(o&&!t.startsWith("../")&&!t.startsWith("/")){let d=!1;try{new b.URL(t),d=!0}catch{}if(!d)return es(a?ne.call(oe,t,()=>e):t+e,s,h)}throw $t(i,t,s,o,r)}if(Ki.exec(t.slice(2))!==null){if(zi.exec(t.slice(2))!==null)throw $t(i,t,s,o,r);if(!c){let d=a?i.replace("*",()=>e):i+e;Yi(a?ne.call(oe,t,()=>e):t,d,i,s,o,r,!0)}}let u=new b.URL(t,s),p=u.pathname,m=new b.URL(".",s).pathname;if(!p.startsWith(m))throw $t(i,t,s,o,r);if(e==="")return u;if(Ki.exec(e)!==null){let d=a?i.replace("*",()=>e):i+e;zi.exec(e)===null?c||Yi(a?ne.call(oe,t,()=>e):t,d,i,s,o,r,!1):(function(w,O,k,L,T){let ot=`request is not a valid match in pattern "${O}" for the "${L?"imports":"exports"}" resolution of ${(0,b.fileURLToPath)(k)}`;throw new ae(w,ot,T&&(0,b.fileURLToPath)(T))})(d,i,s,o,r)}return a?new b.URL(ne.call(oe,u.href,()=>e)):new b.URL(e,u)}function sn(t){let e=Number(t);return`${e}`===t&&e>=0&&e<4294967295}function At(t,e,i,s,r,a,o,c,h){if(typeof e=="string")return en(e,i,s,t,r,a,o,c,h);if(Array.isArray(e)){let u=e;if(u.length===0)return null;let p,m=-1;for(;++m<u.length;){let d=u[m],w;try{w=At(t,d,i,s,r,a,o,c,h)}catch(O){if(p=O,O.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw O}if(w!==void 0){if(w!==null)return w;p=null}}if(p==null)return null;throw p}if(typeof e=="object"&&e!==null){let u=Object.getOwnPropertyNames(e),p=-1;for(;++p<u.length;)if(sn(u[p]))throw new Wi((0,b.fileURLToPath)(t),r,'"exports" cannot contain numeric property keys.');for(p=-1;++p<u.length;){let m=u[p];if(m==="default"||h&&h.has(m)){let d=At(t,e[m],i,s,r,a,o,c,h);if(d===void 0)continue;return d}}return null}if(e===null)return null;throw $t(s,e,t,o,r)}function rn(t,e,i){if(_t.noDeprecation)return;let s=(0,b.fileURLToPath)(e);Ji.has(s+"|"+t)||(Ji.add(s+"|"+t),_t.emitWarning(`Use of deprecated trailing slash pattern mapping "${t}" in the "exports" field module resolution of the package at ${s}${i?` imported from ${(0,b.fileURLToPath)(i)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155"))}function Xi(t,e,i,s,r){let a=i.exports;if((function(p,m,d){if(typeof p=="string"||Array.isArray(p))return!0;if(typeof p!="object"||p===null)return!1;let w=Object.getOwnPropertyNames(p),O=!1,k=0,L=-1;for(;++L<w.length;){let T=w[L],ot=T===""||T[0]!==".";if(k++===0)O=ot;else if(O!==ot)throw new Wi((0,b.fileURLToPath)(m),d,`"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return O})(a,t,s)&&(a={".":a}),Hi.call(a,e)&&!e.includes("*")&&!e.endsWith("/")){let p=At(t,a[e],"",e,s,!1,!1,!1,r);if(p==null)throw Ue(e,t,s);return p}let o="",c="",h=Object.getOwnPropertyNames(a),u=-1;for(;++u<h.length;){let p=h[u],m=p.indexOf("*");if(m!==-1&&e.startsWith(p.slice(0,m))){e.endsWith("/")&&rn(e,t,s);let d=p.slice(m+1);e.length>=p.length&&e.endsWith(d)&&ts(o,p)===1&&p.lastIndexOf("*")===m&&(o=p,c=e.slice(m,e.length-d.length))}}if(o){let p=At(t,a[o],c,o,s,!0,!1,e.endsWith("/"),r);if(p==null)throw Ue(e,t,s);return p}throw Ue(e,t,s)}function ts(t,e){let i=t.indexOf("*"),s=e.indexOf("*"),r=i===-1?t.length:i+1,a=s===-1?e.length:s+1;return r>a?-1:a>r||i===-1?1:s===-1||t.length>e.length?-1:e.length>t.length?1:0}function nn(t,e,i){if(t==="#"||t.startsWith("#/")||t.endsWith("/"))throw new ae(t,"is not a valid internal imports specifier name",(0,b.fileURLToPath)(e));let s,r=Oe(e);if(r.exists){s=(0,b.pathToFileURL)(r.pjsonPath);let a=r.imports;if(a)if(Hi.call(a,t)&&!t.includes("*")){let o=At(s,a[t],"",t,e,!1,!0,!1,i);if(o!=null)return o}else{let o="",c="",h=Object.getOwnPropertyNames(a),u=-1;for(;++u<h.length;){let p=h[u],m=p.indexOf("*");if(m!==-1&&t.startsWith(p.slice(0,-1))){let d=p.slice(m+1);t.length>=p.length&&t.endsWith(d)&&ts(o,p)===1&&p.lastIndexOf("*")===m&&(o=p,c=t.slice(m,t.length-d.length))}}if(o){let p=At(s,a[o],c,o,e,!0,!0,!1,i);if(p!=null)return p}}}throw(function(a,o,c){return new zr(a,o&&(0,b.fileURLToPath)(new b.URL(".",o)),(0,b.fileURLToPath)(c))})(t,s,e)}function es(t,e,i){if(It.builtinModules.includes(t))return new b.URL("node:"+t);let{packageName:s,packageSubpath:r,isScoped:a}=(function(p,m){let d=p.indexOf("/"),w=!0,O=!1;p[0]==="@"&&(O=!0,d===-1||p.length===0?w=!1:d=p.indexOf("/",d+1));let k=d===-1?p:p.slice(0,d);if(Qr.exec(k)!==null&&(w=!1),!w)throw new ae(p,"is not a valid package name",(0,b.fileURLToPath)(m));return{packageName:k,packageSubpath:"."+(d===-1?"":p.slice(d)),isScoped:O}})(t,e),o=Oe(e);if(o.exists){let p=(0,b.pathToFileURL)(o.pjsonPath);if(o.name===s&&o.exports!==void 0&&o.exports!==null)return Xi(p,r,o,e,i)}let c,h=new b.URL("./node_modules/"+s+"/package.json",e),u=(0,b.fileURLToPath)(h);do{let p=Zi(u.slice(0,-13));if(!p||!p.isDirectory()){c=u,h=new b.URL((a?"../../../../node_modules/":"../../../node_modules/")+s+"/package.json",h),u=(0,b.fileURLToPath)(h);continue}let m=$i(u,{base:e,specifier:t});return m.exports!==void 0&&m.exports!==null?Xi(h,r,m,e,i):r==="."?tn(h,m,e):new b.URL(r,h)}while(u.length!==c.length);throw new De(s,(0,b.fileURLToPath)(e),!1)}function an(t,e,i,s){let r=e.protocol,a=r==="data:"||r==="http:"||r==="https:",o;if((function(c){return c!==""&&(c[0]==="/"||(function(h){return h[0]==="."&&(h.length===1||h[1]==="/"||h[1]==="."&&(h.length===2||h[2]==="/"))})(c))})(t))try{o=new b.URL(t,e)}catch(c){let h=new Gi(t,e);throw h.cause=c,h}else if(r==="file:"&&t[0]==="#")o=nn(t,e,i);else try{o=new b.URL(t)}catch(c){if(a&&!It.builtinModules.includes(t)){let h=new Gi(t,e);throw h.cause=c,h}o=es(t,e,i)}return mt(o!==void 0,"expected to be defined"),o.protocol!=="file:"?o:(function(c,h){if(Zr.exec(c.pathname)!==null)throw new ae(c.pathname,'must not include encoded "/" or "\\" characters',(0,b.fileURLToPath)(h));let u;try{u=(0,b.fileURLToPath)(c)}catch(m){let d=m;throw Object.defineProperty(d,"input",{value:String(c)}),Object.defineProperty(d,"module",{value:String(h)}),d}let p=Zi(u.endsWith("/")?u.slice(-1):u);if(p&&p.isDirectory()){let m=new Yr(u,(0,b.fileURLToPath)(h));throw m.url=String(c),m}if(!p||!p.isFile()){let m=new De(u||c.pathname,h&&(0,b.fileURLToPath)(h),!0);throw m.url=String(c),m}{let m=(0,J.realpathSync)(u),{search:d,hash:w}=c;(c=(0,b.pathToFileURL)(m+(u.endsWith(Pe.sep)?"/":""))).search=d,c.hash=w}return c})(o,e)}function Ft(t){return typeof t!="string"||t.startsWith("file://")?Te((0,b.fileURLToPath)(t)):Te(t)}function Pt(t){return(0,b.pathToFileURL)(Ft(t)).toString()}let on=new Set(["node","import"]),cn=[".mjs",".cjs",".js",".json"],hn=new Set(["ERR_MODULE_NOT_FOUND","ERR_UNSUPPORTED_DIR_IMPORT","MODULE_NOT_FOUND","ERR_PACKAGE_PATH_NOT_EXPORTED"]);function is(t,e,i){try{return an(t,e,i)}catch(s){if(!hn.has(s==null?void 0:s.code))throw s}}function pn(t,e={}){if(typeof t!="string"){if(!(t instanceof URL))throw new TypeError("input must be a `string` or `URL`");t=Ft(t)}if(/(?:node|data|http|https):/.test(t))return t;if(Vi.has(t))return"node:"+t;if(t.startsWith("file://")&&(t=Ft(t)),vt(t))try{if((0,J.statSync)(t).isFile())return Pt(t)}catch(o){if((o==null?void 0:o.code)!=="ENOENT")throw o}let i=e.conditions?new Set(e.conditions):on,s=(Array.isArray(e.url)?e.url:[e.url]).filter(Boolean).map(o=>new URL((function(c){return typeof c!="string"&&(c=c.toString()),/(?:node|data|http|https|file):/.test(c)?c:Vi.has(c)?"node:"+c:"file://"+encodeURI(Te(c))})(o.toString())));s.length===0&&s.push(new URL(Pt(process.cwd())));let r=[...s];for(let o of s)o.protocol==="file:"&&r.push(new URL("./",o),new URL(Ti(o.pathname,"_index.js"),o),new URL("node_modules",o));let a;for(let o of r){if(a=is(t,o,i),a)break;for(let c of["","/index"]){for(let h of e.extensions||cn)if(a=is(Ti(t,c)+h,o,i),a)break;if(a)break}if(a)break}if(!a){let o=new Error(`Cannot find module ${t} imported from ${r.join(", ")}`);throw o.code="ERR_MODULE_NOT_FOUND",o}return Pt(a)}function ln(t,e){return pn(t,e)}function un(t,e){return Ft(ln(t,e))}let fn=/(?:[\s;]|^)(?:import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m,dn=/\/\*.+?\*\/|\/\/.*(?=[nr])/g;function mn(t,e={}){return e.stripComments&&(t=t.replace(dn,"")),fn.test(t)}function ss(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}let gn=new Set(["/","\\",void 0]),rs=Symbol.for("pathe:normalizedAlias"),xn=/[/\\]/;function ns(t){var i;if(t[rs])return t;let e=Object.fromEntries(Object.entries(t).sort(([s],[r])=>(function(a,o){return o.split("/").length-a.split("/").length})(s,r)));for(let s in e)for(let r in e)r===s||s.startsWith(r)||(i=e[s])!=null&&i.startsWith(r)&&gn.has(e[s][r.length])&&(e[s]=e[r]+e[s].slice(r.length));return Object.defineProperty(e,rs,{value:!0,enumerable:!1}),e}function as(t="/"){let e=t[t.length-1];return e==="/"||e==="\\"}var yn={rE:"2.6.1"};let vn=require("crypto");var Me=x.n(vn);let ce=Object.create(null),Bt=t=>{var e,i;return((e=globalThis.process)==null?void 0:e.env)||((i=globalThis.Deno)==null?void 0:i.env.toObject())||globalThis.__env__||(t?ce:globalThis)},gt=new Proxy(ce,{get:(t,e)=>{var i;return(i=Bt()[e])!=null?i:ce[e]},has:(t,e)=>e in Bt()||e in ce,set:(t,e,i)=>(Bt(!0)[e]=i,!0),deleteProperty(t,e){return e?(delete Bt(!0)[e],!0):!1},ownKeys(){let t=Bt(!0);return Object.keys(t)}}),_n=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",bn=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CLOUDFLARE_WORKERS","WORKERS_CI",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["CODESANDBOX","CODESANDBOX_HOST",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]],os=(function(){var t,e,i,s,r,a;if((t=globalThis.process)!=null&&t.env)for(let o of bn){let c=o[1]||o[0];if((e=globalThis.process)!=null&&e.env[c])return{name:o[0].toLowerCase(),...o[2]}}return((s=(i=globalThis.process)==null?void 0:i.env)==null?void 0:s.SHELL)==="/bin/jsh"&&((a=(r=globalThis.process)==null?void 0:r.versions)!=null&&a.webcontainer)?{name:"stackblitz",ci:!1}:{name:"",ci:!1}})();os.name;function bt(t){return!!t&&t!=="false"}let je=((vs=globalThis.process)==null?void 0:vs.platform)||"",sa=bt(gt.CI)||os.ci!==!1,En=bt(((_s=globalThis.process)==null?void 0:_s.stdout)&&((bs=globalThis.process)==null?void 0:bs.stdout.isTTY)),ra=(bt(gt.DEBUG),_n==="test"||bt(gt.TEST)),cs=(bt(gt.MINIMAL),/^win/i.test(je)),$e=(/^linux/i.test(je),/^darwin/i.test(je),!bt(gt.NO_COLOR)&&(bt(gt.FORCE_COLOR)||(En||cs)&&gt.TERM),(((Ss=(Es=globalThis.process)==null?void 0:Es.versions)==null?void 0:Ss.node)||"").replace(/^v/,"")||null),Sn=(Number($e==null?void 0:$e.split(".")[0]),globalThis.process||Object.create(null)),hs={versions:{}},wn=(new Proxy(Sn,{get:(t,e)=>e==="env"?gt:e in t?t[e]:e in hs?hs[e]:void 0}),((Cs=(ws=globalThis.process)==null?void 0:ws.release)==null?void 0:Cs.name)==="node"),Cn=!!globalThis.Bun||!!((Is=(ks=globalThis.process)==null?void 0:ks.versions)!=null&&Is.bun),kn=!!globalThis.Deno,In=!!globalThis.fastly,Rn=[[!!globalThis.Netlify,"netlify"],[!!globalThis.EdgeRuntime,"edge-light"],[((Rs=globalThis.navigator)==null?void 0:Rs.userAgent)==="Cloudflare-Workers","workerd"],[In,"fastly"],[kn,"deno"],[Cn,"bun"],[wn,"node"]];(function(){let t=Rn.find(e=>e[0]);t&&t[1]})();let Fe=require("tty"),An=(Ts=(Ps=(pe=(As=Fe==null?void 0:Fe.WriteStream)==null?void 0:As.prototype)==null?void 0:pe.hasColors)==null?void 0:Ps.call(pe))!=null?Ts:!1,I=(t,e)=>{if(!An)return r=>r;let i=`\x1B[${t}m`,s=`\x1B[${e}m`;return r=>{let a=r+"",o=a.indexOf(s);if(o===-1)return i+a+s;let c=i,h=0,u=(e===22?s:"")+i;for(;o!==-1;)c+=a.slice(h,o)+u,h=o+s.length,o=a.indexOf(s,h);return c+=a.slice(h)+s,c}},ps=(I(0,0),I(1,22),I(2,22),I(3,23),I(4,24),I(53,55),I(7,27),I(8,28),I(9,29),I(30,39),I(31,39)),Tt=I(32,39),he=I(33,39),ls=I(34,39),Pn=(I(35,39),I(36,39)),Tn=(I(37,39),I(90,39));I(40,49),I(41,49),I(42,49),I(43,49),I(44,49),I(45,49),I(46,49),I(47,49),I(100,49),I(91,39),I(92,39),I(93,39),I(94,39),I(95,39),I(96,39),I(97,39),I(101,49),I(102,49),I(103,49),I(104,49),I(105,49),I(106,49),I(107,49);function us(t){if(typeof t!="string"||t.startsWith("file://"))return!1;try{return(0,J.lstatSync)(t).isDirectory()}catch{return!1}}function fs(t,e=8){return((function(){var i,s;if(Lt!==void 0)return Lt;try{return Lt=!!((s=(i=Me()).getFips)!=null&&s.call(i)),Lt}catch{return Lt=!1,Lt}})()?Me().createHash("sha256"):Me().createHash("md5")).update(t).digest("hex").slice(0,e)}let ds={true:Tt("true"),false:he("false"),"[rebuild]":he("[rebuild]"),"[esm]":ls("[esm]"),"[cjs]":Tt("[cjs]"),"[import]":ls("[import]"),"[require]":Tt("[require]"),"[native]":Pn("[native]"),"[transpile]":he("[transpile]"),"[fallback]":ps("[fallback]"),"[unknown]":ps("[unknown]"),"[hit]":Tt("[hit]"),"[miss]":he("[miss]"),"[json]":Tt("[json]"),"[data]":Tt("[data]")};function $(t,...e){if(!t.opts.debug)return;let i=process.cwd();console.log(Tn(["[jiti]",...e.map(s=>s in ds?ds[s]:typeof s!="string"?JSON.stringify(s):s.replace(i,"."))].join(" ")))}function Et(t,e){return t.opts.interopDefault?(function(i){let s=typeof i;if(i===null||s!=="object"&&s!=="function")return i;let r=i.default,a=typeof r,o=r==null,c=a==="object"||a==="function";return o&&i instanceof Promise?i:new Proxy(i,{get(h,u,p){if(u==="__esModule")return!0;if(u==="default")return o?i:typeof(r==null?void 0:r.default)=="function"&&i.__esModule?r.default:r;if(Reflect.has(h,u))return Reflect.get(h,u,p);if(c&&!(r instanceof Promise)){let m=Reflect.get(r,u,p);return typeof m=="function"&&(m=m.bind(r)),m}},apply:(h,u,p)=>typeof h=="function"?Reflect.apply(h,u,p):a==="function"?Reflect.apply(r,u,p):void 0})})(e):e}let Lt;function ht(t,e){return!!Nt(t,e)}function Nt(t,e){let i=process.env[t];if(!(t in process.env))return e;try{return JSON.parse(i)}catch{return e}}let ms=/\.(c|m)?j(sx?)$/,gs=/\.(c|m)?t(sx?)$/;function qt(t,e,i){var c;let s,r;if(t.isNativeRe.test(e))return e;t.alias&&(e=(function(h,u){let p=Rt(h);u=ns(u);for(let[m,d]of Object.entries(u)){if(!p.startsWith(m))continue;let w=as(m)?m.slice(0,-1):m;if(as(p[w.length]))return dt(d,p.slice(m.length))}return p})(e,t.alias));let a=(i==null?void 0:i.parentURL)||t.url;us(a)&&(a=dt(a,"_index.js"));let o=(i!=null&&i.async?[i==null?void 0:i.conditions,["node","import"],["node","require"]]:[i==null?void 0:i.conditions,["node","require"],["node","import"]]).filter(Boolean);for(let h of o){try{s=un(e,{url:a,conditions:h,extensions:t.opts.extensions})}catch(u){r=u}if(s)return s}try{return t.nativeRequire.resolve(e,{paths:i.paths})}catch(h){r=h}for(let h of t.additionalExts)if(s=Be(t,e+h,a,i)||Be(t,e+"/index"+h,a,i),s||(gs.test(t.filename)||gs.test(((c=t.parentModule)==null?void 0:c.filename)||"")||ms.test(e))&&(s=Be(t,e.replace(ms,".$1t$2"),a,i),s))return s;if(!(i!=null&&i.try))throw r}function Be(t,e,i,s){try{return t.nativeRequire.resolve(e,{...s,paths:[se(Ft(i)),...(s==null?void 0:s.paths)||[]]})}catch{}}let xs=require("perf_hooks"),Ln=require("vm");var Nn=x.n(Ln);function qe(t,e,i){var c;let s=t.parentCache||{};if(e.startsWith("node:"))return St(t,e,i.async);if(e.startsWith("file:"))e=(0,b.fileURLToPath)(e);else if(e.startsWith("data:")){if(!i.async)throw new Error("`data:` URLs are only supported in ESM context. Use `import` or `jiti.import` instead.");return $(t,"[native]","[data]","[import]",e),St(t,e,!0)}if(It.builtinModules.includes(e)||e===".pnp.js")return St(t,e,i.async);if(t.opts.tryNative&&!t.opts.transformOptions)try{if(!(e=qt(t,e,i))&&i.try)return;if($(t,"[try-native]",i.async&&t.nativeImport?"[import]":"[require]",e),i.async&&t.nativeImport)return t.nativeImport(e).then(h=>(t.opts.moduleCache===!1&&delete t.nativeRequire.cache[e],Et(t,h)));{let h=t.nativeRequire(e);return t.opts.moduleCache===!1&&delete t.nativeRequire.cache[e],Et(t,h)}}catch(h){$(t,`[try-native] Using fallback for ${e} because of an error:`,h)}let r=qt(t,e,i);if(!r&&i.try)return;let a=Oi(r);if(a===".json"){$(t,"[json]",r);let h=t.nativeRequire(r);return h&&!("default"in h)&&Object.defineProperty(h,"default",{value:h,enumerable:!1}),h}if(a&&!t.opts.extensions.includes(a))return $(t,"[native]","[unknown]",i.async?"[import]":"[require]",r),St(t,r,i.async);if(t.isNativeRe.test(r))return $(t,"[native]",i.async?"[import]":"[require]",r),St(t,r,i.async);if(s[r])return Et(t,(c=s[r])==null?void 0:c.exports);if(t.opts.moduleCache){let h=t.nativeRequire.cache[r];if(h!=null&&h.loaded)return Et(t,h.exports)}let o=(0,J.readFileSync)(r,"utf8");return Ge(t,o,{id:e,filename:r,ext:a,cache:s,async:i.async})}function St(t,e,i){return i&&t.nativeImport?t.nativeImport((function(s){return cs&&vt(s)?Pt(s):s})(e)).then(s=>Et(t,s)):Et(t,t.nativeRequire(e))}let On="9";function Dn(t,e,i){if(!t.opts.fsCache||!e.filename)return i();let s=` /* v${On}-${fs(e.source,16)} */
13
+ `,r=`${Di(se(e.filename))}-${(function(h){let u=h.split(xn).pop();if(!u)return;let p=u.lastIndexOf(".");return p<=0?u:u.slice(0,p)})(e.filename)}`+(t.opts.sourceMaps?"+map":"")+(e.interopDefault?".i":"")+`.${fs(e.filename)}`+(e.async?".mjs":".cjs");e.jsx&&e.filename.endsWith("x")&&(r+="x");let a=t.opts.fsCache,o=dt(a,r);if(!t.opts.rebuildFsCache&&(0,J.existsSync)(o)){let h=(0,J.readFileSync)(o,"utf8");if(h.endsWith(s))return $(t,"[cache]","[hit]",e.filename,"~>",o),h}$(t,"[cache]","[miss]",e.filename);let c=i();return c.includes("__JITI_ERROR__")||((0,J.writeFileSync)(o,c+s,"utf8"),$(t,"[cache]","[store]",e.filename,"~>",o)),c}function Vn(t){if(t.opts.fsCache===!0&&(t.opts.fsCache=(function(e){let i=e.filename&&Ur(e.filename,"../node_modules");if(i&&(0,J.existsSync)(i))return dt(i,".cache/jiti");let s=(0,g.tmpdir)();if(process.env.TMPDIR&&s===process.cwd()&&!process.env.JITI_RESPECT_TMPDIR_ENV){let r=process.env.TMPDIR;delete process.env.TMPDIR,s=(0,g.tmpdir)(),process.env.TMPDIR=r}return dt(s,"jiti")})(t)),t.opts.fsCache)try{if((0,J.mkdirSync)(t.opts.fsCache,{recursive:!0}),!(function(e){try{return(0,J.accessSync)(e,J.constants.W_OK),!0}catch{return!1}})(t.opts.fsCache))throw new Error("directory is not writable!")}catch(e){$(t,"Error creating cache directory at ",t.opts.fsCache,e),t.opts.fsCache=!1}}function We(t,e){let i=Dn(t,e,()=>{var r;let s=t.opts.transform({...t.opts.transformOptions,babel:{...t.opts.sourceMaps?{sourceFileName:e.filename,sourceMaps:"inline"}:{},...(r=t.opts.transformOptions)==null?void 0:r.babel},interopDefault:t.opts.interopDefault,...e});return s.error&&t.opts.debug&&$(t,s.error),s.code});return i.startsWith("#!")&&(i="// "+i),i}function Ge(t,e,i={}){var ot,Ls,Ns,Os;let s=i.id||(i.filename?Di(i.filename):`_jitiEval.${i.ext||(i.async?"mjs":"js")}`),r=i.filename||qt(t,s,{async:i.async}),a=i.ext||Oi(r),o=i.cache||t.parentCache||{},c=/\.[cm]?tsx?$/.test(a),h=a===".mjs"||a===".js"&&((ot=(function(j){for(;j&&j!=="."&&j!=="/";){j=dt(j,"..");try{let pt=(0,J.readFileSync)(dt(j,"package.json"),"utf8");try{return JSON.parse(pt)}catch{}break}catch{}}})(r))==null?void 0:ot.type)==="module",u=a===".cjs",p=(Ls=i.forceTranspile)!=null?Ls:!u&&!(h&&i.async)&&(c||h||t.isTransformRe.test(r)||mn(e)),m=xs.performance.now();if(p){e=We(t,{filename:r,source:e,ts:c,async:(Ns=i.async)!=null?Ns:!1,jsx:t.opts.jsx});let j=Math.round(1e3*(xs.performance.now()-m))/1e3;$(t,"[transpile]",i.async?"[esm]":"[cjs]",r,`(${j}ms)`)}else{if($(t,"[native]",i.async?"[import]":"[require]",r),i.async)return Promise.resolve(St(t,r,i.async)).catch(j=>($(t,"Native import error:",j),$(t,"[fallback]",r),Ge(t,e,{...i,forceTranspile:!0})));try{return St(t,r,i.async)}catch(j){$(t,"Native require error:",j),$(t,"[fallback]",r),e=We(t,{filename:r,source:e,ts:c,async:(Os=i.async)!=null?Os:!1,jsx:t.opts.jsx})}}let d=new It.Module(r);d.filename=r,t.parentModule&&(d.parent=t.parentModule,Array.isArray(t.parentModule.children)&&!t.parentModule.children.includes(d)&&t.parentModule.children.push(d));let w=ys(r,t.opts,{parentModule:d,parentCache:o,nativeImport:t.nativeImport,onError:t.onError,createRequire:t.createRequire},!0),O;d.require=w,d.path=se(r),d.paths=It.Module._nodeModulePaths(d.path),o[r]=d,t.opts.moduleCache&&(t.nativeRequire.cache[r]=d);let k=(function(j,pt){return`(${pt!=null&&pt.async?"async ":""}function (exports, require, module, __filename, __dirname, jitiImport, jitiESMResolve) { ${j}
14
+ });`})(e,{async:i.async});try{O=Nn().runInThisContext(k,{filename:r,lineOffset:0,displayErrors:!1})}catch(j){j.name==="SyntaxError"&&i.async&&t.nativeImport?($(t,"[esm]","[import]","[fallback]",r),O=(function(pt,He){let Ke=`data:text/javascript;base64,${Buffer.from(`export default ${pt}`).toString("base64")}`;return(...ze)=>He(Ke).then(le=>le.default(...ze))})(k,t.nativeImport)):(t.opts.moduleCache&&delete t.nativeRequire.cache[r],t.onError(j))}let L;try{L=O(d.exports,d.require,d,d.filename,se(d.filename),w.import,w.esmResolve)}catch(j){t.opts.moduleCache&&delete t.nativeRequire.cache[r],t.onError(j)}function T(){if(d.exports&&d.exports.__JITI_ERROR__){let{filename:j,line:pt,column:He,code:Ke,message:ze}=d.exports.__JITI_ERROR__,le=new Error(`${Ke}: ${ze}
15
+ ${`${j}:${pt}:${He}`}`);Error.captureStackTrace(le,qe),t.onError(le)}return d.loaded=!0,Et(t,d.exports)}return i.async?Promise.resolve(L).then(T):T()}let Un=(0,g.platform)()==="win32";function ys(t,e={},i,s=!1){let r=s?e:(function(k){let L={fsCache:ht("JITI_FS_CACHE",ht("JITI_CACHE",!0)),rebuildFsCache:ht("JITI_REBUILD_FS_CACHE",!1),moduleCache:ht("JITI_MODULE_CACHE",ht("JITI_REQUIRE_CACHE",!0)),debug:ht("JITI_DEBUG",!1),sourceMaps:ht("JITI_SOURCE_MAPS",!1),interopDefault:ht("JITI_INTEROP_DEFAULT",!0),extensions:Nt("JITI_EXTENSIONS",[".js",".mjs",".cjs",".ts",".tsx",".mts",".cts",".mtsx",".ctsx"]),alias:Nt("JITI_ALIAS",{}),nativeModules:Nt("JITI_NATIVE_MODULES",[]),transformModules:Nt("JITI_TRANSFORM_MODULES",[]),tryNative:Nt("JITI_TRY_NATIVE","Bun"in globalThis),jsx:ht("JITI_JSX",!1)};L.jsx&&L.extensions.push(".jsx",".tsx");let T={};return k.cache!==void 0&&(T.fsCache=k.cache),k.requireCache!==void 0&&(T.moduleCache=k.requireCache),{...L,...T,...k}})(e),a=r.alias&&Object.keys(r.alias).length>0?ns(r.alias||{}):void 0,o=["typescript","jiti",...r.nativeModules||[]],c=new RegExp(`node_modules/(${o.map(k=>ss(k)).join("|")})/`),h=[...r.transformModules||[]],u=new RegExp(`node_modules/(${h.map(k=>ss(k)).join("|")})/`);t||(t=process.cwd()),!s&&us(t)&&(t=dt(t,"_index.js"));let p=Pt(t),m=[...r.extensions].filter(k=>k!==".js"),d=i.createRequire(Un?t.replace(/\//g,"\\"):t),w={filename:t,url:p,opts:r,alias:a,nativeModules:o,transformModules:h,isNativeRe:c,isTransformRe:u,additionalExts:m,nativeRequire:d,onError:i.onError,parentModule:i.parentModule,parentCache:i.parentCache,nativeImport:i.nativeImport,createRequire:i.createRequire};return s||$(w,"[init]",...[["version:",yn.rE],["module-cache:",r.moduleCache],["fs-cache:",r.fsCache],["rebuild-fs-cache:",r.rebuildFsCache],["interop-defaults:",r.interopDefault]].flat()),s||Vn(w),Object.assign(function(k){return qe(w,k,{async:!1})},{cache:r.moduleCache?d.cache:Object.create(null),extensions:d.extensions,main:d.main,options:r,resolve:Object.assign(function(k){return qt(w,k,{async:!1})},{paths:d.resolve.paths}),transform:k=>We(w,k),evalModule:(k,L)=>Ge(w,k,L),async import(k,L){var ot;let T=await qe(w,k,{...L,async:!0});return L!=null&&L.default&&(ot=T==null?void 0:T.default)!=null?ot:T},esmResolve(k,L){typeof L=="string"&&(L={parentURL:L});let T=qt(w,k,{parentURL:p,...L,async:!0});return!T||typeof T!="string"||T.startsWith("file://")?T:Pt(T)}})}})(),Us.exports=_.default})()});var Fs={};Je(Fs,{createJiti:()=>$s,default:()=>zn});function Gn(l){throw l}function Kn(...l){return Ye||(Ye=(0,Qe.createRequire)(Jn.url)("../dist/babel.cjs")),Ye(...l)}function $s(l,f={}){return f.transform||(f={...f,transform:Kn}),(0,js.default)(l,f,{onError:Gn,nativeImport:Hn,createRequire:Qe.createRequire})}var Qe,js,Jn,Hn,Ye,zn,Bs=Ds(()=>{"use strict";Qe=require("module"),js=Ot(Ms(),1),Jn={};Hn=l=>import(l);zn=$s});var Ws={};Je(Ws,{createDefu:()=>xe,default:()=>Yn,defu:()=>Yn,defuArrayFn:()=>Zn,defuFn:()=>Qn});function Xe(l){if(l===null||typeof l!="object")return!1;let f=Object.getPrototypeOf(l);return f!==null&&f!==Object.prototype&&Object.getPrototypeOf(f)!==null||Symbol.iterator in l?!1:Symbol.toStringTag in l?Object.prototype.toString.call(l)==="[object Module]":!0}function ti(l,f,x=".",_){if(!Xe(f))return ti(l,{},x,_);let g=Object.assign({},f);for(let E in l){if(E==="__proto__"||E==="constructor")continue;let C=l[E];C!=null&&(_&&_(g,E,C,x)||(Array.isArray(C)&&Array.isArray(g[E])?g[E]=[...C,...g[E]]:Xe(C)&&Xe(g[E])?g[E]=ti(C,g[E],(x?`${x}.`:"")+E.toString(),_):g[E]=C))}return g}function xe(l){return(...f)=>f.reduce((x,_)=>ti(x,_,"",l),{})}var Yn,Qn,Zn,Gs=Ds(()=>{"use strict";Yn=xe(),Qn=xe((l,f,x)=>{if(l[f]!==void 0&&typeof x=="function")return l[f]=x(l[f]),!0}),Zn=xe((l,f,x)=>{if(Array.isArray(l[f])&&typeof x=="function")return l[f]=x(l[f]),!0})});var ea={};Je(ea,{main:()=>or,parseArgs:()=>nr,showHelp:()=>ar});module.exports=Wn(ea);var sr=require("fs/promises"),rr=require("path");var Hs=Ot(require("fs")),zt=Ot(require("path"));var Kt=Ot(require("path"));var fe=require("child_process"),Gt=Ot(require("fs")),Wt=Ot(require("path")),Ze=require("util"),lt=(0,Ze.promisify)(fe.exec),xt=(0,Ze.promisify)(fe.execFile),de=(l,f)=>{let x=Wt.default.resolve(l),{root:_}=Wt.default.parse(x);for(;;){for(let g of f)if(Gt.default.existsSync(Wt.default.join(x,g)))return x;if(x===_)break;x=Wt.default.dirname(x)}return null},me=l=>{try{if(!Gt.default.existsSync(l))return null;let f=Gt.default.readFileSync(l,"utf-8");return JSON.parse(f)}catch{return null}},qs=async l=>{var f;if(!Gt.default.existsSync(l))return null;try{let x=await Promise.resolve().then(()=>(Bs(),Fs)),g=(x.createJiti?x.createJiti(process.cwd()):x.default(process.cwd()))(l);return(f=g.default)!=null?f:g}catch{try{let x=await import(l);return x.default||x}catch(x){throw/\.(ts|mts)$/.test(l)?new Error(`Failed to load TypeScript config at ${l}. Please install 'jiti' as a dev dependency to load .ts files.`):x}}},Ht=(l,f)=>{if(typeof l!="object"||l===null||typeof f!="object"||f===null||Array.isArray(l)&&Array.isArray(f))return f;let x={...l};for(let _ of Object.keys(f))Object.hasOwn(f,_)&&(_ in l?x[_]=Ht(l[_],f[_]):x[_]=f[_]);return x};var ge=(l=process.cwd())=>{let f=de(l,[".git"]);if(f)return f;let x=de(l,[".changeset"]);if(x)return x;let _=de(l,["pnpm-workspace.yaml"]);if(_)return _;let g=Kt.default.resolve(l),{root:E}=Kt.default.parse(g);for(;;){let C=Kt.default.join(g,"package.json"),D=me(C);if(D!=null&&D.workspaces&&Array.isArray(D.workspaces))return g;if(g===E)break;g=Kt.default.dirname(g)}return l};var Ks=async({name:l,cwd:f=process.cwd(),defaults:x={},envVars:_={},cliArgs:g={},configFile:E})=>{let C=ge(f),D=[];if(E)D.push(zt.default.resolve(f,E));else{let V=zt.default.resolve(f),F=new RegExp(`^${l}\\.config\\.(ts|mts|js|mjs|json)$`);for(;;){try{let M=Hs.default.readdirSync(V).find(H=>F.test(H));M&&D.push(zt.default.join(V,M))}catch{}if(V===C)break;let N=zt.default.dirname(V);if(N===V)break;V=N}}let G=[];for(let V of D.reverse())if(V.endsWith(".json")){let F=me(V);F&&G.push(F)}else{let F=await qs(V);F&&G.push(F)}let et=Ht;try{let V=await Promise.resolve().then(()=>(Gs(),Ws));V!=null&&V.defu&&(et=(F,N)=>V.defu(N,F))}catch{}let Q=x;for(let V of G)Q=et(Q,V);return Q=et(Q,_),Q=et(Q,g),Q};var Js=require("fs"),yt="\x1B[",ye={gray:l=>`${yt}90m${l}${yt}39m`,blue:l=>`${yt}34m${l}${yt}39m`,yellow:l=>`${yt}33m${l}${yt}39m`,red:l=>`${yt}31m${l}${yt}39m`},zs={debug:0,info:1,warn:2,error:3},Ys=l=>{let f=zs[l.level],x=(_,g)=>{if(zs[_]<f)return;let C=`[${new Date().toISOString()}] [${_.toUpperCase()}] ${g}`,D={debug:ye.gray,info:ye.blue,warn:ye.yellow,error:ye.red},G=process.stdout.isTTY&&!process.env.NO_COLOR||!!process.env.FORCE_COLOR;console.log(G?D[_](C):C),l.logFile&&(0,Js.appendFileSync)(l.logFile,`${C}
16
+ `)};return{debug:_=>x("debug",_),info:_=>x("info",_),warn:_=>x("warn",_),error:_=>x("error",_)}};var er=require("fs/promises");var Jt=require("fs/promises"),Xn=require("path");var ei=require("git-json-resolver"),Qs=()=>Promise.all([lt("git diff --quiet"),lt("git diff --cached --quiet")]);var ii=l=>l.replace(/[^a-zA-Z0-9]/g,""),Zs=l=>{let f=l.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9_-]/g,"");if(!f||!/^[a-zA-Z0-9_]/.test(f)||f.startsWith("-"))throw new Error(`Invalid remote name: "${l}". Remote names may only contain letters, numbers, underscore, and hyphen, and cannot start with '-'.`);return f},Dt=l=>l.replace(/[\r\n]/g,""),si=async({remoteName:l,baseRef:f,targetRef:x,exclusions:_,logger:g,maxRetries:E=3,errorLogs:C=[]},D=0)=>{var Q;if(D>E){g.warn(`Max patch recursion reached (${E}), stopping`);return}let G=`git diff ${f} ${l}/main -- ${_.join(" ")} .`;g.debug(`Running: ${G}`);let{stdout:et}=await xt("git",["diff",f,`${l}/${x}`,"--",..._,"."],{encoding:"utf8"});await(0,Jt.writeFile)(".template.patch",et),g.debug(`Patch written to .template.patch (${et.length} chars)`);try{g.debug("Applying patch with 3-way merge"),await lt("git apply --3way --ignore-space-change --ignore-whitespace .template.patch",{encoding:"utf8"}),g.debug("Patch applied successfully")}catch(V){let F=(Q=V.stderr)==null?void 0:Q.split(`
17
+ `).filter(N=>N.startsWith("error"));g.debug(`Patch failed with ${F.length} errors`),F.forEach(N=>{var M;let B=(M=N.split(":")[1])==null?void 0:M.trim();B&&(_.push(`:!${B}`),g.debug(`Added to exclusions: ${Dt(B)}`))}),C.push("Applied patch with errors: "),C.push({errorLines:F,exclusions:_}),C.push("^^^---Applied patch with errors"),F.length&&await si({remoteName:l,baseRef:f,targetRef:x,exclusions:_,logger:g,maxRetries:E,errorLogs:C},D+1)}},Xs=async l=>{await(0,ei.resolveConflicts)({include:["package.json"],defaultStrategy:["merge","theirs"],rules:{name:["ours"],"devDependencies.*":["ignore-removed","theirs"],"dependencies.*":["ignore-removed","theirs"]},debug:l}),await(0,ei.resolveConflicts)({include:["**/package.json"],exclude:["package.json","**/dist/**","**/.next/**"],defaultStrategy:["merge","non-empty","ours"],rules:{"devDependencies.*":["semver-max"],"dependencies.*":["semver-max"]},loggerConfig:{logDir:".logs2",levels:{stdout:[]}},plugins:["git-json-resolver-semver"],pluginConfig:{"git-json-resolver-semver":{preferValid:!0}},includeNonConflicted:!0,debug:l})},tr=async l=>{try{let C=await(0,Jt.readFile)(l,"utf8");return JSON.parse(C).lastSyncedCommit}catch{}let[{stdout:f},{stdout:x}]=await Promise.all([lt("git log --reverse --format=%ai | head -n 1",{encoding:"utf8"}),lt("git log --format=%H::%ai template/main",{encoding:"utf8"})]),_=new Date(f.trim()),E=x.trim().split(`
18
+ `).map(C=>{let[D,G]=C.split("::");return{hash:D,date:new Date(G==null?void 0:G.trim())}}).reverse().find(C=>C.date>=_);if(E)return console.info("Applying changes from ",E.hash," dated ",E.date),E.hash};var ve={logLevel:"info",dryRun:!1,templateUrl:"https://github.com/turbo-forge/forge-template.git",excludePaths:[],remoteName:"template",maxPatchRetries:3,backupDir:".forge-backup",skipCleanCheck:!1,targetRef:"main",metaFile:".forge-meta.json",baseRef:"",postSync:["pnpm install","pnpm biome check --write --no-errors-on-unmatched $(git diff --cached --name-only --diff-filter=ACM | grep -E '\\.(ts|tsx|js|json)$' || true)"]},ta=[],ir=async l=>{let{logLevel:f,skipCleanCheck:x,dryRun:_,remoteName:g,templateUrl:E,backupDir:C,baseRef:D,excludePaths:G,targetRef:et,metaFile:Q,postSync:V,maxPatchRetries:F}=Ht(ve,l),N=Ys({level:f});if(!D){N.error("\u274C Error: Base ref is required");return}if(x)N.info("Skipping git clean check");else try{await Qs(),N.info("Git tree is clean")}catch{N.error("\u274C Error: Please commit or stash your changes before upgrading.");return}_&&N.info("Dry run mode - no changes will be applied");let B=Zs(g);try{await Promise.all([xt("git",["remote","add",B,E]),lt(`rm -rf ${C}`)])}catch{N.debug(`${Dt(B)} remote already exists`)}finally{N.debug(`Added ${Dt(B)} remote: ${Dt(E)}`)}try{await xt("git",["fetch",B]),N.debug(`Fetched latest changes from ${Dt(B)}`);let M=ii(D),H=ii(et),R=[...G].map(q=>`:!${q}`);if(N.debug(`Base exclusions: ${R.length} items`),N.debug(`Generating patch from ${M} to ${H}`),N.debug(`Total exclusions: ${R.length}`),_){let{stdout:q}=await xt("git",["diff",M,`${B}/${H}`,"--",...R,"."],{encoding:"utf8"});N.info("\u{1F4CB} Patch preview:"),N.info(q||"No changes to apply");return}await si({remoteName:B,baseRef:M,targetRef:H,exclusions:R,logger:N,maxRetries:F,errorLogs:ta});let{stdout:Z}=await xt("git",["rev-parse",`${B}/${H}`],{encoding:"utf8"});await(0,er.writeFile)(Q,JSON.stringify({lastSyncedCommit:Z.trim(),baseRef:M,targetRef:H,generatedAt:new Date().toISOString()},null,2)),await Xs(f==="debug"),console.log("\u2705 Upgrade applied successfully."),_||(N.info("Running post-sync commands..."),N.info(V.join(`
19
+ `)),await Promise.all(V.map(q=>lt(q))))}catch(M){console.error("\u274C Upgrade failed:",M)}try{await xt("git",["remote","remove",B])}catch{}};var ia={},nr=l=>{var x,_;let f={};for(let g=0;g<l.length;g++)switch(l[g]){case"--log-level":case"-l":f.logLevel=l[++g];break;case"--dry-run":f.dryRun=!0;break;case"--template-url":f.templateUrl=l[++g];break;case"--exclude":f.excludePaths=((x=l[++g])==null?void 0:x.split(","))||[];break;case"--post-sync":f.postSync=((_=l[++g])==null?void 0:_.split(","))||[];break;case"--remote-name":f.remoteName=l[++g];break;case"--max-retries":f.maxPatchRetries=parseInt(l[++g],10)||3;break;case"--skip-clean-check":f.skipCleanCheck=!0;break;case"--base-ref":f.baseRef=l[++g];break;case"--target-ref":f.targetRef=l[++g];break;case"--meta-file":f.metaFile=l[++g];break;case"--backup-dir":f.backupDir=l[++g];break;case"--init":case"-i":f.init=!0,l[g+1]&&!l[g+1].startsWith("--")&&(f.config=l[++g]);break;case"--config":case"-c":f.config=l[++g];break;case"--help":case"-h":f.help=!0;break}return f},ar=()=>{console.log(`
20
+ Usage: forge-sync [options]
21
+
22
+ Options:
23
+ -l, --log-level <level> Debug logging level - debug | info | warn | error (default: info)
24
+ --dry-run Show what would be changed without applying
25
+ --template-url <url> Custom template repository URL
26
+ --exclude <paths> Comma-separated paths to exclude from upgrade
27
+ --post-sync <cmds> Comma-separated commands to run after sync
28
+ --remote-name <name> Custom remote name for template (default: template)
29
+ --max-retries <num> Maximum patch retry attempts (default: 3)
30
+ --skip-clean-check Skip git tree clean check
31
+ --base-ref <ref> Base commit hash, tag, or branch
32
+ --target-ref <ref> Target commit hash, tag, or branch (default: main)
33
+ --meta-file <file> Meta file to store template commit hash (default: .forge-meta.json)
34
+ --backup-dir <dir> Backup directory for patches (default: .forge-backup)
35
+ -i, --init [file] Create default config file (optionally specify filename)
36
+ -c, --config <file> Use custom config file
37
+ -h, --help Show this help message
38
+
39
+ Configuration:
40
+ Create .forge-sync.config.json in your repo root for persistent settings.
41
+
42
+ Examples:
43
+ forge-sync --dry-run
44
+ forge-sync --exclude "docs,examples" --post-sync "pnpm install"
45
+ forge-sync --template-url https://github.com/custom/template
46
+ forge-sync --init
47
+ forge-sync --config .forge-sync.prod.json
48
+ `)},or=async(l=process.argv.slice(2))=>{let{help:f,init:x,config:_,...g}=nr(l);if(f){ar();return}if(x){await(0,sr.writeFile)((0,rr.resolve)(ge(),_||"forge-sync.config.json"),JSON.stringify(ve,null,2)),console.log(`Created default config file at ${_||"forge-sync.config.json"}`);return}let E=await Ks({name:"forge-sync",cliArgs:g,defaults:ve,configFile:_});E.baseRef=await tr(E.metaFile),await ir(E)};ia.url===`file://${process.argv[1]}`&&or().catch(console.error);0&&(module.exports={main,parseArgs,showHelp});
package/dist/cli.mjs ADDED
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env node
2
+ import{a as m,b as g,c as x,d as v,e as w,f as b,g as R}from"./chunk-UYOBIURF.mjs";import"./chunk-3EYN2AKU.mjs";import{writeFile as O}from"fs/promises";import{resolve as F}from"path";import P from"fs";import d from"path";import u from"path";var h=(t=process.cwd())=>{let o=m(t,[".git"]);if(o)return o;let n=m(t,[".changeset"]);if(n)return n;let s=m(t,["pnpm-workspace.yaml"]);if(s)return s;let e=u.resolve(t),{root:i}=u.parse(e);for(;;){let y=u.join(e,"package.json"),c=g(y);if(c!=null&&c.workspaces&&Array.isArray(c.workspaces))return e;if(e===i)break;e=u.dirname(e)}return t};var T=async({name:t,cwd:o=process.cwd(),defaults:n={},envVars:s={},cliArgs:e={},configFile:i})=>{let y=h(o),c=[];if(i)c.push(d.resolve(o,i));else{let r=d.resolve(o),a=new RegExp(`^${t}\\.config\\.(ts|mts|js|mjs|json)$`);for(;;){try{let C=P.readdirSync(r).find(j=>a.test(j));C&&c.push(d.join(r,C))}catch{}if(r===y)break;let p=d.dirname(r);if(p===r)break;r=p}}let k=[];for(let r of c.reverse())if(r.endsWith(".json")){let a=g(r);a&&k.push(a)}else{let a=await x(r);a&&k.push(a)}let f=v;try{let r=await import("./defu-5VPM4BZK.mjs");r!=null&&r.defu&&(f=(a,p)=>r.defu(p,a))}catch{}let l=n;for(let r of k)l=f(l,r);return l=f(l,s),l=f(l,e),l};var U={},S=t=>{var n,s;let o={};for(let e=0;e<t.length;e++)switch(t[e]){case"--log-level":case"-l":o.logLevel=t[++e];break;case"--dry-run":o.dryRun=!0;break;case"--template-url":o.templateUrl=t[++e];break;case"--exclude":o.excludePaths=((n=t[++e])==null?void 0:n.split(","))||[];break;case"--post-sync":o.postSync=((s=t[++e])==null?void 0:s.split(","))||[];break;case"--remote-name":o.remoteName=t[++e];break;case"--max-retries":o.maxPatchRetries=parseInt(t[++e],10)||3;break;case"--skip-clean-check":o.skipCleanCheck=!0;break;case"--base-ref":o.baseRef=t[++e];break;case"--target-ref":o.targetRef=t[++e];break;case"--meta-file":o.metaFile=t[++e];break;case"--backup-dir":o.backupDir=t[++e];break;case"--init":case"-i":o.init=!0,t[e+1]&&!t[e+1].startsWith("--")&&(o.config=t[++e]);break;case"--config":case"-c":o.config=t[++e];break;case"--help":case"-h":o.help=!0;break}return o},L=()=>{console.log(`
3
+ Usage: forge-sync [options]
4
+
5
+ Options:
6
+ -l, --log-level <level> Debug logging level - debug | info | warn | error (default: info)
7
+ --dry-run Show what would be changed without applying
8
+ --template-url <url> Custom template repository URL
9
+ --exclude <paths> Comma-separated paths to exclude from upgrade
10
+ --post-sync <cmds> Comma-separated commands to run after sync
11
+ --remote-name <name> Custom remote name for template (default: template)
12
+ --max-retries <num> Maximum patch retry attempts (default: 3)
13
+ --skip-clean-check Skip git tree clean check
14
+ --base-ref <ref> Base commit hash, tag, or branch
15
+ --target-ref <ref> Target commit hash, tag, or branch (default: main)
16
+ --meta-file <file> Meta file to store template commit hash (default: .forge-meta.json)
17
+ --backup-dir <dir> Backup directory for patches (default: .forge-backup)
18
+ -i, --init [file] Create default config file (optionally specify filename)
19
+ -c, --config <file> Use custom config file
20
+ -h, --help Show this help message
21
+
22
+ Configuration:
23
+ Create .forge-sync.config.json in your repo root for persistent settings.
24
+
25
+ Examples:
26
+ forge-sync --dry-run
27
+ forge-sync --exclude "docs,examples" --post-sync "pnpm install"
28
+ forge-sync --template-url https://github.com/custom/template
29
+ forge-sync --init
30
+ forge-sync --config .forge-sync.prod.json
31
+ `)},A=async(t=process.argv.slice(2))=>{let{help:o,init:n,config:s,...e}=S(t);if(o){L();return}if(n){await O(F(h(),s||"forge-sync.config.json"),JSON.stringify(b,null,2)),console.log(`Created default config file at ${s||"forge-sync.config.json"}`);return}let i=await T({name:"forge-sync",cliArgs:e,defaults:b,configFile:s});i.baseRef=await w(i.metaFile),await R(i)};U.url===`file://${process.argv[1]}`&&A().catch(console.error);export{A as main,S as parseArgs,L as showHelp};
@@ -0,0 +1 @@
1
+ import"./chunk-3EYN2AKU.mjs";function e(t){if(t===null||typeof t!="object")return!1;let r=Object.getPrototypeOf(t);return r!==null&&r!==Object.prototype&&Object.getPrototypeOf(r)!==null||Symbol.iterator in t?!1:Symbol.toStringTag in t?Object.prototype.toString.call(t)==="[object Module]":!0}function c(t,r,n=".",u){if(!e(r))return c(t,{},n,u);let i=Object.assign({},r);for(let o in t){if(o==="__proto__"||o==="constructor")continue;let f=t[o];f!=null&&(u&&u(i,o,f,n)||(Array.isArray(f)&&Array.isArray(i[o])?i[o]=[...f,...i[o]]:e(f)&&e(i[o])?i[o]=c(f,i[o],(n?`${n}.`:"")+o.toString(),u):i[o]=f))}return i}function s(t){return(...r)=>r.reduce((n,u)=>c(n,u,"",t),{})}var y=s(),l=s((t,r,n)=>{if(t[r]!==void 0&&typeof n=="function")return t[r]=n(t[r]),!0}),p=s((t,r,n)=>{if(Array.isArray(t[r])&&typeof n=="function")return t[r]=n(t[r]),!0});export{s as createDefu,y as default,y as defu,p as defuArrayFn,l as defuFn};
@@ -0,0 +1,31 @@
1
+ type LogLevel = "debug" | "info" | "warn" | "error";
2
+
3
+ interface ForgeSyncOptions {
4
+ logLevel?: LogLevel;
5
+ /** Show what would be changed without applying */
6
+ dryRun?: boolean;
7
+ /** Custom template repository URL */
8
+ templateUrl?: string;
9
+ /** Additional paths to exclude from upgrade */
10
+ excludePaths?: string[];
11
+ /** Commands to run after upgrade */
12
+ postSync?: string[];
13
+ /** Remote name for template @default "template" */
14
+ remoteName?: string;
15
+ /** Maximum patch recursion attempts */
16
+ maxPatchRetries?: number;
17
+ /** Custom backup directory */
18
+ backupDir?: string;
19
+ /** Skip git tree clean check */
20
+ skipCleanCheck?: boolean;
21
+ /** Specific commit hash, tag, or branch @default "main" */
22
+ targetRef?: string;
23
+ /** Meta file to store template commit hash, etc. */
24
+ metaFile?: string;
25
+ /** Base commit hash, tag, or branch @default "main" */
26
+ baseRef: string;
27
+ }
28
+ declare const DEFAULT_CONFIG: Required<ForgeSyncOptions>;
29
+ declare const forgeSync: (options: ForgeSyncOptions) => Promise<void>;
30
+
31
+ export { DEFAULT_CONFIG, type ForgeSyncOptions, forgeSync };
@@ -0,0 +1,31 @@
1
+ type LogLevel = "debug" | "info" | "warn" | "error";
2
+
3
+ interface ForgeSyncOptions {
4
+ logLevel?: LogLevel;
5
+ /** Show what would be changed without applying */
6
+ dryRun?: boolean;
7
+ /** Custom template repository URL */
8
+ templateUrl?: string;
9
+ /** Additional paths to exclude from upgrade */
10
+ excludePaths?: string[];
11
+ /** Commands to run after upgrade */
12
+ postSync?: string[];
13
+ /** Remote name for template @default "template" */
14
+ remoteName?: string;
15
+ /** Maximum patch recursion attempts */
16
+ maxPatchRetries?: number;
17
+ /** Custom backup directory */
18
+ backupDir?: string;
19
+ /** Skip git tree clean check */
20
+ skipCleanCheck?: boolean;
21
+ /** Specific commit hash, tag, or branch @default "main" */
22
+ targetRef?: string;
23
+ /** Meta file to store template commit hash, etc. */
24
+ metaFile?: string;
25
+ /** Base commit hash, tag, or branch @default "main" */
26
+ baseRef: string;
27
+ }
28
+ declare const DEFAULT_CONFIG: Required<ForgeSyncOptions>;
29
+ declare const forgeSync: (options: ForgeSyncOptions) => Promise<void>;
30
+
31
+ export { DEFAULT_CONFIG, type ForgeSyncOptions, forgeSync };