Comparing version 6.0.8 to 6.0.9
{ | ||
"name": "remixml", | ||
"version": "6.0.8", | ||
"version": "6.0.9", | ||
"description": "XML/HTML-like macro language/template compiler engine", | ||
@@ -5,0 +5,0 @@ "main": "remixml.min.js", |
@@ -441,3 +441,3 @@ /** @license | ||
txtentity.lastIndex = 0; | ||
while (a5 = txtentity.exec(sbj)) | ||
while (a5 = execy(txtentity, sbj)) | ||
{ if (a5[1]) | ||
@@ -519,4 +519,2 @@ { obj += sep + "(function(){" + varent(a5) | ||
var /** number|string */ safarireported = 0; | ||
function /** string */ remixml2js(/** string */ rxmls,/** number= */ flags) | ||
@@ -595,3 +593,3 @@ { // H: Current element to append in | ||
qemrx.lastIndex = ++lasttoken; | ||
if (rm = qemrx.exec(rxmls)) | ||
if (rm = execy(qemrx, rxmls)) | ||
{ lasttoken = qemrx.lastIndex; | ||
@@ -606,3 +604,3 @@ if (!comment) | ||
{ noparserx.lastIndex = 0; | ||
if (noparserx.exec(ts = rm[3])) | ||
if (execy(noparserx, ts = rm[3])) | ||
{ if (ts[0] === "n") // noparse or comment? | ||
@@ -637,13 +635,3 @@ obj += "H.push(" | ||
function /** string */parseparam() | ||
{ var safariprev = params.lastIndex; | ||
// Kludge for the Safari regex engine (in versions <=15.1) | ||
// we need to loop here, the Safari engine is not deterministic for | ||
// the params regex. | ||
while (rm = params.exec(rxmls)) | ||
{ if (params.lastIndex >= safariprev) | ||
break; | ||
params.lastIndex = safariprev; | ||
if (RUNTIMEDEBUG && !safarireported) | ||
D(safarireported = "Safari regexp.sticky bug triggered"); | ||
} | ||
{ rm = execy(params, rxmls); | ||
if (RUNTIMEDEBUG) | ||
@@ -890,3 +878,4 @@ { if (rm[1]) | ||
{ rxend.lastIndex = lasttoken; | ||
let /** number */ i = rxend.exec(rxmls) | ||
let /** number */ i | ||
= execy(/** @type{!RegExp} */(rxend), rxmls) | ||
? rxend.lastIndex : rxmls.length + 3 + tag.length; | ||
@@ -1021,3 +1010,3 @@ obj += ";"; | ||
if (!noparse) | ||
{ if (rm = varentity.exec(rxmls)) | ||
{ if (rm = execy(varentity, rxmls)) | ||
{ lasttoken = varentity.lastIndex; | ||
@@ -1034,3 +1023,3 @@ if (!comment) | ||
textrx.lastIndex = lasttoken; | ||
rm = textrx.exec(rxmls); | ||
rm = execy(textrx, rxmls); | ||
if (rm || !ASSERT && !RUNTIMEDEBUG) | ||
@@ -1165,2 +1154,20 @@ { ts += rm[0]; | ||
var /** number|string */ safarireported = 0; | ||
function /** Array */ execy(/** !RegExp */ expr,/** string */ haystack) | ||
{ var /** number */ safariprev = expr.lastIndex; | ||
var /** Array */ rm; | ||
// Kludge for the Safari regex engine (in versions <=15.1) | ||
// we need to loop here, the Safari engine is not deterministic for | ||
// the params regex. | ||
while (rm = expr.exec(haystack)) | ||
{ if (expr.lastIndex >= safariprev) | ||
break; | ||
expr.lastIndex = safariprev; | ||
if (RUNTIMEDEBUG && !safarireported) | ||
D(safarireported = "Safari regexp.sticky bug triggered"); | ||
} | ||
return rm; | ||
} | ||
const /** !Object */ g = | ||
@@ -1167,0 +1174,0 @@ { "remixml2js": remixml2js, |
@@ -449,3 +449,3 @@ /** @license | ||
txtentity.lastIndex = 0; | ||
while (a5 = txtentity.exec(sbj)) | ||
while (a5 = execy(txtentity, sbj)) | ||
{ if (a5[1]) | ||
@@ -527,4 +527,2 @@ { obj += sep + "(function(){" + varent(a5) | ||
var /** number|string */ safarireported = 0; | ||
function /** string */ remixml2js(/** string */ rxmls,/** number= */ flags) | ||
@@ -603,3 +601,3 @@ { // H: Current element to append in | ||
qemrx.lastIndex = ++lasttoken; | ||
if (rm = qemrx.exec(rxmls)) | ||
if (rm = execy(qemrx, rxmls)) | ||
{ lasttoken = qemrx.lastIndex; | ||
@@ -614,3 +612,3 @@ if (!comment) | ||
{ noparserx.lastIndex = 0; | ||
if (noparserx.exec(ts = rm[3])) | ||
if (execy(noparserx, ts = rm[3])) | ||
{ if (ts[0] === "n") // noparse or comment? | ||
@@ -645,13 +643,3 @@ obj += "H.push(" | ||
function /** string */parseparam() | ||
{ var safariprev = params.lastIndex; | ||
// Kludge for the Safari regex engine (in versions <=15.1) | ||
// we need to loop here, the Safari engine is not deterministic for | ||
// the params regex. | ||
while (rm = params.exec(rxmls)) | ||
{ if (params.lastIndex >= safariprev) | ||
break; | ||
params.lastIndex = safariprev; | ||
if (RUNTIMEDEBUG && !safarireported) | ||
D(safarireported = "Safari regexp.sticky bug triggered"); | ||
} | ||
{ rm = execy(params, rxmls); | ||
if (RUNTIMEDEBUG) | ||
@@ -898,3 +886,4 @@ { if (rm[1]) | ||
{ rxend.lastIndex = lasttoken; | ||
let /** number */ i = rxend.exec(rxmls) | ||
let /** number */ i | ||
= execy(/** @type{!RegExp} */(rxend), rxmls) | ||
? rxend.lastIndex : rxmls.length + 3 + tag.length; | ||
@@ -1029,3 +1018,3 @@ obj += ";"; | ||
if (!noparse) | ||
{ if (rm = varentity.exec(rxmls)) | ||
{ if (rm = execy(varentity, rxmls)) | ||
{ lasttoken = varentity.lastIndex; | ||
@@ -1042,3 +1031,3 @@ if (!comment) | ||
textrx.lastIndex = lasttoken; | ||
rm = textrx.exec(rxmls); | ||
rm = execy(textrx, rxmls); | ||
if (rm || !ASSERT && !RUNTIMEDEBUG) | ||
@@ -1173,2 +1162,20 @@ { ts += rm[0]; | ||
var /** number|string */ safarireported = 0; | ||
function /** Array */ execy(/** !RegExp */ expr,/** string */ haystack) | ||
{ var /** number */ safariprev = expr.lastIndex; | ||
var /** Array */ rm; | ||
// Kludge for the Safari regex engine (in versions <=15.1) | ||
// we need to loop here, the Safari engine is not deterministic for | ||
// the params regex. | ||
while (rm = expr.exec(haystack)) | ||
{ if (expr.lastIndex >= safariprev) | ||
break; | ||
expr.lastIndex = safariprev; | ||
if (RUNTIMEDEBUG && !safarireported) | ||
D(safarireported = "Safari regexp.sticky bug triggered"); | ||
} | ||
return rm; | ||
} | ||
const /** !Object */ g = | ||
@@ -1175,0 +1182,0 @@ { "remixml2js": remixml2js, |
@@ -14,28 +14,28 @@ (function(){"use strict"; | ||
*/ | ||
'use strict';(function(){function ea(a){return"string"===typeof a}function Ha(a){return Ia[a]}function Ja(a){return Ka[a]}function La(a,b){a[b]=1;return a}function Ma(a,b,c,e,l){b._._tag[c]=function(g,v,m){delete v[""];m=C(v,m,l?l.split(sa).reduce(La,{}):{},e);return a(m)}}function da(a,b){var c=a.match(Na);return c?(a=T(c[1]),b?[a]:"["+a+"]"):a}function ta(a,b){return ia(ja(a,b))}function ua(a){return a.replace(Oa," ")}function va(a,b,c){w.defineProperty(a,b,{get:c,configurable:!0})}function wa(a){return a.match(Pa)? | ||
"."+a:'["'+a+'"]'}function xa(a){var b="",c="",e;for(ya.lastIndex=0;e=ya.exec(a);)b=e[1]?b+(c+"(function(){"+za(e)+'return x}catch(x){}return ""})()'):b+(c+JSON.stringify(e[0])),c="+";return b}function Aa(a,b,c){a="try{let x=Z($,"+da(a);b&&(a+=","+b);c&&(b||(a+=",0"),a+=","+c);return a+");"}function za(a){var b=a[2],c=a[3];return Aa(JSON.stringify(a[1]),ea(b)&&JSON.stringify(b),c&&JSON.stringify(c))}function ka(a){return"(function(){try{return("+a+')}catch(x){D(x)}return ""})()'}function Ba(a){return"(_=$._,"+ | ||
(a?ka(a):'""')+")"}function ca(a){a&&(0>a.indexOf("(")?(0<=(a=JSON.parse(a)).indexOf("_")&&(a="_=$._,"+a),a=ka(a)):(a='"'===a.slice(-1)?'"'===a[0]?a.slice(1,-1):'"+'+a.slice(0,-1):('"'===a[0]?a.slice(1):'"+'+a)+'+"',0<=a.indexOf("{")&&(a="("+a+")"),a=ka('eval("'+a+'")'),a=0>a.indexOf("_")?a:"(_=$._,"+a+")"));return a}function ja(a,b){function c(n,u){var la=D,H=a.slice(0,t),fa=(H.match(Qa)||"").length+1;H=H.match(Ra)[0].length+1;la(u+" at "+(fa+":"+H),a.substr(t-64,128+(n?n.length:0)))}function e(){2=== | ||
(p[2]&6)&&(p[2]|=4,d+="H._c=function(H,$){")}function l(n,u){I||(d+='H.push(W=L("'+n[0][0]+'"));W[0]='+JSON.stringify(n[u])+";")}var g=b&4;const v=g?"async ":"";var m=g?"await ":"",d="("+v+'function($){"use strict";var I,W,_,H=N($);',I=g=0;const ma="w,v="+v+"function(){"+m+"w();",Ca=")};w=("+v+"function(W){",Da="});"+m+"v()}",Sa=m+"X(J,H,$)";m="do{if((k=Y(H))===m)break;H="+m+"E(m=k,$"+(b?","+b:"")+")}while(--n);J.push.apply(J,H)}";for(var x,p=[0,{},4,""],aa=[p],t=0;;){var q,f="";if(t>=a.length){var r= | ||
p[0];if(r){c(r,"Missing </"+r+">");a+="</"+r+">";continue}break}a:switch(a[t]){case "<":r=function(){for(var u=ba.lastIndex;(q=ba.exec(a))&&!(ba.lastIndex>=u);)ba.lastIndex=u,Ea||D(Ea="Safari regexp.sticky bug triggered");q[1]?c(0,'Skipping malformed parameter "'+q[1]+'"'):q||c(0,"Parse error");return y=q[2]};var z=function(u,la){var H=h("mkmapping");if(H){let fa=H.slice(1,-1).split(Ta);for(d+=u;H=fa.pop();)d+=la+wa(H)+"=k["+fa.length+"];"}else if(""===H)return 1},h=function(u){return(u=n[u])&&xa(u)}; | ||
na.lastIndex=++t;if(q=na.exec(a)){t=na.lastIndex;I||(q[1]?l(q,1):q[2]?(q[0]="<",l(q,2)):(oa.lastIndex=0,oa.exec(f=q[3])?"n"===f[0]&&(d+="H.push("+JSON.stringify(f.slice(oa.lastIndex))+");"):l(q,3)));break}let n={};var y;ba.lastIndex=t;if("/"===r())n[y]=1,r();else if(!y){q&&(t=ba.lastIndex);break a}for(n[""]=y;;){if(!r()){q&&(t=ba.lastIndex);break}n[y]=q[3]?q[3].slice(1,-1):y}var J=n["/"];delete n["/"];r=n[""];if(1!==J){do{aa.push(p=[r,n,0,d]);d="";n["-"]&&(delete n["-"],p[2]=1);switch(r){case "noparse":if(!g++)continue; | ||
break;case "comment":g||I++}if(!I){delete n[""];d+="W=H;";if(!g)switch(r){case "set":d+="{let H=L(),";var k=h("var")||h("variable");x=0;if(k){var W=h("expr");d+=ma;p[2]|=16;x=d.length;if(f=h("selector"))d+="B($,w=L(),H,"+f+");H=w;";else{void 0!==n.json&&(d+="H=JSON.parse(Y(H));");if(f=h("split"))d+="H=Y(H).split("+(ca(W)||f)+");",W=void 0;void 0!==W&&(d+="H="+(ca(W)||Ba("eval(Y(H))"))+";");if(f=h("join"))d+="H=H.join("+f+");";z("let k=H[0];H={};","H")}d.length!==x&&(x=0);k=da(k,1);Array.isArray(k)? | ||
d+=k[0]+"=A("+(void 0!==n.clone?(x=0,"O(H,"+k[0]+")"):"H"):(x=0,d+="A(H,$,"+k);d+=Ca}else if(f=h("tag")){e();d+="v=0;Q("+f+",$,"+v+"function(H,a,$,W){let o=$;$=C(a,$,{";(f=h("args"))&&(f=f.replace(Ua,""))&&(d+='"'+f.replace(sa,'":1,"')+'":1');d+="}";if(f=h("scope"))d+=","+f;d+=");"}continue;case "insert":if(k=h("var")||h("variable")){d+=Aa(k,h("quote"),h("format"));if(f=h("join"))d+="x=x.join?x.join("+f+"):x;";k=h("limit");if((f=h("offset"))||void 0!==k)d+="x=F(x,"+f+(void 0!==k?","+k:"")+");";d+= | ||
"I=K($,H,x)}catch(x){I=0}"}else if(void 0!==(k=h("expr")))d+="{let H=L(),"+ma+("H="+(ca(k)||Ba("eval(Y(H))"))+";W.push(A(H)")+Ca,p[2]|=8;else switch(h("variables")){case "dump":d+="log((W="+h("scope")+")?$[W]:$);"}continue;case "replace":k=h("flags");void 0===k&&(k="g");d+="{let H=L(),J=W,v=P("+(h("regexp")||h("from").replace(Va,"\\$1"))+","+JSON.stringify(k)+","+(ca(h("expr"))||h("to"))+");";continue;case "trim":d+="{let H=L(),J=W;";continue;case "maketag":d+="{let H=L("+h("name")+"),J=W;";continue; | ||
case "attrib":d+="{let H=L(),v="+h("name")+",J=W;";continue;case "for":d+="{I=0;let g,i,k,m,J=W,n=0;";d=(k=h("in"))?d+("g=G($,"+da(k)+((f=h("orderby"))?",(m=$._,function(_){let _index=_[0];$._=_=_[1];return["+ca(f)+"]}));$._=m":")")+";while(!(m=g.next()).done){k=(m=m.value)[1];i=m[0];W=S({_value:k,"):d+("for(i=+"+(h("from")||0)+",m="+((k=h("step"))?"+("+k+"||1)":1)+",k=+"+(h("to")||0)+";m<0?i>=k:i<=k;i+=m){W=S({");d+="_recno:++n,_index:i});let o=$;$=C(W,$,{}";if(f=h("scope"))d+=","+f;d+=");";1=== | ||
z("k=(m=$._)._value;","m")&&(d+="M($._,$._._value);");continue;case "eval":d+="{let H=L(),n="+(void 0===(f=h("recurse"))?1:0<f?+f:0)+",J=W,k,m=0;";continue;case "unset":if(f=h("tag"))k=function(u){u="._._tag"+u;d+="$"+u+"=$._._&&$._"+u+";"},e(),W=da(f,1),Array.isArray(W)?k(W[0].slice(1)):(d+="{let v="+W+";",k("[v]"),d+="}");else if(f=h("var")||h("variable"))k=da(f,1),d+=Array.isArray(k)?"delete "+k[0]+";":'eval("delete $."+'+k+");";continue;case "delimiter":d+="if($._._recno>1){";continue;case "elif":f= | ||
"(!I&&";case "if":d+="if"+f+"(I="+(ca(h("expr"))||0)+")"+(f?")":"")+"{";continue;case "then":d+="if(I){";continue;case "else":d+="if(!I){";continue}d+="{let J=W,H=S({";(k=n["::"])&&(n["::"]=k.slice(0,-1)+":;");k="";for(y in n)if(f=h(y))d+=k+(Wa.test(y)?y:'"'+y+'"')+":"+f,k=",";d+='},"'+r+'")'}if(!J&&(k="script"===r?Xa:"style"===r?Ya:0)){k.lastIndex=t;z=k.exec(a)?k.lastIndex:a.length+3+r.length;d+=";";!I&&(f=a.slice(t,z-3-r.length))&&(d+="H[0]="+JSON.stringify(f)+";");t=z;J=1;break}I||(d+=";",p[2]|= | ||
2)}while(0)}if(J)for(;;){p=aa.pop();z=p[0];f=0;if(r!==z){c(r,(z?"Expected </"+z+"> got </":"Missing <")+r+">");for(J=aa.length;J;)if(aa[--J][0]===r){f=1;break}if(!f){aa.push(p);break}}b:do{switch(z){case "noparse":if(!--g)break b;break;case "comment":if(!g){I--;break b}break;case 0:break b}if(!I)if(g)d+="J.push(H)}";else{c:do switch(z){case "set":if("{"!==d.slice(-1)&&x){J=d.slice(x).match(Za);d=d.slice(0,x-11-ma.length)+J[1]+J[2]+";";break c}d+=p[2]&16?Da:"})}";break;case "insert":p[2]&8&&(d+=Da); | ||
break;case "replace":d+="J.push.apply(J,R(H,v))}";break;case "trim":d+="J.push.apply(J,U(R(H)))}";break;case "maketag":d+="J.push(H)}";break;case "attrib":d+="V(H,v,J)}";case "unset":break c;case "for":d+="$=o;I=1}}";break;case "if":case "then":case "elif":case "else":d+="I=1}";break c;case "eval":d+=m;break;case "nooutput":d+="J=[];";default:p[2]&4&&(d+="};");case "script":case "style":d+=Sa;case "delimiter":d+="}"}while(0);x=0}}while(0);d=p[3]+d;if(!f){p=aa[aa.length-1];break}}break;case "&":pa.lastIndex= | ||
++t;if(!g&&(q=pa.exec(a))){t=pa.lastIndex;I||(d+=za(q)+"I=K($,H,x)}catch(x){I=0}",x=0);break}f="&";default:qa.lastIndex=t,(q=qa.exec(a))?(f+=q[0],t=qa.lastIndex):(c(0,"Parse error"),f+=a.substr(t),t=a.length),I||(!g&&b&1&&(f=ua(f)),!f||p[2]&1&&"0}"!==d.slice(-2)&&f.match($a)||(d+="H.push("+JSON.stringify(f)+");"))}}return d+="return H})"}function ia(a){try{var b=eval(a)}catch(c){D(c,a),ab(a),b=function(){return""}}return b}const bb=("object"==typeof document?document:null)&&window,w=Object,Ia={"+":"%2B", | ||
" ":"+","\t":"%09","\n":"%0A","\r":"%0D","?":"%3F","&":"%26","#":"%23","<":"%3C"},Ka={"&":"&","<":"<"},sa=/\s*,\s*/g,Ta=/\s*,\s*/,ya=RegExp("(?:[^&]+|(?:&(?:\\w*;|[\\w$:.[\\]]+(?=[^%;\\w$:.[\\]])|(?=[^\\w$:.[\\]]))[^&]*))+|&([\\w$]+(?:[.[][\\w$]+]?)*\\.[\\w$]+)(?::([\\w$]*))?(?:%([^;]*))?;","y"),pa=/([\w$]+\.[\w$]+(?:[.[][\w$]+]?)*)(?::([\w$]*))?(?:%([^;]*))?;/y,na=/!(?:--(.*?)(?:--|$)|([^-].*?))(?:>|$)|\?(.*?)(?:\?>|$)/ys,oa=/(?:noparse|comment)\s/y,qa=RegExp("[^&<]+(?:&(?:\\w*;|[\\w$:.[\\]]+(?=[^%;\\w$:.[\\]])|(?=[^\\w$:.[\\]]))[^&<]*)*", | ||
"y"),ba=/\s*((?:[^-:_a-zA-Z<&>\s\/]\s*)*)(?:([-:_a-zA-Z][-:\w]*|\/)\s*(?:=\s*("[^"]*"|'[^']*'))?|[<&>])/y,Wa=/^[_a-zA-Z]\w*$/,Xa=/<\/script>/g,Ya=/<\/style>/g,Na=/^"([^(+]+)"$/,Pa=/^[A-Za-z_][\w]*$/,Qa=/\n/g,Ra=/[^\n]*$/,Za=/([^=]+=).+(".*")/,$a=/^\s+$/,Oa=/\s\s+/g,cb=/</g,db=/[+ \t\n\r?&#<]/g,eb=/[&<]/g,Ua=/[^-:\w,]+/g,Va=/([\\^$*+?.|()[{])/g,fb=/"/g,gb=/[.[\]]+/,Fa={};var ra,ab=console.debug,Ga=console.error;M=function(a,b){try{w.assign(a,b)}catch(c){}};D=function(a,b){Ga("Remixml expression: "+ | ||
(b?JSON.stringify(b):"")+"\n",a)};E=function(a,b,c){return ta(a,c)(b)};P=function(a,b,c){return function(e){return(Array.isArray(e)?e.join(", "):e).replace(RegExp(a,b),c)}};U=function(a){var b;ea(b=a[0])&&" "===b[0]&&!(a[0]=b.substr(1))&&a.splice(0,1);var c=a.length-1;ea(b=a[c])&&" "===b.slice(-1)&&!(a[c]=b.slice(0,-1))&&a.splice(c,1);return a};F=function(a,b,c){b=+(b||0);c=+c;return 0>c?a.slice(b,c):0<c?a.slice(b,b+c):0==c?a.slice(b):""};R=function(a,b){for(var c,e=a.length,l=b||ua;e--;){switch((c= | ||
a[e])[""]){case "!":case "<":case "?":if(!b)break;default:R(c,b);continue;case void 0:if(a[e]=l(c))continue}a.splice(e,1)}return a};S=function(a,b){b=L(b);w.assign(b,a);delete b["::"];(a=a["::"])&&w.assign(b,a);return b};L=function(a){var b=[];b[""]=a||1;return b};N=function(a){var b=a._;b||(a._=b={});b._tag||(b._tag={});!a["var"]&&a.__&&(a["var"]=a.__);return L()};C=function(a,b,c,e){if(1!==a[""])if(va(a,"_contents",function(){let g=a._c;g?g(a.slice(),b):a[""]=1;return a}),c)va(a,"_restargs",function(){var g, | ||
v={};for(g in this)switch(g[0]){default:0<=g||c[g]||(v[g]=this[g]);case "_":case void 0:}return v});else return a;var l;(l=w.assign({},b))._=w.assign(a,{_:b._,_tag:w.assign({},b._._tag)});e&&(l[e]=a);return l};V=function(a,b,c){void 0===c[b]&&(c[b]=1!==a.length||a[0][""]?a.length?a:"":a[0])};X=function(a,b,c){var e=c._._tag[b[""]];if(e)return e(a,b,c);if(e=b._c)delete b._c,e(b,c);a.push(b)};Q=function(a,b,c){b._._tag[a]=c};G=function(a,b,c){if((b=(b=Array.isArray(b)?b[0]:VE(a,b))||0)&&0<=b.size)a= | ||
b.entries();else if(a=w.entries(b),0<=b.length&&a.splice(b.length),c)try{a=a.sort(function(e,l){var g,v;e=c(e);l=c(l);var m=0;for(g=e.length;m<g;m++){var d=0;Array.isArray(e[m])&&(d=1,e[m]=e[m][0],l[m]=l[m][0]);if(v=e[m]>l[m]||-(e[m]!==l[m]))break}return d?-v:v})}catch(e){D(e,c)}return a[Symbol.iterator]()};B=function(a,b,c,e){for(var l=0;l<c.length;){let g=c[l++];switch(g[""]){default:B(a,b,g,e);return;case e:b.push(C(g,a));case void 0:}}};T=function(a){var b=a.split(gb),c;a="$";for(c of b)a+=wa(c); | ||
return a};Z=function(a,b,c,e){b=Array.isArray(b)?b[0]:VE(a,b);null==b&&(b="");"function"===typeof b&&(b=b(a._,a));if(b[""])switch(c){case "r":case "recurse":case "":case "none":if(!e)break;default:b=Y(b)}else- -b==b&&(b+="");e&&!b[""]&&ra&&(b=ra(e,b,a));switch(c){case "json":b=JSON.stringify(b).replace(cb,"\\\\u003c");break;case "uric":b=b.replace(db,Ha);break;default:b[""]||(b=Array.isArray(b)?b.join(", "):b,b=(e=Fa[c])?e(b):b.replace(eb,Ja));case "":case "none":case "r":case "recurse":}switch(b.length){case 0:b= | ||
"";break;case 1:1===b[""]&&(b=b[0])}if("r"===c)for(c="";b!==c&&0<=b.indexOf("&");)c=b,b=VE(a,["("+xa(b)+")"]);return b};O=function(a,b){var c;if(b)for(c in b)delete b[c];else b=[];b=w.assign(b,a);for(c=b.length;c--;)b[c][""]&&(b[c]=O(b[c]));return b};K=function(a,b,c){c[""]?(1===c[""]?b.push.apply(b,O(c)):b.push(c),c=1):c||void 0!==c&&c?(b.push(c),c=1):c=0;return c};var Ea=0;sizeof=function(a){return Number(a)===a?1:a?a.length||1!==a[""]||w.keys(a).length:0};desc=function(a){return- -a===a?-a:[a, | ||
1]};abstract2dom=function(a,b){return ha.abstract2dom(a,b)};abstract2txt=Y=function(a,b){for(;;){switch(a[""]){case void 0:return a;case 1:switch(a.length){case 0:return"";case 1:a=a[0];continue}}break}var c,e=a[""];switch(e){case "!":return"\x3c!--"+a[0]+"--\x3e";case "<":return"<!"+a[0]+">";case "?":return"<?"+a[0]+"?>";case 1:e=c="";break;default:c="<"+e;for(var l of w.keys(a).splice(a.length))switch(l[0]){default:var g=a[l];null!=g&&(g[""]&&(g=g.join("")),c+=" "+l,l!==g&&(c+='="'+(g.replace?g.replace(fb, | ||
"&dquot;"):g)+'"'));case "_":case void 0:}if(!a.length)return c+(b&&"br"!==e?"></"+e+">":"/>");c+=">"}for(g=0;void 0!==(l=a[g++]);)c+=l[""]?Y(l,b):l;e&&(c+="</"+e+">");return c};const ha={remixml2js:ja,js2obj:ia,compile:ta,parse2txt:function(a,b,c){ea(a)&&(a=ia(ja(a,c)));return Y(a(b))},abstract2txt:Y,add_filter:function(a,b){Fa[a]=b},set_proc_fmt:function(a){ra=a},set_tag:function(a,b,c,e,l){N(b);Ma(a,b,c,e,l)},set_log_callback:function(a){Ga=a}};"function"==typeof define&&define.amd?define("remixml", | ||
[],ha):"object"==typeof exports?w.assign(exports,ha):bb.Remixml=ha}).call(this); | ||
'use strict';(function(){function ea(a){return"string"===typeof a}function Ia(a){return Ja[a]}function Ka(a){return La[a]}function Ma(a,b){a[b]=1;return a}function Na(a,b,c,e,l){b._._tag[c]=function(g,u,m){delete u[""];m=C(u,m,l?l.split(ta).reduce(Ma,{}):{},e);return a(m)}}function da(a,b){var c=a.match(Oa);return c?(a=T(c[1]),b?[a]:"["+a+"]"):a}function ua(a,b){return ja(ka(a,b))}function va(a){return a.replace(Pa," ")}function wa(a,b,c){w.defineProperty(a,b,{get:c,configurable:!0})}function xa(a){return a.match(Qa)? | ||
"."+a:'["'+a+'"]'}function ya(a){var b="",c="",e;for(za.lastIndex=0;e=aa(za,a);)b=e[1]?b+(c+"(function(){"+Aa(e)+'return x}catch(x){}return ""})()'):b+(c+JSON.stringify(e[0])),c="+";return b}function Ba(a,b,c){a="try{let x=Z($,"+da(a);b&&(a+=","+b);c&&(b||(a+=",0"),a+=","+c);return a+");"}function Aa(a){var b=a[2],c=a[3];return Ba(JSON.stringify(a[1]),ea(b)&&JSON.stringify(b),c&&JSON.stringify(c))}function la(a){return"(function(){try{return("+a+')}catch(x){D(x)}return ""})()'}function Ca(a){return"(_=$._,"+ | ||
(a?la(a):'""')+")"}function ca(a){a&&(0>a.indexOf("(")?(0<=(a=JSON.parse(a)).indexOf("_")&&(a="_=$._,"+a),a=la(a)):(a='"'===a.slice(-1)?'"'===a[0]?a.slice(1,-1):'"+'+a.slice(0,-1):('"'===a[0]?a.slice(1):'"+'+a)+'+"',0<=a.indexOf("{")&&(a="("+a+")"),a=la('eval("'+a+'")'),a=0>a.indexOf("_")?a:"(_=$._,"+a+")"));return a}function ka(a,b){function c(n,v){var ma=D,H=a.slice(0,t),fa=(H.match(Ra)||"").length+1;H=H.match(Sa)[0].length+1;ma(v+" at "+(fa+":"+H),a.substr(t-64,128+(n?n.length:0)))}function e(){2=== | ||
(p[2]&6)&&(p[2]|=4,d+="H._c=function(H,$){")}function l(n,v){I||(d+='H.push(W=L("'+n[0][0]+'"));W[0]='+JSON.stringify(n[v])+";")}var g=b&4;const u=g?"async ":"";var m=g?"await ":"",d="("+u+'function($){"use strict";var I,W,_,H=N($);',I=g=0;const na="w,v="+u+"function(){"+m+"w();",Da=")};w=("+u+"function(W){",Ea="});"+m+"v()}",Ta=m+"X(J,H,$)";m="do{if((k=Y(H))===m)break;H="+m+"E(m=k,$"+(b?","+b:"")+")}while(--n);J.push.apply(J,H)}";for(var x,p=[0,{},4,""],ba=[p],t=0;;){var q,f="";if(t>=a.length){var r= | ||
p[0];if(r){c(r,"Missing </"+r+">");a+="</"+r+">";continue}break}a:switch(a[t]){case "<":r=function(){q=aa(ha,a);q[1]?c(0,'Skipping malformed parameter "'+q[1]+'"'):q||c(0,"Parse error");return y=q[2]};var z=function(v,ma){var H=h("mkmapping");if(H){let fa=H.slice(1,-1).split(Ua);for(d+=v;H=fa.pop();)d+=ma+xa(H)+"=k["+fa.length+"];"}else if(""===H)return 1},h=function(v){return(v=n[v])&&ya(v)};oa.lastIndex=++t;if(q=aa(oa,a)){t=oa.lastIndex;I||(q[1]?l(q,1):q[2]?(q[0]="<",l(q,2)):(pa.lastIndex=0,aa(pa, | ||
f=q[3])?"n"===f[0]&&(d+="H.push("+JSON.stringify(f.slice(pa.lastIndex))+");"):l(q,3)));break}let n={};var y;ha.lastIndex=t;if("/"===r())n[y]=1,r();else if(!y){q&&(t=ha.lastIndex);break a}for(n[""]=y;;){if(!r()){q&&(t=ha.lastIndex);break}n[y]=q[3]?q[3].slice(1,-1):y}var J=n["/"];delete n["/"];r=n[""];if(1!==J){do{ba.push(p=[r,n,0,d]);d="";n["-"]&&(delete n["-"],p[2]=1);switch(r){case "noparse":if(!g++)continue;break;case "comment":g||I++}if(!I){delete n[""];d+="W=H;";if(!g)switch(r){case "set":d+= | ||
"{let H=L(),";var k=h("var")||h("variable");x=0;if(k){var W=h("expr");d+=na;p[2]|=16;x=d.length;if(f=h("selector"))d+="B($,w=L(),H,"+f+");H=w;";else{void 0!==n.json&&(d+="H=JSON.parse(Y(H));");if(f=h("split"))d+="H=Y(H).split("+(ca(W)||f)+");",W=void 0;void 0!==W&&(d+="H="+(ca(W)||Ca("eval(Y(H))"))+";");if(f=h("join"))d+="H=H.join("+f+");";z("let k=H[0];H={};","H")}d.length!==x&&(x=0);k=da(k,1);Array.isArray(k)?d+=k[0]+"=A("+(void 0!==n.clone?(x=0,"O(H,"+k[0]+")"):"H"):(x=0,d+="A(H,$,"+k);d+=Da}else if(f= | ||
h("tag")){e();d+="v=0;Q("+f+",$,"+u+"function(H,a,$,W){let o=$;$=C(a,$,{";(f=h("args"))&&(f=f.replace(Va,""))&&(d+='"'+f.replace(ta,'":1,"')+'":1');d+="}";if(f=h("scope"))d+=","+f;d+=");"}continue;case "insert":if(k=h("var")||h("variable")){d+=Ba(k,h("quote"),h("format"));if(f=h("join"))d+="x=x.join?x.join("+f+"):x;";k=h("limit");if((f=h("offset"))||void 0!==k)d+="x=F(x,"+f+(void 0!==k?","+k:"")+");";d+="I=K($,H,x)}catch(x){I=0}"}else if(void 0!==(k=h("expr")))d+="{let H=L(),"+na+("H="+(ca(k)||Ca("eval(Y(H))"))+ | ||
";W.push(A(H)")+Da,p[2]|=8;else switch(h("variables")){case "dump":d+="log((W="+h("scope")+")?$[W]:$);"}continue;case "replace":k=h("flags");void 0===k&&(k="g");d+="{let H=L(),J=W,v=P("+(h("regexp")||h("from").replace(Wa,"\\$1"))+","+JSON.stringify(k)+","+(ca(h("expr"))||h("to"))+");";continue;case "trim":d+="{let H=L(),J=W;";continue;case "maketag":d+="{let H=L("+h("name")+"),J=W;";continue;case "attrib":d+="{let H=L(),v="+h("name")+",J=W;";continue;case "for":d+="{I=0;let g,i,k,m,J=W,n=0;";d=(k= | ||
h("in"))?d+("g=G($,"+da(k)+((f=h("orderby"))?",(m=$._,function(_){let _index=_[0];$._=_=_[1];return["+ca(f)+"]}));$._=m":")")+";while(!(m=g.next()).done){k=(m=m.value)[1];i=m[0];W=S({_value:k,"):d+("for(i=+"+(h("from")||0)+",m="+((k=h("step"))?"+("+k+"||1)":1)+",k=+"+(h("to")||0)+";m<0?i>=k:i<=k;i+=m){W=S({");d+="_recno:++n,_index:i});let o=$;$=C(W,$,{}";if(f=h("scope"))d+=","+f;d+=");";1===z("k=(m=$._)._value;","m")&&(d+="M($._,$._._value);");continue;case "eval":d+="{let H=L(),n="+(void 0===(f= | ||
h("recurse"))?1:0<f?+f:0)+",J=W,k,m=0;";continue;case "unset":if(f=h("tag"))k=function(v){v="._._tag"+v;d+="$"+v+"=$._._&&$._"+v+";"},e(),W=da(f,1),Array.isArray(W)?k(W[0].slice(1)):(d+="{let v="+W+";",k("[v]"),d+="}");else if(f=h("var")||h("variable"))k=da(f,1),d+=Array.isArray(k)?"delete "+k[0]+";":'eval("delete $."+'+k+");";continue;case "delimiter":d+="if($._._recno>1){";continue;case "elif":f="(!I&&";case "if":d+="if"+f+"(I="+(ca(h("expr"))||0)+")"+(f?")":"")+"{";continue;case "then":d+="if(I){"; | ||
continue;case "else":d+="if(!I){";continue}d+="{let J=W,H=S({";(k=n["::"])&&(n["::"]=k.slice(0,-1)+":;");k="";for(y in n)if(f=h(y))d+=k+(Xa.test(y)?y:'"'+y+'"')+":"+f,k=",";d+='},"'+r+'")'}if(!J&&(k="script"===r?Ya:"style"===r?Za:0)){k.lastIndex=t;z=aa(k,a)?k.lastIndex:a.length+3+r.length;d+=";";!I&&(f=a.slice(t,z-3-r.length))&&(d+="H[0]="+JSON.stringify(f)+";");t=z;J=1;break}I||(d+=";",p[2]|=2)}while(0)}if(J)for(;;){p=ba.pop();z=p[0];f=0;if(r!==z){c(r,(z?"Expected </"+z+"> got </":"Missing <")+r+ | ||
">");for(J=ba.length;J;)if(ba[--J][0]===r){f=1;break}if(!f){ba.push(p);break}}b:do{switch(z){case "noparse":if(!--g)break b;break;case "comment":if(!g){I--;break b}break;case 0:break b}if(!I)if(g)d+="J.push(H)}";else{c:do switch(z){case "set":if("{"!==d.slice(-1)&&x){J=d.slice(x).match($a);d=d.slice(0,x-11-na.length)+J[1]+J[2]+";";break c}d+=p[2]&16?Ea:"})}";break;case "insert":p[2]&8&&(d+=Ea);break;case "replace":d+="J.push.apply(J,R(H,v))}";break;case "trim":d+="J.push.apply(J,U(R(H)))}";break; | ||
case "maketag":d+="J.push(H)}";break;case "attrib":d+="V(H,v,J)}";case "unset":break c;case "for":d+="$=o;I=1}}";break;case "if":case "then":case "elif":case "else":d+="I=1}";break c;case "eval":d+=m;break;case "nooutput":d+="J=[];";default:p[2]&4&&(d+="};");case "script":case "style":d+=Ta;case "delimiter":d+="}"}while(0);x=0}}while(0);d=p[3]+d;if(!f){p=ba[ba.length-1];break}}break;case "&":qa.lastIndex=++t;if(!g&&(q=aa(qa,a))){t=qa.lastIndex;I||(d+=Aa(q)+"I=K($,H,x)}catch(x){I=0}",x=0);break}f= | ||
"&";default:ra.lastIndex=t,(q=aa(ra,a))?(f+=q[0],t=ra.lastIndex):(c(0,"Parse error"),f+=a.substr(t),t=a.length),I||(!g&&b&1&&(f=va(f)),!f||p[2]&1&&"0}"!==d.slice(-2)&&f.match(ab)||(d+="H.push("+JSON.stringify(f)+");"))}}return d+="return H})"}function ja(a){try{var b=eval(a)}catch(c){D(c,a),bb(a),b=function(){return""}}return b}function aa(a,b){for(var c=a.lastIndex,e;(e=a.exec(b))&&!(a.lastIndex>=c);)a.lastIndex=c,Fa||D(Fa="Safari regexp.sticky bug triggered");return e}const cb=("object"==typeof document? | ||
document:null)&&window,w=Object,Ja={"+":"%2B"," ":"+","\t":"%09","\n":"%0A","\r":"%0D","?":"%3F","&":"%26","#":"%23","<":"%3C"},La={"&":"&","<":"<"},ta=/\s*,\s*/g,Ua=/\s*,\s*/,za=RegExp("(?:[^&]+|(?:&(?:\\w*;|[\\w$:.[\\]]+(?=[^%;\\w$:.[\\]])|(?=[^\\w$:.[\\]]))[^&]*))+|&([\\w$]+(?:[.[][\\w$]+]?)*\\.[\\w$]+)(?::([\\w$]*))?(?:%([^;]*))?;","y"),qa=/([\w$]+\.[\w$]+(?:[.[][\w$]+]?)*)(?::([\w$]*))?(?:%([^;]*))?;/y,oa=/!(?:--(.*?)(?:--|$)|([^-].*?))(?:>|$)|\?(.*?)(?:\?>|$)/ys,pa=/(?:noparse|comment)\s/y, | ||
ra=RegExp("[^&<]+(?:&(?:\\w*;|[\\w$:.[\\]]+(?=[^%;\\w$:.[\\]])|(?=[^\\w$:.[\\]]))[^&<]*)*","y"),ha=/\s*((?:[^-:_a-zA-Z<&>\s\/]\s*)*)(?:([-:_a-zA-Z][-:\w]*|\/)\s*(?:=\s*("[^"]*"|'[^']*'))?|[<&>])/y,Xa=/^[_a-zA-Z]\w*$/,Ya=/<\/script>/g,Za=/<\/style>/g,Oa=/^"([^(+]+)"$/,Qa=/^[A-Za-z_][\w]*$/,Ra=/\n/g,Sa=/[^\n]*$/,$a=/([^=]+=).+(".*")/,ab=/^\s+$/,Pa=/\s\s+/g,db=/</g,eb=/[+ \t\n\r?&#<]/g,fb=/[&<]/g,Va=/[^-:\w,]+/g,Wa=/([\\^$*+?.|()[{])/g,gb=/"/g,hb=/[.[\]]+/,Ga={};var sa,bb=console.debug,Ha=console.error; | ||
M=function(a,b){try{w.assign(a,b)}catch(c){}};D=function(a,b){Ha("Remixml expression: "+(b?JSON.stringify(b):"")+"\n",a)};E=function(a,b,c){return ua(a,c)(b)};P=function(a,b,c){return function(e){return(Array.isArray(e)?e.join(", "):e).replace(RegExp(a,b),c)}};U=function(a){var b;ea(b=a[0])&&" "===b[0]&&!(a[0]=b.substr(1))&&a.splice(0,1);var c=a.length-1;ea(b=a[c])&&" "===b.slice(-1)&&!(a[c]=b.slice(0,-1))&&a.splice(c,1);return a};F=function(a,b,c){b=+(b||0);c=+c;return 0>c?a.slice(b,c):0<c?a.slice(b, | ||
b+c):0==c?a.slice(b):""};R=function(a,b){for(var c,e=a.length,l=b||va;e--;){switch((c=a[e])[""]){case "!":case "<":case "?":if(!b)break;default:R(c,b);continue;case void 0:if(a[e]=l(c))continue}a.splice(e,1)}return a};S=function(a,b){b=L(b);w.assign(b,a);delete b["::"];(a=a["::"])&&w.assign(b,a);return b};L=function(a){var b=[];b[""]=a||1;return b};N=function(a){var b=a._;b||(a._=b={});b._tag||(b._tag={});!a["var"]&&a.__&&(a["var"]=a.__);return L()};C=function(a,b,c,e){if(1!==a[""])if(wa(a,"_contents", | ||
function(){let g=a._c;g?g(a.slice(),b):a[""]=1;return a}),c)wa(a,"_restargs",function(){var g,u={};for(g in this)switch(g[0]){default:0<=g||c[g]||(u[g]=this[g]);case "_":case void 0:}return u});else return a;var l;(l=w.assign({},b))._=w.assign(a,{_:b._,_tag:w.assign({},b._._tag)});e&&(l[e]=a);return l};V=function(a,b,c){void 0===c[b]&&(c[b]=1!==a.length||a[0][""]?a.length?a:"":a[0])};X=function(a,b,c){var e=c._._tag[b[""]];if(e)return e(a,b,c);if(e=b._c)delete b._c,e(b,c);a.push(b)};Q=function(a, | ||
b,c){b._._tag[a]=c};G=function(a,b,c){if((b=(b=Array.isArray(b)?b[0]:VE(a,b))||0)&&0<=b.size)a=b.entries();else if(a=w.entries(b),0<=b.length&&a.splice(b.length),c)try{a=a.sort(function(e,l){var g,u;e=c(e);l=c(l);var m=0;for(g=e.length;m<g;m++){var d=0;Array.isArray(e[m])&&(d=1,e[m]=e[m][0],l[m]=l[m][0]);if(u=e[m]>l[m]||-(e[m]!==l[m]))break}return d?-u:u})}catch(e){D(e,c)}return a[Symbol.iterator]()};B=function(a,b,c,e){for(var l=0;l<c.length;){let g=c[l++];switch(g[""]){default:B(a,b,g,e);return; | ||
case e:b.push(C(g,a));case void 0:}}};T=function(a){var b=a.split(hb),c;a="$";for(c of b)a+=xa(c);return a};Z=function(a,b,c,e){b=Array.isArray(b)?b[0]:VE(a,b);null==b&&(b="");"function"===typeof b&&(b=b(a._,a));if(b[""])switch(c){case "r":case "recurse":case "":case "none":if(!e)break;default:b=Y(b)}else- -b==b&&(b+="");e&&!b[""]&&sa&&(b=sa(e,b,a));switch(c){case "json":b=JSON.stringify(b).replace(db,"\\\\u003c");break;case "uric":b=b.replace(eb,Ia);break;default:b[""]||(b=Array.isArray(b)?b.join(", "): | ||
b,b=(e=Ga[c])?e(b):b.replace(fb,Ka));case "":case "none":case "r":case "recurse":}switch(b.length){case 0:b="";break;case 1:1===b[""]&&(b=b[0])}if("r"===c)for(c="";b!==c&&0<=b.indexOf("&");)c=b,b=VE(a,["("+ya(b)+")"]);return b};O=function(a,b){var c;if(b)for(c in b)delete b[c];else b=[];b=w.assign(b,a);for(c=b.length;c--;)b[c][""]&&(b[c]=O(b[c]));return b};K=function(a,b,c){c[""]?(1===c[""]?b.push.apply(b,O(c)):b.push(c),c=1):c||void 0!==c&&c?(b.push(c),c=1):c=0;return c};sizeof=function(a){return Number(a)=== | ||
a?1:a?a.length||1!==a[""]||w.keys(a).length:0};desc=function(a){return- -a===a?-a:[a,1]};abstract2dom=function(a,b){return ia.abstract2dom(a,b)};abstract2txt=Y=function(a,b){for(;;){switch(a[""]){case void 0:return a;case 1:switch(a.length){case 0:return"";case 1:a=a[0];continue}}break}var c,e=a[""];switch(e){case "!":return"\x3c!--"+a[0]+"--\x3e";case "<":return"<!"+a[0]+">";case "?":return"<?"+a[0]+"?>";case 1:e=c="";break;default:c="<"+e;for(var l of w.keys(a).splice(a.length))switch(l[0]){default:var g= | ||
a[l];null!=g&&(g[""]&&(g=g.join("")),c+=" "+l,l!==g&&(c+='="'+(g.replace?g.replace(gb,"&dquot;"):g)+'"'));case "_":case void 0:}if(!a.length)return c+(b&&"br"!==e?"></"+e+">":"/>");c+=">"}for(g=0;void 0!==(l=a[g++]);)c+=l[""]?Y(l,b):l;e&&(c+="</"+e+">");return c};var Fa=0;const ia={remixml2js:ka,js2obj:ja,compile:ua,parse2txt:function(a,b,c){ea(a)&&(a=ja(ka(a,c)));return Y(a(b))},abstract2txt:Y,add_filter:function(a,b){Ga[a]=b},set_proc_fmt:function(a){sa=a},set_tag:function(a,b,c,e,l){N(b);Na(a, | ||
b,c,e,l)},set_log_callback:function(a){Ha=a}};"function"==typeof define&&define.amd?define("remixml",[],ia):"object"==typeof exports?w.assign(exports,ia):cb.Remixml=ia}).call(this); | ||
}).call(this); |
Sorry, the diff of this file is not supported yet
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
560078
7163