Comparing version 1.4.1 to 1.4.3
/* | ||
Crox v1.4.1 | ||
Crox v1.4.3 | ||
https://github.com/thx/crox | ||
Released under the MIT license | ||
md5: c0a35c45ffc34ea6d9fdf3fc12c35acd | ||
md5: 1be3b944776028d02ee312e392715f17 | ||
*/ | ||
(function(G){var x=function(){function x(a,c){this.row=a;this.col=c}function G(a,c){var e=a.substring(0,c),b=e.match(/\r\n?|\n/g),h=1;b&&(h+=b.length);e=1+/[^\r\n]*$/.exec(e)[0].length;return new x(h,e)}function J(a){return'"'+a.replace(/[\x00-\x1f"\\\u2028\u2029]/g,function(c){switch(c){case '"':return'\\"';case "\\":return"\\\\";case "\b":return"\\b";case "\f":return"\\f";case "\n":return"\\n";case "\r":return"\\r";case "\t":return"\\t"}return"\\u"+("000"+c.charCodeAt(0).toString(16)).slice(-4)})+ | ||
'"'}function K(a){return eval(a)}function C(a){return a.replace(/^_+/,"$&$&")}function O(a){function c(c,d,a,b,p,f){this.tag=c;this.text=d;this.index=a;this.subMatches=b;this.end=p;this.pos=f}function e(){}function b(c){for(var d=1,a=[],b=[1],p=[],f=0;f<c.length;++f)b.push(d+=RegExp("|"+c[f][0].source).exec("").length),p.push(c[f][1]||e),a.push("("+c[f][0].source+")");return[RegExp(a.join("|")+"|","g"),b,p]}c.prototype.toString=function(){return this.text};var h=a.$||"$",f={},p;for(p in a)"$"!=p.charAt(0)&& | ||
(f[p]=b(a[p]));return function(a){var d=a.length,b=0,p=[""],e={text:"",index:0,source:a,pushState:function(d){p.push(d)},popState:function(){p.pop()},retract:function(d){b-=d}},q=new x(1,1),t=/\r\n?|\n/g,y=/[^\r\n\u2028\u2029]*$/;return{scan:function(){do{var r;a:{var l=f[p[p.length-1]],k=l[0];k.lastIndex=b;r=k.exec(a);if(""==r[0]){if(b<d)throw Error("lexer error: "+q+"\n"+a.slice(b,b+50));r=new c(h,"",b,null,b,q)}else{e.index=b;b=k.lastIndex;for(var k=l[1],u=0;u<k.length;++u)if(r[k[u]]){l=l[2][u].apply(e, | ||
r.slice(k[u],k[u+1]));r=null==l?null:new c(l,r[0],e.index,r.slice(k[u]+1,k[u+1]),b,q);break a}r=void 0}}if(null!=r)return l=q.row,k=q.col,u=(u=r.text.match(t))?u.length:0,l+=u,k=0==u?k+r.text.length:y.exec(r.text)[0].length+1,q=new x(l,k),r}while(1)},GetCurrentPosition:function(){return q},getPos:function(d){return G(a,d)}}}}function z(a){var c;a:{switch(a){case "id":case "lit":c=!0;break a}c=!1}return c||"."==a||"[]"==a}function t(a){return z(a)||"!"==a||"u-"==a}function D(a){if(t(a))return!0;switch(a){case "*":case "/":case "%":return!0}return!1} | ||
function v(a){if(D(a))return!0;switch(a){case "+":case "-":return!0}return!1}function w(a){if(v(a))return!0;switch(a){case "<":case ">":case "<=":case ">=":return!0}return!1}function E(a){if(w(a))return!0;switch(a){case "eq":case "ne":return!0}return!1}function H(a){return E(a)||"&&"==a}function M(a){return H(a)||"||"==a}function P(a,c,e){function b(d){q.push(d)}function h(d,a){d.pos=a;return d}function f(a){for(var l=0;l<a.length;++l){var k=a[l];switch(k[0]){case "if":b("if(");b(d(k[1]));b("){"); | ||
f(k[2]);b("}");k[3]&&(b("else{"),f(k[3]),b("}"));break;case "each":var g=k[3]?C(k[3]):"_"+L++,m=d(k[1]),n=p(m);/^\w+$/.test(n)||(n="_"+L++,b("var "+n+" = "),b(m),b(";"));k[5]?(b("for(var "+g+"=0;"+g+"<"),b(d([".",h(["t",n],k[1].pos),"length"])),b(";"+g+"++){")):b("for(var "+g+" in "+n+") {");b("var "+k[4]+" = ");b(d(["[]",h(["t",n],k[1].pos),["t",g]]));b(";");f(k[2]);b("}");break;case "set":"string"==typeof k[1]?b("var "+C(k[1])+"="):(b(d(k[1])),b("="));b(d(k[2]));b(";");break;case "eval":m=d(k[1]); | ||
n=p(m);/^\w+$/.test(n)?g=n:(g="_t",b("_t = "),b(m),b(";"));b("if("+g+" !=null)_s += "+((e?!k[2]:k[2])?c+"("+g+")":g)+";");break;case "text":b("_s += "+J(k[1])+";");break;case "inc":break;default:throw Error("unknown stmt: "+k[0]);}}}function p(d){if("string"==typeof d)return d;if(d instanceof Array){for(var a=[],c=0;c<d.length;++c)a.push(p(d[c]));return a.join("")}throw Error("unknown type");}function m(a,c){var b=d(a);c&&!c(a[0])&&(b=["(",b,")"]);return b}function d(d){return h(n(d),d.pos)}function n(a){switch(a[0]){case "t":return a[1]; | ||
case "id":return C(a[1]);case "lit":return"string"==typeof a[1]?J(a[1]):String(a[1]);case "array":for(var c=["["],b=0;b<a[1].length;++b)0<b&&c.push(","),c.push(d(a[1][b]));c.push("]");return c;case "object":c=["{"];for(b=0;b<a[1].length;++b)0<b&&c.push(","),c.push(J(a[1][b][1])),c.push(":"),c.push(d(a[1][b][2]));c.push("}");return c;case "null":return["null"];case ".":return[m(a[1],z),".",a[2]];case "[]":return[m(a[1],z),"[",d(a[2]),"]"];case "()":c=[m(a[1],z),"("];if(a[2])for(b=0;b<a[2].length;++b)0< | ||
b&&c.push(","),c.push(d(a[2][b]));c.push(")");return c;case "!":return["!",m(a[1],t)];case "u-":return["- ",m(a[1],t)];case "*":case "/":case "%":return[m(a[1],D),a[0],m(a[2],t)];case "+":case "-":return[m(a[1],v),a[0]," ",m(a[2],D)];case "<":case ">":case "<=":case ">=":return[m(a[1],w),a[0],m(a[2],v)];case "==":case "!=":case "===":case "!==":return[m(a[1],E),a[0],m(a[2],w)];case "&&":return[m(a[1],H),"&&",m(a[2],E)];case "||":return[m(a[1],M),"||",m(a[2],H)];default:throw Error("unknown expr: "+ | ||
a[0]);}}function g(a){"string"==typeof a&&(y+=a);if(a instanceof Array){a.pos&&x.push([y.length,a.pos]);for(var d=0;d<a.length;++d)g(a[d])}}var L=0,q=[];f(a[1]);var x=[],y="";g(q);a=new String(y);a.posLog=x;return a}function I(a){return Q(R(a))}function N(a,c){var e=I(a),b;c&&(b=c.htmlEncode);a=P(e,b||"_htmlEncode",!0);e="";b||(e="var _obj = { '<': '<', '>': '>', '&': '&', '\"': '"' };\r\n\tfunction _htmlEncode(s) {\r\n\t\treturn String(s).replace(/[<>&\"]/g, function(c) {\r\n\t\t\treturn _obj[c];\r\n\t\t});\r\n\t}"); | ||
e+="var _t,_s = '';";c&&c.debug?(b=a.posLog,e=e+"try{\n"+("eval("+JSON.stringify(a)+");"),e+="}catch(_e){throw "+function(a,c){for(var b=a.stack,e=b.split(/\r\n?|\n/),e=+/:(\d+):(\d+)\)$/m.exec(e[1])[2],d=null,n=0;n<c.length;++n)if(c[n][0]+1>=e){d=c[n][1];break}e=d.pos;return Error("CroxError: "+("("+e.row+","+e.col+")")+"\n"+b)}+"(_e,"+JSON.stringify(b)+");}"):e+=a;e+="return _s;";return Function("root",e)}function S(a,c){function e(a){for(var b=0;b<a.length;++b){var d=a[b];switch(d[0]){case "if":var n= | ||
"if("+h(d[1])+"){";f+=n;e(d[2]);f+="}";d[3]&&(f+="else{",e(d[3]),f+="}");break;case "each":n="foreach("+h(d[1])+" as "+(d[3]?"$crox_"+C(d[3])+"=>":"")+("$crox_"+C(d[4]))+")";f+=n;f+="{";e(d[2]);f+="}";break;case "set":d="$crox_"+C(d[1])+" = "+h(d[2])+";";f+=d;break;case "eval":n=h(d[1]);f+="crox_echo("+n+", "+(c?!d[2]:d[2])+");";break;case "text":n=d[1];/<\?(?:php)?|\?>/.test(n)?(d="echo "+("'"+String(d[1]).replace(/['\\]/g,"\\$&")+"'")+";",f+=d):f+="?>"+n+"<?php ";break;case "inc":d="include '"+ | ||
d[1].replace(/\.\w+$/,".php")+"';";f+=d;break;default:throw Error("unknown stmt: "+d[0]);}}}function b(a,c){var d=h(a);c&&!c(a[0])&&(d="("+d+")");return d}function h(a){switch(a[0]){case "id":return"$crox_"+C(a[1]);case "lit":return"string"==typeof a[1]?"'"+String(a[1]).replace(/['\\]/g,"\\$&")+"'":String(a[1]);case ".":return b(a[1],z)+"->"+a[2];case "[]":return b(a[1],z)+"["+h(a[2])+"]";case "!":return"!crox_ToBoolean("+b(a[1],t)+")";case "u-":return"- "+b(a[1],t);case "*":case "/":case "%":return b(a[1], | ||
D)+a[0]+b(a[2],t);case "+":return"crox_plus("+b(a[1],null)+", "+b(a[2],null)+")";case "-":return b(a[1],v)+"- "+b(a[2],D);case "<":case ">":case "<=":case ">=":return b(a[1],w)+a[0]+b(a[2],v);case "==":case "!=":case "===":case "!==":return b(a[1],E)+a[0]+b(a[2],w);case "&&":return"crox_logical_and("+b(a[1],null)+", "+b(a[2],null)+")";case "||":return"crox_logical_or("+b(a[1],null)+", "+b(a[2],null)+")";default:throw Error("unknown expr: "+a[0]);}}var f="";e(a[1]);f="?>"==f.slice(0,2)?f.slice(2): | ||
"<?php "+f;return f="<?php "==f.slice(-6)?f.slice(0,-6):f+"?>"}function T(a){function c(a){return"$crox_"+C(a)}function e(a){m+=a}function b(a){for(var h=0;h<a.length;++h){var g=a[h];switch(g[0]){case "if":e("#if("+f(g[1])+")");b(g[2]);g[3]&&(e("#{else}"),b(g[3]));e("#{end}");break;case "each":++p;var m=f(g[1]);if(/^$\w+$/.test(m))var q=m;else q="$list"+(1==p?"":p),e("#set ("+q+" = "+m+")");g[5]?(e("#foreach("+c(g[4])+" in "+q+")"),g[3]&&e("#set("+c(g[3])+" = $velocityCount - 1)")):g[3]?(e("#foreach("+ | ||
c(g[3])+" in "+q+".keySet())"),e("#set("+c(g[4])+" ="+q+".get("+c(g[3])+"))")):e("#foreach("+c(g[4])+" in "+q+")");b(g[2]);e("#{end}");--p;break;case "set":e("#set ("+c(g[1])+"="+f(g[2])+")");break;case "eval":g=f(g[1]);/^$\w+$/.test(g)?e("$!{"+g.slice(1)+"}"):e("#set($t = "+g+")$!{t}");break;case "text":e(g[1].replace(/\$/g,"$${dollar}").replace(/#/g,"$${sharp}"));break;case "inc":e("#parse('"+g[1].replace(/\.\w+$/,".vm")+"')");break;default:throw Error("unknown stmt: "+g[0]);}}}function h(a,c){var b= | ||
f(a);c&&!c(a[0])&&(b="("+b+")");return b}function f(a){switch(a[0]){case "id":return c(a[1]);case "lit":return"string"==typeof a[1]?(a=a[1],a=-1==a.indexOf("'")?"'"+a+"'":"('"+a.split("'").join("'+\"'\"+'")+"')",a):String(a[1]);case ".":return h(a[1],z)+"."+a[2];case "[]":return h(a[1],z)+"["+f(a[2])+"]";case "!":return"!"+h(a[1],t);case "u-":if("u-"==a[1][0])throw Error("\u7981\u6b62\u4e24\u4e2a\u8d1f\u53f7\u8fde\u7528");return"-"+h(a[1],t);case "*":case "/":case "%":return h(a[1],D)+a[0]+h(a[2], | ||
t);case "+":case "-":return h(a[1],v)+a[0]+" "+h(a[2],D);case "<":case ">":case "<=":case ">=":return h(a[1],w)+a[0]+h(a[2],v);case "==":case "!=":case "===":case "!==":return h(a[1],E)+a[0].slice(0,2)+h(a[2],w);case "&&":return h(a[1],H)+"&&"+h(a[2],E);case "||":return h(a[1],M)+"||"+h(a[2],H);default:throw Error("unknown expr: "+a[0]);}}var p=0,m="#set($dollar='$')#set($sharp='#')";b(a[1]);return m}x.prototype.toString=function(){return"("+this.row+","+this.col+")"};var R=function(){var a=[[/\s+/], | ||
[/\/\/[^\r\n]*|\/\*[\s\S]*?\*\//],[/[A-Za-z_]\w*/,function(a){switch(a){case "true":case "false":return"boolean";case "set":case "include":case "null":return a;default:if(-1!=" abstract boolean break byte case catch char class const continue debugger default delete do double else enum export extends final finally float for function goto if implements import in instanceof int interface let long native new package private protected public return short static super switch synchronized this throw throws transient try typeof var void volatile while with yield ".indexOf(" "+ | ||
a+" ")||"null"==a)throw Error("Reserved: "+a+" "+G(this.source,this.index));return"realId"}}],[/"(?:[^"\\]|\\[\s\S])*"|'(?:[^'\\]|\\[\s\S])*'/,function(a){return"string"}],[/\d+(?:\.\d+)?(?:e-?\d+)?/,function(a){return"number"}],[/{(?!{)/,function(a){return"{"}],[/}(?!})/,function(a){return"}"}],[function(a){a.sort().reverse();for(var e=0;e<a.length;++e)a[e]=a[e].replace(/[()*+?.[\]|]/g,"\\$&");return RegExp(a.join("|"))}("! % && ( ) * + - . / < <= = > >= [ ] || === !== == != , :".split(" ")),function(a){return/[*/%]/.test(a)? | ||
"mul":/[<>]/.test(a)?"rel":/[!=]=/.test(a)?"eq":a}]];return O({"":[[/(?:(?!{{)[\s\S])+/,function(a){return"text"}],[/{{{/,function(a){this.pushState(a);return a}],[/{{(?:\/if|else|\/each|\/forin|\/raw)}}/,function(a){return a}],[/{{#raw}}/,function(a){this.pushState("raw");return a}],[/{{(?:#(?:if|each|forin)(?=\s))?/,function(a){this.pushState("{{");return a}]],raw:[[/(?:(?!{{\/raw}})[\s\S])+/,function(a){this.popState();return"rawtext"}]],"{{":a.concat([[/}}/,function(a){this.popState();return a}]]), | ||
"{{{":a.concat([[/}}}/,function(a){this.popState();return a}]])})}(),Q=function(){var a={nStart:41,tSymbols:"$ ! && ( ) + , - . : = [ ] boolean eq include mul null number rawtext realId rel set string text { {{ {{#each {{#forin {{#if {{#raw}} {{/each}} {{/forin}} {{/if}} {{/raw}} {{else}} {{{ || } }} }}} AdditiveExpression ArrayLiteral ElementList Elision EqualityExpression LogicalAndExpression LogicalOrExpression MemberExpression MultiplicativeExpression ObjectLiteral PrimaryExpression PropertyAssignment PropertyNameAndValueList RelationalExpression UnaryExpression _text args empty expr id name program statement statements texts program'".split(" "), | ||
actionList:[{_:-2},{_:-32768},{24:11,26:9,27:7,28:8,29:6,30:12,36:10,_:-1},{_:-3},{24:11,30:12,_:-13},{_:-17},{1:37,3:33,7:38,11:35,13:32,15:28,17:34,18:31,20:30,22:27,23:29,25:36,_:0},{1:37,3:33,7:38,11:35,13:32,15:43,17:34,18:31,20:30,22:42,23:29,25:36,_:0},{_:-19},{19:45,_:0},{_:-18},{_:-27},{_:-45},{_:-29},{_:-30},{3:46,8:48,11:47,_:-52},{_:-55},{16:49,_:-57},{5:51,7:50,_:-60},{21:52,_:-62},{14:53,_:-64},{2:54,_:-66},{37:55,_:-68},{39:56,_:0},{_:-22},{_:-23},{_:-24},{_:-21},{_:-25},{_:-26},{_:-31}, | ||
{6:62,12:61,_:-69},{15:28,20:30,22:27,23:67,38:68,_:0},{15:28,20:30,22:27,23:67,_:0},{39:73,_:0},{3:33,11:35,13:32,15:28,17:34,18:31,20:30,22:27,23:29,25:36,_:-22},{23:75,_:-23},{40:76,_:0},{34:77,_:0},{1:37,3:33,7:38,11:35,13:32,15:28,17:34,18:31,20:30,22:27,23:29,25:36,_:-69},{15:28,20:30,22:27,_:0},{_:-2},{4:91,_:0},{6:93,12:92,_:0},{1:37,3:33,6:95,7:38,11:35,13:32,15:28,17:34,18:31,20:30,22:27,23:29,25:36,_:0},{_:-32},{_:-38},{9:97,_:0},{_:-16},{6:98,38:99,_:0},{_:-42},{_:-15},{_:-40},{_:-53}, | ||
{_:-54},{15:28,20:30,22:27,23:67,_:-69},{_:-11},{3:46,8:48,10:104,11:47,_:0},{39:105,_:0},{_:-12},{_:-20},{4:106,6:107,_:0},{_:-50},{4:108,_:0},{12:109,_:0},{_:-46},{_:-56},{16:49,_:-59},{16:49,_:-58},{5:51,7:50,_:-61},{21:52,_:-63},{14:53,_:-65},{2:54,_:-67},{24:11,26:9,27:7,28:8,29:6,30:12,33:110,35:111,36:10,_:0},{_:-28},{_:-33},{6:62,_:-69},{_:-34},{_:-39},{_:-35},{_:-41},{39:116,_:0},{39:117,_:0},{39:118,_:0},{39:119,_:0},{_:-14},{_:-48},{_:-49},{_:-47},{_:-4},{_:-2},{_:-44},{_:-43},{_:-2},{_:-2}, | ||
{39:129,_:0},{_:-51},{24:11,26:9,27:7,28:8,29:6,30:12,33:130,36:10,_:0},{_:-36},{_:-37},{24:11,26:9,27:7,28:8,29:6,30:12,31:131,36:10,_:0},{24:11,26:9,27:7,28:8,29:6,30:12,31:132,36:10,_:0},{24:11,26:9,27:7,28:8,29:6,30:12,32:133,36:10,_:0},{24:11,26:9,27:7,28:8,29:6,30:12,32:134,36:10,_:0},{_:-10},{_:-5},{_:-6},{_:-7},{_:-8},{_:-9}],actionIndex:[0,1,2,3,4,5,6,6,6,7,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,6,30,31,32,6,6,33,33,34,35,36,37,38,39,6,40,6,6,6,6,6,6,6,41,42,43, | ||
44,6,45,46,47,48,49,50,51,52,53,54,55,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,6,33,80,81,82,83,84,6,85,86,6,87,88,89,90,44,6,91,92,93,93,94,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109],tGoto:[{62:1,64:2},{},{63:3,65:4,56:5},{},{56:13},{},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:26},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:39},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22, | ||
45:23,46:24,47:25,59:40},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:41},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:44},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:57},{},{43:58,44:59,58:60},{61:63,60:64,53:65,52:66},{60:14,51:15,42:16,50:17,48:18,55:69},{60:14,51:15,42:16,50:17,48:18,55:70},{61:71,60:64},{61:72,60:64},{},{60:14,51:15,42:16, | ||
50:17,48:74},{},{},{},{60:14,51:15,42:16,50:17,48:18,57:78,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:79,58:80},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:81},{60:82},{60:14,51:15,42:16,50:17,48:18,55:83},{60:14,51:15,42:16,50:17,48:18,55:19,49:84},{60:14,51:15,42:16,50:17,48:18,55:19,49:85},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:86},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:87},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:88},{60:14, | ||
51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:89},{64:90},{},{},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:94},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:96},{},{},{},{},{},{},{},{},{},{},{61:100,60:64,58:101},{61:102,60:64,58:103},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{63:3,65:4,56:5},{},{},{44:112,58:113},{},{},{},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:114},{61:63,60:64, | ||
52:115},{},{},{},{},{},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:120},{},{},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:121},{},{},{},{64:122},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:123},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:124},{},{},{64:125},{64:126},{64:127},{64:128},{},{},{63:3,65:4,56:5},{},{},{63:3,65:4,56:5},{63:3,65:4,56:5},{63:3,65:4,56:5},{63:3,65:4, | ||
56:5},{},{},{},{},{},{}],tRules:[[66,62],[62,64],[64],[64,64,63],[63,29,59,39,64,33],[63,29,59,39,64,35,64,33],[63,27,59,61,61,39,64,31],[63,27,59,61,58,39,64,31],[63,28,59,61,61,39,64,32],[63,28,59,61,58,39,64,32],[63,26,22,48,10,59,39],[63,26,59,39],[63,36,59,40],[63,65],[63,26,15,23,39],[61,23],[61,60],[65,56],[65,65,56],[56,24],[56,30,19,34],[60,20],[60,22],[60,15],[51,23],[51,18],[51,13],[51,60],[51,3,59,4],[51,42],[51,50],[51,17],[42,11,12],[42,11,43,12],[43,44,59],[43,58,59],[43,43,6,44,59], | ||
[43,43,6,58,59],[44,6],[44,44,6],[50,25,38],[50,25,53,38],[53,52],[53,53,6,52],[52,61,9,59],[48,51],[48,48,8,60],[48,48,11,59,12],[48,48,3,57,4],[48,48,3,58,4],[57,59],[57,57,6,59],[55,48],[55,1,55],[55,7,55],[49,55],[49,49,16,55],[41,49],[41,41,5,49],[41,41,7,49],[54,41],[54,54,21,41],[45,54],[45,45,14,54],[46,45],[46,46,2,45],[47,46],[47,47,37,46],[59,47],[58]],objCharset:null};return function(c,e){function b(a,b,c,d,e,f,g){return["each",b,f,d,c,!0]}function h(a,b,c,d,e,f,g){return["each",b,f,d, | ||
c,!1]}function f(a){return a.text}function p(a,b){var c;c=Array(a||0);c.push(b);return c}function m(a,b,c,d){c&&(a.length+=c);a.push(d);return a}function d(a){return[a]}function n(a,b,c,d){return["()",a,c]}function g(a,b,c){return[b.text,a,c]}function t(a,b){return k[a][b]}function q(a){throw Error("Syntax error: "+c.getPos(w.index)+(a?"\n"+a:""));}for(var x=a.nStart,y=a.tSymbols,r={},l=0;l<y.length;++l)r[y[l]]=l;var k=a.tAction||a.actionList,u=a.tGoto,C=a.tRules,z=a.actionIndex,D=[,function(a){return["prog", | ||
a]},function(){return[]},function(a,b){a.push(b);return a},function(a,b,c,d,e){return["if",b,d]},function(a,b,c,d,e,f,g){return["if",b,d,f]},b,b,h,h,function(a,b,c,d,e,f){return["set","id"==c[0]?c[1]:c,e]},function(a,b,c){return["eval",b,!1]},function(a,b,c){return["eval",b,!0]},function(a){return["text",a]},function(a,b,c,d){return["inc",K(c.text)]},function(a){return K(a.text)},f,function(a){return a},function(a,b){return a+b},f,function(a,b,c){return b.text},,,,function(a){return["lit",K(a.text)]}, | ||
function(a){return["lit",+a.text]},function(a){return["lit","true"==a.text]},function(a){return["id",a.text]},function(a,b,c){return b},,,function(a){return["null"]},function(a,b){return["array",[]]},function(a,b,c){return["array",b]},p,p,m,m,function(a){return 1},function(a,b){return a+1},function(a,b){return["object",[]]},function(a,b,c){return["object",b]},d,function(a,b,c){a.push(c);return a},function(a,b,c){return["init",a,c]},,function(a,b,c){return[".",a,c.text]},function(a,b,c,d){return["[]", | ||
a,c]},n,n,d,function(a,b,c){a.push(c);return a},,function(a,b){return["!",b]},function(a,b){return["u-",b]},,g,,g,g,,g,,g,,g,,g];z&&(t=function(a,b){var c=k[z[a]];return c[b]||c._});var F=0,v=[0],w=c.scan(),A=[],E={get:function(a){return A[A.length+a]},set:function(a,b){A[A.length+a]=b}};if(e)for(l in e)E[l]=e[l];for(;;)if(l=t(F,r[w.tag]))if(0<l)v.push(F=l),A.push(w),w=c.scan();else if(0>l&&-32768<l){var l=-l,F=C[l],B=F.length-1;v.length-=B;F=u[v[v.length-1]][F[0]];v.push(F);D[l]?(l=D[l].apply(E, | ||
A.splice(A.length-B,B)),A.push(l)):1!=B&&A.splice(A.length-B,B,null)}else return w.tag!=y[0]&&q(),A[0];else{l=[];for(B=0;B<x;++B)t(F,B)&&l.push(y[B]);q("find "+w.tag+"\nexpect "+l.join(" "))}}}();return{parse:I,compile:N,render:function(a,c){return N(a)(c)},compileToPhp:function(a){return S(I(a),!0)},compileToVM:function(a,c){return T(I(a))},version:"1.4.1"}}();"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:"function"==typeof define&&(define.amd||define.cmd)?define(function(){return x}): | ||
"undefined"!=typeof KISSY&&KISSY.add(function(){return x});G&&(G.Crox=x)})(this); | ||
(function(G){var x=function(){function x(a,d){this.row=a;this.col=d}function G(a,d){var e=a.substring(0,d),b=e.match(/\r\n?|\n/g),k=1;b&&(k+=b.length);e=1+/[^\r\n]*$/.exec(e)[0].length;return new x(k,e)}function K(a){return'"'+a.replace(/[\x00-\x1f"\\\u2028\u2029]/g,function(a){switch(a){case '"':return'\\"';case "\\":return"\\\\";case "\b":return"\\b";case "\f":return"\\f";case "\n":return"\\n";case "\r":return"\\r";case "\t":return"\\t"}return"\\u"+("000"+a.charCodeAt(0).toString(16)).slice(-4)})+ | ||
'"'}function L(a){return eval(a)}function C(a){return a.replace(/^_+/,"$&$&")}function P(a){function d(a,c,d,b,p,f){this.tag=a;this.text=c;this.index=d;this.subMatches=b;this.end=p;this.pos=f}function e(){}function b(a){for(var c=1,d=[],b=[1],p=[],f=0;f<a.length;++f)b.push(c+=RegExp("|"+a[f][0].source).exec("").length),p.push(a[f][1]||e),d.push("("+a[f][0].source+")");return[RegExp(d.join("|")+"|","g"),b,p]}d.prototype.toString=function(){return this.text};var k=a.$||"$",f={},p;for(p in a)"$"!=p.charAt(0)&& | ||
(f[p]=b(a[p]));return function(a){var c=a.length,b=0,p=[""],e={text:"",index:0,source:a,pushState:function(c){p.push(c)},popState:function(){p.pop()},retract:function(c){b-=c}},q=new x(1,1),t=/\r\n?|\n/g,y=/[^\r\n\u2028\u2029]*$/;return{scan:function(){do{var r;a:{var m=f[p[p.length-1]],l=m[0];l.lastIndex=b;r=l.exec(a);if(""==r[0]){if(b<c)throw Error("lexer error: "+q+"\n"+a.slice(b,b+50));r=new d(k,"",b,null,b,q)}else{e.index=b;b=l.lastIndex;for(var l=m[1],u=0;u<l.length;++u)if(r[l[u]]){m=m[2][u].apply(e, | ||
r.slice(l[u],l[u+1]));r=null==m?null:new d(m,r[0],e.index,r.slice(l[u]+1,l[u+1]),b,q);break a}r=void 0}}if(null!=r)return m=q.row,l=q.col,u=(u=r.text.match(t))?u.length:0,m+=u,l=0==u?l+r.text.length:y.exec(r.text)[0].length+1,q=new x(m,l),r}while(1)},GetCurrentPosition:function(){return q},getPos:function(c){return G(a,c)}}}}function z(a){var d;a:{switch(a){case "id":case "lit":case "t":d=!0;break a}d=!1}return d||"."==a||"[]"==a}function t(a){return z(a)||"!"==a||"u-"==a}function D(a){if(t(a))return!0; | ||
switch(a){case "*":case "/":case "%":return!0}return!1}function v(a){if(D(a))return!0;switch(a){case "+":case "-":return!0}return!1}function w(a){if(v(a))return!0;switch(a){case "<":case ">":case "<=":case ">=":return!0}return!1}function E(a){if(w(a))return!0;switch(a){case "eq":case "ne":return!0}return!1}function H(a){return E(a)||"&&"==a}function I(a){return H(a)||"||"==a}function N(a){return I(a)||"cond"==a}function Q(a,d,e){function b(c){q.push(c)}function k(c,a){c.pos=a;return c}function f(a){for(var m= | ||
0;m<a.length;++m){var l=a[m];switch(l[0]){case "if":b("if(");b(c(l[1]));b("){");f(l[2]);b("}");l[3]&&(b("else{"),f(l[3]),b("}"));break;case "each":var h=l[3]?C(l[3]):"_"+M++,g=c(l[1]),n=p(g);/^\w+$/.test(n)||(n="_"+M++,b("var "+n+" = "),b(g),b(";"));l[5]?(b("for(var "+h+"=0;"+h+"<"),b(c([".",k(["t",n],l[1].pos),"length"])),b(";"+h+"++){")):b("for(var "+h+" in "+n+") {");b("var "+l[4]+" = ");b(c(["[]",k(["t",n],l[1].pos),["t",h]]));b(";");f(l[2]);b("}");break;case "set":"string"==typeof l[1]?b("var "+ | ||
C(l[1])+"="):(b(c(l[1])),b("="));b(c(l[2]));b(";");break;case "eval":g=c(l[1]);n=p(g);/^\w+$/.test(n)?h=n:(h="_t",b("_t = "),b(g),b(";"));b("if("+h+" !=null)_s += "+((e?!l[2]:l[2])?d+"("+h+")":h)+";");break;case "text":b("_s += "+K(l[1])+";");break;case "inc":break;default:throw Error("unknown stmt: "+l[0]);}}}function p(c){if("string"==typeof c)return c;if(c instanceof Array){for(var a=[],b=0;b<c.length;++b)a.push(p(c[b]));return a.join("")}throw Error("unknown type");}function h(a,b){var d=c(a); | ||
b&&!b(a[0])&&(d=["(",d,")"]);return d}function c(c){return k(n(c),c.pos)}function n(a){switch(a[0]){case "t":return a[1];case "id":return C(a[1]);case "lit":return"string"==typeof a[1]?K(a[1]):String(a[1]);case "array":for(var b=["["],d=0;d<a[1].length;++d)0<d&&b.push(","),b.push(c(a[1][d]));b.push("]");return b;case "object":b=["{"];for(d=0;d<a[1].length;++d)0<d&&b.push(","),b.push(K(a[1][d][1])),b.push(":"),b.push(c(a[1][d][2]));b.push("}");return b;case "null":return["null"];case ".":return[h(a[1], | ||
z),".",a[2]];case "[]":return[h(a[1],z),"[",c(a[2]),"]"];case "()":b=[h(a[1],z),"("];if(a[2])for(d=0;d<a[2].length;++d)0<d&&b.push(","),b.push(c(a[2][d]));b.push(")");return b;case "!":return["!",h(a[1],t)];case "u-":return["- ",h(a[1],t)];case "*":case "/":case "%":return[h(a[1],D),a[0],h(a[2],t)];case "+":case "-":return[h(a[1],v),a[0]," ",h(a[2],D)];case "<":case ">":case "<=":case ">=":return[h(a[1],w),a[0],h(a[2],v)];case "==":case "!=":case "===":case "!==":return[h(a[1],E),a[0],h(a[2],w)]; | ||
case "&&":return[h(a[1],H),"&&",h(a[2],E)];case "||":return[h(a[1],I),"||",h(a[2],H)];case "cond":return[h(a[1],I),"?",h(a[2],N),":",h(a[3],N)];default:throw Error("unknown expr: "+a[0]);}}function g(a){"string"==typeof a&&(y+=a);if(a instanceof Array){a.pos&&x.push([y.length,a.pos]);for(var c=0;c<a.length;++c)g(a[c])}}var M=0,q=[];f(a[1]);var x=[],y="";g(q);a[2]&&(y+=a[2].join(";"));a=new String(y);a.posLog=x;return a}function J(a){return R(S(a))}function O(a,d){var e=J(a),b;d&&(b=d.htmlEncode); | ||
a=Q(e,b||"_htmlEncode",!0);e="";b||(e="var _obj = { '<': '<', '>': '>', '&': '&', '\"': '"' };\r\n\tfunction _htmlEncode(s) {\r\n\t\treturn String(s).replace(/[<>&\"]/g, function(c) {\r\n\t\t\treturn _obj[c];\r\n\t\t});\r\n\t}");e+="var _t,_s = '';";d&&d.debug?(b=a.posLog,e=e+"try{\n"+("eval("+JSON.stringify(a)+");"),e+="}catch(_e){throw "+function(a,b){for(var d=a.stack,e=d.split(/\r\n?|\n/),e=+/:(\d+):(\d+)\)$/m.exec(e[1])[2],c=null,n=0;n<b.length;++n)if(b[n][0]+1>=e){c=b[n][1];break}e= | ||
c.pos;return Error("CroxError: "+("("+e.row+","+e.col+")")+"\n"+d)}+"(_e,"+JSON.stringify(b)+");}"):e+=a;e+="return _s;";return Function("root",e)}function T(a,d){function e(a){for(var b=0;b<a.length;++b){var c=a[b];switch(c[0]){case "if":var n="if("+k(c[1])+"){";f+=n;e(c[2]);f+="}";c[3]&&(f+="else{",e(c[3]),f+="}");break;case "each":n="foreach("+k(c[1])+" as "+(c[3]?"$crox_"+C(c[3])+"=>":"")+("$crox_"+C(c[4]))+")";f+=n;f+="{";e(c[2]);f+="}";break;case "set":c="$crox_"+C(c[1])+" = "+k(c[2])+";";f+= | ||
c;break;case "eval":n=k(c[1]);f+="crox_echo("+n+", "+(d?!c[2]:c[2])+");";break;case "text":n=c[1];/<\?(?:php)?|\?>/.test(n)?(c="echo "+("'"+String(c[1]).replace(/['\\]/g,"\\$&")+"'")+";",f+=c):f+="?>"+n+"<?php ";break;case "inc":c="include '"+c[1].replace(/\.\w+$/,".php")+"';";f+=c;break;default:throw Error("unknown stmt: "+c[0]);}}}function b(a,b){var c=k(a);b&&!b(a[0])&&(c="("+c+")");return c}function k(a){switch(a[0]){case "id":return"$crox_"+C(a[1]);case "lit":return"string"==typeof a[1]?"'"+ | ||
String(a[1]).replace(/['\\]/g,"\\$&")+"'":String(a[1]);case ".":return b(a[1],z)+"->"+a[2];case "[]":return b(a[1],z)+"["+k(a[2])+"]";case "!":return"!crox_ToBoolean("+b(a[1],t)+")";case "u-":return"- "+b(a[1],t);case "*":case "/":case "%":return b(a[1],D)+a[0]+b(a[2],t);case "+":return"crox_plus("+b(a[1],null)+", "+b(a[2],null)+")";case "-":return b(a[1],v)+"- "+b(a[2],D);case "<":case ">":case "<=":case ">=":return b(a[1],w)+a[0]+b(a[2],v);case "==":case "!=":case "===":case "!==":return b(a[1], | ||
E)+a[0]+b(a[2],w);case "&&":return"crox_logical_and("+b(a[1],null)+", "+b(a[2],null)+")";case "||":return"crox_logical_or("+b(a[1],null)+", "+b(a[2],null)+")";default:throw Error("unknown expr: "+a[0]);}}var f="";e(a[1]);f="?>"==f.slice(0,2)?f.slice(2):"<?php "+f;return f="<?php "==f.slice(-6)?f.slice(0,-6):f+"?>"}function U(a){function d(a){return"$crox_"+C(a)}function e(a){h+=a}function b(a){for(var h=0;h<a.length;++h){var g=a[h];switch(g[0]){case "if":e("#if("+f(g[1])+")");b(g[2]);g[3]&&(e("#{else}"), | ||
b(g[3]));e("#{end}");break;case "each":++p;var k=f(g[1]);if(/^$\w+$/.test(k))var q=k;else q="$list"+(1==p?"":p),e("#set ("+q+" = "+k+")");g[5]?(e("#foreach("+d(g[4])+" in "+q+")"),g[3]&&e("#set("+d(g[3])+" = $velocityCount - 1)")):g[3]?(e("#foreach("+d(g[3])+" in "+q+".keySet())"),e("#set("+d(g[4])+" ="+q+".get("+d(g[3])+"))")):e("#foreach("+d(g[4])+" in "+q+")");b(g[2]);e("#{end}");--p;break;case "set":e("#set ("+d(g[1])+"="+f(g[2])+")");break;case "eval":g=f(g[1]);/^$\w+$/.test(g)?e("$!{"+g.slice(1)+ | ||
"}"):e("#set($t = "+g+")$!{t}");break;case "text":e(g[1].replace(/\$/g,"$${dollar}").replace(/#/g,"$${sharp}"));break;case "inc":e("#parse('"+g[1].replace(/\.\w+$/,".vm")+"')");break;default:throw Error("unknown stmt: "+g[0]);}}}function k(a,b){var d=f(a);b&&!b(a[0])&&(d="("+d+")");return d}function f(a){switch(a[0]){case "id":return d(a[1]);case "lit":return"string"==typeof a[1]?(a=a[1],a=-1==a.indexOf("'")?"'"+a+"'":"('"+a.split("'").join("'+\"'\"+'")+"')",a):String(a[1]);case ".":return k(a[1], | ||
z)+"."+a[2];case "[]":return k(a[1],z)+"["+f(a[2])+"]";case "!":return"!"+k(a[1],t);case "u-":if("u-"==a[1][0])throw Error("\u7981\u6b62\u4e24\u4e2a\u8d1f\u53f7\u8fde\u7528");return"-"+k(a[1],t);case "*":case "/":case "%":return k(a[1],D)+a[0]+k(a[2],t);case "+":case "-":return k(a[1],v)+a[0]+" "+k(a[2],D);case "<":case ">":case "<=":case ">=":return k(a[1],w)+a[0]+k(a[2],v);case "==":case "!=":case "===":case "!==":return k(a[1],E)+a[0].slice(0,2)+k(a[2],w);case "&&":return k(a[1],H)+"&&"+k(a[2], | ||
E);case "||":return k(a[1],I)+"||"+k(a[2],H);default:throw Error("unknown expr: "+a[0]);}}var p=0,h="#set($dollar='$')#set($sharp='#')";b(a[1]);return h}x.prototype.toString=function(){return"("+this.row+","+this.col+")"};var S=function(){var a=[[/\s+/],[/\/\/[^\r\n]*|\/\*[\s\S]*?\*\//],[/[A-Za-z_]\w*/,function(a){switch(a){case "true":case "false":return"boolean";case "set":case "include":case "null":return a;default:if(-1!=" abstract boolean break byte case catch char class const continue debugger default delete do double else enum export extends final finally float for function goto if implements import in instanceof int interface let long native new package private protected public return short static super switch synchronized this throw throws transient try typeof var void volatile while with yield ".indexOf(" "+ | ||
a+" ")||"null"==a)throw Error("Reserved: "+a+" "+G(this.source,this.index));return"realId"}}],[/"(?:[^"\\]|\\[\s\S])*"|'(?:[^'\\]|\\[\s\S])*'/,function(a){return"string"}],[/\d+(?:\.\d+)?(?:e-?\d+)?/,function(a){return"number"}],[/{(?!{)/,function(a){return"{"}],[/}(?!})/,function(a){return"}"}],[function(a){a.sort().reverse();for(var e=0;e<a.length;++e)a[e]=a[e].replace(/[()*+?.[\]|]/g,"\\$&");return RegExp(a.join("|"))}("! % && ( ) * + - . / < <= = > >= [ ] || === !== == != , : ?".split(" ")),function(a){return/[*/%]/.test(a)? | ||
"mul":/[<>]/.test(a)?"rel":/[!=]=/.test(a)?"eq":a}]];return P({"":[[/(?:(?!{{)[\s\S])+/,function(a){return"text"}],[/{{{/,function(a){this.pushState(a);return a}],[/{{(?:\/if|else|\/each|\/forin|\/raw)}}/,function(a){return a}],[/{{#raw}}/,function(a){this.pushState("raw");return a}],[/{{<script>[\s\S]*?<\/script>}}/,function(a){return"script"}],[/{{(?:#(?:if|each|forin)(?=\s))?/,function(a){this.pushState("{{");return a}]],raw:[[/(?:(?!{{\/raw}})[\s\S])+/,function(a){this.popState();return"rawtext"}]], | ||
"{{":a.concat([[/}}/,function(a){this.popState();return a}]]),"{{{":a.concat([[/}}}/,function(a){this.popState();return a}]])})}(),R=function(){var a={nStart:43,tSymbols:"$ ! && ( ) + , - . : = ? [ ] boolean eq include mul null number rawtext realId rel script set string text { {{ {{#each {{#forin {{#if {{#raw}} {{/each}} {{/forin}} {{/if}} {{/raw}} {{else}} {{{ || } }} }}} AdditiveExpression ArrayLiteral ConditionalExpression ElementList Elision EqualityExpression LogicalAndExpression LogicalOrExpression MemberExpression MultiplicativeExpression ObjectLiteral PrimaryExpression PropertyAssignment PropertyNameAndValueList RelationalExpression UnaryExpression _text args empty expr id name program statement statements texts program'".split(" "), | ||
actionList:[{_:-1},{23:5,26:11,28:9,29:7,30:8,31:6,32:12,38:10,_:-32768},{_:-2},{26:11,32:12,_:-15},{_:-19},{_:-3},{1:38,3:34,7:39,12:36,14:33,16:29,18:35,19:32,21:31,24:28,25:30,27:37,_:0},{1:38,3:34,7:39,12:36,14:33,16:44,18:35,19:32,21:31,24:43,25:30,27:37,_:0},{_:-21},{20:46,_:0},{_:-20},{_:-29},{_:-47},{_:-31},{_:-32},{3:47,8:49,12:48,_:-54},{_:-57},{17:50,_:-59},{5:52,7:51,_:-62},{22:53,_:-64},{15:54,_:-66},{2:55,_:-68},{11:57,39:56,_:-70},{_:-72},{41:58,_:0},{_:-24},{_:-25},{_:-26},{_:-23}, | ||
{_:-27},{_:-28},{_:-33},{6:64,13:63,_:-73},{16:29,21:31,24:28,25:69,40:70,_:0},{16:29,21:31,24:28,25:69,_:0},{41:75,_:0},{3:34,12:36,14:33,16:29,18:35,19:32,21:31,24:28,25:30,27:37,_:-24},{25:77,_:-25},{42:78,_:0},{36:79,_:0},{1:38,3:34,7:39,12:36,14:33,16:29,18:35,19:32,21:31,24:28,25:30,27:37,_:-73},{16:29,21:31,24:28,_:0},{_:-4},{4:94,_:0},{6:96,13:95,_:0},{1:38,3:34,6:98,7:39,12:36,14:33,16:29,18:35,19:32,21:31,24:28,25:30,27:37,_:0},{_:-34},{_:-40},{9:100,_:0},{_:-18},{6:101,40:102,_:0},{_:-44}, | ||
{_:-17},{_:-42},{_:-55},{_:-56},{16:29,21:31,24:28,25:69,_:-73},{_:-13},{3:47,8:49,10:107,12:48,_:0},{41:108,_:0},{_:-14},{_:-22},{4:109,6:110,_:0},{_:-52},{4:111,_:0},{13:112,_:0},{_:-48},{_:-58},{17:50,_:-61},{17:50,_:-60},{5:52,7:51,_:-63},{22:53,_:-65},{15:54,_:-67},{2:55,_:-69},{9:113,_:0},{26:11,28:9,29:7,30:8,31:6,32:12,35:115,37:116,38:10,_:0},{_:-30},{_:-35},{6:64,_:-73},{_:-36},{_:-41},{_:-37},{_:-43},{41:121,_:0},{41:122,_:0},{41:123,_:0},{41:124,_:0},{_:-16},{_:-50},{_:-51},{_:-49},{_:-5}, | ||
{_:-6},{_:-4},{_:-46},{_:-45},{_:-4},{_:-4},{41:135,_:0},{_:-53},{_:-71},{26:11,28:9,29:7,30:8,31:6,32:12,35:136,38:10,_:0},{_:-38},{_:-39},{26:11,28:9,29:7,30:8,31:6,32:12,33:137,38:10,_:0},{26:11,28:9,29:7,30:8,31:6,32:12,33:138,38:10,_:0},{26:11,28:9,29:7,30:8,31:6,32:12,34:139,38:10,_:0},{26:11,28:9,29:7,30:8,31:6,32:12,34:140,38:10,_:0},{_:-12},{_:-7},{_:-8},{_:-9},{_:-10},{_:-11}],actionIndex:[0,1,2,3,4,5,6,6,6,7,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,6,31,32,33, | ||
6,6,34,34,35,36,37,38,39,40,6,41,6,6,6,6,6,6,6,6,42,43,44,45,6,46,47,48,49,50,51,52,53,54,55,56,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,6,34,82,83,84,85,86,6,87,88,6,89,90,6,91,92,93,45,6,94,95,96,96,97,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113],tGoto:[{65:1},{66:2,68:3,59:4},{},{59:13},{},{},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:27},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23, | ||
49:24,50:25,45:26,62:40},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:41},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:42},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:45},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:59},{},{46:60,47:61,61:62},{64:65,63:66,56:67,55:68},{63:14,54:15,44:16, | ||
53:17,51:18,58:71},{63:14,54:15,44:16,53:17,51:18,58:72},{64:73,63:66},{64:74,63:66},{},{63:14,54:15,44:16,53:17,51:76},{},{},{},{63:14,54:15,44:16,53:17,51:18,60:80,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:81,61:82},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:83},{63:84},{63:14,54:15,44:16,53:17,51:18,58:85},{63:14,54:15,44:16,53:17,51:18,58:19,52:86},{63:14,54:15,44:16,53:17,51:18,58:19,52:87},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:88},{63:14, | ||
54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:89},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:90},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:91},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:92},{67:93},{},{},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:97},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:99},{},{},{},{},{},{},{},{},{},{},{64:103,63:66,61:104},{64:105, | ||
63:66,61:106},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{66:114,68:3,59:4},{},{},{47:117,61:118},{},{},{},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:119},{64:65,63:66,55:120},{},{},{},{},{},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:125},{},{},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:126},{},{},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:127}, | ||
{},{},{67:128},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:129},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:130},{},{},{67:131},{67:132},{67:133},{67:134},{},{},{},{66:114,68:3,59:4},{},{},{66:114,68:3,59:4},{66:114,68:3,59:4},{66:114,68:3,59:4},{66:114,68:3,59:4},{},{},{},{},{},{}],tRules:[[69,65],[65],[65,65,66],[65,65,23],[67],[67,67,66],[66,31,62,41,67,35],[66,31,62,41,67,37,67,35],[66,29,62,64,64,41,67,33],[66,29,62, | ||
64,61,41,67,33],[66,30,62,64,64,41,67,34],[66,30,62,64,61,41,67,34],[66,28,24,51,10,62,41],[66,28,62,41],[66,38,62,42],[66,68],[66,28,16,25,41],[64,25],[64,63],[68,59],[68,68,59],[59,26],[59,32,20,36],[63,21],[63,24],[63,16],[54,25],[54,19],[54,14],[54,63],[54,3,62,4],[54,44],[54,53],[54,18],[44,12,13],[44,12,46,13],[46,47,62],[46,61,62],[46,46,6,47,62],[46,46,6,61,62],[47,6],[47,47,6],[53,27,40],[53,27,56,40],[56,55],[56,56,6,55],[55,64,9,62],[51,54],[51,51,8,63],[51,51,12,62,13],[51,51,3,60,4], | ||
[51,51,3,61,4],[60,62],[60,60,6,62],[58,51],[58,1,58],[58,7,58],[52,58],[52,52,17,58],[43,52],[43,43,5,52],[43,43,7,52],[57,43],[57,57,22,43],[48,57],[48,48,15,57],[49,48],[49,49,2,48],[50,49],[50,50,39,49],[45,50],[45,50,11,45,9,45],[62,45],[61]],objCharset:null};return function(d,e){function b(a,b,c,d,e,f,g){return["each",b,f,d,c,!0]}function k(a,b,c,d,e,f,g){return["each",b,f,d,c,!1]}function f(a){return a.text}function p(a,b){var c;c=Array(a||0);c.push(b);return c}function h(a,b,c,d){c&&(a.length+= | ||
c);a.push(d);return a}function c(a){return[a]}function n(a,b,c,d){return["()",a,c]}function g(a,b,c){return[b.text,a,c]}function t(a,b){return l[a][b]}function q(a){throw Error("Syntax error: "+d.getPos(w.index)+(a?"\n"+a:""));}for(var x=a.nStart,y=a.tSymbols,r={},m=0;m<y.length;++m)r[y[m]]=m;var l=a.tAction||a.actionList,u=a.tGoto,C=a.tRules,z=a.actionIndex,D=[,function(){return["prog",[],[]]},function(a,b){a[1].push(b);return a},function(a,b){a[2].push(b.text.slice(10,-11));return a},function(){return[]}, | ||
function(a,b){a.push(b);return a},function(a,b,c,d,e){return["if",b,d]},function(a,b,c,d,e,f,g){return["if",b,d,f]},b,b,k,k,function(a,b,c,d,e,f){return["set","id"==c[0]?c[1]:c,e]},function(a,b,c){return["eval",b,!1]},function(a,b,c){return["eval",b,!0]},function(a){return["text",a]},function(a,b,c,d){return["inc",L(c.text)]},function(a){return L(a.text)},f,function(a){return a},function(a,b){return a+b},f,function(a,b,c){return b.text},,,,function(a){return["lit",L(a.text)]},function(a){return["lit", | ||
+a.text]},function(a){return["lit","true"==a.text]},function(a){return["id",a.text]},function(a,b,c){return b},,,function(a){return["null"]},function(a,b){return["array",[]]},function(a,b,c){return["array",b]},p,p,h,h,function(a){return 1},function(a,b){return a+1},function(a,b){return["object",[]]},function(a,b,c){return["object",b]},c,function(a,b,c){a.push(c);return a},function(a,b,c){return["init",a,c]},,function(a,b,c){return[".",a,c.text]},function(a,b,c,d){return["[]",a,c]},n,n,c,function(a, | ||
b,c){a.push(c);return a},,function(a,b){return["!",b]},function(a,b){return["u-",b]},,g,,g,g,,g,,g,,g,,g,,function(a,b,c,d,e){return["cond",a,c,e]}];z&&(t=function(a,b){var c=l[z[a]];return c[b]||c._});var F=0,v=[0],w=d.scan(),A=[],E={get:function(a){return A[A.length+a]},set:function(a,b){A[A.length+a]=b}};if(e)for(m in e)E[m]=e[m];for(;;)if(m=t(F,r[w.tag]))if(0<m)v.push(F=m),A.push(w),w=d.scan();else if(0>m&&-32768<m){var m=-m,F=C[m],B=F.length-1;v.length-=B;F=u[v[v.length-1]][F[0]];v.push(F);D[m]? | ||
(m=D[m].apply(E,A.splice(A.length-B,B)),A.push(m)):1!=B&&A.splice(A.length-B,B,null)}else return w.tag!=y[0]&&q(),A[0];else{m=[];for(B=0;B<x;++B)t(F,B)&&m.push(y[B]);q("find "+w.tag+"\nexpect "+m.join(" "))}}}();return{parse:J,compile:O,render:function(a,d){return O(a)(d)},compileToPhp:function(a){return T(J(a),!0)},compileToVM:function(a,d){return U(J(a))},version:"1.4.3"}}();"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:"function"==typeof define&&(define.amd|| | ||
define.cmd)?define(function(){return x}):"undefined"!=typeof KISSY&&KISSY.add(function(){return x});G&&(G.Crox=x)})(this); |
/** | ||
* @preserve Crox v1.4.1 | ||
* @preserve Crox v1.4.3 | ||
* https://github.com/thx/crox | ||
* | ||
* Released under the MIT license | ||
* md5: c0a35c45ffc34ea6d9fdf3fc12c35acd | ||
* md5: 1be3b944776028d02ee312e392715f17 | ||
*/ | ||
@@ -298,3 +298,3 @@ (function(root) {var Crox = (function() { | ||
return RegExp(a.join('|')); | ||
}(["!", "%", "&&", "(", ")", "*", "+", "-", ".", "/", "<", "<=", "=", ">", ">=", "[", "]", "||", "===", "!==", "==", "!=", ",", ":"]), function(a) { | ||
}(["!", "%", "&&", "(", ")", "*", "+", "-", ".", "/", "<", "<=", "=", ">", ">=", "[", "]", "||", "===", "!==", "==", "!=", ",", ":", "?"]), function(a) { | ||
return /[*/%]/.test(a) ? 'mul' : /[<>]/.test(a) ? 'rel' : /[!=]=/.test(a) ? 'eq' : a; | ||
@@ -320,2 +320,5 @@ }] | ||
}], | ||
[/{{<script>[\s\S]*?<\/script>}}/, function(a) { | ||
return 'script'; | ||
}], | ||
[/{{(?:#(?:if|each|forin)(?=\s))?/, function(a) { | ||
@@ -350,8 +353,8 @@ this.pushState('{{'); | ||
var table = {//conflicts: 4 | ||
"nStart": 41, | ||
"tSymbols": /*67*/["$", "!", "\u0026\u0026", "(", ")", "+", ",", "-", ".", ":", "=", "[", "]", "boolean", "eq", "include", "mul", "null", "number", "rawtext", "realId", "rel", "set", "string", "text", "{", "{{", "{{#each", "{{#forin", "{{#if", "{{#raw}}", "{{/each}}", "{{/forin}}", "{{/if}}", "{{/raw}}", "{{else}}", "{{{", "||", "}", "}}", "}}}", "AdditiveExpression", "ArrayLiteral", "ElementList", "Elision", "EqualityExpression", "LogicalAndExpression", "LogicalOrExpression", "MemberExpression", "MultiplicativeExpression", "ObjectLiteral", "PrimaryExpression", "PropertyAssignment", "PropertyNameAndValueList", "RelationalExpression", "UnaryExpression", "_text", "args", "empty", "expr", "id", "name", "program", "statement", "statements", "texts", "program\u0027"], | ||
actionList: [{ "_": -2 }, { "_": -32768 }, { "24": 11, "26": 9, "27": 7, "28": 8, "29": 6, "30": 12, "36": 10, "_": -1 }, { "_": -3 }, { "24": 11, "30": 12, "_": -13 }, { "_": -17 }, { "1": 37, "3": 33, "7": 38, "11": 35, "13": 32, "15": 28, "17": 34, "18": 31, "20": 30, "22": 27, "23": 29, "25": 36, "_": 0 }, { "1": 37, "3": 33, "7": 38, "11": 35, "13": 32, "15": 43, "17": 34, "18": 31, "20": 30, "22": 42, "23": 29, "25": 36, "_": 0 }, { "_": -19 }, { "19": 45, "_": 0 }, { "_": -18 }, { "_": -27 }, { "_": -45 }, { "_": -29 }, { "_": -30 }, { "3": 46, "8": 48, "11": 47, "_": -52 }, { "_": -55 }, { "16": 49, "_": -57 }, { "5": 51, "7": 50, "_": -60 }, { "21": 52, "_": -62 }, { "14": 53, "_": -64 }, { "2": 54, "_": -66 }, { "37": 55, "_": -68 }, { "39": 56, "_": 0 }, { "_": -22 }, { "_": -23 }, { "_": -24 }, { "_": -21 }, { "_": -25 }, { "_": -26 }, { "_": -31 }, { "6": 62, "12": 61, "_": -69 }, { "15": 28, "20": 30, "22": 27, "23": 67, "38": 68, "_": 0 }, { "15": 28, "20": 30, "22": 27, "23": 67, "_": 0 }, { "39": 73, "_": 0 }, { "3": 33, "11": 35, "13": 32, "15": 28, "17": 34, "18": 31, "20": 30, "22": 27, "23": 29, "25": 36, "_": -22 }, { "23": 75, "_": -23 }, { "40": 76, "_": 0 }, { "34": 77, "_": 0 }, { "1": 37, "3": 33, "7": 38, "11": 35, "13": 32, "15": 28, "17": 34, "18": 31, "20": 30, "22": 27, "23": 29, "25": 36, "_": -69 }, { "15": 28, "20": 30, "22": 27, "_": 0 }, { "_": -2 }, { "4": 91, "_": 0 }, { "6": 93, "12": 92, "_": 0 }, { "1": 37, "3": 33, "6": 95, "7": 38, "11": 35, "13": 32, "15": 28, "17": 34, "18": 31, "20": 30, "22": 27, "23": 29, "25": 36, "_": 0 }, { "_": -32 }, { "_": -38 }, { "9": 97, "_": 0 }, { "_": -16 }, { "6": 98, "38": 99, "_": 0 }, { "_": -42 }, { "_": -15 }, { "_": -40 }, { "_": -53 }, { "_": -54 }, { "15": 28, "20": 30, "22": 27, "23": 67, "_": -69 }, { "_": -11 }, { "3": 46, "8": 48, "10": 104, "11": 47, "_": 0 }, { "39": 105, "_": 0 }, { "_": -12 }, { "_": -20 }, { "4": 106, "6": 107, "_": 0 }, { "_": -50 }, { "4": 108, "_": 0 }, { "12": 109, "_": 0 }, { "_": -46 }, { "_": -56 }, { "16": 49, "_": -59 }, { "16": 49, "_": -58 }, { "5": 51, "7": 50, "_": -61 }, { "21": 52, "_": -63 }, { "14": 53, "_": -65 }, { "2": 54, "_": -67 }, { "24": 11, "26": 9, "27": 7, "28": 8, "29": 6, "30": 12, "33": 110, "35": 111, "36": 10, "_": 0 }, { "_": -28 }, { "_": -33 }, { "6": 62, "_": -69 }, { "_": -34 }, { "_": -39 }, { "_": -35 }, { "_": -41 }, { "39": 116, "_": 0 }, { "39": 117, "_": 0 }, { "39": 118, "_": 0 }, { "39": 119, "_": 0 }, { "_": -14 }, { "_": -48 }, { "_": -49 }, { "_": -47 }, { "_": -4 }, { "_": -2 }, { "_": -44 }, { "_": -43 }, { "_": -2 }, { "_": -2 }, { "39": 129, "_": 0 }, { "_": -51 }, { "24": 11, "26": 9, "27": 7, "28": 8, "29": 6, "30": 12, "33": 130, "36": 10, "_": 0 }, { "_": -36 }, { "_": -37 }, { "24": 11, "26": 9, "27": 7, "28": 8, "29": 6, "30": 12, "31": 131, "36": 10, "_": 0 }, { "24": 11, "26": 9, "27": 7, "28": 8, "29": 6, "30": 12, "31": 132, "36": 10, "_": 0 }, { "24": 11, "26": 9, "27": 7, "28": 8, "29": 6, "30": 12, "32": 133, "36": 10, "_": 0 }, { "24": 11, "26": 9, "27": 7, "28": 8, "29": 6, "30": 12, "32": 134, "36": 10, "_": 0 }, { "_": -10 }, { "_": -5 }, { "_": -6 }, { "_": -7 }, { "_": -8 }, { "_": -9 }], | ||
actionIndex: [0, 1, 2, 3, 4, 5, 6, 6, 6, 7, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 6, 30, 31, 32, 6, 6, 33, 33, 34, 35, 36, 37, 38, 39, 6, 40, 6, 6, 6, 6, 6, 6, 6, 41, 42, 43, 44, 6, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 6, 33, 80, 81, 82, 83, 84, 6, 85, 86, 6, 87, 88, 89, 90, 44, 6, 91, 92, 93, 93, 94, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109], | ||
"tGoto": /*135*/[{ "62": 1, "64": 2 }, {}, { "63": 3, "65": 4, "56": 5 }, {}, { "56": 13 }, {}, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 26 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 39 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 40 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 41 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 44 }, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 57 }, {}, { "43": 58, "44": 59, "58": 60 }, { "61": 63, "60": 64, "53": 65, "52": 66 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 69 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 70 }, { "61": 71, "60": 64 }, { "61": 72, "60": 64 }, {}, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 74 }, {}, {}, {}, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "57": 78, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 79, "58": 80 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 81 }, { "60": 82 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 83 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 84 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 85 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 86 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 87 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 88 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 89 }, { "64": 90 }, {}, {}, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 94 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 96 }, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, { "61": 100, "60": 64, "58": 101 }, { "61": 102, "60": 64, "58": 103 }, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, { "63": 3, "65": 4, "56": 5 }, {}, {}, { "44": 112, "58": 113 }, {}, {}, {}, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 114 }, { "61": 63, "60": 64, "52": 115 }, {}, {}, {}, {}, {}, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 120 }, {}, {}, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 121 }, {}, {}, {}, { "64": 122 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 123 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 124 }, {}, {}, { "64": 125 }, { "64": 126 }, { "64": 127 }, { "64": 128 }, {}, {}, { "63": 3, "65": 4, "56": 5 }, {}, {}, { "63": 3, "65": 4, "56": 5 }, { "63": 3, "65": 4, "56": 5 }, { "63": 3, "65": 4, "56": 5 }, { "63": 3, "65": 4, "56": 5 }, {}, {}, {}, {}, {}, {}], | ||
"tRules": /*70*/[[66, 62], [62, 64], [64], [64, 64, 63], [63, 29, 59, 39, 64, 33], [63, 29, 59, 39, 64, 35, 64, 33], [63, 27, 59, 61, 61, 39, 64, 31], [63, 27, 59, 61, 58, 39, 64, 31], [63, 28, 59, 61, 61, 39, 64, 32], [63, 28, 59, 61, 58, 39, 64, 32], [63, 26, 22, 48, 10, 59, 39], [63, 26, 59, 39], [63, 36, 59, 40], [63, 65], [63, 26, 15, 23, 39], [61, 23], [61, 60], [65, 56], [65, 65, 56], [56, 24], [56, 30, 19, 34], [60, 20], [60, 22], [60, 15], [51, 23], [51, 18], [51, 13], [51, 60], [51, 3, 59, 4], [51, 42], [51, 50], [51, 17], [42, 11, 12], [42, 11, 43, 12], [43, 44, 59], [43, 58, 59], [43, 43, 6, 44, 59], [43, 43, 6, 58, 59], [44, 6], [44, 44, 6], [50, 25, 38], [50, 25, 53, 38], [53, 52], [53, 53, 6, 52], [52, 61, 9, 59], [48, 51], [48, 48, 8, 60], [48, 48, 11, 59, 12], [48, 48, 3, 57, 4], [48, 48, 3, 58, 4], [57, 59], [57, 57, 6, 59], [55, 48], [55, 1, 55], [55, 7, 55], [49, 55], [49, 49, 16, 55], [41, 49], [41, 41, 5, 49], [41, 41, 7, 49], [54, 41], [54, 54, 21, 41], [45, 54], [45, 45, 14, 54], [46, 45], [46, 46, 2, 45], [47, 46], [47, 47, 37, 46], [59, 47], [58]], | ||
"nStart": 43, | ||
"tSymbols": /*70*/["$", "!", "\u0026\u0026", "(", ")", "+", ",", "-", ".", ":", "=", "?", "[", "]", "boolean", "eq", "include", "mul", "null", "number", "rawtext", "realId", "rel", "script", "set", "string", "text", "{", "{{", "{{#each", "{{#forin", "{{#if", "{{#raw}}", "{{/each}}", "{{/forin}}", "{{/if}}", "{{/raw}}", "{{else}}", "{{{", "||", "}", "}}", "}}}", "AdditiveExpression", "ArrayLiteral", "ConditionalExpression", "ElementList", "Elision", "EqualityExpression", "LogicalAndExpression", "LogicalOrExpression", "MemberExpression", "MultiplicativeExpression", "ObjectLiteral", "PrimaryExpression", "PropertyAssignment", "PropertyNameAndValueList", "RelationalExpression", "UnaryExpression", "_text", "args", "empty", "expr", "id", "name", "program", "statement", "statements", "texts", "program\u0027"], | ||
actionList: [{ "_": -1 }, { "23": 5, "26": 11, "28": 9, "29": 7, "30": 8, "31": 6, "32": 12, "38": 10, "_": -32768 }, { "_": -2 }, { "26": 11, "32": 12, "_": -15 }, { "_": -19 }, { "_": -3 }, { "1": 38, "3": 34, "7": 39, "12": 36, "14": 33, "16": 29, "18": 35, "19": 32, "21": 31, "24": 28, "25": 30, "27": 37, "_": 0 }, { "1": 38, "3": 34, "7": 39, "12": 36, "14": 33, "16": 44, "18": 35, "19": 32, "21": 31, "24": 43, "25": 30, "27": 37, "_": 0 }, { "_": -21 }, { "20": 46, "_": 0 }, { "_": -20 }, { "_": -29 }, { "_": -47 }, { "_": -31 }, { "_": -32 }, { "3": 47, "8": 49, "12": 48, "_": -54 }, { "_": -57 }, { "17": 50, "_": -59 }, { "5": 52, "7": 51, "_": -62 }, { "22": 53, "_": -64 }, { "15": 54, "_": -66 }, { "2": 55, "_": -68 }, { "11": 57, "39": 56, "_": -70 }, { "_": -72 }, { "41": 58, "_": 0 }, { "_": -24 }, { "_": -25 }, { "_": -26 }, { "_": -23 }, { "_": -27 }, { "_": -28 }, { "_": -33 }, { "6": 64, "13": 63, "_": -73 }, { "16": 29, "21": 31, "24": 28, "25": 69, "40": 70, "_": 0 }, { "16": 29, "21": 31, "24": 28, "25": 69, "_": 0 }, { "41": 75, "_": 0 }, { "3": 34, "12": 36, "14": 33, "16": 29, "18": 35, "19": 32, "21": 31, "24": 28, "25": 30, "27": 37, "_": -24 }, { "25": 77, "_": -25 }, { "42": 78, "_": 0 }, { "36": 79, "_": 0 }, { "1": 38, "3": 34, "7": 39, "12": 36, "14": 33, "16": 29, "18": 35, "19": 32, "21": 31, "24": 28, "25": 30, "27": 37, "_": -73 }, { "16": 29, "21": 31, "24": 28, "_": 0 }, { "_": -4 }, { "4": 94, "_": 0 }, { "6": 96, "13": 95, "_": 0 }, { "1": 38, "3": 34, "6": 98, "7": 39, "12": 36, "14": 33, "16": 29, "18": 35, "19": 32, "21": 31, "24": 28, "25": 30, "27": 37, "_": 0 }, { "_": -34 }, { "_": -40 }, { "9": 100, "_": 0 }, { "_": -18 }, { "6": 101, "40": 102, "_": 0 }, { "_": -44 }, { "_": -17 }, { "_": -42 }, { "_": -55 }, { "_": -56 }, { "16": 29, "21": 31, "24": 28, "25": 69, "_": -73 }, { "_": -13 }, { "3": 47, "8": 49, "10": 107, "12": 48, "_": 0 }, { "41": 108, "_": 0 }, { "_": -14 }, { "_": -22 }, { "4": 109, "6": 110, "_": 0 }, { "_": -52 }, { "4": 111, "_": 0 }, { "13": 112, "_": 0 }, { "_": -48 }, { "_": -58 }, { "17": 50, "_": -61 }, { "17": 50, "_": -60 }, { "5": 52, "7": 51, "_": -63 }, { "22": 53, "_": -65 }, { "15": 54, "_": -67 }, { "2": 55, "_": -69 }, { "9": 113, "_": 0 }, { "26": 11, "28": 9, "29": 7, "30": 8, "31": 6, "32": 12, "35": 115, "37": 116, "38": 10, "_": 0 }, { "_": -30 }, { "_": -35 }, { "6": 64, "_": -73 }, { "_": -36 }, { "_": -41 }, { "_": -37 }, { "_": -43 }, { "41": 121, "_": 0 }, { "41": 122, "_": 0 }, { "41": 123, "_": 0 }, { "41": 124, "_": 0 }, { "_": -16 }, { "_": -50 }, { "_": -51 }, { "_": -49 }, { "_": -5 }, { "_": -6 }, { "_": -4 }, { "_": -46 }, { "_": -45 }, { "_": -4 }, { "_": -4 }, { "41": 135, "_": 0 }, { "_": -53 }, { "_": -71 }, { "26": 11, "28": 9, "29": 7, "30": 8, "31": 6, "32": 12, "35": 136, "38": 10, "_": 0 }, { "_": -38 }, { "_": -39 }, { "26": 11, "28": 9, "29": 7, "30": 8, "31": 6, "32": 12, "33": 137, "38": 10, "_": 0 }, { "26": 11, "28": 9, "29": 7, "30": 8, "31": 6, "32": 12, "33": 138, "38": 10, "_": 0 }, { "26": 11, "28": 9, "29": 7, "30": 8, "31": 6, "32": 12, "34": 139, "38": 10, "_": 0 }, { "26": 11, "28": 9, "29": 7, "30": 8, "31": 6, "32": 12, "34": 140, "38": 10, "_": 0 }, { "_": -12 }, { "_": -7 }, { "_": -8 }, { "_": -9 }, { "_": -10 }, { "_": -11 }], | ||
actionIndex: [0, 1, 2, 3, 4, 5, 6, 6, 6, 7, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 6, 31, 32, 33, 6, 6, 34, 34, 35, 36, 37, 38, 39, 40, 6, 41, 6, 6, 6, 6, 6, 6, 6, 6, 42, 43, 44, 45, 6, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 6, 34, 82, 83, 84, 85, 86, 6, 87, 88, 6, 89, 90, 6, 91, 92, 93, 45, 6, 94, 95, 96, 96, 97, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113], | ||
"tGoto": /*141*/[{ "65": 1 }, { "66": 2, "68": 3, "59": 4 }, {}, { "59": 13 }, {}, {}, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 27 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 40 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 41 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 42 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 45 }, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 59 }, {}, { "46": 60, "47": 61, "61": 62 }, { "64": 65, "63": 66, "56": 67, "55": 68 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 71 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 72 }, { "64": 73, "63": 66 }, { "64": 74, "63": 66 }, {}, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 76 }, {}, {}, {}, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "60": 80, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 81, "61": 82 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 83 }, { "63": 84 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 85 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 86 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 87 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 88 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 89 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 90 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 91 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 92 }, { "67": 93 }, {}, {}, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 97 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 99 }, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, { "64": 103, "63": 66, "61": 104 }, { "64": 105, "63": 66, "61": 106 }, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, { "66": 114, "68": 3, "59": 4 }, {}, {}, { "47": 117, "61": 118 }, {}, {}, {}, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 119 }, { "64": 65, "63": 66, "55": 120 }, {}, {}, {}, {}, {}, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 125 }, {}, {}, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 126 }, {}, {}, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 127 }, {}, {}, { "67": 128 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 129 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 130 }, {}, {}, { "67": 131 }, { "67": 132 }, { "67": 133 }, { "67": 134 }, {}, {}, {}, { "66": 114, "68": 3, "59": 4 }, {}, {}, { "66": 114, "68": 3, "59": 4 }, { "66": 114, "68": 3, "59": 4 }, { "66": 114, "68": 3, "59": 4 }, { "66": 114, "68": 3, "59": 4 }, {}, {}, {}, {}, {}, {}], | ||
"tRules": /*74*/[[69, 65], [65], [65, 65, 66], [65, 65, 23], [67], [67, 67, 66], [66, 31, 62, 41, 67, 35], [66, 31, 62, 41, 67, 37, 67, 35], [66, 29, 62, 64, 64, 41, 67, 33], [66, 29, 62, 64, 61, 41, 67, 33], [66, 30, 62, 64, 64, 41, 67, 34], [66, 30, 62, 64, 61, 41, 67, 34], [66, 28, 24, 51, 10, 62, 41], [66, 28, 62, 41], [66, 38, 62, 42], [66, 68], [66, 28, 16, 25, 41], [64, 25], [64, 63], [68, 59], [68, 68, 59], [59, 26], [59, 32, 20, 36], [63, 21], [63, 24], [63, 16], [54, 25], [54, 19], [54, 14], [54, 63], [54, 3, 62, 4], [54, 44], [54, 53], [54, 18], [44, 12, 13], [44, 12, 46, 13], [46, 47, 62], [46, 61, 62], [46, 46, 6, 47, 62], [46, 46, 6, 61, 62], [47, 6], [47, 47, 6], [53, 27, 40], [53, 27, 56, 40], [56, 55], [56, 56, 6, 55], [55, 64, 9, 62], [51, 54], [51, 51, 8, 63], [51, 51, 12, 62, 13], [51, 51, 3, 60, 4], [51, 51, 3, 61, 4], [60, 62], [60, 60, 6, 62], [58, 51], [58, 1, 58], [58, 7, 58], [52, 58], [52, 52, 17, 58], [43, 52], [43, 43, 5, 52], [43, 43, 7, 52], [57, 43], [57, 57, 22, 43], [48, 57], [48, 48, 15, 57], [49, 48], [49, 49, 2, 48], [50, 49], [50, 50, 39, 49], [45, 50], [45, 50, 11, 45, 9, 45], [62, 45], [61]], | ||
"objCharset": null | ||
@@ -378,3 +381,3 @@ } | ||
function $f6($1, $2, $3, $4) { var $$; { $$ = ['()', $1, $3]; } return $$; } | ||
function $f7($1, $2, $3) { var $$; { $$ = [$2.text, $1, $3]; } return $$; } var tFuncs = [, function($1) { var $$; { $$ = ['prog', $1]; } return $$; }, function() { var $$; { $$ = []; } return $$; }, function($1, $2) { var $$; { $1.push($2); $$ = $1; } return $$; }, function($1, $2, $3, $4, $5) { var $$; { $$ = ['if', $2, $4]; } return $$; }, function($1, $2, $3, $4, $5, $6, $7) { var $$; { $$ = ['if', $2, $4, $6]; } return $$; }, $f0, $f0, $f1, $f1, function($1, $2, $3, $4, $5, $6) { var $$; { $$ = ['set', $3[0] == 'id' ? $3[1] : $3, $5]; } return $$; }, function($1, $2, $3) { var $$; { $$ = ['eval', $2, false]; } return $$; }, function($1, $2, $3) { var $$; { $$ = ['eval', $2, true]; } return $$; }, function($1) { var $$; { $$ = ['text', $1]; } return $$; }, function($1, $2, $3, $4) { var $$; { $$ = ['inc', evalStr($3.text)]; } return $$; }, function($1) { var $$; { $$ = evalStr($1.text); } return $$; }, $f2, function($1) { var $$; { $$ = $1; } return $$; }, function($1, $2) { var $$; { $$ = $1 + $2; } return $$; }, $f2, function($1, $2, $3) { var $$; { $$ = $2.text; } return $$; }, , , , function($1) { var $$; { $$ = ['lit', evalStr($1.text)]; } return $$; }, function($1) { var $$; { $$ = ['lit', evalNum($1.text)]; } return $$; }, function($1) { var $$; { $$ = ['lit', $1.text == 'true']; } return $$; }, function($1) { var $$; { $$ = ['id', $1.text]; } return $$; }, function($1, $2, $3) { var $$; { $$ = $2; } return $$; }, , , function($1) { var $$; { $$ = ['null']; } return $$; }, function($1, $2) { var $$; { $$ = ['array', []]; } return $$; }, function($1, $2, $3) { var $$; { $$ = ['array', $2]; } return $$; }, $f3, $f3, $f4, $f4, function($1) { var $$; { $$ = 1; } return $$; }, function($1, $2) { var $$; { $$ = $1 + 1; } return $$; }, function($1, $2) { var $$; { $$ = ['object', []]; } return $$; }, function($1, $2, $3) { var $$; { $$ = ['object', $2]; } return $$; }, $f5, function($1, $2, $3) { var $$; { $1.push($3); $$ = $1; } return $$; }, function($1, $2, $3) { var $$; { $$ = ['init', $1, $3]; } return $$; }, , function($1, $2, $3) { var $$; { $$ = ['.', $1, $3.text]; } return $$; }, function($1, $2, $3, $4) { var $$; { $$ = ['[]', $1, $3]; } return $$; }, $f6, $f6, $f5, function($1, $2, $3) { var $$; { ($$ = $1).push($3); } return $$; }, , function($1, $2) { var $$; { $$ = ['!', $2]; } return $$; }, function($1, $2) { var $$; { $$ = ['u-', $2]; } return $$; }, , $f7, , $f7, $f7, , $f7, , $f7, , $f7, , $f7]; | ||
function $f7($1, $2, $3) { var $$; { $$ = [$2.text, $1, $3]; } return $$; } var tFuncs = [, function() { var $$; { $$ = ['prog', [], []]; } return $$; }, function($1, $2) { var $$; { $1[1].push($2); $$ = $1; } return $$; }, function($1, $2) { var $$; { $1[2].push($2.text.slice(10, -11)); $$ = $1; } return $$; }, function() { var $$; { $$ = []; } return $$; }, function($1, $2) { var $$; { $1.push($2); $$ = $1; } return $$; }, function($1, $2, $3, $4, $5) { var $$; { $$ = ['if', $2, $4]; } return $$; }, function($1, $2, $3, $4, $5, $6, $7) { var $$; { $$ = ['if', $2, $4, $6]; } return $$; }, $f0, $f0, $f1, $f1, function($1, $2, $3, $4, $5, $6) { var $$; { $$ = ['set', $3[0] == 'id' ? $3[1] : $3, $5]; } return $$; }, function($1, $2, $3) { var $$; { $$ = ['eval', $2, false]; } return $$; }, function($1, $2, $3) { var $$; { $$ = ['eval', $2, true]; } return $$; }, function($1) { var $$; { $$ = ['text', $1]; } return $$; }, function($1, $2, $3, $4) { var $$; { $$ = ['inc', evalStr($3.text)]; } return $$; }, function($1) { var $$; { $$ = evalStr($1.text); } return $$; }, $f2, function($1) { var $$; { $$ = $1; } return $$; }, function($1, $2) { var $$; { $$ = $1 + $2; } return $$; }, $f2, function($1, $2, $3) { var $$; { $$ = $2.text; } return $$; }, , , , function($1) { var $$; { $$ = ['lit', evalStr($1.text)]; } return $$; }, function($1) { var $$; { $$ = ['lit', evalNum($1.text)]; } return $$; }, function($1) { var $$; { $$ = ['lit', $1.text == 'true']; } return $$; }, function($1) { var $$; { $$ = ['id', $1.text]; } return $$; }, function($1, $2, $3) { var $$; { $$ = $2; } return $$; }, , , function($1) { var $$; { $$ = ['null']; } return $$; }, function($1, $2) { var $$; { $$ = ['array', []]; } return $$; }, function($1, $2, $3) { var $$; { $$ = ['array', $2]; } return $$; }, $f3, $f3, $f4, $f4, function($1) { var $$; { $$ = 1; } return $$; }, function($1, $2) { var $$; { $$ = $1 + 1; } return $$; }, function($1, $2) { var $$; { $$ = ['object', []]; } return $$; }, function($1, $2, $3) { var $$; { $$ = ['object', $2]; } return $$; }, $f5, function($1, $2, $3) { var $$; { $1.push($3); $$ = $1; } return $$; }, function($1, $2, $3) { var $$; { $$ = ['init', $1, $3]; } return $$; }, , function($1, $2, $3) { var $$; { $$ = ['.', $1, $3.text]; } return $$; }, function($1, $2, $3, $4) { var $$; { $$ = ['[]', $1, $3]; } return $$; }, $f6, $f6, $f5, function($1, $2, $3) { var $$; { ($$ = $1).push($3); } return $$; }, , function($1, $2) { var $$; { $$ = ['!', $2]; } return $$; }, function($1, $2) { var $$; { $$ = ['u-', $2]; } return $$; }, , $f7, , $f7, $f7, , $f7, , $f7, , $f7, , $f7, , function($1, $2, $3, $4, $5) { var $$; { $$ = ['cond', $1, $3, $5]; } return $$; }]; | ||
function getAction(x, y) { | ||
@@ -462,2 +465,3 @@ return tAction[x][y]; | ||
case 'lit': | ||
case 't': | ||
return true; | ||
@@ -515,2 +519,5 @@ } | ||
} | ||
function isCond(op) { | ||
return isLogicalOr(op) || op == 'cond'; | ||
} | ||
@@ -700,2 +707,4 @@ /// <reference path="common.js"/> | ||
return [exprToStr(x[1], isLogicalOr), '||', exprToStr(x[2], isLogicalAnd)]; | ||
case 'cond': | ||
return [exprToStr(x[1], isLogicalOr), '?', exprToStr(x[2], isCond), ':', exprToStr(x[3], isCond)]; | ||
default: | ||
@@ -726,2 +735,5 @@ throw Error("unknown expr: " + x[0]); | ||
if (prog[2]) { | ||
jsStr += prog[2].join(';'); | ||
} | ||
//alert(posLog.join('\n')); | ||
@@ -1072,2 +1084,2 @@ var strObj = new String(jsStr); | ||
Crox.version = "1.4.1";return Crox;})();if ( typeof module == "object" && module && typeof module.exports == "object" ) module.exports = Crox;else if (typeof define == "function" && (define.amd || define.cmd) ) define(function () { return Crox; } );else if (typeof KISSY != "undefined") KISSY.add(function(){ return Crox; });if (root) root.Crox = Crox; })(this); | ||
Crox.version = "1.4.3";return Crox;})();if ( typeof module == "object" && module && typeof module.exports == "object" ) module.exports = Crox;else if (typeof define == "function" && (define.amd || define.cmd) ) define(function () { return Crox; } );else if (typeof KISSY != "undefined") KISSY.add(function(){ return Crox; });if (root) root.Crox = Crox; })(this); |
/* | ||
Crox v1.4.1 | ||
Crox v1.4.3 | ||
https://github.com/thx/crox | ||
Released under the MIT license | ||
md5: 1d452903de5f68f37edaaecde3e55882 | ||
md5: c605cc0256fc0e8589c44fd263575d58 | ||
*/ | ||
(function(t){var m=function(){function m(a,b){this.row=a;this.col=b}function t(a,b){var d=a.substring(0,b),e=d.match(/\r\n?|\n/g),y=1;e&&(y+=e.length);d=1+/[^\r\n]*$/.exec(d)[0].length;return new m(y,d)}function A(a){return'"'+a.replace(/[\x00-\x1f"\\\u2028\u2029]/g,function(a){switch(a){case '"':return'\\"';case "\\":return"\\\\";case "\b":return"\\b";case "\f":return"\\f";case "\n":return"\\n";case "\r":return"\\r";case "\t":return"\\t"}return"\\u"+("000"+a.charCodeAt(0).toString(16)).slice(-4)})+ | ||
'"'}function H(a){return eval(a)}function N(a){function b(a,b,e,d,p,l){this.tag=a;this.text=b;this.index=e;this.subMatches=d;this.end=p;this.pos=l}function d(){}function e(a){for(var b=1,e=[],k=[1],p=[],l=0;l<a.length;++l)k.push(b+=RegExp("|"+a[l][0].source).exec("").length),p.push(a[l][1]||d),e.push("("+a[l][0].source+")");return[RegExp(e.join("|")+"|","g"),k,p]}b.prototype.toString=function(){return this.text};var y=a.$||"$",x={},r;for(r in a)"$"!=r.charAt(0)&&(x[r]=e(a[r]));return function(a){var e= | ||
a.length,d=0,k=[""],p={text:"",index:0,source:a,pushState:function(f){k.push(f)},popState:function(){k.pop()},retract:function(f){d-=f}},l=new m(1,1),r=/\r\n?|\n/g,u=/[^\r\n\u2028\u2029]*$/;return{scan:function(){do{var f;a:{var g=x[k[k.length-1]],c=g[0];c.lastIndex=d;f=c.exec(a);if(""==f[0]){if(d<e)throw Error("lexer error: "+l+"\n"+a.slice(d,d+50));f=new b(y,"",d,null,d,l)}else{p.index=d;d=c.lastIndex;for(var c=g[1],q=0;q<c.length;++q)if(f[c[q]]){g=g[2][q].apply(p,f.slice(c[q],c[q+1]));f=null== | ||
g?null:new b(g,f[0],p.index,f.slice(c[q]+1,c[q+1]),d,l);break a}f=void 0}}if(null!=f)return g=l.row,c=l.col,q=(q=f.text.match(r))?q.length:0,g+=q,c=0==q?c+f.text.length:u.exec(f.text)[0].length+1,l=new m(g,c),f}while(1)},GetCurrentPosition:function(){return l},getPos:function(f){return t(a,f)}}}}function B(a){var b;a:{switch(a){case "id":case "lit":b=!0;break a}b=!1}return b||"."==a||"[]"==a}function C(a){return B(a)||"!"==a||"u-"==a}function D(a){if(C(a))return!0;switch(a){case "*":case "/":case "%":return!0}return!1} | ||
function E(a){if(D(a))return!0;switch(a){case "+":case "-":return!0}return!1}function I(a){if(E(a))return!0;switch(a){case "<":case ">":case "<=":case ">=":return!0}return!1}function J(a){if(I(a))return!0;switch(a){case "eq":case "ne":return!0}return!1}function K(a){return J(a)||"&&"==a}function O(a){return K(a)||"||"==a}function P(a,b,d){function e(f){l.push(f)}function y(f,a){f.pos=a;return f}function x(f){for(var a=0;a<f.length;++a){var c=f[a];switch(c[0]){case "if":e("if(");e(n(c[1]));e("){"); | ||
x(c[2]);e("}");c[3]&&(e("else{"),x(c[3]),e("}"));break;case "each":var h=c[3]?c[3].replace(/^_+/,"$&$&"):"_"+p++,l=n(c[1]),k=r(l);/^\w+$/.test(k)||(k="_"+p++,e("var "+k+" = "),e(l),e(";"));c[5]?(e("for(var "+h+"=0;"+h+"<"),e(n([".",y(["t",k],c[1].pos),"length"])),e(";"+h+"++){")):e("for(var "+h+" in "+k+") {");e("var "+c[4]+" = ");e(n(["[]",y(["t",k],c[1].pos),["t",h]]));e(";");x(c[2]);e("}");break;case "set":"string"==typeof c[1]?e("var "+c[1].replace(/^_+/,"$&$&")+"="):(e(n(c[1])),e("="));e(n(c[2])); | ||
e(";");break;case "eval":l=n(c[1]);k=r(l);/^\w+$/.test(k)?h=k:(h="_t",e("_t = "),e(l),e(";"));e("if("+h+" !=null)_s += "+((d?!c[2]:c[2])?b+"("+h+")":h)+";");break;case "text":e("_s += "+A(c[1])+";");break;case "inc":break;default:throw Error("unknown stmt: "+c[0]);}}}function r(f){if("string"==typeof f)return f;if(f instanceof Array){for(var a=[],b=0;b<f.length;++b)a.push(r(f[b]));return a.join("")}throw Error("unknown type");}function h(f,a){var b=n(f);a&&!a(f[0])&&(b=["(",b,")"]);return b}function n(a){return y(m(a), | ||
a.pos)}function m(a){switch(a[0]){case "t":return a[1];case "id":return a[1].replace(/^_+/,"$&$&");case "lit":return"string"==typeof a[1]?A(a[1]):String(a[1]);case "array":for(var b=["["],c=0;c<a[1].length;++c)0<c&&b.push(","),b.push(n(a[1][c]));b.push("]");return b;case "object":b=["{"];for(c=0;c<a[1].length;++c)0<c&&b.push(","),b.push(A(a[1][c][1])),b.push(":"),b.push(n(a[1][c][2]));b.push("}");return b;case "null":return["null"];case ".":return[h(a[1],B),".",a[2]];case "[]":return[h(a[1],B),"[", | ||
n(a[2]),"]"];case "()":b=[h(a[1],B),"("];if(a[2])for(c=0;c<a[2].length;++c)0<c&&b.push(","),b.push(n(a[2][c]));b.push(")");return b;case "!":return["!",h(a[1],C)];case "u-":return["- ",h(a[1],C)];case "*":case "/":case "%":return[h(a[1],D),a[0],h(a[2],C)];case "+":case "-":return[h(a[1],E),a[0]," ",h(a[2],D)];case "<":case ">":case "<=":case ">=":return[h(a[1],I),a[0],h(a[2],E)];case "==":case "!=":case "===":case "!==":return[h(a[1],J),a[0],h(a[2],I)];case "&&":return[h(a[1],K),"&&",h(a[2],J)];case "||":return[h(a[1], | ||
O),"||",h(a[2],K)];default:throw Error("unknown expr: "+a[0]);}}function k(a){"string"==typeof a&&(u+=a);if(a instanceof Array){a.pos&&t.push([u.length,a.pos]);for(var b=0;b<a.length;++b)k(a[b])}}var p=0,l=[];x(a[1]);var t=[],u="";k(l);a=new String(u);a.posLog=t;return a}function L(a){return Q(R(a))}function M(a,b){var d=L(a),e;b&&(e=b.htmlEncode);a=P(d,e||"_htmlEncode",!0);d="";e||(d="var _obj = { '<': '<', '>': '>', '&': '&', '\"': '"' };\r\n\tfunction _htmlEncode(s) {\r\n\t\treturn String(s).replace(/[<>&\"]/g, function(c) {\r\n\t\t\treturn _obj[c];\r\n\t\t});\r\n\t}"); | ||
d+="var _t,_s = '';";b&&b.debug?(e=a.posLog,d=d+"try{\n"+("eval("+JSON.stringify(a)+");"),d+="}catch(_e){throw "+function(a,b){for(var e=a.stack,d=e.split(/\r\n?|\n/),d=+/:(\d+):(\d+)\)$/m.exec(d[1])[2],n=null,m=0;m<b.length;++m)if(b[m][0]+1>=d){n=b[m][1];break}d=n.pos;return Error("CroxError: "+("("+d.row+","+d.col+")")+"\n"+e)}+"(_e,"+JSON.stringify(e)+");}"):d+=a;d+="return _s;";return Function("root",d)}m.prototype.toString=function(){return"("+this.row+","+this.col+")"};var R=function(){var a= | ||
[[/\s+/],[/\/\/[^\r\n]*|\/\*[\s\S]*?\*\//],[/[A-Za-z_]\w*/,function(a){switch(a){case "true":case "false":return"boolean";case "set":case "include":case "null":return a;default:if(-1!=" abstract boolean break byte case catch char class const continue debugger default delete do double else enum export extends final finally float for function goto if implements import in instanceof int interface let long native new package private protected public return short static super switch synchronized this throw throws transient try typeof var void volatile while with yield ".indexOf(" "+ | ||
a+" ")||"null"==a)throw Error("Reserved: "+a+" "+t(this.source,this.index));return"realId"}}],[/"(?:[^"\\]|\\[\s\S])*"|'(?:[^'\\]|\\[\s\S])*'/,function(a){return"string"}],[/\d+(?:\.\d+)?(?:e-?\d+)?/,function(a){return"number"}],[/{(?!{)/,function(a){return"{"}],[/}(?!})/,function(a){return"}"}],[function(a){a.sort().reverse();for(var d=0;d<a.length;++d)a[d]=a[d].replace(/[()*+?.[\]|]/g,"\\$&");return RegExp(a.join("|"))}("! % && ( ) * + - . / < <= = > >= [ ] || === !== == != , :".split(" ")),function(a){return/[*/%]/.test(a)? | ||
"mul":/[<>]/.test(a)?"rel":/[!=]=/.test(a)?"eq":a}]];return N({"":[[/(?:(?!{{)[\s\S])+/,function(a){return"text"}],[/{{{/,function(a){this.pushState(a);return a}],[/{{(?:\/if|else|\/each|\/forin|\/raw)}}/,function(a){return a}],[/{{#raw}}/,function(a){this.pushState("raw");return a}],[/{{(?:#(?:if|each|forin)(?=\s))?/,function(a){this.pushState("{{");return a}]],raw:[[/(?:(?!{{\/raw}})[\s\S])+/,function(a){this.popState();return"rawtext"}]],"{{":a.concat([[/}}/,function(a){this.popState();return a}]]), | ||
"{{{":a.concat([[/}}}/,function(a){this.popState();return a}]])})}(),Q=function(){var a={nStart:41,tSymbols:"$ ! && ( ) + , - . : = [ ] boolean eq include mul null number rawtext realId rel set string text { {{ {{#each {{#forin {{#if {{#raw}} {{/each}} {{/forin}} {{/if}} {{/raw}} {{else}} {{{ || } }} }}} AdditiveExpression ArrayLiteral ElementList Elision EqualityExpression LogicalAndExpression LogicalOrExpression MemberExpression MultiplicativeExpression ObjectLiteral PrimaryExpression PropertyAssignment PropertyNameAndValueList RelationalExpression UnaryExpression _text args empty expr id name program statement statements texts program'".split(" "), | ||
actionList:[{_:-2},{_:-32768},{24:11,26:9,27:7,28:8,29:6,30:12,36:10,_:-1},{_:-3},{24:11,30:12,_:-13},{_:-17},{1:37,3:33,7:38,11:35,13:32,15:28,17:34,18:31,20:30,22:27,23:29,25:36,_:0},{1:37,3:33,7:38,11:35,13:32,15:43,17:34,18:31,20:30,22:42,23:29,25:36,_:0},{_:-19},{19:45,_:0},{_:-18},{_:-27},{_:-45},{_:-29},{_:-30},{3:46,8:48,11:47,_:-52},{_:-55},{16:49,_:-57},{5:51,7:50,_:-60},{21:52,_:-62},{14:53,_:-64},{2:54,_:-66},{37:55,_:-68},{39:56,_:0},{_:-22},{_:-23},{_:-24},{_:-21},{_:-25},{_:-26},{_:-31}, | ||
{6:62,12:61,_:-69},{15:28,20:30,22:27,23:67,38:68,_:0},{15:28,20:30,22:27,23:67,_:0},{39:73,_:0},{3:33,11:35,13:32,15:28,17:34,18:31,20:30,22:27,23:29,25:36,_:-22},{23:75,_:-23},{40:76,_:0},{34:77,_:0},{1:37,3:33,7:38,11:35,13:32,15:28,17:34,18:31,20:30,22:27,23:29,25:36,_:-69},{15:28,20:30,22:27,_:0},{_:-2},{4:91,_:0},{6:93,12:92,_:0},{1:37,3:33,6:95,7:38,11:35,13:32,15:28,17:34,18:31,20:30,22:27,23:29,25:36,_:0},{_:-32},{_:-38},{9:97,_:0},{_:-16},{6:98,38:99,_:0},{_:-42},{_:-15},{_:-40},{_:-53}, | ||
{_:-54},{15:28,20:30,22:27,23:67,_:-69},{_:-11},{3:46,8:48,10:104,11:47,_:0},{39:105,_:0},{_:-12},{_:-20},{4:106,6:107,_:0},{_:-50},{4:108,_:0},{12:109,_:0},{_:-46},{_:-56},{16:49,_:-59},{16:49,_:-58},{5:51,7:50,_:-61},{21:52,_:-63},{14:53,_:-65},{2:54,_:-67},{24:11,26:9,27:7,28:8,29:6,30:12,33:110,35:111,36:10,_:0},{_:-28},{_:-33},{6:62,_:-69},{_:-34},{_:-39},{_:-35},{_:-41},{39:116,_:0},{39:117,_:0},{39:118,_:0},{39:119,_:0},{_:-14},{_:-48},{_:-49},{_:-47},{_:-4},{_:-2},{_:-44},{_:-43},{_:-2},{_:-2}, | ||
{39:129,_:0},{_:-51},{24:11,26:9,27:7,28:8,29:6,30:12,33:130,36:10,_:0},{_:-36},{_:-37},{24:11,26:9,27:7,28:8,29:6,30:12,31:131,36:10,_:0},{24:11,26:9,27:7,28:8,29:6,30:12,31:132,36:10,_:0},{24:11,26:9,27:7,28:8,29:6,30:12,32:133,36:10,_:0},{24:11,26:9,27:7,28:8,29:6,30:12,32:134,36:10,_:0},{_:-10},{_:-5},{_:-6},{_:-7},{_:-8},{_:-9}],actionIndex:[0,1,2,3,4,5,6,6,6,7,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,6,30,31,32,6,6,33,33,34,35,36,37,38,39,6,40,6,6,6,6,6,6,6,41,42,43, | ||
44,6,45,46,47,48,49,50,51,52,53,54,55,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,6,33,80,81,82,83,84,6,85,86,6,87,88,89,90,44,6,91,92,93,93,94,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109],tGoto:[{62:1,64:2},{},{63:3,65:4,56:5},{},{56:13},{},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:26},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:39},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22, | ||
45:23,46:24,47:25,59:40},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:41},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:44},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:57},{},{43:58,44:59,58:60},{61:63,60:64,53:65,52:66},{60:14,51:15,42:16,50:17,48:18,55:69},{60:14,51:15,42:16,50:17,48:18,55:70},{61:71,60:64},{61:72,60:64},{},{60:14,51:15,42:16, | ||
50:17,48:74},{},{},{},{60:14,51:15,42:16,50:17,48:18,57:78,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:79,58:80},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:81},{60:82},{60:14,51:15,42:16,50:17,48:18,55:83},{60:14,51:15,42:16,50:17,48:18,55:19,49:84},{60:14,51:15,42:16,50:17,48:18,55:19,49:85},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:86},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:87},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:88},{60:14, | ||
51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:89},{64:90},{},{},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:94},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:96},{},{},{},{},{},{},{},{},{},{},{61:100,60:64,58:101},{61:102,60:64,58:103},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{63:3,65:4,56:5},{},{},{44:112,58:113},{},{},{},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:114},{61:63,60:64, | ||
52:115},{},{},{},{},{},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:120},{},{},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:121},{},{},{},{64:122},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:123},{60:14,51:15,42:16,50:17,48:18,55:19,49:20,41:21,54:22,45:23,46:24,47:25,59:124},{},{},{64:125},{64:126},{64:127},{64:128},{},{},{63:3,65:4,56:5},{},{},{63:3,65:4,56:5},{63:3,65:4,56:5},{63:3,65:4,56:5},{63:3,65:4, | ||
56:5},{},{},{},{},{},{}],tRules:[[66,62],[62,64],[64],[64,64,63],[63,29,59,39,64,33],[63,29,59,39,64,35,64,33],[63,27,59,61,61,39,64,31],[63,27,59,61,58,39,64,31],[63,28,59,61,61,39,64,32],[63,28,59,61,58,39,64,32],[63,26,22,48,10,59,39],[63,26,59,39],[63,36,59,40],[63,65],[63,26,15,23,39],[61,23],[61,60],[65,56],[65,65,56],[56,24],[56,30,19,34],[60,20],[60,22],[60,15],[51,23],[51,18],[51,13],[51,60],[51,3,59,4],[51,42],[51,50],[51,17],[42,11,12],[42,11,43,12],[43,44,59],[43,58,59],[43,43,6,44,59], | ||
[43,43,6,58,59],[44,6],[44,44,6],[50,25,38],[50,25,53,38],[53,52],[53,53,6,52],[52,61,9,59],[48,51],[48,48,8,60],[48,48,11,59,12],[48,48,3,57,4],[48,48,3,58,4],[57,59],[57,57,6,59],[55,48],[55,1,55],[55,7,55],[49,55],[49,49,16,55],[41,49],[41,41,5,49],[41,41,7,49],[54,41],[54,54,21,41],[45,54],[45,45,14,54],[46,45],[46,46,2,45],[47,46],[47,47,37,46],[59,47],[58]],objCharset:null};return function(b,d){function e(a,b,c,d,e,f,g){return["each",b,f,d,c,!0]}function m(a,b,c,d,e,f,g){return["each",b,f,d, | ||
c,!1]}function x(a){return a.text}function r(a,b){var c;c=Array(a||0);c.push(b);return c}function h(a,b,c,d){c&&(a.length+=c);a.push(d);return a}function n(a){return[a]}function t(a,b,c,d){return["()",a,c]}function k(a,b,c){return[b.text,a,c]}function p(a,b){return c[a][b]}function l(a){throw Error("Syntax error: "+b.getPos(F.index)+(a?"\n"+a:""));}for(var B=a.nStart,u=a.tSymbols,f={},g=0;g<u.length;++g)f[u[g]]=g;var c=a.tAction||a.actionList,q=a.tGoto,C=a.tRules,A=a.actionIndex,D=[,function(a){return["prog", | ||
a]},function(){return[]},function(a,b){a.push(b);return a},function(a,b,c,d,e){return["if",b,d]},function(a,b,c,d,e,f,g){return["if",b,d,f]},e,e,m,m,function(a,b,c,d,e,f){return["set","id"==c[0]?c[1]:c,e]},function(a,b,c){return["eval",b,!1]},function(a,b,c){return["eval",b,!0]},function(a){return["text",a]},function(a,b,c,d){return["inc",H(c.text)]},function(a){return H(a.text)},x,function(a){return a},function(a,b){return a+b},x,function(a,b,c){return b.text},,,,function(a){return["lit",H(a.text)]}, | ||
function(a){return["lit",+a.text]},function(a){return["lit","true"==a.text]},function(a){return["id",a.text]},function(a,b,c){return b},,,function(a){return["null"]},function(a,b){return["array",[]]},function(a,b,c){return["array",b]},r,r,h,h,function(a){return 1},function(a,b){return a+1},function(a,b){return["object",[]]},function(a,b,c){return["object",b]},n,function(a,b,c){a.push(c);return a},function(a,b,c){return["init",a,c]},,function(a,b,c){return[".",a,c.text]},function(a,b,c,d){return["[]", | ||
a,c]},t,t,n,function(a,b,c){a.push(c);return a},,function(a,b){return["!",b]},function(a,b){return["u-",b]},,k,,k,k,,k,,k,,k,,k];A&&(p=function(a,b){var d=c[A[a]];return d[b]||d._});var z=0,G=[0],F=b.scan(),v=[],E={get:function(a){return v[v.length+a]},set:function(a,b){v[v.length+a]=b}};if(d)for(g in d)E[g]=d[g];for(;;)if(g=p(z,f[F.tag]))if(0<g)G.push(z=g),v.push(F),F=b.scan();else if(0>g&&-32768<g){var g=-g,z=C[g],w=z.length-1;G.length-=w;z=q[G[G.length-1]][z[0]];G.push(z);D[g]?(g=D[g].apply(E, | ||
v.splice(v.length-w,w)),v.push(g)):1!=w&&v.splice(v.length-w,w,null)}else return F.tag!=u[0]&&l(),v[0];else{g=[];for(w=0;w<B;++w)p(z,w)&&g.push(u[w]);l("find "+F.tag+"\nexpect "+g.join(" "))}}}();return{parse:L,compile:M,render:function(a,b){return M(a)(b)},version:"1.4.1"}}();"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=m:"function"==typeof define&&(define.amd||define.cmd)?define(function(){return m}):"undefined"!=typeof KISSY&&KISSY.add(function(){return m});t&& | ||
(t.Crox=m)})(this); | ||
(function(u){var m=function(){function m(a,b){this.row=a;this.col=b}function u(a,b){var d=a.substring(0,b),e=d.match(/\r\n?|\n/g),y=1;e&&(y+=e.length);d=1+/[^\r\n]*$/.exec(d)[0].length;return new m(y,d)}function A(a){return'"'+a.replace(/[\x00-\x1f"\\\u2028\u2029]/g,function(a){switch(a){case '"':return'\\"';case "\\":return"\\\\";case "\b":return"\\b";case "\f":return"\\f";case "\n":return"\\n";case "\r":return"\\r";case "\t":return"\\t"}return"\\u"+("000"+a.charCodeAt(0).toString(16)).slice(-4)})+ | ||
'"'}function H(a){return eval(a)}function P(a){function b(a,b,e,d,p,l){this.tag=a;this.text=b;this.index=e;this.subMatches=d;this.end=p;this.pos=l}function d(){}function e(a){for(var b=1,e=[],k=[1],p=[],l=0;l<a.length;++l)k.push(b+=RegExp("|"+a[l][0].source).exec("").length),p.push(a[l][1]||d),e.push("("+a[l][0].source+")");return[RegExp(e.join("|")+"|","g"),k,p]}b.prototype.toString=function(){return this.text};var y=a.$||"$",x={},r;for(r in a)"$"!=r.charAt(0)&&(x[r]=e(a[r]));return function(a){var e= | ||
a.length,d=0,k=[""],p={text:"",index:0,source:a,pushState:function(f){k.push(f)},popState:function(){k.pop()},retract:function(f){d-=f}},l=new m(1,1),r=/\r\n?|\n/g,t=/[^\r\n\u2028\u2029]*$/;return{scan:function(){do{var f;a:{var h=x[k[k.length-1]],c=h[0];c.lastIndex=d;f=c.exec(a);if(""==f[0]){if(d<e)throw Error("lexer error: "+l+"\n"+a.slice(d,d+50));f=new b(y,"",d,null,d,l)}else{p.index=d;d=c.lastIndex;for(var c=h[1],q=0;q<c.length;++q)if(f[c[q]]){h=h[2][q].apply(p,f.slice(c[q],c[q+1]));f=null== | ||
h?null:new b(h,f[0],p.index,f.slice(c[q]+1,c[q+1]),d,l);break a}f=void 0}}if(null!=f)return h=l.row,c=l.col,q=(q=f.text.match(r))?q.length:0,h+=q,c=0==q?c+f.text.length:t.exec(f.text)[0].length+1,l=new m(h,c),f}while(1)},GetCurrentPosition:function(){return l},getPos:function(f){return u(a,f)}}}}function B(a){var b;a:{switch(a){case "id":case "lit":case "t":b=!0;break a}b=!1}return b||"."==a||"[]"==a}function C(a){return B(a)||"!"==a||"u-"==a}function D(a){if(C(a))return!0;switch(a){case "*":case "/":case "%":return!0}return!1} | ||
function E(a){if(D(a))return!0;switch(a){case "+":case "-":return!0}return!1}function I(a){if(E(a))return!0;switch(a){case "<":case ">":case "<=":case ">=":return!0}return!1}function J(a){if(I(a))return!0;switch(a){case "eq":case "ne":return!0}return!1}function K(a){return J(a)||"&&"==a}function L(a){return K(a)||"||"==a}function M(a){return L(a)||"cond"==a}function Q(a,b,d){function e(f){l.push(f)}function y(f,a){f.pos=a;return f}function x(f){for(var a=0;a<f.length;++a){var c=f[a];switch(c[0]){case "if":e("if("); | ||
e(n(c[1]));e("){");x(c[2]);e("}");c[3]&&(e("else{"),x(c[3]),e("}"));break;case "each":var g=c[3]?c[3].replace(/^_+/,"$&$&"):"_"+p++,l=n(c[1]),k=r(l);/^\w+$/.test(k)||(k="_"+p++,e("var "+k+" = "),e(l),e(";"));c[5]?(e("for(var "+g+"=0;"+g+"<"),e(n([".",y(["t",k],c[1].pos),"length"])),e(";"+g+"++){")):e("for(var "+g+" in "+k+") {");e("var "+c[4]+" = ");e(n(["[]",y(["t",k],c[1].pos),["t",g]]));e(";");x(c[2]);e("}");break;case "set":"string"==typeof c[1]?e("var "+c[1].replace(/^_+/,"$&$&")+"="):(e(n(c[1])), | ||
e("="));e(n(c[2]));e(";");break;case "eval":l=n(c[1]);k=r(l);/^\w+$/.test(k)?g=k:(g="_t",e("_t = "),e(l),e(";"));e("if("+g+" !=null)_s += "+((d?!c[2]:c[2])?b+"("+g+")":g)+";");break;case "text":e("_s += "+A(c[1])+";");break;case "inc":break;default:throw Error("unknown stmt: "+c[0]);}}}function r(f){if("string"==typeof f)return f;if(f instanceof Array){for(var a=[],b=0;b<f.length;++b)a.push(r(f[b]));return a.join("")}throw Error("unknown type");}function g(a,b){var c=n(a);b&&!b(a[0])&&(c=["(",c,")"]); | ||
return c}function n(a){return y(m(a),a.pos)}function m(a){switch(a[0]){case "t":return a[1];case "id":return a[1].replace(/^_+/,"$&$&");case "lit":return"string"==typeof a[1]?A(a[1]):String(a[1]);case "array":for(var b=["["],c=0;c<a[1].length;++c)0<c&&b.push(","),b.push(n(a[1][c]));b.push("]");return b;case "object":b=["{"];for(c=0;c<a[1].length;++c)0<c&&b.push(","),b.push(A(a[1][c][1])),b.push(":"),b.push(n(a[1][c][2]));b.push("}");return b;case "null":return["null"];case ".":return[g(a[1],B),".", | ||
a[2]];case "[]":return[g(a[1],B),"[",n(a[2]),"]"];case "()":b=[g(a[1],B),"("];if(a[2])for(c=0;c<a[2].length;++c)0<c&&b.push(","),b.push(n(a[2][c]));b.push(")");return b;case "!":return["!",g(a[1],C)];case "u-":return["- ",g(a[1],C)];case "*":case "/":case "%":return[g(a[1],D),a[0],g(a[2],C)];case "+":case "-":return[g(a[1],E),a[0]," ",g(a[2],D)];case "<":case ">":case "<=":case ">=":return[g(a[1],I),a[0],g(a[2],E)];case "==":case "!=":case "===":case "!==":return[g(a[1],J),a[0],g(a[2],I)];case "&&":return[g(a[1], | ||
K),"&&",g(a[2],J)];case "||":return[g(a[1],L),"||",g(a[2],K)];case "cond":return[g(a[1],L),"?",g(a[2],M),":",g(a[3],M)];default:throw Error("unknown expr: "+a[0]);}}function k(a){"string"==typeof a&&(t+=a);if(a instanceof Array){a.pos&&u.push([t.length,a.pos]);for(var b=0;b<a.length;++b)k(a[b])}}var p=0,l=[];x(a[1]);var u=[],t="";k(l);a[2]&&(t+=a[2].join(";"));a=new String(t);a.posLog=u;return a}function N(a){return R(S(a))}function O(a,b){var d=N(a),e;b&&(e=b.htmlEncode);a=Q(d,e||"_htmlEncode",!0); | ||
d="";e||(d="var _obj = { '<': '<', '>': '>', '&': '&', '\"': '"' };\r\n\tfunction _htmlEncode(s) {\r\n\t\treturn String(s).replace(/[<>&\"]/g, function(c) {\r\n\t\t\treturn _obj[c];\r\n\t\t});\r\n\t}");d+="var _t,_s = '';";b&&b.debug?(e=a.posLog,d=d+"try{\n"+("eval("+JSON.stringify(a)+");"),d+="}catch(_e){throw "+function(a,b){for(var e=a.stack,d=e.split(/\r\n?|\n/),d=+/:(\d+):(\d+)\)$/m.exec(d[1])[2],n=null,m=0;m<b.length;++m)if(b[m][0]+1>=d){n=b[m][1];break}d=n.pos;return Error("CroxError: "+ | ||
("("+d.row+","+d.col+")")+"\n"+e)}+"(_e,"+JSON.stringify(e)+");}"):d+=a;d+="return _s;";return Function("root",d)}m.prototype.toString=function(){return"("+this.row+","+this.col+")"};var S=function(){var a=[[/\s+/],[/\/\/[^\r\n]*|\/\*[\s\S]*?\*\//],[/[A-Za-z_]\w*/,function(a){switch(a){case "true":case "false":return"boolean";case "set":case "include":case "null":return a;default:if(-1!=" abstract boolean break byte case catch char class const continue debugger default delete do double else enum export extends final finally float for function goto if implements import in instanceof int interface let long native new package private protected public return short static super switch synchronized this throw throws transient try typeof var void volatile while with yield ".indexOf(" "+ | ||
a+" ")||"null"==a)throw Error("Reserved: "+a+" "+u(this.source,this.index));return"realId"}}],[/"(?:[^"\\]|\\[\s\S])*"|'(?:[^'\\]|\\[\s\S])*'/,function(a){return"string"}],[/\d+(?:\.\d+)?(?:e-?\d+)?/,function(a){return"number"}],[/{(?!{)/,function(a){return"{"}],[/}(?!})/,function(a){return"}"}],[function(a){a.sort().reverse();for(var d=0;d<a.length;++d)a[d]=a[d].replace(/[()*+?.[\]|]/g,"\\$&");return RegExp(a.join("|"))}("! % && ( ) * + - . / < <= = > >= [ ] || === !== == != , : ?".split(" ")),function(a){return/[*/%]/.test(a)? | ||
"mul":/[<>]/.test(a)?"rel":/[!=]=/.test(a)?"eq":a}]];return P({"":[[/(?:(?!{{)[\s\S])+/,function(a){return"text"}],[/{{{/,function(a){this.pushState(a);return a}],[/{{(?:\/if|else|\/each|\/forin|\/raw)}}/,function(a){return a}],[/{{#raw}}/,function(a){this.pushState("raw");return a}],[/{{<script>[\s\S]*?<\/script>}}/,function(a){return"script"}],[/{{(?:#(?:if|each|forin)(?=\s))?/,function(a){this.pushState("{{");return a}]],raw:[[/(?:(?!{{\/raw}})[\s\S])+/,function(a){this.popState();return"rawtext"}]], | ||
"{{":a.concat([[/}}/,function(a){this.popState();return a}]]),"{{{":a.concat([[/}}}/,function(a){this.popState();return a}]])})}(),R=function(){var a={nStart:43,tSymbols:"$ ! && ( ) + , - . : = ? [ ] boolean eq include mul null number rawtext realId rel script set string text { {{ {{#each {{#forin {{#if {{#raw}} {{/each}} {{/forin}} {{/if}} {{/raw}} {{else}} {{{ || } }} }}} AdditiveExpression ArrayLiteral ConditionalExpression ElementList Elision EqualityExpression LogicalAndExpression LogicalOrExpression MemberExpression MultiplicativeExpression ObjectLiteral PrimaryExpression PropertyAssignment PropertyNameAndValueList RelationalExpression UnaryExpression _text args empty expr id name program statement statements texts program'".split(" "), | ||
actionList:[{_:-1},{23:5,26:11,28:9,29:7,30:8,31:6,32:12,38:10,_:-32768},{_:-2},{26:11,32:12,_:-15},{_:-19},{_:-3},{1:38,3:34,7:39,12:36,14:33,16:29,18:35,19:32,21:31,24:28,25:30,27:37,_:0},{1:38,3:34,7:39,12:36,14:33,16:44,18:35,19:32,21:31,24:43,25:30,27:37,_:0},{_:-21},{20:46,_:0},{_:-20},{_:-29},{_:-47},{_:-31},{_:-32},{3:47,8:49,12:48,_:-54},{_:-57},{17:50,_:-59},{5:52,7:51,_:-62},{22:53,_:-64},{15:54,_:-66},{2:55,_:-68},{11:57,39:56,_:-70},{_:-72},{41:58,_:0},{_:-24},{_:-25},{_:-26},{_:-23}, | ||
{_:-27},{_:-28},{_:-33},{6:64,13:63,_:-73},{16:29,21:31,24:28,25:69,40:70,_:0},{16:29,21:31,24:28,25:69,_:0},{41:75,_:0},{3:34,12:36,14:33,16:29,18:35,19:32,21:31,24:28,25:30,27:37,_:-24},{25:77,_:-25},{42:78,_:0},{36:79,_:0},{1:38,3:34,7:39,12:36,14:33,16:29,18:35,19:32,21:31,24:28,25:30,27:37,_:-73},{16:29,21:31,24:28,_:0},{_:-4},{4:94,_:0},{6:96,13:95,_:0},{1:38,3:34,6:98,7:39,12:36,14:33,16:29,18:35,19:32,21:31,24:28,25:30,27:37,_:0},{_:-34},{_:-40},{9:100,_:0},{_:-18},{6:101,40:102,_:0},{_:-44}, | ||
{_:-17},{_:-42},{_:-55},{_:-56},{16:29,21:31,24:28,25:69,_:-73},{_:-13},{3:47,8:49,10:107,12:48,_:0},{41:108,_:0},{_:-14},{_:-22},{4:109,6:110,_:0},{_:-52},{4:111,_:0},{13:112,_:0},{_:-48},{_:-58},{17:50,_:-61},{17:50,_:-60},{5:52,7:51,_:-63},{22:53,_:-65},{15:54,_:-67},{2:55,_:-69},{9:113,_:0},{26:11,28:9,29:7,30:8,31:6,32:12,35:115,37:116,38:10,_:0},{_:-30},{_:-35},{6:64,_:-73},{_:-36},{_:-41},{_:-37},{_:-43},{41:121,_:0},{41:122,_:0},{41:123,_:0},{41:124,_:0},{_:-16},{_:-50},{_:-51},{_:-49},{_:-5}, | ||
{_:-6},{_:-4},{_:-46},{_:-45},{_:-4},{_:-4},{41:135,_:0},{_:-53},{_:-71},{26:11,28:9,29:7,30:8,31:6,32:12,35:136,38:10,_:0},{_:-38},{_:-39},{26:11,28:9,29:7,30:8,31:6,32:12,33:137,38:10,_:0},{26:11,28:9,29:7,30:8,31:6,32:12,33:138,38:10,_:0},{26:11,28:9,29:7,30:8,31:6,32:12,34:139,38:10,_:0},{26:11,28:9,29:7,30:8,31:6,32:12,34:140,38:10,_:0},{_:-12},{_:-7},{_:-8},{_:-9},{_:-10},{_:-11}],actionIndex:[0,1,2,3,4,5,6,6,6,7,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,6,31,32,33, | ||
6,6,34,34,35,36,37,38,39,40,6,41,6,6,6,6,6,6,6,6,42,43,44,45,6,46,47,48,49,50,51,52,53,54,55,56,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,6,34,82,83,84,85,86,6,87,88,6,89,90,6,91,92,93,45,6,94,95,96,96,97,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113],tGoto:[{65:1},{66:2,68:3,59:4},{},{59:13},{},{},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:27},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23, | ||
49:24,50:25,45:26,62:40},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:41},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:42},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:45},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:59},{},{46:60,47:61,61:62},{64:65,63:66,56:67,55:68},{63:14,54:15,44:16, | ||
53:17,51:18,58:71},{63:14,54:15,44:16,53:17,51:18,58:72},{64:73,63:66},{64:74,63:66},{},{63:14,54:15,44:16,53:17,51:76},{},{},{},{63:14,54:15,44:16,53:17,51:18,60:80,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:81,61:82},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:83},{63:84},{63:14,54:15,44:16,53:17,51:18,58:85},{63:14,54:15,44:16,53:17,51:18,58:19,52:86},{63:14,54:15,44:16,53:17,51:18,58:19,52:87},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:88},{63:14, | ||
54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:89},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:90},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:91},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:92},{67:93},{},{},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:97},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:99},{},{},{},{},{},{},{},{},{},{},{64:103,63:66,61:104},{64:105, | ||
63:66,61:106},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{66:114,68:3,59:4},{},{},{47:117,61:118},{},{},{},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:119},{64:65,63:66,55:120},{},{},{},{},{},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:125},{},{},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:126},{},{},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:127}, | ||
{},{},{67:128},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:129},{63:14,54:15,44:16,53:17,51:18,58:19,52:20,43:21,57:22,48:23,49:24,50:25,45:26,62:130},{},{},{67:131},{67:132},{67:133},{67:134},{},{},{},{66:114,68:3,59:4},{},{},{66:114,68:3,59:4},{66:114,68:3,59:4},{66:114,68:3,59:4},{66:114,68:3,59:4},{},{},{},{},{},{}],tRules:[[69,65],[65],[65,65,66],[65,65,23],[67],[67,67,66],[66,31,62,41,67,35],[66,31,62,41,67,37,67,35],[66,29,62,64,64,41,67,33],[66,29,62, | ||
64,61,41,67,33],[66,30,62,64,64,41,67,34],[66,30,62,64,61,41,67,34],[66,28,24,51,10,62,41],[66,28,62,41],[66,38,62,42],[66,68],[66,28,16,25,41],[64,25],[64,63],[68,59],[68,68,59],[59,26],[59,32,20,36],[63,21],[63,24],[63,16],[54,25],[54,19],[54,14],[54,63],[54,3,62,4],[54,44],[54,53],[54,18],[44,12,13],[44,12,46,13],[46,47,62],[46,61,62],[46,46,6,47,62],[46,46,6,61,62],[47,6],[47,47,6],[53,27,40],[53,27,56,40],[56,55],[56,56,6,55],[55,64,9,62],[51,54],[51,51,8,63],[51,51,12,62,13],[51,51,3,60,4], | ||
[51,51,3,61,4],[60,62],[60,60,6,62],[58,51],[58,1,58],[58,7,58],[52,58],[52,52,17,58],[43,52],[43,43,5,52],[43,43,7,52],[57,43],[57,57,22,43],[48,57],[48,48,15,57],[49,48],[49,49,2,48],[50,49],[50,50,39,49],[45,50],[45,50,11,45,9,45],[62,45],[61]],objCharset:null};return function(b,d){function e(a,b,c,d,e,f,g){return["each",b,f,d,c,!0]}function m(a,b,c,d,e,f,g){return["each",b,f,d,c,!1]}function x(a){return a.text}function r(a,b){var c;c=Array(a||0);c.push(b);return c}function g(a,c,b,d){b&&(a.length+= | ||
b);a.push(d);return a}function n(a){return[a]}function u(a,b,c,d){return["()",a,c]}function k(a,b,c){return[b.text,a,c]}function p(a,b){return c[a][b]}function l(a){throw Error("Syntax error: "+b.getPos(F.index)+(a?"\n"+a:""));}for(var B=a.nStart,t=a.tSymbols,f={},h=0;h<t.length;++h)f[t[h]]=h;var c=a.tAction||a.actionList,q=a.tGoto,C=a.tRules,A=a.actionIndex,D=[,function(){return["prog",[],[]]},function(a,b){a[1].push(b);return a},function(a,b){a[2].push(b.text.slice(10,-11));return a},function(){return[]}, | ||
function(a,b){a.push(b);return a},function(a,b,c,d,e){return["if",b,d]},function(a,b,c,d,e,f,g){return["if",b,d,f]},e,e,m,m,function(a,b,c,d,e,f){return["set","id"==c[0]?c[1]:c,e]},function(a,b,c){return["eval",b,!1]},function(a,b,c){return["eval",b,!0]},function(a){return["text",a]},function(a,b,c,d){return["inc",H(c.text)]},function(a){return H(a.text)},x,function(a){return a},function(a,b){return a+b},x,function(a,b,c){return b.text},,,,function(a){return["lit",H(a.text)]},function(a){return["lit", | ||
+a.text]},function(a){return["lit","true"==a.text]},function(a){return["id",a.text]},function(a,b,c){return b},,,function(a){return["null"]},function(a,b){return["array",[]]},function(a,b,c){return["array",b]},r,r,g,g,function(a){return 1},function(a,b){return a+1},function(a,b){return["object",[]]},function(a,b,c){return["object",b]},n,function(a,b,c){a.push(c);return a},function(a,b,c){return["init",a,c]},,function(a,b,c){return[".",a,c.text]},function(a,b,c,d){return["[]",a,c]},u,u,n,function(a, | ||
b,c){a.push(c);return a},,function(a,b){return["!",b]},function(a,b){return["u-",b]},,k,,k,k,,k,,k,,k,,k,,function(a,b,c,d,e){return["cond",a,c,e]}];A&&(p=function(a,b){var d=c[A[a]];return d[b]||d._});var z=0,G=[0],F=b.scan(),v=[],E={get:function(a){return v[v.length+a]},set:function(a,b){v[v.length+a]=b}};if(d)for(h in d)E[h]=d[h];for(;;)if(h=p(z,f[F.tag]))if(0<h)G.push(z=h),v.push(F),F=b.scan();else if(0>h&&-32768<h){var h=-h,z=C[h],w=z.length-1;G.length-=w;z=q[G[G.length-1]][z[0]];G.push(z);D[h]? | ||
(h=D[h].apply(E,v.splice(v.length-w,w)),v.push(h)):1!=w&&v.splice(v.length-w,w,null)}else return F.tag!=t[0]&&l(),v[0];else{h=[];for(w=0;w<B;++w)p(z,w)&&h.push(t[w]);l("find "+F.tag+"\nexpect "+h.join(" "))}}}();return{parse:N,compile:O,render:function(a,b){return O(a)(b)},version:"1.4.3"}}();"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=m:"function"==typeof define&&(define.amd||define.cmd)?define(function(){return m}):"undefined"!=typeof KISSY&&KISSY.add(function(){return m}); | ||
u&&(u.Crox=m)})(this); |
/** | ||
* @preserve Crox v1.4.1 | ||
* @preserve Crox v1.4.3 | ||
* https://github.com/thx/crox | ||
* | ||
* Released under the MIT license | ||
* md5: 1d452903de5f68f37edaaecde3e55882 | ||
* md5: c605cc0256fc0e8589c44fd263575d58 | ||
*/ | ||
@@ -298,3 +298,3 @@ (function(root) {var Crox = (function() { | ||
return RegExp(a.join('|')); | ||
}(["!", "%", "&&", "(", ")", "*", "+", "-", ".", "/", "<", "<=", "=", ">", ">=", "[", "]", "||", "===", "!==", "==", "!=", ",", ":"]), function(a) { | ||
}(["!", "%", "&&", "(", ")", "*", "+", "-", ".", "/", "<", "<=", "=", ">", ">=", "[", "]", "||", "===", "!==", "==", "!=", ",", ":", "?"]), function(a) { | ||
return /[*/%]/.test(a) ? 'mul' : /[<>]/.test(a) ? 'rel' : /[!=]=/.test(a) ? 'eq' : a; | ||
@@ -320,2 +320,5 @@ }] | ||
}], | ||
[/{{<script>[\s\S]*?<\/script>}}/, function(a) { | ||
return 'script'; | ||
}], | ||
[/{{(?:#(?:if|each|forin)(?=\s))?/, function(a) { | ||
@@ -350,8 +353,8 @@ this.pushState('{{'); | ||
var table = {//conflicts: 4 | ||
"nStart": 41, | ||
"tSymbols": /*67*/["$", "!", "\u0026\u0026", "(", ")", "+", ",", "-", ".", ":", "=", "[", "]", "boolean", "eq", "include", "mul", "null", "number", "rawtext", "realId", "rel", "set", "string", "text", "{", "{{", "{{#each", "{{#forin", "{{#if", "{{#raw}}", "{{/each}}", "{{/forin}}", "{{/if}}", "{{/raw}}", "{{else}}", "{{{", "||", "}", "}}", "}}}", "AdditiveExpression", "ArrayLiteral", "ElementList", "Elision", "EqualityExpression", "LogicalAndExpression", "LogicalOrExpression", "MemberExpression", "MultiplicativeExpression", "ObjectLiteral", "PrimaryExpression", "PropertyAssignment", "PropertyNameAndValueList", "RelationalExpression", "UnaryExpression", "_text", "args", "empty", "expr", "id", "name", "program", "statement", "statements", "texts", "program\u0027"], | ||
actionList: [{ "_": -2 }, { "_": -32768 }, { "24": 11, "26": 9, "27": 7, "28": 8, "29": 6, "30": 12, "36": 10, "_": -1 }, { "_": -3 }, { "24": 11, "30": 12, "_": -13 }, { "_": -17 }, { "1": 37, "3": 33, "7": 38, "11": 35, "13": 32, "15": 28, "17": 34, "18": 31, "20": 30, "22": 27, "23": 29, "25": 36, "_": 0 }, { "1": 37, "3": 33, "7": 38, "11": 35, "13": 32, "15": 43, "17": 34, "18": 31, "20": 30, "22": 42, "23": 29, "25": 36, "_": 0 }, { "_": -19 }, { "19": 45, "_": 0 }, { "_": -18 }, { "_": -27 }, { "_": -45 }, { "_": -29 }, { "_": -30 }, { "3": 46, "8": 48, "11": 47, "_": -52 }, { "_": -55 }, { "16": 49, "_": -57 }, { "5": 51, "7": 50, "_": -60 }, { "21": 52, "_": -62 }, { "14": 53, "_": -64 }, { "2": 54, "_": -66 }, { "37": 55, "_": -68 }, { "39": 56, "_": 0 }, { "_": -22 }, { "_": -23 }, { "_": -24 }, { "_": -21 }, { "_": -25 }, { "_": -26 }, { "_": -31 }, { "6": 62, "12": 61, "_": -69 }, { "15": 28, "20": 30, "22": 27, "23": 67, "38": 68, "_": 0 }, { "15": 28, "20": 30, "22": 27, "23": 67, "_": 0 }, { "39": 73, "_": 0 }, { "3": 33, "11": 35, "13": 32, "15": 28, "17": 34, "18": 31, "20": 30, "22": 27, "23": 29, "25": 36, "_": -22 }, { "23": 75, "_": -23 }, { "40": 76, "_": 0 }, { "34": 77, "_": 0 }, { "1": 37, "3": 33, "7": 38, "11": 35, "13": 32, "15": 28, "17": 34, "18": 31, "20": 30, "22": 27, "23": 29, "25": 36, "_": -69 }, { "15": 28, "20": 30, "22": 27, "_": 0 }, { "_": -2 }, { "4": 91, "_": 0 }, { "6": 93, "12": 92, "_": 0 }, { "1": 37, "3": 33, "6": 95, "7": 38, "11": 35, "13": 32, "15": 28, "17": 34, "18": 31, "20": 30, "22": 27, "23": 29, "25": 36, "_": 0 }, { "_": -32 }, { "_": -38 }, { "9": 97, "_": 0 }, { "_": -16 }, { "6": 98, "38": 99, "_": 0 }, { "_": -42 }, { "_": -15 }, { "_": -40 }, { "_": -53 }, { "_": -54 }, { "15": 28, "20": 30, "22": 27, "23": 67, "_": -69 }, { "_": -11 }, { "3": 46, "8": 48, "10": 104, "11": 47, "_": 0 }, { "39": 105, "_": 0 }, { "_": -12 }, { "_": -20 }, { "4": 106, "6": 107, "_": 0 }, { "_": -50 }, { "4": 108, "_": 0 }, { "12": 109, "_": 0 }, { "_": -46 }, { "_": -56 }, { "16": 49, "_": -59 }, { "16": 49, "_": -58 }, { "5": 51, "7": 50, "_": -61 }, { "21": 52, "_": -63 }, { "14": 53, "_": -65 }, { "2": 54, "_": -67 }, { "24": 11, "26": 9, "27": 7, "28": 8, "29": 6, "30": 12, "33": 110, "35": 111, "36": 10, "_": 0 }, { "_": -28 }, { "_": -33 }, { "6": 62, "_": -69 }, { "_": -34 }, { "_": -39 }, { "_": -35 }, { "_": -41 }, { "39": 116, "_": 0 }, { "39": 117, "_": 0 }, { "39": 118, "_": 0 }, { "39": 119, "_": 0 }, { "_": -14 }, { "_": -48 }, { "_": -49 }, { "_": -47 }, { "_": -4 }, { "_": -2 }, { "_": -44 }, { "_": -43 }, { "_": -2 }, { "_": -2 }, { "39": 129, "_": 0 }, { "_": -51 }, { "24": 11, "26": 9, "27": 7, "28": 8, "29": 6, "30": 12, "33": 130, "36": 10, "_": 0 }, { "_": -36 }, { "_": -37 }, { "24": 11, "26": 9, "27": 7, "28": 8, "29": 6, "30": 12, "31": 131, "36": 10, "_": 0 }, { "24": 11, "26": 9, "27": 7, "28": 8, "29": 6, "30": 12, "31": 132, "36": 10, "_": 0 }, { "24": 11, "26": 9, "27": 7, "28": 8, "29": 6, "30": 12, "32": 133, "36": 10, "_": 0 }, { "24": 11, "26": 9, "27": 7, "28": 8, "29": 6, "30": 12, "32": 134, "36": 10, "_": 0 }, { "_": -10 }, { "_": -5 }, { "_": -6 }, { "_": -7 }, { "_": -8 }, { "_": -9 }], | ||
actionIndex: [0, 1, 2, 3, 4, 5, 6, 6, 6, 7, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 6, 30, 31, 32, 6, 6, 33, 33, 34, 35, 36, 37, 38, 39, 6, 40, 6, 6, 6, 6, 6, 6, 6, 41, 42, 43, 44, 6, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 6, 33, 80, 81, 82, 83, 84, 6, 85, 86, 6, 87, 88, 89, 90, 44, 6, 91, 92, 93, 93, 94, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109], | ||
"tGoto": /*135*/[{ "62": 1, "64": 2 }, {}, { "63": 3, "65": 4, "56": 5 }, {}, { "56": 13 }, {}, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 26 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 39 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 40 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 41 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 44 }, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 57 }, {}, { "43": 58, "44": 59, "58": 60 }, { "61": 63, "60": 64, "53": 65, "52": 66 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 69 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 70 }, { "61": 71, "60": 64 }, { "61": 72, "60": 64 }, {}, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 74 }, {}, {}, {}, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "57": 78, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 79, "58": 80 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 81 }, { "60": 82 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 83 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 84 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 85 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 86 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 87 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 88 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 89 }, { "64": 90 }, {}, {}, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 94 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 96 }, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, { "61": 100, "60": 64, "58": 101 }, { "61": 102, "60": 64, "58": 103 }, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, { "63": 3, "65": 4, "56": 5 }, {}, {}, { "44": 112, "58": 113 }, {}, {}, {}, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 114 }, { "61": 63, "60": 64, "52": 115 }, {}, {}, {}, {}, {}, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 120 }, {}, {}, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 121 }, {}, {}, {}, { "64": 122 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 123 }, { "60": 14, "51": 15, "42": 16, "50": 17, "48": 18, "55": 19, "49": 20, "41": 21, "54": 22, "45": 23, "46": 24, "47": 25, "59": 124 }, {}, {}, { "64": 125 }, { "64": 126 }, { "64": 127 }, { "64": 128 }, {}, {}, { "63": 3, "65": 4, "56": 5 }, {}, {}, { "63": 3, "65": 4, "56": 5 }, { "63": 3, "65": 4, "56": 5 }, { "63": 3, "65": 4, "56": 5 }, { "63": 3, "65": 4, "56": 5 }, {}, {}, {}, {}, {}, {}], | ||
"tRules": /*70*/[[66, 62], [62, 64], [64], [64, 64, 63], [63, 29, 59, 39, 64, 33], [63, 29, 59, 39, 64, 35, 64, 33], [63, 27, 59, 61, 61, 39, 64, 31], [63, 27, 59, 61, 58, 39, 64, 31], [63, 28, 59, 61, 61, 39, 64, 32], [63, 28, 59, 61, 58, 39, 64, 32], [63, 26, 22, 48, 10, 59, 39], [63, 26, 59, 39], [63, 36, 59, 40], [63, 65], [63, 26, 15, 23, 39], [61, 23], [61, 60], [65, 56], [65, 65, 56], [56, 24], [56, 30, 19, 34], [60, 20], [60, 22], [60, 15], [51, 23], [51, 18], [51, 13], [51, 60], [51, 3, 59, 4], [51, 42], [51, 50], [51, 17], [42, 11, 12], [42, 11, 43, 12], [43, 44, 59], [43, 58, 59], [43, 43, 6, 44, 59], [43, 43, 6, 58, 59], [44, 6], [44, 44, 6], [50, 25, 38], [50, 25, 53, 38], [53, 52], [53, 53, 6, 52], [52, 61, 9, 59], [48, 51], [48, 48, 8, 60], [48, 48, 11, 59, 12], [48, 48, 3, 57, 4], [48, 48, 3, 58, 4], [57, 59], [57, 57, 6, 59], [55, 48], [55, 1, 55], [55, 7, 55], [49, 55], [49, 49, 16, 55], [41, 49], [41, 41, 5, 49], [41, 41, 7, 49], [54, 41], [54, 54, 21, 41], [45, 54], [45, 45, 14, 54], [46, 45], [46, 46, 2, 45], [47, 46], [47, 47, 37, 46], [59, 47], [58]], | ||
"nStart": 43, | ||
"tSymbols": /*70*/["$", "!", "\u0026\u0026", "(", ")", "+", ",", "-", ".", ":", "=", "?", "[", "]", "boolean", "eq", "include", "mul", "null", "number", "rawtext", "realId", "rel", "script", "set", "string", "text", "{", "{{", "{{#each", "{{#forin", "{{#if", "{{#raw}}", "{{/each}}", "{{/forin}}", "{{/if}}", "{{/raw}}", "{{else}}", "{{{", "||", "}", "}}", "}}}", "AdditiveExpression", "ArrayLiteral", "ConditionalExpression", "ElementList", "Elision", "EqualityExpression", "LogicalAndExpression", "LogicalOrExpression", "MemberExpression", "MultiplicativeExpression", "ObjectLiteral", "PrimaryExpression", "PropertyAssignment", "PropertyNameAndValueList", "RelationalExpression", "UnaryExpression", "_text", "args", "empty", "expr", "id", "name", "program", "statement", "statements", "texts", "program\u0027"], | ||
actionList: [{ "_": -1 }, { "23": 5, "26": 11, "28": 9, "29": 7, "30": 8, "31": 6, "32": 12, "38": 10, "_": -32768 }, { "_": -2 }, { "26": 11, "32": 12, "_": -15 }, { "_": -19 }, { "_": -3 }, { "1": 38, "3": 34, "7": 39, "12": 36, "14": 33, "16": 29, "18": 35, "19": 32, "21": 31, "24": 28, "25": 30, "27": 37, "_": 0 }, { "1": 38, "3": 34, "7": 39, "12": 36, "14": 33, "16": 44, "18": 35, "19": 32, "21": 31, "24": 43, "25": 30, "27": 37, "_": 0 }, { "_": -21 }, { "20": 46, "_": 0 }, { "_": -20 }, { "_": -29 }, { "_": -47 }, { "_": -31 }, { "_": -32 }, { "3": 47, "8": 49, "12": 48, "_": -54 }, { "_": -57 }, { "17": 50, "_": -59 }, { "5": 52, "7": 51, "_": -62 }, { "22": 53, "_": -64 }, { "15": 54, "_": -66 }, { "2": 55, "_": -68 }, { "11": 57, "39": 56, "_": -70 }, { "_": -72 }, { "41": 58, "_": 0 }, { "_": -24 }, { "_": -25 }, { "_": -26 }, { "_": -23 }, { "_": -27 }, { "_": -28 }, { "_": -33 }, { "6": 64, "13": 63, "_": -73 }, { "16": 29, "21": 31, "24": 28, "25": 69, "40": 70, "_": 0 }, { "16": 29, "21": 31, "24": 28, "25": 69, "_": 0 }, { "41": 75, "_": 0 }, { "3": 34, "12": 36, "14": 33, "16": 29, "18": 35, "19": 32, "21": 31, "24": 28, "25": 30, "27": 37, "_": -24 }, { "25": 77, "_": -25 }, { "42": 78, "_": 0 }, { "36": 79, "_": 0 }, { "1": 38, "3": 34, "7": 39, "12": 36, "14": 33, "16": 29, "18": 35, "19": 32, "21": 31, "24": 28, "25": 30, "27": 37, "_": -73 }, { "16": 29, "21": 31, "24": 28, "_": 0 }, { "_": -4 }, { "4": 94, "_": 0 }, { "6": 96, "13": 95, "_": 0 }, { "1": 38, "3": 34, "6": 98, "7": 39, "12": 36, "14": 33, "16": 29, "18": 35, "19": 32, "21": 31, "24": 28, "25": 30, "27": 37, "_": 0 }, { "_": -34 }, { "_": -40 }, { "9": 100, "_": 0 }, { "_": -18 }, { "6": 101, "40": 102, "_": 0 }, { "_": -44 }, { "_": -17 }, { "_": -42 }, { "_": -55 }, { "_": -56 }, { "16": 29, "21": 31, "24": 28, "25": 69, "_": -73 }, { "_": -13 }, { "3": 47, "8": 49, "10": 107, "12": 48, "_": 0 }, { "41": 108, "_": 0 }, { "_": -14 }, { "_": -22 }, { "4": 109, "6": 110, "_": 0 }, { "_": -52 }, { "4": 111, "_": 0 }, { "13": 112, "_": 0 }, { "_": -48 }, { "_": -58 }, { "17": 50, "_": -61 }, { "17": 50, "_": -60 }, { "5": 52, "7": 51, "_": -63 }, { "22": 53, "_": -65 }, { "15": 54, "_": -67 }, { "2": 55, "_": -69 }, { "9": 113, "_": 0 }, { "26": 11, "28": 9, "29": 7, "30": 8, "31": 6, "32": 12, "35": 115, "37": 116, "38": 10, "_": 0 }, { "_": -30 }, { "_": -35 }, { "6": 64, "_": -73 }, { "_": -36 }, { "_": -41 }, { "_": -37 }, { "_": -43 }, { "41": 121, "_": 0 }, { "41": 122, "_": 0 }, { "41": 123, "_": 0 }, { "41": 124, "_": 0 }, { "_": -16 }, { "_": -50 }, { "_": -51 }, { "_": -49 }, { "_": -5 }, { "_": -6 }, { "_": -4 }, { "_": -46 }, { "_": -45 }, { "_": -4 }, { "_": -4 }, { "41": 135, "_": 0 }, { "_": -53 }, { "_": -71 }, { "26": 11, "28": 9, "29": 7, "30": 8, "31": 6, "32": 12, "35": 136, "38": 10, "_": 0 }, { "_": -38 }, { "_": -39 }, { "26": 11, "28": 9, "29": 7, "30": 8, "31": 6, "32": 12, "33": 137, "38": 10, "_": 0 }, { "26": 11, "28": 9, "29": 7, "30": 8, "31": 6, "32": 12, "33": 138, "38": 10, "_": 0 }, { "26": 11, "28": 9, "29": 7, "30": 8, "31": 6, "32": 12, "34": 139, "38": 10, "_": 0 }, { "26": 11, "28": 9, "29": 7, "30": 8, "31": 6, "32": 12, "34": 140, "38": 10, "_": 0 }, { "_": -12 }, { "_": -7 }, { "_": -8 }, { "_": -9 }, { "_": -10 }, { "_": -11 }], | ||
actionIndex: [0, 1, 2, 3, 4, 5, 6, 6, 6, 7, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 6, 31, 32, 33, 6, 6, 34, 34, 35, 36, 37, 38, 39, 40, 6, 41, 6, 6, 6, 6, 6, 6, 6, 6, 42, 43, 44, 45, 6, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 6, 34, 82, 83, 84, 85, 86, 6, 87, 88, 6, 89, 90, 6, 91, 92, 93, 45, 6, 94, 95, 96, 96, 97, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113], | ||
"tGoto": /*141*/[{ "65": 1 }, { "66": 2, "68": 3, "59": 4 }, {}, { "59": 13 }, {}, {}, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 27 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 40 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 41 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 42 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 45 }, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 59 }, {}, { "46": 60, "47": 61, "61": 62 }, { "64": 65, "63": 66, "56": 67, "55": 68 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 71 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 72 }, { "64": 73, "63": 66 }, { "64": 74, "63": 66 }, {}, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 76 }, {}, {}, {}, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "60": 80, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 81, "61": 82 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 83 }, { "63": 84 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 85 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 86 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 87 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 88 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 89 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 90 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 91 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 92 }, { "67": 93 }, {}, {}, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 97 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 99 }, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, { "64": 103, "63": 66, "61": 104 }, { "64": 105, "63": 66, "61": 106 }, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, { "66": 114, "68": 3, "59": 4 }, {}, {}, { "47": 117, "61": 118 }, {}, {}, {}, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 119 }, { "64": 65, "63": 66, "55": 120 }, {}, {}, {}, {}, {}, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 125 }, {}, {}, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 126 }, {}, {}, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 127 }, {}, {}, { "67": 128 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 129 }, { "63": 14, "54": 15, "44": 16, "53": 17, "51": 18, "58": 19, "52": 20, "43": 21, "57": 22, "48": 23, "49": 24, "50": 25, "45": 26, "62": 130 }, {}, {}, { "67": 131 }, { "67": 132 }, { "67": 133 }, { "67": 134 }, {}, {}, {}, { "66": 114, "68": 3, "59": 4 }, {}, {}, { "66": 114, "68": 3, "59": 4 }, { "66": 114, "68": 3, "59": 4 }, { "66": 114, "68": 3, "59": 4 }, { "66": 114, "68": 3, "59": 4 }, {}, {}, {}, {}, {}, {}], | ||
"tRules": /*74*/[[69, 65], [65], [65, 65, 66], [65, 65, 23], [67], [67, 67, 66], [66, 31, 62, 41, 67, 35], [66, 31, 62, 41, 67, 37, 67, 35], [66, 29, 62, 64, 64, 41, 67, 33], [66, 29, 62, 64, 61, 41, 67, 33], [66, 30, 62, 64, 64, 41, 67, 34], [66, 30, 62, 64, 61, 41, 67, 34], [66, 28, 24, 51, 10, 62, 41], [66, 28, 62, 41], [66, 38, 62, 42], [66, 68], [66, 28, 16, 25, 41], [64, 25], [64, 63], [68, 59], [68, 68, 59], [59, 26], [59, 32, 20, 36], [63, 21], [63, 24], [63, 16], [54, 25], [54, 19], [54, 14], [54, 63], [54, 3, 62, 4], [54, 44], [54, 53], [54, 18], [44, 12, 13], [44, 12, 46, 13], [46, 47, 62], [46, 61, 62], [46, 46, 6, 47, 62], [46, 46, 6, 61, 62], [47, 6], [47, 47, 6], [53, 27, 40], [53, 27, 56, 40], [56, 55], [56, 56, 6, 55], [55, 64, 9, 62], [51, 54], [51, 51, 8, 63], [51, 51, 12, 62, 13], [51, 51, 3, 60, 4], [51, 51, 3, 61, 4], [60, 62], [60, 60, 6, 62], [58, 51], [58, 1, 58], [58, 7, 58], [52, 58], [52, 52, 17, 58], [43, 52], [43, 43, 5, 52], [43, 43, 7, 52], [57, 43], [57, 57, 22, 43], [48, 57], [48, 48, 15, 57], [49, 48], [49, 49, 2, 48], [50, 49], [50, 50, 39, 49], [45, 50], [45, 50, 11, 45, 9, 45], [62, 45], [61]], | ||
"objCharset": null | ||
@@ -378,3 +381,3 @@ } | ||
function $f6($1, $2, $3, $4) { var $$; { $$ = ['()', $1, $3]; } return $$; } | ||
function $f7($1, $2, $3) { var $$; { $$ = [$2.text, $1, $3]; } return $$; } var tFuncs = [, function($1) { var $$; { $$ = ['prog', $1]; } return $$; }, function() { var $$; { $$ = []; } return $$; }, function($1, $2) { var $$; { $1.push($2); $$ = $1; } return $$; }, function($1, $2, $3, $4, $5) { var $$; { $$ = ['if', $2, $4]; } return $$; }, function($1, $2, $3, $4, $5, $6, $7) { var $$; { $$ = ['if', $2, $4, $6]; } return $$; }, $f0, $f0, $f1, $f1, function($1, $2, $3, $4, $5, $6) { var $$; { $$ = ['set', $3[0] == 'id' ? $3[1] : $3, $5]; } return $$; }, function($1, $2, $3) { var $$; { $$ = ['eval', $2, false]; } return $$; }, function($1, $2, $3) { var $$; { $$ = ['eval', $2, true]; } return $$; }, function($1) { var $$; { $$ = ['text', $1]; } return $$; }, function($1, $2, $3, $4) { var $$; { $$ = ['inc', evalStr($3.text)]; } return $$; }, function($1) { var $$; { $$ = evalStr($1.text); } return $$; }, $f2, function($1) { var $$; { $$ = $1; } return $$; }, function($1, $2) { var $$; { $$ = $1 + $2; } return $$; }, $f2, function($1, $2, $3) { var $$; { $$ = $2.text; } return $$; }, , , , function($1) { var $$; { $$ = ['lit', evalStr($1.text)]; } return $$; }, function($1) { var $$; { $$ = ['lit', evalNum($1.text)]; } return $$; }, function($1) { var $$; { $$ = ['lit', $1.text == 'true']; } return $$; }, function($1) { var $$; { $$ = ['id', $1.text]; } return $$; }, function($1, $2, $3) { var $$; { $$ = $2; } return $$; }, , , function($1) { var $$; { $$ = ['null']; } return $$; }, function($1, $2) { var $$; { $$ = ['array', []]; } return $$; }, function($1, $2, $3) { var $$; { $$ = ['array', $2]; } return $$; }, $f3, $f3, $f4, $f4, function($1) { var $$; { $$ = 1; } return $$; }, function($1, $2) { var $$; { $$ = $1 + 1; } return $$; }, function($1, $2) { var $$; { $$ = ['object', []]; } return $$; }, function($1, $2, $3) { var $$; { $$ = ['object', $2]; } return $$; }, $f5, function($1, $2, $3) { var $$; { $1.push($3); $$ = $1; } return $$; }, function($1, $2, $3) { var $$; { $$ = ['init', $1, $3]; } return $$; }, , function($1, $2, $3) { var $$; { $$ = ['.', $1, $3.text]; } return $$; }, function($1, $2, $3, $4) { var $$; { $$ = ['[]', $1, $3]; } return $$; }, $f6, $f6, $f5, function($1, $2, $3) { var $$; { ($$ = $1).push($3); } return $$; }, , function($1, $2) { var $$; { $$ = ['!', $2]; } return $$; }, function($1, $2) { var $$; { $$ = ['u-', $2]; } return $$; }, , $f7, , $f7, $f7, , $f7, , $f7, , $f7, , $f7]; | ||
function $f7($1, $2, $3) { var $$; { $$ = [$2.text, $1, $3]; } return $$; } var tFuncs = [, function() { var $$; { $$ = ['prog', [], []]; } return $$; }, function($1, $2) { var $$; { $1[1].push($2); $$ = $1; } return $$; }, function($1, $2) { var $$; { $1[2].push($2.text.slice(10, -11)); $$ = $1; } return $$; }, function() { var $$; { $$ = []; } return $$; }, function($1, $2) { var $$; { $1.push($2); $$ = $1; } return $$; }, function($1, $2, $3, $4, $5) { var $$; { $$ = ['if', $2, $4]; } return $$; }, function($1, $2, $3, $4, $5, $6, $7) { var $$; { $$ = ['if', $2, $4, $6]; } return $$; }, $f0, $f0, $f1, $f1, function($1, $2, $3, $4, $5, $6) { var $$; { $$ = ['set', $3[0] == 'id' ? $3[1] : $3, $5]; } return $$; }, function($1, $2, $3) { var $$; { $$ = ['eval', $2, false]; } return $$; }, function($1, $2, $3) { var $$; { $$ = ['eval', $2, true]; } return $$; }, function($1) { var $$; { $$ = ['text', $1]; } return $$; }, function($1, $2, $3, $4) { var $$; { $$ = ['inc', evalStr($3.text)]; } return $$; }, function($1) { var $$; { $$ = evalStr($1.text); } return $$; }, $f2, function($1) { var $$; { $$ = $1; } return $$; }, function($1, $2) { var $$; { $$ = $1 + $2; } return $$; }, $f2, function($1, $2, $3) { var $$; { $$ = $2.text; } return $$; }, , , , function($1) { var $$; { $$ = ['lit', evalStr($1.text)]; } return $$; }, function($1) { var $$; { $$ = ['lit', evalNum($1.text)]; } return $$; }, function($1) { var $$; { $$ = ['lit', $1.text == 'true']; } return $$; }, function($1) { var $$; { $$ = ['id', $1.text]; } return $$; }, function($1, $2, $3) { var $$; { $$ = $2; } return $$; }, , , function($1) { var $$; { $$ = ['null']; } return $$; }, function($1, $2) { var $$; { $$ = ['array', []]; } return $$; }, function($1, $2, $3) { var $$; { $$ = ['array', $2]; } return $$; }, $f3, $f3, $f4, $f4, function($1) { var $$; { $$ = 1; } return $$; }, function($1, $2) { var $$; { $$ = $1 + 1; } return $$; }, function($1, $2) { var $$; { $$ = ['object', []]; } return $$; }, function($1, $2, $3) { var $$; { $$ = ['object', $2]; } return $$; }, $f5, function($1, $2, $3) { var $$; { $1.push($3); $$ = $1; } return $$; }, function($1, $2, $3) { var $$; { $$ = ['init', $1, $3]; } return $$; }, , function($1, $2, $3) { var $$; { $$ = ['.', $1, $3.text]; } return $$; }, function($1, $2, $3, $4) { var $$; { $$ = ['[]', $1, $3]; } return $$; }, $f6, $f6, $f5, function($1, $2, $3) { var $$; { ($$ = $1).push($3); } return $$; }, , function($1, $2) { var $$; { $$ = ['!', $2]; } return $$; }, function($1, $2) { var $$; { $$ = ['u-', $2]; } return $$; }, , $f7, , $f7, $f7, , $f7, , $f7, , $f7, , $f7, , function($1, $2, $3, $4, $5) { var $$; { $$ = ['cond', $1, $3, $5]; } return $$; }]; | ||
function getAction(x, y) { | ||
@@ -462,2 +465,3 @@ return tAction[x][y]; | ||
case 'lit': | ||
case 't': | ||
return true; | ||
@@ -515,2 +519,5 @@ } | ||
} | ||
function isCond(op) { | ||
return isLogicalOr(op) || op == 'cond'; | ||
} | ||
@@ -700,2 +707,4 @@ /// <reference path="common.js"/> | ||
return [exprToStr(x[1], isLogicalOr), '||', exprToStr(x[2], isLogicalAnd)]; | ||
case 'cond': | ||
return [exprToStr(x[1], isLogicalOr), '?', exprToStr(x[2], isCond), ':', exprToStr(x[3], isCond)]; | ||
default: | ||
@@ -726,2 +735,5 @@ throw Error("unknown expr: " + x[0]); | ||
if (prog[2]) { | ||
jsStr += prog[2].join(';'); | ||
} | ||
//alert(posLog.join('\n')); | ||
@@ -804,2 +816,2 @@ var strObj = new String(jsStr); | ||
Crox.version = "1.4.1";return Crox;})();if ( typeof module == "object" && module && typeof module.exports == "object" ) module.exports = Crox;else if (typeof define == "function" && (define.amd || define.cmd) ) define(function () { return Crox; } );else if (typeof KISSY != "undefined") KISSY.add(function(){ return Crox; });if (root) root.Crox = Crox; })(this); | ||
Crox.version = "1.4.3";return Crox;})();if ( typeof module == "object" && module && typeof module.exports == "object" ) module.exports = Crox;else if (typeof define == "function" && (define.amd || define.cmd) ) define(function () { return Crox; } );else if (typeof KISSY != "undefined") KISSY.add(function(){ return Crox; });if (root) root.Crox = Crox; })(this); |
/* | ||
Crox v1.4.1 | ||
Crox v1.4.3 | ||
https://github.com/thx/crox | ||
Released under the MIT license | ||
md5: 1cfd10c3743c6995498cd2f7d0e2b828 | ||
md5: f833184c125c428c92d517eb4c65698d | ||
*/ | ||
@@ -13,15 +13,16 @@ KISSY.add("crox",function(){function v(b,a){this.row=b;this.col=a}function x(b,a){var e=b.substring(0,a),h=e.match(/\r\n?|\n/g),q=1;h&&(q+=h.length);e=1+/[^\r\n]*$/.exec(e)[0].length;return new v(q,e)}function A(b){return'"'+b.replace(/[\x00-\x1f"\\\u2028\u2029]/g,function(a){switch(a){case '"':return'\\"';case "\\":return"\\\\";case "\b":return"\\b";case "\f":return"\\f";case "\n":return"\\n";case "\r":return"\\r";case "\t":return"\\t"}return"\\u"+("000"+a.charCodeAt(0).toString(16)).slice(-4)})+ | ||
h+" = "+d+"["+e+"];"+a+"}")}function z(b){w=0;return D(E(b))}v.prototype.toString=function(){return"("+this.row+","+this.col+")"};var E=function(){var b=[[/\s+/],[/\/\/[^\r\n]*|\/\*[\s\S]*?\*\//],[/[A-Za-z_]\w*/,function(a){switch(a){case "true":case "false":return"boolean";case "set":case "include":case "null":return a;default:if(-1!=" abstract boolean break byte case catch char class const continue debugger default delete do double else enum export extends final finally float for function goto if implements import in instanceof int interface let long native new package private protected public return short static super switch synchronized this throw throws transient try typeof var void volatile while with yield ".indexOf(" "+ | ||
a+" ")||"null"==a)throw Error("Reserved: "+a+" "+x(this.source,this.index));return"realId"}}],[/"(?:[^"\\]|\\[\s\S])*"|'(?:[^'\\]|\\[\s\S])*'/,function(a){return"string"}],[/\d+(?:\.\d+)?(?:e-?\d+)?/,function(a){return"number"}],[/{(?!{)/,function(a){return"{"}],[/}(?!})/,function(a){return"}"}],[function(a){a.sort().reverse();for(var b=0;b<a.length;++b)a[b]=a[b].replace(/[()*+?.[\]|]/g,"\\$&");return RegExp(a.join("|"))}("! % && ( ) * + - . / < <= = > >= [ ] || === !== == != , :".split(" ")),function(a){return/[*/%]/.test(a)? | ||
"mul":/[<>]/.test(a)?"rel":/[!=]=/.test(a)?"eq":a}]];return C({"":[[/(?:(?!{{)[\s\S])+/,function(a){return"text"}],[/{{{/,function(a){this.pushState(a);return a}],[/{{(?:\/if|else|\/each|\/forin|\/raw)}}/,function(a){return a}],[/{{#raw}}/,function(a){this.pushState("raw");return a}],[/{{(?:#(?:if|each|forin)(?=\s))?/,function(a){this.pushState("{{");return a}]],raw:[[/(?:(?!{{\/raw}})[\s\S])+/,function(a){this.popState();return"rawtext"}]],"{{":b.concat([[/}}/,function(a){this.popState();return a}]]), | ||
"{{{":b.concat([[/}}}/,function(a){this.popState();return a}]])})}(),D=function(){return function(b){function a(a,b){return d[a][b]}for(var e=b.nStart,h=b.tSymbols,q={},f=0;f<h.length;++f)q[h[f]]=f;var d=b.tAction,t=b.tGoto,u=b.tRules,c=b.tFuncs,r=b.actionIndex;r&&(a=function(a,b){var t=d[r[a]];return t[b]||t._});return function(b,k){function d(a){throw Error("Syntax error: "+b.getPos(m.index)+(a?"\n"+a:""));}var r=0,l=[0],m=b.scan(),g=[],p={get:function(a){return g[g.length+a]},set:function(a,b){g[g.length+ | ||
a]=b}};if(k)for(var n in k)p[n]=k[n];for(;;)if(n=a(r,q[m.tag]))if(0<n)l.push(r=n),g.push(m),m=b.scan();else if(0>n&&-32768<n){n=-n;var r=u[n],f=r.length-1;l.length-=f;r=t[l[l.length-1]][r[0]-e];l.push(r);c[n]?(n=c[n].apply(p,g.splice(g.length-f,f)),g.push(n)):1!=f&&g.splice(g.length-f,f,null)}else return m.tag!=h[0]&&d(),g[0];else{n=[];for(f=0;f<e;++f)a(r,f)&&n.push(h[f]);d("find "+m.tag+"\nexpect "+n.join(" "))}}}({nStart:37,tSymbols:"$ ! && ( ) + , - . = [ ] boolean eq include mul number rawtext realId rel set string text {{ {{#each {{#forin {{#if {{#raw}} {{/each}} {{/forin}} {{/if}} {{/raw}} {{else}} {{{ || }} }}} AdditiveExpression EqualityExpression LogicalAndExpression LogicalOrExpression MemberExpression MultiplicativeExpression PrimaryExpression RelationalExpression UnaryExpression _text args epsilon expr id name program statement statements texts".split(" "), | ||
tAction:[{_:-2},{_:-32768},{22:3,23:4,24:5,25:6,26:7,27:8,33:9,_:-1},{_:-19},{1:13,3:14,7:15,12:16,14:17,16:18,18:19,20:20,21:21,_:0},{1:13,3:14,7:15,12:16,14:33,16:18,18:19,20:34,21:21,_:0},{17:38,_:0},{_:-17},{_:-3},{22:3,27:8,_:-13},{_:-26},{21:44,_:-23},{_:-25},{_:-21},{14:33,18:19,20:34,_:-22},{_:-24},{5:46,7:47,_:-44},{13:48,_:-48},{2:49,_:-50},{34:50,_:-52},{3:51,8:52,10:53,_:-36},{15:54,_:-41},{_:-29},{19:55,_:-46},{_:-39},{35:56,_:0},{_:-27},{_:-23},{_:-22},{14:33,18:19,20:34,21:57,_:0}, | ||
{35:61,_:0},{31:62,_:0},{36:63,_:0},{_:-18},{_:-37},{4:64,_:0},{_:-38},{35:65,_:0},{9:66,_:0},{1:13,3:14,7:15,12:16,14:33,16:18,18:19,20:34,21:21,_:-53},{14:33,18:19,20:34,_:0},{_:-11},{_:-15},{_:-16},{14:33,18:19,20:34,21:57,_:-53},{_:-20},{_:-12},{_:-28},{_:-14},{15:54,_:-42},{15:54,_:-43},{19:55,_:-47},{13:48,_:-49},{2:49,_:-51},{4:85,6:86,_:0},{4:87,_:0},{_:-34},{_:-30},{11:88,_:0},{_:-40},{5:46,7:47,_:-45},{35:89,_:0},{35:90,_:0},{35:91,_:0},{35:92,_:0},{22:3,23:4,24:5,25:6,26:7,27:8,30:93,32:94, | ||
33:9,_:0},{35:95,_:0},{_:-33},{_:-32},{_:-31},{_:-4},{_:-10},{_:-35},{22:3,23:4,24:5,25:6,26:7,27:8,28:102,33:9,_:0},{22:3,23:4,24:5,25:6,26:7,27:8,28:103,33:9,_:0},{22:3,23:4,24:5,25:6,26:7,27:8,29:104,33:9,_:0},{22:3,23:4,24:5,25:6,26:7,27:8,29:105,33:9,_:0},{22:3,23:4,24:5,25:6,26:7,27:8,30:106,33:9,_:0},{_:-6},{_:-7},{_:-8},{_:-9},{_:-5}],actionIndex:[0,1,2,3,4,5,5,5,6,5,7,8,9,5,5,5,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,29,30,31,32,33,34,35,36,37,38,5,5,5,5,5,39,40,5,5,5, | ||
41,42,43,44,44,0,45,46,47,48,5,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,5,68,69,0,0,0,0,70,0,71,72,73,74,75,76,77,78,79,80,81,82],tGoto:[{15:1,17:2},,{9:10,16:11,18:12},,{0:22,1:23,2:24,3:25,4:26,5:27,6:28,7:29,8:30,12:31,13:32},{0:22,1:23,2:24,3:25,4:26,5:27,6:28,7:29,8:30,12:35,13:32},{0:22,1:23,2:24,3:25,4:26,5:27,6:28,7:29,8:30,12:36,13:32},{0:22,1:23,2:24,3:25,4:26,5:27,6:28,7:29,8:30,12:37,13:32},,{0:22,1:23,2:24,3:25,4:26,5:27,6:28,7:29,8:30,12:39,13:32},,,{9:40},{4:26,6:28, | ||
8:41,13:32},{0:22,1:23,2:24,3:25,4:26,5:27,6:28,7:29,8:30,12:42,13:32},{4:26,6:28,8:43,13:32},,,,,{13:45},,,,,,,,,,,,,,,{13:58,14:59},{13:58,14:60},,,,,,,,,,{4:26,5:67,6:28,8:30,13:32},{4:26,5:68,6:28,8:30,13:32},{0:22,4:26,5:27,6:28,7:69,8:30,13:32},{0:22,1:70,4:26,5:27,6:28,7:29,8:30,13:32},{0:22,1:23,2:71,4:26,5:27,6:28,7:29,8:30,13:32},{0:22,1:23,2:24,3:25,4:26,5:27,6:28,7:29,8:30,10:72,11:73,12:74,13:32},{13:75},{0:22,1:23,2:24,3:25,4:26,5:27,6:28,7:29,8:30,12:76,13:32},{4:26,6:28,8:77,13:32}, | ||
{0:78,4:26,5:27,6:28,8:30,13:32},,,,{11:79,13:58,14:80},{11:81,13:58,14:82},{17:83},,,,,{0:22,1:23,2:24,3:25,4:26,5:27,6:28,7:29,8:30,12:84,13:32},,,,,,,,,,,,,,,,,{9:10,16:11,18:12},,,{0:22,1:23,2:24,3:25,4:26,5:27,6:28,7:29,8:30,12:96,13:32},,,{17:97},{17:98},{17:99},{17:100},,{17:101},,,{9:10,16:11,18:12},{9:10,16:11,18:12},{9:10,16:11,18:12},{9:10,16:11,18:12},{9:10,16:11,18:12}],tRules:[[56,52],[52,54],[54],[54,54,53],[53,26,49,35,54,30],[53,26,49,35,54,32,54,30],[53,24,49,51,48,35,54,28],[53, | ||
24,49,51,51,35,54,28],[53,25,49,51,48,35,54,29],[53,25,49,51,51,35,54,29],[53,23,20,50,9,49,35],[53,23,49,35],[53,33,49,36],[53,55],[53,23,14,21,35],[51,21],[51,50],[55,46],[55,55,46],[46,22],[46,27,17,31],[50,18],[50,20],[50,14],[43,21],[43,16],[43,12],[43,50],[43,3,49,4],[41,43],[41,41,8,50],[41,41,10,49,11],[41,41,3,48,4],[41,41,3,47,4],[47,49],[47,47,6,49],[45,41],[45,1,45],[45,7,45],[42,45],[42,42,15,45],[37,42],[37,37,5,42],[37,37,7,42],[44,37],[44,44,19,37],[38,44],[38,38,13,44],[39,38],[39, | ||
39,2,38],[40,39],[40,40,34,39],[49,40],[48]],tFuncs:function(){function b(a,b){return a+b}function a(a,b,c,d,e,k,f){return y(b,k,d,c,!1)}function e(a,b,c,d,e,f,h){return y(b,f,d,c,!1)}function h(a){return a.text}function q(a){return a}function f(a,b,c,d){return a+"("+(c||"")+")"}function d(a,b,c){return a+b.text+c}return[,function(a){return Function("root","var _obj = { '<': '<', '>': '>', '&': '&', '\"': '"' };\r\n\tfunction _htmlEncode(s) {\r\n\t\treturn String(s).replace(/[<>&\"]/g, function(c) {\r\n\t\t\treturn _obj[c];\r\n\t\t});\r\n\t}var _t,_s = '';function _print(s,e){if(s!=null){if(e)s=_htmlEncode(s);_s+=s;}}"+ | ||
a+" ")||"null"==a)throw Error("Reserved: "+a+" "+x(this.source,this.index));return"realId"}}],[/"(?:[^"\\]|\\[\s\S])*"|'(?:[^'\\]|\\[\s\S])*'/,function(a){return"string"}],[/\d+(?:\.\d+)?(?:e-?\d+)?/,function(a){return"number"}],[/{(?!{)/,function(a){return"{"}],[/}(?!})/,function(a){return"}"}],[function(a){a.sort().reverse();for(var b=0;b<a.length;++b)a[b]=a[b].replace(/[()*+?.[\]|]/g,"\\$&");return RegExp(a.join("|"))}("! % && ( ) * + - . / < <= = > >= [ ] || === !== == != , : ?".split(" ")),function(a){return/[*/%]/.test(a)? | ||
"mul":/[<>]/.test(a)?"rel":/[!=]=/.test(a)?"eq":a}]];return C({"":[[/(?:(?!{{)[\s\S])+/,function(a){return"text"}],[/{{{/,function(a){this.pushState(a);return a}],[/{{(?:\/if|else|\/each|\/forin|\/raw)}}/,function(a){return a}],[/{{#raw}}/,function(a){this.pushState("raw");return a}],[/{{<script>[\s\S]*?<\/script>}}/,function(a){return"script"}],[/{{(?:#(?:if|each|forin)(?=\s))?/,function(a){this.pushState("{{");return a}]],raw:[[/(?:(?!{{\/raw}})[\s\S])+/,function(a){this.popState();return"rawtext"}]], | ||
"{{":b.concat([[/}}/,function(a){this.popState();return a}]]),"{{{":b.concat([[/}}}/,function(a){this.popState();return a}]])})}(),D=function(){return function(b){function a(a,b){return d[a][b]}for(var e=b.nStart,h=b.tSymbols,q={},f=0;f<h.length;++f)q[h[f]]=f;var d=b.tAction,t=b.tGoto,u=b.tRules,c=b.tFuncs,r=b.actionIndex;r&&(a=function(a,b){var t=d[r[a]];return t[b]||t._});return function(b,k){function d(a){throw Error("Syntax error: "+b.getPos(m.index)+(a?"\n"+a:""));}var r=0,l=[0],m=b.scan(),g= | ||
[],p={get:function(a){return g[g.length+a]},set:function(a,b){g[g.length+a]=b}};if(k)for(var n in k)p[n]=k[n];for(;;)if(n=a(r,q[m.tag]))if(0<n)l.push(r=n),g.push(m),m=b.scan();else if(0>n&&-32768<n){n=-n;var r=u[n],f=r.length-1;l.length-=f;r=t[l[l.length-1]][r[0]-e];l.push(r);c[n]?(n=c[n].apply(p,g.splice(g.length-f,f)),g.push(n)):1!=f&&g.splice(g.length-f,f,null)}else return m.tag!=h[0]&&d(),g[0];else{n=[];for(f=0;f<e;++f)a(r,f)&&n.push(h[f]);d("find "+m.tag+"\nexpect "+n.join(" "))}}}({nStart:37, | ||
tSymbols:"$ ! && ( ) + , - . = [ ] boolean eq include mul number rawtext realId rel set string text {{ {{#each {{#forin {{#if {{#raw}} {{/each}} {{/forin}} {{/if}} {{/raw}} {{else}} {{{ || }} }}} AdditiveExpression EqualityExpression LogicalAndExpression LogicalOrExpression MemberExpression MultiplicativeExpression PrimaryExpression RelationalExpression UnaryExpression _text args epsilon expr id name program statement statements texts".split(" "),tAction:[{_:-2},{_:-32768},{22:3,23:4,24:5,25:6,26:7, | ||
27:8,33:9,_:-1},{_:-19},{1:13,3:14,7:15,12:16,14:17,16:18,18:19,20:20,21:21,_:0},{1:13,3:14,7:15,12:16,14:33,16:18,18:19,20:34,21:21,_:0},{17:38,_:0},{_:-17},{_:-3},{22:3,27:8,_:-13},{_:-26},{21:44,_:-23},{_:-25},{_:-21},{14:33,18:19,20:34,_:-22},{_:-24},{5:46,7:47,_:-44},{13:48,_:-48},{2:49,_:-50},{34:50,_:-52},{3:51,8:52,10:53,_:-36},{15:54,_:-41},{_:-29},{19:55,_:-46},{_:-39},{35:56,_:0},{_:-27},{_:-23},{_:-22},{14:33,18:19,20:34,21:57,_:0},{35:61,_:0},{31:62,_:0},{36:63,_:0},{_:-18},{_:-37},{4:64, | ||
_:0},{_:-38},{35:65,_:0},{9:66,_:0},{1:13,3:14,7:15,12:16,14:33,16:18,18:19,20:34,21:21,_:-53},{14:33,18:19,20:34,_:0},{_:-11},{_:-15},{_:-16},{14:33,18:19,20:34,21:57,_:-53},{_:-20},{_:-12},{_:-28},{_:-14},{15:54,_:-42},{15:54,_:-43},{19:55,_:-47},{13:48,_:-49},{2:49,_:-51},{4:85,6:86,_:0},{4:87,_:0},{_:-34},{_:-30},{11:88,_:0},{_:-40},{5:46,7:47,_:-45},{35:89,_:0},{35:90,_:0},{35:91,_:0},{35:92,_:0},{22:3,23:4,24:5,25:6,26:7,27:8,30:93,32:94,33:9,_:0},{35:95,_:0},{_:-33},{_:-32},{_:-31},{_:-4}, | ||
{_:-10},{_:-35},{22:3,23:4,24:5,25:6,26:7,27:8,28:102,33:9,_:0},{22:3,23:4,24:5,25:6,26:7,27:8,28:103,33:9,_:0},{22:3,23:4,24:5,25:6,26:7,27:8,29:104,33:9,_:0},{22:3,23:4,24:5,25:6,26:7,27:8,29:105,33:9,_:0},{22:3,23:4,24:5,25:6,26:7,27:8,30:106,33:9,_:0},{_:-6},{_:-7},{_:-8},{_:-9},{_:-5}],actionIndex:[0,1,2,3,4,5,5,5,6,5,7,8,9,5,5,5,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,29,30,31,32,33,34,35,36,37,38,5,5,5,5,5,39,40,5,5,5,41,42,43,44,44,0,45,46,47,48,5,49,50,51,52,53,54,55, | ||
56,57,58,59,60,61,62,63,64,65,66,67,5,68,69,0,0,0,0,70,0,71,72,73,74,75,76,77,78,79,80,81,82],tGoto:[{15:1,17:2},,{9:10,16:11,18:12},,{0:22,1:23,2:24,3:25,4:26,5:27,6:28,7:29,8:30,12:31,13:32},{0:22,1:23,2:24,3:25,4:26,5:27,6:28,7:29,8:30,12:35,13:32},{0:22,1:23,2:24,3:25,4:26,5:27,6:28,7:29,8:30,12:36,13:32},{0:22,1:23,2:24,3:25,4:26,5:27,6:28,7:29,8:30,12:37,13:32},,{0:22,1:23,2:24,3:25,4:26,5:27,6:28,7:29,8:30,12:39,13:32},,,{9:40},{4:26,6:28,8:41,13:32},{0:22,1:23,2:24,3:25,4:26,5:27,6:28,7:29, | ||
8:30,12:42,13:32},{4:26,6:28,8:43,13:32},,,,,{13:45},,,,,,,,,,,,,,,{13:58,14:59},{13:58,14:60},,,,,,,,,,{4:26,5:67,6:28,8:30,13:32},{4:26,5:68,6:28,8:30,13:32},{0:22,4:26,5:27,6:28,7:69,8:30,13:32},{0:22,1:70,4:26,5:27,6:28,7:29,8:30,13:32},{0:22,1:23,2:71,4:26,5:27,6:28,7:29,8:30,13:32},{0:22,1:23,2:24,3:25,4:26,5:27,6:28,7:29,8:30,10:72,11:73,12:74,13:32},{13:75},{0:22,1:23,2:24,3:25,4:26,5:27,6:28,7:29,8:30,12:76,13:32},{4:26,6:28,8:77,13:32},{0:78,4:26,5:27,6:28,8:30,13:32},,,,{11:79,13:58,14:80}, | ||
{11:81,13:58,14:82},{17:83},,,,,{0:22,1:23,2:24,3:25,4:26,5:27,6:28,7:29,8:30,12:84,13:32},,,,,,,,,,,,,,,,,{9:10,16:11,18:12},,,{0:22,1:23,2:24,3:25,4:26,5:27,6:28,7:29,8:30,12:96,13:32},,,{17:97},{17:98},{17:99},{17:100},,{17:101},,,{9:10,16:11,18:12},{9:10,16:11,18:12},{9:10,16:11,18:12},{9:10,16:11,18:12},{9:10,16:11,18:12}],tRules:[[56,52],[52,54],[54],[54,54,53],[53,26,49,35,54,30],[53,26,49,35,54,32,54,30],[53,24,49,51,48,35,54,28],[53,24,49,51,51,35,54,28],[53,25,49,51,48,35,54,29],[53,25, | ||
49,51,51,35,54,29],[53,23,20,50,9,49,35],[53,23,49,35],[53,33,49,36],[53,55],[53,23,14,21,35],[51,21],[51,50],[55,46],[55,55,46],[46,22],[46,27,17,31],[50,18],[50,20],[50,14],[43,21],[43,16],[43,12],[43,50],[43,3,49,4],[41,43],[41,41,8,50],[41,41,10,49,11],[41,41,3,48,4],[41,41,3,47,4],[47,49],[47,47,6,49],[45,41],[45,1,45],[45,7,45],[42,45],[42,42,15,45],[37,42],[37,37,5,42],[37,37,7,42],[44,37],[44,44,19,37],[38,44],[38,38,13,44],[39,38],[39,39,2,38],[40,39],[40,40,34,39],[49,40],[48]],tFuncs:function(){function b(a, | ||
b){return a+b}function a(a,b,c,d,e,k,f){return y(b,k,d,c,!1)}function e(a,b,c,d,e,f,h){return y(b,f,d,c,!1)}function h(a){return a.text}function q(a){return a}function f(a,b,c,d){return a+"("+(c||"")+")"}function d(a,b,c){return a+b.text+c}return[,function(a){return Function("root","var _obj = { '<': '<', '>': '>', '&': '&', '\"': '"' };\r\n\tfunction _htmlEncode(s) {\r\n\t\treturn String(s).replace(/[<>&\"]/g, function(c) {\r\n\t\t\treturn _obj[c];\r\n\t\t});\r\n\t}var _t,_s = '';function _print(s,e){if(s!=null){if(e)s=_htmlEncode(s);_s+=s;}}"+ | ||
a+"return _s;")},function(){return""},b,function(a,b,c,d,e){return"if("+b+"){"+d+"}"},function(a,b,c,d,e,f,h){return"if("+b+"){"+d+"}else{"+f+"}"},a,a,e,e,function(a,b,c,d,e,f){return"var "+c.text.replace(/^_+/,"$&$&")+"="+e+";"},function(a,b,c){return"_print("+b+",1);"},function(a,b,c){return"_print("+b+");"},function(a){return"_print("+A(a)+");"},function(a,b,c,d){throw Error("unimplemented: include");},function(a){return B(a.text)},h,q,b,h,function(a,b,c){return b.text},,,,h,h,h,function(a){return a.text.replace(/^_+/, | ||
"$&$&")},function(a,b,c){return"("+b+")"},,function(a,b,c){return a+"."+c},function(a,b,c,d){return a+"["+c+"]"},f,f,q,function(a,b,c){return a+","+c},,function(a,b){return"!"+b},function(a,b){return"- "+b},,d,,d,function(a,b,c){return a+"- "+c},,d,,d,,d,,d]}()})}(),w=0;return{compile:z,render:function(b,a){return z(b)(a)}}}); |
/** | ||
* @preserve Crox v1.4.1 | ||
* @preserve Crox v1.4.3 | ||
* https://github.com/thx/crox | ||
* | ||
* Released under the MIT license | ||
* md5: 1cfd10c3743c6995498cd2f7d0e2b828 | ||
* md5: f833184c125c428c92d517eb4c65698d | ||
*/ | ||
@@ -297,3 +297,3 @@ KISSY.add("crox", function(){function Class(base, constructor, methods) { | ||
return RegExp(a.join('|')); | ||
}(["!", "%", "&&", "(", ")", "*", "+", "-", ".", "/", "<", "<=", "=", ">", ">=", "[", "]", "||", "===", "!==", "==", "!=", ",", ":"]), function(a) { | ||
}(["!", "%", "&&", "(", ")", "*", "+", "-", ".", "/", "<", "<=", "=", ">", ">=", "[", "]", "||", "===", "!==", "==", "!=", ",", ":", "?"]), function(a) { | ||
return /[*/%]/.test(a) ? 'mul' : /[<>]/.test(a) ? 'rel' : /[!=]=/.test(a) ? 'eq' : a; | ||
@@ -319,2 +319,5 @@ }] | ||
}], | ||
[/{{<script>[\s\S]*?<\/script>}}/, function(a) { | ||
return 'script'; | ||
}], | ||
[/{{(?:#(?:if|each|forin)(?=\s))?/, function(a) { | ||
@@ -321,0 +324,0 @@ this.pushState('{{'); |
{ | ||
"name": "crox", | ||
"version": "1.4.1", | ||
"description": "Crox is a high performance cross-language template engine, written by the JavaScript.", | ||
"homepage": "http://thx.github.io/crox/", | ||
"keywords": [ | ||
"front end", | ||
"template" | ||
], | ||
"author": "shtml <shtml@live.com>", | ||
"contributors": [ | ||
"shtml <shtml@live.com>", | ||
"lenel <lenel@outlook.com>", | ||
"wangjeaf <wangjeaf@gmail.com>" | ||
], | ||
"engines": { | ||
"node": ">= 0.8.17" | ||
}, | ||
"dependencies": { | ||
"iconv-lite": "~0.2.11", | ||
"commander": "~2.1.0", | ||
"shelljs": "~0.2.6", | ||
"chokidar": "~0.7.0", | ||
"js-beautify": "~1.4.0", | ||
"walk": "~2.2.1" | ||
}, | ||
"devDependencies": { | ||
"grunt": "0.4.1", | ||
"semver": "~2.2.1", | ||
"async": "~0.2.9", | ||
"grunt-contrib-clean": "~0.4.0", | ||
"grunt-contrib-uglify": "~0.2.2", | ||
"grunt-contrib-concat": "*" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/thx/crox" | ||
}, | ||
"main": "./build/crox-all.js", | ||
"bin": { | ||
"crox": "./bin/crox.js" | ||
}, | ||
"scripts": {}, | ||
"preferGlobal": false | ||
"name": "crox", | ||
"version": "1.4.3", | ||
"description": "Crox is a high performance cross-language template engine, written by the JavaScript.", | ||
"homepage": "http://thx.github.io/crox/", | ||
"keywords": [ | ||
"front end", | ||
"template" | ||
], | ||
"author": "shtml <shtml@live.com>", | ||
"contributors": [ | ||
"shtml <shtml@live.com>", | ||
"lenel <lenel@outlook.com>", | ||
"wangjeaf <wangjeaf@gmail.com>" | ||
], | ||
"engines": { | ||
"node": ">= 0.8.17" | ||
}, | ||
"dependencies": { | ||
}, | ||
"devDependencies": { | ||
"iconv-lite": "~0.2.11", | ||
"commander": "~2.1.0", | ||
"shelljs": "~0.2.6", | ||
"chokidar": "~0.7.0", | ||
"js-beautify": "~1.4.0", | ||
"walk": "~2.2.1", | ||
"grunt": "0.4.1", | ||
"semver": "~2.2.1", | ||
"async": "~0.2.9", | ||
"grunt-contrib-clean": "~0.4.0", | ||
"grunt-contrib-uglify": "~0.2.2", | ||
"grunt-contrib-concat": "*" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/thx/crox" | ||
}, | ||
"main": "./build/crox-all.js", | ||
"bin": { | ||
"crox": "./bin/crox.js" | ||
}, | ||
"scripts": { }, | ||
"preferGlobal": false | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
160513
0
2997
12
- Removedchokidar@~0.7.0
- Removedcommander@~2.1.0
- Removediconv-lite@~0.2.11
- Removedjs-beautify@~1.4.0
- Removedshelljs@~0.2.6
- Removedwalk@~2.2.1
- Removedabbrev@1.1.1(transitive)
- Removedchokidar@0.7.1(transitive)
- Removedcommander@2.1.0(transitive)
- Removedconfig-chain@1.1.13(transitive)
- RemovedforEachAsync@2.2.1(transitive)
- Removediconv-lite@0.2.11(transitive)
- Removedini@1.3.8(transitive)
- Removedjs-beautify@1.4.2(transitive)
- Removedmkdirp@0.3.5(transitive)
- Removednopt@2.1.2(transitive)
- Removedproto-list@1.2.4(transitive)
- Removedsequence@2.2.1(transitive)
- Removedshelljs@0.2.6(transitive)
- Removedwalk@2.2.1(transitive)