pinets 0.1.34 → 0.2.1

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.
@@ -15,18 +15,18 @@
15
15
  * You should have received a copy of the GNU Affero General Public License
16
16
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
17
  */
18
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var ii=[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],ct=[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],ri="\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",ht="\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",Ne={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"},Ve="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",si={5:Ve,"5module":Ve+" export import",6:Ve+" const class extends export import super"},ai=/^in(stanceof)?$/,ni=new RegExp("["+ht+"]"),oi=new RegExp("["+ht+ri+"]");function Le(e,t){for(var i=65536,r=0;r<t.length;r+=2){if(i+=t[r],i>e)return!1;if(i+=t[r+1],i>=e)return!0}return!1}function $(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&ni.test(String.fromCharCode(e)):t===!1?!1:Le(e,ct)}function re(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&oi.test(String.fromCharCode(e)):t===!1?!1:Le(e,ct)||Le(e,ii)}var C=function(t,i){i===void 0&&(i={}),this.label=t,this.keyword=i.keyword,this.beforeExpr=!!i.beforeExpr,this.startsExpr=!!i.startsExpr,this.isLoop=!!i.isLoop,this.isAssign=!!i.isAssign,this.prefix=!!i.prefix,this.postfix=!!i.postfix,this.binop=i.binop||null,this.updateContext=null};function R(e,t){return new C(e,{beforeExpr:!0,binop:t})}var B={beforeExpr:!0},M={startsExpr:!0},je={};function E(e,t){return t===void 0&&(t={}),t.keyword=e,je[e]=new C(e,t)}var o={num:new C("num",M),regexp:new C("regexp",M),string:new C("string",M),name:new C("name",M),privateId:new C("privateId",M),eof:new C("eof"),bracketL:new C("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new C("]"),braceL:new C("{",{beforeExpr:!0,startsExpr:!0}),braceR:new C("}"),parenL:new C("(",{beforeExpr:!0,startsExpr:!0}),parenR:new C(")"),comma:new C(",",B),semi:new C(";",B),colon:new C(":",B),dot:new C("."),question:new C("?",B),questionDot:new C("?."),arrow:new C("=>",B),template:new C("template"),invalidTemplate:new C("invalidTemplate"),ellipsis:new C("...",B),backQuote:new C("`",M),dollarBraceL:new C("${",{beforeExpr:!0,startsExpr:!0}),eq:new C("=",{beforeExpr:!0,isAssign:!0}),assign:new C("_=",{beforeExpr:!0,isAssign:!0}),incDec:new C("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new C("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:R("||",1),logicalAND:R("&&",2),bitwiseOR:R("|",3),bitwiseXOR:R("^",4),bitwiseAND:R("&",5),equality:R("==/!=/===/!==",6),relational:R("</>/<=/>=",7),bitShift:R("<</>>/>>>",8),plusMin:new C("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:R("%",10),star:R("*",10),slash:R("/",10),starstar:new C("**",{beforeExpr:!0}),coalesce:R("??",1),_break:E("break"),_case:E("case",B),_catch:E("catch"),_continue:E("continue"),_debugger:E("debugger"),_default:E("default",B),_do:E("do",{isLoop:!0,beforeExpr:!0}),_else:E("else",B),_finally:E("finally"),_for:E("for",{isLoop:!0}),_function:E("function",M),_if:E("if"),_return:E("return",B),_switch:E("switch"),_throw:E("throw",B),_try:E("try"),_var:E("var"),_const:E("const"),_while:E("while",{isLoop:!0}),_with:E("with"),_new:E("new",{beforeExpr:!0,startsExpr:!0}),_this:E("this",M),_super:E("super",M),_class:E("class",M),_extends:E("extends",B),_export:E("export"),_import:E("import",M),_null:E("null",M),_true:E("true",M),_false:E("false",M),_in:E("in",{beforeExpr:!0,binop:7}),_instanceof:E("instanceof",{beforeExpr:!0,binop:7}),_typeof:E("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:E("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:E("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},U=/\r\n?|\n|\u2028|\u2029/,ui=new RegExp(U.source,"g");function se(e){return e===10||e===13||e===8232||e===8233}function lt(e,t,i){i===void 0&&(i=e.length);for(var r=t;r<i;r++){var s=e.charCodeAt(r);if(se(s))return r<i-1&&s===13&&e.charCodeAt(r+1)===10?r+2:r+1}return-1}var ft=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,O=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,mt=Object.prototype,pi=mt.hasOwnProperty,ci=mt.toString,ae=Object.hasOwn||function(e,t){return pi.call(e,t)},Ye=Array.isArray||function(e){return ci.call(e)==="[object Array]"},Xe=Object.create(null);function J(e){return Xe[e]||(Xe[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function Q(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var hi=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,le=function(t,i){this.line=t,this.column=i};le.prototype.offset=function(t){return new le(this.line,this.column+t)};var Ae=function(t,i,r){this.start=i,this.end=r,t.sourceFile!==null&&(this.source=t.sourceFile)};function dt(e,t){for(var i=1,r=0;;){var s=lt(e,r,t);if(s<0)return new le(i,t-r);++i,r=s}}var De={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},Ze=!1;function li(e){var t={};for(var i in De)t[i]=e&&ae(e,i)?e[i]:De[i];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!Ze&&typeof console=="object"&&console.warn&&(Ze=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
19
- Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),Ye(t.onToken)){var r=t.onToken;t.onToken=function(s){return r.push(s)}}return Ye(t.onComment)&&(t.onComment=fi(t,t.onComment)),t}function fi(e,t){return function(i,r,s,a,n,u){var p={type:i?"Block":"Line",value:r,start:s,end:a};e.locations&&(p.loc=new Ae(this,n,u)),e.ranges&&(p.range=[s,a]),t.push(p)}}var fe=1,ne=2,Fe=4,xt=8,yt=16,gt=32,Ue=64,bt=128,de=256,qe=fe|ne|de;function We(e,t){return ne|(e?Fe:0)|(t?xt:0)}var we=0,Ge=1,Z=2,vt=3,wt=4,Et=5,P=function(t,i,r){this.options=t=li(t),this.sourceFile=t.sourceFile,this.keywords=J(si[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var s="";t.allowReserved!==!0&&(s=Ne[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(s+=" await")),this.reservedWords=J(s);var a=(s?s+" ":"")+Ne.strict;this.reservedWordsStrict=J(a),this.reservedWordsStrictBind=J(a+" "+Ne.strictBind),this.input=String(i),this.containsEsc=!1,r?(this.pos=r,this.lineStart=this.input.lastIndexOf(`
20
- `,r-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(U).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=o.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(fe),this.regexpState=null,this.privateNameStack=[]},H={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}};P.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};H.inFunction.get=function(){return(this.currentVarScope().flags&ne)>0};H.inGenerator.get=function(){return(this.currentVarScope().flags&xt)>0&&!this.currentVarScope().inClassFieldInit};H.inAsync.get=function(){return(this.currentVarScope().flags&Fe)>0&&!this.currentVarScope().inClassFieldInit};H.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&de)return!1;if(t.flags&ne)return(t.flags&Fe)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};H.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(t&Ue)>0||i||this.options.allowSuperOutsideMethod};H.allowDirectSuper.get=function(){return(this.currentThisScope().flags&bt)>0};H.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};H.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(t&(ne|de))>0||i};H.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&de)>0};P.extend=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];for(var r=this,s=0;s<t.length;s++)r=t[s](r);return r};P.parse=function(t,i){return new this(i,t).parse()};P.parseExpressionAt=function(t,i,r){var s=new this(r,t,i);return s.nextToken(),s.parseExpression()};P.tokenizer=function(t,i){return new this(i,t)};Object.defineProperties(P.prototype,H);var T=P.prototype,mi=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;T.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){O.lastIndex=e,e+=O.exec(this.input)[0].length;var t=mi.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){O.lastIndex=e+t[0].length;var i=O.exec(this.input),r=i.index+i[0].length,s=this.input.charAt(r);return s===";"||s==="}"||U.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(s)||s==="!"&&this.input.charAt(r+1)==="=")}e+=t[0].length,O.lastIndex=e,e+=O.exec(this.input)[0].length,this.input[e]===";"&&e++}};T.eat=function(e){return this.type===e?(this.next(),!0):!1};T.isContextual=function(e){return this.type===o.name&&this.value===e&&!this.containsEsc};T.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};T.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};T.canInsertSemicolon=function(){return this.type===o.eof||this.type===o.braceR||U.test(this.input.slice(this.lastTokEnd,this.start))};T.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};T.semicolon=function(){!this.eat(o.semi)&&!this.insertSemicolon()&&this.unexpected()};T.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};T.expect=function(e){this.eat(e)||this.unexpected()};T.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var ke=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};T.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var i=t?e.parenthesizedAssign:e.parenthesizedBind;i>-1&&this.raiseRecoverable(i,t?"Assigning to rvalue":"Parenthesized pattern")}};T.checkExpressionErrors=function(e,t){if(!e)return!1;var i=e.shorthandAssign,r=e.doubleProto;if(!t)return i>=0||r>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")};T.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")};T.isSimpleAssignTarget=function(e){return e.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(e.expression):e.type==="Identifier"||e.type==="MemberExpression"};var y=P.prototype;y.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==o.eof;){var i=this.parseStatement(null,!0,t);e.body.push(i)}if(this.inModule)for(var r=0,s=Object.keys(this.undefinedExports);r<s.length;r+=1){var a=s[r];this.raiseRecoverable(this.undefinedExports[a].start,"Export '"+a+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var ze={kind:"loop"},di={kind:"switch"};y.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;O.lastIndex=this.pos;var t=O.exec(this.input),i=this.pos+t[0].length,r=this.input.charCodeAt(i);if(r===91||r===92)return!0;if(e)return!1;if(r===123||r>55295&&r<56320)return!0;if($(r,!0)){for(var s=i+1;re(r=this.input.charCodeAt(s),!0);)++s;if(r===92||r>55295&&r<56320)return!0;var a=this.input.slice(i,s);if(!ai.test(a))return!0}return!1};y.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;O.lastIndex=this.pos;var e=O.exec(this.input),t=this.pos+e[0].length,i;return!U.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(re(i=this.input.charCodeAt(t+8))||i>55295&&i<56320))};y.parseStatement=function(e,t,i){var r=this.type,s=this.startNode(),a;switch(this.isLet(e)&&(r=o._var,a="let"),r){case o._break:case o._continue:return this.parseBreakContinueStatement(s,r.keyword);case o._debugger:return this.parseDebuggerStatement(s);case o._do:return this.parseDoStatement(s);case o._for:return this.parseForStatement(s);case o._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!e);case o._class:return e&&this.unexpected(),this.parseClass(s,!0);case o._if:return this.parseIfStatement(s);case o._return:return this.parseReturnStatement(s);case o._switch:return this.parseSwitchStatement(s);case o._throw:return this.parseThrowStatement(s);case o._try:return this.parseTryStatement(s);case o._const:case o._var:return a=a||this.value,e&&a!=="var"&&this.unexpected(),this.parseVarStatement(s,a);case o._while:return this.parseWhileStatement(s);case o._with:return this.parseWithStatement(s);case o.braceL:return this.parseBlock(!0,s);case o.semi:return this.parseEmptyStatement(s);case o._export:case o._import:if(this.options.ecmaVersion>10&&r===o._import){O.lastIndex=this.pos;var n=O.exec(this.input),u=this.pos+n[0].length,p=this.input.charCodeAt(u);if(p===40||p===46)return this.parseExpressionStatement(s,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===o._import?this.parseImport(s):this.parseExport(s,i);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(s,!0,!e);var c=this.value,l=this.parseExpression();return r===o.name&&l.type==="Identifier"&&this.eat(o.colon)?this.parseLabeledStatement(s,c,l,e):this.parseExpressionStatement(s,l)}};y.parseBreakContinueStatement=function(e,t){var i=t==="break";this.next(),this.eat(o.semi)||this.insertSemicolon()?e.label=null:this.type!==o.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var s=this.labels[r];if((e.label==null||s.name===e.label.name)&&(s.kind!=null&&(i||s.kind==="loop")||e.label&&i))break}return r===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,i?"BreakStatement":"ContinueStatement")};y.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};y.parseDoStatement=function(e){return this.next(),this.labels.push(ze),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(o._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(o.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};y.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(ze),this.enterScope(0),this.expect(o.parenL),this.type===o.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var i=this.isLet();if(this.type===o._var||this.type===o._const||i){var r=this.startNode(),s=i?"let":this.value;return this.next(),this.parseVar(r,!0,s),this.finishNode(r,"VariableDeclaration"),(this.type===o._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&r.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===o._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,r)):(t>-1&&this.unexpected(t),this.parseFor(e,r))}var a=this.isContextual("let"),n=!1,u=this.containsEsc,p=new ke,c=this.start,l=t>-1?this.parseExprSubscripts(p,"await"):this.parseExpression(!0,p);return this.type===o._in||(n=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===o._in&&this.unexpected(t),e.await=!0):n&&this.options.ecmaVersion>=8&&(l.start===c&&!u&&l.type==="Identifier"&&l.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),a&&n&&this.raise(l.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(l,!1,p),this.checkLValPattern(l),this.parseForIn(e,l)):(this.checkExpressionErrors(p,!0),t>-1&&this.unexpected(t),this.parseFor(e,l))};y.parseFunctionStatement=function(e,t,i){return this.next(),this.parseFunction(e,ce|(i?0:Re),!1,t)};y.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(o._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};y.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(o.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};y.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(o.braceL),this.labels.push(di),this.enterScope(0);for(var t,i=!1;this.type!==o.braceR;)if(this.type===o._case||this.type===o._default){var r=this.type===o._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,t.test=null),this.expect(o.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};y.parseThrowStatement=function(e){return this.next(),U.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var xi=[];y.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?gt:0),this.checkLValPattern(e,t?wt:Z),this.expect(o.parenR),e};y.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===o._catch){var t=this.startNode();this.next(),this.eat(o.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(o._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};y.parseVarStatement=function(e,t,i){return this.next(),this.parseVar(e,!1,t,i),this.semicolon(),this.finishNode(e,"VariableDeclaration")};y.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(ze),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};y.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};y.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};y.parseLabeledStatement=function(e,t,i,r){for(var s=0,a=this.labels;s<a.length;s+=1){var n=a[s];n.name===t&&this.raise(i.start,"Label '"+t+"' is already declared")}for(var u=this.type.isLoop?"loop":this.type===o._switch?"switch":null,p=this.labels.length-1;p>=0;p--){var c=this.labels[p];if(c.statementStart===e.start)c.statementStart=this.start,c.kind=u;else break}return this.labels.push({name:t,kind:u,statementStart:this.start}),e.body=this.parseStatement(r?r.indexOf("label")===-1?r+"label":r:"label"),this.labels.pop(),e.label=i,this.finishNode(e,"LabeledStatement")};y.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};y.parseBlock=function(e,t,i){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(o.braceL),e&&this.enterScope(0);this.type!==o.braceR;){var r=this.parseStatement(null);t.body.push(r)}return i&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};y.parseFor=function(e,t){return e.init=t,this.expect(o.semi),e.test=this.type===o.semi?null:this.parseExpression(),this.expect(o.semi),e.update=this.type===o.parenR?null:this.parseExpression(),this.expect(o.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};y.parseForIn=function(e,t){var i=this.type===o._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!i||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(o.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,i?"ForInStatement":"ForOfStatement")};y.parseVar=function(e,t,i,r){for(e.declarations=[],e.kind=i;;){var s=this.startNode();if(this.parseVarId(s,i),this.eat(o.eq)?s.init=this.parseMaybeAssign(t):!r&&i==="const"&&!(this.type===o._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!r&&s.id.type!=="Identifier"&&!(t&&(this.type===o._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):s.init=null,e.declarations.push(this.finishNode(s,"VariableDeclarator")),!this.eat(o.comma))break}return e};y.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?Ge:Z,!1)};var ce=1,Re=2,Ct=4;y.parseFunction=function(e,t,i,r,s){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===o.star&&t&Re&&this.unexpected(),e.generator=this.eat(o.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&ce&&(e.id=t&Ct&&this.type!==o.name?null:this.parseIdent(),e.id&&!(t&Re)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Ge:Z:vt));var a=this.yieldPos,n=this.awaitPos,u=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(We(e.async,e.generator)),t&ce||(e.id=this.type===o.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,i,!1,s),this.yieldPos=a,this.awaitPos=n,this.awaitIdentPos=u,this.finishNode(e,t&ce?"FunctionDeclaration":"FunctionExpression")};y.parseFunctionParams=function(e){this.expect(o.parenL),e.params=this.parseBindingList(o.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};y.parseClass=function(e,t){this.next();var i=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),s=this.startNode(),a=!1;for(s.body=[],this.expect(o.braceL);this.type!==o.braceR;){var n=this.parseClassElement(e.superClass!==null);n&&(s.body.push(n),n.type==="MethodDefinition"&&n.kind==="constructor"?(a&&this.raiseRecoverable(n.start,"Duplicate constructor in the same class"),a=!0):n.key&&n.key.type==="PrivateIdentifier"&&yi(r,n)&&this.raiseRecoverable(n.key.start,"Identifier '#"+n.key.name+"' has already been declared"))}return this.strict=i,this.next(),e.body=this.finishNode(s,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};y.parseClassElement=function(e){if(this.eat(o.semi))return null;var t=this.options.ecmaVersion,i=this.startNode(),r="",s=!1,a=!1,n="method",u=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(o.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===o.star?u=!0:r="static"}if(i.static=u,!r&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===o.star)&&!this.canInsertSemicolon()?a=!0:r="async"),!r&&(t>=9||!a)&&this.eat(o.star)&&(s=!0),!r&&!a&&!s){var p=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?n=p:r=p)}if(r?(i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=r,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),t<13||this.type===o.parenL||n!=="method"||s||a){var c=!i.static&&Ee(i,"constructor"),l=c&&e;c&&n!=="method"&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=c?"constructor":n,this.parseClassMethod(i,s,a,l)}else this.parseClassField(i);return i};y.isClassElementNameStart=function(){return this.type===o.name||this.type===o.privateId||this.type===o.num||this.type===o.string||this.type===o.bracketL||this.type.keyword};y.parseClassElementName=function(e){this.type===o.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};y.parseClassMethod=function(e,t,i,r){var s=e.key;e.kind==="constructor"?(t&&this.raise(s.start,"Constructor can't be a generator"),i&&this.raise(s.start,"Constructor can't be an async method")):e.static&&Ee(e,"prototype")&&this.raise(s.start,"Classes may not have a static property named prototype");var a=e.value=this.parseMethod(t,i,r);return e.kind==="get"&&a.params.length!==0&&this.raiseRecoverable(a.start,"getter should have no params"),e.kind==="set"&&a.params.length!==1&&this.raiseRecoverable(a.start,"setter should have exactly one param"),e.kind==="set"&&a.params[0].type==="RestElement"&&this.raiseRecoverable(a.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};y.parseClassField=function(e){if(Ee(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&Ee(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(o.eq)){var t=this.currentThisScope(),i=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=i}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};y.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(de|Ue);this.type!==o.braceR;){var i=this.parseStatement(null);e.body.push(i)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};y.parseClassId=function(e,t){this.type===o.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,Z,!1)):(t===!0&&this.unexpected(),e.id=null)};y.parseClassSuper=function(e){e.superClass=this.eat(o._extends)?this.parseExprSubscripts(null,!1):null};y.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};y.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,i=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,s=r===0?null:this.privateNameStack[r-1],a=0;a<i.length;++a){var n=i[a];ae(t,n.name)||(s?s.used.push(n):this.raiseRecoverable(n.start,"Private field '#"+n.name+"' must be declared in an enclosing class"))}};function yi(e,t){var i=t.key.name,r=e[i],s="true";return t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")&&(s=(t.static?"s":"i")+t.kind),r==="iget"&&s==="iset"||r==="iset"&&s==="iget"||r==="sget"&&s==="sset"||r==="sset"&&s==="sget"?(e[i]="true",!1):r?!0:(e[i]=s,!1)}function Ee(e,t){var i=e.computed,r=e.key;return!i&&(r.type==="Identifier"&&r.name===t||r.type==="Literal"&&r.value===t)}y.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==o.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};y.parseExport=function(e,t){if(this.next(),this.eat(o.star))return this.parseExportAllDeclaration(e,t);if(this.eat(o._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==o.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var i=0,r=e.specifiers;i<r.length;i+=1){var s=r[i];this.checkUnreserved(s.local),this.checkLocalExport(s.local),s.local.type==="Literal"&&this.raise(s.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};y.parseExportDeclaration=function(e){return this.parseStatement(null)};y.parseExportDefaultDeclaration=function(){var e;if(this.type===o._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,ce|Ct,!1,e)}else if(this.type===o._class){var i=this.startNode();return this.parseClass(i,"nullableID")}else{var r=this.parseMaybeAssign();return this.semicolon(),r}};y.checkExport=function(e,t,i){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),ae(e,t)&&this.raiseRecoverable(i,"Duplicate export '"+t+"'"),e[t]=!0)};y.checkPatternExport=function(e,t){var i=t.type;if(i==="Identifier")this.checkExport(e,t,t.start);else if(i==="ObjectPattern")for(var r=0,s=t.properties;r<s.length;r+=1){var a=s[r];this.checkPatternExport(e,a)}else if(i==="ArrayPattern")for(var n=0,u=t.elements;n<u.length;n+=1){var p=u[n];p&&this.checkPatternExport(e,p)}else i==="Property"?this.checkPatternExport(e,t.value):i==="AssignmentPattern"?this.checkPatternExport(e,t.left):i==="RestElement"&&this.checkPatternExport(e,t.argument)};y.checkVariableExport=function(e,t){if(e)for(var i=0,r=t;i<r.length;i+=1){var s=r[i];this.checkPatternExport(e,s.id)}};y.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};y.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")};y.parseExportSpecifiers=function(e){var t=[],i=!0;for(this.expect(o.braceL);!this.eat(o.braceR);){if(i)i=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;t.push(this.parseExportSpecifier(e))}return t};y.parseImport=function(e){return this.next(),this.type===o.string?(e.specifiers=xi,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===o.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")};y.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,Z),this.finishNode(e,"ImportSpecifier")};y.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,Z),this.finishNode(e,"ImportDefaultSpecifier")};y.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,Z),this.finishNode(e,"ImportNamespaceSpecifier")};y.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===o.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(o.comma)))return e;if(this.type===o.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(o.braceL);!this.eat(o.braceR);){if(t)t=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;e.push(this.parseImportSpecifier())}return e};y.parseWithClause=function(){var e=[];if(!this.eat(o._with))return e;this.expect(o.braceL);for(var t={},i=!0;!this.eat(o.braceR);){if(i)i=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;var r=this.parseImportAttribute(),s=r.key.type==="Identifier"?r.key.name:r.key.value;ae(t,s)&&this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+s+"'"),t[s]=!0,e.push(r)}return e};y.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===o.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(o.colon),this.type!==o.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};y.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===o.string){var e=this.parseLiteral(this.value);return hi.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};y.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)};y.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var q=P.prototype;q.toAssignable=function(e,t,i){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var r=0,s=e.properties;r<s.length;r+=1){var a=s[r];this.toAssignable(a,t),a.type==="RestElement"&&(a.argument.type==="ArrayPattern"||a.argument.type==="ObjectPattern")&&this.raise(a.argument.start,"Unexpected token")}break;case"Property":e.kind!=="init"&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",i&&this.checkPatternErrors(i,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern"&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":e.operator!=="="&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,i);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else i&&this.checkPatternErrors(i,!0);return e};q.toAssignableList=function(e,t){for(var i=e.length,r=0;r<i;r++){var s=e[r];s&&this.toAssignable(s,t)}if(i){var a=e[i-1];this.options.ecmaVersion===6&&t&&a&&a.type==="RestElement"&&a.argument.type!=="Identifier"&&this.unexpected(a.argument.start)}return e};q.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};q.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==o.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};q.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case o.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(o.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case o.braceL:return this.parseObj(!0)}return this.parseIdent()};q.parseBindingList=function(e,t,i,r){for(var s=[],a=!0;!this.eat(e);)if(a?a=!1:this.expect(o.comma),t&&this.type===o.comma)s.push(null);else{if(i&&this.afterTrailingComma(e))break;if(this.type===o.ellipsis){var n=this.parseRestBinding();this.parseBindingListItem(n),s.push(n),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}else s.push(this.parseAssignableListItem(r))}return s};q.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};q.parseBindingListItem=function(e){return e};q.parseMaybeDefault=function(e,t,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(o.eq))return i;var r=this.startNodeAt(e,t);return r.left=i,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")};q.checkLValSimple=function(e,t,i){t===void 0&&(t=we);var r=t!==we;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?"Binding ":"Assigning to ")+e.name+" in strict mode"),r&&(t===Z&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),i&&(ae(i,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),i[e.name]=!0),t!==Et&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":r&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return r&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,i);default:this.raise(e.start,(r?"Binding":"Assigning to")+" rvalue")}};q.checkLValPattern=function(e,t,i){switch(t===void 0&&(t=we),e.type){case"ObjectPattern":for(var r=0,s=e.properties;r<s.length;r+=1){var a=s[r];this.checkLValInnerPattern(a,t,i)}break;case"ArrayPattern":for(var n=0,u=e.elements;n<u.length;n+=1){var p=u[n];p&&this.checkLValInnerPattern(p,t,i)}break;default:this.checkLValSimple(e,t,i)}};q.checkLValInnerPattern=function(e,t,i){switch(t===void 0&&(t=we),e.type){case"Property":this.checkLValInnerPattern(e.value,t,i);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,i);break;case"RestElement":this.checkLValPattern(e.argument,t,i);break;default:this.checkLValPattern(e,t,i)}};var W=function(t,i,r,s,a){this.token=t,this.isExpr=!!i,this.preserveSpace=!!r,this.override=s,this.generator=!!a},k={b_stat:new W("{",!1),b_expr:new W("{",!0),b_tmpl:new W("${",!1),p_stat:new W("(",!1),p_expr:new W("(",!0),q_tmpl:new W("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new W("function",!1),f_expr:new W("function",!0),f_expr_gen:new W("function",!0,!1,null,!0),f_gen:new W("function",!1,!1,null,!0)},oe=P.prototype;oe.initialContext=function(){return[k.b_stat]};oe.curContext=function(){return this.context[this.context.length-1]};oe.braceIsBlock=function(e){var t=this.curContext();return t===k.f_expr||t===k.f_stat?!0:e===o.colon&&(t===k.b_stat||t===k.b_expr)?!t.isExpr:e===o._return||e===o.name&&this.exprAllowed?U.test(this.input.slice(this.lastTokEnd,this.start)):e===o._else||e===o.semi||e===o.eof||e===o.parenR||e===o.arrow?!0:e===o.braceL?t===k.b_stat:e===o._var||e===o._const||e===o.name?!1:!this.exprAllowed};oe.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1};oe.updateContext=function(e){var t,i=this.type;i.keyword&&e===o.dot?this.exprAllowed=!1:(t=i.updateContext)?t.call(this,e):this.exprAllowed=i.beforeExpr};oe.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)};o.parenR.updateContext=o.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===k.b_stat&&this.curContext().token==="function"&&(e=this.context.pop()),this.exprAllowed=!e.isExpr};o.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?k.b_stat:k.b_expr),this.exprAllowed=!0};o.dollarBraceL.updateContext=function(){this.context.push(k.b_tmpl),this.exprAllowed=!0};o.parenL.updateContext=function(e){var t=e===o._if||e===o._for||e===o._with||e===o._while;this.context.push(t?k.p_stat:k.p_expr),this.exprAllowed=!0};o.incDec.updateContext=function(){};o._function.updateContext=o._class.updateContext=function(e){e.beforeExpr&&e!==o._else&&!(e===o.semi&&this.curContext()!==k.p_stat)&&!(e===o._return&&U.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===o.colon||e===o.braceL)&&this.curContext()===k.b_stat)?this.context.push(k.f_expr):this.context.push(k.f_stat),this.exprAllowed=!1};o.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0};o.backQuote.updateContext=function(){this.curContext()===k.q_tmpl?this.context.pop():this.context.push(k.q_tmpl),this.exprAllowed=!1};o.star.updateContext=function(e){if(e===o._function){var t=this.context.length-1;this.context[t]===k.f_expr?this.context[t]=k.f_expr_gen:this.context[t]=k.f_gen}this.exprAllowed=!0};o.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==o.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var g=P.prototype;g.checkPropClash=function(e,t,i){if(!(this.options.ecmaVersion>=9&&e.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r=e.key,s;switch(r.type){case"Identifier":s=r.name;break;case"Literal":s=String(r.value);break;default:return}var a=e.kind;if(this.options.ecmaVersion>=6){s==="__proto__"&&a==="init"&&(t.proto&&(i?i.doubleProto<0&&(i.doubleProto=r.start):this.raiseRecoverable(r.start,"Redefinition of __proto__ property")),t.proto=!0);return}s="$"+s;var n=t[s];if(n){var u;a==="init"?u=this.strict&&n.init||n.get||n.set:u=n.init||n[a],u&&this.raiseRecoverable(r.start,"Redefinition of property")}else n=t[s]={init:!1,get:!1,set:!1};n[a]=!0}};g.parseExpression=function(e,t){var i=this.start,r=this.startLoc,s=this.parseMaybeAssign(e,t);if(this.type===o.comma){var a=this.startNodeAt(i,r);for(a.expressions=[s];this.eat(o.comma);)a.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(a,"SequenceExpression")}return s};g.parseMaybeAssign=function(e,t,i){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,s=-1,a=-1,n=-1;t?(s=t.parenthesizedAssign,a=t.trailingComma,n=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new ke,r=!0);var u=this.start,p=this.startLoc;(this.type===o.parenL||this.type===o.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var c=this.parseMaybeConditional(e,t);if(i&&(c=i.call(this,c,u,p)),this.type.isAssign){var l=this.startNodeAt(u,p);return l.operator=this.value,this.type===o.eq&&(c=this.toAssignable(c,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=c.start&&(t.shorthandAssign=-1),this.type===o.eq?this.checkLValPattern(c):this.checkLValSimple(c),l.left=c,this.next(),l.right=this.parseMaybeAssign(e),n>-1&&(t.doubleProto=n),this.finishNode(l,"AssignmentExpression")}else r&&this.checkExpressionErrors(t,!0);return s>-1&&(t.parenthesizedAssign=s),a>-1&&(t.trailingComma=a),c};g.parseMaybeConditional=function(e,t){var i=this.start,r=this.startLoc,s=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return s;if(this.eat(o.question)){var a=this.startNodeAt(i,r);return a.test=s,a.consequent=this.parseMaybeAssign(),this.expect(o.colon),a.alternate=this.parseMaybeAssign(e),this.finishNode(a,"ConditionalExpression")}return s};g.parseExprOps=function(e,t){var i=this.start,r=this.startLoc,s=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||s.start===i&&s.type==="ArrowFunctionExpression"?s:this.parseExprOp(s,i,r,-1,e)};g.parseExprOp=function(e,t,i,r,s){var a=this.type.binop;if(a!=null&&(!s||this.type!==o._in)&&a>r){var n=this.type===o.logicalOR||this.type===o.logicalAND,u=this.type===o.coalesce;u&&(a=o.logicalAND.binop);var p=this.value;this.next();var c=this.start,l=this.startLoc,d=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,s),c,l,a,s),h=this.buildBinary(t,i,e,d,p,n||u);return(n&&this.type===o.coalesce||u&&(this.type===o.logicalOR||this.type===o.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(h,t,i,r,s)}return e};g.buildBinary=function(e,t,i,r,s,a){r.type==="PrivateIdentifier"&&this.raise(r.start,"Private identifier can only be left side of binary expression");var n=this.startNodeAt(e,t);return n.left=i,n.operator=s,n.right=r,this.finishNode(n,a?"LogicalExpression":"BinaryExpression")};g.parseMaybeUnary=function(e,t,i,r){var s=this.start,a=this.startLoc,n;if(this.isContextual("await")&&this.canAwait)n=this.parseAwait(r),t=!0;else if(this.type.prefix){var u=this.startNode(),p=this.type===o.incDec;u.operator=this.value,u.prefix=!0,this.next(),u.argument=this.parseMaybeUnary(null,!0,p,r),this.checkExpressionErrors(e,!0),p?this.checkLValSimple(u.argument):this.strict&&u.operator==="delete"&&St(u.argument)?this.raiseRecoverable(u.start,"Deleting local variable in strict mode"):u.operator==="delete"&&Be(u.argument)?this.raiseRecoverable(u.start,"Private fields can not be deleted"):t=!0,n=this.finishNode(u,p?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===o.privateId)(r||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),n=this.parsePrivateIdent(),this.type!==o._in&&this.unexpected();else{if(n=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var c=this.startNodeAt(s,a);c.operator=this.value,c.prefix=!1,c.argument=n,this.checkLValSimple(n),this.next(),n=this.finishNode(c,"UpdateExpression")}}if(!i&&this.eat(o.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(s,a,n,this.parseMaybeUnary(null,!1,!1,r),"**",!1);else return n};function St(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&St(e.expression)}function Be(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&Be(e.expression)||e.type==="ParenthesizedExpression"&&Be(e.expression)}g.parseExprSubscripts=function(e,t){var i=this.start,r=this.startLoc,s=this.parseExprAtom(e,t);if(s.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return s;var a=this.parseSubscripts(s,i,r,!1,t);return e&&a.type==="MemberExpression"&&(e.parenthesizedAssign>=a.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=a.start&&(e.parenthesizedBind=-1),e.trailingComma>=a.start&&(e.trailingComma=-1)),a};g.parseSubscripts=function(e,t,i,r,s){for(var a=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,n=!1;;){var u=this.parseSubscript(e,t,i,r,a,n,s);if(u.optional&&(n=!0),u===e||u.type==="ArrowFunctionExpression"){if(n){var p=this.startNodeAt(t,i);p.expression=u,u=this.finishNode(p,"ChainExpression")}return u}e=u}};g.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(o.arrow)};g.parseSubscriptAsyncArrow=function(e,t,i,r){return this.parseArrowExpression(this.startNodeAt(e,t),i,!0,r)};g.parseSubscript=function(e,t,i,r,s,a,n){var u=this.options.ecmaVersion>=11,p=u&&this.eat(o.questionDot);r&&p&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var c=this.eat(o.bracketL);if(c||p&&this.type!==o.parenL&&this.type!==o.backQuote||this.eat(o.dot)){var l=this.startNodeAt(t,i);l.object=e,c?(l.property=this.parseExpression(),this.expect(o.bracketR)):this.type===o.privateId&&e.type!=="Super"?l.property=this.parsePrivateIdent():l.property=this.parseIdent(this.options.allowReserved!=="never"),l.computed=!!c,u&&(l.optional=p),e=this.finishNode(l,"MemberExpression")}else if(!r&&this.eat(o.parenL)){var d=new ke,h=this.yieldPos,b=this.awaitPos,v=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var x=this.parseExprList(o.parenR,this.options.ecmaVersion>=8,!1,d);if(s&&!p&&this.shouldParseAsyncArrow())return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=h,this.awaitPos=b,this.awaitIdentPos=v,this.parseSubscriptAsyncArrow(t,i,x,n);this.checkExpressionErrors(d,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=b||this.awaitPos,this.awaitIdentPos=v||this.awaitIdentPos;var _=this.startNodeAt(t,i);_.callee=e,_.arguments=x,u&&(_.optional=p),e=this.finishNode(_,"CallExpression")}else if(this.type===o.backQuote){(p||a)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var I=this.startNodeAt(t,i);I.tag=e,I.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(I,"TaggedTemplateExpression")}return e};g.parseExprAtom=function(e,t,i){this.type===o.slash&&this.readRegexp();var r,s=this.potentialArrowAt===this.start;switch(this.type){case o._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type===o.parenL&&!this.allowDirectSuper&&this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==o.dot&&this.type!==o.bracketL&&this.type!==o.parenL&&this.unexpected(),this.finishNode(r,"Super");case o._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case o.name:var a=this.start,n=this.startLoc,u=this.containsEsc,p=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!u&&p.name==="async"&&!this.canInsertSemicolon()&&this.eat(o._function))return this.overrideContext(k.f_expr),this.parseFunction(this.startNodeAt(a,n),0,!1,!0,t);if(s&&!this.canInsertSemicolon()){if(this.eat(o.arrow))return this.parseArrowExpression(this.startNodeAt(a,n),[p],!1,t);if(this.options.ecmaVersion>=8&&p.name==="async"&&this.type===o.name&&!u&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return p=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(o.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,n),[p],!0,t)}return p;case o.regexp:var c=this.value;return r=this.parseLiteral(c.value),r.regex={pattern:c.pattern,flags:c.flags},r;case o.num:case o.string:return this.parseLiteral(this.value);case o._null:case o._true:case o._false:return r=this.startNode(),r.value=this.type===o._null?null:this.type===o._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case o.parenL:var l=this.start,d=this.parseParenAndDistinguishExpression(s,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(d)&&(e.parenthesizedAssign=l),e.parenthesizedBind<0&&(e.parenthesizedBind=l)),d;case o.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(o.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case o.braceL:return this.overrideContext(k.b_expr),this.parseObj(!1,e);case o._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case o._class:return this.parseClass(this.startNode(),!1);case o._new:return this.parseNew();case o.backQuote:return this.parseTemplate();case o._import:return this.options.ecmaVersion>=11?this.parseExprImport(i):this.unexpected();default:return this.parseExprAtomDefault()}};g.parseExprAtomDefault=function(){this.unexpected()};g.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===o.parenL&&!e)return this.parseDynamicImport(t);if(this.type===o.dot){var i=this.startNodeAt(t.start,t.loc&&t.loc.start);return i.name="import",t.meta=this.finishNode(i,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};g.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(o.parenR)?e.options=null:(this.expect(o.comma),this.afterTrailingComma(o.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(o.parenR)||(this.expect(o.comma),this.afterTrailingComma(o.parenR)||this.unexpected())));else if(!this.eat(o.parenR)){var t=this.start;this.eat(o.comma)&&this.eat(o.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};g.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};g.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};g.parseParenExpression=function(){this.expect(o.parenL);var e=this.parseExpression();return this.expect(o.parenR),e};g.shouldParseArrow=function(e){return!this.canInsertSemicolon()};g.parseParenAndDistinguishExpression=function(e,t){var i=this.start,r=this.startLoc,s,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var n=this.start,u=this.startLoc,p=[],c=!0,l=!1,d=new ke,h=this.yieldPos,b=this.awaitPos,v;for(this.yieldPos=0,this.awaitPos=0;this.type!==o.parenR;)if(c?c=!1:this.expect(o.comma),a&&this.afterTrailingComma(o.parenR,!0)){l=!0;break}else if(this.type===o.ellipsis){v=this.start,p.push(this.parseParenItem(this.parseRestBinding())),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else p.push(this.parseMaybeAssign(!1,d,this.parseParenItem));var x=this.lastTokEnd,_=this.lastTokEndLoc;if(this.expect(o.parenR),e&&this.shouldParseArrow(p)&&this.eat(o.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=h,this.awaitPos=b,this.parseParenArrowList(i,r,p,t);(!p.length||l)&&this.unexpected(this.lastTokStart),v&&this.unexpected(v),this.checkExpressionErrors(d,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=b||this.awaitPos,p.length>1?(s=this.startNodeAt(n,u),s.expressions=p,this.finishNodeAt(s,"SequenceExpression",x,_)):s=p[0]}else s=this.parseParenExpression();if(this.options.preserveParens){var I=this.startNodeAt(i,r);return I.expression=s,this.finishNode(I,"ParenthesizedExpression")}else return s};g.parseParenItem=function(e){return e};g.parseParenArrowList=function(e,t,i,r){return this.parseArrowExpression(this.startNodeAt(e,t),i,!1,r)};var gi=[];g.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===o.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var i=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),i&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var r=this.start,s=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,s,!0,!1),this.eat(o.parenL)?e.arguments=this.parseExprList(o.parenR,this.options.ecmaVersion>=8,!1):e.arguments=gi,this.finishNode(e,"NewExpression")};g.parseTemplateElement=function(e){var t=e.isTagged,i=this.startNode();return this.type===o.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),i.value={raw:this.value.replace(/\r\n?/g,`
18
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Jt=[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],pt=[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],ei="\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",ct="\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",Ie={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"},Pe="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",ti={5:Pe,"5module":Pe+" export import",6:Pe+" const class extends export import super"},ii=/^in(stanceof)?$/,ri=new RegExp("["+ct+"]"),ai=new RegExp("["+ct+ei+"]");function Le(e,t){for(var i=65536,r=0;r<t.length;r+=2){if(i+=t[r],i>e)return!1;if(i+=t[r+1],i>=e)return!0}return!1}function X(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&ri.test(String.fromCharCode(e)):t===!1?!1:Le(e,pt)}function ne(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&ai.test(String.fromCharCode(e)):t===!1?!1:Le(e,pt)||Le(e,Jt)}var S=function(t,i){i===void 0&&(i={}),this.label=t,this.keyword=i.keyword,this.beforeExpr=!!i.beforeExpr,this.startsExpr=!!i.startsExpr,this.isLoop=!!i.isLoop,this.isAssign=!!i.isAssign,this.prefix=!!i.prefix,this.postfix=!!i.postfix,this.binop=i.binop||null,this.updateContext=null};function D(e,t){return new S(e,{beforeExpr:!0,binop:t})}var j={beforeExpr:!0},L={startsExpr:!0},je={};function w(e,t){return t===void 0&&(t={}),t.keyword=e,je[e]=new S(e,t)}var o={num:new S("num",L),regexp:new S("regexp",L),string:new S("string",L),name:new S("name",L),privateId:new S("privateId",L),eof:new S("eof"),bracketL:new S("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new S("]"),braceL:new S("{",{beforeExpr:!0,startsExpr:!0}),braceR:new S("}"),parenL:new S("(",{beforeExpr:!0,startsExpr:!0}),parenR:new S(")"),comma:new S(",",j),semi:new S(";",j),colon:new S(":",j),dot:new S("."),question:new S("?",j),questionDot:new S("?."),arrow:new S("=>",j),template:new S("template"),invalidTemplate:new S("invalidTemplate"),ellipsis:new S("...",j),backQuote:new S("`",L),dollarBraceL:new S("${",{beforeExpr:!0,startsExpr:!0}),eq:new S("=",{beforeExpr:!0,isAssign:!0}),assign:new S("_=",{beforeExpr:!0,isAssign:!0}),incDec:new S("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new S("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:D("||",1),logicalAND:D("&&",2),bitwiseOR:D("|",3),bitwiseXOR:D("^",4),bitwiseAND:D("&",5),equality:D("==/!=/===/!==",6),relational:D("</>/<=/>=",7),bitShift:D("<</>>/>>>",8),plusMin:new S("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:D("%",10),star:D("*",10),slash:D("/",10),starstar:new S("**",{beforeExpr:!0}),coalesce:D("??",1),_break:w("break"),_case:w("case",j),_catch:w("catch"),_continue:w("continue"),_debugger:w("debugger"),_default:w("default",j),_do:w("do",{isLoop:!0,beforeExpr:!0}),_else:w("else",j),_finally:w("finally"),_for:w("for",{isLoop:!0}),_function:w("function",L),_if:w("if"),_return:w("return",j),_switch:w("switch"),_throw:w("throw",j),_try:w("try"),_var:w("var"),_const:w("const"),_while:w("while",{isLoop:!0}),_with:w("with"),_new:w("new",{beforeExpr:!0,startsExpr:!0}),_this:w("this",L),_super:w("super",L),_class:w("class",L),_extends:w("extends",j),_export:w("export"),_import:w("import",L),_null:w("null",L),_true:w("true",L),_false:w("false",L),_in:w("in",{beforeExpr:!0,binop:7}),_instanceof:w("instanceof",{beforeExpr:!0,binop:7}),_typeof:w("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:w("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:w("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},q=/\r\n?|\n|\u2028|\u2029/,si=new RegExp(q.source,"g");function oe(e){return e===10||e===13||e===8232||e===8233}function ht(e,t,i){i===void 0&&(i=e.length);for(var r=t;r<i;r++){var a=e.charCodeAt(r);if(oe(a))return r<i-1&&a===13&&e.charCodeAt(r+1)===10?r+2:r+1}return-1}var lt=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,O=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,ft=Object.prototype,ni=ft.hasOwnProperty,oi=ft.toString,ue=Object.hasOwn||function(e,t){return ni.call(e,t)},Ye=Array.isArray||function(e){return oi.call(e)==="[object Array]"},Xe=Object.create(null);function te(e){return Xe[e]||(Xe[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function Z(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var ui=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,fe=function(t,i){this.line=t,this.column=i};fe.prototype.offset=function(t){return new fe(this.line,this.column+t)};var Ce=function(t,i,r){this.start=i,this.end=r,t.sourceFile!==null&&(this.source=t.sourceFile)};function mt(e,t){for(var i=1,r=0;;){var a=ht(e,r,t);if(a<0)return new fe(i,t-r);++i,r=a}}var Me={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},Ze=!1;function pi(e){var t={};for(var i in Me)t[i]=e&&ue(e,i)?e[i]:Me[i];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!Ze&&typeof console=="object"&&console.warn&&(Ze=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
19
+ Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),Ye(t.onToken)){var r=t.onToken;t.onToken=function(a){return r.push(a)}}return Ye(t.onComment)&&(t.onComment=ci(t,t.onComment)),t}function ci(e,t){return function(i,r,a,s,n,u){var p={type:i?"Block":"Line",value:r,start:a,end:s};e.locations&&(p.loc=new Ce(this,n,u)),e.ranges&&(p.range=[a,s]),t.push(p)}}var me=1,pe=2,Oe=4,dt=8,xt=16,yt=32,Fe=64,gt=128,xe=256,Ue=me|pe|xe;function qe(e,t){return pe|(e?Oe:0)|(t?dt:0)}var ve=0,We=1,ee=2,bt=3,vt=4,wt=5,I=function(t,i,r){this.options=t=pi(t),this.sourceFile=t.sourceFile,this.keywords=te(ti[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var a="";t.allowReserved!==!0&&(a=Ie[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(a+=" await")),this.reservedWords=te(a);var s=(a?a+" ":"")+Ie.strict;this.reservedWordsStrict=te(s),this.reservedWordsStrictBind=te(s+" "+Ie.strictBind),this.input=String(i),this.containsEsc=!1,r?(this.pos=r,this.lineStart=this.input.lastIndexOf(`
20
+ `,r-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(q).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=o.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(me),this.regexpState=null,this.privateNameStack=[]},K={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}};I.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};K.inFunction.get=function(){return(this.currentVarScope().flags&pe)>0};K.inGenerator.get=function(){return(this.currentVarScope().flags&dt)>0&&!this.currentVarScope().inClassFieldInit};K.inAsync.get=function(){return(this.currentVarScope().flags&Oe)>0&&!this.currentVarScope().inClassFieldInit};K.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&xe)return!1;if(t.flags&pe)return(t.flags&Oe)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};K.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(t&Fe)>0||i||this.options.allowSuperOutsideMethod};K.allowDirectSuper.get=function(){return(this.currentThisScope().flags&gt)>0};K.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};K.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(t&(pe|xe))>0||i};K.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&xe)>0};I.extend=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];for(var r=this,a=0;a<t.length;a++)r=t[a](r);return r};I.parse=function(t,i){return new this(i,t).parse()};I.parseExpressionAt=function(t,i,r){var a=new this(r,t,i);return a.nextToken(),a.parseExpression()};I.tokenizer=function(t,i){return new this(i,t)};Object.defineProperties(I.prototype,K);var T=I.prototype,hi=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;T.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){O.lastIndex=e,e+=O.exec(this.input)[0].length;var t=hi.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){O.lastIndex=e+t[0].length;var i=O.exec(this.input),r=i.index+i[0].length,a=this.input.charAt(r);return a===";"||a==="}"||q.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(a)||a==="!"&&this.input.charAt(r+1)==="=")}e+=t[0].length,O.lastIndex=e,e+=O.exec(this.input)[0].length,this.input[e]===";"&&e++}};T.eat=function(e){return this.type===e?(this.next(),!0):!1};T.isContextual=function(e){return this.type===o.name&&this.value===e&&!this.containsEsc};T.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};T.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};T.canInsertSemicolon=function(){return this.type===o.eof||this.type===o.braceR||q.test(this.input.slice(this.lastTokEnd,this.start))};T.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};T.semicolon=function(){!this.eat(o.semi)&&!this.insertSemicolon()&&this.unexpected()};T.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};T.expect=function(e){this.eat(e)||this.unexpected()};T.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var _e=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};T.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var i=t?e.parenthesizedAssign:e.parenthesizedBind;i>-1&&this.raiseRecoverable(i,t?"Assigning to rvalue":"Parenthesized pattern")}};T.checkExpressionErrors=function(e,t){if(!e)return!1;var i=e.shorthandAssign,r=e.doubleProto;if(!t)return i>=0||r>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")};T.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")};T.isSimpleAssignTarget=function(e){return e.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(e.expression):e.type==="Identifier"||e.type==="MemberExpression"};var y=I.prototype;y.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==o.eof;){var i=this.parseStatement(null,!0,t);e.body.push(i)}if(this.inModule)for(var r=0,a=Object.keys(this.undefinedExports);r<a.length;r+=1){var s=a[r];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var Ge={kind:"loop"},li={kind:"switch"};y.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;O.lastIndex=this.pos;var t=O.exec(this.input),i=this.pos+t[0].length,r=this.input.charCodeAt(i);if(r===91||r===92)return!0;if(e)return!1;if(r===123||r>55295&&r<56320)return!0;if(X(r,!0)){for(var a=i+1;ne(r=this.input.charCodeAt(a),!0);)++a;if(r===92||r>55295&&r<56320)return!0;var s=this.input.slice(i,a);if(!ii.test(s))return!0}return!1};y.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;O.lastIndex=this.pos;var e=O.exec(this.input),t=this.pos+e[0].length,i;return!q.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(ne(i=this.input.charCodeAt(t+8))||i>55295&&i<56320))};y.parseStatement=function(e,t,i){var r=this.type,a=this.startNode(),s;switch(this.isLet(e)&&(r=o._var,s="let"),r){case o._break:case o._continue:return this.parseBreakContinueStatement(a,r.keyword);case o._debugger:return this.parseDebuggerStatement(a);case o._do:return this.parseDoStatement(a);case o._for:return this.parseForStatement(a);case o._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(a,!1,!e);case o._class:return e&&this.unexpected(),this.parseClass(a,!0);case o._if:return this.parseIfStatement(a);case o._return:return this.parseReturnStatement(a);case o._switch:return this.parseSwitchStatement(a);case o._throw:return this.parseThrowStatement(a);case o._try:return this.parseTryStatement(a);case o._const:case o._var:return s=s||this.value,e&&s!=="var"&&this.unexpected(),this.parseVarStatement(a,s);case o._while:return this.parseWhileStatement(a);case o._with:return this.parseWithStatement(a);case o.braceL:return this.parseBlock(!0,a);case o.semi:return this.parseEmptyStatement(a);case o._export:case o._import:if(this.options.ecmaVersion>10&&r===o._import){O.lastIndex=this.pos;var n=O.exec(this.input),u=this.pos+n[0].length,p=this.input.charCodeAt(u);if(p===40||p===46)return this.parseExpressionStatement(a,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===o._import?this.parseImport(a):this.parseExport(a,i);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(a,!0,!e);var c=this.value,l=this.parseExpression();return r===o.name&&l.type==="Identifier"&&this.eat(o.colon)?this.parseLabeledStatement(a,c,l,e):this.parseExpressionStatement(a,l)}};y.parseBreakContinueStatement=function(e,t){var i=t==="break";this.next(),this.eat(o.semi)||this.insertSemicolon()?e.label=null:this.type!==o.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var a=this.labels[r];if((e.label==null||a.name===e.label.name)&&(a.kind!=null&&(i||a.kind==="loop")||e.label&&i))break}return r===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,i?"BreakStatement":"ContinueStatement")};y.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};y.parseDoStatement=function(e){return this.next(),this.labels.push(Ge),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(o._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(o.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};y.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Ge),this.enterScope(0),this.expect(o.parenL),this.type===o.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var i=this.isLet();if(this.type===o._var||this.type===o._const||i){var r=this.startNode(),a=i?"let":this.value;return this.next(),this.parseVar(r,!0,a),this.finishNode(r,"VariableDeclaration"),(this.type===o._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&r.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===o._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,r)):(t>-1&&this.unexpected(t),this.parseFor(e,r))}var s=this.isContextual("let"),n=!1,u=this.containsEsc,p=new _e,c=this.start,l=t>-1?this.parseExprSubscripts(p,"await"):this.parseExpression(!0,p);return this.type===o._in||(n=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===o._in&&this.unexpected(t),e.await=!0):n&&this.options.ecmaVersion>=8&&(l.start===c&&!u&&l.type==="Identifier"&&l.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),s&&n&&this.raise(l.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(l,!1,p),this.checkLValPattern(l),this.parseForIn(e,l)):(this.checkExpressionErrors(p,!0),t>-1&&this.unexpected(t),this.parseFor(e,l))};y.parseFunctionStatement=function(e,t,i){return this.next(),this.parseFunction(e,he|(i?0:Be),!1,t)};y.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(o._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};y.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(o.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};y.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(o.braceL),this.labels.push(li),this.enterScope(0);for(var t,i=!1;this.type!==o.braceR;)if(this.type===o._case||this.type===o._default){var r=this.type===o._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,t.test=null),this.expect(o.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};y.parseThrowStatement=function(e){return this.next(),q.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var fi=[];y.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?yt:0),this.checkLValPattern(e,t?vt:ee),this.expect(o.parenR),e};y.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===o._catch){var t=this.startNode();this.next(),this.eat(o.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(o._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};y.parseVarStatement=function(e,t,i){return this.next(),this.parseVar(e,!1,t,i),this.semicolon(),this.finishNode(e,"VariableDeclaration")};y.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Ge),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};y.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};y.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};y.parseLabeledStatement=function(e,t,i,r){for(var a=0,s=this.labels;a<s.length;a+=1){var n=s[a];n.name===t&&this.raise(i.start,"Label '"+t+"' is already declared")}for(var u=this.type.isLoop?"loop":this.type===o._switch?"switch":null,p=this.labels.length-1;p>=0;p--){var c=this.labels[p];if(c.statementStart===e.start)c.statementStart=this.start,c.kind=u;else break}return this.labels.push({name:t,kind:u,statementStart:this.start}),e.body=this.parseStatement(r?r.indexOf("label")===-1?r+"label":r:"label"),this.labels.pop(),e.label=i,this.finishNode(e,"LabeledStatement")};y.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};y.parseBlock=function(e,t,i){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(o.braceL),e&&this.enterScope(0);this.type!==o.braceR;){var r=this.parseStatement(null);t.body.push(r)}return i&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};y.parseFor=function(e,t){return e.init=t,this.expect(o.semi),e.test=this.type===o.semi?null:this.parseExpression(),this.expect(o.semi),e.update=this.type===o.parenR?null:this.parseExpression(),this.expect(o.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};y.parseForIn=function(e,t){var i=this.type===o._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!i||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(o.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,i?"ForInStatement":"ForOfStatement")};y.parseVar=function(e,t,i,r){for(e.declarations=[],e.kind=i;;){var a=this.startNode();if(this.parseVarId(a,i),this.eat(o.eq)?a.init=this.parseMaybeAssign(t):!r&&i==="const"&&!(this.type===o._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!r&&a.id.type!=="Identifier"&&!(t&&(this.type===o._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):a.init=null,e.declarations.push(this.finishNode(a,"VariableDeclarator")),!this.eat(o.comma))break}return e};y.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?We:ee,!1)};var he=1,Be=2,St=4;y.parseFunction=function(e,t,i,r,a){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===o.star&&t&Be&&this.unexpected(),e.generator=this.eat(o.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&he&&(e.id=t&St&&this.type!==o.name?null:this.parseIdent(),e.id&&!(t&Be)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?We:ee:bt));var s=this.yieldPos,n=this.awaitPos,u=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(qe(e.async,e.generator)),t&he||(e.id=this.type===o.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,i,!1,a),this.yieldPos=s,this.awaitPos=n,this.awaitIdentPos=u,this.finishNode(e,t&he?"FunctionDeclaration":"FunctionExpression")};y.parseFunctionParams=function(e){this.expect(o.parenL),e.params=this.parseBindingList(o.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};y.parseClass=function(e,t){this.next();var i=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),a=this.startNode(),s=!1;for(a.body=[],this.expect(o.braceL);this.type!==o.braceR;){var n=this.parseClassElement(e.superClass!==null);n&&(a.body.push(n),n.type==="MethodDefinition"&&n.kind==="constructor"?(s&&this.raiseRecoverable(n.start,"Duplicate constructor in the same class"),s=!0):n.key&&n.key.type==="PrivateIdentifier"&&mi(r,n)&&this.raiseRecoverable(n.key.start,"Identifier '#"+n.key.name+"' has already been declared"))}return this.strict=i,this.next(),e.body=this.finishNode(a,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};y.parseClassElement=function(e){if(this.eat(o.semi))return null;var t=this.options.ecmaVersion,i=this.startNode(),r="",a=!1,s=!1,n="method",u=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(o.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===o.star?u=!0:r="static"}if(i.static=u,!r&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===o.star)&&!this.canInsertSemicolon()?s=!0:r="async"),!r&&(t>=9||!s)&&this.eat(o.star)&&(a=!0),!r&&!s&&!a){var p=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?n=p:r=p)}if(r?(i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=r,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),t<13||this.type===o.parenL||n!=="method"||a||s){var c=!i.static&&we(i,"constructor"),l=c&&e;c&&n!=="method"&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=c?"constructor":n,this.parseClassMethod(i,a,s,l)}else this.parseClassField(i);return i};y.isClassElementNameStart=function(){return this.type===o.name||this.type===o.privateId||this.type===o.num||this.type===o.string||this.type===o.bracketL||this.type.keyword};y.parseClassElementName=function(e){this.type===o.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};y.parseClassMethod=function(e,t,i,r){var a=e.key;e.kind==="constructor"?(t&&this.raise(a.start,"Constructor can't be a generator"),i&&this.raise(a.start,"Constructor can't be an async method")):e.static&&we(e,"prototype")&&this.raise(a.start,"Classes may not have a static property named prototype");var s=e.value=this.parseMethod(t,i,r);return e.kind==="get"&&s.params.length!==0&&this.raiseRecoverable(s.start,"getter should have no params"),e.kind==="set"&&s.params.length!==1&&this.raiseRecoverable(s.start,"setter should have exactly one param"),e.kind==="set"&&s.params[0].type==="RestElement"&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};y.parseClassField=function(e){if(we(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&we(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(o.eq)){var t=this.currentThisScope(),i=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=i}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};y.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(xe|Fe);this.type!==o.braceR;){var i=this.parseStatement(null);e.body.push(i)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};y.parseClassId=function(e,t){this.type===o.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,ee,!1)):(t===!0&&this.unexpected(),e.id=null)};y.parseClassSuper=function(e){e.superClass=this.eat(o._extends)?this.parseExprSubscripts(null,!1):null};y.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};y.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,i=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,a=r===0?null:this.privateNameStack[r-1],s=0;s<i.length;++s){var n=i[s];ue(t,n.name)||(a?a.used.push(n):this.raiseRecoverable(n.start,"Private field '#"+n.name+"' must be declared in an enclosing class"))}};function mi(e,t){var i=t.key.name,r=e[i],a="true";return t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")&&(a=(t.static?"s":"i")+t.kind),r==="iget"&&a==="iset"||r==="iset"&&a==="iget"||r==="sget"&&a==="sset"||r==="sset"&&a==="sget"?(e[i]="true",!1):r?!0:(e[i]=a,!1)}function we(e,t){var i=e.computed,r=e.key;return!i&&(r.type==="Identifier"&&r.name===t||r.type==="Literal"&&r.value===t)}y.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==o.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};y.parseExport=function(e,t){if(this.next(),this.eat(o.star))return this.parseExportAllDeclaration(e,t);if(this.eat(o._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==o.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var i=0,r=e.specifiers;i<r.length;i+=1){var a=r[i];this.checkUnreserved(a.local),this.checkLocalExport(a.local),a.local.type==="Literal"&&this.raise(a.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};y.parseExportDeclaration=function(e){return this.parseStatement(null)};y.parseExportDefaultDeclaration=function(){var e;if(this.type===o._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,he|St,!1,e)}else if(this.type===o._class){var i=this.startNode();return this.parseClass(i,"nullableID")}else{var r=this.parseMaybeAssign();return this.semicolon(),r}};y.checkExport=function(e,t,i){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),ue(e,t)&&this.raiseRecoverable(i,"Duplicate export '"+t+"'"),e[t]=!0)};y.checkPatternExport=function(e,t){var i=t.type;if(i==="Identifier")this.checkExport(e,t,t.start);else if(i==="ObjectPattern")for(var r=0,a=t.properties;r<a.length;r+=1){var s=a[r];this.checkPatternExport(e,s)}else if(i==="ArrayPattern")for(var n=0,u=t.elements;n<u.length;n+=1){var p=u[n];p&&this.checkPatternExport(e,p)}else i==="Property"?this.checkPatternExport(e,t.value):i==="AssignmentPattern"?this.checkPatternExport(e,t.left):i==="RestElement"&&this.checkPatternExport(e,t.argument)};y.checkVariableExport=function(e,t){if(e)for(var i=0,r=t;i<r.length;i+=1){var a=r[i];this.checkPatternExport(e,a.id)}};y.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};y.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")};y.parseExportSpecifiers=function(e){var t=[],i=!0;for(this.expect(o.braceL);!this.eat(o.braceR);){if(i)i=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;t.push(this.parseExportSpecifier(e))}return t};y.parseImport=function(e){return this.next(),this.type===o.string?(e.specifiers=fi,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===o.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")};y.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,ee),this.finishNode(e,"ImportSpecifier")};y.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,ee),this.finishNode(e,"ImportDefaultSpecifier")};y.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,ee),this.finishNode(e,"ImportNamespaceSpecifier")};y.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===o.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(o.comma)))return e;if(this.type===o.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(o.braceL);!this.eat(o.braceR);){if(t)t=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;e.push(this.parseImportSpecifier())}return e};y.parseWithClause=function(){var e=[];if(!this.eat(o._with))return e;this.expect(o.braceL);for(var t={},i=!0;!this.eat(o.braceR);){if(i)i=!1;else if(this.expect(o.comma),this.afterTrailingComma(o.braceR))break;var r=this.parseImportAttribute(),a=r.key.type==="Identifier"?r.key.name:r.key.value;ue(t,a)&&this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+a+"'"),t[a]=!0,e.push(r)}return e};y.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===o.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(o.colon),this.type!==o.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};y.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===o.string){var e=this.parseLiteral(this.value);return ui.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};y.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)};y.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var W=I.prototype;W.toAssignable=function(e,t,i){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var r=0,a=e.properties;r<a.length;r+=1){var s=a[r];this.toAssignable(s,t),s.type==="RestElement"&&(s.argument.type==="ArrayPattern"||s.argument.type==="ObjectPattern")&&this.raise(s.argument.start,"Unexpected token")}break;case"Property":e.kind!=="init"&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",i&&this.checkPatternErrors(i,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern"&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":e.operator!=="="&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,i);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else i&&this.checkPatternErrors(i,!0);return e};W.toAssignableList=function(e,t){for(var i=e.length,r=0;r<i;r++){var a=e[r];a&&this.toAssignable(a,t)}if(i){var s=e[i-1];this.options.ecmaVersion===6&&t&&s&&s.type==="RestElement"&&s.argument.type!=="Identifier"&&this.unexpected(s.argument.start)}return e};W.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};W.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==o.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};W.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case o.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(o.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case o.braceL:return this.parseObj(!0)}return this.parseIdent()};W.parseBindingList=function(e,t,i,r){for(var a=[],s=!0;!this.eat(e);)if(s?s=!1:this.expect(o.comma),t&&this.type===o.comma)a.push(null);else{if(i&&this.afterTrailingComma(e))break;if(this.type===o.ellipsis){var n=this.parseRestBinding();this.parseBindingListItem(n),a.push(n),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}else a.push(this.parseAssignableListItem(r))}return a};W.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};W.parseBindingListItem=function(e){return e};W.parseMaybeDefault=function(e,t,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(o.eq))return i;var r=this.startNodeAt(e,t);return r.left=i,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")};W.checkLValSimple=function(e,t,i){t===void 0&&(t=ve);var r=t!==ve;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?"Binding ":"Assigning to ")+e.name+" in strict mode"),r&&(t===ee&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),i&&(ue(i,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),i[e.name]=!0),t!==wt&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":r&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return r&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,i);default:this.raise(e.start,(r?"Binding":"Assigning to")+" rvalue")}};W.checkLValPattern=function(e,t,i){switch(t===void 0&&(t=ve),e.type){case"ObjectPattern":for(var r=0,a=e.properties;r<a.length;r+=1){var s=a[r];this.checkLValInnerPattern(s,t,i)}break;case"ArrayPattern":for(var n=0,u=e.elements;n<u.length;n+=1){var p=u[n];p&&this.checkLValInnerPattern(p,t,i)}break;default:this.checkLValSimple(e,t,i)}};W.checkLValInnerPattern=function(e,t,i){switch(t===void 0&&(t=ve),e.type){case"Property":this.checkLValInnerPattern(e.value,t,i);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,i);break;case"RestElement":this.checkLValPattern(e.argument,t,i);break;default:this.checkLValPattern(e,t,i)}};var G=function(t,i,r,a,s){this.token=t,this.isExpr=!!i,this.preserveSpace=!!r,this.override=a,this.generator=!!s},k={b_stat:new G("{",!1),b_expr:new G("{",!0),b_tmpl:new G("${",!1),p_stat:new G("(",!1),p_expr:new G("(",!0),q_tmpl:new G("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new G("function",!1),f_expr:new G("function",!0),f_expr_gen:new G("function",!0,!1,null,!0),f_gen:new G("function",!1,!1,null,!0)},ce=I.prototype;ce.initialContext=function(){return[k.b_stat]};ce.curContext=function(){return this.context[this.context.length-1]};ce.braceIsBlock=function(e){var t=this.curContext();return t===k.f_expr||t===k.f_stat?!0:e===o.colon&&(t===k.b_stat||t===k.b_expr)?!t.isExpr:e===o._return||e===o.name&&this.exprAllowed?q.test(this.input.slice(this.lastTokEnd,this.start)):e===o._else||e===o.semi||e===o.eof||e===o.parenR||e===o.arrow?!0:e===o.braceL?t===k.b_stat:e===o._var||e===o._const||e===o.name?!1:!this.exprAllowed};ce.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1};ce.updateContext=function(e){var t,i=this.type;i.keyword&&e===o.dot?this.exprAllowed=!1:(t=i.updateContext)?t.call(this,e):this.exprAllowed=i.beforeExpr};ce.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)};o.parenR.updateContext=o.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===k.b_stat&&this.curContext().token==="function"&&(e=this.context.pop()),this.exprAllowed=!e.isExpr};o.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?k.b_stat:k.b_expr),this.exprAllowed=!0};o.dollarBraceL.updateContext=function(){this.context.push(k.b_tmpl),this.exprAllowed=!0};o.parenL.updateContext=function(e){var t=e===o._if||e===o._for||e===o._with||e===o._while;this.context.push(t?k.p_stat:k.p_expr),this.exprAllowed=!0};o.incDec.updateContext=function(){};o._function.updateContext=o._class.updateContext=function(e){e.beforeExpr&&e!==o._else&&!(e===o.semi&&this.curContext()!==k.p_stat)&&!(e===o._return&&q.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===o.colon||e===o.braceL)&&this.curContext()===k.b_stat)?this.context.push(k.f_expr):this.context.push(k.f_stat),this.exprAllowed=!1};o.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0};o.backQuote.updateContext=function(){this.curContext()===k.q_tmpl?this.context.pop():this.context.push(k.q_tmpl),this.exprAllowed=!1};o.star.updateContext=function(e){if(e===o._function){var t=this.context.length-1;this.context[t]===k.f_expr?this.context[t]=k.f_expr_gen:this.context[t]=k.f_gen}this.exprAllowed=!0};o.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==o.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var b=I.prototype;b.checkPropClash=function(e,t,i){if(!(this.options.ecmaVersion>=9&&e.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r=e.key,a;switch(r.type){case"Identifier":a=r.name;break;case"Literal":a=String(r.value);break;default:return}var s=e.kind;if(this.options.ecmaVersion>=6){a==="__proto__"&&s==="init"&&(t.proto&&(i?i.doubleProto<0&&(i.doubleProto=r.start):this.raiseRecoverable(r.start,"Redefinition of __proto__ property")),t.proto=!0);return}a="$"+a;var n=t[a];if(n){var u;s==="init"?u=this.strict&&n.init||n.get||n.set:u=n.init||n[s],u&&this.raiseRecoverable(r.start,"Redefinition of property")}else n=t[a]={init:!1,get:!1,set:!1};n[s]=!0}};b.parseExpression=function(e,t){var i=this.start,r=this.startLoc,a=this.parseMaybeAssign(e,t);if(this.type===o.comma){var s=this.startNodeAt(i,r);for(s.expressions=[a];this.eat(o.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(s,"SequenceExpression")}return a};b.parseMaybeAssign=function(e,t,i){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,a=-1,s=-1,n=-1;t?(a=t.parenthesizedAssign,s=t.trailingComma,n=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new _e,r=!0);var u=this.start,p=this.startLoc;(this.type===o.parenL||this.type===o.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var c=this.parseMaybeConditional(e,t);if(i&&(c=i.call(this,c,u,p)),this.type.isAssign){var l=this.startNodeAt(u,p);return l.operator=this.value,this.type===o.eq&&(c=this.toAssignable(c,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=c.start&&(t.shorthandAssign=-1),this.type===o.eq?this.checkLValPattern(c):this.checkLValSimple(c),l.left=c,this.next(),l.right=this.parseMaybeAssign(e),n>-1&&(t.doubleProto=n),this.finishNode(l,"AssignmentExpression")}else r&&this.checkExpressionErrors(t,!0);return a>-1&&(t.parenthesizedAssign=a),s>-1&&(t.trailingComma=s),c};b.parseMaybeConditional=function(e,t){var i=this.start,r=this.startLoc,a=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return a;if(this.eat(o.question)){var s=this.startNodeAt(i,r);return s.test=a,s.consequent=this.parseMaybeAssign(),this.expect(o.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return a};b.parseExprOps=function(e,t){var i=this.start,r=this.startLoc,a=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||a.start===i&&a.type==="ArrowFunctionExpression"?a:this.parseExprOp(a,i,r,-1,e)};b.parseExprOp=function(e,t,i,r,a){var s=this.type.binop;if(s!=null&&(!a||this.type!==o._in)&&s>r){var n=this.type===o.logicalOR||this.type===o.logicalAND,u=this.type===o.coalesce;u&&(s=o.logicalAND.binop);var p=this.value;this.next();var c=this.start,l=this.startLoc,f=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,a),c,l,s,a),h=this.buildBinary(t,i,e,f,p,n||u);return(n&&this.type===o.coalesce||u&&(this.type===o.logicalOR||this.type===o.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(h,t,i,r,a)}return e};b.buildBinary=function(e,t,i,r,a,s){r.type==="PrivateIdentifier"&&this.raise(r.start,"Private identifier can only be left side of binary expression");var n=this.startNodeAt(e,t);return n.left=i,n.operator=a,n.right=r,this.finishNode(n,s?"LogicalExpression":"BinaryExpression")};b.parseMaybeUnary=function(e,t,i,r){var a=this.start,s=this.startLoc,n;if(this.isContextual("await")&&this.canAwait)n=this.parseAwait(r),t=!0;else if(this.type.prefix){var u=this.startNode(),p=this.type===o.incDec;u.operator=this.value,u.prefix=!0,this.next(),u.argument=this.parseMaybeUnary(null,!0,p,r),this.checkExpressionErrors(e,!0),p?this.checkLValSimple(u.argument):this.strict&&u.operator==="delete"&&Et(u.argument)?this.raiseRecoverable(u.start,"Deleting local variable in strict mode"):u.operator==="delete"&&Re(u.argument)?this.raiseRecoverable(u.start,"Private fields can not be deleted"):t=!0,n=this.finishNode(u,p?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===o.privateId)(r||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),n=this.parsePrivateIdent(),this.type!==o._in&&this.unexpected();else{if(n=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var c=this.startNodeAt(a,s);c.operator=this.value,c.prefix=!1,c.argument=n,this.checkLValSimple(n),this.next(),n=this.finishNode(c,"UpdateExpression")}}if(!i&&this.eat(o.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(a,s,n,this.parseMaybeUnary(null,!1,!1,r),"**",!1);else return n};function Et(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&Et(e.expression)}function Re(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&Re(e.expression)||e.type==="ParenthesizedExpression"&&Re(e.expression)}b.parseExprSubscripts=function(e,t){var i=this.start,r=this.startLoc,a=this.parseExprAtom(e,t);if(a.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return a;var s=this.parseSubscripts(a,i,r,!1,t);return e&&s.type==="MemberExpression"&&(e.parenthesizedAssign>=s.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=s.start&&(e.parenthesizedBind=-1),e.trailingComma>=s.start&&(e.trailingComma=-1)),s};b.parseSubscripts=function(e,t,i,r,a){for(var s=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,n=!1;;){var u=this.parseSubscript(e,t,i,r,s,n,a);if(u.optional&&(n=!0),u===e||u.type==="ArrowFunctionExpression"){if(n){var p=this.startNodeAt(t,i);p.expression=u,u=this.finishNode(p,"ChainExpression")}return u}e=u}};b.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(o.arrow)};b.parseSubscriptAsyncArrow=function(e,t,i,r){return this.parseArrowExpression(this.startNodeAt(e,t),i,!0,r)};b.parseSubscript=function(e,t,i,r,a,s,n){var u=this.options.ecmaVersion>=11,p=u&&this.eat(o.questionDot);r&&p&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var c=this.eat(o.bracketL);if(c||p&&this.type!==o.parenL&&this.type!==o.backQuote||this.eat(o.dot)){var l=this.startNodeAt(t,i);l.object=e,c?(l.property=this.parseExpression(),this.expect(o.bracketR)):this.type===o.privateId&&e.type!=="Super"?l.property=this.parsePrivateIdent():l.property=this.parseIdent(this.options.allowReserved!=="never"),l.computed=!!c,u&&(l.optional=p),e=this.finishNode(l,"MemberExpression")}else if(!r&&this.eat(o.parenL)){var f=new _e,h=this.yieldPos,x=this.awaitPos,g=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var E=this.parseExprList(o.parenR,this.options.ecmaVersion>=8,!1,f);if(a&&!p&&this.shouldParseAsyncArrow())return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=h,this.awaitPos=x,this.awaitIdentPos=g,this.parseSubscriptAsyncArrow(t,i,E,n);this.checkExpressionErrors(f,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=x||this.awaitPos,this.awaitIdentPos=g||this.awaitIdentPos;var _=this.startNodeAt(t,i);_.callee=e,_.arguments=E,u&&(_.optional=p),e=this.finishNode(_,"CallExpression")}else if(this.type===o.backQuote){(p||s)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var P=this.startNodeAt(t,i);P.tag=e,P.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(P,"TaggedTemplateExpression")}return e};b.parseExprAtom=function(e,t,i){this.type===o.slash&&this.readRegexp();var r,a=this.potentialArrowAt===this.start;switch(this.type){case o._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type===o.parenL&&!this.allowDirectSuper&&this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==o.dot&&this.type!==o.bracketL&&this.type!==o.parenL&&this.unexpected(),this.finishNode(r,"Super");case o._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case o.name:var s=this.start,n=this.startLoc,u=this.containsEsc,p=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!u&&p.name==="async"&&!this.canInsertSemicolon()&&this.eat(o._function))return this.overrideContext(k.f_expr),this.parseFunction(this.startNodeAt(s,n),0,!1,!0,t);if(a&&!this.canInsertSemicolon()){if(this.eat(o.arrow))return this.parseArrowExpression(this.startNodeAt(s,n),[p],!1,t);if(this.options.ecmaVersion>=8&&p.name==="async"&&this.type===o.name&&!u&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return p=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(o.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,n),[p],!0,t)}return p;case o.regexp:var c=this.value;return r=this.parseLiteral(c.value),r.regex={pattern:c.pattern,flags:c.flags},r;case o.num:case o.string:return this.parseLiteral(this.value);case o._null:case o._true:case o._false:return r=this.startNode(),r.value=this.type===o._null?null:this.type===o._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case o.parenL:var l=this.start,f=this.parseParenAndDistinguishExpression(a,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(f)&&(e.parenthesizedAssign=l),e.parenthesizedBind<0&&(e.parenthesizedBind=l)),f;case o.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(o.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case o.braceL:return this.overrideContext(k.b_expr),this.parseObj(!1,e);case o._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case o._class:return this.parseClass(this.startNode(),!1);case o._new:return this.parseNew();case o.backQuote:return this.parseTemplate();case o._import:return this.options.ecmaVersion>=11?this.parseExprImport(i):this.unexpected();default:return this.parseExprAtomDefault()}};b.parseExprAtomDefault=function(){this.unexpected()};b.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===o.parenL&&!e)return this.parseDynamicImport(t);if(this.type===o.dot){var i=this.startNodeAt(t.start,t.loc&&t.loc.start);return i.name="import",t.meta=this.finishNode(i,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};b.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(o.parenR)?e.options=null:(this.expect(o.comma),this.afterTrailingComma(o.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(o.parenR)||(this.expect(o.comma),this.afterTrailingComma(o.parenR)||this.unexpected())));else if(!this.eat(o.parenR)){var t=this.start;this.eat(o.comma)&&this.eat(o.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};b.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};b.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};b.parseParenExpression=function(){this.expect(o.parenL);var e=this.parseExpression();return this.expect(o.parenR),e};b.shouldParseArrow=function(e){return!this.canInsertSemicolon()};b.parseParenAndDistinguishExpression=function(e,t){var i=this.start,r=this.startLoc,a,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var n=this.start,u=this.startLoc,p=[],c=!0,l=!1,f=new _e,h=this.yieldPos,x=this.awaitPos,g;for(this.yieldPos=0,this.awaitPos=0;this.type!==o.parenR;)if(c?c=!1:this.expect(o.comma),s&&this.afterTrailingComma(o.parenR,!0)){l=!0;break}else if(this.type===o.ellipsis){g=this.start,p.push(this.parseParenItem(this.parseRestBinding())),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else p.push(this.parseMaybeAssign(!1,f,this.parseParenItem));var E=this.lastTokEnd,_=this.lastTokEndLoc;if(this.expect(o.parenR),e&&this.shouldParseArrow(p)&&this.eat(o.arrow))return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=h,this.awaitPos=x,this.parseParenArrowList(i,r,p,t);(!p.length||l)&&this.unexpected(this.lastTokStart),g&&this.unexpected(g),this.checkExpressionErrors(f,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=x||this.awaitPos,p.length>1?(a=this.startNodeAt(n,u),a.expressions=p,this.finishNodeAt(a,"SequenceExpression",E,_)):a=p[0]}else a=this.parseParenExpression();if(this.options.preserveParens){var P=this.startNodeAt(i,r);return P.expression=a,this.finishNode(P,"ParenthesizedExpression")}else return a};b.parseParenItem=function(e){return e};b.parseParenArrowList=function(e,t,i,r){return this.parseArrowExpression(this.startNodeAt(e,t),i,!1,r)};var di=[];b.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===o.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var i=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),i&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var r=this.start,a=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,a,!0,!1),this.eat(o.parenL)?e.arguments=this.parseExprList(o.parenR,this.options.ecmaVersion>=8,!1):e.arguments=di,this.finishNode(e,"NewExpression")};b.parseTemplateElement=function(e){var t=e.isTagged,i=this.startNode();return this.type===o.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),i.value={raw:this.value.replace(/\r\n?/g,`
21
21
  `),cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
22
- `),cooked:this.value},this.next(),i.tail=this.type===o.backQuote,this.finishNode(i,"TemplateElement")};g.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var i=this.startNode();this.next(),i.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(i.quasis=[r];!r.tail;)this.type===o.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(o.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(o.braceR),i.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(i,"TemplateLiteral")};g.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===o.name||this.type===o.num||this.type===o.string||this.type===o.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===o.star)&&!U.test(this.input.slice(this.lastTokEnd,this.start))};g.parseObj=function(e,t){var i=this.startNode(),r=!0,s={};for(i.properties=[],this.next();!this.eat(o.braceR);){if(r)r=!1;else if(this.expect(o.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(o.braceR))break;var a=this.parseProperty(e,t);e||this.checkPropClash(a,s,t),i.properties.push(a)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")};g.parseProperty=function(e,t){var i=this.startNode(),r,s,a,n;if(this.options.ecmaVersion>=9&&this.eat(o.ellipsis))return e?(i.argument=this.parseIdent(!1),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(i.argument=this.parseMaybeAssign(!1,t),this.type===o.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=!1,i.shorthand=!1,(e||t)&&(a=this.start,n=this.startLoc),e||(r=this.eat(o.star)));var u=this.containsEsc;return this.parsePropertyName(i),!e&&!u&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(i)?(s=!0,r=this.options.ecmaVersion>=9&&this.eat(o.star),this.parsePropertyName(i)):s=!1,this.parsePropertyValue(i,e,r,s,a,n,t,u),this.finishNode(i,"Property")};g.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var t=e.kind==="get"?0:1;if(e.value.params.length!==t){var i=e.value.start;e.kind==="get"?this.raiseRecoverable(i,"getter should have no params"):this.raiseRecoverable(i,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};g.parsePropertyValue=function(e,t,i,r,s,a,n,u){(i||r)&&this.type===o.colon&&this.unexpected(),this.eat(o.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,n),e.kind="init"):this.options.ecmaVersion>=6&&this.type===o.parenL?(t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(i,r)):!t&&!u&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==o.comma&&this.type!==o.braceR&&this.type!==o.eq?((i||r)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((i||r)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=s),e.kind="init",t?e.value=this.parseMaybeDefault(s,a,this.copyNode(e.key)):this.type===o.eq&&n?(n.shorthandAssign<0&&(n.shorthandAssign=this.start),e.value=this.parseMaybeDefault(s,a,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected()};g.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(o.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(o.bracketR),e.key;e.computed=!1}return e.key=this.type===o.num||this.type===o.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};g.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};g.parseMethod=function(e,t,i){var r=this.startNode(),s=this.yieldPos,a=this.awaitPos,n=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(We(t,r.generator)|Ue|(i?bt:0)),this.expect(o.parenL),r.params=this.parseBindingList(o.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=s,this.awaitPos=a,this.awaitIdentPos=n,this.finishNode(r,"FunctionExpression")};g.parseArrowExpression=function(e,t,i,r){var s=this.yieldPos,a=this.awaitPos,n=this.awaitIdentPos;return this.enterScope(We(i,!1)|yt),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=s,this.awaitPos=a,this.awaitIdentPos=n,this.finishNode(e,"ArrowFunctionExpression")};g.parseFunctionBody=function(e,t,i,r){var s=t&&this.type!==o.braceL,a=this.strict,n=!1;if(s)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var u=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!a||u)&&(n=this.strictDirective(this.end),n&&u&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var p=this.labels;this.labels=[],n&&(this.strict=!0),this.checkParams(e,!a&&!n&&!t&&!i&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,Et),e.body=this.parseBlock(!1,void 0,n&&!a),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=p}this.exitScope()};g.isSimpleParamList=function(e){for(var t=0,i=e;t<i.length;t+=1){var r=i[t];if(r.type!=="Identifier")return!1}return!0};g.checkParams=function(e,t){for(var i=Object.create(null),r=0,s=e.params;r<s.length;r+=1){var a=s[r];this.checkLValInnerPattern(a,Ge,t?null:i)}};g.parseExprList=function(e,t,i,r){for(var s=[],a=!0;!this.eat(e);){if(a)a=!1;else if(this.expect(o.comma),t&&this.afterTrailingComma(e))break;var n=void 0;i&&this.type===o.comma?n=null:this.type===o.ellipsis?(n=this.parseSpread(r),r&&this.type===o.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):n=this.parseMaybeAssign(!1,r),s.push(n)}return s};g.checkUnreserved=function(e){var t=e.start,i=e.end,r=e.name;if(this.inGenerator&&r==="yield"&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&r==="await"&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().inClassFieldInit&&r==="arguments"&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(r==="arguments"||r==="await")&&this.raise(t,"Cannot use "+r+" in class static initialization block"),this.keywords.test(r)&&this.raise(t,"Unexpected keyword '"+r+"'"),!(this.options.ecmaVersion<6&&this.input.slice(t,i).indexOf("\\")!==-1)){var s=this.strict?this.reservedWordsStrict:this.reservedWords;s.test(r)&&(!this.inAsync&&r==="await"&&this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+r+"' is reserved"))}};g.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,"Identifier"),e||(this.checkUnreserved(t),t.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t};g.parseIdentNode=function(){var e=this.startNode();return this.type===o.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=o.name):this.unexpected(),e};g.parsePrivateIdent=function(){var e=this.startNode();return this.type===o.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e};g.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===o.semi||this.canInsertSemicolon()||this.type!==o.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(o.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")};g.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var Ce=P.prototype;Ce.raise=function(e,t){var i=dt(this.input,e);t+=" ("+i.line+":"+i.column+")";var r=new SyntaxError(t);throw r.pos=e,r.loc=i,r.raisedAt=this.pos,r};Ce.raiseRecoverable=Ce.raise;Ce.curPosition=function(){if(this.options.locations)return new le(this.curLine,this.pos-this.lineStart)};var ee=P.prototype,bi=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[],this.inClassFieldInit=!1};ee.enterScope=function(e){this.scopeStack.push(new bi(e))};ee.exitScope=function(){this.scopeStack.pop()};ee.treatFunctionsAsVarInScope=function(e){return e.flags&ne||!this.inModule&&e.flags&fe};ee.declareName=function(e,t,i){var r=!1;if(t===Z){var s=this.currentScope();r=s.lexical.indexOf(e)>-1||s.functions.indexOf(e)>-1||s.var.indexOf(e)>-1,s.lexical.push(e),this.inModule&&s.flags&fe&&delete this.undefinedExports[e]}else if(t===wt){var a=this.currentScope();a.lexical.push(e)}else if(t===vt){var n=this.currentScope();this.treatFunctionsAsVar?r=n.lexical.indexOf(e)>-1:r=n.lexical.indexOf(e)>-1||n.var.indexOf(e)>-1,n.functions.push(e)}else for(var u=this.scopeStack.length-1;u>=0;--u){var p=this.scopeStack[u];if(p.lexical.indexOf(e)>-1&&!(p.flags&gt&&p.lexical[0]===e)||!this.treatFunctionsAsVarInScope(p)&&p.functions.indexOf(e)>-1){r=!0;break}if(p.var.push(e),this.inModule&&p.flags&fe&&delete this.undefinedExports[e],p.flags&qe)break}r&&this.raiseRecoverable(i,"Identifier '"+e+"' has already been declared")};ee.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};ee.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};ee.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&qe)return t}};ee.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&qe&&!(t.flags&yt))return t}};var _e=function(t,i,r){this.type="",this.start=i,this.end=0,t.options.locations&&(this.loc=new Ae(t,r)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[i,0])},xe=P.prototype;xe.startNode=function(){return new _e(this,this.start,this.startLoc)};xe.startNodeAt=function(e,t){return new _e(this,e,t)};function At(e,t,i,r){return e.type=t,e.end=i,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=i),e}xe.finishNode=function(e,t){return At.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};xe.finishNodeAt=function(e,t,i,r){return At.call(this,e,t,i,r)};xe.copyNode=function(e){var t=new _e(this,e.start,this.startLoc);for(var i in e)t[i]=e[i];return t};var vi="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",kt="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",_t=kt+" Extended_Pictographic",It=_t,Pt=It+" EBase EComp EMod EPres ExtPict",Nt=Pt,wi=Nt,Ei={9:kt,10:_t,11:It,12:Pt,13:Nt,14:wi},Ci="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Si={9:"",10:"",11:"",12:"",13:"",14:Ci},Je="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",Vt="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",Tt=Vt+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Mt=Tt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Lt=Mt+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Dt=Lt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Ai=Dt+" "+vi,ki={9:Vt,10:Tt,11:Mt,12:Lt,13:Dt,14:Ai},Rt={};function _i(e){var t=Rt[e]={binary:J(Ei[e]+" "+Je),binaryOfStrings:J(Si[e]),nonBinary:{General_Category:J(Je),Script:J(ki[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var Te=0,et=[9,10,11,12,13,14];Te<et.length;Te+=1){var Ii=et[Te];_i(Ii)}var m=P.prototype,Se=function(t,i){this.parent=t,this.base=i||this};Se.prototype.separatedFrom=function(t){for(var i=this;i;i=i.parent)for(var r=t;r;r=r.parent)if(i.base===r.base&&i!==r)return!0;return!1};Se.prototype.sibling=function(){return new Se(this.parent,this.base)};var K=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=Rt[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};K.prototype.reset=function(t,i,r){var s=r.indexOf("v")!==-1,a=r.indexOf("u")!==-1;this.start=t|0,this.source=i+"",this.flags=r,s&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=a&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=a&&this.parser.options.ecmaVersion>=9)};K.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};K.prototype.at=function(t,i){i===void 0&&(i=!1);var r=this.source,s=r.length;if(t>=s)return-1;var a=r.charCodeAt(t);if(!(i||this.switchU)||a<=55295||a>=57344||t+1>=s)return a;var n=r.charCodeAt(t+1);return n>=56320&&n<=57343?(a<<10)+n-56613888:a};K.prototype.nextIndex=function(t,i){i===void 0&&(i=!1);var r=this.source,s=r.length;if(t>=s)return s;var a=r.charCodeAt(t),n;return!(i||this.switchU)||a<=55295||a>=57344||t+1>=s||(n=r.charCodeAt(t+1))<56320||n>57343?t+1:t+2};K.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)};K.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};K.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};K.prototype.eat=function(t,i){return i===void 0&&(i=!1),this.current(i)===t?(this.advance(i),!0):!1};K.prototype.eatChars=function(t,i){i===void 0&&(i=!1);for(var r=this.pos,s=0,a=t;s<a.length;s+=1){var n=a[s],u=this.at(r,i);if(u===-1||u!==n)return!1;r=this.nextIndex(r,i)}return this.pos=r,!0};m.validateRegExpFlags=function(e){for(var t=e.validFlags,i=e.flags,r=!1,s=!1,a=0;a<i.length;a++){var n=i.charAt(a);t.indexOf(n)===-1&&this.raise(e.start,"Invalid regular expression flag"),i.indexOf(n,a+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),n==="u"&&(r=!0),n==="v"&&(s=!0)}this.options.ecmaVersion>=15&&r&&s&&this.raise(e.start,"Invalid regular expression flag")};function Pi(e){for(var t in e)return!0;return!1}m.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&Pi(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))};m.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,i=e.backReferenceNames;t<i.length;t+=1){var r=i[t];e.groupNames[r]||e.raise("Invalid named capture referenced")}};m.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new Se(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")};m.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););};m.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1};m.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var i=!1;if(this.options.ecmaVersion>=9&&(i=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!i,!0}return e.pos=t,!1};m.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};m.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};m.regexp_eatBracedQuantifier=function(e,t){var i=e.pos;if(e.eat(123)){var r=0,s=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(s=e.lastIntValue),e.eat(125)))return s!==-1&&s<r&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=i}return!1};m.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)};m.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1};m.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var i=this.regexp_eatModifiers(e),r=e.eat(45);if(i||r){for(var s=0;s<i.length;s++){var a=i.charAt(s);i.indexOf(a,s+1)>-1&&e.raise("Duplicate regular expression modifiers")}if(r){var n=this.regexp_eatModifiers(e);!i&&!n&&e.current()===58&&e.raise("Invalid regular expression modifiers");for(var u=0;u<n.length;u++){var p=n.charAt(u);(n.indexOf(p,u+1)>-1||i.indexOf(p)>-1)&&e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1};m.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};m.regexp_eatModifiers=function(e){for(var t="",i=0;(i=e.current())!==-1&&Ni(i);)t+=Q(i),e.advance();return t};function Ni(e){return e===105||e===109||e===115}m.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};m.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};m.regexp_eatSyntaxCharacter=function(e){var t=e.current();return Bt(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Bt(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}m.regexp_eatPatternCharacters=function(e){for(var t=e.pos,i=0;(i=e.current())!==-1&&!Bt(i);)e.advance();return e.pos!==t};m.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1};m.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,i=e.groupNames[e.lastStringValue];if(i)if(t)for(var r=0,s=i;r<s.length;r+=1){var a=s[r];a.separatedFrom(e.branchID)||e.raise("Duplicate capture group name")}else e.raise("Duplicate capture group name");t?(i||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}};m.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};m.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=Q(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=Q(e.lastIntValue);return!0}return!1};m.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,r=e.current(i);return e.advance(i),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(r=e.lastIntValue),Vi(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function Vi(e){return $(e,!0)||e===36||e===95}m.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,r=e.current(i);return e.advance(i),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(r=e.lastIntValue),Ti(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function Ti(e){return re(e,!0)||e===36||e===95||e===8204||e===8205}m.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};m.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var i=e.lastIntValue;if(e.switchU)return i>e.maxBackReference&&(e.maxBackReference=i),!0;if(i<=e.numCapturingParens)return!0;e.pos=t}return!1};m.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};m.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};m.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};m.regexp_eatZero=function(e){return e.current()===48&&!Ie(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};m.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1};m.regexp_eatControlLetter=function(e){var t=e.current();return Ot(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function Ot(e){return e>=65&&e<=90||e>=97&&e<=122}m.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var i=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var s=e.lastIntValue;if(r&&s>=55296&&s<=56319){var a=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var n=e.lastIntValue;if(n>=56320&&n<=57343)return e.lastIntValue=(s-55296)*1024+(n-56320)+65536,!0}e.pos=a,e.lastIntValue=s}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Mi(e.lastIntValue))return!0;r&&e.raise("Invalid unicode escape"),e.pos=i}return!1};function Mi(e){return e>=0&&e<=1114111}m.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1};m.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var jt=0,Y=1,j=2;m.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(Li(t))return e.lastIntValue=-1,e.advance(),Y;var i=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((i=t===80)||t===112)){e.lastIntValue=-1,e.advance();var r;if(e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return i&&r===j&&e.raise("Invalid property name"),r;e.raise("Invalid property name")}return jt};function Li(e){return e===100||e===68||e===115||e===83||e===119||e===87}m.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var i=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,i,r),Y}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var s=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,s)}return jt};m.regexp_validateUnicodePropertyNameAndValue=function(e,t,i){ae(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(i)||e.raise("Invalid property value")};m.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return Y;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return j;e.raise("Invalid property name")};m.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Ft(t=e.current());)e.lastStringValue+=Q(t),e.advance();return e.lastStringValue!==""};function Ft(e){return Ot(e)||e===95}m.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Di(t=e.current());)e.lastStringValue+=Q(t),e.advance();return e.lastStringValue!==""};function Di(e){return Ft(e)||Ie(e)}m.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};m.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),i=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&i===j&&e.raise("Negated character class may contain strings"),!0}return!1};m.regexp_classContents=function(e){return e.current()===93?Y:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),Y)};m.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var i=e.lastIntValue;e.switchU&&(t===-1||i===-1)&&e.raise("Invalid character class"),t!==-1&&i!==-1&&t>i&&e.raise("Range out of order in character class")}}};m.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var i=e.current();(i===99||Wt(i))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return r!==93?(e.lastIntValue=r,e.advance(),!0):!1};m.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};m.regexp_classSetExpression=function(e){var t=Y,i;if(!this.regexp_eatClassSetRange(e))if(i=this.regexp_eatClassSetOperand(e)){i===j&&(t=j);for(var r=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(i=this.regexp_eatClassSetOperand(e))){i!==j&&(t=Y);continue}e.raise("Invalid character in character class")}if(r!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(r!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(i=this.regexp_eatClassSetOperand(e),!i)return t;i===j&&(t=j)}};m.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var i=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return i!==-1&&r!==-1&&i>r&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1};m.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?Y:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};m.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var i=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return i&&r===j&&e.raise("Negated character class may contain strings"),r;e.pos=t}if(e.eat(92)){var s=this.regexp_eatCharacterClassEscape(e);if(s)return s;e.pos=t}return null};m.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var i=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return i}else e.raise("Invalid escape");e.pos=t}return null};m.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===j&&(t=j);return t};m.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?Y:j};m.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var i=e.current();return i<0||i===e.lookahead()&&Ri(i)||Bi(i)?!1:(e.advance(),e.lastIntValue=i,!0)};function Ri(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function Bi(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}m.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return Oi(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Oi(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}m.regexp_eatClassControlLetter=function(e){var t=e.current();return Ie(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};m.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1};m.regexp_eatDecimalDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;Ie(i=e.current());)e.lastIntValue=10*e.lastIntValue+(i-48),e.advance();return e.pos!==t};function Ie(e){return e>=48&&e<=57}m.regexp_eatHexDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;Ut(i=e.current());)e.lastIntValue=16*e.lastIntValue+qt(i),e.advance();return e.pos!==t};function Ut(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function qt(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}m.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var i=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+i*8+e.lastIntValue:e.lastIntValue=t*8+i}else e.lastIntValue=t;return!0}return!1};m.regexp_eatOctalDigit=function(e){var t=e.current();return Wt(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function Wt(e){return e>=48&&e<=55}m.regexp_eatFixedHexDigits=function(e,t){var i=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var s=e.current();if(!Ut(s))return e.pos=i,!1;e.lastIntValue=16*e.lastIntValue+qt(s),e.advance()}return!0};var He=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new Ae(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},w=P.prototype;w.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new He(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};w.getToken=function(){return this.next(),new He(this)};typeof Symbol<"u"&&(w[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===o.eof,value:t}}}});w.nextToken=function(){var e=this.curContext();if((!e||!e.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(o.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};w.readToken=function(e){return $(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};w.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888};w.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=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 r=void 0,s=t;(r=lt(this.input,s,this.pos))>-1;)++this.curLine,s=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,i),t,this.pos,e,this.curPosition())};w.skipLineComment=function(e){for(var t=this.pos,i=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!se(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,i,this.curPosition())};w.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(e>8&&e<14||e>=5760&&ft.test(String.fromCharCode(e)))++this.pos;else break e}}};w.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var i=this.type;this.type=e,this.value=t,this.updateContext(i)};w.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(o.ellipsis)):(++this.pos,this.finishToken(o.dot))};w.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(o.assign,2):this.finishOp(o.slash,1)};w.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),i=1,r=e===42?o.star:o.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++i,r=o.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(o.assign,i+1):this.finishOp(r,i)};w.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61)return this.finishOp(o.assign,3)}return this.finishOp(e===124?o.logicalOR:o.logicalAND,2)}return t===61?this.finishOp(o.assign,2):this.finishOp(e===124?o.bitwiseOR:o.bitwiseAND,1)};w.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(o.assign,2):this.finishOp(o.bitwiseXOR,1)};w.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||U.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(o.incDec,2):t===61?this.finishOp(o.assign,2):this.finishOp(o.plusMin,1)};w.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),i=1;return t===e?(i=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+i)===61?this.finishOp(o.assign,i+1):this.finishOp(o.bitShift,i)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(i=2),this.finishOp(o.relational,i))};w.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(o.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(o.arrow)):this.finishOp(e===61?o.eq:o.prefix,1)};w.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var i=this.input.charCodeAt(this.pos+2);if(i<48||i>57)return this.finishOp(o.questionDot,2)}if(t===63){if(e>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(o.assign,3)}return this.finishOp(o.coalesce,2)}}return this.finishOp(o.question,1)};w.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),$(t,!0)||t===92))return this.finishToken(o.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+Q(t)+"'")};w.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(o.parenL);case 41:return++this.pos,this.finishToken(o.parenR);case 59:return++this.pos,this.finishToken(o.semi);case 44:return++this.pos,this.finishToken(o.comma);case 91:return++this.pos,this.finishToken(o.bracketL);case 93:return++this.pos,this.finishToken(o.bracketR);case 123:return++this.pos,this.finishToken(o.braceL);case 125:return++this.pos,this.finishToken(o.braceR);case 58:return++this.pos,this.finishToken(o.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(o.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(o.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Q(e)+"'")};w.finishOp=function(e,t){var i=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,i)};w.readRegexp=function(){for(var e,t,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(U.test(r)&&this.raise(i,"Unterminated regular expression"),e)e=!1;else{if(r==="[")t=!0;else if(r==="]"&&t)t=!1;else if(r==="/"&&!t)break;e=r==="\\"}++this.pos}var s=this.input.slice(i,this.pos);++this.pos;var a=this.pos,n=this.readWord1();this.containsEsc&&this.unexpected(a);var u=this.regexpState||(this.regexpState=new K(this));u.reset(i,s,n),this.validateRegExpFlags(u),this.validateRegExpPattern(u);var p=null;try{p=new RegExp(s,n)}catch{}return this.finishToken(o.regexp,{pattern:s,flags:n,value:p})};w.readInt=function(e,t,i){for(var r=this.options.ecmaVersion>=12&&t===void 0,s=i&&this.input.charCodeAt(this.pos)===48,a=this.pos,n=0,u=0,p=0,c=t??1/0;p<c;++p,++this.pos){var l=this.input.charCodeAt(this.pos),d=void 0;if(r&&l===95){s&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),u===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),p===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),u=l;continue}if(l>=97?d=l-97+10:l>=65?d=l-65+10:l>=48&&l<=57?d=l-48:d=1/0,d>=e)break;u=l,n=n*e+d}return r&&u===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===a||t!=null&&this.pos-a!==t?null:n};function ji(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function Gt(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}w.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var i=this.readInt(e);return i==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(i=Gt(this.input.slice(t,this.pos)),++this.pos):$(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(o.num,i)};w.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var i=this.pos-t>=2&&this.input.charCodeAt(t)===48;i&&this.strict&&this.raise(t,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!i&&!e&&this.options.ecmaVersion>=11&&r===110){var s=Gt(this.input.slice(t,this.pos));return++this.pos,$(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(o.num,s)}i&&/[89]/.test(this.input.slice(t,this.pos))&&(i=!1),r===46&&!i&&(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),(r===69||r===101)&&!i&&(r=this.input.charCodeAt(++this.pos),(r===43||r===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),$(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var a=ji(this.input.slice(t,this.pos),i);return this.finishToken(o.num,a)};w.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var i=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(i,"Code point out of bounds")}else t=this.readHexChar(4);return t};w.readString=function(e){for(var t="",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;r===92?(t+=this.input.slice(i,this.pos),t+=this.readEscapedChar(!1),i=this.pos):r===8232||r===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(se(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(i,this.pos++),this.finishToken(o.string,t)};var zt={};w.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===zt)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};w.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw zt;this.raise(e,t)};w.readTmplToken=function(){for(var e="",t=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===o.template||this.type===o.invalidTemplate)?i===36?(this.pos+=2,this.finishToken(o.dollarBraceL)):(++this.pos,this.finishToken(o.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(o.template,e));if(i===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(se(i)){switch(e+=this.input.slice(t,this.pos),++this.pos,i){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
23
- `;break;default:e+=String.fromCharCode(i);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};w.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(o.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
22
+ `),cooked:this.value},this.next(),i.tail=this.type===o.backQuote,this.finishNode(i,"TemplateElement")};b.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var i=this.startNode();this.next(),i.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(i.quasis=[r];!r.tail;)this.type===o.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(o.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(o.braceR),i.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(i,"TemplateLiteral")};b.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===o.name||this.type===o.num||this.type===o.string||this.type===o.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===o.star)&&!q.test(this.input.slice(this.lastTokEnd,this.start))};b.parseObj=function(e,t){var i=this.startNode(),r=!0,a={};for(i.properties=[],this.next();!this.eat(o.braceR);){if(r)r=!1;else if(this.expect(o.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(o.braceR))break;var s=this.parseProperty(e,t);e||this.checkPropClash(s,a,t),i.properties.push(s)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")};b.parseProperty=function(e,t){var i=this.startNode(),r,a,s,n;if(this.options.ecmaVersion>=9&&this.eat(o.ellipsis))return e?(i.argument=this.parseIdent(!1),this.type===o.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(i.argument=this.parseMaybeAssign(!1,t),this.type===o.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=!1,i.shorthand=!1,(e||t)&&(s=this.start,n=this.startLoc),e||(r=this.eat(o.star)));var u=this.containsEsc;return this.parsePropertyName(i),!e&&!u&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(i)?(a=!0,r=this.options.ecmaVersion>=9&&this.eat(o.star),this.parsePropertyName(i)):a=!1,this.parsePropertyValue(i,e,r,a,s,n,t,u),this.finishNode(i,"Property")};b.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var t=e.kind==="get"?0:1;if(e.value.params.length!==t){var i=e.value.start;e.kind==="get"?this.raiseRecoverable(i,"getter should have no params"):this.raiseRecoverable(i,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};b.parsePropertyValue=function(e,t,i,r,a,s,n,u){(i||r)&&this.type===o.colon&&this.unexpected(),this.eat(o.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,n),e.kind="init"):this.options.ecmaVersion>=6&&this.type===o.parenL?(t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(i,r)):!t&&!u&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==o.comma&&this.type!==o.braceR&&this.type!==o.eq?((i||r)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((i||r)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=a),e.kind="init",t?e.value=this.parseMaybeDefault(a,s,this.copyNode(e.key)):this.type===o.eq&&n?(n.shorthandAssign<0&&(n.shorthandAssign=this.start),e.value=this.parseMaybeDefault(a,s,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected()};b.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(o.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(o.bracketR),e.key;e.computed=!1}return e.key=this.type===o.num||this.type===o.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};b.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};b.parseMethod=function(e,t,i){var r=this.startNode(),a=this.yieldPos,s=this.awaitPos,n=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(qe(t,r.generator)|Fe|(i?gt:0)),this.expect(o.parenL),r.params=this.parseBindingList(o.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=a,this.awaitPos=s,this.awaitIdentPos=n,this.finishNode(r,"FunctionExpression")};b.parseArrowExpression=function(e,t,i,r){var a=this.yieldPos,s=this.awaitPos,n=this.awaitIdentPos;return this.enterScope(qe(i,!1)|xt),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=a,this.awaitPos=s,this.awaitIdentPos=n,this.finishNode(e,"ArrowFunctionExpression")};b.parseFunctionBody=function(e,t,i,r){var a=t&&this.type!==o.braceL,s=this.strict,n=!1;if(a)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var u=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!s||u)&&(n=this.strictDirective(this.end),n&&u&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var p=this.labels;this.labels=[],n&&(this.strict=!0),this.checkParams(e,!s&&!n&&!t&&!i&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,wt),e.body=this.parseBlock(!1,void 0,n&&!s),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=p}this.exitScope()};b.isSimpleParamList=function(e){for(var t=0,i=e;t<i.length;t+=1){var r=i[t];if(r.type!=="Identifier")return!1}return!0};b.checkParams=function(e,t){for(var i=Object.create(null),r=0,a=e.params;r<a.length;r+=1){var s=a[r];this.checkLValInnerPattern(s,We,t?null:i)}};b.parseExprList=function(e,t,i,r){for(var a=[],s=!0;!this.eat(e);){if(s)s=!1;else if(this.expect(o.comma),t&&this.afterTrailingComma(e))break;var n=void 0;i&&this.type===o.comma?n=null:this.type===o.ellipsis?(n=this.parseSpread(r),r&&this.type===o.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):n=this.parseMaybeAssign(!1,r),a.push(n)}return a};b.checkUnreserved=function(e){var t=e.start,i=e.end,r=e.name;if(this.inGenerator&&r==="yield"&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&r==="await"&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().inClassFieldInit&&r==="arguments"&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(r==="arguments"||r==="await")&&this.raise(t,"Cannot use "+r+" in class static initialization block"),this.keywords.test(r)&&this.raise(t,"Unexpected keyword '"+r+"'"),!(this.options.ecmaVersion<6&&this.input.slice(t,i).indexOf("\\")!==-1)){var a=this.strict?this.reservedWordsStrict:this.reservedWords;a.test(r)&&(!this.inAsync&&r==="await"&&this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+r+"' is reserved"))}};b.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,"Identifier"),e||(this.checkUnreserved(t),t.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t};b.parseIdentNode=function(){var e=this.startNode();return this.type===o.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=o.name):this.unexpected(),e};b.parsePrivateIdent=function(){var e=this.startNode();return this.type===o.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e};b.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===o.semi||this.canInsertSemicolon()||this.type!==o.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(o.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")};b.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var Se=I.prototype;Se.raise=function(e,t){var i=mt(this.input,e);t+=" ("+i.line+":"+i.column+")";var r=new SyntaxError(t);throw r.pos=e,r.loc=i,r.raisedAt=this.pos,r};Se.raiseRecoverable=Se.raise;Se.curPosition=function(){if(this.options.locations)return new fe(this.curLine,this.pos-this.lineStart)};var re=I.prototype,xi=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[],this.inClassFieldInit=!1};re.enterScope=function(e){this.scopeStack.push(new xi(e))};re.exitScope=function(){this.scopeStack.pop()};re.treatFunctionsAsVarInScope=function(e){return e.flags&pe||!this.inModule&&e.flags&me};re.declareName=function(e,t,i){var r=!1;if(t===ee){var a=this.currentScope();r=a.lexical.indexOf(e)>-1||a.functions.indexOf(e)>-1||a.var.indexOf(e)>-1,a.lexical.push(e),this.inModule&&a.flags&me&&delete this.undefinedExports[e]}else if(t===vt){var s=this.currentScope();s.lexical.push(e)}else if(t===bt){var n=this.currentScope();this.treatFunctionsAsVar?r=n.lexical.indexOf(e)>-1:r=n.lexical.indexOf(e)>-1||n.var.indexOf(e)>-1,n.functions.push(e)}else for(var u=this.scopeStack.length-1;u>=0;--u){var p=this.scopeStack[u];if(p.lexical.indexOf(e)>-1&&!(p.flags&yt&&p.lexical[0]===e)||!this.treatFunctionsAsVarInScope(p)&&p.functions.indexOf(e)>-1){r=!0;break}if(p.var.push(e),this.inModule&&p.flags&me&&delete this.undefinedExports[e],p.flags&Ue)break}r&&this.raiseRecoverable(i,"Identifier '"+e+"' has already been declared")};re.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};re.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};re.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Ue)return t}};re.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Ue&&!(t.flags&xt))return t}};var ke=function(t,i,r){this.type="",this.start=i,this.end=0,t.options.locations&&(this.loc=new Ce(t,r)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[i,0])},ye=I.prototype;ye.startNode=function(){return new ke(this,this.start,this.startLoc)};ye.startNodeAt=function(e,t){return new ke(this,e,t)};function Ct(e,t,i,r){return e.type=t,e.end=i,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=i),e}ye.finishNode=function(e,t){return Ct.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};ye.finishNodeAt=function(e,t,i,r){return Ct.call(this,e,t,i,r)};ye.copyNode=function(e){var t=new ke(this,e.start,this.startLoc);for(var i in e)t[i]=e[i];return t};var yi="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",_t="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",kt=_t+" Extended_Pictographic",At=kt,It=At+" EBase EComp EMod EPres ExtPict",Pt=It,gi=Pt,bi={9:_t,10:kt,11:At,12:It,13:Pt,14:gi},vi="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",wi={9:"",10:"",11:"",12:"",13:"",14:vi},Je="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",Nt="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",Vt=Nt+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Tt=Vt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Lt=Tt+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Mt=Lt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Si=Mt+" "+yi,Ei={9:Nt,10:Vt,11:Tt,12:Lt,13:Mt,14:Si},Bt={};function Ci(e){var t=Bt[e]={binary:te(bi[e]+" "+Je),binaryOfStrings:te(wi[e]),nonBinary:{General_Category:te(Je),Script:te(Ei[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var Ne=0,et=[9,10,11,12,13,14];Ne<et.length;Ne+=1){var _i=et[Ne];Ci(_i)}var d=I.prototype,Ee=function(t,i){this.parent=t,this.base=i||this};Ee.prototype.separatedFrom=function(t){for(var i=this;i;i=i.parent)for(var r=t;r;r=r.parent)if(i.base===r.base&&i!==r)return!0;return!1};Ee.prototype.sibling=function(){return new Ee(this.parent,this.base)};var Q=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=Bt[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};Q.prototype.reset=function(t,i,r){var a=r.indexOf("v")!==-1,s=r.indexOf("u")!==-1;this.start=t|0,this.source=i+"",this.flags=r,a&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=s&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=s&&this.parser.options.ecmaVersion>=9)};Q.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};Q.prototype.at=function(t,i){i===void 0&&(i=!1);var r=this.source,a=r.length;if(t>=a)return-1;var s=r.charCodeAt(t);if(!(i||this.switchU)||s<=55295||s>=57344||t+1>=a)return s;var n=r.charCodeAt(t+1);return n>=56320&&n<=57343?(s<<10)+n-56613888:s};Q.prototype.nextIndex=function(t,i){i===void 0&&(i=!1);var r=this.source,a=r.length;if(t>=a)return a;var s=r.charCodeAt(t),n;return!(i||this.switchU)||s<=55295||s>=57344||t+1>=a||(n=r.charCodeAt(t+1))<56320||n>57343?t+1:t+2};Q.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)};Q.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};Q.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};Q.prototype.eat=function(t,i){return i===void 0&&(i=!1),this.current(i)===t?(this.advance(i),!0):!1};Q.prototype.eatChars=function(t,i){i===void 0&&(i=!1);for(var r=this.pos,a=0,s=t;a<s.length;a+=1){var n=s[a],u=this.at(r,i);if(u===-1||u!==n)return!1;r=this.nextIndex(r,i)}return this.pos=r,!0};d.validateRegExpFlags=function(e){for(var t=e.validFlags,i=e.flags,r=!1,a=!1,s=0;s<i.length;s++){var n=i.charAt(s);t.indexOf(n)===-1&&this.raise(e.start,"Invalid regular expression flag"),i.indexOf(n,s+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),n==="u"&&(r=!0),n==="v"&&(a=!0)}this.options.ecmaVersion>=15&&r&&a&&this.raise(e.start,"Invalid regular expression flag")};function ki(e){for(var t in e)return!0;return!1}d.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&ki(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))};d.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,i=e.backReferenceNames;t<i.length;t+=1){var r=i[t];e.groupNames[r]||e.raise("Invalid named capture referenced")}};d.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new Ee(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")};d.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););};d.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1};d.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var i=!1;if(this.options.ecmaVersion>=9&&(i=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!i,!0}return e.pos=t,!1};d.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};d.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};d.regexp_eatBracedQuantifier=function(e,t){var i=e.pos;if(e.eat(123)){var r=0,a=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(a=e.lastIntValue),e.eat(125)))return a!==-1&&a<r&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=i}return!1};d.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)};d.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1};d.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var i=this.regexp_eatModifiers(e),r=e.eat(45);if(i||r){for(var a=0;a<i.length;a++){var s=i.charAt(a);i.indexOf(s,a+1)>-1&&e.raise("Duplicate regular expression modifiers")}if(r){var n=this.regexp_eatModifiers(e);!i&&!n&&e.current()===58&&e.raise("Invalid regular expression modifiers");for(var u=0;u<n.length;u++){var p=n.charAt(u);(n.indexOf(p,u+1)>-1||i.indexOf(p)>-1)&&e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1};d.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};d.regexp_eatModifiers=function(e){for(var t="",i=0;(i=e.current())!==-1&&Ai(i);)t+=Z(i),e.advance();return t};function Ai(e){return e===105||e===109||e===115}d.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};d.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};d.regexp_eatSyntaxCharacter=function(e){var t=e.current();return Rt(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Rt(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}d.regexp_eatPatternCharacters=function(e){for(var t=e.pos,i=0;(i=e.current())!==-1&&!Rt(i);)e.advance();return e.pos!==t};d.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1};d.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,i=e.groupNames[e.lastStringValue];if(i)if(t)for(var r=0,a=i;r<a.length;r+=1){var s=a[r];s.separatedFrom(e.branchID)||e.raise("Duplicate capture group name")}else e.raise("Duplicate capture group name");t?(i||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}};d.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};d.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=Z(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=Z(e.lastIntValue);return!0}return!1};d.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,r=e.current(i);return e.advance(i),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(r=e.lastIntValue),Ii(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function Ii(e){return X(e,!0)||e===36||e===95}d.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,r=e.current(i);return e.advance(i),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(r=e.lastIntValue),Pi(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function Pi(e){return ne(e,!0)||e===36||e===95||e===8204||e===8205}d.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};d.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var i=e.lastIntValue;if(e.switchU)return i>e.maxBackReference&&(e.maxBackReference=i),!0;if(i<=e.numCapturingParens)return!0;e.pos=t}return!1};d.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};d.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};d.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};d.regexp_eatZero=function(e){return e.current()===48&&!Ae(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};d.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1};d.regexp_eatControlLetter=function(e){var t=e.current();return Dt(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function Dt(e){return e>=65&&e<=90||e>=97&&e<=122}d.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var i=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(r&&a>=55296&&a<=56319){var s=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var n=e.lastIntValue;if(n>=56320&&n<=57343)return e.lastIntValue=(a-55296)*1024+(n-56320)+65536,!0}e.pos=s,e.lastIntValue=a}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Ni(e.lastIntValue))return!0;r&&e.raise("Invalid unicode escape"),e.pos=i}return!1};function Ni(e){return e>=0&&e<=1114111}d.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1};d.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var jt=0,J=1,F=2;d.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(Vi(t))return e.lastIntValue=-1,e.advance(),J;var i=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((i=t===80)||t===112)){e.lastIntValue=-1,e.advance();var r;if(e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return i&&r===F&&e.raise("Invalid property name"),r;e.raise("Invalid property name")}return jt};function Vi(e){return e===100||e===68||e===115||e===83||e===119||e===87}d.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var i=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,i,r),J}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var a=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,a)}return jt};d.regexp_validateUnicodePropertyNameAndValue=function(e,t,i){ue(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(i)||e.raise("Invalid property value")};d.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return J;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return F;e.raise("Invalid property name")};d.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Ot(t=e.current());)e.lastStringValue+=Z(t),e.advance();return e.lastStringValue!==""};function Ot(e){return Dt(e)||e===95}d.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Ti(t=e.current());)e.lastStringValue+=Z(t),e.advance();return e.lastStringValue!==""};function Ti(e){return Ot(e)||Ae(e)}d.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};d.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),i=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&i===F&&e.raise("Negated character class may contain strings"),!0}return!1};d.regexp_classContents=function(e){return e.current()===93?J:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),J)};d.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var i=e.lastIntValue;e.switchU&&(t===-1||i===-1)&&e.raise("Invalid character class"),t!==-1&&i!==-1&&t>i&&e.raise("Range out of order in character class")}}};d.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var i=e.current();(i===99||qt(i))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return r!==93?(e.lastIntValue=r,e.advance(),!0):!1};d.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};d.regexp_classSetExpression=function(e){var t=J,i;if(!this.regexp_eatClassSetRange(e))if(i=this.regexp_eatClassSetOperand(e)){i===F&&(t=F);for(var r=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(i=this.regexp_eatClassSetOperand(e))){i!==F&&(t=J);continue}e.raise("Invalid character in character class")}if(r!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(r!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(i=this.regexp_eatClassSetOperand(e),!i)return t;i===F&&(t=F)}};d.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var i=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return i!==-1&&r!==-1&&i>r&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1};d.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?J:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};d.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var i=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return i&&r===F&&e.raise("Negated character class may contain strings"),r;e.pos=t}if(e.eat(92)){var a=this.regexp_eatCharacterClassEscape(e);if(a)return a;e.pos=t}return null};d.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var i=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return i}else e.raise("Invalid escape");e.pos=t}return null};d.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===F&&(t=F);return t};d.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?J:F};d.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var i=e.current();return i<0||i===e.lookahead()&&Li(i)||Mi(i)?!1:(e.advance(),e.lastIntValue=i,!0)};function Li(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function Mi(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}d.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return Bi(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Bi(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}d.regexp_eatClassControlLetter=function(e){var t=e.current();return Ae(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};d.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1};d.regexp_eatDecimalDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;Ae(i=e.current());)e.lastIntValue=10*e.lastIntValue+(i-48),e.advance();return e.pos!==t};function Ae(e){return e>=48&&e<=57}d.regexp_eatHexDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;Ft(i=e.current());)e.lastIntValue=16*e.lastIntValue+Ut(i),e.advance();return e.pos!==t};function Ft(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Ut(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}d.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var i=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+i*8+e.lastIntValue:e.lastIntValue=t*8+i}else e.lastIntValue=t;return!0}return!1};d.regexp_eatOctalDigit=function(e){var t=e.current();return qt(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function qt(e){return e>=48&&e<=55}d.regexp_eatFixedHexDigits=function(e,t){var i=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var a=e.current();if(!Ft(a))return e.pos=i,!1;e.lastIntValue=16*e.lastIntValue+Ut(a),e.advance()}return!0};var ze=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new Ce(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},v=I.prototype;v.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new ze(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};v.getToken=function(){return this.next(),new ze(this)};typeof Symbol<"u"&&(v[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===o.eof,value:t}}}});v.nextToken=function(){var e=this.curContext();if((!e||!e.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(o.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};v.readToken=function(e){return X(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};v.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888};v.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=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 r=void 0,a=t;(r=ht(this.input,a,this.pos))>-1;)++this.curLine,a=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,i),t,this.pos,e,this.curPosition())};v.skipLineComment=function(e){for(var t=this.pos,i=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!oe(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,i,this.curPosition())};v.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(e>8&&e<14||e>=5760&&lt.test(String.fromCharCode(e)))++this.pos;else break e}}};v.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var i=this.type;this.type=e,this.value=t,this.updateContext(i)};v.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(o.ellipsis)):(++this.pos,this.finishToken(o.dot))};v.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(o.assign,2):this.finishOp(o.slash,1)};v.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),i=1,r=e===42?o.star:o.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++i,r=o.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(o.assign,i+1):this.finishOp(r,i)};v.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61)return this.finishOp(o.assign,3)}return this.finishOp(e===124?o.logicalOR:o.logicalAND,2)}return t===61?this.finishOp(o.assign,2):this.finishOp(e===124?o.bitwiseOR:o.bitwiseAND,1)};v.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(o.assign,2):this.finishOp(o.bitwiseXOR,1)};v.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||q.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(o.incDec,2):t===61?this.finishOp(o.assign,2):this.finishOp(o.plusMin,1)};v.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),i=1;return t===e?(i=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+i)===61?this.finishOp(o.assign,i+1):this.finishOp(o.bitShift,i)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(i=2),this.finishOp(o.relational,i))};v.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(o.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(o.arrow)):this.finishOp(e===61?o.eq:o.prefix,1)};v.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var i=this.input.charCodeAt(this.pos+2);if(i<48||i>57)return this.finishOp(o.questionDot,2)}if(t===63){if(e>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(o.assign,3)}return this.finishOp(o.coalesce,2)}}return this.finishOp(o.question,1)};v.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),X(t,!0)||t===92))return this.finishToken(o.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+Z(t)+"'")};v.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(o.parenL);case 41:return++this.pos,this.finishToken(o.parenR);case 59:return++this.pos,this.finishToken(o.semi);case 44:return++this.pos,this.finishToken(o.comma);case 91:return++this.pos,this.finishToken(o.bracketL);case 93:return++this.pos,this.finishToken(o.bracketR);case 123:return++this.pos,this.finishToken(o.braceL);case 125:return++this.pos,this.finishToken(o.braceR);case 58:return++this.pos,this.finishToken(o.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(o.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(o.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Z(e)+"'")};v.finishOp=function(e,t){var i=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,i)};v.readRegexp=function(){for(var e,t,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(q.test(r)&&this.raise(i,"Unterminated regular expression"),e)e=!1;else{if(r==="[")t=!0;else if(r==="]"&&t)t=!1;else if(r==="/"&&!t)break;e=r==="\\"}++this.pos}var a=this.input.slice(i,this.pos);++this.pos;var s=this.pos,n=this.readWord1();this.containsEsc&&this.unexpected(s);var u=this.regexpState||(this.regexpState=new Q(this));u.reset(i,a,n),this.validateRegExpFlags(u),this.validateRegExpPattern(u);var p=null;try{p=new RegExp(a,n)}catch{}return this.finishToken(o.regexp,{pattern:a,flags:n,value:p})};v.readInt=function(e,t,i){for(var r=this.options.ecmaVersion>=12&&t===void 0,a=i&&this.input.charCodeAt(this.pos)===48,s=this.pos,n=0,u=0,p=0,c=t??1/0;p<c;++p,++this.pos){var l=this.input.charCodeAt(this.pos),f=void 0;if(r&&l===95){a&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),u===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),p===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),u=l;continue}if(l>=97?f=l-97+10:l>=65?f=l-65+10:l>=48&&l<=57?f=l-48:f=1/0,f>=e)break;u=l,n=n*e+f}return r&&u===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||t!=null&&this.pos-s!==t?null:n};function Ri(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function Wt(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}v.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var i=this.readInt(e);return i==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(i=Wt(this.input.slice(t,this.pos)),++this.pos):X(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(o.num,i)};v.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var i=this.pos-t>=2&&this.input.charCodeAt(t)===48;i&&this.strict&&this.raise(t,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!i&&!e&&this.options.ecmaVersion>=11&&r===110){var a=Wt(this.input.slice(t,this.pos));return++this.pos,X(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(o.num,a)}i&&/[89]/.test(this.input.slice(t,this.pos))&&(i=!1),r===46&&!i&&(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),(r===69||r===101)&&!i&&(r=this.input.charCodeAt(++this.pos),(r===43||r===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),X(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s=Ri(this.input.slice(t,this.pos),i);return this.finishToken(o.num,s)};v.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var i=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(i,"Code point out of bounds")}else t=this.readHexChar(4);return t};v.readString=function(e){for(var t="",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;r===92?(t+=this.input.slice(i,this.pos),t+=this.readEscapedChar(!1),i=this.pos):r===8232||r===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(oe(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(i,this.pos++),this.finishToken(o.string,t)};var Gt={};v.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===Gt)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};v.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Gt;this.raise(e,t)};v.readTmplToken=function(){for(var e="",t=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===o.template||this.type===o.invalidTemplate)?i===36?(this.pos+=2,this.finishToken(o.dollarBraceL)):(++this.pos,this.finishToken(o.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(o.template,e));if(i===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(oe(i)){switch(e+=this.input.slice(t,this.pos),++this.pos,i){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
23
+ `;break;default:e+=String.fromCharCode(i);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};v.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(o.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
24
24
  `&&++this.pos;case`
25
- `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};w.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
26
- `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Q(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],s=parseInt(r,8);return s>255&&(r=r.slice(0,-1),s=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),(r!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(s)}return se(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};w.readHexChar=function(e){var t=this.pos,i=this.readInt(16,e);return i===null&&this.invalidStringToken(t,"Bad character escape sequence"),i};w.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var s=this.fullCharCodeAtPos();if(re(s,r))this.pos+=s<=65535?1:2;else if(s===92){this.containsEsc=!0,e+=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 n=this.readCodePoint();(t?$:re)(n,r)||this.invalidStringToken(a,"Invalid Unicode escape"),e+=Q(n),i=this.pos}else break;t=!1}return e+this.input.slice(i,this.pos)};w.readWord=function(){var e=this.readWord1(),t=o.name;return this.keywords.test(e)&&(t=je[e]),this.finishToken(t,e)};var Fi="8.14.0";P.acorn={Parser:P,version:Fi,defaultOptions:De,Position:le,SourceLocation:Ae,getLineInfo:dt,Node:_e,TokenType:C,tokTypes:o,keywordTypes:je,TokContext:W,tokContexts:k,isIdentifierChar:re,isIdentifierStart:$,Token:He,isNewLine:se,lineBreak:U,lineBreakG:ui,nonASCIIwhitespace:ft};function Ui(e,t){return P.parse(e,t)}function Ht(e,t,i,r,s){i||(i=f),function a(n,u,p){var c=p||n.type;i[c](n,u,a),t[c]&&t[c](n,u)}(e,r,s)}function N(e,t,i,r,s){var a=i?qi(i,r||void 0):r;(function n(u,p,c){a[c||u.type](u,p,n)})(e,t,s)}function qi(e,t){var i=Object.create(t||f);for(var r in e)i[r]=e[r];return i}function Ke(e,t,i){i(e,t)}function te(e,t,i){}var f={};f.Program=f.BlockStatement=f.StaticBlock=function(e,t,i){for(var r=0,s=e.body;r<s.length;r+=1){var a=s[r];i(a,t,"Statement")}};f.Statement=Ke;f.EmptyStatement=te;f.ExpressionStatement=f.ParenthesizedExpression=f.ChainExpression=function(e,t,i){return i(e.expression,t,"Expression")};f.IfStatement=function(e,t,i){i(e.test,t,"Expression"),i(e.consequent,t,"Statement"),e.alternate&&i(e.alternate,t,"Statement")};f.LabeledStatement=function(e,t,i){return i(e.body,t,"Statement")};f.BreakStatement=f.ContinueStatement=te;f.WithStatement=function(e,t,i){i(e.object,t,"Expression"),i(e.body,t,"Statement")};f.SwitchStatement=function(e,t,i){i(e.discriminant,t,"Expression");for(var r=0,s=e.cases;r<s.length;r+=1){var a=s[r];i(a,t)}};f.SwitchCase=function(e,t,i){e.test&&i(e.test,t,"Expression");for(var r=0,s=e.consequent;r<s.length;r+=1){var a=s[r];i(a,t,"Statement")}};f.ReturnStatement=f.YieldExpression=f.AwaitExpression=function(e,t,i){e.argument&&i(e.argument,t,"Expression")};f.ThrowStatement=f.SpreadElement=function(e,t,i){return i(e.argument,t,"Expression")};f.TryStatement=function(e,t,i){i(e.block,t,"Statement"),e.handler&&i(e.handler,t),e.finalizer&&i(e.finalizer,t,"Statement")};f.CatchClause=function(e,t,i){e.param&&i(e.param,t,"Pattern"),i(e.body,t,"Statement")};f.WhileStatement=f.DoWhileStatement=function(e,t,i){i(e.test,t,"Expression"),i(e.body,t,"Statement")};f.ForStatement=function(e,t,i){e.init&&i(e.init,t,"ForInit"),e.test&&i(e.test,t,"Expression"),e.update&&i(e.update,t,"Expression"),i(e.body,t,"Statement")};f.ForInStatement=f.ForOfStatement=function(e,t,i){i(e.left,t,"ForInit"),i(e.right,t,"Expression"),i(e.body,t,"Statement")};f.ForInit=function(e,t,i){e.type==="VariableDeclaration"?i(e,t):i(e,t,"Expression")};f.DebuggerStatement=te;f.FunctionDeclaration=function(e,t,i){return i(e,t,"Function")};f.VariableDeclaration=function(e,t,i){for(var r=0,s=e.declarations;r<s.length;r+=1){var a=s[r];i(a,t)}};f.VariableDeclarator=function(e,t,i){i(e.id,t,"Pattern"),e.init&&i(e.init,t,"Expression")};f.Function=function(e,t,i){e.id&&i(e.id,t,"Pattern");for(var r=0,s=e.params;r<s.length;r+=1){var a=s[r];i(a,t,"Pattern")}i(e.body,t,e.expression?"Expression":"Statement")};f.Pattern=function(e,t,i){e.type==="Identifier"?i(e,t,"VariablePattern"):e.type==="MemberExpression"?i(e,t,"MemberPattern"):i(e,t)};f.VariablePattern=te;f.MemberPattern=Ke;f.RestElement=function(e,t,i){return i(e.argument,t,"Pattern")};f.ArrayPattern=function(e,t,i){for(var r=0,s=e.elements;r<s.length;r+=1){var a=s[r];a&&i(a,t,"Pattern")}};f.ObjectPattern=function(e,t,i){for(var r=0,s=e.properties;r<s.length;r+=1){var a=s[r];a.type==="Property"?(a.computed&&i(a.key,t,"Expression"),i(a.value,t,"Pattern")):a.type==="RestElement"&&i(a.argument,t,"Pattern")}};f.Expression=Ke;f.ThisExpression=f.Super=f.MetaProperty=te;f.ArrayExpression=function(e,t,i){for(var r=0,s=e.elements;r<s.length;r+=1){var a=s[r];a&&i(a,t,"Expression")}};f.ObjectExpression=function(e,t,i){for(var r=0,s=e.properties;r<s.length;r+=1){var a=s[r];i(a,t)}};f.FunctionExpression=f.ArrowFunctionExpression=f.FunctionDeclaration;f.SequenceExpression=function(e,t,i){for(var r=0,s=e.expressions;r<s.length;r+=1){var a=s[r];i(a,t,"Expression")}};f.TemplateLiteral=function(e,t,i){for(var r=0,s=e.quasis;r<s.length;r+=1){var a=s[r];i(a,t)}for(var n=0,u=e.expressions;n<u.length;n+=1){var p=u[n];i(p,t,"Expression")}};f.TemplateElement=te;f.UnaryExpression=f.UpdateExpression=function(e,t,i){i(e.argument,t,"Expression")};f.BinaryExpression=f.LogicalExpression=function(e,t,i){i(e.left,t,"Expression"),i(e.right,t,"Expression")};f.AssignmentExpression=f.AssignmentPattern=function(e,t,i){i(e.left,t,"Pattern"),i(e.right,t,"Expression")};f.ConditionalExpression=function(e,t,i){i(e.test,t,"Expression"),i(e.consequent,t,"Expression"),i(e.alternate,t,"Expression")};f.NewExpression=f.CallExpression=function(e,t,i){if(i(e.callee,t,"Expression"),e.arguments)for(var r=0,s=e.arguments;r<s.length;r+=1){var a=s[r];i(a,t,"Expression")}};f.MemberExpression=function(e,t,i){i(e.object,t,"Expression"),e.computed&&i(e.property,t,"Expression")};f.ExportNamedDeclaration=f.ExportDefaultDeclaration=function(e,t,i){e.declaration&&i(e.declaration,t,e.type==="ExportNamedDeclaration"||e.declaration.id?"Statement":"Expression"),e.source&&i(e.source,t,"Expression")};f.ExportAllDeclaration=function(e,t,i){e.exported&&i(e.exported,t),i(e.source,t,"Expression")};f.ImportDeclaration=function(e,t,i){for(var r=0,s=e.specifiers;r<s.length;r+=1){var a=s[r];i(a,t)}i(e.source,t,"Expression")};f.ImportExpression=function(e,t,i){i(e.source,t,"Expression")};f.ImportSpecifier=f.ImportDefaultSpecifier=f.ImportNamespaceSpecifier=f.Identifier=f.PrivateIdentifier=f.Literal=te;f.TaggedTemplateExpression=function(e,t,i){i(e.tag,t,"Expression"),i(e.quasi,t,"Expression")};f.ClassDeclaration=f.ClassExpression=function(e,t,i){return i(e,t,"Class")};f.Class=function(e,t,i){e.id&&i(e.id,t,"Pattern"),e.superClass&&i(e.superClass,t,"Expression"),i(e.body,t)};f.ClassBody=function(e,t,i){for(var r=0,s=e.body;r<s.length;r+=1){var a=s[r];i(a,t)}};f.MethodDefinition=f.PropertyDefinition=f.Property=function(e,t,i){e.computed&&i(e.key,t,"Expression"),e.value&&i(e.value,t,"Expression")};const{stringify:Wi}=JSON;if(!String.prototype.repeat)throw new Error("String.prototype.repeat is undefined, see https://github.com/davidbonnet/astring#installation");if(!String.prototype.endsWith)throw new Error("String.prototype.endsWith is undefined, see https://github.com/davidbonnet/astring#installation");const ge={"||":2,"??":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,instanceof:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"%":12,"/":12,"**":13},G=17,Gi={ArrayExpression:20,TaggedTemplateExpression:20,ThisExpression:20,Identifier:20,PrivateIdentifier:20,Literal:18,TemplateLiteral:20,Super:20,SequenceExpression:20,MemberExpression:19,ChainExpression:19,CallExpression:19,NewExpression:19,ArrowFunctionExpression:G,ClassExpression:G,FunctionExpression:G,ObjectExpression:G,UpdateExpression:16,UnaryExpression:15,AwaitExpression:15,BinaryExpression:14,LogicalExpression:13,ConditionalExpression:4,AssignmentExpression:3,YieldExpression:2,RestElement:1};function ie(e,t){const{generator:i}=e;if(e.write("("),t!=null&&t.length>0){i[t[0].type](t[0],e);const{length:r}=t;for(let s=1;s<r;s++){const a=t[s];e.write(", "),i[a.type](a,e)}}e.write(")")}function Kt(e,t,i,r){const s=e.expressionsPrecedence[t.type];if(s===G)return!0;const a=e.expressionsPrecedence[i.type];return s!==a?!r&&s===15&&a===14&&i.operator==="**"||s<a:s!==13&&s!==14?!1:t.operator==="**"&&i.operator==="**"?!r:s===13&&a===13&&(t.operator==="??"||i.operator==="??")?!0:r?ge[t.operator]<=ge[i.operator]:ge[t.operator]<ge[i.operator]}function be(e,t,i,r){const{generator:s}=e;Kt(e,t,i,r)?(e.write("("),s[t.type](t,e),e.write(")")):s[t.type](t,e)}function zi(e,t,i,r){const s=t.split(`
27
- `),a=s.length-1;if(e.write(s[0].trim()),a>0){e.write(r);for(let n=1;n<a;n++)e.write(i+s[n].trim()+r);e.write(i+s[a].trim())}}function V(e,t,i,r){const{length:s}=t;for(let a=0;a<s;a++){const n=t[a];e.write(i),n.type[0]==="L"?e.write("// "+n.value.trim()+`
28
- `,n):(e.write("/*"),zi(e,n.value,i,r),e.write("*/"+r))}}function Hi(e){let t=e;for(;t!=null;){const{type:i}=t;if(i[0]==="C"&&i[1]==="a")return!0;if(i[0]==="M"&&i[1]==="e"&&i[2]==="m")t=t.object;else return!1}}function Me(e,t){const{generator:i}=e,{declarations:r}=t;e.write(t.kind+" ");const{length:s}=r;if(s>0){i.VariableDeclarator(r[0],e);for(let a=1;a<s;a++)e.write(", "),i.VariableDeclarator(r[a],e)}}let tt,it,rt,st,at,nt;const Ki={Program(e,t){const i=t.indent.repeat(t.indentLevel),{lineEnd:r,writeComments:s}=t;s&&e.comments!=null&&V(t,e.comments,i,r);const a=e.body,{length:n}=a;for(let u=0;u<n;u++){const p=a[u];s&&p.comments!=null&&V(t,p.comments,i,r),t.write(i),this[p.type](p,t),t.write(r)}s&&e.trailingComments!=null&&V(t,e.trailingComments,i,r)},BlockStatement:nt=function(e,t){const i=t.indent.repeat(t.indentLevel++),{lineEnd:r,writeComments:s}=t,a=i+t.indent;t.write("{");const n=e.body;if(n!=null&&n.length>0){t.write(r),s&&e.comments!=null&&V(t,e.comments,a,r);const{length:u}=n;for(let p=0;p<u;p++){const c=n[p];s&&c.comments!=null&&V(t,c.comments,a,r),t.write(a),this[c.type](c,t),t.write(r)}t.write(i)}else s&&e.comments!=null&&(t.write(r),V(t,e.comments,a,r),t.write(i));s&&e.trailingComments!=null&&V(t,e.trailingComments,a,r),t.write("}"),t.indentLevel--},ClassBody:nt,StaticBlock(e,t){t.write("static "),this.BlockStatement(e,t)},EmptyStatement(e,t){t.write(";")},ExpressionStatement(e,t){const i=t.expressionsPrecedence[e.expression.type];i===G||i===3&&e.expression.left.type[0]==="O"?(t.write("("),this[e.expression.type](e.expression,t),t.write(")")):this[e.expression.type](e.expression,t),t.write(";")},IfStatement(e,t){t.write("if ("),this[e.test.type](e.test,t),t.write(") "),this[e.consequent.type](e.consequent,t),e.alternate!=null&&(t.write(" else "),this[e.alternate.type](e.alternate,t))},LabeledStatement(e,t){this[e.label.type](e.label,t),t.write(": "),this[e.body.type](e.body,t)},BreakStatement(e,t){t.write("break"),e.label!=null&&(t.write(" "),this[e.label.type](e.label,t)),t.write(";")},ContinueStatement(e,t){t.write("continue"),e.label!=null&&(t.write(" "),this[e.label.type](e.label,t)),t.write(";")},WithStatement(e,t){t.write("with ("),this[e.object.type](e.object,t),t.write(") "),this[e.body.type](e.body,t)},SwitchStatement(e,t){const i=t.indent.repeat(t.indentLevel++),{lineEnd:r,writeComments:s}=t;t.indentLevel++;const a=i+t.indent,n=a+t.indent;t.write("switch ("),this[e.discriminant.type](e.discriminant,t),t.write(") {"+r);const{cases:u}=e,{length:p}=u;for(let c=0;c<p;c++){const l=u[c];s&&l.comments!=null&&V(t,l.comments,a,r),l.test?(t.write(a+"case "),this[l.test.type](l.test,t),t.write(":"+r)):t.write(a+"default:"+r);const{consequent:d}=l,{length:h}=d;for(let b=0;b<h;b++){const v=d[b];s&&v.comments!=null&&V(t,v.comments,n,r),t.write(n),this[v.type](v,t),t.write(r)}}t.indentLevel-=2,t.write(i+"}")},ReturnStatement(e,t){t.write("return"),e.argument&&(t.write(" "),this[e.argument.type](e.argument,t)),t.write(";")},ThrowStatement(e,t){t.write("throw "),this[e.argument.type](e.argument,t),t.write(";")},TryStatement(e,t){if(t.write("try "),this[e.block.type](e.block,t),e.handler){const{handler:i}=e;i.param==null?t.write(" catch "):(t.write(" catch ("),this[i.param.type](i.param,t),t.write(") ")),this[i.body.type](i.body,t)}e.finalizer&&(t.write(" finally "),this[e.finalizer.type](e.finalizer,t))},WhileStatement(e,t){t.write("while ("),this[e.test.type](e.test,t),t.write(") "),this[e.body.type](e.body,t)},DoWhileStatement(e,t){t.write("do "),this[e.body.type](e.body,t),t.write(" while ("),this[e.test.type](e.test,t),t.write(");")},ForStatement(e,t){if(t.write("for ("),e.init!=null){const{init:i}=e;i.type[0]==="V"?Me(t,i):this[i.type](i,t)}t.write("; "),e.test&&this[e.test.type](e.test,t),t.write("; "),e.update&&this[e.update.type](e.update,t),t.write(") "),this[e.body.type](e.body,t)},ForInStatement:tt=function(e,t){t.write(`for ${e.await?"await ":""}(`);const{left:i}=e;i.type[0]==="V"?Me(t,i):this[i.type](i,t),t.write(e.type[3]==="I"?" in ":" of "),this[e.right.type](e.right,t),t.write(") "),this[e.body.type](e.body,t)},ForOfStatement:tt,DebuggerStatement(e,t){t.write("debugger;",e)},FunctionDeclaration:it=function(e,t){t.write((e.async?"async ":"")+(e.generator?"function* ":"function ")+(e.id?e.id.name:""),e),ie(t,e.params),t.write(" "),this[e.body.type](e.body,t)},FunctionExpression:it,VariableDeclaration(e,t){Me(t,e),t.write(";")},VariableDeclarator(e,t){this[e.id.type](e.id,t),e.init!=null&&(t.write(" = "),this[e.init.type](e.init,t))},ClassDeclaration(e,t){if(t.write("class "+(e.id?`${e.id.name} `:""),e),e.superClass){t.write("extends ");const{superClass:i}=e,{type:r}=i,s=t.expressionsPrecedence[r];(r[0]!=="C"||r[1]!=="l"||r[5]!=="E")&&(s===G||s<t.expressionsPrecedence.ClassExpression)?(t.write("("),this[e.superClass.type](i,t),t.write(")")):this[i.type](i,t),t.write(" ")}this.ClassBody(e.body,t)},ImportDeclaration(e,t){t.write("import ");const{specifiers:i,attributes:r}=e,{length:s}=i;let a=0;if(s>0){for(;a<s;){a>0&&t.write(", ");const n=i[a],u=n.type[6];if(u==="D")t.write(n.local.name,n),a++;else if(u==="N")t.write("* as "+n.local.name,n),a++;else break}if(a<s){for(t.write("{");;){const n=i[a],{name:u}=n.imported;if(t.write(u,n),u!==n.local.name&&t.write(" as "+n.local.name),++a<s)t.write(", ");else break}t.write("}")}t.write(" from ")}if(this.Literal(e.source,t),r&&r.length>0){t.write(" with { ");for(let n=0;n<r.length;n++)this.ImportAttribute(r[n],t),n<r.length-1&&t.write(", ");t.write(" }")}t.write(";")},ImportAttribute(e,t){this.Identifier(e.key,t),t.write(": "),this.Literal(e.value,t)},ImportExpression(e,t){t.write("import("),this[e.source.type](e.source,t),t.write(")")},ExportDefaultDeclaration(e,t){t.write("export default "),this[e.declaration.type](e.declaration,t),t.expressionsPrecedence[e.declaration.type]!=null&&e.declaration.type[0]!=="F"&&t.write(";")},ExportNamedDeclaration(e,t){if(t.write("export "),e.declaration)this[e.declaration.type](e.declaration,t);else{t.write("{");const{specifiers:i}=e,{length:r}=i;if(r>0)for(let s=0;;){const a=i[s],{name:n}=a.local;if(t.write(n,a),n!==a.exported.name&&t.write(" as "+a.exported.name),++s<r)t.write(", ");else break}if(t.write("}"),e.source&&(t.write(" from "),this.Literal(e.source,t)),e.attributes&&e.attributes.length>0){t.write(" with { ");for(let s=0;s<e.attributes.length;s++)this.ImportAttribute(e.attributes[s],t),s<e.attributes.length-1&&t.write(", ");t.write(" }")}t.write(";")}},ExportAllDeclaration(e,t){if(e.exported!=null?t.write("export * as "+e.exported.name+" from "):t.write("export * from "),this.Literal(e.source,t),e.attributes&&e.attributes.length>0){t.write(" with { ");for(let i=0;i<e.attributes.length;i++)this.ImportAttribute(e.attributes[i],t),i<e.attributes.length-1&&t.write(", ");t.write(" }")}t.write(";")},MethodDefinition(e,t){e.static&&t.write("static ");const i=e.kind[0];(i==="g"||i==="s")&&t.write(e.kind+" "),e.value.async&&t.write("async "),e.value.generator&&t.write("*"),e.computed?(t.write("["),this[e.key.type](e.key,t),t.write("]")):this[e.key.type](e.key,t),ie(t,e.value.params),t.write(" "),this[e.value.body.type](e.value.body,t)},ClassExpression(e,t){this.ClassDeclaration(e,t)},ArrowFunctionExpression(e,t){t.write(e.async?"async ":"",e);const{params:i}=e;i!=null&&(i.length===1&&i[0].type[0]==="I"?t.write(i[0].name,i[0]):ie(t,e.params)),t.write(" => "),e.body.type[0]==="O"?(t.write("("),this.ObjectExpression(e.body,t),t.write(")")):this[e.body.type](e.body,t)},ThisExpression(e,t){t.write("this",e)},Super(e,t){t.write("super",e)},RestElement:rt=function(e,t){t.write("..."),this[e.argument.type](e.argument,t)},SpreadElement:rt,YieldExpression(e,t){t.write(e.delegate?"yield*":"yield"),e.argument&&(t.write(" "),this[e.argument.type](e.argument,t))},AwaitExpression(e,t){t.write("await ",e),be(t,e.argument,e)},TemplateLiteral(e,t){const{quasis:i,expressions:r}=e;t.write("`");const{length:s}=r;for(let n=0;n<s;n++){const u=r[n],p=i[n];t.write(p.value.raw,p),t.write("${"),this[u.type](u,t),t.write("}")}const a=i[i.length-1];t.write(a.value.raw,a),t.write("`")},TemplateElement(e,t){t.write(e.value.raw,e)},TaggedTemplateExpression(e,t){be(t,e.tag,e),this[e.quasi.type](e.quasi,t)},ArrayExpression:at=function(e,t){if(t.write("["),e.elements.length>0){const{elements:i}=e,{length:r}=i;for(let s=0;;){const a=i[s];if(a!=null&&this[a.type](a,t),++s<r)t.write(", ");else{a==null&&t.write(", ");break}}}t.write("]")},ArrayPattern:at,ObjectExpression(e,t){const i=t.indent.repeat(t.indentLevel++),{lineEnd:r,writeComments:s}=t,a=i+t.indent;if(t.write("{"),e.properties.length>0){t.write(r),s&&e.comments!=null&&V(t,e.comments,a,r);const n=","+r,{properties:u}=e,{length:p}=u;for(let c=0;;){const l=u[c];if(s&&l.comments!=null&&V(t,l.comments,a,r),t.write(a),this[l.type](l,t),++c<p)t.write(n);else break}t.write(r),s&&e.trailingComments!=null&&V(t,e.trailingComments,a,r),t.write(i+"}")}else s?e.comments!=null?(t.write(r),V(t,e.comments,a,r),e.trailingComments!=null&&V(t,e.trailingComments,a,r),t.write(i+"}")):e.trailingComments!=null?(t.write(r),V(t,e.trailingComments,a,r),t.write(i+"}")):t.write("}"):t.write("}");t.indentLevel--},Property(e,t){e.method||e.kind[0]!=="i"?this.MethodDefinition(e,t):(e.shorthand||(e.computed?(t.write("["),this[e.key.type](e.key,t),t.write("]")):this[e.key.type](e.key,t),t.write(": ")),this[e.value.type](e.value,t))},PropertyDefinition(e,t){if(e.static&&t.write("static "),e.computed&&t.write("["),this[e.key.type](e.key,t),e.computed&&t.write("]"),e.value==null){e.key.type[0]!=="F"&&t.write(";");return}t.write(" = "),this[e.value.type](e.value,t),t.write(";")},ObjectPattern(e,t){if(t.write("{"),e.properties.length>0){const{properties:i}=e,{length:r}=i;for(let s=0;this[i[s].type](i[s],t),++s<r;)t.write(", ")}t.write("}")},SequenceExpression(e,t){ie(t,e.expressions)},UnaryExpression(e,t){if(e.prefix){const{operator:i,argument:r,argument:{type:s}}=e;t.write(i);const a=Kt(t,r,e);!a&&(i.length>1||s[0]==="U"&&(s[1]==="n"||s[1]==="p")&&r.prefix&&r.operator[0]===i&&(i==="+"||i==="-"))&&t.write(" "),a?(t.write(i.length>1?" (":"("),this[s](r,t),t.write(")")):this[s](r,t)}else this[e.argument.type](e.argument,t),t.write(e.operator)},UpdateExpression(e,t){e.prefix?(t.write(e.operator),this[e.argument.type](e.argument,t)):(this[e.argument.type](e.argument,t),t.write(e.operator))},AssignmentExpression(e,t){this[e.left.type](e.left,t),t.write(" "+e.operator+" "),this[e.right.type](e.right,t)},AssignmentPattern(e,t){this[e.left.type](e.left,t),t.write(" = "),this[e.right.type](e.right,t)},BinaryExpression:st=function(e,t){const i=e.operator==="in";i&&t.write("("),be(t,e.left,e,!1),t.write(" "+e.operator+" "),be(t,e.right,e,!0),i&&t.write(")")},LogicalExpression:st,ConditionalExpression(e,t){const{test:i}=e,r=t.expressionsPrecedence[i.type];r===G||r<=t.expressionsPrecedence.ConditionalExpression?(t.write("("),this[i.type](i,t),t.write(")")):this[i.type](i,t),t.write(" ? "),this[e.consequent.type](e.consequent,t),t.write(" : "),this[e.alternate.type](e.alternate,t)},NewExpression(e,t){t.write("new ");const i=t.expressionsPrecedence[e.callee.type];i===G||i<t.expressionsPrecedence.CallExpression||Hi(e.callee)?(t.write("("),this[e.callee.type](e.callee,t),t.write(")")):this[e.callee.type](e.callee,t),ie(t,e.arguments)},CallExpression(e,t){const i=t.expressionsPrecedence[e.callee.type];i===G||i<t.expressionsPrecedence.CallExpression?(t.write("("),this[e.callee.type](e.callee,t),t.write(")")):this[e.callee.type](e.callee,t),e.optional&&t.write("?."),ie(t,e.arguments)},ChainExpression(e,t){this[e.expression.type](e.expression,t)},MemberExpression(e,t){const i=t.expressionsPrecedence[e.object.type];i===G||i<t.expressionsPrecedence.MemberExpression?(t.write("("),this[e.object.type](e.object,t),t.write(")")):this[e.object.type](e.object,t),e.computed?(e.optional&&t.write("?."),t.write("["),this[e.property.type](e.property,t),t.write("]")):(e.optional?t.write("?."):t.write("."),this[e.property.type](e.property,t))},MetaProperty(e,t){t.write(e.meta.name+"."+e.property.name,e)},Identifier(e,t){t.write(e.name,e)},PrivateIdentifier(e,t){t.write(`#${e.name}`,e)},Literal(e,t){e.raw!=null?t.write(e.raw,e):e.regex!=null?this.RegExpLiteral(e,t):e.bigint!=null?t.write(e.bigint+"n",e):t.write(Wi(e.value),e)},RegExpLiteral(e,t){const{regex:i}=e;t.write(`/${i.pattern}/${i.flags}`,e)}},$i={};class Qi{constructor(t){const i=t??$i;this.output="",i.output!=null?(this.output=i.output,this.write=this.writeToStream):this.output="",this.generator=i.generator!=null?i.generator:Ki,this.expressionsPrecedence=i.expressionsPrecedence!=null?i.expressionsPrecedence:Gi,this.indent=i.indent!=null?i.indent:" ",this.lineEnd=i.lineEnd!=null?i.lineEnd:`
25
+ `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};v.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
26
+ `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Z(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],a=parseInt(r,8);return a>255&&(r=r.slice(0,-1),a=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),(r!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(a)}return oe(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};v.readHexChar=function(e){var t=this.pos,i=this.readInt(16,e);return i===null&&this.invalidStringToken(t,"Bad character escape sequence"),i};v.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var a=this.fullCharCodeAtPos();if(ne(a,r))this.pos+=a<=65535?1:2;else if(a===92){this.containsEsc=!0,e+=this.input.slice(i,this.pos);var s=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var n=this.readCodePoint();(t?X:ne)(n,r)||this.invalidStringToken(s,"Invalid Unicode escape"),e+=Z(n),i=this.pos}else break;t=!1}return e+this.input.slice(i,this.pos)};v.readWord=function(){var e=this.readWord1(),t=o.name;return this.keywords.test(e)&&(t=je[e]),this.finishToken(t,e)};var Di="8.14.0";I.acorn={Parser:I,version:Di,defaultOptions:Me,Position:fe,SourceLocation:Ce,getLineInfo:mt,Node:ke,TokenType:S,tokTypes:o,keywordTypes:je,TokContext:G,tokContexts:k,isIdentifierChar:ne,isIdentifierStart:X,Token:ze,isNewLine:oe,lineBreak:q,lineBreakG:si,nonASCIIwhitespace:lt};function ji(e,t){return I.parse(e,t)}function $e(e,t,i,r,a){i||(i=m),function s(n,u,p){var c=p||n.type;i[c](n,u,s),t[c]&&t[c](n,u)}(e,r,a)}function N(e,t,i,r,a){var s=i?Oi(i,r||void 0):r;(function n(u,p,c){s[c||u.type](u,p,n)})(e,t,a)}function Oi(e,t){var i=Object.create(t||m);for(var r in e)i[r]=e[r];return i}function He(e,t,i){i(e,t)}function ae(e,t,i){}var m={};m.Program=m.BlockStatement=m.StaticBlock=function(e,t,i){for(var r=0,a=e.body;r<a.length;r+=1){var s=a[r];i(s,t,"Statement")}};m.Statement=He;m.EmptyStatement=ae;m.ExpressionStatement=m.ParenthesizedExpression=m.ChainExpression=function(e,t,i){return i(e.expression,t,"Expression")};m.IfStatement=function(e,t,i){i(e.test,t,"Expression"),i(e.consequent,t,"Statement"),e.alternate&&i(e.alternate,t,"Statement")};m.LabeledStatement=function(e,t,i){return i(e.body,t,"Statement")};m.BreakStatement=m.ContinueStatement=ae;m.WithStatement=function(e,t,i){i(e.object,t,"Expression"),i(e.body,t,"Statement")};m.SwitchStatement=function(e,t,i){i(e.discriminant,t,"Expression");for(var r=0,a=e.cases;r<a.length;r+=1){var s=a[r];i(s,t)}};m.SwitchCase=function(e,t,i){e.test&&i(e.test,t,"Expression");for(var r=0,a=e.consequent;r<a.length;r+=1){var s=a[r];i(s,t,"Statement")}};m.ReturnStatement=m.YieldExpression=m.AwaitExpression=function(e,t,i){e.argument&&i(e.argument,t,"Expression")};m.ThrowStatement=m.SpreadElement=function(e,t,i){return i(e.argument,t,"Expression")};m.TryStatement=function(e,t,i){i(e.block,t,"Statement"),e.handler&&i(e.handler,t),e.finalizer&&i(e.finalizer,t,"Statement")};m.CatchClause=function(e,t,i){e.param&&i(e.param,t,"Pattern"),i(e.body,t,"Statement")};m.WhileStatement=m.DoWhileStatement=function(e,t,i){i(e.test,t,"Expression"),i(e.body,t,"Statement")};m.ForStatement=function(e,t,i){e.init&&i(e.init,t,"ForInit"),e.test&&i(e.test,t,"Expression"),e.update&&i(e.update,t,"Expression"),i(e.body,t,"Statement")};m.ForInStatement=m.ForOfStatement=function(e,t,i){i(e.left,t,"ForInit"),i(e.right,t,"Expression"),i(e.body,t,"Statement")};m.ForInit=function(e,t,i){e.type==="VariableDeclaration"?i(e,t):i(e,t,"Expression")};m.DebuggerStatement=ae;m.FunctionDeclaration=function(e,t,i){return i(e,t,"Function")};m.VariableDeclaration=function(e,t,i){for(var r=0,a=e.declarations;r<a.length;r+=1){var s=a[r];i(s,t)}};m.VariableDeclarator=function(e,t,i){i(e.id,t,"Pattern"),e.init&&i(e.init,t,"Expression")};m.Function=function(e,t,i){e.id&&i(e.id,t,"Pattern");for(var r=0,a=e.params;r<a.length;r+=1){var s=a[r];i(s,t,"Pattern")}i(e.body,t,e.expression?"Expression":"Statement")};m.Pattern=function(e,t,i){e.type==="Identifier"?i(e,t,"VariablePattern"):e.type==="MemberExpression"?i(e,t,"MemberPattern"):i(e,t)};m.VariablePattern=ae;m.MemberPattern=He;m.RestElement=function(e,t,i){return i(e.argument,t,"Pattern")};m.ArrayPattern=function(e,t,i){for(var r=0,a=e.elements;r<a.length;r+=1){var s=a[r];s&&i(s,t,"Pattern")}};m.ObjectPattern=function(e,t,i){for(var r=0,a=e.properties;r<a.length;r+=1){var s=a[r];s.type==="Property"?(s.computed&&i(s.key,t,"Expression"),i(s.value,t,"Pattern")):s.type==="RestElement"&&i(s.argument,t,"Pattern")}};m.Expression=He;m.ThisExpression=m.Super=m.MetaProperty=ae;m.ArrayExpression=function(e,t,i){for(var r=0,a=e.elements;r<a.length;r+=1){var s=a[r];s&&i(s,t,"Expression")}};m.ObjectExpression=function(e,t,i){for(var r=0,a=e.properties;r<a.length;r+=1){var s=a[r];i(s,t)}};m.FunctionExpression=m.ArrowFunctionExpression=m.FunctionDeclaration;m.SequenceExpression=function(e,t,i){for(var r=0,a=e.expressions;r<a.length;r+=1){var s=a[r];i(s,t,"Expression")}};m.TemplateLiteral=function(e,t,i){for(var r=0,a=e.quasis;r<a.length;r+=1){var s=a[r];i(s,t)}for(var n=0,u=e.expressions;n<u.length;n+=1){var p=u[n];i(p,t,"Expression")}};m.TemplateElement=ae;m.UnaryExpression=m.UpdateExpression=function(e,t,i){i(e.argument,t,"Expression")};m.BinaryExpression=m.LogicalExpression=function(e,t,i){i(e.left,t,"Expression"),i(e.right,t,"Expression")};m.AssignmentExpression=m.AssignmentPattern=function(e,t,i){i(e.left,t,"Pattern"),i(e.right,t,"Expression")};m.ConditionalExpression=function(e,t,i){i(e.test,t,"Expression"),i(e.consequent,t,"Expression"),i(e.alternate,t,"Expression")};m.NewExpression=m.CallExpression=function(e,t,i){if(i(e.callee,t,"Expression"),e.arguments)for(var r=0,a=e.arguments;r<a.length;r+=1){var s=a[r];i(s,t,"Expression")}};m.MemberExpression=function(e,t,i){i(e.object,t,"Expression"),e.computed&&i(e.property,t,"Expression")};m.ExportNamedDeclaration=m.ExportDefaultDeclaration=function(e,t,i){e.declaration&&i(e.declaration,t,e.type==="ExportNamedDeclaration"||e.declaration.id?"Statement":"Expression"),e.source&&i(e.source,t,"Expression")};m.ExportAllDeclaration=function(e,t,i){e.exported&&i(e.exported,t),i(e.source,t,"Expression")};m.ImportDeclaration=function(e,t,i){for(var r=0,a=e.specifiers;r<a.length;r+=1){var s=a[r];i(s,t)}i(e.source,t,"Expression")};m.ImportExpression=function(e,t,i){i(e.source,t,"Expression")};m.ImportSpecifier=m.ImportDefaultSpecifier=m.ImportNamespaceSpecifier=m.Identifier=m.PrivateIdentifier=m.Literal=ae;m.TaggedTemplateExpression=function(e,t,i){i(e.tag,t,"Expression"),i(e.quasi,t,"Expression")};m.ClassDeclaration=m.ClassExpression=function(e,t,i){return i(e,t,"Class")};m.Class=function(e,t,i){e.id&&i(e.id,t,"Pattern"),e.superClass&&i(e.superClass,t,"Expression"),i(e.body,t)};m.ClassBody=function(e,t,i){for(var r=0,a=e.body;r<a.length;r+=1){var s=a[r];i(s,t)}};m.MethodDefinition=m.PropertyDefinition=m.Property=function(e,t,i){e.computed&&i(e.key,t,"Expression"),e.value&&i(e.value,t,"Expression")};const{stringify:Fi}=JSON;if(!String.prototype.repeat)throw new Error("String.prototype.repeat is undefined, see https://github.com/davidbonnet/astring#installation");if(!String.prototype.endsWith)throw new Error("String.prototype.endsWith is undefined, see https://github.com/davidbonnet/astring#installation");const ge={"||":2,"??":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,instanceof:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"%":12,"/":12,"**":13},z=17,Ui={ArrayExpression:20,TaggedTemplateExpression:20,ThisExpression:20,Identifier:20,PrivateIdentifier:20,Literal:18,TemplateLiteral:20,Super:20,SequenceExpression:20,MemberExpression:19,ChainExpression:19,CallExpression:19,NewExpression:19,ArrowFunctionExpression:z,ClassExpression:z,FunctionExpression:z,ObjectExpression:z,UpdateExpression:16,UnaryExpression:15,AwaitExpression:15,BinaryExpression:14,LogicalExpression:13,ConditionalExpression:4,AssignmentExpression:3,YieldExpression:2,RestElement:1};function se(e,t){const{generator:i}=e;if(e.write("("),t!=null&&t.length>0){i[t[0].type](t[0],e);const{length:r}=t;for(let a=1;a<r;a++){const s=t[a];e.write(", "),i[s.type](s,e)}}e.write(")")}function zt(e,t,i,r){const a=e.expressionsPrecedence[t.type];if(a===z)return!0;const s=e.expressionsPrecedence[i.type];return a!==s?!r&&a===15&&s===14&&i.operator==="**"||a<s:a!==13&&a!==14?!1:t.operator==="**"&&i.operator==="**"?!r:a===13&&s===13&&(t.operator==="??"||i.operator==="??")?!0:r?ge[t.operator]<=ge[i.operator]:ge[t.operator]<ge[i.operator]}function be(e,t,i,r){const{generator:a}=e;zt(e,t,i,r)?(e.write("("),a[t.type](t,e),e.write(")")):a[t.type](t,e)}function qi(e,t,i,r){const a=t.split(`
27
+ `),s=a.length-1;if(e.write(a[0].trim()),s>0){e.write(r);for(let n=1;n<s;n++)e.write(i+a[n].trim()+r);e.write(i+a[s].trim())}}function V(e,t,i,r){const{length:a}=t;for(let s=0;s<a;s++){const n=t[s];e.write(i),n.type[0]==="L"?e.write("// "+n.value.trim()+`
28
+ `,n):(e.write("/*"),qi(e,n.value,i,r),e.write("*/"+r))}}function Wi(e){let t=e;for(;t!=null;){const{type:i}=t;if(i[0]==="C"&&i[1]==="a")return!0;if(i[0]==="M"&&i[1]==="e"&&i[2]==="m")t=t.object;else return!1}}function Ve(e,t){const{generator:i}=e,{declarations:r}=t;e.write(t.kind+" ");const{length:a}=r;if(a>0){i.VariableDeclarator(r[0],e);for(let s=1;s<a;s++)e.write(", "),i.VariableDeclarator(r[s],e)}}let tt,it,rt,at,st,nt;const Gi={Program(e,t){const i=t.indent.repeat(t.indentLevel),{lineEnd:r,writeComments:a}=t;a&&e.comments!=null&&V(t,e.comments,i,r);const s=e.body,{length:n}=s;for(let u=0;u<n;u++){const p=s[u];a&&p.comments!=null&&V(t,p.comments,i,r),t.write(i),this[p.type](p,t),t.write(r)}a&&e.trailingComments!=null&&V(t,e.trailingComments,i,r)},BlockStatement:nt=function(e,t){const i=t.indent.repeat(t.indentLevel++),{lineEnd:r,writeComments:a}=t,s=i+t.indent;t.write("{");const n=e.body;if(n!=null&&n.length>0){t.write(r),a&&e.comments!=null&&V(t,e.comments,s,r);const{length:u}=n;for(let p=0;p<u;p++){const c=n[p];a&&c.comments!=null&&V(t,c.comments,s,r),t.write(s),this[c.type](c,t),t.write(r)}t.write(i)}else a&&e.comments!=null&&(t.write(r),V(t,e.comments,s,r),t.write(i));a&&e.trailingComments!=null&&V(t,e.trailingComments,s,r),t.write("}"),t.indentLevel--},ClassBody:nt,StaticBlock(e,t){t.write("static "),this.BlockStatement(e,t)},EmptyStatement(e,t){t.write(";")},ExpressionStatement(e,t){const i=t.expressionsPrecedence[e.expression.type];i===z||i===3&&e.expression.left.type[0]==="O"?(t.write("("),this[e.expression.type](e.expression,t),t.write(")")):this[e.expression.type](e.expression,t),t.write(";")},IfStatement(e,t){t.write("if ("),this[e.test.type](e.test,t),t.write(") "),this[e.consequent.type](e.consequent,t),e.alternate!=null&&(t.write(" else "),this[e.alternate.type](e.alternate,t))},LabeledStatement(e,t){this[e.label.type](e.label,t),t.write(": "),this[e.body.type](e.body,t)},BreakStatement(e,t){t.write("break"),e.label!=null&&(t.write(" "),this[e.label.type](e.label,t)),t.write(";")},ContinueStatement(e,t){t.write("continue"),e.label!=null&&(t.write(" "),this[e.label.type](e.label,t)),t.write(";")},WithStatement(e,t){t.write("with ("),this[e.object.type](e.object,t),t.write(") "),this[e.body.type](e.body,t)},SwitchStatement(e,t){const i=t.indent.repeat(t.indentLevel++),{lineEnd:r,writeComments:a}=t;t.indentLevel++;const s=i+t.indent,n=s+t.indent;t.write("switch ("),this[e.discriminant.type](e.discriminant,t),t.write(") {"+r);const{cases:u}=e,{length:p}=u;for(let c=0;c<p;c++){const l=u[c];a&&l.comments!=null&&V(t,l.comments,s,r),l.test?(t.write(s+"case "),this[l.test.type](l.test,t),t.write(":"+r)):t.write(s+"default:"+r);const{consequent:f}=l,{length:h}=f;for(let x=0;x<h;x++){const g=f[x];a&&g.comments!=null&&V(t,g.comments,n,r),t.write(n),this[g.type](g,t),t.write(r)}}t.indentLevel-=2,t.write(i+"}")},ReturnStatement(e,t){t.write("return"),e.argument&&(t.write(" "),this[e.argument.type](e.argument,t)),t.write(";")},ThrowStatement(e,t){t.write("throw "),this[e.argument.type](e.argument,t),t.write(";")},TryStatement(e,t){if(t.write("try "),this[e.block.type](e.block,t),e.handler){const{handler:i}=e;i.param==null?t.write(" catch "):(t.write(" catch ("),this[i.param.type](i.param,t),t.write(") ")),this[i.body.type](i.body,t)}e.finalizer&&(t.write(" finally "),this[e.finalizer.type](e.finalizer,t))},WhileStatement(e,t){t.write("while ("),this[e.test.type](e.test,t),t.write(") "),this[e.body.type](e.body,t)},DoWhileStatement(e,t){t.write("do "),this[e.body.type](e.body,t),t.write(" while ("),this[e.test.type](e.test,t),t.write(");")},ForStatement(e,t){if(t.write("for ("),e.init!=null){const{init:i}=e;i.type[0]==="V"?Ve(t,i):this[i.type](i,t)}t.write("; "),e.test&&this[e.test.type](e.test,t),t.write("; "),e.update&&this[e.update.type](e.update,t),t.write(") "),this[e.body.type](e.body,t)},ForInStatement:tt=function(e,t){t.write(`for ${e.await?"await ":""}(`);const{left:i}=e;i.type[0]==="V"?Ve(t,i):this[i.type](i,t),t.write(e.type[3]==="I"?" in ":" of "),this[e.right.type](e.right,t),t.write(") "),this[e.body.type](e.body,t)},ForOfStatement:tt,DebuggerStatement(e,t){t.write("debugger;",e)},FunctionDeclaration:it=function(e,t){t.write((e.async?"async ":"")+(e.generator?"function* ":"function ")+(e.id?e.id.name:""),e),se(t,e.params),t.write(" "),this[e.body.type](e.body,t)},FunctionExpression:it,VariableDeclaration(e,t){Ve(t,e),t.write(";")},VariableDeclarator(e,t){this[e.id.type](e.id,t),e.init!=null&&(t.write(" = "),this[e.init.type](e.init,t))},ClassDeclaration(e,t){if(t.write("class "+(e.id?`${e.id.name} `:""),e),e.superClass){t.write("extends ");const{superClass:i}=e,{type:r}=i,a=t.expressionsPrecedence[r];(r[0]!=="C"||r[1]!=="l"||r[5]!=="E")&&(a===z||a<t.expressionsPrecedence.ClassExpression)?(t.write("("),this[e.superClass.type](i,t),t.write(")")):this[i.type](i,t),t.write(" ")}this.ClassBody(e.body,t)},ImportDeclaration(e,t){t.write("import ");const{specifiers:i,attributes:r}=e,{length:a}=i;let s=0;if(a>0){for(;s<a;){s>0&&t.write(", ");const n=i[s],u=n.type[6];if(u==="D")t.write(n.local.name,n),s++;else if(u==="N")t.write("* as "+n.local.name,n),s++;else break}if(s<a){for(t.write("{");;){const n=i[s],{name:u}=n.imported;if(t.write(u,n),u!==n.local.name&&t.write(" as "+n.local.name),++s<a)t.write(", ");else break}t.write("}")}t.write(" from ")}if(this.Literal(e.source,t),r&&r.length>0){t.write(" with { ");for(let n=0;n<r.length;n++)this.ImportAttribute(r[n],t),n<r.length-1&&t.write(", ");t.write(" }")}t.write(";")},ImportAttribute(e,t){this.Identifier(e.key,t),t.write(": "),this.Literal(e.value,t)},ImportExpression(e,t){t.write("import("),this[e.source.type](e.source,t),t.write(")")},ExportDefaultDeclaration(e,t){t.write("export default "),this[e.declaration.type](e.declaration,t),t.expressionsPrecedence[e.declaration.type]!=null&&e.declaration.type[0]!=="F"&&t.write(";")},ExportNamedDeclaration(e,t){if(t.write("export "),e.declaration)this[e.declaration.type](e.declaration,t);else{t.write("{");const{specifiers:i}=e,{length:r}=i;if(r>0)for(let a=0;;){const s=i[a],{name:n}=s.local;if(t.write(n,s),n!==s.exported.name&&t.write(" as "+s.exported.name),++a<r)t.write(", ");else break}if(t.write("}"),e.source&&(t.write(" from "),this.Literal(e.source,t)),e.attributes&&e.attributes.length>0){t.write(" with { ");for(let a=0;a<e.attributes.length;a++)this.ImportAttribute(e.attributes[a],t),a<e.attributes.length-1&&t.write(", ");t.write(" }")}t.write(";")}},ExportAllDeclaration(e,t){if(e.exported!=null?t.write("export * as "+e.exported.name+" from "):t.write("export * from "),this.Literal(e.source,t),e.attributes&&e.attributes.length>0){t.write(" with { ");for(let i=0;i<e.attributes.length;i++)this.ImportAttribute(e.attributes[i],t),i<e.attributes.length-1&&t.write(", ");t.write(" }")}t.write(";")},MethodDefinition(e,t){e.static&&t.write("static ");const i=e.kind[0];(i==="g"||i==="s")&&t.write(e.kind+" "),e.value.async&&t.write("async "),e.value.generator&&t.write("*"),e.computed?(t.write("["),this[e.key.type](e.key,t),t.write("]")):this[e.key.type](e.key,t),se(t,e.value.params),t.write(" "),this[e.value.body.type](e.value.body,t)},ClassExpression(e,t){this.ClassDeclaration(e,t)},ArrowFunctionExpression(e,t){t.write(e.async?"async ":"",e);const{params:i}=e;i!=null&&(i.length===1&&i[0].type[0]==="I"?t.write(i[0].name,i[0]):se(t,e.params)),t.write(" => "),e.body.type[0]==="O"?(t.write("("),this.ObjectExpression(e.body,t),t.write(")")):this[e.body.type](e.body,t)},ThisExpression(e,t){t.write("this",e)},Super(e,t){t.write("super",e)},RestElement:rt=function(e,t){t.write("..."),this[e.argument.type](e.argument,t)},SpreadElement:rt,YieldExpression(e,t){t.write(e.delegate?"yield*":"yield"),e.argument&&(t.write(" "),this[e.argument.type](e.argument,t))},AwaitExpression(e,t){t.write("await ",e),be(t,e.argument,e)},TemplateLiteral(e,t){const{quasis:i,expressions:r}=e;t.write("`");const{length:a}=r;for(let n=0;n<a;n++){const u=r[n],p=i[n];t.write(p.value.raw,p),t.write("${"),this[u.type](u,t),t.write("}")}const s=i[i.length-1];t.write(s.value.raw,s),t.write("`")},TemplateElement(e,t){t.write(e.value.raw,e)},TaggedTemplateExpression(e,t){be(t,e.tag,e),this[e.quasi.type](e.quasi,t)},ArrayExpression:st=function(e,t){if(t.write("["),e.elements.length>0){const{elements:i}=e,{length:r}=i;for(let a=0;;){const s=i[a];if(s!=null&&this[s.type](s,t),++a<r)t.write(", ");else{s==null&&t.write(", ");break}}}t.write("]")},ArrayPattern:st,ObjectExpression(e,t){const i=t.indent.repeat(t.indentLevel++),{lineEnd:r,writeComments:a}=t,s=i+t.indent;if(t.write("{"),e.properties.length>0){t.write(r),a&&e.comments!=null&&V(t,e.comments,s,r);const n=","+r,{properties:u}=e,{length:p}=u;for(let c=0;;){const l=u[c];if(a&&l.comments!=null&&V(t,l.comments,s,r),t.write(s),this[l.type](l,t),++c<p)t.write(n);else break}t.write(r),a&&e.trailingComments!=null&&V(t,e.trailingComments,s,r),t.write(i+"}")}else a?e.comments!=null?(t.write(r),V(t,e.comments,s,r),e.trailingComments!=null&&V(t,e.trailingComments,s,r),t.write(i+"}")):e.trailingComments!=null?(t.write(r),V(t,e.trailingComments,s,r),t.write(i+"}")):t.write("}"):t.write("}");t.indentLevel--},Property(e,t){e.method||e.kind[0]!=="i"?this.MethodDefinition(e,t):(e.shorthand||(e.computed?(t.write("["),this[e.key.type](e.key,t),t.write("]")):this[e.key.type](e.key,t),t.write(": ")),this[e.value.type](e.value,t))},PropertyDefinition(e,t){if(e.static&&t.write("static "),e.computed&&t.write("["),this[e.key.type](e.key,t),e.computed&&t.write("]"),e.value==null){e.key.type[0]!=="F"&&t.write(";");return}t.write(" = "),this[e.value.type](e.value,t),t.write(";")},ObjectPattern(e,t){if(t.write("{"),e.properties.length>0){const{properties:i}=e,{length:r}=i;for(let a=0;this[i[a].type](i[a],t),++a<r;)t.write(", ")}t.write("}")},SequenceExpression(e,t){se(t,e.expressions)},UnaryExpression(e,t){if(e.prefix){const{operator:i,argument:r,argument:{type:a}}=e;t.write(i);const s=zt(t,r,e);!s&&(i.length>1||a[0]==="U"&&(a[1]==="n"||a[1]==="p")&&r.prefix&&r.operator[0]===i&&(i==="+"||i==="-"))&&t.write(" "),s?(t.write(i.length>1?" (":"("),this[a](r,t),t.write(")")):this[a](r,t)}else this[e.argument.type](e.argument,t),t.write(e.operator)},UpdateExpression(e,t){e.prefix?(t.write(e.operator),this[e.argument.type](e.argument,t)):(this[e.argument.type](e.argument,t),t.write(e.operator))},AssignmentExpression(e,t){this[e.left.type](e.left,t),t.write(" "+e.operator+" "),this[e.right.type](e.right,t)},AssignmentPattern(e,t){this[e.left.type](e.left,t),t.write(" = "),this[e.right.type](e.right,t)},BinaryExpression:at=function(e,t){const i=e.operator==="in";i&&t.write("("),be(t,e.left,e,!1),t.write(" "+e.operator+" "),be(t,e.right,e,!0),i&&t.write(")")},LogicalExpression:at,ConditionalExpression(e,t){const{test:i}=e,r=t.expressionsPrecedence[i.type];r===z||r<=t.expressionsPrecedence.ConditionalExpression?(t.write("("),this[i.type](i,t),t.write(")")):this[i.type](i,t),t.write(" ? "),this[e.consequent.type](e.consequent,t),t.write(" : "),this[e.alternate.type](e.alternate,t)},NewExpression(e,t){t.write("new ");const i=t.expressionsPrecedence[e.callee.type];i===z||i<t.expressionsPrecedence.CallExpression||Wi(e.callee)?(t.write("("),this[e.callee.type](e.callee,t),t.write(")")):this[e.callee.type](e.callee,t),se(t,e.arguments)},CallExpression(e,t){const i=t.expressionsPrecedence[e.callee.type];i===z||i<t.expressionsPrecedence.CallExpression?(t.write("("),this[e.callee.type](e.callee,t),t.write(")")):this[e.callee.type](e.callee,t),e.optional&&t.write("?."),se(t,e.arguments)},ChainExpression(e,t){this[e.expression.type](e.expression,t)},MemberExpression(e,t){const i=t.expressionsPrecedence[e.object.type];i===z||i<t.expressionsPrecedence.MemberExpression?(t.write("("),this[e.object.type](e.object,t),t.write(")")):this[e.object.type](e.object,t),e.computed?(e.optional&&t.write("?."),t.write("["),this[e.property.type](e.property,t),t.write("]")):(e.optional?t.write("?."):t.write("."),this[e.property.type](e.property,t))},MetaProperty(e,t){t.write(e.meta.name+"."+e.property.name,e)},Identifier(e,t){t.write(e.name,e)},PrivateIdentifier(e,t){t.write(`#${e.name}`,e)},Literal(e,t){e.raw!=null?t.write(e.raw,e):e.regex!=null?this.RegExpLiteral(e,t):e.bigint!=null?t.write(e.bigint+"n",e):t.write(Fi(e.value),e)},RegExpLiteral(e,t){const{regex:i}=e;t.write(`/${i.pattern}/${i.flags}`,e)}},zi={};class $i{constructor(t){const i=t??zi;this.output="",i.output!=null?(this.output=i.output,this.write=this.writeToStream):this.output="",this.generator=i.generator!=null?i.generator:Gi,this.expressionsPrecedence=i.expressionsPrecedence!=null?i.expressionsPrecedence:Ui,this.indent=i.indent!=null?i.indent:" ",this.lineEnd=i.lineEnd!=null?i.lineEnd:`
29
29
  `,this.indentLevel=i.startingIndentLevel!=null?i.startingIndentLevel:0,this.writeComments=i.comments?i.comments:!1,i.sourceMap!=null&&(this.write=i.output==null?this.writeAndMap:this.writeToStreamAndMap,this.sourceMap=i.sourceMap,this.line=1,this.column=0,this.lineEndSize=this.lineEnd.split(`
30
- `).length-1,this.mapping={original:null,generated:this,name:void 0,source:i.sourceMap.file||i.sourceMap._file})}write(t){this.output+=t}writeToStream(t){this.output.write(t)}writeAndMap(t,i){this.output+=t,this.map(t,i)}writeToStreamAndMap(t,i){this.output.write(t),this.map(t,i)}map(t,i){if(i!=null){const{type:a}=i;if(a[0]==="L"&&a[2]==="n"){this.column=0,this.line++;return}if(i.loc!=null){const{mapping:n}=this;n.original=i.loc.start,n.name=i.name,this.sourceMap.addMapping(n)}if(a[0]==="T"&&a[8]==="E"||a[0]==="L"&&a[1]==="i"&&typeof i.value=="string"){const{length:n}=t;let{column:u,line:p}=this;for(let c=0;c<n;c++)t[c]===`
31
- `?(u=0,p++):u++;this.column=u,this.line=p;return}}const{length:r}=t,{lineEnd:s}=this;r>0&&(this.lineEndSize>0&&(s.length===1?t[r-1]===s:t.endsWith(s))?(this.line+=this.lineEndSize,this.column=0):this.column+=r)}toString(){return this.output}}function Yi(e,t){const i=new Qi(t);return i.generator[e.type](e,i),i.output}class Xi{scopes=[];scopeTypes=[];scopeCounts=new Map;contextBoundVars=new Set;arrayPatternElements=new Set;rootParams=new Set;varKinds=new Map;loopVars=new Set;loopVarNames=new Map;paramIdCounter=0;cacheIdCounter=0;tempVarCounter=0;get nextParamIdArg(){return{type:"Identifier",name:`'p${this.paramIdCounter++}'`}}get nextCacheIdArg(){return{type:"Identifier",name:`'cache_${this.cacheIdCounter++}'`}}constructor(){this.pushScope("glb")}pushScope(t){this.scopes.push(new Map),this.scopeTypes.push(t),this.scopeCounts.set(t,(this.scopeCounts.get(t)||0)+1)}popScope(){this.scopes.pop(),this.scopeTypes.pop()}getCurrentScopeType(){return this.scopeTypes[this.scopeTypes.length-1]}getCurrentScopeCount(){return this.scopeCounts.get(this.getCurrentScopeType())||1}addContextBoundVar(t,i=!1){this.contextBoundVars.add(t),i&&this.rootParams.add(t)}addArrayPatternElement(t){this.arrayPatternElements.add(t)}isContextBound(t){return this.contextBoundVars.has(t)}isArrayPatternElement(t){return this.arrayPatternElements.has(t)}isRootParam(t){return this.rootParams.has(t)}addLoopVariable(t,i){this.loopVars.add(t),this.loopVarNames.set(t,i)}getLoopVariableName(t){return this.loopVarNames.get(t)}isLoopVariable(t){return this.loopVars.has(t)}addVariable(t,i){if(this.isContextBound(t))return t;const r=this.scopes[this.scopes.length-1],s=this.scopeTypes[this.scopeTypes.length-1],a=this.scopeCounts.get(s)||1,n=`${s}${a}_${t}`;return r.set(t,n),this.varKinds.set(n,i),n}getVariable(t){if(this.loopVars.has(t)){const i=this.loopVarNames.get(t);if(i)return[i,"let"]}if(this.isContextBound(t))return[t,"let"];for(let i=this.scopes.length-1;i>=0;i--){const r=this.scopes[i];if(r.has(t)){const s=r.get(t),a=this.varKinds.get(s)||"let";return[s,a]}}return[t,"let"]}generateTempVar(){return`temp_${++this.tempVarCounter}`}}//!!!Warning!!! this code is not clean, it was initially written as a PoC then used as transpiler for PineTS
32
- const A="$",Oe={type:"Identifier",name:"undefined"};function X(e,t){if(e.computed&&e.property.type==="Identifier"){if(t.isLoopVariable(e.property.name))return;if(!t.isContextBound(e.property.name)){const[i,r]=t.getVariable(e.property.name);e.property={type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:r},computed:!1},property:{type:"Identifier",name:i},computed:!1},e.property={type:"MemberExpression",object:e.property,property:{type:"Literal",value:0},computed:!0}}}if(e.computed&&e.object.type==="Identifier"){if(t.isLoopVariable(e.object.name))return;if(!t.isContextBound(e.object.name)){const[i,r]=t.getVariable(e.object.name);e.object={type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:r},computed:!1},property:{type:"Identifier",name:i},computed:!1}}if(e.property.type==="MemberExpression"){const i=e.property;i._indexTransformed||(X(i,t),i._indexTransformed=!0)}}}function z(e,t,i){if(e.object&&e.object.type==="Identifier"&&e.object.name==="Math")return;const r=i.getCurrentScopeType()=="if",s=i.getCurrentScopeType()=="els",a=i.getCurrentScopeType()=="for";!r&&!s&&!a&&e.object&&e.object.type==="Identifier"&&i.isContextBound(e.object.name)&&!i.isRootParam(e.object.name)||e._indexTransformed||(X(e,i),e._indexTransformed=!0)}function $e(e,t){e.declarations.forEach(i=>{i.init.name=="na"&&(i.init.name="NaN");const r=i.init&&i.init.type==="MemberExpression"&&i.init.object&&(i.init.object.name==="context"||i.init.object.name===A||i.init.object.name==="context2"),s=i.init&&i.init.type==="MemberExpression"&&i.init.object?.object&&(i.init.object.object.name==="context"||i.init.object.object.name===A||i.init.object.object.name==="context2"),a=i.init&&i.init.type==="ArrowFunctionExpression";if(r){i.id.name&&t.addContextBoundVar(i.id.name),i.id.properties&&i.id.properties.forEach(h=>{h.key.name&&t.addContextBoundVar(h.key.name)}),i.init.object.name=A;return}if(s){i.id.name&&t.addContextBoundVar(i.id.name),i.id.properties&&i.id.properties.forEach(h=>{h.key.name&&t.addContextBoundVar(h.key.name)}),i.init.object.object.name=A;return}a&&i.init.params.forEach(h=>{h.type==="Identifier"&&t.addContextBoundVar(h.name)});const n=t.addVariable(i.id.name,e.kind),u=e.kind;i.init&&!a&&(i.init.type==="CallExpression"&&i.init.callee.type==="MemberExpression"&&i.init.callee.object&&i.init.callee.object.type==="Identifier"&&t.isContextBound(i.init.callee.object.name)?D(i.init,t):N(i.init,{parent:i.init},{Identifier(h,b){h.parent=b.parent,F(h,t);const v=h.parent&&h.parent.type==="BinaryExpression",x=h.parent&&h.parent.type==="ConditionalExpression";h.type==="Identifier"&&(v||x)&&Object.assign(h,{type:"MemberExpression",object:{type:"Identifier",name:h.name},property:{type:"Literal",value:0},computed:!0})},CallExpression(h,b,v){h.callee.type==="Identifier"&&(h.callee.parent=h),h.arguments.forEach(x=>{x.type==="Identifier"&&(x.parent=h)}),D(h,t),h.arguments.forEach(x=>v(x,{parent:h}))},BinaryExpression(h,b,v){h.left.type==="Identifier"&&(h.left.parent=h),h.right.type==="Identifier"&&(h.right.parent=h),v(h.left,{parent:h}),v(h.right,{parent:h})},MemberExpression(h,b,v){h.object.type==="Identifier"&&(h.object.parent=h),h.property.type==="Identifier"&&(h.property.parent=h),X(h,t),h.object&&v(h.object,{parent:h})}}));const p={type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:u},computed:!1},property:{type:"Identifier",name:n},computed:!1},c=t.isArrayPatternElement(i.id.name),l=!c&&i.init&&i.init.type==="MemberExpression"&&i.init.computed&&i.init.property&&(i.init.property.type==="Literal"||i.init.property.type==="MemberExpression");i.init?.property?.type==="MemberExpression"&&(i.init.property._indexTransformed||(X(i.init.property,t),i.init.property._indexTransformed=!0));const d={type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:p,right:i.init?a||c?i.init:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:"init"},computed:!1},arguments:l?[p,i.init.object,i.init.property]:[p,i.init]}:{type:"Identifier",name:"undefined"}}};if(c){d.expression.right.object.property.name+=`?.[0][${i.init.property.value}]`;const h=d.expression.right.object;d.expression.right={type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:"init"},computed:!1},arguments:[p,h]}}a&&(t.pushScope("fn"),N(i.init.body,t,{BlockStatement(h,b,v){h.body.forEach(x=>v(x,b))},IfStatement(h,b,v){b.pushScope("if"),v(h.consequent,b),h.alternate&&(b.pushScope("els"),v(h.alternate,b),b.popScope()),b.popScope()},VariableDeclaration(h,b){$e(h,b)},Identifier(h,b){F(h,b)},AssignmentExpression(h,b){Qe(h,b)}}),t.popScope()),Object.assign(e,d)})}function F(e,t){if(e.name!==A){if(e.name==="Math"||e.name==="NaN"||e.name==="undefined"||e.name==="Infinity"||e.name==="null"||e.name.startsWith("'")&&e.name.endsWith("'")||e.name.startsWith('"')&&e.name.endsWith('"')||e.name.startsWith("`")&&e.name.endsWith("`")||t.isLoopVariable(e.name)||t.isContextBound(e.name)&&!t.isRootParam(e.name))return;const i=e.parent&&e.parent.type==="MemberExpression"&&e.parent.object===e&&t.isContextBound(e.name),r=e.parent&&e.parent.type==="CallExpression"&&e.parent.callee&&e.parent.callee.type==="MemberExpression"&&e.parent.callee.property.name==="param";e.parent&&e.parent.type==="AssignmentExpression"&&e.parent.left;const s=e.parent&&e.parent.type==="CallExpression"&&e.parent.callee&&e.parent.callee.type==="MemberExpression"&&t.isContextBound(e.parent.callee.object.name),a=e.parent&&e.parent.type==="MemberExpression"&&e.parent.computed,n=e.parent&&e.parent.type==="MemberExpression"&&e.parent.computed&&e.parent.property===e&&e.parent.parent&&e.parent.parent.type==="CallExpression"&&e.parent.parent.callee&&e.parent.parent.callee.type==="MemberExpression"&&t.isContextBound(e.parent.parent.callee.object.name),u=e.parent&&e.parent.type==="CallExpression"&&e.parent.callee===e;if(i||r||s||n||u){if(u)return;const[d,h]=t.getVariable(e.name);Object.assign(e,{type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:h},computed:!1},property:{type:"Identifier",name:d},computed:!1});return}const[p,c]=t.getVariable(e.name),l={type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:c},computed:!1},property:{type:"Identifier",name:p},computed:!1};!(e.parent&&e.parent.type==="MemberExpression"&&e.parent.computed&&e.parent.object===e)&&!a?Object.assign(e,{type:"MemberExpression",object:l,property:{type:"Literal",value:0},computed:!0}):Object.assign(e,l)}}function Qe(e,t){if(e.left.type==="Identifier"){const[i,r]=t.getVariable(e.left.name),s={type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:r},computed:!1},property:{type:"Identifier",name:i},computed:!1};e.left={type:"MemberExpression",object:s,property:{type:"Literal",value:0},computed:!0}}N(e.right,{parent:e.right,inNamespaceCall:!1},{Identifier(i,r,s){i.name=="na"&&(i.name="NaN"),i.parent=r.parent,F(i,t);const a=i.parent&&i.parent.type==="BinaryExpression",n=i.parent&&i.parent.type==="ConditionalExpression",u=t.isContextBound(i.name)&&!t.isRootParam(i.name),p=i.parent&&i.parent.type==="MemberExpression"&&i.parent.computed&&i.parent.object===i,c=i.parent&&i.parent._isParamCall,l=i.parent&&i.parent.type==="MemberExpression",d=i.name==="NaN";(u||n||a)&&(i.type==="MemberExpression"?X(i,t):i.type==="Identifier"&&!l&&!p&&!c&&!d&&ue(i))},MemberExpression(i,r,s){X(i,t),i.object&&s(i.object,{parent:i,inNamespaceCall:r.inNamespaceCall})},CallExpression(i,r,s){const a=i.callee&&i.callee.type==="MemberExpression"&&i.callee.object&&i.callee.object.type==="Identifier"&&t.isContextBound(i.callee.object.name);D(i,t),i.arguments.forEach(n=>s(n,{parent:i,inNamespaceCall:a||r.inNamespaceCall}))}})}function Zi(e,t,i=!1){e.params.forEach(r=>{r.type==="Identifier"&&t.addContextBoundVar(r.name,i)})}function $t(e,t){const i=t.getCurrentScopeType();if(e.argument){if(e.argument.type==="ArrayExpression")e.argument.elements=e.argument.elements.map(r=>{if(r.type==="Identifier"){if(t.isContextBound(r.name)&&!t.isRootParam(r.name))return{type:"MemberExpression",object:r,property:{type:"Literal",value:0},computed:!0};const[s,a]=t.getVariable(r.name);return{type:"MemberExpression",object:{type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:a},computed:!1},property:{type:"Identifier",name:s},computed:!1},property:{type:"Literal",value:0},computed:!0}}else if(r.type==="MemberExpression")return r.computed&&r.object.type==="Identifier"&&t.isContextBound(r.object.name)&&!t.isRootParam(r.object.name)||z(r,"",t),r;return r}),e.argument={type:"ArrayExpression",elements:[e.argument]};else if(e.argument.type==="BinaryExpression")N(e.argument,t,{Identifier(r,s){F(r,s),r.type==="Identifier"&&ue(r)},MemberExpression(r){z(r,"",t)}});else if(e.argument.type==="ObjectExpression")e.argument.properties=e.argument.properties.map(r=>{if(r.shorthand){const[s,a]=t.getVariable(r.value.name);return{type:"Property",key:{type:"Identifier",name:r.key.name},value:{type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:a},computed:!1},property:{type:"Identifier",name:s},computed:!1},kind:"init",method:!1,shorthand:!1,computed:!1}}return r});else if(e.argument.type==="Identifier"){const[r,s]=t.getVariable(e.argument.name);e.argument={type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:s},computed:!1},property:{type:"Identifier",name:r},computed:!1},e.argument={type:"MemberExpression",object:e.argument,property:{type:"Literal",value:0},computed:!0}}i==="fn"&&(e.argument={type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:"precision"}},arguments:[e.argument]})}}function he(e,t){if(e.type==="Identifier"){if(e.name==="na")return e.name="NaN",e;if(t.isLoopVariable(e.name))return e;if(t.isRootParam(e.name)){const[s,a]=t.getVariable(e.name);return{type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:a},computed:!1},property:{type:"Identifier",name:s},computed:!1}}if(t.isContextBound(e.name))return e;const[i,r]=t.getVariable(e.name);return{type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:r},computed:!1},property:{type:"Identifier",name:i},computed:!1}}return e}function Qt(e,t,i){const r=me(e.argument,t,i);return{type:"UnaryExpression",operator:e.operator,prefix:e.prefix,argument:r,start:e.start,end:e.end}}function me(e,t,i=""){switch(e.type){case"BinaryExpression":return Yt(e,t,i);case"MemberExpression":return{type:"MemberExpression",object:e.object.type==="Identifier"?he(e.object,t):e.object,property:e.property,computed:e.computed};case"Identifier":return t.isLoopVariable(e.name)||e.parent&&e.parent.type==="MemberExpression"&&e.parent.property===e?e:{type:"MemberExpression",object:he(e,t),property:{type:"Literal",value:0},computed:!0};case"UnaryExpression":return Qt(e,t,i)}return e}function Yt(e,t,i){const r=me(e.left,t,i),s=me(e.right,t,i),a={type:"BinaryExpression",operator:e.operator,left:r,right:s,start:e.start,end:e.end};return N(a,t,{CallExpression(n,u){n._transformed||D(n,u)},MemberExpression(n){z(n,"",t)}}),a}function Ji(e,t,i){const r=me(e.left,t,i),s=me(e.right,t,i),a={type:"LogicalExpression",operator:e.operator,left:r,right:s,start:e.start,end:e.end};return N(a,t,{CallExpression(n,u){n._transformed||D(n,u)}}),a}function er(e,t,i){return N(e,{parent:e,inNamespaceCall:!1},{Identifier(r,s,a){if(r.name=="NaN")return;if(r.name=="na"){r.name="NaN";return}r.parent=s.parent,F(r,t);const n=r.parent&&r.parent.type==="BinaryExpression";(r.parent&&r.parent.type==="ConditionalExpression"||n)&&(r.type==="MemberExpression"?X(r,t):r.type==="Identifier"&&ue(r))},MemberExpression(r,s,a){X(r,t),r.object&&a(r.object,{parent:r,inNamespaceCall:s.inNamespaceCall})},CallExpression(r,s,a){const n=r.callee&&r.callee.type==="MemberExpression"&&r.callee.object&&r.callee.object.type==="Identifier"&&t.isContextBound(r.callee.object.name);D(r,t),r.arguments.forEach(u=>a(u,{parent:r,inNamespaceCall:n||s.inNamespaceCall}))}}),{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:i},property:{type:"Identifier",name:"param"}},arguments:[e,Oe,t.nextParamIdArg],_transformed:!0,_isParamCall:!0}}function ot(e,t,i){switch(e?.type){case"BinaryExpression":e=Yt(e,i,t);break;case"LogicalExpression":e=Ji(e,i,t);break;case"ConditionalExpression":return er(e,i,t);case"UnaryExpression":e=Qt(e,i,t);break}if(e.type==="MemberExpression"&&e.computed&&e.property){const r=e.object.type==="Identifier"&&i.isContextBound(e.object.name)&&!i.isRootParam(e.object.name)?e.object:he(e.object,i),s=e.property.type==="Identifier"&&!i.isContextBound(e.property.name)&&!i.isLoopVariable(e.property.name)?he(e.property,i):e.property;return{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:t},property:{type:"Identifier",name:"param"},computed:!1},arguments:[r,s,i.nextParamIdArg],_transformed:!0,_isParamCall:!0}}if(e.type==="ObjectExpression"&&(e.properties=e.properties.map(r=>{if(r.value.name){const[s,a]=i.getVariable(r.value.name);return{type:"Property",key:{type:"Identifier",name:r.key.name},value:{type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:a},computed:!1},property:{type:"Identifier",name:s},computed:!1},kind:"init",method:!1,shorthand:!1,computed:!1}}return r})),e.type==="Identifier"){if(e.name==="na")return e.name="NaN",e;if(i.isContextBound(e.name)&&!i.isRootParam(e.name))return{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:t},property:{type:"Identifier",name:"param"},computed:!1},arguments:[e,Oe,i.nextParamIdArg],_transformed:!0,_isParamCall:!0}}return e?.type==="CallExpression"&&D(e,i),{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:t},property:{type:"Identifier",name:"param"},computed:!1},arguments:[e.type==="Identifier"?he(e,i):e,Oe,i.nextParamIdArg],_transformed:!0,_isParamCall:!0}}function D(e,t,i){if(!e._transformed){if(e.callee&&e.callee.type==="MemberExpression"&&e.callee.object&&e.callee.object.type==="Identifier"&&(t.isContextBound(e.callee.object.name)||e.callee.object.name==="math"||e.callee.object.name==="ta")){const r=e.callee.object.name;e.arguments=e.arguments.map(s=>s._isParamCall?s:ot(s,r,t)),e._transformed=!0}else e.callee&&e.callee.type==="Identifier"&&(e.arguments=e.arguments.map(r=>r._isParamCall?r:ot(r,A,t)),e._transformed=!0);e.arguments.forEach(r=>{N(r,t,{Identifier(s,a,n){s.parent=a.parent,F(s,t);const u=s.parent&&s.parent.type==="BinaryExpression";(s.parent&&s.parent.type==="ConditionalExpression"||u)&&(s.type==="MemberExpression"?X(s,t):s.type==="Identifier"&&ue(s))},CallExpression(s,a,n){s._transformed||D(s,a)},MemberExpression(s,a,n){z(s,"",t),s.object&&n(s.object,{parent:s,inNamespaceCall:a.inNamespaceCall})}})})}}function tr(e,t){e.params.forEach(i=>{i.type==="Identifier"&&t.addContextBoundVar(i.name,!1)}),e.body&&e.body.type==="BlockStatement"&&(t.pushScope("fn"),N(e.body,t,{BlockStatement(i,r,s){i.body.forEach(a=>s(a,r))},ReturnStatement(i,r){$t(i,r)},VariableDeclaration(i,r){$e(i,r)},Identifier(i,r){F(i,r)},CallExpression(i,r){D(i,r),i.arguments.forEach(s=>{s.type==="BinaryExpression"&&N(s,r,{CallExpression(a,n){D(a,n)},MemberExpression(a){z(a,"",r)}})})},MemberExpression(i){z(i,"",t)},AssignmentExpression(i,r){Qe(i,r)},ForStatement(i,r,s){Xt(i,r,s)},IfStatement(i,r,s){Zt(i,r,s)},BinaryExpression(i,r,s){N(i,r,{CallExpression(a,n){D(a,n)},MemberExpression(a){z(a,"",r)}})}}),t.popScope())}function ue(e,t){Object.assign(e,{type:"MemberExpression",object:{type:"Identifier",name:e.name,start:e.start,end:e.end},property:{type:"Literal",value:0},computed:!0,_indexTransformed:!0})}function Xt(e,t,i){if(e.init&&e.init.type==="VariableDeclaration"){const r=e.init.declarations[0],s=r.id.name;t.addLoopVariable(s,s),e.init={type:"VariableDeclaration",kind:e.init.kind,declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:s},init:r.init}]},r.init&&N(r.init,t,{Identifier(a,n){t.isLoopVariable(a.name)||(t.pushScope("for"),F(a,n),t.popScope())},MemberExpression(a){t.pushScope("for"),z(a,"",t),t.popScope()}})}e.test&&N(e.test,t,{Identifier(r,s){!t.isLoopVariable(r.name)&&!r.computed&&(t.pushScope("for"),F(r,s),r.type==="Identifier"&&(r.computed=!0,ue(r)),t.popScope())},MemberExpression(r){t.pushScope("for"),z(r,"",t),t.popScope()}}),e.update&&N(e.update,t,{Identifier(r,s){t.isLoopVariable(r.name)||(t.pushScope("for"),F(r,s),t.popScope())}}),t.pushScope("for"),i(e.body,t),t.popScope()}function ir(e,t){N(e,t,{MemberExpression(i){z(i,"",t)},CallExpression(i,r){D(i,r)},Identifier(i,r){F(i,r);const s=t.getCurrentScopeType()==="if";t.isContextBound(i.name)&&!t.isRootParam(i.name)&&s&&ue(i)}})}function Zt(e,t,i){e.test&&(t.pushScope("if"),ir(e.test,t),t.popScope()),t.pushScope("if"),i(e.consequent,t),t.popScope(),e.alternate&&(t.pushScope("els"),i(e.alternate,t),t.popScope())}function rr(e){N(e,null,{VariableDeclaration(t,i,r){t.declarations&&t.declarations.length>0&&t.declarations.forEach(s=>{if(s.init&&s.init.type==="ArrowFunctionExpression"&&s.init.start!==0){const a={type:"FunctionDeclaration",id:s.id,params:s.init.params,body:s.init.body.type==="BlockStatement"?s.init.body:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:s.init.body}]},async:s.init.async,generator:!1};Object.assign(t,a)}}),t.body&&t.body.body&&t.body.body.forEach(s=>r(s,i))}})}function sr(e,t){Ht(e,{VariableDeclaration(i){i.declarations.forEach(r=>{const s=r.init&&r.init.type==="MemberExpression"&&r.init.object&&(r.init.object.name==="context"||r.init.object.name===A||r.init.object.name==="context2"),a=r.init&&r.init.type==="MemberExpression"&&r.init.object?.object&&(r.init.object.object.name==="context"||r.init.object.object.name===A||r.init.object.object.name==="context2");(s||a)&&(r.id.name&&t.addContextBoundVar(r.id.name),r.id.properties&&r.id.properties.forEach(n=>{n.key.name&&t.addContextBoundVar(n.key.name)}))})}})}function ar(e){let t=typeof e=="function"?e.toString():e;const i=Ui(t.trim(),{ecmaVersion:"latest",sourceType:"module"});rr(i);const r=new Xi;let s;sr(i,r),Ht(i,{FunctionDeclaration(n){tr(n,r)},ArrowFunctionExpression(n){const u=n.start===0;u&&n.params&&n.params.length>0&&(s=n.params[0].name,n.params[0].name=A),Zi(n,r,u)},VariableDeclaration(n){n.declarations.forEach(u=>{if(u.id.type==="ArrayPattern"){const p=r.generateTempVar(),c={type:"VariableDeclaration",kind:n.kind,declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:p},init:u.init}]};u.id.elements?.forEach(d=>{d.type==="Identifier"&&r.addArrayPatternElement(d.name)});const l=u.id.elements.map((d,h)=>({type:"VariableDeclaration",kind:n.kind,declarations:[{type:"VariableDeclarator",id:d,init:{type:"MemberExpression",object:{type:"Identifier",name:p},property:{type:"Literal",value:h},computed:!0}}]}));Object.assign(n,{type:"BlockStatement",body:[c,...l]})}})},ForStatement(n){}}),N(i,r,{BlockStatement(n,u,p){n.body.forEach(c=>p(c,u))},ReturnStatement(n,u){$t(n,u)},VariableDeclaration(n,u){$e(n,u)},Identifier(n,u){F(n,u)},CallExpression(n,u){D(n,u)},MemberExpression(n){z(n,s,r)},AssignmentExpression(n,u){Qe(n,u)},FunctionDeclaration(n,u){},ForStatement(n,u,p){Xt(n,u,p)},IfStatement(n,u,p){Zt(n,u,p)}});const a=Yi(i);return new Function("",`return ${a}`)(this)}class Jt{constructor(t,i,r,s,a,n){this.source=t,this.tickerId=i,this.timeframe=r,this.limit=s,this.sDate=a,this.eDate=n,this._readyPromise=new Promise(u=>{this.loadMarketData(t,i,r,s,a,n).then(p=>{const c=p.reverse();this._periods=c.length,this.data=c;const l=c.map(S=>S.open),d=c.map(S=>S.close),h=c.map(S=>S.high),b=c.map(S=>S.low),v=c.map(S=>S.volume),x=c.map(S=>(S.high+S.low+S.close)/3),_=c.map(S=>(S.high+S.low)/2),I=c.map(S=>(S.high+S.low+S.open+S.close)/4),ye=c.map(S=>S.openTime),pe=c.map(S=>S.closeTime);this.open=l,this.close=d,this.high=h,this.low=b,this.volume=v,this.hl2=_,this.hlc3=x,this.ohlc4=I,this.openTime=ye,this.closeTime=pe,this._ready=!0,u(!0)})})}data=[];open=[];high=[];low=[];close=[];volume=[];hl2=[];hlc3=[];ohlc4=[];openTime=[];closeTime=[];_periods=void 0;get periods(){return this._periods}_readyPromise=null;_ready=!1;async loadMarketData(t,i,r,s,a,n){return Array.isArray(t)?t:t.getMarketData(i,r,s,a,n)}async ready(){if(this._ready)return!0;if(!this._readyPromise)throw new Error("PineTS is not ready");return this._readyPromise}async run(t,i,r){await this.ready(),i||(i=this._periods);const s=new ti({marketData:this.data,source:this.source,tickerId:this.tickerId,timeframe:this.timeframe,limit:this.limit,sDate:this.sDate,eDate:this.eDate});s.pineTSCode=t,s.useTACache=r;let a=ar.bind(this)(t);const n=["const","var","let","params"];for(let u=this._periods-i,p=i-1;u<this._periods;u++,p--){s.idx=u,s.data.close=this.close.slice(p),s.data.open=this.open.slice(p),s.data.high=this.high.slice(p),s.data.low=this.low.slice(p),s.data.volume=this.volume.slice(p),s.data.hl2=this.hl2.slice(p),s.data.hlc3=this.hlc3.slice(p),s.data.ohlc4=this.ohlc4.slice(p),s.data.openTime=this.openTime.slice(p),s.data.closeTime=this.closeTime.slice(p);const c=await a(s);if(typeof c=="object"){typeof s.result!="object"&&(s.result={});for(let l in c){s.result[l]===void 0&&(s.result[l]=[]);const d=Array.isArray(c[l])?c[l][0]:c[l];s.result[l].push(d)}}else Array.isArray(s.result)||(s.result=[]),s.result.push(c);for(let l of n)for(let d in s[l])if(Array.isArray(s[l][d])){const h=s[l][d][0];s[l][d].unshift(h)}}return s}}class nr{constructor(t){this.context=t}color={param:(t,i=0)=>Array.isArray(t)?t[i]:t,rgb:(t,i,r,s)=>s?`rgba(${t}, ${i}, ${r}, ${s})`:`rgb(${t}, ${i}, ${r})`,new:(t,i)=>{if(t&&t.startsWith("#")){const r=t.slice(1),s=parseInt(r.slice(0,2),16),a=parseInt(r.slice(2,4),16),n=parseInt(r.slice(4,6),16);return i?`rgba(${s}, ${a}, ${n}, ${i})`:`rgb(${s}, ${a}, ${n})`}return i?`rgba(${t}, ${i})`:t},white:"white",lime:"lime",green:"green",red:"red",maroon:"maroon",black:"black",gray:"gray",blue:"blue"};extractPlotOptions(t){const i={};for(let r in t)Array.isArray(t[r])?i[r]=t[r][0]:i[r]=t[r];return i}indicator(t,i,r){}plotchar(t,i,r){this.context.plots[i]||(this.context.plots[i]={data:[],options:this.extractPlotOptions(r),title:i}),this.context.plots[i].data.push({time:this.context.marketData[this.context.marketData.length-this.context.idx-1].openTime,value:t[0],options:{...this.extractPlotOptions(r),style:"char"}})}plot(t,i,r){this.context.plots[i]||(this.context.plots[i]={data:[],options:this.extractPlotOptions(r),title:i}),this.context.plots[i].data.push({time:this.context.marketData[this.context.marketData.length-this.context.idx-1].openTime,value:t[0],options:this.extractPlotOptions(r)})}na(t){return Array.isArray(t)?isNaN(t[0]):isNaN(t)}nz(t,i=0){const r=Array.isArray(t)?t[0]:t,s=Array.isArray(t)?i[0]:i;return isNaN(r)?s:r}}class or{constructor(t){this.context=t}param(t,i=0){return Array.isArray(t)?[t[i]]:[t]}any(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}int(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}float(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}bool(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}string(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}timeframe(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}time(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}price(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}session(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}source(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}symbol(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}text_area(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}enum(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}color(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}}class ur{constructor(t){this.context=t}_cache={};param(t,i,r){return this.context.params[r]||(this.context.params[r]=[]),Array.isArray(t)?i?(this.context.params[r]=t.slice(i),this.context.params[r].length=t.length,this.context.params[r]):(this.context.params[r]=t.slice(0),this.context.params[r]):(this.context.params[r][0]=t,this.context.params[r])}abs(t){return Math.abs(t[0])}pow(t,i){return Math.pow(t[0],i[0])}sqrt(t){return Math.sqrt(t[0])}log(t){return Math.log(t[0])}ln(t){return Math.log(t[0])}exp(t){return Math.exp(t[0])}floor(t){return Math.floor(t[0])}ceil(t){return Math.ceil(t[0])}round(t){return Math.round(t[0])}random(){return Math.random()}max(...t){const i=t.map(r=>Array.isArray(r)?r[0]:r);return Math.max(...i)}min(...t){const i=t.map(r=>Array.isArray(r)?r[0]:r);return Math.min(...i)}sum(t,i){const r=Array.isArray(i)?i[0]:i;return Array.isArray(t)?t.slice(0,r).reduce((s,a)=>s+a,0):t}sin(t){return Math.sin(t[0])}cos(t){return Math.cos(t[0])}tan(t){return Math.tan(t[0])}acos(t){return Math.acos(t[0])}asin(t){return Math.asin(t[0])}atan(t){return Math.atan(t[0])}avg(...t){const i=t.map(r=>Array.isArray(r)?r[0]:r);return i.reduce((r,s)=>{const a=Array.isArray(r)?r[0]:r,n=Array.isArray(s)?s[0]:s;return a+n},0)/i.length}}const ut=["1","3","5","15","30","45","60","120","180","240","D","W","M"];class pr{constructor(t){this.context=t}_cache={};param(t,i,r){return this.context.params[r]||(this.context.params[r]=[]),Array.isArray(t)?(i?this.context.params[r]=t.slice(i):this.context.params[r]=t.slice(0),[t[i],r]):(this.context.params[r][0]=t,[t,r])}async security(t,i,r,s=!1,a=!1,n=!1,u=null,p=null){const c=t[0],l=i[0],d=r[0],h=r[1],b=ut.indexOf(this.context.timeframe),v=ut.indexOf(l);if(b==-1||v==-1)throw new Error("Invalid timeframe");if(b>v)throw new Error("Only higher timeframes are supported for now");if(b===v)return d;const x=this.context.data.openTime[0],_=this.context.data.closeTime[0];if(this.context.cache[h]){const pe=this.context.cache[h],S=this._findSecContextIdx(x,_,pe.data.openTime,pe.data.closeTime,a);return S==-1?NaN:pe.params[h][S]}const I=await new Jt(this.context.source,c,l,this.context.limit||1e3,this.context.sDate,this.context.eDate).run(this.context.pineTSCode);this.context.cache[h]=I;const ye=this._findSecContextIdx(x,_,I.data.openTime,I.data.closeTime,a);return ye==-1?NaN:I.params[h][ye]}_findSecContextIdx(t,i,r,s,a=!1){for(let n=0;n<r.length;n++)if(r[n]<=t&&i<=s[n])return n+(a?1:2);return-1}}class cr{constructor(t){this.context=t}get tr(){return this.context.math.max(this.context.data.high[0]-this.context.data.low[0],this.context.math.abs(this.context.data.high[0]-this.context.data.close[1]),this.context.math.abs(this.context.data.low[0]-this.context.data.close[1]))}param(t,i,r){return this.context.params[r]||(this.context.params[r]=[]),Array.isArray(t)?i?(this.context.params[r]=t.slice(i),this.context.params[r].length=t.length,this.context.params[r]):(this.context.params[r]=t.slice(0),this.context.params[r]):(this.context.params[r][0]=t,this.context.params[r])}ema(t,i){const r=Array.isArray(i)?i[0]:i,s=hr(t.slice(0).reverse(),r),a=this.context.idx;return this.context.precision(s[a])}sma(t,i,r){const s=Array.isArray(i)?i[0]:i,a=t.slice(0).reverse();if(this.context.useTACache&&r){this.context.cache[r]||(this.context.cache[r]={});const p=this.context.cache[r];if(p){const c=mr(a,s,p),l=this.context.idx;return this.context.precision(c[l])}}const n=Pe(a,s),u=this.context.idx;return this.context.precision(n[u])}vwma(t,i){const r=Array.isArray(i)?i[0]:i,s=this.context.data.volume,a=dr(t.slice(0).reverse(),s.slice(0).reverse(),r),n=this.context.idx;return this.context.precision(a[n])}wma(t,i){const r=Array.isArray(i)?i[0]:i,s=ve(t.slice(0).reverse(),r),a=this.context.idx;return this.context.precision(s[a])}hma(t,i){const r=Array.isArray(i)?i[0]:i,s=xr(t.slice(0).reverse(),r),a=this.context.idx;return this.context.precision(s[a])}rma(t,i){const r=Array.isArray(i)?i[0]:i,s=fr(t.slice(0).reverse(),r),a=this.context.idx;return this.context.precision(s[a])}change(t,i=1){const r=Array.isArray(i)?i[0]:i,s=yr(t.slice(0).reverse(),r),a=this.context.idx;return this.context.precision(s[a])}rsi(t,i){const r=Array.isArray(i)?i[0]:i,s=lr(t.slice(0).reverse(),r),a=this.context.idx;return this.context.precision(s[a])}atr(t){const i=Array.isArray(t)?t[0]:t,r=this.context.data.high.slice().reverse(),s=this.context.data.low.slice().reverse(),a=this.context.data.close.slice().reverse(),n=ei(r,s,a,i),u=this.context.idx;return this.context.precision(n[u])}mom(t,i){const r=Array.isArray(i)?i[0]:i,s=gr(t.slice(0).reverse(),r),a=this.context.idx;return this.context.precision(s[a])}roc(t,i){const r=Array.isArray(i)?i[0]:i,s=br(t.slice(0).reverse(),r),a=this.context.idx;return this.context.precision(s[a])}dev(t,i){const r=Array.isArray(i)?i[0]:i,s=vr(t.slice(0).reverse(),r),a=this.context.idx;return this.context.precision(s[a])}variance(t,i){const r=Array.isArray(i)?i[0]:i,s=wr(t.slice(0).reverse(),r),a=this.context.idx;return this.context.precision(s[a])}highest(t,i){const r=Array.isArray(i)?i[0]:i,s=Er(t.slice(0).reverse(),r),a=this.context.idx;return this.context.precision(s[a])}lowest(t,i){const r=Array.isArray(i)?i[0]:i,s=Cr(t.slice(0).reverse(),r),a=this.context.idx;return this.context.precision(s[a])}median(t,i){const r=Array.isArray(i)?i[0]:i,s=Sr(t.slice(0).reverse(),r),a=this.context.idx;return this.context.precision(s[a])}stdev(t,i,r=!0){const s=Array.isArray(i)?i[0]:i,a=Array.isArray(r)?r[0]:r,n=Ar(t.slice(0).reverse(),s,a),u=this.context.idx;return this.context.precision(n[u])}linreg(t,i,r){const s=Array.isArray(i)?i[0]:i,a=Array.isArray(r)?r[0]:r,n=kr(t.slice(0).reverse(),s,a),u=this.context.idx;return this.context.precision(n[u])}supertrend(t,i){const r=Array.isArray(t)?t[0]:t,s=Array.isArray(i)?i[0]:i,a=this.context.data.high.slice().reverse(),n=this.context.data.low.slice().reverse(),u=this.context.data.close.slice().reverse(),[p,c]=_r(a,n,u,r,s),l=this.context.idx;return[[this.context.precision(p[l]),c[l]]]}crossover(t,i){const r=Array.isArray(t)?t[0]:t,s=Array.isArray(i)?i[0]:i,a=Array.isArray(t)?t[1]:this.context.data.series[t][1],n=Array.isArray(i)?i[1]:this.context.data.series[i][1];return a<n&&r>s}crossunder(t,i){const r=Array.isArray(t)?t[0]:t,s=Array.isArray(i)?i[0]:i,a=Array.isArray(t)?t[1]:this.context.data.series[t][1],n=Array.isArray(i)?i[1]:this.context.data.series[i][1];return a>n&&r<s}pivothigh(t,i,r){r==null&&(r=i,i=t,t=this.context.data.high);const s=Array.isArray(i)?i[0]:i,a=Array.isArray(r)?r[0]:r,n=Ir(t.slice(0).reverse(),s,a),u=this.context.idx;return this.context.precision(n[u])}pivotlow(t,i,r){r==null&&(r=i,i=t,t=this.context.data.low);const s=Array.isArray(i)?i[0]:i,a=Array.isArray(r)?r[0]:r,n=Pr(t.slice(0).reverse(),s,a),u=this.context.idx;return this.context.precision(n[u])}}function ei(e,t,i,r){const s=new Array(e.length);s[0]=e[0]-t[0];for(let u=1;u<e.length;u++){const p=e[u]-t[u],c=Math.abs(e[u]-i[u-1]),l=Math.abs(t[u]-i[u-1]);s[u]=Math.max(p,c,l)}const a=new Array(e.length).fill(NaN);let n=0;for(let u=0;u<r;u++)n+=s[u];a[r-1]=n/r;for(let u=r;u<s.length;u++)a[u]=(a[u-1]*(r-1)+s[u])/r;return a}function hr(e,t){const i=new Array(e.length).fill(NaN),r=2/(t+1);let s=0;for(let a=0;a<t;a++)s+=e[a]||0;i[t-1]=s/t;for(let a=t;a<e.length;a++)i[a]=e[a]*r+i[a-1]*(1-r);return i}function lr(e,t){const i=new Array(e.length).fill(NaN),r=new Array(e.length).fill(0),s=new Array(e.length).fill(0);for(let u=1;u<e.length;u++){const p=e[u]-e[u-1];r[u]=p>0?p:0,s[u]=p<0?-p:0}let a=0,n=0;for(let u=1;u<=t;u++)a+=r[u],n+=s[u];a/=t,n/=t,i[t]=n===0?100:100-100/(1+a/n);for(let u=t+1;u<e.length;u++)a=(a*(t-1)+r[u])/t,n=(n*(t-1)+s[u])/t,i[u]=n===0?100:100-100/(1+a/n);return i}function fr(e,t){const i=new Array(e.length).fill(NaN),r=1/t;let s=0;for(let a=0;a<t;a++)s+=e[a]||0;i[t-1]=s/t;for(let a=t;a<e.length;a++){const n=e[a]||0;i[a]=n*r+i[a-1]*(1-r)}return i}function mr(e,t,i){const r=i.previousResult||new Array(e.length).fill(NaN),s=i.lastProcessedIndex||-1;let a=i.previousSum||0;if(s===-1||e.length!==s+1){a=0;for(let n=0;n<t;n++)a+=e[n]||0;r[t-1]=a/t;for(let n=0;n<t-1;n++)r[n]=NaN;for(let n=t;n<e.length;n++)a=a-(e[n-t]||0)+(e[n]||0),r[n]=a/t}else if(e.length===s+2){const n=e.length-1;a=a-(e[n-t]||0)+(e[n]||0),r[n]=a/t}else return Pe(e,t);return i.previousSum=a,i.lastProcessedIndex=e.length-1,i.previousResult=r,r}function Pe(e,t){const i=new Array(e.length).fill(NaN);for(let r=t-1;r<e.length;r++){let s=0;for(let a=0;a<t;a++)s+=e[r-a]||0;i[r]=s/t}return i}function dr(e,t,i){const r=new Array(e.length).fill(NaN);for(let s=i-1;s<e.length;s++){let a=0,n=0;for(let u=0;u<i;u++)a+=t[s-u],n+=e[s-u]*t[s-u];r[s]=n/a}return r}function xr(e,t){const i=Math.floor(t/2),r=ve(e,i),s=ve(e,t),a=r.map((u,p)=>2*u-s[p]),n=Math.floor(Math.sqrt(t));return ve(a,n)}function ve(e,t){const i=new Array(e.length);for(let r=t-1;r<e.length;r++){let s=0,a=0;for(let n=0;n<t;n++)s+=e[r-n]*(t-n),a+=t-n;i[r]=s/a}for(let r=0;r<t-1;r++)i[r]=NaN;return i}function yr(e,t=1){const i=new Array(e.length).fill(NaN);for(let r=t;r<e.length;r++)i[r]=e[r]-e[r-t];return i}function gr(e,t){const i=new Array(e.length).fill(NaN);for(let r=t;r<e.length;r++)i[r]=e[r]-e[r-t];return i}function br(e,t){const i=new Array(e.length).fill(NaN);for(let r=t;r<e.length;r++)i[r]=(e[r]-e[r-t])/e[r-t]*100;return i}function vr(e,t){const i=new Array(e.length).fill(NaN),r=Pe(e,t);for(let s=t-1;s<e.length;s++){let a=0;for(let n=0;n<t;n++)a+=Math.abs(e[s-n]-r[s]);i[s]=a/t}return i}function wr(e,t){const i=new Array(e.length).fill(NaN);for(let r=t-1;r<e.length;r++){let s=0,a=0;for(let u=0;u<t;u++)s+=e[r-u],a+=e[r-u]*e[r-u];const n=s/t;i[r]=a/t-n*n}return i}function Er(e,t){const i=new Array(e.length).fill(NaN);for(let r=t-1;r<e.length;r++){let s=-1/0;for(let a=0;a<t;a++){const n=e[r-a];isNaN(n)?s=s===-1/0?NaN:s:s=Math.max(s,n)}i[r]=s}return i}function Cr(e,t){const i=new Array(e.length).fill(NaN);for(let r=t-1;r<e.length;r++){let s=1/0;for(let a=0;a<t;a++){const n=e[r-a];isNaN(n)||n===void 0?s=s===1/0?NaN:s:s=Math.min(s,n)}i[r]=s}return i}function Sr(e,t){const i=new Array(e.length).fill(NaN);for(let r=t-1;r<e.length;r++){const s=e.slice(r-t+1,r+1).slice().sort((n,u)=>n-u),a=Math.floor(t/2);i[r]=t%2===0?(s[a-1]+s[a])/2:s[a]}return i}function Ar(e,t,i=!0){const r=new Array(e.length).fill(NaN),s=Pe(e,t);for(let a=t-1;a<e.length;a++){let n=0;for(let p=0;p<t;p++)n+=Math.pow(e[a-p]-s[a],2);const u=i?t:t-1;r[a]=Math.sqrt(n/u)}return r}function kr(e,t,i){const r=e.length,s=new Array(r).fill(NaN);for(let a=t-1;a<r;a++){let n=0,u=0,p=0,c=0;const l=t;for(let v=0;v<t;v++){const x=v,_=e[a-t+1+v];n+=x,u+=_,p+=x*_,c+=x*x}const d=l*c-n*n;if(d===0){s[a]=NaN;continue}const h=(l*p-n*u)/d,b=(u-h*n)/l+h*(t-1-i);s[a]=b}return s}function _r(e,t,i,r,s){const a=e.length,n=new Array(a).fill(NaN),u=new Array(a).fill(0),p=ei(e,t,i,s),c=new Array(a).fill(NaN),l=new Array(a).fill(NaN);for(let x=0;x<a;x++){const _=(e[x]+t[x])/2,I=p[x];isNaN(I)||(c[x]=_+r*I,l[x]=_-r*I)}let d=c[s],h=l[s],b=i[s]<=d?d:h,v=i[s]<=d?-1:1;n[s]=b,u[s]=v;for(let x=s+1;x<a;x++){let _=c[x];_<d||i[x-1]>d?c[x]=_:c[x]=d;let I=l[x];I>h||i[x-1]<h?l[x]=I:l[x]=h,b===d?i[x]>c[x]?(u[x]=1,n[x]=l[x]):(u[x]=-1,n[x]=c[x]):i[x]<l[x]?(u[x]=-1,n[x]=c[x]):(u[x]=1,n[x]=l[x]),d=c[x],h=l[x],b=n[x]}return[n,u]}function Ir(e,t,i){const r=new Array(e.length).fill(NaN);for(let s=t+i;s<e.length;s++){const a=e[s-i];let n=!0;for(let u=1;u<=t;u++)if(e[s-i-u]>=a){n=!1;break}if(n){for(let u=1;u<=i;u++)if(e[s-i+u]>=a){n=!1;break}}n&&(r[s]=a)}return r}function Pr(e,t,i){const r=new Array(e.length).fill(NaN);for(let s=t+i;s<e.length;s++){const a=e[s-i];let n=!0;for(let u=1;u<=t;u++)if(e[s-i-u]<=a){n=!1;break}if(n){for(let u=1;u<=i;u++)if(e[s-i+u]<=a){n=!1;break}}n&&(r[s]=a)}return r}class L{constructor(t){this.array=t}}class Nr{constructor(t){this.context=t}_cache={};param(t,i=0){return Array.isArray(t)?t[i]:t}get(t,i){return t.array[i]}set(t,i,r){t.array[i]=r}push(t,i){t.array.push(i)}sum(t){return t.array.reduce((i,r)=>i+(isNaN(r)?0:r),0)}avg(t){return this.sum(t)/t.array.length}min(t,i=0){return[...t.array].sort((r,s)=>r-s)[i]??this.context.NA}max(t,i=0){return[...t.array].sort((r,s)=>s-r)[i]??this.context.NA}size(t){return t.array.length}new_bool(t,i=!1){return new L(Array(t).fill(i))}new_float(t,i=NaN){return new L(Array(t).fill(i))}new_int(t,i=0){return new L(Array(t).fill(Math.round(i)))}new_string(t,i=""){return new L(Array(t).fill(i))}new(t,i){return new L(Array(t).fill(i))}slice(t,i,r){const s=r!==void 0?r+1:void 0;return new L(t.array.slice(i,s))}reverse(t){t.array.reverse()}includes(t,i){return t.array.includes(i)}indexof(t,i){return t.array.indexOf(i)}lastindexof(t,i){return t.array.lastIndexOf(i)}stdev(t,i=!0){const r=this.avg(t),s=t.array.map(n=>Math.pow(n-r,2)),a=i?t.array.length:t.array.length-1;return Math.sqrt(this.sum(new L(s))/a)}variance(t,i=!0){const r=this.avg(t),s=t.array.map(n=>Math.pow(n-r,2)),a=i?t.array.length:t.array.length-1;return this.sum(new L(s))/a}covariance(t,i,r=!0){if(t.array.length!==i.array.length||t.array.length<2)return NaN;const s=r?t.array.length:t.array.length-1,a=this.avg(t),n=this.avg(i);let u=0;for(let p=0;p<t.array.length;p++)u+=(t.array[p]-a)*(i.array[p]-n);return u/s}first(t){return t.array.length>0?t.array[0]:this.context.NA}last(t){return t.array.length>0?t.array[t.array.length-1]:this.context.NA}clear(t){t.array.length=0}join(t,i=","){return t.array.join(i)}abs(t){return new L(t.array.map(i=>Math.abs(i)))}concat(t,i){return t.array.push(...i.array),t}copy(t){return new L([...t.array])}every(t,i){return t.array.every(i)}fill(t,i,r=0,s){const a=t.array.length,n=s!==void 0?Math.min(s,a):a;for(let u=r;u<n;u++)t.array[u]=i}from(t){return new L([...t])}insert(t,i,r){t.array.splice(i,0,r)}pop(t){return t.array.pop()}range(t){return this.max(t)-this.min(t)}remove(t,i){return i>=0&&i<t.array.length?t.array.splice(i,1)[0]:this.context.NA}shift(t){return t.array.shift()}sort(t,i="asc"){t.array.sort((r,s)=>i==="asc"?r-s:s-r)}sort_indices(t,i){const r=t.array.map((s,a)=>a);return r.sort((s,a)=>{const n=t.array[s],u=t.array[a];return i?i(n,u):n-u}),new L(r)}standardize(t){const i=this.avg(t),r=this.stdev(t);return r===0?new L(t.array.map(()=>0)):new L(t.array.map(s=>(s-i)/r))}unshift(t,i){t.array.unshift(i)}some(t,i){return t.array.some(i)}}class ti{data={open:[],high:[],low:[],close:[],volume:[],hl2:[],hlc3:[],ohlc4:[]};cache={};useTACache=!1;NA=NaN;math;ta;input;request;array;core;lang;idx=0;params={};const={};var={};let={};result=void 0;plots={};marketData;source;tickerId;timeframe="";limit;sDate;eDate;pineTSCode;constructor({marketData:t,source:i,tickerId:r,timeframe:s,limit:a,sDate:n,eDate:u}){this.marketData=t,this.source=i,this.tickerId=r,this.timeframe=s,this.limit=a,this.sDate=n,this.eDate=u,this.math=new ur(this),this.ta=new cr(this),this.input=new or(this),this.request=new pr(this),this.array=new Nr(this);const p=new nr(this);this.core={plotchar:p.plotchar.bind(p),na:p.na.bind(p),color:p.color,plot:p.plot.bind(p),nz:p.nz.bind(p)}}init(t,i,r=0){return t?!Array.isArray(i)||Array.isArray(i[0])?t[0]=Array.isArray(i?.[0])?i[0]:this.precision(i):t[0]=this.precision(i[i.length-this.idx-1+r]):Array.isArray(i)?t=[this.precision(i[i.length-this.idx-1+r])]:t=[this.precision(i)],t}precision(t,i=10){return typeof t!="number"||isNaN(t)?t:Number(t.toFixed(i))}param(t,i,r){return typeof t=="string"||!Array.isArray(t)&&typeof t=="object"?t:(this.params[r]||(this.params[r]=[]),Array.isArray(t)?i?(this.params[r]=t.slice(i),this.params[r].length=t.length,this.params[r]):(this.params[r]=t.slice(0),this.params[r]):(this.params[r][0]=t,this.params[r]))}}const Vr="https://api.binance.com/api/v3",pt={1:"1m",3:"3m",5:"5m",15:"15m",30:"30m",45:null,60:"1h",120:"2h",180:null,240:"4h","4H":"4h","1D":"1d",D:"1d","1W":"1w",W:"1w","1M":"1M",M:"1M"};class Tr{cache;cacheDuration;constructor(t=5*60*1e3){this.cache=new Map,this.cacheDuration=t}generateKey(t){return Object.entries(t).filter(([i,r])=>r!==void 0).map(([i,r])=>`${i}:${r}`).join("|")}get(t){const i=this.generateKey(t),r=this.cache.get(i);return r?Date.now()-r.timestamp>this.cacheDuration?(this.cache.delete(i),null):r.data:null}set(t,i){const r=this.generateKey(t);this.cache.set(r,{data:i,timestamp:Date.now()})}clear(){this.cache.clear()}cleanup(){const t=Date.now();for(const[i,r]of this.cache.entries())t-r.timestamp>this.cacheDuration&&this.cache.delete(i)}}class Mr{cacheManager;constructor(){this.cacheManager=new Tr(5*60*1e3)}async getMarketDataInterval(t,i,r,s){try{const a=pt[i.toUpperCase()];if(!a)return console.error(`Unsupported timeframe: ${i}`),[];const n={"1m":60*1e3,"3m":3*60*1e3,"5m":5*60*1e3,"15m":15*60*1e3,"30m":30*60*1e3,"1h":60*60*1e3,"2h":2*60*60*1e3,"4h":4*60*60*1e3,"1d":24*60*60*1e3,"1w":7*24*60*60*1e3,"1M":30*24*60*60*1e3};let u=[],p=r;const c=s,l=n[a];if(!l)return console.error(`Duration not defined for interval: ${a}`),[];for(;p<c;){const d=Math.min(p+1e3*l,c),h=await this.getMarketData(t,i,1e3,p,d);if(h.length===0||(u=u.concat(h),p=h[h.length-1].closeTime+1,h.length<1e3))break}return u}catch(a){return console.error("Error in getMarketDataInterval:",a),[]}}async getMarketData(t,i,r,s,a){try{const n={tickerId:t,timeframe:i,limit:r,sDate:s,eDate:a},u=this.cacheManager.get(n);if(u)return console.log("cache hit",t,i,r,s,a),u;const p=pt[i.toUpperCase()];if(!p)return console.error(`Unsupported timeframe: ${i}`),[];let c=`${Vr}/klines?symbol=${t}&interval=${p}`;if(!r&&s&&a)return this.getMarketDataInterval(t,i,s,a);r&&(c+=`&limit=${r}`),s&&(c+=`&startTime=${s}`),a&&(c+=`&endTime=${a}`);const l=await fetch(c);if(!l.ok)throw new Error(`HTTP error! status: ${l.status}`);const d=(await l.json()).map(h=>({openTime:parseInt(h[0]),open:parseFloat(h[1]),high:parseFloat(h[2]),low:parseFloat(h[3]),close:parseFloat(h[4]),volume:parseFloat(h[5]),closeTime:parseInt(h[6]),quoteAssetVolume:parseFloat(h[7]),numberOfTrades:parseInt(h[8]),takerBuyBaseAssetVolume:parseFloat(h[9]),takerBuyQuoteAssetVolume:parseFloat(h[10]),ignore:h[11]}));return this.cacheManager.set(n,d),d}catch(n){return console.error("Error in binance.klines:",n),[]}}}const Lr={Binance:new Mr};exports.Context=ti;exports.PineTS=Jt;exports.Provider=Lr;
30
+ `).length-1,this.mapping={original:null,generated:this,name:void 0,source:i.sourceMap.file||i.sourceMap._file})}write(t){this.output+=t}writeToStream(t){this.output.write(t)}writeAndMap(t,i){this.output+=t,this.map(t,i)}writeToStreamAndMap(t,i){this.output.write(t),this.map(t,i)}map(t,i){if(i!=null){const{type:s}=i;if(s[0]==="L"&&s[2]==="n"){this.column=0,this.line++;return}if(i.loc!=null){const{mapping:n}=this;n.original=i.loc.start,n.name=i.name,this.sourceMap.addMapping(n)}if(s[0]==="T"&&s[8]==="E"||s[0]==="L"&&s[1]==="i"&&typeof i.value=="string"){const{length:n}=t;let{column:u,line:p}=this;for(let c=0;c<n;c++)t[c]===`
31
+ `?(u=0,p++):u++;this.column=u,this.line=p;return}}const{length:r}=t,{lineEnd:a}=this;r>0&&(this.lineEndSize>0&&(a.length===1?t[r-1]===a:t.endsWith(a))?(this.line+=this.lineEndSize,this.column=0):this.column+=r)}toString(){return this.output}}function Hi(e,t){const i=new $i(t);return i.generator[e.type](e,i),i.output}class Ki{scopes=[];scopeTypes=[];scopeCounts=new Map;contextBoundVars=new Set;arrayPatternElements=new Set;rootParams=new Set;varKinds=new Map;loopVars=new Set;loopVarNames=new Map;paramIdCounter=0;cacheIdCounter=0;tempVarCounter=0;taCallIdCounter=0;get nextParamIdArg(){return{type:"Identifier",name:`'p${this.paramIdCounter++}'`}}get nextCacheIdArg(){return{type:"Identifier",name:`'cache_${this.cacheIdCounter++}'`}}getNextTACallId(){return{type:"Literal",value:`_ta${this.taCallIdCounter++}`}}constructor(){this.pushScope("glb")}pushScope(t){this.scopes.push(new Map),this.scopeTypes.push(t),this.scopeCounts.set(t,(this.scopeCounts.get(t)||0)+1)}popScope(){this.scopes.pop(),this.scopeTypes.pop()}getCurrentScopeType(){return this.scopeTypes[this.scopeTypes.length-1]}getCurrentScopeCount(){return this.scopeCounts.get(this.getCurrentScopeType())||1}addContextBoundVar(t,i=!1){this.contextBoundVars.add(t),i&&this.rootParams.add(t)}removeContextBoundVar(t){this.contextBoundVars.has(t)&&(this.contextBoundVars.delete(t),this.rootParams.has(t)&&this.rootParams.delete(t))}addArrayPatternElement(t){this.arrayPatternElements.add(t)}isContextBound(t){return this.contextBoundVars.has(t)}isArrayPatternElement(t){return this.arrayPatternElements.has(t)}isRootParam(t){return this.rootParams.has(t)}addLoopVariable(t,i){this.loopVars.add(t),this.loopVarNames.set(t,i)}getLoopVariableName(t){return this.loopVarNames.get(t)}isLoopVariable(t){return this.loopVars.has(t)}addVariable(t,i){if(this.isContextBound(t))return t;const r=this.scopes[this.scopes.length-1],a=this.scopeTypes[this.scopeTypes.length-1],s=this.scopeCounts.get(a)||1,n=`${a}${s}_${t}`;return r.set(t,n),this.varKinds.set(n,i),n}getVariable(t){if(this.loopVars.has(t)){const i=this.loopVarNames.get(t);if(i)return[i,"let"]}if(this.isContextBound(t))return[t,"let"];for(let i=this.scopes.length-1;i>=0;i--){const r=this.scopes[i];if(r.has(t)){const a=r.get(t),s=this.varKinds.get(a)||"let";return[a,s]}}return[t,"let"]}generateTempVar(){return`temp_${++this.tempVarCounter}`}}//!!!Warning!!! this code is not clean, it was initially written as a PoC then used as transpiler for PineTS
32
+ const A="$",De={type:"Identifier",name:"undefined"};function H(e,t){if(e.computed&&e.property.type==="Identifier"){if(t.isLoopVariable(e.property.name))return;if(!t.isContextBound(e.property.name)){const[i,r]=t.getVariable(e.property.name);e.property={type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:r},computed:!1},property:{type:"Identifier",name:i},computed:!1},e.property={type:"MemberExpression",object:e.property,property:{type:"Literal",value:0},computed:!0}}}if(e.computed&&e.object.type==="Identifier"){if(t.isLoopVariable(e.object.name))return;if(!t.isContextBound(e.object.name)){const[i,r]=t.getVariable(e.object.name);e.object={type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:r},computed:!1},property:{type:"Identifier",name:i},computed:!1}}if(e.property.type==="MemberExpression"){const i=e.property;i._indexTransformed||(H(i,t),i._indexTransformed=!0)}}}function U(e,t,i){if(e.object&&e.object.type==="Identifier"&&e.object.name==="Math")return;const r=i.getCurrentScopeType()=="if",a=i.getCurrentScopeType()=="els",s=i.getCurrentScopeType()=="for";!r&&!a&&!s&&e.object&&e.object.type==="Identifier"&&i.isContextBound(e.object.name)&&!i.isRootParam(e.object.name)||e._indexTransformed||(H(e,i),e._indexTransformed=!0)}function Ke(e,t){e.declarations.forEach(i=>{i.init.name=="na"&&(i.init.name="NaN");const r=i.init&&i.init.type==="MemberExpression"&&i.init.object&&(i.init.object.name==="context"||i.init.object.name===A||i.init.object.name==="context2"),a=i.init&&i.init.type==="MemberExpression"&&i.init.object?.object&&(i.init.object.object.name==="context"||i.init.object.object.name===A||i.init.object.object.name==="context2"),s=i.init&&i.init.type==="ArrowFunctionExpression";if(r){i.id.name&&t.addContextBoundVar(i.id.name),i.id.properties&&i.id.properties.forEach(h=>{h.key.name&&t.addContextBoundVar(h.key.name)}),i.init.object.name=A;return}if(a){i.id.name&&t.addContextBoundVar(i.id.name),i.id.properties&&i.id.properties.forEach(h=>{h.key.name&&t.addContextBoundVar(h.key.name)}),i.init.object.object.name=A;return}s&&i.init.params.forEach(h=>{h.type==="Identifier"&&t.addContextBoundVar(h.name)});const n=t.addVariable(i.id.name,e.kind),u=e.kind;i.init&&!s&&(i.init.type==="CallExpression"&&i.init.callee.type==="MemberExpression"&&i.init.callee.object&&i.init.callee.object.type==="Identifier"&&t.isContextBound(i.init.callee.object.name)?R(i.init,t):N(i.init,{parent:i.init},{Identifier(h,x){h.parent=x.parent,B(h,t);const g=h.parent&&h.parent.type==="BinaryExpression",E=h.parent&&h.parent.type==="ConditionalExpression";h.type==="Identifier"&&(g||E)&&Object.assign(h,{type:"MemberExpression",object:{type:"Identifier",name:h.name},property:{type:"Literal",value:0},computed:!0})},CallExpression(h,x,g){h.callee.type==="Identifier"&&(h.callee.parent=h),h.arguments.forEach(E=>{E.type==="Identifier"&&(E.parent=h)}),R(h,t),h.arguments.forEach(E=>g(E,{parent:h}))},BinaryExpression(h,x,g){h.left.type==="Identifier"&&(h.left.parent=h),h.right.type==="Identifier"&&(h.right.parent=h),g(h.left,{parent:h}),g(h.right,{parent:h})},MemberExpression(h,x,g){h.object.type==="Identifier"&&(h.object.parent=h),h.property.type==="Identifier"&&(h.property.parent=h),H(h,t),h.object&&g(h.object,{parent:h})}}));const p={type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:u},computed:!1},property:{type:"Identifier",name:n},computed:!1},c=t.isArrayPatternElement(i.id.name),l=!c&&i.init&&i.init.type==="MemberExpression"&&i.init.computed&&i.init.property&&(i.init.property.type==="Literal"||i.init.property.type==="MemberExpression");i.init?.property?.type==="MemberExpression"&&(i.init.property._indexTransformed||(H(i.init.property,t),i.init.property._indexTransformed=!0));const f={type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:p,right:i.init?s||c?i.init:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:"init"},computed:!1},arguments:l?[p,i.init.object,i.init.property]:[p,i.init]}:{type:"Identifier",name:"undefined"}}};if(c){f.expression.right.object.property.name+=`?.[0][${i.init.property.value}]`;const h=f.expression.right.object;f.expression.right={type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:"init"},computed:!1},arguments:[p,h]}}s&&(t.pushScope("fn"),N(i.init.body,t,{BlockStatement(h,x,g){h.body.forEach(E=>g(E,x))},IfStatement(h,x,g){x.pushScope("if"),g(h.consequent,x),h.alternate&&(x.pushScope("els"),g(h.alternate,x),x.popScope()),x.popScope()},VariableDeclaration(h,x){Ke(h,x)},Identifier(h,x){B(h,x)},AssignmentExpression(h,x){Qe(h,x)}}),t.popScope()),Object.assign(e,f)})}function B(e,t){if(e.name!==A){if(e.name==="Math"||e.name==="NaN"||e.name==="undefined"||e.name==="Infinity"||e.name==="null"||e.name.startsWith("'")&&e.name.endsWith("'")||e.name.startsWith('"')&&e.name.endsWith('"')||e.name.startsWith("`")&&e.name.endsWith("`")||t.isLoopVariable(e.name)||t.isContextBound(e.name)&&!t.isRootParam(e.name))return;const i=e.parent&&e.parent.type==="MemberExpression"&&e.parent.object===e&&t.isContextBound(e.name),r=e.parent&&e.parent.type==="CallExpression"&&e.parent.callee&&e.parent.callee.type==="MemberExpression"&&e.parent.callee.property.name==="param";e.parent&&e.parent.type==="AssignmentExpression"&&e.parent.left;const a=e.parent&&e.parent.type==="CallExpression"&&e.parent.callee&&e.parent.callee.type==="MemberExpression"&&t.isContextBound(e.parent.callee.object.name),s=e.parent&&e.parent.type==="MemberExpression"&&e.parent.computed,n=e.parent&&e.parent.type==="MemberExpression"&&e.parent.computed&&e.parent.property===e&&e.parent.parent&&e.parent.parent.type==="CallExpression"&&e.parent.parent.callee&&e.parent.parent.callee.type==="MemberExpression"&&t.isContextBound(e.parent.parent.callee.object.name),u=e.parent&&e.parent.type==="CallExpression"&&e.parent.callee===e;if(i||r||a||n||u){if(u)return;const[f,h]=t.getVariable(e.name);Object.assign(e,{type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:h},computed:!1},property:{type:"Identifier",name:f},computed:!1});return}const[p,c]=t.getVariable(e.name),l={type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:c},computed:!1},property:{type:"Identifier",name:p},computed:!1};!(e.parent&&e.parent.type==="MemberExpression"&&e.parent.computed&&e.parent.object===e)&&!s?Object.assign(e,{type:"MemberExpression",object:l,property:{type:"Literal",value:0},computed:!0}):Object.assign(e,l)}}function Qe(e,t){if(e.left.type==="Identifier"){const[i,r]=t.getVariable(e.left.name),a={type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:r},computed:!1},property:{type:"Identifier",name:i},computed:!1};e.left={type:"MemberExpression",object:a,property:{type:"Literal",value:0},computed:!0}}N(e.right,{parent:e.right,inNamespaceCall:!1},{Identifier(i,r,a){i.name=="na"&&(i.name="NaN"),i.parent=r.parent,B(i,t);const s=i.parent&&i.parent.type==="BinaryExpression",n=i.parent&&i.parent.type==="ConditionalExpression",u=t.isContextBound(i.name)&&!t.isRootParam(i.name),p=i.parent&&i.parent.type==="MemberExpression"&&i.parent.computed&&i.parent.object===i,c=i.parent&&i.parent._isParamCall,l=i.parent&&i.parent.type==="MemberExpression",f=i.name==="NaN";(u||n||s)&&(i.type==="MemberExpression"?H(i,t):i.type==="Identifier"&&!l&&!p&&!c&&!f&&ie(i))},MemberExpression(i,r,a){H(i,t),i.object&&a(i.object,{parent:i,inNamespaceCall:r.inNamespaceCall})},CallExpression(i,r,a){const s=i.callee&&i.callee.type==="MemberExpression"&&i.callee.object&&i.callee.object.type==="Identifier"&&t.isContextBound(i.callee.object.name);R(i,t),i.arguments.forEach(n=>a(n,{parent:i,inNamespaceCall:s||r.inNamespaceCall}))}})}function Qi(e,t,i=!1){e.params.forEach(r=>{r.type==="Identifier"&&t.addContextBoundVar(r.name,i)})}function $t(e,t){const i=t.getCurrentScopeType();e.argument&&(e.argument.type==="ArrayExpression"?(e.argument.elements=e.argument.elements.map(r=>{if(r.type==="Identifier"){if(t.isContextBound(r.name)&&!t.isRootParam(r.name))return{type:"MemberExpression",object:r,property:{type:"Literal",value:0},computed:!0};const[a,s]=t.getVariable(r.name);return{type:"MemberExpression",object:{type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:s},computed:!1},property:{type:"Identifier",name:a},computed:!1},property:{type:"Literal",value:0},computed:!0}}else if(r.type==="MemberExpression")return r.computed&&r.object.type==="Identifier"&&t.isContextBound(r.object.name)&&!t.isRootParam(r.object.name)||U(r,"",t),r;return r}),e.argument={type:"ArrayExpression",elements:[e.argument]}):e.argument.type==="BinaryExpression"?N(e.argument,t,{Identifier(r,a){B(r,a),r.type==="Identifier"&&ie(r)},MemberExpression(r){U(r,"",t)}}):e.argument.type==="ObjectExpression"?e.argument.properties=e.argument.properties.map(r=>{if(r.shorthand){const[a,s]=t.getVariable(r.value.name);return{type:"Property",key:{type:"Identifier",name:r.key.name},value:{type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:s},computed:!1},property:{type:"Identifier",name:a},computed:!1},kind:"init",method:!1,shorthand:!1,computed:!1}}return r}):e.argument.type==="Identifier"&&(B(e.argument,t),e.argument.type==="Identifier"&&ie(e.argument)),i==="fn"&&(e.argument.type==="Identifier"&&t.isContextBound(e.argument.name)&&!t.isRootParam(e.argument.name)?e.argument={type:"MemberExpression",object:e.argument,property:{type:"Literal",value:0},computed:!0}:e.argument.type==="MemberExpression"?e.argument.object.type==="Identifier"&&t.isContextBound(e.argument.object.name)&&!t.isRootParam(e.argument.object.name)&&(e.argument._indexTransformed||(H(e.argument,t),e.argument._indexTransformed=!0)):(e.argument.type==="BinaryExpression"||e.argument.type==="LogicalExpression"||e.argument.type==="ConditionalExpression"||e.argument.type==="CallExpression")&&N(e.argument,t,{Identifier(r,a){B(r,a),r.type==="Identifier"&&!r._arrayAccessed&&(ie(r),r._arrayAccessed=!0)},MemberExpression(r){U(r,"",t)},CallExpression(r,a){R(r,a)}}),e.argument={type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:"precision"}},arguments:[e.argument]}))}function le(e,t){if(e.type==="Identifier"){if(e.name==="na")return e.name="NaN",e;if(t.isLoopVariable(e.name))return e;if(t.isRootParam(e.name)){const[a,s]=t.getVariable(e.name);return{type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:s},computed:!1},property:{type:"Identifier",name:a},computed:!1}}if(t.isContextBound(e.name))return e;const[i,r]=t.getVariable(e.name);return{type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:r},computed:!1},property:{type:"Identifier",name:i},computed:!1}}return e}function Ht(e,t,i){const r=de(e.argument,t,i);return{type:"UnaryExpression",operator:e.operator,prefix:e.prefix,argument:r,start:e.start,end:e.end}}function de(e,t,i=""){switch(e.type){case"BinaryExpression":return Kt(e,t,i);case"MemberExpression":return{type:"MemberExpression",object:e.object.type==="Identifier"?le(e.object,t):e.object,property:e.property,computed:e.computed};case"Identifier":return t.isLoopVariable(e.name)||e.parent&&e.parent.type==="MemberExpression"&&e.parent.property===e?e:{type:"MemberExpression",object:le(e,t),property:{type:"Literal",value:0},computed:!0};case"UnaryExpression":return Ht(e,t,i)}return e}function Kt(e,t,i){const r=de(e.left,t,i),a=de(e.right,t,i),s={type:"BinaryExpression",operator:e.operator,left:r,right:a,start:e.start,end:e.end};return N(s,t,{CallExpression(n,u){n._transformed||R(n,u)},MemberExpression(n){U(n,"",t)}}),s}function Yi(e,t,i){const r=de(e.left,t,i),a=de(e.right,t,i),s={type:"LogicalExpression",operator:e.operator,left:r,right:a,start:e.start,end:e.end};return N(s,t,{CallExpression(n,u){n._transformed||R(n,u)}}),s}function Xi(e,t,i){return N(e,{parent:e,inNamespaceCall:!1},{Identifier(r,a,s){if(r.name=="NaN")return;if(r.name=="na"){r.name="NaN";return}r.parent=a.parent,B(r,t);const n=r.parent&&r.parent.type==="BinaryExpression";(r.parent&&r.parent.type==="ConditionalExpression"||n)&&(r.type==="MemberExpression"?H(r,t):r.type==="Identifier"&&ie(r))},MemberExpression(r,a,s){H(r,t),r.object&&s(r.object,{parent:r,inNamespaceCall:a.inNamespaceCall})},CallExpression(r,a,s){const n=r.callee&&r.callee.type==="MemberExpression"&&r.callee.object&&r.callee.object.type==="Identifier"&&t.isContextBound(r.callee.object.name);R(r,t),r.arguments.forEach(u=>s(u,{parent:r,inNamespaceCall:n||a.inNamespaceCall}))}}),{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:i},property:{type:"Identifier",name:"param"}},arguments:[e,De,t.nextParamIdArg],_transformed:!0,_isParamCall:!0}}function ot(e,t,i){switch(e?.type){case"BinaryExpression":e=Kt(e,i,t);break;case"LogicalExpression":e=Yi(e,i,t);break;case"ConditionalExpression":return Xi(e,i,t);case"UnaryExpression":e=Ht(e,i,t);break}if(e.type==="MemberExpression"&&e.computed&&e.property){const r=e.object.type==="Identifier"&&i.isContextBound(e.object.name)&&!i.isRootParam(e.object.name)?e.object:le(e.object,i),a=e.property.type==="Identifier"&&!i.isContextBound(e.property.name)&&!i.isLoopVariable(e.property.name)?le(e.property,i):e.property;return{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:t},property:{type:"Identifier",name:"param"},computed:!1},arguments:[r,a,i.nextParamIdArg],_transformed:!0,_isParamCall:!0}}if(e.type==="ObjectExpression"&&(e.properties=e.properties.map(r=>{if(r.value.name){const[a,s]=i.getVariable(r.value.name);return{type:"Property",key:{type:"Identifier",name:r.key.name},value:{type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:A},property:{type:"Identifier",name:s},computed:!1},property:{type:"Identifier",name:a},computed:!1},kind:"init",method:!1,shorthand:!1,computed:!1}}return r})),e.type==="Identifier"){if(e.name==="na")return e.name="NaN",e;if(i.isContextBound(e.name)&&!i.isRootParam(e.name))return{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:t},property:{type:"Identifier",name:"param"},computed:!1},arguments:[e,De,i.nextParamIdArg],_transformed:!0,_isParamCall:!0}}return e?.type==="CallExpression"&&R(e,i),{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:t},property:{type:"Identifier",name:"param"},computed:!1},arguments:[e.type==="Identifier"?le(e,i):e,De,i.nextParamIdArg],_transformed:!0,_isParamCall:!0}}function R(e,t,i){if(!e._transformed){if(e.callee&&e.callee.type==="MemberExpression"&&e.callee.object&&e.callee.object.type==="Identifier"&&(t.isContextBound(e.callee.object.name)||e.callee.object.name==="math"||e.callee.object.name==="ta")){const r=e.callee.object.name;e.arguments=e.arguments.map(a=>a._isParamCall?a:ot(a,r,t)),r==="ta"&&e.arguments.push(t.getNextTACallId()),e._transformed=!0}else e.callee&&e.callee.type==="Identifier"&&(e.arguments=e.arguments.map(r=>r._isParamCall?r:ot(r,A,t)),e._transformed=!0);e.arguments.forEach(r=>{N(r,t,{Identifier(a,s,n){a.parent=s.parent,B(a,t);const u=a.parent&&a.parent.type==="BinaryExpression";(a.parent&&a.parent.type==="ConditionalExpression"||u)&&(a.type==="MemberExpression"?H(a,t):a.type==="Identifier"&&ie(a))},CallExpression(a,s,n){a._transformed||R(a,s)},MemberExpression(a,s,n){U(a,"",t),a.object&&n(a.object,{parent:a,inNamespaceCall:s.inNamespaceCall})}})})}}function Zi(e,t){const i=[];e.params.forEach(r=>{r.type==="Identifier"&&(t.addContextBoundVar(r.name,!1),i.push(r.name))}),e.body&&e.body.type==="BlockStatement"&&(t.pushScope("fn"),N(e.body,t,{BlockStatement(r,a,s){r.body.forEach(n=>s(n,a))},ReturnStatement(r,a){$t(r,a)},VariableDeclaration(r,a){Ke(r,a)},Identifier(r,a){B(r,a)},CallExpression(r,a){R(r,a),r.arguments.forEach(s=>{s.type==="BinaryExpression"&&N(s,a,{CallExpression(n,u){R(n,u)},MemberExpression(n){U(n,"",a)}})})},MemberExpression(r){U(r,"",t)},AssignmentExpression(r,a){Qe(r,a)},ForStatement(r,a,s){Qt(r,a,s)},IfStatement(r,a,s){Yt(r,a,s)},BinaryExpression(r,a,s){N(r,a,{CallExpression(n,u){R(n,u)},MemberExpression(n){U(n,"",a)}})}}),t.popScope())}function ie(e,t){Object.assign(e,{type:"MemberExpression",object:{type:"Identifier",name:e.name,start:e.start,end:e.end},property:{type:"Literal",value:0},computed:!0,_indexTransformed:!0})}function Qt(e,t,i){if(e.init&&e.init.type==="VariableDeclaration"){const r=e.init.declarations[0],a=r.id.name;t.addLoopVariable(a,a),e.init={type:"VariableDeclaration",kind:e.init.kind,declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:a},init:r.init}]},r.init&&N(r.init,t,{Identifier(s,n){t.isLoopVariable(s.name)||(t.pushScope("for"),B(s,n),t.popScope())},MemberExpression(s){t.pushScope("for"),U(s,"",t),t.popScope()}})}e.test&&N(e.test,t,{Identifier(r,a){!t.isLoopVariable(r.name)&&!r.computed&&(t.pushScope("for"),B(r,a),r.type==="Identifier"&&(r.computed=!0,ie(r)),t.popScope())},MemberExpression(r){t.pushScope("for"),U(r,"",t),t.popScope()}}),e.update&&N(e.update,t,{Identifier(r,a){t.isLoopVariable(r.name)||(t.pushScope("for"),B(r,a),t.popScope())}}),t.pushScope("for"),i(e.body,t),t.popScope()}function Ji(e,t){N(e,t,{MemberExpression(i){U(i,"",t)},CallExpression(i,r){R(i,r)},Identifier(i,r){B(i,r);const a=t.getCurrentScopeType()==="if";t.isContextBound(i.name)&&!t.isRootParam(i.name)&&a&&ie(i)}})}function Yt(e,t,i){e.test&&(t.pushScope("if"),Ji(e.test,t),t.popScope()),t.pushScope("if"),i(e.consequent,t),t.popScope(),e.alternate&&(t.pushScope("els"),i(e.alternate,t),t.popScope())}function er(e){N(e,null,{VariableDeclaration(t,i,r){t.declarations&&t.declarations.length>0&&t.declarations.forEach(a=>{if(a.init&&a.init.type==="ArrowFunctionExpression"&&a.init.start!==0){const s={type:"FunctionDeclaration",id:a.id,params:a.init.params,body:a.init.body.type==="BlockStatement"?a.init.body:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:a.init.body}]},async:a.init.async,generator:!1};Object.assign(t,s)}}),t.body&&t.body.body&&t.body.body.forEach(a=>r(a,i))}})}function tr(e,t){$e(e,{VariableDeclaration(i){i.declarations.forEach(r=>{const a=r.init&&r.init.type==="MemberExpression"&&r.init.object&&(r.init.object.name==="context"||r.init.object.name===A||r.init.object.name==="context2"),s=r.init&&r.init.type==="MemberExpression"&&r.init.object?.object&&(r.init.object.object.name==="context"||r.init.object.object.name===A||r.init.object.object.name==="context2");(a||s)&&(r.id.name&&t.addContextBoundVar(r.id.name),r.id.properties&&r.id.properties.forEach(n=>{n.key.name&&t.addContextBoundVar(n.key.name)}))})}})}function ir(e){let t=typeof e=="function"?e.toString():e;const i=ji(t.trim(),{ecmaVersion:"latest",sourceType:"module"});er(i);const r=new Ki;let a;tr(i,r),$e(i,{FunctionDeclaration(n){Zi(n,r)},ArrowFunctionExpression(n){const u=n.start===0;u&&n.params&&n.params.length>0&&(a=n.params[0].name,n.params[0].name=A),Qi(n,r,u)},VariableDeclaration(n){n.declarations.forEach(u=>{if(u.id.type==="ArrayPattern"){const p=r.generateTempVar(),c={type:"VariableDeclaration",kind:n.kind,declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:p},init:u.init}]};u.id.elements?.forEach(f=>{f.type==="Identifier"&&r.addArrayPatternElement(f.name)});const l=u.id.elements.map((f,h)=>({type:"VariableDeclaration",kind:n.kind,declarations:[{type:"VariableDeclarator",id:f,init:{type:"MemberExpression",object:{type:"Identifier",name:p},property:{type:"Literal",value:h},computed:!0}}]}));Object.assign(n,{type:"BlockStatement",body:[c,...l]})}})},ForStatement(n){}}),N(i,r,{BlockStatement(n,u,p){n.body.forEach(c=>p(c,u))},ReturnStatement(n,u){$t(n,u)},VariableDeclaration(n,u){Ke(n,u)},Identifier(n,u){B(n,u)},CallExpression(n,u){R(n,u)},MemberExpression(n){U(n,a,r)},AssignmentExpression(n,u){Qe(n,u)},FunctionDeclaration(n,u){},ForStatement(n,u,p){Qt(n,u,p)},IfStatement(n,u,p){Yt(n,u,p)}}),rr(i);const s=Hi(i);return new Function("",`return ${s}`)(this)}function rr(e){$e(e,{BinaryExpression(t){if(t.operator==="=="||t.operator==="==="){const i=t.left,r=t.right;Object.assign(t,{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"$.math"},property:{type:"Identifier",name:"__eq"},computed:!1},arguments:[i,r],_transformed:!0})}}})}const ar=5e3;class Xt{constructor(t,i,r,a,s,n){this.source=t,this.tickerId=i,this.timeframe=r,this.limit=a,this.sDate=s,this.eDate=n,this._readyPromise=new Promise(u=>{this.loadMarketData(t,i,r,a,s,n).then(p=>{const c=p.slice(0,ar);this._periods=c.length,this.data=c;const l=c.map(C=>C.open),f=c.map(C=>C.close),h=c.map(C=>C.high),x=c.map(C=>C.low),g=c.map(C=>C.volume),E=c.map(C=>(C.high+C.low+C.close)/3),_=c.map(C=>(C.high+C.low)/2),P=c.map(C=>(C.high+C.low+C.open+C.close)/4),Y=c.map(C=>C.openTime),$=c.map(C=>C.closeTime);this.open=l,this.close=f,this.high=h,this.low=x,this.volume=g,this.hl2=_,this.hlc3=E,this.ohlc4=P,this.openTime=Y,this.closeTime=$,this._ready=!0,u(!0)})})}data=[];open=[];high=[];low=[];close=[];volume=[];hl2=[];hlc3=[];ohlc4=[];openTime=[];closeTime=[];_periods=void 0;get periods(){return this._periods}_readyPromise=null;_ready=!1;async loadMarketData(t,i,r,a,s,n){return Array.isArray(t)?t:t.getMarketData(i,r,a,s,n)}async ready(){if(this._ready)return!0;if(!this._readyPromise)throw new Error("PineTS is not ready");return this._readyPromise}async run(t,i,r){await this.ready(),i||(i=this._periods);const a=new Zt({marketData:this.data,source:this.source,tickerId:this.tickerId,timeframe:this.timeframe,limit:this.limit,sDate:this.sDate,eDate:this.eDate});a.pineTSCode=t,a.useTACache=r;let s=ir.bind(this)(t);a.data.close=[],a.data.open=[],a.data.high=[],a.data.low=[],a.data.volume=[],a.data.hl2=[],a.data.hlc3=[],a.data.ohlc4=[],a.data.openTime=[],a.data.closeTime=[];const n=["const","var","let","params"];for(let u=this._periods-i;u<this._periods;u++){a.idx=u,a.data.close.unshift(this.close[u]),a.data.open.unshift(this.open[u]),a.data.high.unshift(this.high[u]),a.data.low.unshift(this.low[u]),a.data.volume.unshift(this.volume[u]),a.data.hl2.unshift(this.hl2[u]),a.data.hlc3.unshift(this.hlc3[u]),a.data.ohlc4.unshift(this.ohlc4[u]),a.data.openTime.unshift(this.openTime[u]);const p=await s(a);if(typeof p=="object"){typeof a.result!="object"&&(a.result={});for(let c in p){a.result[c]===void 0&&(a.result[c]=[]);const l=Array.isArray(p[c])?p[c][0]:p[c];a.result[c].push(l)}}else Array.isArray(a.result)||(a.result=[]),a.result.push(p);for(let c of n)for(let l in a[c])if(Array.isArray(a[c][l])){const f=a[c][l][0];a[c][l].unshift(f)}}return a}}class sr{constructor(t){this.context=t}color={param:(t,i=0)=>Array.isArray(t)?t[i]:t,rgb:(t,i,r,a)=>a?`rgba(${t}, ${i}, ${r}, ${a})`:`rgb(${t}, ${i}, ${r})`,new:(t,i)=>{if(t&&t.startsWith("#")){const r=t.slice(1),a=parseInt(r.slice(0,2),16),s=parseInt(r.slice(2,4),16),n=parseInt(r.slice(4,6),16);return i?`rgba(${a}, ${s}, ${n}, ${i})`:`rgb(${a}, ${s}, ${n})`}return i?`rgba(${t}, ${i})`:t},white:"white",lime:"lime",green:"green",red:"red",maroon:"maroon",black:"black",gray:"gray",blue:"blue"};extractPlotOptions(t){const i={};for(let r in t)Array.isArray(t[r])?i[r]=t[r][0]:i[r]=t[r];return i}indicator(t,i,r){}plotchar(t,i,r){this.context.plots[i]||(this.context.plots[i]={data:[],options:this.extractPlotOptions(r),title:i}),this.context.plots[i].data.push({time:this.context.marketData[this.context.marketData.length-this.context.idx-1].openTime,value:t[0],options:{...this.extractPlotOptions(r),style:"char"}})}plot(t,i,r){this.context.plots[i]||(this.context.plots[i]={data:[],options:this.extractPlotOptions(r),title:i}),this.context.plots[i].data.push({time:this.context.marketData[this.context.marketData.length-this.context.idx-1].openTime,value:t[0],options:this.extractPlotOptions(r)})}na(t){return Array.isArray(t)?isNaN(t[0]):isNaN(t)}nz(t,i=0){const r=Array.isArray(t)?t[0]:t,a=Array.isArray(t)?i[0]:i;return isNaN(r)?a:r}}class nr{constructor(t){this.context=t}param(t,i=0){return Array.isArray(t)?[t[i]]:[t]}any(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}int(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}float(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}bool(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}string(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}timeframe(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}time(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}price(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}session(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}source(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}symbol(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}text_area(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}enum(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}color(t,{title:i,group:r}={}){return Array.isArray(t)?t[0]:t}}class or{constructor(t){this.context=t}_cache={};param(t,i,r){return this.context.params[r]||(this.context.params[r]=[]),Array.isArray(t)?i?(this.context.params[r]=t.slice(i),this.context.params[r].length=t.length,this.context.params[r]):(this.context.params[r]=t.slice(0),this.context.params[r]):(this.context.params[r][0]=t,this.context.params[r])}__eq(t,i){return Math.abs(t-i)<1e-8}abs(t){return Math.abs(t[0])}pow(t,i){return Math.pow(t[0],i[0])}sqrt(t){return Math.sqrt(t[0])}log(t){return Math.log(t[0])}ln(t){return Math.log(t[0])}exp(t){return Math.exp(t[0])}floor(t){return Math.floor(t[0])}ceil(t){return Math.ceil(t[0])}round(t){return Math.round(t[0])}random(){return Math.random()}max(...t){const i=t.map(r=>Array.isArray(r)?r[0]:r);return Math.max(...i)}min(...t){const i=t.map(r=>Array.isArray(r)?r[0]:r);return Math.min(...i)}sum(t,i){const r=Array.isArray(i)?i[0]:i;return Array.isArray(t)?t.slice(0,r).reduce((a,s)=>a+s,0):t}sin(t){return Math.sin(t[0])}cos(t){return Math.cos(t[0])}tan(t){return Math.tan(t[0])}acos(t){return Math.acos(t[0])}asin(t){return Math.asin(t[0])}atan(t){return Math.atan(t[0])}avg(...t){const i=t.map(r=>Array.isArray(r)?r[0]:r);return i.reduce((r,a)=>{const s=Array.isArray(r)?r[0]:r,n=Array.isArray(a)?a[0]:a;return s+n},0)/i.length}}const ut=["1","3","5","15","30","45","60","120","180","240","D","W","M"];class ur{constructor(t){this.context=t}_cache={};param(t,i,r){return this.context.params[r]||(this.context.params[r]=[]),Array.isArray(t)?(i?this.context.params[r]=t.slice(i):this.context.params[r]=t.slice(0),[t[i],r]):(this.context.params[r][0]=t,[t,r])}async security(t,i,r,a=!1,s=!1,n=!1,u=null,p=null){const c=t[0],l=i[0],f=r[0],h=r[1],x=ut.indexOf(this.context.timeframe),g=ut.indexOf(l);if(x==-1||g==-1)throw new Error("Invalid timeframe");if(x>g)throw new Error("Only higher timeframes are supported for now");if(x===g)return f;const E=this.context.data.openTime[0],_=this.context.data.closeTime[0];if(this.context.cache[h]){const $=this.context.cache[h],C=this._findSecContextIdx(E,_,$.data.openTime,$.data.closeTime,s);return C==-1?NaN:$.params[h][C]}const P=await new Xt(this.context.source,c,l,this.context.limit||1e3,this.context.sDate,this.context.eDate).run(this.context.pineTSCode);this.context.cache[h]=P;const Y=this._findSecContextIdx(E,_,P.data.openTime,P.data.closeTime,s);return Y==-1?NaN:P.params[h][Y]}_findSecContextIdx(t,i,r,a,s=!1){for(let n=0;n<r.length;n++)if(r[n]<=t&&i<=a[n])return n+(s?1:2);return-1}}class pr{constructor(t){this.context=t}get tr(){return this.context.math.max(this.context.data.high[0]-this.context.data.low[0],this.context.math.abs(this.context.data.high[0]-this.context.data.close[1]),this.context.math.abs(this.context.data.low[0]-this.context.data.close[1]))}param(t,i,r){return this.context.params[r]||(this.context.params[r]=[]),Array.isArray(t)?i?(this.context.params[r]=t.slice(i),this.context.params[r].length=t.length,this.context.params[r]):(this.context.params[r]=t.slice(0),this.context.params[r]):(this.context.params[r][0]=t,this.context.params[r])}ema(t,i,r){const a=Array.isArray(i)?i[0]:i;this.context.taState||(this.context.taState={});const s=r||`ema_${a}`;this.context.taState[s]||(this.context.taState[s]={prevEma:null,initSum:0,initCount:0});const n=this.context.taState[s],u=t[0];if(n.initCount<a)return n.initSum+=u,n.initCount++,n.initCount===a?(n.prevEma=n.initSum/a,this.context.precision(n.prevEma)):NaN;const p=2/(a+1),c=u*p+n.prevEma*(1-p);return n.prevEma=c,this.context.precision(c)}sma(t,i,r){const a=Array.isArray(i)?i[0]:i;this.context.taState||(this.context.taState={});const s=r||`sma_${a}`;this.context.taState[s]||(this.context.taState[s]={window:[],sum:0});const n=this.context.taState[s],u=t[0]||0;if(n.window.unshift(u),n.sum+=u,n.window.length<a)return NaN;if(n.window.length>a){const c=n.window.pop();n.sum-=c}const p=n.sum/a;return this.context.precision(p)}vwma(t,i,r){const a=Array.isArray(i)?i[0]:i;this.context.taState||(this.context.taState={});const s=r||`vwma_${a}`;this.context.taState[s]||(this.context.taState[s]={window:[],volumeWindow:[]});const n=this.context.taState[s],u=t[0],p=this.context.data.volume[0];if(n.window.unshift(u),n.volumeWindow.unshift(p),n.window.length<a)return NaN;n.window.length>a&&(n.window.pop(),n.volumeWindow.pop());let c=0,l=0;for(let h=0;h<a;h++)c+=n.window[h]*n.volumeWindow[h],l+=n.volumeWindow[h];const f=c/l;return this.context.precision(f)}wma(t,i,r){const a=Array.isArray(i)?i[0]:i;this.context.taState||(this.context.taState={});const s=r||`wma_${a}`;this.context.taState[s]||(this.context.taState[s]={window:[]});const n=this.context.taState[s],u=t[0];if(n.window.unshift(u),n.window.length<a)return NaN;n.window.length>a&&n.window.pop();let p=0,c=0;for(let f=0;f<a;f++){const h=a-f;p+=n.window[f]*h,c+=h}const l=p/c;return this.context.precision(l)}hma(t,i,r){const a=Array.isArray(i)?i[0]:i,s=Math.floor(a/2),n=Math.floor(Math.sqrt(a)),u=this.wma(t,s,r?`${r}_wma1`:void 0),p=this.wma(t,a,r?`${r}_wma2`:void 0);if(isNaN(u)||isNaN(p))return NaN;this.context.taState||(this.context.taState={});const c=r||`hma_raw_${a}`;this.context.taState[c]||(this.context.taState[c]=[]);const l=2*u-p;this.context.taState[c].unshift(l);const f=r?`${r}_hma_final`:`hma_final_${a}`;this.context.taState[f]||(this.context.taState[f]={window:[]});const h=this.context.taState[f];if(h.window.unshift(l),h.window.length<n)return NaN;h.window.length>n&&h.window.pop();let x=0,g=0;for(let _=0;_<n;_++){const P=n-_;x+=h.window[_]*P,g+=P}const E=x/g;return this.context.precision(E)}rma(t,i,r){const a=Array.isArray(i)?i[0]:i;this.context.taState||(this.context.taState={});const s=r||`rma_${a}`;this.context.taState[s]||(this.context.taState[s]={prevRma:null,initSum:0,initCount:0});const n=this.context.taState[s],u=t[0]||0;if(n.initCount<a)return n.initSum+=u,n.initCount++,n.initCount===a?(n.prevRma=n.initSum/a,this.context.precision(n.prevRma)):NaN;const p=1/a,c=u*p+n.prevRma*(1-p);return n.prevRma=c,this.context.precision(c)}change(t,i=1,r){const a=Array.isArray(i)?i[0]:i;this.context.taState||(this.context.taState={});const s=r||`change_${a}`;this.context.taState[s]||(this.context.taState[s]={window:[]});const n=this.context.taState[s],u=t[0];if(n.window.unshift(u),n.window.length<=a)return NaN;n.window.length>a+1&&n.window.pop();const p=u-n.window[a];return this.context.precision(p)}rsi(t,i,r){const a=Array.isArray(i)?i[0]:i;this.context.taState||(this.context.taState={});const s=r||`rsi_${a}`;this.context.taState[s]||(this.context.taState[s]={prevValue:null,avgGain:0,avgLoss:0,initGains:[],initLosses:[]});const n=this.context.taState[s],u=t[0];if(n.prevValue!==null){const p=u-n.prevValue,c=p>0?p:0,l=p<0?-p:0;if(n.initGains.length<a){if(n.initGains.push(c),n.initLosses.push(l),n.initGains.length===a){n.avgGain=n.initGains.reduce((x,g)=>x+g,0)/a,n.avgLoss=n.initLosses.reduce((x,g)=>x+g,0)/a,n.prevValue=u;const h=n.avgLoss===0?100:100-100/(1+n.avgGain/n.avgLoss);return this.context.precision(h)}return n.prevValue=u,NaN}n.avgGain=(n.avgGain*(a-1)+c)/a,n.avgLoss=(n.avgLoss*(a-1)+l)/a;const f=n.avgLoss===0?100:100-100/(1+n.avgGain/n.avgLoss);return n.prevValue=u,this.context.precision(f)}return n.prevValue=u,NaN}atr(t,i){const r=Array.isArray(t)?t[0]:t;this.context.taState||(this.context.taState={});const a=i||`atr_${r}`;this.context.taState[a]||(this.context.taState[a]={prevAtr:null,initSum:0,initCount:0,prevClose:null});const s=this.context.taState[a],n=this.context.data.high[0],u=this.context.data.low[0],p=this.context.data.close[0];let c;if(s.prevClose!==null){const f=n-u,h=Math.abs(n-s.prevClose),x=Math.abs(u-s.prevClose);c=Math.max(f,h,x)}else c=n-u;if(s.prevClose=p,s.initCount<r)return s.initSum+=c,s.initCount++,s.initCount===r?(s.prevAtr=s.initSum/r,this.context.precision(s.prevAtr)):NaN;const l=(s.prevAtr*(r-1)+c)/r;return s.prevAtr=l,this.context.precision(l)}mom(t,i,r){const a=Array.isArray(i)?i[0]:i;return this.change(t,a)}roc(t,i,r){const a=Array.isArray(i)?i[0]:i;this.context.taState||(this.context.taState={});const s=r||`roc_${a}`;this.context.taState[s]||(this.context.taState[s]={window:[]});const n=this.context.taState[s],u=t[0];if(n.window.unshift(u),n.window.length<=a)return NaN;n.window.length>a+1&&n.window.pop();const p=n.window[a],c=(u-p)/p*100;return this.context.precision(c)}dev(t,i,r){const a=Array.isArray(i)?i[0]:i;this.context.taState||(this.context.taState={});const s=r||`dev_${a}`;this.context.taState[s]||(this.context.taState[s]={window:[],sum:0});const n=this.context.taState[s],u=t[0]||0;if(n.window.unshift(u),n.sum+=u,n.window.length<a)return NaN;if(n.window.length>a){const f=n.window.pop();n.sum-=f}const p=n.sum/a;let c=0;for(let f=0;f<a;f++)c+=Math.abs(n.window[f]-p);const l=c/a;return this.context.precision(l)}variance(t,i,r){const a=Array.isArray(i)?i[0]:i;this.context.taState||(this.context.taState={});const s=r||`variance_${a}`;this.context.taState[s]||(this.context.taState[s]={window:[]});const n=this.context.taState[s],u=t[0];if(n.window.unshift(u),n.window.length<a)return NaN;n.window.length>a&&n.window.pop();let p=0,c=0;for(let h=0;h<a;h++)p+=n.window[h],c+=n.window[h]*n.window[h];const l=p/a,f=c/a-l*l;return this.context.precision(f)}highest(t,i,r){const a=Array.isArray(i)?i[0]:i;this.context.taState||(this.context.taState={});const s=r||`highest_${a}`;this.context.taState[s]||(this.context.taState[s]={window:[]});const n=this.context.taState[s],u=t[0];if(n.window.unshift(u),n.window.length<a)return NaN;n.window.length>a&&n.window.pop();const p=Math.max(...n.window.filter(c=>!isNaN(c)));return this.context.precision(p)}lowest(t,i,r){const a=Array.isArray(i)?i[0]:i;this.context.taState||(this.context.taState={});const s=r||`lowest_${a}`;this.context.taState[s]||(this.context.taState[s]={window:[]});const n=this.context.taState[s],u=t[0];if(n.window.unshift(u),n.window.length<a)return NaN;n.window.length>a&&n.window.pop();const p=n.window.filter(l=>!isNaN(l)&&l!==void 0),c=p.length>0?Math.min(...p):NaN;return this.context.precision(c)}median(t,i,r){const a=Array.isArray(i)?i[0]:i;this.context.taState||(this.context.taState={});const s=r||`median_${a}`;this.context.taState[s]||(this.context.taState[s]={window:[]});const n=this.context.taState[s],u=t[0];if(n.window.unshift(u),n.window.length<a)return NaN;n.window.length>a&&n.window.pop();const p=n.window.slice().sort((f,h)=>f-h),c=Math.floor(a/2),l=a%2===0?(p[c-1]+p[c])/2:p[c];return this.context.precision(l)}stdev(t,i,r=!0,a){const s=Array.isArray(i)?i[0]:i,n=Array.isArray(r)?r[0]:r;this.context.taState||(this.context.taState={});const u=a||`stdev_${s}_${n}`;this.context.taState[u]||(this.context.taState[u]={window:[],sum:0});const p=this.context.taState[u],c=t[0];if(p.window.unshift(c),p.sum+=c,p.window.length<s)return NaN;if(p.window.length>s){const g=p.window.pop();p.sum-=g}const l=p.sum/s;let f=0;for(let g=0;g<s;g++)f+=Math.pow(p.window[g]-l,2);const h=n?s:s-1,x=Math.sqrt(f/h);return this.context.precision(x)}linreg(t,i,r,a){const s=Array.isArray(i)?i[0]:i,n=Array.isArray(r)?r[0]:r;this.context.taState||(this.context.taState={});const u=a||`linreg_${s}_${n}`;this.context.taState[u]||(this.context.taState[u]={window:[]});const p=this.context.taState[u],c=t[0];if(p.window.unshift(c),p.window.length<s)return NaN;p.window.length>s&&p.window.pop();let l=0,f=0,h=0,x=0;const g=s;for(let Y=0;Y<s;Y++){const $=s-1-Y,C=p.window[Y];l+=$,f+=C,h+=$*C,x+=$*$}const E=g*x-l*l;if(E===0)return NaN;const _=(g*h-l*f)/E,P=(f-_*l)/g+_*(s-1-n);return this.context.precision(P)}supertrend(t,i,r){const a=Array.isArray(t)?t[0]:t,s=Array.isArray(i)?i[0]:i;this.context.taState||(this.context.taState={});const n=`supertrend_${a}_${s}`;this.context.taState[n]||(this.context.taState[n]={prevUpperBand:null,prevLowerBand:null,prevSupertrend:null,prevDirection:null});const u=this.context.taState[n],p=this.context.data.high[0],c=this.context.data.low[0],l=this.context.data.close[0],f=this.atr(s,r?`${r}_atr`:void 0);if(isNaN(f))return[[NaN,0]];const h=(p+c)/2;let x=h+a*f,g=h-a*f;u.prevUpperBand!==null&&(x<u.prevUpperBand||this.context.data.close[1]>u.prevUpperBand?x=x:x=u.prevUpperBand,g>u.prevLowerBand||this.context.data.close[1]<u.prevLowerBand?g=g:g=u.prevLowerBand);let E,_;return u.prevSupertrend===null?(E=l<=x?-1:1,_=E===-1?x:g):u.prevSupertrend===u.prevUpperBand?l>x?(E=1,_=g):(E=-1,_=x):l<g?(E=-1,_=x):(E=1,_=g),u.prevUpperBand=x,u.prevLowerBand=g,u.prevSupertrend=_,u.prevDirection=E,[[this.context.precision(_),E]]}crossover(t,i){const r=Array.isArray(t)?t[0]:t,a=Array.isArray(i)?i[0]:i,s=Array.isArray(t)?t[1]:this.context.data.series[t][1],n=Array.isArray(i)?i[1]:this.context.data.series[i][1];return s<n&&r>a}crossunder(t,i){const r=Array.isArray(t)?t[0]:t,a=Array.isArray(i)?i[0]:i,s=Array.isArray(t)?t[1]:this.context.data.series[t][1],n=Array.isArray(i)?i[1]:this.context.data.series[i][1];return s>n&&r<a}pivothigh(t,i,r){r==null&&(r=i,i=t,t=this.context.data.high);const a=Array.isArray(i)?i[0]:i,s=Array.isArray(r)?r[0]:r,n=cr(t.slice(0).reverse(),a,s),u=this.context.idx;return this.context.precision(n[u])}pivotlow(t,i,r){r==null&&(r=i,i=t,t=this.context.data.low);const a=Array.isArray(i)?i[0]:i,s=Array.isArray(r)?r[0]:r,n=hr(t.slice(0).reverse(),a,s),u=this.context.idx;return this.context.precision(n[u])}}function cr(e,t,i){const r=new Array(e.length).fill(NaN);for(let a=t+i;a<e.length;a++){const s=e[a-i];let n=!0;for(let u=1;u<=t;u++)if(e[a-i-u]>=s){n=!1;break}if(n){for(let u=1;u<=i;u++)if(e[a-i+u]>=s){n=!1;break}}n&&(r[a]=s)}return r}function hr(e,t,i){const r=new Array(e.length).fill(NaN);for(let a=t+i;a<e.length;a++){const s=e[a-i];let n=!0;for(let u=1;u<=t;u++)if(e[a-i-u]<=s){n=!1;break}if(n){for(let u=1;u<=i;u++)if(e[a-i+u]<=s){n=!1;break}}n&&(r[a]=s)}return r}class M{constructor(t){this.array=t}}class lr{constructor(t){this.context=t}_cache={};param(t,i=0){return Array.isArray(t)?t[i]:t}get(t,i){return t.array[i]}set(t,i,r){t.array[i]=r}push(t,i){t.array.push(i)}sum(t){return t.array.reduce((i,r)=>i+(isNaN(r)?0:r),0)}avg(t){return this.sum(t)/t.array.length}min(t,i=0){return[...t.array].sort((r,a)=>r-a)[i]??this.context.NA}max(t,i=0){return[...t.array].sort((r,a)=>a-r)[i]??this.context.NA}size(t){return t.array.length}new_bool(t,i=!1){return new M(Array(t).fill(i))}new_float(t,i=NaN){return new M(Array(t).fill(i))}new_int(t,i=0){return new M(Array(t).fill(Math.round(i)))}new_string(t,i=""){return new M(Array(t).fill(i))}new(t,i){return new M(Array(t).fill(i))}slice(t,i,r){const a=r!==void 0?r+1:void 0;return new M(t.array.slice(i,a))}reverse(t){t.array.reverse()}includes(t,i){return t.array.includes(i)}indexof(t,i){return t.array.indexOf(i)}lastindexof(t,i){return t.array.lastIndexOf(i)}stdev(t,i=!0){const r=this.avg(t),a=t.array.map(n=>Math.pow(n-r,2)),s=i?t.array.length:t.array.length-1;return Math.sqrt(this.sum(new M(a))/s)}variance(t,i=!0){const r=this.avg(t),a=t.array.map(n=>Math.pow(n-r,2)),s=i?t.array.length:t.array.length-1;return this.sum(new M(a))/s}covariance(t,i,r=!0){if(t.array.length!==i.array.length||t.array.length<2)return NaN;const a=r?t.array.length:t.array.length-1,s=this.avg(t),n=this.avg(i);let u=0;for(let p=0;p<t.array.length;p++)u+=(t.array[p]-s)*(i.array[p]-n);return u/a}first(t){return t.array.length>0?t.array[0]:this.context.NA}last(t){return t.array.length>0?t.array[t.array.length-1]:this.context.NA}clear(t){t.array.length=0}join(t,i=","){return t.array.join(i)}abs(t){return new M(t.array.map(i=>Math.abs(i)))}concat(t,i){return t.array.push(...i.array),t}copy(t){return new M([...t.array])}every(t,i){return t.array.every(i)}fill(t,i,r=0,a){const s=t.array.length,n=a!==void 0?Math.min(a,s):s;for(let u=r;u<n;u++)t.array[u]=i}from(t){return new M([...t])}insert(t,i,r){t.array.splice(i,0,r)}pop(t){return t.array.pop()}range(t){return this.max(t)-this.min(t)}remove(t,i){return i>=0&&i<t.array.length?t.array.splice(i,1)[0]:this.context.NA}shift(t){return t.array.shift()}sort(t,i="asc"){t.array.sort((r,a)=>i==="asc"?r-a:a-r)}sort_indices(t,i){const r=t.array.map((a,s)=>s);return r.sort((a,s)=>{const n=t.array[a],u=t.array[s];return i?i(n,u):n-u}),new M(r)}standardize(t){const i=this.avg(t),r=this.stdev(t);return r===0?new M(t.array.map(()=>0)):new M(t.array.map(a=>(a-i)/r))}unshift(t,i){t.array.unshift(i)}some(t,i){return t.array.some(i)}}class Zt{data={open:[],high:[],low:[],close:[],volume:[],hl2:[],hlc3:[],ohlc4:[]};cache={};taState={};useTACache=!1;NA=NaN;math;ta;input;request;array;core;lang;idx=0;params={};const={};var={};let={};result=void 0;plots={};marketData;source;tickerId;timeframe="";limit;sDate;eDate;pineTSCode;constructor({marketData:t,source:i,tickerId:r,timeframe:a,limit:s,sDate:n,eDate:u}){this.marketData=t,this.source=i,this.tickerId=r,this.timeframe=a,this.limit=s,this.sDate=n,this.eDate=u,this.math=new or(this),this.ta=new pr(this),this.input=new nr(this),this.request=new ur(this),this.array=new lr(this);const p=new sr(this);this.core={plotchar:p.plotchar.bind(p),na:p.na.bind(p),color:p.color,plot:p.plot.bind(p),nz:p.nz.bind(p)}}init(t,i,r=0){return t?!Array.isArray(i)||Array.isArray(i[0])?t[0]=Array.isArray(i?.[0])?i[0]:this.precision(i):t[0]=this.precision(i[i.length-this.idx-1+r]):Array.isArray(i)?t=[this.precision(i[i.length-this.idx-1+r])]:t=[this.precision(i)],t}precision(t,i=10){return typeof t!="number"||isNaN(t)?t:Number(t.toFixed(i))}param(t,i,r){return typeof t=="string"||!Array.isArray(t)&&typeof t=="object"?t:(this.params[r]||(this.params[r]=[]),Array.isArray(t)?i?(this.params[r]=t.slice(i),this.params[r].length=t.length,this.params[r]):(this.params[r]=t.slice(0),this.params[r]):(this.params[r][0]=t,this.params[r]))}}const fr="https://api.binance.com/api/v3",Te={1:"1m",3:"3m",5:"5m",15:"15m",30:"30m",45:null,60:"1h",120:"2h",180:null,240:"4h","4H":"4h","1D":"1d",D:"1d","1W":"1w",W:"1w","1M":"1M",M:"1M"};class mr{cache;cacheDuration;constructor(t=5*60*1e3){this.cache=new Map,this.cacheDuration=t}generateKey(t){return Object.entries(t).filter(([i,r])=>r!==void 0).map(([i,r])=>`${i}:${r}`).join("|")}get(t){const i=this.generateKey(t),r=this.cache.get(i);return r?Date.now()-r.timestamp>this.cacheDuration?(this.cache.delete(i),null):r.data:null}set(t,i){const r=this.generateKey(t);this.cache.set(r,{data:i,timestamp:Date.now()})}clear(){this.cache.clear()}cleanup(){const t=Date.now();for(const[i,r]of this.cache.entries())t-r.timestamp>this.cacheDuration&&this.cache.delete(i)}}class dr{cacheManager;constructor(){this.cacheManager=new mr(5*60*1e3)}async getMarketDataInterval(t,i,r,a){try{const s=Te[i.toUpperCase()];if(!s)return console.error(`Unsupported timeframe: ${i}`),[];const n={"1m":60*1e3,"3m":3*60*1e3,"5m":5*60*1e3,"15m":15*60*1e3,"30m":30*60*1e3,"1h":60*60*1e3,"2h":2*60*60*1e3,"4h":4*60*60*1e3,"1d":24*60*60*1e3,"1w":7*24*60*60*1e3,"1M":30*24*60*60*1e3};let u=[],p=r;const c=a,l=n[s];if(!l)return console.error(`Duration not defined for interval: ${s}`),[];for(;p<c;){const f=Math.min(p+1e3*l,c),h=await this.getMarketData(t,i,1e3,p,f);if(h.length===0)break;u=u.concat(h),p=h[h.length-1].closeTime+1}return u}catch(s){return console.error("Error in getMarketDataInterval:",s),[]}}async getMarketData(t,i,r,a,s){try{const n={tickerId:t,timeframe:i,limit:r,sDate:a,eDate:s},u=this.cacheManager.get(n);if(u)return console.log("cache hit",t,i,r,a,s),u;const p=Te[i.toUpperCase()];if(!p)return console.error(`Unsupported timeframe: ${i}`),[];if(this.shouldPaginate(i,r,a,s)&&a&&s){const h=await this.getMarketDataInterval(t,i,a,s),x=r?h.slice(0,r):h;return this.cacheManager.set(n,x),x}let c=`${fr}/klines?symbol=${t}&interval=${p}`;r&&(c+=`&limit=${Math.min(r,1e3)}`),a&&(c+=`&startTime=${a}`),s&&(c+=`&endTime=${s}`);const l=await fetch(c);if(!l.ok)throw new Error(`HTTP error! status: ${l.status}`);const f=(await l.json()).map(h=>({openTime:parseInt(h[0]),open:parseFloat(h[1]),high:parseFloat(h[2]),low:parseFloat(h[3]),close:parseFloat(h[4]),volume:parseFloat(h[5]),closeTime:parseInt(h[6]),quoteAssetVolume:parseFloat(h[7]),numberOfTrades:parseInt(h[8]),takerBuyBaseAssetVolume:parseFloat(h[9]),takerBuyQuoteAssetVolume:parseFloat(h[10]),ignore:h[11]}));return this.cacheManager.set(n,f),f}catch(n){return console.error("Error in binance.klines:",n),[]}}shouldPaginate(t,i,r,a){if(i&&i>1e3)return!0;if(r&&a){const s=Te[t.toUpperCase()],n={"1m":60*1e3,"3m":3*60*1e3,"5m":5*60*1e3,"15m":15*60*1e3,"30m":30*60*1e3,"1h":60*60*1e3,"2h":2*60*60*1e3,"4h":4*60*60*1e3,"1d":24*60*60*1e3,"1w":7*24*60*60*1e3,"1M":30*24*60*60*1e3}[s];if(n)return Math.ceil((a-r)/n)>1e3}return!1}}const xr={Binance:new dr};exports.Context=Zt;exports.PineTS=Xt;exports.Provider=xr;