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