regor 1.3.2 → 1.3.3

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.
@@ -1,4 +1,4 @@
1
- var Qr=Object.defineProperty,Xr=Object.defineProperties;var Yr=Object.getOwnPropertyDescriptors;var Nn=Object.getOwnPropertySymbols;var Zr=Object.prototype.hasOwnProperty,eo=Object.prototype.propertyIsEnumerable;var at=Math.pow,qt=(t,e,n)=>e in t?Qr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ct=(t,e)=>{for(var n in e||(e={}))Zr.call(e,n)&&qt(t,n,e[n]);if(Nn)for(var n of Nn(e))eo.call(e,n)&&qt(t,n,e[n]);return t},Mn=(t,e)=>Xr(t,Yr(e));var m=(t,e,n)=>qt(t,typeof e!="symbol"?e+"":e,n);var Ie=Symbol(":regor");var le=t=>{let e=[t];for(;e.length>0;){let n=e.shift();to(n);let r=n.childNodes;if(r)for(let o of r)e.push(o)}},to=t=>{let e=t[Ie];if(e){for(let n of e.unbinders)n();e.unbinders.splice(0),delete t[Ie]}};var q=t=>{t.remove(),setTimeout(()=>le(t),1)};var H=t=>typeof t=="function",B=t=>typeof t=="string",kn=t=>typeof t=="undefined",te=t=>t==null||typeof t=="undefined",z=t=>typeof t!="string"||!(t!=null&&t.trim()),no=Object.prototype.toString,zt=t=>no.call(t),be=t=>zt(t)==="[object Map]",Z=t=>zt(t)==="[object Set]",Kt=t=>zt(t)==="[object Date]",Qe=t=>typeof t=="symbol",x=Array.isArray,N=t=>t!==null&&typeof t=="object";var Ln={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."},D=(t,...e)=>{let n=Ln[t];return new Error(H(n)?n.call(Ln,...e):n)};var pt=[],In=()=>{let t={onMounted:[],onUnmounted:[]};return pt.push(t),t},we=t=>{let e=pt[pt.length-1];if(!e&&!t)throw D(2);return e},Dn=t=>{let e=we();return t&&Gt(t),pt.pop(),e},Wt=Symbol("csp"),Gt=t=>{let e=t,n=e[Wt];if(n){let r=we();if(n===r)return;r.onMounted.length>0&&n.onMounted.push(...r.onMounted),r.onUnmounted.length>0&&n.onUnmounted.push(...r.onUnmounted);return}e[Wt]=we()},ft=t=>t[Wt];var Te=t=>{var n,r;let e=(n=ft(t))==null?void 0:n.onUnmounted;e==null||e.forEach(o=>{o()}),(r=t.unmounted)==null||r.call(t)};var Xe=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,"pe");m(this,"emit",(e,n)=>{this.pe.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.pe=n,this.ctx=r,this.start=o,this.end=s}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)q(e),e=e.nextSibling;for(let r of this.ctx)Te(r)}};var Oe=t=>{let e=t,n=e[Ie];if(n)return n;let r={unbinders:[],data:{}};return e[Ie]=r,r};var _=(t,e)=>{Oe(t).unbinders.push(e)};var Un={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]})},k=(t,...e)=>{let n=Un[t],r=H(n)?n.call(Un,...e):n,o=lt.warning;o&&(B(r)?o(r):o(r,...r.args))},lt={warning:console.warn};var J=(t,e)=>{var n;(n=we(e))==null||n.onUnmounted.push(t)};var ut=Symbol("ref"),Q=Symbol("sref"),mt=Symbol("raw");var g=t=>(t==null?void 0:t[Q])===1;var A=(t,e,n)=>{if(!g(t))throw D(3,"observe");n&&e(t());let o=t(void 0,void 0,0,e);return J(o,!0),o};var ht={},dt={},Hn=1,Bn=t=>{let e=(Hn++).toString();return ht[e]=t,dt[e]=0,e},Jt=t=>{dt[t]+=1},Qt=t=>{--dt[t]===0&&(delete ht[t],delete dt[t])},_n=t=>ht[t],Xt=()=>Hn!==1&&Object.keys(ht).length>0,Ye="r-switch",ro=t=>{let e=t.filter(r=>Ae(r)).map(r=>[...r.querySelectorAll("[r-switch]")].map(o=>o.getAttribute(Ye))),n=new Set;return e.forEach(r=>{r.forEach(o=>o&&n.add(o))}),[...n]},De=(t,e)=>{if(!Xt())return;let n=ro(e);n.length!==0&&(n.forEach(Jt),_(t,()=>{n.forEach(Qt)}))};var Yt=(t,e,n,r)=>{let o=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,r),o.push(i)}Ce(e,o)},Zt=Symbol("r-if"),Pn=Symbol("r-else"),Vn=t=>t[Pn]===1,yt=class{constructor(e){m(this,"p");m(this,"B");m(this,"K");m(this,"z");m(this,"W");m(this,"b");m(this,"T");this.p=e,this.B=e.o.f.if,this.K=He(e.o.f.if),this.z=e.o.f.else,this.W=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.B),r=Ee(e,this.K);for(let o of r)this.x(o);return n}G(e){return e[Zt]?!0:(e[Zt]=!0,Ee(e,this.K).forEach(n=>n[Zt]=!0),!1)}x(e){if(e.hasAttribute(this.T)||this.G(e)||this.qe(e,this.b))return;let n=e.getAttribute(this.B);if(!n){k(0,this.B,e);return}e.removeAttribute(this.B),this.L(e,n)}H(e,n,r){let o=Ue(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${r!=null?r:""}`);s.insertBefore(i,e),De(i,o),o.forEach(c=>{q(c)}),e.remove(),n!=="if"&&(e[Pn]=1);let a=document.createComment(`__end__ :${n}${r!=null?r:""}`);return s.insertBefore(a,i.nextSibling),{nodes:o,parent:s,commentBegin:i,commentEnd:a}}ce(e,n){if(!e)return[];let r=e.nextElementSibling;if(e.hasAttribute(this.z)){e.removeAttribute(this.z);let{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.H(e,"else");return[{mount:()=>{Yt(o,this.p,s,a)},unmount:()=>{ue(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let o=e.getAttribute(this.W);if(!o)return[];e.removeAttribute(this.W);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.H(e,"elseif",` => ${o} `),p=this.p.h.C(o),f=p.value,l=this.ce(r,n),u=[];_(a,()=>{p.stop();for(let d of u)d();u.length=0});let h=A(f,n);return u.push(h),[{mount:()=>{Yt(s,this.p,i,c)},unmount:()=>{ue(a,c)},isTrue:()=>!!f()[0],isMounted:!1}].concat(l)}}L(e,n){let r=e.nextElementSibling,{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.H(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||(Yt(o,this.p,s,a),f=!0),h.forEach(E=>{E.unmount(),E.isMounted=!1});else{ue(i,a),f=!1;let E=!1;for(let L of h)!E&&L.isTrue()?(L.isMounted||(L.mount(),L.isMounted=!0),E=!0):(L.unmount(),L.isMounted=!1)}})},h=this.ce(r,y),d=[];_(i,()=>{c.stop();for(let E of d)E();d.length=0}),y();let C=A(p,y);d.push(C)}};var Ue=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"})},Ce=(t,e)=>{for(let n of e)Vn(n)||t.P(n)},Ee=(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,Ae=t=>t.nodeType===Node.ELEMENT_NODE,Ze=t=>t.nodeType===Node.ELEMENT_NODE,jn=t=>t instanceof HTMLSlotElement,me=t=>ce(t)?t.content.childNodes:t.childNodes,ue=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let r=n.nextSibling;q(n),n=r}},Re=(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})},$n=(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},He=t=>`[${CSS.escape(t)}]`,gt=(t,e)=>(t.startsWith("@")&&(t=e.f.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.f.dynamic)),t),en=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},oo=/-(\w)/g,P=en(t=>t&&t.replace(oo,(e,n)=>n?n.toUpperCase():"")),so=/\B([A-Z])/g,Be=en(t=>t&&t.replace(so,"-$1").toLowerCase()),et=en(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var bt={};var Tt=t=>{var n,r;let e=(n=ft(t))==null?void 0:n.onMounted;e==null||e.forEach(o=>{o()}),(r=t.mounted)==null||r.call(t)};var tn=Symbol("scope"),nn=t=>{try{In();let e=t();Gt(e);let n={context:e,unmount:()=>Te(e),[tn]:1};return n[tn]=1,n}finally{Dn()}},Fn=t=>N(t)?tn in t:!1;var qn={collectRefObj:!0,onBind:(t,e)=>A(e.value,()=>{let r=e.value(),o=e.context,s=r[0];if(N(s))for(let i of Object.entries(s)){let a=i[0],c=i[1],p=o[a];p!==c&&(g(p)?p(c):o[a]=c)}},!0)};var zn={collectRefObj:!0,once:!0,onBind:(t,e)=>{let n=e.value(),r=e.context,o=n[0];if(!N(o))return()=>{};for(let s of Object.entries(o)){let i=s[0],a=s[1],c=r[i];c!==a&&(g(c)?c(a):r[i]=a)}return()=>{}}};var tt=(t,e)=>{if(t===e)return()=>{};let n=A(t,o=>e(o)),r=A(e,o=>t(o));return e(t()),()=>{n(),r()}};var nt=t=>!!t&&t[mt]===1;var _e=t=>(t==null?void 0:t[ut])===1;var ne=[],Kn=t=>{var e;ne.length!==0&&((e=ne[ne.length-1])==null||e.add(t))},Pe=t=>{if(!t)return()=>{};let e={stop:()=>{}};return io(t,e),J(()=>e.stop(),!0),e.stop},io=(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=A(i,()=>{o(),Pe(t)});n.push(a)}}finally{ne.pop()}},rn=t=>{let e=ne.length,n=e>0&&ne[e-1];try{return n&&ne.push(null),t()}finally{n&&ne.pop()}},on=t=>{try{let e=new Set;return ne.push(e),{value:t(),refs:[...e]}}finally{ne.pop()}};var W=(t,e,n)=>{if(!g(t))return;let r=t;if(r(void 0,e,1),!n)return;let o=r();if(o){if(x(o)||Z(o))for(let s of o)W(s,e,!0);else if(be(o))for(let s of o)W(s[0],e,!0),W(s[1],e,!0);if(N(o))for(let s in o)W(o[s],e,!0)}};function ao(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Ve=(t,e,n)=>{n.forEach(function(r){let o=t[r];ao(e,r,function(...i){let a=o.apply(this,i),c=this[Q];for(let p of c)W(p);return a})})},Et=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var Wn=Array.prototype,sn=Object.create(Wn),co=["push","pop","shift","unshift","splice","sort","reverse"];Ve(Wn,sn,co);var Gn=Map.prototype,Ct=Object.create(Gn),po=["set","clear","delete"];Et(Ct,"Map");Ve(Gn,Ct,po);var Jn=Set.prototype,Rt=Object.create(Jn),fo=["add","clear","delete"];Et(Rt,"Set");Ve(Jn,Rt,fo);var pe={},G=t=>{if(g(t)||nt(t))return t;let e={auto:!0,_value:t},n=c=>N(c)?Q in c?!0:x(c)?(Object.setPrototypeOf(c,sn),!0):Z(c)?(Object.setPrototypeOf(c,Rt),!0):be(c)?(Object.setPrototypeOf(c,Ct),!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&&rn(()=>{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||g(f)&&(f=f(),e._value===f)?f:(n(f)&&i(f),e._value=f,e.auto&&s(f,l),e._value):(Kn(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,Re(a,!1),r&&i(t),a};var de=t=>{if(nt(t))return t;let e;if(g(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,x(t)){let n=t.length;for(let r=0;r<n;++r){let o=t[r];_e(o)||(t[r]=de(o))}return e}if(!N(t))return e;for(let n of Object.entries(t)){let r=n[1];if(_e(r))continue;let o=n[0];Qe(o)||(t[o]=null,t[o]=de(r))}return e};var Qn=Symbol("modelBridge"),lo=t=>!!(t!=null&&t[Qn]),uo=t=>{t[Qn]=1},mo=t=>{let e=de(t());return uo(e),e},Xn={collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(!r)return()=>{};let i=P(r),a,c,p=()=>{},f=()=>{p(),p=()=>{},a=void 0,c=void 0},l=()=>{p(),p=()=>{}},u=(h,d)=>{a!==h&&(l(),p=tt(h,d),a=h)},y=A(e.value,()=>{var C;let h=(C=e.refs[0])!=null?C:e.value()[0],d=e.context,T=d[i];if(!g(h)){if(c&&T===c){c(h);return}if(f(),g(T)){T(h);return}d[i]=h;return}if(lo(h)){if(T===h)return;g(T)?u(h,T):d[i]=h;return}c||(c=mo(h)),d[i]=c,u(h,c)},!0);return()=>{p(),y()}}};var xt=class{constructor(e){m(this,"p");m(this,"fe");this.p=e,this.fe=e.o.f.inherit}N(e){this.Ke(e)}Ke(e){var l;let n=this.p,r=n.h,o=n.o.le,s=n.o.ue,i=r.me(),a=r.ze(),c=[...o.keys(),...a,...[...o.keys()].map(Be),...a.map(Be)].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 h=u.nextSibling,d=P(u.tagName).toUpperCase(),T=i[d],C=T!=null?T:s.get(d);if(!C)continue;let E=C.template;if(!E)continue;let L=u.parentElement;if(!L)continue;let U=new Comment(" begin component: "+u.tagName),oe=new Comment(" end component: "+u.tagName);L.insertBefore(U,u),u.remove();let We=n.o.f.props,Ge=n.o.f.propsOnce,jt=n.o.f.bind,Je=(b,S)=>{let R={},K=b.hasAttribute(We),$=b.hasAttribute(Ge);return r.v(S,()=>{r.S(R),K&&n.x(qn,b,We),$&&n.x(zn,b,Ge);let v=C.props;if(!v||v.length===0)return;v=v.map(P);let F=new Map(v.map(Y=>[Y.toLowerCase(),Y]));for(let Y of v.concat(v.map(Be))){let fe=b.getAttribute(Y);fe!==null&&(R[P(Y)]=fe,b.removeAttribute(Y))}let $t=n.J.de(b,!1);for(let[Y,fe]of $t.entries()){let[Ft,On]=fe.Q;if(!On)continue;let An=F.get(P(On).toLowerCase());An&&(Ft!=="."&&Ft!==":"&&Ft!==jt||n.x(Xn,b,Y,!0,An,fe.X))}}),R},ge=[...r.V()],it=()=>{var K;let b=Je(u,ge),S=new Xe(b,u,ge,U,oe),R=nn(()=>{var $;return($=C.context(S))!=null?$:{}}).context;if(S.autoProps){for(let[$,v]of Object.entries(b))if($ in R){let F=R[$];if(F===v)continue;S.entangle&&g(F)&&g(v)&&_(U,tt(v,F))}else R[$]=v;(K=S.onAutoPropsAssigned)==null||K.call(S)}return{componentCtx:R,head:S}},{componentCtx:Se,head:I}=it(),se=[...me(E)],w=se.length,M=u.childNodes.length===0,j=b=>{let S=b.parentElement;if(M){for(let v of[...b.childNodes])S.insertBefore(v,b);return}let R=b.name;z(R)&&(R=b.getAttributeNames().filter(v=>v.startsWith("#"))[0],z(R)?R="default":R=R.substring(1));let K=u.querySelector(`template[name='${R}'], template[\\#${R}]`);!K&&R==="default"&&(K=u.querySelector("template:not([name])"),K&&K.getAttributeNames().filter(v=>v.startsWith("#")).length>0&&(K=null));let $=v=>{I.enableSwitch&&r.v(ge,()=>{r.S(Se);let F=Je(b,r.V());r.v(ge,()=>{r.S(F);let $t=r.V(),Y=Bn($t);for(let fe of v)Ae(fe)&&(fe.setAttribute(Ye,Y),Jt(Y),_(fe,()=>{Qt(Y)}))})})};if(K){let v=[...me(K)];for(let F of v)S.insertBefore(F,b);$(v)}else{if(R!=="default"){for(let F of[...me(b)])S.insertBefore(F,b);return}let v=[...me(u)].filter(F=>!ce(F));for(let F of v)S.insertBefore(F,b);$(v)}},O=b=>{if(!Ae(b))return;let S=b.querySelectorAll("slot");if(jn(b)){j(b),b.remove();return}for(let R of S)j(R),R.remove()};(()=>{for(let b=0;b<w;++b)se[b]=se[b].cloneNode(!0),y.insertBefore(se[b],h),O(se[b])})(),L.insertBefore(oe,h);let ke=()=>{if(!C.inheritAttrs)return;let b=se.filter(R=>R.nodeType===Node.ELEMENT_NODE);b.length>1&&(b=b.filter(R=>R.hasAttribute(this.fe)));let S=b[0];if(S)for(let R of u.getAttributeNames()){if(R===We||R===Ge)continue;let K=u.getAttribute(R);if(R==="class")S.classList.add(...K.split(" "));else if(R==="style"){let $=S.style,v=u.style;for(let F of v)$.setProperty(F,v.getPropertyValue(F))}else S.setAttribute(gt(R,n.o),K)}},ie=()=>{for(let b of u.getAttributeNames())!b.startsWith("@")&&!b.startsWith(n.o.f.on)&&u.removeAttribute(b)},Le=()=>{ke(),ie(),r.S(Se),n.ye(u,!1),Se.$emit=I.emit,Ce(n,se),_(u,()=>{Te(Se)}),_(U,()=>{le(u)}),Tt(Se)};r.v(ge,Le)}}};var an=class{constructor(e){m(this,"he");m(this,"Q",[]);m(this,"X",[]);m(this,"ge",[]);this.he=e,this.C()}C(){let e=this.he,n=e.startsWith(".");n&&(e=":"+e.slice(1));let r=e.indexOf("."),o=this.Q=(r<0?e:e.substring(0,r)).split(/[:@]/);if(z(o[0])&&(o[0]=n?".":e[0]),r>=0){let s=this.X=e.slice(r+1).split(".");if(s.includes("camel")){let i=o.length-1;o[i]=P(o[i])}s.includes("prop")&&(o[0]=".")}}},vt=class{constructor(e){m(this,"p");m(this,"be");this.p=e,this.be=e.o.We()}de(e,n){let r=new Map;if(!Ze(e))return r;let o=this.be,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 an(p)),r.get(p).ge.push(a)};if(s(e),!n)return r;let i=e.querySelectorAll("*");for(let a of i)s(a);return r}};var ho=(t,e)=>{for(let n of t){let r=n.cloneNode(!0);e.appendChild(r)}},St=class{constructor(e){m(this,"p");m(this,"I");m(this,"Te");this.p=e,this.I=e.o.f.is,this.Te=He(this.I)+", [is]"}N(e){let n=e.hasAttribute(this.I),r=Ee(e,this.Te);for(let o of r)this.x(o);return n}x(e){let n=e.getAttribute(this.I);if(!n){if(n=e.getAttribute("is"),!n)return;if(!n.startsWith("regor:")){if(!n.startsWith("r-"))return;let r=n.slice(2).trim().toLowerCase();if(!r)return;let o=e.parentNode;if(!o)return;let s=document.createElement(r);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);o.insertBefore(s,e),e.remove(),this.p.P(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.L(e,n)}H(e,n){let r=Ue(e),o=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);o.insertBefore(s,e),De(s,r),r.forEach(a=>{q(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}}L(e,n){let{nodes:r,parent:o,commentBegin:s,commentEnd:i}=this.H(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 C=c()[0];if(N(C)&&(C.name?C=C.name:C=(L=Object.entries(p.me()).filter(U=>U[1]===C)[0])==null?void 0:L[0]),!B(C)||z(C)){ue(s,i);return}if(l.name===C)return;ue(s,i);let E=document.createElement(C);for(let U of e.getAttributeNames())U!==this.I&&E.setAttribute(U,e.getAttribute(U));ho(u,E),o.insertBefore(E,i),this.p.P(E),l.name=C})},h=[];_(s,()=>{a.stop();for(let C of h)C();h.length=0}),y();let T=A(c,y);h.push(T)}};var V=t=>g(t)?t():t;var rt=class{constructor(e){m(this,"R",[]);m(this,"_",new Map);m(this,"Y");this.Y=e}get w(){return this.R.length}Z(e){let n=this.Y(e.value);n!==void 0&&this._.set(n,e)}ee(e){var r;let n=this.Y((r=this.R[e])==null?void 0:r.value);n!==void 0&&this._.delete(n)}static Ge(e,n){return{items:[],index:e,value:n,order:-1}}S(e){e.order=this.w,this.R.push(e),this.Z(e)}Je(e,n){let r=this.w;for(let o=e;o<r;++o)this.R[o].order=o+1;n.order=e,this.R.splice(e,0,n),this.Z(n)}D(e){return this.R[e]}te(e,n){this.ee(e),this.R[e]=n,this.Z(n),n.order=e}xe(e){this.ee(e),this.R.splice(e,1);let n=this.w;for(let r=e;r<n;++r)this.R[r].order=r}Re(e){let n=this.w;for(let r=e;r<n;++r)this.ee(r);this.R.splice(e)}Ct(e){return this._.has(e)}Qe(e){var r;let n=this._.get(e);return(r=n==null?void 0:n.order)!=null?r:-1}};var cn=Symbol("r-for"),Ot=class Ot{constructor(e){m(this,"p");m(this,"b");m(this,"ne");m(this,"T");this.p=e,this.b=e.o.f.for,this.ne=He(this.b),this.T=e.o.f.pre}N(e){let n=e.hasAttribute(this.b),r=Ee(e,this.ne);for(let o of r)this.Xe(o);return n}G(e){return e[cn]?!0:(e[cn]=!0,Ee(e,this.ne).forEach(n=>n[cn]=!0),!1)}Xe(e){if(e.hasAttribute(this.T)||this.G(e))return;let n=e.getAttribute(this.b);if(!n){k(0,this.b,e);return}e.removeAttribute(this.b),this.Ye(e,n)}Ee(e){return te(e)?[]:(H(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))}Ye(e,n){var se;let r=this.Ze(n);if(!(r!=null&&r.list)){k(1,this.b,n,e);return}let o=this.p.o.f.key,s=this.p.o.f.keyBind,i=(se=e.getAttribute(o))!=null?se:e.getAttribute(s);e.removeAttribute(o),e.removeAttribute(s);let a=i?w=>{var M;return V((M=V(w))==null?void 0:M[i])}:w=>w,c=(w,M)=>a(w)===a(M),p=Ue(e),f=e.parentNode;if(!f)return;let l=`${this.b} => ${n}`,u=new Comment(`__begin__ ${l}`);f.insertBefore(u,e),De(u,p),p.forEach(w=>{q(w)}),e.remove();let y=new Comment(`__end__ ${l}`);f.insertBefore(y,u.nextSibling);let h=this.p,d=h.h,T=d.V(),C=(w,M,j)=>{let O=r.createContext(M,w),ee=rt.Ge(O.index,M);return d.v(T,()=>{var b;d.S(O.ctx);let ke=(b=y.parentNode)!=null?b:u.parentNode;if(!ke)throw new Error("[r-for] cannot mount: missing anchor parent");let ie=j.previousSibling,Le=[];for(let S of p){let R=S.cloneNode(!0);ke.insertBefore(R,j),Le.push(R)}for(Ce(h,Le),ie=ie.nextSibling;ie!==j;)ee.items.push(ie),ie=ie.nextSibling}),ee},E=(w,M)=>{let j=I.D(w).items,O=j[j.length-1].nextSibling;for(let ee of j)q(ee);I.te(w,C(w,M,O))},L=(w,M)=>{I.S(C(w,M,y))},U=w=>{for(let M of I.D(w).items)q(M)},oe=w=>{let M=I.w;for(let j=w;j<M;++j)I.D(j).index(j)},We=w=>{let M=I.w;H(w)&&(w=w());let j=V(w[0]);if(x(j)&&j.length===0){ue(u,y),I.Re(0);return}let O=0,ee=Number.MAX_SAFE_INTEGER,ke=M,ie=this.p.o.forGrowThreshold,Le=()=>I.w<ke+ie;for(let S of this.Ee(w[0])){let R=()=>{if(O<M){let K=I.D(O++);if(c(K.value,S))return;let $=I.Qe(a(S));if($>=O&&$-O<10){if(--O,ee=Math.min(ee,O),U(O),I.xe(O),--M,$>O+1)for(let v=O;v<$-1&&v<M&&!c(I.D(O).value,S);)++v,U(O),I.xe(O),--M;R();return}Le()?(I.Je(O-1,C(O,S,I.D(O-1).items[0])),ee=Math.min(ee,O-1),++M):E(O-1,S)}else L(O++,S)};R()}let b=O;for(M=I.w;O<M;)U(O++);I.Re(b),oe(ee)},Ge=()=>{it=A(ge,We)},jt=()=>{Je.stop(),it()},Je=d.C(r.list),ge=Je.value,it,Se=0,I=new rt(a);for(let w of this.Ee(ge()[0]))I.S(C(Se++,w,y));_(u,jt),Ge()}Ze(e){var c,p;let n=Ot.et.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=V(f);if(!a&&r.length===1)u[r[0]]=f;else if(x(y)){let d=0;for(let T of r)u[T]=y[d++]}else for(let d of r)u[d]=y[d];let h={ctx:u,index:G(-1)};return s&&(h.index=u[s.startsWith("#")?s.substring(1):s]=G(l)),h}}}};m(Ot,"et",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var wt=Ot;var At=class{constructor(e){m(this,"h");m(this,"Ce");m(this,"ve");m(this,"Se");m(this,"we");m(this,"J");m(this,"o");m(this,"T");m(this,"Ae");this.h=e,this.o=e.o,this.ve=new wt(this),this.Ce=new yt(this),this.Se=new St(this),this.we=new xt(this),this.J=new vt(this),this.T=this.o.f.pre,this.Ae=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);Ce(this,i)}}P(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.ye(e,!0))}ye(e,n){var s;let r=this.J.de(e,n),o=this.o.j;for(let[i,a]of r.entries()){let[c,p]=a.Q,f=(s=o[i])!=null?s:o[c];if(!f){console.error("directive not found:",c);continue}a.ge.forEach(l=>{this.x(f,l,i,!1,p,a.X)})}}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(Ye);return f||(p.parentElement?c(p.parentElement):null)};if(Xt()){let p=c(n);if(p){this.h.v(_n(p),()=>{this.L(e,n,a,s,i)});return}}this.L(e,n,a,s,i)}nt(e,n,r){if(e!==bt)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,()=>{q(n)}),o.appendChild(n)}return!0}L(e,n,r,o,s){var T;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 C of a)C();a.length=0});let p=$n(o,this.Ae),f;p&&(f=this.h.C(P(p),void 0,void 0,void 0,e.once));let l,u=()=>(l=i.value(),l),y,h=()=>f?(y=f.value()[0],y):(y=o,o),d=()=>{if(!e.onChange)return;let C=A(i.value,E=>{var oe;let L=l,U=y;(oe=e.onChange)==null||oe.call(e,n,u(),L,h(),U,s)});if(a.push(C),f){let E=A(f.value,L=>{var oe;let U=y;(oe=e.onChange)==null||oe.call(e,n,u(),U,h(),U,s)});a.push(E)}};e.once||d(),e.onBind&&a.push(e.onBind(n,i,r,o,f,s)),(T=e.onChange)==null||T.call(e,n,u(),void 0,h(),void 0,s)}};var Yn="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 go(t){return!!t||t===""}var pn={onChange:(t,e,n,r,o,s)=>{var a;if(r){s&&s.includes("camel")&&(r=P(r)),Nt(t,r,e[0],o);return}let i=e.length;for(let c=0;c<i;++c){let p=e[c];if(x(p)){let f=(a=n==null?void 0:n[c])==null?void 0:a[0],l=p[0],u=p[1];Nt(t,l,u,f)}else if(N(p))for(let f of Object.entries(p)){let l=f[0],u=f[1],y=n==null?void 0:n[c],h=y&&l in y?l:void 0;Nt(t,l,u,h)}else{let f=n==null?void 0:n[c],l=e[c++],u=e[c];Nt(t,l,u,f)}}}},Nt=(t,e,n,r)=>{if(r&&r!==e&&t.removeAttribute(r),te(e)){k(3,name,t);return}if(!B(e)){k(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){te(n)?t.removeAttributeNS(Yn,e.slice(6,e.length)):t.setAttributeNS(Yn,e,n);return}let o=e in yo;te(n)||o&&!go(n)?t.removeAttribute(e):t.setAttribute(e,o?"":n)};var fn={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(x(s)){let a=s.length;for(let c=0;c<a;++c)Zn(t,s[c],i==null?void 0:i[c])}else Zn(t,s,i)}}},Zn=(t,e,n)=>{let r=t.classList,o=B(e),s=B(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 er={onChange:(t,e)=>{let[n,r]=e;H(r)?r(t,n):t.innerHTML=n==null?void 0:n.toString()}};function bo(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=he(t[r],e[r]);return n}function he(t,e){if(t===e)return!0;let n=Kt(t),r=Kt(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=Qe(t),r=Qe(e),n||r)return t===e;if(n=x(t),r=x(e),n||r)return n&&r?bo(t,e):!1;if(n=N(t),r=N(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||!he(t[i],e[i]))return!1}}return String(t)===String(e)}function Mt(t,e){return t.findIndex(n=>he(n,e))}var tr=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var ln=t=>{if(!g(t))throw D(3,"pause");t(void 0,void 0,3)};var un=t=>{if(!g(t))throw D(3,"resume");t(void 0,void 0,4)};var rr={onChange:(t,e)=>{To(t,e[0])},onBind:(t,e,n,r,o,s)=>Eo(t,e,s)},To=(t,e)=>{let n=ar(t);if(n&&or(t))x(e)?e=Mt(e,ye(t))>-1:Z(e)?e=e.has(ye(t)):e=wo(t,e),t.checked=e;else if(n&&sr(t))t.checked=he(e,ye(t));else if(n||cr(t))ir(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(pr(t)){let r=t.options,o=r.length,s=t.multiple;for(let i=0;i<o;i++){let a=r[i],c=ye(a);if(s)x(e)?a.selected=Mt(e,c)>-1:a.selected=e.has(c);else if(he(ye(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else k(7,t)},ot=t=>(g(t)&&(t=t()),H(t)&&(t=t()),t?B(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",sr=t=>t.type==="radio",ir=t=>t.type==="number"||t.type==="range",ar=t=>t.tagName==="INPUT",cr=t=>t.tagName==="TEXTAREA",pr=t=>t.tagName==="SELECT",Eo=(t,e,n)=>{let r=e.value,o=ot(n==null?void 0:n.join(",")),s=ot(r()[1]),i={int:o.int||s.int,lazy:o.lazy||s.lazy,number:o.number||s.number,trim:o.trim||s.trim};if(!e.refs[0])return k(8,t),()=>{};let a=()=>e.refs[0],c=ar(t);return c&&or(t)?Ro(t,a):c&&sr(t)?Oo(t,a):c||cr(t)?Co(t,i,a,r):pr(t)?Ao(t,a,r):(k(7,t),()=>{})},nr=/[.,' ·٫]/,Co=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=ir(t),a=()=>{!e.trim&&!ot(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=n();if(!y)return;let h=u.target;if(!h||h.composing)return;let d=h.value,T=ot(r()[1]);if(i||T.number||T.int){if(T.int)d=parseInt(d);else{if(nr.test(d[d.length-1])&&d.split(nr).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(y()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else T.trim&&(d=d.trim());y(d)};return t.addEventListener(s,l),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",p),t.addEventListener("change",p),f},Ro=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=ye(t),a=t.checked,c=s();if(x(c)){let p=Mt(c,i),f=p!==-1;a&&!f?c.push(i):!a&&f&&c.splice(p,1)}else Z(c)?a?c.add(i):c.delete(i):s(So(t,a))};return t.addEventListener(n,o),r},ye=t=>"_value"in t?t._value:t.value,fr="trueValue",xo="falseValue",lr="true-value",vo="false-value",So=(t,e)=>{let n=e?fr:xo;if(n in t)return t[n];let r=e?lr:vo;return t.hasAttribute(r)?t.getAttribute(r):e},wo=(t,e)=>{if(fr in t)return he(e,t.trueValue);let r=lr;return t.hasAttribute(r)?he(e,t.getAttribute(r)):he(e,!0)},Oo=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=ye(t);s(i)};return t.addEventListener(n,o),r},Ao=(t,e,n)=>{let r="change",o=()=>{t.removeEventListener(r,s)},s=()=>{let i=e();if(!i)return;let c=ot(n()[1]).number,p=Array.prototype.filter.call(t.options,f=>f.selected).map(f=>c?tr(ye(f)):ye(f));if(t.multiple){let f=i();try{if(ln(i),Z(f)){f.clear();for(let l of p)f.add(l)}else x(f)?(f.splice(0),f.push(...p)):i(p)}finally{un(i),W(i)}}else i(p[0])};return t.addEventListener(r,s),o};var No=["stop","prevent","capture","self","once","left","right","middle","passive"],Mo=t=>{let e={};if(z(t))return;let n=t.split(",");for(let r of No)e[r]=n.includes(r);return e},dn={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=V(o.value()[0]);return B(y)?mn(t,P(y),()=>e.value()[0],(f=s==null?void 0:s.join(","))!=null?f:u[1]):()=>{}}else if(r){let u=e.value();return mn(t,P(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(H(y)&&(y=y()),N(y))for(let h of Object.entries(y)){let d=h[0],T=()=>{let E=e.value()[u];return H(E)&&(E=E()),E=E[d],H(E)&&(E=E()),E},C=y[d+"_flags"];i.push(mn(t,d,T,C))}else k(2,name,t)}return a}},ko=(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]},mn=(t,e,n,r)=>{if(z(e))return k(5,name,t),()=>{};let o=Mo(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=ko(e,r);let a=f=>{if(!i(f)||!n&&e==="submit"&&(o!=null&&o.prevent))return;let l=n(f);H(l)&&(l=l(f)),H(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=P(r)),je(t,r,e[0]);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(x(c)){let p=c[0],f=c[1];je(t,p,f)}else if(N(c))for(let p of Object.entries(c)){let f=p[0],l=p[1];je(t,f,l)}else{let p=e[a++],f=e[a];je(t,p,f)}}}};function Lo(t){return!!t||t===""}var je=(t,e,n)=>{if(te(e)){k(3,name,t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(le),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=Lo(n):n==null&&s==="string"?(n="",o=!0):s==="number"&&(n=0,o=!0)}try{t[e]=n}catch(s){o||k(4,e,r,n,s)}o&&t.removeAttribute(e)};var mr={once:!0,onBind:(t,e,n)=>{let r=e.value()[0],o=x(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 dr={onChange:(t,e)=>{let n=Oe(t).data,r=n._ord;kn(r)&&(r=n._ord=t.style.display),!!e[0]?t.style.display=r:t.style.display="none"}};var gn={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(x(s)){let a=s.length;for(let c=0;c<a;++c)hr(t,s[c],i==null?void 0:i[c])}else hr(t,s,i)}}},hr=(t,e,n)=>{let r=t.style,o=B(e);if(e&&!o){if(n&&!B(n))for(let s in n)e[s]==null&&yn(r,s,"");for(let s in e)yn(r,s,e[s])}else{let s=r.display;if(o?n!==e&&(r.cssText=e):n&&t.removeAttribute("style"),"_ord"in Oe(t).data)return;r.display=s}},yr=/\s*!important$/;function yn(t,e,n){if(x(n))n.forEach(r=>{yn(t,e,r)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let r=Io(t,e);yr.test(n)?t.setProperty(Be(r),n.replace(yr,""),"important"):t[r]=n}}var gr=["Webkit","Moz","ms"],hn={};function Io(t,e){let n=hn[e];if(n)return n;let r=P(e);if(r!=="filter"&&r in t)return hn[e]=r;r=et(r);for(let o=0;o<gr.length;o++){let s=gr[o]+r;if(s in t)return hn[e]=s}return e}var X=t=>br(V(t)),br=(t,e=new WeakMap)=>{if(!t||!N(t))return t;if(x(t))return t.map(X);if(Z(t)){let r=new Set;for(let o of t.keys())r.add(X(o));return r}if(be(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 V(e.get(t));let n=ct({},t);e.set(t,n);for(let r of Object.entries(n))n[r[0]]=br(V(r[1]),e);return n};var Tr={onChange:(t,e)=>{var r;let n=e[0];t.textContent=Z(n)?JSON.stringify(X([...n])):be(n)?JSON.stringify(X([...n])):N(n)?JSON.stringify(X(n)):(r=n==null?void 0:n.toString())!=null?r:""}};var Er={onChange:(t,e)=>{je(t,"value",e[0])}};var xe=class xe{constructor(e){m(this,"j",{});m(this,"f",{});m(this,"We",()=>Object.keys(this.j).filter(e=>e.length===1||!e.startsWith(":")));m(this,"le",new Map);m(this,"ue",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.ot()}static getDefault(){var e;return(e=xe.Oe)!=null?e:xe.Oe=new xe}ot(){let e={},n=globalThis;for(let r of xe.rt.split(","))e[r]=n[r];return e.ref=de,e.sref=G,e.flatten=X,e}addComponent(...e){for(let n of e){if(!n.defaultName){lt.warning("Registered component's default name is not defined",n);continue}this.le.set(et(n.defaultName),n),this.ue.set(et(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.j={".":ur,":":pn,"@":dn,[`${e}on`]:dn,[`${e}bind`]:pn,[`${e}html`]:er,[`${e}text`]:Tr,[`${e}show`]:dr,[`${e}model`]:rr,":style":gn,[`${e}bind:style`]:gn,":class":fn,[`${e}bind:class`]:fn,":ref":mr,":value":Er,[`${e}teleport`]:bt},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.j,this.f)}};m(xe,"Oe"),m(xe,"rt","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 re=xe;var kt=(t,e)=>{if(!t)return;let r=(e!=null?e:re.getDefault()).f,o=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of Uo(t,r.pre,s))Do(i,r.text,o,s)},Do=(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=Cr(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=Cr(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)},Uo=(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},Cr=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var Ho=9,Bo=10,_o=13,Po=32,ve=46,Lt=44,Vo=39,jo=34,It=40,$e=41,Dt=91,Ut=93,bn=63,$o=59,Rr=58,Fo=123,Ht=125,En=43,qo=45,xr=96,vr=47,zo=92,Sr=[2,3],wr=[En,qo],Lr={"-":1,"!":1,"~":1,"+":1,new:1},Ir={"=":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},qe=Mn(ct({"=>":2},Ir),{"||":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}),Dr=Object.keys(Ir),Ko=new Set(Dr),Bt=new Set;Bt.add("=>");Dr.forEach(t=>Bt.add(t));var Wo=new Set(["$","_"]),Or={true:!0,false:!1,null:null},Go="this";function Ur(t){return Math.max(0,...Object.keys(t).map(e=>e.length))}var Jo=Ur(Lr),Qo=Ur(qe),ze="Expected ",Me="Unexpected ",Rn="Unclosed ",Xo=ze+":",Ar=ze+"expression",Yo="missing }",Zo=Me+"object property",es=Rn+"(",Nr=ze+"comma",Mr=Me+"token ",ts=Me+"period",Tn=ze+"expression after ",ns="missing unaryOp argument",rs=Rn+"[",os=ze+"exponent (",ss="Variable names cannot start with a number (",is=Rn+'quote after "';var Fe=t=>t>=48&&t<=57,kr=t=>qe[t]||0,Cn=class{constructor(e){m(this,"st",{0:[this.it],1:[this.at,this.pt,this.ct],2:[this.ft,this.lt,this.ut,this.Ne,this.mt],3:[this.dt,this.yt,this.ht]});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 qe)||Wo.has(n)}re(e){return this.U(e)||Fe(e)}i(e){return new Error(`${e} at character ${this.e}`)}k(e,n,r){let o=this.st[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===Po||e===Ho||e===Bo||e===_o;)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===$o||r===Lt)this.e++;else{let o=this.A();if(o)n.push(o);else if(this.e<this.r.length){if(r===e)break;throw this.i(Me+'"'+this.M+'"')}}}return n}A(){var n;let e=(n=this.k(0,1))!=null?n:this.Me();return this.y(),this.k(1,0,e)}se(){this.y();let e=this.e,n=this.r,r=n.substr(e,Qo),o=r.length;for(;o>0;){if(r in qe&&(!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}Me(){let e,n,r,o,s,i,a,c;if(s=this.$(),!s||(n=this.se(),!n))return s;if(o={value:n,prec:kr(n),right_a:Bt.has(n)},i=this.$(),!i)throw this.i(Tn+n);let p=[s,o,i];for(;n=this.se();){if(r=kr(n),r===0){this.e-=n.length;break}o={value:n,prec:r,right_a:Bt.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.$(),!e)throw this.i(Tn+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}$(){let e,n,r;if(this.y(),r=this.k(2,1),r)return this.k(3,0,r);let o=this.l;if(Fe(o)||o===ve)return this.gt();if(o===Vo||o===jo)r=this.bt();else if(o===Dt)r=this.Tt();else{for(e=this.r.substr(this.e,Jo),n=e.length;n>0;){if(Object.prototype.hasOwnProperty.call(Lr,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.$();if(!s)throw this.i(ns);return this.k(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===Go&&(r={type:5})):o===It&&(r=this.xt())}return r?(r=this.F(r),this.k(3,0,r)):this.k(3,0,!1)}F(e){this.y();let n=this.l;for(;n===ve||n===Dt||n===It||n===bn;){let r;if(n===bn){if(this.r.charCodeAt(this.e+1)!==ve)break;r=!0,this.e+=2,this.y(),n=this.l}if(this.e++,n===Dt){if(e={type:3,computed:!0,object:e,property:this.A()},this.y(),n=this.l,n!==Ut)throw this.i(rs);this.e++}else n===It?e={type:6,arguments:this.ke($e),callee:e}:(n===ve||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}gt(){let e="",n;for(;Fe(this.l);)e+=this.r.charAt(this.e++);if(this.m(ve))for(e+=this.r.charAt(this.e++);Fe(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++));Fe(this.l);)e+=this.r.charAt(this.e++);if(!Fe(this.r.charCodeAt(this.e-1)))throw this.i(os+e+this.M+")")}let r=this.l;if(this.U(r))throw this.i(ss+e+this.M+")");if(r===ve||e.length===1&&e.charCodeAt(0)===ve)throw this.i(ts);return{type:4,value:parseFloat(e),raw:e}}bt(){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(is+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(Me+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)}}ke(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===$e&&o&&o>=n.length)throw this.i(Mr+String.fromCharCode(e));break}else if(s===Lt){if(this.e++,o++,o!==n.length){if(e===$e)throw this.i(Mr+",");if(e===Ut)for(let i=n.length;i<o;i++)n.push(null)}}else{if(n.length!==o&&o!==0)throw this.i(Nr);{let i=this.A();if(!i||i.type===0)throw this.i(Nr);n.push(i)}}}if(!r)throw this.i(ze+String.fromCharCode(e));return n}xt(){this.e++;let e=this.oe($e);if(this.m($e))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(es)}Tt(){return this.e++,{type:9,elements:this.ke(Ut)}}ft(e){if(this.m(Fo)){this.e++;let n=[];for(;!isNaN(this.l);){if(this.y(),this.m(Ht)){this.e++,e.node=this.F({type:10,properties:n});return}let r=this.A();if(!r)break;if(this.y(),r.type===2&&(this.m(Lt)||this.m(Ht)))n.push({type:12,computed:!1,key:r,value:r,shorthand:!0});else if(this.m(Rr)){this.e++;let o=this.A();if(!o)throw this.i(Zo);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(Lt)&&this.e++}throw this.i(Yo)}}lt(e){let n=this.l;if(wr.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){this.e+=2;let r=e.node={type:13,operator:n===En?"++":"--",argument:this.F(this.ie()),prefix:!0};if(!r.argument||!Sr.includes(r.argument.type))throw this.i(Me+r.operator)}}yt(e){if(e.node){let n=this.l;if(wr.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){if(!Sr.includes(e.node.type))throw this.i(Me+e.node.operator);this.e+=2,e.node={type:13,operator:n===En?"++":"--",argument:e.node,prefix:!1}}}}ut(e){[0,1,2].every(n=>this.r.charCodeAt(this.e+n)===ve)&&(this.e+=3,e.node={type:14,argument:this.A()})}ct(e){if(e.node&&this.m(bn)){this.e++;let n=e.node,r=this.A();if(!r)throw this.i(Ar);if(this.y(),this.m(Rr)){this.e++;let o=this.A();if(!o)throw this.i(Ar);if(e.node={type:11,test:n,consequent:r,alternate:o},n.operator&&qe[n.operator]<=.9){let s=n;for(;s.right.operator&&qe[s.right.operator]<=.9;)s=s.right;e.node.test=s.right,s.right=e.node,e.node=n}}else throw this.i(Xo)}}it(e){if(this.y(),this.m(It)){let n=this.e;if(this.e++,this.y(),this.m($e)){this.e++;let r=this.se();if(r==="=>"){let o=this.Me();if(!o)throw this.i(Tn+r);e.node={type:15,params:null,body:o};return}}this.e=n}}at(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))}pt(e){e.node&&this.q(e.node)}q(e){Ko.has(e.operator)?(e.type=16,this.q(e.left),this.q(e.right)):e.operator||Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.q(n)})}ht(e){if(!e.node)return;let n=e.node.type;(n===2||n===3)&&this.m(xr)&&(e.node={type:17,tag:e.node,quasi:this.Ne(e)})}Ne(e){if(!this.m(xr))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(Ht)),!this.m(Ht))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 `")}dt(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}mt(e){if(!this.m(vr))return;let n=++this.e,r=!1;for(;this.e<this.r.length;){if(this.l===vr&&!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.F(e.node),e.node}this.m(Dt)?r=!0:r&&this.m(Ut)&&(r=!1),this.e+=this.m(zo)?2:1}throw this.i("Unclosed Regex")}},Hr=t=>new Cn(t).parse();var as={"=>":(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)=>at(t,e)},cs={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},Vr=t=>{if(!(t!=null&&t.some(Pr)))return t;let e=[];return t.forEach(n=>Pr(n)?e.push(...n):e.push(n)),e},Br=(...t)=>Vr(t),xn=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},ps={"++":(t,e)=>{let n=t[e];if(g(n)){let r=n();return n(++r),r}return++t[e]},"--":(t,e)=>{let n=t[e];if(g(n)){let r=n();return n(--r),r}return--t[e]}},fs={"++":(t,e)=>{let n=t[e];if(g(n)){let r=n();return n(r+1),r}return t[e]++},"--":(t,e)=>{let n=t[e];if(g(n)){let r=n();return n(r-1),r}return t[e]--}},_r={"=":(t,e,n)=>{let r=t[e];return g(r)?r(n):t[e]=n},"+=":(t,e,n)=>{let r=t[e];return g(r)?r(r()+n):t[e]+=n},"-=":(t,e,n)=>{let r=t[e];return g(r)?r(r()-n):t[e]-=n},"*=":(t,e,n)=>{let r=t[e];return g(r)?r(r()*n):t[e]*=n},"/=":(t,e,n)=>{let r=t[e];return g(r)?r(r()/n):t[e]/=n},"%=":(t,e,n)=>{let r=t[e];return g(r)?r(r()%n):t[e]%=n},"**=":(t,e,n)=>{let r=t[e];return g(r)?r(at(r(),n)):t[e]=at(t[e],n)},"<<=":(t,e,n)=>{let r=t[e];return g(r)?r(r()<<n):t[e]<<=n},">>=":(t,e,n)=>{let r=t[e];return g(r)?r(r()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let r=t[e];return g(r)?r(r()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let r=t[e];return g(r)?r(r()|n):t[e]|=n},"&=":(t,e,n)=>{let r=t[e];return g(r)?r(r()&n):t[e]&=n},"^=":(t,e,n)=>{let r=t[e];return g(r)?r(r()^n):t[e]^=n}},_t=(t,e)=>H(t)?t.bind(e):t,vn=class{constructor(e,n,r,o,s){m(this,"u");m(this,"Ve");m(this,"Ie");m(this,"De");m(this,"O");m(this,"Ue");m(this,"Be");this.u=x(e)?e:[e],this.Ve=n,this.Ie=r,this.De=o,this.Be=!!s}He(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.O=r[o],_t(V(r[o]),r);for(let i of this.u)if(o in i)return this.O=i[o],_t(V(i[o]),i);let s=this.Ve;if(s&&o in s)return this.O=s[o],_t(V(s[o]),s)}5(e,n,r){return this.u[0]}0(e,n,r){return this.Pe(n,r,Br,...e.body)}1(e,n,r){return this.E(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.O=i,_t(V(i),o)}4(e,n,r){return e.value}6(e,n,r){let o=(i,...a)=>H(i)?i(...Vr(a)):i,s=this.E(++n,r,o,e.callee,...e.arguments);return this.O=s,s}7(e,n,r){return this.E(n,r,cs[e.operator],e.argument)}8(e,n,r){let o=as[e.operator];switch(e.operator){case"||":case"&&":case"??":return o(()=>this.g(e.left,n,r),()=>this.g(e.right,n,r))}return this.E(n,r,o,e.left,e.right)}9(e,n,r){return this.Pe(++n,r,Br,...e.elements)}10(e,n,r){let o={},s=(...i)=>{i.forEach(a=>{Object.assign(o,a)})};return this.E(++n,r,s,...e.properties),o}11(e,n,r){return this.E(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.De)!=null?f:()=>!1,a=n===0&&this.Be,c=l=>this._e(a,e.key,n,xn(l,r)),p=l=>this._e(a,e.value,n,xn(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=V(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?ps:fs;if(o.type===2){let a=o.name,c=this.He(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.He(i,r);if(te(a))return;let c=this.g(e.right,n,r);return _r[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 _r[s](i,a,c)}}14(e,n,r){let o=this.g(e.argument,n,r);return x(o)&&(o.s=jr),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.E(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.E(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=V(this[e.type](e,n,r));return this.Ue=e.type,o}_e(e,n,r,o){let s=this.g(n,r,o);return e&&this.je()?this.O:s}je(){let e=this.Ue;return(e===2||e===3||e===6)&&g(this.O)}eval(e,n){let{value:r,refs:o}=on(()=>this.g(e,-1,n)),s={value:r,refs:o};return this.je()&&(s.ref=this.O),s}E(e,n,r,...o){let s=o.map(i=>i&&this.g(i,e,n));return r(...s)}Pe(e,n,r,...o){let s=this.Ie;if(!s)return this.E(e,n,r,...o);let i=o.map((a,c)=>a&&(a.type!==15&&s(c,e)?p=>this.g(a,e,xn(p,n)):this.g(a,e,n)));return r(...i)}},jr=Symbol("s"),Pr=t=>(t==null?void 0:t.s)===jr,$r=(t,e,n,r,o,s,i)=>new vn(e,n,r,o,i).eval(t,s);var Fr={},Pt=class{constructor(e,n){m(this,"u");m(this,"o");m(this,"$e",[]);this.u=e,this.o=n}S(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 h of a)h();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=(h,d,T,C)=>{try{let E=$r(h,d,f,n,r,C,o);return T&&l.push(...E.refs),{value:E.value,refs:E.refs,ref:E.ref}}catch(E){k(6,`evaluation error: ${e}`,E)}return{value:void 0,refs:[]}};try{let h=(y=Fr[e])!=null?y:Hr("["+e+"]");Fr[e]=h;let d=this.u,T=()=>{l.splice(0),c();let C=h.elements.map((E,L)=>n!=null&&n(L,-1)?{value:U=>u(E,d,!1,{$event:U}).value,refs:[]}:u(E,d,!0));if(!s)for(let E of l){let L=A(E,T);a.push(L)}p.refs=C.map(E=>E.ref),i(C.map(E=>E.value))};T()}catch(h){k(6,`parse error: ${e}`,h)}return p}V(){return this.u}te(e){this.$e.push(this.u),this.u=e}v(e,n){try{this.te(e),n()}finally{this.Rt()}}Rt(){var e;this.u=(e=this.$e.pop())!=null?e:[]}};var qr=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},ls=(t,e)=>{let n="";for(let r=e;r<t.length;++r){let o=t[r];if(n){o===n&&(n="");continue}if(o==='"'||o==="'"){n=o;continue}if(o===">")return r}return-1},us=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
4
- `);)++n;if(n>=t.length||!qr(t[n]))return null;let r=n;for(;n<t.length&&qr(t[n]);)++n;return{start:r,end:n}},zr=new Set(["table","thead","tbody","tfoot"]),ms=new Set(["thead","tbody","tfoot"]),ds=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),Vt=t=>{var s;let e=0,n=[],r=[],o=0;for(;e<t.length;){let i=t.indexOf("<",e);if(i===-1){n.push(t.slice(e));break}if(n.push(t.slice(e,i)),t.startsWith("<!--",i)){let T=t.indexOf("-->",i+4);if(T===-1){n.push(t.slice(i));break}n.push(t.slice(i,T+3)),e=T+3;continue}let a=ls(t,i);if(a===-1){n.push(t.slice(i));break}let c=t.slice(i,a+1),p=c.startsWith("</");if(c.startsWith("<!")||c.startsWith("<?")){n.push(c),e=a+1;continue}let l=us(c,p);if(!l){n.push(c),e=a+1;continue}let u=c.slice(l.start,l.end);if(p){let T=r[r.length-1];T?(r.pop(),n.push(T.replacementHost?`</${T.replacementHost}>`:c),zr.has(T.effectiveTag)&&--o):n.push(c),e=a+1;continue}let y=c.charCodeAt(c.length-2)===47,h=r[r.length-1],d=null;if(o===0?u==="tr"?d="trx":u==="td"?d="tdx":u==="th"&&(d="thx"):ms.has((s=h==null?void 0:h.effectiveTag)!=null?s:"")?d=u==="tr"?null:"tr":(h==null?void 0:h.effectiveTag)==="table"?d=ds.has(u)?null:"tr":(h==null?void 0:h.effectiveTag)==="tr"&&(d=u==="td"||u==="th"?null:"td"),d){let T=d==="trx"||d==="tdx"||d==="thx";n.push(`${c.slice(0,l.start)}${d} is="${T?`r-${u}`:`regor:${u}`}"${c.slice(l.end)}`)}else y&&(h==null?void 0:h.effectiveTag)==="tr"?n.push(`${c.slice(0,c.length-2)}></${u}>`):n.push(c);if(!y){let T=d==="trx"?"tr":d==="tdx"?"td":d==="thx"?"th":d||u;r.push({replacementHost:d,effectiveTag:T}),zr.has(T)&&++o}e=a+1}return n.join("")};var hs="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",ys=new Set(hs.toUpperCase().split(",")),gs="http://www.w3.org/2000/svg",Kr=(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&&ys.has(o.toUpperCase())?document.createElementNS(gs,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(gt(l,r),u)}let p=t.c;if(p)for(let f of p)Sn(f,a,n,r);Kr(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)Kr(e,a);else throw new Error("unsupported node type.")}},Ke=(t,e,n)=>{n!=null||(n=re.getDefault());let r=document.createDocumentFragment();if(!x(t))return Sn(t,r,!!e,n),r;for(let o of t)Sn(o,r,!!e,n);return r};var bs=(t,e={selector:"#app"},n)=>{B(e)&&(e={selector:"#app",template:e}),Fn(t)&&(t=t.context);let r=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!r||!Ae(r))throw D(0);n||(n=re.getDefault());let o=()=>{for(let a of[...r.childNodes])q(a)},s=a=>{for(let c of a)r.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(Vt(e.template));o(),s(a.childNodes),e.element=a}else if(e.json){let a=Ke(e.json,e.isSVG,n);o(),s(a.childNodes)}return n.useInterpolation&&kt(r,n),new wn(t,r,n).x(),_(r,()=>{Te(t)}),Tt(t),{context:t,unmount:()=>{q(r)},unbind:()=>{le(r)}}},wn=class{constructor(e,n,r){m(this,"Et");m(this,"Fe");m(this,"o");m(this,"h");m(this,"p");this.Et=e,this.Fe=n,this.o=r,this.h=new Pt([e],r),this.p=new At(this.h)}x(){this.p.P(this.Fe)}};var st=t=>{if(x(t))return t.map(o=>st(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=>{var s;return[o,(s=t.getAttribute(o))!=null?s:""]})));let r=me(t);return r.length>0&&(e.c=[...r].map(o=>st(o))),e};var Ts=(t,e={})=>{var s,i,a,c,p,f;x(e)&&(e={props:e}),B(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 D(1,t.selector);l.remove(),t.element=l}else if(t.template){let l=document.createRange().createContextualFragment(Vt(t.template));t.element=l}else t.json&&(t.element=Ke(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:re.getDefault());let o=t.element;if(!r&&(((p=t.isSVG)!=null?p:Ze(o)&&((c=o.hasAttribute)!=null&&c.call(o,"isSVG")))||Ze(o)&&o.querySelector("[isSVG]"))){let l=o.content,u=l?[...l.childNodes]:[...o.childNodes],y=st(u);t.element=Ke(y,!0,e.config)}return{context:n,template:t.element,inheritAttrs:(f=e.inheritAttrs)!=null?f:!0,props:e.props,defaultName:e.defaultName}};var Es=t=>{var e;(e=we())==null||e.onMounted.push(t)};var Cs=t=>{let e,n={},r=(...o)=>{if(o.length<=2&&0 in o)throw D(4);return e&&!n.isStopped?e(...o):(e=Rs(t,n),e(...o))};return r[Q]=1,Re(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=Pe(()=>{if(r>0){o(),e.isStopped=!0,W(n);return}n(t()),++r});return n.stop=o,n};var xs=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw D(4);return r&&!n.isStopped?r(...s):(r=vs(t,e,n),r(...s))};return o[Q]=1,Re(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 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,W(r);return}let p=t.map(f=>f());r(e(...p)),++o},i=[];for(let c of t){let p=A(c,s);i.push(p)}return s(null),r.stop=()=>{i.forEach(c=>{c()})},r};var Ss=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw D(4);return r&&!n.isStopped?r(...s):(r=ws(t,e,n),r(...s))};return o[Q]=1,Re(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},ws=(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=A(t,i=>{if(o>0){r.stop(),n.isStopped=!0,W(r);return}r(e(i)),++o},!0),r};var Os=t=>(t[mt]=1,t);var As=(t,e)=>{if(!e)throw D(5);let r=_e(t)?de: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){k(6,`persist: failed to parse data for key ${e}`,a),o()}else o();let i=Pe(o);return J(i,!0),t};var Wr=(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},Ns=Wr;var Ms=(t,e,n)=>{let r=[],o=()=>{e(t.map(i=>i()))};for(let i of t)r.push(A(i,o));n&&o();let s=()=>{for(let i of r)i()};return J(s,!0),s};var ks=t=>{if(!g(t))throw D(3,"observerCount");return t(void 0,void 0,2)};var Ls=t=>{Gr();try{t()}finally{Jr()}},Gr=()=>{pe.stack||(pe.stack=[]),pe.stack.push(new Set)},Jr=()=>{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{W(n)}catch(r){console.error(r)}};export{Xe as ComponentHead,re as RegorConfig,_ as addUnbinder,Ls as batch,on as collectRefs,xs as computeMany,Ss as computeRef,Cs as computed,bs as createApp,Ts as createComponent,Jr as endBatch,tt as entangle,X as flatten,Oe as getBindData,Wr as html,_e as isDeepRef,nt as isRaw,g as isRef,Os as markRaw,A as observe,Ms as observeMany,ks as observerCount,Es as onMounted,J as onUnmounted,ln as pause,As as persist,Ns as raw,de as ref,q as removeNode,un as resume,rn as silence,G as sref,Gr as startBatch,Ke as toFragment,st as toJsonTemplate,W as trigger,le as unbind,V as unref,nn as useScope,lt as warningHandler,Pe as watchEffect};
1
+ var Qr=Object.defineProperty,Xr=Object.defineProperties;var Yr=Object.getOwnPropertyDescriptors;var Nn=Object.getOwnPropertySymbols;var Zr=Object.prototype.hasOwnProperty,eo=Object.prototype.propertyIsEnumerable;var ct=Math.pow,qt=(t,e,n)=>e in t?Qr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,pt=(t,e)=>{for(var n in e||(e={}))Zr.call(e,n)&&qt(t,n,e[n]);if(Nn)for(var n of Nn(e))eo.call(e,n)&&qt(t,n,e[n]);return t},Mn=(t,e)=>Xr(t,Yr(e));var m=(t,e,n)=>qt(t,typeof e!="symbol"?e+"":e,n);var De=Symbol(":regor");var le=t=>{let e=[t];for(;e.length>0;){let n=e.shift();to(n);let r=n.childNodes;if(r)for(let o of r)e.push(o)}},to=t=>{let e=t[De];if(e){for(let n of e.unbinders)n();e.unbinders.splice(0),delete t[De]}};var F=t=>{t.remove(),setTimeout(()=>le(t),1)};var B=t=>typeof t=="function",_=t=>typeof t=="string",kn=t=>typeof t=="undefined",ne=t=>t==null||typeof t=="undefined",q=t=>typeof t!="string"||!(t!=null&&t.trim()),no=Object.prototype.toString,zt=t=>no.call(t),Te=t=>zt(t)==="[object Map]",te=t=>zt(t)==="[object Set]",Kt=t=>zt(t)==="[object Date]",Xe=t=>typeof t=="symbol",R=Array.isArray,O=t=>t!==null&&typeof t=="object";var Ln={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."},U=(t,...e)=>{let n=Ln[t];return new Error(B(n)?n.call(Ln,...e):n)};var ft=[],In=()=>{let t={onMounted:[],onUnmounted:[]};return ft.push(t),t},Ae=t=>{let e=ft[ft.length-1];if(!e&&!t)throw U(2);return e},Dn=t=>{let e=Ae();return t&&Gt(t),ft.pop(),e},Wt=Symbol("csp"),Gt=t=>{let e=t,n=e[Wt];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[Wt]=Ae()},lt=t=>t[Wt];var Ee=t=>{var n,r;let e=(n=lt(t))==null?void 0:n.onUnmounted;e==null||e.forEach(o=>{o()}),(r=t.unmounted)==null||r.call(t)};var Ye=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,"pe");m(this,"emit",(e,n)=>{this.pe.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.pe=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;for(let r of this.ctx)Ee(r)}};var Ne=t=>{let e=t,n=e[De];if(n)return n;let r={unbinders:[],data:{}};return e[De]=r,r};var P=(t,e)=>{Ne(t).unbinders.push(e)};var Un={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]})},L=(t,...e)=>{let n=Un[t],r=B(n)?n.call(Un,...e):n,o=ut.warning;o&&(_(r)?o(r):o(r,...r.args))},ut={warning:console.warn};var Q=(t,e)=>{var n;(n=Ae(e))==null||n.onUnmounted.push(t)};var mt=Symbol("ref"),X=Symbol("sref"),dt=Symbol("raw");var g=t=>(t==null?void 0:t[X])===1;var w=(t,e,n)=>{if(!g(t))throw U(3,"observe");n&&e(t());let o=t(void 0,void 0,0,e);return Q(o,!0),o};var yt={},ht={},Hn=1,Bn=t=>{let e=(Hn++).toString();return yt[e]=t,ht[e]=0,e},Jt=t=>{ht[t]+=1},Qt=t=>{--ht[t]===0&&(delete yt[t],delete ht[t])},_n=t=>yt[t],Xt=()=>Hn!==1&&Object.keys(yt).length>0,Ze="r-switch",ro=t=>{let e=t.filter(r=>Me(r)).map(r=>[...r.querySelectorAll("[r-switch]")].map(o=>o.getAttribute(Ze))),n=new Set;return e.forEach(r=>{r.forEach(o=>o&&n.add(o))}),[...n]},Ue=(t,e)=>{if(!Xt())return;let n=ro(e);n.length!==0&&(n.forEach(Jt),P(t,()=>{n.forEach(Qt)}))};var Yt=(t,e,n,r)=>{let o=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,r),o.push(i)}Re(e,o)},Zt=Symbol("r-if"),Pn=Symbol("r-else"),Vn=t=>t[Pn]===1,gt=class{constructor(e){m(this,"p");m(this,"B");m(this,"K");m(this,"z");m(this,"W");m(this,"b");m(this,"T");this.p=e,this.B=e.o.f.if,this.K=Be(e.o.f.if),this.z=e.o.f.else,this.W=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.B),r=Ce(e,this.K);for(let o of r)this.x(o);return n}G(e){return e[Zt]?!0:(e[Zt]=!0,Ce(e,this.K).forEach(n=>n[Zt]=!0),!1)}x(e){if(e.hasAttribute(this.T)||this.G(e)||this.qe(e,this.b))return;let n=e.getAttribute(this.B);if(!n){L(0,this.B,e);return}e.removeAttribute(this.B),this.L(e,n)}P(e,n,r){let o=He(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${r!=null?r:""}`);s.insertBefore(i,e),Ue(i,o),o.forEach(c=>{F(c)}),e.remove(),n!=="if"&&(e[Pn]=1);let a=document.createComment(`__end__ :${n}${r!=null?r:""}`);return s.insertBefore(a,i.nextSibling),{nodes:o,parent:s,commentBegin:i,commentEnd:a}}ce(e,n){if(!e)return[];let r=e.nextElementSibling;if(e.hasAttribute(this.z)){e.removeAttribute(this.z);let{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"else");return[{mount:()=>{Yt(o,this.p,s,a)},unmount:()=>{ue(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let o=e.getAttribute(this.W);if(!o)return[];e.removeAttribute(this.W);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.P(e,"elseif",` => ${o} `),p=this.p.h.C(o),f=p.value,l=this.ce(r,n),u=[];P(a,()=>{p.stop();for(let d of u)d();u.length=0});let h=w(f,n);return u.push(h),[{mount:()=>{Yt(s,this.p,i,c)},unmount:()=>{ue(a,c)},isTrue:()=>!!f()[0],isMounted:!1}].concat(l)}}L(e,n){let r=e.nextElementSibling,{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.P(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||(Yt(o,this.p,s,a),f=!0),h.forEach(E=>{E.unmount(),E.isMounted=!1});else{ue(i,a),f=!1;let E=!1;for(let I of h)!E&&I.isTrue()?(I.isMounted||(I.mount(),I.isMounted=!0),E=!0):(I.unmount(),I.isMounted=!1)}})},h=this.ce(r,y),d=[];P(i,()=>{c.stop();for(let E of d)E();d.length=0}),y();let C=w(p,y);d.push(C)}};var He=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"})},Re=(t,e)=>{for(let n of e)Vn(n)||t.H(n)},Ce=(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,Me=t=>t.nodeType===Node.ELEMENT_NODE,et=t=>t.nodeType===Node.ELEMENT_NODE,jn=t=>t instanceof HTMLSlotElement,me=t=>ce(t)?t.content.childNodes:t.childNodes,ue=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let r=n.nextSibling;F(n),n=r}},xe=(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})},$n=(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},Be=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),en=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},oo=/-(\w)/g,V=en(t=>t&&t.replace(oo,(e,n)=>n?n.toUpperCase():"")),so=/\B([A-Z])/g,_e=en(t=>t&&t.replace(so,"-$1").toLowerCase()),tt=en(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var Tt={};var Et=t=>{var n,r;let e=(n=lt(t))==null?void 0:n.onMounted;e==null||e.forEach(o=>{o()}),(r=t.mounted)==null||r.call(t)};var tn=Symbol("scope"),nn=t=>{try{In();let e=t();Gt(e);let n={context:e,unmount:()=>Ee(e),[tn]:1};return n[tn]=1,n}finally{Dn()}},Fn=t=>O(t)?tn in t:!1;var qn={collectRefObj:!0,onBind:(t,e)=>w(e.value,()=>{let r=e.value(),o=e.context,s=r[0];if(O(s))for(let i of Object.entries(s)){let a=i[0],c=i[1],p=o[a];p!==c&&(g(p)?p(c):o[a]=c)}},!0)};var zn={collectRefObj:!0,once:!0,onBind:(t,e)=>{let n=e.value(),r=e.context,o=n[0];if(!O(o))return()=>{};for(let s of Object.entries(o)){let i=s[0],a=s[1],c=r[i];c!==a&&(g(c)?c(a):r[i]=a)}return()=>{}}};var nt=(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 rt=t=>!!t&&t[dt]===1;var Pe=t=>(t==null?void 0:t[mt])===1;var re=[],Kn=t=>{var e;re.length!==0&&((e=re[re.length-1])==null||e.add(t))},Ve=t=>{if(!t)return()=>{};let e={stop:()=>{}};return io(t,e),Q(()=>e.stop(),!0),e.stop},io=(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(re.push(s),t(i=>n.push(i)),r)return;for(let i of[...s]){let a=w(i,()=>{o(),Ve(t)});n.push(a)}}finally{re.pop()}},rn=t=>{let e=re.length,n=e>0&&re[e-1];try{return n&&re.push(null),t()}finally{n&&re.pop()}},on=t=>{try{let e=new Set;return re.push(e),{value:t(),refs:[...e]}}finally{re.pop()}};var K=(t,e,n)=>{if(!g(t))return;let r=t;if(r(void 0,e,1),!n)return;let o=r();if(o){if(R(o)||te(o))for(let s of o)K(s,e,!0);else if(Te(o))for(let s of o)K(s[0],e,!0),K(s[1],e,!0);if(O(o))for(let s in o)K(o[s],e,!0)}};function ao(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var je=(t,e,n)=>{n.forEach(function(r){let o=t[r];ao(e,r,function(...i){let a=o.apply(this,i),c=this[X];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 Wn=Array.prototype,sn=Object.create(Wn),co=["push","pop","shift","unshift","splice","sort","reverse"];je(Wn,sn,co);var Gn=Map.prototype,Rt=Object.create(Gn),po=["set","clear","delete"];Ct(Rt,"Map");je(Gn,Rt,po);var Jn=Set.prototype,xt=Object.create(Jn),fo=["add","clear","delete"];Ct(xt,"Set");je(Jn,xt,fo);var pe={},G=t=>{if(g(t)||rt(t))return t;let e={auto:!0,_value:t},n=c=>O(c)?X in c?!0:R(c)?(Object.setPrototypeOf(c,sn),!0):te(c)?(Object.setPrototypeOf(c,xt),!0):Te(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&&rn(()=>{for(let f of[...o.keys()])o.has(f)&&f(c,p)})},i=c=>{let p=c[X];p||(c[X]=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||g(f)&&(f=f(),e._value===f)?f:(n(f)&&i(f),e._value=f,e.auto&&s(f,l),e._value):(Kn(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[X]=1,xe(a,!1),r&&i(t),a};var de=t=>{if(rt(t))return t;let e;if(g(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[mt]=1,R(t)){let n=t.length;for(let r=0;r<n;++r){let o=t[r];Pe(o)||(t[r]=de(o))}return e}if(!O(t))return e;for(let n of Object.entries(t)){let r=n[1];if(Pe(r))continue;let o=n[0];Xe(o)||(t[o]=null,t[o]=de(r))}return e};var Qn=Symbol("modelBridge"),lo=t=>!!(t!=null&&t[Qn]),uo=t=>{t[Qn]=1},mo=t=>{let e=de(t());return uo(e),e},Xn={collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(!r)return()=>{};let i=V(r),a,c,p=()=>{},f=()=>{p(),p=()=>{},a=void 0,c=void 0},l=()=>{p(),p=()=>{}},u=(h,d)=>{a!==h&&(l(),p=nt(h,d),a=h)},y=w(e.value,()=>{var C;let h=(C=e.refs[0])!=null?C:e.value()[0],d=e.context,T=d[i];if(!g(h)){if(c&&T===c){c(h);return}if(f(),g(T)){T(h);return}d[i]=h;return}if(lo(h)){if(T===h)return;g(T)?u(h,T):d[i]=h;return}c||(c=mo(h)),d[i]=c,u(h,c)},!0);return()=>{p(),y()}}};var vt=class{constructor(e){m(this,"p");m(this,"fe");this.p=e,this.fe=e.o.f.inherit}N(e){this.Ke(e)}Ke(e){var l;let n=this.p,r=n.h,o=n.o.le,s=n.o.ue,i=r.me(),a=r.ze(),c=[...o.keys(),...a,...[...o.keys()].map(_e),...a.map(_e)].join(",");if(q(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 h=u.nextSibling,d=V(u.tagName).toUpperCase(),T=i[d],C=T!=null?T:s.get(d);if(!C)continue;let E=C.template;if(!E)continue;let I=u.parentElement;if(!I)continue;let H=new Comment(" begin component: "+u.tagName),se=new Comment(" end component: "+u.tagName);I.insertBefore(H,u),u.remove();let Ge=n.o.f.props,Je=n.o.f.propsOnce,$t=n.o.f.bind,Qe=(b,N)=>{let x={},M=b.hasAttribute(Ge),W=b.hasAttribute(Je);return r.v(N,()=>{r.S(x),M&&n.x(qn,b,Ge),W&&n.x(zn,b,Je);let v=C.props;if(!v||v.length===0)return;v=v.map(V);let k=new Map(v.map(ee=>[ee.toLowerCase(),ee]));for(let ee of v.concat(v.map(_e))){let fe=b.getAttribute(ee);fe!==null&&(x[V(ee)]=fe,b.removeAttribute(ee))}let Oe=n.J.de(b,!1);for(let[ee,fe]of Oe.entries()){let[Ft,On]=fe.Q;if(!On)continue;let An=k.get(V(On).toLowerCase());An&&(Ft!=="."&&Ft!==":"&&Ft!==$t||n.x(Xn,b,ee,!0,An,fe.X))}}),x},ge=[...r.V()],at=()=>{var M;let b=Qe(u,ge),N=new Ye(b,u,ge,H,se),x=nn(()=>{var W;return(W=C.context(N))!=null?W:{}}).context;if(N.autoProps){for(let[W,v]of Object.entries(b))if(W in x){let k=x[W];if(k===v)continue;N.entangle&&g(k)&&g(v)&&P(H,nt(v,k))}else x[W]=v;(M=N.onAutoPropsAssigned)==null||M.call(N)}return{componentCtx:x,head:N}},{componentCtx:we,head:D}=at(),ie=[...me(E)],S=ie.length,j=u.childNodes.length===0,z=b=>{let N=b.parentElement;if(j){for(let v of[...b.childNodes])N.insertBefore(v,b);return}let x=b.name;q(x)&&(x=b.getAttributeNames().filter(v=>v.startsWith("#"))[0],q(x)?x="default":x=x.substring(1));let M=u.querySelector(`template[name='${x}'], template[\\#${x}]`);!M&&x==="default"&&(M=u.querySelector("template:not([name])"),M&&M.getAttributeNames().filter(v=>v.startsWith("#")).length>0&&(M=null));let W=v=>{D.enableSwitch&&r.v(ge,()=>{r.S(we);let k=Qe(b,r.V());r.v(ge,()=>{r.S(k);let Oe=r.V(),ee=Bn(Oe);for(let fe of v)Me(fe)&&(fe.setAttribute(Ze,ee),Jt(ee),P(fe,()=>{Qt(ee)}))})})};if(M){let v=[...me(M)];for(let k of v)N.insertBefore(k,b);W(v)}else{if(x!=="default"){for(let k of[...me(b)])N.insertBefore(k,b);return}let v=[...me(u)].filter(k=>!ce(k));for(let k of v)N.insertBefore(k,b);W(v)}},J=b=>{if(!Me(b))return;let N=b.querySelectorAll("slot");if(jn(b)){z(b),b.remove();return}for(let x of N)z(x),x.remove()};(()=>{for(let b=0;b<S;++b)ie[b]=ie[b].cloneNode(!0),y.insertBefore(ie[b],h),J(ie[b])})(),I.insertBefore(se,h);let A=()=>{if(!C.inheritAttrs)return;let b=ie.filter(x=>x.nodeType===Node.ELEMENT_NODE);b.length>1&&(b=b.filter(x=>x.hasAttribute(this.fe)));let N=b[0];if(N)for(let x of u.getAttributeNames()){if(x===Ge||x===Je)continue;let M=u.getAttribute(x);if(x==="class")N.classList.add(...M.split(" "));else if(x==="style"){let W=N.style,v=u.style;for(let k of v)W.setProperty(k,v.getPropertyValue(k))}else N.setAttribute(bt(x,n.o),M)}},Y=()=>{for(let b of u.getAttributeNames())!b.startsWith("@")&&!b.startsWith(n.o.f.on)&&u.removeAttribute(b)},Ie=()=>{A(),Y(),r.S(we),n.ye(u,!1),we.$emit=D.emit,Re(n,ie),P(u,()=>{Ee(we)}),P(H,()=>{le(u)}),Et(we)};r.v(ge,Ie)}}};var an=class{constructor(e){m(this,"he");m(this,"Q",[]);m(this,"X",[]);m(this,"ge",[]);this.he=e,this.C()}C(){let e=this.he,n=e.startsWith(".");n&&(e=":"+e.slice(1));let r=e.indexOf("."),o=this.Q=(r<0?e:e.substring(0,r)).split(/[:@]/);if(q(o[0])&&(o[0]=n?".":e[0]),r>=0){let s=this.X=e.slice(r+1).split(".");if(s.includes("camel")){let i=o.length-1;o[i]=V(o[i])}s.includes("prop")&&(o[0]=".")}}},St=class{constructor(e){m(this,"p");m(this,"be");this.p=e,this.be=e.o.We()}de(e,n){let r=new Map;if(!et(e))return r;let o=this.be,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 an(p)),r.get(p).ge.push(a)};if(s(e),!n)return r;let i=e.querySelectorAll("*");for(let a of i)s(a);return r}};var ho=(t,e)=>{for(let n of t){let r=n.cloneNode(!0);e.appendChild(r)}},wt=class{constructor(e){m(this,"p");m(this,"I");m(this,"Te");this.p=e,this.I=e.o.f.is,this.Te=Be(this.I)+", [is]"}N(e){let n=e.hasAttribute(this.I),r=Ce(e,this.Te);for(let o of r)this.x(o);return n}x(e){let n=e.getAttribute(this.I);if(!n){if(n=e.getAttribute("is"),!n)return;if(!n.startsWith("regor:")){if(!n.startsWith("r-"))return;let r=n.slice(2).trim().toLowerCase();if(!r)return;let o=e.parentNode;if(!o)return;let s=document.createElement(r);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);o.insertBefore(s,e),e.remove(),this.p.H(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.L(e,n)}P(e,n){let r=He(e),o=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);o.insertBefore(s,e),Ue(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}}L(e,n){let{nodes:r,parent:o,commentBegin:s,commentEnd:i}=this.P(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 I;let C=c()[0];if(O(C)&&(C.name?C=C.name:C=(I=Object.entries(p.me()).filter(H=>H[1]===C)[0])==null?void 0:I[0]),!_(C)||q(C)){ue(s,i);return}if(l.name===C)return;ue(s,i);let E=document.createElement(C);for(let H of e.getAttributeNames())H!==this.I&&E.setAttribute(H,e.getAttribute(H));ho(u,E),o.insertBefore(E,i),this.p.H(E),l.name=C})},h=[];P(s,()=>{a.stop();for(let C of h)C();h.length=0}),y();let T=w(c,y);h.push(T)}};var $=t=>g(t)?t():t;var ot=class{constructor(e){m(this,"R",[]);m(this,"_",new Map);m(this,"Y");this.Y=e}get w(){return this.R.length}Z(e){let n=this.Y(e.value);n!==void 0&&this._.set(n,e)}ee(e){var r;let n=this.Y((r=this.R[e])==null?void 0:r.value);n!==void 0&&this._.delete(n)}static Ge(e,n){return{items:[],index:e,value:n,order:-1}}S(e){e.order=this.w,this.R.push(e),this.Z(e)}Je(e,n){let r=this.w;for(let o=e;o<r;++o)this.R[o].order=o+1;n.order=e,this.R.splice(e,0,n),this.Z(n)}D(e){return this.R[e]}te(e,n){this.ee(e),this.R[e]=n,this.Z(n),n.order=e}xe(e){this.ee(e),this.R.splice(e,1);let n=this.w;for(let r=e;r<n;++r)this.R[r].order=r}Re(e){let n=this.w;for(let r=e;r<n;++r)this.ee(r);this.R.splice(e)}Ct(e){return this._.has(e)}Qe(e){var r;let n=this._.get(e);return(r=n==null?void 0:n.order)!=null?r:-1}};var cn=Symbol("r-for"),At=class At{constructor(e){m(this,"p");m(this,"b");m(this,"ne");m(this,"T");this.p=e,this.b=e.o.f.for,this.ne=Be(this.b),this.T=e.o.f.pre}N(e){let n=e.hasAttribute(this.b),r=Ce(e,this.ne);for(let o of r)this.Xe(o);return n}G(e){return e[cn]?!0:(e[cn]=!0,Ce(e,this.ne).forEach(n=>n[cn]=!0),!1)}Xe(e){if(e.hasAttribute(this.T)||this.G(e))return;let n=e.getAttribute(this.b);if(!n){L(0,this.b,e);return}e.removeAttribute(this.b),this.Ye(e,n)}Ee(e){return ne(e)?[]:(B(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))}Ye(e,n){var ie;let r=this.Ze(n);if(!(r!=null&&r.list)){L(1,this.b,n,e);return}let o=this.p.o.f.key,s=this.p.o.f.keyBind,i=(ie=e.getAttribute(o))!=null?ie:e.getAttribute(s);e.removeAttribute(o),e.removeAttribute(s);let a=i?S=>{var j;return $((j=$(S))==null?void 0:j[i])}:S=>S,c=(S,j)=>a(S)===a(j),p=He(e),f=e.parentNode;if(!f)return;let l=`${this.b} => ${n}`,u=new Comment(`__begin__ ${l}`);f.insertBefore(u,e),Ue(u,p),p.forEach(S=>{F(S)}),e.remove();let y=new Comment(`__end__ ${l}`);f.insertBefore(y,u.nextSibling);let h=this.p,d=h.h,T=d.V(),C=(S,j,z)=>{let J=r.createContext(j,S),be=ot.Ge(J.index,j);return d.v(T,()=>{var b,N;d.S(J.ctx);let A=(N=(b=y.parentNode)!=null?b:u.parentNode)!=null?N:f,Y=z.previousSibling,Ie=[];for(let x of p){let M=x.cloneNode(!0);A.insertBefore(M,z),Ie.push(M)}for(Re(h,Ie),Y=Y.nextSibling;Y!==z;)be.items.push(Y),Y=Y.nextSibling}),be},E=(S,j)=>{let z=D.D(S).items,J=z[z.length-1].nextSibling;for(let be of z)F(be);D.te(S,C(S,j,J))},I=(S,j)=>{D.S(C(S,j,y))},H=S=>{for(let j of D.D(S).items)F(j)},se=S=>{let j=D.w;for(let z=S;z<j;++z)D.D(z).index(z)},Ge=S=>{let j=u.parentNode,z=y.parentNode;if(!j||!z)return;let J=D.w;B(S)&&(S=S());let be=$(S[0]);if(R(be)&&be.length===0){ue(u,y),D.Re(0);return}let A=0,Y=Number.MAX_SAFE_INTEGER,Ie=J,b=this.p.o.forGrowThreshold,N=()=>D.w<Ie+b;for(let M of this.Ee(S[0])){let W=()=>{if(A<J){let v=D.D(A++);if(c(v.value,M))return;let k=D.Qe(a(M));if(k>=A&&k-A<10){if(--A,Y=Math.min(Y,A),H(A),D.xe(A),--J,k>A+1)for(let Oe=A;Oe<k-1&&Oe<J&&!c(D.D(A).value,M);)++Oe,H(A),D.xe(A),--J;W();return}N()?(D.Je(A-1,C(A,M,D.D(A-1).items[0])),Y=Math.min(Y,A-1),++J):E(A-1,M)}else I(A++,M)};W()}let x=A;for(J=D.w;A<J;)H(A++);D.Re(x),se(Y)},Je=()=>{at=w(ge,Ge)},$t=()=>{Qe.stop(),at()},Qe=d.C(r.list),ge=Qe.value,at,we=0,D=new ot(a);for(let S of this.Ee(ge()[0]))D.S(C(we++,S,y));P(u,$t),Je()}Ze(e){var c,p;let n=At.et.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=$(f);if(!a&&r.length===1)u[r[0]]=f;else if(R(y)){let d=0;for(let T of r)u[T]=y[d++]}else for(let d of r)u[d]=y[d];let h={ctx:u,index:G(-1)};return s&&(h.index=u[s.startsWith("#")?s.substring(1):s]=G(l)),h}}}};m(At,"et",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var Ot=At;var Nt=class{constructor(e){m(this,"h");m(this,"Ce");m(this,"ve");m(this,"Se");m(this,"we");m(this,"J");m(this,"o");m(this,"T");m(this,"Ae");this.h=e,this.o=e.o,this.ve=new Ot(this),this.Ce=new gt(this),this.Se=new wt(this),this.we=new vt(this),this.J=new St(this),this.T=this.o.f.pre,this.Ae=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);Re(this,i)}}H(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.ye(e,!0))}ye(e,n){var s;let r=this.J.de(e,n),o=this.o.j;for(let[i,a]of r.entries()){let[c,p]=a.Q,f=(s=o[i])!=null?s:o[c];if(!f){console.error("directive not found:",c);continue}a.ge.forEach(l=>{this.x(f,l,i,!1,p,a.X)})}}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(Ze);return f||(p.parentElement?c(p.parentElement):null)};if(Xt()){let p=c(n);if(p){this.h.v(_n(p),()=>{this.L(e,n,a,s,i)});return}}this.L(e,n,a,s,i)}nt(e,n,r){if(e!==Tt)return!1;if(q(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,P(i,()=>{F(n)}),o.appendChild(n)}return!0}L(e,n,r,o,s){var T;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=[];P(n,()=>{i.stop(),f==null||f.stop();for(let C of a)C();a.length=0});let p=$n(o,this.Ae),f;p&&(f=this.h.C(V(p),void 0,void 0,void 0,e.once));let l,u=()=>(l=i.value(),l),y,h=()=>f?(y=f.value()[0],y):(y=o,o),d=()=>{if(!e.onChange)return;let C=w(i.value,E=>{var se;let I=l,H=y;(se=e.onChange)==null||se.call(e,n,u(),I,h(),H,s)});if(a.push(C),f){let E=w(f.value,I=>{var se;let H=y;(se=e.onChange)==null||se.call(e,n,u(),H,h(),H,s)});a.push(E)}};e.once||d(),e.onBind&&a.push(e.onBind(n,i,r,o,f,s)),(T=e.onChange)==null||T.call(e,n,u(),void 0,h(),void 0,s)}};var Yn="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 go(t){return!!t||t===""}var pn={onChange:(t,e,n,r,o,s)=>{var a;if(r){s&&s.includes("camel")&&(r=V(r)),Mt(t,r,e[0],o);return}let i=e.length;for(let c=0;c<i;++c){let p=e[c];if(R(p)){let f=(a=n==null?void 0:n[c])==null?void 0:a[0],l=p[0],u=p[1];Mt(t,l,u,f)}else if(O(p))for(let f of Object.entries(p)){let l=f[0],u=f[1],y=n==null?void 0:n[c],h=y&&l in y?l:void 0;Mt(t,l,u,h)}else{let f=n==null?void 0:n[c],l=e[c++],u=e[c];Mt(t,l,u,f)}}}},Mt=(t,e,n,r)=>{if(r&&r!==e&&t.removeAttribute(r),ne(e)){L(3,name,t);return}if(!_(e)){L(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){ne(n)?t.removeAttributeNS(Yn,e.slice(6,e.length)):t.setAttributeNS(Yn,e,n);return}let o=e in yo;ne(n)||o&&!go(n)?t.removeAttribute(e):t.setAttribute(e,o?"":n)};var fn={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(R(s)){let a=s.length;for(let c=0;c<a;++c)Zn(t,s[c],i==null?void 0:i[c])}else Zn(t,s,i)}}},Zn=(t,e,n)=>{let r=t.classList,o=_(e),s=_(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 er={onChange:(t,e)=>{let[n,r]=e;B(r)?r(t,n):t.innerHTML=n==null?void 0:n.toString()}};function bo(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=he(t[r],e[r]);return n}function he(t,e){if(t===e)return!0;let n=Kt(t),r=Kt(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=Xe(t),r=Xe(e),n||r)return t===e;if(n=R(t),r=R(e),n||r)return n&&r?bo(t,e):!1;if(n=O(t),r=O(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||!he(t[i],e[i]))return!1}}return String(t)===String(e)}function kt(t,e){return t.findIndex(n=>he(n,e))}var tr=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var ln=t=>{if(!g(t))throw U(3,"pause");t(void 0,void 0,3)};var un=t=>{if(!g(t))throw U(3,"resume");t(void 0,void 0,4)};var rr={onChange:(t,e)=>{To(t,e[0])},onBind:(t,e,n,r,o,s)=>Eo(t,e,s)},To=(t,e)=>{let n=ar(t);if(n&&or(t))R(e)?e=kt(e,ye(t))>-1:te(e)?e=e.has(ye(t)):e=wo(t,e),t.checked=e;else if(n&&sr(t))t.checked=he(e,ye(t));else if(n||cr(t))ir(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(pr(t)){let r=t.options,o=r.length,s=t.multiple;for(let i=0;i<o;i++){let a=r[i],c=ye(a);if(s)R(e)?a.selected=kt(e,c)>-1:a.selected=e.has(c);else if(he(ye(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else L(7,t)},st=t=>(g(t)&&(t=t()),B(t)&&(t=t()),t?_(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",sr=t=>t.type==="radio",ir=t=>t.type==="number"||t.type==="range",ar=t=>t.tagName==="INPUT",cr=t=>t.tagName==="TEXTAREA",pr=t=>t.tagName==="SELECT",Eo=(t,e,n)=>{let r=e.value,o=st(n==null?void 0:n.join(",")),s=st(r()[1]),i={int:o.int||s.int,lazy:o.lazy||s.lazy,number:o.number||s.number,trim:o.trim||s.trim};if(!e.refs[0])return L(8,t),()=>{};let a=()=>e.refs[0],c=ar(t);return c&&or(t)?Ro(t,a):c&&sr(t)?Oo(t,a):c||cr(t)?Co(t,i,a,r):pr(t)?Ao(t,a,r):(L(7,t),()=>{})},nr=/[.,' ·٫]/,Co=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=ir(t),a=()=>{!e.trim&&!st(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=n();if(!y)return;let h=u.target;if(!h||h.composing)return;let d=h.value,T=st(r()[1]);if(i||T.number||T.int){if(T.int)d=parseInt(d);else{if(nr.test(d[d.length-1])&&d.split(nr).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(y()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else T.trim&&(d=d.trim());y(d)};return t.addEventListener(s,l),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",p),t.addEventListener("change",p),f},Ro=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=ye(t),a=t.checked,c=s();if(R(c)){let p=kt(c,i),f=p!==-1;a&&!f?c.push(i):!a&&f&&c.splice(p,1)}else te(c)?a?c.add(i):c.delete(i):s(So(t,a))};return t.addEventListener(n,o),r},ye=t=>"_value"in t?t._value:t.value,fr="trueValue",xo="falseValue",lr="true-value",vo="false-value",So=(t,e)=>{let n=e?fr:xo;if(n in t)return t[n];let r=e?lr:vo;return t.hasAttribute(r)?t.getAttribute(r):e},wo=(t,e)=>{if(fr in t)return he(e,t.trueValue);let r=lr;return t.hasAttribute(r)?he(e,t.getAttribute(r)):he(e,!0)},Oo=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=ye(t);s(i)};return t.addEventListener(n,o),r},Ao=(t,e,n)=>{let r="change",o=()=>{t.removeEventListener(r,s)},s=()=>{let i=e();if(!i)return;let c=st(n()[1]).number,p=Array.prototype.filter.call(t.options,f=>f.selected).map(f=>c?tr(ye(f)):ye(f));if(t.multiple){let f=i();try{if(ln(i),te(f)){f.clear();for(let l of p)f.add(l)}else R(f)?(f.splice(0),f.push(...p)):i(p)}finally{un(i),K(i)}}else i(p[0])};return t.addEventListener(r,s),o};var No=["stop","prevent","capture","self","once","left","right","middle","passive"],Mo=t=>{let e={};if(q(t))return;let n=t.split(",");for(let r of No)e[r]=n.includes(r);return e},dn={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=$(o.value()[0]);return _(y)?mn(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 mn(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(B(y)&&(y=y()),O(y))for(let h of Object.entries(y)){let d=h[0],T=()=>{let E=e.value()[u];return B(E)&&(E=E()),E=E[d],B(E)&&(E=E()),E},C=y[d+"_flags"];i.push(mn(t,d,T,C))}else L(2,name,t)}return a}},ko=(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]},mn=(t,e,n,r)=>{if(q(e))return L(5,name,t),()=>{};let o=Mo(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=ko(e,r);let a=f=>{if(!i(f)||!n&&e==="submit"&&(o!=null&&o.prevent))return;let l=n(f);B(l)&&(l=l(f)),B(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)),$e(t,r,e[0]);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(R(c)){let p=c[0],f=c[1];$e(t,p,f)}else if(O(c))for(let p of Object.entries(c)){let f=p[0],l=p[1];$e(t,f,l)}else{let p=e[a++],f=e[a];$e(t,p,f)}}}};function Lo(t){return!!t||t===""}var $e=(t,e,n)=>{if(ne(e)){L(3,name,t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(le),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=Lo(n):n==null&&s==="string"?(n="",o=!0):s==="number"&&(n=0,o=!0)}try{t[e]=n}catch(s){o||L(4,e,r,n,s)}o&&t.removeAttribute(e)};var mr={once:!0,onBind:(t,e,n)=>{let r=e.value()[0],o=R(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 dr={onChange:(t,e)=>{let n=Ne(t).data,r=n._ord;kn(r)&&(r=n._ord=t.style.display),!!e[0]?t.style.display=r:t.style.display="none"}};var gn={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(R(s)){let a=s.length;for(let c=0;c<a;++c)hr(t,s[c],i==null?void 0:i[c])}else hr(t,s,i)}}},hr=(t,e,n)=>{let r=t.style,o=_(e);if(e&&!o){if(n&&!_(n))for(let s in n)e[s]==null&&yn(r,s,"");for(let s in e)yn(r,s,e[s])}else{let s=r.display;if(o?n!==e&&(r.cssText=e):n&&t.removeAttribute("style"),"_ord"in Ne(t).data)return;r.display=s}},yr=/\s*!important$/;function yn(t,e,n){if(R(n))n.forEach(r=>{yn(t,e,r)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let r=Io(t,e);yr.test(n)?t.setProperty(_e(r),n.replace(yr,""),"important"):t[r]=n}}var gr=["Webkit","Moz","ms"],hn={};function Io(t,e){let n=hn[e];if(n)return n;let r=V(e);if(r!=="filter"&&r in t)return hn[e]=r;r=tt(r);for(let o=0;o<gr.length;o++){let s=gr[o]+r;if(s in t)return hn[e]=s}return e}var Z=t=>br($(t)),br=(t,e=new WeakMap)=>{if(!t||!O(t))return t;if(R(t))return t.map(Z);if(te(t)){let r=new Set;for(let o of t.keys())r.add(Z(o));return r}if(Te(t)){let r=new Map;for(let o of t)r.set(Z(o[0]),Z(o[1]));return r}if(e.has(t))return $(e.get(t));let n=pt({},t);e.set(t,n);for(let r of Object.entries(n))n[r[0]]=br($(r[1]),e);return n};var Tr={onChange:(t,e)=>{var r;let n=e[0];t.textContent=te(n)?JSON.stringify(Z([...n])):Te(n)?JSON.stringify(Z([...n])):O(n)?JSON.stringify(Z(n)):(r=n==null?void 0:n.toString())!=null?r:""}};var Er={onChange:(t,e)=>{$e(t,"value",e[0])}};var ve=class ve{constructor(e){m(this,"j",{});m(this,"f",{});m(this,"We",()=>Object.keys(this.j).filter(e=>e.length===1||!e.startsWith(":")));m(this,"le",new Map);m(this,"ue",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.ot()}static getDefault(){var e;return(e=ve.Oe)!=null?e:ve.Oe=new ve}ot(){let e={},n=globalThis;for(let r of ve.rt.split(","))e[r]=n[r];return e.ref=de,e.sref=G,e.flatten=Z,e}addComponent(...e){for(let n of e){if(!n.defaultName){ut.warning("Registered component's default name is not defined",n);continue}this.le.set(tt(n.defaultName),n),this.ue.set(tt(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.j={".":ur,":":pn,"@":dn,[`${e}on`]:dn,[`${e}bind`]:pn,[`${e}html`]:er,[`${e}text`]:Tr,[`${e}show`]:dr,[`${e}model`]:rr,":style":gn,[`${e}bind:style`]:gn,":class":fn,[`${e}bind:class`]:fn,":ref":mr,":value":Er,[`${e}teleport`]:Tt},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.j,this.f)}};m(ve,"Oe"),m(ve,"rt","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 oe=ve;var Lt=(t,e)=>{if(!t)return;let r=(e!=null?e:oe.getDefault()).f,o=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of Uo(t,r.pre,s))Do(i,r.text,o,s)},Do=(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=Cr(p,r);if(f&&q(i[0])&&q(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=Cr(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)},Uo=(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},Cr=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var Ho=9,Bo=10,_o=13,Po=32,Se=46,It=44,Vo=39,jo=34,Dt=40,Fe=41,Ut=91,Ht=93,bn=63,$o=59,Rr=58,Fo=123,Bt=125,En=43,qo=45,xr=96,vr=47,zo=92,Sr=[2,3],wr=[En,qo],Lr={"-":1,"!":1,"~":1,"+":1,new:1},Ir={"=":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},ze=Mn(pt({"=>":2},Ir),{"||":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}),Dr=Object.keys(Ir),Ko=new Set(Dr),_t=new Set;_t.add("=>");Dr.forEach(t=>_t.add(t));var Wo=new Set(["$","_"]),Or={true:!0,false:!1,null:null},Go="this";function Ur(t){return Math.max(0,...Object.keys(t).map(e=>e.length))}var Jo=Ur(Lr),Qo=Ur(ze),Ke="Expected ",Le="Unexpected ",Rn="Unclosed ",Xo=Ke+":",Ar=Ke+"expression",Yo="missing }",Zo=Le+"object property",es=Rn+"(",Nr=Ke+"comma",Mr=Le+"token ",ts=Le+"period",Tn=Ke+"expression after ",ns="missing unaryOp argument",rs=Rn+"[",os=Ke+"exponent (",ss="Variable names cannot start with a number (",is=Rn+'quote after "';var qe=t=>t>=48&&t<=57,kr=t=>ze[t]||0,Cn=class{constructor(e){m(this,"st",{0:[this.it],1:[this.at,this.pt,this.ct],2:[this.ft,this.lt,this.ut,this.Ne,this.mt],3:[this.dt,this.yt,this.ht]});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 ze)||Wo.has(n)}re(e){return this.U(e)||qe(e)}i(e){return new Error(`${e} at character ${this.e}`)}k(e,n,r){let o=this.st[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===Po||e===Ho||e===Bo||e===_o;)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===$o||r===It)this.e++;else{let o=this.A();if(o)n.push(o);else if(this.e<this.r.length){if(r===e)break;throw this.i(Le+'"'+this.M+'"')}}}return n}A(){var n;let e=(n=this.k(0,1))!=null?n:this.Me();return this.y(),this.k(1,0,e)}se(){this.y();let e=this.e,n=this.r,r=n.substr(e,Qo),o=r.length;for(;o>0;){if(r in ze&&(!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}Me(){let e,n,r,o,s,i,a,c;if(s=this.$(),!s||(n=this.se(),!n))return s;if(o={value:n,prec:kr(n),right_a:_t.has(n)},i=this.$(),!i)throw this.i(Tn+n);let p=[s,o,i];for(;n=this.se();){if(r=kr(n),r===0){this.e-=n.length;break}o={value:n,prec:r,right_a:_t.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.$(),!e)throw this.i(Tn+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}$(){let e,n,r;if(this.y(),r=this.k(2,1),r)return this.k(3,0,r);let o=this.l;if(qe(o)||o===Se)return this.gt();if(o===Vo||o===jo)r=this.bt();else if(o===Ut)r=this.Tt();else{for(e=this.r.substr(this.e,Jo),n=e.length;n>0;){if(Object.prototype.hasOwnProperty.call(Lr,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.$();if(!s)throw this.i(ns);return this.k(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===Go&&(r={type:5})):o===Dt&&(r=this.xt())}return r?(r=this.F(r),this.k(3,0,r)):this.k(3,0,!1)}F(e){this.y();let n=this.l;for(;n===Se||n===Ut||n===Dt||n===bn;){let r;if(n===bn){if(this.r.charCodeAt(this.e+1)!==Se)break;r=!0,this.e+=2,this.y(),n=this.l}if(this.e++,n===Ut){if(e={type:3,computed:!0,object:e,property:this.A()},this.y(),n=this.l,n!==Ht)throw this.i(rs);this.e++}else n===Dt?e={type:6,arguments:this.ke(Fe),callee:e}:(n===Se||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}gt(){let e="",n;for(;qe(this.l);)e+=this.r.charAt(this.e++);if(this.m(Se))for(e+=this.r.charAt(this.e++);qe(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++));qe(this.l);)e+=this.r.charAt(this.e++);if(!qe(this.r.charCodeAt(this.e-1)))throw this.i(os+e+this.M+")")}let r=this.l;if(this.U(r))throw this.i(ss+e+this.M+")");if(r===Se||e.length===1&&e.charCodeAt(0)===Se)throw this.i(ts);return{type:4,value:parseFloat(e),raw:e}}bt(){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(is+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(Le+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)}}ke(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===Fe&&o&&o>=n.length)throw this.i(Mr+String.fromCharCode(e));break}else if(s===It){if(this.e++,o++,o!==n.length){if(e===Fe)throw this.i(Mr+",");if(e===Ht)for(let i=n.length;i<o;i++)n.push(null)}}else{if(n.length!==o&&o!==0)throw this.i(Nr);{let i=this.A();if(!i||i.type===0)throw this.i(Nr);n.push(i)}}}if(!r)throw this.i(Ke+String.fromCharCode(e));return n}xt(){this.e++;let e=this.oe(Fe);if(this.m(Fe))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(es)}Tt(){return this.e++,{type:9,elements:this.ke(Ht)}}ft(e){if(this.m(Fo)){this.e++;let n=[];for(;!isNaN(this.l);){if(this.y(),this.m(Bt)){this.e++,e.node=this.F({type:10,properties:n});return}let r=this.A();if(!r)break;if(this.y(),r.type===2&&(this.m(It)||this.m(Bt)))n.push({type:12,computed:!1,key:r,value:r,shorthand:!0});else if(this.m(Rr)){this.e++;let o=this.A();if(!o)throw this.i(Zo);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(It)&&this.e++}throw this.i(Yo)}}lt(e){let n=this.l;if(wr.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){this.e+=2;let r=e.node={type:13,operator:n===En?"++":"--",argument:this.F(this.ie()),prefix:!0};if(!r.argument||!Sr.includes(r.argument.type))throw this.i(Le+r.operator)}}yt(e){if(e.node){let n=this.l;if(wr.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){if(!Sr.includes(e.node.type))throw this.i(Le+e.node.operator);this.e+=2,e.node={type:13,operator:n===En?"++":"--",argument:e.node,prefix:!1}}}}ut(e){[0,1,2].every(n=>this.r.charCodeAt(this.e+n)===Se)&&(this.e+=3,e.node={type:14,argument:this.A()})}ct(e){if(e.node&&this.m(bn)){this.e++;let n=e.node,r=this.A();if(!r)throw this.i(Ar);if(this.y(),this.m(Rr)){this.e++;let o=this.A();if(!o)throw this.i(Ar);if(e.node={type:11,test:n,consequent:r,alternate:o},n.operator&&ze[n.operator]<=.9){let s=n;for(;s.right.operator&&ze[s.right.operator]<=.9;)s=s.right;e.node.test=s.right,s.right=e.node,e.node=n}}else throw this.i(Xo)}}it(e){if(this.y(),this.m(Dt)){let n=this.e;if(this.e++,this.y(),this.m(Fe)){this.e++;let r=this.se();if(r==="=>"){let o=this.Me();if(!o)throw this.i(Tn+r);e.node={type:15,params:null,body:o};return}}this.e=n}}at(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))}pt(e){e.node&&this.q(e.node)}q(e){Ko.has(e.operator)?(e.type=16,this.q(e.left),this.q(e.right)):e.operator||Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.q(n)})}ht(e){if(!e.node)return;let n=e.node.type;(n===2||n===3)&&this.m(xr)&&(e.node={type:17,tag:e.node,quasi:this.Ne(e)})}Ne(e){if(!this.m(xr))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 `")}dt(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}mt(e){if(!this.m(vr))return;let n=++this.e,r=!1;for(;this.e<this.r.length;){if(this.l===vr&&!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.F(e.node),e.node}this.m(Ut)?r=!0:r&&this.m(Ht)&&(r=!1),this.e+=this.m(zo)?2:1}throw this.i("Unclosed Regex")}},Hr=t=>new Cn(t).parse();var as={"=>":(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)=>ct(t,e)},cs={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},Vr=t=>{if(!(t!=null&&t.some(Pr)))return t;let e=[];return t.forEach(n=>Pr(n)?e.push(...n):e.push(n)),e},Br=(...t)=>Vr(t),xn=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},ps={"++":(t,e)=>{let n=t[e];if(g(n)){let r=n();return n(++r),r}return++t[e]},"--":(t,e)=>{let n=t[e];if(g(n)){let r=n();return n(--r),r}return--t[e]}},fs={"++":(t,e)=>{let n=t[e];if(g(n)){let r=n();return n(r+1),r}return t[e]++},"--":(t,e)=>{let n=t[e];if(g(n)){let r=n();return n(r-1),r}return t[e]--}},_r={"=":(t,e,n)=>{let r=t[e];return g(r)?r(n):t[e]=n},"+=":(t,e,n)=>{let r=t[e];return g(r)?r(r()+n):t[e]+=n},"-=":(t,e,n)=>{let r=t[e];return g(r)?r(r()-n):t[e]-=n},"*=":(t,e,n)=>{let r=t[e];return g(r)?r(r()*n):t[e]*=n},"/=":(t,e,n)=>{let r=t[e];return g(r)?r(r()/n):t[e]/=n},"%=":(t,e,n)=>{let r=t[e];return g(r)?r(r()%n):t[e]%=n},"**=":(t,e,n)=>{let r=t[e];return g(r)?r(ct(r(),n)):t[e]=ct(t[e],n)},"<<=":(t,e,n)=>{let r=t[e];return g(r)?r(r()<<n):t[e]<<=n},">>=":(t,e,n)=>{let r=t[e];return g(r)?r(r()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let r=t[e];return g(r)?r(r()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let r=t[e];return g(r)?r(r()|n):t[e]|=n},"&=":(t,e,n)=>{let r=t[e];return g(r)?r(r()&n):t[e]&=n},"^=":(t,e,n)=>{let r=t[e];return g(r)?r(r()^n):t[e]^=n}},Pt=(t,e)=>B(t)?t.bind(e):t,vn=class{constructor(e,n,r,o,s){m(this,"u");m(this,"Ve");m(this,"Ie");m(this,"De");m(this,"O");m(this,"Ue");m(this,"Be");this.u=R(e)?e:[e],this.Ve=n,this.Ie=r,this.De=o,this.Be=!!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.O=r[o],Pt($(r[o]),r);for(let i of this.u)if(o in i)return this.O=i[o],Pt($(i[o]),i);let s=this.Ve;if(s&&o in s)return this.O=s[o],Pt($(s[o]),s)}5(e,n,r){return this.u[0]}0(e,n,r){return this.He(n,r,Br,...e.body)}1(e,n,r){return this.E(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.O=i,Pt($(i),o)}4(e,n,r){return e.value}6(e,n,r){let o=(i,...a)=>B(i)?i(...Vr(a)):i,s=this.E(++n,r,o,e.callee,...e.arguments);return this.O=s,s}7(e,n,r){return this.E(n,r,cs[e.operator],e.argument)}8(e,n,r){let o=as[e.operator];switch(e.operator){case"||":case"&&":case"??":return o(()=>this.g(e.left,n,r),()=>this.g(e.right,n,r))}return this.E(n,r,o,e.left,e.right)}9(e,n,r){return this.He(++n,r,Br,...e.elements)}10(e,n,r){let o={},s=(...i)=>{i.forEach(a=>{Object.assign(o,a)})};return this.E(++n,r,s,...e.properties),o}11(e,n,r){return this.E(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.De)!=null?f:()=>!1,a=n===0&&this.Be,c=l=>this._e(a,e.key,n,xn(l,r)),p=l=>this._e(a,e.value,n,xn(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=$(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?ps:fs;if(o.type===2){let a=o.name,c=this.Pe(a,r);return ne(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(ne(a))return;let c=this.g(e.right,n,r);return _r[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 _r[s](i,a,c)}}14(e,n,r){let o=this.g(e.argument,n,r);return R(o)&&(o.s=jr),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.E(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.E(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=$(this[e.type](e,n,r));return this.Ue=e.type,o}_e(e,n,r,o){let s=this.g(n,r,o);return e&&this.je()?this.O:s}je(){let e=this.Ue;return(e===2||e===3||e===6)&&g(this.O)}eval(e,n){let{value:r,refs:o}=on(()=>this.g(e,-1,n)),s={value:r,refs:o};return this.je()&&(s.ref=this.O),s}E(e,n,r,...o){let s=o.map(i=>i&&this.g(i,e,n));return r(...s)}He(e,n,r,...o){let s=this.Ie;if(!s)return this.E(e,n,r,...o);let i=o.map((a,c)=>a&&(a.type!==15&&s(c,e)?p=>this.g(a,e,xn(p,n)):this.g(a,e,n)));return r(...i)}},jr=Symbol("s"),Pr=t=>(t==null?void 0:t.s)===jr,$r=(t,e,n,r,o,s,i)=>new vn(e,n,r,o,i).eval(t,s);var Fr={},Vt=class{constructor(e,n){m(this,"u");m(this,"o");m(this,"$e",[]);this.u=e,this.o=n}S(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 h of a)h();a.length=0},p={value:i,stop:c,refs:[],context:this.u[0]};if(q(e))return p;let f=this.o.globalContext,l=[],u=(h,d,T,C)=>{try{let E=$r(h,d,f,n,r,C,o);return T&&l.push(...E.refs),{value:E.value,refs:E.refs,ref:E.ref}}catch(E){L(6,`evaluation error: ${e}`,E)}return{value:void 0,refs:[]}};try{let h=(y=Fr[e])!=null?y:Hr("["+e+"]");Fr[e]=h;let d=this.u,T=()=>{l.splice(0),c();let C=h.elements.map((E,I)=>n!=null&&n(I,-1)?{value:H=>u(E,d,!1,{$event:H}).value,refs:[]}:u(E,d,!0));if(!s)for(let E of l){let I=w(E,T);a.push(I)}p.refs=C.map(E=>E.ref),i(C.map(E=>E.value))};T()}catch(h){L(6,`parse error: ${e}`,h)}return p}V(){return this.u}te(e){this.$e.push(this.u),this.u=e}v(e,n){try{this.te(e),n()}finally{this.Rt()}}Rt(){var e;this.u=(e=this.$e.pop())!=null?e:[]}};var qr=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},ls=(t,e)=>{let n="";for(let r=e;r<t.length;++r){let o=t[r];if(n){o===n&&(n="");continue}if(o==='"'||o==="'"){n=o;continue}if(o===">")return r}return-1},us=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
4
+ `);)++n;if(n>=t.length||!qr(t[n]))return null;let r=n;for(;n<t.length&&qr(t[n]);)++n;return{start:r,end:n}},zr=new Set(["table","thead","tbody","tfoot"]),ms=new Set(["thead","tbody","tfoot"]),ds=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),jt=t=>{var s;let e=0,n=[],r=[],o=0;for(;e<t.length;){let i=t.indexOf("<",e);if(i===-1){n.push(t.slice(e));break}if(n.push(t.slice(e,i)),t.startsWith("<!--",i)){let T=t.indexOf("-->",i+4);if(T===-1){n.push(t.slice(i));break}n.push(t.slice(i,T+3)),e=T+3;continue}let a=ls(t,i);if(a===-1){n.push(t.slice(i));break}let c=t.slice(i,a+1),p=c.startsWith("</");if(c.startsWith("<!")||c.startsWith("<?")){n.push(c),e=a+1;continue}let l=us(c,p);if(!l){n.push(c),e=a+1;continue}let u=c.slice(l.start,l.end);if(p){let T=r[r.length-1];T?(r.pop(),n.push(T.replacementHost?`</${T.replacementHost}>`:c),zr.has(T.effectiveTag)&&--o):n.push(c),e=a+1;continue}let y=c.charCodeAt(c.length-2)===47,h=r[r.length-1],d=null;if(o===0?u==="tr"?d="trx":u==="td"?d="tdx":u==="th"&&(d="thx"):ms.has((s=h==null?void 0:h.effectiveTag)!=null?s:"")?d=u==="tr"?null:"tr":(h==null?void 0:h.effectiveTag)==="table"?d=ds.has(u)?null:"tr":(h==null?void 0:h.effectiveTag)==="tr"&&(d=u==="td"||u==="th"?null:"td"),d){let T=d==="trx"||d==="tdx"||d==="thx";n.push(`${c.slice(0,l.start)}${d} is="${T?`r-${u}`:`regor:${u}`}"${c.slice(l.end)}`)}else y&&(h==null?void 0:h.effectiveTag)==="tr"?n.push(`${c.slice(0,c.length-2)}></${u}>`):n.push(c);if(!y){let T=d==="trx"?"tr":d==="tdx"?"td":d==="thx"?"th":d||u;r.push({replacementHost:d,effectiveTag:T}),zr.has(T)&&++o}e=a+1}return n.join("")};var hs="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",ys=new Set(hs.toUpperCase().split(",")),gs="http://www.w3.org/2000/svg",Kr=(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&&ys.has(o.toUpperCase())?document.createElementNS(gs,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);Kr(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)Kr(e,a);else throw new Error("unsupported node type.")}},We=(t,e,n)=>{n!=null||(n=oe.getDefault());let r=document.createDocumentFragment();if(!R(t))return Sn(t,r,!!e,n),r;for(let o of t)Sn(o,r,!!e,n);return r};var bs=(t,e={selector:"#app"},n)=>{_(e)&&(e={selector:"#app",template:e}),Fn(t)&&(t=t.context);let r=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!r||!Me(r))throw U(0);n||(n=oe.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(jt(e.template));o(),s(a.childNodes),e.element=a}else if(e.json){let a=We(e.json,e.isSVG,n);o(),s(a.childNodes)}return n.useInterpolation&&Lt(r,n),new wn(t,r,n).x(),P(r,()=>{Ee(t)}),Et(t),{context:t,unmount:()=>{F(r)},unbind:()=>{le(r)}}},wn=class{constructor(e,n,r){m(this,"Et");m(this,"Fe");m(this,"o");m(this,"h");m(this,"p");this.Et=e,this.Fe=n,this.o=r,this.h=new Vt([e],r),this.p=new Nt(this.h)}x(){this.p.H(this.Fe)}};var it=t=>{if(R(t))return t.map(o=>it(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=>{var s;return[o,(s=t.getAttribute(o))!=null?s:""]})));let r=me(t);return r.length>0&&(e.c=[...r].map(o=>it(o))),e};var Ts=(t,e={})=>{var s,i,a,c,p,f;R(e)&&(e={props:e}),_(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 U(1,t.selector);l.remove(),t.element=l}else if(t.template){let l=document.createRange().createContextualFragment(jt(t.template));t.element=l}else t.json&&(t.element=We(t.json,t.isSVG,e.config),r=!0);t.element||(t.element=document.createDocumentFragment()),((i=e.useInterpolation)==null||i)&&Lt(t.element,(a=e.config)!=null?a:oe.getDefault());let o=t.element;if(!r&&(((p=t.isSVG)!=null?p:et(o)&&((c=o.hasAttribute)!=null&&c.call(o,"isSVG")))||et(o)&&o.querySelector("[isSVG]"))){let l=o.content,u=l?[...l.childNodes]:[...o.childNodes],y=it(u);t.element=We(y,!0,e.config)}return{context:n,template:t.element,inheritAttrs:(f=e.inheritAttrs)!=null?f:!0,props:e.props,defaultName:e.defaultName}};var Es=t=>{var e;(e=Ae())==null||e.onMounted.push(t)};var Cs=t=>{let e,n={},r=(...o)=>{if(o.length<=2&&0 in o)throw U(4);return e&&!n.isStopped?e(...o):(e=Rs(t,n),e(...o))};return r[X]=1,xe(r,!0),r.stop=()=>{var o,s;return(s=(o=n.ref)==null?void 0:o.stop)==null?void 0:s.call(o)},Q(()=>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=Ve(()=>{if(r>0){o(),e.isStopped=!0,K(n);return}n(t()),++r});return n.stop=o,n};var xs=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw U(4);return r&&!n.isStopped?r(...s):(r=vs(t,e,n),r(...s))};return o[X]=1,xe(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},Q(()=>o.stop(),!0),o},vs=(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}let p=t.map(f=>f());r(e(...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 Ss=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw U(4);return r&&!n.isStopped?r(...s):(r=ws(t,e,n),r(...s))};return o[X]=1,xe(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},Q(()=>o.stop(),!0),o},ws=(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 Os=t=>(t[dt]=1,t);var As=(t,e)=>{if(!e)throw U(5);let r=Pe(t)?de:a=>a,o=()=>localStorage.setItem(e,JSON.stringify(Z(t()))),s=localStorage.getItem(e);if(s!=null)try{t(r(JSON.parse(s)))}catch(a){L(6,`persist: failed to parse data for key ${e}`,a),o()}else o();let i=Ve(o);return Q(i,!0),t};var Wr=(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},Ns=Wr;var Ms=(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 Q(s,!0),s};var ks=t=>{if(!g(t))throw U(3,"observerCount");return t(void 0,void 0,2)};var Ls=t=>{Gr();try{t()}finally{Jr()}},Gr=()=>{pe.stack||(pe.stack=[]),pe.stack.push(new Set)},Jr=()=>{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)}};export{Ye as ComponentHead,oe as RegorConfig,P as addUnbinder,Ls as batch,on as collectRefs,xs as computeMany,Ss as computeRef,Cs as computed,bs as createApp,Ts as createComponent,Jr as endBatch,nt as entangle,Z as flatten,Ne as getBindData,Wr as html,Pe as isDeepRef,rt as isRaw,g as isRef,Os as markRaw,w as observe,Ms as observeMany,ks as observerCount,Es as onMounted,Q as onUnmounted,ln as pause,As as persist,Ns as raw,de as ref,F as removeNode,un as resume,rn as silence,G as sref,Gr as startBatch,We as toFragment,it as toJsonTemplate,K as trigger,le as unbind,$ as unref,nn as useScope,ut as warningHandler,Ve as watchEffect};
@@ -1797,12 +1797,9 @@ var Regor = (() => {
1797
1797
  const result = config.createContext(newValue, i2);
1798
1798
  const mountItem = MountList.__createItem(result.index, newValue);
1799
1799
  parser.__scoped(capturedContext, () => {
1800
- var _a2;
1800
+ var _a2, _b;
1801
1801
  parser.__push(result.ctx);
1802
- const insertParent = (_a2 = commentEnd.parentNode) != null ? _a2 : commentBegin.parentNode;
1803
- if (!insertParent) {
1804
- throw new Error("[r-for] cannot mount: missing anchor parent");
1805
- }
1802
+ const insertParent = (_b = (_a2 = commentEnd.parentNode) != null ? _a2 : commentBegin.parentNode) != null ? _b : parent;
1806
1803
  let start = nextSibling.previousSibling;
1807
1804
  const childNodes = [];
1808
1805
  for (const x of nodes) {
@@ -1842,6 +1839,9 @@ var Regor = (() => {
1842
1839
  }
1843
1840
  };
1844
1841
  const updateDom = (newValues) => {
1842
+ const beginParent = commentBegin.parentNode;
1843
+ const endParent = commentEnd.parentNode;
1844
+ if (!beginParent || !endParent) return;
1845
1845
  let len = mountList.__length;
1846
1846
  if (isFunction(newValues)) newValues = newValues();
1847
1847
  const unrefedNewValue = unref(newValues[0]);