Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

remixml

Package Overview
Dependencies
Maintainers
1
Versions
346
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remixml - npm Package Compare versions

Comparing version 6.0.19 to 6.1.0

2

package.json
{
"name": "remixml",
"version": "6.0.19",
"version": "6.1.0",
"description": "XML/HTML-like macro language/template compiler engine",

@@ -5,0 +5,0 @@ "main": "remixml.min.js",

@@ -16,3 +16,3 @@ /** @license

(function()
(() =>
{ "use strict";

@@ -40,3 +40,3 @@

const /** string */ varinsert = "I=K($,H,x)}catch(x){I=0}";
const /** string */ cfnprefix = "H._c=function(H,$){";
const /** string */ cfnprefix = "H._c=(H,$)=>{";
const /** string */ letHprefix = "{let H=L(),";

@@ -98,3 +98,3 @@ const /** string */ missingg = "Missing <";

M = function /** void */(/** !Object */ dst, /** !Object */ src)
M = /** void */(/** !Object */ dst, /** !Object */ src) =>
{ try

@@ -105,5 +105,4 @@ { Obj.assign(dst, src);

D = function /** void */(/** string */ x,/** *= */ t)
{ log("Remixml expression: " + (t ? JSON.stringify(t) : "") + "\n", x);
};
D = /** void */(/** string */ x,/** *= */ t) =>
log("Remixml expression: " + (t ? JSON.stringify(t) : "") + "\n", x);

@@ -141,12 +140,9 @@ function /** !Object */ marko(/** !Object */ accu,/** string */ val)

// Convert to text and back to abstract
E = function /** !Array|!Promise */(
/** string */ src,/** !Object */ $,/** number= */ flags)
{ return compile(src, flags)($);
};
E = /** !Array|!Promise */(
/** string */ src,/** !Object */ $,/** number= */ flags) =>
compile(src, flags)($);
// Generic replace function
P = function /** function(string|!Array):string */(/** string */ xp,
/** string */ flags,/** string|function(...):string */ to)
{ return function (x)
{ return arraytostring(x).replace(RegExp(xp, flags), to); };
};
P = /** function(string|!Array):string */(/** string */ xp,
/** string */ flags,/** string|function(...):string */ to) =>
(x) => arraytostring(x).replace(RegExp(xp, flags), to);
// Replace runs of whitespace with a single space

@@ -157,3 +153,3 @@ function /** string */ subws(/** string */ s)

// Trim a single space from both ends
U = function /** !Array */(/** !Array */ elm)
U = /** !Array */(/** !Array */ elm) =>
{ var /** string */ s;

@@ -169,12 +165,12 @@ if (isstring(s = elm[0]) && s[0] === " " && !(elm[0] = s.substr(1)))

// Get substring slice
F = function /** !Array|string */(/** !Array|string */ x,
/** number|string */ offset,/** number|string= */ limit)
{ offset = +(offset || 0); limit = +limit;
return limit < 0 ? x.slice(offset, limit)
F = /** !Array|string */(/** !Array|string */ x,
/** number|string */ offset,/** number|string= */ limit) =>
( offset = +(offset || 0), limit = +limit,
limit < 0 ? x.slice(offset, limit)
: limit > 0 ? x.slice(offset, offset + limit)
: limit == 0 ? x.slice(offset) : "";
};
: limit == 0 ? x.slice(offset) : ""
);
// Run filter fn() tree hierarchy
R = function /** !Array */
(/** !Array */ parent,/** function((!Array|string)):(!Array|string)= */ fn)
R = /** !Array */(/** !Array */ parent,
/** function((!Array|string)):(!Array|string)= */ fn) =>
{ var /** !Array|string */ val;

@@ -202,3 +198,3 @@ var /** number */ i = parent.length;

// Populate attributes on node
S = function /** !Array */(/** !Object */ attr,/** string= */ tag)
S = /** !Array */(/** !Object */ attr,/** string= */ tag) =>
{ var /** !Array */ r = L(tag);

@@ -212,4 +208,4 @@ Obj.assign(r, attr);

// New node
L = function /** !Array */(
/** function(!Array,!Array,!Object):void|string= */ nodename)
L = /** !Array */(
/** function(!Array,!Array,!Object):void|string= */ nodename) =>
{ var /** !Array */ r = [];

@@ -220,3 +216,3 @@ /** @type {Object} */(r)[""] = nodename || 1;

// Init new context
N = function /** !Array */(/** !Object */ $)
N = /** !Array */(/** !Object */ $) =>
{ var /** !Object */ _ = $["_"];

@@ -237,6 +233,6 @@ if (!_)

// Create new subcontext
C = function /** !Object */(/** !Array */ _,
/** !Object */ $,/** !Object= */ args,/** string= */ scope)
C = /** !Object */(/** !Array */ _,
/** !Object */ $,/** !Object= */ args,/** string= */ scope) =>
{ if (/** @type {Object} */(_)[""] !== 1)
{ defget(_, "_contents", function()
{ defget(_, "_contents", () =>
{ let /** function(!Array,!Object):void|undefined */ cfn

@@ -251,3 +247,3 @@ = /** @type {Object} */(_)["_c"];

if (args)
{ defget(_, "_restargs", function()
{ defget(_, "_restargs", function() // Cannot use () => because of "this"
{ var /** string */ vname;

@@ -275,3 +271,3 @@ var /** !Object */ rest = {};

// Process attrib value
V = function /** void */(/** !Array */ H,/** string */ n,/** !Object */ _)
V = /** void */(/** !Array */ H,/** string */ n,/** !Object */ _) =>
{ if (_[n] === undefined)

@@ -284,3 +280,3 @@ _[n] = H.length === 1 && !H[0][""] ? H[0] : !H.length ? "" : H;

// $: Variable context
X = function /** Promise */(/** !Array */ J,/** !Array */ H,/** !Object */ $)
X = /** Promise */(/** !Array */ J,/** !Array */ H,/** !Object */ $) =>
{ var /** function(!Array,!Array,!Object):Promise */ fn

@@ -300,10 +296,8 @@ = $["_"]["_tag"][/** @type {Object} */(H)[""]];

};
// Define new remixml macro
Q = function /** void */(/** string */ n,/** !Object */ $,
/** function(string,!Array,!Array):void */ fn)
{ $["_"]["_tag"][n] = fn;
};
// Define new remixml macro
Q = /** void */(/** string */ n,/** !Object */ $,
/** function(string,!Array,!Array):void */ fn) => $["_"]["_tag"][n] = fn;
// Convert object list into iterator
G = function /** !Object */(/** !Object */ $,/** string|!Array */ vname,
/** function(...):!Array= */ ord)
G = /** !Object */(/** !Object */ $,/** string|!Array */ vname,
/** function(...):!Array= */ ord) =>
{ var /** !Array */ r;

@@ -320,3 +314,3 @@ var /** !Array|!Object */ k

{ try
{ r = r.sort(function(a, b)
{ r = r.sort((a, b) =>
{ var x, y, i, n, m;

@@ -341,4 +335,4 @@ var /** number */ ret;

// Run CSS selector over abstract notation
B = function /** void */(/** !Object */ $,
/** !Array */ res,/** !Array */ H,/** string */ sel)
B = /** void */(/** !Object */ $,
/** !Array */ res,/** !Array */ H,/** string */ sel) =>
{ var /** number */ i = 0;

@@ -362,3 +356,3 @@ while (i < H.length)

// Canonicalise variable path
T = function /** string */(/** string */ vpath)
T = /** string */(/** string */ vpath) =>
{ var /** !Array */ components = vpath.split(dotbrackrx);

@@ -372,4 +366,4 @@ var /** string */ word;

// Evaluate variable entity
Z = function /** * */(/** !Object */ $,/** string|!Array */ vname,
/** string= */ quot,/** string= */ fmt)
Z = /** * */(/** !Object */ $,/** string|!Array */ vname,
/** string= */ quot,/** string= */ fmt) =>
{ var /** * */ x = isa(vname) ? vname[0] : VE($, vname);

@@ -425,3 +419,3 @@ if (x == null)

// cloneabstract
O = function /** !Array */ (/** !Array */ k,/** !Array= */ r)
O = /** !Array */ (/** !Array */ k,/** !Array= */ r) =>
{ var /** * */ i;

@@ -444,4 +438,4 @@ if (r)

// varinsert
K = function /** number */
(/** !Object */ $,/** !Array */ H,/** !Array|string|number */ x)
K = /** number */
(/** !Object */ $,/** !Array */ H,/** !Array|string|number */ x) =>
{ if (x[""])

@@ -467,3 +461,3 @@ { if (x[""] === 1)

{ if (a5[1])
{ obj += sep + "(function(){" + varent(a5)
{ obj += sep + "(()=>{" + varent(a5)
+ 'return x}catch(x){}return ""})()';

@@ -499,3 +493,3 @@ } else

function /** string */ protectjs(/** string */ expr)
{ return "(function(){try{return(" + expr +
{ return "(()=>{try{return(" + expr +
')}catch(x){D(x)}return ""})()';

@@ -553,8 +547,8 @@ }

var /** string */ obj = "(" + asyncf
+ 'function($){"use strict";var I,W,_,H=N($);';
+ '($)=>{"use strict";var I,W,_,H=N($);';
var /** number */ noparse = 0;
var /** number */ comment = 0;
const /** string */ vfnprefix
= "w,v=" + asyncf + "function(){" + awaitf + "w();";
const /** string */ wfunction = ")};w=(" + asyncf + "function(W){";
= "w,v=" + asyncf + "()=>{" + awaitf + "w();";
const /** string */ wfunction = ")};w=(" + asyncf + "(W)=>{";
const /** string */ wfunclose = "});" + awaitf + "v()}";

@@ -748,3 +742,3 @@ const /** string */ executecode = awaitf + "X(J,H,$)";

obj += "v=0;Q(" + ts + ",$," + asyncf
+ "function(H,a,$,W){let o=$;$=C(a,$,{";
+ "(H,a,$,W)=>{let o=$;$=C(a,$,{";
{ let /** string|undefined */ args = getparm("args");

@@ -813,3 +807,3 @@ if (args && (args = args.replace(nonwordrx, "")))

((ts = getparm("orderby")) ?
",(m=$._,function(_){let _index=_[0];$._=_=_[1];return["
",(m=$._,(_)=>{let _index=_[0];$._=_=_[1];return["
+ evalexpr(ts) + "]}));$._=m"

@@ -1082,3 +1076,3 @@ : ")")

if (ASSERT)
constructor = function() { return ""; };
constructor = () => "";
}

@@ -1094,22 +1088,18 @@ var /** number|string */ s;

// For use in Javascript Remixml
sizeof = function /** number */(/** * */ s)
{ return Number(s) === s ? 1
sizeof = /** number */(/** * */ s) =>
Number(s) === s ? 1
: s ? s.length || s[""] !== 1
|| Obj.keys(/** @type {!Object} */(s)).length : 0;
};
// For use in Javascript Remixml
desc = function /** !Array|number */(/** number */ i)
{ return- -i===i?-i:[i,1];
};
desc = /** !Array|number */(/** number */ i) => - -i===i?-i:[i,1];
// For use in Javascript Remixml
abstract2dom
= function /** !Node */(/** !Array */ abstract,/** !Node= */ node)
{ return g["abstract2dom"](abstract, node);
}
= /** !Node */(/** !Array */ abstract,/** !Node= */ node) =>
g["abstract2dom"](abstract, node);
// For use in Javascript Remixml
abstract2txt = Y = function /** string */(/** !Array|string */ vdom,
/** number= */ html)
abstract2txt = Y = /** string */(/** !Array|string */ vdom,
/** number= */ html) =>
{ for (;;)

@@ -1189,5 +1179,5 @@ { switch (vdom[""])

"compile":compile,
"parse2txt": function
"parse2txt":
/** string */(/** string|(function(!Object):!Array) */ tpl,
/** !Object */ $,/** number= */ flags)
/** !Object */ $,/** number= */ flags) =>
{ if (isstring(tpl))

@@ -1198,18 +1188,13 @@ tpl = js2obj(remixml2js(/** @type {string} */(tpl), flags));

"abstract2txt": Y,
"add_filter": function /** void */(/** string */ name,
/** function(string):string */ filterfn)
{ filters[name] = filterfn;
},
"set_proc_fmt":
function /** void */(/** function(string,*,!Object):* */ fmtfn)
{ procfmt = fmtfn;
},
"set_tag": function /** void */(/** function(!Object):!Array */ cb,
"add_filter": /** void */(/** string */ name,
/** function(string):string */ filterfn) =>
filters[name] = filterfn,
"set_proc_fmt": /** void */(/** function(string,*,!Object):* */ fmtfn) =>
procfmt = fmtfn,
"set_tag": /** void */(/** function(!Object):!Array */ cb,
/** !Object */ $,/** string */ name,/** string= */ scope,
/** string= */ args)
/** string= */ args) =>
{ N($); settag(cb, $, name, scope, args);
},
"set_log_callback": function /** void */(/** function(...) */ cb)
{ log = cb;
}
"set_log_callback": /** void */(/** function(...) */ cb) => log = cb
};

@@ -1216,0 +1201,0 @@

@@ -17,3 +17,3 @@ /** @license

// Cut BEGIN delete
(function()
(() =>
{ "use strict";

@@ -48,3 +48,3 @@ // Cut END delete

const /** string */ varinsert = "I=K($,H,x)}catch(x){I=0}";
const /** string */ cfnprefix = "H._c=function(H,$){";
const /** string */ cfnprefix = "H._c=(H,$)=>{";
const /** string */ letHprefix = "{let H=L(),";

@@ -106,3 +106,3 @@ const /** string */ missingg = "Missing <";

M = function /** void */(/** !Object */ dst, /** !Object */ src)
M = /** void */(/** !Object */ dst, /** !Object */ src) =>
{ try

@@ -113,5 +113,4 @@ { Obj.assign(dst, src);

D = function /** void */(/** string */ x,/** *= */ t)
{ log("Remixml expression: " + (t ? JSON.stringify(t) : "") + "\n", x);
};
D = /** void */(/** string */ x,/** *= */ t) =>
log("Remixml expression: " + (t ? JSON.stringify(t) : "") + "\n", x);

@@ -149,12 +148,9 @@ function /** !Object */ marko(/** !Object */ accu,/** string */ val)

// Convert to text and back to abstract
E = function /** !Array|!Promise */(
/** string */ src,/** !Object */ $,/** number= */ flags)
{ return compile(src, flags)($);
};
E = /** !Array|!Promise */(
/** string */ src,/** !Object */ $,/** number= */ flags) =>
compile(src, flags)($);
// Generic replace function
P = function /** function(string|!Array):string */(/** string */ xp,
/** string */ flags,/** string|function(...):string */ to)
{ return function (x)
{ return arraytostring(x).replace(RegExp(xp, flags), to); };
};
P = /** function(string|!Array):string */(/** string */ xp,
/** string */ flags,/** string|function(...):string */ to) =>
(x) => arraytostring(x).replace(RegExp(xp, flags), to);
// Replace runs of whitespace with a single space

@@ -165,3 +161,3 @@ function /** string */ subws(/** string */ s)

// Trim a single space from both ends
U = function /** !Array */(/** !Array */ elm)
U = /** !Array */(/** !Array */ elm) =>
{ var /** string */ s;

@@ -177,12 +173,12 @@ if (isstring(s = elm[0]) && s[0] === " " && !(elm[0] = s.substr(1)))

// Get substring slice
F = function /** !Array|string */(/** !Array|string */ x,
/** number|string */ offset,/** number|string= */ limit)
{ offset = +(offset || 0); limit = +limit;
return limit < 0 ? x.slice(offset, limit)
F = /** !Array|string */(/** !Array|string */ x,
/** number|string */ offset,/** number|string= */ limit) =>
( offset = +(offset || 0), limit = +limit,
limit < 0 ? x.slice(offset, limit)
: limit > 0 ? x.slice(offset, offset + limit)
: limit == 0 ? x.slice(offset) : "";
};
: limit == 0 ? x.slice(offset) : ""
);
// Run filter fn() tree hierarchy
R = function /** !Array */
(/** !Array */ parent,/** function((!Array|string)):(!Array|string)= */ fn)
R = /** !Array */(/** !Array */ parent,
/** function((!Array|string)):(!Array|string)= */ fn) =>
{ var /** !Array|string */ val;

@@ -210,3 +206,3 @@ var /** number */ i = parent.length;

// Populate attributes on node
S = function /** !Array */(/** !Object */ attr,/** string= */ tag)
S = /** !Array */(/** !Object */ attr,/** string= */ tag) =>
{ var /** !Array */ r = L(tag);

@@ -220,4 +216,4 @@ Obj.assign(r, attr);

// New node
L = function /** !Array */(
/** function(!Array,!Array,!Object):void|string= */ nodename)
L = /** !Array */(
/** function(!Array,!Array,!Object):void|string= */ nodename) =>
{ var /** !Array */ r = [];

@@ -228,3 +224,3 @@ /** @type {Object} */(r)[""] = nodename || 1;

// Init new context
N = function /** !Array */(/** !Object */ $)
N = /** !Array */(/** !Object */ $) =>
{ var /** !Object */ _ = $["_"];

@@ -245,6 +241,6 @@ if (!_)

// Create new subcontext
C = function /** !Object */(/** !Array */ _,
/** !Object */ $,/** !Object= */ args,/** string= */ scope)
C = /** !Object */(/** !Array */ _,
/** !Object */ $,/** !Object= */ args,/** string= */ scope) =>
{ if (/** @type {Object} */(_)[""] !== 1)
{ defget(_, "_contents", function()
{ defget(_, "_contents", () =>
{ let /** function(!Array,!Object):void|undefined */ cfn

@@ -259,3 +255,3 @@ = /** @type {Object} */(_)["_c"];

if (args)
{ defget(_, "_restargs", function()
{ defget(_, "_restargs", function() // Cannot use () => because of "this"
{ var /** string */ vname;

@@ -283,3 +279,3 @@ var /** !Object */ rest = {};

// Process attrib value
V = function /** void */(/** !Array */ H,/** string */ n,/** !Object */ _)
V = /** void */(/** !Array */ H,/** string */ n,/** !Object */ _) =>
{ if (_[n] === undefined)

@@ -292,3 +288,3 @@ _[n] = H.length === 1 && !H[0][""] ? H[0] : !H.length ? "" : H;

// $: Variable context
X = function /** Promise */(/** !Array */ J,/** !Array */ H,/** !Object */ $)
X = /** Promise */(/** !Array */ J,/** !Array */ H,/** !Object */ $) =>
{ var /** function(!Array,!Array,!Object):Promise */ fn

@@ -308,10 +304,8 @@ = $["_"]["_tag"][/** @type {Object} */(H)[""]];

};
// Define new remixml macro
Q = function /** void */(/** string */ n,/** !Object */ $,
/** function(string,!Array,!Array):void */ fn)
{ $["_"]["_tag"][n] = fn;
};
// Define new remixml macro
Q = /** void */(/** string */ n,/** !Object */ $,
/** function(string,!Array,!Array):void */ fn) => $["_"]["_tag"][n] = fn;
// Convert object list into iterator
G = function /** !Object */(/** !Object */ $,/** string|!Array */ vname,
/** function(...):!Array= */ ord)
G = /** !Object */(/** !Object */ $,/** string|!Array */ vname,
/** function(...):!Array= */ ord) =>
{ var /** !Array */ r;

@@ -328,3 +322,3 @@ var /** !Array|!Object */ k

{ try
{ r = r.sort(function(a, b)
{ r = r.sort((a, b) =>
{ var x, y, i, n, m;

@@ -349,4 +343,4 @@ var /** number */ ret;

// Run CSS selector over abstract notation
B = function /** void */(/** !Object */ $,
/** !Array */ res,/** !Array */ H,/** string */ sel)
B = /** void */(/** !Object */ $,
/** !Array */ res,/** !Array */ H,/** string */ sel) =>
{ var /** number */ i = 0;

@@ -370,3 +364,3 @@ while (i < H.length)

// Canonicalise variable path
T = function /** string */(/** string */ vpath)
T = /** string */(/** string */ vpath) =>
{ var /** !Array */ components = vpath.split(dotbrackrx);

@@ -380,4 +374,4 @@ var /** string */ word;

// Evaluate variable entity
Z = function /** * */(/** !Object */ $,/** string|!Array */ vname,
/** string= */ quot,/** string= */ fmt)
Z = /** * */(/** !Object */ $,/** string|!Array */ vname,
/** string= */ quot,/** string= */ fmt) =>
{ var /** * */ x = isa(vname) ? vname[0] : VE($, vname);

@@ -433,3 +427,3 @@ if (x == null)

// cloneabstract
O = function /** !Array */ (/** !Array */ k,/** !Array= */ r)
O = /** !Array */ (/** !Array */ k,/** !Array= */ r) =>
{ var /** * */ i;

@@ -452,4 +446,4 @@ if (r)

// varinsert
K = function /** number */
(/** !Object */ $,/** !Array */ H,/** !Array|string|number */ x)
K = /** number */
(/** !Object */ $,/** !Array */ H,/** !Array|string|number */ x) =>
{ if (x[""])

@@ -475,3 +469,3 @@ { if (x[""] === 1)

{ if (a5[1])
{ obj += sep + "(function(){" + varent(a5)
{ obj += sep + "(()=>{" + varent(a5)
+ 'return x}catch(x){}return ""})()';

@@ -507,3 +501,3 @@ } else

function /** string */ protectjs(/** string */ expr)
{ return "(function(){try{return(" + expr +
{ return "(()=>{try{return(" + expr +
')}catch(x){D(x)}return ""})()';

@@ -561,8 +555,8 @@ }

var /** string */ obj = "(" + asyncf
+ 'function($){"use strict";var I,W,_,H=N($);';
+ '($)=>{"use strict";var I,W,_,H=N($);';
var /** number */ noparse = 0;
var /** number */ comment = 0;
const /** string */ vfnprefix
= "w,v=" + asyncf + "function(){" + awaitf + "w();";
const /** string */ wfunction = ")};w=(" + asyncf + "function(W){";
= "w,v=" + asyncf + "()=>{" + awaitf + "w();";
const /** string */ wfunction = ")};w=(" + asyncf + "(W)=>{";
const /** string */ wfunclose = "});" + awaitf + "v()}";

@@ -756,3 +750,3 @@ const /** string */ executecode = awaitf + "X(J,H,$)";

obj += "v=0;Q(" + ts + ",$," + asyncf
+ "function(H,a,$,W){let o=$;$=C(a,$,{";
+ "(H,a,$,W)=>{let o=$;$=C(a,$,{";
{ let /** string|undefined */ args = getparm("args");

@@ -821,3 +815,3 @@ if (args && (args = args.replace(nonwordrx, "")))

((ts = getparm("orderby")) ?
",(m=$._,function(_){let _index=_[0];$._=_=_[1];return["
",(m=$._,(_)=>{let _index=_[0];$._=_=_[1];return["
+ evalexpr(ts) + "]}));$._=m"

@@ -1090,3 +1084,3 @@ : ")")

if (ASSERT)
constructor = function() { return ""; };
constructor = () => "";
}

@@ -1102,22 +1096,18 @@ var /** number|string */ s;

// For use in Javascript Remixml
sizeof = function /** number */(/** * */ s)
{ return Number(s) === s ? 1
sizeof = /** number */(/** * */ s) =>
Number(s) === s ? 1
: s ? s.length || s[""] !== 1
|| Obj.keys(/** @type {!Object} */(s)).length : 0;
};
// For use in Javascript Remixml
desc = function /** !Array|number */(/** number */ i)
{ return- -i===i?-i:[i,1];
};
desc = /** !Array|number */(/** number */ i) => - -i===i?-i:[i,1];
// For use in Javascript Remixml
abstract2dom
= function /** !Node */(/** !Array */ abstract,/** !Node= */ node)
{ return g["abstract2dom"](abstract, node);
}
= /** !Node */(/** !Array */ abstract,/** !Node= */ node) =>
g["abstract2dom"](abstract, node);
// For use in Javascript Remixml
abstract2txt = Y = function /** string */(/** !Array|string */ vdom,
/** number= */ html)
abstract2txt = Y = /** string */(/** !Array|string */ vdom,
/** number= */ html) =>
{ for (;;)

@@ -1197,5 +1187,5 @@ { switch (vdom[""])

"compile":compile,
"parse2txt": function
"parse2txt":
/** string */(/** string|(function(!Object):!Array) */ tpl,
/** !Object */ $,/** number= */ flags)
/** !Object */ $,/** number= */ flags) =>
{ if (isstring(tpl))

@@ -1206,18 +1196,13 @@ tpl = js2obj(remixml2js(/** @type {string} */(tpl), flags));

"abstract2txt": Y,
"add_filter": function /** void */(/** string */ name,
/** function(string):string */ filterfn)
{ filters[name] = filterfn;
},
"set_proc_fmt":
function /** void */(/** function(string,*,!Object):* */ fmtfn)
{ procfmt = fmtfn;
},
"set_tag": function /** void */(/** function(!Object):!Array */ cb,
"add_filter": /** void */(/** string */ name,
/** function(string):string */ filterfn) =>
filters[name] = filterfn,
"set_proc_fmt": /** void */(/** function(string,*,!Object):* */ fmtfn) =>
procfmt = fmtfn,
"set_tag": /** void */(/** function(!Object):!Array */ cb,
/** !Object */ $,/** string */ name,/** string= */ scope,
/** string= */ args)
/** string= */ args) =>
{ N($); settag(cb, $, name, scope, args);
},
"set_log_callback": function /** void */(/** function(...) */ cb)
{ log = cb;
}
"set_log_callback": /** void */(/** function(...) */ cb) => log = cb
};

@@ -1224,0 +1209,0 @@

@@ -14,28 +14,27 @@ (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,u,m){delete u[""];m=C(u,m,l?l.split(ta).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 ua(a,b){return ja(ka(a,b))}function va(a){return a.replace(Oa," ")}function wa(a,b,c){w.defineProperty(a,b,{get:c,configurable:!0})}function xa(a){return a.match(Pa)?
"."+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"(_=$._,"+
'use strict';(()=>{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,u,m){delete u[""];m=C(u,m,l?l.split(ta).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 ua(a,b){return ja(ka(a,b))}function va(a){return a.replace(Oa," ")}function wa(a,b,c){w.defineProperty(a,b,{get:c,configurable:!0})}function xa(a){return a.match(Pa)?
"."+a:'["'+a+'"]'}function ya(a){var b="",c="",e;for(za.lastIndex=0;e=aa(za,a);)b=e[1]?b+(c+"(()=>{"+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"(()=>{try{return("+a+')}catch(x){D(x)}return ""})()'}function Ca(a){return"(_=$._,"+
(a?la(a):'""')+")"}function ca(a){a&&(0>a.indexOf("(")?((a=JSON.parse(a)).includes("_")&&(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)+'+"',a.includes("{")&&(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(Qa)||"").length+1;H=H.match(Ra)[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()}",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,""],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(Ta);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(Ua,""))&&(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(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(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+(Wa.test(y)?y:'"'+y+'"')+":"+f,k=",";d+='},"'+r+'")'}if(!J&&(k="script"===r?Xa:"style"===r?Ya: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(Za);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+=Sa;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($a)||(d+="H.push("+JSON.stringify(f)+");"))}}return d+="return H})"}function ja(a){try{var b=eval(a)}catch(c){D(c,a),ab(a),b=function(){return""}}return b}function aa(a,b){return a.exec(b)}const bb=("object"==typeof document?document:null)&&window,w=Object,Ia={" ":"+","\t":"%09","\n":"%0A","\r":"%0D",'"':"%22","#":"%23","%":"%25",
"&":"%26","'":"%27","+":"%2B","<":"%3C","?":"%3F"},cb=/[ \t\n\r#%&'"+<?]/g,Ka={"&":"&amp;","<":"&lt;"},db=/[&<]/g,ta=/\s*,\s*/g,Ta=/\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,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,eb=/</g,Ua=/[^-:\w,]+/g,Va=/([\\^$*+?.|()[{])/g,fb=/"/g,gb=/[.[\]]+/,Fa={};var sa,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 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(gb),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(eb,"\\\\u003c");break;case "uric":b=b.replace(cb,Ha);break;default:b[""]||(b=Array.isArray(b)?b.join(", "):b,b=(e=Fa[c])?e(b):b.replace(db,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&&b.includes("&");)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=[];Array.isArray(a)||(a.length=0);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(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 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){Fa[a]=b},set_proc_fmt:function(a){sa=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",[],ia):"object"==
typeof exports?w.assign(exports,ia):bb.Remixml=ia}).call(this);
(p[2]&6)&&(p[2]|=4,d+="H._c=(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+'($)=>{"use strict";var I,W,_,H=N($);',I=g=0;const na="w,v="+u+"()=>{"+m+"w();",Da=")};w=("+u+"(W)=>{",Ea="});"+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,""],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(Ta);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+
"(H,a,$,W)=>{let o=$;$=C(a,$,{";(f=h("args"))&&(f=f.replace(Ua,""))&&(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(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=$._,(_)=>{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+(Wa.test(y)?y:'"'+y+'"')+":"+f,k=",";d+='},"'+r+'")'}if(!J&&(k="script"===r?Xa:"style"===r?Ya: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(Za);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+=Sa;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($a)||(d+="H.push("+JSON.stringify(f)+");"))}}return d+="return H})"}function ja(a){try{var b=eval(a)}catch(c){D(c,a),ab(a),b=()=>""}return b}function aa(a,b){return a.exec(b)}const bb=("object"==typeof document?document:null)&&window,w=Object,Ia={" ":"+","\t":"%09","\n":"%0A","\r":"%0D",'"':"%22","#":"%23","%":"%25","&":"%26","'":"%27","+":"%2B","<":"%3C","?":"%3F"},cb=/[ \t\n\r#%&'"+<?]/g,
Ka={"&":"&amp;","<":"&lt;"},db=/[&<]/g,ta=/\s*,\s*/g,Ta=/\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,
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,eb=/</g,Ua=/[^-:\w,]+/g,Va=/([\\^$*+?.|()[{])/g,fb=/"/g,gb=/[.[\]]+/,Fa={};var sa,ab=console.debug,Ga=console.error;M=(a,b)=>{try{w.assign(a,b)}catch(c){}};D=(a,b)=>Ga("Remixml expression: "+(b?JSON.stringify(b):"")+"\n",a);E=(a,b,c)=>ua(a,c)(b);P=(a,b,c)=>e=>(Array.isArray(e)?e.join(", "):e).replace(RegExp(a,b),c);U=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=(a,b,c)=>(b=+(b||0),c=+c,0>c?a.slice(b,c):0<c?a.slice(b,b+c):0==c?a.slice(b):"");R=(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=(a,b)=>{b=L(b);w.assign(b,a);delete b["::"];(a=a["::"])&&w.assign(b,a);return b};L=a=>{var b=
[];b[""]=a||1;return b};N=a=>{var b=a._;b||(a._=b={});b._tag||(b._tag={});!a["var"]&&a.__&&(a["var"]=a.__);return L()};C=(a,b,c,e)=>{if(1!==a[""])if(wa(a,"_contents",()=>{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=(a,b,c)=>{void 0===c[b]&&(c[b]=1!==
a.length||a[0][""]?a.length?a:"":a[0])};X=(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=(a,b,c)=>b._._tag[a]=c;G=(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((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=(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=a=>{var b=a.split(gb),c;a="$";for(c of b)a+=xa(c);return a};Z=(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(eb,"\\\\u003c");break;
case "uric":b=b.replace(cb,Ha);break;default:b[""]||(b=Array.isArray(b)?b.join(", "):b,b=(e=Fa[c])?e(b):b.replace(db,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&&b.includes("&");)c=b,b=VE(a,["("+ya(b)+")"]);return b};O=(a,b)=>{var c;if(b)for(c in b)delete b[c];else b=[];Array.isArray(a)||(a.length=0);b=w.assign(b,a);for(c=b.length;c--;)b[c][""]&&(b[c]=O(b[c]));return b};K=(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=a=>Number(a)===a?1:a?a.length||1!==a[""]||w.keys(a).length:0;desc=a=>- -a===a?-a:[a,1];abstract2dom=(a,b)=>ia.abstract2dom(a,b);abstract2txt=Y=(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 ia={remixml2js:ka,js2obj:ja,compile:ua,parse2txt:(a,b,c)=>{ea(a)&&(a=ja(ka(a,c)));return Y(a(b))},abstract2txt:Y,add_filter:(a,b)=>Fa[a]=b,set_proc_fmt:a=>sa=a,set_tag:(a,b,c,e,l)=>{N(b);Ma(a,b,c,e,l)},set_log_callback:a=>Ga=a};"function"==
typeof define&&define.amd?define("remixml",[],ia):"object"==typeof exports?w.assign(exports,ia):bb.Remixml=ia}).call(this);
}).call(this);

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc