butternut
Version:
Experimental ES2015-aware minifier
1 lines • 150 kB
JavaScript
!function(a,b){typeof exports==='object'&&typeof module!=='undefined'?b(exports):typeof define==='function'&&define.amd?define(['exports'],b):(b((a.butternut=a.butternut||{})))}(this,(function(d){'use strict';var g={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},h="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",i={5:h,6:h+" const class extends export import super"},j="\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fd5\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ae\ua7b0-\ua7b7\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc",k="\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\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d4-\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\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\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c03\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\u0d01-\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\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\u1cf2-\u1cf4\u1cf8\u1cf9\u1dc0-\u1df5\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\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",l=new RegExp("["+j+"]"),m=new RegExp("["+j+k+"]");j=k=null;var o=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,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,4149,196,60,67,1213,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,42710,42,4148,12,221,3,5761,10591,541],q=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239];function r(a,b){var c=0x10000;for(var d=0;d<b.length;d+=2){c+=b[d];if(c>a){return !1}c+=b[d+1];if(c>=a){return !0}}}function s(a,b){if(a<65){return a===36}if(a<91){return !0}if(a<97){return a===95}if(a<123){return !0}if(a<=0xffff){return a>=0xaa&&l.test(String.fromCharCode(a))}if(b===!1){return !1}return r(a,o)}function t(a,b){if(a<48){return a===36}if(a<58){return !0}if(a<65){return !1}if(a<91){return !0}if(a<97){return a===95}if(a<123){return !0}if(a<=0xffff){return a>=0xaa&&m.test(String.fromCharCode(a))}if(b===!1){return !1}return r(a,o)||r(a,q)}var u=function c(a,b){b===void 0&&(b={});this.label=a;this.keyword=b.keyword;this.beforeExpr=!!b.beforeExpr;this.startsExpr=!!b.startsExpr;this.isLoop=!!b.isLoop;this.isAssign=!!b.isAssign;this.prefix=!!b.prefix;this.postfix=!!b.postfix;this.binop=b.binop||null;this.updateContext=null};function v(a,b){return new u(a, {beforeExpr:!0,binop:b})}var w={beforeExpr:!0},y={startsExpr:!0},z={};function A(a,b){b===void 0&&(b={});b.keyword=a;return z[a]=new u(a, b)}var B={num:new u("num", y),regexp:new u("regexp", y),string:new u("string", y),name:new u("name", y),eof:new u("eof"),bracketL:new u("[", {beforeExpr:!0,startsExpr:!0}),bracketR:new u("]"),braceL:new u("{", {beforeExpr:!0,startsExpr:!0}),braceR:new u("}"),parenL:new u("(", {beforeExpr:!0,startsExpr:!0}),parenR:new u(")"),comma:new u(",", w),semi:new u(";", w),colon:new u(":", w),dot:new u("."),question:new u("?", w),arrow:new u("=>", w),template:new u("template"),ellipsis:new u("...", w),backQuote:new u("`", y),dollarBraceL:new u("${", {beforeExpr:!0,startsExpr:!0}),eq:new u("=", {beforeExpr:!0,isAssign:!0}),assign:new u("_=", {beforeExpr:!0,isAssign:!0}),incDec:new u("++/--", {prefix:!0,postfix:!0,startsExpr:!0}),prefix:new u("prefix", {beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:v("||",1),logicalAND:v("&&",2),bitwiseOR:v("|",3),bitwiseXOR:v("^",4),bitwiseAND:v("&",5),equality:v("==/!=",6),relational:v("</>",7),bitShift:v("<</>>",8),plusMin:new u("+/-", {beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:v("%",10),star:v("*",10),slash:v("/",10),starstar:new u("**", {beforeExpr:!0}),_break:A("break"),_case:A("case",w),_catch:A("catch"),_continue:A("continue"),_debugger:A("debugger"),_default:A("default",w),_do:A("do",{isLoop:!0,beforeExpr:!0}),_else:A("else",w),_finally:A("finally"),_for:A("for",{isLoop:!0}),_function:A("function",y),_if:A("if"),_return:A("return",w),_switch:A("switch"),_throw:A("throw",w),_try:A("try"),_var:A("var"),_const:A("const"),_while:A("while",{isLoop:!0}),_with:A("with"),_new:A("new",{beforeExpr:!0,startsExpr:!0}),_this:A("this",y),_super:A("super",y),_class:A("class"),_extends:A("extends",w),_export:A("export"),_import:A("import"),_null:A("null",y),_true:A("true",y),_false:A("false",y),_in:A("in",{beforeExpr:!0,binop:7}),_instanceof:A("instanceof",{beforeExpr:!0,binop:7}),_typeof:A("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:A("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:A("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},C=/\r\n?|\n|\u2028|\u2029/,D=new RegExp(C.source, "g");function E(a){return a===10||a===13||a===0x2028||a===0x2029}var F=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,G=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,H=Object.prototype,I=H.hasOwnProperty,J=H.toString;function K(a,b){return I.call(a,b)}var L=Array.isArray||(function(a){return J.call(a)==="[object Array]"}),M=function c(a,b){this.line=a;this.column=b};M.prototype.offset=function b(a){return new M(this.line, this.column+a)};var N=function d(a,b,c){this.start=b;this.end=c;a.sourceFile!==null&&(this.source=a.sourceFile)};function O(a,b){for(var c=1,d=0;;){D.lastIndex=d;var e=D.exec(a);if(e&&e.index<b)++c,d=e.index+e[0].length;else{return new M(c, b-d)}}}var P={ecmaVersion:7,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1,plugins:{}};function Q(a){var b={};for(var c in P)b[c]=a&&K(a,c)?a[c]:P[c];b.ecmaVersion>=2015&&(b.ecmaVersion-=2009);b.allowReserved==null&&(b.allowReserved=b.ecmaVersion<5);if(L(b.onToken)){var d=b.onToken;b.onToken=function(a){return d.push(a)}}L(b.onComment)&&(b.onComment=R(b,b.onComment));return b}function R(a,b){return function(c,d,e,f,g,h){var i={type:c?"Block":"Line",value:d,start:e,end:f};a.locations&&(i.loc=new N(this, g, h));a.ranges&&(i.range=[e,f]);b.push(i)}}var S={};function T(a){return new RegExp("^("+a.replace(/ /g,"|")+")$")}var U=function d(a,b,c){this.options=a=Q(a);this.sourceFile=a.sourceFile;this.keywords=T(i[a.ecmaVersion>=6?6:5]);var e="";if(!a.allowReserved){for(var f=a.ecmaVersion;;f--){if(e=g[f]){break}}a.sourceType=="module"&&(e+=" await")}this.reservedWords=T(e);var h=(e?e+" ":"")+g.strict;this.reservedWordsStrict=T(h);this.reservedWordsStrictBind=T(h+" "+g.strictBind);this.input=String(b);this.containsEsc=!1;this.loadPlugins(a.plugins);c?(this.pos=c,this.lineStart=this.input.lastIndexOf("\n",c-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(C).length):(this.pos=this.lineStart=0,this.curLine=1);this.type=B.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=a.sourceType==="module";this.strict=this.inModule||this.strictDirective(this.pos);this.potentialArrowAt=-1;this.inFunction=this.inGenerator=this.inAsync=!1;this.yieldPos=this.awaitPos=0;this.labels=[];this.pos===0&&a.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2);this.scopeStack=[];this.enterFunctionScope()};U.prototype.isKeyword=function b(a){return this.keywords.test(a)};U.prototype.isReservedWord=function b(a){return this.reservedWords.test(a)};U.prototype.extend=function c(a,b){this[a]=b(this[a])};U.prototype.loadPlugins=function b(a){var c=this;for(var d in a){var e=S[d];if(!e){throw new Error("Plugin '"+d+"' not found")}e(c,a[d])}};U.prototype.parse=function a(){var b=this.options.program||this.startNode();this.nextToken();return this.parseTopLevel(b)};var V=U.prototype,W=/^(?:'((?:[^']|\.)*)'|"((?:[^"]|\.)*)"|;)/;V.strictDirective=function(a){var b=this;for(;;){G.lastIndex=a;a+=G.exec(b.input)[0].length;var c=W.exec(b.input.slice(a));if(!c){return !1}if((c[1]||c[2])=="use strict"){return !0}a+=c[0].length}};V.eat=function(a){if(this.type===a){this.next();return !0}else{return !1}};V.isContextual=function(a){return this.type===B.name&&this.value===a};V.eatContextual=function(a){return this.value===a&&this.eat(B.name)};V.expectContextual=function(a){this.eatContextual(a)||this.unexpected()};V.canInsertSemicolon=function(){return this.type===B.eof||this.type===B.braceR||C.test(this.input.slice(this.lastTokEnd,this.start))};V.insertSemicolon=function(){if(this.canInsertSemicolon()){this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc);return !0}};V.semicolon=function(){!this.eat(B.semi)&&!this.insertSemicolon()&&this.unexpected()};V.afterTrailingComma=function(a,b){if(this.type==a){this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc);b||this.next();return !0}};V.expect=function(a){this.eat(a)||this.unexpected()};V.unexpected=function(a){this.raise(a!=null?a:this.start,"Unexpected token")};var X=function a(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=-1};V.checkPatternErrors=function(a,b){if(!a){return}a.trailingComma>-1&&this.raiseRecoverable(a.trailingComma,"Comma is not permitted after the rest element");var c=b?a.parenthesizedAssign:a.parenthesizedBind;c>-1&&this.raiseRecoverable(c,"Parenthesized pattern")};V.checkExpressionErrors=function(a,b){var c=a?a.shorthandAssign:-1;if(!b){return c>=0}c>-1&&this.raise(c,"Shorthand property assignments are valid only in destructuring patterns")};V.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")};V.isSimpleAssignTarget=function(a){if(a.type==="ParenthesizedExpression"){return this.isSimpleAssignTarget(a.expression)}return a.type==="Identifier"||a.type==="MemberExpression"};var Y=U.prototype;Y.parseTopLevel=function(a){var b=this,c={};a.body||(a.body=[]);while(this.type!==B.eof){var d=b.parseStatement(!0,!0,c);a.body.push(d)}this.next();this.options.ecmaVersion>=6&&(a.sourceType=this.options.sourceType);return this.finishNode(a,"Program")};var Z={kind:"loop"},_={kind:"switch"};Y.isLet=function(){if(this.type!==B.name||this.options.ecmaVersion<6||this.value!="let"){return !1}G.lastIndex=this.pos;var a=G.exec(this.input),b=this.pos+a[0].length,c=this.input.charCodeAt(b);if(c===91||c==123){return !0}if(s(c,!0)){var d=b+1;while(t(this.input.charCodeAt(d),!0))++d;var e=this.input.slice(b,d);if(!this.isKeyword(e)){return !0}}return !1};Y.isAsyncFunction=function(){if(this.type!==B.name||this.options.ecmaVersion<8||this.value!="async"){return !1}G.lastIndex=this.pos;var a=G.exec(this.input),b=this.pos+a[0].length;return!C.test(this.input.slice(this.pos,b))&&this.input.slice(b,b+8)==="function"&&(b+8==this.input.length||!t(this.input.charAt(b+8)))};Y.parseStatement=function(a,b,c){var d=this.type,e=this.startNode(),f;this.isLet()&&(d=B._var,f="let");switch(d){case B._break: case B._continue:return this.parseBreakContinueStatement(e,d.keyword);case B._debugger:return this.parseDebuggerStatement(e);case B._do:return this.parseDoStatement(e);case B._for:return this.parseForStatement(e);case B._function:!a&&this.options.ecmaVersion>=6&&this.unexpected();return this.parseFunctionStatement(e,!1);case B._class:a||this.unexpected();return this.parseClass(e,!0);case B._if:return this.parseIfStatement(e);case B._return:return this.parseReturnStatement(e);case B._switch:return this.parseSwitchStatement(e);case B._throw:return this.parseThrowStatement(e);case B._try:return this.parseTryStatement(e);case B._const: case B._var:f=f||this.value;!a&&f!="var"&&this.unexpected();return this.parseVarStatement(e,f);case B._while:return this.parseWhileStatement(e);case B._with:return this.parseWithStatement(e);case B.braceL:return this.parseBlock();case B.semi:return this.parseEmptyStatement(e);case B._export:;case B._import:this.options.allowImportExportEverywhere||(b||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'"));return d===B._import?this.parseImport(e):this.parseExport(e,c);default:if(this.isAsyncFunction()&&a){this.next();return this.parseFunctionStatement(e,!0)};var g=this.value,h=this.parseExpression();if(d===B.name&&h.type==="Identifier"&&this.eat(B.colon)){return this.parseLabeledStatement(e,g,h)}else{return this.parseExpressionStatement(e,h)}}};Y.parseBreakContinueStatement=function(a,b){var c=this,d=b=="break";this.next();this.eat(B.semi)||this.insertSemicolon()?(a.label=null):this.type!==B.name?this.unexpected():(a.label=this.parseIdent(),this.semicolon());var e=0;for(;e<this.labels.length;++e){var f=c.labels[e];if(a.label==null||f.name===a.label.name){if(f.kind!=null&&(d||f.kind==="loop")){break}if(a.label&&d){break}}}e===this.labels.length&&this.raise(a.start,"Unsyntactic "+b);return this.finishNode(a,d?"BreakStatement":"ContinueStatement")};Y.parseDebuggerStatement=function(a){this.next();this.semicolon();return this.finishNode(a,"DebuggerStatement")};Y.parseDoStatement=function(a){this.next();this.labels.push(Z);a.body=this.parseStatement(!1);this.labels.pop();this.expect(B._while);a.test=this.parseParenExpression();this.options.ecmaVersion>=6?this.eat(B.semi):this.semicolon();return this.finishNode(a,"DoWhileStatement")};Y.parseForStatement=function(a){this.next();this.labels.push(Z);this.enterLexicalScope();this.expect(B.parenL);if(this.type===B.semi){return this.parseFor(a,null)}var b=this.isLet();if(this.type===B._var||this.type===B._const||b){var c=this.startNode(),d=b?"let":this.value;this.next();this.parseVar(c,!0,d);this.finishNode(c,"VariableDeclaration");if((this.type===B._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&c.declarations.length===1&&!(d!=="var"&&c.declarations[0].init)){return this.parseForIn(a,c)}return this.parseFor(a,c)}var e=new X,f=this.parseExpression(!0,e);if(this.type===B._in||this.options.ecmaVersion>=6&&this.isContextual("of")){this.toAssignable(f);this.checkLVal(f);this.checkPatternErrors(e,!0);return this.parseForIn(a,f)}else this.checkExpressionErrors(e,!0);return this.parseFor(a,f)};Y.parseFunctionStatement=function(a,b){this.next();return this.parseFunction(a,!0,!1,b)};Y.isFunction=function(){return this.type===B._function||this.isAsyncFunction()};Y.parseIfStatement=function(a){this.next();a.test=this.parseParenExpression();a.consequent=this.parseStatement(!this.strict&&this.isFunction());a.alternate=this.eat(B._else)?this.parseStatement(!this.strict&&this.isFunction()):null;return this.finishNode(a,"IfStatement")};Y.parseReturnStatement=function(a){!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function");this.next();this.eat(B.semi)||this.insertSemicolon()?(a.argument=null):(a.argument=this.parseExpression(),this.semicolon());return this.finishNode(a,"ReturnStatement")};Y.parseSwitchStatement=function(a){var b=this;this.next();a.discriminant=this.parseParenExpression();a.cases=[];this.expect(B.braceL);this.labels.push(_);this.enterLexicalScope();var c;for(var d=!1;this.type!=B.braceR;){if(b.type===B._case||b.type===B._default){var e=b.type===B._case;c&&b.finishNode(c,"SwitchCase");a.cases.push(c=b.startNode());c.consequent=[];b.next();e?(c.test=b.parseExpression()):(d&&b.raiseRecoverable(b.lastTokStart,"Multiple default clauses"),d=!0,c.test=null);b.expect(B.colon)}else c||b.unexpected(),c.consequent.push(b.parseStatement(!0))}this.exitLexicalScope();c&&this.finishNode(c,"SwitchCase");this.next();this.labels.pop();return this.finishNode(a,"SwitchStatement")};Y.parseThrowStatement=function(a){this.next();C.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw");a.argument=this.parseExpression();this.semicolon();return this.finishNode(a,"ThrowStatement")};var $=[];Y.parseTryStatement=function(a){this.next();a.block=this.parseBlock();a.handler=null;if(this.type===B._catch){var b=this.startNode();this.next();this.expect(B.parenL);b.param=this.parseBindingAtom();this.enterLexicalScope();this.checkLVal(b.param,"let");this.expect(B.parenR);b.body=this.parseBlock(!1);this.exitLexicalScope();a.handler=this.finishNode(b,"CatchClause")}a.finalizer=this.eat(B._finally)?this.parseBlock():null;!a.handler&&!a.finalizer&&this.raise(a.start,"Missing catch or finally clause");return this.finishNode(a,"TryStatement")};Y.parseVarStatement=function(a,b){this.next();this.parseVar(a,!1,b);this.semicolon();return this.finishNode(a,"VariableDeclaration")};Y.parseWhileStatement=function(a){this.next();a.test=this.parseParenExpression();this.labels.push(Z);a.body=this.parseStatement(!1);this.labels.pop();return this.finishNode(a,"WhileStatement")};Y.parseWithStatement=function(a){this.strict&&this.raise(this.start,"'with' in strict mode");this.next();a.object=this.parseParenExpression();a.body=this.parseStatement(!1);return this.finishNode(a,"WithStatement")};Y.parseEmptyStatement=function(a){this.next();return this.finishNode(a,"EmptyStatement")};Y.parseLabeledStatement=function(a,b,c){var d=this;for(var e=0;e<this.labels.length;++e)d.labels[e].name===b&&d.raise(c.start,"Label '"+b+"' is already declared");var f=this.type.isLoop?"loop":this.type===B._switch?"switch":null;for(var g=this.labels.length-1;g>=0;g--){var h=d.labels[g];if(h.statementStart==a.start)h.statementStart=d.start,h.kind=f;else{break}}this.labels.push({name:b,kind:f,statementStart:this.start});a.body=this.parseStatement(!0);(a.body.type=="ClassDeclaration"||a.body.type=="VariableDeclaration"&&a.body.kind!="var"||a.body.type=="FunctionDeclaration"&&(this.strict||a.body.generator))&&this.raiseRecoverable(a.body.start,"Invalid labeled declaration");this.labels.pop();a.label=c;return this.finishNode(a,"LabeledStatement")};Y.parseExpressionStatement=function(a,b){a.expression=b;this.semicolon();return this.finishNode(a,"ExpressionStatement")};Y.parseBlock=function(a){var b=this;a===void 0&&(a=!0);var c=this.startNode();c.body=[];this.expect(B.braceL);a&&this.enterLexicalScope();while(!this.eat(B.braceR)){var d=b.parseStatement(!0);c.body.push(d)}a&&this.exitLexicalScope();return this.finishNode(c,"BlockStatement")};Y.parseFor=function(a,b){a.init=b;this.expect(B.semi);a.test=this.type===B.semi?null:this.parseExpression();this.expect(B.semi);a.update=this.type===B.parenR?null:this.parseExpression();this.expect(B.parenR);this.exitLexicalScope();a.body=this.parseStatement(!1);this.labels.pop();return this.finishNode(a,"ForStatement")};Y.parseForIn=function(a,b){var c=this.type===B._in?"ForInStatement":"ForOfStatement";this.next();a.left=b;a.right=this.parseExpression();this.expect(B.parenR);this.exitLexicalScope();a.body=this.parseStatement(!1);this.labels.pop();return this.finishNode(a,c)};Y.parseVar=function(a,b,c){var d=this;a.declarations=[];a.kind=c;for(;;){var e=d.startNode();d.parseVarId(e,c);d.eat(B.eq)?(e.init=d.parseMaybeAssign(b)):c==="const"&&!(d.type===B._in||d.options.ecmaVersion>=6&&d.isContextual("of"))?d.unexpected():e.id.type!="Identifier"&&!(b&&(d.type===B._in||d.isContextual("of")))?d.raise(d.lastTokEnd,"Complex binding patterns require an initialization value"):(e.init=null);a.declarations.push(d.finishNode(e,"VariableDeclarator"));if(!d.eat(B.comma)){break}}return a};Y.parseVarId=function(a,b){a.id=this.parseBindingAtom(b);this.checkLVal(a.id,b,!1)};Y.parseFunction=function(a,b,c,d){this.initFunction(a);this.options.ecmaVersion>=6&&!d&&(a.generator=this.eat(B.star));this.options.ecmaVersion>=8&&(a.async=!!d);b&&(a.id=b==="nullableID"&&this.type!=B.name?null:this.parseIdent(),a.id&&this.checkLVal(a.id,"var"));var e=this.inGenerator,f=this.inAsync,g=this.yieldPos,h=this.awaitPos,i=this.inFunction;this.inGenerator=a.generator;this.inAsync=a.async;this.yieldPos=0;this.awaitPos=0;this.inFunction=!0;this.enterFunctionScope();b||(a.id=this.type==B.name?this.parseIdent():null);this.parseFunctionParams(a);this.parseFunctionBody(a,c);this.inGenerator=e;this.inAsync=f;this.yieldPos=g;this.awaitPos=h;this.inFunction=i;return this.finishNode(a,b?"FunctionDeclaration":"FunctionExpression")};Y.parseFunctionParams=function(a){this.expect(B.parenL);a.params=this.parseBindingList(B.parenR,!1,this.options.ecmaVersion>=8,!0);this.checkYieldAwaitInDefaultParams()};Y.parseClass=function(a,b){var c=this;this.next();this.parseClassId(a,b);this.parseClassSuper(a);var d=this.startNode(),e=!1;d.body=[];this.expect(B.braceL);while(!this.eat(B.braceR)){if(c.eat(B.semi)){continue}var f=c.startNode(),g=c.eat(B.star),h=!1,i=c.type===B.name&&c.value==="static";c.parsePropertyName(f);f.static=i&&c.type!==B.parenL;f.static&&(g&&c.unexpected(),g=c.eat(B.star),c.parsePropertyName(f));c.options.ecmaVersion>=8&&!g&&!f.computed&&f.key.type==="Identifier"&&f.key.name==="async"&&c.type!==B.parenL&&!c.canInsertSemicolon()&&(h=!0,c.parsePropertyName(f));f.kind="method";var j=!1;if(!f.computed){var k=f.key;!g&&!h&&k.type==="Identifier"&&c.type!==B.parenL&&(k.name==="get"||k.name==="set")&&(j=!0,f.kind=k.name,k=c.parsePropertyName(f));!f.static&&(k.type==="Identifier"&&k.name==="constructor"||k.type==="Literal"&&k.value==="constructor")&&(e&&c.raise(k.start,"Duplicate constructor in the same class"),j&&c.raise(k.start,"Constructor can't have get/set modifier"),g&&c.raise(k.start,"Constructor can't be a generator"),h&&c.raise(k.start,"Constructor can't be an async method"),f.kind="constructor",e=!0)}c.parseClassMethod(d,f,g,h);if(j){var l=f.kind==="get"?0:1;if(f.value.params.length!==l){var m=f.value.start;f.kind==="get"?c.raiseRecoverable(m,"getter should have no params"):c.raiseRecoverable(m,"setter should have exactly one param")}else f.kind==="set"&&f.value.params[0].type==="RestElement"&&c.raiseRecoverable(f.value.params[0].start,"Setter cannot use rest params")}}a.body=this.finishNode(d,"ClassBody");return this.finishNode(a,b?"ClassDeclaration":"ClassExpression")};Y.parseClassMethod=function(a,b,c,d){b.value=this.parseMethod(c,d);a.body.push(this.finishNode(b,"MethodDefinition"))};Y.parseClassId=function(a,b){a.id=this.type===B.name?this.parseIdent():b===!0?this.unexpected():null};Y.parseClassSuper=function(a){a.superClass=this.eat(B._extends)?this.parseExprSubscripts():null};Y.parseExport=function(a,b){var c=this;this.next();if(this.eat(B.star)){this.expectContextual("from");a.source=this.type===B.string?this.parseExprAtom():this.unexpected();this.semicolon();return this.finishNode(a,"ExportAllDeclaration")}if(this.eat(B._default)){this.checkExport(b,"default",this.lastTokStart);var d;if(this.type===B._function||(d=this.isAsyncFunction())){var e=this.startNode();this.next();d&&this.next();a.declaration=this.parseFunction(e,"nullableID",!1,d)}else if(this.type===B._class){var f=this.startNode();a.declaration=this.parseClass(f,"nullableID")}else a.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(a,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())a.declaration=this.parseStatement(!0),a.declaration.type==="VariableDeclaration"?this.checkVariableExport(b,a.declaration.declarations):this.checkExport(b,a.declaration.id.name,a.declaration.id.start),a.specifiers=[],a.source=null;else{a.declaration=null;a.specifiers=this.parseExportSpecifiers(b);if(this.eatContextual("from"))a.source=this.type===B.string?this.parseExprAtom():this.unexpected();else{for(var g=0;g<a.specifiers.length;g++)(c.keywords.test(a.specifiers[g].local.name)||c.reservedWords.test(a.specifiers[g].local.name))&&c.unexpected(a.specifiers[g].local.start);a.source=null}this.semicolon()}return this.finishNode(a,"ExportNamedDeclaration")};Y.checkExport=function(a,b,c){if(!a){return}K(a,b)&&this.raiseRecoverable(c,"Duplicate export '"+b+"'");a[b]=!0};Y.checkPatternExport=function(a,b){var c=this,d=b.type;if(d=="Identifier")this.checkExport(a,b.name,b.start);else if(d=="ObjectPattern"){for(var e=0;e<b.properties.length;++e)c.checkPatternExport(a,b.properties[e].value)}else if(d=="ArrayPattern"){for(var f=0;f<b.elements.length;++f){var g=b.elements[f];g&&c.checkPatternExport(a,g)}}else d=="AssignmentPattern"?this.checkPatternExport(a,b.left):d=="ParenthesizedExpression"&&this.checkPatternExport(a,b.expression)};Y.checkVariableExport=function(a,b){var c=this;if(!a){return}for(var d=0;d<b.length;d++)c.checkPatternExport(a,b[d].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.parseExportSpecifiers=function(a){var b=this,c=[],d=!0;this.expect(B.braceL);while(!this.eat(B.braceR)){if(!d){b.expect(B.comma);if(b.afterTrailingComma(B.braceR)){break}}else d=!1;var e=b.startNode();e.local=b.parseIdent(!0);e.exported=b.eatContextual("as")?b.parseIdent(!0):e.local;b.checkExport(a,e.exported.name,e.exported.start);c.push(b.finishNode(e,"ExportSpecifier"))}return c};Y.parseImport=function(a){this.next();this.type===B.string?(a.specifiers=$,a.source=this.parseExprAtom()):(a.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),a.source=this.type===B.string?this.parseExprAtom():this.unexpected());this.semicolon();return this.finishNode(a,"ImportDeclaration")};Y.parseImportSpecifiers=function(){var a=this,b=[],c=!0;if(this.type===B.name){var d=this.startNode();d.local=this.parseIdent();this.checkLVal(d.local,"let");b.push(this.finishNode(d,"ImportDefaultSpecifier"));if(!this.eat(B.comma)){return b}}if(this.type===B.star){var e=this.startNode();this.next();this.expectContextual("as");e.local=this.parseIdent();this.checkLVal(e.local,"let");b.push(this.finishNode(e,"ImportNamespaceSpecifier"));return b}this.expect(B.braceL);while(!this.eat(B.braceR)){if(!c){a.expect(B.comma);if(a.afterTrailingComma(B.braceR)){break}}else c=!1;var f=a.startNode();f.imported=a.parseIdent(!0);a.eatContextual("as")?(f.local=a.parseIdent()):(f.local=f.imported,a.isKeyword(f.local.name)&&a.unexpected(f.local.start),a.reservedWordsStrict.test(f.local.name)&&a.raiseRecoverable(f.local.start,"The keyword '"+f.local.name+"' is reserved"));a.checkLVal(f.local,"let");b.push(a.finishNode(f,"ImportSpecifier"))}return b};var aa=U.prototype;aa.toAssignable=function(a,b){var c=this;if(this.options.ecmaVersion>=6&&a){switch(a.type){case "Identifier":this.inAsync&&a.name==="await"&&this.raise(a.start,"Can not use 'await' as identifier inside an async function");break;case "ObjectPattern":;case "ArrayPattern":break;case "ObjectExpression":a.type="ObjectPattern";for(var d=0;d<a.properties.length;d++){var e=a.properties[d];e.kind!=="init"&&c.raise(e.key.start,"Object pattern can't contain getter or setter");c.toAssignable(e.value,b)};break;case "ArrayExpression":a.type="ArrayPattern";this.toAssignableList(a.elements,b);break;case "AssignmentExpression":if(a.operator==="=")a.type="AssignmentPattern",delete a.operator,this.toAssignable(a.left,b);else{this.raise(a.left.end,"Only '=' operator can be used for specifying default value.");break};case "AssignmentPattern":break;case "ParenthesizedExpression":a.expression=this.toAssignable(a.expression,b);break;case "MemberExpression":if(!b){break};default:this.raise(a.start,"Assigning to rvalue")}}return a};aa.toAssignableList=function(a,b){var c=this,d=a.length;if(d){var e=a[d-1];if(e&&e.type=="RestElement")--d;else if(e&&e.type=="SpreadElement"){e.type="RestElement";var f=e.argument;this.toAssignable(f,b);f.type!=="Identifier"&&f.type!=="MemberExpression"&&f.type!=="ArrayPattern"&&this.unexpected(f.start);--d};b&&e&&e.type==="RestElement"&&e.argument.type!=="Identifier"&&this.unexpected(e.argument.start)}for(var g=0;g<d;g++){var h=a[g];h&&c.toAssignable(h,b)}return a};aa.parseSpread=function(a){var b=this.startNode();this.next();b.argument=this.parseMaybeAssign(!1,a);return this.finishNode(b,"SpreadElement")};aa.parseRest=function(a){var b=this.startNode();this.next();a?(b.argument=this.type===B.name?this.parseIdent():this.unexpected()):(b.argument=this.type===B.name||this.type===B.bracketL?this.parseBindingAtom():this.unexpected());return this.finishNode(b,"RestElement")};aa.parseBindingAtom=function(){if(this.options.ecmaVersion<6){return this.parseIdent()}switch(this.type){case B.name:return this.parseIdent();case B.bracketL:var a=this.startNode();this.next();a.elements=this.parseBindingList(B.bracketR,!0,!0);return this.finishNode(a,"ArrayPattern");case B.braceL:return this.parseObj(!0);default:this.unexpected()}};aa.parseBindingList=function(a,b,c,d){var e=this,f=[],g=!0;while(!this.eat(a)){g?(g=!1):e.expect(B.comma);if(b&&e.type===B.comma)f.push(null);else if(c&&e.afterTrailingComma(a)){break}else if(e.type===B.ellipsis){var h=e.parseRest(d);e.parseBindingListItem(h);f.push(h);e.type===B.comma&&e.raise(e.start,"Comma is not permitted after the rest element");e.expect(a);break}else{var i=e.parseMaybeDefault(e.start,e.startLoc);e.parseBindingListItem(i);f.push(i)}}return f};aa.parseBindingListItem=function(a){return a};aa.parseMaybeDefault=function(a,b,c){c=c||this.parseBindingAtom();if(this.options.ecmaVersion<6||!this.eat(B.eq)){return c}var d=this.startNodeAt(a,b);d.left=c;d.right=this.parseMaybeAssign();return this.finishNode(d,"AssignmentPattern")};aa.checkLVal=function(a,b,c){var d=this;switch(a.type){case "Identifier":this.strict&&this.reservedWordsStrictBind.test(a.name)&&this.raiseRecoverable(a.start,(b?"Binding ":"Assigning to ")+a.name+" in strict mode");c&&(K(c,a.name)&&this.raiseRecoverable(a.start,"Argument name clash"),c[a.name]=!0);b&&b!=="none"&&((b==="var"&&!this.canDeclareVarName(a.name)||b!=="var"&&!this.canDeclareLexicalName(a.name))&&this.raiseRecoverable(a.start,("Identifier '"+a.name+"' has already been declared")),b==="var"?this.declareVarName(a.name):this.declareLexicalName(a.name));break;case "MemberExpression":b&&this.raiseRecoverable(a.start,(b?"Binding":"Assigning to")+" member expression");break;case "ObjectPattern":for(var g=0;g<a.properties.length;g++)d.checkLVal(a.properties[g].value,b,c);break;case "ArrayPattern":for(var e=0;e<a.elements.length;e++){var f=a.elements[e];f&&d.checkLVal(f,b,c)};break;case "AssignmentPattern":this.checkLVal(a.left,b,c);break;case "RestElement":this.checkLVal(a.argument,b,c);break;case "ParenthesizedExpression":this.checkLVal(a.expression,b,c);break;default:this.raise(a.start,(b?"Binding":"Assigning to")+" rvalue")}};var ab=U.prototype;ab.checkPropClash=function(a,b){if(this.options.ecmaVersion>=6&&(a.computed||a.method||a.shorthand)){return}var c=a.key,d;switch(c.type){case "Identifier":d=c.name;break;case "Literal":d=String(c.value);break;default:return};var e=a.kind;if(this.options.ecmaVersion>=6){d==="__proto__"&&e==="init"&&(b.proto&&this.raiseRecoverable(c.start,"Redefinition of __proto__ property"),b.proto=!0);return}d="$"+d;var f=b[d];if(f){var g;e==="init"?(g=this.strict&&f.init||f.get||f.set):(g=f.init||f[e]);g&&this.raiseRecoverable(c.start,"Redefinition of property")}else f=b[d]={init:!1,get:!1,set:!1};f[e]=!0};ab.parseExpression=function(a,b){var c=this,d=this.start,e=this.startLoc,f=this.parseMaybeAssign(a,b);if(this.type===B.comma){var g=this.startNodeAt(d,e);g.expressions=[f];while(this.eat(B.comma))g.expressions.push(c.parseMaybeAssign(a,b));return this.finishNode(g,"SequenceExpression")}return f};ab.parseMaybeAssign=function(a,b,c){if(this.inGenerator&&this.isContextual("yield")){return this.parseYield()}var d=!1,e=-1,f=-1;b?(e=b.parenthesizedAssign,f=b.trailingComma,b.parenthesizedAssign=b.trailingComma=-1):(b=new X,d=!0);var g=this.start,h=this.startLoc;(this.type==B.parenL||this.type==B.name)&&(this.potentialArrowAt=this.start);var i=this.parseMaybeConditional(a,b);c&&(i=c.call(this,i,g,h));if(this.type.isAssign){this.checkPatternErrors(b,!0);d||X.call(b);var j=this.startNodeAt(g,h);j.operator=this.value;j.left=this.type===B.eq?this.toAssignable(i):i;b.shorthandAssign=-1;this.checkLVal(i);this.next();j.right=this.parseMaybeAssign(a);return this.finishNode(j,"AssignmentExpression")}else d&&this.checkExpressionErrors(b,!0);e>-1&&(b.parenthesizedAssign=e);f>-1&&(b.trailingComma=f);return i};ab.parseMaybeConditional=function(a,b){var c=this.start,d=this.startLoc,e=this.parseExprOps(a,b);if(this.checkExpressionErrors(b)){return e}if(this.eat(B.question)){var f=this.startNodeAt(c,d);f.test=e;f.consequent=this.parseMaybeAssign();this.expect(B.colon);f.alternate=this.parseMaybeAssign(a);return this.finishNode(f,"ConditionalExpression")}return e};ab.parseExprOps=function(a,b){var c=this.start,d=this.startLoc,e=this.parseMaybeUnary(b,!1);if(this.checkExpressionErrors(b)){return e}return e.start==c&&e.type==="ArrowFunctionExpression"?e:this.parseExprOp(e,c,d,-1,a)};ab.parseExprOp=function(a,b,c,d,e){var f=this.type.binop;if(f!=null&&(!e||this.type!==B._in)){if(f>d){var g=this.type===B.logicalOR||this.type===B.logicalAND,h=this.value;this.next();var i=this.start,j=this.startLoc,k=this.parseExprOp(this.parseMaybeUnary(null,!1),i,j,f,e),l=this.buildBinary(b,c,a,k,h,g);return this.parseExprOp(l,b,c,d,e)}}return a};ab.buildBinary=function(a,b,c,d,e,f){var g=this.startNodeAt(a,b);g.left=c;g.operator=e;g.right=d;return this.finishNode(g,f?"LogicalExpression":"BinaryExpression")};ab.parseMaybeUnary=function(a,b){var c=this,d=this.start,e=this.startLoc,f;if(this.inAsync&&this.isContextual("await"))f=this.parseAwait(a),b=!0;else if(this.type.prefix){var g=this.startNode(),h=this.type===B.incDec;g.operator=this.value;g.prefix=!0;this.next();g.argument=this.parseMaybeUnary(null,!0);this.checkExpressionErrors(a,!0);h?this.checkLVal(g.argument):this.strict&&g.operator==="delete"&&g.argument.type==="Identifier"?this.raiseRecoverable(g.start,"Deleting local variable in strict mode"):(b=!0);f=this.finishNode(g,h?"UpdateExpression":"UnaryExpression")}else{f=this.parseExprSubscripts(a);if(this.checkExpressionErrors(a)){return f}while(this.type.postfix&&!this.canInsertSemicolon()){var i=c.startNodeAt(d,e);i.operator=c.value;i.prefix=!1;i.argument=f;c.checkLVal(f);c.next();f=c.finishNode(i,"UpdateExpression")}};if(!b&&this.eat(B.starstar)){return this.buildBinary(d,e,f,this.parseMaybeUnary(null,!1),"**",!1)}else{return f}};ab.parseExprSubscripts=function(a){var b=this.start,c=this.startLoc,d=this.parseExprAtom(a),e=d.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")";if(this.checkExpressionErrors(a)||e){return d}var f=this.parseSubscripts(d,b,c);a&&f.type==="MemberExpression"&&(a.parenthesizedAssign>=f.start&&(a.parenthesizedAssign=-1),a.parenthesizedBind>=f.start&&(a.parenthesizedBind=-1));return f};ab.parseSubscripts=function(a,b,c,d){var e=this,f=this.options.ecmaVersion>=8&&a.type==="Identifier"&&a.name==="async"&&this.lastTokEnd==a.end&&!this.canInsertSemicolon();for(var g;;){if((g=e.eat(B.bracketL))||e.eat(B.dot)){var h=e.startNodeAt(b,c);h.object=a;h.property=g?e.parseExpression():e.parseIdent(!0);h.computed=!!g;g&&e.expect(B.bracketR);a=e.finishNode(h,"MemberExpression")}else if(!d&&e.eat(B.parenL)){var i=new X,j=e.yieldPos,k=e.awaitPos;e.yieldPos=0;e.awaitPos=0;var l=e.parseExprList(B.parenR,e.options.ecmaVersion>=8,!1,i);if(f&&!e.canInsertSemicolon()&&e.eat(B.arrow)){e.checkPatternErrors(i,!1);e.checkYieldAwaitInDefaultParams();e.yieldPos=j;e.awaitPos=k;return e.parseArrowExpression(e.startNodeAt(b,c),l,!0)}e.checkExpressionErrors(i,!0);e.yieldPos=j||e.yieldPos;e.awaitPos=k||e.awaitPos;var m=e.startNodeAt(b,c);m.callee=a;m.arguments=l;a=e.finishNode(m,"CallExpression")}else if(e.type===B.backQuote){var n=e.startNodeAt(b,c);n.tag=a;n.quasi=e.parseTemplate();a=e.finishNode(n,"TaggedTemplateExpression")}else{return a}}};ab.parseExprAtom=function(a){var b,c=this.potentialArrowAt==this.start;switch(this.type){case B._super:this.inFunction||this.raise(this.start,"'super' outside of function or class");case B._this:var j=this.type===B._this?"ThisExpression":"Super";b=this.startNode();this.next();return this.finishNode(b,j);case B.name:var h=this.start,i=this.startLoc;var g=this.parseIdent(this.type!==B.name);if(this.options.ecmaVersion>=8&&g.name==="async"&&!this.canInsertSemicolon()&&this.eat(B._function)){return this.parseFunction(this.startNodeAt(h,i),!1,!1,!0)};if(c&&!this.canInsertSemicolon()){if(this.eat(B.arrow)){return this.parseArrowExpression(this.startNodeAt(h,i),[g],!1)}if(this.options.ecmaVersion>=8&&g.name==="async"&&this.type===B.name){g=this.parseIdent();(this.canInsertSemicolon()||!this.eat(B.arrow))&&this.unexpected();return this.parseArrowExpression(this.startNodeAt(h,i),[g],!0)}};return g;case B.regexp:var f=this.value;b=this.parseLiteral(f.value);b.regex={pattern:f.pattern,flags:f.flags};return b;case B.num: case B.string:return this.parseLiteral(this.value);case B._null: case B._true: case B._false:b=this.startNode();b.value=this.type===B._null?null:this.type===B._true;b.raw=this.type.keyword;this.next();return this.finishNode(b,"Literal");case B.parenL:var d=this.start,e=this.parseParenAndDistinguishExpression(c);a&&(a.parenthesizedAssign<0&&!this.isSimpleAssignTarget(e)&&(a.parenthesizedAssign=d),a.parenthesizedBind<0&&(a.parenthesizedBind=d));return e;case B.bracketL:b=this.startNode();this.next();b.elements=this.parseExprList(B.bracketR,!0,!0,a);return this.finishNode(b,"ArrayExpression");case B.braceL:return this.parseObj(!1,a);case B._function:b=this.startNode();this.next();return this.parseFunction(b,!1);case B._class:return this.parseClass(this.startNode(),!1);case B._new:return this.parseNew();case B.backQuote:return this.parseTemplate();default:this.unexpected()}};ab.parseLiteral=function(a){var b=this.startNode();b.value=a;b.raw=this.input.slice(this.start,this.end);this.next();return this.finishNode(b,"Literal")};ab.parseParenExpression=function(){this.expect(B.parenL);var a=this.parseExpression();this.expect(B.parenR);return a};ab.parseParenAndDistinguishExpression=function(a){var b=this,c=this.start,d=this.startLoc,e,f=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var g=this.start,h=this.startLoc,i=[],j=!0,k=!1,l=new X,m=this.yieldPos,n=this.awaitPos,o,p;this.yieldPos=0;this.awaitPos=0;while(this.type!==B.parenR){j?j=!1:b.expect(B.comma);if(f&&b.afterTrailingComma(B.parenR,!0)){k=!0;break}else if(b.type===B.ellipsis){o=b.start;i.push(b.parseParenItem(b.parseRest()));b.type===B.comma&&b.raise(b.start,"Comma is not permitted after the rest element");break}else b.type===B.parenL&&!p&&(p=b.start),i.push(b.parseMaybeAssign(!1,l,b.parseParenItem))}var q=this.start,r=this.startLoc;this.expect(B.parenR);if(a&&!this.canInsertSemicolon()&&this.eat(B.arrow)){this.checkPatternErrors(l,!1);this.checkYieldAwaitInDefaultParams();p&&this.unexpected(p);this.yieldPos=m;this.awaitPos=n;return this.parseParenArrowList(c,d,i)}(!i.length||k)&&this.unexpected(this.lastTokStart);o&&this.unexpected(o);this.checkExpressionErrors(l,!0);this.yieldPos=m||this.yieldPos;this.awaitPos=n||this.awaitPos;i.length>1?(e=this.startNodeAt(g,h),e.expressions=i,this.finishNodeAt(e,"SequenceExpression",q,r)):(e=i[0])}else e=this.parseParenExpression();if(this.options.preserveParens){var s=this.startNodeAt(c,d);s.expression=e;return this.finishNode(s,"ParenthesizedExpression")}else{return e}};ab.parseParenItem=function(a){return a};ab.parseParenArrowList=function(a,b,c){return this.parseArrowExpression(this.startNodeAt(a,b),c)};var ac=[];ab.parseNew=function(){var a=this.startNode(),b=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(B.dot)){a.meta=b;a.property=this.parseIdent(!0);a.property.name!=="target"&&this.raiseRecoverable(a.property.start,"The only valid meta property for new is new.target");this.inFunction||this.raiseRecoverable(a.start,"new.target can only be used in functions");return this.finishNode(a,"MetaProperty")}var c=this.start,d=this.startLoc;a.callee=this.parseSubscripts(this.parseExprAtom(),c,d,!0);this.eat(B.parenL)?(a.arguments=this.parseExprList(B.parenR,this.options.ecmaVersion>=8,!1)):(a.arguments=ac);return this.finishNode(a,"NewExpression")};ab.parseTemplateElement=function(){var a=this.startNode();a.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value};this.next();a.tail=this.type===B.backQuote;return this.finishNode(a,"TemplateElement")};ab.parseTemplate=function(){var a=this,b=this.startNode();this.next();b.expressions=[];var c=this.parseTemplateElement();b.quasis=[c];while(!c.tail)a.expect(B.dollarBraceL),b.expressions.push(a.parseExpression()),a.expect(B.braceR),b.quasis.push(c=a.parseTemplateElement());this.next();return this.finishNode(b,"TemplateLiteral")};ab.parseObj=function(a,b){var c=this,d=this.startNode(),e=!0,f={};d.properties=[];this.next();while(!this.eat(B.braceR)){if(!e){c.expect(B.comma);if(c.afterTrailingComma(B.braceR)){break}}else e=!1;var g=c.startNode(),h,i,j,k;c.options.ecmaVersion>=6&&(g.method=!1,g.shorthand=!1,(a||b)&&(j=c.start,k=c.startLoc),a||(h=c.eat(B.star)));c.parsePropertyName(g);!a&&c.options.ecmaVersion>=8&&!h&&!g.computed&&g.key.type==="Identifier"&&g.key.name==="async"&&c.type!==B.parenL&&c.type!==B.colon&&!c.canInsertSemicolon()?(i=!0,c.parsePropertyName(g,b)):(i=!1);c.parsePropertyValue(g,a,h,i,j,k,b);c.checkPropClash(g,f);d.properties.push(c.finishNode(g,"Property"))}return this.finishNode(d,a?"ObjectPattern":"ObjectExpression")};ab.parsePropertyValue=function(a,b,c,d,e,f,g){(c||d)&&this.type===B.colon&&this.unexpected();if(this.eat(B.colon))a.value=b?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,g),a.kind="init";else if(this.options.ecmaVersion>=6&&this.type===B.parenL)b&&this.unexpected(),a.kind="init",a.method=!0,a.value=this.parseMethod(c,d);else if(this.options.ecmaVersion>=5&&!a.computed&&a.key.type==="Identifier"&&(a.key.name==="get"||a.key.name==="set")&&(this.type!=B.comma&&this.type!=B.braceR)){(c||d||b)&&this.unexpected();a.kind=a.key.name;this.parsePropertyName(a);a.value=this.parseMethod(!1);var h=a.kind==="get"?0:1;if(a.value.params.length!==h){var i=a.value.start;a.kind==="get"?this.raiseRecoverable(i,"getter should have no params"):this.raiseRecoverable(i,"setter should have exa