regor 1.1.7 → 1.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/regor.d.ts +0 -1
- package/dist/regor.es2015.cjs.js +36 -15
- package/dist/regor.es2015.cjs.prod.js +3 -3
- package/dist/regor.es2015.esm.js +36 -15
- package/dist/regor.es2015.esm.prod.js +3 -3
- package/dist/regor.es2015.iife.js +36 -15
- package/dist/regor.es2015.iife.prod.js +3 -3
- package/dist/regor.es2019.cjs.js +36 -15
- package/dist/regor.es2019.cjs.prod.js +3 -3
- package/dist/regor.es2019.esm.js +36 -15
- package/dist/regor.es2019.esm.prod.js +3 -3
- package/dist/regor.es2019.iife.js +36 -15
- package/dist/regor.es2019.iife.prod.js +3 -3
- package/dist/regor.es2022.cjs.js +31 -13
- package/dist/regor.es2022.cjs.prod.js +3 -3
- package/dist/regor.es2022.esm.js +31 -13
- package/dist/regor.es2022.esm.prod.js +3 -3
- package/dist/regor.es2022.iife.js +31 -13
- package/dist/regor.es2022.iife.prod.js +3 -3
- package/package.json +1 -1
package/dist/regor.d.ts
CHANGED
|
@@ -30,7 +30,6 @@ export declare class RegorConfig {
|
|
|
30
30
|
forGrowThreshold: number;
|
|
31
31
|
globalContext: Record<string, any>;
|
|
32
32
|
useInterpolation: boolean;
|
|
33
|
-
useBracketInterpolation: boolean;
|
|
34
33
|
constructor(globalContext?: Record<any, any>);
|
|
35
34
|
addComponent<TProps = Record<any, any>>(...components: Array<Component<TProps>>): void;
|
|
36
35
|
setDirectives(prefix: string): void;
|
package/dist/regor.es2015.cjs.js
CHANGED
|
@@ -4619,7 +4619,6 @@ var _RegorConfig = class _RegorConfig {
|
|
|
4619
4619
|
__publicField(this, "forGrowThreshold", 10);
|
|
4620
4620
|
__publicField(this, "globalContext");
|
|
4621
4621
|
__publicField(this, "useInterpolation", true);
|
|
4622
|
-
__publicField(this, "useBracketInterpolation", false);
|
|
4623
4622
|
this.setDirectives("r-");
|
|
4624
4623
|
if (globalContext) {
|
|
4625
4624
|
this.globalContext = globalContext;
|
|
@@ -4722,14 +4721,16 @@ var interpolate = (element, config) => {
|
|
|
4722
4721
|
if (!element) return;
|
|
4723
4722
|
const resolvedConfig = config != null ? config : RegorConfig.getDefault();
|
|
4724
4723
|
const builtInNames = resolvedConfig.__builtInNames;
|
|
4725
|
-
const
|
|
4726
|
-
const
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4724
|
+
const interpolationRegex = /(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g;
|
|
4725
|
+
const delimiters = [
|
|
4726
|
+
{ start: "{{", end: "}}" },
|
|
4727
|
+
{ start: "[[", end: "]]" }
|
|
4728
|
+
];
|
|
4729
|
+
for (const textNode of getTextNodes(element, builtInNames.pre, delimiters)) {
|
|
4730
|
+
interpolateTextNode(textNode, builtInNames.text, interpolationRegex, delimiters);
|
|
4730
4731
|
}
|
|
4731
4732
|
};
|
|
4732
|
-
var interpolateTextNode = (textNode, textDirective2, interpolationRegex,
|
|
4733
|
+
var interpolateTextNode = (textNode, textDirective2, interpolationRegex, delimiters) => {
|
|
4733
4734
|
var _a;
|
|
4734
4735
|
const text = textNode.textContent;
|
|
4735
4736
|
if (!text) return;
|
|
@@ -4738,18 +4739,32 @@ var interpolateTextNode = (textNode, textDirective2, interpolationRegex, start,
|
|
|
4738
4739
|
if (parts.length <= 1) return;
|
|
4739
4740
|
if (((_a = textNode.parentElement) == null ? void 0 : _a.childNodes.length) === 1 && parts.length === 3) {
|
|
4740
4741
|
const part = parts[1];
|
|
4741
|
-
|
|
4742
|
+
const delimiter = getInterpolationDelimiter(part, delimiters);
|
|
4743
|
+
if (delimiter && isNullOrWhitespace(parts[0]) && isNullOrWhitespace(parts[2])) {
|
|
4742
4744
|
const parent = textNode.parentElement;
|
|
4743
|
-
parent.setAttribute(
|
|
4745
|
+
parent.setAttribute(
|
|
4746
|
+
textDirective2,
|
|
4747
|
+
part.substring(
|
|
4748
|
+
delimiter.start.length,
|
|
4749
|
+
part.length - delimiter.end.length
|
|
4750
|
+
)
|
|
4751
|
+
);
|
|
4744
4752
|
parent.innerText = "";
|
|
4745
4753
|
return;
|
|
4746
4754
|
}
|
|
4747
4755
|
}
|
|
4748
4756
|
const fragment = document.createDocumentFragment();
|
|
4749
4757
|
for (const part of parts) {
|
|
4750
|
-
|
|
4758
|
+
const delimiter = getInterpolationDelimiter(part, delimiters);
|
|
4759
|
+
if (delimiter) {
|
|
4751
4760
|
const spanTag = document.createElement("span");
|
|
4752
|
-
spanTag.setAttribute(
|
|
4761
|
+
spanTag.setAttribute(
|
|
4762
|
+
textDirective2,
|
|
4763
|
+
part.substring(
|
|
4764
|
+
delimiter.start.length,
|
|
4765
|
+
part.length - delimiter.end.length
|
|
4766
|
+
)
|
|
4767
|
+
);
|
|
4753
4768
|
fragment.appendChild(spanTag);
|
|
4754
4769
|
} else {
|
|
4755
4770
|
fragment.appendChild(document.createTextNode(part));
|
|
@@ -4758,16 +4773,19 @@ var interpolateTextNode = (textNode, textDirective2, interpolationRegex, start,
|
|
|
4758
4773
|
;
|
|
4759
4774
|
textNode.replaceWith(fragment);
|
|
4760
4775
|
};
|
|
4761
|
-
var getTextNodes = (node, preDirective,
|
|
4776
|
+
var getTextNodes = (node, preDirective, delimiters) => {
|
|
4762
4777
|
const textNodes = [];
|
|
4763
4778
|
const traverseTextNodes = (node2) => {
|
|
4764
|
-
var _a
|
|
4779
|
+
var _a;
|
|
4765
4780
|
if (node2.nodeType === Node.TEXT_NODE) {
|
|
4766
|
-
if ((
|
|
4781
|
+
if (delimiters.some((delimiter) => {
|
|
4782
|
+
var _a2;
|
|
4783
|
+
return (_a2 = node2.textContent) == null ? void 0 : _a2.includes(delimiter.start);
|
|
4784
|
+
})) {
|
|
4767
4785
|
textNodes.push(node2);
|
|
4768
4786
|
}
|
|
4769
4787
|
} else {
|
|
4770
|
-
if ((
|
|
4788
|
+
if ((_a = node2 == null ? void 0 : node2.hasAttribute) == null ? void 0 : _a.call(node2, preDirective)) return;
|
|
4771
4789
|
for (const child of getChildNodes(node2)) {
|
|
4772
4790
|
traverseTextNodes(child);
|
|
4773
4791
|
}
|
|
@@ -4776,6 +4794,9 @@ var getTextNodes = (node, preDirective, start) => {
|
|
|
4776
4794
|
traverseTextNodes(node);
|
|
4777
4795
|
return textNodes;
|
|
4778
4796
|
};
|
|
4797
|
+
var getInterpolationDelimiter = (part, delimiters) => delimiters.find(
|
|
4798
|
+
(delimiter) => part.startsWith(delimiter.start) && part.endsWith(delimiter.end)
|
|
4799
|
+
);
|
|
4779
4800
|
|
|
4780
4801
|
// src/app/toFragment.ts
|
|
4781
4802
|
var svgTags = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";var ct=Object.defineProperty,ro=Object.defineProperties,oo=Object.getOwnPropertyDescriptor,so=Object.getOwnPropertyDescriptors,io=Object.getOwnPropertyNames,Mn=Object.getOwnPropertySymbols;var Ln=Object.prototype.hasOwnProperty,ao=Object.prototype.propertyIsEnumerable;var pt=Math.pow,Jt=(t,e,n)=>e in t?ct(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ft=(t,e)=>{for(var n in e||(e={}))Ln.call(e,n)&&Jt(t,n,e[n]);if(Mn)for(var n of Mn(e))ao.call(e,n)&&Jt(t,n,e[n]);return t},kn=(t,e)=>ro(t,so(e));var co=(t,e)=>{for(var n in e)ct(t,n,{get:e[n],enumerable:!0})},po=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of io(e))!Ln.call(t,o)&&o!==n&&ct(t,o,{get:()=>e[o],enumerable:!(r=oo(e,o))||r.enumerable});return t};var fo=t=>po(ct({},"__esModule",{value:!0}),t);var m=(t,e,n)=>Jt(t,typeof e!="symbol"?e+"":e,n);var vs={};co(vs,{ComponentHead:()=>Fe,RegorConfig:()=>Z,addUnbinder:()=>_,batch:()=>to,collectRefs:()=>Et,computeMany:()=>Gr,computeRef:()=>Jr,computed:()=>Wr,createApp:()=>zr,createComponent:()=>Kr,endBatch:()=>Nn,entangle:()=>At,flatten:()=>X,getBindData:()=>ge,html:()=>On,isDeepRef:()=>Ie,isRaw:()=>Ve,isRef:()=>h,markRaw:()=>Qr,observe:()=>w,observeMany:()=>Zr,observerCount:()=>eo,onMounted:()=>no,onUnmounted:()=>J,pause:()=>qt,persist:()=>Xr,raw:()=>Yr,ref:()=>xe,removeNode:()=>F,resume:()=>zt,silence:()=>Tt,sref:()=>G,startBatch:()=>An,toFragment:()=>De,toJsonTemplate:()=>Je,trigger:()=>K,unbind:()=>ae,unref:()=>D,useScope:()=>Ot,warningHandler:()=>tt,watchEffect:()=>Le});module.exports=fo(vs);var P=t=>typeof t=="function",j=t=>typeof t=="string",In=t=>typeof t=="undefined",te=t=>t==null||typeof t=="undefined",z=t=>typeof t!="string"||!(t!=null&&t.trim()),lo=Object.prototype.toString,Qt=t=>lo.call(t),he=t=>Qt(t)==="[object Map]",Y=t=>Qt(t)==="[object Set]",Xt=t=>Qt(t)==="[object Date]",et=t=>typeof t=="symbol",T=Array.isArray,A=t=>t!==null&&typeof t=="object";var Dn={0:"createApp can't find root element. You must define either a valid `selector` or an `element`. Example: createApp({}, {selector: '#app', html: '...'})",1:t=>`Component template cannot be found. selector: ${t} .`,2:"Use composables in scope. usage: useScope(() => new MyApp()).",3:t=>`${t} requires ref source argument`,4:"computed is readonly.",5:"persist requires a string key."},I=(t,...e)=>{let n=Dn[t];return new Error(P(n)?n.call(Dn,...e):n)};var He=Symbol(":regor");var ge=t=>{let e=t[He];if(e)return e;let n={unbinders:[],data:{}};return t[He]=n,n};var _=(t,e)=>{ge(t).unbinders.push(e)};var lt=[],Un=()=>{let t={onMounted:[],onUnmounted:[]};return lt.push(t),t},Ae=t=>{let e=lt[lt.length-1];if(!e&&!t)throw I(2);return e},Hn=t=>{let e=Ae();return t&&Zt(t),lt.pop(),e},Yt=Symbol("csp"),Zt=t=>{let e=t,n=e[Yt];if(n){let r=Ae();if(n===r)return;r.onMounted.length>0&&n.onMounted.push(...r.onMounted),r.onUnmounted.length>0&&n.onUnmounted.push(...r.onUnmounted);return}e[Yt]=Ae()},mt=t=>t[Yt];var J=(t,e)=>{var n;(n=Ae(e))==null||n.onUnmounted.push(t)};var ut=Symbol("ref"),Q=Symbol("sref"),dt=Symbol("raw");var h=t=>(t==null?void 0:t[Q])===1;var w=(t,e,n)=>{if(!h(t))throw I(3,"observe");n&&e(t());let o=t(void 0,void 0,0,e);return J(o,!0),o};var ae=t=>{let e=[t];for(;e.length>0;){let n=e.shift();mo(n);let r=n.childNodes;if(r)for(let o of r)e.push(o)}},mo=t=>{let e=t[He];if(e){for(let n of e.unbinders)n();e.unbinders.splice(0),delete t[He]}};var F=t=>{t.remove(),setTimeout(()=>ae(t),1)};var _n={8:t=>`Model binding requires a ref at ${t.outerHTML}`,7:t=>`Model binding is not supported on ${t.tagName} element at ${t.outerHTML}`,0:(t,e)=>`${t} binding expression is missing at ${e.outerHTML}`,1:(t,e,n)=>`invalid ${t} expression: ${e} at ${n.outerHTML}`,2:(t,e)=>`${t} requires object expression at ${e.outerHTML}`,3:(t,e)=>`${t} binder: key is empty on ${e.outerHTML}.`,4:(t,e,n,r)=>({msg:`Failed setting prop "${t}" on <${e.toLowerCase()}>: value ${n} is invalid.`,args:[r]}),5:(t,e)=>`${t} binding missing event type at ${e.outerHTML}`,6:(t,e)=>({msg:t,args:[e]})},M=(t,...e)=>{let n=_n[t],r=P(n)?n.call(_n,...e):n,o=tt.warning;o&&(j(r)?o(r):o(r,...r.args))},tt={warning:console.warn};var ht={},yt={},Bn=1,Pn=t=>{let e=(Bn++).toString();return ht[e]=t,yt[e]=0,e},en=t=>{yt[t]+=1},tn=t=>{--yt[t]===0&&(delete ht[t],delete yt[t])},jn=t=>ht[t],nn=()=>Bn!==1&&Object.keys(ht).length>0,nt="r-switch",uo=t=>{let e=t.filter(r=>Ne(r)).map(r=>[...r.querySelectorAll("[r-switch]")].map(o=>o.getAttribute(nt))),n=new Set;return e.forEach(r=>{r.forEach(o=>o&&n.add(o))}),[...n]},_e=(t,e)=>{if(!nn())return;let n=uo(e);n.length!==0&&(n.forEach(en),_(t,()=>{n.forEach(tn)}))};var rn=(t,e,n,r)=>{let o=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,r),o.push(i)}Te(e,o)},on=Symbol("r-if"),Vn=Symbol("r-else"),$n=t=>t[Vn]===1,gt=class{constructor(e){m(this,"p");m(this,"P");m(this,"q");m(this,"K");m(this,"z");m(this,"b");m(this,"T");this.p=e,this.P=e.o.f.if,this.q=Pe(e.o.f.if),this.K=e.o.f.else,this.z=e.o.f.elseif,this.b=e.o.f.for,this.T=e.o.f.pre}qe(e,n){let r=e.parentElement;for(;r!==null&&r!==document.documentElement;){if(r.hasAttribute(n))return!0;r=r.parentElement}return!1}N(e){let n=e.hasAttribute(this.P),r=be(e,this.q);for(let o of r)this.x(o);return n}W(e){return e[on]?!0:(e[on]=!0,be(e,this.q).forEach(n=>n[on]=!0),!1)}x(e){if(e.hasAttribute(this.T)||this.W(e)||this.qe(e,this.b))return;let n=e.getAttribute(this.P);if(!n){M(0,this.P,e);return}e.removeAttribute(this.P),this.k(e,n)}B(e,n,r){let o=Be(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${r!=null?r:""}`);s.insertBefore(i,e),_e(i,o),o.forEach(c=>{F(c)}),e.remove(),n!=="if"&&(e[Vn]=1);let a=document.createComment(`__end__ :${n}${r!=null?r:""}`);return s.insertBefore(a,i.nextSibling),{nodes:o,parent:s,commentBegin:i,commentEnd:a}}pe(e,n){if(!e)return[];let r=e.nextElementSibling;if(e.hasAttribute(this.K)){e.removeAttribute(this.K);let{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.B(e,"else");return[{mount:()=>{rn(o,this.p,s,a)},unmount:()=>{le(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let o=e.getAttribute(this.z);if(!o)return[];e.removeAttribute(this.z);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.B(e,"elseif",` => ${o} `),p=this.p.h.C(o),f=p.value,l=this.pe(r,n),u=[];_(a,()=>{p.stop();for(let R of u)R();u.length=0});let d=w(f,n);return u.push(d),[{mount:()=>{rn(s,this.p,i,c)},unmount:()=>{le(a,c)},isTrue:()=>!!f()[0],isMounted:!1}].concat(l)}}k(e,n){let r=e.nextElementSibling,{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.B(e,"if",` => ${n} `),c=this.p.h.C(n),p=c.value,f=!1,l=this.p.h,u=l.V(),y=()=>{l.v(u,()=>{if(p()[0])f||(rn(o,this.p,s,a),f=!0),d.forEach(b=>{b.unmount(),b.isMounted=!1});else{le(i,a),f=!1;let b=!1;for(let L of d)!b&&L.isTrue()?(L.isMounted||(L.mount(),L.isMounted=!0),b=!0):(L.unmount(),L.isMounted=!1)}})},d=this.pe(r,y),R=[];_(i,()=>{c.stop();for(let b of R)b();R.length=0}),y();let E=w(p,y);R.push(E)}};var Be=t=>{let e=ce(t)?t.content.childNodes:[t];return Array.from(e).filter(n=>{let r=n==null?void 0:n.tagName;return r!=="SCRIPT"&&r!=="STYLE"})},Te=(t,e)=>{for(let n of e)!$n(n)&&t.G(n)},be=(t,e)=>{var r;let n=t.querySelectorAll(e);return(r=t.matches)!=null&&r.call(t,e)?[t,...n]:n},ce=t=>t instanceof HTMLTemplateElement,Ne=t=>t.nodeType===Node.ELEMENT_NODE,rt=t=>t.nodeType===Node.ELEMENT_NODE,Fn=t=>t instanceof HTMLSlotElement,me=t=>ce(t)?t.content.childNodes:t.childNodes,le=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let r=n.nextSibling;F(n),n=r}},Ee=(t,e)=>{Object.defineProperty(t,"value",{get(){return t()},set(n){if(e)throw new Error("value is readonly.");return t(n)},enumerable:!0,configurable:!1})},qn=(t,e)=>{if(!t)return!1;if(t.startsWith("["))return t.substring(1,t.length-1);let n=e.length;return t.startsWith(e)?t.substring(n,t.length-n):!1},Pe=t=>`[${CSS.escape(t)}]`,bt=(t,e)=>(t.startsWith("@")&&(t=e.f.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.f.dynamic)),t),sn=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},yo=/-(\w)/g,V=sn(t=>t&&t.replace(yo,(e,n)=>n?n.toUpperCase():"")),ho=/\B([A-Z])/g,je=sn(t=>t&&t.replace(ho,"-$1").toLowerCase()),ot=sn(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var ne=[],zn=t=>{var e;ne.length!==0&&((e=ne[ne.length-1])==null||e.add(t))},Le=t=>{if(!t)return()=>{};let e={stop:()=>{}};return go(t,e),J(()=>e.stop(),!0),e.stop},go=(t,e)=>{if(!t)return;let n=[],r=!1,o=()=>{for(let s of n)s();n=[],r=!0};e.stop=o;try{let s=new Set;if(ne.push(s),t(i=>n.push(i)),r)return;for(let i of[...s]){let a=w(i,()=>{o(),Le(t)});n.push(a)}}finally{ne.pop()}},Tt=t=>{let e=ne.length,n=e>0&&ne[e-1];try{return n&&ne.push(null),t()}finally{n&&ne.pop()}},Et=t=>{try{let e=new Set;return ne.push(e),{value:t(),refs:[...e]}}finally{ne.pop()}};var Ve=t=>!!t&&t[dt]===1;var K=(t,e,n)=>{if(!h(t))return;let r=t;if(r(void 0,e,1),!n)return;let o=r();if(o){if(T(o)||Y(o))for(let s of o)K(s,e,!0);else if(he(o))for(let s of o)K(s[0],e,!0),K(s[1],e,!0);if(A(o))for(let s in o)K(o[s],e,!0)}};function bo(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var $e=(t,e,n)=>{n.forEach(function(r){let o=t[r];bo(e,r,function(...i){let a=o.apply(this,i),c=this[Q];for(let p of c)K(p);return a})})},Ct=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var Kn=Array.prototype,an=Object.create(Kn),To=["push","pop","shift","unshift","splice","sort","reverse"];$e(Kn,an,To);var Wn=Map.prototype,Rt=Object.create(Wn),Eo=["set","clear","delete"];Ct(Rt,"Map");$e(Wn,Rt,Eo);var Gn=Set.prototype,xt=Object.create(Gn),Co=["add","clear","delete"];Ct(xt,"Set");$e(Gn,xt,Co);var pe={},G=t=>{if(h(t)||Ve(t))return t;let e={auto:!0,_value:t},n=c=>A(c)?Q in c?!0:T(c)?(Object.setPrototypeOf(c,an),!0):Y(c)?(Object.setPrototypeOf(c,xt),!0):he(c)?(Object.setPrototypeOf(c,Rt),!0):!1:!1,r=n(t),o=new Set,s=(c,p)=>{if(pe.stack&&pe.stack.length){pe.stack[pe.stack.length-1].add(a);return}o.size!==0&&Tt(()=>{for(let f of[...o.keys()])o.has(f)&&f(c,p)})},i=c=>{let p=c[Q];p||(c[Q]=p=new Set),p.add(a)},a=(...c)=>{if(!(2 in c)){let f=c[0],l=c[1];return 0 in c?e._value===f||h(f)&&(f=f(),e._value===f)?f:(n(f)&&i(f),e._value=f,e.auto&&s(f,l),e._value):(zn(a),e._value)}switch(c[2]){case 0:{let f=c[3];if(!f)return()=>{};let l=u=>{o.delete(u)};return o.add(f),()=>{l(f)}}case 1:{let f=c[1],l=e._value;s(l,f);break}case 2:return o.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[Q]=1,Ee(a,!1),r&&i(t),a};var D=t=>h(t)?t():t;var st=class{constructor(e){m(this,"E",[]);m(this,"_",new Map);m(this,"J");this.J=e}get S(){return this.E.length}Q(e){let n=this.J(e.value);n!==void 0&&this._.set(n,e)}X(e){var r;let n=this.J((r=this.E[e])==null?void 0:r.value);n!==void 0&&this._.delete(n)}static Ke(e,n){return{items:[],index:e,value:n,order:-1}}w(e){e.order=this.S,this.E.push(e),this.Q(e)}ze(e,n){let r=this.S;for(let o=e;o<r;++o)this.E[o].order=o+1;n.order=e,this.E.splice(e,0,n),this.Q(n)}I(e){return this.E[e]}Y(e,n){this.X(e),this.E[e]=n,this.Q(n),n.order=e}ce(e){this.X(e),this.E.splice(e,1);let n=this.S;for(let r=e;r<n;++r)this.E[r].order=r}fe(e){let n=this.S;for(let r=e;r<n;++r)this.X(r);this.E.splice(e)}Ct(e){return this._.has(e)}We(e){var r;let n=this._.get(e);return(r=n==null?void 0:n.order)!=null?r:-1}};var cn=Symbol("r-for"),St=class St{constructor(e){m(this,"p");m(this,"b");m(this,"Z");m(this,"T");this.p=e,this.b=e.o.f.for,this.Z=Pe(this.b),this.T=e.o.f.pre}N(e){let n=e.hasAttribute(this.b),r=be(e,this.Z);for(let o of r)this.Ge(o);return n}W(e){return e[cn]?!0:(e[cn]=!0,be(e,this.Z).forEach(n=>n[cn]=!0),!1)}Ge(e){if(e.hasAttribute(this.T)||this.W(e))return;let n=e.getAttribute(this.b);if(!n){M(0,this.b,e);return}e.removeAttribute(this.b),this.Je(e,n)}le(e){return te(e)?[]:(P(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(r=>({*[Symbol.iterator](){for(let o=1;o<=r;o++)yield o}}))(e):Object.entries(e))}Je(e,n){var oe;let r=this.Qe(n);if(!(r!=null&&r.list)){M(1,this.b,n,e);return}let o=this.p.o.f.key,s=this.p.o.f.keyBind,i=(oe=e.getAttribute(o))!=null?oe:e.getAttribute(s);e.removeAttribute(o),e.removeAttribute(s);let a=i?v=>{var N;return D((N=D(v))==null?void 0:N[i])}:v=>v,c=(v,N)=>a(v)===a(N),p=Be(e),f=e.parentNode;if(!f)return;let l=`${this.b} => ${n}`,u=new Comment(`__begin__ ${l}`);f.insertBefore(u,e),_e(u,p),p.forEach(v=>{F(v)}),e.remove();let y=new Comment(`__end__ ${l}`);f.insertBefore(y,u.nextSibling);let d=this.p,R=d.h,U=R.V(),E=(v,N,q)=>{let S=r.createContext(N,v),ee=st.Ke(S.index,N);return R.v(U,()=>{R.w(S.ctx);let se=q.previousSibling,Ue=[];for(let Ze of p){let g=Ze.cloneNode(!0);f.insertBefore(g,q),Ue.push(g)}for(Te(d,Ue),se=se.nextSibling;se!==q;)ee.items.push(se),se=se.nextSibling}),ee},b=(v,N)=>{let q=k.I(v).items,S=q[q.length-1].nextSibling;for(let ee of q)F(ee);k.Y(v,E(v,N,S))},L=(v,N)=>{k.w(E(v,N,y))},H=v=>{for(let N of k.I(v).items)F(N)},re=v=>{let N=k.S;for(let q=v;q<N;++q)k.I(q).index(q)},Qe=v=>{let N=k.S;P(v)&&(v=v());let q=D(v[0]);if(T(q)&&q.length===0){le(u,y),k.fe(0);return}let S=0,ee=Number.MAX_SAFE_INTEGER,se=N,Ue=this.p.o.forGrowThreshold,Ze=()=>k.S<se+Ue;for(let O of this.le(v[0])){let C=()=>{if(S<N){let W=k.I(S++);if(c(W.value,O))return;let $=k.We(a(O));if($>=S&&$-S<10){if(--S,ee=Math.min(ee,S),H(S),k.ce(S),--N,$>S+1)for(let x=S;x<$-1&&x<N&&!c(k.I(S).value,O);)++x,H(S),k.ce(S),--N;C();return}Ze()?(k.ze(S-1,E(S,O,k.I(S-1).items[0])),ee=Math.min(ee,S-1),++N):b(S-1,O)}else L(S++,O)};C()}let g=S;for(N=k.S;S<N;)H(S++);k.fe(g),re(ee)},Xe=()=>{at=w(ye,Qe)},Wt=()=>{Ye.stop(),at()},Ye=R.C(r.list),ye=Ye.value,at,Se=0,k=new st(a);for(let v of this.le(ye()[0]))k.w(E(Se++,v,y));_(u,Wt),Xe()}Qe(e){var c,p;let n=St.Xe.exec(e);if(!n)return;let r=(n[1]+((c=n[2])!=null?c:"")).split(",").map(f=>f.trim()),o=r.length>1?r.length-1:-1,s=o!==-1&&(r[o]==="index"||(p=r[o])!=null&&p.startsWith("#"))?r[o]:"";s&&r.splice(o,1);let i=n[3];if(!i||r.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(f,l)=>{let u={},y=D(f);if(!a&&r.length===1)u[r[0]]=f;else if(T(y)){let R=0;for(let U of r)u[U]=y[R++]}else for(let R of r)u[R]=y[R];let d={ctx:u,index:G(-1)};return s&&(d.index=u[s.startsWith("#")?s.substring(1):s]=G(l)),d}}}};m(St,"Xe",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var vt=St;var Ro=(t,e)=>{for(let n of t){let r=n.cloneNode(!0);e.appendChild(r)}},wt=class{constructor(e){m(this,"p");m(this,"D");m(this,"ue");this.p=e,this.D=e.o.f.is,this.ue=Pe(this.D)+", [is]"}N(e){let n=e.hasAttribute(this.D),r=be(e,this.ue);for(let o of r)this.x(o);return n}x(e){let n=e.getAttribute(this.D);if(!n){if(n=e.getAttribute("is"),!n||!n.startsWith("regor:"))return;n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.D),this.k(e,n)}B(e,n){let r=Be(e),o=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);o.insertBefore(s,e),_e(s,r),r.forEach(a=>{F(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n!=null?n:""}`);return o.insertBefore(i,s.nextSibling),{nodes:r,parent:o,commentBegin:s,commentEnd:i}}k(e,n){let{nodes:r,parent:o,commentBegin:s,commentEnd:i}=this.B(e,` => ${n} `),a=this.p.h.C(n),c=a.value,p=this.p.h,f=p.V(),l={name:""},u=ce(e)?r:[...r[0].childNodes],y=()=>{p.v(f,()=>{var L;let E=c()[0];if(A(E)&&(E.name?E=E.name:E=(L=Object.entries(p.me()).filter(H=>H[1]===E)[0])==null?void 0:L[0]),!j(E)||z(E)){le(s,i);return}if(l.name===E)return;le(s,i);let b=document.createElement(E);for(let H of e.getAttributeNames())H!==this.D&&b.setAttribute(H,e.getAttribute(H));Ro(u,b),o.insertBefore(b,i),this.p.G(b),l.name=E})},d=[];_(s,()=>{a.stop();for(let E of d)E();d.length=0}),y();let U=w(c,y);d.push(U)}};var Jn={collectRefObj:!0,onBind:(t,e)=>w(e.value,()=>{let r=e.value(),o=e.context,s=r[0];if(A(s))for(let i of Object.entries(s)){let a=i[0],c=i[1],p=o[a];p!==c&&(h(p)?p(c):o[a]=c)}},!0)};var Qn={collectRefObj:!0,once:!0,onBind:(t,e)=>{let n=e.value(),r=e.context,o=n[0];if(!A(o))return()=>{};for(let s of Object.entries(o)){let i=s[0],a=s[1],c=r[i];c!==a&&(h(c)?c(a):r[i]=a)}return()=>{}}};var Ce=t=>{var n,r;let e=(n=mt(t))==null?void 0:n.onUnmounted;e==null||e.forEach(o=>{o()}),(r=t.unmounted)==null||r.call(t)};var Fe=class{constructor(e,n,r,o,s){m(this,"props");m(this,"start");m(this,"end");m(this,"ctx");m(this,"autoProps",!0);m(this,"entangle",!0);m(this,"enableSwitch",!1);m(this,"onAutoPropsAssigned");m(this,"de");m(this,"emit",(e,n)=>{this.de.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.de=n,this.ctx=r,this.start=o,this.end=s}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)F(e),e=e.nextSibling;Ce(this)}};var pn=Symbol("scope"),Ot=t=>{try{Un();let e=t();Zt(e);let n={context:e,unmount:()=>Ce(e),[pn]:1};return n[pn]=1,n}finally{Hn()}},Xn=t=>A(t)?pn in t:!1;var At=(t,e)=>{if(t===e)return()=>{};let n=w(t,o=>e(o)),r=w(e,o=>t(o));return e(t()),()=>{n(),r()}};var Nt=t=>{var n,r;let e=(n=mt(t))==null?void 0:n.onMounted;e==null||e.forEach(o=>{o()}),(r=t.mounted)==null||r.call(t)};var Yn={collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(!r)return()=>{};let i=V(r);return w(e.value,()=>{var l;let c=(l=e.refs[0])!=null?l:e.value()[0],p=e.context,f=p[r];f!==c&&(h(f)?f(c):p[i]=c)},!0)}};var Mt=class{constructor(e){m(this,"p");m(this,"ye");this.p=e,this.ye=e.o.f.inherit}N(e){this.Ye(e)}Ye(e){var l;let n=this.p,r=n.h,o=n.o.he,s=n.o.ge,i=r.me(),a=r.Ze(),c=[...o.keys(),...a,...[...o.keys()].map(je),...a.map(je)].join(",");if(z(c))return;let p=e.querySelectorAll(c),f=(l=e.matches)!=null&&l.call(e,c)?[e,...p]:p;for(let u of f){if(u.hasAttribute(n.T))continue;let y=u.parentNode;if(!y)continue;let d=u.nextSibling,R=V(u.tagName).toUpperCase(),U=i[R],E=U!=null?U:s.get(R);if(!E)continue;let b=E.template;if(!b)continue;let L=u.parentElement;if(!L)continue;let H=new Comment(" begin component: "+u.tagName),re=new Comment(" end component: "+u.tagName);L.insertBefore(H,u),u.remove();let Qe=n.o.f.props,Xe=n.o.f.propsOnce,Wt=n.o.f.bind,Ye=(g,O)=>{let C={},W=g.hasAttribute(Qe),$=g.hasAttribute(Xe);return r.v(O,()=>{r.w(C),W&&n.x(Jn,g,Qe),$&&n.x(Qn,g,Xe);let x=E.props;if(!x||x.length===0)return;x=x.map(V);for(let we of x.concat(x.map(je))){let fe=g.getAttribute(we);fe!==null&&(C[V(we)]=fe,g.removeAttribute(we))}let B=n.ee.be(g,!1);for(let[we,fe]of B.entries()){let[Oe,Gt]=fe.te;Gt&&x.includes(V(Gt))&&(Oe!=="."&&Oe!==":"&&Oe!==Wt||n.x(Yn,g,we,!0,Gt,fe.ne))}}),C},ye=[...r.V()],at=()=>{var W;let g=Ye(u,ye),O=new Fe(g,u,ye,H,re),C=Ot(()=>{var $;return($=E.context(O))!=null?$:{}}).context;if(O.autoProps){for(let[$,x]of Object.entries(g))if($ in C){let B=C[$];if(B===x)continue;O.entangle&&h(B)&&h(x)?_(H,At(x,B)):h(B)?B(x):C[$]=D(x)}else C[$]=x;(W=O.onAutoPropsAssigned)==null||W.call(O)}return{componentCtx:C,head:O}},{componentCtx:Se,head:k}=at(),oe=[...me(b)],v=oe.length,N=u.childNodes.length===0,q=g=>{let O=g.parentElement;if(N){for(let x of[...g.childNodes])O.insertBefore(x,g);return}let C=g.name;z(C)&&(C=g.getAttributeNames().filter(x=>x.startsWith("#"))[0],z(C)?C="default":C=C.substring(1));let W=u.querySelector(`template[name='${C}'], template[\\#${C}]`);!W&&C==="default"&&(W=u.querySelector("template:not([name])"),W&&W.getAttributeNames().filter(x=>x.startsWith("#")).length>0&&(W=null));let $=x=>{k.enableSwitch&&r.v(ye,()=>{r.w(Se);let B=Ye(g,r.V());r.v(ye,()=>{r.w(B);let we=r.V(),fe=Pn(we);for(let Oe of x)Ne(Oe)&&(Oe.setAttribute(nt,fe),en(fe),_(Oe,()=>{tn(fe)}))})})};if(W){let x=[...me(W)];for(let B of x)O.insertBefore(B,g);$(x)}else{if(C!=="default"){for(let B of[...me(g)])O.insertBefore(B,g);return}let x=[...me(u)].filter(B=>!ce(B));for(let B of x)O.insertBefore(B,g);$(x)}},S=g=>{if(!Ne(g))return;let O=g.querySelectorAll("slot");if(Fn(g)){q(g),g.remove();return}for(let C of O)q(C),C.remove()};(()=>{for(let g=0;g<v;++g)oe[g]=oe[g].cloneNode(!0),y.insertBefore(oe[g],d),S(oe[g])})(),L.insertBefore(re,d);let se=()=>{if(!E.inheritAttrs)return;let g=oe.filter(C=>C.nodeType===Node.ELEMENT_NODE);g.length>1&&(g=g.filter(C=>C.hasAttribute(this.ye)));let O=g[0];if(O)for(let C of u.getAttributeNames()){if(C===Qe||C===Xe)continue;let W=u.getAttribute(C);if(C==="class")O.classList.add(...W.split(" "));else if(C==="style"){let $=O.style,x=u.style;for(let B of x)$.setProperty(B,x.getPropertyValue(B))}else O.setAttribute(bt(C,n.o),W)}},Ue=()=>{for(let g of u.getAttributeNames())!g.startsWith("@")&&!g.startsWith(n.o.f.on)&&u.removeAttribute(g)},Ze=()=>{se(),Ue(),r.w(Se),n.Te(u,!1),Se.$emit=k.emit,Te(n,oe),_(u,()=>{Ce(Se)}),_(H,()=>{ae(u)}),Nt(Se)};r.v(ye,Ze)}}};var fn=class{constructor(e){m(this,"xe");m(this,"te",[]);m(this,"ne",[]);m(this,"Ee",[]);this.xe=e,this.C()}C(){let e=this.xe,n=e.startsWith(".");n&&(e=":"+e.slice(1));let r=e.indexOf("."),o=this.te=(r<0?e:e.substring(0,r)).split(/[:@]/);if(z(o[0])&&(o[0]=n?".":e[0]),r>=0){let s=this.ne=e.slice(r+1).split(".");if(s.includes("camel")){let i=o.length-1;o[i]=V(o[i])}s.includes("prop")&&(o[0]=".")}}},Lt=class{constructor(e){m(this,"p");m(this,"Re");this.p=e,this.Re=e.o.et()}be(e,n){let r=new Map;if(!rt(e))return r;let o=this.Re,s=a=>{let c=a.getAttributeNames().filter(p=>o.some(f=>p.startsWith(f)));for(let p of c)r.has(p)||r.set(p,new fn(p)),r.get(p).Ee.push(a)};if(s(e),!n)return r;let i=e.querySelectorAll("*");for(let a of i)s(a);return r}};var kt={};var It=class{constructor(e){m(this,"h");m(this,"Ce");m(this,"ve");m(this,"Se");m(this,"we");m(this,"ee");m(this,"o");m(this,"T");m(this,"Oe");this.h=e,this.o=e.o,this.ve=new vt(this),this.Ce=new gt(this),this.Se=new wt(this),this.we=new Mt(this),this.ee=new Lt(this),this.T=this.o.f.pre,this.Oe=this.o.f.dynamic}tt(e){let n=ce(e)?[e]:e.querySelectorAll("template");for(let r of n){if(r.hasAttribute(this.T))continue;let o=r.parentNode;if(!o)continue;let s=r.nextSibling;if(r.remove(),!r.content)continue;let i=[...r.content.childNodes];for(let a of i)o.insertBefore(a,s);Te(this,i)}}G(e){e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.T)||this.Ce.N(e)||this.ve.N(e)||this.Se.N(e)||(this.we.N(e),this.tt(e),this.Te(e,!0))}Te(e,n){var s;let r=this.ee.be(e,n),o=this.o.H;for(let[i,a]of r.entries()){let[c,p]=a.te,f=(s=o[i])!=null?s:o[c];if(!f){console.error("directive not found:",c);continue}a.Ee.forEach(l=>{this.x(f,l,i,!1,p,a.ne)})}}x(e,n,r,o,s,i){if(n.hasAttribute(this.T))return;let a=n.getAttribute(r);n.removeAttribute(r);let c=p=>{let f=p.getAttribute(nt);return f||(p.parentElement?c(p.parentElement):null)};if(nn()){let p=c(n);if(p){this.h.v(jn(p),()=>{this.k(e,n,a,s,i)});return}}this.k(e,n,a,s,i)}nt(e,n,r){if(e!==kt)return!1;if(z(r))return!0;let o=document.querySelector(r);if(o){let s=n.parentElement;if(!s)return!0;let i=new Comment(`teleported => '${r}'`);s.insertBefore(i,n),n.teleportedFrom=i,i.teleportedTo=n,_(i,()=>{F(n)}),o.appendChild(n)}return!0}k(e,n,r,o,s){var U;if(n.nodeType!==Node.ELEMENT_NODE||r==null||this.nt(e,n,r))return;let i=this.h.C(r,e.isLazy,e.isLazyKey,e.collectRefObj,e.once),a=[];_(n,()=>{i.stop(),f==null||f.stop();for(let E of a)E();a.length=0});let p=qn(o,this.Oe),f;p&&(f=this.h.C(V(p),void 0,void 0,void 0,e.once));let l,u=()=>(l=i.value(),l),y,d=()=>f?(y=f.value()[0],y):(y=o,o),R=()=>{if(!e.onChange)return;let E=w(i.value,b=>{var re;let L=l,H=y;(re=e.onChange)==null||re.call(e,n,u(),L,d(),H,s)});if(a.push(E),f){let b=w(f.value,L=>{var re;let H=y;(re=e.onChange)==null||re.call(e,n,u(),H,d(),H,s)});a.push(b)}};e.once||R(),e.onBind&&a.push(e.onBind(n,i,r,o,f,s)),(U=e.onChange)==null||U.call(e,n,u(),void 0,d(),void 0,s)}};var xo=9,vo=10,So=13,wo=32,Re=46,Dt=44,Oo=39,Ao=34,Ut=40,qe=41,Ht=91,_t=93,ln=63,No=59,Zn=58,Mo=123,Bt=125,un=43,Lo=45,er=96,tr=47,ko=92,nr=[2,3],rr=[un,Lo],pr={"-":1,"!":1,"~":1,"+":1,new:1},fr={"=":2.5,"*=":2.5,"**=":2.5,"/=":2.5,"%=":2.5,"+=":2.5,"-=":2.5,"<<=":2.5,">>=":2.5,">>>=":2.5,"&=":2.5,"^=":2.5,"|=":2.5},Ke=kn(ft({"=>":2},fr),{"||":3,"??":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"/":12,"%":12,"**":13}),lr=Object.keys(fr),Io=new Set(lr),Pt=new Set;Pt.add("=>");lr.forEach(t=>Pt.add(t));var Do=new Set(["$","_"]),or={true:!0,false:!1,null:null},Uo="this";function mr(t){return Math.max(0,...Object.keys(t).map(e=>e.length))}var Ho=mr(pr),_o=mr(Ke),We="Expected ",ke="Unexpected ",yn="Unclosed ",Bo=We+":",sr=We+"expression",Po="missing }",jo=ke+"object property",Vo=yn+"(",ir=We+"comma",ar=ke+"token ",$o=ke+"period",mn=We+"expression after ",Fo="missing unaryOp argument",qo=yn+"[",zo=We+"exponent (",Ko="Variable names cannot start with a number (",Wo=yn+'quote after "';var ze=t=>t>=48&&t<=57,cr=t=>Ke[t]||0,dn=class{constructor(e){m(this,"rt",{0:[this.ot],1:[this.st,this.it,this.at],2:[this.pt,this.ct,this.ft,this.Ae,this.lt],3:[this.ut,this.mt,this.dt]});m(this,"r");m(this,"e");this.r=e,this.e=0}get M(){return this.r.charAt(this.e)}get l(){return this.r.charCodeAt(this.e)}m(e){return this.r.charCodeAt(this.e)===e}U(e){let n=String.fromCharCode(e);return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!(n in Ke)||Do.has(n)}re(e){return this.U(e)||ze(e)}i(e){return new Error(`${e} at character ${this.e}`)}L(e,n,r){let o=this.rt[e];if(!o)return r;let s={node:r},i=a=>{a.call(this,s)};return n===0?o.forEach(i):o.find(i),s.node}y(){let e=this.l,n=this.r,r=this.e;for(;e===wo||e===xo||e===vo||e===So;)e=n.charCodeAt(++r);this.e=r}parse(){let e=this.oe();return e.length===1?e[0]:{type:0,body:e}}oe(e){let n=[];for(;this.e<this.r.length;){let r=this.l;if(r===No||r===Dt)this.e++;else{let o=this.O();if(o)n.push(o);else if(this.e<this.r.length){if(r===e)break;throw this.i(ke+'"'+this.M+'"')}}}return n}O(){var n;let e=(n=this.L(0,1))!=null?n:this.Ne();return this.y(),this.L(1,0,e)}se(){this.y();let e=this.e,n=this.r,r=n.substr(e,_o),o=r.length;for(;o>0;){if(r in Ke&&(!this.U(this.l)||e+r.length<n.length&&!this.re(n.charCodeAt(e+r.length))))return e+=o,this.e=e,r;r=r.substr(0,--o)}return!1}Ne(){let e,n,r,o,s,i,a,c;if(s=this.j(),!s||(n=this.se(),!n))return s;if(o={value:n,prec:cr(n),right_a:Pt.has(n)},i=this.j(),!i)throw this.i(mn+n);let p=[s,o,i];for(;n=this.se();){if(r=cr(n),r===0){this.e-=n.length;break}o={value:n,prec:r,right_a:Pt.has(n)},c=n;let f=l=>o.right_a&&l.right_a?r>l.prec:r<=l.prec;for(;p.length>2&&f(p[p.length-2]);)i=p.pop(),n=p.pop().value,s=p.pop(),e={type:8,operator:n,left:s,right:i},p.push(e);if(e=this.j(),!e)throw this.i(mn+c);p.push(o,e)}for(a=p.length-1,e=p[a];a>1;)e={type:8,operator:p[a-1].value,left:p[a-2],right:e},a-=2;return e}j(){let e,n,r;if(this.y(),r=this.L(2,1),r)return this.L(3,0,r);let o=this.l;if(ze(o)||o===Re)return this.yt();if(o===Oo||o===Ao)r=this.ht();else if(o===Ht)r=this.gt();else{for(e=this.r.substr(this.e,Ho),n=e.length;n>0;){if(Object.prototype.hasOwnProperty.call(pr,e)&&(!this.U(this.l)||this.e+e.length<this.r.length&&!this.re(this.r.charCodeAt(this.e+e.length)))){this.e+=n;let s=this.j();if(!s)throw this.i(Fo);return this.L(3,0,{type:7,operator:e,argument:s})}e=e.substr(0,--n)}this.U(o)?(r=this.ie(),r.name in or?r={type:4,value:or[r.name],raw:r.name}:r.name===Uo&&(r={type:5})):o===Ut&&(r=this.bt())}return r?(r=this.$(r),this.L(3,0,r)):this.L(3,0,!1)}$(e){this.y();let n=this.l;for(;n===Re||n===Ht||n===Ut||n===ln;){let r;if(n===ln){if(this.r.charCodeAt(this.e+1)!==Re)break;r=!0,this.e+=2,this.y(),n=this.l}if(this.e++,n===Ht){if(e={type:3,computed:!0,object:e,property:this.O()},this.y(),n=this.l,n!==_t)throw this.i(qo);this.e++}else n===Ut?e={type:6,arguments:this.Me(qe),callee:e}:(n===Re||r)&&(r&&this.e--,this.y(),e={type:3,computed:!1,object:e,property:this.ie()});r&&(e.optional=!0),this.y(),n=this.l}return e}yt(){let e="",n;for(;ze(this.l);)e+=this.r.charAt(this.e++);if(this.m(Re))for(e+=this.r.charAt(this.e++);ze(this.l);)e+=this.r.charAt(this.e++);if(n=this.M,n==="e"||n==="E"){for(e+=this.r.charAt(this.e++),n=this.M,(n==="+"||n==="-")&&(e+=this.r.charAt(this.e++));ze(this.l);)e+=this.r.charAt(this.e++);if(!ze(this.r.charCodeAt(this.e-1)))throw this.i(zo+e+this.M+")")}let r=this.l;if(this.U(r))throw this.i(Ko+e+this.M+")");if(r===Re||e.length===1&&e.charCodeAt(0)===Re)throw this.i($o);return{type:4,value:parseFloat(e),raw:e}}ht(){let e="",n=this.e,r=this.r.charAt(this.e++),o=!1;for(;this.e<this.r.length;){let s=this.r.charAt(this.e++);if(s===r){o=!0;break}else if(s==="\\")switch(s=this.r.charAt(this.e++),s){case"n":e+=`
|
|
2
|
-
`;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=s}else e+=s}if(!o)throw this.i(
|
|
3
|
-
`;break;case"r":r+="\r";break;case"t":r+=" ";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;default:r+=c}else r+=c,o+=c}throw this.i("Unclosed `")}ut(e){var o;let n=e.node;if(!n||n.operator!=="new"||!n.argument)return;if(!n.argument||![6,3].includes(n.argument.type))throw this.i("Expected new function()");e.node=n.argument;let r=e.node;for(;r.type===3||r.type===6&&((o=r==null?void 0:r.callee)==null?void 0:o.type)===3;)r=r.type===3?r.object:r.callee.object;r.type=20}lt(e){if(!this.m(tr))return;let n=++this.e,r=!1;for(;this.e<this.r.length;){if(this.l===tr&&!r){let o=this.r.slice(n,this.e),s="";for(;++this.e<this.r.length;){let a=this.l;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.M;else break}let i;try{i=new RegExp(o,s)}catch(a){throw this.i(a.message)}return e.node={type:4,value:i,raw:this.r.slice(n-1,this.e)},e.node=this.$(e.node),e.node}this.m(Ht)?r=!0:r&&this.m(_t)&&(r=!1),this.e+=this.m(ko)?2:1}throw this.i("Unclosed Regex")}},ur=t=>new dn(t).parse();var Go={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(t,e)=>{},"+=":(t,e)=>{},"-=":(t,e)=>{},"<<=":(t,e)=>{},">>=":(t,e)=>{},">>>=":(t,e)=>{},"&=":(t,e)=>{},"^=":(t,e)=>{},"|=":(t,e)=>{},"||":(t,e)=>t()||e(),"??":(t,e)=>{var n;return(n=t())!=null?n:e()},"&&":(t,e)=>t()&&e(),"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(t,e)=>t===e,"!==":(t,e)=>t!==e,"<":(t,e)=>t<e,">":(t,e)=>t>e,"<=":(t,e)=>t<=e,">=":(t,e)=>t>=e,in:(t,e)=>t in e,"<<":(t,e)=>t<<e,">>":(t,e)=>t>>e,">>>":(t,e)=>t>>>e,"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e)=>t%e,"**":(t,e)=>pt(t,e)},Jo={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},gr=t=>{if(!(t!=null&&t.some(hr)))return t;let e=[];return t.forEach(n=>hr(n)?e.push(...n):e.push(n)),e},dr=(...t)=>gr(t),hn=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},Qo={"++":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(++r),r}return++t[e]},"--":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(--r),r}return--t[e]}},Xo={"++":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(r+1),r}return t[e]++},"--":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(r-1),r}return t[e]--}},yr={"=":(t,e,n)=>{let r=t[e];return h(r)?r(n):t[e]=n},"+=":(t,e,n)=>{let r=t[e];return h(r)?r(r()+n):t[e]+=n},"-=":(t,e,n)=>{let r=t[e];return h(r)?r(r()-n):t[e]-=n},"*=":(t,e,n)=>{let r=t[e];return h(r)?r(r()*n):t[e]*=n},"/=":(t,e,n)=>{let r=t[e];return h(r)?r(r()/n):t[e]/=n},"%=":(t,e,n)=>{let r=t[e];return h(r)?r(r()%n):t[e]%=n},"**=":(t,e,n)=>{let r=t[e];return h(r)?r(pt(r(),n)):t[e]=pt(t[e],n)},"<<=":(t,e,n)=>{let r=t[e];return h(r)?r(r()<<n):t[e]<<=n},">>=":(t,e,n)=>{let r=t[e];return h(r)?r(r()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let r=t[e];return h(r)?r(r()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let r=t[e];return h(r)?r(r()|n):t[e]|=n},"&=":(t,e,n)=>{let r=t[e];return h(r)?r(r()&n):t[e]&=n},"^=":(t,e,n)=>{let r=t[e];return h(r)?r(r()^n):t[e]^=n}},jt=(t,e)=>P(t)?t.bind(e):t,gn=class{constructor(e,n,r,o,s){m(this,"u");m(this,"ke");m(this,"Ve");m(this,"Ie");m(this,"A");m(this,"De");m(this,"Ue");this.u=T(e)?e:[e],this.ke=n,this.Ve=r,this.Ie=o,this.Ue=!!s}Pe(e,n){if(n&&e in n)return n;for(let r of this.u)if(e in r)return r}2(e,n,r){let o=e.name;if(o==="$root")return this.u[this.u.length-1];if(o==="$parent")return this.u[1];if(o==="$ctx")return[...this.u];if(r&&o in r)return this.A=r[o],jt(D(r[o]),r);for(let i of this.u)if(o in i)return this.A=i[o],jt(D(i[o]),i);let s=this.ke;if(s&&o in s)return this.A=s[o],jt(D(s[o]),s)}5(e,n,r){return this.u[0]}0(e,n,r){return this.Be(n,r,dr,...e.body)}1(e,n,r){return this.R(n,r,(...o)=>o.pop(),...e.expressions)}3(e,n,r){let{obj:o,key:s}=this.ae(e,n,r),i=o==null?void 0:o[s];return this.A=i,jt(D(i),o)}4(e,n,r){return e.value}6(e,n,r){let o=(i,...a)=>P(i)?i(...gr(a)):i,s=this.R(++n,r,o,e.callee,...e.arguments);return this.A=s,s}7(e,n,r){return this.R(n,r,Jo[e.operator],e.argument)}8(e,n,r){let o=Go[e.operator];switch(e.operator){case"||":case"&&":case"??":return o(()=>this.g(e.left,n,r),()=>this.g(e.right,n,r))}return this.R(n,r,o,e.left,e.right)}9(e,n,r){return this.Be(++n,r,dr,...e.elements)}10(e,n,r){let o={},s=(...i)=>{i.forEach(a=>{Object.assign(o,a)})};return this.R(++n,r,s,...e.properties),o}11(e,n,r){return this.R(n,r,o=>this.g(o?e.consequent:e.alternate,n,r),e.test)}12(e,n,r){var f;let o={},s=l=>(l==null?void 0:l.type)!==15,i=(f=this.Ie)!=null?f:()=>!1,a=n===0&&this.Ue,c=l=>this._e(a,e.key,n,hn(l,r)),p=l=>this._e(a,e.value,n,hn(l,r));if(e.shorthand){let l=e.key.name;o[l]=s(e.key)&&i(l,n)?c:c()}else if(e.computed){let l=D(c());o[l]=s(e.value)&&i(l,n)?p:p()}else{let l=e.key.type===4?e.key.value:e.key.name;o[l]=s(e.value)&&i(l,n)?()=>p:p()}return o}ae(e,n,r){let o=this.g(e.object,n,r),s=e.computed?this.g(e.property,n,r):e.property.name;return{obj:o,key:s}}13(e,n,r){let o=e.argument,s=e.operator,i=e.prefix?Qo:Xo;if(o.type===2){let a=o.name,c=this.Pe(a,r);return te(c)?void 0:i[s](c,a)}if(o.type===3){let{obj:a,key:c}=this.ae(o,n,r);return i[s](a,c)}}16(e,n,r){let o=e.left,s=e.operator;if(o.type===2){let i=o.name,a=this.Pe(i,r);if(te(a))return;let c=this.g(e.right,n,r);return yr[s](a,i,c)}if(o.type===3){let{obj:i,key:a}=this.ae(o,n,r),c=this.g(e.right,n,r);return yr[s](i,a,c)}}14(e,n,r){let o=this.g(e.argument,n,r);return T(o)&&(o.s=br),o}17(e,n,r){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,r)}19(e,n,r){let o=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.R(n,r,o,...e.expressions)}18(e,n,r){return e.value.cooked}20(e,n,r){let o=(s,...i)=>new s(...i);return this.R(n,r,o,e.callee,...e.arguments)}15(e,n,r){return(...o)=>{let s=Object.create(r!=null?r:{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=o[a++]}return this.g(e.body,n,s)}}g(e,n,r){let o=D(this[e.type](e,n,r));return this.De=e.type,o}_e(e,n,r,o){let s=this.g(n,r,o);return e&&this.He()?this.A:s}He(){let e=this.De;return(e===2||e===3||e===6)&&h(this.A)}eval(e,n){let{value:r,refs:o}=Et(()=>this.g(e,-1,n)),s={value:r,refs:o};return this.He()&&(s.ref=this.A),s}R(e,n,r,...o){let s=o.map(i=>i&&this.g(i,e,n));return r(...s)}Be(e,n,r,...o){let s=this.Ve;if(!s)return this.R(e,n,r,...o);let i=o.map((a,c)=>a&&(a.type!==15&&s(c,e)?p=>this.g(a,e,hn(p,n)):this.g(a,e,n)));return r(...i)}},br=Symbol("s"),hr=t=>(t==null?void 0:t.s)===br,Tr=(t,e,n,r,o,s,i)=>new gn(e,n,r,o,i).eval(t,s);var Er={},Vt=class{constructor(e,n){m(this,"u");m(this,"o");m(this,"je",[]);this.u=e,this.o=n}w(e){this.u=[e,...this.u]}me(){return this.u.map(n=>n.components).filter(n=>!!n).reverse().reduce((n,r)=>{for(let[o,s]of Object.entries(r))n[o.toUpperCase()]=s;return n},{})}Ze(){let e=[],n=new Set,r=this.u.map(o=>o.components).filter(o=>!!o).reverse();for(let o of r)for(let s of Object.keys(o))n.has(s)||(n.add(s),e.push(s));return e}C(e,n,r,o,s){var y;let i=G([]),a=[],c=()=>{for(let d of a)d();a.length=0},p={value:i,stop:c,refs:[],context:this.u[0]};if(z(e))return p;let f=this.o.globalContext,l=[],u=(d,R,U,E)=>{try{let b=Tr(d,R,f,n,r,E,o);return U&&l.push(...b.refs),{value:b.value,refs:b.refs,ref:b.ref}}catch(b){M(6,`evaluation error: ${e}`,b)}return{value:void 0,refs:[]}};try{let d=(y=Er[e])!=null?y:ur("["+e+"]");Er[e]=d;let R=this.u,U=()=>{l.splice(0),c();let E=d.elements.map((b,L)=>n!=null&&n(L,-1)?{value:H=>u(b,R,!1,{$event:H}).value,refs:[]}:u(b,R,!0));if(!s)for(let b of l){let L=w(b,U);a.push(L)}i(E.map(b=>b.value)),p.refs=E.map(b=>b.ref)};U()}catch(d){M(6,`parse error: ${e}`,d)}return p}V(){return this.u}Y(e){this.je.push(this.u),this.u=e}v(e,n){try{this.Y(e),n()}finally{this.Tt()}}Tt(){var e;this.u=(e=this.je.pop())!=null?e:[]}};var Cr="http://www.w3.org/1999/xlink",Yo={itemscope:2,allowfullscreen:2,formnovalidate:2,ismap:2,nomodule:2,novalidate:2,readonly:2,async:1,autofocus:1,autoplay:1,controls:1,default:1,defer:1,disabled:1,hidden:1,inert:1,loop:1,open:1,required:1,reversed:1,scoped:1,seamless:1,checked:1,muted:1,multiple:1,selected:1};function Zo(t){return!!t||t===""}var bn={onChange:(t,e,n,r,o,s)=>{var a;if(r){s&&s.includes("camel")&&(r=V(r)),$t(t,r,e[0],o);return}let i=e.length;for(let c=0;c<i;++c){let p=e[c];if(T(p)){let f=(a=n==null?void 0:n[c])==null?void 0:a[0],l=p[0],u=p[1];$t(t,l,u,f)}else if(A(p))for(let f of Object.entries(p)){let l=f[0],u=f[1],y=n==null?void 0:n[c],d=y&&l in y?l:void 0;$t(t,l,u,d)}else{let f=n==null?void 0:n[c],l=e[c++],u=e[c];$t(t,l,u,f)}}}},$t=(t,e,n,r)=>{if(r&&r!==e&&t.removeAttribute(r),te(e)){M(3,name,t);return}if(!j(e)){M(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){te(n)?t.removeAttributeNS(Cr,e.slice(6,e.length)):t.setAttributeNS(Cr,e,n);return}let o=e in Yo;te(n)||o&&!Zo(n)?t.removeAttribute(e):t.setAttribute(e,o?"":n)};var Tn={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n==null?void 0:n[o];if(T(s)){let a=s.length;for(let c=0;c<a;++c)Rr(t,s[c],i==null?void 0:i[c])}else Rr(t,s,i)}}},Rr=(t,e,n)=>{let r=t.classList,o=j(e),s=j(n);if(e&&!o){if(n&&!s)for(let i in n)(!(i in e)||!e[i])&&r.remove(i);for(let i in e)e[i]&&r.add(i)}else o?n!==e&&(s&&r.remove(...n.trim().split(/\s+/)),r.add(...e.trim().split(/\s+/))):n&&s&&r.remove(...n.trim().split(/\s+/))};var xr={onChange:(t,e)=>{let[n,r]=e;P(r)?r(t,n):t.innerHTML=n==null?void 0:n.toString()}};function es(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=ue(t[r],e[r]);return n}function ue(t,e){if(t===e)return!0;let n=Xt(t),r=Xt(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=et(t),r=et(e),n||r)return t===e;if(n=T(t),r=T(e),n||r)return n&&r?es(t,e):!1;if(n=A(t),r=A(e),n||r){if(!n||!r)return!1;let o=Object.keys(t).length,s=Object.keys(e).length;if(o!==s)return!1;for(let i in t){let a=t.hasOwnProperty(i),c=e.hasOwnProperty(i);if(a&&!c||!a&&c||!ue(t[i],e[i]))return!1}}return String(t)===String(e)}function Ft(t,e){return t.findIndex(n=>ue(n,e))}var vr=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var qt=t=>{if(!h(t))throw I(3,"pause");t(void 0,void 0,3)};var zt=t=>{if(!h(t))throw I(3,"resume");t(void 0,void 0,4)};var wr={onChange:(t,e)=>{ts(t,e[0])},onBind:(t,e,n,r,o,s)=>ns(t,e,s)},ts=(t,e)=>{let n=Mr(t);if(n&&Or(t))T(e)?e=Ft(e,de(t))>-1:Y(e)?e=e.has(de(t)):e=cs(t,e),t.checked=e;else if(n&&Ar(t))t.checked=ue(e,de(t));else if(n||Lr(t))Nr(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(kr(t)){let r=t.options,o=r.length,s=t.multiple;for(let i=0;i<o;i++){let a=r[i],c=de(a);if(s)T(e)?a.selected=Ft(e,c)>-1:a.selected=e.has(c);else if(ue(de(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else M(7,t)},it=t=>(h(t)&&(t=t()),P(t)&&(t=t()),t?j(t)?{trim:t.includes("trim"),lazy:t.includes("lazy"),number:t.includes("number"),int:t.includes("int")}:{trim:!!t.trim,lazy:!!t.lazy,number:!!t.number,int:!!t.int}:{trim:!1,lazy:!1,number:!1,int:!1}),Or=t=>t.type==="checkbox",Ar=t=>t.type==="radio",Nr=t=>t.type==="number"||t.type==="range",Mr=t=>t.tagName==="INPUT",Lr=t=>t.tagName==="TEXTAREA",kr=t=>t.tagName==="SELECT",ns=(t,e,n)=>{let r=e.value,o=it(n==null?void 0:n.join(",")),s=it(r()[1]),i={int:o.int||s.int,lazy:o.lazy||s.lazy,number:o.number||s.number,trim:o.trim||s.trim},a=e.refs[0];if(!a)return M(8,t),()=>{};let c=Mr(t);return c&&Or(t)?os(t,a):c&&Ar(t)?ps(t,a):c||Lr(t)?rs(t,i,a,r):kr(t)?fs(t,a,r):(M(7,t),()=>{})},Sr=/[.,' ·٫]/,rs=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=Nr(t),a=()=>{!e.trim&&!it(r()[1]).trim||(t.value=t.value.trim())},c=u=>{let y=u.target;y.composing=1},p=u=>{let y=u.target;y.composing&&(y.composing=0,y.dispatchEvent(new Event(s)))},f=()=>{t.removeEventListener(s,l),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",p),t.removeEventListener("change",p)},l=u=>{let y=u.target;if(!y||y.composing)return;let d=y.value,R=it(r()[1]);if(i||R.number||R.int){if(R.int)d=parseInt(d);else{if(Sr.test(d[d.length-1])&&d.split(Sr).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(n()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else R.trim&&(d=d.trim());n(d)};return t.addEventListener(s,l),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",p),t.addEventListener("change",p),f},os=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=de(t),i=t.checked,a=e();if(T(a)){let c=Ft(a,s),p=c!==-1;i&&!p?a.push(s):!i&&p&&a.splice(c,1)}else Y(a)?i?a.add(s):a.delete(s):e(as(t,i))};return t.addEventListener(n,o),r},de=t=>"_value"in t?t._value:t.value,Ir="trueValue",ss="falseValue",Dr="true-value",is="false-value",as=(t,e)=>{let n=e?Ir:ss;if(n in t)return t[n];let r=e?Dr:is;return t.hasAttribute(r)?t.getAttribute(r):e},cs=(t,e)=>{if(Ir in t)return ue(e,t.trueValue);let r=Dr;return t.hasAttribute(r)?ue(e,t.getAttribute(r)):ue(e,!0)},ps=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=de(t);e(s)};return t.addEventListener(n,o),r},fs=(t,e,n)=>{let r="change",o=()=>{t.removeEventListener(r,s)},s=()=>{let a=it(n()[1]).number,c=Array.prototype.filter.call(t.options,p=>p.selected).map(p=>a?vr(de(p)):de(p));if(t.multiple){let p=e();try{if(qt(e),Y(p)){p.clear();for(let f of c)p.add(f)}else T(p)?(p.splice(0),p.push(...c)):e(c)}finally{zt(e),K(e)}}else e(c[0])};return t.addEventListener(r,s),o};var ls=["stop","prevent","capture","self","once","left","right","middle","passive"],ms=t=>{let e={};if(z(t))return;let n=t.split(",");for(let r of ls)e[r]=n.includes(r);return e},Cn={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{var f,l;if(o){let u=e.value(),y=D(o.value()[0]);return j(y)?En(t,V(y),()=>e.value()[0],(f=s==null?void 0:s.join(","))!=null?f:u[1]):()=>{}}else if(r){let u=e.value();return En(t,V(r),()=>e.value()[0],(l=s==null?void 0:s.join(","))!=null?l:u[1])}let i=[],a=()=>{i.forEach(u=>u())},c=e.value(),p=c.length;for(let u=0;u<p;++u){let y=c[u];if(P(y)&&(y=y()),A(y))for(let d of Object.entries(y)){let R=d[0],U=()=>{let b=e.value()[u];return P(b)&&(b=b()),b=b[R],P(b)&&(b=b()),b},E=y[R+"_flags"];i.push(En(t,R,U,E))}else M(2,name,t)}return a}},us=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e!=null||(e="");let n=t.split(".").concat(e.split(","));t=n[0];let r=n[1],o=n.includes("ctrl"),s=n.includes("shift"),i=n.includes("alt"),a=n.includes("meta"),c=p=>!(o&&!p.ctrlKey||s&&!p.shiftKey||i&&!p.altKey||a&&!p.metaKey);return r?[t,p=>c(p)?p.key.toUpperCase()===r.toUpperCase():!1]:[t,c]}return[t,n=>!0]},En=(t,e,n,r)=>{if(z(e))return M(5,name,t),()=>{};let o=ms(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=us(e,r);let a=f=>{if(!i(f)||!n&&e==="submit"&&(o!=null&&o.prevent))return;let l=n(f);P(l)&&(l=l(f)),P(l)&&l(f)},c=()=>{t.removeEventListener(e,p,s)},p=f=>{if(!o){a(f);return}try{if(o.left&&f.button!==0||o.middle&&f.button!==1||o.right&&f.button!==2||o.self&&f.target!==t)return;o.stop&&f.stopPropagation(),o.prevent&&f.preventDefault(),a(f)}finally{o.once&&c()}};return t.addEventListener(e,p,s),c};var Ur={onChange:(t,e,n,r,o,s)=>{if(r){s&&s.includes("camel")&&(r=V(r)),Ge(t,r,e[0]);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(T(c)){let p=c[0],f=c[1];Ge(t,p,f)}else if(A(c))for(let p of Object.entries(c)){let f=p[0],l=p[1];Ge(t,f,l)}else{let p=e[a++],f=e[a];Ge(t,p,f)}}}};function ds(t){return!!t||t===""}var Ge=(t,e,n)=>{if(te(e)){M(3,name,t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(ae),1),t[e]=n!=null?n:"";return}let r=t.tagName;if(e==="value"&&r!=="PROGRESS"&&!r.includes("-")){t._value=n;let s=r==="OPTION"?t.getAttribute("value"):t.value,i=n!=null?n:"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let o=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=ds(n):n==null&&s==="string"?(n="",o=!0):s==="number"&&(n=0,o=!0)}try{t[e]=n}catch(s){o||M(4,e,r,n,s)}o&&t.removeAttribute(e)};var Hr={once:!0,onBind:(t,e,n)=>{let r=e.value()[0],o=T(r),s=e.refs[0];return o?r.push(t):s?s==null||s(t):e.context[n]=t,()=>{if(o){let i=r.indexOf(t);i!==-1&&r.splice(i,1)}else s==null||s(null)}}};var _r={onChange:(t,e)=>{let n=ge(t).data,r=n._ord;In(r)&&(r=n._ord=t.style.display),!!e[0]?t.style.display=r:t.style.display="none"}};var vn={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n==null?void 0:n[o];if(T(s)){let a=s.length;for(let c=0;c<a;++c)Br(t,s[c],i==null?void 0:i[c])}else Br(t,s,i)}}},Br=(t,e,n)=>{let r=t.style,o=j(e);if(e&&!o){if(n&&!j(n))for(let s in n)e[s]==null&&xn(r,s,"");for(let s in e)xn(r,s,e[s])}else{let s=r.display;if(o?n!==e&&(r.cssText=e):n&&t.removeAttribute("style"),"_ord"in ge(t).data)return;r.display=s}},Pr=/\s*!important$/;function xn(t,e,n){if(T(n))n.forEach(r=>{xn(t,e,r)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let r=ys(t,e);Pr.test(n)?t.setProperty(je(r),n.replace(Pr,""),"important"):t[r]=n}}var jr=["Webkit","Moz","ms"],Rn={};function ys(t,e){let n=Rn[e];if(n)return n;let r=V(e);if(r!=="filter"&&r in t)return Rn[e]=r;r=ot(r);for(let o=0;o<jr.length;o++){let s=jr[o]+r;if(s in t)return Rn[e]=s}return e}var X=t=>Vr(D(t)),Vr=(t,e=new WeakMap)=>{if(!t||!A(t))return t;if(T(t))return t.map(X);if(Y(t)){let r=new Set;for(let o of t.keys())r.add(X(o));return r}if(he(t)){let r=new Map;for(let o of t)r.set(X(o[0]),X(o[1]));return r}if(e.has(t))return D(e.get(t));let n=ft({},t);e.set(t,n);for(let r of Object.entries(n))n[r[0]]=Vr(D(r[1]),e);return n};var $r={onChange:(t,e)=>{var r;let n=e[0];t.textContent=Y(n)?JSON.stringify(X([...n])):he(n)?JSON.stringify(X([...n])):A(n)?JSON.stringify(X(n)):(r=n==null?void 0:n.toString())!=null?r:""}};var Fr={onChange:(t,e)=>{Ge(t,"value",e[0])}};var Ie=t=>(t==null?void 0:t[ut])===1;var xe=t=>{if(Ve(t))return t;let e;if(h(t)?(e=t,t=e()):e=G(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[ut]=1,T(t)){let n=t.length;for(let r=0;r<n;++r){let o=t[r];Ie(o)||(t[r]=xe(o))}return e}if(!A(t))return e;for(let n of Object.entries(t)){let r=n[1];if(Ie(r))continue;let o=n[0];et(o)||(t[o]=null,t[o]=xe(r))}return e};var ve=class ve{constructor(e){m(this,"H",{});m(this,"f",{});m(this,"et",()=>Object.keys(this.H).filter(e=>e.length===1||!e.startsWith(":")));m(this,"he",new Map);m(this,"ge",new Map);m(this,"forGrowThreshold",10);m(this,"globalContext");m(this,"useInterpolation",!0);m(this,"useBracketInterpolation",!1);if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.Et()}static getDefault(){var e;return(e=ve.$e)!=null?e:ve.$e=new ve}Et(){let e={},n=globalThis;for(let r of ve.xt.split(","))e[r]=n[r];return e.ref=xe,e.sref=G,e.flatten=X,e}addComponent(...e){for(let n of e){if(!n.defaultName){tt.warning("Registered component's default name is not defined",n);continue}this.he.set(ot(n.defaultName),n),this.ge.set(ot(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.H={".":Ur,":":bn,"@":Cn,[`${e}on`]:Cn,[`${e}bind`]:bn,[`${e}html`]:xr,[`${e}text`]:$r,[`${e}show`]:_r,[`${e}model`]:wr,":style":vn,[`${e}bind:style`]:vn,":class":Tn,[`${e}bind:class`]:Tn,":ref":Hr,":value":Fr,teleport:kt},this.f={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,props:":props",propsOnce:":props-once",bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.H,this.f)}};m(ve,"$e"),m(ve,"xt","Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console");var Z=ve;var Kt=(t,e)=>{if(!t)return;let n=e!=null?e:Z.getDefault(),r=n.f,o=n.useBracketInterpolation?"[[":"{{",s=n.useBracketInterpolation?"]]":"}}",i=n.useBracketInterpolation?/(\[\[[^]*?\]\])/g:/({{[^]*?}})/g;for(let a of gs(t,r.pre,o))hs(a,r.text,i,o,s)},hs=(t,e,n,r,o)=>{var p;let s=t.textContent;if(!s)return;let i=n,a=s.split(i);if(a.length<=1)return;if(((p=t.parentElement)==null?void 0:p.childNodes.length)===1&&a.length===3){let f=a[1];if(z(a[0])&&z(a[2])&&f.startsWith(r)&&f.endsWith(o)){let l=t.parentElement;l.setAttribute(e,f.substring(2,f.length-2)),l.innerText="";return}}let c=document.createDocumentFragment();for(let f of a)if(f.startsWith(r)&&f.endsWith(o)){let l=document.createElement("span");l.setAttribute(e,f.substring(2,f.length-2)),c.appendChild(l)}else c.appendChild(document.createTextNode(f));t.replaceWith(c)},gs=(t,e,n)=>{let r=[],o=s=>{var i,a;if(s.nodeType===Node.TEXT_NODE)(i=s.textContent)!=null&&i.includes(n)&&r.push(s);else{if((a=s==null?void 0:s.hasAttribute)!=null&&a.call(s,e))return;for(let c of me(s))o(c)}};return o(t),r};var bs="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",Ts=new Set(bs.toUpperCase().split(",")),Es="http://www.w3.org/2000/svg",qr=(t,e)=>{ce(t)?t.content.appendChild(e):t.appendChild(e)},Sn=(t,e,n,r)=>{var i;let o=t.t;if(o){let a=n&&Ts.has(o.toUpperCase())?document.createElementNS(Es,o.toLowerCase()):document.createElement(o),c=t.a;if(c)for(let f of Object.entries(c)){let l=f[0],u=f[1];l.startsWith("#")&&(u=l.substring(1),l="name"),a.setAttribute(bt(l,r),u)}let p=t.c;if(p)for(let f of p)Sn(f,a,n,r);qr(e,a);return}let s=t.d;if(s){let a;switch((i=t.n)!=null?i:Node.TEXT_NODE){case Node.COMMENT_NODE:a=document.createComment(s);break;case Node.TEXT_NODE:a=document.createTextNode(s);break}if(a)qr(e,a);else throw new Error("unsupported node type.")}},De=(t,e,n)=>{n!=null||(n=Z.getDefault());let r=document.createDocumentFragment();if(!T(t))return Sn(t,r,!!e,n),r;for(let o of t)Sn(o,r,!!e,n);return r};var zr=(t,e={selector:"#app"},n)=>{j(e)&&(e={selector:"#app",template:e}),Xn(t)&&(t=t.context);let r=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!r||!Ne(r))throw I(0);n||(n=Z.getDefault());let o=()=>{for(let a of[...r.childNodes])F(a)},s=a=>{for(let c of a)r.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(e.template);o(),s(a.childNodes),e.element=a}else if(e.json){let a=De(e.json,e.isSVG,n);o(),s(a.childNodes)}return n.useInterpolation&&Kt(r,n),new wn(t,r,n).x(),_(r,()=>{Ce(t)}),Nt(t),{context:t,unmount:()=>{F(r)},unbind:()=>{ae(r)}}},wn=class{constructor(e,n,r){m(this,"Rt");m(this,"Fe");m(this,"o");m(this,"h");m(this,"p");this.Rt=e,this.Fe=n,this.o=r,this.h=new Vt([e],r),this.p=new It(this.h)}x(){this.p.G(this.Fe)}};var Je=t=>{if(T(t))return t.map(o=>Je(o));let e={};if(t.tagName)e.t=t.tagName;else return t.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),t.textContent&&(e.d=t.textContent),e;let n=t.getAttributeNames();n.length>0&&(e.a=Object.fromEntries(n.map(o=>[o,t.getAttribute(o)])));let r=me(t);return r.length>0&&(e.c=[...r].map(o=>Je(o))),e};var Kr=(t,e={})=>{var s,i,a,c,p,f;T(e)&&(e={props:e}),j(t)&&(t={template:t});let n=(s=e.context)!=null?s:()=>({}),r=!1;if(t.element){let l=t.element;l.remove(),t.element=l}else if(t.selector){let l=document.querySelector(t.selector);if(!l)throw I(1,t.selector);l.remove(),t.element=l}else if(t.template){let l=document.createRange().createContextualFragment(t.template);t.element=l}else t.json&&(t.element=De(t.json,t.isSVG,e.config),r=!0);t.element||(t.element=document.createDocumentFragment()),((i=e.useInterpolation)==null||i)&&Kt(t.element,(a=e.config)!=null?a:Z.getDefault());let o=t.element;if(!r&&(((p=t.isSVG)!=null?p:rt(o)&&((c=o.hasAttribute)!=null&&c.call(o,"isSVG")))||rt(o)&&o.querySelector("[isSVG]"))){let l=t.element.content,u=l?[...l.childNodes]:[...o.childNodes],y=Je(u);t.element=De(y,!0,e.config)}return{context:n,template:t.element,inheritAttrs:(f=e.inheritAttrs)!=null?f:!0,props:e.props,defaultName:e.defaultName}};var Wr=t=>{let e,n={},r=(...o)=>{if(o.length<=2&&0 in o)throw I(4);return e&&!n.isStopped?e(...o):(e=Cs(t,n),e(...o))};return r[Q]=1,Ee(r,!0),r.stop=()=>{var o,s;return(s=(o=n.ref)==null?void 0:o.stop)==null?void 0:s.call(o)},J(()=>r.stop(),!0),r},Cs=(t,e)=>{var s;let n=(s=e.ref)!=null?s:G(null);e.ref=n,e.isStopped=!1;let r=0,o=Le(()=>{if(r>0){o(),e.isStopped=!0,K(n);return}n(t()),++r});return n.stop=o,n};var Gr=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return r&&!n.isStopped?r(...s):(r=Rs(t,e,n),r(...s))};return o[Q]=1,Ee(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},J(()=>o.stop(),!0),o},Rs=(t,e,n)=>{var a;let r=(a=n.ref)!=null?a:G(null);n.ref=r,n.isStopped=!1;let o=0,s=c=>{if(o>0){r.stop(),n.isStopped=!0,K(r);return}r(e(...t.map(p=>p()))),++o},i=[];for(let c of t){let p=w(c,s);i.push(p)}return s(null),r.stop=()=>{i.forEach(c=>{c()})},r};var Jr=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return r&&!n.isStopped?r(...s):(r=xs(t,e,n),r(...s))};return o[Q]=1,Ee(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},J(()=>o.stop(),!0),o},xs=(t,e,n)=>{var s;let r=(s=n.ref)!=null?s:G(null);n.ref=r,n.isStopped=!1;let o=0;return r.stop=w(t,i=>{if(o>0){r.stop(),n.isStopped=!0,K(r);return}r(e(i)),++o},!0),r};var Qr=t=>(t[dt]=1,t);var Xr=(t,e)=>{if(!e)throw I(5);let r=Ie(t)?xe:a=>a,o=()=>localStorage.setItem(e,JSON.stringify(X(t()))),s=localStorage.getItem(e);if(s!=null)try{t(r(JSON.parse(s)))}catch(a){M(6,`persist: failed to parse data for key ${e}`,a),o()}else o();let i=Le(o);return J(i,!0),t};var On=(t,...e)=>{let n="",r=t,o=e,s=r.length,i=o.length;for(let a=0;a<s;++a)n+=r[a],a<i&&(n+=o[a]);return n},Yr=On;var Zr=(t,e,n)=>{let r=[],o=()=>{e(t.map(i=>i()))};for(let i of t)r.push(w(i,o));n&&o();let s=()=>{for(let i of r)i()};return J(s,!0),s};var eo=t=>{if(!h(t))throw I(3,"observerCount");return t(void 0,void 0,2)};var to=t=>{An();try{t()}finally{Nn()}},An=()=>{pe.stack||(pe.stack=[]),pe.stack.push(new Set)},Nn=()=>{let t=pe.stack;if(!t||t.length===0)return;let e=t.pop();if(t.length){let n=t[t.length-1];for(let r of e)n.add(r);return}delete pe.stack;for(let n of e)try{K(n)}catch(r){console.error(r)}};var no=t=>{var e;(e=Ae())==null||e.onMounted.push(t)};
|
|
1
|
+
"use strict";var ct=Object.defineProperty,oo=Object.defineProperties,so=Object.getOwnPropertyDescriptor,io=Object.getOwnPropertyDescriptors,ao=Object.getOwnPropertyNames,Mn=Object.getOwnPropertySymbols;var Ln=Object.prototype.hasOwnProperty,co=Object.prototype.propertyIsEnumerable;var pt=Math.pow,Jt=(t,e,n)=>e in t?ct(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ft=(t,e)=>{for(var n in e||(e={}))Ln.call(e,n)&&Jt(t,n,e[n]);if(Mn)for(var n of Mn(e))co.call(e,n)&&Jt(t,n,e[n]);return t},kn=(t,e)=>oo(t,io(e));var po=(t,e)=>{for(var n in e)ct(t,n,{get:e[n],enumerable:!0})},fo=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ao(e))!Ln.call(t,o)&&o!==n&&ct(t,o,{get:()=>e[o],enumerable:!(r=so(e,o))||r.enumerable});return t};var lo=t=>fo(ct({},"__esModule",{value:!0}),t);var m=(t,e,n)=>Jt(t,typeof e!="symbol"?e+"":e,n);var Ss={};po(Ss,{ComponentHead:()=>Fe,RegorConfig:()=>Z,addUnbinder:()=>_,batch:()=>no,collectRefs:()=>Et,computeMany:()=>Jr,computeRef:()=>Qr,computed:()=>Gr,createApp:()=>Kr,createComponent:()=>Wr,endBatch:()=>Nn,entangle:()=>At,flatten:()=>X,getBindData:()=>ge,html:()=>On,isDeepRef:()=>Ie,isRaw:()=>Ve,isRef:()=>h,markRaw:()=>Xr,observe:()=>w,observeMany:()=>eo,observerCount:()=>to,onMounted:()=>ro,onUnmounted:()=>J,pause:()=>qt,persist:()=>Yr,raw:()=>Zr,ref:()=>xe,removeNode:()=>F,resume:()=>zt,silence:()=>Tt,sref:()=>G,startBatch:()=>An,toFragment:()=>De,toJsonTemplate:()=>Je,trigger:()=>K,unbind:()=>ae,unref:()=>D,useScope:()=>Ot,warningHandler:()=>tt,watchEffect:()=>Le});module.exports=lo(Ss);var P=t=>typeof t=="function",j=t=>typeof t=="string",In=t=>typeof t=="undefined",te=t=>t==null||typeof t=="undefined",z=t=>typeof t!="string"||!(t!=null&&t.trim()),mo=Object.prototype.toString,Qt=t=>mo.call(t),he=t=>Qt(t)==="[object Map]",Y=t=>Qt(t)==="[object Set]",Xt=t=>Qt(t)==="[object Date]",et=t=>typeof t=="symbol",T=Array.isArray,A=t=>t!==null&&typeof t=="object";var Dn={0:"createApp can't find root element. You must define either a valid `selector` or an `element`. Example: createApp({}, {selector: '#app', html: '...'})",1:t=>`Component template cannot be found. selector: ${t} .`,2:"Use composables in scope. usage: useScope(() => new MyApp()).",3:t=>`${t} requires ref source argument`,4:"computed is readonly.",5:"persist requires a string key."},I=(t,...e)=>{let n=Dn[t];return new Error(P(n)?n.call(Dn,...e):n)};var He=Symbol(":regor");var ge=t=>{let e=t[He];if(e)return e;let n={unbinders:[],data:{}};return t[He]=n,n};var _=(t,e)=>{ge(t).unbinders.push(e)};var lt=[],Un=()=>{let t={onMounted:[],onUnmounted:[]};return lt.push(t),t},Ae=t=>{let e=lt[lt.length-1];if(!e&&!t)throw I(2);return e},Hn=t=>{let e=Ae();return t&&Zt(t),lt.pop(),e},Yt=Symbol("csp"),Zt=t=>{let e=t,n=e[Yt];if(n){let r=Ae();if(n===r)return;r.onMounted.length>0&&n.onMounted.push(...r.onMounted),r.onUnmounted.length>0&&n.onUnmounted.push(...r.onUnmounted);return}e[Yt]=Ae()},mt=t=>t[Yt];var J=(t,e)=>{var n;(n=Ae(e))==null||n.onUnmounted.push(t)};var ut=Symbol("ref"),Q=Symbol("sref"),dt=Symbol("raw");var h=t=>(t==null?void 0:t[Q])===1;var w=(t,e,n)=>{if(!h(t))throw I(3,"observe");n&&e(t());let o=t(void 0,void 0,0,e);return J(o,!0),o};var ae=t=>{let e=[t];for(;e.length>0;){let n=e.shift();uo(n);let r=n.childNodes;if(r)for(let o of r)e.push(o)}},uo=t=>{let e=t[He];if(e){for(let n of e.unbinders)n();e.unbinders.splice(0),delete t[He]}};var F=t=>{t.remove(),setTimeout(()=>ae(t),1)};var _n={8:t=>`Model binding requires a ref at ${t.outerHTML}`,7:t=>`Model binding is not supported on ${t.tagName} element at ${t.outerHTML}`,0:(t,e)=>`${t} binding expression is missing at ${e.outerHTML}`,1:(t,e,n)=>`invalid ${t} expression: ${e} at ${n.outerHTML}`,2:(t,e)=>`${t} requires object expression at ${e.outerHTML}`,3:(t,e)=>`${t} binder: key is empty on ${e.outerHTML}.`,4:(t,e,n,r)=>({msg:`Failed setting prop "${t}" on <${e.toLowerCase()}>: value ${n} is invalid.`,args:[r]}),5:(t,e)=>`${t} binding missing event type at ${e.outerHTML}`,6:(t,e)=>({msg:t,args:[e]})},M=(t,...e)=>{let n=_n[t],r=P(n)?n.call(_n,...e):n,o=tt.warning;o&&(j(r)?o(r):o(r,...r.args))},tt={warning:console.warn};var ht={},yt={},Bn=1,Pn=t=>{let e=(Bn++).toString();return ht[e]=t,yt[e]=0,e},en=t=>{yt[t]+=1},tn=t=>{--yt[t]===0&&(delete ht[t],delete yt[t])},jn=t=>ht[t],nn=()=>Bn!==1&&Object.keys(ht).length>0,nt="r-switch",yo=t=>{let e=t.filter(r=>Ne(r)).map(r=>[...r.querySelectorAll("[r-switch]")].map(o=>o.getAttribute(nt))),n=new Set;return e.forEach(r=>{r.forEach(o=>o&&n.add(o))}),[...n]},_e=(t,e)=>{if(!nn())return;let n=yo(e);n.length!==0&&(n.forEach(en),_(t,()=>{n.forEach(tn)}))};var rn=(t,e,n,r)=>{let o=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,r),o.push(i)}Te(e,o)},on=Symbol("r-if"),Vn=Symbol("r-else"),$n=t=>t[Vn]===1,gt=class{constructor(e){m(this,"p");m(this,"P");m(this,"q");m(this,"K");m(this,"z");m(this,"b");m(this,"T");this.p=e,this.P=e.o.f.if,this.q=Pe(e.o.f.if),this.K=e.o.f.else,this.z=e.o.f.elseif,this.b=e.o.f.for,this.T=e.o.f.pre}qe(e,n){let r=e.parentElement;for(;r!==null&&r!==document.documentElement;){if(r.hasAttribute(n))return!0;r=r.parentElement}return!1}N(e){let n=e.hasAttribute(this.P),r=be(e,this.q);for(let o of r)this.x(o);return n}W(e){return e[on]?!0:(e[on]=!0,be(e,this.q).forEach(n=>n[on]=!0),!1)}x(e){if(e.hasAttribute(this.T)||this.W(e)||this.qe(e,this.b))return;let n=e.getAttribute(this.P);if(!n){M(0,this.P,e);return}e.removeAttribute(this.P),this.k(e,n)}B(e,n,r){let o=Be(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${r!=null?r:""}`);s.insertBefore(i,e),_e(i,o),o.forEach(c=>{F(c)}),e.remove(),n!=="if"&&(e[Vn]=1);let a=document.createComment(`__end__ :${n}${r!=null?r:""}`);return s.insertBefore(a,i.nextSibling),{nodes:o,parent:s,commentBegin:i,commentEnd:a}}pe(e,n){if(!e)return[];let r=e.nextElementSibling;if(e.hasAttribute(this.K)){e.removeAttribute(this.K);let{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.B(e,"else");return[{mount:()=>{rn(o,this.p,s,a)},unmount:()=>{le(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let o=e.getAttribute(this.z);if(!o)return[];e.removeAttribute(this.z);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.B(e,"elseif",` => ${o} `),p=this.p.h.C(o),f=p.value,l=this.pe(r,n),u=[];_(a,()=>{p.stop();for(let R of u)R();u.length=0});let d=w(f,n);return u.push(d),[{mount:()=>{rn(s,this.p,i,c)},unmount:()=>{le(a,c)},isTrue:()=>!!f()[0],isMounted:!1}].concat(l)}}k(e,n){let r=e.nextElementSibling,{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.B(e,"if",` => ${n} `),c=this.p.h.C(n),p=c.value,f=!1,l=this.p.h,u=l.V(),y=()=>{l.v(u,()=>{if(p()[0])f||(rn(o,this.p,s,a),f=!0),d.forEach(b=>{b.unmount(),b.isMounted=!1});else{le(i,a),f=!1;let b=!1;for(let L of d)!b&&L.isTrue()?(L.isMounted||(L.mount(),L.isMounted=!0),b=!0):(L.unmount(),L.isMounted=!1)}})},d=this.pe(r,y),R=[];_(i,()=>{c.stop();for(let b of R)b();R.length=0}),y();let E=w(p,y);R.push(E)}};var Be=t=>{let e=ce(t)?t.content.childNodes:[t];return Array.from(e).filter(n=>{let r=n==null?void 0:n.tagName;return r!=="SCRIPT"&&r!=="STYLE"})},Te=(t,e)=>{for(let n of e)!$n(n)&&t.G(n)},be=(t,e)=>{var r;let n=t.querySelectorAll(e);return(r=t.matches)!=null&&r.call(t,e)?[t,...n]:n},ce=t=>t instanceof HTMLTemplateElement,Ne=t=>t.nodeType===Node.ELEMENT_NODE,rt=t=>t.nodeType===Node.ELEMENT_NODE,Fn=t=>t instanceof HTMLSlotElement,me=t=>ce(t)?t.content.childNodes:t.childNodes,le=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let r=n.nextSibling;F(n),n=r}},Ee=(t,e)=>{Object.defineProperty(t,"value",{get(){return t()},set(n){if(e)throw new Error("value is readonly.");return t(n)},enumerable:!0,configurable:!1})},qn=(t,e)=>{if(!t)return!1;if(t.startsWith("["))return t.substring(1,t.length-1);let n=e.length;return t.startsWith(e)?t.substring(n,t.length-n):!1},Pe=t=>`[${CSS.escape(t)}]`,bt=(t,e)=>(t.startsWith("@")&&(t=e.f.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.f.dynamic)),t),sn=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},ho=/-(\w)/g,V=sn(t=>t&&t.replace(ho,(e,n)=>n?n.toUpperCase():"")),go=/\B([A-Z])/g,je=sn(t=>t&&t.replace(go,"-$1").toLowerCase()),ot=sn(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var ne=[],zn=t=>{var e;ne.length!==0&&((e=ne[ne.length-1])==null||e.add(t))},Le=t=>{if(!t)return()=>{};let e={stop:()=>{}};return bo(t,e),J(()=>e.stop(),!0),e.stop},bo=(t,e)=>{if(!t)return;let n=[],r=!1,o=()=>{for(let s of n)s();n=[],r=!0};e.stop=o;try{let s=new Set;if(ne.push(s),t(i=>n.push(i)),r)return;for(let i of[...s]){let a=w(i,()=>{o(),Le(t)});n.push(a)}}finally{ne.pop()}},Tt=t=>{let e=ne.length,n=e>0&&ne[e-1];try{return n&&ne.push(null),t()}finally{n&&ne.pop()}},Et=t=>{try{let e=new Set;return ne.push(e),{value:t(),refs:[...e]}}finally{ne.pop()}};var Ve=t=>!!t&&t[dt]===1;var K=(t,e,n)=>{if(!h(t))return;let r=t;if(r(void 0,e,1),!n)return;let o=r();if(o){if(T(o)||Y(o))for(let s of o)K(s,e,!0);else if(he(o))for(let s of o)K(s[0],e,!0),K(s[1],e,!0);if(A(o))for(let s in o)K(o[s],e,!0)}};function To(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var $e=(t,e,n)=>{n.forEach(function(r){let o=t[r];To(e,r,function(...i){let a=o.apply(this,i),c=this[Q];for(let p of c)K(p);return a})})},Ct=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var Kn=Array.prototype,an=Object.create(Kn),Eo=["push","pop","shift","unshift","splice","sort","reverse"];$e(Kn,an,Eo);var Wn=Map.prototype,Rt=Object.create(Wn),Co=["set","clear","delete"];Ct(Rt,"Map");$e(Wn,Rt,Co);var Gn=Set.prototype,xt=Object.create(Gn),Ro=["add","clear","delete"];Ct(xt,"Set");$e(Gn,xt,Ro);var pe={},G=t=>{if(h(t)||Ve(t))return t;let e={auto:!0,_value:t},n=c=>A(c)?Q in c?!0:T(c)?(Object.setPrototypeOf(c,an),!0):Y(c)?(Object.setPrototypeOf(c,xt),!0):he(c)?(Object.setPrototypeOf(c,Rt),!0):!1:!1,r=n(t),o=new Set,s=(c,p)=>{if(pe.stack&&pe.stack.length){pe.stack[pe.stack.length-1].add(a);return}o.size!==0&&Tt(()=>{for(let f of[...o.keys()])o.has(f)&&f(c,p)})},i=c=>{let p=c[Q];p||(c[Q]=p=new Set),p.add(a)},a=(...c)=>{if(!(2 in c)){let f=c[0],l=c[1];return 0 in c?e._value===f||h(f)&&(f=f(),e._value===f)?f:(n(f)&&i(f),e._value=f,e.auto&&s(f,l),e._value):(zn(a),e._value)}switch(c[2]){case 0:{let f=c[3];if(!f)return()=>{};let l=u=>{o.delete(u)};return o.add(f),()=>{l(f)}}case 1:{let f=c[1],l=e._value;s(l,f);break}case 2:return o.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[Q]=1,Ee(a,!1),r&&i(t),a};var D=t=>h(t)?t():t;var st=class{constructor(e){m(this,"E",[]);m(this,"_",new Map);m(this,"J");this.J=e}get S(){return this.E.length}Q(e){let n=this.J(e.value);n!==void 0&&this._.set(n,e)}X(e){var r;let n=this.J((r=this.E[e])==null?void 0:r.value);n!==void 0&&this._.delete(n)}static Ke(e,n){return{items:[],index:e,value:n,order:-1}}w(e){e.order=this.S,this.E.push(e),this.Q(e)}ze(e,n){let r=this.S;for(let o=e;o<r;++o)this.E[o].order=o+1;n.order=e,this.E.splice(e,0,n),this.Q(n)}I(e){return this.E[e]}Y(e,n){this.X(e),this.E[e]=n,this.Q(n),n.order=e}ce(e){this.X(e),this.E.splice(e,1);let n=this.S;for(let r=e;r<n;++r)this.E[r].order=r}fe(e){let n=this.S;for(let r=e;r<n;++r)this.X(r);this.E.splice(e)}Ct(e){return this._.has(e)}We(e){var r;let n=this._.get(e);return(r=n==null?void 0:n.order)!=null?r:-1}};var cn=Symbol("r-for"),St=class St{constructor(e){m(this,"p");m(this,"b");m(this,"Z");m(this,"T");this.p=e,this.b=e.o.f.for,this.Z=Pe(this.b),this.T=e.o.f.pre}N(e){let n=e.hasAttribute(this.b),r=be(e,this.Z);for(let o of r)this.Ge(o);return n}W(e){return e[cn]?!0:(e[cn]=!0,be(e,this.Z).forEach(n=>n[cn]=!0),!1)}Ge(e){if(e.hasAttribute(this.T)||this.W(e))return;let n=e.getAttribute(this.b);if(!n){M(0,this.b,e);return}e.removeAttribute(this.b),this.Je(e,n)}le(e){return te(e)?[]:(P(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(r=>({*[Symbol.iterator](){for(let o=1;o<=r;o++)yield o}}))(e):Object.entries(e))}Je(e,n){var oe;let r=this.Qe(n);if(!(r!=null&&r.list)){M(1,this.b,n,e);return}let o=this.p.o.f.key,s=this.p.o.f.keyBind,i=(oe=e.getAttribute(o))!=null?oe:e.getAttribute(s);e.removeAttribute(o),e.removeAttribute(s);let a=i?v=>{var N;return D((N=D(v))==null?void 0:N[i])}:v=>v,c=(v,N)=>a(v)===a(N),p=Be(e),f=e.parentNode;if(!f)return;let l=`${this.b} => ${n}`,u=new Comment(`__begin__ ${l}`);f.insertBefore(u,e),_e(u,p),p.forEach(v=>{F(v)}),e.remove();let y=new Comment(`__end__ ${l}`);f.insertBefore(y,u.nextSibling);let d=this.p,R=d.h,U=R.V(),E=(v,N,q)=>{let S=r.createContext(N,v),ee=st.Ke(S.index,N);return R.v(U,()=>{R.w(S.ctx);let se=q.previousSibling,Ue=[];for(let Ze of p){let g=Ze.cloneNode(!0);f.insertBefore(g,q),Ue.push(g)}for(Te(d,Ue),se=se.nextSibling;se!==q;)ee.items.push(se),se=se.nextSibling}),ee},b=(v,N)=>{let q=k.I(v).items,S=q[q.length-1].nextSibling;for(let ee of q)F(ee);k.Y(v,E(v,N,S))},L=(v,N)=>{k.w(E(v,N,y))},H=v=>{for(let N of k.I(v).items)F(N)},re=v=>{let N=k.S;for(let q=v;q<N;++q)k.I(q).index(q)},Qe=v=>{let N=k.S;P(v)&&(v=v());let q=D(v[0]);if(T(q)&&q.length===0){le(u,y),k.fe(0);return}let S=0,ee=Number.MAX_SAFE_INTEGER,se=N,Ue=this.p.o.forGrowThreshold,Ze=()=>k.S<se+Ue;for(let O of this.le(v[0])){let C=()=>{if(S<N){let W=k.I(S++);if(c(W.value,O))return;let $=k.We(a(O));if($>=S&&$-S<10){if(--S,ee=Math.min(ee,S),H(S),k.ce(S),--N,$>S+1)for(let x=S;x<$-1&&x<N&&!c(k.I(S).value,O);)++x,H(S),k.ce(S),--N;C();return}Ze()?(k.ze(S-1,E(S,O,k.I(S-1).items[0])),ee=Math.min(ee,S-1),++N):b(S-1,O)}else L(S++,O)};C()}let g=S;for(N=k.S;S<N;)H(S++);k.fe(g),re(ee)},Xe=()=>{at=w(ye,Qe)},Wt=()=>{Ye.stop(),at()},Ye=R.C(r.list),ye=Ye.value,at,Se=0,k=new st(a);for(let v of this.le(ye()[0]))k.w(E(Se++,v,y));_(u,Wt),Xe()}Qe(e){var c,p;let n=St.Xe.exec(e);if(!n)return;let r=(n[1]+((c=n[2])!=null?c:"")).split(",").map(f=>f.trim()),o=r.length>1?r.length-1:-1,s=o!==-1&&(r[o]==="index"||(p=r[o])!=null&&p.startsWith("#"))?r[o]:"";s&&r.splice(o,1);let i=n[3];if(!i||r.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(f,l)=>{let u={},y=D(f);if(!a&&r.length===1)u[r[0]]=f;else if(T(y)){let R=0;for(let U of r)u[U]=y[R++]}else for(let R of r)u[R]=y[R];let d={ctx:u,index:G(-1)};return s&&(d.index=u[s.startsWith("#")?s.substring(1):s]=G(l)),d}}}};m(St,"Xe",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var vt=St;var xo=(t,e)=>{for(let n of t){let r=n.cloneNode(!0);e.appendChild(r)}},wt=class{constructor(e){m(this,"p");m(this,"D");m(this,"ue");this.p=e,this.D=e.o.f.is,this.ue=Pe(this.D)+", [is]"}N(e){let n=e.hasAttribute(this.D),r=be(e,this.ue);for(let o of r)this.x(o);return n}x(e){let n=e.getAttribute(this.D);if(!n){if(n=e.getAttribute("is"),!n||!n.startsWith("regor:"))return;n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.D),this.k(e,n)}B(e,n){let r=Be(e),o=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);o.insertBefore(s,e),_e(s,r),r.forEach(a=>{F(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n!=null?n:""}`);return o.insertBefore(i,s.nextSibling),{nodes:r,parent:o,commentBegin:s,commentEnd:i}}k(e,n){let{nodes:r,parent:o,commentBegin:s,commentEnd:i}=this.B(e,` => ${n} `),a=this.p.h.C(n),c=a.value,p=this.p.h,f=p.V(),l={name:""},u=ce(e)?r:[...r[0].childNodes],y=()=>{p.v(f,()=>{var L;let E=c()[0];if(A(E)&&(E.name?E=E.name:E=(L=Object.entries(p.me()).filter(H=>H[1]===E)[0])==null?void 0:L[0]),!j(E)||z(E)){le(s,i);return}if(l.name===E)return;le(s,i);let b=document.createElement(E);for(let H of e.getAttributeNames())H!==this.D&&b.setAttribute(H,e.getAttribute(H));xo(u,b),o.insertBefore(b,i),this.p.G(b),l.name=E})},d=[];_(s,()=>{a.stop();for(let E of d)E();d.length=0}),y();let U=w(c,y);d.push(U)}};var Jn={collectRefObj:!0,onBind:(t,e)=>w(e.value,()=>{let r=e.value(),o=e.context,s=r[0];if(A(s))for(let i of Object.entries(s)){let a=i[0],c=i[1],p=o[a];p!==c&&(h(p)?p(c):o[a]=c)}},!0)};var Qn={collectRefObj:!0,once:!0,onBind:(t,e)=>{let n=e.value(),r=e.context,o=n[0];if(!A(o))return()=>{};for(let s of Object.entries(o)){let i=s[0],a=s[1],c=r[i];c!==a&&(h(c)?c(a):r[i]=a)}return()=>{}}};var Ce=t=>{var n,r;let e=(n=mt(t))==null?void 0:n.onUnmounted;e==null||e.forEach(o=>{o()}),(r=t.unmounted)==null||r.call(t)};var Fe=class{constructor(e,n,r,o,s){m(this,"props");m(this,"start");m(this,"end");m(this,"ctx");m(this,"autoProps",!0);m(this,"entangle",!0);m(this,"enableSwitch",!1);m(this,"onAutoPropsAssigned");m(this,"de");m(this,"emit",(e,n)=>{this.de.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.de=n,this.ctx=r,this.start=o,this.end=s}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)F(e),e=e.nextSibling;Ce(this)}};var pn=Symbol("scope"),Ot=t=>{try{Un();let e=t();Zt(e);let n={context:e,unmount:()=>Ce(e),[pn]:1};return n[pn]=1,n}finally{Hn()}},Xn=t=>A(t)?pn in t:!1;var At=(t,e)=>{if(t===e)return()=>{};let n=w(t,o=>e(o)),r=w(e,o=>t(o));return e(t()),()=>{n(),r()}};var Nt=t=>{var n,r;let e=(n=mt(t))==null?void 0:n.onMounted;e==null||e.forEach(o=>{o()}),(r=t.mounted)==null||r.call(t)};var Yn={collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(!r)return()=>{};let i=V(r);return w(e.value,()=>{var l;let c=(l=e.refs[0])!=null?l:e.value()[0],p=e.context,f=p[r];f!==c&&(h(f)?f(c):p[i]=c)},!0)}};var Mt=class{constructor(e){m(this,"p");m(this,"ye");this.p=e,this.ye=e.o.f.inherit}N(e){this.Ye(e)}Ye(e){var l;let n=this.p,r=n.h,o=n.o.he,s=n.o.ge,i=r.me(),a=r.Ze(),c=[...o.keys(),...a,...[...o.keys()].map(je),...a.map(je)].join(",");if(z(c))return;let p=e.querySelectorAll(c),f=(l=e.matches)!=null&&l.call(e,c)?[e,...p]:p;for(let u of f){if(u.hasAttribute(n.T))continue;let y=u.parentNode;if(!y)continue;let d=u.nextSibling,R=V(u.tagName).toUpperCase(),U=i[R],E=U!=null?U:s.get(R);if(!E)continue;let b=E.template;if(!b)continue;let L=u.parentElement;if(!L)continue;let H=new Comment(" begin component: "+u.tagName),re=new Comment(" end component: "+u.tagName);L.insertBefore(H,u),u.remove();let Qe=n.o.f.props,Xe=n.o.f.propsOnce,Wt=n.o.f.bind,Ye=(g,O)=>{let C={},W=g.hasAttribute(Qe),$=g.hasAttribute(Xe);return r.v(O,()=>{r.w(C),W&&n.x(Jn,g,Qe),$&&n.x(Qn,g,Xe);let x=E.props;if(!x||x.length===0)return;x=x.map(V);for(let we of x.concat(x.map(je))){let fe=g.getAttribute(we);fe!==null&&(C[V(we)]=fe,g.removeAttribute(we))}let B=n.ee.be(g,!1);for(let[we,fe]of B.entries()){let[Oe,Gt]=fe.te;Gt&&x.includes(V(Gt))&&(Oe!=="."&&Oe!==":"&&Oe!==Wt||n.x(Yn,g,we,!0,Gt,fe.ne))}}),C},ye=[...r.V()],at=()=>{var W;let g=Ye(u,ye),O=new Fe(g,u,ye,H,re),C=Ot(()=>{var $;return($=E.context(O))!=null?$:{}}).context;if(O.autoProps){for(let[$,x]of Object.entries(g))if($ in C){let B=C[$];if(B===x)continue;O.entangle&&h(B)&&h(x)?_(H,At(x,B)):h(B)?B(x):C[$]=D(x)}else C[$]=x;(W=O.onAutoPropsAssigned)==null||W.call(O)}return{componentCtx:C,head:O}},{componentCtx:Se,head:k}=at(),oe=[...me(b)],v=oe.length,N=u.childNodes.length===0,q=g=>{let O=g.parentElement;if(N){for(let x of[...g.childNodes])O.insertBefore(x,g);return}let C=g.name;z(C)&&(C=g.getAttributeNames().filter(x=>x.startsWith("#"))[0],z(C)?C="default":C=C.substring(1));let W=u.querySelector(`template[name='${C}'], template[\\#${C}]`);!W&&C==="default"&&(W=u.querySelector("template:not([name])"),W&&W.getAttributeNames().filter(x=>x.startsWith("#")).length>0&&(W=null));let $=x=>{k.enableSwitch&&r.v(ye,()=>{r.w(Se);let B=Ye(g,r.V());r.v(ye,()=>{r.w(B);let we=r.V(),fe=Pn(we);for(let Oe of x)Ne(Oe)&&(Oe.setAttribute(nt,fe),en(fe),_(Oe,()=>{tn(fe)}))})})};if(W){let x=[...me(W)];for(let B of x)O.insertBefore(B,g);$(x)}else{if(C!=="default"){for(let B of[...me(g)])O.insertBefore(B,g);return}let x=[...me(u)].filter(B=>!ce(B));for(let B of x)O.insertBefore(B,g);$(x)}},S=g=>{if(!Ne(g))return;let O=g.querySelectorAll("slot");if(Fn(g)){q(g),g.remove();return}for(let C of O)q(C),C.remove()};(()=>{for(let g=0;g<v;++g)oe[g]=oe[g].cloneNode(!0),y.insertBefore(oe[g],d),S(oe[g])})(),L.insertBefore(re,d);let se=()=>{if(!E.inheritAttrs)return;let g=oe.filter(C=>C.nodeType===Node.ELEMENT_NODE);g.length>1&&(g=g.filter(C=>C.hasAttribute(this.ye)));let O=g[0];if(O)for(let C of u.getAttributeNames()){if(C===Qe||C===Xe)continue;let W=u.getAttribute(C);if(C==="class")O.classList.add(...W.split(" "));else if(C==="style"){let $=O.style,x=u.style;for(let B of x)$.setProperty(B,x.getPropertyValue(B))}else O.setAttribute(bt(C,n.o),W)}},Ue=()=>{for(let g of u.getAttributeNames())!g.startsWith("@")&&!g.startsWith(n.o.f.on)&&u.removeAttribute(g)},Ze=()=>{se(),Ue(),r.w(Se),n.Te(u,!1),Se.$emit=k.emit,Te(n,oe),_(u,()=>{Ce(Se)}),_(H,()=>{ae(u)}),Nt(Se)};r.v(ye,Ze)}}};var fn=class{constructor(e){m(this,"xe");m(this,"te",[]);m(this,"ne",[]);m(this,"Ee",[]);this.xe=e,this.C()}C(){let e=this.xe,n=e.startsWith(".");n&&(e=":"+e.slice(1));let r=e.indexOf("."),o=this.te=(r<0?e:e.substring(0,r)).split(/[:@]/);if(z(o[0])&&(o[0]=n?".":e[0]),r>=0){let s=this.ne=e.slice(r+1).split(".");if(s.includes("camel")){let i=o.length-1;o[i]=V(o[i])}s.includes("prop")&&(o[0]=".")}}},Lt=class{constructor(e){m(this,"p");m(this,"Re");this.p=e,this.Re=e.o.et()}be(e,n){let r=new Map;if(!rt(e))return r;let o=this.Re,s=a=>{let c=a.getAttributeNames().filter(p=>o.some(f=>p.startsWith(f)));for(let p of c)r.has(p)||r.set(p,new fn(p)),r.get(p).Ee.push(a)};if(s(e),!n)return r;let i=e.querySelectorAll("*");for(let a of i)s(a);return r}};var kt={};var It=class{constructor(e){m(this,"h");m(this,"Ce");m(this,"ve");m(this,"Se");m(this,"we");m(this,"ee");m(this,"o");m(this,"T");m(this,"Oe");this.h=e,this.o=e.o,this.ve=new vt(this),this.Ce=new gt(this),this.Se=new wt(this),this.we=new Mt(this),this.ee=new Lt(this),this.T=this.o.f.pre,this.Oe=this.o.f.dynamic}tt(e){let n=ce(e)?[e]:e.querySelectorAll("template");for(let r of n){if(r.hasAttribute(this.T))continue;let o=r.parentNode;if(!o)continue;let s=r.nextSibling;if(r.remove(),!r.content)continue;let i=[...r.content.childNodes];for(let a of i)o.insertBefore(a,s);Te(this,i)}}G(e){e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.T)||this.Ce.N(e)||this.ve.N(e)||this.Se.N(e)||(this.we.N(e),this.tt(e),this.Te(e,!0))}Te(e,n){var s;let r=this.ee.be(e,n),o=this.o.H;for(let[i,a]of r.entries()){let[c,p]=a.te,f=(s=o[i])!=null?s:o[c];if(!f){console.error("directive not found:",c);continue}a.Ee.forEach(l=>{this.x(f,l,i,!1,p,a.ne)})}}x(e,n,r,o,s,i){if(n.hasAttribute(this.T))return;let a=n.getAttribute(r);n.removeAttribute(r);let c=p=>{let f=p.getAttribute(nt);return f||(p.parentElement?c(p.parentElement):null)};if(nn()){let p=c(n);if(p){this.h.v(jn(p),()=>{this.k(e,n,a,s,i)});return}}this.k(e,n,a,s,i)}nt(e,n,r){if(e!==kt)return!1;if(z(r))return!0;let o=document.querySelector(r);if(o){let s=n.parentElement;if(!s)return!0;let i=new Comment(`teleported => '${r}'`);s.insertBefore(i,n),n.teleportedFrom=i,i.teleportedTo=n,_(i,()=>{F(n)}),o.appendChild(n)}return!0}k(e,n,r,o,s){var U;if(n.nodeType!==Node.ELEMENT_NODE||r==null||this.nt(e,n,r))return;let i=this.h.C(r,e.isLazy,e.isLazyKey,e.collectRefObj,e.once),a=[];_(n,()=>{i.stop(),f==null||f.stop();for(let E of a)E();a.length=0});let p=qn(o,this.Oe),f;p&&(f=this.h.C(V(p),void 0,void 0,void 0,e.once));let l,u=()=>(l=i.value(),l),y,d=()=>f?(y=f.value()[0],y):(y=o,o),R=()=>{if(!e.onChange)return;let E=w(i.value,b=>{var re;let L=l,H=y;(re=e.onChange)==null||re.call(e,n,u(),L,d(),H,s)});if(a.push(E),f){let b=w(f.value,L=>{var re;let H=y;(re=e.onChange)==null||re.call(e,n,u(),H,d(),H,s)});a.push(b)}};e.once||R(),e.onBind&&a.push(e.onBind(n,i,r,o,f,s)),(U=e.onChange)==null||U.call(e,n,u(),void 0,d(),void 0,s)}};var vo=9,So=10,wo=13,Oo=32,Re=46,Dt=44,Ao=39,No=34,Ut=40,qe=41,Ht=91,_t=93,ln=63,Mo=59,Zn=58,Lo=123,Bt=125,un=43,ko=45,er=96,tr=47,Io=92,nr=[2,3],rr=[un,ko],pr={"-":1,"!":1,"~":1,"+":1,new:1},fr={"=":2.5,"*=":2.5,"**=":2.5,"/=":2.5,"%=":2.5,"+=":2.5,"-=":2.5,"<<=":2.5,">>=":2.5,">>>=":2.5,"&=":2.5,"^=":2.5,"|=":2.5},Ke=kn(ft({"=>":2},fr),{"||":3,"??":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"/":12,"%":12,"**":13}),lr=Object.keys(fr),Do=new Set(lr),Pt=new Set;Pt.add("=>");lr.forEach(t=>Pt.add(t));var Uo=new Set(["$","_"]),or={true:!0,false:!1,null:null},Ho="this";function mr(t){return Math.max(0,...Object.keys(t).map(e=>e.length))}var _o=mr(pr),Bo=mr(Ke),We="Expected ",ke="Unexpected ",yn="Unclosed ",Po=We+":",sr=We+"expression",jo="missing }",Vo=ke+"object property",$o=yn+"(",ir=We+"comma",ar=ke+"token ",Fo=ke+"period",mn=We+"expression after ",qo="missing unaryOp argument",zo=yn+"[",Ko=We+"exponent (",Wo="Variable names cannot start with a number (",Go=yn+'quote after "';var ze=t=>t>=48&&t<=57,cr=t=>Ke[t]||0,dn=class{constructor(e){m(this,"rt",{0:[this.ot],1:[this.st,this.it,this.at],2:[this.pt,this.ct,this.ft,this.Ae,this.lt],3:[this.ut,this.mt,this.dt]});m(this,"r");m(this,"e");this.r=e,this.e=0}get M(){return this.r.charAt(this.e)}get l(){return this.r.charCodeAt(this.e)}m(e){return this.r.charCodeAt(this.e)===e}U(e){let n=String.fromCharCode(e);return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!(n in Ke)||Uo.has(n)}re(e){return this.U(e)||ze(e)}i(e){return new Error(`${e} at character ${this.e}`)}L(e,n,r){let o=this.rt[e];if(!o)return r;let s={node:r},i=a=>{a.call(this,s)};return n===0?o.forEach(i):o.find(i),s.node}y(){let e=this.l,n=this.r,r=this.e;for(;e===Oo||e===vo||e===So||e===wo;)e=n.charCodeAt(++r);this.e=r}parse(){let e=this.oe();return e.length===1?e[0]:{type:0,body:e}}oe(e){let n=[];for(;this.e<this.r.length;){let r=this.l;if(r===Mo||r===Dt)this.e++;else{let o=this.O();if(o)n.push(o);else if(this.e<this.r.length){if(r===e)break;throw this.i(ke+'"'+this.M+'"')}}}return n}O(){var n;let e=(n=this.L(0,1))!=null?n:this.Ne();return this.y(),this.L(1,0,e)}se(){this.y();let e=this.e,n=this.r,r=n.substr(e,Bo),o=r.length;for(;o>0;){if(r in Ke&&(!this.U(this.l)||e+r.length<n.length&&!this.re(n.charCodeAt(e+r.length))))return e+=o,this.e=e,r;r=r.substr(0,--o)}return!1}Ne(){let e,n,r,o,s,i,a,c;if(s=this.j(),!s||(n=this.se(),!n))return s;if(o={value:n,prec:cr(n),right_a:Pt.has(n)},i=this.j(),!i)throw this.i(mn+n);let p=[s,o,i];for(;n=this.se();){if(r=cr(n),r===0){this.e-=n.length;break}o={value:n,prec:r,right_a:Pt.has(n)},c=n;let f=l=>o.right_a&&l.right_a?r>l.prec:r<=l.prec;for(;p.length>2&&f(p[p.length-2]);)i=p.pop(),n=p.pop().value,s=p.pop(),e={type:8,operator:n,left:s,right:i},p.push(e);if(e=this.j(),!e)throw this.i(mn+c);p.push(o,e)}for(a=p.length-1,e=p[a];a>1;)e={type:8,operator:p[a-1].value,left:p[a-2],right:e},a-=2;return e}j(){let e,n,r;if(this.y(),r=this.L(2,1),r)return this.L(3,0,r);let o=this.l;if(ze(o)||o===Re)return this.yt();if(o===Ao||o===No)r=this.ht();else if(o===Ht)r=this.gt();else{for(e=this.r.substr(this.e,_o),n=e.length;n>0;){if(Object.prototype.hasOwnProperty.call(pr,e)&&(!this.U(this.l)||this.e+e.length<this.r.length&&!this.re(this.r.charCodeAt(this.e+e.length)))){this.e+=n;let s=this.j();if(!s)throw this.i(qo);return this.L(3,0,{type:7,operator:e,argument:s})}e=e.substr(0,--n)}this.U(o)?(r=this.ie(),r.name in or?r={type:4,value:or[r.name],raw:r.name}:r.name===Ho&&(r={type:5})):o===Ut&&(r=this.bt())}return r?(r=this.$(r),this.L(3,0,r)):this.L(3,0,!1)}$(e){this.y();let n=this.l;for(;n===Re||n===Ht||n===Ut||n===ln;){let r;if(n===ln){if(this.r.charCodeAt(this.e+1)!==Re)break;r=!0,this.e+=2,this.y(),n=this.l}if(this.e++,n===Ht){if(e={type:3,computed:!0,object:e,property:this.O()},this.y(),n=this.l,n!==_t)throw this.i(zo);this.e++}else n===Ut?e={type:6,arguments:this.Me(qe),callee:e}:(n===Re||r)&&(r&&this.e--,this.y(),e={type:3,computed:!1,object:e,property:this.ie()});r&&(e.optional=!0),this.y(),n=this.l}return e}yt(){let e="",n;for(;ze(this.l);)e+=this.r.charAt(this.e++);if(this.m(Re))for(e+=this.r.charAt(this.e++);ze(this.l);)e+=this.r.charAt(this.e++);if(n=this.M,n==="e"||n==="E"){for(e+=this.r.charAt(this.e++),n=this.M,(n==="+"||n==="-")&&(e+=this.r.charAt(this.e++));ze(this.l);)e+=this.r.charAt(this.e++);if(!ze(this.r.charCodeAt(this.e-1)))throw this.i(Ko+e+this.M+")")}let r=this.l;if(this.U(r))throw this.i(Wo+e+this.M+")");if(r===Re||e.length===1&&e.charCodeAt(0)===Re)throw this.i(Fo);return{type:4,value:parseFloat(e),raw:e}}ht(){let e="",n=this.e,r=this.r.charAt(this.e++),o=!1;for(;this.e<this.r.length;){let s=this.r.charAt(this.e++);if(s===r){o=!0;break}else if(s==="\\")switch(s=this.r.charAt(this.e++),s){case"n":e+=`
|
|
2
|
+
`;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=s}else e+=s}if(!o)throw this.i(Go+e+'"');return{type:4,value:e,raw:this.r.substring(n,this.e)}}ie(){let e=this.l,n=this.e;if(this.U(e))this.e++;else throw this.i(ke+this.M);for(;this.e<this.r.length&&(e=this.l,this.re(e));)this.e++;return{type:2,name:this.r.slice(n,this.e)}}Me(e){let n=[],r=!1,o=0;for(;this.e<this.r.length;){this.y();let s=this.l;if(s===e){if(r=!0,this.e++,e===qe&&o&&o>=n.length)throw this.i(ar+String.fromCharCode(e));break}else if(s===Dt){if(this.e++,o++,o!==n.length){if(e===qe)throw this.i(ar+",");if(e===_t)for(let i=n.length;i<o;i++)n.push(null)}}else{if(n.length!==o&&o!==0)throw this.i(ir);{let i=this.O();if(!i||i.type===0)throw this.i(ir);n.push(i)}}}if(!r)throw this.i(We+String.fromCharCode(e));return n}bt(){this.e++;let e=this.oe(qe);if(this.m(qe))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i($o)}gt(){return this.e++,{type:9,elements:this.Me(_t)}}pt(e){if(this.m(Lo)){this.e++;let n=[];for(;!isNaN(this.l);){if(this.y(),this.m(Bt)){this.e++,e.node=this.$({type:10,properties:n});return}let r=this.O();if(!r)break;if(this.y(),r.type===2&&(this.m(Dt)||this.m(Bt)))n.push({type:12,computed:!1,key:r,value:r,shorthand:!0});else if(this.m(Zn)){this.e++;let o=this.O();if(!o)throw this.i(Vo);let s=r.type===9;n.push({type:12,computed:s,key:s?r.elements[0]:r,value:o,shorthand:!1}),this.y()}else r&&n.push(r);this.m(Dt)&&this.e++}throw this.i(jo)}}ct(e){let n=this.l;if(rr.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){this.e+=2;let r=e.node={type:13,operator:n===un?"++":"--",argument:this.$(this.ie()),prefix:!0};if(!r.argument||!nr.includes(r.argument.type))throw this.i(ke+r.operator)}}mt(e){if(e.node){let n=this.l;if(rr.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){if(!nr.includes(e.node.type))throw this.i(ke+e.node.operator);this.e+=2,e.node={type:13,operator:n===un?"++":"--",argument:e.node,prefix:!1}}}}ft(e){[0,1,2].every(n=>this.r.charCodeAt(this.e+n)===Re)&&(this.e+=3,e.node={type:14,argument:this.O()})}at(e){if(e.node&&this.m(ln)){this.e++;let n=e.node,r=this.O();if(!r)throw this.i(sr);if(this.y(),this.m(Zn)){this.e++;let o=this.O();if(!o)throw this.i(sr);if(e.node={type:11,test:n,consequent:r,alternate:o},n.operator&&Ke[n.operator]<=.9){let s=n;for(;s.right.operator&&Ke[s.right.operator]<=.9;)s=s.right;e.node.test=s.right,s.right=e.node,e.node=n}}else throw this.i(Po)}}ot(e){if(this.y(),this.m(Ut)){let n=this.e;if(this.e++,this.y(),this.m(qe)){this.e++;let r=this.se();if(r==="=>"){let o=this.Ne();if(!o)throw this.i(mn+r);e.node={type:15,params:null,body:o};return}}this.e=n}}st(e){this.Le(e.node)}Le(e){e&&(Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.Le(n)}),e.operator==="=>"&&(e.type=15,e.params=e.left?[e.left]:null,e.body=e.right,e.params&&e.params[0].type===1&&(e.params=e.params[0].expressions),delete e.left,delete e.right,delete e.operator))}it(e){e.node&&this.F(e.node)}F(e){Do.has(e.operator)?(e.type=16,this.F(e.left),this.F(e.right)):e.operator||Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.F(n)})}dt(e){if(!e.node)return;let n=e.node.type;(n===2||n===3)&&this.m(er)&&(e.node={type:17,tag:e.node,quasi:this.Ae(e)})}Ae(e){if(!this.m(er))return;let n={type:19,quasis:[],expressions:[]},r="",o="",s=!1,i=this.r.length,a=()=>n.quasis.push({type:18,value:{raw:o,cooked:r},tail:s});for(;this.e<i;){let c=this.r.charAt(++this.e);if(c==="`")return this.e+=1,s=!0,a(),e.node=n,n;if(c==="$"&&this.r.charAt(this.e+1)==="{"){if(this.e+=2,a(),o="",r="",n.expressions.push(...this.oe(Bt)),!this.m(Bt))throw this.i("unclosed ${")}else if(c==="\\")switch(o+=c,c=this.r.charAt(++this.e),o+=c,c){case"n":r+=`
|
|
3
|
+
`;break;case"r":r+="\r";break;case"t":r+=" ";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;default:r+=c}else r+=c,o+=c}throw this.i("Unclosed `")}ut(e){var o;let n=e.node;if(!n||n.operator!=="new"||!n.argument)return;if(!n.argument||![6,3].includes(n.argument.type))throw this.i("Expected new function()");e.node=n.argument;let r=e.node;for(;r.type===3||r.type===6&&((o=r==null?void 0:r.callee)==null?void 0:o.type)===3;)r=r.type===3?r.object:r.callee.object;r.type=20}lt(e){if(!this.m(tr))return;let n=++this.e,r=!1;for(;this.e<this.r.length;){if(this.l===tr&&!r){let o=this.r.slice(n,this.e),s="";for(;++this.e<this.r.length;){let a=this.l;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.M;else break}let i;try{i=new RegExp(o,s)}catch(a){throw this.i(a.message)}return e.node={type:4,value:i,raw:this.r.slice(n-1,this.e)},e.node=this.$(e.node),e.node}this.m(Ht)?r=!0:r&&this.m(_t)&&(r=!1),this.e+=this.m(Io)?2:1}throw this.i("Unclosed Regex")}},ur=t=>new dn(t).parse();var Jo={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(t,e)=>{},"+=":(t,e)=>{},"-=":(t,e)=>{},"<<=":(t,e)=>{},">>=":(t,e)=>{},">>>=":(t,e)=>{},"&=":(t,e)=>{},"^=":(t,e)=>{},"|=":(t,e)=>{},"||":(t,e)=>t()||e(),"??":(t,e)=>{var n;return(n=t())!=null?n:e()},"&&":(t,e)=>t()&&e(),"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(t,e)=>t===e,"!==":(t,e)=>t!==e,"<":(t,e)=>t<e,">":(t,e)=>t>e,"<=":(t,e)=>t<=e,">=":(t,e)=>t>=e,in:(t,e)=>t in e,"<<":(t,e)=>t<<e,">>":(t,e)=>t>>e,">>>":(t,e)=>t>>>e,"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e)=>t%e,"**":(t,e)=>pt(t,e)},Qo={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},gr=t=>{if(!(t!=null&&t.some(hr)))return t;let e=[];return t.forEach(n=>hr(n)?e.push(...n):e.push(n)),e},dr=(...t)=>gr(t),hn=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},Xo={"++":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(++r),r}return++t[e]},"--":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(--r),r}return--t[e]}},Yo={"++":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(r+1),r}return t[e]++},"--":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(r-1),r}return t[e]--}},yr={"=":(t,e,n)=>{let r=t[e];return h(r)?r(n):t[e]=n},"+=":(t,e,n)=>{let r=t[e];return h(r)?r(r()+n):t[e]+=n},"-=":(t,e,n)=>{let r=t[e];return h(r)?r(r()-n):t[e]-=n},"*=":(t,e,n)=>{let r=t[e];return h(r)?r(r()*n):t[e]*=n},"/=":(t,e,n)=>{let r=t[e];return h(r)?r(r()/n):t[e]/=n},"%=":(t,e,n)=>{let r=t[e];return h(r)?r(r()%n):t[e]%=n},"**=":(t,e,n)=>{let r=t[e];return h(r)?r(pt(r(),n)):t[e]=pt(t[e],n)},"<<=":(t,e,n)=>{let r=t[e];return h(r)?r(r()<<n):t[e]<<=n},">>=":(t,e,n)=>{let r=t[e];return h(r)?r(r()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let r=t[e];return h(r)?r(r()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let r=t[e];return h(r)?r(r()|n):t[e]|=n},"&=":(t,e,n)=>{let r=t[e];return h(r)?r(r()&n):t[e]&=n},"^=":(t,e,n)=>{let r=t[e];return h(r)?r(r()^n):t[e]^=n}},jt=(t,e)=>P(t)?t.bind(e):t,gn=class{constructor(e,n,r,o,s){m(this,"u");m(this,"ke");m(this,"Ve");m(this,"Ie");m(this,"A");m(this,"De");m(this,"Ue");this.u=T(e)?e:[e],this.ke=n,this.Ve=r,this.Ie=o,this.Ue=!!s}Pe(e,n){if(n&&e in n)return n;for(let r of this.u)if(e in r)return r}2(e,n,r){let o=e.name;if(o==="$root")return this.u[this.u.length-1];if(o==="$parent")return this.u[1];if(o==="$ctx")return[...this.u];if(r&&o in r)return this.A=r[o],jt(D(r[o]),r);for(let i of this.u)if(o in i)return this.A=i[o],jt(D(i[o]),i);let s=this.ke;if(s&&o in s)return this.A=s[o],jt(D(s[o]),s)}5(e,n,r){return this.u[0]}0(e,n,r){return this.Be(n,r,dr,...e.body)}1(e,n,r){return this.R(n,r,(...o)=>o.pop(),...e.expressions)}3(e,n,r){let{obj:o,key:s}=this.ae(e,n,r),i=o==null?void 0:o[s];return this.A=i,jt(D(i),o)}4(e,n,r){return e.value}6(e,n,r){let o=(i,...a)=>P(i)?i(...gr(a)):i,s=this.R(++n,r,o,e.callee,...e.arguments);return this.A=s,s}7(e,n,r){return this.R(n,r,Qo[e.operator],e.argument)}8(e,n,r){let o=Jo[e.operator];switch(e.operator){case"||":case"&&":case"??":return o(()=>this.g(e.left,n,r),()=>this.g(e.right,n,r))}return this.R(n,r,o,e.left,e.right)}9(e,n,r){return this.Be(++n,r,dr,...e.elements)}10(e,n,r){let o={},s=(...i)=>{i.forEach(a=>{Object.assign(o,a)})};return this.R(++n,r,s,...e.properties),o}11(e,n,r){return this.R(n,r,o=>this.g(o?e.consequent:e.alternate,n,r),e.test)}12(e,n,r){var f;let o={},s=l=>(l==null?void 0:l.type)!==15,i=(f=this.Ie)!=null?f:()=>!1,a=n===0&&this.Ue,c=l=>this._e(a,e.key,n,hn(l,r)),p=l=>this._e(a,e.value,n,hn(l,r));if(e.shorthand){let l=e.key.name;o[l]=s(e.key)&&i(l,n)?c:c()}else if(e.computed){let l=D(c());o[l]=s(e.value)&&i(l,n)?p:p()}else{let l=e.key.type===4?e.key.value:e.key.name;o[l]=s(e.value)&&i(l,n)?()=>p:p()}return o}ae(e,n,r){let o=this.g(e.object,n,r),s=e.computed?this.g(e.property,n,r):e.property.name;return{obj:o,key:s}}13(e,n,r){let o=e.argument,s=e.operator,i=e.prefix?Xo:Yo;if(o.type===2){let a=o.name,c=this.Pe(a,r);return te(c)?void 0:i[s](c,a)}if(o.type===3){let{obj:a,key:c}=this.ae(o,n,r);return i[s](a,c)}}16(e,n,r){let o=e.left,s=e.operator;if(o.type===2){let i=o.name,a=this.Pe(i,r);if(te(a))return;let c=this.g(e.right,n,r);return yr[s](a,i,c)}if(o.type===3){let{obj:i,key:a}=this.ae(o,n,r),c=this.g(e.right,n,r);return yr[s](i,a,c)}}14(e,n,r){let o=this.g(e.argument,n,r);return T(o)&&(o.s=br),o}17(e,n,r){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,r)}19(e,n,r){let o=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.R(n,r,o,...e.expressions)}18(e,n,r){return e.value.cooked}20(e,n,r){let o=(s,...i)=>new s(...i);return this.R(n,r,o,e.callee,...e.arguments)}15(e,n,r){return(...o)=>{let s=Object.create(r!=null?r:{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=o[a++]}return this.g(e.body,n,s)}}g(e,n,r){let o=D(this[e.type](e,n,r));return this.De=e.type,o}_e(e,n,r,o){let s=this.g(n,r,o);return e&&this.He()?this.A:s}He(){let e=this.De;return(e===2||e===3||e===6)&&h(this.A)}eval(e,n){let{value:r,refs:o}=Et(()=>this.g(e,-1,n)),s={value:r,refs:o};return this.He()&&(s.ref=this.A),s}R(e,n,r,...o){let s=o.map(i=>i&&this.g(i,e,n));return r(...s)}Be(e,n,r,...o){let s=this.Ve;if(!s)return this.R(e,n,r,...o);let i=o.map((a,c)=>a&&(a.type!==15&&s(c,e)?p=>this.g(a,e,hn(p,n)):this.g(a,e,n)));return r(...i)}},br=Symbol("s"),hr=t=>(t==null?void 0:t.s)===br,Tr=(t,e,n,r,o,s,i)=>new gn(e,n,r,o,i).eval(t,s);var Er={},Vt=class{constructor(e,n){m(this,"u");m(this,"o");m(this,"je",[]);this.u=e,this.o=n}w(e){this.u=[e,...this.u]}me(){return this.u.map(n=>n.components).filter(n=>!!n).reverse().reduce((n,r)=>{for(let[o,s]of Object.entries(r))n[o.toUpperCase()]=s;return n},{})}Ze(){let e=[],n=new Set,r=this.u.map(o=>o.components).filter(o=>!!o).reverse();for(let o of r)for(let s of Object.keys(o))n.has(s)||(n.add(s),e.push(s));return e}C(e,n,r,o,s){var y;let i=G([]),a=[],c=()=>{for(let d of a)d();a.length=0},p={value:i,stop:c,refs:[],context:this.u[0]};if(z(e))return p;let f=this.o.globalContext,l=[],u=(d,R,U,E)=>{try{let b=Tr(d,R,f,n,r,E,o);return U&&l.push(...b.refs),{value:b.value,refs:b.refs,ref:b.ref}}catch(b){M(6,`evaluation error: ${e}`,b)}return{value:void 0,refs:[]}};try{let d=(y=Er[e])!=null?y:ur("["+e+"]");Er[e]=d;let R=this.u,U=()=>{l.splice(0),c();let E=d.elements.map((b,L)=>n!=null&&n(L,-1)?{value:H=>u(b,R,!1,{$event:H}).value,refs:[]}:u(b,R,!0));if(!s)for(let b of l){let L=w(b,U);a.push(L)}i(E.map(b=>b.value)),p.refs=E.map(b=>b.ref)};U()}catch(d){M(6,`parse error: ${e}`,d)}return p}V(){return this.u}Y(e){this.je.push(this.u),this.u=e}v(e,n){try{this.Y(e),n()}finally{this.Tt()}}Tt(){var e;this.u=(e=this.je.pop())!=null?e:[]}};var Cr="http://www.w3.org/1999/xlink",Zo={itemscope:2,allowfullscreen:2,formnovalidate:2,ismap:2,nomodule:2,novalidate:2,readonly:2,async:1,autofocus:1,autoplay:1,controls:1,default:1,defer:1,disabled:1,hidden:1,inert:1,loop:1,open:1,required:1,reversed:1,scoped:1,seamless:1,checked:1,muted:1,multiple:1,selected:1};function es(t){return!!t||t===""}var bn={onChange:(t,e,n,r,o,s)=>{var a;if(r){s&&s.includes("camel")&&(r=V(r)),$t(t,r,e[0],o);return}let i=e.length;for(let c=0;c<i;++c){let p=e[c];if(T(p)){let f=(a=n==null?void 0:n[c])==null?void 0:a[0],l=p[0],u=p[1];$t(t,l,u,f)}else if(A(p))for(let f of Object.entries(p)){let l=f[0],u=f[1],y=n==null?void 0:n[c],d=y&&l in y?l:void 0;$t(t,l,u,d)}else{let f=n==null?void 0:n[c],l=e[c++],u=e[c];$t(t,l,u,f)}}}},$t=(t,e,n,r)=>{if(r&&r!==e&&t.removeAttribute(r),te(e)){M(3,name,t);return}if(!j(e)){M(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){te(n)?t.removeAttributeNS(Cr,e.slice(6,e.length)):t.setAttributeNS(Cr,e,n);return}let o=e in Zo;te(n)||o&&!es(n)?t.removeAttribute(e):t.setAttribute(e,o?"":n)};var Tn={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n==null?void 0:n[o];if(T(s)){let a=s.length;for(let c=0;c<a;++c)Rr(t,s[c],i==null?void 0:i[c])}else Rr(t,s,i)}}},Rr=(t,e,n)=>{let r=t.classList,o=j(e),s=j(n);if(e&&!o){if(n&&!s)for(let i in n)(!(i in e)||!e[i])&&r.remove(i);for(let i in e)e[i]&&r.add(i)}else o?n!==e&&(s&&r.remove(...n.trim().split(/\s+/)),r.add(...e.trim().split(/\s+/))):n&&s&&r.remove(...n.trim().split(/\s+/))};var xr={onChange:(t,e)=>{let[n,r]=e;P(r)?r(t,n):t.innerHTML=n==null?void 0:n.toString()}};function ts(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=ue(t[r],e[r]);return n}function ue(t,e){if(t===e)return!0;let n=Xt(t),r=Xt(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=et(t),r=et(e),n||r)return t===e;if(n=T(t),r=T(e),n||r)return n&&r?ts(t,e):!1;if(n=A(t),r=A(e),n||r){if(!n||!r)return!1;let o=Object.keys(t).length,s=Object.keys(e).length;if(o!==s)return!1;for(let i in t){let a=t.hasOwnProperty(i),c=e.hasOwnProperty(i);if(a&&!c||!a&&c||!ue(t[i],e[i]))return!1}}return String(t)===String(e)}function Ft(t,e){return t.findIndex(n=>ue(n,e))}var vr=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var qt=t=>{if(!h(t))throw I(3,"pause");t(void 0,void 0,3)};var zt=t=>{if(!h(t))throw I(3,"resume");t(void 0,void 0,4)};var wr={onChange:(t,e)=>{ns(t,e[0])},onBind:(t,e,n,r,o,s)=>rs(t,e,s)},ns=(t,e)=>{let n=Mr(t);if(n&&Or(t))T(e)?e=Ft(e,de(t))>-1:Y(e)?e=e.has(de(t)):e=ps(t,e),t.checked=e;else if(n&&Ar(t))t.checked=ue(e,de(t));else if(n||Lr(t))Nr(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(kr(t)){let r=t.options,o=r.length,s=t.multiple;for(let i=0;i<o;i++){let a=r[i],c=de(a);if(s)T(e)?a.selected=Ft(e,c)>-1:a.selected=e.has(c);else if(ue(de(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else M(7,t)},it=t=>(h(t)&&(t=t()),P(t)&&(t=t()),t?j(t)?{trim:t.includes("trim"),lazy:t.includes("lazy"),number:t.includes("number"),int:t.includes("int")}:{trim:!!t.trim,lazy:!!t.lazy,number:!!t.number,int:!!t.int}:{trim:!1,lazy:!1,number:!1,int:!1}),Or=t=>t.type==="checkbox",Ar=t=>t.type==="radio",Nr=t=>t.type==="number"||t.type==="range",Mr=t=>t.tagName==="INPUT",Lr=t=>t.tagName==="TEXTAREA",kr=t=>t.tagName==="SELECT",rs=(t,e,n)=>{let r=e.value,o=it(n==null?void 0:n.join(",")),s=it(r()[1]),i={int:o.int||s.int,lazy:o.lazy||s.lazy,number:o.number||s.number,trim:o.trim||s.trim},a=e.refs[0];if(!a)return M(8,t),()=>{};let c=Mr(t);return c&&Or(t)?ss(t,a):c&&Ar(t)?fs(t,a):c||Lr(t)?os(t,i,a,r):kr(t)?ls(t,a,r):(M(7,t),()=>{})},Sr=/[.,' ·٫]/,os=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=Nr(t),a=()=>{!e.trim&&!it(r()[1]).trim||(t.value=t.value.trim())},c=u=>{let y=u.target;y.composing=1},p=u=>{let y=u.target;y.composing&&(y.composing=0,y.dispatchEvent(new Event(s)))},f=()=>{t.removeEventListener(s,l),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",p),t.removeEventListener("change",p)},l=u=>{let y=u.target;if(!y||y.composing)return;let d=y.value,R=it(r()[1]);if(i||R.number||R.int){if(R.int)d=parseInt(d);else{if(Sr.test(d[d.length-1])&&d.split(Sr).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(n()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else R.trim&&(d=d.trim());n(d)};return t.addEventListener(s,l),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",p),t.addEventListener("change",p),f},ss=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=de(t),i=t.checked,a=e();if(T(a)){let c=Ft(a,s),p=c!==-1;i&&!p?a.push(s):!i&&p&&a.splice(c,1)}else Y(a)?i?a.add(s):a.delete(s):e(cs(t,i))};return t.addEventListener(n,o),r},de=t=>"_value"in t?t._value:t.value,Ir="trueValue",is="falseValue",Dr="true-value",as="false-value",cs=(t,e)=>{let n=e?Ir:is;if(n in t)return t[n];let r=e?Dr:as;return t.hasAttribute(r)?t.getAttribute(r):e},ps=(t,e)=>{if(Ir in t)return ue(e,t.trueValue);let r=Dr;return t.hasAttribute(r)?ue(e,t.getAttribute(r)):ue(e,!0)},fs=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=de(t);e(s)};return t.addEventListener(n,o),r},ls=(t,e,n)=>{let r="change",o=()=>{t.removeEventListener(r,s)},s=()=>{let a=it(n()[1]).number,c=Array.prototype.filter.call(t.options,p=>p.selected).map(p=>a?vr(de(p)):de(p));if(t.multiple){let p=e();try{if(qt(e),Y(p)){p.clear();for(let f of c)p.add(f)}else T(p)?(p.splice(0),p.push(...c)):e(c)}finally{zt(e),K(e)}}else e(c[0])};return t.addEventListener(r,s),o};var ms=["stop","prevent","capture","self","once","left","right","middle","passive"],us=t=>{let e={};if(z(t))return;let n=t.split(",");for(let r of ms)e[r]=n.includes(r);return e},Cn={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{var f,l;if(o){let u=e.value(),y=D(o.value()[0]);return j(y)?En(t,V(y),()=>e.value()[0],(f=s==null?void 0:s.join(","))!=null?f:u[1]):()=>{}}else if(r){let u=e.value();return En(t,V(r),()=>e.value()[0],(l=s==null?void 0:s.join(","))!=null?l:u[1])}let i=[],a=()=>{i.forEach(u=>u())},c=e.value(),p=c.length;for(let u=0;u<p;++u){let y=c[u];if(P(y)&&(y=y()),A(y))for(let d of Object.entries(y)){let R=d[0],U=()=>{let b=e.value()[u];return P(b)&&(b=b()),b=b[R],P(b)&&(b=b()),b},E=y[R+"_flags"];i.push(En(t,R,U,E))}else M(2,name,t)}return a}},ds=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e!=null||(e="");let n=t.split(".").concat(e.split(","));t=n[0];let r=n[1],o=n.includes("ctrl"),s=n.includes("shift"),i=n.includes("alt"),a=n.includes("meta"),c=p=>!(o&&!p.ctrlKey||s&&!p.shiftKey||i&&!p.altKey||a&&!p.metaKey);return r?[t,p=>c(p)?p.key.toUpperCase()===r.toUpperCase():!1]:[t,c]}return[t,n=>!0]},En=(t,e,n,r)=>{if(z(e))return M(5,name,t),()=>{};let o=us(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=ds(e,r);let a=f=>{if(!i(f)||!n&&e==="submit"&&(o!=null&&o.prevent))return;let l=n(f);P(l)&&(l=l(f)),P(l)&&l(f)},c=()=>{t.removeEventListener(e,p,s)},p=f=>{if(!o){a(f);return}try{if(o.left&&f.button!==0||o.middle&&f.button!==1||o.right&&f.button!==2||o.self&&f.target!==t)return;o.stop&&f.stopPropagation(),o.prevent&&f.preventDefault(),a(f)}finally{o.once&&c()}};return t.addEventListener(e,p,s),c};var Ur={onChange:(t,e,n,r,o,s)=>{if(r){s&&s.includes("camel")&&(r=V(r)),Ge(t,r,e[0]);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(T(c)){let p=c[0],f=c[1];Ge(t,p,f)}else if(A(c))for(let p of Object.entries(c)){let f=p[0],l=p[1];Ge(t,f,l)}else{let p=e[a++],f=e[a];Ge(t,p,f)}}}};function ys(t){return!!t||t===""}var Ge=(t,e,n)=>{if(te(e)){M(3,name,t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(ae),1),t[e]=n!=null?n:"";return}let r=t.tagName;if(e==="value"&&r!=="PROGRESS"&&!r.includes("-")){t._value=n;let s=r==="OPTION"?t.getAttribute("value"):t.value,i=n!=null?n:"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let o=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=ys(n):n==null&&s==="string"?(n="",o=!0):s==="number"&&(n=0,o=!0)}try{t[e]=n}catch(s){o||M(4,e,r,n,s)}o&&t.removeAttribute(e)};var Hr={once:!0,onBind:(t,e,n)=>{let r=e.value()[0],o=T(r),s=e.refs[0];return o?r.push(t):s?s==null||s(t):e.context[n]=t,()=>{if(o){let i=r.indexOf(t);i!==-1&&r.splice(i,1)}else s==null||s(null)}}};var _r={onChange:(t,e)=>{let n=ge(t).data,r=n._ord;In(r)&&(r=n._ord=t.style.display),!!e[0]?t.style.display=r:t.style.display="none"}};var vn={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n==null?void 0:n[o];if(T(s)){let a=s.length;for(let c=0;c<a;++c)Br(t,s[c],i==null?void 0:i[c])}else Br(t,s,i)}}},Br=(t,e,n)=>{let r=t.style,o=j(e);if(e&&!o){if(n&&!j(n))for(let s in n)e[s]==null&&xn(r,s,"");for(let s in e)xn(r,s,e[s])}else{let s=r.display;if(o?n!==e&&(r.cssText=e):n&&t.removeAttribute("style"),"_ord"in ge(t).data)return;r.display=s}},Pr=/\s*!important$/;function xn(t,e,n){if(T(n))n.forEach(r=>{xn(t,e,r)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let r=hs(t,e);Pr.test(n)?t.setProperty(je(r),n.replace(Pr,""),"important"):t[r]=n}}var jr=["Webkit","Moz","ms"],Rn={};function hs(t,e){let n=Rn[e];if(n)return n;let r=V(e);if(r!=="filter"&&r in t)return Rn[e]=r;r=ot(r);for(let o=0;o<jr.length;o++){let s=jr[o]+r;if(s in t)return Rn[e]=s}return e}var X=t=>Vr(D(t)),Vr=(t,e=new WeakMap)=>{if(!t||!A(t))return t;if(T(t))return t.map(X);if(Y(t)){let r=new Set;for(let o of t.keys())r.add(X(o));return r}if(he(t)){let r=new Map;for(let o of t)r.set(X(o[0]),X(o[1]));return r}if(e.has(t))return D(e.get(t));let n=ft({},t);e.set(t,n);for(let r of Object.entries(n))n[r[0]]=Vr(D(r[1]),e);return n};var $r={onChange:(t,e)=>{var r;let n=e[0];t.textContent=Y(n)?JSON.stringify(X([...n])):he(n)?JSON.stringify(X([...n])):A(n)?JSON.stringify(X(n)):(r=n==null?void 0:n.toString())!=null?r:""}};var Fr={onChange:(t,e)=>{Ge(t,"value",e[0])}};var Ie=t=>(t==null?void 0:t[ut])===1;var xe=t=>{if(Ve(t))return t;let e;if(h(t)?(e=t,t=e()):e=G(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[ut]=1,T(t)){let n=t.length;for(let r=0;r<n;++r){let o=t[r];Ie(o)||(t[r]=xe(o))}return e}if(!A(t))return e;for(let n of Object.entries(t)){let r=n[1];if(Ie(r))continue;let o=n[0];et(o)||(t[o]=null,t[o]=xe(r))}return e};var ve=class ve{constructor(e){m(this,"H",{});m(this,"f",{});m(this,"et",()=>Object.keys(this.H).filter(e=>e.length===1||!e.startsWith(":")));m(this,"he",new Map);m(this,"ge",new Map);m(this,"forGrowThreshold",10);m(this,"globalContext");m(this,"useInterpolation",!0);if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.Et()}static getDefault(){var e;return(e=ve.$e)!=null?e:ve.$e=new ve}Et(){let e={},n=globalThis;for(let r of ve.xt.split(","))e[r]=n[r];return e.ref=xe,e.sref=G,e.flatten=X,e}addComponent(...e){for(let n of e){if(!n.defaultName){tt.warning("Registered component's default name is not defined",n);continue}this.he.set(ot(n.defaultName),n),this.ge.set(ot(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.H={".":Ur,":":bn,"@":Cn,[`${e}on`]:Cn,[`${e}bind`]:bn,[`${e}html`]:xr,[`${e}text`]:$r,[`${e}show`]:_r,[`${e}model`]:wr,":style":vn,[`${e}bind:style`]:vn,":class":Tn,[`${e}bind:class`]:Tn,":ref":Hr,":value":Fr,teleport:kt},this.f={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,props:":props",propsOnce:":props-once",bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.H,this.f)}};m(ve,"$e"),m(ve,"xt","Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console");var Z=ve;var Kt=(t,e)=>{if(!t)return;let r=(e!=null?e:Z.getDefault()).f,o=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of bs(t,r.pre,s))gs(i,r.text,o,s)},gs=(t,e,n,r)=>{var c;let o=t.textContent;if(!o)return;let s=n,i=o.split(s);if(i.length<=1)return;if(((c=t.parentElement)==null?void 0:c.childNodes.length)===1&&i.length===3){let p=i[1],f=qr(p,r);if(f&&z(i[0])&&z(i[2])){let l=t.parentElement;l.setAttribute(e,p.substring(f.start.length,p.length-f.end.length)),l.innerText="";return}}let a=document.createDocumentFragment();for(let p of i){let f=qr(p,r);if(f){let l=document.createElement("span");l.setAttribute(e,p.substring(f.start.length,p.length-f.end.length)),a.appendChild(l)}else a.appendChild(document.createTextNode(p))}t.replaceWith(a)},bs=(t,e,n)=>{let r=[],o=s=>{var i;if(s.nodeType===Node.TEXT_NODE)n.some(a=>{var c;return(c=s.textContent)==null?void 0:c.includes(a.start)})&&r.push(s);else{if((i=s==null?void 0:s.hasAttribute)!=null&&i.call(s,e))return;for(let a of me(s))o(a)}};return o(t),r},qr=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var Ts="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",Es=new Set(Ts.toUpperCase().split(",")),Cs="http://www.w3.org/2000/svg",zr=(t,e)=>{ce(t)?t.content.appendChild(e):t.appendChild(e)},Sn=(t,e,n,r)=>{var i;let o=t.t;if(o){let a=n&&Es.has(o.toUpperCase())?document.createElementNS(Cs,o.toLowerCase()):document.createElement(o),c=t.a;if(c)for(let f of Object.entries(c)){let l=f[0],u=f[1];l.startsWith("#")&&(u=l.substring(1),l="name"),a.setAttribute(bt(l,r),u)}let p=t.c;if(p)for(let f of p)Sn(f,a,n,r);zr(e,a);return}let s=t.d;if(s){let a;switch((i=t.n)!=null?i:Node.TEXT_NODE){case Node.COMMENT_NODE:a=document.createComment(s);break;case Node.TEXT_NODE:a=document.createTextNode(s);break}if(a)zr(e,a);else throw new Error("unsupported node type.")}},De=(t,e,n)=>{n!=null||(n=Z.getDefault());let r=document.createDocumentFragment();if(!T(t))return Sn(t,r,!!e,n),r;for(let o of t)Sn(o,r,!!e,n);return r};var Kr=(t,e={selector:"#app"},n)=>{j(e)&&(e={selector:"#app",template:e}),Xn(t)&&(t=t.context);let r=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!r||!Ne(r))throw I(0);n||(n=Z.getDefault());let o=()=>{for(let a of[...r.childNodes])F(a)},s=a=>{for(let c of a)r.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(e.template);o(),s(a.childNodes),e.element=a}else if(e.json){let a=De(e.json,e.isSVG,n);o(),s(a.childNodes)}return n.useInterpolation&&Kt(r,n),new wn(t,r,n).x(),_(r,()=>{Ce(t)}),Nt(t),{context:t,unmount:()=>{F(r)},unbind:()=>{ae(r)}}},wn=class{constructor(e,n,r){m(this,"Rt");m(this,"Fe");m(this,"o");m(this,"h");m(this,"p");this.Rt=e,this.Fe=n,this.o=r,this.h=new Vt([e],r),this.p=new It(this.h)}x(){this.p.G(this.Fe)}};var Je=t=>{if(T(t))return t.map(o=>Je(o));let e={};if(t.tagName)e.t=t.tagName;else return t.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),t.textContent&&(e.d=t.textContent),e;let n=t.getAttributeNames();n.length>0&&(e.a=Object.fromEntries(n.map(o=>[o,t.getAttribute(o)])));let r=me(t);return r.length>0&&(e.c=[...r].map(o=>Je(o))),e};var Wr=(t,e={})=>{var s,i,a,c,p,f;T(e)&&(e={props:e}),j(t)&&(t={template:t});let n=(s=e.context)!=null?s:()=>({}),r=!1;if(t.element){let l=t.element;l.remove(),t.element=l}else if(t.selector){let l=document.querySelector(t.selector);if(!l)throw I(1,t.selector);l.remove(),t.element=l}else if(t.template){let l=document.createRange().createContextualFragment(t.template);t.element=l}else t.json&&(t.element=De(t.json,t.isSVG,e.config),r=!0);t.element||(t.element=document.createDocumentFragment()),((i=e.useInterpolation)==null||i)&&Kt(t.element,(a=e.config)!=null?a:Z.getDefault());let o=t.element;if(!r&&(((p=t.isSVG)!=null?p:rt(o)&&((c=o.hasAttribute)!=null&&c.call(o,"isSVG")))||rt(o)&&o.querySelector("[isSVG]"))){let l=t.element.content,u=l?[...l.childNodes]:[...o.childNodes],y=Je(u);t.element=De(y,!0,e.config)}return{context:n,template:t.element,inheritAttrs:(f=e.inheritAttrs)!=null?f:!0,props:e.props,defaultName:e.defaultName}};var Gr=t=>{let e,n={},r=(...o)=>{if(o.length<=2&&0 in o)throw I(4);return e&&!n.isStopped?e(...o):(e=Rs(t,n),e(...o))};return r[Q]=1,Ee(r,!0),r.stop=()=>{var o,s;return(s=(o=n.ref)==null?void 0:o.stop)==null?void 0:s.call(o)},J(()=>r.stop(),!0),r},Rs=(t,e)=>{var s;let n=(s=e.ref)!=null?s:G(null);e.ref=n,e.isStopped=!1;let r=0,o=Le(()=>{if(r>0){o(),e.isStopped=!0,K(n);return}n(t()),++r});return n.stop=o,n};var Jr=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return r&&!n.isStopped?r(...s):(r=xs(t,e,n),r(...s))};return o[Q]=1,Ee(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},J(()=>o.stop(),!0),o},xs=(t,e,n)=>{var a;let r=(a=n.ref)!=null?a:G(null);n.ref=r,n.isStopped=!1;let o=0,s=c=>{if(o>0){r.stop(),n.isStopped=!0,K(r);return}r(e(...t.map(p=>p()))),++o},i=[];for(let c of t){let p=w(c,s);i.push(p)}return s(null),r.stop=()=>{i.forEach(c=>{c()})},r};var Qr=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return r&&!n.isStopped?r(...s):(r=vs(t,e,n),r(...s))};return o[Q]=1,Ee(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},J(()=>o.stop(),!0),o},vs=(t,e,n)=>{var s;let r=(s=n.ref)!=null?s:G(null);n.ref=r,n.isStopped=!1;let o=0;return r.stop=w(t,i=>{if(o>0){r.stop(),n.isStopped=!0,K(r);return}r(e(i)),++o},!0),r};var Xr=t=>(t[dt]=1,t);var Yr=(t,e)=>{if(!e)throw I(5);let r=Ie(t)?xe:a=>a,o=()=>localStorage.setItem(e,JSON.stringify(X(t()))),s=localStorage.getItem(e);if(s!=null)try{t(r(JSON.parse(s)))}catch(a){M(6,`persist: failed to parse data for key ${e}`,a),o()}else o();let i=Le(o);return J(i,!0),t};var On=(t,...e)=>{let n="",r=t,o=e,s=r.length,i=o.length;for(let a=0;a<s;++a)n+=r[a],a<i&&(n+=o[a]);return n},Zr=On;var eo=(t,e,n)=>{let r=[],o=()=>{e(t.map(i=>i()))};for(let i of t)r.push(w(i,o));n&&o();let s=()=>{for(let i of r)i()};return J(s,!0),s};var to=t=>{if(!h(t))throw I(3,"observerCount");return t(void 0,void 0,2)};var no=t=>{An();try{t()}finally{Nn()}},An=()=>{pe.stack||(pe.stack=[]),pe.stack.push(new Set)},Nn=()=>{let t=pe.stack;if(!t||t.length===0)return;let e=t.pop();if(t.length){let n=t[t.length-1];for(let r of e)n.add(r);return}delete pe.stack;for(let n of e)try{K(n)}catch(r){console.error(r)}};var ro=t=>{var e;(e=Ae())==null||e.onMounted.push(t)};
|
package/dist/regor.es2015.esm.js
CHANGED
|
@@ -4556,7 +4556,6 @@ var _RegorConfig = class _RegorConfig {
|
|
|
4556
4556
|
__publicField(this, "forGrowThreshold", 10);
|
|
4557
4557
|
__publicField(this, "globalContext");
|
|
4558
4558
|
__publicField(this, "useInterpolation", true);
|
|
4559
|
-
__publicField(this, "useBracketInterpolation", false);
|
|
4560
4559
|
this.setDirectives("r-");
|
|
4561
4560
|
if (globalContext) {
|
|
4562
4561
|
this.globalContext = globalContext;
|
|
@@ -4659,14 +4658,16 @@ var interpolate = (element, config) => {
|
|
|
4659
4658
|
if (!element) return;
|
|
4660
4659
|
const resolvedConfig = config != null ? config : RegorConfig.getDefault();
|
|
4661
4660
|
const builtInNames = resolvedConfig.__builtInNames;
|
|
4662
|
-
const
|
|
4663
|
-
const
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4661
|
+
const interpolationRegex = /(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g;
|
|
4662
|
+
const delimiters = [
|
|
4663
|
+
{ start: "{{", end: "}}" },
|
|
4664
|
+
{ start: "[[", end: "]]" }
|
|
4665
|
+
];
|
|
4666
|
+
for (const textNode of getTextNodes(element, builtInNames.pre, delimiters)) {
|
|
4667
|
+
interpolateTextNode(textNode, builtInNames.text, interpolationRegex, delimiters);
|
|
4667
4668
|
}
|
|
4668
4669
|
};
|
|
4669
|
-
var interpolateTextNode = (textNode, textDirective2, interpolationRegex,
|
|
4670
|
+
var interpolateTextNode = (textNode, textDirective2, interpolationRegex, delimiters) => {
|
|
4670
4671
|
var _a;
|
|
4671
4672
|
const text = textNode.textContent;
|
|
4672
4673
|
if (!text) return;
|
|
@@ -4675,18 +4676,32 @@ var interpolateTextNode = (textNode, textDirective2, interpolationRegex, start,
|
|
|
4675
4676
|
if (parts.length <= 1) return;
|
|
4676
4677
|
if (((_a = textNode.parentElement) == null ? void 0 : _a.childNodes.length) === 1 && parts.length === 3) {
|
|
4677
4678
|
const part = parts[1];
|
|
4678
|
-
|
|
4679
|
+
const delimiter = getInterpolationDelimiter(part, delimiters);
|
|
4680
|
+
if (delimiter && isNullOrWhitespace(parts[0]) && isNullOrWhitespace(parts[2])) {
|
|
4679
4681
|
const parent = textNode.parentElement;
|
|
4680
|
-
parent.setAttribute(
|
|
4682
|
+
parent.setAttribute(
|
|
4683
|
+
textDirective2,
|
|
4684
|
+
part.substring(
|
|
4685
|
+
delimiter.start.length,
|
|
4686
|
+
part.length - delimiter.end.length
|
|
4687
|
+
)
|
|
4688
|
+
);
|
|
4681
4689
|
parent.innerText = "";
|
|
4682
4690
|
return;
|
|
4683
4691
|
}
|
|
4684
4692
|
}
|
|
4685
4693
|
const fragment = document.createDocumentFragment();
|
|
4686
4694
|
for (const part of parts) {
|
|
4687
|
-
|
|
4695
|
+
const delimiter = getInterpolationDelimiter(part, delimiters);
|
|
4696
|
+
if (delimiter) {
|
|
4688
4697
|
const spanTag = document.createElement("span");
|
|
4689
|
-
spanTag.setAttribute(
|
|
4698
|
+
spanTag.setAttribute(
|
|
4699
|
+
textDirective2,
|
|
4700
|
+
part.substring(
|
|
4701
|
+
delimiter.start.length,
|
|
4702
|
+
part.length - delimiter.end.length
|
|
4703
|
+
)
|
|
4704
|
+
);
|
|
4690
4705
|
fragment.appendChild(spanTag);
|
|
4691
4706
|
} else {
|
|
4692
4707
|
fragment.appendChild(document.createTextNode(part));
|
|
@@ -4695,16 +4710,19 @@ var interpolateTextNode = (textNode, textDirective2, interpolationRegex, start,
|
|
|
4695
4710
|
;
|
|
4696
4711
|
textNode.replaceWith(fragment);
|
|
4697
4712
|
};
|
|
4698
|
-
var getTextNodes = (node, preDirective,
|
|
4713
|
+
var getTextNodes = (node, preDirective, delimiters) => {
|
|
4699
4714
|
const textNodes = [];
|
|
4700
4715
|
const traverseTextNodes = (node2) => {
|
|
4701
|
-
var _a
|
|
4716
|
+
var _a;
|
|
4702
4717
|
if (node2.nodeType === Node.TEXT_NODE) {
|
|
4703
|
-
if ((
|
|
4718
|
+
if (delimiters.some((delimiter) => {
|
|
4719
|
+
var _a2;
|
|
4720
|
+
return (_a2 = node2.textContent) == null ? void 0 : _a2.includes(delimiter.start);
|
|
4721
|
+
})) {
|
|
4704
4722
|
textNodes.push(node2);
|
|
4705
4723
|
}
|
|
4706
4724
|
} else {
|
|
4707
|
-
if ((
|
|
4725
|
+
if ((_a = node2 == null ? void 0 : node2.hasAttribute) == null ? void 0 : _a.call(node2, preDirective)) return;
|
|
4708
4726
|
for (const child of getChildNodes(node2)) {
|
|
4709
4727
|
traverseTextNodes(child);
|
|
4710
4728
|
}
|
|
@@ -4713,6 +4731,9 @@ var getTextNodes = (node, preDirective, start) => {
|
|
|
4713
4731
|
traverseTextNodes(node);
|
|
4714
4732
|
return textNodes;
|
|
4715
4733
|
};
|
|
4734
|
+
var getInterpolationDelimiter = (part, delimiters) => delimiters.find(
|
|
4735
|
+
(delimiter) => part.startsWith(delimiter.start) && part.endsWith(delimiter.end)
|
|
4736
|
+
);
|
|
4716
4737
|
|
|
4717
4738
|
// src/app/toFragment.ts
|
|
4718
4739
|
var svgTags = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view";
|