UNPKG

bean-js

Version:

An esoteric byte-encoded code-golfing language derived from JavaScript

2 lines 164 kB
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.bean=t()}}(function(){return function t(e,s,i){function r(n,o){if(!s[n]){if(!e[n]){var h="function"==typeof require&&require;if(!o&&h)return h(n,!0);if(a)return a(n,!0);var p=new Error("Cannot find module '"+n+"'");throw p.code="MODULE_NOT_FOUND",p}var c=s[n]={exports:{}};e[n][0].call(c.exports,function(t){var s=e[n][1][t];return r(s||t)},c,c.exports,t,e,s,i)}return s[n].exports}for(var a="function"==typeof require&&require,n=0;n<i.length;n++)r(i[n]);return r}({1:[function(t,e,s){e.exports=["Identifier","RegExpLiteral","NullLiteral","StringLiteral","BooleanLiteral","NumericLiteral","ExpressionStatement","BlockStatement","EmptyStatement","DebuggerStatement","WithStatement","ReturnStatement","LabeledStatement","BreakStatement","ContinueStatement","IfStatement","SwitchStatement","SwitchCase","ThrowStatement","TryStatement","CatchClause","WhileStatement","DoWhileStatement","ForStatement","ForInStatement","ForOfStatement","ForAwaitStatement","FunctionDeclaration","VariableDeclaration","VariableDeclarator","Super","ThisExpression","ArrowFunctionExpression","YieldExpression","AwaitExpression","ArrayExpression","ObjectExpression","ObjectProperty","ObjectMethod","RestProperty","SpreadProperty","FunctionExpression","UnaryExpression","UpdateExpression","BinaryExpression","AssignmentExpression","LogicalExpression","SpreadElement","MemberExpression","BindExpression","ConditionalExpression","CallExpression","NewExpression","SequenceExpression","TemplateLiteral","TaggedTemplateExpression","TemplateElement","AssignmentProperty","ObjectPattern","ArrayPattern","RestElement","AssignmentPattern","ClassBody","ClassMethod","ClassProperty","ClassDeclaration","ClassExpression","MetaProperty"]},{}],2:[function(t,e,s){e.exports=["","Symbol","Proxy","ReferenceError","EvalError","Error","Array","Int16Array","DataView","escape","Map","unescape","Number","Intl","String","Uint16Array","isFinite","URIError","Infinity","WeakSet","Uint8ClampedArray","isNaN","decodeURIComponent","eval","Float32Array","Set","JSON","TypeError","Promise","undefined","parseFloat","Math","Uint8Array","Date","RangeError","ArrayBuffer","Int8Array","parseInt","SyntaxError","Boolean","Int32Array","decodeURI","WeakMap","Function","Object","RegExp","encodeURI","Float64Array","NaN","Uint32Array","encodeURIComponent","Reflect","clearInterval","clearTimeout","setInterval","setTimeout","console","0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","$","_"]},{}],3:[function(t,e,s){e.exports=["undefined","length","name","arguments","caller","prototype","hasInstance","isConcatSpreadable","iterator","match","replace","search","species","split","toPrimitive","toStringTag","unscopables","for","keyFor","revocable","isArray","from","BYTES_PER_ELEMENT","MAX_VALUE","MIN_VALUE","NEGATIVE_INFINITY","POSITIVE_INFINITY","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","EPSILON","isInteger","isSafeInteger","getCanonicalLocales","Collator","NumberFormat","DateTimeFormat","fromCharCode","fromCodePoint","raw","parse","stringify","reject","all","race","resolve","abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","round","sign","sin","sinh","sqrt","tan","tanh","trunc","LN10","LN2","LOG10E","LOG2E","SQRT1_2","SQRT2","random","now","UTC","isView","assign","create","getOwnPropertyDescriptor","getOwnPropertyNames","getOwnPropertySymbols","preventExtensions","seal","defineProperties","defineProperty","freeze","getPrototypeOf","isExtensible","isFrozen","isSealed","keys","setPrototypeOf","entries","values","getOwnPropertyDescriptors","deleteProperty","apply","construct","get","has","ownKeys","set","info","warn","error","constructor","toString","valueOf","message","toLocaleString","join","pop","push","reverse","shift","unshift","slice","splice","sort","filter","forEach","some","every","map","indexOf","lastIndexOf","reduce","reduceRight","copyWithin","find","findIndex","fill","includes","concat","buffer","byteLength","byteOffset","getInt8","setInt8","getUint8","setUint8","getInt16","setInt16","getUint16","setUint16","getInt32","setInt32","getUint32","setUint32","getFloat32","setFloat32","getFloat64","setFloat64","size","delete","clear","toExponential","toFixed","toPrecision","charAt","charCodeAt","trim","trimLeft","trimRight","codePointAt","endsWith","localeCompare","normalize","repeat","substring","substr","startsWith","toLowerCase","toLocaleLowerCase","toUpperCase","toLocaleUpperCase","add","then","catch","toDateString","toTimeString","toISOString","toUTCString","toGMTString","getDate","setDate","getDay","getFullYear","setFullYear","getHours","setHours","getMilliseconds","setMilliseconds","getMinutes","setMinutes","getMonth","setMonth","getSeconds","setSeconds","getTime","setTime","getTimezoneOffset","getUTCDate","setUTCDate","getUTCDay","getUTCFullYear","setUTCFullYear","getUTCHours","setUTCHours","getUTCMilliseconds","setUTCMilliseconds","getUTCMinutes","setUTCMinutes","getUTCMonth","setUTCMonth","getUTCSeconds","setUTCSeconds","getYear","setYear","toJSON","toLocaleDateString","toLocaleTimeString","bind","call","hasOwnProperty","propertyIsEnumerable","isPrototypeOf","exec","test","flags","global","ignoreCase","multiline","source","sticky","unicode"]},{}],4:[function(t,e,s){"use strict";function i(t){return t=t.split(" "),function(e){return t.indexOf(e)>=0}}function r(t,e){for(var s=65536,i=0;i<e.length;i+=2){if((s+=e[i])>t)return!1;if((s+=e[i+1])>=t)return!0}}function a(t){return t<65?36===t:t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&k.test(String.fromCharCode(t)):r(t,w)))}function n(t){return t<48?36===t:t<58||!(t<65)&&(t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&C.test(String.fromCharCode(t)):r(t,w)||r(t,E))))}function o(t){var e={};for(var s in P)e[s]=t&&s in t?t[s]:P[s];return e}function h(t){return 10===t||13===t||8232===t||8233===t}function p(t,e){for(var s=1,i=0;;){D.lastIndex=i;var r=D.exec(t);if(!(r&&r.index<e))return new q(s,e-i);++s,i=r.index+r[0].length}}function c(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}function l(t,e,s,i){return t.type=e,t.end=s,t.loc.end=i,this.processComment(t),t}function u(t){return t[t.length-1]}function d(t){return t&&"Property"===t.type&&"init"===t.kind&&!1===t.method}function f(t){return"JSXIdentifier"===t.type?t.name:"JSXNamespacedName"===t.type?t.namespace.name+":"+t.name.name:"JSXMemberExpression"===t.type?f(t.object)+"."+f(t.property):void 0}function y(t,e){return new J(e,t).parse()}function m(t,e){var s=new J(e,t);return s.options.strictMode&&(s.state.strict=!0),s.getExpression()}Object.defineProperty(s,"__esModule",{value:!0});var x={6:i("enum await"),strict:i("implements interface let package private protected public static yield"),strictBind:i("eval arguments")},v=i("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 let const class extends export import yield super"),g="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",b="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",k=new RegExp("["+g+"]"),C=new RegExp("["+g+b+"]");g=b=null;var w=[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],E=[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],P={sourceType:"script",sourceFilename:void 0,startLine:1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,plugins:[],strictMode:null},S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},A=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},T=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},N=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},L=!0,I=function t(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};A(this,t),this.label=e,this.keyword=s.keyword,this.beforeExpr=!!s.beforeExpr,this.startsExpr=!!s.startsExpr,this.rightAssociative=!!s.rightAssociative,this.isLoop=!!s.isLoop,this.isAssign=!!s.isAssign,this.prefix=!!s.prefix,this.postfix=!!s.postfix,this.binop=s.binop||null,this.updateContext=null},B=function(t){function e(s){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return A(this,e),i.keyword=s,N(this,t.call(this,s,i))}return T(e,t),e}(I),O=function(t){function e(s,i){return A(this,e),N(this,t.call(this,s,{beforeExpr:L,binop:i}))}return T(e,t),e}(I),R={num:new I("num",{startsExpr:!0}),regexp:new I("regexp",{startsExpr:!0}),string:new I("string",{startsExpr:!0}),name:new I("name",{startsExpr:!0}),eof:new I("eof"),bracketL:new I("[",{beforeExpr:L,startsExpr:!0}),bracketR:new I("]"),braceL:new I("{",{beforeExpr:L,startsExpr:!0}),braceBarL:new I("{|",{beforeExpr:L,startsExpr:!0}),braceR:new I("}"),braceBarR:new I("|}"),parenL:new I("(",{beforeExpr:L,startsExpr:!0}),parenR:new I(")"),comma:new I(",",{beforeExpr:L}),semi:new I(";",{beforeExpr:L}),colon:new I(":",{beforeExpr:L}),doubleColon:new I("::",{beforeExpr:L}),dot:new I("."),question:new I("?",{beforeExpr:L}),arrow:new I("=>",{beforeExpr:L}),template:new I("template"),ellipsis:new I("...",{beforeExpr:L}),backQuote:new I("`",{startsExpr:!0}),dollarBraceL:new I("${",{beforeExpr:L,startsExpr:!0}),at:new I("@"),eq:new I("=",{beforeExpr:L,isAssign:!0}),assign:new I("_=",{beforeExpr:L,isAssign:!0}),incDec:new I("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new I("prefix",{beforeExpr:L,prefix:!0,startsExpr:!0}),logicalOR:new O("||",1),logicalAND:new O("&&",2),bitwiseOR:new O("|",3),bitwiseXOR:new O("^",4),bitwiseAND:new O("&",5),equality:new O("==/!=",6),relational:new O("</>",7),bitShift:new O("<</>>",8),plusMin:new I("+/-",{beforeExpr:L,binop:9,prefix:!0,startsExpr:!0}),modulo:new O("%",10),star:new O("*",10),slash:new O("/",10),exponent:new I("**",{beforeExpr:L,binop:11,rightAssociative:!0})},j={break:new B("break"),case:new B("case",{beforeExpr:L}),catch:new B("catch"),continue:new B("continue"),debugger:new B("debugger"),default:new B("default",{beforeExpr:L}),do:new B("do",{isLoop:!0,beforeExpr:L}),else:new B("else",{beforeExpr:L}),finally:new B("finally"),for:new B("for",{isLoop:!0}),function:new B("function",{startsExpr:!0}),if:new B("if"),return:new B("return",{beforeExpr:L}),switch:new B("switch"),throw:new B("throw",{beforeExpr:L}),try:new B("try"),var:new B("var"),let:new B("let"),const:new B("const"),while:new B("while",{isLoop:!0}),with:new B("with"),new:new B("new",{beforeExpr:L,startsExpr:!0}),this:new B("this",{startsExpr:!0}),super:new B("super",{startsExpr:!0}),class:new B("class"),extends:new B("extends",{beforeExpr:L}),export:new B("export"),import:new B("import",{startsExpr:!0}),yield:new B("yield",{beforeExpr:L,startsExpr:!0}),null:new B("null",{startsExpr:!0}),true:new B("true",{startsExpr:!0}),false:new B("false",{startsExpr:!0}),in:new B("in",{beforeExpr:L,binop:7}),instanceof:new B("instanceof",{beforeExpr:L,binop:7}),typeof:new B("typeof",{beforeExpr:L,prefix:!0,startsExpr:!0}),void:new B("void",{beforeExpr:L,prefix:!0,startsExpr:!0}),delete:new B("delete",{beforeExpr:L,prefix:!0,startsExpr:!0})};Object.keys(j).forEach(function(t){R["_"+t]=j[t]});var _=/\r\n?|\n|\u2028|\u2029/,D=new RegExp(_.source,"g"),M=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,F=function t(e,s,i,r){A(this,t),this.token=e,this.isExpr=!!s,this.preserveSpace=!!i,this.override=r},U={braceStatement:new F("{",!1),braceExpression:new F("{",!0),templateQuasi:new F("${",!0),parenStatement:new F("(",!1),parenExpression:new F("(",!0),template:new F("`",!0,!0,function(t){return t.readTmplToken()}),functionExpression:new F("function",!0)};R.parenR.updateContext=R.braceR.updateContext=function(){if(1===this.state.context.length)return void(this.state.exprAllowed=!0);var t=this.state.context.pop();t===U.braceStatement&&this.curContext()===U.functionExpression?(this.state.context.pop(),this.state.exprAllowed=!1):t===U.templateQuasi?this.state.exprAllowed=!0:this.state.exprAllowed=!t.isExpr},R.name.updateContext=function(t){this.state.exprAllowed=!1,t!==R._let&&t!==R._const&&t!==R._var||_.test(this.input.slice(this.state.end))&&(this.state.exprAllowed=!0)},R.braceL.updateContext=function(t){this.state.context.push(this.braceIsBlock(t)?U.braceStatement:U.braceExpression),this.state.exprAllowed=!0},R.dollarBraceL.updateContext=function(){this.state.context.push(U.templateQuasi),this.state.exprAllowed=!0},R.parenL.updateContext=function(t){var e=t===R._if||t===R._for||t===R._with||t===R._while;this.state.context.push(e?U.parenStatement:U.parenExpression),this.state.exprAllowed=!0},R.incDec.updateContext=function(){},R._function.updateContext=function(){this.curContext()!==U.braceStatement&&this.state.context.push(U.functionExpression),this.state.exprAllowed=!1},R.backQuote.updateContext=function(){this.curContext()===U.template?this.state.context.pop():this.state.context.push(U.template),this.state.exprAllowed=!1};var q=function t(e,s){A(this,t),this.line=e,this.column=s},V=function t(e,s){A(this,t),this.start=e,this.end=s},W=function(){function t(){A(this,t)}return t.prototype.init=function(t,e){return this.strict=!1!==t.strictMode&&"module"===t.sourceType,this.input=e,this.potentialArrowAt=-1,this.inMethod=this.inFunction=this.inGenerator=this.inAsync=this.inPropertyName=this.inType=this.inClassProperty=this.noAnonFunctionType=!1,this.labels=[],this.decorators=[],this.tokens=[],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.pos=this.lineStart=0,this.curLine=t.startLine,this.type=R.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=[U.braceStatement],this.exprAllowed=!0,this.containsEsc=this.containsOctal=!1,this.octalPosition=null,this.invalidTemplateEscapePosition=null,this.exportedIdentifiers=[],this},t.prototype.curPosition=function(){return new q(this.curLine,this.pos-this.lineStart)},t.prototype.clone=function(e){var s=new t;for(var i in this){var r=this[i];e&&"context"!==i||!Array.isArray(r)||(r=r.slice()),s[i]=r}return s},t}(),G=function t(e){A(this,t),this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,this.loc=new V(e.startLoc,e.endLoc)},Y=function(){function t(e,s){A(this,t),this.state=new W,this.state.init(e,s)}return t.prototype.next=function(){this.isLookahead||this.state.tokens.push(new G(this.state)),this.state.lastTokEnd=this.state.end,this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()},t.prototype.eat=function(t){return!!this.match(t)&&(this.next(),!0)},t.prototype.match=function(t){return this.state.type===t},t.prototype.isKeyword=function(t){return v(t)},t.prototype.lookahead=function(){var t=this.state;this.state=t.clone(!0),this.isLookahead=!0,this.next(),this.isLookahead=!1;var e=this.state.clone(!0);return this.state=t,e},t.prototype.setStrict=function(t){if(this.state.strict=t,this.match(R.num)||this.match(R.string)){for(this.state.pos=this.state.start;this.state.pos<this.state.lineStart;)this.state.lineStart=this.input.lastIndexOf("\n",this.state.lineStart-2)+1,--this.state.curLine;this.nextToken()}},t.prototype.curContext=function(){return this.state.context[this.state.context.length-1]},t.prototype.nextToken=function(){var t=this.curContext();return t&&t.preserveSpace||this.skipSpace(),this.state.containsOctal=!1,this.state.octalPosition=null,this.state.start=this.state.pos,this.state.startLoc=this.state.curPosition(),this.state.pos>=this.input.length?this.finishToken(R.eof):t.override?t.override(this):this.readToken(this.fullCharCodeAtPos())},t.prototype.readToken=function(t){return a(t)||92===t?this.readWord():this.getTokenFromCode(t)},t.prototype.fullCharCodeAtPos=function(){var t=this.input.charCodeAt(this.state.pos);return t<=55295||t>=57344?t:(t<<10)+this.input.charCodeAt(this.state.pos+1)-56613888},t.prototype.pushComment=function(t,e,s,i,r,a){var n={type:t?"CommentBlock":"CommentLine",value:e,start:s,end:i,loc:new V(r,a)};this.isLookahead||(this.state.tokens.push(n),this.state.comments.push(n),this.addComment(n))},t.prototype.skipBlockComment=function(){var t=this.state.curPosition(),e=this.state.pos,s=this.input.indexOf("*/",this.state.pos+=2);-1===s&&this.raise(this.state.pos-2,"Unterminated comment"),this.state.pos=s+2,D.lastIndex=e;for(var i=void 0;(i=D.exec(this.input))&&i.index<this.state.pos;)++this.state.curLine,this.state.lineStart=i.index+i[0].length;this.pushComment(!0,this.input.slice(e+2,s),e,this.state.pos,t,this.state.curPosition())},t.prototype.skipLineComment=function(t){for(var e=this.state.pos,s=this.state.curPosition(),i=this.input.charCodeAt(this.state.pos+=t);this.state.pos<this.input.length&&10!==i&&13!==i&&8232!==i&&8233!==i;)++this.state.pos,i=this.input.charCodeAt(this.state.pos);this.pushComment(!1,this.input.slice(e+t,this.state.pos),e,this.state.pos,s,this.state.curPosition())},t.prototype.skipSpace=function(){t:for(;this.state.pos<this.input.length;){var t=this.input.charCodeAt(this.state.pos);switch(t){case 32:case 160:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(!(t>8&&t<14||t>=5760&&M.test(String.fromCharCode(t))))break t;++this.state.pos}}},t.prototype.finishToken=function(t,e){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();var s=this.state.type;this.state.type=t,this.state.value=e,this.updateContext(s)},t.prototype.readToken_dot=function(){var t=this.input.charCodeAt(this.state.pos+1);if(t>=48&&t<=57)return this.readNumber(!0);var e=this.input.charCodeAt(this.state.pos+2);return 46===t&&46===e?(this.state.pos+=3,this.finishToken(R.ellipsis)):(++this.state.pos,this.finishToken(R.dot))},t.prototype.readToken_slash=function(){return this.state.exprAllowed?(++this.state.pos,this.readRegexp()):61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(R.assign,2):this.finishOp(R.slash,1)},t.prototype.readToken_mult_modulo=function(t){var e=42===t?R.star:R.modulo,s=1,i=this.input.charCodeAt(this.state.pos+1);return 42===i&&(s++,i=this.input.charCodeAt(this.state.pos+2),e=R.exponent),61===i&&(s++,e=R.assign),this.finishOp(e,s)},t.prototype.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.state.pos+1);return e===t?this.finishOp(124===t?R.logicalOR:R.logicalAND,2):61===e?this.finishOp(R.assign,2):124===t&&125===e&&this.hasPlugin("flow")?this.finishOp(R.braceBarR,2):this.finishOp(124===t?R.bitwiseOR:R.bitwiseAND,1)},t.prototype.readToken_caret=function(){return 61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(R.assign,2):this.finishOp(R.bitwiseXOR,1)},t.prototype.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.state.pos+1);return e===t?45===e&&62===this.input.charCodeAt(this.state.pos+2)&&_.test(this.input.slice(this.state.lastTokEnd,this.state.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(R.incDec,2):61===e?this.finishOp(R.assign,2):this.finishOp(R.plusMin,1)},t.prototype.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.state.pos+1),s=1;return e===t?(s=62===t&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+s)?this.finishOp(R.assign,s+1):this.finishOp(R.bitShift,s)):33===e&&60===t&&45===this.input.charCodeAt(this.state.pos+2)&&45===this.input.charCodeAt(this.state.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===e&&(s=2),this.finishOp(R.relational,s))},t.prototype.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.state.pos+1);return 61===e?this.finishOp(R.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2):61===t&&62===e?(this.state.pos+=2,this.finishToken(R.arrow)):this.finishOp(61===t?R.eq:R.prefix,1)},t.prototype.getTokenFromCode=function(t){switch(t){case 46:return this.readToken_dot();case 40:return++this.state.pos,this.finishToken(R.parenL);case 41:return++this.state.pos,this.finishToken(R.parenR);case 59:return++this.state.pos,this.finishToken(R.semi);case 44:return++this.state.pos,this.finishToken(R.comma);case 91:return++this.state.pos,this.finishToken(R.bracketL);case 93:return++this.state.pos,this.finishToken(R.bracketR);case 123:return this.hasPlugin("flow")&&124===this.input.charCodeAt(this.state.pos+1)?this.finishOp(R.braceBarL,2):(++this.state.pos,this.finishToken(R.braceL));case 125:return++this.state.pos,this.finishToken(R.braceR);case 58:return this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(R.doubleColon,2):(++this.state.pos,this.finishToken(R.colon));case 63:return++this.state.pos,this.finishToken(R.question);case 64:return++this.state.pos,this.finishToken(R.at);case 96:return++this.state.pos,this.finishToken(R.backQuote);case 48:var e=this.input.charCodeAt(this.state.pos+1);if(120===e||88===e)return this.readRadixNumber(16);if(111===e||79===e)return this.readRadixNumber(8);if(98===e||66===e)return this.readRadixNumber(2);case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo(t);case 124:case 38:return this.readToken_pipe_amp(t);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 126:return this.finishOp(R.prefix,1)}this.raise(this.state.pos,"Unexpected character '"+c(t)+"'")},t.prototype.finishOp=function(t,e){var s=this.input.slice(this.state.pos,this.state.pos+e);return this.state.pos+=e,this.finishToken(t,s)},t.prototype.readRegexp=function(){for(var t=this.state.pos,e=void 0,s=void 0;;){this.state.pos>=this.input.length&&this.raise(t,"Unterminated regular expression");var i=this.input.charAt(this.state.pos);if(_.test(i)&&this.raise(t,"Unterminated regular expression"),e)e=!1;else{if("["===i)s=!0;else if("]"===i&&s)s=!1;else if("/"===i&&!s)break;e="\\"===i}++this.state.pos}var r=this.input.slice(t,this.state.pos);++this.state.pos;var a=this.readWord1();if(a){/^[gmsiyu]*$/.test(a)||this.raise(t,"Invalid regular expression flag")}return this.finishToken(R.regexp,{pattern:r,flags:a})},t.prototype.readInt=function(t,e){for(var s=this.state.pos,i=0,r=0,a=null==e?1/0:e;r<a;++r){var n=this.input.charCodeAt(this.state.pos),o=void 0;if((o=n>=97?n-97+10:n>=65?n-65+10:n>=48&&n<=57?n-48:1/0)>=t)break;++this.state.pos,i=i*t+o}return this.state.pos===s||null!=e&&this.state.pos-s!==e?null:i},t.prototype.readRadixNumber=function(t){this.state.pos+=2;var e=this.readInt(t);return null==e&&this.raise(this.state.start+2,"Expected number in radix "+t),a(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number"),this.finishToken(R.num,e)},t.prototype.readNumber=function(t){var e=this.state.pos,s=48===this.input.charCodeAt(e),i=!1;t||null!==this.readInt(10)||this.raise(e,"Invalid number"),s&&this.state.pos==e+1&&(s=!1);var r=this.input.charCodeAt(this.state.pos);46!==r||s||(++this.state.pos,this.readInt(10),i=!0,r=this.input.charCodeAt(this.state.pos)),69!==r&&101!==r||s||(r=this.input.charCodeAt(++this.state.pos),43!==r&&45!==r||++this.state.pos,null===this.readInt(10)&&this.raise(e,"Invalid number"),i=!0),a(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number");var n=this.input.slice(e,this.state.pos),o=void 0;return i?o=parseFloat(n):s&&1!==n.length?this.state.strict?this.raise(e,"Invalid number"):o=/[89]/.test(n)?parseInt(n,10):parseInt(n,8):o=parseInt(n,10),this.finishToken(R.num,o)},t.prototype.readCodePoint=function(t){var e=this.input.charCodeAt(this.state.pos),s=void 0;if(123===e){var i=++this.state.pos;if(s=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos,t),++this.state.pos,null===s)--this.state.invalidTemplateEscapePosition;else if(s>1114111){if(!t)return this.state.invalidTemplateEscapePosition=i-2,null;this.raise(i,"Code point out of bounds")}}else s=this.readHexChar(4,t);return s},t.prototype.readString=function(t){for(var e="",s=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var i=this.input.charCodeAt(this.state.pos);if(i===t)break;92===i?(e+=this.input.slice(s,this.state.pos),e+=this.readEscapedChar(!1),s=this.state.pos):(h(i)&&this.raise(this.state.start,"Unterminated string constant"),++this.state.pos)}return e+=this.input.slice(s,this.state.pos++),this.finishToken(R.string,e)},t.prototype.readTmplToken=function(){for(var t="",e=this.state.pos,s=!1;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated template");var i=this.input.charCodeAt(this.state.pos);if(96===i||36===i&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(R.template)?36===i?(this.state.pos+=2,this.finishToken(R.dollarBraceL)):(++this.state.pos,this.finishToken(R.backQuote)):(t+=this.input.slice(e,this.state.pos),this.finishToken(R.template,s?null:t));if(92===i){t+=this.input.slice(e,this.state.pos);var r=this.readEscapedChar(!0);null===r?s=!0:t+=r,e=this.state.pos}else if(h(i)){switch(t+=this.input.slice(e,this.state.pos),++this.state.pos,i){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(i)}++this.state.curLine,this.state.lineStart=this.state.pos,e=this.state.pos}else++this.state.pos}},t.prototype.readEscapedChar=function(t){var e=!t,s=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,s){case 110:return"\n";case 114:return"\r";case 120:var i=this.readHexChar(2,e);return null===i?null:String.fromCharCode(i);case 117:var r=this.readCodePoint(e);return null===r?null:c(r);case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:return this.state.lineStart=this.state.pos,++this.state.curLine,"";default:if(s>=48&&s<=55){var a=this.state.pos-1,n=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],o=parseInt(n,8);if(o>255&&(n=n.slice(0,-1),o=parseInt(n,8)),o>0){if(t)return this.state.invalidTemplateEscapePosition=a,null;this.state.strict?this.raise(a,"Octal literal in strict mode"):this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=a)}return this.state.pos+=n.length-1,String.fromCharCode(o)}return String.fromCharCode(s)}},t.prototype.readHexChar=function(t,e){var s=this.state.pos,i=this.readInt(16,t);return null===i&&(e?this.raise(s,"Bad character escape sequence"):(this.state.pos=s-1,this.state.invalidTemplateEscapePosition=s-1)),i},t.prototype.readWord1=function(){this.state.containsEsc=!1;for(var t="",e=!0,s=this.state.pos;this.state.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(n(i))this.state.pos+=i<=65535?1:2;else{if(92!==i)break;this.state.containsEsc=!0,t+=this.input.slice(s,this.state.pos);var r=this.state.pos;117!==this.input.charCodeAt(++this.state.pos)&&this.raise(this.state.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.state.pos;var o=this.readCodePoint(!0);(e?a:n)(o,!0)||this.raise(r,"Invalid Unicode escape"),t+=c(o),s=this.state.pos}e=!1}return t+this.input.slice(s,this.state.pos)},t.prototype.readWord=function(){var t=this.readWord1(),e=R.name;return!this.state.containsEsc&&this.isKeyword(t)&&(e=j[t]),this.finishToken(e,t)},t.prototype.braceIsBlock=function(t){if(t===R.colon){var e=this.curContext();if(e===U.braceStatement||e===U.braceExpression)return!e.isExpr}return t===R._return?_.test(this.input.slice(this.state.lastTokEnd,this.state.start)):t===R._else||t===R.semi||t===R.eof||t===R.parenR||(t===R.braceL?this.curContext()===U.braceStatement:!this.state.exprAllowed)},t.prototype.updateContext=function(t){var e=this.state.type,s=void 0 ;e.keyword&&t===R.dot?this.state.exprAllowed=!1:(s=e.updateContext)?s.call(this,t):this.state.exprAllowed=e.beforeExpr},t}(),X={},z=["jsx","doExpressions","objectRestSpread","decorators","classProperties","exportExtensions","asyncGenerators","functionBind","functionSent","dynamicImport","flow"],J=function(t){function e(s,i){A(this,e),s=o(s);var r=N(this,t.call(this,s,i));return r.options=s,r.inModule="module"===r.options.sourceType,r.input=i,r.plugins=r.loadPlugins(r.options.plugins),r.filename=s.sourceFilename,0===r.state.pos&&"#"===r.input[0]&&"!"===r.input[1]&&r.skipLineComment(2),r}return T(e,t),e.prototype.isReservedWord=function(t){return"await"===t?this.inModule:x[6](t)},e.prototype.hasPlugin=function(t){return!!(this.plugins["*"]&&z.indexOf(t)>-1)||!!this.plugins[t]},e.prototype.extend=function(t,e){this[t]=e(this[t])},e.prototype.loadAllPlugins=function(){var t=this,e=Object.keys(X).filter(function(t){return"flow"!==t&&"estree"!==t});e.push("flow"),e.forEach(function(e){var s=X[e];s&&s(t)})},e.prototype.loadPlugins=function(t){if(t.indexOf("*")>=0)return this.loadAllPlugins(),{"*":!0};var e={};t.indexOf("flow")>=0&&(t=t.filter(function(t){return"flow"!==t}),t.push("flow")),t.indexOf("estree")>=0&&(t=t.filter(function(t){return"estree"!==t}),t.unshift("estree"));for(var s=t,i=Array.isArray(s),r=0,s=i?s:s[Symbol.iterator]();;){var a;if(i){if(r>=s.length)break;a=s[r++]}else{if(r=s.next(),r.done)break;a=r.value}var n=a;if(!e[n]){e[n]=!0;var o=X[n];o&&o(this)}}return e},e.prototype.parse=function(){var t=this.startNode(),e=this.startNode();return this.nextToken(),this.parseTopLevel(t,e)},e}(Y),K=J.prototype;K.addExtra=function(t,e,s){if(t){(t.extra=t.extra||{})[e]=s}},K.isRelational=function(t){return this.match(R.relational)&&this.state.value===t},K.expectRelational=function(t){this.isRelational(t)?this.next():this.unexpected(null,R.relational)},K.isContextual=function(t){return this.match(R.name)&&this.state.value===t},K.eatContextual=function(t){return this.state.value===t&&this.eat(R.name)},K.expectContextual=function(t,e){this.eatContextual(t)||this.unexpected(null,e)},K.canInsertSemicolon=function(){return this.match(R.eof)||this.match(R.braceR)||_.test(this.input.slice(this.state.lastTokEnd,this.state.start))},K.isLineTerminator=function(){return this.eat(R.semi)||this.canInsertSemicolon()},K.semicolon=function(){this.isLineTerminator()||this.unexpected(null,R.semi)},K.expect=function(t,e){return this.eat(t)||this.unexpected(e,t)},K.unexpected=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Unexpected token";e&&"object"===(void 0===e?"undefined":S(e))&&e.label&&(e="Unexpected token, expected "+e.label),this.raise(null!=t?t:this.state.start,e)};var H=J.prototype;H.parseTopLevel=function(t,e){return e.sourceType=this.options.sourceType,this.parseBlockBody(e,!0,!0,R.eof),t.program=this.finishNode(e,"Program"),t.comments=this.state.comments,t.tokens=this.state.tokens,this.finishNode(t,"File")};var Q={kind:"loop"},$={kind:"switch"};H.stmtToDirective=function(t){var e=t.expression,s=this.startNodeAt(e.start,e.loc.start),i=this.startNodeAt(t.start,t.loc.start),r=this.input.slice(e.start,e.end),a=s.value=r.slice(1,-1);return this.addExtra(s,"raw",r),this.addExtra(s,"rawValue",a),i.value=this.finishNodeAt(s,"DirectiveLiteral",e.end,e.loc.end),this.finishNodeAt(i,"Directive",t.end,t.loc.end)},H.parseStatement=function(t,e){this.match(R.at)&&this.parseDecorators(!0);var s=this.state.type,i=this.startNode();switch(s){case R._break:case R._continue:return this.parseBreakContinueStatement(i,s.keyword);case R._debugger:return this.parseDebuggerStatement(i);case R._do:return this.parseDoStatement(i);case R._for:return this.parseForStatement(i);case R._function:return t||this.unexpected(),this.parseFunctionStatement(i);case R._class:return t||this.unexpected(),this.parseClass(i,!0);case R._if:return this.parseIfStatement(i);case R._return:return this.parseReturnStatement(i);case R._switch:return this.parseSwitchStatement(i);case R._throw:return this.parseThrowStatement(i);case R._try:return this.parseTryStatement(i);case R._let:case R._const:t||this.unexpected();case R._var:return this.parseVarStatement(i,s);case R._while:return this.parseWhileStatement(i);case R._with:return this.parseWithStatement(i);case R.braceL:return this.parseBlock();case R.semi:return this.parseEmptyStatement(i);case R._export:case R._import:if(this.hasPlugin("dynamicImport")&&this.lookahead().type===R.parenL)break;return this.options.allowImportExportEverywhere||(e||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.state.start,"'import' and 'export' may appear only with 'sourceType: \"module\"'")),s===R._import?this.parseImport(i):this.parseExport(i);case R.name:if("async"===this.state.value){var r=this.state.clone();if(this.next(),this.match(R._function)&&!this.canInsertSemicolon())return this.expect(R._function),this.parseFunction(i,!0,!1,!0);this.state=r}}var a=this.state.value,n=this.parseExpression();return s===R.name&&"Identifier"===n.type&&this.eat(R.colon)?this.parseLabeledStatement(i,a,n):this.parseExpressionStatement(i,n)},H.takeDecorators=function(t){this.state.decorators.length&&(t.decorators=this.state.decorators,this.state.decorators=[])},H.parseDecorators=function(t){for(;this.match(R.at);){var e=this.parseDecorator();this.state.decorators.push(e)}t&&this.match(R._export)||this.match(R._class)||this.raise(this.state.start,"Leading decorators must be attached to a class declaration")},H.parseDecorator=function(){this.hasPlugin("decorators")||this.unexpected();var t=this.startNode();return this.next(),t.expression=this.parseMaybeAssign(),this.finishNode(t,"Decorator")},H.parseBreakContinueStatement=function(t,e){var s="break"===e;this.next(),this.isLineTerminator()?t.label=null:this.match(R.name)?(t.label=this.parseIdentifier(),this.semicolon()):this.unexpected();var i=void 0;for(i=0;i<this.state.labels.length;++i){var r=this.state.labels[i];if(null==t.label||r.name===t.label.name){if(null!=r.kind&&(s||"loop"===r.kind))break;if(t.label&&s)break}}return i===this.state.labels.length&&this.raise(t.start,"Unsyntactic "+e),this.finishNode(t,s?"BreakStatement":"ContinueStatement")},H.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")},H.parseDoStatement=function(t){return this.next(),this.state.labels.push(Q),t.body=this.parseStatement(!1),this.state.labels.pop(),this.expect(R._while),t.test=this.parseParenExpression(),this.eat(R.semi),this.finishNode(t,"DoWhileStatement")},H.parseForStatement=function(t){this.next(),this.state.labels.push(Q);var e=!1;if(this.hasPlugin("asyncGenerators")&&this.state.inAsync&&this.isContextual("await")&&(e=!0,this.next()),this.expect(R.parenL),this.match(R.semi))return e&&this.unexpected(),this.parseFor(t,null);if(this.match(R._var)||this.match(R._let)||this.match(R._const)){var s=this.startNode(),i=this.state.type;return this.next(),(this.parseVar(s,!0,i),this.finishNode(s,"VariableDeclaration"),!this.match(R._in)&&!this.isContextual("of")||1!==s.declarations.length||s.declarations[0].init)?(e&&this.unexpected(),this.parseFor(t,s)):this.parseForIn(t,s,e)}var r={start:0},a=this.parseExpression(!0,r);if(this.match(R._in)||this.isContextual("of")){var n=this.isContextual("of")?"for-of statement":"for-in statement";return this.toAssignable(a,void 0,n),this.checkLVal(a,void 0,void 0,n),this.parseForIn(t,a,e)}return r.start&&this.unexpected(r.start),e&&this.unexpected(),this.parseFor(t,a)},H.parseFunctionStatement=function(t){return this.next(),this.parseFunction(t,!0)},H.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement(!1),t.alternate=this.eat(R._else)?this.parseStatement(!1):null,this.finishNode(t,"IfStatement")},H.parseReturnStatement=function(t){return this.state.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.state.start,"'return' outside of function"),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")},H.parseSwitchStatement=function(t){this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(R.braceL),this.state.labels.push($);for(var e,s=void 0;!this.match(R.braceR);)if(this.match(R._case)||this.match(R._default)){var i=this.match(R._case);s&&this.finishNode(s,"SwitchCase"),t.cases.push(s=this.startNode()),s.consequent=[],this.next(),i?s.test=this.parseExpression():(e&&this.raise(this.state.lastTokStart,"Multiple default clauses"),e=!0,s.test=null),this.expect(R.colon)}else s?s.consequent.push(this.parseStatement(!0)):this.unexpected();return s&&this.finishNode(s,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")},H.parseThrowStatement=function(t){return this.next(),_.test(this.input.slice(this.state.lastTokEnd,this.state.start))&&this.raise(this.state.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var Z=[];H.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(R._catch)){var e=this.startNode();this.next(),this.expect(R.parenL),e.param=this.parseBindingAtom(),this.checkLVal(e.param,!0,Object.create(null),"catch clause"),this.expect(R.parenR),e.body=this.parseBlock(),t.handler=this.finishNode(e,"CatchClause")}return t.guardedHandlers=Z,t.finalizer=this.eat(R._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")},H.parseVarStatement=function(t,e){return this.next(),this.parseVar(t,!1,e),this.semicolon(),this.finishNode(t,"VariableDeclaration")},H.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.state.labels.push(Q),t.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(t,"WhileStatement")},H.parseWithStatement=function(t){return this.state.strict&&this.raise(this.state.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement(!1),this.finishNode(t,"WithStatement")},H.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")},H.parseLabeledStatement=function(t,e,s){for(var i=this.state.labels,r=Array.isArray(i),a=0,i=r?i:i[Symbol.iterator]();;){var n;if(r){if(a>=i.length)break;n=i[a++]}else{if(a=i.next(),a.done)break;n=a.value}n.name===e&&this.raise(s.start,"Label '"+e+"' is already declared")}for(var o=this.state.type.isLoop?"loop":this.match(R._switch)?"switch":null,h=this.state.labels.length-1;h>=0;h--){var p=this.state.labels[h];if(p.statementStart!==t.start)break;p.statementStart=this.state.start,p.kind=o}return this.state.labels.push({name:e,kind:o,statementStart:this.state.start}),t.body=this.parseStatement(!0),this.state.labels.pop(),t.label=s,this.finishNode(t,"LabeledStatement")},H.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")},H.parseBlock=function(t){var e=this.startNode();return this.expect(R.braceL),this.parseBlockBody(e,t,!1,R.braceR),this.finishNode(e,"BlockStatement")},H.isValidDirective=function(t){return"ExpressionStatement"===t.type&&"StringLiteral"===t.expression.type&&!t.expression.extra.parenthesized},H.parseBlockBody=function(t,e,s,i){t.body=[],t.directives=[];for(var r=!1,a=void 0,n=void 0;!this.eat(i);){r||!this.state.containsOctal||n||(n=this.state.octalPosition);var o=this.parseStatement(!0,s);if(e&&!r&&this.isValidDirective(o)){var h=this.stmtToDirective(o);t.directives.push(h),void 0===a&&"use strict"===h.value.value&&(a=this.state.strict,this.setStrict(!0),n&&this.raise(n,"Octal literal in strict mode"))}else r=!0,t.body.push(o)}!1===a&&this.setStrict(!1)},H.parseFor=function(t,e){return t.init=e,this.expect(R.semi),t.test=this.match(R.semi)?null:this.parseExpression(),this.expect(R.semi),t.update=this.match(R.parenR)?null:this.parseExpression(),this.expect(R.parenR),t.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(t,"ForStatement")},H.parseForIn=function(t,e,s){var i=void 0;return s?(this.eatContextual("of"),i="ForAwaitStatement"):(i=this.match(R._in)?"ForInStatement":"ForOfStatement",this.next()),t.left=e,t.right=this.parseExpression(),this.expect(R.parenR),t.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(t,i)},H.parseVar=function(t,e,s){for(t.declarations=[],t.kind=s.keyword;;){var i=this.startNode();if(this.parseVarHead(i),this.eat(R.eq)?i.init=this.parseMaybeAssign(e):s!==R._const||this.match(R._in)||this.isContextual("of")?"Identifier"===i.id.type||e&&(this.match(R._in)||this.isContextual("of"))?i.init=null:this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),t.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(R.comma))break}return t},H.parseVarHead=function(t){t.id=this.parseBindingAtom(),this.checkLVal(t.id,!0,void 0,"variable declaration")},H.parseFunction=function(t,e,s,i,r){var a=this.state.inMethod;return this.state.inMethod=!1,this.initFunction(t,i),this.match(R.star)&&(t.async&&!this.hasPlugin("asyncGenerators")?this.unexpected():(t.generator=!0,this.next())),!e||r||this.match(R.name)||this.match(R._yield)||this.unexpected(),(this.match(R.name)||this.match(R._yield))&&(t.id=this.parseBindingIdentifier()),this.parseFunctionParams(t),this.parseFunctionBody(t,s),this.state.inMethod=a,this.finishNode(t,e?"FunctionDeclaration":"FunctionExpression")},H.parseFunctionParams=function(t){this.expect(R.parenL),t.params=this.parseBindingList(R.parenR)},H.parseClass=function(t,e,s){return this.next(),this.takeDecorators(t),this.parseClassId(t,e,s),this.parseClassSuper(t),this.parseClassBody(t),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")},H.isClassProperty=function(){return this.match(R.eq)||this.match(R.semi)||this.match(R.braceR)},H.isClassMethod=function(){return this.match(R.parenL)},H.isNonstaticConstructor=function(t){return!(t.computed||t.static||"constructor"!==t.key.name&&"constructor"!==t.key.value)},H.parseClassBody=function(t){var e=this.state.strict;this.state.strict=!0;var s=!1,i=!1,r=[],a=this.startNode();for(a.body=[],this.expect(R.braceL);!this.eat(R.braceR);)if(this.eat(R.semi))r.length>0&&this.raise(this.state.lastTokEnd,"Decorators must not be followed by a semicolon");else if(this.match(R.at))r.push(this.parseDecorator());else{var n=this.startNode();if(r.length&&(n.decorators=r,r=[]),n.static=!1,this.match(R.name)&&"static"===this.state.value){var o=this.parseIdentifier(!0);if(this.isClassMethod()){n.kind="method",n.computed=!1,n.key=o,this.parseClassMethod(a,n,!1,!1);continue}if(this.isClassProperty()){n.computed=!1,n.key=o,a.body.push(this.parseClassProperty(n));continue}n.static=!0}if(this.eat(R.star))n.kind="method",this.parsePropertyName(n),this.isNonstaticConstructor(n)&&this.raise(n.key.start,"Constructor can't be a generator"),n.computed||!n.static||"prototype"!==n.key.name&&"prototype"!==n.key.value||this.raise(n.key.start,"Classes may not have static property named prototype"),this.parseClassMethod(a,n,!0,!1);else{var h=this.match(R.name),p=this.parsePropertyName(n);if(n.computed||!n.static||"prototype"!==n.key.name&&"prototype"!==n.key.value||this.raise(n.key.start,"Classes may not have static property named prototype"),this.isClassMethod())this.isNonstaticConstructor(n)?(i?this.raise(p.start,"Duplicate constructor in the same class"):n.decorators&&this.raise(n.start,"You can't attach decorators to a class constructor"),i=!0,n.kind="constructor"):n.kind="method",this.parseClassMethod(a,n,!1,!1);else if(this.isClassProperty())this.isNonstaticConstructor(n)&&this.raise(n.key.start,"Classes may not have a non-static field named 'constructor'"),a.body.push(this.parseClassProperty(n));else if(h&&"async"===p.name&&!this.isLineTerminator()){var c=this.hasPlugin("asyncGenerators")&&this.eat(R.star);n.kind="method",this.parsePropertyName(n),this.isNonstaticConstructor(n)&&this.raise(n.key.start,"Constructor can't be an async function"),this.parseClassMethod(a,n,c,!0)}else!h||"get"!==p.name&&"set"!==p.name||this.isLineTerminator()&&this.match(R.star)?this.hasPlugin("classConstructorCall")&&h&&"call"===p.name&&this.match(R.name)&&"constructor"===this.state.value?(s?this.raise(n.start,"Duplicate constructor call in the same class"):n.decorators&&this.raise(n.start,"You can't attach decorators to a class constructor"),s=!0,n.kind="constructorCall",this.parsePropertyName(n),this.parseClassMethod(a,n,!1,!1)):this.isLineTerminator()?(this.isNonstaticConstructor(n)&&this.raise(n.key.start,"Classes may not have a non-static field named 'constructor'"),a.body.push(this.parseClassProperty(n))):this.unexpected():(n.kind=p.name,this.parsePropertyName(n),this.isNonstaticConstructor(n)&&this.raise(n.key.start,"Constructor can't have get/set modifier"),this.parseClassMethod(a,n,!1,!1),this.checkGetterSetterParamCount(n))}}r.length&&this.raise(this.state.start,"You have trailing decorators with no method"),t.body=this.finishNode(a,"ClassBody"),this.state.strict=e},H.parseClassProperty=function(t){return this.state.inClassProperty=!0,this.match(R.eq)?(this.hasPlugin("classProperties")||this.unexpected(),this.next(),t.value=this.parseMaybeAssign()):t.value=null,this.semicolon(),this.state.inClassProperty=!1,this.finishNode(t,"ClassProperty")},H.parseClassMethod=function(t,e,s,i){this.parseMethod(e,s,i),t.body.push(this.finishNode(e,"ClassMethod"))},H.parseClassId=function(t,e,s){this.match(R.name)?t.id=this.parseIdentifier():s||!e?t.id=null:this.unexpected()},H.parseClassSuper=function(t){t.superClass=this.eat(R._extends)?this.parseExprSubscripts():null},H.parseExport=function(t){if(this.next(),this.match(R.star)){var e=this.startNode();if(this.next(),!this.hasPlugin("exportExtensi