regor 1.4.5 → 1.4.6

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,3 +1,3 @@
1
- "use strict";var Regor=(()=>{var tn=Object.defineProperty;var hr=Object.getOwnPropertyDescriptor;var yr=Object.getOwnPropertyNames;var gr=Object.prototype.hasOwnProperty;var br=(t,e)=>{for(var n in e)tn(t,n,{get:e[n],enumerable:!0})},xr=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of yr(e))!gr.call(t,r)&&r!==n&&tn(t,r,{get:()=>e[r],enumerable:!(o=hr(e,r))||o.enumerable});return t};var Tr=t=>xr(tn({},"__esModule",{value:!0}),t);var Xs={};br(Xs,{ComponentHead:()=>je,ContextRegistry:()=>Yt,RegorConfig:()=>ce,addUnbinder:()=>_,batch:()=>dr,collectRefs:()=>wt,computeMany:()=>ar,computeRef:()=>cr,computed:()=>ir,createApp:()=>or,defineComponent:()=>rr,drainUnbind:()=>_n,endBatch:()=>Bn,entangle:()=>Ke,flatten:()=>ie,getBindData:()=>Se,html:()=>Vn,isDeepRef:()=>Le,isRaw:()=>We,isRef:()=>T,markRaw:()=>ur,observe:()=>ne,observeMany:()=>pr,observerCount:()=>mr,onMounted:()=>sr,onUnmounted:()=>te,pause:()=>_t,persist:()=>lr,raw:()=>fr,ref:()=>ye,removeNode:()=>F,resume:()=>jt,silence:()=>Rt,sref:()=>se,startBatch:()=>Hn,toFragment:()=>Ve,toJsonTemplate:()=>Ye,trigger:()=>J,unbind:()=>me,unref:()=>V,useScope:()=>Ct,warningHandler:()=>et,watchEffect:()=>Ie});var Pe=Symbol(":regor");var me=t=>{let e=[t];for(let n=0;n<e.length;++n){let o=e[n];Cr(o);for(let r=o.lastChild;r!=null;r=r.previousSibling)e.push(r)}},Cr=t=>{let e=t[Pe];if(!e)return;let n=e.unbinders;for(let o=0;o<n.length;++o)n[o]();n.length=0,t[Pe]=void 0};var _e=[],ct=!1,ut,Pn=()=>{if(ct=!1,ut=void 0,_e.length!==0){for(let t=0;t<_e.length;++t)me(_e[t]);_e.length=0}},F=t=>{t.remove(),_e.push(t),ct||(ct=!0,ut=setTimeout(Pn,1))},_n=async()=>{_e.length===0&&!ct||(ut&&clearTimeout(ut),Pn())};var q=t=>typeof t=="function",z=t=>typeof t=="string",jn=t=>typeof t>"u",le=t=>t==null||typeof t>"u",P=t=>typeof t!="string"||!t?.trim(),vr=Object.prototype.toString,nn=t=>vr.call(t),Re=t=>nn(t)==="[object Map]",ae=t=>nn(t)==="[object Set]",on=t=>nn(t)==="[object Date]",Ze=t=>typeof t=="symbol",E=Array.isArray,k=t=>t!==null&&typeof t=="object";var $n={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."},H=(t,...e)=>{let n=$n[t];return new Error(q(n)?n.call($n,...e):n)};var lt=[],Fn=()=>{let t={onMounted:[],onUnmounted:[]};return lt.push(t),t},Me=t=>{let e=lt[lt.length-1];if(!e&&!t)throw H(2);return e},qn=t=>{let e=Me();return t&&sn(t),lt.pop(),e},rn=Symbol("csp"),sn=t=>{let e=t,n=e[rn];if(n){let o=Me();if(n===o)return;o.onMounted.length>0&&n.onMounted.push(...o.onMounted),o.onUnmounted.length>0&&n.onUnmounted.push(...o.onUnmounted);return}e[rn]=Me()},ft=t=>t[rn];var we=t=>{ft(t)?.onUnmounted?.forEach(n=>{n()}),t.unmounted?.()};var je=class{props;start;end;ctx;autoProps=!0;entangle=!0;enableSwitch=!1;onAutoPropsAssigned;ye;constructor(e,n,o,r,s){this.props=e,this.ye=n,this.ctx=o,this.start=r,this.end=s}emit=(e,n)=>{this.ye.dispatchEvent(new CustomEvent(e,{detail:n}))};findContext(e,n=0){if(n<0)return;let o=0;for(let r of this.ctx??[])if(r instanceof e){if(o===n)return r;++o}}requireContext(e,n=0){let o=this.findContext(e,n);if(o!==void 0)return o;throw new Error(`${e} was not found in the context stack at occurrence ${n}.`)}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)F(e),e=e.nextSibling;for(let o of this.ctx)we(o)}};var Se=t=>{let e=t,n=e[Pe];if(n)return n;let o={unbinders:[],data:{}};return e[Pe]=o,o};var _=(t,e)=>{Se(t).unbinders.push(e)};var zn={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,o)=>({msg:`Failed setting prop "${t}" on <${e.toLowerCase()}>: value ${n} is invalid.`,args:[o]}),5:(t,e)=>`${t} binding missing event type at ${e.outerHTML}`,6:(t,e)=>({msg:t,args:[e]})},U=(t,...e)=>{let n=zn[t],o=q(n)?n.call(zn,...e):n,r=et.warning;r&&(z(o)?r(o):r(o,...o.args))},et={warning:console.warn};var mt={},pt={},Kn=1,Wn=t=>{let e=(Kn++).toString();return mt[e]=t,pt[e]=0,e},an=t=>{pt[t]+=1},cn=t=>{--pt[t]===0&&(delete mt[t],delete pt[t])},Gn=t=>mt[t],un=()=>Kn!==1&&Object.keys(mt).length>0,tt="r-switch",Er=t=>{let e=t.filter(o=>be(o)).map(o=>[...o.querySelectorAll("[r-switch]")].map(r=>r.getAttribute(tt))),n=new Set;return e.forEach(o=>{o.forEach(r=>r&&n.add(r))}),[...n]},$e=(t,e)=>{if(!un())return;let n=Er(e);n.length!==0&&(n.forEach(an),_(t,()=>{n.forEach(cn)}))};var dt=()=>{},ln=(t,e,n,o)=>{let r=[];for(let s of t){let a=s.cloneNode(!0);n.insertBefore(a,o),r.push(a)}Ae(e,r)},fn=Symbol("r-if"),Jn=Symbol("r-else"),Qn=t=>t[Jn]===1,ht=class{r;k;he;G;J;x;C;constructor(e){this.r=e,this.k=e.o.u.if,this.he=gt(e.o.u.if),this.G=e.o.u.else,this.J=e.o.u.elseif,this.x=e.o.u.for,this.C=e.o.u.pre}nt(e,n){let o=e.parentElement;for(;o!==null&&o!==document.documentElement;){if(o.hasAttribute(n))return!0;o=o.parentElement}return!1}N(e){let n=e.hasAttribute(this.k);return n&&this.y(e),this.r.M.j(e,o=>{o.hasAttribute(this.k)&&this.y(o)}),n}Q(e){return e[fn]?!0:(e[fn]=!0,yt(e,this.he).forEach(n=>n[fn]=!0),!1)}y(e){if(e.hasAttribute(this.C)||this.Q(e)||this.nt(e,this.x))return;let n=e.getAttribute(this.k);if(!n){U(0,this.k,e);return}e.removeAttribute(this.k),this.O(e,n)}P(e,n,o){let r=Fe(e),s=e.parentNode,a=document.createComment(`__begin__ :${n}${o??""}`);s.insertBefore(a,e),$e(a,r),r.forEach(c=>{F(c)}),e.remove(),n!=="if"&&(e[Jn]=1);let i=document.createComment(`__end__ :${n}${o??""}`);return s.insertBefore(i,a.nextSibling),{nodes:r,parent:s,commentBegin:a,commentEnd:i}}ge(e,n){if(!e)return[];let o=e.nextElementSibling;if(e.hasAttribute(this.G)){e.removeAttribute(this.G);let{nodes:r,parent:s,commentBegin:a,commentEnd:i}=this.P(e,"else");return[{mount:()=>{ln(r,this.r,s,i)},unmount:()=>{xe(a,i)},isTrue:()=>!0,isMounted:!1}]}else{let r=e.getAttribute(this.J);if(!r)return[];e.removeAttribute(this.J);let{nodes:s,parent:a,commentBegin:i,commentEnd:c}=this.P(e,"elseif",` => ${r} `),l=this.r.m.L(r),u=l.value,f=this.ge(o,n),p=dt;return _(i,()=>{l.stop(),p(),p=dt}),p=l.subscribe(n),[{mount:()=>{ln(s,this.r,a,c)},unmount:()=>{xe(i,c)},isTrue:()=>!!u()[0],isMounted:!1},...f]}}O(e,n){let o=e.nextElementSibling,{nodes:r,parent:s,commentBegin:a,commentEnd:i}=this.P(e,"if",` => ${n} `),c=this.r.m.L(n),l=c.value,u=!1,f=this.r.m,p=f.V(),h=()=>{f.R(p,()=>{if(l()[0])u||(ln(r,this.r,s,i),u=!0),m.forEach(C=>{C.unmount(),C.isMounted=!1});else{xe(a,i),u=!1;let C=!1;for(let R of m)!C&&R.isTrue()?(R.isMounted||(R.mount(),R.isMounted=!0),C=!0):(R.unmount(),R.isMounted=!1)}})},m=this.ge(o,h),d=dt;_(a,()=>{c.stop(),d(),d=dt}),h(),d=c.subscribe(h)}};var Fe=t=>{let e=fe(t)?t.content.childNodes:[t],n=[];for(let o=0;o<e.length;++o){let r=e[o];if(r.nodeType===1){let s=r?.tagName;if(s==="SCRIPT"||s==="STYLE")continue}n.push(r)}return n},Ae=(t,e)=>{for(let n=0;n<e.length;++n){let o=e[n];o.nodeType===Node.ELEMENT_NODE&&(Qn(o)||t._(o))}},yt=(t,e)=>{let n=t.querySelectorAll(e);return t.matches?.(e)?[t,...n]:n},fe=t=>t instanceof HTMLTemplateElement,be=t=>t.nodeType===Node.ELEMENT_NODE,nt=t=>t.nodeType===Node.ELEMENT_NODE,Xn=t=>t instanceof HTMLSlotElement,Te=t=>fe(t)?t.content.childNodes:t.childNodes,xe=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let o=n.nextSibling;F(n),n=o}},Yn=function(){return this()},Rr=function(t){return this(t)},wr=()=>{throw new Error("value is readonly.")},Sr={get:Yn,set:Rr,enumerable:!0,configurable:!1},Ar={get:Yn,set:wr,enumerable:!0,configurable:!1},Ne=(t,e)=>{Object.defineProperty(t,"value",e?Ar:Sr)},Zn=(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},gt=t=>`[${CSS.escape(t)}]`,bt=(t,e)=>(t.startsWith("@")&&(t=e.u.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.u.dynamic)),t),pn=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},Nr=/-(\w)/g,B=pn(t=>t&&t.replace(Nr,(e,n)=>n?n.toUpperCase():"")),Or=/\B([A-Z])/g,qe=pn(t=>t&&t.replace(Or,"-$1").toLowerCase()),ot=pn(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var xt={mount:()=>{}};var ze=t=>{let e=t.trim();return e?e.split(/\s+/):[]};var Tt=t=>{ft(t)?.onMounted?.forEach(n=>{n()}),t.mounted?.()};var mn=Symbol("scope"),Ct=t=>{try{Fn();let e=t();sn(e);let n={context:e,unmount:()=>we(e),[mn]:1};return n[mn]=1,n}finally{qn()}},eo=t=>k(t)?mn in t:!1;var vt=Symbol("ref"),Q=Symbol("sref"),Et=Symbol("raw");var T=t=>t!=null&&t[Q]===1;var dn={collectRefObj:!0,mount:({parseResult:t})=>({update:({values:e})=>{let n=t.context,o=e[0];if(k(o))for(let r of Object.entries(o)){let s=r[0],a=r[1],i=n[s];i!==a&&(T(i)?i(a):n[s]=a)}}})};var te=(t,e)=>{Me(e)?.onUnmounted.push(t)};var ne=(t,e,n,o=!0)=>{if(!T(t))throw H(3,"observe");n&&e(t());let s=t(void 0,void 0,0,e);return o&&te(s,!0),s};var Ke=(t,e)=>{if(t===e)return()=>{};let n=ne(t,r=>e(r)),o=ne(e,r=>t(r));return e(t()),()=>{n(),o()}};var We=t=>!!t&&t[Et]===1;var Le=t=>t?.[vt]===1;var pe=[],to=t=>{pe.length!==0&&pe[pe.length-1]?.add(t)},Ie=t=>{if(!t)return()=>{};let e={stop:()=>{}};return Mr(t,e),te(()=>e.stop(),!0),e.stop},Mr=(t,e)=>{if(!t)return;let n=[],o=!1,r=()=>{for(let s of n)s();n=[],o=!0};e.stop=r;try{let s=new Set;if(pe.push(s),t(a=>n.push(a)),o)return;for(let a of[...s]){let i=ne(a,()=>{r(),Ie(t)});n.push(i)}}finally{pe.pop()}},Rt=t=>{let e=pe.length,n=e>0&&pe[e-1];try{return n&&pe.push(null),t()}finally{n&&pe.pop()}},wt=t=>{try{let e=new Set;return pe.push(e),{value:t(),refs:[...e]}}finally{pe.pop()}};var J=(t,e,n)=>{if(!T(t))return;let o=t;if(o(void 0,e,1),!n)return;let r=o();if(r){if(E(r)||ae(r))for(let s of r)J(s,e,!0);else if(Re(r))for(let s of r)J(s[0],e,!0),J(s[1],e,!0);if(k(r))for(let s in r)J(r[s],e,!0)}};function kr(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Ge=(t,e,n)=>{n.forEach(function(o){let r=t[o];kr(e,o,function(...a){let i=r.apply(this,a),c=this[Q];for(let l of c)J(l);return i})})},St=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var no=Array.prototype,hn=Object.create(no),Lr=["push","pop","shift","unshift","splice","sort","reverse"];Ge(no,hn,Lr);var oo=Map.prototype,At=Object.create(oo),Ir=["set","clear","delete"];St(At,"Map");Ge(oo,At,Ir);var ro=Set.prototype,Nt=Object.create(ro),Dr=["add","clear","delete"];St(Nt,"Set");Ge(ro,Nt,Dr);var he={},se=t=>{if(T(t)||We(t))return t;let e={auto:!0,_value:t},n=c=>k(c)?Q in c?!0:E(c)?(Object.setPrototypeOf(c,hn),!0):ae(c)?(Object.setPrototypeOf(c,Nt),!0):Re(c)?(Object.setPrototypeOf(c,At),!0):!1:!1,o=n(t),r=new Set,s=(c,l)=>{if(he.stack&&he.stack.length){he.stack[he.stack.length-1].add(i);return}r.size!==0&&Rt(()=>{for(let u of[...r.keys()])r.has(u)&&u(c,l)})},a=c=>{let l=c[Q];l||(c[Q]=l=new Set),l.add(i)},i=(...c)=>{if(!(2 in c)){let u=c[0],f=c[1];return 0 in c?e._value===u||T(u)&&(u=u(),e._value===u)?u:(n(u)&&a(u),e._value=u,e.auto&&s(u,f),e._value):(to(i),e._value)}switch(c[2]){case 0:{let u=c[3];if(!u)return()=>{};let f=p=>{r.delete(p)};return r.add(u),()=>{f(u)}}case 1:{let u=c[1],f=e._value;s(f,u);break}case 2:return r.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return i[Q]=1,Ne(i,!1),o&&a(t),i};var ye=t=>{if(We(t))return t;let e;if(T(t)?(e=t,t=e()):e=se(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[vt]=1,E(t)){let n=t.length;for(let o=0;o<n;++o){let r=t[o];Le(r)||(t[o]=ye(r))}return e}if(!k(t))return e;for(let n of Object.entries(t)){let o=n[1];if(Le(o))continue;let r=n[0];Ze(r)||(t[r]=null,t[r]=ye(o))}return e};var so=Symbol("modelBridge"),Ot=()=>{},Ur=t=>!!t?.[so],Vr=t=>{t[so]=1},Hr=t=>{let e=ye(t());return Vr(e),e},io={collectRefObj:!0,mount:({parseResult:t,option:e})=>{if(typeof e!="string"||!e)return Ot;let n=B(e),o,r,s=Ot,a=()=>{s(),s=Ot,o=void 0,r=void 0},i=()=>{s(),s=Ot},c=(u,f)=>{o!==u&&(i(),s=Ke(u,f),o=u)},l=()=>{let u=t.refs[0]??t.value()[0],f=t.context,p=f[n];if(!T(u)){if(r&&p===r){r(u);return}if(a(),T(p)){p(u);return}f[n]=u;return}if(Ur(u)){if(p===u)return;T(p)?c(u,p):f[n]=u;return}r||(r=Hr(u)),f[n]=r,c(u,r)};return{update:()=>{l()},unmount:()=>{s()}}}};var Mt=class{r;be;xe="";Te=-1;constructor(e){this.r=e,this.be=e.o.u.inherit}N(e){this.ot(e)}rt(e){if(this.Te!==e.size){let n=[...e.keys()];this.xe=[...n,...n.map(qe)].join(","),this.Te=e.size}return this.xe}st(e){for(let n=0;n<e.length;++n){let o=e[n]?.components;if(o)for(let r in o)return!0}return!1}it(e){if(!fe(e))return!1;let n=e.getAttributeNames();return e.hasAttribute("name")?!0:n.some(o=>o.startsWith("#"))}at(e){return fe(e)&&e.getAttributeNames().length===0}ot(e){let n=this.r,o=n.m,r=n.o.X,s=n.o.$;if(r.size===0&&!this.st(o.p))return;let a=o.Y(),i=this.Ce();if(P(i))return;let c=this.ct(e,i);for(let l of c){if(l.hasAttribute(n.C))continue;let u=l.parentNode;if(!u)continue;let f=l.nextSibling,p=B(l.tagName).toUpperCase(),m=a[p]??s.get(p);if(!m)continue;let d=m.template;if(!d)continue;let g=l.parentElement;if(!g)continue;let C=new Comment(" begin component: "+l.tagName),R=new Comment(" end component: "+l.tagName);g.insertBefore(C,l),l.remove();let j=n.o.u.context,K=n.o.u.contextAlias,D=n.o.u.bind,oe=(y,A)=>{let v={},$=y.hasAttribute(j);return o.R(A,()=>{o.v(v),$?n.y(dn,y,j):y.hasAttribute(K)&&n.y(dn,y,K);let b=m.props;if(!b||b.length===0)return;b=b.map(B);let w=new Map(b.map(G=>[G.toLowerCase(),G]));for(let G of[...b,...b.map(qe)]){let ue=y.getAttribute(G);ue!==null&&(v[B(G)]=ue,y.removeAttribute(G))}let M=n.F.Re(y,!1);for(let[G,ue]of M.entries()){let[ge,I]=ue.Z;if(!I)continue;let ee=w.get(B(I).toLowerCase());ee&&(ge!=="."&&ge!==":"&&ge!==D||n.y(io,y,G,!0,ee,ue.ee))}}),v},X=[...o.V()],N=()=>{let y=oe(l,X),A=new je(y,l,X,C,R),v=Ct(()=>m.context(A)??{}).context;if(A.autoProps){for(let[$,b]of Object.entries(y))if($ in v){let w=v[$];if(w===b)continue;if(T(w)){T(b)?A.entangle?_(C,Ke(b,w)):w(b()):w(b);continue}}else v[$]=b;A.onAutoPropsAssigned?.()}return{componentCtx:v,head:A}},{componentCtx:re,head:x}=N(),S=[...Te(d)],Y=S.length,He=l.childNodes.length===0,Be=y=>{let A=y.parentElement,v=y.name;if(P(v)&&(v=y.getAttributeNames().filter(w=>w.startsWith("#"))[0],P(v)?v="default":v=v.substring(1)),He){if(v==="default"){let w=n.o.u.text,M=l.getAttribute(w);if(!P(M)){let G=document.createElement("span");G.setAttribute(w,M),A.insertBefore(G,y),l.removeAttribute(w);return}}for(let w of[...y.childNodes])A.insertBefore(w,y);return}let $=l.querySelector(`template[name='${v}'], template[\\#${v}]`);!$&&v==="default"&&($=[...l.querySelectorAll("template:not([name])")].find(M=>this.at(M))??null);let b=w=>{x.enableSwitch&&o.R(X,()=>{o.v(re);let M=oe(y,o.V());o.R(X,()=>{o.v(M);let G=o.V(),ue=Wn(G);for(let ge of w)be(ge)&&(ge.setAttribute(tt,ue),an(ue),_(ge,()=>{cn(ue)}))})})};if($){let w=[...Te($)];for(let M of w)A.insertBefore(M,y);b(w)}else{if(v!=="default"){for(let M of[...Te(y)])A.insertBefore(M,y);return}let w=[...Te(l)].filter(M=>!this.it(M));for(let M of w)A.insertBefore(M,y);b(w)}},Zt=y=>{if(!be(y))return;let A=y.querySelectorAll("slot");if(Xn(y)){Be(y),y.remove();return}for(let v of A)Be(v),v.remove()};(()=>{for(let y=0;y<Y;++y)S[y]=S[y].cloneNode(!0),u.insertBefore(S[y],f),Zt(S[y])})(),g.insertBefore(R,f);let O=()=>{if(!m.inheritAttrs)return;let y=S.filter(v=>v.nodeType===Node.ELEMENT_NODE);y.length>1&&(y=y.filter(v=>v.hasAttribute(this.be)));let A=y[0];if(A)for(let v of l.getAttributeNames()){if(v===j||v===K)continue;let $=l.getAttribute(v);if(v==="class"){let b=ze($);b.length>0&&A.classList.add(...b)}else if(v==="style"){let b=A.style,w=l.style;for(let M of w)b.setProperty(M,w.getPropertyValue(M))}else A.setAttribute(bt(v,n.o),$)}},W=()=>{for(let y of l.getAttributeNames())!y.startsWith("@")&&!y.startsWith(n.o.u.on)&&l.removeAttribute(y)},Z=()=>{O(),W(),o.v(re),n.Ee(l,!1),re.$emit=x.emit,Ae(n,S),_(l,()=>{we(re)}),_(C,()=>{me(l)}),Tt(re)};o.R(X,Z)}}Ce(){let e=this.r,n=e.m,o=e.o.X,r=n.ut(),s=this.rt(o);return[...s?[s]:[],...r,...r.map(qe)].join(",")}ct(e,n){let o=[];if(P(n))return o;if(e.matches?.(n))return[e];let r=this.q(e).reverse();for(;r.length>0;){let s=r.pop();if(s.matches(n)){o.push(s);continue}r.push(...this.q(s).reverse())}return o}j(e,n){let o=this.Ce(),r=this.q(e).reverse();for(;r.length>0;){let s=r.pop();n(s),!(!P(o)&&s.matches(o))&&r.push(...this.q(s).reverse())}}q(e){let n=e?.children;if(n?.length!=null){let r=[];for(let s=0;s<n.length;++s){let a=n[s];be(a)&&r.push(a)}return r}let o=e?.childNodes;if(o?.length!=null){let r=[];for(let s=0;s<o.length;++s){let a=o[s];be(a)&&r.push(a)}return r}return[]}};var yn=class{Z;ee;ve=[];constructor(e,n){this.Z=e,this.ee=n}},kt=class{r;we;Se;te;constructor(e){this.r=e,this.we=e.o.lt(),this.te=new Map;let n=new Map;for(let o of this.we){let r=o[0]??"",s=n.get(r);s?s.push(o):n.set(r,[o])}this.Se=n}Ae(e){let n=this.te.get(e);if(n)return n;let o=e,r=o.startsWith(".");r&&(o=":"+o.slice(1));let s=o.indexOf("."),i=(s<0?o:o.substring(0,s)).split(/[:@]/);P(i[0])&&(i[0]=r?".":o[0]);let c=s>=0?o.slice(s+1).split("."):[],l=!1,u=!1;for(let p=0;p<c.length;++p){let h=c[p];if(!l&&h==="camel"?l=!0:!u&&h==="prop"&&(u=!0),l&&u)break}l&&(i[i.length-1]=B(i[i.length-1])),u&&(i[0]=".");let f={terms:i,flags:c};return this.te.set(e,f),f}Re(e,n){let o=new Map;if(!nt(e))return o;let r=this.Se,s=(i,c)=>{let l=r.get(c[0]??"");if(l)for(let u=0;u<l.length;++u){if(!c.startsWith(l[u]))continue;let f=o.get(c);if(!f){let p=this.Ae(c);f=new yn(p.terms,p.flags),o.set(c,f)}f.ve.push(i);return}},a=i=>{let c=i.attributes;if(!(!c||c.length===0))for(let l=0;l<c.length;++l){let u=c.item(l)?.name;u&&s(i,u)}};return a(e),!n||!e.firstElementChild||this.r.M.j(e,a),o}};var ao=()=>{},Br=(t,e)=>{for(let n of t){let o=n.cloneNode(!0);e.appendChild(o)}},Lt=class{r;I;constructor(e){this.r=e,this.I=e.o.u.is}N(e){let n=e.hasAttribute(this.I);return(n||e.hasAttribute("is"))&&this.y(e),this.r.M.j(e,o=>{(o.hasAttribute(this.I)||o.hasAttribute("is"))&&this.y(o)}),n}y(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 o=n.slice(2).trim().toLowerCase();if(!o)return;let r=e.parentNode;if(!r)return;let s=document.createElement(o);for(let a of e.getAttributeNames())a!=="is"&&s.setAttribute(a,e.getAttribute(a));for(;e.firstChild;)s.appendChild(e.firstChild);r.insertBefore(s,e),e.remove(),this.r._(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.O(e,n)}P(e,n){let o=Fe(e),r=e.parentNode,s=document.createComment(`__begin__ dynamic ${n??""}`);r.insertBefore(s,e),$e(s,o),o.forEach(i=>{F(i)}),e.remove();let a=document.createComment(`__end__ dynamic ${n??""}`);return r.insertBefore(a,s.nextSibling),{nodes:o,parent:r,commentBegin:s,commentEnd:a}}O(e,n){let{nodes:o,parent:r,commentBegin:s,commentEnd:a}=this.P(e,` => ${n} `),i=this.r.m.L(n),c=i.value,l=this.r.m,u=l.V(),f={name:""},p=fe(e)?o:[...o[0].childNodes],h=()=>{l.R(u,()=>{let g=c()[0];if(k(g)&&(g.name?g=g.name:g=Object.entries(l.Y()).filter(R=>R[1]===g)[0]?.[0]),!z(g)||P(g)){xe(s,a);return}if(f.name===g)return;xe(s,a);let C=document.createElement(g);for(let R of e.getAttributeNames())R!==this.I&&C.setAttribute(R,e.getAttribute(R));Br(p,C),r.insertBefore(C,a),this.r._(C),f.name=g})},m=ao;_(s,()=>{i.stop(),m(),m=ao}),h(),m=i.subscribe(h)}};var V=t=>{let e=t;return e!=null&&e[Q]===1?e():e};var Pr=(t,e)=>{let[n,o]=e;q(o)?o(t,n):t.innerHTML=n?.toString()},It={mount:()=>({update:({el:t,values:e})=>{Pr(t,e)}})};var Dt=class t{ne;constructor(e){this.ne=e}static pt(e,n){let o=e.m,r=e.o,s=r.u,a=new Set([s.for,s.if,s.else,s.elseif,s.pre]),i=r.B,c=o.Y();if(Object.keys(c).length>0||r.$.size>0)return;let l=e.F,u=[],f=0,p=[];for(let h=n.length-1;h>=0;--h)p.push(n[h]);for(;p.length>0;){let h=p.pop();if(h.nodeType===Node.ELEMENT_NODE){let d=h;if(d.tagName==="TEMPLATE"||d.tagName.includes("-"))return;let g=B(d.tagName).toUpperCase();if(r.$.has(g)||c[g])return;let C=d.attributes;for(let R=0;R<C.length;++R){let j=C.item(R)?.name;if(!j)continue;if(a.has(j))return;let{terms:K,flags:D}=l.Ae(j),[oe,X]=K,N=i[j]??i[oe];if(N){if(N===It)return;u.push({nodeIndex:f,attrName:j,directive:N,option:X,flags:D})}}++f}let m=h.childNodes;for(let d=m.length-1;d>=0;--d)p.push(m[d])}if(u.length!==0)return new t(u)}y(e,n){let o=[],r=[];for(let s=n.length-1;s>=0;--s)r.push(n[s]);for(;r.length>0;){let s=r.pop();s.nodeType===Node.ELEMENT_NODE&&o.push(s);let a=s.childNodes;for(let i=a.length-1;i>=0;--i)r.push(a[i])}for(let s=0;s<this.ne.length;++s){let a=this.ne[s],i=o[a.nodeIndex];i&&e.y(a.directive,i,a.attrName,!1,a.option,a.flags)}}};var _r=(t,e)=>{let n=e.parentNode;if(n)for(let o=0;o<t.items.length;++o)n.insertBefore(t.items[o],e)},jr=t=>{let e=t.length,n=t.slice(),o=[],r,s,a;for(let i=0;i<e;++i){let c=t[i];if(c===0)continue;let l=o[o.length-1];if(l===void 0||t[l]<c){n[i]=l??-1,o.push(i);continue}for(r=0,s=o.length-1;r<s;)a=r+s>>1,t[o[a]]<c?r=a+1:s=a;c<t[o[r]]&&(r>0&&(n[i]=o[r-1]),o[r]=i)}for(r=o.length,s=o[r-1]??-1;r-- >0;)o[r]=s,s=n[s];return o},Ut=class{static ft(e){let{oldItems:n,newValues:o,getKey:r,isSameValue:s,mountNewValue:a,removeMountItem:i,endAnchor:c}=e,l=n.length,u=o.length,f=new Array(u),p=new Set;for(let x=0;x<u;++x){let S=r(o[x]);if(S===void 0||p.has(S))return;p.add(S),f[x]=S}let h=new Array(u),m=0,d=l-1,g=u-1;for(;m<=d&&m<=g;){let x=n[m];if(r(x.value)!==f[m]||!s(x.value,o[m]))break;x.value=o[m],h[m]=x,++m}for(;m<=d&&m<=g;){let x=n[d];if(r(x.value)!==f[g]||!s(x.value,o[g]))break;x.value=o[g],h[g]=x,--d,--g}if(m>d){for(let x=g;x>=m;--x){let S=x+1<u?h[x+1].items[0]:c;h[x]=a(x,o[x],S)}return h}if(m>g){for(let x=m;x<=d;++x)i(n[x]);return h}let C=m,R=m,j=g-R+1,K=new Array(j).fill(0),D=new Map;for(let x=R;x<=g;++x)D.set(f[x],x);let oe=!1,X=0;for(let x=C;x<=d;++x){let S=n[x],Y=D.get(r(S.value));if(Y===void 0){i(S);continue}if(!s(S.value,o[Y])){i(S);continue}S.value=o[Y],h[Y]=S,K[Y-R]=x+1,Y>=X?X=Y:oe=!0}let N=oe?jr(K):[],re=N.length-1;for(let x=j-1;x>=0;--x){let S=R+x,Y=S+1<u?h[S+1].items[0]:c;if(K[x]===0){h[S]=a(S,o[S],Y);continue}let He=h[S];oe&&(re>=0&&N[re]===x?--re:He&&_r(He,Y))}return h}};var rt=class{T=[];D=new Map;get w(){return this.T.length}oe;constructor(e){this.oe=e}re(e){let n=this.oe(e.value);n!==void 0&&this.D.set(n,e)}se(e){let n=this.oe(this.T[e]?.value);n!==void 0&&this.D.delete(n)}static mt(e,n){return{items:[],index:e,value:n,order:-1}}v(e){e.order=this.w,this.T.push(e),this.re(e)}dt(e,n){let o=this.w;for(let r=e;r<o;++r)this.T[r].order=r+1;n.order=e,this.T.splice(e,0,n),this.re(n)}U(e){return this.T[e]}ie(e,n){this.se(e),this.T[e]=n,this.re(n),n.order=e}Ne(e){this.se(e),this.T.splice(e,1);let n=this.w;for(let o=e;o<n;++o)this.T[o].order=o}ke(e){let n=this.w;for(let o=e;o<n;++o)this.se(o);this.T.splice(e)}Zt(e){return this.D.has(e)}yt(e){return this.D.get(e)?.order??-1}};var gn=Symbol("r-for"),$r=t=>-1,co=()=>{},Vt=class t{r;x;Me;C;constructor(e){this.r=e,this.x=e.o.u.for,this.Me=gt(this.x),this.C=e.o.u.pre}N(e){let n=e.hasAttribute(this.x);return n&&this.Oe(e),this.r.M.j(e,o=>{o.hasAttribute(this.x)&&this.Oe(o)}),n}Q(e){return e[gn]?!0:(e[gn]=!0,yt(e,this.Me).forEach(n=>n[gn]=!0),!1)}Oe(e){if(e.hasAttribute(this.C)||this.Q(e))return;let n=e.getAttribute(this.x);if(!n){U(0,this.x,e);return}e.removeAttribute(this.x),this.ht(e,n)}Le(e){return le(e)?[]:(q(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(o=>({*[Symbol.iterator](){for(let r=1;r<=o;r++)yield r}}))(e):Object.entries(e))}ht(e,n){let o=this.gt(n);if(!o?.list){U(1,this.x,n,e);return}let r=this.r.o.u.key,s=this.r.o.u.keyBind,a=e.getAttribute(r)??e.getAttribute(s);e.removeAttribute(r),e.removeAttribute(s);let i=Fe(e),c=Dt.pt(this.r,i),l=e.parentNode;if(!l)return;let u=`${this.x} => ${n}`,f=new Comment(`__begin__ ${u}`);l.insertBefore(f,e),$e(f,i),i.forEach(O=>{F(O)}),e.remove();let p=new Comment(`__end__ ${u}`);l.insertBefore(p,f.nextSibling);let h=this.r,m=h.m,d=m.V(),C=d.length===1?[void 0,d[0]]:void 0,R=this.bt(a),j=(O,W)=>R(O)===R(W),K=(O,W)=>O===W,D=(O,W,Z)=>{let y=o.createContext(W,O),A=rt.mt(y.index,W),v=()=>{let $=p.parentNode??f.parentNode??l,b=Z.previousSibling,w=[];for(let M=0;M<i.length;++M){let G=i[M].cloneNode(!0);$.insertBefore(G,Z),w.push(G)}for(c?c.y(h,w):Ae(h,w),b=b.nextSibling;b!==Z;)A.items.push(b),b=b.nextSibling};return C?(C[0]=y.ctx,m.R(C,v)):m.R(d,()=>{m.v(y.ctx),v()}),A},oe=(O,W)=>{let Z=L.U(O).items,y=Z[Z.length-1].nextSibling;for(let A of Z)F(A);L.ie(O,D(O,W,y))},X=(O,W)=>{L.v(D(O,W,p))},N=O=>{for(let W of L.U(O).items)F(W)},re=O=>{let W=L.w;for(let Z=O;Z<W;++Z)L.U(Z).index(Z)},x=O=>{let W=f.parentNode,Z=p.parentNode;if(!W||!Z)return;let y=L.w;q(O)&&(O=O());let A=V(O[0]);if(E(A)&&A.length===0){xe(f,p),L.ke(0);return}let v=[];for(let I of this.Le(O[0]))v.push(I);let $=Ut.ft({oldItems:L.T,newValues:v,getKey:R,isSameValue:K,mountNewValue:(I,ee,Oe)=>D(I,ee,Oe),removeMountItem:I=>{for(let ee=0;ee<I.items.length;++ee)F(I.items[ee])},endAnchor:p});if($){L.T=$,L.D.clear();for(let I=0;I<$.length;++I){let ee=$[I];ee.order=I,ee.index(I);let Oe=R(ee.value);Oe!==void 0&&L.D.set(Oe,ee)}return}let b=0,w=Number.MAX_SAFE_INTEGER,M=y,G=this.r.o.forGrowThreshold,ue=()=>L.w<M+G;for(let I of v){let ee=()=>{if(b<y){let Oe=L.U(b++);if(j(Oe.value,I)){if(K(Oe.value,I))return;oe(b-1,I);return}let at=L.yt(R(I));if(at>=b&&at-b<10){if(--b,w=Math.min(w,b),N(b),L.Ne(b),--y,at>b+1)for(let en=b;en<at-1&&en<y&&!j(L.U(b).value,I);)++en,N(b),L.Ne(b),--y;ee();return}ue()?(L.dt(b-1,D(b,I,L.U(b-1).items[0])),w=Math.min(w,b-1),++y):oe(b-1,I)}else X(b++,I)};ee()}let ge=b;for(y=L.w;b<y;)N(b++);L.ke(ge),re(w)},S=()=>{Y.stop(),Be(),Be=co},Y=m.L(o.list),He=Y.value,Be=co,Zt=0,L=new rt(R);for(let O of this.Le(He()[0]))L.v(D(Zt++,O,p));_(f,S),Be=Y.subscribe(x)}static xt=/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/;gt(e){let n=t.xt.exec(e);if(!n)return;let o=(n[1]+(n[2]??"")).split(",").map(c=>c.trim()),r=o.length>1?o.length-1:-1,s=r!==-1&&(o[r]==="index"||o[r]?.startsWith("#"))?o[r]:"";s&&o.splice(r,1);let a=n[3];if(!a||o.length===0)return;let i=/[{[]/.test(e);return{list:a,createContext:(c,l)=>{let u={},f=V(c);if(!i&&o.length===1)u[o[0]]=c;else if(E(f)){let h=0;for(let m of o)u[m]=f[h++]}else for(let h of o)u[h]=f[h];let p={ctx:u,index:$r};return s&&(p.index=u[s.startsWith("#")?s.substring(1):s]=se(l)),p}}}bt(e){if(!e)return o=>o;let n=e.trim();if(!n)return o=>o;if(n.includes(".")){let o=this.Tt(n),r=o.length>1?o.slice(1):void 0;return s=>{let a=V(s),i=this.Ve(a,o);return i!==void 0||!r?i:this.Ve(a,r)}}return o=>V(V(o)?.[n])}Tt(e){return e.split(".").filter(n=>n.length>0)}Ve(e,n){let o=e;for(let r of n)o=V(o)?.[r];return V(o)}};var Ht=class{ae=0;ce=new Map;m;Ie;De;Ue;M;F;o;C;Pe;constructor(e){this.m=e,this.o=e.o,this.De=new Vt(this),this.Ie=new ht(this),this.Ue=new Lt(this),this.M=new Mt(this),this.F=new kt(this),this.C=this.o.u.pre,this.Pe=this.o.u.dynamic}Ct(e){let n=fe(e)?[e]:e.querySelectorAll("template");for(let o of n){if(o.hasAttribute(this.C))continue;let r=o.parentNode;if(!r)continue;let s=o.nextSibling;if(o.remove(),!o.content)continue;let a=[...o.content.childNodes];for(let i of a)r.insertBefore(i,s);Ae(this,a)}}_(e){++this.ae;try{if(e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.C)||this.Ie.N(e)||this.De.N(e)||this.Ue.N(e))return;this.M.N(e),this.Ct(e),this.Ee(e,!0)}finally{--this.ae,this.ae===0&&this.Rt()}}Et(e,n){let o=document;if(!o){let r=e.parentNode;for(;r?.parentNode;)r=r.parentNode;if(!r)return null;o=r}return o.querySelector(n)}Be(e,n){let o=this.Et(e,n);if(!o)return!1;let r=e.parentElement;if(!r)return!1;let s=new Comment(`teleported => '${n}'`);return r.insertBefore(s,e),e.teleportedFrom=s,s.teleportedTo=e,_(s,()=>{F(e)}),o.appendChild(e),!0}vt(e,n){this.ce.set(e,n)}Rt(){let e=this.ce;if(e.size!==0){this.ce=new Map;for(let[n,o]of e.entries())this.Be(n,o)}}Ee(e,n){let o=this.F.Re(e,n),r=this.o.B;for(let[s,a]of o.entries()){let[i,c]=a.Z,l=r[s]??r[i];if(!l){console.error("directive not found:",i);continue}let u=a.ve;for(let f=0;f<u.length;++f){let p=u[f];this.y(l,p,s,!1,c,a.ee)}}}y(e,n,o,r,s,a){if(n.hasAttribute(this.C))return;let i=n.getAttribute(o);n.removeAttribute(o);let c=l=>{let u=l;for(;u;){let f=u.getAttribute(tt);if(f)return f;u=u.parentElement}return null};if(un()){let l=c(n);if(l){this.m.R(Gn(l),()=>{this.O(e,n,i,s,a)});return}}this.O(e,n,i,s,a)}wt(e,n,o){return e!==xt?!1:(P(o)||this.Be(n,o)||this.vt(n,o),!0)}O(e,n,o,r,s){if(n.nodeType!==Node.ELEMENT_NODE||o==null||this.wt(e,n,o))return;let a=this.St(r,e.once),i=this.At(e,o),c=this.Nt(i,a);_(n,c.stop);let l=this.kt(n,o,i,a,r,s),u=this.Mt(e,l,c);if(!u)return;let f=this.Ot(l,i,a,r,u);f(),e.once||(c.result=i.subscribe(f),a&&(c.dynamic=a.subscribe(f)))}St(e,n){let o=Zn(e,this.Pe);if(o)return this.m.L(B(o),void 0,void 0,void 0,n)}At(e,n){return this.m.L(n,e.isLazy,e.isLazyKey,e.collectRefObj,e.once)}Nt(e,n){let o={stop:()=>{e.stop(),n?.stop(),o.result?.(),o.dynamic?.(),o.mounted?.(),o.result=void 0,o.dynamic=void 0,o.mounted=void 0}};return o}kt(e,n,o,r,s,a){return{el:e,expr:n,values:o.value(),previousValues:void 0,option:r?r.value()[0]:s,previousOption:void 0,flags:a,parseResult:o,dynamicOption:r}}Mt(e,n,o){let r=e.mount(n);if(typeof r=="function"){o.mounted=r;return}return r?.unmount&&(o.mounted=r.unmount),r?.update}Ot(e,n,o,r,s){let a,i;return()=>{let c=n.value(),l=o?o.value()[0]:r;e.values=c,e.previousValues=a,e.option=l,e.previousOption=i,a=c,i=l,s(e)}}};var uo="http://www.w3.org/1999/xlink",Fr={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 qr(t){return!!t||t===""}var zr=(t,e,n,o,r,s)=>{if(o){s&&s.includes("camel")&&(o=B(o)),Bt(t,o,e[0],r);return}let a=e.length;for(let i=0;i<a;++i){let c=e[i];if(E(c)){let l=n?.[i]?.[0],u=c[0],f=c[1];Bt(t,u,f,l)}else if(k(c))for(let l of Object.entries(c)){let u=l[0],f=l[1],p=n?.[i],h=p&&u in p?u:void 0;Bt(t,u,f,h)}else{let l=n?.[i],u=e[i++],f=e[i];Bt(t,u,f,l)}}},bn={mount:()=>({update:({el:t,values:e,previousValues:n,option:o,previousOption:r,flags:s})=>{zr(t,e,n,o,r,s)}})},Bt=(t,e,n,o)=>{if(o&&o!==e&&t.removeAttribute(o),le(e)){U(3,"r-bind",t);return}if(!z(e)){U(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){le(n)?t.removeAttributeNS(uo,e.slice(6,e.length)):t.setAttributeNS(uo,e,n);return}let r=e in Fr;le(n)||r&&!qr(n)?t.removeAttribute(e):t.setAttribute(e,r?"":n)};var Kr=(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],a=n?.[r];if(E(s)){let i=s.length;for(let c=0;c<i;++c)lo(t,s[c],a?.[c])}else lo(t,s,a)}},xn={mount:()=>({update:({el:t,values:e,previousValues:n})=>{Kr(t,e,n)}})},lo=(t,e,n)=>{let o=t.classList,r=z(e),s=z(n);if(e&&!r){if(n&&!s)for(let a in n)(!(a in e)||!e[a])&&o.remove(a);for(let a in e)e[a]&&o.add(a)}else if(r){if(n!==e){let a=s?ze(n):[],i=ze(e);a.length>0&&o.remove(...a),i.length>0&&o.add(...i)}}else if(n){let a=s?ze(n):[];a.length>0&&o.remove(...a)}};function Wr(t,e){if(t.length!==e.length)return!1;let n=!0;for(let o=0;n&&o<t.length;o++)n=Ce(t[o],e[o]);return n}function Ce(t,e){if(t===e)return!0;let n=on(t),o=on(e);if(n||o)return n&&o?t.getTime()===e.getTime():!1;if(n=Ze(t),o=Ze(e),n||o)return t===e;if(n=E(t),o=E(e),n||o)return n&&o?Wr(t,e):!1;if(n=k(t),o=k(e),n||o){if(!n||!o)return!1;let r=Object.keys(t).length,s=Object.keys(e).length;if(r!==s)return!1;for(let a in t){let i=Object.prototype.hasOwnProperty.call(t,a),c=Object.prototype.hasOwnProperty.call(e,a);if(i&&!c||!Ce(t[a],e[a]))return!1}return!0}return String(t)===String(e)}function Pt(t,e){return t.findIndex(n=>Ce(n,e))}var fo=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var _t=t=>{if(!T(t))throw H(3,"pause");t(void 0,void 0,3)};var jt=t=>{if(!T(t))throw H(3,"resume");t(void 0,void 0,4)};var mo={mount:({el:t,parseResult:e,flags:n})=>({update:({values:o})=>{Gr(t,o[0])},unmount:Jr(t,e,n)})},Gr=(t,e)=>{let n=bo(t);if(n&&ho(t))E(e)?e=Pt(e,ve(t))>-1:ae(e)?e=e.has(ve(t)):e=ts(t,e),t.checked=e;else if(n&&yo(t))t.checked=Ce(e,ve(t));else if(n||xo(t))go(t)?t.value!==e?.toString()&&(t.value=e):t.value!==e&&(t.value=e);else if(To(t)){let o=t.options,r=o.length,s=t.multiple;for(let a=0;a<r;a++){let i=o[a],c=ve(i);if(s)E(e)?i.selected=Pt(e,c)>-1:i.selected=e.has(c);else if(Ce(ve(i),e)){t.selectedIndex!==a&&(t.selectedIndex=a);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else U(7,t)},st=t=>(T(t)&&(t=t()),q(t)&&(t=t()),t?z(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}),ho=t=>t.type==="checkbox",yo=t=>t.type==="radio",go=t=>t.type==="number"||t.type==="range",bo=t=>t.tagName==="INPUT",xo=t=>t.tagName==="TEXTAREA",To=t=>t.tagName==="SELECT",Jr=(t,e,n)=>{let o=e.value,r=st(n?.join(",")),s=st(o()[1]),a={int:r.int||s.int,lazy:r.lazy||s.lazy,number:r.number||s.number,trim:r.trim||s.trim};if(!e.refs[0])return U(8,t),()=>{};let i=()=>e.refs[0],c=bo(t);return c&&ho(t)?Xr(t,i):c&&yo(t)?ns(t,i):c||xo(t)?Qr(t,a,i,o):To(t)?os(t,i,o):(U(7,t),()=>{})},po=/[.,' ·٫]/,Qr=(t,e,n,o)=>{let s=e.lazy?"change":"input",a=go(t),i=()=>{!e.trim&&!st(o()[1]).trim||(t.value=t.value.trim())},c=p=>{let h=p.target;h.composing=1},l=p=>{let h=p.target;h.composing&&(h.composing=0,h.dispatchEvent(new Event(s)))},u=()=>{t.removeEventListener(s,f),t.removeEventListener("change",i),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",l),t.removeEventListener("change",l)},f=p=>{let h=n();if(!h)return;let m=p.target;if(!m||m.composing)return;let d=m.value,g=st(o()[1]);if(a||g.number||g.int){if(g.int)d=parseInt(d);else{if(po.test(d[d.length-1])&&d.split(po).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(h()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else g.trim&&(d=d.trim());h(d)};return t.addEventListener(s,f),t.addEventListener("change",i),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",l),t.addEventListener("change",l),u},Xr=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let a=ve(t),i=t.checked,c=s();if(E(c)){let l=Pt(c,a),u=l!==-1;i&&!u?c.push(a):!i&&u&&c.splice(l,1)}else ae(c)?i?c.add(a):c.delete(a):s(es(t,i))};return t.addEventListener(n,r),o},ve=t=>"_value"in t?t._value:t.value,Co="trueValue",Yr="falseValue",vo="true-value",Zr="false-value",es=(t,e)=>{let n=e?Co:Yr;if(n in t)return t[n];let o=e?vo:Zr;return t.hasAttribute(o)?t.getAttribute(o):e},ts=(t,e)=>{if(Co in t)return Ce(e,t.trueValue);let o=vo;return t.hasAttribute(o)?Ce(e,t.getAttribute(o)):Ce(e,!0)},ns=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let a=ve(t);s(a)};return t.addEventListener(n,r),o},os=(t,e,n)=>{let o="change",r=()=>{t.removeEventListener(o,s)},s=()=>{let a=e();if(!a)return;let c=st(n()[1]).number,l=Array.prototype.filter.call(t.options,u=>u.selected).map(u=>c?fo(ve(u)):ve(u));if(t.multiple){let u=a();try{if(_t(a),ae(u)){u.clear();for(let f of l)u.add(f)}else E(u)?(u.splice(0),u.push(...l)):a(l)}finally{jt(a),J(a)}}else a(l[0])};return t.addEventListener(o,s),r};var rs=["stop","prevent","capture","self","once","left","right","middle","passive"],ss=t=>{let e={};if(P(t))return;let n=t.split(",");for(let o of rs)e[o]=n.includes(o);return e},is=(t,e,n,o,r)=>{if(o){let l=e.value(),u=V(o.value()[0]);return z(u)?Tn(t,B(u),()=>e.value()[0],r?.join(",")??l[1]):()=>{}}else if(n){let l=e.value();return Tn(t,B(n),()=>e.value()[0],r?.join(",")??l[1])}let s=[],a=()=>{s.forEach(l=>l())},i=e.value(),c=i.length;for(let l=0;l<c;++l){let u=i[l];if(q(u)&&(u=u()),k(u))for(let f of Object.entries(u)){let p=f[0],h=()=>{let d=e.value()[l];return q(d)&&(d=d()),d=d[p],q(d)&&(d=d()),d},m=u[p+"_flags"];s.push(Tn(t,p,h,m))}else U(2,"r-on",t)}return a},Cn={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,mount:({el:t,parseResult:e,option:n,dynamicOption:o,flags:r})=>is(t,e,n,o,r)},as=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e??="";let n=[...t.split("."),...e.split(",")];t=n[0];let o=n[1],r=n.includes("ctrl"),s=n.includes("shift"),a=n.includes("alt"),i=n.includes("meta"),c=l=>!(r&&!l.ctrlKey||s&&!l.shiftKey||a&&!l.altKey||i&&!l.metaKey);return o?[t,l=>c(l)?l.key.toUpperCase()===o.toUpperCase():!1]:[t,c]}return[t,n=>!0]},Tn=(t,e,n,o)=>{if(P(e))return U(5,"r-on",t),()=>{};let r=ss(o),s=r?{capture:r.capture,passive:r.passive,once:r.once}:void 0,a;[e,a]=as(e,o);let i=u=>{if(!a(u)||!n&&e==="submit"&&r?.prevent)return;let f=n(u);q(f)&&(f=f(u)),q(f)&&f(u)},c=()=>{t.removeEventListener(e,l,s)},l=u=>{if(!r){i(u);return}try{if(r.left&&u.button!==0||r.middle&&u.button!==1||r.right&&u.button!==2||r.self&&u.target!==t)return;r.stop&&u.stopPropagation(),r.prevent&&u.preventDefault(),i(u)}finally{r.once&&c()}};return t.addEventListener(e,l,s),c};var cs=(t,e,n,o)=>{if(n){o&&o.includes("camel")&&(n=B(n)),Je(t,n,e[0]);return}let r=e.length;for(let s=0;s<r;++s){let a=e[s];if(E(a)){let i=a[0],c=a[1];Je(t,i,c)}else if(k(a))for(let i of Object.entries(a)){let c=i[0],l=i[1];Je(t,c,l)}else{let i=e[s++],c=e[s];Je(t,i,c)}}},Eo={mount:()=>({update:({el:t,values:e,option:n,flags:o})=>{cs(t,e,n,o)}})};function us(t){return!!t||t===""}var Je=(t,e,n)=>{if(le(e)){U(3,":prop",t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(me),1),t[e]=n??"";return}let o=t.tagName;if(e==="value"&&o!=="PROGRESS"&&!o.includes("-")){t._value=n;let s=o==="OPTION"?t.getAttribute("value"):t.value,a=n??"";s!==a&&(t.value=a),n==null&&t.removeAttribute(e);return}let r=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=us(n):n==null&&s==="string"?(n="",r=!0):s==="number"&&(n=0,r=!0)}try{t[e]=n}catch(s){r||U(4,e,o,n,s)}r&&t.removeAttribute(e)};var Ro={once:!0,mount:({el:t,parseResult:e,expr:n})=>{let o=e,r=o.value()[0],s=E(r),a=o.refs[0];return s?r.push(t):a?a?.(t):o.context[n]=t,()=>{if(s){let i=r.indexOf(t);i!==-1&&r.splice(i,1)}else a?.(null)}}};var ls=(t,e)=>{let n=Se(t).data,o=n._ord;jn(o)&&(o=n._ord=t.style.display),!!e[0]?t.style.display=o:t.style.display="none"},wo={mount:()=>({update:({el:t,values:e})=>{ls(t,e)}})};var fs=(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],a=n?.[r];if(E(s)){let i=s.length;for(let c=0;c<i;++c)So(t,s[c],a?.[c])}else So(t,s,a)}},$t={mount:()=>({update:({el:t,values:e,previousValues:n})=>{fs(t,e,n)}})},So=(t,e,n)=>{let o=t.style,r=z(e);if(e&&!r){if(n&&!z(n))for(let s in n)e[s]==null&&En(o,s,"");for(let s in e)En(o,s,e[s])}else{let s=o.display;if(r?n!==e&&(o.cssText=e):n&&t.removeAttribute("style"),"_ord"in Se(t).data)return;o.display=s}},Ao=/\s*!important$/;function En(t,e,n){if(E(n))n.forEach(o=>{En(t,e,o)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let o=ps(t,e);Ao.test(n)?t.setProperty(qe(o),n.replace(Ao,""),"important"):t[o]=n}}var No=["Webkit","Moz","ms"],vn={};function ps(t,e){let n=vn[e];if(n)return n;let o=B(e);if(o!=="filter"&&o in t)return vn[e]=o;o=ot(o);for(let r=0;r<No.length;r++){let s=No[r]+o;if(s in t)return vn[e]=s}return e}var ie=t=>Oo(V(t)),Oo=(t,e=new WeakMap)=>{if(!t||!k(t))return t;if(E(t))return t.map(ie);if(ae(t)){let o=new Set;for(let r of t.keys())o.add(ie(r));return o}if(Re(t)){let o=new Map;for(let r of t)o.set(ie(r[0]),ie(r[1]));return o}if(e.has(t))return V(e.get(t));let n={...t};e.set(t,n);for(let o of Object.entries(n))n[o[0]]=Oo(V(o[1]),e);return n};var ms=(t,e)=>{let n=e[0];t.textContent=ae(n)?JSON.stringify(ie([...n])):Re(n)?JSON.stringify(ie([...n])):k(n)?JSON.stringify(ie(n)):n?.toString()??""},Mo={mount:()=>({update:({el:t,values:e})=>{ms(t,e)}})};var ko={mount:()=>({update:({el:t,values:e})=>{Je(t,"value",e[0])}})};var ce=class t{static getDefault(){return t.He??(t.He=new t)}B={};u={};lt=()=>Object.keys(this.B).filter(e=>e.length===1||!e.startsWith(":"));X=new Map;$=new Map;static He;static Lt="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";forGrowThreshold=10;globalContext;useInterpolation=!0;constructor(e){if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.Vt()}Vt(){let e={},n=globalThis;for(let o of t.Lt.split(","))e[o]=n[o];return e.ref=ye,e.sref=se,e.flatten=ie,e}addComponent(...e){for(let n of e){if(!n.defaultName){et.warning("Registered component's default name is not defined",n);continue}this.X.set(ot(n.defaultName),n),this.$.set(ot(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.B={".":Eo,":":bn,"@":Cn,[`${e}on`]:Cn,[`${e}bind`]:bn,[`${e}html`]:It,[`${e}text`]:Mo,[`${e}show`]:wo,[`${e}model`]:mo,":style":$t,[`${e}style`]:$t,[`${e}bind:style`]:$t,":class":xn,[`${e}bind:class`]:xn,":ref":Ro,":value":ko,[`${e}teleport`]:xt},this.u={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,context:":context",contextAlias:`${e}context`,bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.B,this.u)}};var Ft=(t,e)=>{if(!t)return;let o=(e??ce.getDefault()).u,r=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let a of hs(t,o.pre,s))ds(a,o.text,r,s)},ds=(t,e,n,o)=>{let r=t.textContent;if(!r)return;let s=n,a=r.split(s);if(a.length<=1)return;if(t.parentElement?.childNodes.length===1&&a.length===3){let c=a[1],l=Lo(c,o);if(l&&P(a[0])&&P(a[2])){let u=t.parentElement;u.setAttribute(e,c.substring(l.start.length,c.length-l.end.length)),u.innerText="";return}}let i=document.createDocumentFragment();for(let c of a){let l=Lo(c,o);if(l){let u=document.createElement("span");u.setAttribute(e,c.substring(l.start.length,c.length-l.end.length)),i.appendChild(u)}else i.appendChild(document.createTextNode(c))}t.replaceWith(i)},hs=(t,e,n)=>{let o=[],r=s=>{if(s.nodeType===Node.TEXT_NODE)n.some(a=>s.textContent?.includes(a.start))&&o.push(s);else{if(s?.hasAttribute?.(e))return;for(let a of Te(s))r(a)}};return r(t),o},Lo=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var ys=9,gs=10,bs=13,xs=32,Ee=46,qt=44,Ts=39,Cs=34,zt=40,Qe=41,Kt=91,Rn=93,wn=63,vs=59,Io=58,Do=123,Wt=125,De=43,Gt=45,Sn=96,Uo=47,An=92,Vo=new Set([2,3]),$o={"=":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},Es={"=>":2,...$o,"||":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},Fo=Object.keys($o),Rs=new Set(Fo),On=new Set(["=>"]);Fo.forEach(t=>On.add(t));var Ho={true:!0,false:!1,null:null},ws="this",Xe="Expected ",Ue="Unexpected ",kn="Unclosed ",Ss=Xe+":",Bo=Xe+"expression",As="missing }",Ns=Ue+"object property",Os=kn+"(",Po=Xe+"comma",_o=Ue+"token ",Ms=Ue+"period",Nn=Xe+"expression after ",ks="missing unaryOp argument",Ls=kn+"[",Is=Xe+"exponent (",Ds="Variable names cannot start with a number (",Us=kn+'quote after "',it=t=>t>=48&&t<=57,jo=t=>Es[t],Mn=class{l;e;get H(){return this.l.charAt(this.e)}get h(){return this.l.charCodeAt(this.e)}f(e){return this.l.charCodeAt(this.e)===e}constructor(e){this.l=e,this.e=0}z(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95||e>=128}ue(e){return this.z(e)||it(e)}i(e){return new Error(`${e} at character ${this.e}`)}g(){let e=this.h,n=this.l,o=this.e;for(;e===xs||e===ys||e===gs||e===bs;)e=n.charCodeAt(++o);this.e=o}parse(){let e=this.le();return e.length===1?e[0]:{type:0,body:e}}le(e){let n=[];for(;this.e<this.l.length;){let o=this.h;if(o===vs||o===qt)this.e++;else{let r=this.S();if(r)n.push(r);else if(this.e<this.l.length){if(o===e)break;throw this.i(Ue+'"'+this.H+'"')}}}return n}S(){let e=this.It()??this.je();return this.g(),this.Dt(e)}pe(){this.g();let e=this.l,n=this.e,o=e.charCodeAt(n),r=e.charCodeAt(n+1),s=e.charCodeAt(n+2),a=e.charCodeAt(n+3);if(isNaN(o))return!1;let i=!1,c=0;return o===62&&r===62&&s===62&&a===61?(i=">>>=",c=4):o===61&&r===61&&s===61?(i="===",c=3):o===33&&r===61&&s===61?(i="!==",c=3):o===62&&r===62&&s===62?(i=">>>",c=3):o===60&&r===60&&s===61?(i="<<=",c=3):o===62&&r===62&&s===61?(i=">>=",c=3):o===42&&r===42&&s===61?(i="**=",c=3):o===61&&r===62?(i="=>",c=2):o===124&&r===124?(i="||",c=2):o===63&&r===63?(i="??",c=2):o===38&&r===38?(i="&&",c=2):o===61&&r===61?(i="==",c=2):o===33&&r===61?(i="!=",c=2):o===60&&r===61?(i="<=",c=2):o===62&&r===61?(i=">=",c=2):o===60&&r===60?(i="<<",c=2):o===62&&r===62?(i=">>",c=2):o===43&&r===61?(i="+=",c=2):o===45&&r===61?(i="-=",c=2):o===42&&r===61?(i="*=",c=2):o===47&&r===61?(i="/=",c=2):o===37&&r===61?(i="%=",c=2):o===38&&r===61?(i="&=",c=2):o===94&&r===61?(i="^=",c=2):o===124&&r===61?(i="|=",c=2):o===42&&r===42?(i="**",c=2):o===105&&r===110?this.ue(e.charCodeAt(n+2))||(i="in",c=2):o===61?(i="=",c=1):o===124?(i="|",c=1):o===94?(i="^",c=1):o===38?(i="&",c=1):o===60?(i="<",c=1):o===62?(i=">",c=1):o===43?(i="+",c=1):o===45?(i="-",c=1):o===42?(i="*",c=1):o===47?(i="/",c=1):o===37&&(i="%",c=1),i?(this.e+=c,i):!1}je(){let e,n,o,r,s,a,i,c;if(s=this.K(),!s||(n=this.pe(),!n))return s;if(r={value:n,prec:jo(n),right_a:On.has(n)},a=this.K(),!a)throw this.i(Nn+n);let l=[s,r,a];for(;n=this.pe();){o=jo(n),r={value:n,prec:o,right_a:On.has(n)},c=n;let u=f=>r.right_a&&f.right_a?o>f.prec:o<=f.prec;for(;l.length>2&&u(l[l.length-2]);)a=l.pop(),n=l.pop().value,s=l.pop(),e=this._e(n,s,a),l.push(e);if(e=this.K(),!e)throw this.i(Nn+c);l.push(r,e)}for(i=l.length-1,e=l[i];i>1;)e=this._e(l[i-1].value,l[i-2],e),i-=2;return e}K(){let e;if(this.g(),e=this.Ut(),e)return this.fe(e);let n=this.h;if(it(n)||n===Ee)return this.Pt();if(n===Ts||n===Cs)e=this.Bt();else if(n===Kt)e=this.Ht();else{let o=this.jt();if(o){let r=this.K();if(!r)throw this.i(ks);return this.fe({type:7,operator:o,argument:r})}this.z(n)?(e=this.me(),e.name in Ho?e={type:4,value:Ho[e.name],raw:e.name}:e.name===ws&&(e={type:5})):n===zt&&(e=this._t())}return e?(e=this.W(e),this.fe(e)):!1}_e(e,n,o){if(e==="=>"){let r=n.type===1?n.expressions:[n];return{type:15,params:r,body:o}}return Rs.has(e)?{type:16,operator:e,left:n,right:o}:{type:8,operator:e,left:n,right:o}}Ut(){let e={node:!1};return this.$t(e),e.node||(this.Ft(e),e.node)||(this.qt(e),e.node)||(this.$e(e),e.node)||this.zt(e),e.node}fe(e){let n={node:e};return this.Kt(n),this.Wt(n),this.Gt(n),n.node}jt(){let e=this.l,n=this.e,o=e.charCodeAt(n),r=e.charCodeAt(n+1),s=e.charCodeAt(n+2),a=e.charCodeAt(n+3);return o===Gt?(this.e++,"-"):o===33?(this.e++,"!"):o===126?(this.e++,"~"):o===De?(this.e++,"+"):o===110&&r===101&&s===119&&!this.ue(a)?(this.e+=3,"new"):!1}It(){let e={};return this.Jt(e),e.node}Dt(e){let n={node:e};return this.Qt(n),n.node}W(e){this.g();let n=this.h;for(;n===Ee||n===Kt||n===zt||n===wn;){let o;if(n===wn){if(this.l.charCodeAt(this.e+1)!==Ee)break;o=!0,this.e+=2,this.g(),n=this.h}if(this.e++,n===Kt){if(e={type:3,computed:!0,object:e,property:this.S()},this.g(),n=this.h,n!==Rn)throw this.i(Ls);this.e++}else n===zt?e={type:6,arguments:this.Fe(Qe),callee:e}:(o&&this.e--,this.g(),e={type:3,computed:!1,object:e,property:this.me()});o&&(e.optional=!0),this.g(),n=this.h}return e}Pt(){let e=this.l,n=this.e,o=n;for(;it(e.charCodeAt(o));)o++;if(e.charCodeAt(o)===Ee)for(o++;it(e.charCodeAt(o));)o++;let r=e.charCodeAt(o);if(r===101||r===69){o++;let i=e.charCodeAt(o);(i===De||i===Gt)&&o++;let c=o;for(;it(e.charCodeAt(o));)o++;if(c===o){this.e=o;let l=e.slice(n,o);throw this.i(Is+l+this.H+")")}}this.e=o;let s=e.slice(n,o),a=e.charCodeAt(o);if(this.z(a))throw this.i(Ds+s+this.H+")");if(a===Ee||s.length===1&&s.charCodeAt(0)===Ee)throw this.i(Ms);return{type:4,value:parseFloat(s),raw:s}}Bt(){let e=this.l,n=e.length,o=this.e,r=e.charCodeAt(this.e++),s=this.e,a=s,i=[],c=!1,l=!1;for(;s<n;){let f=e.charCodeAt(s);if(f===r){l=!0,this.e=s+1;break}if(f===An){c||(c=!0),i.push(e.slice(a,s));let p=e.charCodeAt(s+1);i.push(this.qe(p)),s+=2,a=s}else s++}let u=c?i.join("")+e.slice(a,l?s:n):e.slice(a,l?s:n);if(!l)throw this.e=s,this.i(Us+u+'"');return{type:4,value:u,raw:e.substring(o,this.e)}}qe(e){switch(e){case 110:return`
2
- `;case 114:return"\r";case 116:return" ";case 98:return"\b";case 102:return"\f";case 118:return"\v";default:return isNaN(e)?"":String.fromCharCode(e)}}me(){let e=this.h,n=this.e;if(this.z(e))this.e++;else throw this.i(Ue+this.H);for(;this.e<this.l.length&&(e=this.h,this.ue(e));)this.e++;return{type:2,name:this.l.slice(n,this.e)}}Fe(e){let n=[],o=!1,r=0;for(;this.e<this.l.length;){this.g();let s=this.h;if(s===e){if(o=!0,this.e++,e===Qe&&r&&r>=n.length)throw this.i(_o+String.fromCharCode(e));break}else if(s===qt){if(this.e++,r++,r!==n.length){if(e===Qe)throw this.i(_o+",");for(let a=n.length;a<r;a++)n.push(null)}}else{if(n.length!==r&&r!==0)throw this.i(Po);{let a=this.S();if(!a||a.type===0)throw this.i(Po);n.push(a)}}}if(!o)throw this.i(Xe+String.fromCharCode(e));return n}_t(){this.e++;let e=this.le(Qe);if(this.f(Qe))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(Os)}Ht(){return this.e++,{type:9,elements:this.Fe(Rn)}}$t(e){if(this.f(Do)){this.e++;let n=[];for(;!isNaN(this.h);){if(this.g(),this.f(Wt)){this.e++,e.node=this.W({type:10,properties:n});return}let o=this.S();if(!o)break;if(this.g(),o.type===2&&(this.f(qt)||this.f(Wt)))n.push({type:12,computed:!1,key:o,value:o,shorthand:!0});else if(this.f(Io)){this.e++;let r=this.S();if(!r)throw this.i(Ns);let s=o.type===9;n.push({type:12,computed:s,key:s?o.elements[0]:o,value:r,shorthand:!1}),this.g()}else n.push(o);this.f(qt)&&this.e++}throw this.i(As)}}Ft(e){let n=this.h;if((n===De||n===Gt)&&n===this.l.charCodeAt(this.e+1)){this.e+=2;let o=e.node={type:13,operator:n===De?"++":"--",argument:this.W(this.me()),prefix:!0};if(!o.argument||!Vo.has(o.argument.type))throw this.i(Ue+o.operator)}}Wt(e){let n=e.node,o=this.h;if((o===De||o===Gt)&&o===this.l.charCodeAt(this.e+1)){if(!Vo.has(n.type))throw this.i(Ue+(o===De?"++":"--"));this.e+=2,e.node={type:13,operator:o===De?"++":"--",argument:n,prefix:!1}}}qt(e){this.l.charCodeAt(this.e)===Ee&&this.l.charCodeAt(this.e+1)===Ee&&this.l.charCodeAt(this.e+2)===Ee&&(this.e+=3,e.node={type:14,argument:this.S()})}Qt(e){if(e.node&&this.f(wn)){this.e++;let n=e.node,o=this.S();if(!o)throw this.i(Bo);if(this.g(),this.f(Io)){this.e++;let r=this.S();if(!r)throw this.i(Bo);e.node={type:11,test:n,consequent:o,alternate:r}}else throw this.i(Ss)}}Jt(e){if(this.g(),this.f(zt)){let n=this.e;if(this.e++,this.g(),this.f(Qe)){this.e++;let o=this.pe();if(o==="=>"){let r=this.je();if(!r)throw this.i(Nn+o);e.node={type:15,params:null,body:r};return}}this.e=n}}Gt(e){let n=e.node,o=n.type;(o===2||o===3)&&this.f(Sn)&&(e.node={type:17,tag:n,quasi:this.$e(e)})}$e(e){if(!this.f(Sn))return;let n=this.l,o=n.length,r={type:19,quasis:[],expressions:[]},s=++this.e,a=[],i=[],c=!1,l=u=>{if(!c){let h=n.slice(s,this.e);return r.quasis.push({type:18,value:{raw:h,cooked:h},tail:u})}a.push(n.slice(s,this.e)),i.push(n.slice(s,this.e));let f=a.join(""),p=i.join("");return a.length=0,i.length=0,c=!1,r.quasis.push({type:18,value:{raw:f,cooked:p},tail:u})};for(;this.e<o;){let u=n.charCodeAt(this.e);if(u===Sn)return l(!0),this.e+=1,e.node=r,r;if(u===36&&n.charCodeAt(this.e+1)===Do){if(l(!1),this.e+=2,r.expressions.push(...this.le(Wt)),!this.f(Wt))throw this.i("unclosed ${");this.e+=1,s=this.e}else if(u===An){c||(c=!0),a.push(n.slice(s,this.e)),i.push(n.slice(s,this.e));let f=n.charCodeAt(this.e+1);a.push(n.slice(this.e,this.e+2)),i.push(this.qe(f)),this.e+=2,s=this.e}else this.e+=1}throw this.i("Unclosed `")}Kt(e){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 o=e.node;for(;o.type===3||o.type===6&&o.callee.type===3;)o=o.type===3?o.object:o.callee.object;o.type=20}zt(e){if(!this.f(Uo))return;let n=++this.e,o=!1;for(;this.e<this.l.length;){if(this.h===Uo&&!o){let r=this.l.slice(n,this.e),s="";for(;++this.e<this.l.length;){let i=this.h;if(i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57)s+=this.H;else break}let a;try{a=new RegExp(r,s)}catch(i){throw this.i(i.message)}return e.node={type:4,value:a,raw:this.l.slice(n-1,this.e)},e.node=this.W(e.node),e.node}this.f(Kt)?o=!0:o&&this.f(Rn)&&(o=!1),this.e+=this.f(An)?2:1}throw this.i("Unclosed Regex")}},qo=t=>new Mn(t).parse();var Vs={"=>":(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,"&":(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)=>t**e},Hs={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},Go=t=>{if(!t?.some(Wo))return t;let e=[];return t.forEach(n=>Wo(n)?e.push(...n):e.push(n)),e},zo=(...t)=>Go(t),Ln=(t,e)=>{if(!t)return e;let n=Object.create(e??{});return n.$event=t,n},Bs={"++":(t,e)=>{let n=t[e];if(T(n)){let o=n();return n(++o),o}return++t[e]},"--":(t,e)=>{let n=t[e];if(T(n)){let o=n();return n(--o),o}return--t[e]}},Ps={"++":(t,e)=>{let n=t[e];if(T(n)){let o=n();return n(o+1),o}return t[e]++},"--":(t,e)=>{let n=t[e];if(T(n)){let o=n();return n(o-1),o}return t[e]--}},Ko={"=":(t,e,n)=>{let o=t[e];return T(o)?o(n):t[e]=n},"+=":(t,e,n)=>{let o=t[e];return T(o)?o(o()+n):t[e]+=n},"-=":(t,e,n)=>{let o=t[e];return T(o)?o(o()-n):t[e]-=n},"*=":(t,e,n)=>{let o=t[e];return T(o)?o(o()*n):t[e]*=n},"/=":(t,e,n)=>{let o=t[e];return T(o)?o(o()/n):t[e]/=n},"%=":(t,e,n)=>{let o=t[e];return T(o)?o(o()%n):t[e]%=n},"**=":(t,e,n)=>{let o=t[e];return T(o)?o(o()**n):t[e]**=n},"<<=":(t,e,n)=>{let o=t[e];return T(o)?o(o()<<n):t[e]<<=n},">>=":(t,e,n)=>{let o=t[e];return T(o)?o(o()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let o=t[e];return T(o)?o(o()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let o=t[e];return T(o)?o(o()|n):t[e]|=n},"&=":(t,e,n)=>{let o=t[e];return T(o)?o(o()&n):t[e]&=n},"^=":(t,e,n)=>{let o=t[e];return T(o)?o(o()^n):t[e]^=n}},Jt=(t,e)=>q(t)?t.bind(e):t,In=class{p;ze;Ke;We;A;Ge;Je;constructor(e,n,o,r,s){this.p=E(e)?e:[e],this.ze=n,this.Ke=o,this.We=r,this.Je=!!s}Qe(e,n){if(n&&e in n)return n;for(let o of this.p)if(e in o)return o}2(e,n,o){let r=e.name;if(r==="$root")return this.p[this.p.length-1];if(r==="$parent")return this.p[1];if(r==="$ctx")return[...this.p];if(o&&r in o)return this.A=o[r],Jt(V(o[r]),o);for(let a of this.p)if(r in a)return this.A=a[r],Jt(V(a[r]),a);let s=this.ze;if(s&&r in s)return this.A=s[r],Jt(V(s[r]),s)}5(e,n,o){return this.p[0]}0(e,n,o){return this.Xe(n,o,zo,...e.body)}1(e,n,o){return this.E(n,o,(...r)=>r.pop(),...e.expressions)}3(e,n,o){let{obj:r,key:s}=this.de(e,n,o),a=r?.[s];return this.A=a,Jt(V(a),r)}4(e,n,o){return e.value}6(e,n,o){let r=(a,...i)=>q(a)?a(...Go(i)):a,s=this.E(++n,o,r,e.callee,...e.arguments);return this.A=s,s}7(e,n,o){return this.E(n,o,Hs[e.operator],e.argument)}8(e,n,o){let r=Vs[e.operator];switch(e.operator){case"||":case"&&":case"??":return r(()=>this.b(e.left,n,o),()=>this.b(e.right,n,o))}return this.E(n,o,r,e.left,e.right)}9(e,n,o){return this.Xe(++n,o,zo,...e.elements)}10(e,n,o){let r={},s=(...a)=>{a.forEach(i=>{Object.assign(r,i)})};return this.E(++n,o,s,...e.properties),r}11(e,n,o){return this.E(n,o,r=>this.b(r?e.consequent:e.alternate,n,o),e.test)}12(e,n,o){let r={},s=u=>u?.type!==15,a=this.We??(()=>!1),i=n===0&&this.Je,c=u=>this.Ye(i,e.key,n,Ln(u,o)),l=u=>this.Ye(i,e.value,n,Ln(u,o));if(e.shorthand){let u=e.key.name;r[u]=s(e.key)&&a(u,n)?c:c()}else if(e.computed){let u=V(c());r[u]=s(e.value)&&a(u,n)?l:l()}else{let u=e.key.type===4?e.key.value:e.key.name;r[u]=s(e.value)&&a(u,n)?()=>l:l()}return r}de(e,n,o){let r=this.b(e.object,n,o),s=e.computed?this.b(e.property,n,o):e.property.name;return{obj:r,key:s}}13(e,n,o){let r=e.argument,s=e.operator,a=e.prefix?Bs:Ps;if(r.type===2){let i=r.name,c=this.Qe(i,o);return le(c)?void 0:a[s](c,i)}if(r.type===3){let{obj:i,key:c}=this.de(r,n,o);return a[s](i,c)}}16(e,n,o){let r=e.left,s=e.operator;if(r.type===2){let a=r.name,i=this.Qe(a,o);if(le(i))return;let c=this.b(e.right,n,o);return Ko[s](i,a,c)}if(r.type===3){let{obj:a,key:i}=this.de(r,n,o),c=this.b(e.right,n,o);return Ko[s](a,i,c)}}14(e,n,o){let r=this.b(e.argument,n,o);return E(r)&&(r.s=Jo),r}17(e,n,o){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,o)}19(e,n,o){let r=(...s)=>s.reduce((a,i,c)=>a+=i+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.E(n,o,r,...e.expressions)}18(e,n,o){return e.value.cooked}20(e,n,o){let r=(s,...a)=>new s(...a);return this.E(n,o,r,e.callee,...e.arguments)}15(e,n,o){return(...r)=>{let s=Object.create(o??{}),a=e.params;if(a){let i=0;for(let c of a)s[c.name]=r[i++]}return this.b(e.body,n,s)}}b(e,n,o){let r=V(this[e.type](e,n,o));return this.Ge=e.type,r}Ye(e,n,o,r){let s=this.b(n,o,r);return e&&this.Ze()?this.A:s}Ze(){let e=this.Ge;return(e===2||e===3||e===6)&&T(this.A)}eval(e,n){let{value:o,refs:r}=wt(()=>this.b(e,-1,n)),s={value:o,refs:r};return this.Ze()&&(s.ref=this.A),s}E(e,n,o,...r){let s=r.map(a=>a&&this.b(a,e,n));return o(...s)}Xe(e,n,o,...r){let s=this.Ke;if(!s)return this.E(e,n,o,...r);let a=r.map((i,c)=>i&&(i.type!==15&&s(c,e)?l=>this.b(i,e,Ln(l,n)):this.b(i,e,n)));return o(...a)}},Jo=Symbol("s"),Wo=t=>t?.s===Jo,Qo=(t,e,n,o,r,s,a)=>new In(e,n,o,r,a).eval(t,s);var Xo={},Yo=t=>!!t,Qt=class{p;o;constructor(e,n){this.p=e,this.o=n}v(e){this.p=[e,...this.p]}Y(){return this.p.map(n=>n.components).filter(Yo).reverse().reduce((n,o)=>{for(let[r,s]of Object.entries(o))n[r.toUpperCase()]=s;return n},{})}ut(){let e=[],n=new Set,o=this.p.map(r=>r.components).filter(Yo).reverse();for(let r of o)for(let s of Object.keys(r))n.has(s)||(n.add(s),e.push(s));return e}L(e,n,o,r,s){let a=[],i=[],c=new Set,l=()=>{for(let C=0;C<i.length;++C)i[C]();i.length=0},p={value:()=>a,stop:()=>{l(),c.clear()},subscribe:(C,R)=>(c.add(C),R&&C(a),()=>{c.delete(C)}),refs:[],context:this.p[0]};if(P(e))return p;let h=this.o.globalContext,m=[],d=new Set,g=(C,R,j,K)=>{try{let D=Qo(C,R,h,n,o,K,r);return j&&D.refs.length>0&&m.push(...D.refs),{value:D.value,refs:D.refs,ref:D.ref}}catch(D){U(6,`evaluation error: ${e}`,D)}return{value:void 0,refs:[]}};try{let C=Xo[e]??qo("["+e+"]");Xo[e]=C;let R=this.p.slice(),j=C.elements,K=j.length,D=new Array(K);p.refs=D;let oe=()=>{m.length=0,s||(d.clear(),l());let X=new Array(K);for(let N=0;N<K;++N){let re=j[N];if(n?.(N,-1)){X[N]=S=>g(re,R,!1,{$event:S}).value;continue}let x=g(re,R,!0);X[N]=x.value,D[N]=x.ref}if(!s)for(let N of m)d.has(N)||(d.add(N),i.push(ne(N,oe)));if(a=X,c.size!==0)for(let N of c)c.has(N)&&N(a)};oe()}catch(C){U(6,`parse error: ${e}`,C)}return p}V(){return this.p.slice()}et=[];ie(e){this.et.push(this.p),this.p=e}R(e,n){try{this.ie(e),n()}finally{this.Xt()}}Xt(){this.p=this.et.pop()??[]}};var Zo=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},_s=(t,e)=>{let n="";for(let o=e;o<t.length;++o){let r=t[o];if(n){r===n&&(n="");continue}if(r==='"'||r==="'"){n=r;continue}if(r===">")return o}return-1},js=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
3
- `);)++n;if(n>=t.length||!Zo(t[n]))return null;let o=n;for(;n<t.length&&Zo(t[n]);)++n;return{start:o,end:n}},er=new Set(["table","thead","tbody","tfoot"]),$s=new Set(["thead","tbody","tfoot"]),Fs=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),qs=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),tr=(t,e)=>`${t.slice(0,t.length-2)}></${e}>`,Xt=t=>{let e=0,n=[],o=[],r=0;for(;e<t.length;){let s=t.indexOf("<",e);if(s===-1){n.push(t.slice(e));break}if(n.push(t.slice(e,s)),t.startsWith("<!--",s)){let g=t.indexOf("-->",s+4);if(g===-1){n.push(t.slice(s));break}n.push(t.slice(s,g+3)),e=g+3;continue}let a=_s(t,s);if(a===-1){n.push(t.slice(s));break}let i=t.slice(s,a+1),c=i.startsWith("</");if(i.startsWith("<!")||i.startsWith("<?")){n.push(i),e=a+1;continue}let u=js(i,c);if(!u){n.push(i),e=a+1;continue}let f=i.slice(u.start,u.end);if(c){let g=o[o.length-1];g?(o.pop(),n.push(g.replacementHost?`</${g.replacementHost}>`:i),er.has(g.effectiveTag)&&--r):n.push(i),e=a+1;continue}let p=i.charCodeAt(i.length-2)===47,h=o[o.length-1],m=null;r===0?f==="tr"?m="trx":f==="td"?m="tdx":f==="th"&&(m="thx"):$s.has(h?.effectiveTag??"")?m=f==="tr"?null:"tr":h?.effectiveTag==="table"?m=Fs.has(f)?null:"tr":h?.effectiveTag==="tr"&&(m=f==="td"||f==="th"?null:"td");let d=p&&!qs.has(m||f);if(m){let g=m==="trx"||m==="tdx"||m==="thx",C=`${i.slice(0,u.start)}${m} is="${g?`r-${f}`:`regor:${f}`}"${i.slice(u.end)}`;n.push(d?tr(C,m):C)}else n.push(d?tr(i,f):i);if(!p){let g=m==="trx"?"tr":m==="tdx"?"td":m==="thx"?"th":m||f;o.push({replacementHost:m,effectiveTag:g}),er.has(g)&&++r}e=a+1}return n.join("")};var zs="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",Ks=new Set(zs.toUpperCase().split(",")),Ws="http://www.w3.org/2000/svg",nr=(t,e)=>{fe(t)?t.content.appendChild(e):t.appendChild(e)},Dn=(t,e,n,o)=>{let r=t.t;if(r){let a=n&&Ks.has(r.toUpperCase())?document.createElementNS(Ws,r.toLowerCase()):document.createElement(r),i=t.a;if(i)for(let l of Object.entries(i)){let u=l[0],f=l[1];u.startsWith("#")&&(f=u.substring(1),u="name"),a.setAttribute(bt(u,o),f)}let c=t.c;if(c)for(let l of c)Dn(l,a,n,o);nr(e,a);return}let s=t.d;if(s){let a;switch(t.n??Node.TEXT_NODE){case Node.COMMENT_NODE:a=document.createComment(s);break;case Node.TEXT_NODE:a=document.createTextNode(s);break}if(a)nr(e,a);else throw new Error("unsupported node type.")}},Ve=(t,e,n)=>{n??=ce.getDefault();let o=document.createDocumentFragment();if(!E(t))return Dn(t,o,!!e,n),o;for(let r of t)Dn(r,o,!!e,n);return o};var or=(t,e={selector:"#app"},n)=>{z(e)&&(e={selector:"#app",template:e}),eo(t)&&(t=t.context);let o=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!o||!be(o))throw H(0);n||(n=ce.getDefault());let r=()=>{for(let i of[...o.childNodes])F(i)},s=i=>{for(let c of i)o.appendChild(c)};if(e.template){let i=document.createRange().createContextualFragment(Xt(e.template));r(),s(i.childNodes),e.element=i}else if(e.json){let i=Ve(e.json,e.isSVG,n);r(),s(i.childNodes)}return n.useInterpolation&&Ft(o,n),new Un(t,o,n).y(),_(o,()=>{we(t)}),Tt(t),{context:t,unmount:()=>{F(o)},unbind:()=>{me(o)}}},Un=class{Yt;tt;o;m;r;constructor(e,n,o){this.Yt=e,this.tt=n,this.o=o,this.m=new Qt([e],o),this.r=new Ht(this.m)}y(){this.r._(this.tt)}};var Ye=t=>{if(E(t))return t.map(r=>Ye(r));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(r=>[r,t.getAttribute(r)??""])));let o=Te(t);return o.length>0&&(e.c=[...o].map(r=>Ye(r))),e};var rr=(t,e={})=>{E(e)&&(e={props:e}),z(t)&&(t={template:t});let n=e.context??(()=>({})),o=!1;if(t.element){let s=t.element;s.remove(),t.element=s}else if(t.selector){let s=document.querySelector(t.selector);if(!s)throw H(1,t.selector);s.remove(),t.element=s}else if(t.template){let s=document.createRange().createContextualFragment(Xt(t.template));t.element=s}else t.json&&(t.element=Ve(t.json,t.isSVG,e.config),o=!0);t.element||(t.element=document.createDocumentFragment()),(e.useInterpolation??!0)&&Ft(t.element,e.config??ce.getDefault());let r=t.element;if(!o&&((t.isSVG??(nt(r)&&r.hasAttribute?.("isSVG")))||nt(r)&&r.querySelector("[isSVG]"))){let s=r.content,a=s?[...s.childNodes]:[...r.childNodes],i=Ye(a);t.element=Ve(i,!0,e.config)}return{context:n,template:t.element,inheritAttrs:e.inheritAttrs??!0,props:e.props,defaultName:e.defaultName}};var Yt=class{byConstructor=new Map;register(e){this.byConstructor.set(e.constructor,e)}unregisterByClass(e){this.byConstructor.delete(e)}unregister(e){let n=e.constructor;this.byConstructor.get(n)===e&&this.byConstructor.delete(n)}find(e){for(let n of this.byConstructor.values())if(n instanceof e)return n}require(e){let n=this.find(e);if(n)return n;throw new Error(`${e.name} is not registered in ContextRegistry.`)}};var sr=t=>{Me()?.onMounted.push(t)};var ir=t=>{let e,n={},o=(...r)=>{if(r.length<=2&&0 in r)throw H(4);return e&&!n.isStopped?e(...r):(e=Gs(t,n),e(...r))};return o[Q]=1,Ne(o,!0),o.stop=()=>n.ref?.stop?.(),te(()=>o.stop(),!0),o},Gs=(t,e)=>{let n=e.ref??se(null);e.ref=n,e.isStopped=!1;let o=0,r=Ie(()=>{if(o>0){r(),e.isStopped=!0,J(n);return}n(t()),++o});return n.stop=r,n};var ar=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw H(4);return o&&!n.isStopped?o(...s):(o=Js(t,e,n),o(...s))};return r[Q]=1,Ne(r,!0),r.stop=()=>n.ref?.stop?.(),te(()=>r.stop(),!0),r},Js=(t,e,n)=>{let o=n.ref??se(null);n.ref=o,n.isStopped=!1;let r=0,s=i=>{if(r>0){o.stop(),n.isStopped=!0,J(o);return}let c=t.map(l=>l());o(e(...c)),++r},a=[];for(let i of t){let c=ne(i,s);a.push(c)}return s(null),o.stop=()=>{a.forEach(i=>{i()})},o};var cr=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw H(4);return o&&!n.isStopped?o(...s):(o=Qs(t,e,n),o(...s))};return r[Q]=1,Ne(r,!0),r.stop=()=>n.ref?.stop?.(),te(()=>r.stop(),!0),r},Qs=(t,e,n)=>{let o=n.ref??se(null);n.ref=o,n.isStopped=!1;let r=0;return o.stop=ne(t,s=>{if(r>0){o.stop(),n.isStopped=!0,J(o);return}o(e(s)),++r},!0),o};var ur=t=>(t[Et]=1,t);var lr=(t,e)=>{if(!e)throw H(5);let o=Le(t)?ye:i=>i,r=()=>localStorage.setItem(e,JSON.stringify(ie(t()))),s=localStorage.getItem(e);if(s!=null)try{t(o(JSON.parse(s)))}catch(i){U(6,`persist: failed to parse data for key ${e}`,i),r()}else r();let a=Ie(r);return te(a,!0),t};var Vn=(t,...e)=>{let n="",o=t,r=e,s=o.length,a=r.length;for(let i=0;i<s;++i)n+=o[i],i<a&&(n+=r[i]);return n},fr=Vn;var pr=(t,e,n)=>{let o=[],r=()=>{e(t.map(a=>a()))};for(let a of t)o.push(ne(a,r));n&&r();let s=()=>{for(let a of o)a()};return te(s,!0),s};var mr=t=>{if(!T(t))throw H(3,"observerCount");return t(void 0,void 0,2)};var dr=t=>{Hn();try{t()}finally{Bn()}},Hn=()=>{he.stack||(he.stack=[]),he.stack.push(new Set)},Bn=()=>{let t=he.stack;if(!t||t.length===0)return;let e=t.pop();if(t.length){let n=t[t.length-1];for(let o of e)n.add(o);return}delete he.stack;for(let n of e)try{J(n)}catch(o){console.error(o)}};return Tr(Xs);})();
1
+ "use strict";var Regor=(()=>{var nn=Object.defineProperty;var gr=Object.getOwnPropertyDescriptor;var br=Object.getOwnPropertyNames;var Tr=Object.prototype.hasOwnProperty;var xr=(t,e)=>{for(var n in e)nn(t,n,{get:e[n],enumerable:!0})},Cr=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of br(e))!Tr.call(t,r)&&r!==n&&nn(t,r,{get:()=>e[r],enumerable:!(o=gr(e,r))||o.enumerable});return t};var vr=t=>Cr(nn({},"__esModule",{value:!0}),t);var fi={};xr(fi,{ComponentHead:()=>$e,ContextRegistry:()=>Zt,RegorConfig:()=>ce,addUnbinder:()=>j,batch:()=>yr,collectRefs:()=>St,computeMany:()=>ur,computeRef:()=>lr,computed:()=>cr,createApp:()=>rr,defineComponent:()=>sr,drainUnbind:()=>_n,endBatch:()=>Bn,entangle:()=>We,flatten:()=>ie,getBindData:()=>Se,html:()=>Un,isDeepRef:()=>Ie,isRaw:()=>Ge,isRef:()=>x,markRaw:()=>fr,observe:()=>ne,observeMany:()=>dr,observerCount:()=>hr,onMounted:()=>ar,onUnmounted:()=>te,pause:()=>_t,persist:()=>pr,pval:()=>ir,raw:()=>mr,ref:()=>ye,removeNode:()=>F,resume:()=>$t,silence:()=>wt,sref:()=>se,startBatch:()=>Hn,toFragment:()=>Ue,toJsonTemplate:()=>Ze,trigger:()=>J,unbind:()=>me,unref:()=>P,useScope:()=>vt,warningHandler:()=>tt,watchEffect:()=>Ve});var je=Symbol(":regor");var me=t=>{let e=[t];for(let n=0;n<e.length;++n){let o=e[n];Er(o);for(let r=o.lastChild;r!=null;r=r.previousSibling)e.push(r)}},Er=t=>{let e=t[je];if(!e)return;let n=e.unbinders;for(let o=0;o<n.length;++o)n[o]();n.length=0,t[je]=void 0};var _e=[],ut=!1,lt,jn=()=>{if(ut=!1,lt=void 0,_e.length!==0){for(let t=0;t<_e.length;++t)me(_e[t]);_e.length=0}},F=t=>{t.remove(),_e.push(t),ut||(ut=!0,lt=setTimeout(jn,1))},_n=async()=>{_e.length===0&&!ut||(lt&&clearTimeout(lt),jn())};var q=t=>typeof t=="function",z=t=>typeof t=="string",$n=t=>typeof t>"u",le=t=>t==null||typeof t>"u",B=t=>typeof t!="string"||!t?.trim(),Rr=Object.prototype.toString,on=t=>Rr.call(t),Re=t=>on(t)==="[object Map]",ae=t=>on(t)==="[object Set]",rn=t=>on(t)==="[object Date]",et=t=>typeof t=="symbol",v=Array.isArray,M=t=>t!==null&&typeof t=="object";var Fn={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=Fn[t];return new Error(q(n)?n.call(Fn,...e):n)};var ft=[],qn=()=>{let t={onMounted:[],onUnmounted:[]};return ft.push(t),t},ke=t=>{let e=ft[ft.length-1];if(!e&&!t)throw U(2);return e},zn=t=>{let e=ke();return t&&an(t),ft.pop(),e},sn=Symbol("csp"),an=t=>{let e=t,n=e[sn];if(n){let o=ke();if(n===o)return;o.onMounted.length>0&&n.onMounted.push(...o.onMounted),o.onUnmounted.length>0&&n.onUnmounted.push(...o.onUnmounted);return}e[sn]=ke()},pt=t=>t[sn];var we=t=>{pt(t)?.onUnmounted?.forEach(n=>{n()}),t.unmounted?.()};var $e=class{props;start;end;ctx;autoProps=!0;entangle=!0;enableSwitch=!1;onAutoPropsAssigned;ye;constructor(e,n,o,r,s){this.props=e,this.ye=n,this.ctx=o,this.start=r,this.end=s}emit=(e,n)=>{this.ye.dispatchEvent(new CustomEvent(e,{detail:n}))};findContext(e,n=0){if(n<0)return;let o=0;for(let r of this.ctx??[])if(r instanceof e){if(o===n)return r;++o}}requireContext(e,n=0){let o=this.findContext(e,n);if(o!==void 0)return o;throw new Error(`${e} was not found in the context stack at occurrence ${n}.`)}validateProps(e){let n=this.props;for(let o in e){let r=e[o];if(!r)continue;r(n[o],o,this)}}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)F(e),e=e.nextSibling;for(let o of this.ctx)we(o)}};var Se=t=>{let e=t,n=e[je];if(n)return n;let o={unbinders:[],data:{}};return e[je]=o,o};var j=(t,e)=>{Se(t).unbinders.push(e)};var Kn={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,o)=>({msg:`Failed setting prop "${t}" on <${e.toLowerCase()}>: value ${n} is invalid.`,args:[o]}),5:(t,e)=>`${t} binding missing event type at ${e.outerHTML}`,6:(t,e)=>({msg:t,args:[e]})},D=(t,...e)=>{let n=Kn[t],o=q(n)?n.call(Kn,...e):n,r=tt.warning;r&&(z(o)?r(o):r(o,...o.args))},tt={warning:console.warn};var dt={},mt={},Wn=1,Gn=t=>{let e=(Wn++).toString();return dt[e]=t,mt[e]=0,e},cn=t=>{mt[t]+=1},un=t=>{--mt[t]===0&&(delete dt[t],delete mt[t])},Jn=t=>dt[t],ln=()=>Wn!==1&&Object.keys(dt).length>0,nt="r-switch",wr=t=>{let e=t.filter(o=>be(o)).map(o=>[...o.querySelectorAll("[r-switch]")].map(r=>r.getAttribute(nt))),n=new Set;return e.forEach(o=>{o.forEach(r=>r&&n.add(r))}),[...n]},Fe=(t,e)=>{if(!ln())return;let n=wr(e);n.length!==0&&(n.forEach(cn),j(t,()=>{n.forEach(un)}))};var ht=()=>{},fn=(t,e,n,o)=>{let r=[];for(let s of t){let a=s.cloneNode(!0);n.insertBefore(a,o),r.push(a)}Ae(e,r)},pn=Symbol("r-if"),Qn=Symbol("r-else"),Xn=t=>t[Qn]===1,yt=class{r;N;he;G;J;x;R;constructor(e){this.r=e,this.N=e.o.u.if,this.he=bt(e.o.u.if),this.G=e.o.u.else,this.J=e.o.u.elseif,this.x=e.o.u.for,this.R=e.o.u.pre}nt(e,n){let o=e.parentElement;for(;o!==null&&o!==document.documentElement;){if(o.hasAttribute(n))return!0;o=o.parentElement}return!1}k(e){let n=e.hasAttribute(this.N);return n&&this.y(e),this.r.O.j(e,o=>{o.hasAttribute(this.N)&&this.y(o)}),n}Q(e){return e[pn]?!0:(e[pn]=!0,gt(e,this.he).forEach(n=>n[pn]=!0),!1)}y(e){if(e.hasAttribute(this.R)||this.Q(e)||this.nt(e,this.x))return;let n=e.getAttribute(this.N);if(!n){D(0,this.N,e);return}e.removeAttribute(this.N),this.M(e,n)}U(e,n,o){let r=qe(e),s=e.parentNode,a=document.createComment(`__begin__ :${n}${o??""}`);s.insertBefore(a,e),Fe(a,r),r.forEach(c=>{F(c)}),e.remove(),n!=="if"&&(e[Qn]=1);let i=document.createComment(`__end__ :${n}${o??""}`);return s.insertBefore(i,a.nextSibling),{nodes:r,parent:s,commentBegin:a,commentEnd:i}}ge(e,n){if(!e)return[];let o=e.nextElementSibling;if(e.hasAttribute(this.G)){e.removeAttribute(this.G);let{nodes:r,parent:s,commentBegin:a,commentEnd:i}=this.U(e,"else");return[{mount:()=>{fn(r,this.r,s,i)},unmount:()=>{Te(a,i)},isTrue:()=>!0,isMounted:!1}]}else{let r=e.getAttribute(this.J);if(!r)return[];e.removeAttribute(this.J);let{nodes:s,parent:a,commentBegin:i,commentEnd:c}=this.U(e,"elseif",` => ${r} `),l=this.r.m.V(r),u=l.value,f=this.ge(o,n),p=ht;return j(i,()=>{l.stop(),p(),p=ht}),p=l.subscribe(n),[{mount:()=>{fn(s,this.r,a,c)},unmount:()=>{Te(i,c)},isTrue:()=>!!u()[0],isMounted:!1},...f]}}M(e,n){let o=e.nextElementSibling,{nodes:r,parent:s,commentBegin:a,commentEnd:i}=this.U(e,"if",` => ${n} `),c=this.r.m.V(n),l=c.value,u=!1,f=this.r.m,p=f.L(),h=()=>{f.C(p,()=>{if(l()[0])u||(fn(r,this.r,s,i),u=!0),m.forEach(C=>{C.unmount(),C.isMounted=!1});else{Te(a,i),u=!1;let C=!1;for(let R of m)!C&&R.isTrue()?(R.isMounted||(R.mount(),R.isMounted=!0),C=!0):(R.unmount(),R.isMounted=!1)}})},m=this.ge(o,h),d=ht;j(a,()=>{c.stop(),d(),d=ht}),h(),d=c.subscribe(h)}};var qe=t=>{let e=fe(t)?t.content.childNodes:[t],n=[];for(let o=0;o<e.length;++o){let r=e[o];if(r.nodeType===1){let s=r?.tagName;if(s==="SCRIPT"||s==="STYLE")continue}n.push(r)}return n},Ae=(t,e)=>{for(let n=0;n<e.length;++n){let o=e[n];o.nodeType===Node.ELEMENT_NODE&&(Xn(o)||t._(o))}},gt=(t,e)=>{let n=t.querySelectorAll(e);return t.matches?.(e)?[t,...n]:n},fe=t=>t instanceof HTMLTemplateElement,be=t=>t.nodeType===Node.ELEMENT_NODE,ot=t=>t.nodeType===Node.ELEMENT_NODE,Yn=t=>t instanceof HTMLSlotElement,xe=t=>fe(t)?t.content.childNodes:t.childNodes,Te=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let o=n.nextSibling;F(n),n=o}},Zn=function(){return this()},Sr=function(t){return this(t)},Ar=()=>{throw new Error("value is readonly.")},Nr={get:Zn,set:Sr,enumerable:!0,configurable:!1},Or={get:Zn,set:Ar,enumerable:!0,configurable:!1},Ne=(t,e)=>{Object.defineProperty(t,"value",e?Or:Nr)},eo=(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},bt=t=>`[${CSS.escape(t)}]`,Tt=(t,e)=>(t.startsWith("@")&&(t=e.u.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.u.dynamic)),t),mn=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},Mr=/-(\w)/g,H=mn(t=>t&&t.replace(Mr,(e,n)=>n?n.toUpperCase():"")),kr=/\B([A-Z])/g,ze=mn(t=>t&&t.replace(kr,"-$1").toLowerCase()),rt=mn(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var xt={mount:()=>{}};var Ke=t=>{let e=t.trim();return e?e.split(/\s+/):[]};var Ct=t=>{pt(t)?.onMounted?.forEach(n=>{n()}),t.mounted?.()};var dn=Symbol("scope"),vt=t=>{try{qn();let e=t();an(e);let n={context:e,unmount:()=>we(e),[dn]:1};return n[dn]=1,n}finally{zn()}},to=t=>M(t)?dn in t:!1;var Et=Symbol("ref"),Q=Symbol("sref"),Rt=Symbol("raw");var x=t=>t!=null&&t[Q]===1;var hn={collectRefObj:!0,mount:({parseResult:t})=>({update:({values:e})=>{let n=t.context,o=e[0];if(M(o))for(let r of Object.entries(o)){let s=r[0],a=r[1],i=n[s];i!==a&&(x(i)?i(a):n[s]=a)}}})};var te=(t,e)=>{ke(e)?.onUnmounted.push(t)};var ne=(t,e,n,o=!0)=>{if(!x(t))throw U(3,"observe");n&&e(t());let s=t(void 0,void 0,0,e);return o&&te(s,!0),s};var We=(t,e)=>{if(t===e)return()=>{};let n=ne(t,r=>e(r)),o=ne(e,r=>t(r));return e(t()),()=>{n(),o()}};var Ge=t=>!!t&&t[Rt]===1;var Ie=t=>t?.[Et]===1;var pe=[],no=t=>{pe.length!==0&&pe[pe.length-1]?.add(t)},Ve=t=>{if(!t)return()=>{};let e={stop:()=>{}};return Lr(t,e),te(()=>e.stop(),!0),e.stop},Lr=(t,e)=>{if(!t)return;let n=[],o=!1,r=()=>{for(let s of n)s();n=[],o=!0};e.stop=r;try{let s=new Set;if(pe.push(s),t(a=>n.push(a)),o)return;for(let a of[...s]){let i=ne(a,()=>{r(),Ve(t)});n.push(i)}}finally{pe.pop()}},wt=t=>{let e=pe.length,n=e>0&&pe[e-1];try{return n&&pe.push(null),t()}finally{n&&pe.pop()}},St=t=>{try{let e=new Set;return pe.push(e),{value:t(),refs:[...e]}}finally{pe.pop()}};var J=(t,e,n)=>{if(!x(t))return;let o=t;if(o(void 0,e,1),!n)return;let r=o();if(r){if(v(r)||ae(r))for(let s of r)J(s,e,!0);else if(Re(r))for(let s of r)J(s[0],e,!0),J(s[1],e,!0);if(M(r))for(let s in r)J(r[s],e,!0)}};function Ir(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Je=(t,e,n)=>{n.forEach(function(o){let r=t[o];Ir(e,o,function(...a){let i=r.apply(this,a),c=this[Q];for(let l of c)J(l);return i})})},At=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var oo=Array.prototype,yn=Object.create(oo),Vr=["push","pop","shift","unshift","splice","sort","reverse"];Je(oo,yn,Vr);var ro=Map.prototype,Nt=Object.create(ro),Dr=["set","clear","delete"];At(Nt,"Map");Je(ro,Nt,Dr);var so=Set.prototype,Ot=Object.create(so),Pr=["add","clear","delete"];At(Ot,"Set");Je(so,Ot,Pr);var he={},se=t=>{if(x(t)||Ge(t))return t;let e={auto:!0,_value:t},n=c=>M(c)?Q in c?!0:v(c)?(Object.setPrototypeOf(c,yn),!0):ae(c)?(Object.setPrototypeOf(c,Ot),!0):Re(c)?(Object.setPrototypeOf(c,Nt),!0):!1:!1,o=n(t),r=new Set,s=(c,l)=>{if(he.stack&&he.stack.length){he.stack[he.stack.length-1].add(i);return}r.size!==0&&wt(()=>{for(let u of[...r.keys()])r.has(u)&&u(c,l)})},a=c=>{let l=c[Q];l||(c[Q]=l=new Set),l.add(i)},i=(...c)=>{if(!(2 in c)){let u=c[0],f=c[1];return 0 in c?e._value===u||x(u)&&(u=u(),e._value===u)?u:(n(u)&&a(u),e._value=u,e.auto&&s(u,f),e._value):(no(i),e._value)}switch(c[2]){case 0:{let u=c[3];if(!u)return()=>{};let f=p=>{r.delete(p)};return r.add(u),()=>{f(u)}}case 1:{let u=c[1],f=e._value;s(f,u);break}case 2:return r.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return i[Q]=1,Ne(i,!1),o&&a(t),i};var ye=t=>{if(Ge(t))return t;let e;if(x(t)?(e=t,t=e()):e=se(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[Et]=1,v(t)){let n=t.length;for(let o=0;o<n;++o){let r=t[o];Ie(r)||(t[o]=ye(r))}return e}if(!M(t))return e;for(let n of Object.entries(t)){let o=n[1];if(Ie(o))continue;let r=n[0];et(r)||(t[r]=null,t[r]=ye(o))}return e};var io=Symbol("modelBridge"),Mt=()=>{},Ur=t=>!!t?.[io],Hr=t=>{t[io]=1},Br=t=>{let e=ye(t());return Hr(e),e},ao={collectRefObj:!0,mount:({parseResult:t,option:e})=>{if(typeof e!="string"||!e)return Mt;let n=H(e),o,r,s=Mt,a=()=>{s(),s=Mt,o=void 0,r=void 0},i=()=>{s(),s=Mt},c=(u,f)=>{o!==u&&(i(),s=We(u,f),o=u)},l=()=>{let u=t.refs[0]??t.value()[0],f=t.context,p=f[n];if(!x(u)){if(r&&p===r){r(u);return}if(a(),x(p)){p(u);return}f[n]=u;return}if(Ur(u)){if(p===u)return;x(p)?c(u,p):f[n]=u;return}r||(r=Br(u)),f[n]=r,c(u,r)};return{update:()=>{l()},unmount:()=>{s()}}}};var kt=class{r;be;xe="";Te=-1;constructor(e){this.r=e,this.be=e.o.u.inherit}k(e){this.ot(e)}rt(e){if(this.Te!==e.size){let n=[...e.keys()];this.xe=[...n,...n.map(ze)].join(","),this.Te=e.size}return this.xe}st(e){for(let n=0;n<e.length;++n){let o=e[n]?.components;if(o)for(let r in o)return!0}return!1}it(e){if(!fe(e))return!1;let n=e.getAttributeNames();return e.hasAttribute("name")?!0:n.some(o=>o.startsWith("#"))}at(e){return fe(e)&&e.getAttributeNames().length===0}ot(e){let n=this.r,o=n.m,r=n.o.X,s=n.o.$;if(r.size===0&&!this.st(o.l))return;let a=o.Y(),i=this.Re();if(B(i))return;let c=this.ct(e,i);for(let l of c){if(l.hasAttribute(n.R))continue;let u=l.parentNode;if(!u)continue;let f=l.nextSibling,p=H(l.tagName).toUpperCase(),m=a[p]??s.get(p);if(!m)continue;let d=m.template;if(!d)continue;let g=l.parentElement;if(!g)continue;let C=new Comment(" begin component: "+l.tagName),R=new Comment(" end component: "+l.tagName);g.insertBefore(C,l),l.remove();let _=n.o.u.context,K=n.o.u.contextAlias,V=n.o.u.bind,oe=(y,A)=>{let E={},$=y.hasAttribute(_);return o.C(A,()=>{o.v(E),$?n.y(hn,y,_):y.hasAttribute(K)&&n.y(hn,y,K);let b=m.props;if(!b||b.length===0)return;b=b.map(H);let w=new Map(b.map(G=>[G.toLowerCase(),G]));for(let G of[...b,...b.map(ze)]){let ue=y.getAttribute(G);ue!==null&&(E[H(G)]=ue,y.removeAttribute(G))}let k=n.F.Ce(y,!1);for(let[G,ue]of k.entries()){let[ge,I]=ue.Z;if(!I)continue;let ee=w.get(H(I).toLowerCase());ee&&(ge!=="."&&ge!==":"&&ge!==V||n.y(ao,y,G,!0,ee,ue.ee))}}),E},X=[...o.L()],N=()=>{let y=oe(l,X),A=new $e(y,l,X,C,R),E=vt(()=>m.context(A)??{}).context;if(A.autoProps){for(let[$,b]of Object.entries(y))if($ in E){let w=E[$];if(w===b)continue;if(x(w)){x(b)?A.entangle?j(C,We(b,w)):w(b()):w(b);continue}}else E[$]=b;A.onAutoPropsAssigned?.()}return{componentCtx:E,head:A}},{componentCtx:re,head:T}=N(),S=[...xe(d)],Y=S.length,He=l.childNodes.length===0,Be=y=>{let A=y.parentElement,E=y.name;if(B(E)&&(E=y.getAttributeNames().filter(w=>w.startsWith("#"))[0],B(E)?E="default":E=E.substring(1)),He){if(E==="default"){let w=n.o.u.text,k=l.getAttribute(w);if(!B(k)){let G=document.createElement("span");G.setAttribute(w,k),A.insertBefore(G,y),l.removeAttribute(w);return}}for(let w of[...y.childNodes])A.insertBefore(w,y);return}let $=l.querySelector(`template[name='${E}'], template[\\#${E}]`);!$&&E==="default"&&($=[...l.querySelectorAll("template:not([name])")].find(k=>this.at(k))??null);let b=w=>{T.enableSwitch&&o.C(X,()=>{o.v(re);let k=oe(y,o.L());o.C(X,()=>{o.v(k);let G=o.L(),ue=Gn(G);for(let ge of w)be(ge)&&(ge.setAttribute(nt,ue),cn(ue),j(ge,()=>{un(ue)}))})})};if($){let w=[...xe($)];for(let k of w)A.insertBefore(k,y);b(w)}else{if(E!=="default"){for(let k of[...xe(y)])A.insertBefore(k,y);return}let w=[...xe(l)].filter(k=>!this.it(k));for(let k of w)A.insertBefore(k,y);b(w)}},en=y=>{if(!be(y))return;let A=y.querySelectorAll("slot");if(Yn(y)){Be(y),y.remove();return}for(let E of A)Be(E),E.remove()};(()=>{for(let y=0;y<Y;++y)S[y]=S[y].cloneNode(!0),u.insertBefore(S[y],f),en(S[y])})(),g.insertBefore(R,f);let O=()=>{if(!m.inheritAttrs)return;let y=S.filter(E=>E.nodeType===Node.ELEMENT_NODE);y.length>1&&(y=y.filter(E=>E.hasAttribute(this.be)));let A=y[0];if(A)for(let E of l.getAttributeNames()){if(E===_||E===K)continue;let $=l.getAttribute(E);if(E==="class"){let b=Ke($);b.length>0&&A.classList.add(...b)}else if(E==="style"){let b=A.style,w=l.style;for(let k of w)b.setProperty(k,w.getPropertyValue(k))}else A.setAttribute(Tt(E,n.o),$)}},W=()=>{for(let y of l.getAttributeNames())!y.startsWith("@")&&!y.startsWith(n.o.u.on)&&l.removeAttribute(y)},Z=()=>{O(),W(),o.v(re),n.Ee(l,!1),re.$emit=T.emit,Ae(n,S),j(l,()=>{we(re)}),j(C,()=>{me(l)}),Ct(re)};o.C(X,Z)}}Re(){let e=this.r,n=e.m,o=e.o.X,r=n.ut(),s=this.rt(o);return[...s?[s]:[],...r,...r.map(ze)].join(",")}ct(e,n){let o=[];if(B(n))return o;if(e.matches?.(n))return[e];let r=this.q(e).reverse();for(;r.length>0;){let s=r.pop();if(s.matches(n)){o.push(s);continue}r.push(...this.q(s).reverse())}return o}j(e,n){let o=this.Re(),r=this.q(e).reverse();for(;r.length>0;){let s=r.pop();n(s),!(!B(o)&&s.matches(o))&&r.push(...this.q(s).reverse())}}q(e){let n=e?.children;if(n?.length!=null){let r=[];for(let s=0;s<n.length;++s){let a=n[s];be(a)&&r.push(a)}return r}let o=e?.childNodes;if(o?.length!=null){let r=[];for(let s=0;s<o.length;++s){let a=o[s];be(a)&&r.push(a)}return r}return[]}};var gn=class{Z;ee;ve=[];constructor(e,n){this.Z=e,this.ee=n}},Lt=class{r;we;Se;te;constructor(e){this.r=e,this.we=e.o.pt(),this.te=new Map;let n=new Map;for(let o of this.we){let r=o[0]??"",s=n.get(r);s?s.push(o):n.set(r,[o])}this.Se=n}Ae(e){let n=this.te.get(e);if(n)return n;let o=e,r=o.startsWith(".");r&&(o=":"+o.slice(1));let s=o.indexOf("."),i=(s<0?o:o.substring(0,s)).split(/[:@]/);B(i[0])&&(i[0]=r?".":o[0]);let c=s>=0?o.slice(s+1).split("."):[],l=!1,u=!1;for(let p=0;p<c.length;++p){let h=c[p];if(!l&&h==="camel"?l=!0:!u&&h==="prop"&&(u=!0),l&&u)break}l&&(i[i.length-1]=H(i[i.length-1])),u&&(i[0]=".");let f={terms:i,flags:c};return this.te.set(e,f),f}Ce(e,n){let o=new Map;if(!ot(e))return o;let r=this.Se,s=(i,c)=>{let l=r.get(c[0]??"");if(l)for(let u=0;u<l.length;++u){if(!c.startsWith(l[u]))continue;let f=o.get(c);if(!f){let p=this.Ae(c);f=new gn(p.terms,p.flags),o.set(c,f)}f.ve.push(i);return}},a=i=>{let c=i.attributes;if(!(!c||c.length===0))for(let l=0;l<c.length;++l){let u=c.item(l)?.name;u&&s(i,u)}};return a(e),!n||!e.firstElementChild||this.r.O.j(e,a),o}};var co=()=>{},jr=(t,e)=>{for(let n of t){let o=n.cloneNode(!0);e.appendChild(o)}},It=class{r;I;constructor(e){this.r=e,this.I=e.o.u.is}k(e){let n=e.hasAttribute(this.I);return(n||e.hasAttribute("is"))&&this.y(e),this.r.O.j(e,o=>{(o.hasAttribute(this.I)||o.hasAttribute("is"))&&this.y(o)}),n}y(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 o=n.slice(2).trim().toLowerCase();if(!o)return;let r=e.parentNode;if(!r)return;let s=document.createElement(o);for(let a of e.getAttributeNames())a!=="is"&&s.setAttribute(a,e.getAttribute(a));for(;e.firstChild;)s.appendChild(e.firstChild);r.insertBefore(s,e),e.remove(),this.r._(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.M(e,n)}U(e,n){let o=qe(e),r=e.parentNode,s=document.createComment(`__begin__ dynamic ${n??""}`);r.insertBefore(s,e),Fe(s,o),o.forEach(i=>{F(i)}),e.remove();let a=document.createComment(`__end__ dynamic ${n??""}`);return r.insertBefore(a,s.nextSibling),{nodes:o,parent:r,commentBegin:s,commentEnd:a}}M(e,n){let{nodes:o,parent:r,commentBegin:s,commentEnd:a}=this.U(e,` => ${n} `),i=this.r.m.V(n),c=i.value,l=this.r.m,u=l.L(),f={name:""},p=fe(e)?o:[...o[0].childNodes],h=()=>{l.C(u,()=>{let g=c()[0];if(M(g)&&(g.name?g=g.name:g=Object.entries(l.Y()).filter(R=>R[1]===g)[0]?.[0]),!z(g)||B(g)){Te(s,a);return}if(f.name===g)return;Te(s,a);let C=document.createElement(g);for(let R of e.getAttributeNames())R!==this.I&&C.setAttribute(R,e.getAttribute(R));jr(p,C),r.insertBefore(C,a),this.r._(C),f.name=g})},m=co;j(s,()=>{i.stop(),m(),m=co}),h(),m=i.subscribe(h)}};var P=t=>{let e=t;return e!=null&&e[Q]===1?e():e};var _r=(t,e)=>{let[n,o]=e;q(o)?o(t,n):t.innerHTML=n?.toString()},Vt={mount:()=>({update:({el:t,values:e})=>{_r(t,e)}})};var Dt=class t{ne;constructor(e){this.ne=e}static lt(e,n){let o=e.m,r=e.o,s=r.u,a=new Set([s.for,s.if,s.else,s.elseif,s.pre]),i=r.B,c=o.Y();if(Object.keys(c).length>0||r.$.size>0)return;let l=e.F,u=[],f=0,p=[];for(let h=n.length-1;h>=0;--h)p.push(n[h]);for(;p.length>0;){let h=p.pop();if(h.nodeType===Node.ELEMENT_NODE){let d=h;if(d.tagName==="TEMPLATE"||d.tagName.includes("-"))return;let g=H(d.tagName).toUpperCase();if(r.$.has(g)||c[g])return;let C=d.attributes;for(let R=0;R<C.length;++R){let _=C.item(R)?.name;if(!_)continue;if(a.has(_))return;let{terms:K,flags:V}=l.Ae(_),[oe,X]=K,N=i[_]??i[oe];if(N){if(N===Vt)return;u.push({nodeIndex:f,attrName:_,directive:N,option:X,flags:V})}}++f}let m=h.childNodes;for(let d=m.length-1;d>=0;--d)p.push(m[d])}if(u.length!==0)return new t(u)}y(e,n){let o=[],r=[];for(let s=n.length-1;s>=0;--s)r.push(n[s]);for(;r.length>0;){let s=r.pop();s.nodeType===Node.ELEMENT_NODE&&o.push(s);let a=s.childNodes;for(let i=a.length-1;i>=0;--i)r.push(a[i])}for(let s=0;s<this.ne.length;++s){let a=this.ne[s],i=o[a.nodeIndex];i&&e.y(a.directive,i,a.attrName,!1,a.option,a.flags)}}};var $r=(t,e)=>{let n=e.parentNode;if(n)for(let o=0;o<t.items.length;++o)n.insertBefore(t.items[o],e)},Fr=t=>{let e=t.length,n=t.slice(),o=[],r,s,a;for(let i=0;i<e;++i){let c=t[i];if(c===0)continue;let l=o[o.length-1];if(l===void 0||t[l]<c){n[i]=l??-1,o.push(i);continue}for(r=0,s=o.length-1;r<s;)a=r+s>>1,t[o[a]]<c?r=a+1:s=a;c<t[o[r]]&&(r>0&&(n[i]=o[r-1]),o[r]=i)}for(r=o.length,s=o[r-1]??-1;r-- >0;)o[r]=s,s=n[s];return o},Pt=class{static ft(e){let{oldItems:n,newValues:o,getKey:r,isSameValue:s,mountNewValue:a,removeMountItem:i,endAnchor:c}=e,l=n.length,u=o.length,f=new Array(u),p=new Set;for(let T=0;T<u;++T){let S=r(o[T]);if(S===void 0||p.has(S))return;p.add(S),f[T]=S}let h=new Array(u),m=0,d=l-1,g=u-1;for(;m<=d&&m<=g;){let T=n[m];if(r(T.value)!==f[m]||!s(T.value,o[m]))break;T.value=o[m],h[m]=T,++m}for(;m<=d&&m<=g;){let T=n[d];if(r(T.value)!==f[g]||!s(T.value,o[g]))break;T.value=o[g],h[g]=T,--d,--g}if(m>d){for(let T=g;T>=m;--T){let S=T+1<u?h[T+1].items[0]:c;h[T]=a(T,o[T],S)}return h}if(m>g){for(let T=m;T<=d;++T)i(n[T]);return h}let C=m,R=m,_=g-R+1,K=new Array(_).fill(0),V=new Map;for(let T=R;T<=g;++T)V.set(f[T],T);let oe=!1,X=0;for(let T=C;T<=d;++T){let S=n[T],Y=V.get(r(S.value));if(Y===void 0){i(S);continue}if(!s(S.value,o[Y])){i(S);continue}S.value=o[Y],h[Y]=S,K[Y-R]=T+1,Y>=X?X=Y:oe=!0}let N=oe?Fr(K):[],re=N.length-1;for(let T=_-1;T>=0;--T){let S=R+T,Y=S+1<u?h[S+1].items[0]:c;if(K[T]===0){h[S]=a(S,o[S],Y);continue}let He=h[S];oe&&(re>=0&&N[re]===T?--re:He&&$r(He,Y))}return h}};var st=class{T=[];P=new Map;get w(){return this.T.length}oe;constructor(e){this.oe=e}re(e){let n=this.oe(e.value);n!==void 0&&this.P.set(n,e)}se(e){let n=this.oe(this.T[e]?.value);n!==void 0&&this.P.delete(n)}static mt(e,n){return{items:[],index:e,value:n,order:-1}}v(e){e.order=this.w,this.T.push(e),this.re(e)}dt(e,n){let o=this.w;for(let r=e;r<o;++r)this.T[r].order=r+1;n.order=e,this.T.splice(e,0,n),this.re(n)}D(e){return this.T[e]}ie(e,n){this.se(e),this.T[e]=n,this.re(n),n.order=e}ke(e){this.se(e),this.T.splice(e,1);let n=this.w;for(let o=e;o<n;++o)this.T[o].order=o}Ne(e){let n=this.w;for(let o=e;o<n;++o)this.se(o);this.T.splice(e)}Zt(e){return this.P.has(e)}yt(e){return this.P.get(e)?.order??-1}};var bn=Symbol("r-for"),qr=t=>-1,uo=()=>{},Ut=class t{r;x;Oe;R;constructor(e){this.r=e,this.x=e.o.u.for,this.Oe=bt(this.x),this.R=e.o.u.pre}k(e){let n=e.hasAttribute(this.x);return n&&this.Me(e),this.r.O.j(e,o=>{o.hasAttribute(this.x)&&this.Me(o)}),n}Q(e){return e[bn]?!0:(e[bn]=!0,gt(e,this.Oe).forEach(n=>n[bn]=!0),!1)}Me(e){if(e.hasAttribute(this.R)||this.Q(e))return;let n=e.getAttribute(this.x);if(!n){D(0,this.x,e);return}e.removeAttribute(this.x),this.ht(e,n)}Ve(e){return le(e)?[]:(q(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(o=>({*[Symbol.iterator](){for(let r=1;r<=o;r++)yield r}}))(e):Object.entries(e))}ht(e,n){let o=this.gt(n);if(!o?.list){D(1,this.x,n,e);return}let r=this.r.o.u.key,s=this.r.o.u.keyBind,a=e.getAttribute(r)??e.getAttribute(s);e.removeAttribute(r),e.removeAttribute(s);let i=qe(e),c=Dt.lt(this.r,i),l=e.parentNode;if(!l)return;let u=`${this.x} => ${n}`,f=new Comment(`__begin__ ${u}`);l.insertBefore(f,e),Fe(f,i),i.forEach(O=>{F(O)}),e.remove();let p=new Comment(`__end__ ${u}`);l.insertBefore(p,f.nextSibling);let h=this.r,m=h.m,d=m.L(),C=d.length===1?[void 0,d[0]]:void 0,R=this.bt(a),_=(O,W)=>R(O)===R(W),K=(O,W)=>O===W,V=(O,W,Z)=>{let y=o.createContext(W,O),A=st.mt(y.index,W),E=()=>{let $=p.parentNode??f.parentNode??l,b=Z.previousSibling,w=[];for(let k=0;k<i.length;++k){let G=i[k].cloneNode(!0);$.insertBefore(G,Z),w.push(G)}for(c?c.y(h,w):Ae(h,w),b=b.nextSibling;b!==Z;)A.items.push(b),b=b.nextSibling};return C?(C[0]=y.ctx,m.C(C,E)):m.C(d,()=>{m.v(y.ctx),E()}),A},oe=(O,W)=>{let Z=L.D(O).items,y=Z[Z.length-1].nextSibling;for(let A of Z)F(A);L.ie(O,V(O,W,y))},X=(O,W)=>{L.v(V(O,W,p))},N=O=>{for(let W of L.D(O).items)F(W)},re=O=>{let W=L.w;for(let Z=O;Z<W;++Z)L.D(Z).index(Z)},T=O=>{let W=f.parentNode,Z=p.parentNode;if(!W||!Z)return;let y=L.w;q(O)&&(O=O());let A=P(O[0]);if(v(A)&&A.length===0){Te(f,p),L.Ne(0);return}let E=[];for(let I of this.Ve(O[0]))E.push(I);let $=Pt.ft({oldItems:L.T,newValues:E,getKey:R,isSameValue:K,mountNewValue:(I,ee,Me)=>V(I,ee,Me),removeMountItem:I=>{for(let ee=0;ee<I.items.length;++ee)F(I.items[ee])},endAnchor:p});if($){L.T=$,L.P.clear();for(let I=0;I<$.length;++I){let ee=$[I];ee.order=I,ee.index(I);let Me=R(ee.value);Me!==void 0&&L.P.set(Me,ee)}return}let b=0,w=Number.MAX_SAFE_INTEGER,k=y,G=this.r.o.forGrowThreshold,ue=()=>L.w<k+G;for(let I of E){let ee=()=>{if(b<y){let Me=L.D(b++);if(_(Me.value,I)){if(K(Me.value,I))return;oe(b-1,I);return}let ct=L.yt(R(I));if(ct>=b&&ct-b<10){if(--b,w=Math.min(w,b),N(b),L.ke(b),--y,ct>b+1)for(let tn=b;tn<ct-1&&tn<y&&!_(L.D(b).value,I);)++tn,N(b),L.ke(b),--y;ee();return}ue()?(L.dt(b-1,V(b,I,L.D(b-1).items[0])),w=Math.min(w,b-1),++y):oe(b-1,I)}else X(b++,I)};ee()}let ge=b;for(y=L.w;b<y;)N(b++);L.Ne(ge),re(w)},S=()=>{Y.stop(),Be(),Be=uo},Y=m.V(o.list),He=Y.value,Be=uo,en=0,L=new st(R);for(let O of this.Ve(He()[0]))L.v(V(en++,O,p));j(f,S),Be=Y.subscribe(T)}static xt=/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/;gt(e){let n=t.xt.exec(e);if(!n)return;let o=(n[1]+(n[2]??"")).split(",").map(c=>c.trim()),r=o.length>1?o.length-1:-1,s=r!==-1&&(o[r]==="index"||o[r]?.startsWith("#"))?o[r]:"";s&&o.splice(r,1);let a=n[3];if(!a||o.length===0)return;let i=/[{[]/.test(e);return{list:a,createContext:(c,l)=>{let u={},f=P(c);if(!i&&o.length===1)u[o[0]]=c;else if(v(f)){let h=0;for(let m of o)u[m]=f[h++]}else for(let h of o)u[h]=f[h];let p={ctx:u,index:qr};return s&&(p.index=u[s.startsWith("#")?s.substring(1):s]=se(l)),p}}}bt(e){if(!e)return o=>o;let n=e.trim();if(!n)return o=>o;if(n.includes(".")){let o=this.Tt(n),r=o.length>1?o.slice(1):void 0;return s=>{let a=P(s),i=this.Le(a,o);return i!==void 0||!r?i:this.Le(a,r)}}return o=>P(P(o)?.[n])}Tt(e){return e.split(".").filter(n=>n.length>0)}Le(e,n){let o=e;for(let r of n)o=P(o)?.[r];return P(o)}};var Ht=class{ae=0;ce=new Map;m;Ie;Pe;De;O;F;o;R;Ue;constructor(e){this.m=e,this.o=e.o,this.Pe=new Ut(this),this.Ie=new yt(this),this.De=new It(this),this.O=new kt(this),this.F=new Lt(this),this.R=this.o.u.pre,this.Ue=this.o.u.dynamic}Rt(e){let n=fe(e)?[e]:e.querySelectorAll("template");for(let o of n){if(o.hasAttribute(this.R))continue;let r=o.parentNode;if(!r)continue;let s=o.nextSibling;if(o.remove(),!o.content)continue;let a=[...o.content.childNodes];for(let i of a)r.insertBefore(i,s);Ae(this,a)}}_(e){++this.ae;try{if(e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.R)||this.Ie.k(e)||this.Pe.k(e)||this.De.k(e))return;this.O.k(e),this.Rt(e),this.Ee(e,!0)}finally{--this.ae,this.ae===0&&this.Ct()}}Et(e,n){let o=document;if(!o){let r=e.parentNode;for(;r?.parentNode;)r=r.parentNode;if(!r)return null;o=r}return o.querySelector(n)}Be(e,n){let o=this.Et(e,n);if(!o)return!1;let r=e.parentElement;if(!r)return!1;let s=new Comment(`teleported => '${n}'`);return r.insertBefore(s,e),e.teleportedFrom=s,s.teleportedTo=e,j(s,()=>{F(e)}),o.appendChild(e),!0}vt(e,n){this.ce.set(e,n)}Ct(){let e=this.ce;if(e.size!==0){this.ce=new Map;for(let[n,o]of e.entries())this.Be(n,o)}}Ee(e,n){let o=this.F.Ce(e,n),r=this.o.B;for(let[s,a]of o.entries()){let[i,c]=a.Z,l=r[s]??r[i];if(!l){console.error("directive not found:",i);continue}let u=a.ve;for(let f=0;f<u.length;++f){let p=u[f];this.y(l,p,s,!1,c,a.ee)}}}y(e,n,o,r,s,a){if(n.hasAttribute(this.R))return;let i=n.getAttribute(o);n.removeAttribute(o);let c=l=>{let u=l;for(;u;){let f=u.getAttribute(nt);if(f)return f;u=u.parentElement}return null};if(ln()){let l=c(n);if(l){this.m.C(Jn(l),()=>{this.M(e,n,i,s,a)});return}}this.M(e,n,i,s,a)}wt(e,n,o){return e!==xt?!1:(B(o)||this.Be(n,o)||this.vt(n,o),!0)}M(e,n,o,r,s){if(n.nodeType!==Node.ELEMENT_NODE||o==null||this.wt(e,n,o))return;let a=this.St(r,e.once),i=this.At(e,o),c=this.kt(i,a);j(n,c.stop);let l=this.Nt(n,o,i,a,r,s),u=this.Ot(e,l,c);if(!u)return;let f=this.Mt(l,i,a,r,u);f(),e.once||(c.result=i.subscribe(f),a&&(c.dynamic=a.subscribe(f)))}St(e,n){let o=eo(e,this.Ue);if(o)return this.m.V(H(o),void 0,void 0,void 0,n)}At(e,n){return this.m.V(n,e.isLazy,e.isLazyKey,e.collectRefObj,e.once)}kt(e,n){let o={stop:()=>{e.stop(),n?.stop(),o.result?.(),o.dynamic?.(),o.mounted?.(),o.result=void 0,o.dynamic=void 0,o.mounted=void 0}};return o}Nt(e,n,o,r,s,a){return{el:e,expr:n,values:o.value(),previousValues:void 0,option:r?r.value()[0]:s,previousOption:void 0,flags:a,parseResult:o,dynamicOption:r}}Ot(e,n,o){let r=e.mount(n);if(typeof r=="function"){o.mounted=r;return}return r?.unmount&&(o.mounted=r.unmount),r?.update}Mt(e,n,o,r,s){let a,i;return()=>{let c=n.value(),l=o?o.value()[0]:r;e.values=c,e.previousValues=a,e.option=l,e.previousOption=i,a=c,i=l,s(e)}}};var lo="http://www.w3.org/1999/xlink",zr={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 Kr(t){return!!t||t===""}var Wr=(t,e,n,o,r,s)=>{if(o){s&&s.includes("camel")&&(o=H(o)),Bt(t,o,e[0],r);return}let a=e.length;for(let i=0;i<a;++i){let c=e[i];if(v(c)){let l=n?.[i]?.[0],u=c[0],f=c[1];Bt(t,u,f,l)}else if(M(c))for(let l of Object.entries(c)){let u=l[0],f=l[1],p=n?.[i],h=p&&u in p?u:void 0;Bt(t,u,f,h)}else{let l=n?.[i],u=e[i++],f=e[i];Bt(t,u,f,l)}}},Tn={mount:()=>({update:({el:t,values:e,previousValues:n,option:o,previousOption:r,flags:s})=>{Wr(t,e,n,o,r,s)}})},Bt=(t,e,n,o)=>{if(o&&o!==e&&t.removeAttribute(o),le(e)){D(3,"r-bind",t);return}if(!z(e)){D(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){le(n)?t.removeAttributeNS(lo,e.slice(6,e.length)):t.setAttributeNS(lo,e,n);return}let r=e in zr;le(n)||r&&!Kr(n)?t.removeAttribute(e):t.setAttribute(e,r?"":n)};var Gr=(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],a=n?.[r];if(v(s)){let i=s.length;for(let c=0;c<i;++c)fo(t,s[c],a?.[c])}else fo(t,s,a)}},xn={mount:()=>({update:({el:t,values:e,previousValues:n})=>{Gr(t,e,n)}})},fo=(t,e,n)=>{let o=t.classList,r=z(e),s=z(n);if(e&&!r){if(n&&!s)for(let a in n)(!(a in e)||!e[a])&&o.remove(a);for(let a in e)e[a]&&o.add(a)}else if(r){if(n!==e){let a=s?Ke(n):[],i=Ke(e);a.length>0&&o.remove(...a),i.length>0&&o.add(...i)}}else if(n){let a=s?Ke(n):[];a.length>0&&o.remove(...a)}};function Jr(t,e){if(t.length!==e.length)return!1;let n=!0;for(let o=0;n&&o<t.length;o++)n=Ce(t[o],e[o]);return n}function Ce(t,e){if(t===e)return!0;let n=rn(t),o=rn(e);if(n||o)return n&&o?t.getTime()===e.getTime():!1;if(n=et(t),o=et(e),n||o)return t===e;if(n=v(t),o=v(e),n||o)return n&&o?Jr(t,e):!1;if(n=M(t),o=M(e),n||o){if(!n||!o)return!1;let r=Object.keys(t).length,s=Object.keys(e).length;if(r!==s)return!1;for(let a in t){let i=Object.prototype.hasOwnProperty.call(t,a),c=Object.prototype.hasOwnProperty.call(e,a);if(i&&!c||!Ce(t[a],e[a]))return!1}return!0}return String(t)===String(e)}function jt(t,e){return t.findIndex(n=>Ce(n,e))}var po=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var _t=t=>{if(!x(t))throw U(3,"pause");t(void 0,void 0,3)};var $t=t=>{if(!x(t))throw U(3,"resume");t(void 0,void 0,4)};var ho={mount:({el:t,parseResult:e,flags:n})=>({update:({values:o})=>{Qr(t,o[0])},unmount:Xr(t,e,n)})},Qr=(t,e)=>{let n=To(t);if(n&&yo(t))v(e)?e=jt(e,ve(t))>-1:ae(e)?e=e.has(ve(t)):e=os(t,e),t.checked=e;else if(n&&go(t))t.checked=Ce(e,ve(t));else if(n||xo(t))bo(t)?t.value!==e?.toString()&&(t.value=e):t.value!==e&&(t.value=e);else if(Co(t)){let o=t.options,r=o.length,s=t.multiple;for(let a=0;a<r;a++){let i=o[a],c=ve(i);if(s)v(e)?i.selected=jt(e,c)>-1:i.selected=e.has(c);else if(Ce(ve(i),e)){t.selectedIndex!==a&&(t.selectedIndex=a);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else D(7,t)},it=t=>(x(t)&&(t=t()),q(t)&&(t=t()),t?z(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}),yo=t=>t.type==="checkbox",go=t=>t.type==="radio",bo=t=>t.type==="number"||t.type==="range",To=t=>t.tagName==="INPUT",xo=t=>t.tagName==="TEXTAREA",Co=t=>t.tagName==="SELECT",Xr=(t,e,n)=>{let o=e.value,r=it(n?.join(",")),s=it(o()[1]),a={int:r.int||s.int,lazy:r.lazy||s.lazy,number:r.number||s.number,trim:r.trim||s.trim};if(!e.refs[0])return D(8,t),()=>{};let i=()=>e.refs[0],c=To(t);return c&&yo(t)?Zr(t,i):c&&go(t)?rs(t,i):c||xo(t)?Yr(t,a,i,o):Co(t)?ss(t,i,o):(D(7,t),()=>{})},mo=/[.,' ·٫]/,Yr=(t,e,n,o)=>{let s=e.lazy?"change":"input",a=bo(t),i=()=>{!e.trim&&!it(o()[1]).trim||(t.value=t.value.trim())},c=p=>{let h=p.target;h.composing=1},l=p=>{let h=p.target;h.composing&&(h.composing=0,h.dispatchEvent(new Event(s)))},u=()=>{t.removeEventListener(s,f),t.removeEventListener("change",i),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",l),t.removeEventListener("change",l)},f=p=>{let h=n();if(!h)return;let m=p.target;if(!m||m.composing)return;let d=m.value,g=it(o()[1]);if(a||g.number||g.int){if(g.int)d=parseInt(d);else{if(mo.test(d[d.length-1])&&d.split(mo).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(h()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else g.trim&&(d=d.trim());h(d)};return t.addEventListener(s,f),t.addEventListener("change",i),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",l),t.addEventListener("change",l),u},Zr=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let a=ve(t),i=t.checked,c=s();if(v(c)){let l=jt(c,a),u=l!==-1;i&&!u?c.push(a):!i&&u&&c.splice(l,1)}else ae(c)?i?c.add(a):c.delete(a):s(ns(t,i))};return t.addEventListener(n,r),o},ve=t=>"_value"in t?t._value:t.value,vo="trueValue",es="falseValue",Eo="true-value",ts="false-value",ns=(t,e)=>{let n=e?vo:es;if(n in t)return t[n];let o=e?Eo:ts;return t.hasAttribute(o)?t.getAttribute(o):e},os=(t,e)=>{if(vo in t)return Ce(e,t.trueValue);let o=Eo;return t.hasAttribute(o)?Ce(e,t.getAttribute(o)):Ce(e,!0)},rs=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let a=ve(t);s(a)};return t.addEventListener(n,r),o},ss=(t,e,n)=>{let o="change",r=()=>{t.removeEventListener(o,s)},s=()=>{let a=e();if(!a)return;let c=it(n()[1]).number,l=Array.prototype.filter.call(t.options,u=>u.selected).map(u=>c?po(ve(u)):ve(u));if(t.multiple){let u=a();try{if(_t(a),ae(u)){u.clear();for(let f of l)u.add(f)}else v(u)?(u.splice(0),u.push(...l)):a(l)}finally{$t(a),J(a)}}else a(l[0])};return t.addEventListener(o,s),r};var is=["stop","prevent","capture","self","once","left","right","middle","passive"],as=t=>{let e={};if(B(t))return;let n=t.split(",");for(let o of is)e[o]=n.includes(o);return e},cs=(t,e,n,o,r)=>{if(o){let l=e.value(),u=P(o.value()[0]);return z(u)?Cn(t,H(u),()=>e.value()[0],r?.join(",")??l[1]):()=>{}}else if(n){let l=e.value();return Cn(t,H(n),()=>e.value()[0],r?.join(",")??l[1])}let s=[],a=()=>{s.forEach(l=>l())},i=e.value(),c=i.length;for(let l=0;l<c;++l){let u=i[l];if(q(u)&&(u=u()),M(u))for(let f of Object.entries(u)){let p=f[0],h=()=>{let d=e.value()[l];return q(d)&&(d=d()),d=d[p],q(d)&&(d=d()),d},m=u[p+"_flags"];s.push(Cn(t,p,h,m))}else D(2,"r-on",t)}return a},vn={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,mount:({el:t,parseResult:e,option:n,dynamicOption:o,flags:r})=>cs(t,e,n,o,r)},us=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e??="";let n=[...t.split("."),...e.split(",")];t=n[0];let o=n[1],r=n.includes("ctrl"),s=n.includes("shift"),a=n.includes("alt"),i=n.includes("meta"),c=l=>!(r&&!l.ctrlKey||s&&!l.shiftKey||a&&!l.altKey||i&&!l.metaKey);return o?[t,l=>c(l)?l.key.toUpperCase()===o.toUpperCase():!1]:[t,c]}return[t,n=>!0]},Cn=(t,e,n,o)=>{if(B(e))return D(5,"r-on",t),()=>{};let r=as(o),s=r?{capture:r.capture,passive:r.passive,once:r.once}:void 0,a;[e,a]=us(e,o);let i=u=>{if(!a(u)||!n&&e==="submit"&&r?.prevent)return;let f=n(u);q(f)&&(f=f(u)),q(f)&&f(u)},c=()=>{t.removeEventListener(e,l,s)},l=u=>{if(!r){i(u);return}try{if(r.left&&u.button!==0||r.middle&&u.button!==1||r.right&&u.button!==2||r.self&&u.target!==t)return;r.stop&&u.stopPropagation(),r.prevent&&u.preventDefault(),i(u)}finally{r.once&&c()}};return t.addEventListener(e,l,s),c};var ls=(t,e,n,o)=>{if(n){o&&o.includes("camel")&&(n=H(n)),Qe(t,n,e[0]);return}let r=e.length;for(let s=0;s<r;++s){let a=e[s];if(v(a)){let i=a[0],c=a[1];Qe(t,i,c)}else if(M(a))for(let i of Object.entries(a)){let c=i[0],l=i[1];Qe(t,c,l)}else{let i=e[s++],c=e[s];Qe(t,i,c)}}},Ro={mount:()=>({update:({el:t,values:e,option:n,flags:o})=>{ls(t,e,n,o)}})};function fs(t){return!!t||t===""}var Qe=(t,e,n)=>{if(le(e)){D(3,":prop",t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(me),1),t[e]=n??"";return}let o=t.tagName;if(e==="value"&&o!=="PROGRESS"&&!o.includes("-")){t._value=n;let s=o==="OPTION"?t.getAttribute("value"):t.value,a=n??"";s!==a&&(t.value=a),n==null&&t.removeAttribute(e);return}let r=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=fs(n):n==null&&s==="string"?(n="",r=!0):s==="number"&&(n=0,r=!0)}try{t[e]=n}catch(s){r||D(4,e,o,n,s)}r&&t.removeAttribute(e)};var wo={once:!0,mount:({el:t,parseResult:e,expr:n})=>{let o=e,r=o.value()[0],s=v(r),a=o.refs[0];return s?r.push(t):a?a?.(t):o.context[n]=t,()=>{if(s){let i=r.indexOf(t);i!==-1&&r.splice(i,1)}else a?.(null)}}};var ps=(t,e)=>{let n=Se(t).data,o=n._ord;$n(o)&&(o=n._ord=t.style.display),!!e[0]?t.style.display=o:t.style.display="none"},So={mount:()=>({update:({el:t,values:e})=>{ps(t,e)}})};var ms=(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],a=n?.[r];if(v(s)){let i=s.length;for(let c=0;c<i;++c)Ao(t,s[c],a?.[c])}else Ao(t,s,a)}},Ft={mount:()=>({update:({el:t,values:e,previousValues:n})=>{ms(t,e,n)}})},Ao=(t,e,n)=>{let o=t.style,r=z(e);if(e&&!r){if(n&&!z(n))for(let s in n)e[s]==null&&Rn(o,s,"");for(let s in e)Rn(o,s,e[s])}else{let s=o.display;if(r?n!==e&&(o.cssText=e):n&&t.removeAttribute("style"),"_ord"in Se(t).data)return;o.display=s}},No=/\s*!important$/;function Rn(t,e,n){if(v(n))n.forEach(o=>{Rn(t,e,o)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let o=ds(t,e);No.test(n)?t.setProperty(ze(o),n.replace(No,""),"important"):t[o]=n}}var Oo=["Webkit","Moz","ms"],En={};function ds(t,e){let n=En[e];if(n)return n;let o=H(e);if(o!=="filter"&&o in t)return En[e]=o;o=rt(o);for(let r=0;r<Oo.length;r++){let s=Oo[r]+o;if(s in t)return En[e]=s}return e}var ie=t=>Mo(P(t)),Mo=(t,e=new WeakMap)=>{if(!t||!M(t))return t;if(v(t))return t.map(ie);if(ae(t)){let o=new Set;for(let r of t.keys())o.add(ie(r));return o}if(Re(t)){let o=new Map;for(let r of t)o.set(ie(r[0]),ie(r[1]));return o}if(e.has(t))return P(e.get(t));let n={...t};e.set(t,n);for(let o of Object.entries(n))n[o[0]]=Mo(P(o[1]),e);return n};var hs=(t,e)=>{let n=e[0];t.textContent=ae(n)?JSON.stringify(ie([...n])):Re(n)?JSON.stringify(ie([...n])):M(n)?JSON.stringify(ie(n)):n?.toString()??""},ko={mount:()=>({update:({el:t,values:e})=>{hs(t,e)}})};var Lo={mount:()=>({update:({el:t,values:e})=>{Qe(t,"value",e[0])}})};var ce=class t{static getDefault(){return t.He??(t.He=new t)}B={};u={};pt=()=>Object.keys(this.B).filter(e=>e.length===1||!e.startsWith(":"));X=new Map;$=new Map;static He;static Vt="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";forGrowThreshold=10;globalContext;useInterpolation=!0;constructor(e){if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.Lt()}Lt(){let e={},n=globalThis;for(let o of t.Vt.split(","))e[o]=n[o];return e.ref=ye,e.sref=se,e.flatten=ie,e}addComponent(...e){for(let n of e){if(!n.defaultName){tt.warning("Registered component's default name is not defined",n);continue}this.X.set(rt(n.defaultName),n),this.$.set(rt(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.B={".":Ro,":":Tn,"@":vn,[`${e}on`]:vn,[`${e}bind`]:Tn,[`${e}html`]:Vt,[`${e}text`]:ko,[`${e}show`]:So,[`${e}model`]:ho,":style":Ft,[`${e}style`]:Ft,[`${e}bind:style`]:Ft,":class":xn,[`${e}bind:class`]:xn,":ref":wo,":value":Lo,[`${e}teleport`]:xt},this.u={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,context:":context",contextAlias:`${e}context`,bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.B,this.u)}};var qt=(t,e)=>{if(!t)return;let o=(e??ce.getDefault()).u,r=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let a of gs(t,o.pre,s))ys(a,o.text,r,s)},ys=(t,e,n,o)=>{let r=t.textContent;if(!r)return;let s=n,a=r.split(s);if(a.length<=1)return;if(t.parentElement?.childNodes.length===1&&a.length===3){let c=a[1],l=Io(c,o);if(l&&B(a[0])&&B(a[2])){let u=t.parentElement;u.setAttribute(e,c.substring(l.start.length,c.length-l.end.length)),u.innerText="";return}}let i=document.createDocumentFragment();for(let c of a){let l=Io(c,o);if(l){let u=document.createElement("span");u.setAttribute(e,c.substring(l.start.length,c.length-l.end.length)),i.appendChild(u)}else i.appendChild(document.createTextNode(c))}t.replaceWith(i)},gs=(t,e,n)=>{let o=[],r=s=>{if(s.nodeType===Node.TEXT_NODE)n.some(a=>s.textContent?.includes(a.start))&&o.push(s);else{if(s?.hasAttribute?.(e))return;for(let a of xe(s))r(a)}};return r(t),o},Io=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var bs=9,Ts=10,xs=13,Cs=32,Ee=46,zt=44,vs=39,Es=34,Kt=40,Xe=41,Wt=91,wn=93,Sn=63,Rs=59,Vo=58,Do=123,Gt=125,De=43,Jt=45,An=96,Po=47,Nn=92,Uo=new Set([2,3]),Fo={"=":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},ws={"=>":2,...Fo,"||":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},qo=Object.keys(Fo),Ss=new Set(qo),Mn=new Set(["=>"]);qo.forEach(t=>Mn.add(t));var Ho={true:!0,false:!1,null:null},As="this",Ye="Expected ",Pe="Unexpected ",Ln="Unclosed ",Ns=Ye+":",Bo=Ye+"expression",Os="missing }",Ms=Pe+"object property",ks=Ln+"(",jo=Ye+"comma",_o=Pe+"token ",Ls=Pe+"period",On=Ye+"expression after ",Is="missing unaryOp argument",Vs=Ln+"[",Ds=Ye+"exponent (",Ps="Variable names cannot start with a number (",Us=Ln+'quote after "',at=t=>t>=48&&t<=57,$o=t=>ws[t],kn=class{p;e;get H(){return this.p.charAt(this.e)}get h(){return this.p.charCodeAt(this.e)}f(e){return this.p.charCodeAt(this.e)===e}constructor(e){this.p=e,this.e=0}K(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95||e>=128}ue(e){return this.K(e)||at(e)}i(e){return new Error(`${e} at character ${this.e}`)}g(){let e=this.h,n=this.p,o=this.e;for(;e===Cs||e===bs||e===Ts||e===xs;)e=n.charCodeAt(++o);this.e=o}parse(){let e=this.pe();return e.length===1?e[0]:{type:0,body:e}}pe(e){let n=[];for(;this.e<this.p.length;){let o=this.h;if(o===Rs||o===zt)this.e++;else{let r=this.S();if(r)n.push(r);else if(this.e<this.p.length){if(o===e)break;throw this.i(Pe+'"'+this.H+'"')}}}return n}S(){let e=this.It()??this.je();return this.g(),this.Pt(e)}le(){this.g();let e=this.p,n=this.e,o=e.charCodeAt(n),r=e.charCodeAt(n+1),s=e.charCodeAt(n+2),a=e.charCodeAt(n+3);if(isNaN(o))return!1;let i=!1,c=0;return o===62&&r===62&&s===62&&a===61?(i=">>>=",c=4):o===61&&r===61&&s===61?(i="===",c=3):o===33&&r===61&&s===61?(i="!==",c=3):o===62&&r===62&&s===62?(i=">>>",c=3):o===60&&r===60&&s===61?(i="<<=",c=3):o===62&&r===62&&s===61?(i=">>=",c=3):o===42&&r===42&&s===61?(i="**=",c=3):o===61&&r===62?(i="=>",c=2):o===124&&r===124?(i="||",c=2):o===63&&r===63?(i="??",c=2):o===38&&r===38?(i="&&",c=2):o===61&&r===61?(i="==",c=2):o===33&&r===61?(i="!=",c=2):o===60&&r===61?(i="<=",c=2):o===62&&r===61?(i=">=",c=2):o===60&&r===60?(i="<<",c=2):o===62&&r===62?(i=">>",c=2):o===43&&r===61?(i="+=",c=2):o===45&&r===61?(i="-=",c=2):o===42&&r===61?(i="*=",c=2):o===47&&r===61?(i="/=",c=2):o===37&&r===61?(i="%=",c=2):o===38&&r===61?(i="&=",c=2):o===94&&r===61?(i="^=",c=2):o===124&&r===61?(i="|=",c=2):o===42&&r===42?(i="**",c=2):o===105&&r===110?this.ue(e.charCodeAt(n+2))||(i="in",c=2):o===61?(i="=",c=1):o===124?(i="|",c=1):o===94?(i="^",c=1):o===38?(i="&",c=1):o===60?(i="<",c=1):o===62?(i=">",c=1):o===43?(i="+",c=1):o===45?(i="-",c=1):o===42?(i="*",c=1):o===47?(i="/",c=1):o===37&&(i="%",c=1),i?(this.e+=c,i):!1}je(){let e,n,o,r,s,a,i,c;if(s=this.z(),!s||(n=this.le(),!n))return s;if(r={value:n,prec:$o(n),right_a:Mn.has(n)},a=this.z(),!a)throw this.i(On+n);let l=[s,r,a];for(;n=this.le();){o=$o(n),r={value:n,prec:o,right_a:Mn.has(n)},c=n;let u=f=>r.right_a&&f.right_a?o>f.prec:o<=f.prec;for(;l.length>2&&u(l[l.length-2]);)a=l.pop(),n=l.pop().value,s=l.pop(),e=this._e(n,s,a),l.push(e);if(e=this.z(),!e)throw this.i(On+c);l.push(r,e)}for(i=l.length-1,e=l[i];i>1;)e=this._e(l[i-1].value,l[i-2],e),i-=2;return e}z(){let e;if(this.g(),e=this.Dt(),e)return this.fe(e);let n=this.h;if(at(n)||n===Ee)return this.Ut();if(n===vs||n===Es)e=this.Bt();else if(n===Wt)e=this.Ht();else{let o=this.jt();if(o){let r=this.z();if(!r)throw this.i(Is);return this.fe({type:7,operator:o,argument:r})}this.K(n)?(e=this.me(),e.name in Ho?e={type:4,value:Ho[e.name],raw:e.name}:e.name===As&&(e={type:5})):n===Kt&&(e=this._t())}return e?(e=this.W(e),this.fe(e)):!1}_e(e,n,o){if(e==="=>"){let r=n.type===1?n.expressions:[n];return{type:15,params:r,body:o}}return Ss.has(e)?{type:16,operator:e,left:n,right:o}:{type:8,operator:e,left:n,right:o}}Dt(){let e={node:!1};return this.$t(e),e.node||(this.Ft(e),e.node)||(this.qt(e),e.node)||(this.$e(e),e.node)||this.Kt(e),e.node}fe(e){let n={node:e};return this.zt(n),this.Wt(n),this.Gt(n),n.node}jt(){let e=this.p,n=this.e,o=e.charCodeAt(n),r=e.charCodeAt(n+1),s=e.charCodeAt(n+2),a=e.charCodeAt(n+3);return o===Jt?(this.e++,"-"):o===33?(this.e++,"!"):o===126?(this.e++,"~"):o===De?(this.e++,"+"):o===110&&r===101&&s===119&&!this.ue(a)?(this.e+=3,"new"):!1}It(){let e={};return this.Jt(e),e.node}Pt(e){let n={node:e};return this.Qt(n),n.node}W(e){this.g();let n=this.h;for(;n===Ee||n===Wt||n===Kt||n===Sn;){let o;if(n===Sn){if(this.p.charCodeAt(this.e+1)!==Ee)break;o=!0,this.e+=2,this.g(),n=this.h}if(this.e++,n===Wt){if(e={type:3,computed:!0,object:e,property:this.S()},this.g(),n=this.h,n!==wn)throw this.i(Vs);this.e++}else n===Kt?e={type:6,arguments:this.Fe(Xe),callee:e}:(o&&this.e--,this.g(),e={type:3,computed:!1,object:e,property:this.me()});o&&(e.optional=!0),this.g(),n=this.h}return e}Ut(){let e=this.p,n=this.e,o=n;for(;at(e.charCodeAt(o));)o++;if(e.charCodeAt(o)===Ee)for(o++;at(e.charCodeAt(o));)o++;let r=e.charCodeAt(o);if(r===101||r===69){o++;let i=e.charCodeAt(o);(i===De||i===Jt)&&o++;let c=o;for(;at(e.charCodeAt(o));)o++;if(c===o){this.e=o;let l=e.slice(n,o);throw this.i(Ds+l+this.H+")")}}this.e=o;let s=e.slice(n,o),a=e.charCodeAt(o);if(this.K(a))throw this.i(Ps+s+this.H+")");if(a===Ee||s.length===1&&s.charCodeAt(0)===Ee)throw this.i(Ls);return{type:4,value:parseFloat(s),raw:s}}Bt(){let e=this.p,n=e.length,o=this.e,r=e.charCodeAt(this.e++),s=this.e,a=s,i=[],c=!1,l=!1;for(;s<n;){let f=e.charCodeAt(s);if(f===r){l=!0,this.e=s+1;break}if(f===Nn){c||(c=!0),i.push(e.slice(a,s));let p=e.charCodeAt(s+1);i.push(this.qe(p)),s+=2,a=s}else s++}let u=c?i.join("")+e.slice(a,l?s:n):e.slice(a,l?s:n);if(!l)throw this.e=s,this.i(Us+u+'"');return{type:4,value:u,raw:e.substring(o,this.e)}}qe(e){switch(e){case 110:return`
2
+ `;case 114:return"\r";case 116:return" ";case 98:return"\b";case 102:return"\f";case 118:return"\v";default:return isNaN(e)?"":String.fromCharCode(e)}}me(){let e=this.h,n=this.e;if(this.K(e))this.e++;else throw this.i(Pe+this.H);for(;this.e<this.p.length&&(e=this.h,this.ue(e));)this.e++;return{type:2,name:this.p.slice(n,this.e)}}Fe(e){let n=[],o=!1,r=0;for(;this.e<this.p.length;){this.g();let s=this.h;if(s===e){if(o=!0,this.e++,e===Xe&&r&&r>=n.length)throw this.i(_o+String.fromCharCode(e));break}else if(s===zt){if(this.e++,r++,r!==n.length){if(e===Xe)throw this.i(_o+",");for(let a=n.length;a<r;a++)n.push(null)}}else{if(n.length!==r&&r!==0)throw this.i(jo);{let a=this.S();if(!a||a.type===0)throw this.i(jo);n.push(a)}}}if(!o)throw this.i(Ye+String.fromCharCode(e));return n}_t(){this.e++;let e=this.pe(Xe);if(this.f(Xe))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(ks)}Ht(){return this.e++,{type:9,elements:this.Fe(wn)}}$t(e){if(this.f(Do)){this.e++;let n=[];for(;!isNaN(this.h);){if(this.g(),this.f(Gt)){this.e++,e.node=this.W({type:10,properties:n});return}let o=this.S();if(!o)break;if(this.g(),o.type===2&&(this.f(zt)||this.f(Gt)))n.push({type:12,computed:!1,key:o,value:o,shorthand:!0});else if(this.f(Vo)){this.e++;let r=this.S();if(!r)throw this.i(Ms);let s=o.type===9;n.push({type:12,computed:s,key:s?o.elements[0]:o,value:r,shorthand:!1}),this.g()}else n.push(o);this.f(zt)&&this.e++}throw this.i(Os)}}Ft(e){let n=this.h;if((n===De||n===Jt)&&n===this.p.charCodeAt(this.e+1)){this.e+=2;let o=e.node={type:13,operator:n===De?"++":"--",argument:this.W(this.me()),prefix:!0};if(!o.argument||!Uo.has(o.argument.type))throw this.i(Pe+o.operator)}}Wt(e){let n=e.node,o=this.h;if((o===De||o===Jt)&&o===this.p.charCodeAt(this.e+1)){if(!Uo.has(n.type))throw this.i(Pe+(o===De?"++":"--"));this.e+=2,e.node={type:13,operator:o===De?"++":"--",argument:n,prefix:!1}}}qt(e){this.p.charCodeAt(this.e)===Ee&&this.p.charCodeAt(this.e+1)===Ee&&this.p.charCodeAt(this.e+2)===Ee&&(this.e+=3,e.node={type:14,argument:this.S()})}Qt(e){if(e.node&&this.f(Sn)){this.e++;let n=e.node,o=this.S();if(!o)throw this.i(Bo);if(this.g(),this.f(Vo)){this.e++;let r=this.S();if(!r)throw this.i(Bo);e.node={type:11,test:n,consequent:o,alternate:r}}else throw this.i(Ns)}}Jt(e){if(this.g(),this.f(Kt)){let n=this.e;if(this.e++,this.g(),this.f(Xe)){this.e++;let o=this.le();if(o==="=>"){let r=this.je();if(!r)throw this.i(On+o);e.node={type:15,params:null,body:r};return}}this.e=n}}Gt(e){let n=e.node,o=n.type;(o===2||o===3)&&this.f(An)&&(e.node={type:17,tag:n,quasi:this.$e(e)})}$e(e){if(!this.f(An))return;let n=this.p,o=n.length,r={type:19,quasis:[],expressions:[]},s=++this.e,a=[],i=[],c=!1,l=u=>{if(!c){let h=n.slice(s,this.e);return r.quasis.push({type:18,value:{raw:h,cooked:h},tail:u})}a.push(n.slice(s,this.e)),i.push(n.slice(s,this.e));let f=a.join(""),p=i.join("");return a.length=0,i.length=0,c=!1,r.quasis.push({type:18,value:{raw:f,cooked:p},tail:u})};for(;this.e<o;){let u=n.charCodeAt(this.e);if(u===An)return l(!0),this.e+=1,e.node=r,r;if(u===36&&n.charCodeAt(this.e+1)===Do){if(l(!1),this.e+=2,r.expressions.push(...this.pe(Gt)),!this.f(Gt))throw this.i("unclosed ${");this.e+=1,s=this.e}else if(u===Nn){c||(c=!0),a.push(n.slice(s,this.e)),i.push(n.slice(s,this.e));let f=n.charCodeAt(this.e+1);a.push(n.slice(this.e,this.e+2)),i.push(this.qe(f)),this.e+=2,s=this.e}else this.e+=1}throw this.i("Unclosed `")}zt(e){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 o=e.node;for(;o.type===3||o.type===6&&o.callee.type===3;)o=o.type===3?o.object:o.callee.object;o.type=20}Kt(e){if(!this.f(Po))return;let n=++this.e,o=!1;for(;this.e<this.p.length;){if(this.h===Po&&!o){let r=this.p.slice(n,this.e),s="";for(;++this.e<this.p.length;){let i=this.h;if(i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57)s+=this.H;else break}let a;try{a=new RegExp(r,s)}catch(i){throw this.i(i.message)}return e.node={type:4,value:a,raw:this.p.slice(n-1,this.e)},e.node=this.W(e.node),e.node}this.f(Wt)?o=!0:o&&this.f(wn)&&(o=!1),this.e+=this.f(Nn)?2:1}throw this.i("Unclosed Regex")}},zo=t=>new kn(t).parse();var Hs={"=>":(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,"&":(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)=>t**e},Bs={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},Jo=t=>{if(!t?.some(Go))return t;let e=[];return t.forEach(n=>Go(n)?e.push(...n):e.push(n)),e},Ko=(...t)=>Jo(t),In=(t,e)=>{if(!t)return e;let n=Object.create(e??{});return n.$event=t,n},js={"++":(t,e)=>{let n=t[e];if(x(n)){let o=n();return n(++o),o}return++t[e]},"--":(t,e)=>{let n=t[e];if(x(n)){let o=n();return n(--o),o}return--t[e]}},_s={"++":(t,e)=>{let n=t[e];if(x(n)){let o=n();return n(o+1),o}return t[e]++},"--":(t,e)=>{let n=t[e];if(x(n)){let o=n();return n(o-1),o}return t[e]--}},Wo={"=":(t,e,n)=>{let o=t[e];return x(o)?o(n):t[e]=n},"+=":(t,e,n)=>{let o=t[e];return x(o)?o(o()+n):t[e]+=n},"-=":(t,e,n)=>{let o=t[e];return x(o)?o(o()-n):t[e]-=n},"*=":(t,e,n)=>{let o=t[e];return x(o)?o(o()*n):t[e]*=n},"/=":(t,e,n)=>{let o=t[e];return x(o)?o(o()/n):t[e]/=n},"%=":(t,e,n)=>{let o=t[e];return x(o)?o(o()%n):t[e]%=n},"**=":(t,e,n)=>{let o=t[e];return x(o)?o(o()**n):t[e]**=n},"<<=":(t,e,n)=>{let o=t[e];return x(o)?o(o()<<n):t[e]<<=n},">>=":(t,e,n)=>{let o=t[e];return x(o)?o(o()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let o=t[e];return x(o)?o(o()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let o=t[e];return x(o)?o(o()|n):t[e]|=n},"&=":(t,e,n)=>{let o=t[e];return x(o)?o(o()&n):t[e]&=n},"^=":(t,e,n)=>{let o=t[e];return x(o)?o(o()^n):t[e]^=n}},Qt=(t,e)=>q(t)?t.bind(e):t,Vn=class{l;Ke;ze;We;A;Ge;Je;constructor(e,n,o,r,s){this.l=v(e)?e:[e],this.Ke=n,this.ze=o,this.We=r,this.Je=!!s}Qe(e,n){if(n&&e in n)return n;for(let o of this.l)if(e in o)return o}2(e,n,o){let r=e.name;if(r==="$root")return this.l[this.l.length-1];if(r==="$parent")return this.l[1];if(r==="$ctx")return[...this.l];if(o&&r in o)return this.A=o[r],Qt(P(o[r]),o);for(let a of this.l)if(r in a)return this.A=a[r],Qt(P(a[r]),a);let s=this.Ke;if(s&&r in s)return this.A=s[r],Qt(P(s[r]),s)}5(e,n,o){return this.l[0]}0(e,n,o){return this.Xe(n,o,Ko,...e.body)}1(e,n,o){return this.E(n,o,(...r)=>r.pop(),...e.expressions)}3(e,n,o){let{obj:r,key:s}=this.de(e,n,o),a=r?.[s];return this.A=a,Qt(P(a),r)}4(e,n,o){return e.value}6(e,n,o){let r=(a,...i)=>q(a)?a(...Jo(i)):a,s=this.E(++n,o,r,e.callee,...e.arguments);return this.A=s,s}7(e,n,o){return this.E(n,o,Bs[e.operator],e.argument)}8(e,n,o){let r=Hs[e.operator];switch(e.operator){case"||":case"&&":case"??":return r(()=>this.b(e.left,n,o),()=>this.b(e.right,n,o))}return this.E(n,o,r,e.left,e.right)}9(e,n,o){return this.Xe(++n,o,Ko,...e.elements)}10(e,n,o){let r={},s=(...a)=>{a.forEach(i=>{Object.assign(r,i)})};return this.E(++n,o,s,...e.properties),r}11(e,n,o){return this.E(n,o,r=>this.b(r?e.consequent:e.alternate,n,o),e.test)}12(e,n,o){let r={},s=u=>u?.type!==15,a=this.We??(()=>!1),i=n===0&&this.Je,c=u=>this.Ye(i,e.key,n,In(u,o)),l=u=>this.Ye(i,e.value,n,In(u,o));if(e.shorthand){let u=e.key.name;r[u]=s(e.key)&&a(u,n)?c:c()}else if(e.computed){let u=P(c());r[u]=s(e.value)&&a(u,n)?l:l()}else{let u=e.key.type===4?e.key.value:e.key.name;r[u]=s(e.value)&&a(u,n)?()=>l:l()}return r}de(e,n,o){let r=this.b(e.object,n,o),s=e.computed?this.b(e.property,n,o):e.property.name;return{obj:r,key:s}}13(e,n,o){let r=e.argument,s=e.operator,a=e.prefix?js:_s;if(r.type===2){let i=r.name,c=this.Qe(i,o);return le(c)?void 0:a[s](c,i)}if(r.type===3){let{obj:i,key:c}=this.de(r,n,o);return a[s](i,c)}}16(e,n,o){let r=e.left,s=e.operator;if(r.type===2){let a=r.name,i=this.Qe(a,o);if(le(i))return;let c=this.b(e.right,n,o);return Wo[s](i,a,c)}if(r.type===3){let{obj:a,key:i}=this.de(r,n,o),c=this.b(e.right,n,o);return Wo[s](a,i,c)}}14(e,n,o){let r=this.b(e.argument,n,o);return v(r)&&(r.s=Qo),r}17(e,n,o){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,o)}19(e,n,o){let r=(...s)=>s.reduce((a,i,c)=>a+=i+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.E(n,o,r,...e.expressions)}18(e,n,o){return e.value.cooked}20(e,n,o){let r=(s,...a)=>new s(...a);return this.E(n,o,r,e.callee,...e.arguments)}15(e,n,o){return(...r)=>{let s=Object.create(o??{}),a=e.params;if(a){let i=0;for(let c of a)s[c.name]=r[i++]}return this.b(e.body,n,s)}}b(e,n,o){let r=P(this[e.type](e,n,o));return this.Ge=e.type,r}Ye(e,n,o,r){let s=this.b(n,o,r);return e&&this.Ze()?this.A:s}Ze(){let e=this.Ge;return(e===2||e===3||e===6)&&x(this.A)}eval(e,n){let{value:o,refs:r}=St(()=>this.b(e,-1,n)),s={value:o,refs:r};return this.Ze()&&(s.ref=this.A),s}E(e,n,o,...r){let s=r.map(a=>a&&this.b(a,e,n));return o(...s)}Xe(e,n,o,...r){let s=this.ze;if(!s)return this.E(e,n,o,...r);let a=r.map((i,c)=>i&&(i.type!==15&&s(c,e)?l=>this.b(i,e,In(l,n)):this.b(i,e,n)));return o(...a)}},Qo=Symbol("s"),Go=t=>t?.s===Qo,Xo=(t,e,n,o,r,s,a)=>new Vn(e,n,o,r,a).eval(t,s);var Yo={},Zo=t=>!!t,Xt=class{l;o;constructor(e,n){this.l=e,this.o=n}v(e){this.l=[e,...this.l]}Y(){return this.l.map(n=>n.components).filter(Zo).reverse().reduce((n,o)=>{for(let[r,s]of Object.entries(o))n[r.toUpperCase()]=s;return n},{})}ut(){let e=[],n=new Set,o=this.l.map(r=>r.components).filter(Zo).reverse();for(let r of o)for(let s of Object.keys(r))n.has(s)||(n.add(s),e.push(s));return e}V(e,n,o,r,s){let a=[],i=[],c=new Set,l=()=>{for(let C=0;C<i.length;++C)i[C]();i.length=0},p={value:()=>a,stop:()=>{l(),c.clear()},subscribe:(C,R)=>(c.add(C),R&&C(a),()=>{c.delete(C)}),refs:[],context:this.l[0]};if(B(e))return p;let h=this.o.globalContext,m=[],d=new Set,g=(C,R,_,K)=>{try{let V=Xo(C,R,h,n,o,K,r);return _&&V.refs.length>0&&m.push(...V.refs),{value:V.value,refs:V.refs,ref:V.ref}}catch(V){D(6,`evaluation error: ${e}`,V)}return{value:void 0,refs:[]}};try{let C=Yo[e]??zo("["+e+"]");Yo[e]=C;let R=this.l.slice(),_=C.elements,K=_.length,V=new Array(K);p.refs=V;let oe=()=>{m.length=0,s||(d.clear(),l());let X=new Array(K);for(let N=0;N<K;++N){let re=_[N];if(n?.(N,-1)){X[N]=S=>g(re,R,!1,{$event:S}).value;continue}let T=g(re,R,!0);X[N]=T.value,V[N]=T.ref}if(!s)for(let N of m)d.has(N)||(d.add(N),i.push(ne(N,oe)));if(a=X,c.size!==0)for(let N of c)c.has(N)&&N(a)};oe()}catch(C){D(6,`parse error: ${e}`,C)}return p}L(){return this.l.slice()}et=[];ie(e){this.et.push(this.l),this.l=e}C(e,n){try{this.ie(e),n()}finally{this.Xt()}}Xt(){this.l=this.et.pop()??[]}};var er=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},$s=(t,e)=>{let n="";for(let o=e;o<t.length;++o){let r=t[o];if(n){r===n&&(n="");continue}if(r==='"'||r==="'"){n=r;continue}if(r===">")return o}return-1},Fs=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
3
+ `);)++n;if(n>=t.length||!er(t[n]))return null;let o=n;for(;n<t.length&&er(t[n]);)++n;return{start:o,end:n}},tr=new Set(["table","thead","tbody","tfoot"]),qs=new Set(["thead","tbody","tfoot"]),zs=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),Ks=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),nr=(t,e)=>`${t.slice(0,t.length-2)}></${e}>`,Yt=t=>{let e=0,n=[],o=[],r=0;for(;e<t.length;){let s=t.indexOf("<",e);if(s===-1){n.push(t.slice(e));break}if(n.push(t.slice(e,s)),t.startsWith("<!--",s)){let g=t.indexOf("-->",s+4);if(g===-1){n.push(t.slice(s));break}n.push(t.slice(s,g+3)),e=g+3;continue}let a=$s(t,s);if(a===-1){n.push(t.slice(s));break}let i=t.slice(s,a+1),c=i.startsWith("</");if(i.startsWith("<!")||i.startsWith("<?")){n.push(i),e=a+1;continue}let u=Fs(i,c);if(!u){n.push(i),e=a+1;continue}let f=i.slice(u.start,u.end);if(c){let g=o[o.length-1];g?(o.pop(),n.push(g.replacementHost?`</${g.replacementHost}>`:i),tr.has(g.effectiveTag)&&--r):n.push(i),e=a+1;continue}let p=i.charCodeAt(i.length-2)===47,h=o[o.length-1],m=null;r===0?f==="tr"?m="trx":f==="td"?m="tdx":f==="th"&&(m="thx"):qs.has(h?.effectiveTag??"")?m=f==="tr"?null:"tr":h?.effectiveTag==="table"?m=zs.has(f)?null:"tr":h?.effectiveTag==="tr"&&(m=f==="td"||f==="th"?null:"td");let d=p&&!Ks.has(m||f);if(m){let g=m==="trx"||m==="tdx"||m==="thx",C=`${i.slice(0,u.start)}${m} is="${g?`r-${f}`:`regor:${f}`}"${i.slice(u.end)}`;n.push(d?nr(C,m):C)}else n.push(d?nr(i,f):i);if(!p){let g=m==="trx"?"tr":m==="tdx"?"td":m==="thx"?"th":m||f;o.push({replacementHost:m,effectiveTag:g}),tr.has(g)&&++r}e=a+1}return n.join("")};var Ws="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",Gs=new Set(Ws.toUpperCase().split(",")),Js="http://www.w3.org/2000/svg",or=(t,e)=>{fe(t)?t.content.appendChild(e):t.appendChild(e)},Dn=(t,e,n,o)=>{let r=t.t;if(r){let a=n&&Gs.has(r.toUpperCase())?document.createElementNS(Js,r.toLowerCase()):document.createElement(r),i=t.a;if(i)for(let l of Object.entries(i)){let u=l[0],f=l[1];u.startsWith("#")&&(f=u.substring(1),u="name"),a.setAttribute(Tt(u,o),f)}let c=t.c;if(c)for(let l of c)Dn(l,a,n,o);or(e,a);return}let s=t.d;if(s){let a;switch(t.n??Node.TEXT_NODE){case Node.COMMENT_NODE:a=document.createComment(s);break;case Node.TEXT_NODE:a=document.createTextNode(s);break}if(a)or(e,a);else throw new Error("unsupported node type.")}},Ue=(t,e,n)=>{n??=ce.getDefault();let o=document.createDocumentFragment();if(!v(t))return Dn(t,o,!!e,n),o;for(let r of t)Dn(r,o,!!e,n);return o};var rr=(t,e={selector:"#app"},n)=>{z(e)&&(e={selector:"#app",template:e}),to(t)&&(t=t.context);let o=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!o||!be(o))throw U(0);n||(n=ce.getDefault());let r=()=>{for(let i of[...o.childNodes])F(i)},s=i=>{for(let c of i)o.appendChild(c)};if(e.template){let i=document.createRange().createContextualFragment(Yt(e.template));r(),s(i.childNodes),e.element=i}else if(e.json){let i=Ue(e.json,e.isSVG,n);r(),s(i.childNodes)}return n.useInterpolation&&qt(o,n),new Pn(t,o,n).y(),j(o,()=>{we(t)}),Ct(t),{context:t,unmount:()=>{F(o)},unbind:()=>{me(o)}}},Pn=class{Yt;tt;o;m;r;constructor(e,n,o){this.Yt=e,this.tt=n,this.o=o,this.m=new Xt([e],o),this.r=new Ht(this.m)}y(){this.r._(this.tt)}};var Ze=t=>{if(v(t))return t.map(r=>Ze(r));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(r=>[r,t.getAttribute(r)??""])));let o=xe(t);return o.length>0&&(e.c=[...o].map(r=>Ze(r))),e};var sr=(t,e={})=>{v(e)&&(e={props:e}),z(t)&&(t={template:t});let n=e.context??(()=>({})),o=!1;if(t.element){let s=t.element;s.remove(),t.element=s}else if(t.selector){let s=document.querySelector(t.selector);if(!s)throw U(1,t.selector);s.remove(),t.element=s}else if(t.template){let s=document.createRange().createContextualFragment(Yt(t.template));t.element=s}else t.json&&(t.element=Ue(t.json,t.isSVG,e.config),o=!0);t.element||(t.element=document.createDocumentFragment()),(e.useInterpolation??!0)&&qt(t.element,e.config??ce.getDefault());let r=t.element;if(!o&&((t.isSVG??(ot(r)&&r.hasAttribute?.("isSVG")))||ot(r)&&r.querySelector("[isSVG]"))){let s=r.content,a=s?[...s.childNodes]:[...r.childNodes],i=Ze(a);t.element=Ue(i,!0,e.config)}return{context:n,template:t.element,inheritAttrs:e.inheritAttrs??!0,props:e.props,defaultName:e.defaultName}};var Oe=(t,e)=>{throw new Error(`Invalid prop "${t}": ${e}.`)},Qs=t=>{if(t===null)return"null";if(t===void 0)return"undefined";if(typeof t=="string")return"string";if(typeof t=="number")return"number";if(typeof t=="boolean")return"boolean";if(typeof t=="bigint")return"bigint";if(typeof t=="symbol")return"symbol";if(typeof t=="function")return"function";if(v(t))return"array";if(t instanceof Date)return"Date";if(t instanceof RegExp)return"RegExp";if(t instanceof Map)return"Map";if(t instanceof Set)return"Set";let e=t?.constructor?.name;return e&&e!=="Object"?e:"object"},Xs=t=>typeof t=="string"?`"${t}"`:typeof t=="number"||typeof t=="boolean"?String(t):t===null?"null":t===void 0?"undefined":Qs(t),Ys=(t,e)=>{typeof t!="string"&&Oe(e,"expected string")},Zs=(t,e)=>{typeof t!="number"&&Oe(e,"expected number")},ei=(t,e)=>{typeof t!="boolean"&&Oe(e,"expected boolean")},ti=t=>(e,n)=>{e instanceof t||Oe(n,`expected instance of ${t.name||"provided class"}`)},ni=t=>(e,n,o)=>{e!==void 0&&t(e,n,o)},oi=t=>(e,n,o)=>{e!==null&&t(e,n,o)},ri=t=>(e,n)=>{t.includes(e)||Oe(n,`expected one of ${t.map(o=>Xs(o)).join(", ")}`)},si=t=>(e,n,o)=>{v(e)||Oe(n,"expected array");let r=e;for(let s=0;s<r.length;++s)t(r[s],`${n}[${s}]`,o)},ii=t=>(e,n,o)=>{M(e)||Oe(n,"expected object");let r=e;for(let s in t){let a=t[s];a(r[s],`${n}.${s}`,o)}},ai=t=>(e,n,o)=>{x(e)||Oe(n,"expected ref"),t(e(),`${n}.value`,o)},ir={isString:Ys,isNumber:Zs,isBoolean:ei,isClass:ti,optional:ni,nullable:oi,oneOf:ri,arrayOf:si,shape:ii,refOf:ai};var Zt=class{byConstructor=new Map;register(e){this.byConstructor.set(e.constructor,e)}unregisterByClass(e){this.byConstructor.delete(e)}unregister(e){let n=e.constructor;this.byConstructor.get(n)===e&&this.byConstructor.delete(n)}find(e){for(let n of this.byConstructor.values())if(n instanceof e)return n}require(e){let n=this.find(e);if(n)return n;throw new Error(`${e.name} is not registered in ContextRegistry.`)}};var ar=t=>{ke()?.onMounted.push(t)};var cr=t=>{let e,n={},o=(...r)=>{if(r.length<=2&&0 in r)throw U(4);return e&&!n.isStopped?e(...r):(e=ci(t,n),e(...r))};return o[Q]=1,Ne(o,!0),o.stop=()=>n.ref?.stop?.(),te(()=>o.stop(),!0),o},ci=(t,e)=>{let n=e.ref??se(null);e.ref=n,e.isStopped=!1;let o=0,r=Ve(()=>{if(o>0){r(),e.isStopped=!0,J(n);return}n(t()),++o});return n.stop=r,n};var ur=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw U(4);return o&&!n.isStopped?o(...s):(o=ui(t,e,n),o(...s))};return r[Q]=1,Ne(r,!0),r.stop=()=>n.ref?.stop?.(),te(()=>r.stop(),!0),r},ui=(t,e,n)=>{let o=n.ref??se(null);n.ref=o,n.isStopped=!1;let r=0,s=i=>{if(r>0){o.stop(),n.isStopped=!0,J(o);return}let c=t.map(l=>l());o(e(...c)),++r},a=[];for(let i of t){let c=ne(i,s);a.push(c)}return s(null),o.stop=()=>{a.forEach(i=>{i()})},o};var lr=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw U(4);return o&&!n.isStopped?o(...s):(o=li(t,e,n),o(...s))};return r[Q]=1,Ne(r,!0),r.stop=()=>n.ref?.stop?.(),te(()=>r.stop(),!0),r},li=(t,e,n)=>{let o=n.ref??se(null);n.ref=o,n.isStopped=!1;let r=0;return o.stop=ne(t,s=>{if(r>0){o.stop(),n.isStopped=!0,J(o);return}o(e(s)),++r},!0),o};var fr=t=>(t[Rt]=1,t);var pr=(t,e)=>{if(!e)throw U(5);let o=Ie(t)?ye:i=>i,r=()=>localStorage.setItem(e,JSON.stringify(ie(t()))),s=localStorage.getItem(e);if(s!=null)try{t(o(JSON.parse(s)))}catch(i){D(6,`persist: failed to parse data for key ${e}`,i),r()}else r();let a=Ve(r);return te(a,!0),t};var Un=(t,...e)=>{let n="",o=t,r=e,s=o.length,a=r.length;for(let i=0;i<s;++i)n+=o[i],i<a&&(n+=r[i]);return n},mr=Un;var dr=(t,e,n)=>{let o=[],r=()=>{e(t.map(a=>a()))};for(let a of t)o.push(ne(a,r));n&&r();let s=()=>{for(let a of o)a()};return te(s,!0),s};var hr=t=>{if(!x(t))throw U(3,"observerCount");return t(void 0,void 0,2)};var yr=t=>{Hn();try{t()}finally{Bn()}},Hn=()=>{he.stack||(he.stack=[]),he.stack.push(new Set)},Bn=()=>{let t=he.stack;if(!t||t.length===0)return;let e=t.pop();if(t.length){let n=t[t.length-1];for(let o of e)n.add(o);return}delete he.stack;for(let n of e)try{J(n)}catch(o){console.error(o)}};return vr(fi);})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "regor",
3
- "version": "1.4.5",
3
+ "version": "1.4.6",
4
4
  "description": "A modern UI framework for web and desktop applications, inspired by Vue's concepts and powered by simplicity and flexibility.",
5
5
  "author": "Ahmed Yasin Koculu",
6
6
  "license": "MIT",