diff --git a/package.json b/package.json index b113da9..706e918 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { "name": "move", - "version": "0.2.3", + "version": "0.2.4", "description": "A programming language", "homepage": "http://movelang.org/", "author": "Rasmus Andersson (http://rsms.me/)", diff --git a/web/move.js b/web/move.js index fa52a16..bfe796b 100644 --- a/web/move.js +++ b/web/move.js @@ -1 +1 @@ -window.move=function(){typeof window.global=="undefined"&&(window.global=window);var modules={},_require=function _require(a){if(++_require.depth>20)throw new Error("Recursive module dependencies");a=a.replace(/^[\/.]+/g,"");var b=modules[a];if(!b)throw new Error('No module with id "'+a+'"');if(b.block){var c=b.block;b.block=null,c(b.exports,_require,b)}_require.depth--;return b.exports};_require.depth=0,modules["ast-mutators"]=module={id:"ast-mutators",exports:{},block:function(a,b,c,d,e){var f=b("./parser"),g=b("./process"),h=b("./util").array_to_hash;a.add_implicit_returns=function(a){var b=g.ast_walker(),c=g.MAP,d;d=function d(a){if(!a)return a;var b=a[0],c;if(b==="stat")a[0]="return";else{if(b==="defun"){a[0]="function";return["return",a]}if(b==="if")for(c=2;c1&&(b[1]=c.walk(a[1]));return b})]},"import":function(a){d(a,function(a){l(a[0]),i.vars.push(a[0])})},"export":function(a){d(a,function(a){l(a[0]),i.vars.push(a[0])})},"const":function(a){d(a,function(a){l(a[0])})},assign:function(a,b,d){if(b[0]==="name"){var e=b[1],f=i.has(e);f||(i.vars.push(e),l(e))}return[this[0],a,c.walk(b),c.walk(d)]},"for-in":function(a,b,d,e){if(a)return[this[0],c.walk(a),c.walk(b),c.walk(d),c.walk(e)];i.has(b)||(i.vars.push(b),l(b));return[this[0],a,b,c.walk(d),c.walk(e)]}},function(){return c.walk(a)});return b})};var k=/^[_\$a-z][_\$\w\d]*$/i;a.named_lambda_assignments=function(a){var b=g.ast_walker(),c=g.MAP,d=b.with_walkers({"export":function(a){return[this[0],c(a,function(a){var c=[a[0]];a.length>1&&(a[1]&&a[1][0]==="function"&&!a[1][1]&&(a[1][1]=a[0]),c[1]=b.walk(a[1]));return c})]},assign:function(a,c,d){if(Array.isArray(d)&&d[0]==="function"&&!d[1])if(c[0]==="name")d[1]=c[1];else if(c[0]==="dot")d[1]=c[c.length-1];else if(c[0]==="sub"&&c[2][0]==="string"){var e=c[2][1];!f.KEYWORDS[e]&&!f.RESERVED_WORDS[e]&&k.test(e)&&(d[1]=e)}return[this[0],a,b.walk(c),b.walk(d)]}},function(){return b.walk(a)});return d},a.enforce_strict_eq_ops=function(a){var b=g.ast_walker(),c=g.MAP;return b.with_walkers({binary:function(a,c,d){a==="=="?a="===":a==="!="&&(a="!==");return[this[0],a,b.walk(c),b.walk(d)]}},function(){return b.walk(a)})},a.enable_keyword_arguments=function(a,b){var c=g.ast_walker(),d=g.MAP;typeof b!="object"&&(b={});var e=b.raw?"true":"_MoveKWArgsT";return c.with_walkers({"function":function(a,b,f,g){if(b.length){var h,i,j,k=["seq"],l=b[0],m=[null],n=["binary","&&",["binary","!==",["name",l],["name","null"]],["binary","&&",["binary","===",["unary-prefix","typeof",["name",l]],["string","object"]],["binary","===",["dot",["name",l],"__kw"],["name",e]]]];k.push(["assign",!0,["dot",["name","arguments"],"keywords"],["name",l]]);for(h=b.length;--h!==-1;)i=b[h],j=g&&g[i],k.push(["assign",!0,["name",i],["dot",["name",l],i]]),j&&m.push(["if",["binary","===",["name",i],["name","undefined"]],["stat",["assign",!0,["name",i],j]]]);m[0]=["stat",["binary","&&",n,k]],f=m.concat(f)}return[this[0],a,b,d(f,c.walk),g]},call:function(a,b){if(b.length===1&&b[0][0]==="object"){var f,g=b[0][1],h=[];for(var i=g.length;--i!==-1;)f=g[i],f[0]==="__kw"&&f[1]&&f[1][1]==="__Move_KWArgs__"&&h.push(i);if(h.length){while(h.length>1)delete g[h.pop()];g[h.pop()]=["__kw",["name",e]]}}return[this[0],c.walk(a),d(b,c.walk)]}},function(){return c.walk(a)})}}},modules.cli=module={id:"cli",exports:{},block:function(a,b,c,d,e){(function(){"use strict";var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;c=__move.runtime,d=c._MoveKWArgsT,e=c.Text,f=c.extend,g=c.create,h=c.print,i=c.repeat,j=c.after,k=c.JSON,l=b("fs"),m=b("./optparse"),n="Usage: move [options] []",o=[["-h","--help","Display help"]],p={},q=[],r=function r(a){a!==null&&typeof a=="object"&&a.__kw===d&&(arguments.keywords=a,a=a.die),console.error((new m.OptionParser(o,n)).help());if(a!==undefined)return process.exit(a)},a.main=s=function s(){t();if(p.help)return r();if(p.run){q.length||(console.error("At least one file must be specified"),r(1));return q.forEach(function(a){a!==null&&typeof a=="object"&&a.__kw===d&&(arguments.keywords=a,a=a.filename);try{a=l.realpathSync(a)}catch(c){c.errno!==undefined&&(console.error(c.message),process.exit(1));throw c}return b(a)})}};return t=function t(){var a,b;a=new m.OptionParser(o,n),p=b=a.parse(process.argv.slice(2)),b.run=!b.compile&&!b.ast;return q=b.arguments}})()}},modules.ehtml=module={id:"ehtml",exports:{},block:function(a,b,c,d,e){(function(){"use strict";var b,c,d,e,f,g,h,i,j,k,l;b=__move.runtime,c=b._MoveKWArgsT,d=b.Text,e=b.extend,f=b.create,g=b.print,h=b.repeat,i=b.after,j=b.JSON,a.EHTML=k=function k(a){a!==null&&typeof a=="object"&&a.__kw===c&&(arguments.keywords=a,a=a.html);var b;k.spawnerElement||(k.spawnerElement=document.createElement("div")),k.spawnerElement.innerHTML=a,b=k.spawnerElement.firstChild,b.toString=function(){return a};return b},a.preprocessEHTML=l=function l(a){a!==null&&typeof a=="object"&&a.__kw===c&&(arguments.keywords=a,a=a.src);var b,d,e,f;b=0,d=function d(d){d!==null&&typeof d=="object"&&d.__kw===c&&(arguments.keywords=d,d=d.endch);var e,f;e=null;while(f=a[b++]){if(f===d&&e!=="\\")break;e=f}},e=function e(){var d,e,g,h,i,j,k,l;d=0,e=b-1,g="<",h=[];while(g==="<"){i=j=null;while((g=a[b++])&&g!==">")i===null&&(i=g),g==="{"&&j!=="\\"&&(h.push([!0,e,b-1]),e=b,k=f(!0),h.push([!1,k]),e=b),j=g;if(i==="/"){--d;if(d<0)throw Error("EHTML: Premature termination")}else j!=="/"&&++d;if(!g||d===0)break;while((g=a[b++])&&g!=="<")g==="{"&&j!=="\\"&&(h.push([!0,e,b-1]),e=b,k=f(!0),h.push([!1,k]),e=b),j=g}h.push([!0,e,b]),l="",h.forEach(function(b){b!==null&&typeof b=="object"&&b.__kw===c&&(arguments.keywords=b,b=b.range);var d;b[0]?(d=a.substring(b[1],b[2]),d=d.replace(/\n/g,"\\n"),d=d.replace(/\t/g,"\\t"),d=d.replace(/'/g,"\\'")):d="'+("+b[1]+")+'";return l+=d}),l="__move.EHTML('"+l+"')";return l},f=function f(f){f!==null&&typeof f=="object"&&f.__kw===c&&(arguments.keywords=f,f=f.isDeep);var g,h,i,j,k,l,m,n,o;g="",h=0,i=1,j=h,k=null,l=1;while(m=a[b++]){n=!1;switch(m){case" ":case"\n":case"\r":case"\t":g+=m;break;case'"':o=b,d('"'),g+=a.substring(o-1,b);break;case"'":o=b,d("'"),g+=a.substring(o-1,b);break;case"<":j===i?(j=h,g+=m):g+=e();break;default:g+=m,n=!0}if(n){if(f&&k!=="\\")if(m==="{")++l;else if(m==="}"&&--l===0){g=g.substr(0,g.length-1);break}m.match(/[a-z0-9_\)\}]/i)?j=i:j=h}k=m}return g};return f()}})()}},modules.es5_array=module={id:"es5_array",exports:{},block:function(a,b,c,d,e){Array.isArray||(Array.isArray=function(a){return a instanceof Array||Object.prototype.toString.call(a)==="[object Array]"}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c,d=this.length;for(c=+b||0;c>>0;for(var d=0;d>>0;for(var d=0;d>>0;for(var d=0;d>>0,d=Array(c);for(var e=0;e>>0,c=0,d;if(b===0&&arguments.length===1)throw new TypeError;if(arguments.length>=2)d=arguments[1];else for(;;){if(c in this){d=this[c++];break}if(++c>=b)throw new TypeError}for(;c1&&(e=processor.ast_squeeze_more(e));if(!c.codegen)return e;var j=processor.gen_code(e,c.outputFormatting);c.strict&&(c.raw?j='"use strict";'+j:j=j.replace(/\(function\s*\(\)\s*\{/,'(function(){"use strict";')),exports.debug&&typeof console!="undefined"&&console.log((b.filename||"")+" -> \n"+j);return c.detailedOutput?{ast:e,code:j}:j},exports.compileFileSync=function(a,b){if(!fs)throw new Error("File system access is not supported");typeof b=="object"&&!b.filename?b.filename=a:b={filename:a};return exports.compile(fs.readFileSync(a,"utf8"),b)},exports.eval=function(a,b){if(!b||typeof b!="object")b={};var c=exports.compile(a,b);return function(){var a=exports;return evalFunc(c.code!==undefined?c.code:c,String(b.filename||""))}()};var evalFunc;try{evalFunc=require("vm").runInThisContext}catch(e){evalFunc=eval}typeof window!="undefined"&&window?exports.compileURL=function(a,b,c){var d=parseKWArgs(arguments,[["url"],["options"],["callback"]]);typeof d.options=="function"&&(d.callback=d.options,d.options={});var e=window.ActiveXObject?new window.ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest;e.open("GET",d.url,!0),"overrideMimeType"in e&&e.overrideMimeType("text/plain"),e.onreadystatechange=function(){if(e.readyState===4){var b,c,f=a.indexOf("://")!==-1?a.match(/^http/):document.location.protocol.match(/^http/);if(f&&String(e.status).charAt(0)==="2"||!f&&e.status===0)try{b=move.compile(e.responseText,d.options)}catch(g){c=g}else e.status&&e.statusText?(c=new Error("HTTP request error: "+e.status+" "+e.statusText),c.httpStatus=e.status):c=new Error("Unspecified HTTP request error");if(typeof d.callback=="function")d.callback(c,b);else if(c)throw c}};return e.send(null)}:!http;var parseKWArgs=function parseKWArgs(a,b){var c=a[0],d,e,f,g;if(typeof c=="object"&&c.__kw===_MoveKWArgsT){d=c;for(g=0;g0?Array(d+1).join(" "):"",a=c.shortFlag?c.shortFlag+", ":" ",b.push(" "+a+c.longFlag+d+c.description);return b.join("\n")+"\n"};return a}(),b=/^(--\w[\w\-]+)/,f=/^(-\w)/,c=/^-(\w{2,})/,d=/\[(\w+(\*?))\]/,h=function(a){var b,c,d,e;e=[];for(c=0,d=a.length;c=0;)if(b[c]===a)return!0;return!1}function N(a){return a.split("")}function M(a,b){return Array.prototype.slice.call(a,b==null?0:b)}function L(a){var b={};for(var c=0;c0;++b)arguments[b]();return a}function J(a){var b=M(arguments,1);return function(){return a.apply(this,b.concat(M(arguments)))}}function I(a,b,c){function br(a){try{++e.in_loop;return a()}finally{--e.in_loop}}function bq(a){arguments.length==0&&(a=!0);var b=bp();if(a&&f("punc",",")){h();return s("seq",b,bq())}return b}function bp(){var a=bn(),b=e.token.value;if(f("operator")&&P(D,b)){if(bo(a)){h();return s("assign",D[b],a,bp())}j("Invalid assignment")}return a}function bo(a){switch(a[0]){case"dot":case"sub":return!0;case"name":return a[1]!="this"}}function bn(){var a=bm();if(f("operator","?")){h();var b=bq(!1);o(":");return s("conditional",a,b,bq(!1))}return a}function bm(){return bl(ba(!0),0)}function bl(a,b){var c=f("operator")?e.token.value:null,d=c!=null?E[c]:null;if(d!=null&&d>b){h();var g=bl(ba(!0),d);return bl(s("binary",c,a,g),b)}return a}function bk(a,b,c){(b=="++"||b=="--")&&!bo(c)&&j("Invalid use of "+b+" operator");return s(a,b,c)}function bj(a,b){if(f("punc",".")){h();return bj(s("dot",a,bh()),b)}if(f("punc","[")){h();var c=null,i=null;f("punc",":")?h():c=K(bq,J(p,"]",":"));if(e.prev.value===":"){f("punc","]")?h():i=K(bq,J(o,"]"));return bi(a,c,i,b)}return bj(s("sub",a,c),b)}if(b&&f("punc","(")){h();return bj(s("call",a,bb(")")),!0)}if(b&&d.keywordArguments&&f("punc","{")){h();var j;f("operator","&")?(h(),j=bq(!1),o("}"),d.raw||(j=["call",["name","_MoveKWArgsT"],[j]])):(j=be(),j[1].push(["__kw",["name","__Move_KWArgs__"]]));var k=a;return bj(s("call",k,[j]),!0)}if(b&&f("operator")&&P(C,e.token.value))return K(J(bk,"unary-postfix",e.token.value,a),h);if(b&&!e.token.nlb&&!f("eof")&&!f("punc")&&!f("operator")&&(e.token.type!=="keyword"||e.token.value==="function")){var l=[],m=!0,n;while(!f("punc",";")){if(m)m=!1;else if(f("punc",",")&&!g().nlb)h();else{n=!0;break}l.push(bq(!1))}!n&&!f("punc",";")&&h();if(e.token.nlb||f("punc",";"))return s("call",a,l);return bj(s("call",a,l),!0)}return a}function bi(a,b,c,d){if(f("operator","=")){h();var e=v();return bj(["call",["dot",a,"_move_setSlice"],[b||["num","0"],c||["name","undefined"],e[1]||["name","undefined"]]],d)}var g=[b||["num","0"]];c&&g.push(c);return bj(["call",["dot",a,"slice"],g],d)}function bh(){switch(e.token.type){case"name":case"operator":case"keyword":case"atom":return K(e.token.value,h);default:l()}}function bg(){switch(e.token.type){case"num":case"string":return K(e.token.value,h)}return bh()}function bf(){var a=!0,c,d,g=[],i={};while(!f("punc",")")){a?a=!1:o(",");if(!b&&f("punc",")"))break;c=e.token.type,d=bg(),g.push(d),f("punc",":")&&(h(),i[d]=bq(!1))}h();return{names:g,values:i}}function be(){var a=!0,c=[];while(!f("punc","}")){a?a=!1:o(",");if(!b&&f("punc","}"))break;var d=e.token.type,g=bg();d!="name"||g!="get"&&g!="set"||!!f("punc",":")?(o(":"),c.push([g,bq(!1)])):c.push([bh(),Q(!1),g])}h();return s("object",c)}function bd(){return s("array",bb("]",!b,!0))}function bc(a,b,c,d){var e=!0,g=[];d||(d=0x10000000000000000);try{while(!f("punc",a)&&--d){e?e=!1:o(",");if(b&&f("punc",a))break;f("punc",",")&&c?g.push(["atom","undefined"]):g.push(bq(!1))}h()}catch(i){if(String(i.message).indexOf("Unexpected token")!==0)throw i}return g}function bb(a,b,c){var d=!0,e=[];while(!f("punc",a)){d?d=!1:o(",");if(b&&f("punc",a))break;f("punc",",")&&c?e.push(["atom","undefined"]):e.push(bq(!1))}h();return e}function ba(a){if(f("operator","new")){h();return _()}if(f("operator")&&P(B,e.token.value))return bk("unary-prefix",K(e.token.value,h),ba(a));if(f("punc")){switch(e.token.value){case"(":h();return bj(K(bq,J(o,")")),a);case"[":h();return bj(bd(),a);case"{":h();return bj(be(),a)}l()}if(f("keyword","function")){h();return bj(Q(!1),a)}if(P(G,e.token.type)){var b=e.token.type=="regexp"?s("regexp",e.token.value[0],e.token.value[1]):s(e.token.type,e.token.value);return bj(K(b,h),a)}l()}function _(){var a=ba(!1),b;f("punc","(")?(h(),b=bb(")")):b=[];return bj(s("new",a,b),!0)}function $(){return s("export",W())}function Z(){return s("import",W())}function Y(){return s("const",W())}function X(){return s("var",W())}function W(){var a=[];for(;;){f("name")||l();var b=e.token.value;h(),f("operator","=")?(h(),a.push([b,bq(!1)])):a.push([b]);if(!f("punc",","))break;h()}return a}function V(){var a=T(),b,c;if(f("keyword","catch")){h(),o("("),f("name")||j("Name expected");var d=e.token.value;h(),o(")"),b=[d,T()]}f("keyword","finally")&&(h(),c=T()),!b&&!c&&j("Missing catch/finally blocks");return s("try",a,b,c)}function T(){o("{");var a=[];while(!f("punc","}"))f("eof")&&l(),a.push(v());h();return a}function S(){var a=t(),b=v(),c;f("keyword","else")&&(h(),c=v());return s("if",a,b,c)}function R(a){var b=f("name")?K(e.token.value,h):null;a&&!b&&!e.in_function&&l(),o("(");var c=bf();return s(a?"defun":"function",b,c.names,function(){++e.in_function;var a=e.in_loop;e.in_loop=0;var b=T();--e.in_function,e.in_loop=a;return b}(),c.values)}function N(){o("(");var a=!d.automaticVarDeclarations&&f("keyword","var");a&&h();if(f("name")&&y(g(),"operator","in")){var b=e.token.value;h(),h();var c=bq();o(")");return s("for-in",a,b,c,br(v))}var i=f("punc",";")?null:a?X():bq();o(";");var j=f("punc",";")?null:bq();o(";");var k=f("punc",")")?null:bq();o(")");return s("for",i,j,k,br(v))}function L(a){var b=f("name")?e.token.value:null;b!=null?(h(),O(b,e.labels)||j("Label "+b+" without matching loop or statement")):e.in_loop==0&&j(a+" not inside a loop or switch"),r();return s(a,b)}function I(){return s("stat",K(bq,r))}function z(a){e.labels.push(a);var c=e.token,d=v();b&&!P(F,d[0])&&l(c),e.labels.pop();return s("label",a,d)}function w(){f("operator","/")&&(e.peeked=null,e.token=e.input(!0)),d.automaticVarDeclarations&&e.token.type==="keyword"&&e.token.value==="var"&&l();switch(e.token.type){case"num":case"string":case"regexp":case"operator":case"atom":return I();case"name":return y(g(),"punc",":")?z(K(e.token.value,h,h)):I();case"punc":switch(e.token.value){case"{":return s("block",T());case"[":case"(":return I();case";":h();return s("block");default:l()};case"keyword":switch(K(e.token.value,h)){case"break":return L("break");case"continue":return L("continue");case"debugger":r();return s("debugger");case"do":return function(a){m("keyword","while");return s("do",K(t,r),a)}(br(v));case"for":return N();case"function":return Q(!0);case"if":return S();case"return":e.in_function==0&&j("'return' outside of function");return s("return",f("punc",";")?(h(),null):q()?null:K(bq,r));case"switch":return s("switch",t(),U());case"throw":return s("throw",K(bq,r));case"try":return V();case"var":return K(X,r);case"const":return K(Y,r);case"while":return s("while",t(),br(v));case"with":j("'with' statement not allowed");case"import":return K(Z,r);case"export":return K($,r);default:l()}}}function u(a,b,c){return a instanceof H?a:new H(a,b,c)}function t(){o("(");var a=bq();o(")");return a}function s(){return M(arguments)}function r(){f("punc",";")?h():q()||l()}function q(){return!b&&(e.token.nlb||f("eof")||f("punc","}"))}function p(a,b){return n("punc",a,"punc",b)}function o(a){return m("punc",a)}function n(a,b,c,d){if(f(a,b)||f(c,d))return h();k(e.token,"Unexpected token: "+e.token.type+", expected "+a+" or "+c)}function m(a,b){if(f(a,b))return h();k(e.token,"Unexpected token: "+e.token.type+", expected "+a)}function l(a){a==null&&(a=e.token),k(a,"Unexpected token: "+a.type+" ("+a.value+")")}function k(a,b){j(b,a.line,a.col)}function j(a,b,c,d){var f=e.input.context();x(a,b!=null?b:f.tokline,c!=null?c:f.tokcol,d!=null?d:f.tokpos)}function i(){return e.prev}function h(){e.prev=e.token,e.peeked?(e.token=e.peeked,e.peeked=null):e.token=e.input();return e.token}function g(){return e.peeked||(e.peeked=e.input())}function f(a,b){return y(e.token,a,b)}var d={};typeof b=="object"&&(d=b,b=d.strictMode,c=d.embedTokens);var e={input:typeof a=="string"?A(a,d):a,token:null,prev:null,peeked:null,in_function:0,in_loop:0,labels:[]};e.token=h();var v=c?function(){var a=e.token,b=w.apply(this,arguments);b[0]=u(b[0],a,i());return b}:w,Q=c?function(){var a=i(),b=R.apply(this,arguments);b[0]=u(b[0],a,i());return b}:R,U=J(br,function(){o("{");var a=[],b=null;while(!f("punc","}"))f("eof")&&l(),f("keyword","case")?(h(),b=[],a.push([bq(),b]),o(":")):f("keyword","default")?(h(),o(":"),b=[],a.push([null,b])):(b||l(),b.push(v()));h();return a});return s("toplevel",function(a){while(!f("eof"))a.push(v());return a}([]))}function H(a,b,c){this.name=a,this.start=b,this.end=c}function A(a,b){function O(a){if(c.queued_tokens.length)return c.queued_tokens.shift();if(a)return I();w(),l();var b=d();if(!b)return m("eof");if(u(b))return B();if(b==='"'||b==="'")return F();if(P(q,b))return m("punc",e());if(b===".")return L();if(b==="/")return K();if(b==="#"){var f=c.regex_allowed;c.comments_before.push(G()),c.regex_allowed=f;return O()}if(b==="^"){e(),b=d(),b==="{"&&(c.queued_tokens.push(m("punc","(")),c.queued_tokens.push(m("punc",")")));return m("keyword","function")}if(P(j,b))return J();if(b==="@"){e();var g=M(),h=m("name","this");h.nlb=g.nlb,g.nlb=!1,c.queued_tokens.push(m("punc",".")),c.queued_tokens.push(g);return h}if(t(b))return M();A("Unexpected character '"+b+"'")}function N(a,b){try{return b()}catch(c){if(c===z)A(a);else throw c}}function M(){var a=y(t);return P(f,a)?P(n,a)?m("operator",a):P(i,a)?m("atom",a):m("keyword",a):m("name",a)}function L(){e();return u(d())?B("."):m("punc",".")}function K(){e();var a=c.regex_allowed;switch(d()){case"/":c.comments_before.push(G()),c.regex_allowed=a;return O();case"*":c.comments_before.push(H()),c.regex_allowed=a;return O()}return c.regex_allowed?I():J("/")}function J(a){function b(a){if(!d())return a;var c=a+d();if(P(n,c)){e();return b(c)}return a}return m("operator",b(a||e()))}function I(){return N("Unterminated regular expression",function(){var a=!1,b="",c,d=!1;while(c=e(!0))if(a)b+="\\"+c,a=!1;else if(c=="[")d=!0,b+=c;else if(c=="]"&&d)d=!1,b+=c;else{if(c=="/"&&!d)break;c=="\\"?a=!0:b+=c}var f=y(function(a){return P(r,a)});return m("regexp",[b,f])})}function H(){e();return N("Unterminated multiline comment",function(){var a=k("*/",!0),b=c.text.substring(c.pos,a),d=m("comment2",b,!0);c.pos=a+2,c.line+=b.split("\n").length-1,c.newline_before=b.indexOf("\n")>=0;return d})}function G(){e();var a=k("\n"),b;a==-1?(b=c.text.substr(c.pos),c.pos=c.text.length):(b=c.text.substring(c.pos,a),c.pos=a);return m("comment1",b,!0)}function F(){return N("Unterminated string constant",function(){var a=e(),b="";for(;;){var c=e(!0);if(c=="\\")c=D();else if(c==a)break;b+=c}return m("string",b)})}function E(a){var b=0;for(;a>0;--a){var c=parseInt(e(!0),16);isNaN(c)&&A("Invalid hex-character pattern in string"),b=b<<4|c}return b}function D(){var a=e(!0);switch(a){case"n":return"\n";case"r":return"\r";case"t":return"\t";case"b":return"\b";case"v":return" ";case"f":return"\f";case"0":return"";case"x":return String.fromCharCode(E(2));case"u":return String.fromCharCode(E(4));default:return a}}function B(a){var b=!1,c=!1,d=!1,e=a==".",f=y(function(f,g){if(f=="x"||f=="X"){if(d)return!1;return d=!0}if(!d&&(f=="E"||f=="e")){if(b)return!1;return b=c=!0}if(f=="-"){if(c||g==0&&!a)return!0;return!1}if(f=="+")return c;c=!1;if(f=="."){if(!e)return e=!0;return!1}return s(f)});a&&(f=a+f);var g=v(f);if(!isNaN(g))return m("num",g);A("Invalid syntax: "+f)}function A(a){x(a,c.tokline,c.tokcol,c.tokpos)}function y(a){var b="",c=d(),f=0;while(c&&a(c,f++))b+=e(),c=d();return b}function w(){while(P(o,d()))e()}function m(a,b,d){c.regex_allowed=a=="operator"&&!P(C,b)||a==="keyword"&&P(h,b)||a==="punc"&&P(p,b)||a==="name";var e={type:a,value:b,line:c.tokline,col:c.tokcol,pos:c.tokpos,nlb:c.newline_before};d||(e.comments_before=c.comments_before,c.comments_before=[]),c.newline_before=!1,c.prev_token=e;return e}function l(){c.tokline=c.line,c.tokcol=c.col,c.tokpos=c.pos}function k(a,b){var d=c.text.indexOf(a,c.pos);if(b&&d==-1)throw z;return d}function g(){return!c.peek()}function e(a){var b=c.text.charAt(c.pos++);if(a&&!b)throw z;b=="\n"?(c.newline_before=!0,++c.line,c.col=0):++c.col;return b}function d(){return c.text.charAt(c.pos)}typeof b!="object"&&(b={});var c={text:a.replace(/\r\n?|[\n\u2028\u2029]/g,"\n").replace(/^\uFEFF/,""),pos:0,tokpos:0,line:0,tokline:0,col:0,tokcol:0,newline_before:!1,regex_allowed:!1,comments_before:[],queued_tokens:[]};O.context=function(a){a&&(c=a);return c};return O}function y(a,b,c){return a.type==b&&(c==null||a.value==c)}function x(a,b,c,d){throw new w(a,b,c,d)}function w(a,b,c,d){this.name="JS_Parse_Error",this.message=a,this.line=b,this.col=c,this.pos=d;try{({})()}catch(e){this.stack=this.message,e&&e.stack&&(this.stack+="\n"+e.stack.split(/[\r\n]/).slice(3).join("\n"))}}function v(a){if(k.test(a))return parseInt(a.substr(2),16);if(l.test(a))return parseInt(a.substr(1),8);if(m.test(a))return parseFloat(a)}function u(a){a=a.charCodeAt(0);return a>=48&&a<=57}function t(a){return s(a)||a=="$"||a=="_"}function s(a){a=a.charCodeAt(0);return a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122}var f=L(["break","case","catch","const","continue","default","delete","do","else","finally","for","function","if","in","instanceof","new","return","switch","throw","try","typeof","var","void","while","with","import","export","xor"]);a.KEYWORDS=f;var g=L(["abstract","boolean","byte","char","class","debugger","double","enum","extends","final","float","goto","implements","int","interface","long","native","package","private","protected","public","short","static","super","synchronized","throws","transient","volatile"]);a.RESERVED_WORDS=g;var h=L(["return","new","delete","throw","else","case"]),i=L(["false","null","true","undefined"]),j=L(N("+-*&%=<>!?|~")),k=/^0x[0-9a-f]+$/i,l=/^0[0-7]+$/,m=/^\d*\.?\d*(?:e[+-]?\d*(?:\d\.?|\.?\d)\d*)?$/i,n=L(["in","instanceof","typeof","new","void","delete","++","--","+","-","!","~","&","|","*","/","%",">>","<<",">>>","<",">","<=",">=","==","===","!=","!==","?","=","+=","-=","/=","*=","%=",">>=","<<=",">>>=","%=","|=","&=","&&","||","xor"]),o=L(N(" \n\r\t")),p=L(N("[{}(,.;:")),q=L(N("[]{}(),;:")),r=L(N("gmsiy"));w.prototype.toString=function(){return this.message+" (line: "+this.line+", col: "+this.col+", pos: "+this.pos+")"+"\n\n"+this.stack};var z={},B=L(["typeof","void","delete","--","++","!","~","-","+"]),C=L(["--","++"]),D=function(a,b,c){while(c>=","<<=",">>>=","|=","xor=","&="],{"=":!0},0),E=function(a,b){for(var c=0,d=1;c","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]],{}),F=L(["for","do","while","switch"]),G=L(["atom","num","string","regexp","name"]);H.prototype.toString=function(){return this.name},a.tokenizer=A,a.parse=I,a.slice=M,a.curry=J,a.member=O,a.array_to_hash=L,a.PRECEDENCE=E,a.KEYWORDS_ATOM=i,a.RESERVED_WORDS=g,a.KEYWORDS=f,a.ATOMIC_START_TOKEN=G,a.OPERATORS=n,a.is_alphanumeric_char=s,a.is_identifier_char=t}},modules.process=module={id:"process",exports:{},block:function(a,b,c,d,e){function H(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function G(a){return/^[a-z_$][a-z0-9_$]*$/i.test(a)&&a!="this"&&!H(f.KEYWORDS_ATOM,a)&&!H(f.RESERVED_WORDS,a)&&!H(f.KEYWORDS,a)}function F(a,b){var c={};a===!0&&(a={});for(var d in b)H(b,d)&&(c[d]=a&&H(a,d)?a[d]:b[d]);return c}function E(a,b){if(b<=0)return"";if(b==1)return a;var c=E(a,b>>1);c+=c,b&1&&(c+=a);return c}function D(a,b){var c=[0];f.parse(function(){function j(){var a=d.apply(this,arguments);out:{if(g&&g.type=="keyword")break out;if(h(a)>b)switch(a.type){case"keyword":case"atom":case"name":case"punc":i(a);break out}}g=a;return a}function i(a){e=a.pos,c.push(e)}function h(a){return a.pos-e}var d=f.tokenizer(a),e=0,g;j.context=function(){return d.context.apply(this,arguments)};return j}());return c.map(function(b,d){return a.substring(b,c[d+1]||a.length)}).join("\n")}function C(a,b){function K(a){if(!!a){var b=a[0],c=t[b];if(!c)throw new Error("Can't find generator for \""+b+'"');J.push(a);var d=c.apply(b,a.slice(1));J.pop();return d}}function D(a){var b=a[0],c=a[1];c!=null&&(b=n([b,"=",K(c)]));return b}function C(a){if(!a)return";";if(a.length==0)return"{}";return"{"+d+m(function(){return y(a).join(d)})+d+l("}")}function z(a){var c=a.length;if(c==0)return"{}";return"{"+d+I(a,function(a,e){var f=a[1].length>0,g=m(function(){return l(a[0]?n(["case",K(a[0])+":"]):"default:")},.5)+(f?d+m(function(){return y(a[1]).join(d)}):"");!b&&f&&e1&&(c=a[1][1]);return b+" = require("+K(["string",c])+")"}))+";"},"export":function(a){return o(I(a,function(b){var c=b[0],d=c;b.length>1&&(d=b[1][1]);return"exports."+c+" = "+o(I(a,D))}))+";"},"try":function(a,b,c){var d=["try",C(a)];b&&d.push("catch","("+b[0]+")",C(b[1])),c&&d.push("finally",C(c));return n(d)},"throw":function(a){return n(["throw",K(a)])+";"},"new":function(a,b){b=b.length>0?"("+o(I(b,K))+")":"";return n(["new",p(a,"seq","binary","conditional","assign",function(a){var b=k(),c={};try{b.with_walkers({call:function(){throw c},"function":function(){return this}},function(){b.walk(a)})}catch(d){if(d===c)return!0;throw d}})+b])},"switch":function(a,b){return n(["switch","("+K(a)+")",z(b)])},"break":function(a){var b="break";a!=null&&(b+=" "+x(a));return b+";"},"continue":function(a){var b="continue";a!=null&&(b+=" "+x(a));return b+";"},conditional:function(a,b,c){return n([p(a,"assign","seq","conditional"),"?",p(b,"seq"),":",p(c,"seq")])},assign:function(a,b,c){a&&a!==!0?a+="=":a="=",c||console.log("assign:",a,b,c);return n([K(b),a,p(c,"seq")])},dot:function(a){var b=K(a),c=1;a[0]=="num"?b+=".":r(a)&&(b="("+b+")");while(ci[b[1]])d="("+d+")";if(h(c[0],["assign","conditional","seq"])||c[0]=="binary"&&i[a]>=i[c[1]]&&(c[1]!=a||!h(a,["&&","||","*"])))e="("+e+")";a==="xor"&&(a="^");return n([d,a,e])},"unary-prefix":function(a,b){var c=K(b);b[0]=="num"||b[0]=="unary-prefix"&&!H(j,a+b[1])||!r(b)||(c="("+c+")");return a+(f.is_alphanumeric_char(a.charAt(0))?" ":"")+c},"unary-postfix":function(a,b){var c=K(b);b[0]=="num"||b[0]=="unary-postfix"&&!H(j,a+b[1])||!r(b)||(c="("+c+")");return c+a},sub:function(a,b){var c=K(a);r(a)&&(c="("+c+")");return c+"["+K(b)+"]"},object:function(a){if(a.length==0)return"{}";return"{"+d+m(function(){return I(a,function(a){if(a.length==3)return l(w(a[0],a[1][2],a[1][3],a[1][4],a[2]));var c=a[0],d=K(a[1]);b&&b.quote_keys?c=B(c):(typeof c=="number"||!b&&+c+""==c)&&parseFloat(c)>=0?c=s(+c):G(c)||(c=B(c));return l(n(b&&b.space_colon?[c,":",d]:[c+":",d]))}).join(","+d)})+d+l("}")},regexp:function(a,b){return"/"+a+"/"+b},array:function(a){if(a.length==0)return"[]";return n(["[",o(I(a,function(a){if(!b&&a[0]=="atom"&&a[1]=="undefined")return"";return p(a,"seq")})),"]"])},stat:function(a){return K(a).replace(/;*\s*$/,";")},seq:function(){return o(I(g(arguments),K))},label:function(a,b){return n([x(a),":",K(b)])},"with":function(a,b){return n(["with","("+K(a)+")",K(b)])},atom:function(a){return x(a)}},J=[];return K(a)}function B(a){var b=0,c=0;a=a.replace(/[\\\b\f\n\r\t\x22\x27]/g,function(a){switch(a){case"\\":return"\\\\";case"\b":return"\\b";case"\f":return"\\f";case"\n":return"\\n";case"\r":return"\\r";case"\t":return"\\t";case'"':++b;return'"';case"'":++c;return"'"}return a});return b>c?"'"+a.replace(/\x27/g,"\\'")+"'":'"'+a.replace(/\x22/g,'\\"')+'"'}function z(a,b){function w(a,b){return x(a,function(a,c){if(!c){y(b);return["block"]}return["for",null,null,null,d(b)]})}function p(a,b,c){a=d(a),b=d(b),c=d(c),v(b)?(a=f(a),b=c,c=null):v(c)?c=null:function(){var d=C(a),e=f(a),g=C(e);if(g.length",e,h];case"<":return["binary",">=",e,h];case">=":return["binary","<",e,h];case">":return["binary","<=",e,h]}switch(d){case"==":return["binary","!=",e,h];case"!=":return["binary","==",e,h];case"===":return["binary","!==",e,h];case"!==":return["binary","===",e,h];case"&&":return q(c,["binary","||",f(e),f(h)]);case"||":return q(c,["binary","&&",f(e),f(h)])}}return c}b=F(b,{make_seqs:!0,dead_code:!0,keep_comps:!0,no_warnings:!1});var c=k(),d=c.walk,e;return c.with_walkers({sub:function(a,b){if(b[0]=="string"){var c=b[1];if(G(c))return["dot",d(a),c]}},"if":o,toplevel:function(a){return["toplevel",i(this.scope,function(){return m(I(a,d))})]},"switch":function(a,b){var c=b.length-1;return["switch",d(a),I(b,function(a,b){var e=m(I(a[1],d));if(b==c&&e.length>0){var f=e[e.length-1];f[0]=="break"&&!f[1]&&e.pop()}return[a[0]?d(a[0]):null,e]})]},"function":function(){var a=l.apply(this,arguments);a[1]&&!H(e.refs,a[1])&&(a[1]=null);return a},defun:l,block:function(a){if(a)return j(["block",m(I(a,d))])},binary:function(a,b,c){return x(["binary",a,d(b),d(c)],function(a){return q(d(a),this)},function(){return this})},conditional:function(a,b,c){return u(d(a),d(b),d(c))},"try":function(a,b,c){return["try",m(I(a,d)),b!=null?[b[0],m(I(b[1],d))]:null,c!=null?m(I(c,d)):null]},"unary-prefix":function(a,b){b=d(b);var c=["unary-prefix",a,b];a=="!"&&(c=q(c,f(b)));return x(c,function(a,b){return d(a)},function(){return c})},name:function(a){switch(a){case"true":return["unary-prefix","!",["num",0]];case"false":return["unary-prefix","!",["num",1]]}},"new":function(a,b){if(a[0]=="name"&&a[1]=="Array"&&!e.has("Array"))return b.length!=1?["array",b]:["call",["name","Array"],b]},call:function(a,b){if(a[0]=="name"&&a[1]=="Array"&&b.length!=1&&!e.has("Array"))return["array",b]},"while":w,"do":w},function(){return d(n(a))})}function y(a){v(a)||p("Dropping unreachable code: "+C(a,!0))}function w(a){return a[0]=="string"||a[0]=="unary-prefix"&&a[1]=="typeof"||a[0]=="binary"&&a[1]=="+"&&(w(a[2])||w(a[3]))}function v(a){return!a||a[0]=="block"&&(!a[1]||a[1].length==0)}function u(a,b,c){return a[0]=="unary-prefix"&&a[1]=="!"?c?["conditional",a[2],c,b]:["binary","||",a[2],b]:c?["conditional",a,b,c]:["binary","&&",a,b]}function t(a){return a[0]=="unary-prefix"&&h(a[1],["!","delete"])||a[0]=="binary"&&h(a[1],["in","instanceof","==","!=","===","!==","<","<=",">=",">"])||a[0]=="binary"&&h(a[1],["&&","||"])&&t(a[2])&&t(a[3])||a[0]=="conditional"&&t(a[2])&&t(a[3])||a[0]=="assign"&&a[1]===!0&&t(a[3])||a[0]=="seq"&&t(a[a.length-1])}function s(a){if(a){a=r(a);if(a[0]=="return"||a[0]=="break"||a[0]=="continue"||a[0]=="throw")return!0}}function r(a){if(a[0]=="block"&&a[1]&&a[1].length>0)return a[1][a[1].length-1];return a}function q(a,b){return C(a).length>C(b[0]=="stat"?b[1]:b).length?b:a}function o(a,b){function i(a){return[this[0],I(a,function(a){return[f(a[0]),d(a[1])]})]}function h(a,b){var c=e;e=a;for(var d in a.names)H(a.names,d)&&f(d,!0);var g=b();g.scope=a,e=c;return g}function g(a,b,c,e){a&&(a=f(a)),c=h(c.scope,function(){b=I(b,function(a){return f(a)});return I(c,d)});return[this[0],a,b,c,e]}function f(a,c){if(!b&&!e.parent)return a;return e.get_mangled(a,c)}var c=k(),d=c.walk,e;return c.with_walkers({"function":g,defun:function(){var a=g.apply(this,arguments);switch(c.parent()[0]){case"toplevel":case"function":case"defun":return I.at_top(a)}return a},"var":i,"const":i,name:function(a){return[this[0],f(a)]},"try":function(a,b,c){return[this[0],I(a,d),b!=null?[f(b[0]),I(b[1],d)]:null,c!=null?I(c,d):null]},toplevel:function(a){var b=this;return h(b.scope,function(){return[b[0],I(a,d)]})},"for-in":function(a,b,c,e){return[this[0],a,f(b),d(c),d(e)]}},function(){return d(n(a))})}function n(a){function i(a,b,c,e){return[this[0],g(a),b,f(function(){I(b,g);return I(c,d)}),e]}function h(a){b.refs[a]=!0}function g(a){return b.define(a)}function f(a){b=new l(b);var c=b.body=a();c.scope=b,b=b.parent;return c}var b=null,c=k(),d=c.walk,e=[];return f(function(){function j(a,b){for(b=a.children.length;--b>=0;)j(a.children[b]);for(b in a.refs)if(H(a.refs,b))for(var c=a.has(b),d=a;d;d=d.parent){d.refs[b]=c;if(d===c)break}}var f=c.with_walkers({"function":i,defun:i,"with":function(a,c){for(var d=b;d;d=d.parent)d.uses_with=!0},"var":function(a){I(a,function(a){g(a[0])})},"const":function(a){I(a,function(a){g(a[0])})},"try":function(a,b,c){if(b!=null)return[this[0],I(a,d),[g(b[0]),I(b[1],d)],c!=null?I(c,d):null]},name:function(a){a=="eval"&&e.push(b),h(a)},"for-in":function(a,b){a?g(b):h(b)}},function(){return d(a)});I(e,function(a){if(!a.has("eval"))while(a)a.uses_eval=!0,a=a.parent}),j(b);return f})}function l(a){this.names={},this.mangled={},this.rev_mangled={},this.cname=-1,this.refs={},this.uses_with=!1,this.uses_eval=!1,this.parent=a,this.children=[],a?(this.level=a.level+1,a.children.push(this)):this.level=0}function k(a){function h(a,b){var c={},e;for(e in a)H(a,e)&&(c[e]=d[e],d[e]=a[e]);var f=b();for(e in c)H(c,e)&&(c[e]?d[e]=c[e]:delete d[e]);return f}function f(a){if(!a)return null;try{e.push(a);var b=a[0],f=d[b];if(f){var g=f.apply(a,a.slice(1));if(g!=null)return g}f=c[b];return f.apply(a,a.slice(1))}finally{e.pop()}}function b(a){return[this[0],I(a,function(a){var b=[a[0]];a.length>1&&(b[1]=f(a[1]));return b})]}var c={string:function(a){return[this[0],a]},num:function(a){return[this[0],a]},name:function(a){return[this[0],a]},toplevel:function(a){return[this[0],I(a,f)]},block:function(a){var b=[this[0]];a!=null&&b.push(I(a,f));return b},"var":b,"const":b,"import":b,"export":b,"try":function(a,b,c){return[this[0],I(a,f),b!=null?[b[0],I(b[1],f)]:null,c!=null?I(c,f):null]},"throw":function(a){return[this[0],f(a)]},"new":function(a,b){return[this[0],f(a),I(b,f)]},"switch":function(a,b){return[this[0],f(a),I(b,function(a){return[a[0]?f(a[0]):null,I(a[1],f)]})]},"break":function(a){return[this[0],a]},"continue":function(a){return[this[0],a]},conditional:function(a,b,c){return[this[0],f(a),f(b),f(c)]},assign:function(a,b,c){return[this[0],a,f(b),f(c)]},dot:function(a){return[this[0],f(a)].concat(g(arguments,1))},call:function(a,b){return[this[0],f(a),I(b,f)]},"function":function(a,b,c,d){return[this[0],a,b.slice(),I(c,f),d]},defun:function(a,b,c,d){return[this[0],a,b.slice(),I(c,f),d]},"if":function(a,b,c){return[this[0],f(a),f(b),f(c)]},"for":function(a,b,c,d){return[this[0],f(a),f(b),f(c),f(d)]},"for-in":function(a,b,c,d){return a?[this[0],f(a),f(b),f(c),f(d)]:[this[0],a,b,f(c),f(d)]},"while":function(a,b){return[this[0],f(a),f(b)]},"do":function(a,b){return[this[0],f(a),f(b)]},"return":function(a){return[this[0],f(a)]},binary:function(a,b,c){return[this[0],a,f(b),f(c)]},"unary-prefix":function(a,b){return[this[0],a,f(b)]},"unary-postfix":function(a,b){return[this[0],a,f(b)]},sub:function(a,b){return[this[0],f(a),f(b)]},object:function(a){return[this[0],I(a,function(a){return a.length==2?[a[0],f(a[1])]:[a[0],f(a[1]),a[2]]})]},regexp:function(a,b){return[this[0],a,b]},array:function(a){return[this[0],I(a,f)]},stat:function(a){return[this[0],f(a)]},seq:function(){return[this[0]].concat(I(g(arguments),f))},label:function(a,b){return[this[0],a,f(b)]},"with":function(a,b){return[this[0],f(a),f(b)]},atom:function(a){return[this[0],a]}},d={},e=[];return{walk:f,with_walkers:h,parent:function(){return e[e.length-2]},stack:function(){return e}}}var f=b("./parser"),g=f.slice,h=f.member,i=f.PRECEDENCE,j=f.OPERATORS,m=function(){var a="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_";return function(b){var c="";do c=a.charAt(b%54)+c,b=Math.floor(b/54);while(b>0);return c}}();l.prototype={has:function(a){for(var b=this;b;b=b.parent)if(H(b.names,a))return b},has_mangled:function(a){for(var b=this;b;b=b.parent)if(H(b.rev_mangled,a))return b},toJSON:function(){return{names:this.names,uses_eval:this.uses_eval,uses_with:this.uses_with}},next_mangled:function(){for(;;){var a=m(++this.cname),b;b=this.has_mangled(a);if(b&&this.refs[b.rev_mangled[a]]===b)continue;b=this.has(a);if(b&&b!==this&&this.refs[a]===b&&!b.has_mangled(a))continue;if(H(this.refs,a)&&this.refs[a]==null)continue;if(!G(a))continue;return a}},get_mangled:function(a,b){if(this.uses_eval||this.uses_with)return a;var c=this.has(a);if(!c)return a;if(H(c.mangled,a))return c.mangled[a];if(!b)return a;var d=c.next_mangled();c.rev_mangled[d]=a;return c.mangled[a]=d},define:function(a){if(a!=null)return this.names[a]=a}};var p=function(){},x=function(){function b(c){switch(c[0]){case"string":case"num":return c[1];case"name":case"atom":switch(c[1]){case"true":return!0;case"false":return!1}break;case"unary-prefix":switch(c[1]){case"!":return!b(c[2]);case"typeof":return typeof b(c[2]);case"~":return~b(c[2]);case"-":return-b(c[2]);case"+":return+b(c[2])}break;case"binary":var d=c[2],e=c[3];switch(c[1]){case"&&":return b(d)&&b(e);case"||":return b(d)||b(e);case"|":return b(d)|b(e);case"&":return b(d)&b(e);case"^":return b(d)^b(e);case"+":return b(d)+b(e);case"*":return b(d)*b(e);case"/":return b(d)/b(e);case"-":return b(d)-b(e);case"<<":return b(d)<>":return b(d)>>b(e);case">>>":return b(d)>>>b(e);case"==":return b(d)==b(e);case"===":return b(d)===b(e);case"!=":return b(d)!=b(e);case"!==":return b(d)!==b(e);case"<":return b(d)":return b(d)>b(e);case">=":return b(d)>=b(e);case"in":return b(d)in b(e);case"instanceof":return b(d)instanceof b(e)}}throw a}var a={};return function(c,d,e){try{var f=b(c),g;switch(typeof f){case"string":g=["string",f];break;case"number":g=["num",f];break;case"boolean":g=["name",String(f)];break;default:throw new Error("Can't handle constant of type: "+typeof f)}return d.call(c,g,f)}catch(h){if(h===a){c[0]=="binary"&&(c[1]=="==="||c[1]=="!==")&&(w(c[2])&&w(c[3])||t(c[2])&&t(c[3]))&&(c[1]=c[1].substr(0,2));return e?e.call(c,c):null}throw h}}}(),A=f.array_to_hash(["name","array","string","dot","sub","call","regexp"]),I;(function(){function a(a){this.v=a}I=function(b,c,d){var e=[];for(var f=0;f-1&&(f(b)?e=e.split("\n").map(function(a){return" "+a}).join("\n").substr(2):e="\n"+e.split("\n").map(function(a){return" "+a}).join("\n"))):e=j("[Circular]","special"));if(typeof c=="undefined"){if(p==="Array"&&a.match(/^\d+$/))return e;c=JSON.stringify(""+a),c.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(c=c.substr(1,c.length-2),c=j(c,"name")):(c=c.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),c=j(c,"string"))}return c+": "+e});i.pop();var t=0,u=s.reduce(function(a,b){t++,b.indexOf("\n")>=0&&t++;return a+b.length+1},0);u>50?s=q[0]+(o===""?"":o+"\n ")+" "+s.join(",\n ")+" "+q[1]:s=q[0]+o+" "+s.join(", ")+" "+q[1];return s}var i=[],j=function(a,b){return a};return k(b,typeof d=="undefined"?2:d)}}},modules.runtime_string=module={id:"runtime_string",exports:{},block:function(a,b,c,d,e){String.prototype.repeat||(String.prototype.repeat=function(a){s="";while(a--)s+=this;return s}),String.prototype.padLeft||(String.prototype.padLeft=function(a,b){if(this.length>=a)return this;return String(b||" ").repeat(a-this.length)+this}),String.prototype.padRight||(String.prototype.padRight=function(a,b){if(this.length>=a)return this;return this+String(b||" ").repeat(a-this.length)}),String.prototype.editDistance||(String.prototype.editDistance=function(a){var b,c=(b=this.split("")).length,d=(a=a.split("")).length,e,f,g,h;if(!c&&!d)return Math.max(c,d);for(var i=[],e=c+1;e;i[--e]=[e]);for(e=d+1;i[0][--e]=e;);for(e=-1,g=b.length;++e=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122},a.is_digit_char=function(a){return a>=48&&a<=57},a.HOP=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},a.is_substr_eq=function(a,b,c){var d=c.length;while(--d!==-1)if(a.charCodeAt(b+d)!==c.charCodeAt(d))return!1;return!0}}};var move=_require("index");move.runtime._require=_require,move.onScriptLoaded=function(a,b,c){if(a)throw a;Function(b)()},move.scriptCompilationOptions={preprocess:["ehtml"]},move.runBrowserScripts=function(a,b){var c,d,e,f,g,h=move.scriptCompilationOptions,i=0,j=[],k=0,l=function(){++k},m=function(){if(--k===0){var a=0,c=j.length;for(;a",g=move.compile(c.innerHTML,h),j[a]=[null,g,c]}catch(b){j[a]=[b,null,c]}m()}}(i++);m();return null};var _runScripts=function(){move.runBrowserScripts()};window.addEventListener?addEventListener("DOMContentLoaded",_runScripts,!1):attachEvent("onload",_runScripts);return move}() \ No newline at end of file +window.move=function(){typeof window.global=="undefined"&&(window.global=window);var modules={},_require=function a(b){if(++a.depth>20)throw new Error("Recursive module dependencies");b=b.replace(/^[\/.]+/g,"");var c=modules[b];if(!c)throw new Error('No module with id "'+b+'"');if(c.block){var d=c.block;c.block=null,d(c.exports,a,c)}a.depth--;return c.exports};_require.depth=0,modules["ast-mutators"]=module={id:"ast-mutators",exports:{},block:function(a,b,c,d,e){var f=b("./parser"),g=b("./process"),h=b("./util").array_to_hash;a.add_implicit_returns=function(b){var c=g.ast_walker(),d=g.MAP,e;e=function a(b){if(!b)return b;var c=b[0],d;if(c==="stat")b[0]="return";else{if(c==="defun"){b[0]="function";return["return",b]}if(c==="if")for(d=2;d1&&(b[1]=d.walk(a[1]));return b})]},"import":function(a){e(a,function(a){m(a[0]),j.vars.push(a[0])})},"export":function(a){e(a,function(a){m(a[0]),j.vars.push(a[0])})},"const":function(a){e(a,function(a){m(a[0])})},assign:function(a,b,c){if(b[0]==="name"){var e=b[1],f=j.has(e);f||(j.vars.push(e),m(e))}return[this[0],a,d.walk(b),d.walk(c)]},"for-in":function(a,b,c,e){if(a)return[this[0],d.walk(a),d.walk(b),d.walk(c),d.walk(e)];j.has(b)||(j.vars.push(b),m(b));return[this[0],a,b,d.walk(c),d.walk(e)]}},function(){return d.walk(b)});return a})};var i=/^[_\$a-z][_\$\w\d]*$/i;a.named_lambda_assignments=function(b){var c=g.ast_walker(),d=g.MAP,e=c.with_walkers({"export":function(a){return[this[0],d(a,function(a){var b=[a[0]];a.length>1&&(a[1]&&a[1][0]==="function"&&!a[1][1]&&(a[1][1]=a[0]),b[1]=c.walk(a[1]));return b})]},assign:function(a,b,d){if(Array.isArray(d)&&d[0]==="function"&&!d[1])if(b[0]==="name")d[1]=b[1];else if(b[0]==="dot")d[1]=b[b.length-1];else if(b[0]==="sub"&&b[2][0]==="string"){var e=b[2][1];!f.KEYWORDS[e]&&!f.RESERVED_WORDS[e]&&i.test(e)&&(d[1]=e)}return[this[0],a,c.walk(b),c.walk(d)]}},function(){return c.walk(b)});return e},a.enforce_strict_eq_ops=function(b){var c=g.ast_walker(),d=g.MAP;return c.with_walkers({binary:function(a,b,d){a==="=="?a="===":a==="!="&&(a="!==");return[this[0],a,c.walk(b),c.walk(d)]}},function(){return c.walk(b)})},a.enable_keyword_arguments=function(b,c){var d=g.ast_walker(),e=g.MAP;typeof c!="object"&&(c={});var f=c.raw?"true":"_MoveKWArgsT";return d.with_walkers({"function":function(a,b,c,g){if(b.length){var h,i,j,k=["seq"],l=b[0],m=[null],n=["binary","&&",["binary","!==",["name",l],["name","null"]],["binary","&&",["binary","===",["unary-prefix","typeof",["name",l]],["string","object"]],["binary","===",["dot",["name",l],"__kw"],["name",f]]]];k.push(["assign",!0,["dot",["name","arguments"],"keywords"],["name",l]]);for(h=b.length;--h!==-1;)i=b[h],j=g&&g[i],k.push(["assign",!0,["name",i],["dot",["name",l],i]]),j&&m.push(["if",["binary","===",["name",i],["name","undefined"]],["stat",["assign",!0,["name",i],j]]]);m[0]=["stat",["binary","&&",n,k]],c=m.concat(c)}return[this[0],a,b,e(c,d.walk),g]},call:function(a,b){if(b.length===1&&b[0][0]==="object"){var c,g=b[0][1],h=[];for(var i=g.length;--i!==-1;)c=g[i],c[0]==="__kw"&&c[1]&&c[1][1]==="__Move_KWArgs__"&&h.push(i);if(h.length){while(h.length>1)delete g[h.pop()];g[h.pop()]=["__kw",["name",f]]}}return[this[0],d.walk(a),e(b,d.walk)]}},function(){return d.walk(b)})}}},modules.cli=module={id:"cli",exports:{},block:function(a,b,c,d,e){(function(){"use strict";var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;c=__move.runtime,d=c._MoveKWArgsT,e=c.Text,f=c.extend,g=c.create,h=c.print,i=c.repeat,j=c.after,k=c.JSON,l=b("fs"),m=b("./optparse"),n="Usage: move [options] []",o=[["-h","--help","Display help"]],p={},q=[],r=function(b){b!==null&&typeof b=="object"&&b.__kw===d&&(arguments.keywords=b,b=b.die),console.error((new m.OptionParser(o,n)).help());if(b!==undefined)return process.exit(b)},a.main=s=function(){t();if(p.help)return r();if(p.run){q.length||(console.error("At least one file must be specified"),r(1));return q.forEach(function(a){a!==null&&typeof a=="object"&&a.__kw===d&&(arguments.keywords=a,a=a.filename);try{a=l.realpathSync(a)}catch(c){c.errno!==undefined&&(console.error(c.message),process.exit(1));throw c}return b(a)})}};return t=function(){var b,c;b=new m.OptionParser(o,n),p=c=b.parse(process.argv.slice(2)),c.run=!c.compile&&!c.ast;return q=c.arguments}})()}},modules.ehtml=module={id:"ehtml",exports:{},block:function(a,b,c,d,e){(function(){"use strict";var b,c,d,e,f,g,h,i,j,k,l;b=__move.runtime,c=b._MoveKWArgsT,d=b.Text,e=b.extend,f=b.create,g=b.print,h=b.repeat,i=b.after,j=b.JSON,a.EHTML=k=function a(b){b!==null&&typeof b=="object"&&b.__kw===c&&(arguments.keywords=b,b=b.html);var d;a.spawnerElement||(a.spawnerElement=document.createElement("div")),a.spawnerElement.innerHTML=b,d=a.spawnerElement.firstChild,d.toString=function(){return b};return d},a.preprocessEHTML=l=function(b){b!==null&&typeof b=="object"&&b.__kw===c&&(arguments.keywords=b,b=b.src);var d,e,f,g;d=0,e=function(e){e!==null&&typeof e=="object"&&e.__kw===c&&(arguments.keywords=e,e=e.endch);var f,g;f=null;while(g=b[d++]){if(g===e&&f!=="\\")break;f=g}},f=function(){var e,f,h,i,j,k,l,m;e=0,f=d-1,h="<",i=[];while(h==="<"){j=k=null;while((h=b[d++])&&h!==">")j===null&&(j=h),h==="{"&&k!=="\\"&&(i.push([!0,f,d-1]),f=d,l=g(!0),i.push([!1,l]),f=d),k=h;if(j==="/"){--e;if(e<0)throw Error("EHTML: Premature termination")}else k!=="/"&&++e;if(!h||e===0)break;while((h=b[d++])&&h!=="<")h==="{"&&k!=="\\"&&(i.push([!0,f,d-1]),f=d,l=g(!0),i.push([!1,l]),f=d),k=h}i.push([!0,f,d]),m="",i.forEach(function(a){a!==null&&typeof a=="object"&&a.__kw===c&&(arguments.keywords=a,a=a.range);var d;a[0]?(d=b.substring(a[1],a[2]),d=d.replace(/\n/g,"\\n"),d=d.replace(/\t/g,"\\t"),d=d.replace(/'/g,"\\'")):d="'+("+a[1]+")+'";return m+=d}),m="__move.EHTML('"+m+"')";return m},g=function(g){g!==null&&typeof g=="object"&&g.__kw===c&&(arguments.keywords=g,g=g.isDeep);var h,i,j,k,l,m,n,o,p;h="",i=0,j=1,k=i,l=null,m=1;while(n=b[d++]){o=!1;switch(n){case" ":case"\n":case"\r":case"\t":h+=n;break;case'"':p=d,e('"'),h+=b.substring(p-1,d);break;case"'":p=d,e("'"),h+=b.substring(p-1,d);break;case"<":k===j?(k=i,h+=n):h+=f();break;default:h+=n,o=!0}if(o){if(g&&l!=="\\")if(n==="{")++m;else if(n==="}"&&--m===0){h=h.substr(0,h.length-1);break}n.match(/[a-z0-9_\)\}]/i)?k=j:k=i}l=n}return h};return g()}})()}},modules.es5_array=module={id:"es5_array",exports:{},block:function(a,b,c,d,e){Array.isArray||(Array.isArray=function(b){return b instanceof Array||Object.prototype.toString.call(b)==="[object Array]"}),Array.prototype.indexOf||(Array.prototype.indexOf=function(b,c){var d,e=this.length;for(d=+c||0;d>>0;for(var e=0;e>>0;for(var e=0;e>>0;for(var e=0;e>>0,e=Array(d);for(var f=0;f>>0,d=0,e;if(c===0&&arguments.length===1)throw new TypeError;if(arguments.length>=2)e=arguments[1];else do{if(d in this){e=this[d++];break}if(++d>=c)throw new TypeError}while(!0);for(;d1&&(g=processor.ast_squeeze_more(g));if(!d.codegen)return g;var l=processor.gen_code(g,d.outputFormatting);d.strict&&(d.raw?l='"use strict";'+l:l=l.replace(/\(function\s*\(\)\s*\{/,'(function(){"use strict";')),exports.debug&&typeof console!="undefined"&&console.log((c.filename||"")+" -> \n"+l);return d.detailedOutput?{ast:g,code:l}:l},exports.compileFileSync=function(b,c){if(!fs)throw new Error("File system access is not supported");typeof c=="object"&&!c.filename?c.filename=b:c={filename:b};return exports.compile(fs.readFileSync(b,"utf8"),c)},exports.eval=function(a,b){if(!b||typeof b!="object")b={};var c=exports.compile(a,b);return function(){var a=exports;return evalFunc(c.code!==undefined?c.code:c,String(b.filename||""))}()};var evalFunc;try{evalFunc=require("vm").runInThisContext}catch(e){evalFunc=eval}typeof window!="undefined"&&window?exports.compileURL=function(b,c,d){var e=parseKWArgs(arguments,[["url"],["options"],["callback"]]);typeof e.options=="function"&&(e.callback=e.options,e.options={});var f=window.ActiveXObject?new window.ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest;f.open("GET",e.url,!0),"overrideMimeType"in f&&f.overrideMimeType("text/plain"),f.onreadystatechange=function(){if(f.readyState===4){var a,c,d=b.indexOf("://")!==-1?b.match(/^http/):document.location.protocol.match(/^http/);if(d&&String(f.status).charAt(0)==="2"||!d&&f.status===0)try{a=move.compile(f.responseText,e.options)}catch(g){c=g}else f.status&&f.statusText?(c=new Error("HTTP request error: "+f.status+" "+f.statusText),c.httpStatus=f.status):c=new Error("Unspecified HTTP request error");if(typeof e.callback=="function")e.callback(c,a);else if(c)throw c}};return f.send(null)}:!http;var parseKWArgs=function(b,c){var d=b[0],e,f,g,h;if(typeof d=="object"&&d.__kw===_MoveKWArgsT){e=d;for(h=0;h0?Array(d+1).join(" "):"",a=c.shortFlag?c.shortFlag+", ":" ",b.push(" "+a+c.longFlag+d+c.description);return b.join("\n")+"\n"};return a}(),b=/^(--\w[\w\-]+)/,f=/^(-\w)/,c=/^-(\w{2,})/,d=/\[(\w+(\*?))\]/,h=function(a){var b,c,d,e;e=[];for(c=0,d=a.length;c=0;)if(b[c]===a)return!0;return!1}function N(a){return a.split("")}function M(a,b){return Array.prototype.slice.call(a,b==null?0:b)}function L(a){var b={};for(var c=0;c0;++b)arguments[b]();return a}function J(a){var b=M(arguments,1);return function(){return a.apply(this,b.concat(M(arguments)))}}function I(a,b,c){function br(a){try{++e.in_loop;return a()}finally{--e.in_loop}}function bq(a){arguments.length==0&&(a=!0);var b=bp();if(a&&f("punc",",")){h();return s("seq",b,bq())}return b}function bp(){var a=bn(),b=e.token.value;if(f("operator")&&P(D,b)){if(bo(a)){h();return s("assign",D[b],a,bp())}j("Invalid assignment")}return a}function bo(a){switch(a[0]){case"dot":case"sub":return!0;case"name":return a[1]!="this"}}function bn(){var a=bm();if(f("operator","?")){h();var b=bq(!1);o(":");return s("conditional",a,b,bq(!1))}return a}function bm(){return bl(ba(!0),0)}function bl(a,b){var c=f("operator")?e.token.value:null,d=c!=null?E[c]:null;if(d!=null&&d>b){h();var g=bl(ba(!0),d);return bl(s("binary",c,a,g),b)}return a}function bk(a,b,c){(b=="++"||b=="--")&&!bo(c)&&j("Invalid use of "+b+" operator");return s(a,b,c)}function bj(a,b){if(f("punc",".")){h();return bj(s("dot",a,bh()),b)}if(f("punc","[")){h();var c=null,i=null;f("punc",":")?h():c=K(bq,J(p,"]",":"));if(e.prev.value===":"){f("punc","]")?h():i=K(bq,J(o,"]"));return bi(a,c,i,b)}return bj(s("sub",a,c),b)}if(b&&f("punc","(")){h();return bj(s("call",a,bb(")")),!0)}if(b&&d.keywordArguments&&f("punc","{")){h();var j;f("operator","&")?(h(),j=bq(!1),o("}"),d.raw||(j=["call",["name","_MoveKWArgsT"],[j]])):(j=be(),j[1].push(["__kw",["name","__Move_KWArgs__"]]));var k=a;return bj(s("call",k,[j]),!0)}if(b&&f("operator")&&P(C,e.token.value))return K(J(bk,"unary-postfix",e.token.value,a),h);if(b&&!e.token.nlb&&!f("eof")&&!f("punc")&&!f("operator")&&(e.token.type!=="keyword"||e.token.value==="function")){var l=[],m=!0,n;while(!f("punc",";")){if(m)m=!1;else if(f("punc",",")&&!g().nlb)h();else{n=!0;break}l.push(bq(!1))}!n&&!f("punc",";")&&h();if(e.token.nlb||f("punc",";"))return s("call",a,l);return bj(s("call",a,l),!0)}return a}function bi(a,b,c,d){if(f("operator","=")){h();var e=v();return bj(["call",["dot",a,"_move_setSlice"],[b||["num","0"],c||["name","undefined"],e[1]||["name","undefined"]]],d)}var g=[b||["num","0"]];c&&g.push(c);return bj(["call",["dot",a,"slice"],g],d)}function bh(){switch(e.token.type){case"name":case"operator":case"keyword":case"atom":return K(e.token.value,h);default:l()}}function bg(){switch(e.token.type){case"num":case"string":return K(e.token.value,h)}return bh()}function bf(){var a=!0,c,d,g=[],i={};while(!f("punc",")")){a?a=!1:o(",");if(!b&&f("punc",")"))break;c=e.token.type,d=bg(),g.push(d),f("punc",":")&&(h(),i[d]=bq(!1))}h();return{names:g,values:i}}function be(){var a=!0,c=[];while(!f("punc","}")){a?a=!1:o(",");if(!b&&f("punc","}"))break;var d=e.token.type,g=bg();d!="name"||g!="get"&&g!="set"||!!f("punc",":")?(o(":"),c.push([g,bq(!1)])):c.push([bh(),Q(!1),g])}h();return s("object",c)}function bd(){return s("array",bb("]",!b,!0))}function bc(a,b,c,d){var e=!0,g=[];d||(d=0x10000000000000000);try{while(!f("punc",a)&&--d){e?e=!1:o(",");if(b&&f("punc",a))break;f("punc",",")&&c?g.push(["atom","undefined"]):g.push(bq(!1))}h()}catch(i){if(String(i.message).indexOf("Unexpected token")!==0)throw i}return g}function bb(a,b,c){var d=!0,e=[];while(!f("punc",a)){d?d=!1:o(",");if(b&&f("punc",a))break;f("punc",",")&&c?e.push(["atom","undefined"]):e.push(bq(!1))}h();return e}function ba(a){if(f("operator","new")){h();return _()}if(f("operator")&&P(B,e.token.value))return bk("unary-prefix",K(e.token.value,h),ba(a));if(f("punc")){switch(e.token.value){case"(":h();return bj(K(bq,J(o,")")),a);case"[":h();return bj(bd(),a);case"{":h();return bj(be(),a)}l()}if(f("keyword","function")){h();return bj(Q(!1),a)}if(P(G,e.token.type)){var b=e.token.type=="regexp"?s("regexp",e.token.value[0],e.token.value[1]):s(e.token.type,e.token.value);return bj(K(b,h),a)}l()}function _(){var a=ba(!1),b;f("punc","(")?(h(),b=bb(")")):b=[];return bj(s("new",a,b),!0)}function $(){return s("export",W())}function Z(){return s("import",W())}function Y(){return s("const",W())}function X(){return s("var",W())}function W(){var a=[];for(;;){f("name")||l();var b=e.token.value;h(),f("operator","=")?(h(),a.push([b,bq(!1)])):a.push([b]);if(!f("punc",","))break;h()}return a}function V(){var a=T(),b,c;if(f("keyword","catch")){h(),o("("),f("name")||j("Name expected");var d=e.token.value;h(),o(")"),b=[d,T()]}f("keyword","finally")&&(h(),c=T()),!b&&!c&&j("Missing catch/finally blocks");return s("try",a,b,c)}function T(){o("{");var a=[];while(!f("punc","}"))f("eof")&&l(),a.push(v());h();return a}function S(){var a=t(),b=v(),c;f("keyword","else")&&(h(),c=v());return s("if",a,b,c)}function R(a){var b=f("name")?K(e.token.value,h):null;a&&!b&&!e.in_function&&l(),o("(");var c=bf();return s(a?"defun":"function",b,c.names,function(){++e.in_function;var a=e.in_loop;e.in_loop=0;var b=T();--e.in_function,e.in_loop=a;return b}(),c.values)}function N(){o("(");var a=!d.automaticVarDeclarations&&f("keyword","var");a&&h();if(f("name")&&y(g(),"operator","in")){var b=e.token.value;h(),h();var c=bq();o(")");return s("for-in",a,b,c,br(v))}var i=f("punc",";")?null:a?X():bq();o(";");var j=f("punc",";")?null:bq();o(";");var k=f("punc",")")?null:bq();o(")");return s("for",i,j,k,br(v))}function L(a){var b=f("name")?e.token.value:null;b!=null?(h(),O(b,e.labels)||j("Label "+b+" without matching loop or statement")):e.in_loop==0&&j(a+" not inside a loop or switch"),r();return s(a,b)}function I(){return s("stat",K(bq,r))}function z(a){e.labels.push(a);var c=e.token,d=v();b&&!P(F,d[0])&&l(c),e.labels.pop();return s("label",a,d)}function w(){f("operator","/")&&(e.peeked=null,e.token=e.input(!0)),d.automaticVarDeclarations&&e.token.type==="keyword"&&e.token.value==="var"&&l();switch(e.token.type){case"num":case"string":case"regexp":case"operator":case"atom":return I();case"name":return y(g(),"punc",":")?z(K(e.token.value,h,h)):I();case"punc":switch(e.token.value){case"{":return s("block",T());case"[":case"(":return I();case";":h();return s("block");default:l()};case"keyword":switch(K(e.token.value,h)){case"break":return L("break");case"continue":return L("continue");case"debugger":r();return s("debugger");case"do":return function(a){m("keyword","while");return s("do",K(t,r),a)}(br(v));case"for":return N();case"function":return Q(!0);case"if":return S();case"return":e.in_function==0&&j("'return' outside of function");return s("return",f("punc",";")?(h(),null):q()?null:K(bq,r));case"switch":return s("switch",t(),U());case"throw":return s("throw",K(bq,r));case"try":return V();case"var":return K(X,r);case"const":return K(Y,r);case"while":return s("while",t(),br(v));case"with":j("'with' statement not allowed");case"import":return K(Z,r);case"export":return K($,r);default:l()}}}function u(a,b,c){return a instanceof H?a:new H(a,b,c)}function t(){o("(");var a=bq();o(")");return a}function s(){return M(arguments)}function r(){f("punc",";")?h():q()||l()}function q(){return!b&&(e.token.nlb||f("eof")||f("punc","}"))}function p(a,b){return n("punc",a,"punc",b)}function o(a){return m("punc",a)}function n(a,b,c,d){if(f(a,b)||f(c,d))return h();k(e.token,"Unexpected token: "+e.token.type+", expected "+a+" or "+c)}function m(a,b){if(f(a,b))return h();k(e.token,"Unexpected token: "+e.token.type+", expected "+a)}function l(a){a==null&&(a=e.token),k(a,"Unexpected token: "+a.type+" ("+a.value+")")}function k(a,b){j(b,a.line,a.col)}function j(a,b,c,d){var f=e.input.context();x(a,b!=null?b:f.tokline,c!=null?c:f.tokcol,d!=null?d:f.tokpos)}function i(){return e.prev}function h(){e.prev=e.token,e.peeked?(e.token=e.peeked,e.peeked=null):e.token=e.input();return e.token}function g(){return e.peeked||(e.peeked=e.input())}function f(a,b){return y(e.token,a,b)}var d={};typeof b=="object"&&(d=b,b=d.strictMode,c=d.embedTokens);var e={input:typeof a=="string"?A(a,d):a,token:null,prev:null,peeked:null,in_function:0,in_loop:0,labels:[]};e.token=h();var v=c?function(){var a=e.token,b=w.apply(this,arguments);b[0]=u(b[0],a,i());return b}:w,Q=c?function(){var a=i(),b=R.apply(this,arguments);b[0]=u(b[0],a,i());return b}:R,U=J(br,function(){o("{");var a=[],b=null;while(!f("punc","}"))f("eof")&&l(),f("keyword","case")?(h(),b=[],a.push([bq(),b]),o(":")):f("keyword","default")?(h(),o(":"),b=[],a.push([null,b])):(b||l(),b.push(v()));h();return a});return s("toplevel",function(a){while(!f("eof"))a.push(v());return a}([]))}function H(a,b,c){this.name=a,this.start=b,this.end=c}function A(a,b){function O(a){if(c.queued_tokens.length)return c.queued_tokens.shift();if(a)return I();w(),l();var b=d();if(!b)return m("eof");if(u(b))return B();if(b==='"'||b==="'")return F();if(P(q,b))return m("punc",e());if(b===".")return L();if(b==="/")return K();if(b==="#"){var f=c.regex_allowed;c.comments_before.push(G()),c.regex_allowed=f;return O()}if(b==="^"){e(),b=d(),b==="{"&&(c.queued_tokens.push(m("punc","(")),c.queued_tokens.push(m("punc",")")));return m("keyword","function")}if(P(j,b))return J();if(b==="@"){e();var g=M(),h=m("name","this");h.nlb=g.nlb,g.nlb=!1,c.queued_tokens.push(m("punc",".")),c.queued_tokens.push(g);return h}if(t(b))return M();A("Unexpected character '"+b+"'")}function N(a,b){try{return b()}catch(c){if(c===z)A(a);else throw c}}function M(){var a=y(t);return P(f,a)?P(n,a)?m("operator",a):P(i,a)?m("atom",a):m("keyword",a):m("name",a)}function L(){e();return u(d())?B("."):m("punc",".")}function K(){e();var a=c.regex_allowed;switch(d()){case"/":c.comments_before.push(G()),c.regex_allowed=a;return O();case"*":c.comments_before.push(H()),c.regex_allowed=a;return O()}return c.regex_allowed?I():J("/")}function J(a){function b(a){if(!d())return a;var c=a+d();if(P(n,c)){e();return b(c)}return a}return m("operator",b(a||e()))}function I(){return N("Unterminated regular expression",function(){var a=!1,b="",c,d=!1;while(c=e(!0))if(a)b+="\\"+c,a=!1;else if(c=="[")d=!0,b+=c;else if(c=="]"&&d)d=!1,b+=c;else{if(c=="/"&&!d)break;c=="\\"?a=!0:b+=c}var f=y(function(a){return P(r,a)});return m("regexp",[b,f])})}function H(){e();return N("Unterminated multiline comment",function(){var a=k("*/",!0),b=c.text.substring(c.pos,a),d=m("comment2",b,!0);c.pos=a+2,c.line+=b.split("\n").length-1,c.newline_before=b.indexOf("\n")>=0;return d})}function G(){e();var a=k("\n"),b;a==-1?(b=c.text.substr(c.pos),c.pos=c.text.length):(b=c.text.substring(c.pos,a),c.pos=a);return m("comment1",b,!0)}function F(){return N("Unterminated string constant",function(){var a=e(),b="";for(;;){var c=e(!0);if(c=="\\")c=D();else if(c==a)break;b+=c}return m("string",b)})}function E(a){var b=0;for(;a>0;--a){var c=parseInt(e(!0),16);isNaN(c)&&A("Invalid hex-character pattern in string"),b=b<<4|c}return b}function D(){var a=e(!0);switch(a){case"n":return"\n";case"r":return"\r";case"t":return"\t";case"b":return"\b";case"v":return" ";case"f":return"\f";case"0":return"";case"x":return String.fromCharCode(E(2));case"u":return String.fromCharCode(E(4));default:return a}}function B(a){var b=!1,c=!1,d=!1,e=a==".",f=y(function(f,g){if(f=="x"||f=="X"){if(d)return!1;return d=!0}if(!d&&(f=="E"||f=="e")){if(b)return!1;return b=c=!0}if(f=="-"){if(c||g==0&&!a)return!0;return!1}if(f=="+")return c;c=!1;if(f=="."){if(!e)return e=!0;return!1}return s(f)});a&&(f=a+f);var g=v(f);if(!isNaN(g))return m("num",g);A("Invalid syntax: "+f)}function A(a){x(a,c.tokline,c.tokcol,c.tokpos)}function y(a){var b="",c=d(),f=0;while(c&&a(c,f++))b+=e(),c=d();return b}function w(){while(P(o,d()))e()}function m(a,b,d){c.regex_allowed=a=="operator"&&!P(C,b)||a==="keyword"&&P(h,b)||a==="punc"&&P(p,b)||a==="name";var e={type:a,value:b,line:c.tokline,col:c.tokcol,pos:c.tokpos,nlb:c.newline_before};d||(e.comments_before=c.comments_before,c.comments_before=[]),c.newline_before=!1,c.prev_token=e;return e}function l(){c.tokline=c.line,c.tokcol=c.col,c.tokpos=c.pos}function k(a,b){var d=c.text.indexOf(a,c.pos);if(b&&d==-1)throw z;return d}function g(){return!c.peek()}function e(a){var b=c.text.charAt(c.pos++);if(a&&!b)throw z;b=="\n"?(c.newline_before=!0,++c.line,c.col=0):++c.col;return b}function d(){return c.text.charAt(c.pos)}typeof b!="object"&&(b={});var c={text:a.replace(/\r\n?|[\n\u2028\u2029]/g,"\n").replace(/^\uFEFF/,""),pos:0,tokpos:0,line:0,tokline:0,col:0,tokcol:0,newline_before:!1,regex_allowed:!1,comments_before:[],queued_tokens:[]};O.context=function(a){a&&(c=a);return c};return O}function y(a,b,c){return a.type==b&&(c==null||a.value==c)}function x(a,b,c,d){throw new w(a,b,c,d)}function w(a,b,c,d){this.name="JS_Parse_Error",this.message=a,this.line=b,this.col=c,this.pos=d;try{({})()}catch(e){this.stack=this.message,e&&e.stack&&(this.stack+="\n"+e.stack.split(/[\r\n]/).slice(3).join("\n"))}}function v(a){if(k.test(a))return parseInt(a.substr(2),16);if(l.test(a))return parseInt(a.substr(1),8);if(m.test(a))return parseFloat(a)}function u(a){a=a.charCodeAt(0);return a>=48&&a<=57}function t(a){return s(a)||a=="$"||a=="_"}function s(a){a=a.charCodeAt(0);return a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122}var f=L(["break","case","catch","const","continue","default","delete","do","else","finally","for","function","if","in","instanceof","new","return","switch","throw","try","typeof","var","void","while","with","import","export","xor"]);a.KEYWORDS=f;var g=L(["abstract","boolean","byte","char","class","debugger","double","enum","extends","final","float","goto","implements","int","interface","long","native","package","private","protected","public","short","static","super","synchronized","throws","transient","volatile"]);a.RESERVED_WORDS=g;var h=L(["return","new","delete","throw","else","case"]),i=L(["false","null","true","undefined"]),j=L(N("+-*&%=<>!?|~")),k=/^0x[0-9a-f]+$/i,l=/^0[0-7]+$/,m=/^\d*\.?\d*(?:e[+-]?\d*(?:\d\.?|\.?\d)\d*)?$/i,n=L(["in","instanceof","typeof","new","void","delete","++","--","+","-","!","~","&","|","*","/","%",">>","<<",">>>","<",">","<=",">=","==","===","!=","!==","?","=","+=","-=","/=","*=","%=",">>=","<<=",">>>=","%=","|=","&=","&&","||","xor"]),o=L(N(" \n\r\t")),p=L(N("[{}(,.;:")),q=L(N("[]{}(),;:")),r=L(N("gmsiy"));w.prototype.toString=function(){return this.message+" (line: "+this.line+", col: "+this.col+", pos: "+this.pos+")"+"\n\n"+this.stack};var z={},B=L(["typeof","void","delete","--","++","!","~","-","+"]),C=L(["--","++"]),D=function(a,b,c){while(c>=","<<=",">>>=","|=","xor=","&="],{"=":!0},0),E=function(a,b){for(var c=0,d=1;c","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]],{}),F=L(["for","do","while","switch"]),G=L(["atom","num","string","regexp","name"]);H.prototype.toString=function(){return this.name},a.tokenizer=A,a.parse=I,a.slice=M,a.curry=J,a.member=O,a.array_to_hash=L,a.PRECEDENCE=E,a.KEYWORDS_ATOM=i,a.RESERVED_WORDS=g,a.KEYWORDS=f,a.ATOMIC_START_TOKEN=G,a.OPERATORS=n,a.is_alphanumeric_char=s,a.is_identifier_char=t}},modules.process=module={id:"process",exports:{},block:function(a,b,c,d,e){function H(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function G(a){return/^[a-z_$][a-z0-9_$]*$/i.test(a)&&a!="this"&&!H(f.KEYWORDS_ATOM,a)&&!H(f.RESERVED_WORDS,a)&&!H(f.KEYWORDS,a)}function F(a,b){var c={};a===!0&&(a={});for(var d in b)H(b,d)&&(c[d]=a&&H(a,d)?a[d]:b[d]);return c}function E(a,b){if(b<=0)return"";if(b==1)return a;var c=E(a,b>>1);c+=c,b&1&&(c+=a);return c}function D(a,b){var c=[0];f.parse(function(){function j(){var a=d.apply(this,arguments);out:{if(g&&g.type=="keyword")break out;if(h(a)>b)switch(a.type){case"keyword":case"atom":case"name":case"punc":i(a);break out}}g=a;return a}function i(a){e=a.pos,c.push(e)}function h(a){return a.pos-e}var d=f.tokenizer(a),e=0,g;j.context=function(){return d.context.apply(this,arguments)};return j}());return c.map(function(b,d){return a.substring(b,c[d+1]||a.length)}).join("\n")}function C(a,b){function K(a){if(!!a){var b=a[0],c=t[b];if(!c)throw new Error("Can't find generator for \""+b+'"');J.push(a);var d=c.apply(b,a.slice(1));J.pop();return d}}function D(a){var b=a[0],c=a[1];c!=null&&(b=n([b,"=",K(c)]));return b}function C(a){if(!a)return";";if(a.length==0)return"{}";return"{"+d+m(function(){return y(a).join(d)})+d+l("}")}function z(a){var c=a.length;if(c==0)return"{}";return"{"+d+I(a,function(a,e){var f=a[1].length>0,g=m(function(){return l(a[0]?n(["case",K(a[0])+":"]):"default:")},.5)+(f?d+m(function(){return y(a[1]).join(d)}):"");!b&&f&&e1&&(c=a[1][1]);return b+" = require("+K(["string",c])+")"}))+";"},"export":function(a){return o(I(a,function(b){var c=b[0],d=c;b.length>1&&(d=b[1][1]);return"exports."+c+" = "+o(I(a,D))}))+";"},"try":function(a,b,c){var d=["try",C(a)];b&&d.push("catch","("+b[0]+")",C(b[1])),c&&d.push("finally",C(c));return n(d)},"throw":function(a){return n(["throw",K(a)])+";"},"new":function(a,b){b=b.length>0?"("+o(I(b,K))+")":"";return n(["new",p(a,"seq","binary","conditional","assign",function(a){var b=k(),c={};try{b.with_walkers({call:function(){throw c},"function":function(){return this}},function(){b.walk(a)})}catch(d){if(d===c)return!0;throw d}})+b])},"switch":function(a,b){return n(["switch","("+K(a)+")",z(b)])},"break":function(a){var b="break";a!=null&&(b+=" "+x(a));return b+";"},"continue":function(a){var b="continue";a!=null&&(b+=" "+x(a));return b+";"},conditional:function(a,b,c){return n([p(a,"assign","seq","conditional"),"?",p(b,"seq"),":",p(c,"seq")])},assign:function(a,b,c){a&&a!==!0?a+="=":a="=",c||console.log("assign:",a,b,c);return n([K(b),a,p(c,"seq")])},dot:function(a){var b=K(a),c=1;a[0]=="num"?b+=".":r(a)&&(b="("+b+")");while(ci[b[1]])d="("+d+")";if(h(c[0],["assign","conditional","seq"])||c[0]=="binary"&&i[a]>=i[c[1]]&&(c[1]!=a||!h(a,["&&","||","*"])))e="("+e+")";a==="xor"&&(a="^");return n([d,a,e])},"unary-prefix":function(a,b){var c=K(b);b[0]=="num"||b[0]=="unary-prefix"&&!H(j,a+b[1])||!r(b)||(c="("+c+")");return a+(f.is_alphanumeric_char(a.charAt(0))?" ":"")+c},"unary-postfix":function(a,b){var c=K(b);b[0]=="num"||b[0]=="unary-postfix"&&!H(j,a+b[1])||!r(b)||(c="("+c+")");return c+a},sub:function(a,b){var c=K(a);r(a)&&(c="("+c+")");return c+"["+K(b)+"]"},object:function(a){if(a.length==0)return"{}";return"{"+d+m(function(){return I(a,function(a){if(a.length==3)return l(w(a[0],a[1][2],a[1][3],a[1][4],a[2]));var c=a[0],d=K(a[1]);b&&b.quote_keys?c=B(c):(typeof c=="number"||!b&&+c+""==c)&&parseFloat(c)>=0?c=s(+c):G(c)||(c=B(c));return l(n(b&&b.space_colon?[c,":",d]:[c+":",d]))}).join(","+d)})+d+l("}")},regexp:function(a,b){return"/"+a+"/"+b},array:function(a){if(a.length==0)return"[]";return n(["[",o(I(a,function(a){if(!b&&a[0]=="atom"&&a[1]=="undefined")return"";return p(a,"seq")})),"]"])},stat:function(a){return K(a).replace(/;*\s*$/,";")},seq:function(){return o(I(g(arguments),K))},label:function(a,b){return n([x(a),":",K(b)])},"with":function(a,b){return n(["with","("+K(a)+")",K(b)])},atom:function(a){return x(a)}},J=[];return K(a)}function B(a){var b=0,c=0;a=a.replace(/[\\\b\f\n\r\t\x22\x27]/g,function(a){switch(a){case"\\":return"\\\\";case"\b":return"\\b";case"\f":return"\\f";case"\n":return"\\n";case"\r":return"\\r";case"\t":return"\\t";case'"':++b;return'"';case"'":++c;return"'"}return a});return b>c?"'"+a.replace(/\x27/g,"\\'")+"'":'"'+a.replace(/\x22/g,'\\"')+'"'}function z(a,b){function w(a,b){return x(a,function(a,c){if(!c){y(b);return["block"]}return["for",null,null,null,d(b)]})}function p(a,b,c){a=d(a),b=d(b),c=d(c),v(b)?(a=f(a),b=c,c=null):v(c)?c=null:function(){var d=C(a),e=f(a),g=C(e);if(g.length",e,h];case"<":return["binary",">=",e,h];case">=":return["binary","<",e,h];case">":return["binary","<=",e,h]}switch(d){case"==":return["binary","!=",e,h];case"!=":return["binary","==",e,h];case"===":return["binary","!==",e,h];case"!==":return["binary","===",e,h];case"&&":return q(c,["binary","||",f(e),f(h)]);case"||":return q(c,["binary","&&",f(e),f(h)])}}return c}b=F(b,{make_seqs:!0,dead_code:!0,keep_comps:!0,no_warnings:!1});var c=k(),d=c.walk,e;return c.with_walkers({sub:function(a,b){if(b[0]=="string"){var c=b[1];if(G(c))return["dot",d(a),c]}},"if":o,toplevel:function(a){return["toplevel",i(this.scope,function(){return m(I(a,d))})]},"switch":function(a,b){var c=b.length-1;return["switch",d(a),I(b,function(a,b){var e=m(I(a[1],d));if(b==c&&e.length>0){var f=e[e.length-1];f[0]=="break"&&!f[1]&&e.pop()}return[a[0]?d(a[0]):null,e]})]},"function":function(){var a=l.apply(this,arguments);a[1]&&!H(e.refs,a[1])&&(a[1]=null);return a},defun:l,block:function(a){if(a)return j(["block",m(I(a,d))])},binary:function(a,b,c){return x(["binary",a,d(b),d(c)],function(b){return q(d(b),this)},function(){return this})},conditional:function(a,b,c){return u(d(a),d(b),d(c))},"try":function(a,b,c){return["try",m(I(a,d)),b!=null?[b[0],m(I(b[1],d))]:null,c!=null?m(I(c,d)):null]},"unary-prefix":function(a,b){b=d(b);var c=["unary-prefix",a,b];a=="!"&&(c=q(c,f(b)));return x(c,function(a,b){return d(a)},function(){return c})},name:function(a){switch(a){case"true":return["unary-prefix","!",["num",0]];case"false":return["unary-prefix","!",["num",1]]}},"new":function(a,b){if(a[0]=="name"&&a[1]=="Array"&&!e.has("Array"))return b.length!=1?["array",b]:["call",["name","Array"],b]},call:function(a,b){if(a[0]=="name"&&a[1]=="Array"&&b.length!=1&&!e.has("Array"))return["array",b]},"while":w,"do":w},function(){return d(n(a))})}function y(a){v(a)||p("Dropping unreachable code: "+C(a,!0))}function w(a){return a[0]=="string"||a[0]=="unary-prefix"&&a[1]=="typeof"||a[0]=="binary"&&a[1]=="+"&&(w(a[2])||w(a[3]))}function v(a){return!a||a[0]=="block"&&(!a[1]||a[1].length==0)}function u(a,b,c){return a[0]=="unary-prefix"&&a[1]=="!"?c?["conditional",a[2],c,b]:["binary","||",a[2],b]:c?["conditional",a,b,c]:["binary","&&",a,b]}function t(a){return a[0]=="unary-prefix"&&h(a[1],["!","delete"])||a[0]=="binary"&&h(a[1],["in","instanceof","==","!=","===","!==","<","<=",">=",">"])||a[0]=="binary"&&h(a[1],["&&","||"])&&t(a[2])&&t(a[3])||a[0]=="conditional"&&t(a[2])&&t(a[3])||a[0]=="assign"&&a[1]===!0&&t(a[3])||a[0]=="seq"&&t(a[a.length-1])}function s(a){if(a){a=r(a);if(a[0]=="return"||a[0]=="break"||a[0]=="continue"||a[0]=="throw")return!0}}function r(a){if(a[0]=="block"&&a[1]&&a[1].length>0)return a[1][a[1].length-1];return a}function q(a,b){return C(a).length>C(b[0]=="stat"?b[1]:b).length?b:a}function o(a,b){function i(a){return[this[0],I(a,function(a){return[f(a[0]),d(a[1])]})]}function h(a,b){var c=e;e=a;for(var d in a.names)H(a.names,d)&&f(d,!0);var g=b();g.scope=a,e=c;return g}function g(a,b,c,e){a&&(a=f(a)),c=h(c.scope,function(){b=I(b,function(a){return f(a)});return I(c,d)});return[this[0],a,b,c,e]}function f(a,c){if(!b&&!e.parent)return a;return e.get_mangled(a,c)}var c=k(),d=c.walk,e;return c.with_walkers({"function":g,defun:function(){var a=g.apply(this,arguments);switch(c.parent()[0]){case"toplevel":case"function":case"defun":return I.at_top(a)}return a},"var":i,"const":i,name:function(a){return[this[0],f(a)]},"try":function(a,b,c){return[this[0],I(a,d),b!=null?[f(b[0]),I(b[1],d)]:null,c!=null?I(c,d):null]},toplevel:function(a){var b=this;return h(b.scope,function(){return[b[0],I(a,d)]})},"for-in":function(a,b,c,e){return[this[0],a,f(b),d(c),d(e)]}},function(){return d(n(a))})}function n(a){function i(a,b,c,e){return[this[0],g(a),b,f(function(){I(b,g);return I(c,d)}),e]}function h(a){b.refs[a]=!0}function g(a){return b.define(a)}function f(a){b=new l(b);var c=b.body=a();c.scope=b,b=b.parent;return c}var b=null,c=k(),d=c.walk,e=[];return f(function(){function j(a,b){for(b=a.children.length;--b>=0;)j(a.children[b]);for(b in a.refs)if(H(a.refs,b))for(var c=a.has(b),d=a;d;d=d.parent){d.refs[b]=c;if(d===c)break}}var f=c.with_walkers({"function":i,defun:i,"with":function(a,c){for(var d=b;d;d=d.parent)d.uses_with=!0},"var":function(a){I(a,function(a){g(a[0])})},"const":function(a){I(a,function(a){g(a[0])})},"try":function(a,b,c){if(b!=null)return[this[0],I(a,d),[g(b[0]),I(b[1],d)],c!=null?I(c,d):null]},name:function(a){a=="eval"&&e.push(b),h(a)},"for-in":function(a,b){a?g(b):h(b)}},function(){return d(a)});I(e,function(a){if(!a.has("eval"))while(a)a.uses_eval=!0,a=a.parent}),j(b);return f})}function l(a){this.names={},this.mangled={},this.rev_mangled={},this.cname=-1,this.refs={},this.uses_with=!1,this.uses_eval=!1,this.parent=a,this.children=[],a?(this.level=a.level+1,a.children.push(this)):this.level=0}function k(a){function h(a,b){var c={},e;for(e in a)H(a,e)&&(c[e]=d[e],d[e]=a[e]);var f=b();for(e in c)H(c,e)&&(c[e]?d[e]=c[e]:delete d[e]);return f}function f(a){if(!a)return null;try{e.push(a);var b=a[0],f=d[b];if(f){var g=f.apply(a,a.slice(1));if(g!=null)return g}f=c[b];return f.apply(a,a.slice(1))}finally{e.pop()}}function b(a){return[this[0],I(a,function(a){var b=[a[0]];a.length>1&&(b[1]=f(a[1]));return b})]}var c={string:function(a){return[this[0],a]},num:function(a){return[this[0],a]},name:function(a){return[this[0],a]},toplevel:function(a){return[this[0],I(a,f)]},block:function(a){var b=[this[0]];a!=null&&b.push(I(a,f));return b},"var":b,"const":b,"import":b,"export":b,"try":function(a,b,c){return[this[0],I(a,f),b!=null?[b[0],I(b[1],f)]:null,c!=null?I(c,f):null]},"throw":function(a){return[this[0],f(a)]},"new":function(a,b){return[this[0],f(a),I(b,f)]},"switch":function(a,b){return[this[0],f(a),I(b,function(a){return[a[0]?f(a[0]):null,I(a[1],f)]})]},"break":function(a){return[this[0],a]},"continue":function(a){return[this[0],a]},conditional:function(a,b,c){return[this[0],f(a),f(b),f(c)]},assign:function(a,b,c){return[this[0],a,f(b),f(c)]},dot:function(a){return[this[0],f(a)].concat(g(arguments,1))},call:function(a,b){return[this[0],f(a),I(b,f)]},"function":function(a,b,c,d){return[this[0],a,b.slice(),I(c,f),d]},defun:function(a,b,c,d){return[this[0],a,b.slice(),I(c,f),d]},"if":function(a,b,c){return[this[0],f(a),f(b),f(c)]},"for":function(a,b,c,d){return[this[0],f(a),f(b),f(c),f(d)]},"for-in":function(a,b,c,d){return a?[this[0],f(a),f(b),f(c),f(d)]:[this[0],a,b,f(c),f(d)]},"while":function(a,b){return[this[0],f(a),f(b)]},"do":function(a,b){return[this[0],f(a),f(b)]},"return":function(a){return[this[0],f(a)]},binary:function(a,b,c){return[this[0],a,f(b),f(c)]},"unary-prefix":function(a,b){return[this[0],a,f(b)]},"unary-postfix":function(a,b){return[this[0],a,f(b)]},sub:function(a,b){return[this[0],f(a),f(b)]},object:function(a){return[this[0],I(a,function(a){return a.length==2?[a[0],f(a[1])]:[a[0],f(a[1]),a[2]]})]},regexp:function(a,b){return[this[0],a,b]},array:function(a){return[this[0],I(a,f)]},stat:function(a){return[this[0],f(a)]},seq:function(){return[this[0]].concat(I(g(arguments),f))},label:function(a,b){return[this[0],a,f(b)]},"with":function(a,b){return[this[0],f(a),f(b)]},atom:function(a){return[this[0],a]}},d={},e=[];return{walk:f,with_walkers:h,parent:function(){return e[e.length-2]},stack:function(){return e}}}var f=b("./parser"),g=f.slice,h=f.member,i=f.PRECEDENCE,j=f.OPERATORS,m=function(){var a="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_";return function(b){var c="";do c=a.charAt(b%54)+c,b=Math.floor(b/54);while(b>0);return c}}();l.prototype={has:function(a){for(var b=this;b;b=b.parent)if(H(b.names,a))return b},has_mangled:function(a){for(var b=this;b;b=b.parent)if(H(b.rev_mangled,a))return b},toJSON:function(){return{names:this.names,uses_eval:this.uses_eval,uses_with:this.uses_with}},next_mangled:function(){for(;;){var a=m(++this.cname),b;b=this.has_mangled(a);if(b&&this.refs[b.rev_mangled[a]]===b)continue;b=this.has(a);if(b&&b!==this&&this.refs[a]===b&&!b.has_mangled(a))continue;if(H(this.refs,a)&&this.refs[a]==null)continue;if(!G(a))continue;return a}},get_mangled:function(a,b){if(this.uses_eval||this.uses_with)return a;var c=this.has(a);if(!c)return a;if(H(c.mangled,a))return c.mangled[a];if(!b)return a;var d=c.next_mangled();c.rev_mangled[d]=a;return c.mangled[a]=d},define:function(a){if(a!=null)return this.names[a]=a}};var p=function(){},x=function(){function b(c){switch(c[0]){case"string":case"num":return c[1];case"name":case"atom":switch(c[1]){case"true":return!0;case"false":return!1}break;case"unary-prefix":switch(c[1]){case"!":return!b(c[2]);case"typeof":return typeof b(c[2]);case"~":return~b(c[2]);case"-":return-b(c[2]);case"+":return+b(c[2])}break;case"binary":var d=c[2],e=c[3];switch(c[1]){case"&&":return b(d)&&b(e);case"||":return b(d)||b(e);case"|":return b(d)|b(e);case"&":return b(d)&b(e);case"^":return b(d)^b(e);case"+":return b(d)+b(e);case"*":return b(d)*b(e);case"/":return b(d)/b(e);case"-":return b(d)-b(e);case"<<":return b(d)<>":return b(d)>>b(e);case">>>":return b(d)>>>b(e);case"==":return b(d)==b(e);case"===":return b(d)===b(e);case"!=":return b(d)!=b(e);case"!==":return b(d)!==b(e);case"<":return b(d)":return b(d)>b(e);case">=":return b(d)>=b(e);case"in":return b(d)in b(e);case"instanceof":return b(d)instanceof b(e)}}throw a}var a={};return function(c,d,e){try{var f=b(c),g;switch(typeof f){case"string":g=["string",f];break;case"number":g=["num",f];break;case"boolean":g=["name",String(f)];break;default:throw new Error("Can't handle constant of type: "+typeof f)}return d.call(c,g,f)}catch(h){if(h===a){c[0]=="binary"&&(c[1]=="==="||c[1]=="!==")&&(w(c[2])&&w(c[3])||t(c[2])&&t(c[3]))&&(c[1]=c[1].substr(0,2));return e?e.call(c,c):null}throw h}}}(),A=f.array_to_hash(["name","array","string","dot","sub","call","regexp"]),I;(function(){function a(a){this.v=a}I=function(b,c,d){var e=[];for(var f=0;f-1&&(f(b)?e=e.split("\n").map(function(a){return" "+a}).join("\n").substr(2):e="\n"+e.split("\n").map(function(a){return" "+a}).join("\n"))):e=j("[Circular]","special"));if(typeof c=="undefined"){if(p==="Array"&&a.match(/^\d+$/))return e;c=JSON.stringify(""+a),c.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(c=c.substr(1,c.length-2),c=j(c,"name")):(c=c.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),c=j(c,"string"))}return c+": "+e});i.pop();var t=0,u=s.reduce(function(a,b){t++,b.indexOf("\n")>=0&&t++;return a+b.length+1},0);u>50?s=q[0]+(o===""?"":o+"\n ")+" "+s.join(",\n ")+" "+q[1]:s=q[0]+o+" "+s.join(", ")+" "+q[1];return s}var i=[],j=function(a,b){return a};return k(b,typeof d=="undefined"?2:d)}}},modules.runtime_string=module={id:"runtime_string",exports:{},block:function(a,b,c,d,e){String.prototype.repeat||(String.prototype.repeat=function(b){s="";while(b--)s+=this;return s}),String.prototype.padLeft||(String.prototype.padLeft=function(b,c){if(this.length>=b)return this;return String(c||" ").repeat(b-this.length)+this}),String.prototype.padRight||(String.prototype.padRight=function(b,c){if(this.length>=b)return this;return this+String(c||" ").repeat(b-this.length)}),String.prototype.editDistance||(String.prototype.editDistance=function(b){var c,d=(c=this.split("")).length,e=(b=b.split("")).length,f,g,h,i;if(!d&&!e)return Math.max(d,e);for(var j=[],f=d+1;f;j[--f]=[f]);for(f=e+1;j[0][--f]=f;);for(f=-1,h=c.length;++f=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122},a.is_digit_char=function(a){return a>=48&&a<=57},a.HOP=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},a.is_substr_eq=function(a,b,c){var d=c.length;while(--d!==-1)if(a.charCodeAt(b+d)!==c.charCodeAt(d))return!1;return!0}}};var move=_require("index");move.runtime._require=_require,move.onScriptLoaded=function(b,c,d){if(b)throw b;Function(c)()},move.scriptCompilationOptions={preprocess:["ehtml"]},move.runBrowserScripts=function(b,c){var d,e,f,g,h,i=move.scriptCompilationOptions,j=0,k=[],l=0,m=function(){++l},n=function(){if(--l===0){var a=0,b=k.length;for(;a",h=move.compile(d.innerHTML,i),k[a]=[null,h,d]}catch(b){k[a]=[b,null,d]}n()}}(j++);n();return null};var _runScripts=function(){move.runBrowserScripts()};window.addEventListener?addEventListener("DOMContentLoaded",_runScripts,!1):attachEvent("onload",_runScripts);return move}() \ No newline at end of file