Skip to content

Instantly share code, notes, and snippets.

@brunoinds
Created July 19, 2023 16:54
Show Gist options
  • Save brunoinds/8e8de885842faf041113adaac347fd3f to your computer and use it in GitHub Desktop.
Save brunoinds/8e8de885842faf041113adaac347fd3f to your computer and use it in GitHub Desktop.
Escopetree
!function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);throw(f=new Error("Cannot find module '"+i+"'")).code="MODULE_NOT_FOUND",f}c=n[i]={exports:{}},e[i][0].call(c.exports,function(r){return o(e[i][1][r]||r)},c,c.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}({1:[function(require,module,exports){const escope=require("escope"),esprima=require("esprima");class EscopeTree{static analyze(code){code=esprima.parse(code);return escope.analyze(code).acquire(code)}}window&&(window.EscopeTree=EscopeTree),exports.EscopeTree=EscopeTree},{escope:7,esprima:15}],2:[function(require,module,exports){!function(global){!function(){"use strict";var objectAssign=require("object-assign");function compare(a,b){if(a===b)return 0;for(var x=a.length,y=b.length,i=0,len=Math.min(x,y);i<len;++i)if(a[i]!==b[i]){x=a[i],y=b[i];break}return x<y?-1:y<x?1:0}function isBuffer(b){return global.Buffer&&"function"==typeof global.Buffer.isBuffer?global.Buffer.isBuffer(b):!(null==b||!b._isBuffer)}var util=require("util/"),hasOwn=Object.prototype.hasOwnProperty,pSlice=Array.prototype.slice,functionsHaveNames="foo"===function(){}.name;function pToString(obj){return Object.prototype.toString.call(obj)}function isView(arrbuf){return!isBuffer(arrbuf)&&"function"==typeof global.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(arrbuf):arrbuf&&(arrbuf instanceof DataView||!!(arrbuf.buffer&&arrbuf.buffer instanceof ArrayBuffer)))}var assert=module.exports=ok,regex=/\s*function\s+([^\(\s]*)\s*/;function getName(func){if(util.isFunction(func))return functionsHaveNames?func.name:(func=func.toString().match(regex))&&func[1]}function truncate(s,n){return"string"!=typeof s||s.length<n?s:s.slice(0,n)}function inspect(something){return functionsHaveNames||!util.isFunction(something)?util.inspect(something):"[Function"+((something=getName(something))?": "+something:"")+"]"}function fail(actual,expected,message,operator,stackStartFunction){throw new assert.AssertionError({message:message,actual:actual,expected:expected,operator:operator,stackStartFunction:stackStartFunction})}function ok(value,message){value||fail(value,!0,message,"==",assert.ok)}function _deepEqual(actual,expected,strict,memos){var actualIndex;return actual===expected||(isBuffer(actual)&&isBuffer(expected)?0===compare(actual,expected):util.isDate(actual)&&util.isDate(expected)?actual.getTime()===expected.getTime():util.isRegExp(actual)&&util.isRegExp(expected)?actual.source===expected.source&&actual.global===expected.global&&actual.multiline===expected.multiline&&actual.lastIndex===expected.lastIndex&&actual.ignoreCase===expected.ignoreCase:null!==actual&&"object"==typeof actual||null!==expected&&"object"==typeof expected?isView(actual)&&isView(expected)&&pToString(actual)===pToString(expected)&&!(actual instanceof Float32Array||actual instanceof Float64Array)?0===compare(new Uint8Array(actual.buffer),new Uint8Array(expected.buffer)):isBuffer(actual)===isBuffer(expected)&&(-1!==(actualIndex=(memos=memos||{actual:[],expected:[]}).actual.indexOf(actual))&&actualIndex===memos.expected.indexOf(expected)||(memos.actual.push(actual),memos.expected.push(expected),function(a,b,strict,actualVisitedObjects){if(null==a||null==b)return!1;if(util.isPrimitive(a)||util.isPrimitive(b))return a===b;if(strict&&Object.getPrototypeOf(a)!==Object.getPrototypeOf(b))return!1;var aIsArgs=isArguments(a),bIsArgs=isArguments(b);if(aIsArgs&&!bIsArgs||!aIsArgs&&bIsArgs)return!1;if(aIsArgs)return a=pSlice.call(a),b=pSlice.call(b),_deepEqual(a,b,strict);var key,i,ka=objectKeys(a),kb=objectKeys(b);if(ka.length!==kb.length)return!1;for(ka.sort(),kb.sort(),i=ka.length-1;0<=i;i--)if(ka[i]!==kb[i])return!1;for(i=ka.length-1;0<=i;i--)if(key=ka[i],!_deepEqual(a[key],b[key],strict,actualVisitedObjects))return!1;return!0}(actual,expected,strict,memos))):strict?actual===expected:actual==expected)}function isArguments(object){return"[object Arguments]"==Object.prototype.toString.call(object)}function expectedException(actual,expected){if(actual&&expected){if("[object RegExp]"==Object.prototype.toString.call(expected))return expected.test(actual);try{if(actual instanceof expected)return 1}catch(e){}return Error.isPrototypeOf(expected)?void 0:!0===expected.call({},actual)}}function _throws(shouldThrow,block,expected,message){if("function"!=typeof block)throw new TypeError('"block" argument must be a function');"string"==typeof expected&&(message=expected,expected=null),block=function(block){var error;try{block()}catch(e){error=e}return error}(block),message=(expected&&expected.name?" ("+expected.name+").":".")+(message?" "+message:"."),shouldThrow&&!block&&fail(block,expected,"Missing expected exception"+message);var userProvidedMessage="string"==typeof message,isUnexpectedException=!shouldThrow&&block&&!expected;if((!shouldThrow&&util.isError(block)&&userProvidedMessage&&expectedException(block,expected)||isUnexpectedException)&&fail(block,expected,"Got unwanted exception"+message),shouldThrow&&block&&expected&&!expectedException(block,expected)||!shouldThrow&&block)throw block}assert.AssertionError=function(options){this.name="AssertionError",this.actual=options.actual,this.expected=options.expected,this.operator=options.operator,options.message?(this.message=options.message,this.generatedMessage=!1):(this.message=truncate(inspect((self=this).actual),128)+" "+self.operator+" "+truncate(inspect(self.expected),128),this.generatedMessage=!0);var fn_name,self=options.stackStartFunction||fail;Error.captureStackTrace?Error.captureStackTrace(this,self):(options=new Error).stack&&(options=options.stack,fn_name=getName(self),0<=(fn_name=options.indexOf("\n"+fn_name))&&(fn_name=options.indexOf("\n",fn_name+1),options=options.substring(fn_name+1)),this.stack=options)},util.inherits(assert.AssertionError,Error),assert.fail=fail,assert.ok=ok,assert.equal=function(actual,expected,message){actual!=expected&&fail(actual,expected,message,"==",assert.equal)},assert.notEqual=function(actual,expected,message){actual==expected&&fail(actual,expected,message,"!=",assert.notEqual)},assert.deepEqual=function(actual,expected,message){_deepEqual(actual,expected,!1)||fail(actual,expected,message,"deepEqual",assert.deepEqual)},assert.deepStrictEqual=function(actual,expected,message){_deepEqual(actual,expected,!0)||fail(actual,expected,message,"deepStrictEqual",assert.deepStrictEqual)},assert.notDeepEqual=function(actual,expected,message){_deepEqual(actual,expected,!1)&&fail(actual,expected,message,"notDeepEqual",assert.notDeepEqual)},assert.notDeepStrictEqual=function notDeepStrictEqual(actual,expected,message){_deepEqual(actual,expected,!0)&&fail(actual,expected,message,"notDeepStrictEqual",notDeepStrictEqual)},assert.strictEqual=function(actual,expected,message){actual!==expected&&fail(actual,expected,message,"===",assert.strictEqual)},assert.notStrictEqual=function(actual,expected,message){actual===expected&&fail(actual,expected,message,"!==",assert.notStrictEqual)},assert.throws=function(block,error,message){_throws(!0,block,error,message)},assert.doesNotThrow=function(block,error,message){_throws(!1,block,error,message)},assert.ifError=function(err){if(err)throw err},assert.strict=objectAssign(function strict(value,message){value||fail(value,!0,message,"==",strict)},assert,{equal:assert.strictEqual,deepEqual:assert.deepStrictEqual,notEqual:assert.notStrictEqual,notDeepEqual:assert.notDeepStrictEqual}),assert.strict.strict=assert.strict;var objectKeys=Object.keys||function(obj){var key,keys=[];for(key in obj)hasOwn.call(obj,key)&&keys.push(key);return keys}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"object-assign":21,"util/":5}],3:[function(require,module,exports){"function"==typeof Object.create?module.exports=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})}:module.exports=function(ctor,superCtor){ctor.super_=superCtor;function TempCtor(){}TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}},{}],4:[function(require,module,exports){module.exports=function(arg){return arg&&"object"==typeof arg&&"function"==typeof arg.copy&&"function"==typeof arg.fill&&"function"==typeof arg.readUInt8}},{}],5:[function(require,module,exports){!function(process,global){!function(){var debugEnviron,formatRegExp=/%[sdj%]/g,debugs=(exports.format=function(f){if(!isString(f)){for(var objects=[],i=0;i<arguments.length;i++)objects.push(inspect(arguments[i]));return objects.join(" ")}for(var i=1,args=arguments,len=args.length,str=String(f).replace(formatRegExp,function(x){if("%%"===x)return"%";if(len<=i)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}}),x=args[i];i<len;x=args[++i])null!==x&&isObject(x)?str+=" "+inspect(x):str+=" "+x;return str},exports.deprecate=function(fn,msg){var warned;return void 0===global.process?function(){return exports.deprecate(fn,msg).apply(this,arguments)}:!0===process.noDeprecation?fn:(warned=!1,function(){if(!warned){if(process.throwDeprecation)throw new Error(msg);process.traceDeprecation?console.trace(msg):console.error(msg),warned=!0}return fn.apply(this,arguments)})},{});function inspect(obj,opts){var ctx={seen:[],stylize:stylizeNoColor};return 3<=arguments.length&&(ctx.depth=arguments[2]),4<=arguments.length&&(ctx.colors=arguments[3]),isBoolean(opts)?ctx.showHidden=opts:opts&&exports._extend(ctx,opts),void 0===ctx.showHidden&&(ctx.showHidden=!1),void 0===ctx.depth&&(ctx.depth=2),void 0===ctx.colors&&(ctx.colors=!1),void 0===ctx.customInspect&&(ctx.customInspect=!0),ctx.colors&&(ctx.stylize=stylizeWithColor),formatValue(ctx,obj,ctx.depth)}function stylizeWithColor(str,styleType){styleType=inspect.styles[styleType];return styleType?"["+inspect.colors[styleType][0]+"m"+str+"["+inspect.colors[styleType][1]+"m":str}function stylizeNoColor(str,styleType){return str}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&(!value.constructor||value.constructor.prototype!==value))return isString(ret=value.inspect(recurseTimes,ctx))?ret:formatValue(ctx,ret,recurseTimes);var ret=function(ctx,value){if(void 0===value)return ctx.stylize("undefined","undefined");{var simple;if(isString(value))return simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'",ctx.stylize(simple,"string")}return isNumber(value)?ctx.stylize(""+value,"number"):isBoolean(value)?ctx.stylize(""+value,"boolean"):null===value?ctx.stylize("null","null"):void 0}(ctx,value);if(ret)return ret;var ret=Object.keys(value),visibleKeys=function(array){var hash={};return array.forEach(function(val,idx){hash[val]=!0}),hash}(ret);if(ctx.showHidden&&(ret=Object.getOwnPropertyNames(value)),isError(value)&&(0<=ret.indexOf("message")||0<=ret.indexOf("description")))return formatError(value);if(0===ret.length){if(isFunction(value))return name=value.name?": "+value.name:"",ctx.stylize("[Function"+name+"]","special");if(isRegExp(value))return ctx.stylize(RegExp.prototype.toString.call(value),"regexp");if(isDate(value))return ctx.stylize(Date.prototype.toString.call(value),"date");if(isError(value))return formatError(value)}var name="",array=!1,braces=["{","}"];return isArray(value)&&(array=!0,braces=["[","]"]),isFunction(value)&&(name=" [Function"+(value.name?": "+value.name:"")+"]"),isRegExp(value)&&(name=" "+RegExp.prototype.toString.call(value)),isDate(value)&&(name=" "+Date.prototype.toUTCString.call(value)),isError(value)&&(name=" "+formatError(value)),0!==ret.length||array&&0!=value.length?recurseTimes<0?isRegExp(value)?ctx.stylize(RegExp.prototype.toString.call(value),"regexp"):ctx.stylize("[Object]","special"):(ctx.seen.push(value),ret=array?function(ctx,value,recurseTimes,visibleKeys,keys){for(var output=[],i=0,l=value.length;i<l;++i)hasOwnProperty(value,String(i))?output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,String(i),!0)):output.push("");return keys.forEach(function(key){key.match(/^\d+$/)||output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,key,!0))}),output}(ctx,value,recurseTimes,visibleKeys,ret):ret.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)}),ctx.seen.pop(),function(output,base,braces){if(60<output.reduce(function(prev,cur){return 0<=cur.indexOf("\n")&&0,prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0))return braces[0]+(""===base?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1];return braces[0]+base+" "+output.join(", ")+" "+braces[1]}(ret,name,braces)):braces[0]+name+braces[1]}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatProperty(ctx,value,recurseTimes,visibleKeys,key,array){var name,str,value=Object.getOwnPropertyDescriptor(value,key)||{value:value[key]};if(value.get?str=value.set?ctx.stylize("[Getter/Setter]","special"):ctx.stylize("[Getter]","special"):value.set&&(str=ctx.stylize("[Setter]","special")),hasOwnProperty(visibleKeys,key)||(name="["+key+"]"),str||(ctx.seen.indexOf(value.value)<0?-1<(str=formatValue(ctx,value.value,null===recurseTimes?null:recurseTimes-1)).indexOf("\n")&&(str=array?str.split("\n").map(function(line){return" "+line}).join("\n").substr(2):"\n"+str.split("\n").map(function(line){return" "+line}).join("\n")):str=ctx.stylize("[Circular]","special")),void 0===name){if(array&&key.match(/^\d+$/))return str;name=(name=JSON.stringify(""+key)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(name=name.substr(1,name.length-2),ctx.stylize(name,"name")):(name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ctx.stylize(name,"string"))}return name+": "+str}function isArray(ar){return Array.isArray(ar)}function isBoolean(arg){return"boolean"==typeof arg}function isNull(arg){return null===arg}function isNumber(arg){return"number"==typeof arg}function isString(arg){return"string"==typeof arg}function isUndefined(arg){return void 0===arg}function isRegExp(re){return isObject(re)&&"[object RegExp]"===objectToString(re)}function isObject(arg){return"object"==typeof arg&&null!==arg}function isDate(d){return isObject(d)&&"[object Date]"===objectToString(d)}function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}function isFunction(arg){return"function"==typeof arg}function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}exports.debuglog=function(set){var pid;return void 0===debugEnviron&&(debugEnviron=process.env.NODE_DEBUG||""),set=set.toUpperCase(),debugs[set]||(new RegExp("\\b"+set+"\\b","i").test(debugEnviron)?(pid=process.pid,debugs[set]=function(){var msg=exports.format.apply(exports,arguments);console.error("%s %d: %s",set,pid,msg)}):debugs[set]=function(){}),debugs[set]},(exports.inspect=inspect).colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=function(arg){return null==arg},exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=function(arg){return"symbol"==typeof arg},exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.isError=isError,exports.isFunction=isFunction,exports.isPrimitive=function(arg){return null===arg||"boolean"==typeof arg||"number"==typeof arg||"string"==typeof arg||"symbol"==typeof arg||void 0===arg},exports.isBuffer=require("./support/isBuffer");var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}exports.log=function(){var d,time;console.log("%s - %s",(d=new Date,time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":"),[d.getDate(),months[d.getMonth()],time].join(" ")),exports.format.apply(exports,arguments))},exports.inherits=require("inherits"),exports._extend=function(origin,add){if(add&&isObject(add))for(var keys=Object.keys(add),i=keys.length;i--;)origin[keys[i]]=add[keys[i]];return origin}}.call(this)}.call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":4,_process:22,inherits:3}],6:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Definition=exports.ParameterDefinition=void 0;var require=require("./variable"),_variable2=(require=require)&&require.__esModule?require:{default:require};function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function Definition(type,name,node,parent,index,kind){_classCallCheck(this,Definition),this.type=type,this.name=name,this.node=node,this.parent=parent,this.index=index,this.kind=kind}exports.default=Definition;require=function(){var subClass=ParameterDefinition,superClass=Definition;if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);function ParameterDefinition(name,node,index,rest){_classCallCheck(this,ParameterDefinition);name=function(self,call){if(self)return!call||"object"!=typeof call&&"function"!=typeof call?self:call;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(this,(ParameterDefinition.__proto__||Object.getPrototypeOf(ParameterDefinition)).call(this,_variable2.default.Parameter,name,node,null,index,null));return name.rest=rest,name}return subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass),ParameterDefinition}();exports.ParameterDefinition=require,exports.Definition=Definition},{"./variable":13}],7:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ScopeManager=exports.Scope=exports.Variable=exports.Reference=exports.version=void 0;var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj};exports.analyze=function(tree,providedOptions){var scopeManager;return providedOptions=function updateDeeply(target,override){var key,val;function isHashObject(target){return"object"===(void 0===target?"undefined":_typeof(target))&&target instanceof Object&&!(target instanceof Array)&&!(target instanceof RegExp)}for(key in override)override.hasOwnProperty(key)&&(val=override[key],isHashObject(val)?isHashObject(target[key])?updateDeeply(target[key],val):target[key]=updateDeeply({},val):target[key]=val);return target}({optimistic:!1,directive:!1,nodejsScope:!1,impliedStrict:!1,sourceType:"script",ecmaVersion:5,childVisitorKeys:null,fallback:"iteration"},providedOptions),scopeManager=new _scopeManager2.default(providedOptions),new _referencer2.default(providedOptions,scopeManager).visit(tree),(0,_assert2.default)(null===scopeManager.__currentScope,"currentScope should be null."),scopeManager};var _assert2=_interopRequireDefault(require("assert")),_scopeManager2=_interopRequireDefault(require("./scope-manager")),_referencer2=_interopRequireDefault(require("./referencer")),_reference2=_interopRequireDefault(require("./reference")),_variable2=_interopRequireDefault(require("./variable")),_scope2=_interopRequireDefault(require("./scope")),require=require("../package.json");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.version=require.version,exports.Reference=_reference2.default,exports.Variable=_variable2.default,exports.Scope=_scope2.default,exports.ScopeManager=_scopeManager2.default},{"../package.json":14,"./reference":9,"./referencer":10,"./scope":12,"./scope-manager":11,"./variable":13,assert:2}],8:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor};function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var _estraverse=require("estraverse"),require=require("esrecurse");require=function(_esrecurse$Visitor){var subClass=PatternVisitor;if("function"!=typeof _esrecurse$Visitor&&null!==_esrecurse$Visitor)throw new TypeError("Super expression must either be null or a function, not "+typeof _esrecurse$Visitor);function PatternVisitor(options,rootPattern,callback){if(this instanceof PatternVisitor)return(options=function(self,call){if(self)return!call||"object"!=typeof call&&"function"!=typeof call?self:call;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(this,(PatternVisitor.__proto__||Object.getPrototypeOf(PatternVisitor)).call(this,null,options))).rootPattern=rootPattern,options.callback=callback,options.assignments=[],options.rightHandNodes=[],options.restElements=[],options;throw new TypeError("Cannot call a class as a function")}return subClass.prototype=Object.create(_esrecurse$Visitor&&_esrecurse$Visitor.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),_esrecurse$Visitor&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,_esrecurse$Visitor):subClass.__proto__=_esrecurse$Visitor),_createClass(PatternVisitor,null,[{key:"isPattern",value:function(node){node=node.type;return node===_estraverse.Syntax.Identifier||node===_estraverse.Syntax.ObjectPattern||node===_estraverse.Syntax.ArrayPattern||node===_estraverse.Syntax.SpreadElement||node===_estraverse.Syntax.RestElement||node===_estraverse.Syntax.AssignmentPattern}}]),_createClass(PatternVisitor,[{key:"Identifier",value:function(pattern){var xs=(xs=this.restElements)[xs.length-1]||null;this.callback(pattern,{topLevel:pattern===this.rootPattern,rest:null!=xs&&xs.argument===pattern,assignments:this.assignments})}},{key:"Property",value:function(property){property.computed&&this.rightHandNodes.push(property.key),this.visit(property.value)}},{key:"ArrayPattern",value:function(pattern){for(var element,i=0,iz=pattern.elements.length;i<iz;++i)element=pattern.elements[i],this.visit(element)}},{key:"AssignmentPattern",value:function(pattern){this.assignments.push(pattern),this.visit(pattern.left),this.rightHandNodes.push(pattern.right),this.assignments.pop()}},{key:"RestElement",value:function(pattern){this.restElements.push(pattern),this.visit(pattern.argument),this.restElements.pop()}},{key:"MemberExpression",value:function(node){node.computed&&this.rightHandNodes.push(node.property),this.rightHandNodes.push(node.object)}},{key:"SpreadElement",value:function(node){this.visit(node.argument)}},{key:"ArrayExpression",value:function(node){node.elements.forEach(this.visit,this)}},{key:"AssignmentExpression",value:function(node){this.assignments.push(node),this.visit(node.left),this.rightHandNodes.push(node.right),this.assignments.pop()}},{key:"CallExpression",value:function(node){var _this2=this;node.arguments.forEach(function(a){_this2.rightHandNodes.push(a)}),this.visit(node.callee)}}]),PatternVisitor}(((require=require)&&require.__esModule?require:{default:require}).default.Visitor);exports.default=require},{esrecurse:16,estraverse:19}],9:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor};function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var Reference=function(){function Reference(ident,scope,flag,writeExpr,maybeImplicitGlobal,partial,init){if(!(this instanceof Reference))throw new TypeError("Cannot call a class as a function");this.identifier=ident,this.from=scope,this.tainted=!1,this.resolved=null,this.flag=flag,this.isWrite()&&(this.writeExpr=writeExpr,this.partial=partial,this.init=init),this.__maybeImplicitGlobal=maybeImplicitGlobal}return _createClass(Reference,[{key:"isStatic",value:function(){return!this.tainted&&this.resolved&&this.resolved.scope.isStatic()}},{key:"isWrite",value:function(){return!!(this.flag&Reference.WRITE)}},{key:"isRead",value:function(){return!!(this.flag&Reference.READ)}},{key:"isReadOnly",value:function(){return this.flag===Reference.READ}},{key:"isWriteOnly",value:function(){return this.flag===Reference.WRITE}},{key:"isReadWrite",value:function(){return this.flag===Reference.RW}}]),Reference}();(exports.default=Reference).READ=1,Reference.WRITE=2,Reference.RW=3},{}],10:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor};function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var _estraverse=require("estraverse"),_esrecurse2=_interopRequireDefault(require("esrecurse")),_reference2=_interopRequireDefault(require("./reference")),_variable2=_interopRequireDefault(require("./variable")),_patternVisitor2=_interopRequireDefault(require("./pattern-visitor")),_definition=require("./definition"),_assert2=_interopRequireDefault(require("assert"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(self)return!call||"object"!=typeof call&&"function"!=typeof call?self:call;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var Importer=function(){function Importer(declaration,referencer){_classCallCheck(this,Importer);var _this=_possibleConstructorReturn(this,(Importer.__proto__||Object.getPrototypeOf(Importer)).call(this,null,referencer.options));return _this.declaration=declaration,_this.referencer=referencer,_this}return _inherits(Importer,_esrecurse2.default.Visitor),_createClass(Importer,[{key:"visitImport",value:function(id,specifier){var _this2=this;this.referencer.visitPattern(id,function(pattern){_this2.referencer.currentScope().__define(pattern,new _definition.Definition(_variable2.default.ImportBinding,pattern,specifier,_this2.declaration,null,null))})}},{key:"ImportNamespaceSpecifier",value:function(node){var local=node.local||node.id;local&&this.visitImport(local,node)}},{key:"ImportDefaultSpecifier",value:function(node){var local=node.local||node.id;this.visitImport(local,node)}},{key:"ImportSpecifier",value:function(node){var local=node.local||node.id;node.name?this.visitImport(node.name,node):this.visitImport(local,node)}}]),Importer}(),require=function(){function Referencer(options,scopeManager){_classCallCheck(this,Referencer);var _this3=_possibleConstructorReturn(this,(Referencer.__proto__||Object.getPrototypeOf(Referencer)).call(this,null,options));return _this3.options=options,_this3.scopeManager=scopeManager,_this3.parent=null,_this3.isInnerMethodDefinition=!1,_this3}return _inherits(Referencer,_esrecurse2.default.Visitor),_createClass(Referencer,[{key:"currentScope",value:function(){return this.scopeManager.__currentScope}},{key:"close",value:function(node){for(;this.currentScope()&&node===this.currentScope().block;)this.scopeManager.__currentScope=this.currentScope().__close(this.scopeManager)}},{key:"pushInnerMethodDefinition",value:function(isInnerMethodDefinition){var previous=this.isInnerMethodDefinition;return this.isInnerMethodDefinition=isInnerMethodDefinition,previous}},{key:"popInnerMethodDefinition",value:function(isInnerMethodDefinition){this.isInnerMethodDefinition=isInnerMethodDefinition}},{key:"materializeTDZScope",value:function(node,iterationNode){this.scopeManager.__nestTDZScope(node,iterationNode),this.visitVariableDeclaration(this.currentScope(),_variable2.default.TDZ,iterationNode.left,0,!0)}},{key:"materializeIterationScope",value:function(node){var letOrConstDecl,_this4=this;this.scopeManager.__nestForScope(node),letOrConstDecl=node.left,this.visitVariableDeclaration(this.currentScope(),_variable2.default.Variable,letOrConstDecl,0),this.visitPattern(letOrConstDecl.declarations[0].id,function(pattern){_this4.currentScope().__referencing(pattern,_reference2.default.WRITE,node.right,null,!0,!0)})}},{key:"referencingDefaultValue",value:function(pattern,assignments,maybeImplicitGlobal,init){var scope=this.currentScope();assignments.forEach(function(assignment){scope.__referencing(pattern,_reference2.default.WRITE,assignment.right,maybeImplicitGlobal,pattern!==assignment.left,init)})}},{key:"visitPattern",value:function(node,options,callback){"function"==typeof options&&(callback=options,options={processRightHandNodes:!1}),function(options,rootPattern,referencer,callback){(options=new _patternVisitor2.default(options,rootPattern,callback)).visit(rootPattern),null!=referencer&&options.rightHandNodes.forEach(referencer.visit,referencer)}(this.options,node,options.processRightHandNodes?this:null,callback)}},{key:"visitFunction",value:function(node){var i,iz,_this5=this;for(node.type===_estraverse.Syntax.FunctionDeclaration&&this.currentScope().__define(node.id,new _definition.Definition(_variable2.default.FunctionName,node.id,node,null,null,null)),node.type===_estraverse.Syntax.FunctionExpression&&node.id&&this.scopeManager.__nestFunctionExpressionNameScope(node),this.scopeManager.__nestFunctionScope(node,this.isInnerMethodDefinition),i=0,iz=node.params.length;i<iz;++i)this.visitPattern(node.params[i],{processRightHandNodes:!0},function(pattern,info){_this5.currentScope().__define(pattern,new _definition.ParameterDefinition(pattern,node,i,info.rest)),_this5.referencingDefaultValue(pattern,info.assignments,null,!0)});node.rest&&this.visitPattern({type:"RestElement",argument:node.rest},function(pattern){_this5.currentScope().__define(pattern,new _definition.ParameterDefinition(pattern,node,node.params.length,!0))}),node.body.type===_estraverse.Syntax.BlockStatement?this.visitChildren(node.body):this.visit(node.body),this.close(node)}},{key:"visitClass",value:function(node){node.type===_estraverse.Syntax.ClassDeclaration&&this.currentScope().__define(node.id,new _definition.Definition(_variable2.default.ClassName,node.id,node,null,null,null)),this.visit(node.superClass),this.scopeManager.__nestClassScope(node),node.id&&this.currentScope().__define(node.id,new _definition.Definition(_variable2.default.ClassName,node.id,node)),this.visit(node.body),this.close(node)}},{key:"visitProperty",value:function(node){var previous,isMethodDefinition;node.computed&&this.visit(node.key),(isMethodDefinition=node.type===_estraverse.Syntax.MethodDefinition)&&(previous=this.pushInnerMethodDefinition(!0)),this.visit(node.value),isMethodDefinition&&this.popInnerMethodDefinition(previous)}},{key:"visitForIn",value:function(node){var _this6=this;node.left.type===_estraverse.Syntax.VariableDeclaration&&"var"!==node.left.kind?(this.materializeTDZScope(node.right,node),this.visit(node.right),this.close(node.right),this.materializeIterationScope(node),this.visit(node.body),this.close(node)):(node.left.type===_estraverse.Syntax.VariableDeclaration?(this.visit(node.left),this.visitPattern(node.left.declarations[0].id,function(pattern){_this6.currentScope().__referencing(pattern,_reference2.default.WRITE,node.right,null,!0,!0)})):this.visitPattern(node.left,{processRightHandNodes:!0},function(pattern,info){var maybeImplicitGlobal=null;_this6.currentScope().isStrict||(maybeImplicitGlobal={pattern:pattern,node:node}),_this6.referencingDefaultValue(pattern,info.assignments,maybeImplicitGlobal,!1),_this6.currentScope().__referencing(pattern,_reference2.default.WRITE,node.right,maybeImplicitGlobal,!0,!1)}),this.visit(node.right),this.visit(node.body))}},{key:"visitVariableDeclaration",value:function(variableTargetScope,type,node,index,fromTDZ){var _this7=this,decl=node.declarations[index],init=decl.init;this.visitPattern(decl.id,{processRightHandNodes:!fromTDZ},function(pattern,info){variableTargetScope.__define(pattern,new _definition.Definition(type,pattern,decl,node,index,node.kind)),fromTDZ||_this7.referencingDefaultValue(pattern,info.assignments,null,!0),init&&_this7.currentScope().__referencing(pattern,_reference2.default.WRITE,init,null,!info.topLevel,!0)})}},{key:"AssignmentExpression",value:function(node){var _this8=this;_patternVisitor2.default.isPattern(node.left)?"="===node.operator?this.visitPattern(node.left,{processRightHandNodes:!0},function(pattern,info){var maybeImplicitGlobal=null;_this8.currentScope().isStrict||(maybeImplicitGlobal={pattern:pattern,node:node}),_this8.referencingDefaultValue(pattern,info.assignments,maybeImplicitGlobal,!1),_this8.currentScope().__referencing(pattern,_reference2.default.WRITE,node.right,maybeImplicitGlobal,!info.topLevel,!1)}):this.currentScope().__referencing(node.left,_reference2.default.RW,node.right):this.visit(node.left),this.visit(node.right)}},{key:"CatchClause",value:function(node){var _this9=this;this.scopeManager.__nestCatchScope(node),this.visitPattern(node.param,{processRightHandNodes:!0},function(pattern,info){_this9.currentScope().__define(pattern,new _definition.Definition(_variable2.default.CatchClause,node.param,node,null,null,null)),_this9.referencingDefaultValue(pattern,info.assignments,null,!0)}),this.visit(node.body),this.close(node)}},{key:"Program",value:function(node){this.scopeManager.__nestGlobalScope(node),this.scopeManager.__isNodejsScope()&&(this.currentScope().isStrict=!1,this.scopeManager.__nestFunctionScope(node,!1)),this.scopeManager.__isES6()&&this.scopeManager.isModule()&&this.scopeManager.__nestModuleScope(node),this.scopeManager.isStrictModeSupported()&&this.scopeManager.isImpliedStrict()&&(this.currentScope().isStrict=!0),this.visitChildren(node),this.close(node)}},{key:"Identifier",value:function(node){this.currentScope().__referencing(node)}},{key:"UpdateExpression",value:function(node){_patternVisitor2.default.isPattern(node.argument)?this.currentScope().__referencing(node.argument,_reference2.default.RW,null):this.visitChildren(node)}},{key:"MemberExpression",value:function(node){this.visit(node.object),node.computed&&this.visit(node.property)}},{key:"Property",value:function(node){this.visitProperty(node)}},{key:"MethodDefinition",value:function(node){this.visitProperty(node)}},{key:"BreakStatement",value:function(){}},{key:"ContinueStatement",value:function(){}},{key:"LabeledStatement",value:function(node){this.visit(node.body)}},{key:"ForStatement",value:function(node){node.init&&node.init.type===_estraverse.Syntax.VariableDeclaration&&"var"!==node.init.kind&&this.scopeManager.__nestForScope(node),this.visitChildren(node),this.close(node)}},{key:"ClassExpression",value:function(node){this.visitClass(node)}},{key:"ClassDeclaration",value:function(node){this.visitClass(node)}},{key:"CallExpression",value:function(node){this.scopeManager.__ignoreEval()||node.callee.type!==_estraverse.Syntax.Identifier||"eval"!==node.callee.name||this.currentScope().variableScope.__detectEval(),this.visitChildren(node)}},{key:"BlockStatement",value:function(node){this.scopeManager.__isES6()&&this.scopeManager.__nestBlockScope(node),this.visitChildren(node),this.close(node)}},{key:"ThisExpression",value:function(){this.currentScope().variableScope.__detectThis()}},{key:"WithStatement",value:function(node){this.visit(node.object),this.scopeManager.__nestWithScope(node),this.visit(node.body),this.close(node)}},{key:"VariableDeclaration",value:function(node){for(var decl,variableTargetScope="var"===node.kind?this.currentScope().variableScope:this.currentScope(),i=0,iz=node.declarations.length;i<iz;++i)decl=node.declarations[i],this.visitVariableDeclaration(variableTargetScope,_variable2.default.Variable,node,i),decl.init&&this.visit(decl.init)}},{key:"SwitchStatement",value:function(node){var i,iz;for(this.visit(node.discriminant),this.scopeManager.__isES6()&&this.scopeManager.__nestSwitchScope(node),i=0,iz=node.cases.length;i<iz;++i)this.visit(node.cases[i]);this.close(node)}},{key:"FunctionDeclaration",value:function(node){this.visitFunction(node)}},{key:"FunctionExpression",value:function(node){this.visitFunction(node)}},{key:"ForOfStatement",value:function(node){this.visitForIn(node)}},{key:"ForInStatement",value:function(node){this.visitForIn(node)}},{key:"ArrowFunctionExpression",value:function(node){this.visitFunction(node)}},{key:"ImportDeclaration",value:function(node){(0,_assert2.default)(this.scopeManager.__isES6()&&this.scopeManager.isModule(),"ImportDeclaration should appear when the mode is ES6 and in the module context."),new Importer(node,this).visit(node)}},{key:"visitExportDeclaration",value:function(node){node.source||(node.declaration?this.visit(node.declaration):this.visitChildren(node))}},{key:"ExportDeclaration",value:function(node){this.visitExportDeclaration(node)}},{key:"ExportNamedDeclaration",value:function(node){this.visitExportDeclaration(node)}},{key:"ExportSpecifier",value:function(node){node=node.id||node.local;this.visit(node)}},{key:"MetaProperty",value:function(){}}]),Referencer}();exports.default=require},{"./definition":6,"./pattern-visitor":8,"./reference":9,"./variable":13,assert:2,esrecurse:16,estraverse:19}],11:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor};function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var _scope=require("./scope"),_assert2=(_interopRequireDefault(_scope),_interopRequireDefault(require("assert")));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}require=function(){function ScopeManager(options){if(!(this instanceof ScopeManager))throw new TypeError("Cannot call a class as a function");this.scopes=[],this.globalScope=null,this.__nodeToScope=new WeakMap,this.__currentScope=null,this.__options=options,this.__declaredVariables=new WeakMap}return _createClass(ScopeManager,[{key:"__useDirective",value:function(){return this.__options.directive}},{key:"__isOptimistic",value:function(){return this.__options.optimistic}},{key:"__ignoreEval",value:function(){return this.__options.ignoreEval}},{key:"__isNodejsScope",value:function(){return this.__options.nodejsScope}},{key:"isModule",value:function(){return"module"===this.__options.sourceType}},{key:"isImpliedStrict",value:function(){return this.__options.impliedStrict}},{key:"isStrictModeSupported",value:function(){return 5<=this.__options.ecmaVersion}},{key:"__get",value:function(node){return this.__nodeToScope.get(node)}},{key:"getDeclaredVariables",value:function(node){return this.__declaredVariables.get(node)||[]}},{key:"acquire",value:function(node,inner){var scopes,scope,i,iz;function predicate(scope){return("function"!==scope.type||!scope.functionExpressionScope)&&"TDZ"!==scope.type}if((scopes=this.__get(node))&&0!==scopes.length){if(1===scopes.length)return scopes[0];if(inner){for(i=scopes.length-1;0<=i;--i)if(predicate(scope=scopes[i]))return scope}else for(i=0,iz=scopes.length;i<iz;++i)if(predicate(scope=scopes[i]))return scope}return null}},{key:"acquireAll",value:function(node){return this.__get(node)}},{key:"release",value:function(node,inner){var node=this.__get(node);return node&&node.length&&(node=node[0].upper)?this.acquire(node.block,inner):null}},{key:"attach",value:function(){}},{key:"detach",value:function(){}},{key:"__nestScope",value:function(scope){return scope instanceof _scope.GlobalScope&&((0,_assert2.default)(null===this.__currentScope),this.globalScope=scope),this.__currentScope=scope}},{key:"__nestGlobalScope",value:function(node){return this.__nestScope(new _scope.GlobalScope(this,node))}},{key:"__nestBlockScope",value:function(node,isMethodDefinition){return this.__nestScope(new _scope.BlockScope(this,this.__currentScope,node))}},{key:"__nestFunctionScope",value:function(node,isMethodDefinition){return this.__nestScope(new _scope.FunctionScope(this,this.__currentScope,node,isMethodDefinition))}},{key:"__nestForScope",value:function(node){return this.__nestScope(new _scope.ForScope(this,this.__currentScope,node))}},{key:"__nestCatchScope",value:function(node){return this.__nestScope(new _scope.CatchScope(this,this.__currentScope,node))}},{key:"__nestWithScope",value:function(node){return this.__nestScope(new _scope.WithScope(this,this.__currentScope,node))}},{key:"__nestClassScope",value:function(node){return this.__nestScope(new _scope.ClassScope(this,this.__currentScope,node))}},{key:"__nestSwitchScope",value:function(node){return this.__nestScope(new _scope.SwitchScope(this,this.__currentScope,node))}},{key:"__nestModuleScope",value:function(node){return this.__nestScope(new _scope.ModuleScope(this,this.__currentScope,node))}},{key:"__nestTDZScope",value:function(node){return this.__nestScope(new _scope.TDZScope(this,this.__currentScope,node))}},{key:"__nestFunctionExpressionNameScope",value:function(node){return this.__nestScope(new _scope.FunctionExpressionNameScope(this,this.__currentScope,node))}},{key:"__isES6",value:function(){return 6<=this.__options.ecmaVersion}}]),ScopeManager}();exports.default=require},{"./scope":12,assert:2}],12:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ClassScope=exports.ForScope=exports.FunctionScope=exports.SwitchScope=exports.BlockScope=exports.TDZScope=exports.WithScope=exports.CatchScope=exports.FunctionExpressionNameScope=exports.ModuleScope=exports.GlobalScope=void 0;function _get(object,property,receiver){null===object&&(object=Function.prototype);var desc=Object.getOwnPropertyDescriptor(object,property);return void 0!==desc?"value"in desc?desc.value:void 0!==(desc=desc.get)?desc.call(receiver):void 0:null!==(desc=Object.getPrototypeOf(object))?_get(desc,property,receiver):void 0}var _createClass=function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor};function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var _estraverse=require("estraverse"),_reference2=_interopRequireDefault(require("./reference")),_variable2=_interopRequireDefault(require("./variable")),_definition2=_interopRequireDefault(require("./definition")),_assert2=_interopRequireDefault(require("assert"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _possibleConstructorReturn(self,call){if(self)return!call||"object"!=typeof call&&"function"!=typeof call?self:call;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function shouldBeStatically(def){return def.type===_variable2.default.ClassName||def.type===_variable2.default.Variable&&"var"!==def.parent.kind}var Scope=function(){function Scope(scopeManager,type,upperScope,block,isMethodDefinition){_classCallCheck(this,Scope),this.type=type,this.set=new Map,this.taints=new Map,this.dynamic="global"===this.type||"with"===this.type,this.block=block,this.through=[],this.variables=[],this.references=[],this.variableScope="global"===this.type||"function"===this.type||"module"===this.type?this:upperScope.variableScope,this.functionExpressionScope=!1,this.directCallToEvalScope=!1,this.thisFound=!1,this.__left=[],this.upper=upperScope,this.isStrict=function(scope,block,isMethodDefinition,useDirective){var body,i,iz,stmt,expr;if(scope.upper&&scope.upper.isStrict)return!0;if(block.type===_estraverse.Syntax.ArrowFunctionExpression)return!0;if(isMethodDefinition)return!0;if("class"===scope.type||"module"===scope.type)return!0;if("block"!==scope.type&&"switch"!==scope.type){if("function"===scope.type)body=block.type===_estraverse.Syntax.Program?block:block.body;else{if("global"!==scope.type)return!1;body=block}if(useDirective){for(i=0,iz=body.body.length;i<iz&&(stmt=body.body[i]).type===_estraverse.Syntax.DirectiveStatement;++i)if('"use strict"'===stmt.raw||"'use strict'"===stmt.raw)return!0}else for(i=0,iz=body.body.length;i<iz&&(stmt=body.body[i]).type===_estraverse.Syntax.ExpressionStatement&&((expr=stmt.expression).type===_estraverse.Syntax.Literal&&"string"==typeof expr.value);++i)if(null!=expr.raw){if('"use strict"'===expr.raw||"'use strict'"===expr.raw)return!0}else if("use strict"===expr.value)return!0}return!1}(this,block,isMethodDefinition,scopeManager.__useDirective()),this.childScopes=[],this.upper&&this.upper.childScopes.push(this),this.__declaredVariables=scopeManager.__declaredVariables,function(scopeManager,scope){var scopes;scopeManager.scopes.push(scope),(scopes=scopeManager.__nodeToScope.get(scope.block))?scopes.push(scope):scopeManager.__nodeToScope.set(scope.block,[scope])}(scopeManager,this)}return _createClass(Scope,[{key:"__shouldStaticallyClose",value:function(scopeManager){return!this.dynamic||scopeManager.__isOptimistic()}},{key:"__shouldStaticallyCloseForGlobal",value:function(ref){var ref=ref.identifier.name;return!!this.set.has(ref)&&0<(ref=this.set.get(ref).defs).length&&ref.every(shouldBeStatically)}},{key:"__staticCloseRef",value:function(ref){this.__resolve(ref)||this.__delegateToUpperScope(ref)}},{key:"__dynamicCloseRef",value:function(ref){for(var current=this;current.through.push(ref),current=current.upper;);}},{key:"__globalCloseRef",value:function(ref){this.__shouldStaticallyCloseForGlobal(ref)?this.__staticCloseRef(ref):this.__dynamicCloseRef(ref)}},{key:"__close",value:function(scopeManager){for(var closeRef=this.__shouldStaticallyClose(scopeManager)?this.__staticCloseRef:"global"!==this.type?this.__dynamicCloseRef:this.__globalCloseRef,i=0,iz=this.__left.length;i<iz;++i){var ref=this.__left[i];closeRef.call(this,ref)}return this.__left=null,this.upper}},{key:"__resolve",value:function(ref){var name=ref.identifier.name;return!!this.set.has(name)&&((name=this.set.get(name)).references.push(ref),name.stack=name.stack&&ref.from.variableScope===this.variableScope,ref.tainted&&(name.tainted=!0,this.taints.set(name.name,!0)),ref.resolved=name,!0)}},{key:"__delegateToUpperScope",value:function(ref){this.upper&&this.upper.__left.push(ref),this.through.push(ref)}},{key:"__addDeclaredVariablesOfNode",value:function(variable,node){var variables;null!=node&&(null==(variables=this.__declaredVariables.get(node))&&this.__declaredVariables.set(node,variables=[]),-1===variables.indexOf(variable))&&variables.push(variable)}},{key:"__defineGeneric",value:function(name,set,variables,node,def){var variable=set.get(name);variable||(variable=new _variable2.default(name,this),set.set(name,variable),variables.push(variable)),def&&(variable.defs.push(def),def.type!==_variable2.default.TDZ)&&(this.__addDeclaredVariablesOfNode(variable,def.node),this.__addDeclaredVariablesOfNode(variable,def.parent)),node&&variable.identifiers.push(node)}},{key:"__define",value:function(node,def){node&&node.type===_estraverse.Syntax.Identifier&&this.__defineGeneric(node.name,this.set,this.variables,node,def)}},{key:"__referencing",value:function(node,assign,writeExpr,maybeImplicitGlobal,partial,init){node&&node.type===_estraverse.Syntax.Identifier&&"super"!==node.name&&(node=new _reference2.default(node,this,assign||_reference2.default.READ,writeExpr,maybeImplicitGlobal,!!partial,!!init),this.references.push(node),this.__left.push(node))}},{key:"__detectEval",value:function(){var current=this;for(this.directCallToEvalScope=!0;current.dynamic=!0,current=current.upper;);}},{key:"__detectThis",value:function(){this.thisFound=!0}},{key:"__isClosed",value:function(){return null===this.__left}},{key:"resolve",value:function(ident){var ref,i,iz;for((0,_assert2.default)(this.__isClosed(),"Scope should be closed."),(0,_assert2.default)(ident.type===_estraverse.Syntax.Identifier,"Target should be identifier."),i=0,iz=this.references.length;i<iz;++i)if((ref=this.references[i]).identifier===ident)return ref;return null}},{key:"isStatic",value:function(){return!this.dynamic}},{key:"isArgumentsMaterialized",value:function(){return!0}},{key:"isThisMaterialized",value:function(){return!0}},{key:"isUsedName",value:function(name){if(this.set.has(name))return!0;for(var i=0,iz=this.through.length;i<iz;++i)if(this.through[i].identifier.name===name)return!0;return!1}}]),Scope}();exports.default=Scope,exports.GlobalScope=function(){function GlobalScope(scopeManager,block){_classCallCheck(this,GlobalScope);scopeManager=_possibleConstructorReturn(this,(GlobalScope.__proto__||Object.getPrototypeOf(GlobalScope)).call(this,scopeManager,"global",null,block,!1));return scopeManager.implicit={set:new Map,variables:[],left:[]},scopeManager}return _inherits(GlobalScope,Scope),_createClass(GlobalScope,[{key:"__close",value:function(scopeManager){for(var implicit=[],i=0,iz=this.__left.length;i<iz;++i){var ref=this.__left[i];ref.__maybeImplicitGlobal&&!this.set.has(ref.identifier.name)&&implicit.push(ref.__maybeImplicitGlobal)}for(var _i=0,_iz=implicit.length;_i<_iz;++_i){var info=implicit[_i];this.__defineImplicit(info.pattern,new _definition2.default(_variable2.default.ImplicitGlobalVariable,info.pattern,info.node,null,null,null))}return this.implicit.left=this.__left,_get(GlobalScope.prototype.__proto__||Object.getPrototypeOf(GlobalScope.prototype),"__close",this).call(this,scopeManager)}},{key:"__defineImplicit",value:function(node,def){node&&node.type===_estraverse.Syntax.Identifier&&this.__defineGeneric(node.name,this.implicit.set,this.implicit.variables,node,def)}}]),GlobalScope}(),exports.ModuleScope=function(){function ModuleScope(scopeManager,upperScope,block){return _classCallCheck(this,ModuleScope),_possibleConstructorReturn(this,(ModuleScope.__proto__||Object.getPrototypeOf(ModuleScope)).call(this,scopeManager,"module",upperScope,block,!1))}return _inherits(ModuleScope,Scope),ModuleScope}(),exports.FunctionExpressionNameScope=function(){function FunctionExpressionNameScope(scopeManager,upperScope,block){_classCallCheck(this,FunctionExpressionNameScope);scopeManager=_possibleConstructorReturn(this,(FunctionExpressionNameScope.__proto__||Object.getPrototypeOf(FunctionExpressionNameScope)).call(this,scopeManager,"function-expression-name",upperScope,block,!1));return scopeManager.__define(block.id,new _definition2.default(_variable2.default.FunctionName,block.id,block,null,null,null)),scopeManager.functionExpressionScope=!0,scopeManager}return _inherits(FunctionExpressionNameScope,Scope),FunctionExpressionNameScope}(),exports.CatchScope=function(){function CatchScope(scopeManager,upperScope,block){return _classCallCheck(this,CatchScope),_possibleConstructorReturn(this,(CatchScope.__proto__||Object.getPrototypeOf(CatchScope)).call(this,scopeManager,"catch",upperScope,block,!1))}return _inherits(CatchScope,Scope),CatchScope}(),exports.WithScope=function(){function WithScope(scopeManager,upperScope,block){return _classCallCheck(this,WithScope),_possibleConstructorReturn(this,(WithScope.__proto__||Object.getPrototypeOf(WithScope)).call(this,scopeManager,"with",upperScope,block,!1))}return _inherits(WithScope,Scope),_createClass(WithScope,[{key:"__close",value:function(scopeManager){if(this.__shouldStaticallyClose(scopeManager))return _get(WithScope.prototype.__proto__||Object.getPrototypeOf(WithScope.prototype),"__close",this).call(this,scopeManager);for(var i=0,iz=this.__left.length;i<iz;++i){var ref=this.__left[i];ref.tainted=!0,this.__delegateToUpperScope(ref)}return this.__left=null,this.upper}}]),WithScope}(),exports.TDZScope=function(){function TDZScope(scopeManager,upperScope,block){return _classCallCheck(this,TDZScope),_possibleConstructorReturn(this,(TDZScope.__proto__||Object.getPrototypeOf(TDZScope)).call(this,scopeManager,"TDZ",upperScope,block,!1))}return _inherits(TDZScope,Scope),TDZScope}(),exports.BlockScope=function(){function BlockScope(scopeManager,upperScope,block){return _classCallCheck(this,BlockScope),_possibleConstructorReturn(this,(BlockScope.__proto__||Object.getPrototypeOf(BlockScope)).call(this,scopeManager,"block",upperScope,block,!1))}return _inherits(BlockScope,Scope),BlockScope}(),exports.SwitchScope=function(){function SwitchScope(scopeManager,upperScope,block){return _classCallCheck(this,SwitchScope),_possibleConstructorReturn(this,(SwitchScope.__proto__||Object.getPrototypeOf(SwitchScope)).call(this,scopeManager,"switch",upperScope,block,!1))}return _inherits(SwitchScope,Scope),SwitchScope}(),exports.FunctionScope=function(){function FunctionScope(scopeManager,upperScope,block,isMethodDefinition){_classCallCheck(this,FunctionScope);scopeManager=_possibleConstructorReturn(this,(FunctionScope.__proto__||Object.getPrototypeOf(FunctionScope)).call(this,scopeManager,"function",upperScope,block,isMethodDefinition));return scopeManager.block.type!==_estraverse.Syntax.ArrowFunctionExpression&&scopeManager.__defineArguments(),scopeManager}return _inherits(FunctionScope,Scope),_createClass(FunctionScope,[{key:"isArgumentsMaterialized",value:function(){var variable;return this.block.type!==_estraverse.Syntax.ArrowFunctionExpression&&(!this.isStatic()||(variable=this.set.get("arguments"),(0,_assert2.default)(variable,"Always have arguments variable."),variable.tainted)||0!==variable.references.length)}},{key:"isThisMaterialized",value:function(){return!this.isStatic()||this.thisFound}},{key:"__defineArguments",value:function(){this.__defineGeneric("arguments",this.set,this.variables,null,null),this.taints.set("arguments",!0)}}]),FunctionScope}(),exports.ForScope=function(){function ForScope(scopeManager,upperScope,block){return _classCallCheck(this,ForScope),_possibleConstructorReturn(this,(ForScope.__proto__||Object.getPrototypeOf(ForScope)).call(this,scopeManager,"for",upperScope,block,!1))}return _inherits(ForScope,Scope),ForScope}(),exports.ClassScope=function(){function ClassScope(scopeManager,upperScope,block){return _classCallCheck(this,ClassScope),_possibleConstructorReturn(this,(ClassScope.__proto__||Object.getPrototypeOf(ClassScope)).call(this,scopeManager,"class",upperScope,block,!1))}return _inherits(ClassScope,Scope),ClassScope}()},{"./definition":6,"./reference":9,"./variable":13,assert:2,estraverse:19}],13:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});function Variable(name,scope){if(!(this instanceof Variable))throw new TypeError("Cannot call a class as a function");this.name=name,this.identifiers=[],this.references=[],this.defs=[],this.tainted=!1,this.stack=!0,this.scope=scope}(exports.default=Variable).CatchClause="CatchClause",Variable.Parameter="Parameter",Variable.FunctionName="FunctionName",Variable.ClassName="ClassName",Variable.Variable="Variable",Variable.ImportBinding="ImportBinding",Variable.TDZ="TDZ",Variable.ImplicitGlobalVariable="ImplicitGlobalVariable"},{}],14:[function(require,module,exports){module.exports={name:"escope",description:"ECMAScript scope analyzer",homepage:"http://github.com/estools/escope",main:"lib/index.js",files:["lib"],version:"4.0.0",engines:{node:">=4.0"},maintainers:[{name:"Yusuke Suzuki",email:"utatane.tea@gmail.com",web:"http://github.com/Constellation"}],repository:{type:"git",url:"https://github.com/estools/escope.git"},dependencies:{esrecurse:"^4.1.0",estraverse:"^4.1.1"},devDependencies:{babel:"^6.3.26","babel-preset-es2015":"^6.3.13","babel-register":"^6.3.13",browserify:"^14.4.0",chai:"^4.0.2",espree:"^3.1.1",esprima:"^3.0.0",gulp:"^3.9.0","gulp-babel":"^6.1.1","gulp-bump":"^2.7.0","gulp-eslint":"^4.0.0","gulp-espower":"^1.0.2","gulp-filter":"^5.0.0","gulp-git":"^2.4.1","gulp-mocha":"^3.0.0","gulp-plumber":"^1.0.1","gulp-sourcemaps":"^2.6.0","gulp-tag-version":"^1.3.0",jsdoc:"^3.4.0",lazypipe:"^1.0.1","vinyl-source-stream":"^1.1.0"},license:"BSD-2-Clause",scripts:{test:"gulp travis","unit-test":"gulp test",lint:"gulp lint",jsdoc:"jsdoc src/*.js README.md"}}},{}],15:[function(require,module,exports){var root,factory;root=this,factory=function(){return modules=[function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var comment_handler_1=__webpack_require__(1),jsx_parser_1=__webpack_require__(3),parser_1=__webpack_require__(8),tokenizer_1=__webpack_require__(15);function parse(code,options,delegate){function proxyDelegate(node,metadata){delegate&&delegate(node,metadata),commentHandler&&commentHandler.visit(node,metadata)}var commentHandler=null,parserDelegate="function"==typeof delegate?proxyDelegate:null,collectComment=!1,attachComment=(options&&(collectComment="boolean"==typeof options.comment&&options.comment,attachComment="boolean"==typeof options.attachComment&&options.attachComment,collectComment||attachComment)&&((commentHandler=new comment_handler_1.CommentHandler).attach=attachComment,options.comment=!0,parserDelegate=proxyDelegate),!1),code=(options&&"string"==typeof options.sourceType&&(attachComment="module"===options.sourceType),new(options&&"boolean"==typeof options.jsx&&options.jsx?jsx_parser_1.JSXParser:parser_1.Parser)(code,options,parserDelegate)),options=attachComment?code.parseModule():code.parseScript();return collectComment&&commentHandler&&(options.comments=commentHandler.comments),code.config.tokens&&(options.tokens=code.tokens),code.config.tolerant&&(options.errors=code.errorHandler.errors),options}exports.parse=parse,exports.parseModule=function(code,options,delegate){return(options=options||{}).sourceType="module",parse(code,options,delegate)},exports.parseScript=function(code,options,delegate){return(options=options||{}).sourceType="script",parse(code,options,delegate)},exports.tokenize=function(code,options,delegate){var tokenizer=new tokenizer_1.Tokenizer(code,options),tokens=[];try{for(;;){var token=tokenizer.getNextToken();if(!token)break;delegate&&(token=delegate(token)),tokens.push(token)}}catch(e){tokenizer.errorHandler.tolerate(e)}return tokenizer.errorHandler.tolerant&&(tokens.errors=tokenizer.errors()),tokens};__webpack_require__=__webpack_require__(2);exports.Syntax=__webpack_require__.Syntax,exports.version="4.0.1"},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var syntax_1=__webpack_require__(2),__webpack_require__=function(){function CommentHandler(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return CommentHandler.prototype.insertInnerComments=function(node,metadata){if(node.type===syntax_1.Syntax.BlockStatement&&0===node.body.length){for(var innerComments=[],i=this.leading.length-1;0<=i;--i){var entry=this.leading[i];metadata.end.offset>=entry.start&&(innerComments.unshift(entry.comment),this.leading.splice(i,1),this.trailing.splice(i,1))}innerComments.length&&(node.innerComments=innerComments)}},CommentHandler.prototype.findTrailingComments=function(metadata){var trailingComments=[];if(0<this.trailing.length){for(var i=this.trailing.length-1;0<=i;--i){var entry_1=this.trailing[i];entry_1.start>=metadata.end.offset&&trailingComments.unshift(entry_1.comment)}this.trailing.length=0}else{var firstComment,entry=this.stack[this.stack.length-1];entry&&entry.node.trailingComments&&(firstComment=entry.node.trailingComments[0])&&firstComment.range[0]>=metadata.end.offset&&(trailingComments=entry.node.trailingComments,delete entry.node.trailingComments)}return trailingComments},CommentHandler.prototype.findLeadingComments=function(metadata){for(var target,leadingComments=[];0<this.stack.length&&((entry=this.stack[this.stack.length-1])&&entry.start>=metadata.start.offset);)target=entry.node,this.stack.pop();if(target){for(var i=(target.leadingComments?target.leadingComments.length:0)-1;0<=i;--i){var comment=target.leadingComments[i];comment.range[1]<=metadata.start.offset&&(leadingComments.unshift(comment),target.leadingComments.splice(i,1))}target.leadingComments&&0===target.leadingComments.length&&delete target.leadingComments}else for(var entry,i=this.leading.length-1;0<=i;--i)(entry=this.leading[i]).start<=metadata.start.offset&&(leadingComments.unshift(entry.comment),this.leading.splice(i,1));return leadingComments},CommentHandler.prototype.visitNode=function(node,metadata){var trailingComments,leadingComments;node.type===syntax_1.Syntax.Program&&0<node.body.length||(this.insertInnerComments(node,metadata),trailingComments=this.findTrailingComments(metadata),0<(leadingComments=this.findLeadingComments(metadata)).length&&(node.leadingComments=leadingComments),0<trailingComments.length&&(node.trailingComments=trailingComments),this.stack.push({node:node,start:metadata.start.offset}))},CommentHandler.prototype.visitComment=function(node,metadata){var type="L"===node.type[0]?"Line":"Block",comment={type:type,value:node.value};node.range&&(comment.range=node.range),node.loc&&(comment.loc=node.loc),this.comments.push(comment),this.attach&&(comment={comment:{type:type,value:node.value,range:[metadata.start.offset,metadata.end.offset]},start:metadata.start.offset},node.loc&&(comment.comment.loc=node.loc),node.type=type,this.leading.push(comment),this.trailing.push(comment))},CommentHandler.prototype.visit=function(node,metadata){"LineComment"===node.type||"BlockComment"===node.type?this.visitComment(node,metadata):this.attach&&this.visitNode(node,metadata)},CommentHandler}();exports.CommentHandler=__webpack_require__},function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(module,exports,__webpack_require__){"use strict";var extendStatics,__extends=this&&this.__extends||(extendStatics=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(d,b){d.__proto__=b}:function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])}),function(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),character_1=(Object.defineProperty(exports,"__esModule",{value:!0}),__webpack_require__(4)),JSXNode=__webpack_require__(5),jsx_syntax_1=__webpack_require__(6),Node=__webpack_require__(7),parser_1=__webpack_require__(8),token_1=__webpack_require__(13),xhtml_entities_1=__webpack_require__(14);function getQualifiedElementName(elementName){switch(elementName.type){case jsx_syntax_1.JSXSyntax.JSXIdentifier:var qualifiedName=elementName.name;break;case jsx_syntax_1.JSXSyntax.JSXNamespacedName:var ns=elementName;qualifiedName=getQualifiedElementName(ns.namespace)+":"+getQualifiedElementName(ns.name);break;case jsx_syntax_1.JSXSyntax.JSXMemberExpression:ns=elementName;qualifiedName=getQualifiedElementName(ns.object)+"."+getQualifiedElementName(ns.property)}return qualifiedName}token_1.TokenName[100]="JSXIdentifier",token_1.TokenName[101]="JSXText";__webpack_require__=function(_super){function JSXParser(code,options,delegate){return _super.call(this,code,options,delegate)||this}return __extends(JSXParser,_super),JSXParser.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():_super.prototype.parsePrimaryExpression.call(this)},JSXParser.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},JSXParser.prototype.finishJSX=function(){this.nextToken()},JSXParser.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},JSXParser.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},JSXParser.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},JSXParser.prototype.scanXHTMLEntity=function(quote){for(var str,result="&",valid=!0,terminated=!1,numeric=!1,hex=!1;!this.scanner.eof()&&valid&&!terminated;){var ch=this.scanner.source[this.scanner.index];if(ch===quote)break;if(terminated=";"===ch,result+=ch,++this.scanner.index,!terminated)switch(result.length){case 2:numeric="#"===ch;break;case 3:numeric&&(valid=(hex="x"===ch)||character_1.Character.isDecimalDigit(ch.charCodeAt(0)),numeric=numeric&&!hex);break;default:valid=(valid=valid&&!(numeric&&!character_1.Character.isDecimalDigit(ch.charCodeAt(0))))&&!(hex&&!character_1.Character.isHexDigit(ch.charCodeAt(0)))}}return valid&&terminated&&2<result.length&&(str=result.substr(1,result.length-2),numeric&&1<str.length?result=String.fromCharCode(parseInt(str.substr(1),10)):hex&&2<str.length?result=String.fromCharCode(parseInt("0"+str.substr(1),16)):numeric||hex||!xhtml_entities_1.XHTMLEntities[str]||(result=xhtml_entities_1.XHTMLEntities[str])),result},JSXParser.prototype.lexJSX=function(){var n1,n2,value,cp=this.scanner.source.charCodeAt(this.scanner.index);if(60===cp||62===cp||47===cp||58===cp||61===cp||123===cp||125===cp)return{type:7,value:value=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===cp||39===cp){for(var start=this.scanner.index,quote=this.scanner.source[this.scanner.index++],str="";!this.scanner.eof();){if((ch=this.scanner.source[this.scanner.index++])===quote)break;str+="&"===ch?this.scanXHTMLEntity(quote):ch}return{type:8,value:str,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:start,end:this.scanner.index}}if(46===cp)return n1=this.scanner.source.charCodeAt(this.scanner.index+1),n2=this.scanner.source.charCodeAt(this.scanner.index+2),start=this.scanner.index,this.scanner.index+=(value=46===n1&&46===n2?"...":".").length,{type:7,value:value,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:start,end:this.scanner.index};if(96===cp)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(character_1.Character.isIdentifierStart(cp)&&92!==cp){start=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var ch=this.scanner.source.charCodeAt(this.scanner.index);if((!character_1.Character.isIdentifierPart(ch)||92===ch)&&45!==ch)break;++this.scanner.index}return{type:100,value:this.scanner.source.slice(start,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:start,end:this.scanner.index}}return this.scanner.lex()},JSXParser.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var token=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(token)),token},JSXParser.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var start=this.scanner.index,text="";!this.scanner.eof();){var ch=this.scanner.source[this.scanner.index];if("{"===ch||"<"===ch)break;++this.scanner.index,text+=ch,character_1.Character.isLineTerminator(ch.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===ch&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;start={type:101,value:text,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:start,end:this.scanner.index};return 0<text.length&&this.config.tokens&&this.tokens.push(this.convertToken(start)),start},JSXParser.prototype.peekJSXToken=function(){var state=this.scanner.saveState(),next=(this.scanner.scanComments(),this.lexJSX());return this.scanner.restoreState(state),next},JSXParser.prototype.expectJSX=function(value){var token=this.nextJSXToken();7===token.type&&token.value===value||this.throwUnexpectedToken(token)},JSXParser.prototype.matchJSX=function(value){var next=this.peekJSXToken();return 7===next.type&&next.value===value},JSXParser.prototype.parseJSXIdentifier=function(){var node=this.createJSXNode(),token=this.nextJSXToken();return 100!==token.type&&this.throwUnexpectedToken(token),this.finalize(node,new JSXNode.JSXIdentifier(token.value))},JSXParser.prototype.parseJSXElementName=function(){var node=this.createJSXNode(),elementName=this.parseJSXIdentifier();if(this.matchJSX(":"))var namespace=elementName,name_1=(this.expectJSX(":"),this.parseJSXIdentifier()),elementName=this.finalize(node,new JSXNode.JSXNamespacedName(namespace,name_1));else if(this.matchJSX("."))for(;this.matchJSX(".");){var object=elementName,property=(this.expectJSX("."),this.parseJSXIdentifier());elementName=this.finalize(node,new JSXNode.JSXMemberExpression(object,property))}return elementName},JSXParser.prototype.parseJSXAttributeName=function(){var namespace,name_2,node=this.createJSXNode(),identifier=this.parseJSXIdentifier();return this.matchJSX(":")?(namespace=identifier,this.expectJSX(":"),name_2=this.parseJSXIdentifier(),this.finalize(node,new JSXNode.JSXNamespacedName(namespace,name_2))):identifier},JSXParser.prototype.parseJSXStringLiteralAttribute=function(){var node=this.createJSXNode(),token=this.nextJSXToken(),raw=(8!==token.type&&this.throwUnexpectedToken(token),this.getTokenRaw(token));return this.finalize(node,new Node.Literal(token.value,raw))},JSXParser.prototype.parseJSXExpressionAttribute=function(){var node=this.createJSXNode(),expression=(this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression"),this.parseAssignmentExpression());return this.reenterJSX(),this.finalize(node,new JSXNode.JSXExpressionContainer(expression))},JSXParser.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},JSXParser.prototype.parseJSXNameValueAttribute=function(){var node=this.createJSXNode(),name=this.parseJSXAttributeName(),value=null;return this.matchJSX("=")&&(this.expectJSX("="),value=this.parseJSXAttributeValue()),this.finalize(node,new JSXNode.JSXAttribute(name,value))},JSXParser.prototype.parseJSXSpreadAttribute=function(){var node=this.createJSXNode(),argument=(this.expectJSX("{"),this.expectJSX("..."),this.finishJSX(),this.parseAssignmentExpression());return this.reenterJSX(),this.finalize(node,new JSXNode.JSXSpreadAttribute(argument))},JSXParser.prototype.parseJSXAttributes=function(){for(var attributes=[];!this.matchJSX("/")&&!this.matchJSX(">");){var attribute=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();attributes.push(attribute)}return attributes},JSXParser.prototype.parseJSXOpeningElement=function(){var node=this.createJSXNode(),name=(this.expectJSX("<"),this.parseJSXElementName()),attributes=this.parseJSXAttributes(),selfClosing=this.matchJSX("/");return selfClosing&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(node,new JSXNode.JSXOpeningElement(name,selfClosing,attributes))},JSXParser.prototype.parseJSXBoundaryElement=function(){var name_3,attributes,selfClosing,node=this.createJSXNode();return this.expectJSX("<"),this.matchJSX("/")?(this.expectJSX("/"),name_3=this.parseJSXElementName(),this.expectJSX(">"),this.finalize(node,new JSXNode.JSXClosingElement(name_3))):(name_3=this.parseJSXElementName(),attributes=this.parseJSXAttributes(),(selfClosing=this.matchJSX("/"))&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(node,new JSXNode.JSXOpeningElement(name_3,selfClosing,attributes)))},JSXParser.prototype.parseJSXEmptyExpression=function(){var node=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(node,new JSXNode.JSXEmptyExpression)},JSXParser.prototype.parseJSXExpressionContainer=function(){var expression,node=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(expression=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),expression=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(node,new JSXNode.JSXExpressionContainer(expression))},JSXParser.prototype.parseJSXChildren=function(){for(var children=[];!this.scanner.eof();){var raw,node=this.createJSXChildNode(),token=this.nextJSXText();if(token.start<token.end&&(raw=this.getTokenRaw(token),node=this.finalize(node,new JSXNode.JSXText(token.value,raw)),children.push(node)),"{"!==this.scanner.source[this.scanner.index])break;token=this.parseJSXExpressionContainer();children.push(token)}return children},JSXParser.prototype.parseComplexJSXElement=function(el){for(var stack=[];!this.scanner.eof();){el.children=el.children.concat(this.parseJSXChildren());var opening,node=this.createJSXChildNode(),element=this.parseJSXBoundaryElement();if(element.type===jsx_syntax_1.JSXSyntax.JSXOpeningElement&&((opening=element).selfClosing?(child=this.finalize(node,new JSXNode.JSXElement(opening,[],null)),el.children.push(child)):(stack.push(el),el={node:node,opening:opening,closing:null,children:[]})),element.type===jsx_syntax_1.JSXSyntax.JSXClosingElement){el.closing=element;node=getQualifiedElementName(el.opening.name);if(node!==getQualifiedElementName(el.closing.name)&&this.tolerateError("Expected corresponding JSX closing tag for %0",node),!(0<stack.length))break;var child=this.finalize(el.node,new JSXNode.JSXElement(el.opening,el.children,el.closing));(el=stack[stack.length-1]).children.push(child),stack.pop()}}return el},JSXParser.prototype.parseJSXElement=function(){var el,node=this.createJSXNode(),opening=this.parseJSXOpeningElement(),children=[],closing=null;return opening.selfClosing||(children=(el=this.parseComplexJSXElement({node:node,opening:opening,closing:closing,children:children})).children,closing=el.closing),this.finalize(node,new JSXNode.JSXElement(opening,children,closing))},JSXParser.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var element=this.parseJSXElement();return this.finishJSX(),element},JSXParser.prototype.isStartOfExpression=function(){return _super.prototype.isStartOfExpression.call(this)||this.match("<")},JSXParser}(parser_1.Parser);exports.JSXParser=__webpack_require__},function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Regex={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\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\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\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\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-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};exports.Character={fromCodePoint:function(cp){return cp<65536?String.fromCharCode(cp):String.fromCharCode(55296+(cp-65536>>10))+String.fromCharCode(56320+(cp-65536&1023))},isWhiteSpace:function(cp){return 32===cp||9===cp||11===cp||12===cp||160===cp||5760<=cp&&0<=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(cp)},isLineTerminator:function(cp){return 10===cp||13===cp||8232===cp||8233===cp},isIdentifierStart:function(cp){return 36===cp||95===cp||65<=cp&&cp<=90||97<=cp&&cp<=122||92===cp||128<=cp&&Regex.NonAsciiIdentifierStart.test(exports.Character.fromCodePoint(cp))},isIdentifierPart:function(cp){return 36===cp||95===cp||65<=cp&&cp<=90||97<=cp&&cp<=122||48<=cp&&cp<=57||92===cp||128<=cp&&Regex.NonAsciiIdentifierPart.test(exports.Character.fromCodePoint(cp))},isDecimalDigit:function(cp){return 48<=cp&&cp<=57},isHexDigit:function(cp){return 48<=cp&&cp<=57||65<=cp&&cp<=70||97<=cp&&cp<=102},isOctalDigit:function(cp){return 48<=cp&&cp<=55}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});function JSXElement(openingElement,children,closingElement){this.type=jsx_syntax_1.JSXSyntax.JSXElement,this.openingElement=openingElement,this.children=children,this.closingElement=closingElement}function JSXEmptyExpression(){this.type=jsx_syntax_1.JSXSyntax.JSXEmptyExpression}function JSXExpressionContainer(expression){this.type=jsx_syntax_1.JSXSyntax.JSXExpressionContainer,this.expression=expression}function JSXIdentifier(name){this.type=jsx_syntax_1.JSXSyntax.JSXIdentifier,this.name=name}function JSXMemberExpression(object,property){this.type=jsx_syntax_1.JSXSyntax.JSXMemberExpression,this.object=object,this.property=property}function JSXAttribute(name,value){this.type=jsx_syntax_1.JSXSyntax.JSXAttribute,this.name=name,this.value=value}function JSXNamespacedName(namespace,name){this.type=jsx_syntax_1.JSXSyntax.JSXNamespacedName,this.namespace=namespace,this.name=name}function JSXOpeningElement(name,selfClosing,attributes){this.type=jsx_syntax_1.JSXSyntax.JSXOpeningElement,this.name=name,this.selfClosing=selfClosing,this.attributes=attributes}function JSXSpreadAttribute(argument){this.type=jsx_syntax_1.JSXSyntax.JSXSpreadAttribute,this.argument=argument}function JSXText(value,raw){this.type=jsx_syntax_1.JSXSyntax.JSXText,this.value=value,this.raw=raw}var jsx_syntax_1=__webpack_require__(6);exports.JSXClosingElement=function(name){this.type=jsx_syntax_1.JSXSyntax.JSXClosingElement,this.name=name},exports.JSXElement=JSXElement,exports.JSXEmptyExpression=JSXEmptyExpression,exports.JSXExpressionContainer=JSXExpressionContainer,exports.JSXIdentifier=JSXIdentifier,exports.JSXMemberExpression=JSXMemberExpression,exports.JSXAttribute=JSXAttribute,exports.JSXNamespacedName=JSXNamespacedName,exports.JSXOpeningElement=JSXOpeningElement,exports.JSXSpreadAttribute=JSXSpreadAttribute;exports.JSXText=JSXText},function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});function ArrayPattern(elements){this.type=syntax_1.Syntax.ArrayPattern,this.elements=elements}function ArrowFunctionExpression(params,body,expression){this.type=syntax_1.Syntax.ArrowFunctionExpression,this.id=null,this.params=params,this.body=body,this.generator=!1,this.expression=expression,this.async=!1}function AssignmentExpression(operator,left,right){this.type=syntax_1.Syntax.AssignmentExpression,this.operator=operator,this.left=left,this.right=right}function AssignmentPattern(left,right){this.type=syntax_1.Syntax.AssignmentPattern,this.left=left,this.right=right}function AsyncArrowFunctionExpression(params,body,expression){this.type=syntax_1.Syntax.ArrowFunctionExpression,this.id=null,this.params=params,this.body=body,this.generator=!1,this.expression=expression,this.async=!0}function AsyncFunctionDeclaration(id,params,body){this.type=syntax_1.Syntax.FunctionDeclaration,this.id=id,this.params=params,this.body=body,this.generator=!1,this.expression=!1,this.async=!0}function AsyncFunctionExpression(id,params,body){this.type=syntax_1.Syntax.FunctionExpression,this.id=id,this.params=params,this.body=body,this.generator=!1,this.expression=!1,this.async=!0}function AwaitExpression(argument){this.type=syntax_1.Syntax.AwaitExpression,this.argument=argument}function BinaryExpression(operator,left,right){this.type="||"===operator||"&&"===operator?syntax_1.Syntax.LogicalExpression:syntax_1.Syntax.BinaryExpression,this.operator=operator,this.left=left,this.right=right}function BlockStatement(body){this.type=syntax_1.Syntax.BlockStatement,this.body=body}function BreakStatement(label){this.type=syntax_1.Syntax.BreakStatement,this.label=label}function CallExpression(callee,args){this.type=syntax_1.Syntax.CallExpression,this.callee=callee,this.arguments=args}function CatchClause(param,body){this.type=syntax_1.Syntax.CatchClause,this.param=param,this.body=body}function ClassBody(body){this.type=syntax_1.Syntax.ClassBody,this.body=body}function ClassDeclaration(id,superClass,body){this.type=syntax_1.Syntax.ClassDeclaration,this.id=id,this.superClass=superClass,this.body=body}function ClassExpression(id,superClass,body){this.type=syntax_1.Syntax.ClassExpression,this.id=id,this.superClass=superClass,this.body=body}function ComputedMemberExpression(object,property){this.type=syntax_1.Syntax.MemberExpression,this.computed=!0,this.object=object,this.property=property}function ConditionalExpression(test,consequent,alternate){this.type=syntax_1.Syntax.ConditionalExpression,this.test=test,this.consequent=consequent,this.alternate=alternate}function ContinueStatement(label){this.type=syntax_1.Syntax.ContinueStatement,this.label=label}function DebuggerStatement(){this.type=syntax_1.Syntax.DebuggerStatement}function Directive(expression,directive){this.type=syntax_1.Syntax.ExpressionStatement,this.expression=expression,this.directive=directive}function DoWhileStatement(body,test){this.type=syntax_1.Syntax.DoWhileStatement,this.body=body,this.test=test}function EmptyStatement(){this.type=syntax_1.Syntax.EmptyStatement}function ExportAllDeclaration(source){this.type=syntax_1.Syntax.ExportAllDeclaration,this.source=source}function ExportDefaultDeclaration(declaration){this.type=syntax_1.Syntax.ExportDefaultDeclaration,this.declaration=declaration}function ExportNamedDeclaration(declaration,specifiers,source){this.type=syntax_1.Syntax.ExportNamedDeclaration,this.declaration=declaration,this.specifiers=specifiers,this.source=source}function ExportSpecifier(local,exported){this.type=syntax_1.Syntax.ExportSpecifier,this.exported=exported,this.local=local}function ExpressionStatement(expression){this.type=syntax_1.Syntax.ExpressionStatement,this.expression=expression}function ForInStatement(left,right,body){this.type=syntax_1.Syntax.ForInStatement,this.left=left,this.right=right,this.body=body,this.each=!1}function ForOfStatement(left,right,body){this.type=syntax_1.Syntax.ForOfStatement,this.left=left,this.right=right,this.body=body}function ForStatement(init,test,update,body){this.type=syntax_1.Syntax.ForStatement,this.init=init,this.test=test,this.update=update,this.body=body}function FunctionDeclaration(id,params,body,generator){this.type=syntax_1.Syntax.FunctionDeclaration,this.id=id,this.params=params,this.body=body,this.generator=generator,this.expression=!1,this.async=!1}function FunctionExpression(id,params,body,generator){this.type=syntax_1.Syntax.FunctionExpression,this.id=id,this.params=params,this.body=body,this.generator=generator,this.expression=!1,this.async=!1}function Identifier(name){this.type=syntax_1.Syntax.Identifier,this.name=name}function IfStatement(test,consequent,alternate){this.type=syntax_1.Syntax.IfStatement,this.test=test,this.consequent=consequent,this.alternate=alternate}function ImportDeclaration(specifiers,source){this.type=syntax_1.Syntax.ImportDeclaration,this.specifiers=specifiers,this.source=source}function ImportDefaultSpecifier(local){this.type=syntax_1.Syntax.ImportDefaultSpecifier,this.local=local}function ImportNamespaceSpecifier(local){this.type=syntax_1.Syntax.ImportNamespaceSpecifier,this.local=local}function ImportSpecifier(local,imported){this.type=syntax_1.Syntax.ImportSpecifier,this.local=local,this.imported=imported}function LabeledStatement(label,body){this.type=syntax_1.Syntax.LabeledStatement,this.label=label,this.body=body}function Literal(value,raw){this.type=syntax_1.Syntax.Literal,this.value=value,this.raw=raw}function MetaProperty(meta,property){this.type=syntax_1.Syntax.MetaProperty,this.meta=meta,this.property=property}function MethodDefinition(key,computed,value,kind,isStatic){this.type=syntax_1.Syntax.MethodDefinition,this.key=key,this.computed=computed,this.value=value,this.kind=kind,this.static=isStatic}function Module(body){this.type=syntax_1.Syntax.Program,this.body=body,this.sourceType="module"}function NewExpression(callee,args){this.type=syntax_1.Syntax.NewExpression,this.callee=callee,this.arguments=args}function ObjectExpression(properties){this.type=syntax_1.Syntax.ObjectExpression,this.properties=properties}function ObjectPattern(properties){this.type=syntax_1.Syntax.ObjectPattern,this.properties=properties}function Property(kind,key,computed,value,method,shorthand){this.type=syntax_1.Syntax.Property,this.key=key,this.computed=computed,this.value=value,this.kind=kind,this.method=method,this.shorthand=shorthand}function RegexLiteral(value,raw,pattern,flags){this.type=syntax_1.Syntax.Literal,this.value=value,this.raw=raw,this.regex={pattern:pattern,flags:flags}}function RestElement(argument){this.type=syntax_1.Syntax.RestElement,this.argument=argument}function ReturnStatement(argument){this.type=syntax_1.Syntax.ReturnStatement,this.argument=argument}function Script(body){this.type=syntax_1.Syntax.Program,this.body=body,this.sourceType="script"}function SequenceExpression(expressions){this.type=syntax_1.Syntax.SequenceExpression,this.expressions=expressions}function SpreadElement(argument){this.type=syntax_1.Syntax.SpreadElement,this.argument=argument}function StaticMemberExpression(object,property){this.type=syntax_1.Syntax.MemberExpression,this.computed=!1,this.object=object,this.property=property}function Super(){this.type=syntax_1.Syntax.Super}function SwitchCase(test,consequent){this.type=syntax_1.Syntax.SwitchCase,this.test=test,this.consequent=consequent}function SwitchStatement(discriminant,cases){this.type=syntax_1.Syntax.SwitchStatement,this.discriminant=discriminant,this.cases=cases}function TaggedTemplateExpression(tag,quasi){this.type=syntax_1.Syntax.TaggedTemplateExpression,this.tag=tag,this.quasi=quasi}function TemplateElement(value,tail){this.type=syntax_1.Syntax.TemplateElement,this.value=value,this.tail=tail}function TemplateLiteral(quasis,expressions){this.type=syntax_1.Syntax.TemplateLiteral,this.quasis=quasis,this.expressions=expressions}function ThisExpression(){this.type=syntax_1.Syntax.ThisExpression}function ThrowStatement(argument){this.type=syntax_1.Syntax.ThrowStatement,this.argument=argument}function TryStatement(block,handler,finalizer){this.type=syntax_1.Syntax.TryStatement,this.block=block,this.handler=handler,this.finalizer=finalizer}function UnaryExpression(operator,argument){this.type=syntax_1.Syntax.UnaryExpression,this.operator=operator,this.argument=argument,this.prefix=!0}function UpdateExpression(operator,argument,prefix){this.type=syntax_1.Syntax.UpdateExpression,this.operator=operator,this.argument=argument,this.prefix=prefix}function VariableDeclaration(declarations,kind){this.type=syntax_1.Syntax.VariableDeclaration,this.declarations=declarations,this.kind=kind}function VariableDeclarator(id,init){this.type=syntax_1.Syntax.VariableDeclarator,this.id=id,this.init=init}function WhileStatement(test,body){this.type=syntax_1.Syntax.WhileStatement,this.test=test,this.body=body}function WithStatement(object,body){this.type=syntax_1.Syntax.WithStatement,this.object=object,this.body=body}function YieldExpression(argument,delegate){this.type=syntax_1.Syntax.YieldExpression,this.argument=argument,this.delegate=delegate}var syntax_1=__webpack_require__(2);exports.ArrayExpression=function(elements){this.type=syntax_1.Syntax.ArrayExpression,this.elements=elements},exports.ArrayPattern=ArrayPattern,exports.ArrowFunctionExpression=ArrowFunctionExpression,exports.AssignmentExpression=AssignmentExpression,exports.AssignmentPattern=AssignmentPattern,exports.AsyncArrowFunctionExpression=AsyncArrowFunctionExpression,exports.AsyncFunctionDeclaration=AsyncFunctionDeclaration,exports.AsyncFunctionExpression=AsyncFunctionExpression,exports.AwaitExpression=AwaitExpression,exports.BinaryExpression=BinaryExpression,exports.BlockStatement=BlockStatement,exports.BreakStatement=BreakStatement,exports.CallExpression=CallExpression,exports.CatchClause=CatchClause,exports.ClassBody=ClassBody,exports.ClassDeclaration=ClassDeclaration,exports.ClassExpression=ClassExpression,exports.ComputedMemberExpression=ComputedMemberExpression,exports.ConditionalExpression=ConditionalExpression,exports.ContinueStatement=ContinueStatement,exports.DebuggerStatement=DebuggerStatement,exports.Directive=Directive,exports.DoWhileStatement=DoWhileStatement,exports.EmptyStatement=EmptyStatement,exports.ExportAllDeclaration=ExportAllDeclaration,exports.ExportDefaultDeclaration=ExportDefaultDeclaration,exports.ExportNamedDeclaration=ExportNamedDeclaration,exports.ExportSpecifier=ExportSpecifier,exports.ExpressionStatement=ExpressionStatement,exports.ForInStatement=ForInStatement,exports.ForOfStatement=ForOfStatement,exports.ForStatement=ForStatement,exports.FunctionDeclaration=FunctionDeclaration,exports.FunctionExpression=FunctionExpression,exports.Identifier=Identifier,exports.IfStatement=IfStatement,exports.ImportDeclaration=ImportDeclaration,exports.ImportDefaultSpecifier=ImportDefaultSpecifier,exports.ImportNamespaceSpecifier=ImportNamespaceSpecifier,exports.ImportSpecifier=ImportSpecifier,exports.LabeledStatement=LabeledStatement,exports.Literal=Literal,exports.MetaProperty=MetaProperty,exports.MethodDefinition=MethodDefinition,exports.Module=Module,exports.NewExpression=NewExpression,exports.ObjectExpression=ObjectExpression,exports.ObjectPattern=ObjectPattern,exports.Property=Property,exports.RegexLiteral=RegexLiteral,exports.RestElement=RestElement,exports.ReturnStatement=ReturnStatement,exports.Script=Script,exports.SequenceExpression=SequenceExpression,exports.SpreadElement=SpreadElement,exports.StaticMemberExpression=StaticMemberExpression,exports.Super=Super,exports.SwitchCase=SwitchCase,exports.SwitchStatement=SwitchStatement,exports.TaggedTemplateExpression=TaggedTemplateExpression,exports.TemplateElement=TemplateElement,exports.TemplateLiteral=TemplateLiteral,exports.ThisExpression=ThisExpression,exports.ThrowStatement=ThrowStatement,exports.TryStatement=TryStatement,exports.UnaryExpression=UnaryExpression,exports.UpdateExpression=UpdateExpression,exports.VariableDeclaration=VariableDeclaration,exports.VariableDeclarator=VariableDeclarator,exports.WhileStatement=WhileStatement,exports.WithStatement=WithStatement;exports.YieldExpression=YieldExpression},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var assert_1=__webpack_require__(9),error_handler_1=__webpack_require__(10),messages_1=__webpack_require__(11),Node=__webpack_require__(7),scanner_1=__webpack_require__(12),syntax_1=__webpack_require__(2),token_1=__webpack_require__(13),__webpack_require__=function(){function Parser(code,options,delegate){this.config={range:"boolean"==typeof(options=void 0===options?{}:options).range&&options.range,loc:"boolean"==typeof options.loc&&options.loc,source:null,tokens:"boolean"==typeof options.tokens&&options.tokens,comment:"boolean"==typeof options.comment&&options.comment,tolerant:"boolean"==typeof options.tolerant&&options.tolerant},this.config.loc&&options.source&&null!==options.source&&(this.config.source=String(options.source)),this.delegate=delegate,this.errorHandler=new error_handler_1.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new scanner_1.Scanner(code,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return Parser.prototype.throwError=function(messageFormat){for(var _i=1;_i<arguments.length;_i++)_i-1,0;var args=Array.prototype.slice.call(arguments,1),messageFormat=messageFormat.replace(/%(\d)/g,function(whole,idx){return assert_1.assert(idx<args.length,"Message reference must be in range"),args[idx]}),index=this.lastMarker.index,line=this.lastMarker.line,column=this.lastMarker.column+1;throw this.errorHandler.createError(index,line,column,messageFormat)},Parser.prototype.tolerateError=function(messageFormat){for(var _i=1;_i<arguments.length;_i++)_i-1,0;var args=Array.prototype.slice.call(arguments,1),messageFormat=messageFormat.replace(/%(\d)/g,function(whole,idx){return assert_1.assert(idx<args.length,"Message reference must be in range"),args[idx]}),index=this.lastMarker.index,line=this.scanner.lineNumber,column=this.lastMarker.column+1;this.errorHandler.tolerateError(index,line,column,messageFormat)},Parser.prototype.unexpectedTokenError=function(token,message){var index,line,msg=message||messages_1.Messages.UnexpectedToken,message=token?(message||(msg=2===token.type?messages_1.Messages.UnexpectedEOS:3===token.type?messages_1.Messages.UnexpectedIdentifier:6===token.type?messages_1.Messages.UnexpectedNumber:8===token.type?messages_1.Messages.UnexpectedString:10===token.type?messages_1.Messages.UnexpectedTemplate:messages_1.Messages.UnexpectedToken,4===token.type&&(this.scanner.isFutureReservedWord(token.value)?msg=messages_1.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(token.value)&&(msg=messages_1.Messages.StrictReservedWord))),token.value):"ILLEGAL",msg=msg.replace("%0",message);return token=token&&"number"==typeof token.lineNumber?(index=token.start,line=token.lineNumber,message=this.lastMarker.index-this.lastMarker.column,token.start-message+1):(index=this.lastMarker.index,line=this.lastMarker.line,this.lastMarker.column+1),this.errorHandler.createError(index,line,token,msg)},Parser.prototype.throwUnexpectedToken=function(token,message){throw this.unexpectedTokenError(token,message)},Parser.prototype.tolerateUnexpectedToken=function(token,message){this.errorHandler.tolerate(this.unexpectedTokenError(token,message))},Parser.prototype.collectComments=function(){if(this.config.comment){var comments=this.scanner.scanComments();if(0<comments.length&&this.delegate)for(var i=0;i<comments.length;++i){var e=comments[i],node=void 0,node={type:e.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(e.slice[0],e.slice[1])},e=(this.config.range&&(node.range=e.range),this.config.loc&&(node.loc=e.loc),{start:{line:e.loc.start.line,column:e.loc.start.column,offset:e.range[0]},end:{line:e.loc.end.line,column:e.loc.end.column,offset:e.range[1]}});this.delegate(node,e)}}else this.scanner.scanComments()},Parser.prototype.getTokenRaw=function(token){return this.scanner.source.slice(token.start,token.end)},Parser.prototype.convertToken=function(token){var pattern,t={type:token_1.TokenName[token.type],value:this.getTokenRaw(token)};return this.config.range&&(t.range=[token.start,token.end]),this.config.loc&&(t.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),9===token.type&&(pattern=token.pattern,token=token.flags,t.regex={pattern:pattern,flags:token}),t},Parser.prototype.nextToken=function(){var token=this.lookahead,next=(this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart),this.scanner.lex());return this.hasLineTerminator=token.lineNumber!==next.lineNumber,next&&this.context.strict&&3===next.type&&this.scanner.isStrictModeReservedWord(next.value)&&(next.type=4),this.lookahead=next,this.config.tokens&&2!==next.type&&this.tokens.push(this.convertToken(next)),token},Parser.prototype.nextRegexToken=function(){this.collectComments();var token=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(token))),this.lookahead=token,this.nextToken(),token},Parser.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},Parser.prototype.startNode=function(token,lastLineStart){void 0===lastLineStart&&(lastLineStart=0);var column=token.start-token.lineStart,line=token.lineNumber;return column<0&&(column+=lastLineStart,line--),{index:token.start,line:line,column:column}},Parser.prototype.finalize=function(marker,node){return this.config.range&&(node.range=[marker.index,this.lastMarker.index]),this.config.loc&&(node.loc={start:{line:marker.line,column:marker.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source)&&(node.loc.source=this.config.source),this.delegate&&(marker={start:{line:marker.line,column:marker.column,offset:marker.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}},this.delegate(node,marker)),node},Parser.prototype.expect=function(value){var token=this.nextToken();7===token.type&&token.value===value||this.throwUnexpectedToken(token)},Parser.prototype.expectCommaSeparator=function(){var token;this.config.tolerant?7===(token=this.lookahead).type&&","===token.value?this.nextToken():7===token.type&&";"===token.value?(this.nextToken(),this.tolerateUnexpectedToken(token)):this.tolerateUnexpectedToken(token,messages_1.Messages.UnexpectedToken):this.expect(",")},Parser.prototype.expectKeyword=function(keyword){var token=this.nextToken();4===token.type&&token.value===keyword||this.throwUnexpectedToken(token)},Parser.prototype.match=function(value){return 7===this.lookahead.type&&this.lookahead.value===value},Parser.prototype.matchKeyword=function(keyword){return 4===this.lookahead.type&&this.lookahead.value===keyword},Parser.prototype.matchContextualKeyword=function(keyword){return 3===this.lookahead.type&&this.lookahead.value===keyword},Parser.prototype.matchAssign=function(){var op;return 7===this.lookahead.type&&("="===(op=this.lookahead.value)||"*="===op||"**="===op||"/="===op||"%="===op||"+="===op||"-="===op||"<<="===op||">>="===op||">>>="===op||"&="===op||"^="===op||"|="===op)},Parser.prototype.isolateCoverGrammar=function(parseFunction){var previousIsBindingElement=this.context.isBindingElement,previousIsAssignmentTarget=this.context.isAssignmentTarget,previousFirstCoverInitializedNameError=this.context.firstCoverInitializedNameError,parseFunction=(this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null,parseFunction.call(this));return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=previousIsBindingElement,this.context.isAssignmentTarget=previousIsAssignmentTarget,this.context.firstCoverInitializedNameError=previousFirstCoverInitializedNameError,parseFunction},Parser.prototype.inheritCoverGrammar=function(parseFunction){var previousIsBindingElement=this.context.isBindingElement,previousIsAssignmentTarget=this.context.isAssignmentTarget,previousFirstCoverInitializedNameError=this.context.firstCoverInitializedNameError,parseFunction=(this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null,parseFunction.call(this));return this.context.isBindingElement=this.context.isBindingElement&&previousIsBindingElement,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&previousIsAssignmentTarget,this.context.firstCoverInitializedNameError=previousFirstCoverInitializedNameError||this.context.firstCoverInitializedNameError,parseFunction},Parser.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},Parser.prototype.parsePrimaryExpression=function(){var expr,token,raw,node=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),expr=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(node,new Node.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,messages_1.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,token=this.nextToken(),raw=this.getTokenRaw(token),expr=this.finalize(node,new Node.Literal(token.value,raw));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,token=this.nextToken(),raw=this.getTokenRaw(token),expr=this.finalize(node,new Node.Literal("true"===token.value,raw));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,token=this.nextToken(),raw=this.getTokenRaw(token),expr=this.finalize(node,new Node.Literal(null,raw));break;case 10:expr=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,expr=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":expr=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":expr=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,token=this.nextRegexToken(),raw=this.getTokenRaw(token),expr=this.finalize(node,new Node.RegexLiteral(token.regex,raw,token.pattern,token.flags));break;default:expr=this.throwUnexpectedToken(this.nextToken())}break;case 4:expr=!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?this.finalize(node,new Node.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),this.finalize(node,new Node.ThisExpression)):this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:expr=this.throwUnexpectedToken(this.nextToken())}return expr},Parser.prototype.parseSpreadElement=function(){var node=this.createNode(),arg=(this.expect("..."),this.inheritCoverGrammar(this.parseAssignmentExpression));return this.finalize(node,new Node.SpreadElement(arg))},Parser.prototype.parseArrayInitializer=function(){var element,node=this.createNode(),elements=[];for(this.expect("[");!this.match("]");)this.match(",")?(this.nextToken(),elements.push(null)):this.match("...")?(element=this.parseSpreadElement(),this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),elements.push(element)):(elements.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(","));return this.expect("]"),this.finalize(node,new Node.ArrayExpression(elements))},Parser.prototype.parsePropertyMethod=function(params){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var previousStrict=this.context.strict,previousAllowStrictDirective=this.context.allowStrictDirective,body=(this.context.allowStrictDirective=params.simple,this.isolateCoverGrammar(this.parseFunctionSourceElements));return this.context.strict&&params.firstRestricted&&this.tolerateUnexpectedToken(params.firstRestricted,params.message),this.context.strict&&params.stricted&&this.tolerateUnexpectedToken(params.stricted,params.message),this.context.strict=previousStrict,this.context.allowStrictDirective=previousAllowStrictDirective,body},Parser.prototype.parsePropertyMethodFunction=function(){var node=this.createNode(),previousAllowYield=this.context.allowYield,params=(this.context.allowYield=!0,this.parseFormalParameters()),method=this.parsePropertyMethod(params);return this.context.allowYield=previousAllowYield,this.finalize(node,new Node.FunctionExpression(null,params.params,method,!1))},Parser.prototype.parsePropertyMethodAsyncFunction=function(){var node=this.createNode(),previousAllowYield=this.context.allowYield,previousAwait=this.context.await,params=(this.context.allowYield=!1,this.context.await=!0,this.parseFormalParameters()),method=this.parsePropertyMethod(params);return this.context.allowYield=previousAllowYield,this.context.await=previousAwait,this.finalize(node,new Node.AsyncFunctionExpression(null,params.params,method))},Parser.prototype.parseObjectPropertyKey=function(){var node=this.createNode(),token=this.nextToken();switch(token.type){case 8:case 6:this.context.strict&&token.octal&&this.tolerateUnexpectedToken(token,messages_1.Messages.StrictOctalLiteral);var raw=this.getTokenRaw(token),key=this.finalize(node,new Node.Literal(token.value,raw));break;case 3:case 1:case 5:case 4:key=this.finalize(node,new Node.Identifier(token.value));break;case 7:"["===token.value?(key=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):key=this.throwUnexpectedToken(token);break;default:key=this.throwUnexpectedToken(token)}return key},Parser.prototype.isPropertyKey=function(key,value){return key.type===syntax_1.Syntax.Identifier&&key.name===value||key.type===syntax_1.Syntax.Literal&&key.value===value},Parser.prototype.parseObjectProperty=function(hasProto){var kind,id,node=this.createNode(),token=this.lookahead,key=null,value=null,computed=!1,method=!1,shorthand=!1,isAsync=!1,lookaheadPropertyKey=(3===token.type?(id=token.value,this.nextToken(),computed=this.match("["),key=(isAsync=!(this.hasLineTerminator||"async"!==id||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(node,new Node.Identifier(id))):this.match("*")?this.nextToken():(computed=this.match("["),key=this.parseObjectPropertyKey()),this.qualifiedPropertyName(this.lookahead));return 3===token.type&&!isAsync&&"get"===token.value&&lookaheadPropertyKey?(kind="get",computed=this.match("["),key=this.parseObjectPropertyKey(),this.context.allowYield=!1,value=this.parseGetterMethod()):3===token.type&&!isAsync&&"set"===token.value&&lookaheadPropertyKey?(kind="set",computed=this.match("["),key=this.parseObjectPropertyKey(),value=this.parseSetterMethod()):7===token.type&&"*"===token.value&&lookaheadPropertyKey?(kind="init",computed=this.match("["),key=this.parseObjectPropertyKey(),value=this.parseGeneratorMethod(),method=!0):(key||this.throwUnexpectedToken(this.lookahead),kind="init",this.match(":")&&!isAsync?(!computed&&this.isPropertyKey(key,"__proto__")&&(hasProto.value&&this.tolerateError(messages_1.Messages.DuplicateProtoProperty),hasProto.value=!0),this.nextToken(),value=this.inheritCoverGrammar(this.parseAssignmentExpression)):this.match("(")?(value=isAsync?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),method=!0):3===token.type?(id=this.finalize(node,new Node.Identifier(token.value)),value=this.match("=")?(this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),shorthand=!0,lookaheadPropertyKey=this.isolateCoverGrammar(this.parseAssignmentExpression),this.finalize(node,new Node.AssignmentPattern(id,lookaheadPropertyKey))):(shorthand=!0,id)):this.throwUnexpectedToken(this.nextToken())),this.finalize(node,new Node.Property(kind,key,computed,value,method,shorthand))},Parser.prototype.parseObjectInitializer=function(){for(var node=this.createNode(),properties=(this.expect("{"),[]),hasProto={value:!1};!this.match("}");)properties.push(this.parseObjectProperty(hasProto)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(node,new Node.ObjectExpression(properties))},Parser.prototype.parseTemplateHead=function(){assert_1.assert(this.lookahead.head,"Template literal must start with a template head");var node=this.createNode(),token=this.nextToken(),raw=token.value,cooked=token.cooked;return this.finalize(node,new Node.TemplateElement({raw:raw,cooked:cooked},token.tail))},Parser.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var node=this.createNode(),token=this.nextToken(),raw=token.value,cooked=token.cooked;return this.finalize(node,new Node.TemplateElement({raw:raw,cooked:cooked},token.tail))},Parser.prototype.parseTemplateLiteral=function(){var node=this.createNode(),expressions=[],quasis=[],quasi=this.parseTemplateHead();for(quasis.push(quasi);!quasi.tail;)expressions.push(this.parseExpression()),quasi=this.parseTemplateElement(),quasis.push(quasi);return this.finalize(node,new Node.TemplateLiteral(quasis,expressions))},Parser.prototype.reinterpretExpressionAsPattern=function(expr){switch(expr.type){case syntax_1.Syntax.Identifier:case syntax_1.Syntax.MemberExpression:case syntax_1.Syntax.RestElement:case syntax_1.Syntax.AssignmentPattern:break;case syntax_1.Syntax.SpreadElement:expr.type=syntax_1.Syntax.RestElement,this.reinterpretExpressionAsPattern(expr.argument);break;case syntax_1.Syntax.ArrayExpression:expr.type=syntax_1.Syntax.ArrayPattern;for(var i=0;i<expr.elements.length;i++)null!==expr.elements[i]&&this.reinterpretExpressionAsPattern(expr.elements[i]);break;case syntax_1.Syntax.ObjectExpression:expr.type=syntax_1.Syntax.ObjectPattern;for(i=0;i<expr.properties.length;i++)this.reinterpretExpressionAsPattern(expr.properties[i].value);break;case syntax_1.Syntax.AssignmentExpression:expr.type=syntax_1.Syntax.AssignmentPattern,delete expr.operator,this.reinterpretExpressionAsPattern(expr.left)}},Parser.prototype.parseGroupExpression=function(){if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),expr={type:"ArrowParameterPlaceHolder",params:[],async:!1};else{var startToken=this.lookahead,params=[];if(this.match("..."))expr=this.parseRestElement(params),this.expect(")"),this.match("=>")||this.expect("=>"),expr={type:"ArrowParameterPlaceHolder",params:[expr],async:!1};else{var arrow=!1;if(this.context.isBindingElement=!0,expr=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var expressions=[];for(this.context.isAssignmentTarget=!1,expressions.push(expr);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var i=0;i<expressions.length;i++)this.reinterpretExpressionAsPattern(expressions[i]);expr={type:"ArrowParameterPlaceHolder",params:expressions,async:!(arrow=!0)}}else if(this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),expressions.push(this.parseRestElement(params)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(i=0;i<expressions.length;i++)this.reinterpretExpressionAsPattern(expressions[i]);expr={type:"ArrowParameterPlaceHolder",params:expressions,async:!(arrow=!0)}}else expressions.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(arrow)break}arrow||(expr=this.finalize(this.startNode(startToken),new Node.SequenceExpression(expressions)))}if(!arrow){if(this.expect(")"),this.match("=>")&&(expr.type===syntax_1.Syntax.Identifier&&"yield"===expr.name&&(expr={type:"ArrowParameterPlaceHolder",params:[expr],async:!(arrow=!0)}),!arrow)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),expr.type===syntax_1.Syntax.SequenceExpression)for(i=0;i<expr.expressions.length;i++)this.reinterpretExpressionAsPattern(expr.expressions[i]);else this.reinterpretExpressionAsPattern(expr);var expr={type:"ArrowParameterPlaceHolder",params:expr.type===syntax_1.Syntax.SequenceExpression?expr.expressions:[expr],async:!1}}this.context.isBindingElement=!1}}}return expr},Parser.prototype.parseArguments=function(){this.expect("(");var args=[];if(!this.match(")"))for(;;){var expr=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(args.push(expr),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),args},Parser.prototype.isIdentifierName=function(token){return 3===token.type||4===token.type||1===token.type||5===token.type},Parser.prototype.parseIdentifierName=function(){var node=this.createNode(),token=this.nextToken();return this.isIdentifierName(token)||this.throwUnexpectedToken(token),this.finalize(node,new Node.Identifier(token.value))},Parser.prototype.parseNewExpression=function(){var property,args,node=this.createNode(),id=this.parseIdentifierName();return assert_1.assert("new"===id.name,"New expression must start with `new`"),this.match(".")?(this.nextToken(),3===this.lookahead.type&&this.context.inFunctionBody&&"target"===this.lookahead.value?(property=this.parseIdentifierName(),property=new Node.MetaProperty(id,property)):this.throwUnexpectedToken(this.lookahead)):(id=this.isolateCoverGrammar(this.parseLeftHandSideExpression),args=this.match("(")?this.parseArguments():[],property=new Node.NewExpression(id,args),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),this.finalize(node,property)},Parser.prototype.parseAsyncArgument=function(){var arg=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,arg},Parser.prototype.parseAsyncArguments=function(){this.expect("(");var args=[];if(!this.match(")"))for(;;){var expr=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(args.push(expr),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),args},Parser.prototype.parseLeftHandSideExpressionAllowCall=function(){var startToken=this.lookahead,maybeAsync=this.matchContextualKeyword("async"),previousAllowIn=this.context.allowIn;for(this.context.allowIn=!0,this.matchKeyword("super")&&this.context.inFunctionBody?(expr=this.createNode(),this.nextToken(),expr=this.finalize(expr,new Node.Super),this.match("(")||this.match(".")||this.match("[")||this.throwUnexpectedToken(this.lookahead)):expr=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var property=this.parseIdentifierName(),expr=this.finalize(this.startNode(startToken),new Node.StaticMemberExpression(expr,property))}else if(this.match("(")){var asyncArrow=maybeAsync&&startToken.lineNumber===this.lookahead.lineNumber,args=(this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1,asyncArrow?this.parseAsyncArguments():this.parseArguments());if(expr=this.finalize(this.startNode(startToken),new Node.CallExpression(expr,args)),asyncArrow&&this.match("=>")){for(var i=0;i<args.length;++i)this.reinterpretExpressionAsPattern(args[i]);expr={type:"ArrowParameterPlaceHolder",params:args,async:!0}}}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");property=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),expr=this.finalize(this.startNode(startToken),new Node.ComputedMemberExpression(expr,property))}else{if(10!==this.lookahead.type||!this.lookahead.head)break;asyncArrow=this.parseTemplateLiteral();expr=this.finalize(this.startNode(startToken),new Node.TaggedTemplateExpression(expr,asyncArrow))}return this.context.allowIn=previousAllowIn,expr},Parser.prototype.parseSuper=function(){var node=this.createNode();return this.expectKeyword("super"),this.match("[")||this.match(".")||this.throwUnexpectedToken(this.lookahead),this.finalize(node,new Node.Super)},Parser.prototype.parseLeftHandSideExpression=function(){assert_1.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var node=this.startNode(this.lookahead),expr=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var property=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),expr=this.finalize(node,new Node.ComputedMemberExpression(expr,property))}else if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");property=this.parseIdentifierName(),expr=this.finalize(node,new Node.StaticMemberExpression(expr,property))}else{if(10!==this.lookahead.type||!this.lookahead.head)break;var quasi=this.parseTemplateLiteral();expr=this.finalize(node,new Node.TaggedTemplateExpression(expr,quasi))}return expr},Parser.prototype.parseUpdateExpression=function(){var expr,token,node,startToken=this.lookahead;return this.match("++")||this.match("--")?(node=this.startNode(startToken),token=this.nextToken(),expr=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&expr.type===syntax_1.Syntax.Identifier&&this.scanner.isRestrictedWord(expr.name)&&this.tolerateError(messages_1.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(messages_1.Messages.InvalidLHSInAssignment),expr=this.finalize(node,new Node.UpdateExpression(token.value,expr,node=!0)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1):(expr=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),this.hasLineTerminator||7!==this.lookahead.type||(this.match("++")||this.match("--"))&&(this.context.strict&&expr.type===syntax_1.Syntax.Identifier&&this.scanner.isRestrictedWord(expr.name)&&this.tolerateError(messages_1.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(messages_1.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,token=this.nextToken().value,node=!1,expr=this.finalize(this.startNode(startToken),new Node.UpdateExpression(token,expr,node)))),expr},Parser.prototype.parseAwaitExpression=function(){var node=this.createNode(),argument=(this.nextToken(),this.parseUnaryExpression());return this.finalize(node,new Node.AwaitExpression(argument))},Parser.prototype.parseUnaryExpression=function(){var node,token,expr;return this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")?(node=this.startNode(this.lookahead),token=this.nextToken(),expr=this.inheritCoverGrammar(this.parseUnaryExpression),expr=this.finalize(node,new Node.UnaryExpression(token.value,expr)),this.context.strict&&"delete"===expr.operator&&expr.argument.type===syntax_1.Syntax.Identifier&&this.tolerateError(messages_1.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1):expr=this.context.await&&this.matchContextualKeyword("await")?this.parseAwaitExpression():this.parseUpdateExpression(),expr},Parser.prototype.parseExponentiationExpression=function(){var left,right,startToken=this.lookahead,expr=this.inheritCoverGrammar(this.parseUnaryExpression);return expr.type!==syntax_1.Syntax.UnaryExpression&&this.match("**")&&(this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,left=expr,right=this.isolateCoverGrammar(this.parseExponentiationExpression),expr=this.finalize(this.startNode(startToken),new Node.BinaryExpression("**",left,right))),expr},Parser.prototype.binaryPrecedence=function(token){var op=token.value,token=7===token.type?this.operatorPrecedence[op]||0:4===token.type&&("instanceof"===op||this.context.allowIn&&"in"===op)?7:0;return token},Parser.prototype.parseBinaryExpression=function(){var startToken=this.lookahead,expr=this.inheritCoverGrammar(this.parseExponentiationExpression),token=this.lookahead,prec=this.binaryPrecedence(token);if(0<prec){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var markers=[startToken,this.lookahead],left=expr,right=this.isolateCoverGrammar(this.parseExponentiationExpression),stack=[left,token.value,right],precedences=[prec];;){if((prec=this.binaryPrecedence(this.lookahead))<=0)break;for(;2<stack.length&&prec<=precedences[precedences.length-1];){var right=stack.pop(),operator=stack.pop(),node=(precedences.pop(),left=stack.pop(),markers.pop(),this.startNode(markers[markers.length-1]));stack.push(this.finalize(node,new Node.BinaryExpression(operator,left,right)))}stack.push(this.nextToken().value),precedences.push(prec),markers.push(this.lookahead),stack.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}for(var i=stack.length-1,lastMarker=(expr=stack[i],markers.pop());1<i;){var marker=markers.pop(),lastLineStart=lastMarker&&lastMarker.lineStart,node=this.startNode(marker,lastLineStart),operator=stack[i-1],expr=this.finalize(node,new Node.BinaryExpression(operator,stack[i-2],expr));i-=2,lastMarker=marker}}return expr},Parser.prototype.parseConditionalExpression=function(){var consequent,previousAllowIn,startToken=this.lookahead,expr=this.inheritCoverGrammar(this.parseBinaryExpression);return this.match("?")&&(this.nextToken(),previousAllowIn=this.context.allowIn,this.context.allowIn=!0,consequent=this.isolateCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=previousAllowIn,this.expect(":"),previousAllowIn=this.isolateCoverGrammar(this.parseAssignmentExpression),expr=this.finalize(this.startNode(startToken),new Node.ConditionalExpression(expr,consequent,previousAllowIn)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),expr},Parser.prototype.checkPatternParam=function(options,param){switch(param.type){case syntax_1.Syntax.Identifier:this.validateParam(options,param,param.name);break;case syntax_1.Syntax.RestElement:this.checkPatternParam(options,param.argument);break;case syntax_1.Syntax.AssignmentPattern:this.checkPatternParam(options,param.left);break;case syntax_1.Syntax.ArrayPattern:for(var i=0;i<param.elements.length;i++)null!==param.elements[i]&&this.checkPatternParam(options,param.elements[i]);break;case syntax_1.Syntax.ObjectPattern:for(i=0;i<param.properties.length;i++)this.checkPatternParam(options,param.properties[i].value)}options.simple=options.simple&&param instanceof Node.Identifier},Parser.prototype.reinterpretAsCoverFormalsList=function(expr){var params=[expr],asyncArrow=!1;switch(expr.type){case syntax_1.Syntax.Identifier:break;case"ArrowParameterPlaceHolder":params=expr.params,asyncArrow=expr.async;break;default:return null}for(var token,options={simple:!0,paramSet:{}},i=0;i<params.length;++i)(param=params[i]).type===syntax_1.Syntax.AssignmentPattern?param.right.type===syntax_1.Syntax.YieldExpression&&(param.right.argument&&this.throwUnexpectedToken(this.lookahead),param.right.type=syntax_1.Syntax.Identifier,param.right.name="yield",delete param.right.argument,delete param.right.delegate):asyncArrow&&param.type===syntax_1.Syntax.Identifier&&"await"===param.name&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(options,param),params[i]=param;if(this.context.strict||!this.context.allowYield)for(var param,i=0;i<params.length;++i)(param=params[i]).type===syntax_1.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead);return options.message===messages_1.Messages.StrictParamDupe&&(token=this.context.strict?options.stricted:options.firstRestricted,this.throwUnexpectedToken(token,options.message)),{simple:options.simple,params:params,stricted:options.stricted,firstRestricted:options.firstRestricted,message:options.message}},Parser.prototype.parseAssignmentExpression=function(){var startToken,token,previousStrict,previousAllowStrictDirective,previousAllowYield,previousAwait,body,previousAllowIn,arg,node,list,expr;return!this.context.allowYield&&this.matchKeyword("yield")?expr=this.parseYieldExpression():(token=startToken=this.lookahead,expr=this.parseConditionalExpression(),3!==token.type||token.lineNumber!==this.lookahead.lineNumber||"async"!==token.value||3!==this.lookahead.type&&!this.matchKeyword("yield")||(arg=this.parsePrimaryExpression(),this.reinterpretExpressionAsPattern(arg),expr={type:"ArrowParameterPlaceHolder",params:[arg],async:!0}),"ArrowParameterPlaceHolder"===expr.type||this.match("=>")?(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,arg=expr.async,(list=this.reinterpretAsCoverFormalsList(expr))&&(this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null,previousStrict=this.context.strict,previousAllowStrictDirective=this.context.allowStrictDirective,this.context.allowStrictDirective=list.simple,previousAllowYield=this.context.allowYield,previousAwait=this.context.await,this.context.allowYield=!0,this.context.await=arg,node=this.startNode(startToken),body=void this.expect("=>"),this.match("{")?(previousAllowIn=this.context.allowIn,this.context.allowIn=!0,body=this.parseFunctionSourceElements(),this.context.allowIn=previousAllowIn):body=this.isolateCoverGrammar(this.parseAssignmentExpression),previousAllowIn=body.type!==syntax_1.Syntax.BlockStatement,this.context.strict&&list.firstRestricted&&this.throwUnexpectedToken(list.firstRestricted,list.message),this.context.strict&&list.stricted&&this.tolerateUnexpectedToken(list.stricted,list.message),expr=arg?this.finalize(node,new Node.AsyncArrowFunctionExpression(list.params,body,previousAllowIn)):this.finalize(node,new Node.ArrowFunctionExpression(list.params,body,previousAllowIn)),this.context.strict=previousStrict,this.context.allowStrictDirective=previousAllowStrictDirective,this.context.allowYield=previousAllowYield,this.context.await=previousAwait)):this.matchAssign()&&(this.context.isAssignmentTarget||this.tolerateError(messages_1.Messages.InvalidLHSInAssignment),this.context.strict&&expr.type===syntax_1.Syntax.Identifier&&(arg=expr,this.scanner.isRestrictedWord(arg.name)&&this.tolerateUnexpectedToken(token,messages_1.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(arg.name))&&this.tolerateUnexpectedToken(token,messages_1.Messages.StrictReservedWord),this.match("=")?this.reinterpretExpressionAsPattern(expr):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),node=(token=this.nextToken()).value,list=this.isolateCoverGrammar(this.parseAssignmentExpression),expr=this.finalize(this.startNode(startToken),new Node.AssignmentExpression(node,expr,list)),this.context.firstCoverInitializedNameError=null)),expr},Parser.prototype.parseExpression=function(){var startToken=this.lookahead,expr=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var expressions=[];for(expressions.push(expr);2!==this.lookahead.type&&this.match(",");)this.nextToken(),expressions.push(this.isolateCoverGrammar(this.parseAssignmentExpression));expr=this.finalize(this.startNode(startToken),new Node.SequenceExpression(expressions))}return expr},Parser.prototype.parseStatementListItem=function(){var statement;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,messages_1.Messages.IllegalExportDeclaration),statement=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,messages_1.Messages.IllegalImportDeclaration),statement=this.parseImportDeclaration();break;case"const":statement=this.parseLexicalDeclaration({inFor:!1});break;case"function":statement=this.parseFunctionDeclaration();break;case"class":statement=this.parseClassDeclaration();break;case"let":statement=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:statement=this.parseStatement()}else statement=this.parseStatement();return statement},Parser.prototype.parseBlock=function(){for(var node=this.createNode(),block=(this.expect("{"),[]);!this.match("}");)block.push(this.parseStatementListItem());return this.expect("}"),this.finalize(node,new Node.BlockStatement(block))},Parser.prototype.parseLexicalBinding=function(kind,options){var node=this.createNode(),id=this.parsePattern([],kind),init=(this.context.strict&&id.type===syntax_1.Syntax.Identifier&&this.scanner.isRestrictedWord(id.name)&&this.tolerateError(messages_1.Messages.StrictVarName),null);return"const"===kind?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),init=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(messages_1.Messages.DeclarationMissingInitializer,"const")):(!options.inFor&&id.type!==syntax_1.Syntax.Identifier||this.match("="))&&(this.expect("="),init=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(node,new Node.VariableDeclarator(id,init))},Parser.prototype.parseBindingList=function(kind,options){for(var list=[this.parseLexicalBinding(kind,options)];this.match(",");)this.nextToken(),list.push(this.parseLexicalBinding(kind,options));return list},Parser.prototype.isLexicalDeclaration=function(){var state=this.scanner.saveState(),next=(this.scanner.scanComments(),this.scanner.lex());return this.scanner.restoreState(state),3===next.type||7===next.type&&"["===next.value||7===next.type&&"{"===next.value||4===next.type&&"let"===next.value||4===next.type&&"yield"===next.value},Parser.prototype.parseLexicalDeclaration=function(options){var node=this.createNode(),kind=this.nextToken().value,options=(assert_1.assert("let"===kind||"const"===kind,"Lexical declaration must be either let or const"),this.parseBindingList(kind,options));return this.consumeSemicolon(),this.finalize(node,new Node.VariableDeclaration(options,kind))},Parser.prototype.parseBindingRestElement=function(params,kind){var node=this.createNode(),params=(this.expect("..."),this.parsePattern(params,kind));return this.finalize(node,new Node.RestElement(params))},Parser.prototype.parseArrayPattern=function(params,kind){for(var node=this.createNode(),elements=(this.expect("["),[]);!this.match("]");)if(this.match(","))this.nextToken(),elements.push(null);else{if(this.match("...")){elements.push(this.parseBindingRestElement(params,kind));break}elements.push(this.parsePatternWithDefault(params,kind)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(node,new Node.ArrayPattern(elements))},Parser.prototype.parsePropertyPattern=function(params,kind){var keyToken,key,init,expr,node=this.createNode(),computed=!1,shorthand=!1;return expr=3===this.lookahead.type?(keyToken=this.lookahead,key=this.parseVariableIdentifier(),init=this.finalize(node,new Node.Identifier(keyToken.value)),this.match("=")?(params.push(keyToken),shorthand=!0,this.nextToken(),expr=this.parseAssignmentExpression(),this.finalize(this.startNode(keyToken),new Node.AssignmentPattern(init,expr))):this.match(":")?(this.expect(":"),this.parsePatternWithDefault(params,kind)):(params.push(keyToken),shorthand=!0,init)):(computed=this.match("["),key=this.parseObjectPropertyKey(),this.expect(":"),this.parsePatternWithDefault(params,kind)),this.finalize(node,new Node.Property("init",key,computed,expr,!1,shorthand))},Parser.prototype.parseObjectPattern=function(params,kind){var node=this.createNode(),properties=[];for(this.expect("{");!this.match("}");)properties.push(this.parsePropertyPattern(params,kind)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(node,new Node.ObjectPattern(properties))},Parser.prototype.parsePattern=function(params,kind){params=this.match("[")?this.parseArrayPattern(params,kind):this.match("{")?this.parseObjectPattern(params,kind):(!this.matchKeyword("let")||"const"!==kind&&"let"!==kind||this.tolerateUnexpectedToken(this.lookahead,messages_1.Messages.LetInLexicalBinding),params.push(this.lookahead),this.parseVariableIdentifier(kind));return params},Parser.prototype.parsePatternWithDefault=function(params,kind){var right,startToken=this.lookahead,params=this.parsePattern(params,kind);return this.match("=")&&(this.nextToken(),kind=this.context.allowYield,this.context.allowYield=!0,right=this.isolateCoverGrammar(this.parseAssignmentExpression),this.context.allowYield=kind,params=this.finalize(this.startNode(startToken),new Node.AssignmentPattern(params,right))),params},Parser.prototype.parseVariableIdentifier=function(kind){var node=this.createNode(),token=this.nextToken();return 4===token.type&&"yield"===token.value?this.context.strict?this.tolerateUnexpectedToken(token,messages_1.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(token):3!==token.type?this.context.strict&&4===token.type&&this.scanner.isStrictModeReservedWord(token.value)?this.tolerateUnexpectedToken(token,messages_1.Messages.StrictReservedWord):!this.context.strict&&"let"===token.value&&"var"===kind||this.throwUnexpectedToken(token):(this.context.isModule||this.context.await)&&3===token.type&&"await"===token.value&&this.tolerateUnexpectedToken(token),this.finalize(node,new Node.Identifier(token.value))},Parser.prototype.parseVariableDeclaration=function(options){var node=this.createNode(),id=this.parsePattern([],"var"),init=(this.context.strict&&id.type===syntax_1.Syntax.Identifier&&this.scanner.isRestrictedWord(id.name)&&this.tolerateError(messages_1.Messages.StrictVarName),null);return this.match("=")?(this.nextToken(),init=this.isolateCoverGrammar(this.parseAssignmentExpression)):id.type===syntax_1.Syntax.Identifier||options.inFor||this.expect("="),this.finalize(node,new Node.VariableDeclarator(id,init))},Parser.prototype.parseVariableDeclarationList=function(options){var opt={inFor:options.inFor},list=[];for(list.push(this.parseVariableDeclaration(opt));this.match(",");)this.nextToken(),list.push(this.parseVariableDeclaration(opt));return list},Parser.prototype.parseVariableStatement=function(){var node=this.createNode(),declarations=(this.expectKeyword("var"),this.parseVariableDeclarationList({inFor:!1}));return this.consumeSemicolon(),this.finalize(node,new Node.VariableDeclaration(declarations,"var"))},Parser.prototype.parseEmptyStatement=function(){var node=this.createNode();return this.expect(";"),this.finalize(node,new Node.EmptyStatement)},Parser.prototype.parseExpressionStatement=function(){var node=this.createNode(),expr=this.parseExpression();return this.consumeSemicolon(),this.finalize(node,new Node.ExpressionStatement(expr))},Parser.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(messages_1.Messages.StrictFunction),this.parseStatement()},Parser.prototype.parseIfStatement=function(){var consequent,node=this.createNode(),alternate=null,test=(this.expectKeyword("if"),this.expect("("),this.parseExpression());return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),consequent=this.finalize(this.createNode(),new Node.EmptyStatement)):(this.expect(")"),consequent=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),alternate=this.parseIfClause())),this.finalize(node,new Node.IfStatement(test,consequent,alternate))},Parser.prototype.parseDoWhileStatement=function(){var node=this.createNode(),previousInIteration=(this.expectKeyword("do"),this.context.inIteration),body=(this.context.inIteration=!0,this.parseStatement()),previousInIteration=(this.context.inIteration=previousInIteration,this.expectKeyword("while"),this.expect("("),this.parseExpression());return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(node,new Node.DoWhileStatement(body,previousInIteration))},Parser.prototype.parseWhileStatement=function(){var body,previousInIteration,node=this.createNode(),test=(this.expectKeyword("while"),this.expect("("),this.parseExpression());return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),body=this.finalize(this.createNode(),new Node.EmptyStatement)):(this.expect(")"),previousInIteration=this.context.inIteration,this.context.inIteration=!0,body=this.parseStatement(),this.context.inIteration=previousInIteration),this.finalize(node,new Node.WhileStatement(test,body))},Parser.prototype.parseForStatement=function(){var right,body,init=null,test=null,update=null,forIn=!0,node=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){init=this.createNode(),this.nextToken();var decl,previousAllowIn=this.context.allowIn,declarations=(this.context.allowIn=!1,this.parseVariableDeclarationList({inFor:!0}));this.context.allowIn=previousAllowIn,1===declarations.length&&this.matchKeyword("in")?((decl=declarations[0]).init&&(decl.id.type===syntax_1.Syntax.ArrayPattern||decl.id.type===syntax_1.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(messages_1.Messages.ForInOfLoopInitializer,"for-in"),init=this.finalize(init,new Node.VariableDeclaration(declarations,"var")),this.nextToken(),decl=init,right=this.parseExpression(),init=null):1===declarations.length&&null===declarations[0].init&&this.matchContextualKeyword("of")?(init=this.finalize(init,new Node.VariableDeclaration(declarations,"var")),this.nextToken(),decl=init,right=this.parseAssignmentExpression(),init=null,forIn=!1):(init=this.finalize(init,new Node.VariableDeclaration(declarations,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){var init=this.createNode(),kind=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(previousAllowIn=this.context.allowIn,this.context.allowIn=!1,declarations=this.parseBindingList(kind,{inFor:!0}),this.context.allowIn=previousAllowIn,1===declarations.length&&null===declarations[0].init&&this.matchKeyword("in")?(init=this.finalize(init,new Node.VariableDeclaration(declarations,kind)),this.nextToken(),decl=init,right=this.parseExpression(),init=null):1===declarations.length&&null===declarations[0].init&&this.matchContextualKeyword("of")?(init=this.finalize(init,new Node.VariableDeclaration(declarations,kind)),this.nextToken(),decl=init,right=this.parseAssignmentExpression(),init=null,forIn=!1):(this.consumeSemicolon(),init=this.finalize(init,new Node.VariableDeclaration(declarations,kind)))):(init=this.finalize(init,new Node.Identifier(kind)),this.nextToken(),decl=init,right=this.parseExpression(),init=null)}else{declarations=this.lookahead,previousAllowIn=this.context.allowIn;if(this.context.allowIn=!1,init=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=previousAllowIn,this.matchKeyword("in"))this.context.isAssignmentTarget&&init.type!==syntax_1.Syntax.AssignmentExpression||this.tolerateError(messages_1.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(init),decl=init,right=this.parseExpression(),init=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&init.type!==syntax_1.Syntax.AssignmentExpression||this.tolerateError(messages_1.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(init),decl=init,right=this.parseAssignmentExpression(),init=null,forIn=!1;else{if(this.match(",")){for(var initSeq=[init];this.match(",");)this.nextToken(),initSeq.push(this.isolateCoverGrammar(this.parseAssignmentExpression));init=this.finalize(this.startNode(declarations),new Node.SequenceExpression(initSeq))}this.expect(";")}}return void 0===decl&&(this.match(";")||(test=this.parseExpression()),this.expect(";"),this.match(")")||(update=this.parseExpression())),!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),body=this.finalize(this.createNode(),new Node.EmptyStatement)):(this.expect(")"),kind=this.context.inIteration,this.context.inIteration=!0,body=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=kind),void 0===decl?this.finalize(node,new Node.ForStatement(init,test,update,body)):forIn?this.finalize(node,new Node.ForInStatement(decl,right,body)):this.finalize(node,new Node.ForOfStatement(decl,right,body))},Parser.prototype.parseContinueStatement=function(){var id,key,node=this.createNode(),label=(this.expectKeyword("continue"),null);return 3!==this.lookahead.type||this.hasLineTerminator||(key="$"+(label=id=this.parseVariableIdentifier()).name,Object.prototype.hasOwnProperty.call(this.context.labelSet,key))||this.throwError(messages_1.Messages.UnknownLabel,id.name),this.consumeSemicolon(),null!==label||this.context.inIteration||this.throwError(messages_1.Messages.IllegalContinue),this.finalize(node,new Node.ContinueStatement(label))},Parser.prototype.parseBreakStatement=function(){var id,key,node=this.createNode(),label=(this.expectKeyword("break"),null);return 3!==this.lookahead.type||this.hasLineTerminator||(key="$"+(id=this.parseVariableIdentifier()).name,Object.prototype.hasOwnProperty.call(this.context.labelSet,key)||this.throwError(messages_1.Messages.UnknownLabel,id.name),label=id),this.consumeSemicolon(),null!==label||this.context.inIteration||this.context.inSwitch||this.throwError(messages_1.Messages.IllegalBreak),this.finalize(node,new Node.BreakStatement(label))},Parser.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(messages_1.Messages.IllegalReturn);var node=this.createNode();this.expectKeyword("return");var argument=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&2!==this.lookahead.type||8===this.lookahead.type||10===this.lookahead.type?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(node,new Node.ReturnStatement(argument))},Parser.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(messages_1.Messages.StrictModeWith);var node=this.createNode(),object=(this.expectKeyword("with"),this.expect("("),this.parseExpression()),body=!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),this.finalize(this.createNode(),new Node.EmptyStatement)):(this.expect(")"),this.parseStatement());return this.finalize(node,new Node.WithStatement(object,body))},Parser.prototype.parseSwitchCase=function(){var node=this.createNode(),test=this.matchKeyword("default")?(this.nextToken(),null):(this.expectKeyword("case"),this.parseExpression());this.expect(":");for(var consequent=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)consequent.push(this.parseStatementListItem());return this.finalize(node,new Node.SwitchCase(test,consequent))},Parser.prototype.parseSwitchStatement=function(){var node=this.createNode(),discriminant=(this.expectKeyword("switch"),this.expect("("),this.parseExpression()),previousInSwitch=(this.expect(")"),this.context.inSwitch),cases=[],defaultFound=!(this.context.inSwitch=!0);for(this.expect("{");;){if(this.match("}"))break;var clause=this.parseSwitchCase();null===clause.test&&(defaultFound&&this.throwError(messages_1.Messages.MultipleDefaultsInSwitch),defaultFound=!0),cases.push(clause)}return this.expect("}"),this.context.inSwitch=previousInSwitch,this.finalize(node,new Node.SwitchStatement(discriminant,cases))},Parser.prototype.parseLabelledStatement=function(){var id,key,declaration,body,node=this.createNode(),expr=this.parseExpression(),token=expr.type===syntax_1.Syntax.Identifier&&this.match(":")?(this.nextToken(),key="$"+(id=expr).name,Object.prototype.hasOwnProperty.call(this.context.labelSet,key)&&this.throwError(messages_1.Messages.Redeclaration,"Label",id.name),body=void(this.context.labelSet[key]=!0),body=this.matchKeyword("class")?(this.tolerateUnexpectedToken(this.lookahead),this.parseClassDeclaration()):this.matchKeyword("function")?(token=this.lookahead,declaration=this.parseFunctionDeclaration(),this.context.strict?this.tolerateUnexpectedToken(token,messages_1.Messages.StrictFunction):declaration.generator&&this.tolerateUnexpectedToken(token,messages_1.Messages.GeneratorInLegacyContext),declaration):this.parseStatement(),delete this.context.labelSet[key],new Node.LabeledStatement(id,body)):(this.consumeSemicolon(),new Node.ExpressionStatement(expr));return this.finalize(node,token)},Parser.prototype.parseThrowStatement=function(){var node=this.createNode(),argument=(this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(messages_1.Messages.NewlineAfterThrow),this.parseExpression());return this.consumeSemicolon(),this.finalize(node,new Node.ThrowStatement(argument))},Parser.prototype.parseCatchClause=function(){for(var node=this.createNode(),params=(this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead),[]),param=this.parsePattern(params),paramMap={},i=0;i<params.length;i++){var key="$"+params[i].value;Object.prototype.hasOwnProperty.call(paramMap,key)&&this.tolerateError(messages_1.Messages.DuplicateBinding,params[i].value),paramMap[key]=!0}this.context.strict&&param.type===syntax_1.Syntax.Identifier&&this.scanner.isRestrictedWord(param.name)&&this.tolerateError(messages_1.Messages.StrictCatchVariable),this.expect(")");var body=this.parseBlock();return this.finalize(node,new Node.CatchClause(param,body))},Parser.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},Parser.prototype.parseTryStatement=function(){var node=this.createNode(),block=(this.expectKeyword("try"),this.parseBlock()),handler=this.matchKeyword("catch")?this.parseCatchClause():null,finalizer=this.matchKeyword("finally")?this.parseFinallyClause():null;return handler||finalizer||this.throwError(messages_1.Messages.NoCatchOrFinally),this.finalize(node,new Node.TryStatement(block,handler,finalizer))},Parser.prototype.parseDebuggerStatement=function(){var node=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(node,new Node.DebuggerStatement)},Parser.prototype.parseStatement=function(){switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:statement=this.parseExpressionStatement();break;case 7:var value=this.lookahead.value,statement="{"===value?this.parseBlock():"("!==value&&";"===value?this.parseEmptyStatement():this.parseExpressionStatement();break;case 3:statement=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":statement=this.parseBreakStatement();break;case"continue":statement=this.parseContinueStatement();break;case"debugger":statement=this.parseDebuggerStatement();break;case"do":statement=this.parseDoWhileStatement();break;case"for":statement=this.parseForStatement();break;case"function":statement=this.parseFunctionDeclaration();break;case"if":statement=this.parseIfStatement();break;case"return":statement=this.parseReturnStatement();break;case"switch":statement=this.parseSwitchStatement();break;case"throw":statement=this.parseThrowStatement();break;case"try":statement=this.parseTryStatement();break;case"var":statement=this.parseVariableStatement();break;case"while":statement=this.parseWhileStatement();break;case"with":statement=this.parseWithStatement();break;default:statement=this.parseExpressionStatement()}break;default:statement=this.throwUnexpectedToken(this.lookahead)}return statement},Parser.prototype.parseFunctionSourceElements=function(){var node=this.createNode(),body=(this.expect("{"),this.parseDirectivePrologues()),previousLabelSet=this.context.labelSet,previousInIteration=this.context.inIteration,previousInSwitch=this.context.inSwitch,previousInFunctionBody=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;2!==this.lookahead.type&&!this.match("}");)body.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=previousLabelSet,this.context.inIteration=previousInIteration,this.context.inSwitch=previousInSwitch,this.context.inFunctionBody=previousInFunctionBody,this.finalize(node,new Node.BlockStatement(body))},Parser.prototype.validateParam=function(options,param,name){var key="$"+name;this.context.strict?(this.scanner.isRestrictedWord(name)&&(options.stricted=param,options.message=messages_1.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(options.paramSet,key)&&(options.stricted=param,options.message=messages_1.Messages.StrictParamDupe)):options.firstRestricted||(this.scanner.isRestrictedWord(name)?(options.firstRestricted=param,options.message=messages_1.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(name)?(options.firstRestricted=param,options.message=messages_1.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(options.paramSet,key)&&(options.stricted=param,options.message=messages_1.Messages.StrictParamDupe)),"function"==typeof Object.defineProperty?Object.defineProperty(options.paramSet,key,{value:!0,enumerable:!0,writable:!0,configurable:!0}):options.paramSet[key]=!0},Parser.prototype.parseRestElement=function(params){var node=this.createNode(),params=(this.expect("..."),this.parsePattern(params));return this.match("=")&&this.throwError(messages_1.Messages.DefaultRestParameter),this.match(")")||this.throwError(messages_1.Messages.ParameterAfterRestParameter),this.finalize(node,new Node.RestElement(params))},Parser.prototype.parseFormalParameter=function(options){for(var params=[],param=this.match("...")?this.parseRestElement(params):this.parsePatternWithDefault(params),i=0;i<params.length;i++)this.validateParam(options,params[i],params[i].value);options.simple=options.simple&&param instanceof Node.Identifier,options.params.push(param)},Parser.prototype.parseFormalParameters=function(firstRestricted){var options={simple:!0,params:[],firstRestricted:firstRestricted};if(this.expect("("),!this.match(")"))for(options.paramSet={};2!==this.lookahead.type&&(this.parseFormalParameter(options),!this.match(")"))&&(this.expect(","),!this.match(")")););return this.expect(")"),{simple:options.simple,params:options.params,stricted:options.stricted,firstRestricted:options.firstRestricted,message:options.message}},Parser.prototype.matchAsyncFunction=function(){var state,next,match=this.matchContextualKeyword("async");return match&&(state=this.scanner.saveState(),this.scanner.scanComments(),next=this.scanner.lex(),this.scanner.restoreState(state),match=state.lineNumber===next.lineNumber&&4===next.type&&"function"===next.value),match},Parser.prototype.parseFunctionDeclaration=function(identifierIsOptional){var message,node=this.createNode(),isAsync=this.matchContextualKeyword("async"),isGenerator=(isAsync&&this.nextToken(),this.expectKeyword("function"),!isAsync&&this.match("*")),id=(isGenerator&&this.nextToken(),null),firstRestricted=null,identifierIsOptional=(identifierIsOptional&&this.match("(")||(identifierIsOptional=this.lookahead,id=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(identifierIsOptional.value)&&this.tolerateUnexpectedToken(identifierIsOptional,messages_1.Messages.StrictFunctionName):this.scanner.isRestrictedWord(identifierIsOptional.value)?(firstRestricted=identifierIsOptional,message=messages_1.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(identifierIsOptional.value)&&(firstRestricted=identifierIsOptional,message=messages_1.Messages.StrictReservedWord)),this.context.await),previousAllowYield=this.context.allowYield,formalParameters=(this.context.await=isAsync,this.context.allowYield=!isGenerator,this.parseFormalParameters(firstRestricted)),params=formalParameters.params,stricted=formalParameters.stricted,firstRestricted=formalParameters.firstRestricted,previousStrict=(formalParameters.message&&(message=formalParameters.message),this.context.strict),previousAllowStrictDirective=this.context.allowStrictDirective,formalParameters=(this.context.allowStrictDirective=formalParameters.simple,this.parseFunctionSourceElements());return this.context.strict&&firstRestricted&&this.throwUnexpectedToken(firstRestricted,message),this.context.strict&&stricted&&this.tolerateUnexpectedToken(stricted,message),this.context.strict=previousStrict,this.context.allowStrictDirective=previousAllowStrictDirective,this.context.await=identifierIsOptional,this.context.allowYield=previousAllowYield,isAsync?this.finalize(node,new Node.AsyncFunctionDeclaration(id,params,formalParameters)):this.finalize(node,new Node.FunctionDeclaration(id,params,formalParameters,isGenerator))},Parser.prototype.parseFunctionExpression=function(){var message,node=this.createNode(),isAsync=this.matchContextualKeyword("async"),isGenerator=(isAsync&&this.nextToken(),this.expectKeyword("function"),!isAsync&&this.match("*")),id=(isGenerator&&this.nextToken(),null),previousAllowAwait=this.context.await,previousAllowYield=this.context.allowYield,token=(this.context.await=isAsync,this.context.allowYield=!isGenerator,this.match("(")||(token=this.lookahead,id=this.context.strict||isGenerator||!this.matchKeyword("yield")?this.parseVariableIdentifier():this.parseIdentifierName(),this.context.strict?this.scanner.isRestrictedWord(token.value)&&this.tolerateUnexpectedToken(token,messages_1.Messages.StrictFunctionName):this.scanner.isRestrictedWord(token.value)?(firstRestricted=token,message=messages_1.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(token.value)&&(firstRestricted=token,message=messages_1.Messages.StrictReservedWord)),this.parseFormalParameters(firstRestricted)),params=token.params,stricted=token.stricted,firstRestricted=token.firstRestricted,previousStrict=(token.message&&(message=token.message),this.context.strict),previousAllowStrictDirective=this.context.allowStrictDirective,token=(this.context.allowStrictDirective=token.simple,this.parseFunctionSourceElements());return this.context.strict&&firstRestricted&&this.throwUnexpectedToken(firstRestricted,message),this.context.strict&&stricted&&this.tolerateUnexpectedToken(stricted,message),this.context.strict=previousStrict,this.context.allowStrictDirective=previousAllowStrictDirective,this.context.await=previousAllowAwait,this.context.allowYield=previousAllowYield,isAsync?this.finalize(node,new Node.AsyncFunctionExpression(id,params,token)):this.finalize(node,new Node.FunctionExpression(id,params,token,isGenerator))},Parser.prototype.parseDirective=function(){var token=this.lookahead,node=this.createNode(),expr=this.parseExpression(),token=expr.type===syntax_1.Syntax.Literal?this.getTokenRaw(token).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(node,token?new Node.Directive(expr,token):new Node.ExpressionStatement(expr))},Parser.prototype.parseDirectivePrologues=function(){for(var firstRestricted=null,body=[];;){var token=this.lookahead;if(8!==token.type)break;var statement=this.parseDirective(),statement=(body.push(statement),statement.directive);if("string"!=typeof statement)break;"use strict"===statement?(this.context.strict=!0,firstRestricted&&this.tolerateUnexpectedToken(firstRestricted,messages_1.Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(token,messages_1.Messages.IllegalLanguageModeDirective)):!firstRestricted&&token.octal&&(firstRestricted=token)}return body},Parser.prototype.qualifiedPropertyName=function(token){switch(token.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return"["===token.value}return!1},Parser.prototype.parseGetterMethod=function(){var node=this.createNode(),previousAllowYield=this.context.allowYield,formalParameters=(this.context.allowYield=!0,this.parseFormalParameters()),method=(0<formalParameters.params.length&&this.tolerateError(messages_1.Messages.BadGetterArity),this.parsePropertyMethod(formalParameters));return this.context.allowYield=previousAllowYield,this.finalize(node,new Node.FunctionExpression(null,formalParameters.params,method,!1))},Parser.prototype.parseSetterMethod=function(){var node=this.createNode(),previousAllowYield=this.context.allowYield,formalParameters=(this.context.allowYield=!0,this.parseFormalParameters()),method=(1!==formalParameters.params.length?this.tolerateError(messages_1.Messages.BadSetterArity):formalParameters.params[0]instanceof Node.RestElement&&this.tolerateError(messages_1.Messages.BadSetterRestParameter),this.parsePropertyMethod(formalParameters));return this.context.allowYield=previousAllowYield,this.finalize(node,new Node.FunctionExpression(null,formalParameters.params,method,!1))},Parser.prototype.parseGeneratorMethod=function(){var node=this.createNode(),previousAllowYield=this.context.allowYield,params=(this.context.allowYield=!0,this.parseFormalParameters()),method=(this.context.allowYield=!1,this.parsePropertyMethod(params));return this.context.allowYield=previousAllowYield,this.finalize(node,new Node.FunctionExpression(null,params.params,method,!0))},Parser.prototype.isStartOfExpression=function(){var start=!0,value=this.lookahead.value;switch(this.lookahead.type){case 7:start="["===value||"("===value||"{"===value||"+"===value||"-"===value||"!"===value||"~"===value||"++"===value||"--"===value||"/"===value||"/="===value;break;case 4:start="class"===value||"delete"===value||"function"===value||"let"===value||"new"===value||"super"===value||"this"===value||"typeof"===value||"void"===value||"yield"===value}return start},Parser.prototype.parseYieldExpression=function(){var previousAllowYield,node=this.createNode(),argument=(this.expectKeyword("yield"),null),delegate=!1;return this.hasLineTerminator||(previousAllowYield=this.context.allowYield,this.context.allowYield=!1,(delegate=this.match("*"))?(this.nextToken(),argument=this.parseAssignmentExpression()):this.isStartOfExpression()&&(argument=this.parseAssignmentExpression()),this.context.allowYield=previousAllowYield),this.finalize(node,new Node.YieldExpression(argument,delegate))},Parser.prototype.parseClassElement=function(hasConstructor){var token=this.lookahead,node=this.createNode(),kind="",key=null,value=null,computed=!1,method=!1,isStatic=!1,isAsync=!1,punctuator=(this.match("*")?this.nextToken():(computed=this.match("["),"static"===(key=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(token=this.lookahead,isStatic=!0,computed=this.match("["),this.match("*")?this.nextToken():key=this.parseObjectPropertyKey()),3!==token.type||this.hasLineTerminator||"async"!==token.value||":"!==(punctuator=this.lookahead.value)&&"("!==punctuator&&"*"!==punctuator&&(isAsync=!0,token=this.lookahead,key=this.parseObjectPropertyKey(),3===token.type)&&"constructor"===token.value&&this.tolerateUnexpectedToken(token,messages_1.Messages.ConstructorIsAsync)),this.qualifiedPropertyName(this.lookahead));return 3===token.type?"get"===token.value&&punctuator?(kind="get",computed=this.match("["),key=this.parseObjectPropertyKey(),this.context.allowYield=!1,value=this.parseGetterMethod()):"set"===token.value&&punctuator&&(kind="set",computed=this.match("["),key=this.parseObjectPropertyKey(),value=this.parseSetterMethod()):7===token.type&&"*"===token.value&&punctuator&&(kind="init",computed=this.match("["),key=this.parseObjectPropertyKey(),value=this.parseGeneratorMethod(),method=!0),!kind&&key&&this.match("(")&&(kind="init",value=isAsync?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),method=!0),kind||this.throwUnexpectedToken(this.lookahead),"init"===kind&&(kind="method"),computed||(isStatic&&this.isPropertyKey(key,"prototype")&&this.throwUnexpectedToken(token,messages_1.Messages.StaticPrototype),!isStatic&&this.isPropertyKey(key,"constructor")&&(("method"!==kind||!method||value&&value.generator)&&this.throwUnexpectedToken(token,messages_1.Messages.ConstructorSpecialMethod),hasConstructor.value?this.throwUnexpectedToken(token,messages_1.Messages.DuplicateConstructor):hasConstructor.value=!0,kind="constructor")),this.finalize(node,new Node.MethodDefinition(key,computed,value,kind,isStatic))},Parser.prototype.parseClassElementList=function(){var body=[],hasConstructor={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():body.push(this.parseClassElement(hasConstructor));return this.expect("}"),body},Parser.prototype.parseClassBody=function(){var node=this.createNode(),elementList=this.parseClassElementList();return this.finalize(node,new Node.ClassBody(elementList))},Parser.prototype.parseClassDeclaration=function(identifierIsOptional){var node=this.createNode(),previousStrict=this.context.strict,identifierIsOptional=(this.context.strict=!0,this.expectKeyword("class"),identifierIsOptional&&3!==this.lookahead.type?null:this.parseVariableIdentifier()),superClass=null,classBody=(this.matchKeyword("extends")&&(this.nextToken(),superClass=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall)),this.parseClassBody());return this.context.strict=previousStrict,this.finalize(node,new Node.ClassDeclaration(identifierIsOptional,superClass,classBody))},Parser.prototype.parseClassExpression=function(){var node=this.createNode(),previousStrict=this.context.strict,id=(this.context.strict=!0,this.expectKeyword("class"),3===this.lookahead.type?this.parseVariableIdentifier():null),superClass=null,classBody=(this.matchKeyword("extends")&&(this.nextToken(),superClass=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall)),this.parseClassBody());return this.context.strict=previousStrict,this.finalize(node,new Node.ClassExpression(id,superClass,classBody))},Parser.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var node=this.createNode(),body=this.parseDirectivePrologues();2!==this.lookahead.type;)body.push(this.parseStatementListItem());return this.finalize(node,new Node.Module(body))},Parser.prototype.parseScript=function(){for(var node=this.createNode(),body=this.parseDirectivePrologues();2!==this.lookahead.type;)body.push(this.parseStatementListItem());return this.finalize(node,new Node.Script(body))},Parser.prototype.parseModuleSpecifier=function(){var node=this.createNode(),token=(8!==this.lookahead.type&&this.throwError(messages_1.Messages.InvalidModuleSpecifier),this.nextToken()),raw=this.getTokenRaw(token);return this.finalize(node,new Node.Literal(token.value,raw))},Parser.prototype.parseImportSpecifier=function(){var imported,local,node=this.createNode();return 3===this.lookahead.type?(local=imported=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),local=this.parseVariableIdentifier())):(local=imported=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),local=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(node,new Node.ImportSpecifier(local,imported))},Parser.prototype.parseNamedImports=function(){this.expect("{");for(var specifiers=[];!this.match("}");)specifiers.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),specifiers},Parser.prototype.parseImportDefaultSpecifier=function(){var node=this.createNode(),local=this.parseIdentifierName();return this.finalize(node,new Node.ImportDefaultSpecifier(local))},Parser.prototype.parseImportNamespaceSpecifier=function(){var node=this.createNode(),local=(this.expect("*"),this.matchContextualKeyword("as")||this.throwError(messages_1.Messages.NoAsAfterImportNamespace),this.nextToken(),this.parseIdentifierName());return this.finalize(node,new Node.ImportNamespaceSpecifier(local))},Parser.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(messages_1.Messages.IllegalImportDeclaration);var node=this.createNode(),specifiers=(this.expectKeyword("import"),[]),message=(8===this.lookahead.type||(this.match("{")?specifiers=specifiers.concat(this.parseNamedImports()):this.match("*")?specifiers.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(specifiers.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?specifiers.push(this.parseImportNamespaceSpecifier()):this.match("{")?specifiers=specifiers.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),this.matchContextualKeyword("from")||(message=this.lookahead.value?messages_1.Messages.UnexpectedToken:messages_1.Messages.MissingFromClause,this.throwError(message,this.lookahead.value)),this.nextToken()),this.parseModuleSpecifier());return this.consumeSemicolon(),this.finalize(node,new Node.ImportDeclaration(specifiers,message))},Parser.prototype.parseExportSpecifier=function(){var node=this.createNode(),local=this.parseIdentifierName(),exported=local;return this.matchContextualKeyword("as")&&(this.nextToken(),exported=this.parseIdentifierName()),this.finalize(node,new Node.ExportSpecifier(local,exported))},Parser.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(messages_1.Messages.IllegalExportDeclaration);var exportDeclaration,node=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))this.nextToken(),exportDeclaration=(this.matchKeyword("function")?declaration=this.parseFunctionDeclaration(!0):this.matchKeyword("class")?declaration=this.parseClassDeclaration(!0):this.matchContextualKeyword("async")?declaration=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression():(this.matchContextualKeyword("from")&&this.throwError(messages_1.Messages.UnexpectedToken,this.lookahead.value),declaration=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon()),this.finalize(node,new Node.ExportDefaultDeclaration(declaration)));else if(this.match("*")){this.nextToken(),this.matchContextualKeyword("from")||(message=this.lookahead.value?messages_1.Messages.UnexpectedToken:messages_1.Messages.MissingFromClause,this.throwError(message,this.lookahead.value)),this.nextToken();var src=this.parseModuleSpecifier();this.consumeSemicolon(),exportDeclaration=this.finalize(node,new Node.ExportAllDeclaration(src))}else if(4===this.lookahead.type){var declaration=void 0;switch(this.lookahead.value){case"let":case"const":declaration=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":declaration=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}exportDeclaration=this.finalize(node,new Node.ExportNamedDeclaration(declaration,[],null))}else if(this.matchAsyncFunction()){declaration=this.parseFunctionDeclaration();exportDeclaration=this.finalize(node,new Node.ExportNamedDeclaration(declaration,[],null))}else{var message,specifiers=[],src=null,isExportFromIdentifier=!1;for(this.expect("{");!this.match("}");)isExportFromIdentifier=isExportFromIdentifier||this.matchKeyword("default"),specifiers.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),src=this.parseModuleSpecifier(),this.consumeSemicolon()):isExportFromIdentifier?(message=this.lookahead.value?messages_1.Messages.UnexpectedToken:messages_1.Messages.MissingFromClause,this.throwError(message,this.lookahead.value)):this.consumeSemicolon(),exportDeclaration=this.finalize(node,new Node.ExportNamedDeclaration(null,specifiers,src))}return exportDeclaration},Parser}();exports.Parser=__webpack_require__},function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.assert=function(condition,message){if(!condition)throw new Error("ASSERT: "+message)}},function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var ErrorHandler=function(){function ErrorHandler(){this.errors=[],this.tolerant=!1}return ErrorHandler.prototype.recordError=function(error){this.errors.push(error)},ErrorHandler.prototype.tolerate=function(error){if(!this.tolerant)throw error;this.recordError(error)},ErrorHandler.prototype.constructError=function(msg,column){msg=new Error(msg);try{throw msg}catch(base){Object.create&&Object.defineProperty&&(msg=Object.create(base),Object.defineProperty(msg,"column",{value:column}))}return msg},ErrorHandler.prototype.createError=function(index,line,col,description){col=this.constructError("Line "+line+": "+description,col);return col.index=index,col.lineNumber=line,col.description=description,col},ErrorHandler.prototype.throwError=function(index,line,col,description){throw this.createError(index,line,col,description)},ErrorHandler.prototype.tolerateError=function(index,line,col,description){index=this.createError(index,line,col,description);if(!this.tolerant)throw index;this.recordError(index)},ErrorHandler}();exports.ErrorHandler=ErrorHandler},function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var assert_1=__webpack_require__(9),character_1=__webpack_require__(4),messages_1=__webpack_require__(11);function hexValue(ch){return"0123456789abcdef".indexOf(ch.toLowerCase())}function octalValue(ch){return"01234567".indexOf(ch)}__webpack_require__=function(){function Scanner(code,handler){this.source=code,this.errorHandler=handler,this.trackComment=!1,this.isModule=!1,this.length=code.length,this.index=0,this.lineNumber=0<code.length?1:0,this.lineStart=0,this.curlyStack=[]}return Scanner.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},Scanner.prototype.restoreState=function(state){this.index=state.index,this.lineNumber=state.lineNumber,this.lineStart=state.lineStart},Scanner.prototype.eof=function(){return this.index>=this.length},Scanner.prototype.throwUnexpectedToken=function(message){return void 0===message&&(message=messages_1.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,message)},Scanner.prototype.tolerateUnexpectedToken=function(message){void 0===message&&(message=messages_1.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,message)},Scanner.prototype.skipSingleLineComment=function(offset){var start,loc,comments=[];for(this.trackComment&&(comments=[],start=this.index-offset,loc={start:{line:this.lineNumber,column:this.index-this.lineStart-offset},end:{}});!this.eof();){var entry,ch=this.source.charCodeAt(this.index);if(++this.index,character_1.Character.isLineTerminator(ch))return this.trackComment&&(entry={multiLine:!(loc.end={line:this.lineNumber,column:this.index-this.lineStart-1}),slice:[start+offset,this.index-1],range:[start,this.index-1],loc:loc},comments.push(entry)),13===ch&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,comments}return this.trackComment&&(entry={multiLine:!(loc.end={line:this.lineNumber,column:this.index-this.lineStart}),slice:[start+offset,this.index],range:[start,this.index],loc:loc},comments.push(entry)),comments},Scanner.prototype.skipMultiLineComment=function(){var start,loc,comments=[];for(this.trackComment&&(comments=[],start=this.index-2,loc={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var entry,ch=this.source.charCodeAt(this.index);if(character_1.Character.isLineTerminator(ch))13===ch&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else{if(42===ch&&47===this.source.charCodeAt(this.index+1))return this.index+=2,this.trackComment&&(loc.end={line:this.lineNumber,column:this.index-this.lineStart},entry={multiLine:!0,slice:[start+2,this.index-2],range:[start,this.index],loc:loc},comments.push(entry)),comments;++this.index}}return this.trackComment&&(loc.end={line:this.lineNumber,column:this.index-this.lineStart},entry={multiLine:!0,slice:[start+2,this.index],range:[start,this.index],loc:loc},comments.push(entry)),this.tolerateUnexpectedToken(),comments},Scanner.prototype.scanComments=function(){this.trackComment&&(comments=[]);for(var comments,start=0===this.index;!this.eof();){var ch=this.source.charCodeAt(this.index);if(character_1.Character.isWhiteSpace(ch))++this.index;else if(character_1.Character.isLineTerminator(ch))++this.index,13===ch&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,start=!0;else if(47===ch)if(47===(ch=this.source.charCodeAt(this.index+1))){this.index+=2;var comment=this.skipSingleLineComment(2);this.trackComment&&(comments=comments.concat(comment)),start=!0}else{if(42!==ch)break;this.index+=2;comment=this.skipMultiLineComment();this.trackComment&&(comments=comments.concat(comment))}else{if(start&&45===ch){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3;comment=this.skipSingleLineComment(3)}else{if(60!==ch||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4;comment=this.skipSingleLineComment(4)}this.trackComment&&(comments=comments.concat(comment))}}return comments},Scanner.prototype.isFutureReservedWord=function(id){switch(id){case"enum":case"export":case"import":case"super":return!0;default:return!1}},Scanner.prototype.isStrictModeReservedWord=function(id){switch(id){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},Scanner.prototype.isRestrictedWord=function(id){return"eval"===id||"arguments"===id},Scanner.prototype.isKeyword=function(id){switch(id.length){case 2:return"if"===id||"in"===id||"do"===id;case 3:return"var"===id||"for"===id||"new"===id||"try"===id||"let"===id;case 4:return"this"===id||"else"===id||"case"===id||"void"===id||"with"===id||"enum"===id;case 5:return"while"===id||"break"===id||"catch"===id||"throw"===id||"const"===id||"yield"===id||"class"===id||"super"===id;case 6:return"return"===id||"typeof"===id||"delete"===id||"switch"===id||"export"===id||"import"===id;case 7:return"default"===id||"finally"===id||"extends"===id;case 8:return"function"===id||"continue"===id||"debugger"===id;case 10:return"instanceof"===id;default:return!1}},Scanner.prototype.codePointAt=function(i){var cp=this.source.charCodeAt(i);return cp=55296<=cp&&cp<=56319&&56320<=(i=this.source.charCodeAt(i+1))&&i<=57343?1024*(cp-55296)+i-56320+65536:cp},Scanner.prototype.scanHexEscape=function(prefix){for(var len="u"===prefix?4:2,code=0,i=0;i<len;++i){if(this.eof()||!character_1.Character.isHexDigit(this.source.charCodeAt(this.index)))return null;code=16*code+hexValue(this.source[this.index++])}return String.fromCharCode(code)},Scanner.prototype.scanUnicodeCodePointEscape=function(){var ch=this.source[this.index],code=0;for("}"===ch&&this.throwUnexpectedToken();!this.eof()&&(ch=this.source[this.index++],character_1.Character.isHexDigit(ch.charCodeAt(0)));)code=16*code+hexValue(ch);return(1114111<code||"}"!==ch)&&this.throwUnexpectedToken(),character_1.Character.fromCodePoint(code)},Scanner.prototype.getIdentifier=function(){for(var start=this.index++;!this.eof();){var ch=this.source.charCodeAt(this.index);if(92===ch)return this.index=start,this.getComplexIdentifier();if(55296<=ch&&ch<57343)return this.index=start,this.getComplexIdentifier();if(!character_1.Character.isIdentifierPart(ch))break;++this.index}return this.source.slice(start,this.index)},Scanner.prototype.getComplexIdentifier=function(){var ch,cp=this.codePointAt(this.index),id=character_1.Character.fromCodePoint(cp);for(this.index+=id.length,92===cp&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,ch=this.scanUnicodeCodePointEscape()):null!==(ch=this.scanHexEscape("u"))&&"\\"!==ch&&character_1.Character.isIdentifierStart(ch.charCodeAt(0))||this.throwUnexpectedToken(),id=ch);!this.eof()&&(cp=this.codePointAt(this.index),character_1.Character.isIdentifierPart(cp));)id+=ch=character_1.Character.fromCodePoint(cp),this.index+=ch.length,92===cp&&(id=id.substr(0,id.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,ch=this.scanUnicodeCodePointEscape()):null!==(ch=this.scanHexEscape("u"))&&"\\"!==ch&&character_1.Character.isIdentifierPart(ch.charCodeAt(0))||this.throwUnexpectedToken(),id+=ch);return id},Scanner.prototype.octalToDecimal=function(ch){var octal="0"!==ch,code=octalValue(ch);return{code:code=!this.eof()&&character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(octal=!0,code=8*code+octalValue(this.source[this.index++]),0<="0123".indexOf(ch))&&!this.eof()&&character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))?8*code+octalValue(this.source[this.index++]):code,octal:octal}},Scanner.prototype.scanIdentifier=function(){var restore,start=this.index,id=92===this.source.charCodeAt(start)?this.getComplexIdentifier():this.getIdentifier(),type=1===id.length?3:this.isKeyword(id)?4:"null"===id?5:"true"===id||"false"===id?1:3;return 3!==type&&start+id.length!==this.index&&(restore=this.index,this.index=start,this.tolerateUnexpectedToken(messages_1.Messages.InvalidEscapedReservedWord),this.index=restore),{type:type,value:id,lineNumber:this.lineNumber,lineStart:this.lineStart,start:start,end:this.index}},Scanner.prototype.scanPunctuator=function(){var start=this.index,str=this.source[this.index];switch(str){case"(":case"{":"{"===str&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,str="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(str=this.source.substr(this.index,4))?this.index+=4:"==="===(str=str.substr(0,3))||"!=="===str||">>>"===str||"<<="===str||">>="===str||"**="===str?this.index+=3:"&&"===(str=str.substr(0,2))||"||"===str||"=="===str||"!="===str||"+="===str||"-="===str||"*="===str||"/="===str||"++"===str||"--"===str||"<<"===str||">>"===str||"&="===str||"|="===str||"^="===str||"%="===str||"<="===str||">="===str||"=>"===str||"**"===str?this.index+=2:(str=this.source[this.index],0<="<>=!+-*%&|^/".indexOf(str)&&++this.index)}return this.index===start&&this.throwUnexpectedToken(),{type:7,value:str,lineNumber:this.lineNumber,lineStart:this.lineStart,start:start,end:this.index}},Scanner.prototype.scanHexLiteral=function(start){for(var num="";!this.eof()&&character_1.Character.isHexDigit(this.source.charCodeAt(this.index));)num+=this.source[this.index++];return 0===num.length&&this.throwUnexpectedToken(),character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+num,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:start,end:this.index}},Scanner.prototype.scanBinaryLiteral=function(start){for(var ch,num="";!this.eof()&&("0"===(ch=this.source[this.index])||"1"===ch);)num+=this.source[this.index++];return 0===num.length&&this.throwUnexpectedToken(),!this.eof()&&(ch=this.source.charCodeAt(this.index),character_1.Character.isIdentifierStart(ch)||character_1.Character.isDecimalDigit(ch))&&this.throwUnexpectedToken(),{type:6,value:parseInt(num,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:start,end:this.index}},Scanner.prototype.scanOctalLiteral=function(prefix,start){var num="",octal=!1;for(character_1.Character.isOctalDigit(prefix.charCodeAt(0))?(octal=!0,num="0"+this.source[this.index++]):++this.index;!this.eof()&&character_1.Character.isOctalDigit(this.source.charCodeAt(this.index));)num+=this.source[this.index++];return octal||0!==num.length||this.throwUnexpectedToken(),(character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index))||character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(num,8),octal:octal,lineNumber:this.lineNumber,lineStart:this.lineStart,start:start,end:this.index}},Scanner.prototype.isImplicitOctalLiteral=function(){for(var i=this.index+1;i<this.length;++i){var ch=this.source[i];if("8"===ch||"9"===ch)return!1;if(!character_1.Character.isOctalDigit(ch.charCodeAt(0)))return!0}return!0},Scanner.prototype.scanNumericLiteral=function(){var start=this.index,ch=this.source[start],num=(assert_1.assert(character_1.Character.isDecimalDigit(ch.charCodeAt(0))||"."===ch,"Numeric literal must start with a decimal digit or a decimal point"),"");if("."!==ch){if(num=this.source[this.index++],ch=this.source[this.index],"0"===num){if("x"===ch||"X"===ch)return++this.index,this.scanHexLiteral(start);if("b"===ch||"B"===ch)return++this.index,this.scanBinaryLiteral(start);if("o"===ch||"O"===ch)return this.scanOctalLiteral(ch,start);if(ch&&character_1.Character.isOctalDigit(ch.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(ch,start)}for(;character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index));)num+=this.source[this.index++];ch=this.source[this.index]}if("."===ch){for(num+=this.source[this.index++];character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index));)num+=this.source[this.index++];ch=this.source[this.index]}if("e"===ch||"E"===ch)if(num+=this.source[this.index++],"+"!==(ch=this.source[this.index])&&"-"!==ch||(num+=this.source[this.index++]),character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index));)num+=this.source[this.index++];else this.throwUnexpectedToken();return character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(num),lineNumber:this.lineNumber,lineStart:this.lineStart,start:start,end:this.index}},Scanner.prototype.scanStringLiteral=function(){for(var start=this.index,quote=this.source[start],octal=(assert_1.assert("'"===quote||'"'===quote,"String literal must starts with a quote"),++this.index,!1),str="";!this.eof();){var octToDec,ch=this.source[this.index++];if(ch===quote){quote="";break}if("\\"===ch)if((ch=this.source[this.index++])&&character_1.Character.isLineTerminator(ch.charCodeAt(0)))++this.lineNumber,"\r"===ch&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(ch){case"u":"{"===this.source[this.index]?(++this.index,str+=this.scanUnicodeCodePointEscape()):(null===(unescaped_1=this.scanHexEscape(ch))&&this.throwUnexpectedToken(),str+=unescaped_1);break;case"x":var unescaped_1=this.scanHexEscape(ch);null===unescaped_1&&this.throwUnexpectedToken(messages_1.Messages.InvalidHexEscapeSequence),str+=unescaped_1;break;case"n":str+="\n";break;case"r":str+="\r";break;case"t":str+="\t";break;case"b":str+="\b";break;case"f":str+="\f";break;case"v":str+="\v";break;case"8":case"9":str+=ch,this.tolerateUnexpectedToken();break;default:ch&&character_1.Character.isOctalDigit(ch.charCodeAt(0))?(octal=(octToDec=this.octalToDecimal(ch)).octal||octal,str+=String.fromCharCode(octToDec.code)):str+=ch}else{if(character_1.Character.isLineTerminator(ch.charCodeAt(0)))break;str+=ch}}return""!==quote&&(this.index=start,this.throwUnexpectedToken()),{type:8,value:str,octal:octal,lineNumber:this.lineNumber,lineStart:this.lineStart,start:start,end:this.index}},Scanner.prototype.scanTemplate=function(){var cooked="",terminated=!1,start=this.index,head="`"===this.source[start],tail=!1,rawOffset=2;for(++this.index;!this.eof();){var restore,ch=this.source[this.index++];if("`"===ch){rawOffset=1,terminated=tail=!0;break}if("$"===ch){if("{"===this.source[this.index]){this.curlyStack.push("${"),++this.index,terminated=!0;break}cooked+=ch}else if("\\"===ch)if(ch=this.source[this.index++],character_1.Character.isLineTerminator(ch.charCodeAt(0)))++this.lineNumber,"\r"===ch&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(ch){case"n":cooked+="\n";break;case"r":cooked+="\r";break;case"t":cooked+="\t";break;case"u":"{"===this.source[this.index]?(++this.index,cooked+=this.scanUnicodeCodePointEscape()):(restore=this.index,null!==(unescaped_2=this.scanHexEscape(ch))?cooked+=unescaped_2:(this.index=restore,cooked+=ch));break;case"x":var unescaped_2=this.scanHexEscape(ch);null===unescaped_2&&this.throwUnexpectedToken(messages_1.Messages.InvalidHexEscapeSequence),cooked+=unescaped_2;break;case"b":cooked+="\b";break;case"f":cooked+="\f";break;case"v":cooked+="\v";break;default:"0"===ch?(character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(messages_1.Messages.TemplateOctalLiteral),cooked+="\0"):character_1.Character.isOctalDigit(ch.charCodeAt(0))?this.throwUnexpectedToken(messages_1.Messages.TemplateOctalLiteral):cooked+=ch}else character_1.Character.isLineTerminator(ch.charCodeAt(0))?(++this.lineNumber,"\r"===ch&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index,cooked+="\n"):cooked+=ch}return terminated||this.throwUnexpectedToken(),head||this.curlyStack.pop(),{type:10,value:this.source.slice(start+1,this.index-rawOffset),cooked:cooked,head:head,tail:tail,lineNumber:this.lineNumber,lineStart:this.lineStart,start:start,end:this.index}},Scanner.prototype.testRegExp=function(pattern,flags){var tmp=pattern,self=this;0<=flags.indexOf("u")&&(tmp=tmp.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function($0,$1,$2){$1=parseInt($1||$2,16);return 1114111<$1&&self.throwUnexpectedToken(messages_1.Messages.InvalidRegExp),$1<=65535?String.fromCharCode($1):"￿"}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"￿"));try{RegExp(tmp)}catch(e){this.throwUnexpectedToken(messages_1.Messages.InvalidRegExp)}try{return new RegExp(pattern,flags)}catch(exception){return null}},Scanner.prototype.scanRegExpBody=function(){for(var ch=this.source[this.index],str=(assert_1.assert("/"===ch,"Regular expression literal must start with a slash"),this.source[this.index++]),classMarker=!1,terminated=!1;!this.eof();)if(str+=ch=this.source[this.index++],"\\"===ch)ch=this.source[this.index++],character_1.Character.isLineTerminator(ch.charCodeAt(0))&&this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp),str+=ch;else if(character_1.Character.isLineTerminator(ch.charCodeAt(0)))this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp);else if(classMarker)"]"===ch&&(classMarker=!1);else{if("/"===ch){terminated=!0;break}"["===ch&&(classMarker=!0)}return terminated||this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp),str.substr(1,str.length-2)},Scanner.prototype.scanRegExpFlags=function(){for(var flags="";!this.eof();){var ch=this.source[this.index];if(!character_1.Character.isIdentifierPart(ch.charCodeAt(0)))break;if(++this.index,"\\"!==ch||this.eof())flags+=ch,0;else{if("u"===(ch=this.source[this.index])){++this.index;var restore=this.index,ch=this.scanHexEscape("u");if(null!==ch)for(flags+=ch,0;restore<this.index;++restore)this.source[restore];else this.index=restore,flags+="u",0}else 0;this.tolerateUnexpectedToken()}}return flags},Scanner.prototype.scanRegExp=function(){var start=this.index,pattern=this.scanRegExpBody(),flags=this.scanRegExpFlags();return{type:9,value:"",pattern:pattern,flags:flags,regex:this.testRegExp(pattern,flags),lineNumber:this.lineNumber,lineStart:this.lineStart,start:start,end:this.index}},Scanner.prototype.lex=function(){var cp;return this.eof()?{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index}:(cp=this.source.charCodeAt(this.index),character_1.Character.isIdentifierStart(cp)?this.scanIdentifier():40===cp||41===cp||59===cp?this.scanPunctuator():39===cp||34===cp?this.scanStringLiteral():46===cp?character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():character_1.Character.isDecimalDigit(cp)?this.scanNumericLiteral():96===cp||125===cp&&"${"===this.curlyStack[this.curlyStack.length-1]?this.scanTemplate():55296<=cp&&cp<57343&&character_1.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator())},Scanner}();exports.Scanner=__webpack_require__},function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TokenName={},exports.TokenName[1]="Boolean",exports.TokenName[2]="<end>",exports.TokenName[3]="Identifier",exports.TokenName[4]="Keyword",exports.TokenName[5]="Null",exports.TokenName[6]="Numeric",exports.TokenName[7]="Punctuator",exports.TokenName[8]="String",exports.TokenName[9]="RegularExpression",exports.TokenName[10]="Template"},function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var error_handler_1=__webpack_require__(10),scanner_1=__webpack_require__(12),token_1=__webpack_require__(13),Reader=function(){function Reader(){this.values=[],this.curly=this.paren=-1}return Reader.prototype.beforeFunctionExpression=function(t){return 0<=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(t)},Reader.prototype.isRegexStart=function(){var check,previous=this.values[this.values.length-1],regex=null!==previous;switch(previous){case"this":case"]":regex=!1;break;case")":var keyword=this.values[this.paren-1],regex="if"===keyword||"while"===keyword||"for"===keyword||"with"===keyword;break;case"}":regex=!1,"function"===this.values[this.curly-3]?regex=!!(check=this.values[this.curly-4])&&!this.beforeFunctionExpression(check):"function"===this.values[this.curly-4]&&(regex=!(check=this.values[this.curly-5])||!this.beforeFunctionExpression(check))}return regex},Reader.prototype.push=function(token){7===token.type||4===token.type?("{"===token.value?this.curly=this.values.length:"("===token.value&&(this.paren=this.values.length),this.values.push(token.value)):this.values.push(null)},Reader}(),__webpack_require__=function(){function Tokenizer(code,config){this.errorHandler=new error_handler_1.ErrorHandler,this.errorHandler.tolerant=!!config&&"boolean"==typeof config.tolerant&&config.tolerant,this.scanner=new scanner_1.Scanner(code,this.errorHandler),this.scanner.trackComment=!!config&&"boolean"==typeof config.comment&&config.comment,this.trackRange=!!config&&"boolean"==typeof config.range&&config.range,this.trackLoc=!!config&&"boolean"==typeof config.loc&&config.loc,this.buffer=[],this.reader=new Reader}return Tokenizer.prototype.errors=function(){return this.errorHandler.errors},Tokenizer.prototype.getNextToken=function(){if(0===this.buffer.length){var entry,loc,token,comments=this.scanner.scanComments();if(this.scanner.trackComment)for(var i=0;i<comments.length;++i){var e=comments[i],value=this.scanner.source.slice(e.slice[0],e.slice[1]),value={type:e.multiLine?"BlockComment":"LineComment",value:value};this.trackRange&&(value.range=e.range),this.trackLoc&&(value.loc=e.loc),this.buffer.push(value)}this.scanner.eof()||(loc=void 0,this.trackLoc&&(loc={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}}),token="/"===this.scanner.source[this.scanner.index]&&this.reader.isRegexStart()?this.scanner.scanRegExp():this.scanner.lex(),this.reader.push(token),entry={type:token_1.TokenName[token.type],value:this.scanner.source.slice(token.start,token.end)},this.trackRange&&(entry.range=[token.start,token.end]),this.trackLoc&&(loc.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},entry.loc=loc),9===token.type&&(loc=token.pattern,token=token.flags,entry.regex={pattern:loc,flags:token}),this.buffer.push(entry))}return this.buffer.shift()},Tokenizer}();exports.Tokenizer=__webpack_require__}],installedModules={},__webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.p="",__webpack_require__(0);function __webpack_require__(moduleId){var module;return(installedModules[moduleId]||(module=installedModules[moduleId]={exports:{},id:moduleId,loaded:!1},modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module)).exports}var modules,installedModules},"object"==typeof exports&&"object"==typeof module?module.exports=factory():"function"==typeof define&&define.amd?define([],factory):"object"==typeof exports?exports.esprima=factory():root.esprima=factory()},{}],16:[function(require,module,exports){!function(){"use strict";var estraverse=require("estraverse");function isNode(node){return null!=node&&"object"==typeof node&&"string"==typeof node.type}function Visitor(visitor,options){options=options||{},this.__visitor=visitor||this,this.__childVisitorKeys=options.childVisitorKeys?Object.assign({},estraverse.VisitorKeys,options.childVisitorKeys):estraverse.VisitorKeys,"iteration"===options.fallback?this.__fallback=Object.keys:"function"==typeof options.fallback&&(this.__fallback=options.fallback)}Visitor.prototype.visitChildren=function(node){var type,children,i,iz,j,jz,child,nodeType,key;if(null!=node){if(type=node.type||estraverse.Syntax.Property,!(children=this.__childVisitorKeys[type])){if(!this.__fallback)throw new Error("Unknown node type "+type+".");children=this.__fallback(node)}for(i=0,iz=children.length;i<iz;++i)if(child=node[children[i]])if(Array.isArray(child))for(j=0,jz=child.length;j<jz;++j)!child[j]||!isNode(child[j])&&(nodeType=type,key=children[i],nodeType!==estraverse.Syntax.ObjectExpression&&nodeType!==estraverse.Syntax.ObjectPattern||"properties"!==key)||this.visit(child[j]);else isNode(child)&&this.visit(child)}},Visitor.prototype.visit=function(node){var type;null!=node&&(type=node.type||estraverse.Syntax.Property,this.__visitor[type]?this.__visitor[type].call(this,node):this.visitChildren(node))},exports.version=require("./package.json").version,exports.Visitor=Visitor,exports.visit=function(node,visitor,options){new Visitor(visitor,options).visit(node)}}()},{"./package.json":18,estraverse:17}],17:[function(require,module,exports){!function clone(exports){"use strict";var Syntax,VisitorOption,VisitorKeys,BREAK,SKIP,REMOVE;function deepCopy(obj){var key,val,ret={};for(key in obj)obj.hasOwnProperty(key)&&(val=obj[key],ret[key]="object"==typeof val&&null!==val?deepCopy(val):val);return ret}function Reference(parent,key){this.parent=parent,this.key=key}function Element(node,path,wrap,ref){this.node=node,this.path=path,this.wrap=wrap,this.ref=ref}function Controller(){}function isNode(node){return null!=node&&"object"==typeof node&&"string"==typeof node.type}function isProperty(nodeType,key){return(nodeType===Syntax.ObjectExpression||nodeType===Syntax.ObjectPattern)&&"properties"===key}function candidateExistsInLeaveList(leavelist,candidate){for(var i=leavelist.length-1;0<=i;--i)if(leavelist[i].node===candidate)return 1}function traverse(root,visitor){return(new Controller).traverse(root,visitor)}function extendCommentRange(comment,tokens){var target=function(array,func){for(var diff,current,len=array.length,i=0;len;)func(array[current=i+(diff=len>>>1)])?len=diff:(i=current+1,len-=1+diff);return i}(tokens,function(token){return token.range[0]>comment.range[0]});return comment.extendedRange=[comment.range[0],comment.range[1]],target!==tokens.length&&(comment.extendedRange[1]=tokens[target].range[0]),0<=--target&&(comment.extendedRange[0]=tokens[target].range[1]),comment}return Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},VisitorKeys={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},VisitorOption={Break:BREAK={},Skip:SKIP={},Remove:REMOVE={}},Reference.prototype.replace=function(node){this.parent[this.key]=node},Reference.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},Controller.prototype.path=function(){var i,iz,j,jz,result;function addToPath(result,path){if(Array.isArray(path))for(j=0,jz=path.length;j<jz;++j)result.push(path[j]);else result.push(path)}if(!this.__current.path)return null;for(result=[],i=2,iz=this.__leavelist.length;i<iz;++i)addToPath(result,this.__leavelist[i].path);return addToPath(result,this.__current.path),result},Controller.prototype.type=function(){return this.current().type||this.__current.wrap},Controller.prototype.parents=function(){for(var result=[],i=1,iz=this.__leavelist.length;i<iz;++i)result.push(this.__leavelist[i].node);return result},Controller.prototype.current=function(){return this.__current.node},Controller.prototype.__execute=function(callback,element){var result=void 0,previous=this.__current;return this.__current=element,this.__state=null,callback&&(result=callback.call(this,element.node,this.__leavelist[this.__leavelist.length-1].node)),this.__current=previous,result},Controller.prototype.notify=function(flag){this.__state=flag},Controller.prototype.skip=function(){this.notify(SKIP)},Controller.prototype.break=function(){this.notify(BREAK)},Controller.prototype.remove=function(){this.notify(REMOVE)},Controller.prototype.__initialize=function(root,visitor){this.visitor=visitor,this.root=root,this.__worklist=[],this.__leavelist=[],this.__current=null,this.__state=null,this.__fallback=null,"iteration"===visitor.fallback?this.__fallback=Object.keys:"function"==typeof visitor.fallback&&(this.__fallback=visitor.fallback),this.__keys=VisitorKeys,visitor.keys&&(this.__keys=Object.assign(Object.create(this.__keys),visitor.keys))},Controller.prototype.traverse=function(root,visitor){var worklist,leavelist,element,node,nodeType,ret,key,current,current2,candidates,candidate,sentinel;for(this.__initialize(root,visitor),sentinel={},worklist=this.__worklist,leavelist=this.__leavelist,worklist.push(new Element(root,null,null,null)),leavelist.push(new Element(null,null,null,null));worklist.length;)if((element=worklist.pop())===sentinel){if(element=leavelist.pop(),ret=this.__execute(visitor.leave,element),this.__state===BREAK||ret===BREAK)return}else if(element.node){if(ret=this.__execute(visitor.enter,element),this.__state===BREAK||ret===BREAK)return;if(worklist.push(sentinel),leavelist.push(element),this.__state!==SKIP&&ret!==SKIP){if(nodeType=(node=element.node).type||element.wrap,!(candidates=this.__keys[nodeType])){if(!this.__fallback)throw new Error("Unknown node type "+nodeType+".");candidates=this.__fallback(node)}for(current=candidates.length;0<=--current;)if(candidate=node[key=candidates[current]])if(Array.isArray(candidate)){for(current2=candidate.length;0<=--current2;)if(candidate[current2]&&!candidateExistsInLeaveList(leavelist,candidate[current2])){if(isProperty(nodeType,candidates[current]))element=new Element(candidate[current2],[key,current2],"Property",null);else{if(!isNode(candidate[current2]))continue;element=new Element(candidate[current2],[key,current2],null,null)}worklist.push(element)}}else!isNode(candidate)||candidateExistsInLeaveList(leavelist,candidate)||worklist.push(new Element(candidate,key,null,null))}}},Controller.prototype.replace=function(root,visitor){var worklist,leavelist,node,nodeType,target,element,current,current2,candidates,candidate,sentinel,outer,key;function removeElem(element){var i,key,nextElem,parent;if(element.ref.remove())for(key=element.ref.key,parent=element.ref.parent,i=worklist.length;i--;)if((nextElem=worklist[i]).ref&&nextElem.ref.parent===parent){if(nextElem.ref.key<key)break;--nextElem.ref.key}}for(this.__initialize(root,visitor),sentinel={},worklist=this.__worklist,leavelist=this.__leavelist,element=new Element(root,null,null,new Reference(outer={root:root},"root")),worklist.push(element),leavelist.push(element);worklist.length;)if((element=worklist.pop())===sentinel){if(element=leavelist.pop(),void 0!==(target=this.__execute(visitor.leave,element))&&target!==BREAK&&target!==SKIP&&target!==REMOVE&&element.ref.replace(target),this.__state!==REMOVE&&target!==REMOVE||removeElem(element),this.__state===BREAK||target===BREAK)return outer.root}else{if(void 0!==(target=this.__execute(visitor.enter,element))&&target!==BREAK&&target!==SKIP&&target!==REMOVE&&(element.ref.replace(target),element.node=target),this.__state!==REMOVE&&target!==REMOVE||(removeElem(element),element.node=null),this.__state===BREAK||target===BREAK)return outer.root;if((node=element.node)&&(worklist.push(sentinel),leavelist.push(element),this.__state!==SKIP)&&target!==SKIP){if(nodeType=node.type||element.wrap,!(candidates=this.__keys[nodeType])){if(!this.__fallback)throw new Error("Unknown node type "+nodeType+".");candidates=this.__fallback(node)}for(current=candidates.length;0<=--current;)if(candidate=node[key=candidates[current]])if(Array.isArray(candidate)){for(current2=candidate.length;0<=--current2;)if(candidate[current2]){if(isProperty(nodeType,candidates[current]))element=new Element(candidate[current2],[key,current2],"Property",new Reference(candidate,current2));else{if(!isNode(candidate[current2]))continue;element=new Element(candidate[current2],[key,current2],null,new Reference(candidate,current2))}worklist.push(element)}}else isNode(candidate)&&worklist.push(new Element(candidate,key,null,new Reference(node,key)))}}return outer.root},exports.Syntax=Syntax,exports.traverse=traverse,exports.replace=function(root,visitor){return(new Controller).replace(root,visitor)},exports.attachComments=function(tree,providedComments,tokens){var comment,len,i,cursor,comments=[];if(!tree.range)throw new Error("attachComments needs range information");if(tokens.length){for(i=0,len=providedComments.length;i<len;i+=1)comments.push(extendCommentRange(deepCopy(providedComments[i]),tokens));cursor=0,traverse(tree,{enter:function(node){for(var comment;cursor<comments.length&&!((comment=comments[cursor]).extendedRange[1]>node.range[0]);)comment.extendedRange[1]===node.range[0]?(node.leadingComments||(node.leadingComments=[]),node.leadingComments.push(comment),comments.splice(cursor,1)):cursor+=1;return cursor===comments.length?VisitorOption.Break:comments[cursor].extendedRange[0]>node.range[1]?VisitorOption.Skip:void 0}}),cursor=0,traverse(tree,{leave:function(node){for(var comment;cursor<comments.length&&(comment=comments[cursor],!(node.range[1]<comment.extendedRange[0]));)node.range[1]===comment.extendedRange[0]?(node.trailingComments||(node.trailingComments=[]),node.trailingComments.push(comment),comments.splice(cursor,1)):cursor+=1;return cursor===comments.length?VisitorOption.Break:comments[cursor].extendedRange[0]>node.range[1]?VisitorOption.Skip:void 0}})}else if(providedComments.length){for(i=0,len=providedComments.length;i<len;i+=1)(comment=deepCopy(providedComments[i])).extendedRange=[0,tree.range[0]],comments.push(comment);tree.leadingComments=comments}return tree},exports.VisitorKeys=VisitorKeys,exports.VisitorOption=VisitorOption,exports.Controller=Controller,exports.cloneEnvironment=function(){return clone({})},exports}(exports)},{}],18:[function(require,module,exports){module.exports={name:"esrecurse",description:"ECMAScript AST recursive visitor",homepage:"https://github.com/estools/esrecurse",main:"esrecurse.js",version:"4.3.0",engines:{node:">=4.0"},maintainers:[{name:"Yusuke Suzuki",email:"utatane.tea@gmail.com",web:"https://github.com/Constellation"}],repository:{type:"git",url:"https://github.com/estools/esrecurse.git"},dependencies:{estraverse:"^5.2.0"},devDependencies:{"babel-cli":"^6.24.1","babel-eslint":"^7.2.3","babel-preset-es2015":"^6.24.1","babel-register":"^6.24.1",chai:"^4.0.2",esprima:"^4.0.0",gulp:"^3.9.0","gulp-bump":"^2.7.0","gulp-eslint":"^4.0.0","gulp-filter":"^5.0.0","gulp-git":"^2.4.1","gulp-mocha":"^4.3.1","gulp-tag-version":"^1.2.1",jsdoc:"^3.3.0-alpha10",minimist:"^1.1.0"},license:"BSD-2-Clause",scripts:{test:"gulp travis","unit-test":"gulp test",lint:"gulp lint"},babel:{presets:["es2015"]}}},{}],19:[function(require,module,exports){!function clone(exports){"use strict";var Syntax,VisitorOption,VisitorKeys,BREAK,SKIP,REMOVE;function deepCopy(obj){var key,val,ret={};for(key in obj)obj.hasOwnProperty(key)&&(val=obj[key],ret[key]="object"==typeof val&&null!==val?deepCopy(val):val);return ret}function Reference(parent,key){this.parent=parent,this.key=key}function Element(node,path,wrap,ref){this.node=node,this.path=path,this.wrap=wrap,this.ref=ref}function Controller(){}function isNode(node){return null!=node&&"object"==typeof node&&"string"==typeof node.type}function isProperty(nodeType,key){return(nodeType===Syntax.ObjectExpression||nodeType===Syntax.ObjectPattern)&&"properties"===key}function traverse(root,visitor){return(new Controller).traverse(root,visitor)}function extendCommentRange(comment,tokens){var target=function(array,func){for(var diff,current,len=array.length,i=0;len;)func(array[current=i+(diff=len>>>1)])?len=diff:(i=current+1,len-=1+diff);return i}(tokens,function(token){return token.range[0]>comment.range[0]});return comment.extendedRange=[comment.range[0],comment.range[1]],target!==tokens.length&&(comment.extendedRange[1]=tokens[target].range[0]),0<=--target&&(comment.extendedRange[0]=tokens[target].range[1]),comment}return Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},VisitorKeys={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],Program:["body"],Property:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},VisitorOption={Break:BREAK={},Skip:SKIP={},Remove:REMOVE={}},Reference.prototype.replace=function(node){this.parent[this.key]=node},Reference.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},Controller.prototype.path=function(){var i,iz,j,jz,result;function addToPath(result,path){if(Array.isArray(path))for(j=0,jz=path.length;j<jz;++j)result.push(path[j]);else result.push(path)}if(!this.__current.path)return null;for(result=[],i=2,iz=this.__leavelist.length;i<iz;++i)addToPath(result,this.__leavelist[i].path);return addToPath(result,this.__current.path),result},Controller.prototype.type=function(){return this.current().type||this.__current.wrap},Controller.prototype.parents=function(){for(var result=[],i=1,iz=this.__leavelist.length;i<iz;++i)result.push(this.__leavelist[i].node);return result},Controller.prototype.current=function(){return this.__current.node},Controller.prototype.__execute=function(callback,element){var result=void 0,previous=this.__current;return this.__current=element,this.__state=null,callback&&(result=callback.call(this,element.node,this.__leavelist[this.__leavelist.length-1].node)),this.__current=previous,result},Controller.prototype.notify=function(flag){this.__state=flag},Controller.prototype.skip=function(){this.notify(SKIP)},Controller.prototype.break=function(){this.notify(BREAK)},Controller.prototype.remove=function(){this.notify(REMOVE)},Controller.prototype.__initialize=function(root,visitor){this.visitor=visitor,this.root=root,this.__worklist=[],this.__leavelist=[],this.__current=null,this.__state=null,this.__fallback=null,"iteration"===visitor.fallback?this.__fallback=Object.keys:"function"==typeof visitor.fallback&&(this.__fallback=visitor.fallback),this.__keys=VisitorKeys,visitor.keys&&(this.__keys=Object.assign(Object.create(this.__keys),visitor.keys))},Controller.prototype.traverse=function(root,visitor){var worklist,leavelist,element,node,nodeType,ret,key,current,current2,candidates,candidate,sentinel;for(this.__initialize(root,visitor),sentinel={},worklist=this.__worklist,leavelist=this.__leavelist,worklist.push(new Element(root,null,null,null)),leavelist.push(new Element(null,null,null,null));worklist.length;)if((element=worklist.pop())===sentinel){if(element=leavelist.pop(),ret=this.__execute(visitor.leave,element),this.__state===BREAK||ret===BREAK)return}else if(element.node){if(ret=this.__execute(visitor.enter,element),this.__state===BREAK||ret===BREAK)return;if(worklist.push(sentinel),leavelist.push(element),this.__state!==SKIP&&ret!==SKIP){if(nodeType=(node=element.node).type||element.wrap,!(candidates=this.__keys[nodeType])){if(!this.__fallback)throw new Error("Unknown node type "+nodeType+".");candidates=this.__fallback(node)}for(current=candidates.length;0<=--current;)if(candidate=node[key=candidates[current]])if(Array.isArray(candidate)){for(current2=candidate.length;0<=--current2;)if(candidate[current2]){if(isProperty(nodeType,candidates[current]))element=new Element(candidate[current2],[key,current2],"Property",null);else{if(!isNode(candidate[current2]))continue;element=new Element(candidate[current2],[key,current2],null,null)}worklist.push(element)}}else isNode(candidate)&&worklist.push(new Element(candidate,key,null,null))}}},Controller.prototype.replace=function(root,visitor){var worklist,leavelist,node,nodeType,target,element,current,current2,candidates,candidate,sentinel,outer,key;function removeElem(element){var i,key,nextElem,parent;if(element.ref.remove())for(key=element.ref.key,parent=element.ref.parent,i=worklist.length;i--;)if((nextElem=worklist[i]).ref&&nextElem.ref.parent===parent){if(nextElem.ref.key<key)break;--nextElem.ref.key}}for(this.__initialize(root,visitor),sentinel={},worklist=this.__worklist,leavelist=this.__leavelist,element=new Element(root,null,null,new Reference(outer={root:root},"root")),worklist.push(element),leavelist.push(element);worklist.length;)if((element=worklist.pop())===sentinel){if(element=leavelist.pop(),void 0!==(target=this.__execute(visitor.leave,element))&&target!==BREAK&&target!==SKIP&&target!==REMOVE&&element.ref.replace(target),this.__state!==REMOVE&&target!==REMOVE||removeElem(element),this.__state===BREAK||target===BREAK)return outer.root}else{if(void 0!==(target=this.__execute(visitor.enter,element))&&target!==BREAK&&target!==SKIP&&target!==REMOVE&&(element.ref.replace(target),element.node=target),this.__state!==REMOVE&&target!==REMOVE||(removeElem(element),element.node=null),this.__state===BREAK||target===BREAK)return outer.root;if((node=element.node)&&(worklist.push(sentinel),leavelist.push(element),this.__state!==SKIP)&&target!==SKIP){if(nodeType=node.type||element.wrap,!(candidates=this.__keys[nodeType])){if(!this.__fallback)throw new Error("Unknown node type "+nodeType+".");candidates=this.__fallback(node)}for(current=candidates.length;0<=--current;)if(candidate=node[key=candidates[current]])if(Array.isArray(candidate)){for(current2=candidate.length;0<=--current2;)if(candidate[current2]){if(isProperty(nodeType,candidates[current]))element=new Element(candidate[current2],[key,current2],"Property",new Reference(candidate,current2));else{if(!isNode(candidate[current2]))continue;element=new Element(candidate[current2],[key,current2],null,new Reference(candidate,current2))}worklist.push(element)}}else isNode(candidate)&&worklist.push(new Element(candidate,key,null,new Reference(node,key)))}}return outer.root},exports.version=require("./package.json").version,exports.Syntax=Syntax,exports.traverse=traverse,exports.replace=function(root,visitor){return(new Controller).replace(root,visitor)},exports.attachComments=function(tree,providedComments,tokens){var comment,len,i,cursor,comments=[];if(!tree.range)throw new Error("attachComments needs range information");if(tokens.length){for(i=0,len=providedComments.length;i<len;i+=1)comments.push(extendCommentRange(deepCopy(providedComments[i]),tokens));cursor=0,traverse(tree,{enter:function(node){for(var comment;cursor<comments.length&&!((comment=comments[cursor]).extendedRange[1]>node.range[0]);)comment.extendedRange[1]===node.range[0]?(node.leadingComments||(node.leadingComments=[]),node.leadingComments.push(comment),comments.splice(cursor,1)):cursor+=1;return cursor===comments.length?VisitorOption.Break:comments[cursor].extendedRange[0]>node.range[1]?VisitorOption.Skip:void 0}}),cursor=0,traverse(tree,{leave:function(node){for(var comment;cursor<comments.length&&(comment=comments[cursor],!(node.range[1]<comment.extendedRange[0]));)node.range[1]===comment.extendedRange[0]?(node.trailingComments||(node.trailingComments=[]),node.trailingComments.push(comment),comments.splice(cursor,1)):cursor+=1;return cursor===comments.length?VisitorOption.Break:comments[cursor].extendedRange[0]>node.range[1]?VisitorOption.Skip:void 0}})}else if(providedComments.length){for(i=0,len=providedComments.length;i<len;i+=1)(comment=deepCopy(providedComments[i])).extendedRange=[0,tree.range[0]],comments.push(comment);tree.leadingComments=comments}return tree},exports.VisitorKeys=VisitorKeys,exports.VisitorOption=VisitorOption,exports.Controller=Controller,exports.cloneEnvironment=function(){return clone({})},exports}(exports)},{"./package.json":20}],20:[function(require,module,exports){module.exports={name:"estraverse",description:"ECMAScript JS AST traversal functions",homepage:"https://github.com/estools/estraverse",main:"estraverse.js",version:"4.3.0",engines:{node:">=4.0"},maintainers:[{name:"Yusuke Suzuki",email:"utatane.tea@gmail.com",web:"http://github.com/Constellation"}],repository:{type:"git",url:"http://github.com/estools/estraverse.git"},devDependencies:{"babel-preset-env":"^1.6.1","babel-register":"^6.3.13",chai:"^2.1.1",espree:"^1.11.0",gulp:"^3.8.10","gulp-bump":"^0.2.2","gulp-filter":"^2.0.0","gulp-git":"^1.0.1","gulp-tag-version":"^1.3.0",jshint:"^2.5.6",mocha:"^2.1.0"},license:"BSD-2-Clause",scripts:{test:"npm run-script lint && npm run-script unit-test",lint:"jshint estraverse.js","unit-test":"mocha --compilers js:babel-register"}}},{}],21:[function(require,module,exports){"use strict";var getOwnPropertySymbols=Object.getOwnPropertySymbols,hasOwnProperty=Object.prototype.hasOwnProperty,propIsEnumerable=Object.prototype.propertyIsEnumerable;module.exports=function(){try{if(Object.assign){var test1=new String("abc");if(test1[5]="de","5"!==Object.getOwnPropertyNames(test1)[0]){for(var test2={},i=0;i<10;i++)test2["_"+String.fromCharCode(i)]=i;var test3,order2=Object.getOwnPropertyNames(test2).map(function(n){return test2[n]});if("0123456789"===order2.join(""))return test3={},"abcdefghijklmnopqrst".split("").forEach(function(letter){test3[letter]=letter}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},test3)).join("")?1:void 0}}}catch(err){}}()?Object.assign:function(target,source){for(var from,to=function(val){if(null==val)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(val)}(target),s=1;s<arguments.length;s++){for(var key in from=Object(arguments[s]))hasOwnProperty.call(from,key)&&(to[key]=from[key]);if(getOwnPropertySymbols)for(var symbols=getOwnPropertySymbols(from),i=0;i<symbols.length;i++)propIsEnumerable.call(from,symbols[i])&&(to[symbols[i]]=from[symbols[i]])}return to}},{}],22:[function(require,module,exports){var cachedSetTimeout,cachedClearTimeout,module=module.exports={};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}function runTimeout(fun){if(cachedSetTimeout===setTimeout)return setTimeout(fun,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return(cachedSetTimeout=setTimeout)(fun,0);try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}var currentQueue,queue=[],draining=!1,queueIndex=-1;function cleanUpNextTick(){draining&&currentQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length)&&drainQueue()}function drainQueue(){if(!draining){for(var timeout=runTimeout(cleanUpNextTick),len=(draining=!0,queue.length);len;){for(currentQueue=queue,queue=[];++queueIndex<len;)currentQueue&&currentQueue[queueIndex].run();queueIndex=-1,len=queue.length}currentQueue=null,draining=!1,!function(marker){if(cachedClearTimeout===clearTimeout)return clearTimeout(marker);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return(cachedClearTimeout=clearTimeout)(marker);try{cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}(timeout)}}function Item(fun,array){this.fun=fun,this.array=array}function noop(){}module.nextTick=function(fun){var args=new Array(arguments.length-1);if(1<arguments.length)for(var i=1;i<arguments.length;i++)args[i-1]=arguments[i];queue.push(new Item(fun,args)),1!==queue.length||draining||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},module.title="browser",module.browser=!0,module.env={},module.argv=[],module.version="",module.versions={},module.on=noop,module.addListener=noop,module.once=noop,module.off=noop,module.removeListener=noop,module.removeAllListeners=noop,module.emit=noop,module.prependListener=noop,module.prependOnceListener=noop,module.listeners=function(name){return[]},module.binding=function(name){throw new Error("process.binding is not supported")},module.cwd=function(){return"/"},module.chdir=function(dir){throw new Error("process.chdir is not supported")},module.umask=function(){return 0}},{}]},{},[1]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment