regor 1.7.1 → 1.7.2

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