forked from NeilFraser/JS-Interpreter
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathacorn_interpreter.js
20 lines (20 loc) · 76.8 KB
/
acorn_interpreter.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
var Interpreter=function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,r){t.exports=r(1)},function(t,e,r){var n,o;n=[r,e,r(2),r(4)],void 0!==(o=function(t,e,r,n){"use strict";/*!
* @license
* JavaScript Interpreter bundled with acorn v0.4.1
*
* Copyright 2013-2017 Google Inc. and Jun Kato
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
return n.acorn=r,n}.apply(e,n))&&(t.exports=o)},function(t,e,r){"use strict";(function(t){var r,n,o,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(a,s){"object"==i(e)&&"object"==i(t)?s(e):(n=[e],r=s,void 0!==(o="function"==typeof r?r.apply(e,n):r)&&(t.exports=o))}(0,function(t){function e(t){lt=t||{};for(var e in dt)Object.prototype.hasOwnProperty.call(lt,e)||(lt[e]=dt[e]);yt=lt.sourceFile||null}function r(t,e){var r=vt(ht,t);e+=" ("+r.line+":"+r.column+")";var n=new SyntaxError(e);throw n.pos=t,n.loc=r,n.raisedAt=Et,n}function n(t){function e(t){if(1==t.length)return r+="return str === "+JSON.stringify(t[0])+";";r+="switch(str){";for(var e=0;e<t.length;++e)r+="case "+JSON.stringify(t[e])+":";r+="return true}return false;"}t=t.split(" ");var r="",n=[];t:for(var o=0;o<t.length;++o){for(var i=0;i<n.length;++i)if(n[i][0].length==t[o].length){n[i].push(t[o]);continue t}n.push([t[o]])}if(n.length>3){n.sort(function(t,e){return e.length-t.length}),r+="switch(str.length){";for(var o=0;o<n.length;++o){var a=n[o];r+="case "+a[0].length+":",e(a)}r+="}"}else e(t);return new Function("str",r)}function o(){this.line=St,this.column=Et-mt}function i(){St=1,Et=mt=0,Nt=!0,c()}function a(t,e){Rt=Et,lt.locations&&(Ot=new o),_t=t,c(),Pt=e,Nt=t.beforeExpr}function s(){var t=lt.onComment&<.locations&&new o,e=Et,n=ht.indexOf("*/",Et+=2);if(-1===n&&r(Et-2,"Unterminated comment"),Et=n+2,lt.locations){He.lastIndex=e;for(var i;(i=He.exec(ht))&&i.index<Et;)++St,mt=i.index+i[0].length}lt.onComment&<.onComment(!0,ht.slice(e+2,n),e,Et,t,lt.locations&&new o)}function p(){for(var t=Et,e=lt.onComment&<.locations&&new o,r=ht.charCodeAt(Et+=2);Et<ft&&10!==r&&13!==r&&8232!==r&&8233!==r;)++Et,r=ht.charCodeAt(Et);lt.onComment&<.onComment(!1,ht.slice(t+2,Et),t,Et,e,lt.locations&&new o)}function c(){for(;Et<ft;){var t=ht.charCodeAt(Et);if(32===t)++Et;else if(13===t){++Et;var e=ht.charCodeAt(Et);10===e&&++Et,lt.locations&&(++St,mt=Et)}else if(10===t||8232===t||8233===t)++Et,lt.locations&&(++St,mt=Et);else if(t>8&&t<14)++Et;else if(47===t){var e=ht.charCodeAt(Et+1);if(42===e)s();else{if(47!==e)break;p()}}else if(160===t)++Et;else{if(!(t>=5760&&Je.test(String.fromCharCode(t))))break;++Et}}}function u(){var t=ht.charCodeAt(Et+1);return t>=48&&t<=57?N(!0):(++Et,a(be))}function l(){var t=ht.charCodeAt(Et+1);return Nt?(++Et,O()):61===t?b(Ne,2):b(_e,1)}function h(){return 61===ht.charCodeAt(Et+1)?b(Ne,2):b(Ue,1)}function f(t){var e=ht.charCodeAt(Et+1);return e===t?b(124===t?we:Te,2):61===e?b(Ne,2):b(124===t?Ce:xe,1)}function y(){return 61===ht.charCodeAt(Et+1)?b(Ne,2):b(Ae,1)}function d(t){var e=ht.charCodeAt(Et+1);return e===t?45==e&&62==ht.charCodeAt(Et+2)&&ze.test(ht.slice(Tt,Et))?(Et+=3,p(),c(),R()):b(Se,2):61===e?b(Ne,2):b(Fe,1)}function v(t){var e=ht.charCodeAt(Et+1),r=1;return e===t?(r=62===t&&62===ht.charCodeAt(Et+2)?3:2,61===ht.charCodeAt(Et+r)?b(Ne,r+1):b(Ie,r)):33==e&&60==t&&45==ht.charCodeAt(Et+2)&&45==ht.charCodeAt(Et+3)?(Et+=4,p(),c(),R()):(61===e&&(r=61===ht.charCodeAt(Et+2)?3:2),b(je,r))}function E(t){return 61===ht.charCodeAt(Et+1)?b(ke,61===ht.charCodeAt(Et+2)?3:2):b(61===t?Pe:me,1)}function g(t){switch(t){case 46:return u();case 40:return++Et,a(de);case 41:return++Et,a(ve);case 59:return++Et,a(ge);case 44:return++Et,a(Ee);case 91:return++Et,a(le);case 93:return++Et,a(he);case 123:return++Et,a(fe);case 125:return++Et,a(ye);case 58:return++Et,a(Re);case 63:return++Et,a(Oe);case 48:var e=ht.charCodeAt(Et+1);if(120===e||88===e)return P();case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return N(!1);case 34:case 39:return S(t);case 47:return l(t);case 37:case 42:return h();case 124:case 38:return f(t);case 94:return y();case 43:case 45:return d(t);case 60:case 62:return v(t);case 61:case 33:return E(t);case 126:return b(me,1)}return!1}function R(t){if(t?Et=gt+1:gt=Et,lt.locations&&(bt=new o),t)return O();if(Et>=ft)return a(Lt);var e=ht.charCodeAt(Et);if($e(e)||92===e)return T();var n=g(e);if(!1===n){var i=String.fromCharCode(e);if("\\"===i||We.test(i))return T();r(Et,"Unexpected character '"+i+"'")}return n}function b(t,e){var r=ht.slice(Et,Et+e);Et+=e,a(t,r)}function O(){for(var t,e,n="",o=Et;;){Et>=ft&&r(o,"Unterminated regular expression");var i=ht.charAt(Et);if(ze.test(i)&&r(o,"Unterminated regular expression"),t)t=!1;else{if("["===i)e=!0;else if("]"===i&&e)e=!1;else if("/"===i&&!e)break;t="\\"===i}++Et}var n=ht.slice(o,Et);++Et;var s=w();return s&&!/^[gmsiy]*$/.test(s)&&r(o,"Invalid regexp flag"),a(Ft,new RegExp(n,s))}function _(t,e){for(var r=Et,n=0,o=0,i=null==e?1/0:e;o<i;++o){var a,s=ht.charCodeAt(Et);if((a=s>=97?s-97+10:s>=65?s-65+10:s>=48&&s<=57?s-48:1/0)>=t)break;++Et,n=n*t+a}return Et===r||null!=e&&Et-r!==e?null:n}function P(){Et+=2;var t=_(16);return null==t&&r(gt+2,"Expected hexadecimal number"),$e(ht.charCodeAt(Et))&&r(Et,"Identifier directly after number"),a(It,t)}function N(t){var e=Et,n=!1,o=48===ht.charCodeAt(Et);t||null!==_(10)||r(e,"Invalid number"),46===ht.charCodeAt(Et)&&(++Et,_(10),n=!0);var i=ht.charCodeAt(Et);69!==i&&101!==i||(i=ht.charCodeAt(++Et),43!==i&&45!==i||++Et,null===_(10)&&r(e,"Invalid number"),n=!0),$e(ht.charCodeAt(Et))&&r(Et,"Identifier directly after number");var s,p=ht.slice(e,Et);return n?s=parseFloat(p):o&&1!==p.length?/[89]/.test(p)||kt?r(e,"Invalid number"):s=parseInt(p,8):s=parseInt(p,10),a(It,s)}function S(t){Et++;for(var e="";;){Et>=ft&&r(gt,"Unterminated string constant");var n=ht.charCodeAt(Et);if(n===t)return++Et,a(Ut,e);if(92===n){n=ht.charCodeAt(++Et);var o=/^[0-7]+/.exec(ht.slice(Et,Et+3));for(o&&(o=o[0]);o&&parseInt(o,8)>255;)o=o.slice(0,-1);if("0"===o&&(o=null),++Et,o)kt&&r(Et-2,"Octal literal in strict mode"),e+=String.fromCharCode(parseInt(o,8)),Et+=o.length-1;else switch(n){case 110:e+="\n";break;case 114:e+="\r";break;case 120:e+=String.fromCharCode(m(2));break;case 117:e+=String.fromCharCode(m(4));break;case 85:e+=String.fromCharCode(m(8));break;case 116:e+="\t";break;case 98:e+="\b";break;case 118:e+="\v";break;case 102:e+="\f";break;case 48:e+="\0";break;case 13:10===ht.charCodeAt(Et)&&++Et;case 10:lt.locations&&(mt=Et,++St);break;default:e+=String.fromCharCode(n)}}else 13!==n&&10!==n&&8232!==n&&8233!==n||r(gt,"Unterminated string constant"),e+=String.fromCharCode(n),++Et}}function m(t){var e=_(16,t);return null===e&&r(gt,"Bad character escape sequence"),e}function w(){Le=!1;for(var t,e=!0,n=Et;;){var o=ht.charCodeAt(Et);if(Ze(o))Le&&(t+=ht.charAt(Et)),++Et;else{if(92!==o)break;Le||(t=ht.slice(n,Et)),Le=!0,117!=ht.charCodeAt(++Et)&&r(Et,"Expecting Unicode escape sequence \\uXXXX"),++Et;var i=m(4),a=String.fromCharCode(i);a||r(Et-1,"Invalid Unicode escape"),(e?$e(i):Ze(i))||r(Et-4,"Invalid Unicode escape"),t+=a}e=!1}return Le?t:ht.slice(n,Et)}function T(){var t=w(),e=Mt;return Le||(Ve(t)?e=ue[t]:(lt.forbidReserved&&(3===lt.ecmaVersion?De:Be)(t)||kt&&Ye(t))&&r(gt,"The keyword '"+t+"' is reserved")),a(e,t)}function C(){wt=gt,Tt=Rt,Ct=Ot,R()}function A(t){if(kt=t,Et=Tt,lt.locations)for(;Et<mt;)mt=ht.lastIndexOf("\n",mt-2)+1,--St;c(),R()}function x(){this.type=null,this.start=gt,this.end=null}function k(){this.start=bt,this.end=null,null!==yt&&(this.source=yt)}function j(){var t=new x;return lt.locations&&(t.loc=new k),lt.directSourceFile&&(t.sourceFile=lt.directSourceFile),lt.ranges&&(t.range=[gt,0]),t}function I(t){var e=new x;return e.start=t.start,lt.locations&&(e.loc=new k,e.loc.start=t.loc.start),lt.ranges&&(e.range=[t.range[0],0]),e}function F(t,e){return t.type=e,t.end=Tt,lt.locations&&(t.loc.end=Ct),lt.ranges&&(t.range[1]=Tt),t}function U(t){return lt.ecmaVersion>=5&&"ExpressionStatement"===t.type&&"Literal"===t.expression.type&&"use strict"===t.expression.value}function M(t){if(_t===t)return C(),!0}function L(){return!lt.strictSemicolons&&(_t===Lt||_t===ye||ze.test(ht.slice(Tt,gt)))}function D(){M(ge)||L()||Y()}function B(t){_t===t?C():Y()}function Y(){r(gt,"Unexpected token")}function G(t){"Identifier"!==t.type&&"MemberExpression"!==t.type&&r(t.start,"Assigning to rvalue"),kt&&"Identifier"===t.type&&Ge(t.name)&&r(t.start,"Assigning to "+t.name+" in strict mode")}function V(t){wt=Tt=Et,lt.locations&&(Ct=new o),At=kt=null,xt=[],R();var e=t||j(),r=!0;for(t||(e.body=[]);_t!==Lt;){var n=J();e.body.push(n),r&&U(n)&&A(!0),r=!1}return F(e,"Program")}function J(){(_t===_e||_t===Ne&&"/="==Pt)&&R(!0);var t=_t,e=j();switch(t){case Dt:case Gt:C();var n=t===Dt;M(ge)||L()?e.label=null:_t!==Mt?Y():(e.label=ut(),D());for(var o=0;o<xt.length;++o){var i=xt[o];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(n||"loop"===i.kind))break;if(e.label&&n)break}}return o===xt.length&&r(e.start,"Unsyntactic "+t.keyword),F(e,n?"BreakStatement":"ContinueStatement");case Vt:return C(),D(),F(e,"DebuggerStatement");case Xt:return C(),xt.push(Qe),e.body=J(),xt.pop(),B(re),e.test=X(),D(),F(e,"DoWhileStatement");case zt:if(C(),xt.push(Qe),B(de),_t===ge)return q(e,null);if(_t===ee){var a=j();return C(),H(a,!0),F(a,"VariableDeclaration"),1===a.declarations.length&&M(ce)?z(e,a):q(e,a)}var a=$(!1,!0);return M(ce)?(G(a),z(e,a)):q(e,a);case Ht:return C(),pt(e,!0);case $t:return C(),e.test=X(),e.consequent=J(),e.alternate=M(Wt)?J():null,F(e,"IfStatement");case Zt:return At||r(gt,"'return' outside of function"),C(),M(ge)||L()?e.argument=null:(e.argument=$(),D()),F(e,"ReturnStatement");case Qt:C(),e.discriminant=X(),e.cases=[],B(fe),xt.push(Ke);for(var s,p;_t!=ye;)if(_t===Bt||_t===Jt){var c=_t===Bt;s&&F(s,"SwitchCase"),e.cases.push(s=j()),s.consequent=[],C(),c?s.test=$():(p&&r(wt,"Multiple default clauses"),p=!0,s.test=null),B(Re)}else s||Y(),s.consequent.push(J());return s&&F(s,"SwitchCase"),C(),xt.pop(),F(e,"SwitchStatement");case Kt:return C(),ze.test(ht.slice(Tt,gt))&&r(Tt,"Illegal newline after throw"),e.argument=$(),D(),F(e,"ThrowStatement");case te:if(C(),e.block=W(),e.handler=null,_t===Yt){var u=j();C(),B(de),u.param=ut(),kt&&Ge(u.param.name)&&r(u.param.start,"Binding "+u.param.name+" in strict mode"),B(ve),u.guard=null,u.body=W(),e.handler=F(u,"CatchClause")}return e.guardedHandlers=jt,e.finalizer=M(qt)?W():null,e.handler||e.finalizer||r(e.start,"Missing catch or finally clause"),F(e,"TryStatement");case ee:return C(),H(e),D(),F(e,"VariableDeclaration");case re:return C(),e.test=X(),xt.push(Qe),e.body=J(),xt.pop(),F(e,"WhileStatement");case ne:return kt&&r(gt,"'with' in strict mode"),C(),e.object=X(),e.body=J(),F(e,"WithStatement");case fe:return W();case ge:return C(),F(e,"EmptyStatement");default:var l=Pt,h=$();if(t===Mt&&"Identifier"===h.type&&M(Re)){for(var o=0;o<xt.length;++o)xt[o].name===l&&r(h.start,"Label '"+l+"' is already declared");var f=_t.isLoop?"loop":_t===Qt?"switch":null;return xt.push({name:l,kind:f}),e.body=J(),xt.pop(),e.label=h,F(e,"LabeledStatement")}return e.expression=h,D(),F(e,"ExpressionStatement")}}function X(){B(de);var t=$();return B(ve),t}function W(t){var e,r=j(),n=!0,o=!1;for(r.body=[],B(fe);!M(ye);){var i=J();r.body.push(i),n&&t&&U(i)&&(e=o,A(o=!0)),n=!1}return o&&!e&&A(!1),F(r,"BlockStatement")}function q(t,e){return t.init=e,B(ge),t.test=_t===ge?null:$(),B(ge),t.update=_t===ve?null:$(),B(ve),t.body=J(),xt.pop(),F(t,"ForStatement")}function z(t,e){return t.left=e,t.right=$(),B(ve),t.body=J(),xt.pop(),F(t,"ForInStatement")}function H(t,e){for(t.declarations=[],t.kind="var";;){var n=j();if(n.id=ut(),kt&&Ge(n.id.name)&&r(n.id.start,"Binding "+n.id.name+" in strict mode"),n.init=M(Pe)?$(!0,e):null,t.declarations.push(F(n,"VariableDeclarator")),!M(Ee))break}return t}function $(t,e){var r=Z(e);if(!t&&_t===Ee){var n=I(r);for(n.expressions=[r];M(Ee);)n.expressions.push(Z(e));return F(n,"SequenceExpression")}return r}function Z(t){var e=Q(t);if(_t.isAssign){var r=I(e);return r.operator=Pt,r.left=e,C(),r.right=Z(t),G(e),F(r,"AssignmentExpression")}return e}function Q(t){var e=K(t);if(M(Oe)){var r=I(e);return r.test=e,r.consequent=$(!0),B(Re),r.alternate=$(!0,t),F(r,"ConditionalExpression")}return e}function K(t){return tt(et(),-1,t)}function tt(t,e,r){var n=_t.binop;if(null!=n&&(!r||_t!==ce)&&n>e){var o=I(t);o.left=t,o.operator=Pt;var i=_t;C(),o.right=tt(et(),n,r);return tt(F(o,i===we||i===Te?"LogicalExpression":"BinaryExpression"),e,r)}return t}function et(){if(_t.prefix){var t=j(),e=_t.isUpdate;return t.operator=Pt,t.prefix=!0,Nt=!0,C(),t.argument=et(),e?G(t.argument):kt&&"delete"===t.operator&&"Identifier"===t.argument.type&&r(t.start,"Deleting local variable in strict mode"),F(t,e?"UpdateExpression":"UnaryExpression")}for(var n=rt();_t.postfix&&!L();){var t=I(n);t.operator=Pt,t.prefix=!1,t.argument=n,G(n),C(),n=F(t,"UpdateExpression")}return n}function rt(){return nt(ot())}function nt(t,e){if(M(be)){var r=I(t);return r.object=t,r.property=ut(!0),r.computed=!1,nt(F(r,"MemberExpression"),e)}if(M(le)){var r=I(t);return r.object=t,r.property=$(),r.computed=!0,B(he),nt(F(r,"MemberExpression"),e)}if(!e&&M(de)){var r=I(t);return r.callee=t,r.arguments=ct(ve,!1),nt(F(r,"CallExpression"),e)}return t}function ot(){switch(_t){case ie:var t=j();return C(),F(t,"ThisExpression");case Mt:return ut();case It:case Ut:case Ft:var t=j();return t.value=Pt,t.raw=ht.slice(gt,Rt),C(),F(t,"Literal");case ae:case se:case pe:var t=j();return t.value=_t.atomValue,t.raw=_t.keyword,C(),F(t,"Literal");case de:var e=bt,r=gt;C();var n=$();return n.start=r,n.end=Rt,lt.locations&&(n.loc.start=e,n.loc.end=Ot),lt.ranges&&(n.range=[r,Rt]),B(ve),n;case le:var t=j();return C(),t.elements=ct(he,!0,!0),F(t,"ArrayExpression");case fe:return at();case Ht:var t=j();return C(),pt(t,!1);case oe:return it();default:Y()}}function it(){var t=j();return C(),t.callee=nt(ot(),!0),M(de)?t.arguments=ct(ve,!1):t.arguments=jt,F(t,"NewExpression")}function at(){var t=j(),e=!0,n=!1;for(t.properties=[],C();!M(ye);){if(e)e=!1;else if(B(Ee),lt.allowTrailingCommas&&M(ye))break;var o,i={key:st()},a=!1;if(M(Re)?(i.value=$(!0),o=i.kind="init"):lt.ecmaVersion>=5&&"Identifier"===i.key.type&&("get"===i.key.name||"set"===i.key.name)?(a=n=!0,o=i.kind=i.key.name,i.key=st(),_t!==de&&Y(),i.value=pt(j(),!1)):Y(),"Identifier"===i.key.type&&(kt||n))for(var s=0;s<t.properties.length;++s){var p=t.properties[s];if(p.key.name===i.key.name){var c=o==p.kind||a&&"init"===p.kind||"init"===o&&("get"===p.kind||"set"===p.kind);c&&!kt&&"init"===o&&"init"===p.kind&&(c=!1),c&&r(i.key.start,"Redefinition of property")}}t.properties.push(i)}return F(t,"ObjectExpression")}function st(){return _t===It||_t===Ut?ot():ut(!0)}function pt(t,e){_t===Mt?t.id=ut():e?Y():t.id=null,t.params=[];var n=!0;for(B(de);!M(ve);)n?n=!1:B(Ee),t.params.push(ut());var o=At,i=xt;if(At=!0,xt=[],t.body=W(!0),At=o,xt=i,kt||t.body.body.length&&U(t.body.body[0]))for(var a=t.id?-1:0;a<t.params.length;++a){var s=a<0?t.id:t.params[a];if((Ye(s.name)||Ge(s.name))&&r(s.start,"Defining '"+s.name+"' in strict mode"),a>=0)for(var p=0;p<a;++p)s.name===t.params[p].name&&r(s.start,"Argument name clash in strict mode")}return F(t,e?"FunctionDeclaration":"FunctionExpression")}function ct(t,e,r){for(var n=[],o=!0;!M(t);){if(o)o=!1;else if(B(Ee),e&<.allowTrailingCommas&&M(t))break;r&&_t===Ee?n.push(null):n.push($(!0))}return n}function ut(t){var e=j();return e.name=_t===Mt?Pt:t&&!lt.forbidReserved&&_t.keyword||Y(),Nt=!1,C(),F(e,"Identifier")}t.version="0.4.1";var lt,ht,ft,yt;t.parse=function(t,r){return ht=String(t),ft=ht.length,e(r),i(),V(lt.program)};var dt=t.defaultOptions={ecmaVersion:5,strictSemicolons:!1,allowTrailingCommas:!0,forbidReserved:!1,locations:!1,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null},vt=t.getLineInfo=function(t,e){for(var r=1,n=0;;){He.lastIndex=n;var o=He.exec(t);if(!(o&&o.index<e))break;++r,n=o.index+o[0].length}return{line:r,column:e-n}};t.tokenize=function(t,r){function n(t){return R(t),o.start=gt,o.end=Rt,o.startLoc=bt,o.endLoc=Ot,o.type=_t,o.value=Pt,o}ht=String(t),ft=ht.length,e(r),i();var o={};return n.jumpTo=function(t,e){if(Et=t,lt.locations){St=1,mt=He.lastIndex=0;for(var r;(r=He.exec(ht))&&r.index<t;)++St,mt=r.index+r[0].length}Nt=e,c()},n};var Et,gt,Rt,bt,Ot,_t,Pt,Nt,St,mt,wt,Tt,Ct,At,xt,kt,jt=[],It={type:"num"},Ft={type:"regexp"},Ut={type:"string"},Mt={type:"name"},Lt={type:"eof"},Dt={keyword:"break"},Bt={keyword:"case",beforeExpr:!0},Yt={keyword:"catch"},Gt={keyword:"continue"},Vt={keyword:"debugger"},Jt={keyword:"default"},Xt={keyword:"do",isLoop:!0},Wt={keyword:"else",beforeExpr:!0},qt={keyword:"finally"},zt={keyword:"for",isLoop:!0},Ht={keyword:"function"},$t={keyword:"if"},Zt={keyword:"return",beforeExpr:!0},Qt={keyword:"switch"},Kt={keyword:"throw",beforeExpr:!0},te={keyword:"try"},ee={keyword:"var"},re={keyword:"while",isLoop:!0},ne={keyword:"with"},oe={keyword:"new",beforeExpr:!0},ie={keyword:"this"},ae={keyword:"null",atomValue:null},se={keyword:"true",atomValue:!0},pe={keyword:"false",atomValue:!1},ce={keyword:"in",binop:7,beforeExpr:!0},ue={break:Dt,case:Bt,catch:Yt,continue:Gt,debugger:Vt,default:Jt,do:Xt,else:Wt,finally:qt,for:zt,function:Ht,if:$t,return:Zt,switch:Qt,throw:Kt,try:te,var:ee,while:re,with:ne,null:ae,true:se,false:pe,new:oe,in:ce,instanceof:{keyword:"instanceof",binop:7,beforeExpr:!0},this:ie,typeof:{keyword:"typeof",prefix:!0,beforeExpr:!0},void:{keyword:"void",prefix:!0,beforeExpr:!0},delete:{keyword:"delete",prefix:!0,beforeExpr:!0}},le={type:"[",beforeExpr:!0},he={type:"]"},fe={type:"{",beforeExpr:!0},ye={type:"}"},de={type:"(",beforeExpr:!0},ve={type:")"},Ee={type:",",beforeExpr:!0},ge={type:";",beforeExpr:!0},Re={type:":",beforeExpr:!0},be={type:"."},Oe={type:"?",beforeExpr:!0},_e={binop:10,beforeExpr:!0},Pe={isAssign:!0,beforeExpr:!0},Ne={isAssign:!0,beforeExpr:!0},Se={postfix:!0,prefix:!0,isUpdate:!0},me={prefix:!0,beforeExpr:!0},we={binop:1,beforeExpr:!0},Te={binop:2,beforeExpr:!0},Ce={binop:3,beforeExpr:!0},Ae={binop:4,beforeExpr:!0},xe={binop:5,beforeExpr:!0},ke={binop:6,beforeExpr:!0},je={binop:7,beforeExpr:!0},Ie={binop:8,beforeExpr:!0},Fe={binop:9,prefix:!0,beforeExpr:!0},Ue={binop:10,beforeExpr:!0};t.tokTypes={bracketL:le,bracketR:he,braceL:fe,braceR:ye,parenL:de,parenR:ve,comma:Ee,semi:ge,colon:Re,dot:be,question:Oe,slash:_e,eq:Pe,name:Mt,eof:Lt,num:It,regexp:Ft,string:Ut};for(var Me in ue)t.tokTypes["_"+Me]=ue[Me];var Le,De=n("abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile"),Be=n("class enum extends super const export import"),Ye=n("implements interface let package private protected public static yield"),Ge=n("eval arguments"),Ve=n("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"),Je=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,Xe="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",We=new RegExp("["+Xe+"]"),qe=new RegExp("["+Xe+"̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-ۨۻ-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-ࠧࠩ-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-ୠ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍-﹏0-9_]"),ze=/[\n\r\u2028\u2029]/,He=/\r\n|[\n\r\u2028\u2029]/g,$e=t.isIdentifierStart=function(t){return t<65?36===t:t<91||(t<97?95===t:t<123||t>=170&&We.test(String.fromCharCode(t)))},Ze=t.isIdentifierChar=function(t){return t<48?36===t:t<58||!(t<65)&&(t<91||(t<97?95===t:t<123||t>=170&&qe.test(String.fromCharCode(t))))},Qe={kind:"loop"},Ke={kind:"switch"}})}).call(e,r(3)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){(function(n){var o,i;o=[r,e],void 0!==(i=function(t,e){"use strict";var r=function(){function t(e,r){"string"==typeof e&&(e=t.acorn.parse(e,t.PARSE_OPTIONS)),this.ast=e,this.initFunc_=r,this.paused_=!1,this.polyfills_=[],this.functionCounter_=0,this.stepFunctions_=Object.create(null);for(var n,o=/^step([A-Z]\w*)$/,i=Object.getOwnPropertyNames(t.prototype),a=0;a<i.length;a++){var s=i[a];"function"==typeof t.prototype[s]&&(n=s.match(o))&&(this.stepFunctions_[n[1]]=t.prototype[s].bind(this))}this.global=this.createScope(this.ast,null),this.ast=t.acorn.parse(this.polyfills_.join("\n"),t.PARSE_OPTIONS),this.polyfills_=void 0,this.stripLocations_(this.ast,void 0,void 0);var p=new t.MyState(this.ast,this.global);p.done=!1,this.stateStack=[p],this.run(),this.value=void 0,this.ast=e;var p=new t.MyState(this.ast,this.global);p.done=!1,this.stateStack.length=0,this.stateStack[0]=p,this.nodeConstructor=p.node.constructor,this.stateStack=this.stateStack,this.OBJECT=this.OBJECT,this.OBJECT_PROTO=this.OBJECT_PROTO,this.FUNCTION=this.FUNCTION,this.FUNCTION_PROTO=this.FUNCTION_PROTO,this.ARRAY=this.ARRAY,this.ARRAY_PROTO=this.ARRAY_PROTO,this.REGEXP=this.REGEXP,this.REGEXP_PROTO=this.REGEXP_PROTO,this.UNDEFINED=void 0,this.NULL=null,this.NAN=NaN,this.TRUE=!0,this.FALSE=!1,this.STRING_EMPTY="",this.NUMBER_ZERO=0,this.NUMBER_ONE=1}return t.prototype.appendCode=function(e){var r=this.stateStack[0];if(!r||"Program"!==r.node.type)throw Error("Expecting original AST to start with a Program node.");if("string"==typeof e&&(e=t.acorn.parse(e,t.PARSE_OPTIONS)),!e||"Program"!==e.type)throw Error("Expecting new AST to start with a Program node.");this.populateScope_(e,r.scope);for(var n,o=0;n=e.body[o];o++)r.node.body.push(n);r.done=!1},t.prototype.step=function(){var e=this.stateStack,r=e[e.length-1];if(!r)return!1;var n=r.node,o=n.type;if("Program"===o&&r.done)return!1;if(this.paused_)return!0;try{var i=this.stepFunctions_[o](e,r,n)}catch(e){if(e!==t.STEP_ERROR)throw e}return i&&e.push(i),!!n.end||this.step()},t.prototype.run=function(){for(;!this.paused_&&this.step(););return this.paused_},t.prototype.initGlobalScope=function(e){this.setProperty(e,"NaN",NaN,t.READONLY_DESCRIPTOR),this.setProperty(e,"Infinity",1/0,t.READONLY_DESCRIPTOR),this.setProperty(e,"undefined",void 0,t.READONLY_DESCRIPTOR),this.setProperty(e,"window",e,t.READONLY_DESCRIPTOR),this.setProperty(e,"this",e,t.READONLY_DESCRIPTOR),this.setProperty(e,"self",e),this.OBJECT_PROTO=new t.MyObject(null),this.FUNCTION_PROTO=new t.MyObject(this.OBJECT_PROTO),this.initFunction(e),this.initObject(e),e.proto=this.OBJECT_PROTO,this.setProperty(e,"constructor",this.OBJECT),this.initArray(e),this.initString(e),this.initBoolean(e),this.initNumber(e),this.initDate(e),this.initRegExp(e),this.initError(e),this.initMath(e),this.initJSON(e);var r=this,n=this.createNativeFunction(function(t){throw EvalError("Can't happen")},!1);n.eval=!0,this.setProperty(e,"eval",n),this.setProperty(e,"parseInt",this.createNativeFunction(parseInt,!1)),this.setProperty(e,"parseFloat",this.createNativeFunction(parseFloat,!1)),this.setProperty(e,"isNaN",this.createNativeFunction(isNaN,!1)),this.setProperty(e,"isFinite",this.createNativeFunction(isFinite,!1));for(var o=[[escape,"escape"],[unescape,"unescape"],[decodeURI,"decodeURI"],[decodeURIComponent,"decodeURIComponent"],[encodeURI,"encodeURI"],[encodeURIComponent,"encodeURIComponent"]],i=0;i<o.length;i++){var a=function(t){return function(e){try{return t(e)}catch(t){r.throwException(r.URI_ERROR,t.message)}}}(o[i][0]);this.setProperty(e,o[i][1],this.createNativeFunction(a,!1),t.NONENUMERABLE_DESCRIPTOR)}this.initFunc_&&this.initFunc_(this,e)},t.prototype.initFunction=function(e){var r,n=this,o=/^[A-Za-z_$][\w$]*$/;r=function(e){if(n.calledWithNew())var r=this;else var r=n.createObjectProto(n.FUNCTION_PROTO);if(arguments.length)var i=String(arguments[arguments.length-1]);else var i="";for(var a=[],s=0;s<arguments.length-1;s++){var p=String(arguments[s]);p.match(o)||n.throwException(n.SYNTAX_ERROR,"Invalid function argument: "+p),a.push(p)}a=a.join(", "),r.parentScope=n.global;try{var c=t.acorn.parse("$ = function("+a+") {"+i+"};",t.PARSE_OPTIONS)}catch(t){n.throwException(n.SYNTAX_ERROR,"Invalid code: "+t.message)}return 1!==c.body.length&&n.throwException(n.SYNTAX_ERROR,"Invalid code in function body."),r.node=c.body[0].expression.right,n.setProperty(r,"length",r.node.length,t.READONLY_DESCRIPTOR),r},r.id=this.functionCounter_++,this.FUNCTION=this.createObjectProto(this.FUNCTION_PROTO),this.setProperty(e,"Function",this.FUNCTION),this.setProperty(this.FUNCTION,"prototype",this.FUNCTION_PROTO),this.FUNCTION.nativeFunc=r,this.setProperty(this.FUNCTION_PROTO,"constructor",this.FUNCTION,t.NONENUMERABLE_DESCRIPTOR),this.FUNCTION_PROTO.nativeFunc=function(){},this.FUNCTION_PROTO.nativeFunc.id=this.functionCounter_++,this.setProperty(this.FUNCTION_PROTO,"length",0,t.READONLY_DESCRIPTOR);var i=function(t){if(!(t&&t.isObject||n.getScope().strict))if(void 0===t||null===t)t=n.global;else{var e=n.createObjectProto(n.getPrototype(t));e.data=t,t=e}return t};r=function(t,e){var r=n.stateStack[n.stateStack.length-1];r.func_=this,r.funcThis_=i(t),r.arguments_=[],null!==e&&void 0!==e&&(e.isObject?r.arguments_=n.pseudoToNative(e):n.throwException(n.TYPE_ERROR,"CreateListFromArrayLike called on non-object")),r.doneExec_=!1},this.setNativeFunctionPrototype(this.FUNCTION,"apply",r),r=function(t,e){var r=n.stateStack[n.stateStack.length-1];r.func_=this,r.funcThis_=i(t),r.arguments_=[];for(var o=1;o<arguments.length;o++)r.arguments_.push(arguments[o]);r.doneExec_=!1},this.setNativeFunctionPrototype(this.FUNCTION,"call",r),this.polyfills_.push("Object.defineProperty(Function.prototype, 'bind',","{configurable: true, writable: true, value:","function(oThis) {","if (typeof this !== 'function') {","throw TypeError('What is trying to be bound is not callable');","}","var aArgs = Array.prototype.slice.call(arguments, 1),","fToBind = this,","fNOP = function() {},","fBound = function() {","return fToBind.apply(this instanceof fNOP","? this",": oThis,","aArgs.concat(Array.prototype.slice.call(arguments)));","};","if (this.prototype) {","fNOP.prototype = this.prototype;","}","fBound.prototype = new fNOP();","return fBound;","}","});",""),r=function(){return this.toString()},this.setNativeFunctionPrototype(this.FUNCTION,"toString",r),this.setProperty(this.FUNCTION,"toString",this.createNativeFunction(r,!1),t.NONENUMERABLE_DESCRIPTOR),r=function(){return this.valueOf()},this.setNativeFunctionPrototype(this.FUNCTION,"valueOf",r),this.setProperty(this.FUNCTION,"valueOf",this.createNativeFunction(r,!1),t.NONENUMERABLE_DESCRIPTOR)},t.prototype.initObject=function(e){var r,n=this;r=function(t){if(void 0===t||null===t)return n.calledWithNew()?this:n.createObjectProto(n.OBJECT_PROTO);if(!t.isObject){var e=n.createObjectProto(n.getPrototype(t));return e.data=t,e}return t},this.OBJECT=this.createNativeFunction(r,!0),this.setProperty(this.OBJECT,"prototype",this.OBJECT_PROTO),this.setProperty(this.OBJECT_PROTO,"constructor",this.OBJECT),this.setProperty(e,"Object",this.OBJECT);var o=function(t){void 0!==t&&null!==t||n.throwException(n.TYPE_ERROR,"Cannot convert '"+t+"' to object")};r=function(t){o(t);var e=t.isObject?t.properties:t;return n.nativeToPseudo(Object.getOwnPropertyNames(e))},this.setProperty(this.OBJECT,"getOwnPropertyNames",this.createNativeFunction(r,!1),t.NONENUMERABLE_DESCRIPTOR),r=function(t){return o(t),t.isObject?n.nativeToPseudo(Object.keys(t.properties)):n.nativeToPseudo(Object.keys(t))},this.setProperty(this.OBJECT,"keys",this.createNativeFunction(r,!1),t.NONENUMERABLE_DESCRIPTOR),r=function(t){return null===t?n.createObjectProto(null):(void 0!==t&&t.isObject||n.throwException(n.TYPE_ERROR,"Object prototype may only be an Object or null"),n.createObjectProto(t))},this.setProperty(this.OBJECT,"create",this.createNativeFunction(r,!1),t.NONENUMERABLE_DESCRIPTOR),this.polyfills_.push("(function() {","var create_ = Object.create;","Object.create = function(proto, props) {","var obj = create_(proto);","props && Object.defineProperties(obj, props);","return obj;","};","})();",""),r=function(t,e,r){return e=String(e),t&&t.isObject||n.throwException(n.TYPE_ERROR,"Object.defineProperty called on non-object"),r&&r.isObject||n.throwException(n.TYPE_ERROR,"Property description must be an object"),!t.properties[e]&&t.preventExtensions&&n.throwException(n.TYPE_ERROR,"Can't define property '"+e+"', object is not extensible"),n.setProperty(t,e,ReferenceError,r.properties),t},this.setProperty(this.OBJECT,"defineProperty",this.createNativeFunction(r,!1),t.NONENUMERABLE_DESCRIPTOR),this.polyfills_.push("(function() {","var defineProperty_ = Object.defineProperty;","Object.defineProperty = function(obj, prop, d1) {","var d2 = {};","if ('configurable' in d1) d2.configurable = d1.configurable;","if ('enumerable' in d1) d2.enumerable = d1.enumerable;","if ('writable' in d1) d2.writable = d1.writable;","if ('value' in d1) d2.value = d1.value;","if ('get' in d1) d2.get = d1.get;","if ('set' in d1) d2.set = d1.set;","return defineProperty_(obj, prop, d2);","};","})();","Object.defineProperty(Object, 'defineProperties',","{configurable: true, writable: true, value:","function(obj, props) {","var keys = Object.keys(props);","for (var i = 0; i < keys.length; i++) {","Object.defineProperty(obj, keys[i], props[keys[i]]);","}","return obj;","}","});",""),r=function(t,e){if(t&&t.isObject||n.throwException(n.TYPE_ERROR,"Object.getOwnPropertyDescriptor called on non-object"),(e=String(e))in t.properties){var r=Object.getOwnPropertyDescriptor(t.properties,e),o=t.getter[e],i=t.setter[e];(o||i)&&(r.get=o,r.set=i,delete r.value,delete r.writable);var a=n.nativeToPseudo(r);return"value"in r&&n.setProperty(a,"value",r.value),a}},this.setProperty(this.OBJECT,"getOwnPropertyDescriptor",this.createNativeFunction(r,!1),t.NONENUMERABLE_DESCRIPTOR),r=function(t){return o(t),n.getPrototype(t)},this.setProperty(this.OBJECT,"getPrototypeOf",this.createNativeFunction(r,!1),t.NONENUMERABLE_DESCRIPTOR),r=function(t){return Boolean(t)&&!t.preventExtensions},this.setProperty(this.OBJECT,"isExtensible",this.createNativeFunction(r,!1),t.NONENUMERABLE_DESCRIPTOR),r=function(t){return t&&t.isObject&&(t.preventExtensions=!0),t},this.setProperty(this.OBJECT,"preventExtensions",this.createNativeFunction(r,!1),t.NONENUMERABLE_DESCRIPTOR),this.setNativeFunctionPrototype(this.OBJECT,"toString",t.MyObject.prototype.toString),this.setNativeFunctionPrototype(this.OBJECT,"toLocaleString",t.MyObject.prototype.toString),this.setNativeFunctionPrototype(this.OBJECT,"valueOf",t.MyObject.prototype.valueOf),r=function(t){return o(this),this.isObject?String(t)in this.properties:this.hasOwnProperty(t)},this.setNativeFunctionPrototype(this.OBJECT,"hasOwnProperty",r),r=function(t){return o(this),Object.prototype.propertyIsEnumerable.call(this.properties,t)},this.setNativeFunctionPrototype(this.OBJECT,"propertyIsEnumerable",r),r=function(t){for(;;){if(!(t=n.getPrototype(t)))return!1;if(t===this)return!0}},this.setNativeFunctionPrototype(this.OBJECT,"isPrototypeOf",r)},t.prototype.initArray=function(e){var r,n=this;r=function(e){if(n.calledWithNew())var r=this;else var r=n.createObjectProto(n.ARRAY_PROTO);var o=arguments[0];if(1===arguments.length&&"number"==typeof o)isNaN(t.legalArrayLength(o))&&n.throwException(n.RANGE_ERROR,"Invalid array length"),r.properties.length=o;else{for(var i=0;i<arguments.length;i++)r.properties[i]=arguments[i];r.properties.length=i}return r},this.ARRAY=this.createNativeFunction(r,!0),this.ARRAY_PROTO=this.ARRAY.properties.prototype,this.setProperty(e,"Array",this.ARRAY),r=function(t){return t&&"Array"===t.class},this.setProperty(this.ARRAY,"isArray",this.createNativeFunction(r,!1),t.NONENUMERABLE_DESCRIPTOR),r=function(){return Array.prototype.pop.call(this.properties)},this.setNativeFunctionPrototype(this.ARRAY,"pop",r),r=function(t){return Array.prototype.push.apply(this.properties,arguments)},this.setNativeFunctionPrototype(this.ARRAY,"push",r),r=function(){return Array.prototype.shift.call(this.properties)},this.setNativeFunctionPrototype(this.ARRAY,"shift",r),r=function(t){return Array.prototype.unshift.apply(this.properties,arguments)},this.setNativeFunctionPrototype(this.ARRAY,"unshift",r),r=function(){return Array.prototype.reverse.call(this.properties),this},this.setNativeFunctionPrototype(this.ARRAY,"reverse",r),r=function(t,e){var r=Array.prototype.splice.apply(this.properties,arguments);return n.nativeToPseudo(r)},this.setNativeFunctionPrototype(this.ARRAY,"splice",r),r=function(t,e){var r=Array.prototype.slice.call(this.properties,t,e);return n.nativeToPseudo(r)},this.setNativeFunctionPrototype(this.ARRAY,"slice",r),r=function(t){return Array.prototype.join.call(this.properties,t)},this.setNativeFunctionPrototype(this.ARRAY,"join",r),r=function(t){for(var e=[],r=0,o=n.getProperty(this,"length"),i=0;i<o;i++){if(n.hasProperty(this,i)){var a=n.getProperty(this,i);e[r]=a}r++}for(var i=0;i<arguments.length;i++){var s=arguments[i];if(n.isa(s,n.ARRAY))for(var p=n.getProperty(s,"length"),c=0;c<p;c++)n.hasProperty(s,c)&&(e[r]=n.getProperty(s,c)),r++;else e[r]=s}return n.nativeToPseudo(e)},this.setNativeFunctionPrototype(this.ARRAY,"concat",r),r=function(t,e){return Array.prototype.indexOf.apply(this.properties,arguments)},this.setNativeFunctionPrototype(this.ARRAY,"indexOf",r),r=function(t,e){return Array.prototype.lastIndexOf.apply(this.properties,arguments)},this.setNativeFunctionPrototype(this.ARRAY,"lastIndexOf",r),r=function(){return Array.prototype.sort.call(this.properties),this},this.setNativeFunctionPrototype(this.ARRAY,"sort",r),this.polyfills_.push("Object.defineProperty(Array.prototype, 'every',","{configurable: true, writable: true, value:","function(callbackfn, thisArg) {","if (!this || typeof callbackfn !== 'function') throw TypeError();","var T, k;","var O = Object(this);","var len = O.length >>> 0;","if (arguments.length > 1) T = thisArg;","k = 0;","while (k < len) {","if (k in O && !callbackfn.call(T, O[k], k, O)) return false;","k++;","}","return true;","}","});","Object.defineProperty(Array.prototype, 'filter',","{configurable: true, writable: true, value:","function(fun/*, thisArg*/) {","if (this === void 0 || this === null || typeof fun !== 'function') throw TypeError();","var t = Object(this);","var len = t.length >>> 0;","var res = [];","var thisArg = arguments.length >= 2 ? arguments[1] : void 0;","for (var i = 0; i < len; i++) {","if (i in t) {","var val = t[i];","if (fun.call(thisArg, val, i, t)) res.push(val);","}","}","return res;","}","});","Object.defineProperty(Array.prototype, 'forEach',","{configurable: true, writable: true, value:","function(callback, thisArg) {","if (!this || typeof callback !== 'function') throw TypeError();","var T, k;","var O = Object(this);","var len = O.length >>> 0;","if (arguments.length > 1) T = thisArg;","k = 0;","while (k < len) {","if (k in O) callback.call(T, O[k], k, O);","k++;","}","}","});","Object.defineProperty(Array.prototype, 'map',","{configurable: true, writable: true, value:","function(callback, thisArg) {","if (!this || typeof callback !== 'function') new TypeError;","var T, A, k;","var O = Object(this);","var len = O.length >>> 0;","if (arguments.length > 1) T = thisArg;","A = new Array(len);","k = 0;","while (k < len) {","if (k in O) A[k] = callback.call(T, O[k], k, O);","k++;","}","return A;","}","});","Object.defineProperty(Array.prototype, 'reduce',","{configurable: true, writable: true, value:","function(callback /*, initialValue*/) {","if (!this || typeof callback !== 'function') throw TypeError();","var t = Object(this), len = t.length >>> 0, k = 0, value;","if (arguments.length === 2) {","value = arguments[1];","} else {","while (k < len && !(k in t)) k++;","if (k >= len) {","throw TypeError('Reduce of empty array with no initial value');","}","value = t[k++];","}","for (; k < len; k++) {","if (k in t) value = callback(value, t[k], k, t);","}","return value;","}","});","Object.defineProperty(Array.prototype, 'reduceRight',","{configurable: true, writable: true, value:","function(callback /*, initialValue*/) {","if (null === this || 'undefined' === typeof this || 'function' !== typeof callback) throw TypeError();","var t = Object(this), len = t.length >>> 0, k = len - 1, value;","if (arguments.length >= 2) {","value = arguments[1];","} else {","while (k >= 0 && !(k in t)) k--;","if (k < 0) {","throw TypeError('Reduce of empty array with no initial value');","}","value = t[k--];","}","for (; k >= 0; k--) {","if (k in t) value = callback(value, t[k], k, t);","}","return value;","}","});","Object.defineProperty(Array.prototype, 'some',","{configurable: true, writable: true, value:","function(fun/*, thisArg*/) {","if (!this || typeof fun !== 'function') throw TypeError();","var t = Object(this);","var len = t.length >>> 0;","var thisArg = arguments.length >= 2 ? arguments[1] : void 0;","for (var i = 0; i < len; i++) {","if (i in t && fun.call(thisArg, t[i], i, t)) {","return true;","}","}","return false;","}","});","(function() {","var sort_ = Array.prototype.sort;","Array.prototype.sort = function(opt_comp) {","if (typeof opt_comp !== 'function') {","return sort_.call(this);","}","for (var i = 0; i < this.length; i++) {","var changes = 0;","for (var j = 0; j < this.length - i - 1; j++) {","if (opt_comp(this[j], this[j + 1]) > 0) {","var swap = this[j];","this[j] = this[j + 1];","this[j + 1] = swap;","changes++;","}","}","if (!changes) break;","}","return this;","};","})();","Object.defineProperty(Array.prototype, 'toLocaleString',","{configurable: true, writable: true, value:","function() {","var out = [];","for (var i = 0; i < this.length; i++) {","out[i] = (this[i] === null || this[i] === undefined) ? '' : this[i].toLocaleString();","}","return out.join(',');","}","});","")},t.prototype.initString=function(e){var r,n=this;r=function(t){return t=String(t),n.calledWithNew()?(this.data=t,this):t},this.STRING=this.createNativeFunction(r,!0),this.setProperty(e,"String",this.STRING),this.setProperty(this.STRING,"fromCharCode",this.createNativeFunction(String.fromCharCode,!1),t.NONENUMERABLE_DESCRIPTOR);for(var o=["trim","toLowerCase","toUpperCase","toLocaleLowerCase","toLocaleUpperCase","charAt","charCodeAt","substring","slice","substr","indexOf","lastIndexOf","concat"],i=0;i<o.length;i++)this.setNativeFunctionPrototype(this.STRING,o[i],String.prototype[o[i]]);r=function(t,e,r){return e=e?n.pseudoToNative(e):void 0,r=r?n.pseudoToNative(r):void 0,String(this).localeCompare(t,e,r)},this.setNativeFunctionPrototype(this.STRING,"localeCompare",r),r=function(t,e){n.isa(t,n.REGEXP)&&(t=t.data);var r=String(this).split(t,e);return n.nativeToPseudo(r)},this.setNativeFunctionPrototype(this.STRING,"split",r),r=function(t){t=t?t.data:void 0;var e=String(this).match(t);return e?n.nativeToPseudo(e):null},this.setNativeFunctionPrototype(this.STRING,"match",r),r=function(t){return n.isa(t,n.REGEXP)&&(t=t.data),String(this).search(t)},this.setNativeFunctionPrototype(this.STRING,"search",r),r=function(t,e){return String(this).replace(t.data||t,e)},this.setNativeFunctionPrototype(this.STRING,"replace",r),this.polyfills_.push("(function() {","var replace_ = String.prototype.replace;","String.prototype.replace = function(substr, newSubstr) {","if (typeof newSubstr !== 'function') {","return replace_.call(this, substr, newSubstr);","}","var str = this;","if (substr instanceof RegExp) {","var subs = [];","var m = substr.exec(str);","while (m) {","m.push(m.index, str);","var inject = newSubstr.apply(null, m);","subs.push([m.index, m[0].length, inject]);","m = substr.global ? substr.exec(str) : null;","}","for (var i = subs.length - 1; i >= 0; i--) {","str = str.substring(0, subs[i][0]) + subs[i][2] + str.substring(subs[i][0] + subs[i][1]);","}","} else {","var i = str.indexOf(substr);","if (i !== -1) {","var inject = newSubstr(str.substr(i, substr.length), i, str);","str = str.substring(0, i) + inject + str.substring(i + substr.length);","}","}","return str;","};","})();","")},t.prototype.initBoolean=function(t){var e,r=this;e=function(t){return t=Boolean(t),r.calledWithNew()?(this.data=t,this):t},this.BOOLEAN=this.createNativeFunction(e,!0),this.setProperty(t,"Boolean",this.BOOLEAN)},t.prototype.initNumber=function(e){var r,n=this;r=function(t){return t=Number(t),n.calledWithNew()?(this.data=t,this):t},this.NUMBER=this.createNativeFunction(r,!0),this.setProperty(e,"Number",this.NUMBER);for(var o=["MAX_VALUE","MIN_VALUE","NaN","NEGATIVE_INFINITY","POSITIVE_INFINITY"],i=0;i<o.length;i++)this.setProperty(this.NUMBER,o[i],Number[o[i]],t.READONLY_NONENUMERABLE_DESCRIPTOR);r=function(t){try{return Number(this).toExponential(t)}catch(t){n.throwException(n.ERROR,t.message)}},this.setNativeFunctionPrototype(this.NUMBER,"toExponential",r),r=function(t){try{return Number(this).toFixed(t)}catch(t){n.throwException(n.ERROR,t.message)}},this.setNativeFunctionPrototype(this.NUMBER,"toFixed",r),r=function(t){try{return Number(this).toPrecision(t)}catch(t){n.throwException(n.ERROR,t.message)}},this.setNativeFunctionPrototype(this.NUMBER,"toPrecision",r),r=function(t){try{return Number(this).toString(t)}catch(t){n.throwException(n.ERROR,t.message)}},this.setNativeFunctionPrototype(this.NUMBER,"toString",r),r=function(t,e){return t=t?n.pseudoToNative(t):void 0,e=e?n.pseudoToNative(e):void 0,Number(this).toLocaleString(t,e)},this.setNativeFunctionPrototype(this.NUMBER,"toLocaleString",r)},t.prototype.initDate=function(e){var r,n=this;r=function(t,e){if(!n.calledWithNew())return Date();var r=[null].concat([].slice.call(arguments));return this.data=new(Function.prototype.bind.apply(Date,r)),this},this.DATE=this.createNativeFunction(r,!0),this.setProperty(e,"Date",this.DATE),this.setProperty(this.DATE,"now",this.createNativeFunction(Date.now,!1),t.NONENUMERABLE_DESCRIPTOR),this.setProperty(this.DATE,"parse",this.createNativeFunction(Date.parse,!1),t.NONENUMERABLE_DESCRIPTOR),this.setProperty(this.DATE,"UTC",this.createNativeFunction(Date.UTC,!1),t.NONENUMERABLE_DESCRIPTOR);for(var o=["getDate","getDay","getFullYear","getHours","getMilliseconds","getMinutes","getMonth","getSeconds","getTime","getTimezoneOffset","getUTCDate","getUTCDay","getUTCFullYear","getUTCHours","getUTCMilliseconds","getUTCMinutes","getUTCMonth","getUTCSeconds","getYear","setDate","setFullYear","setHours","setMilliseconds","setMinutes","setMonth","setSeconds","setTime","setUTCDate","setUTCFullYear","setUTCHours","setUTCMilliseconds","setUTCMinutes","setUTCMonth","setUTCSeconds","setYear","toDateString","toISOString","toJSON","toGMTString","toLocaleDateString","toLocaleString","toLocaleTimeString","toTimeString","toUTCString"],i=0;i<o.length;i++)r=function(t){return function(e){for(var r=[],o=0;o<arguments.length;o++)r[o]=n.pseudoToNative(arguments[o]);return this.data[t].apply(this.data,r)}}(o[i]),this.setNativeFunctionPrototype(this.DATE,o[i],r)},t.prototype.initRegExp=function(e){var r,n=this;r=function(t,e){if(n.calledWithNew())var r=this;else var r=n.createObjectProto(n.REGEXP_PROTO);return t=t?t.toString():"",e=e?e.toString():"",n.populateRegExp(r,new RegExp(t,e)),r},this.REGEXP=this.createNativeFunction(r,!0),this.REGEXP_PROTO=this.REGEXP.properties.prototype,this.setProperty(e,"RegExp",this.REGEXP),this.setProperty(this.REGEXP.properties.prototype,"global",void 0,t.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(this.REGEXP.properties.prototype,"ignoreCase",void 0,t.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(this.REGEXP.properties.prototype,"multiline",void 0,t.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(this.REGEXP.properties.prototype,"source","(?:)",t.READONLY_NONENUMERABLE_DESCRIPTOR),r=function(t){return this.data.test(t)},this.setNativeFunctionPrototype(this.REGEXP,"test",r),r=function(t){t=t.toString(),this.data.lastIndex=Number(n.getProperty(this,"lastIndex"));var e=this.data.exec(t);if(n.setProperty(this,"lastIndex",this.data.lastIndex),e){for(var r=n.createObjectProto(n.ARRAY_PROTO),o=0;o<e.length;o++)n.setProperty(r,o,e[o]);return n.setProperty(r,"index",e.index),n.setProperty(r,"input",e.input),r}return null},this.setNativeFunctionPrototype(this.REGEXP,"exec",r)},t.prototype.initError=function(e){var r=this;this.ERROR=this.createNativeFunction(function(e){if(r.calledWithNew())var n=this;else var n=r.createObject(r.ERROR);return e&&r.setProperty(n,"message",String(e),t.NONENUMERABLE_DESCRIPTOR),n},!0),this.setProperty(e,"Error",this.ERROR),this.setProperty(this.ERROR.properties.prototype,"message","",t.NONENUMERABLE_DESCRIPTOR),this.setProperty(this.ERROR.properties.prototype,"name","Error",t.NONENUMERABLE_DESCRIPTOR);var n=function(n){var o=r.createNativeFunction(function(e){if(r.calledWithNew())var n=this;else var n=r.createObject(o);return e&&r.setProperty(n,"message",String(e),t.NONENUMERABLE_DESCRIPTOR),n},!0);return r.setProperty(o,"prototype",r.createObject(r.ERROR)),r.setProperty(o.properties.prototype,"name",n,t.NONENUMERABLE_DESCRIPTOR),r.setProperty(e,n,o),o};this.EVAL_ERROR=n("EvalError"),this.RANGE_ERROR=n("RangeError"),this.REFERENCE_ERROR=n("ReferenceError"),this.SYNTAX_ERROR=n("SyntaxError"),this.TYPE_ERROR=n("TypeError"),this.URI_ERROR=n("URIError")},t.prototype.initMath=function(e){var r=this.createObjectProto(this.OBJECT_PROTO);this.setProperty(e,"Math",r);for(var n=["E","LN2","LN10","LOG2E","LOG10E","PI","SQRT1_2","SQRT2"],o=0;o<n.length;o++)this.setProperty(r,n[o],Math[n[o]],t.READONLY_NONENUMERABLE_DESCRIPTOR);for(var i=["abs","acos","asin","atan","atan2","ceil","cos","exp","floor","log","max","min","pow","random","round","sin","sqrt","tan"],o=0;o<i.length;o++)this.setProperty(r,i[o],this.createNativeFunction(Math[i[o]],!1),t.NONENUMERABLE_DESCRIPTOR)},t.prototype.initJSON=function(t){var e=this,r=e.createObjectProto(this.OBJECT_PROTO);this.setProperty(t,"JSON",r);var n=function(t){try{var r=JSON.parse(t.toString())}catch(t){e.throwException(e.SYNTAX_ERROR,t.message)}return e.nativeToPseudo(r)};this.setProperty(r,"parse",this.createNativeFunction(n,!1)),n=function(t){var r=e.pseudoToNative(t);try{var n=JSON.stringify(r)}catch(t){e.throwException(e.TYPE_ERROR,t.message)}return n},this.setProperty(r,"stringify",this.createNativeFunction(n,!1))},t.prototype.isa=function(t,e){if(null===t||void 0===t||!e)return!1;var r=e.properties.prototype;if(t===r)return!0;for(var n=this.getPrototype(t);n;){if(n===r)return!0;n=n.proto}return!1},t.legalArrayLength=function(t){var e=t>>>0;return e===Number(t)?e:NaN},t.legalArrayIndex=function(t){var e=t>>>0;return String(e)===String(t)&&4294967295!==e?e:NaN},t.prototype.createObject=function(t){return this.createObjectProto(t&&t.properties.prototype)},t.prototype.createObjectProto=function(e){var r=new t.MyObject(e);return this.isa(r,this.FUNCTION)&&(this.setProperty(r,"prototype",this.createObjectProto(this.OBJECT_PROTO||null)),r.class="Function"),this.isa(r,this.ARRAY)&&(this.setProperty(r,"length",0,{configurable:!1,enumerable:!1,writable:!0}),r.class="Array"),this.isa(r,this.ERROR)&&(r.class="Error"),r},t.prototype.populateRegExp=function(e,r){e.data=r,this.setProperty(e,"lastIndex",r.lastIndex,t.NONENUMERABLE_DESCRIPTOR),this.setProperty(e,"source",r.source,t.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(e,"global",r.global,t.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(e,"ignoreCase",r.ignoreCase,t.READONLY_NONENUMERABLE_DESCRIPTOR),this.setProperty(e,"multiline",r.multiline,t.READONLY_NONENUMERABLE_DESCRIPTOR)},t.prototype.createFunction=function(e,r){var n=this.createObjectProto(this.FUNCTION_PROTO);return n.parentScope=r,n.node=e,this.setProperty(n,"length",n.node.params.length,t.READONLY_DESCRIPTOR),n},t.prototype.createNativeFunction=function(e,r){var n=this.createObjectProto(this.FUNCTION_PROTO);return n.nativeFunc=e,e.id=this.functionCounter_++,this.setProperty(n,"length",e.length,t.READONLY_DESCRIPTOR),r?this.setProperty(n.properties.prototype,"constructor",n,t.NONENUMERABLE_DESCRIPTOR):!1===r&&(n.illegalConstructor=!0,this.setProperty(n,"prototype",void 0)),n},t.prototype.createAsyncFunction=function(e){var r=this.createObjectProto(this.FUNCTION_PROTO);return r.asyncFunc=e,e.id=this.functionCounter_++,this.setProperty(r,"length",e.length,t.READONLY_DESCRIPTOR),r},t.prototype.nativeToPseudo=function(t){if("boolean"==typeof t||"number"==typeof t||"string"==typeof t||null===t||void 0===t)return t;if(t instanceof RegExp){var e=this.createObjectProto(this.REGEXP_PROTO);return this.populateRegExp(e,t),e}if(t instanceof Function){var r=this,n=function(){return r.nativeToPseudo(t.apply(r,Array.prototype.slice.call(arguments).map(function(t){return r.pseudoToNative(t)})))};return this.createNativeFunction(n,void 0)}var o;if(Array.isArray(t)){o=this.createObjectProto(this.ARRAY_PROTO);for(var i=0;i<t.length;i++)i in t&&this.setProperty(o,i,this.nativeToPseudo(t[i]))}else{o=this.createObjectProto(this.OBJECT_PROTO);for(var a in t)this.setProperty(o,a,this.nativeToPseudo(t[a]))}return o},t.prototype.pseudoToNative=function(t,e){if("boolean"==typeof t||"number"==typeof t||"string"==typeof t||null===t||void 0===t)return t;if(this.isa(t,this.REGEXP))return t.data;var r=e||{pseudo:[],native:[]},n=r.pseudo.indexOf(t);if(-1!==n)return r.native[n];r.pseudo.push(t);var o;if(this.isa(t,this.ARRAY)){o=[],r.native.push(o);for(var i=this.getProperty(t,"length"),n=0;n<i;n++)this.hasProperty(t,n)&&(o[n]=this.pseudoToNative(this.getProperty(t,n),r))}else{o={},r.native.push(o);var a;for(var s in t.properties)a=t.properties[s],o[s]=this.pseudoToNative(a,r)}return r.pseudo.pop(),r.native.pop(),o},t.prototype.getPrototype=function(t){switch(typeof t){case"number":return this.NUMBER.properties.prototype;case"boolean":return this.BOOLEAN.properties.prototype;case"string":return this.STRING.properties.prototype}return t?t.proto:null},t.prototype.getProperty=function(e,r){if(r=String(r),void 0!==e&&null!==e||this.throwException(this.TYPE_ERROR,"Cannot read property '"+r+"' of "+e),"length"===r){if(this.isa(e,this.STRING))return String(e).length}else if(r.charCodeAt(0)<64&&this.isa(e,this.STRING)){var n=t.legalArrayIndex(r);if(!isNaN(n)&&n<String(e).length)return String(e)[n]}do{var o=e;if(o.properties&&r in o.properties){var i=o.getter[r];return i?(i.isGetter=!0,i):o.properties[r]}}while(e=this.getPrototype(e))},t.prototype.hasProperty=function(e,r){if(!e.isObject)throw TypeError("Primitive data type has no properties");if("length"===(r=String(r))&&this.isa(e,this.STRING))return!0;if(this.isa(e,this.STRING)){var n=t.legalArrayIndex(r);if(!isNaN(n)&&n<String(e).length)return!0}do{var o=e;if(o.properties&&r in o.properties)return!0}while(e=this.getPrototype(e));return!1},t.prototype.setProperty=function(e,r,n,o){r=String(r),void 0!==e&&null!==e||this.throwException(this.TYPE_ERROR,"Cannot set property '"+r+"' of "+e),o&&("get"in o||"set"in o)&&("value"in o||"writable"in o)&&this.throwException(this.TYPE_ERROR,"Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");var i=!this.stateStack||this.getScope().strict;if(!e.isObject)return void(i&&this.throwException(this.TYPE_ERROR,"Can't create property '"+r+"' on '"+e+"'"));if(this.isa(e,this.STRING)){var a=t.legalArrayIndex(r);if("length"===r||!isNaN(a)&&a<String(e).length)return void(i&&this.throwException(this.TYPE_ERROR,"Cannot assign to read only property '"+r+"' of String '"+e.data+"'"))}if("Array"===e.class){var s,p=e.properties.length;if("length"===r){if(n=t.legalArrayLength(n),isNaN(n)&&this.throwException(this.RANGE_ERROR,"Invalid array length"),n<p)for(s in e.properties)s=t.legalArrayIndex(s),!isNaN(s)&&n<=s&&delete e.properties[s]}else isNaN(s=t.legalArrayIndex(r))||(e.properties.length=Math.max(p,s+1))}if(e.preventExtensions&&!(r in e.properties))return void(i&&this.throwException(this.TYPE_ERROR,"Can't add property '"+r+"', object is not extensible"));if(o){"get"in o&&(o.get?e.getter[r]=o.get:delete e.getter[r]),"set"in o&&(o.set?e.setter[r]=o.set:delete e.setter[r]);var c={};"configurable"in o&&(c.configurable=o.configurable),"enumerable"in o&&(c.enumerable=o.enumerable),"writable"in o&&(c.writable=o.writable,delete e.getter[r],delete e.setter[r]),"value"in o?(c.value=o.value,delete e.getter[r],delete e.setter[r]):n!==ReferenceError&&(c.value=n,delete e.getter[r],delete e.setter[r]);try{Object.defineProperty(e.properties,r,c)}catch(t){this.throwException(this.TYPE_ERROR,"Cannot redefine property: "+r)}}else{if(n===ReferenceError)throw ReferenceError("Value not specified.");for(var u=e;!(r in u.properties);)if(!(u=this.getPrototype(u))){u=e;break}if(u.setter&&u.setter[r])return u.setter[r];if(u.getter&&u.getter[r])i&&this.throwException(this.TYPE_ERROR,"Cannot set property '"+r+"' of object '"+e+"' which only has a getter");else try{e.properties[r]=n}catch(t){i&&this.throwException(this.TYPE_ERROR,"Cannot assign to read only property '"+r+"' of object '"+e+"'")}}},t.prototype.setNativeFunctionPrototype=function(e,r,n){this.setProperty(e.properties.prototype,r,this.createNativeFunction(n,!1),t.NONENUMERABLE_DESCRIPTOR)},t.prototype.getScope=function(){var t=this.stateStack[this.stateStack.length-1].scope;if(!t)throw Error("No scope found.");return t},t.prototype.createScope=function(t,e){var r=this.createObjectProto(null);if(r.parentScope=e,e||this.initGlobalScope(r),this.populateScope_(t,r),r.strict=!1,e&&e.strict)r.strict=!0;else{var n=t.body&&t.body[0];n&&n.expression&&"Literal"===n.expression.type&&"use strict"===n.expression.value&&(r.strict=!0)}return r},t.prototype.createSpecialScope=function(t,e){if(!t)throw Error("parentScope required");var r=e||this.createObjectProto(null);return r.parentScope=t,r.strict=t.strict,r},t.prototype.getValueFromScope=function(t){for(var e=this.getScope();e&&e!==this.global;){if(t in e.properties)return e.properties[t];e=e.parentScope}if(e===this.global&&this.hasProperty(e,t))return this.getProperty(e,t);var r=this.stateStack[this.stateStack.length-1].node;"UnaryExpression"===r.type&&"typeof"===r.operator||this.throwException(this.REFERENCE_ERROR,t+" is not defined")},t.prototype.setValueToScope=function(t,e){for(var r=this.getScope(),n=r.strict;r&&r!==this.global;){if(t in r.properties)return void(r.properties[t]=e);r=r.parentScope}if(r===this.global&&(!n||this.hasProperty(r,t)))return this.setProperty(r,t,e);this.throwException(this.REFERENCE_ERROR,t+" is not defined")},t.prototype.populateScope_=function(e,r){if("VariableDeclaration"===e.type)for(var n=0;n<e.declarations.length;n++)this.setProperty(r,e.declarations[n].id.name,void 0,t.VARIABLE_DESCRIPTOR);else{if("FunctionDeclaration"===e.type)return void this.setProperty(r,e.id.name,this.createFunction(e,r),t.VARIABLE_DESCRIPTOR);if("FunctionExpression"===e.type)return;if("ExpressionStatement"===e.type)return}var o=e.constructor;for(var i in e){var a=e[i];if(a&&"object"==typeof a)if(Array.isArray(a))for(var n=0;n<a.length;n++)a[n]&&a[n].constructor===o&&this.populateScope_(a[n],r);else a.constructor===o&&this.populateScope_(a,r)}},t.prototype.stripLocations_=function(t,e,r){e?t.start=e:delete t.start,r?t.end=r:delete t.end;for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];o&&"object"==typeof o&&this.stripLocations_(o,e,r)}},t.prototype.calledWithNew=function(){return this.stateStack[this.stateStack.length-1].isConstructor},t.prototype.getValue=function(e){return e[0]===t.SCOPE_REFERENCE?this.getValueFromScope(e[1]):this.getProperty(e[0],e[1])},t.prototype.setValue=function(e,r){return e[0]===t.SCOPE_REFERENCE?this.setValueToScope(e[1],r):this.setProperty(e[0],e[1],r)},t.prototype.throwException=function(e,r){if(void 0===r)var n=e;else{var n=this.createObject(e);this.setProperty(n,"message",r,t.NONENUMERABLE_DESCRIPTOR)}throw this.executeException(n),t.STEP_ERROR},t.prototype.executeException=function(t){var e=this.stateStack.slice();do{this.stateStack.pop();var r=this.stateStack[this.stateStack.length-1];if("TryStatement"===r.node.type)return void(r.throwValue=t)}while(r&&"Program"!==r.node.type);var n;if(this.isa(t,this.ERROR)){var o={EvalError:EvalError,RangeError:RangeError,ReferenceError:ReferenceError,SyntaxError:SyntaxError,TypeError:TypeError,URIError:URIError},i=this.getProperty(t,"name").toString(),a=this.getProperty(t,"message").valueOf();n=(o[i]||Error)(a)}else n=String(t);throw this.stateStack=e,n},t.prototype.createGetter_=function(e,r){var n=Array.isArray(r)?r[0]:r,o=new this.nodeConstructor;o.type="CallExpression";var i=new t.MyState(o,this.stateStack[this.stateStack.length-1].scope);return i.doneCallee_=!0,i.funcThis_=n,i.func_=e,i.doneArgs_=!0,i.arguments_=[],i},t.prototype.createSetter_=function(e,r,n){var o=Array.isArray(r)?r[0]:this.global,i=new this.nodeConstructor;i.type="CallExpression";var a=new t.MyState(i,this.stateStack[this.stateStack.length-1].scope);return a.doneCallee_=!0,a.funcThis_=o,a.func_=e,a.doneArgs_=!0,a.arguments_=[n],a},t.prototype.stepArrayExpression=function(e,r,n){var o=n.elements,i=r.n_||0;for(r.array_?(this.setProperty(r.array_,i,r.value),i++):(r.array_=this.createObjectProto(this.ARRAY_PROTO),r.array_.properties.length=o.length);i<o.length;){if(o[i])return r.n_=i,new t.MyState(o[i],r.scope);i++}e.pop(),e[e.length-1].value=r.array_},t.prototype.stepAssignmentExpression=function(e,r,n){if(!r.doneLeft_){r.doneLeft_=!0;var o=new t.MyState(n.left,r.scope);return o.components=!0,o}if(!r.doneRight_){if(r.leftReference_||(r.leftReference_=r.value),r.doneGetter_&&(r.leftValue_=r.value),!r.doneGetter_&&"="!==n.operator){var i=this.getValue(r.leftReference_);if(r.leftValue_=i,i&&"object"==typeof i&&i.isGetter){i.isGetter=!1,r.doneGetter_=!0;var a=i;return this.createGetter_(a,r.leftReference_)}}return r.doneRight_=!0,new t.MyState(n.right,r.scope)}if(r.doneSetter_)return e.pop(),void(e[e.length-1].value=r.doneSetter_);var s=r.leftValue_,p=r.value;switch(n.operator){case"=":s=p;break;case"+=":s+=p;break;case"-=":s-=p;break;case"*=":s*=p;break;case"/=":s/=p;break;case"%=":s%=p;break;case"<<=":s<<=p;break;case">>=":s>>=p;break;case">>>=":s>>>=p;break;case"&=":s&=p;break;case"^=":s^=p;break;case"|=":s|=p;break;default:throw SyntaxError("Unknown assignment expression: "+n.operator)}var c=this.setValue(r.leftReference_,s);if(c)return r.doneSetter_=s,this.createSetter_(c,r.leftReference_,s);e.pop(),e[e.length-1].value=s},t.prototype.stepBinaryExpression=function(e,r,n){if(!r.doneLeft_)return r.doneLeft_=!0,new t.MyState(n.left,r.scope);if(!r.doneRight_)return r.doneRight_=!0,r.leftValue_=r.value,new t.MyState(n.right,r.scope);e.pop();var o,i=r.leftValue_,a=r.value;switch(n.operator){case"==":o=i==a;break;case"!=":o=i!=a;break;case"===":o=i===a;break;case"!==":o=i!==a;break;case">":o=i>a;break;case">=":o=i>=a;break;case"<":o=i<a;break;case"<=":o=i<=a;break;case"+":o=i+a;break;case"-":o=i-a;break;case"*":o=i*a;break;case"/":o=i/a;break;case"%":o=i%a;break;case"&":o=i&a;break;case"|":o=i|a;break;case"^":o=i^a;break;case"<<":o=i<<a;break;case">>":o=i>>a;break;case">>>":o=i>>>a;break;case"in":a&&a.isObject||this.throwException(this.TYPE_ERROR,"'in' expects an object, not '"+a+"'"),o=this.hasProperty(a,i);break;case"instanceof":this.isa(a,this.FUNCTION)||this.throwException(this.TYPE_ERROR,"Right-hand side of instanceof is not an object"),o=!!i.isObject&&this.isa(i,a);break;default:throw SyntaxError("Unknown binary operator: "+n.operator)}e[e.length-1].value=o},t.prototype.stepBlockStatement=function(e,r,n){var o=r.n_||0,i=n.body[o];if(i)return r.n_=o+1,new t.MyState(i,r.scope);e.pop()},t.prototype.stepBreakStatement=function(t,e,r){t.pop();var n=null;for(r.label&&(n=r.label.name);e&&"CallExpression"!==e.node.type&&"NewExpression"!==e.node.type;){if(n){if(e.labels&&-1!==e.labels.indexOf(n))return}else if(e.isLoop||e.isSwitch)return;e=t.pop()}throw SyntaxError("Illegal break statement")},t.prototype.stepCallExpression=function(e,r,n){if(!r.doneCallee_){r.doneCallee_=1;var o=new t.MyState(n.callee,r.scope);return o.components=!0,o}if(1===r.doneCallee_){r.doneCallee_=2;var i=r.value;if(Array.isArray(i)){if(r.func_=this.getValue(i),i[0]!==t.SCOPE_REFERENCE&&(r.funcThis_=i[0]),(i=r.func_)&&"object"==typeof i&&i.isGetter)return i.isGetter=!1,r.doneCallee_=1,this.createGetter_(i,r.value)}else r.func_=i;r.arguments_=[],r.n_=0}var i=r.func_;if(!r.doneArgs_){if(0!==r.n_&&r.arguments_.push(r.value),n.arguments[r.n_])return new t.MyState(n.arguments[r.n_++],r.scope);"NewExpression"===n.type?(i.illegalConstructor&&this.throwException(this.TYPE_ERROR,i+" is not a constructor"),r.funcThis_=this.createObject(i),r.isConstructor=!0):void 0===r.funcThis_&&(r.funcThis_=r.scope.strict?void 0:this.global),r.doneArgs_=!0}if(r.doneExec_)e.pop(),r.isConstructor&&"object"!=typeof r.value?e[e.length-1].value=r.funcThis_:e[e.length-1].value=r.value;else{r.doneExec_=!0,i&&i.isObject||this.throwException(this.TYPE_ERROR,i+" is not a function");var a=i.node;if(a){for(var s=this.createScope(a.body,i.parentScope),p=0;p<a.params.length;p++){var c=a.params[p].name,u=r.arguments_.length>p?r.arguments_[p]:void 0;this.setProperty(s,c,u)}for(var l=this.createObjectProto(this.ARRAY_PROTO),p=0;p<r.arguments_.length;p++)this.setProperty(l,p,r.arguments_[p]);this.setProperty(s,"arguments",l);var h=a.id&&a.id.name;return h&&this.setProperty(s,h,i),this.setProperty(s,"this",r.funcThis_,t.READONLY_DESCRIPTOR),r.value=void 0,new t.MyState(a.body,s)}if(i.eval){var f=r.arguments_[0];if("string"==typeof f){try{var y=t.acorn.parse(f.toString(),t.PARSE_OPTIONS)}catch(t){this.throwException(this.SYNTAX_ERROR,"Invalid code: "+t.message)}var d=new this.nodeConstructor;d.type="EvalProgram_",d.body=y.body,this.stripLocations_(d,n.start,n.end);var s=r.scope;return s.strict?s=this.createScope(y,s):this.populateScope_(y,s),this.value=void 0,new t.MyState(d,s)}r.value=f}else if(i.nativeFunc)r.value=i.nativeFunc.apply(r.funcThis_,r.arguments_);else{if(i.asyncFunc){var v=this,E=function(t){r.value=t,v.paused_=!1},g=r.arguments_.concat(E);return this.paused_=!0,void i.asyncFunc.apply(r.funcThis_,g)}this.throwException(this.TYPE_ERROR,i.class+" is not a function")}}},t.prototype.stepCatchClause=function(e,r,n){if(!r.done_){r.done_=!0;var o=this.createSpecialScope(r.scope);return this.setProperty(o,n.param.name,r.throwValue),new t.MyState(n.body,o)}e.pop()},t.prototype.stepConditionalExpression=function(e,r,n){var o=r.mode_||0;if(0===o)return r.mode_=1,new t.MyState(n.test,r.scope);if(1===o){r.mode_=2;var i=Boolean(r.value);if(i&&n.consequent)return new t.MyState(n.consequent,r.scope);if(!i&&n.alternate)return new t.MyState(n.alternate,r.scope);this.value=void 0}e.pop(),"ConditionalExpression"===n.type&&(e[e.length-1].value=r.value)},t.prototype.stepContinueStatement=function(t,e,r){t.pop();var n=null;for(r.label&&(n=r.label.name),e=t[t.length-1];e&&"CallExpression"!==e.node.type&&"NewExpression"!==e.node.type;){if(e.isLoop&&(!n||e.labels&&-1!==e.labels.indexOf(n)))return;t.pop(),e=t[t.length-1]}throw SyntaxError("Illegal continue statement")},t.prototype.stepDebuggerStatement=function(t,e,r){t.pop()},t.prototype.stepDoWhileStatement=function(e,r,n){if("DoWhileStatement"===n.type&&void 0===r.test_&&(r.value=!0,r.test_=!0),!r.test_)return r.test_=!0,new t.MyState(n.test,r.scope);if(r.value){if(n.body)return r.test_=!1,r.isLoop=!0,new t.MyState(n.body,r.scope)}else e.pop()},t.prototype.stepEmptyStatement=function(t,e,r){t.pop()},t.prototype.stepEvalProgram_=function(e,r,n){var o=r.n_||0,i=n.body[o];if(i)return r.n_=o+1,new t.MyState(i,r.scope);e.pop(),e[e.length-1].value=this.value},t.prototype.stepExpressionStatement=function(e,r,n){if(!r.done_)return r.done_=!0,new t.MyState(n.expression,r.scope);e.pop(),this.value=r.value},t.prototype.stepForInStatement=function(e,r,n){if(!r.doneInit_&&(r.doneInit_=!0,n.left.declarations&&n.left.declarations[0].init))return r.scope.strict&&this.throwException(this.SYNTAX_ERROR,"for-in loop variable declaration may not have an initializer."),new t.MyState(n.left,r.scope);if(!r.doneObject_)return r.doneObject_=!0,r.variable_||(r.variable_=r.value),new t.MyState(n.right,r.scope);if(r.isLoop||(r.isLoop=!0,r.object_=r.value,r.visited_=Object.create(null)),void 0===r.name_){t:do{if(r.object_&&r.object_.isObject){r.props_||(r.props_=Object.getOwnPropertyNames(r.object_.properties));do{var o=r.props_.shift()}while(o&&(r.visited_[o]||!Object.prototype.hasOwnProperty.call(r.object_.properties,o)));if(o&&(r.visited_[o]=!0,Object.prototype.propertyIsEnumerable.call(r.object_.properties,o))){r.name_=o;break t}}else if(null!==r.object_){r.props_||(r.props_=Object.getOwnPropertyNames(r.object_));do{var o=r.props_.shift()}while(o&&r.visited_[o]);if(o){r.visited_[o]=!0,r.name_=o;break t}}r.object_=this.getPrototype(r.object_),r.props_=null}while(null!==r.object_);if(null===r.object_)return void e.pop()}if(!r.doneVariable_){r.doneVariable_=!0;var i=n.left;if("VariableDeclaration"!==i.type){r.variable_=null;var a=new t.MyState(i,r.scope);return a.components=!0,a}r.variable_=[t.SCOPE_REFERENCE,i.declarations[0].id.name]}if(r.variable_||(r.variable_=r.value),!r.doneSetter_){r.doneSetter_=!0;var s=r.name_,p=this.setValue(r.variable_,s);if(p)return this.createSetter_(p,r.variable_,s)}return r.name_=void 0,r.doneVariable_=!1,r.doneSetter_=!1,n.body?new t.MyState(n.body,r.scope):void 0},t.prototype.stepForStatement=function(e,r,n){var o=r.mode_||0;if(0===o){if(r.mode_=1,n.init)return new t.MyState(n.init,r.scope)}else if(1===o){if(r.mode_=2,n.test)return new t.MyState(n.test,r.scope)}else if(2===o){if(r.mode_=3,!n.test||r.value)return r.isLoop=!0,new t.MyState(n.body,r.scope);e.pop()}else if(3===o&&(r.mode_=1,n.update))return new t.MyState(n.update,r.scope)},t.prototype.stepFunctionDeclaration=function(t,e,r){t.pop()},t.prototype.stepFunctionExpression=function(t,e,r){t.pop(),t[t.length-1].value=this.createFunction(r,e.scope)},t.prototype.stepIdentifier=function(e,r,n){if(e.pop(),r.components)return void(e[e.length-1].value=[t.SCOPE_REFERENCE,n.name]);var o=this.getValueFromScope(n.name);if(o&&"object"==typeof o&&o.isGetter){o.isGetter=!1;for(var i=r.scope;!this.hasProperty(i,n.name);)i=i.parentScope;var a=o;return this.createGetter_(a,this.global)}e[e.length-1].value=o},t.prototype.stepIfStatement=function(t,e,r){return this.stepConditionalExpression(t,e,r)},t.prototype.stepLabeledStatement=function(e,r,n){e.pop();var o=r.labels||[];o.push(n.label.name);var i=new t.MyState(n.body,r.scope);return i.labels=o,i},t.prototype.stepLiteral=function(t,e,r){t.pop();var n=r.value;if(n instanceof RegExp){var o=this.createObjectProto(this.REGEXP_PROTO);this.populateRegExp(o,n),n=o}t[t.length-1].value=n},t.prototype.stepLogicalExpression=function(e,r,n){if("&&"!==n.operator&&"||"!==n.operator)throw SyntaxError("Unknown logical operator: "+n.operator);if(!r.doneLeft_)return r.doneLeft_=!0,new t.MyState(n.left,r.scope);if(r.doneRight_)e.pop(),e[e.length-1].value=r.value;else{if(!("&&"===n.operator&&!r.value||"||"===n.operator&&r.value))return r.doneRight_=!0,new t.MyState(n.right,r.scope);e.pop(),e[e.length-1].value=r.value}},t.prototype.stepMemberExpression=function(e,r,n){if(!r.doneObject_)return r.doneObject_=!0,new t.MyState(n.object,r.scope);var o;if(n.computed){if(!r.doneProperty_)return r.object_=r.value,r.doneProperty_=!0,new t.MyState(n.property,r.scope);o=r.value}else r.object_=r.value,o=n.property.name;if(e.pop(),r.components)e[e.length-1].value=[r.object_,o];else{var i=this.getProperty(r.object_,o);if(i&&"object"==typeof i&&i.isGetter){i.isGetter=!1;var a=i;return this.createGetter_(a,r.object_)}e[e.length-1].value=i}},t.prototype.stepNewExpression=function(t,e,r){return this.stepCallExpression(t,e,r)},t.prototype.stepObjectExpression=function(e,r,n){var o=r.n_||0,i=n.properties[o];if(r.object_){var a=i.key;if("Identifier"===a.type)var s=a.name;else{if("Literal"!==a.type)throw SyntaxError("Unknown object structure: "+a.type);var s=a.value}r.properties_[s]||(r.properties_[s]={}),r.properties_[s][i.kind]=r.value,r.n_=++o,i=n.properties[o]}else r.object_=this.createObjectProto(this.OBJECT_PROTO),r.properties_=Object.create(null);if(i)return new t.MyState(i.value,r.scope);for(var a in r.properties_){var p=r.properties_[a];if("get"in p||"set"in p){var c={configurable:!0,enumerable:!0,get:p.get,set:p.set};this.setProperty(r.object_,a,null,c)}else this.setProperty(r.object_,a,p.init)}e.pop(),e[e.length-1].value=r.object_},t.prototype.stepProgram=function(e,r,n){var o=r.n_||0,i=n.body[o];if(i)return r.done=!1,r.n_=o+1,new t.MyState(i,r.scope);r.done=!0},t.prototype.stepReturnStatement=function(e,r,n){if(n.argument&&!r.done_)return r.done_=!0,new t.MyState(n.argument,r.scope);var o=r.value,i=e.length-1;for(r=e[i];"CallExpression"!==r.node.type&&"NewExpression"!==r.node.type;){if("TryStatement"!==r.node.type&&e.splice(i,1),--i<0)throw SyntaxError("Illegal return statement");r=e[i]}r.value=o},t.prototype.stepSequenceExpression=function(e,r,n){var o=r.n_||0,i=n.expressions[o];if(i)return r.n_=o+1,new t.MyState(i,r.scope);e.pop(),e[e.length-1].value=r.value},t.prototype.stepSwitchStatement=function(e,r,n){if(!r.test_)return r.test_=1,new t.MyState(n.discriminant,r.scope);for(1===r.test_&&(r.test_=2,r.switchValue_=r.value);;){var o=r.index_||0,i=n.cases[o];if(r.matched_||!i||i.test)if(i||r.matched_||!r.defaultCase_){if(!i)return void e.pop();if(!r.matched_&&!r.tested_&&i.test)return r.tested_=!0,new t.MyState(i.test,r.scope);if(r.matched_||r.value===r.switchValue_){r.matched_=!0;var a=r.n_||0;if(i.consequent[a])return r.isSwitch=!0,r.n_=a+1,new t.MyState(i.consequent[a],r.scope)}r.tested_=!1,r.n_=0,r.index_=o+1}else r.matched_=!0,r.index_=r.defaultCase_;else r.defaultCase_=o,r.index_=o+1}},t.prototype.stepThisExpression=function(t,e,r){t.pop(),t[t.length-1].value=this.getValueFromScope("this")},t.prototype.stepThrowStatement=function(e,r,n){if(!r.done_)return r.done_=!0,new t.MyState(n.argument,r.scope);this.throwException(r.value)},t.prototype.stepTryStatement=function(e,r,n){if(!r.doneBlock_)return r.doneBlock_=!0,new t.MyState(n.block,r.scope);if(r.throwValue&&!r.doneHandler_&&n.handler){r.doneHandler_=!0;var o=new t.MyState(n.handler,r.scope);return o.throwValue=r.throwValue,r.throwValue=null,o}if(!r.doneFinalizer_&&n.finalizer)return r.doneFinalizer_=!0,new t.MyState(n.finalizer,r.scope);r.throwValue?this.executeException(r.throwValue):e.pop()},t.prototype.stepUnaryExpression=function(e,r,n){if(!r.done_){r.done_=!0;var o=new t.MyState(n.argument,r.scope);return o.components="delete"===n.operator,o}e.pop();var i=r.value;if("-"===n.operator)i=-i;else if("+"===n.operator)i=+i;else if("!"===n.operator)i=!i;else if("~"===n.operator)i=~i;else if("delete"===n.operator){var a=!0;if(Array.isArray(i)){var s=i[0];s===t.SCOPE_REFERENCE&&(s=r.scope);var p=String(i[1]);try{delete s.properties[p]}catch(t){r.scope.strict?this.throwException(this.TYPE_ERROR,"Cannot delete property '"+p+"' of '"+s+"'"):a=!1}}i=a}else if("typeof"===n.operator)i=i&&"Function"===i.class?"function":typeof i;else{if("void"!==n.operator)throw SyntaxError("Unknown unary operator: "+n.operator);i=void 0}e[e.length-1].value=i},t.prototype.stepUpdateExpression=function(e,r,n){if(!r.doneLeft_){r.doneLeft_=!0;var o=new t.MyState(n.argument,r.scope);return o.components=!0,o}if(r.leftSide_||(r.leftSide_=r.value),r.doneGetter_&&(r.leftValue_=r.value),!r.doneGetter_){var i=this.getValue(r.leftSide_);if(r.leftValue_=i,i&&"object"==typeof i&&i.isGetter){i.isGetter=!1,r.doneGetter_=!0;var a=i;return this.createGetter_(a,r.leftSide_)}}if(r.doneSetter_)return e.pop(),void(e[e.length-1].value=r.doneSetter_);i=Number(r.leftValue_);var s;if("++"===n.operator)s=i+1;else{if("--"!==n.operator)throw SyntaxError("Unknown update expression: "+n.operator);s=i-1}var p=n.prefix?s:i,c=this.setValue(r.leftSide_,s);if(c)return r.doneSetter_=p,this.createSetter_(c,r.leftSide_,s);e.pop(),e[e.length-1].value=p},t.prototype.stepVariableDeclaration=function(e,r,n){var o=n.declarations,i=r.n_||0,a=o[i];for(r.init_&&a&&(this.setValueToScope(a.id.name,r.value),r.init_=!1,a=o[++i]);a;){if(a.init)return r.n_=i,r.init_=!0,new t.MyState(a.init,r.scope);a=o[++i]}e.pop()},t.prototype.stepWithStatement=function(e,r,n){if(!r.doneObject_)return r.doneObject_=!0,new t.MyState(n.object,r.scope);if(!r.doneBody_){r.doneBody_=!0;var o=this.createSpecialScope(r.scope,r.value);return new t.MyState(n.body,o)}e.pop()},t.prototype.stepWhileStatement=function(t,e,r){return this.stepDoWhileStatement(t,e,r)},t.PARSE_OPTIONS={ecmaVersion:5},t.READONLY_DESCRIPTOR={configurable:!0,enumerable:!0,writable:!1},t.NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!0},t.READONLY_NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!1},t.VARIABLE_DESCRIPTOR={configurable:!1,enumerable:!0,writable:!0},t.STEP_ERROR={},t.SCOPE_REFERENCE={},t.toStringCycles_=[],t}();!function(t){var e=function(){function e(t){this.proto=null,this.isObject=!0,this.class="Object",this.data=null,this.getter=Object.create(null),this.setter=Object.create(null),this.properties=Object.create(null),this.proto=t}return e.prototype.toString=function(){if("Array"===this.class){var e=t.toStringCycles_;e.push(this);try{for(var r=[],n=0;n<this.properties.length;n++){var o=this.properties[n];r[n]=o&&o.isObject&&-1!==e.indexOf(o)?"...":o}}finally{e.pop()}return r.join(",")}if("Error"===this.class){var e=t.toStringCycles_;if(-1!==e.indexOf(this))return"[object Error]";var i,a,s=this;do{if("name"in s.properties){i=s.properties.name;break}}while(s=s.proto);var s=this;do{if("message"in s.properties){a=s.properties.message;break}}while(s=s.proto);e.push(this);try{i=i&&i.toString(),a=a&&a.toString()}finally{e.pop()}return a?i+": "+a:String(i)}return null!==this.data?String(this.data):"[object "+this.class+"]"},e.prototype.valueOf=function(){return void 0===this.data||null===this.data||this.data instanceof RegExp?this:this.data instanceof Date?this.data.valueOf():this.data},e}();t.MyObject=e;var r=function(){function t(t,e){this.node=t,this.scope=e}return t}();t.MyState=r}(r||(r={})),r.Object=r.MyObject,r.State=r.MyState;try{r.acorn=(self||n).acorn}catch(t){}return r}.apply(e,o))&&(t.exports=i)}).call(e,r(5))},function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r}]);
//# sourceMappingURL=acorn_interpreter.js.map