regor 1.7.1 → 1.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4159,6 +4159,9 @@ function autoPrefix(style, rawName) {
4159
4159
  return rawName;
4160
4160
  }
4161
4161
 
4162
+ // src/bind/rgi.ts
4163
+ var rgi = "r-rgi";
4164
+
4162
4165
  // src/misc/flatten.ts
4163
4166
  var flatten = (reference) => {
4164
4167
  return flattenContent(unref(reference));
@@ -4166,6 +4169,8 @@ var flatten = (reference) => {
4166
4169
  var flattenContent = (value, weakMap = /* @__PURE__ */ new WeakMap()) => {
4167
4170
  if (!value) return value;
4168
4171
  if (!isObject(value)) return value;
4172
+ if (value instanceof Node || value instanceof Date || value instanceof RegExp || value instanceof Promise || value instanceof Error)
4173
+ return value;
4169
4174
  if (isArray(value)) {
4170
4175
  return value.map(flatten);
4171
4176
  }
@@ -4198,12 +4203,32 @@ var updateText = (el, values) => {
4198
4203
  const value = values[0];
4199
4204
  el.textContent = isSet(value) ? JSON.stringify(flatten([...value])) : isMap(value) ? JSON.stringify(flatten([...value])) : isObject(value) ? JSON.stringify(flatten(value)) : (_a = value == null ? void 0 : value.toString()) != null ? _a : "";
4200
4205
  };
4206
+ var moveBindData = (from, to) => {
4207
+ const bindableFrom = from;
4208
+ const bindData = bindableFrom[bindDataSymbol];
4209
+ if (!bindData) return;
4210
+ to[bindDataSymbol] = bindData;
4211
+ bindableFrom[bindDataSymbol] = void 0;
4212
+ };
4213
+ var createInterpolationTextNode = (el) => {
4214
+ if (el.tagName !== "SPAN") return el;
4215
+ if (!el.hasAttribute(rgi)) return el;
4216
+ const parent = el.parentNode;
4217
+ if (!parent) return el;
4218
+ const textNode = el.ownerDocument.createTextNode("");
4219
+ moveBindData(el, textNode);
4220
+ parent.replaceChild(textNode, el);
4221
+ return textNode;
4222
+ };
4201
4223
  var textDirective = {
4202
- mount: () => ({
4203
- update: ({ el, values }) => {
4204
- updateText(el, values);
4205
- }
4206
- })
4224
+ mount: ({ el }) => {
4225
+ const target = createInterpolationTextNode(el);
4226
+ return {
4227
+ update: ({ values }) => {
4228
+ updateText(target, values);
4229
+ }
4230
+ };
4231
+ }
4207
4232
  };
4208
4233
 
4209
4234
  // src/directives/value.ts
@@ -4254,6 +4279,11 @@ function ref(value) {
4254
4279
  return result;
4255
4280
  }
4256
4281
 
4282
+ // src/reactivity/cref.ts
4283
+ function cref(value) {
4284
+ return ref(flatten(value));
4285
+ }
4286
+
4257
4287
  // src/app/RegorConfig.ts
4258
4288
  var _RegorConfig = class _RegorConfig {
4259
4289
  constructor(globalContext) {
@@ -4314,6 +4344,7 @@ var _RegorConfig = class _RegorConfig {
4314
4344
  obj[key] = global[key];
4315
4345
  }
4316
4346
  obj.ref = ref;
4347
+ obj.cref = cref;
4317
4348
  obj.sref = sref;
4318
4349
  obj.flatten = flatten;
4319
4350
  return obj;
@@ -4441,6 +4472,7 @@ var interpolateTextNode = (textNode, textDirective2, interpolationRegex, delimit
4441
4472
  const delimiter = getInterpolationDelimiter(part, delimiters);
4442
4473
  if (delimiter) {
4443
4474
  const spanTag = document.createElement("span");
4475
+ spanTag.setAttribute(rgi, "");
4444
4476
  spanTag.setAttribute(
4445
4477
  textDirective2,
4446
4478
  part.substring(
@@ -7010,6 +7042,7 @@ export {
7010
7042
  computeRef,
7011
7043
  computed,
7012
7044
  createApp,
7045
+ cref,
7013
7046
  defineComponent,
7014
7047
  drainUnbind,
7015
7048
  endBatch,
@@ -1,3 +1,3 @@
1
- var Ro=Object.defineProperty,wo=Object.defineProperties;var vo=Object.getOwnPropertyDescriptors;var Yn=Object.getOwnPropertySymbols;var So=Object.prototype.hasOwnProperty,Ao=Object.prototype.propertyIsEnumerable;var Ct=Math.pow,ln=(t,e,n)=>e in t?Ro(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Et=(t,e)=>{for(var n in e||(e={}))So.call(e,n)&&ln(t,n,e[n]);if(Yn)for(var n of Yn(e))Ao.call(e,n)&&ln(t,n,e[n]);return t},Zn=(t,e)=>wo(t,vo(e));var p=(t,e,n)=>ln(t,typeof e!="symbol"?e+"":e,n);var er=(t,e,n)=>new Promise((r,o)=>{var s=c=>{try{a(n.next(c))}catch(f){o(f)}},i=c=>{try{a(n.throw(c))}catch(f){o(f)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(s,i);a((n=n.apply(t,e)).next())});var ze=Symbol(":regor");var Ee=t=>{let e=[t];for(let n=0;n<e.length;++n){let r=e[n];No(r);for(let o=r.lastChild;o!=null;o=o.previousSibling)e.push(o)}},No=t=>{let e=t[ze];if(!e)return;let n=e.unbinders;for(let r=0;r<n.length;++r)n[r]();n.length=0,t[ze]=void 0};var Ke=[],Rt=!1,wt,tr=()=>{if(Rt=!1,wt=void 0,Ke.length!==0){for(let t=0;t<Ke.length;++t)Ee(Ke[t]);Ke.length=0}},ee=t=>{t.remove(),Ke.push(t),Rt||(Rt=!0,wt=setTimeout(tr,1))},Mo=()=>er(null,null,function*(){Ke.length===0&&!Rt||(wt&&clearTimeout(wt),tr())});var W=t=>typeof t=="function",G=t=>typeof t=="string",nr=t=>typeof t=="undefined",pe=t=>t==null||typeof t=="undefined",j=t=>typeof t!="string"||!(t!=null&&t.trim()),Oo=Object.prototype.toString,fn=t=>Oo.call(t),ke=t=>fn(t)==="[object Map]",fe=t=>fn(t)==="[object Set]",pn=t=>fn(t)==="[object Date]",it=t=>typeof t=="symbol",S=Array.isArray,P=t=>t!==null&&typeof t=="object";var rr={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."},q=(t,...e)=>{let n=rr[t];return new Error(W(n)?n.call(rr,...e):n)};var vt=[],or=()=>{let t={onMounted:[],onUnmounted:[]};return vt.push(t),t},Ue=t=>{let e=vt[vt.length-1];if(!e&&!t)throw q(2);return e},sr=t=>{let e=Ue();return t&&dn(t),vt.pop(),e},mn=Symbol("csp"),dn=t=>{let e=t,n=e[mn];if(n){let r=Ue();if(n===r)return;r.onMounted.length>0&&n.onMounted.push(...r.onMounted),r.onUnmounted.length>0&&n.onUnmounted.push(...r.onUnmounted);return}e[mn]=Ue()},St=t=>t[mn];var Le=t=>{var n,r;let e=(n=St(t))==null?void 0:n.onUnmounted;e==null||e.forEach(o=>{o()}),(r=t.unmounted)==null||r.call(t)};var ir={8:t=>`Model binding requires a ref at ${t.outerHTML}`,7:t=>`Model binding is not supported on ${t.tagName} element at ${t.outerHTML}`,0:(t,e)=>`${t} binding expression is missing at ${e.outerHTML}`,1:(t,e,n)=>`invalid ${t} expression: ${e} at ${n.outerHTML}`,2:(t,e)=>`${t} requires object expression at ${e.outerHTML}`,3:(t,e)=>`${t} binder: key is empty on ${e.outerHTML}.`,4:(t,e,n,r)=>({msg:`Failed setting prop "${t}" on <${e.toLowerCase()}>: value ${n} is invalid.`,args:[r]}),5:(t,e)=>`${t} binding missing event type at ${e.outerHTML}`,6:(t,e)=>({msg:t,args:[e]})},_=(t,...e)=>{let n=ir[t],r=W(n)?n.call(ir,...e):n,o=We.warning;o&&(G(r)?o(r):o(r,...r.args))},We={warning:console.warn};var At=Symbol("ref"),J=Symbol("sref"),Nt=Symbol("raw");var E=t=>t!=null&&t[J]>0;var Ie=class extends Error{constructor(n,r){super(r);p(this,"propPath");p(this,"detail");this.name="PropValidationError",this.propPath=n,this.detail=r}},ge=(t,e)=>{throw new Ie(t,`${e}.`)},Mt=t=>{var n;if(t===null)return"null";if(t===void 0)return"undefined";if(E(t))return`ref<${Mt(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(S(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=(n=t==null?void 0:t.constructor)==null?void 0:n.name;return e&&e!=="Object"?e:"object"},ko=t=>t.length>60?`${t.slice(0,57)}...`:t,at=(t,e=0)=>{if(e>1)return"unknown";if(E(t)){let s=t();return`ref(${at(s,e+1)})`}if(typeof t=="string")return ko(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(S(t)){let s=t.slice(0,5).map(i=>at(i,e+1)).join(", ");return t.length>5?`[${s}, ...]`:`[${s}]`}if(P(t)){let s=Object.entries(t).slice(0,5);if(s.length===0)return"{}";let i=s.map(([a,c])=>{let f=at(c,e+1);return`${a}: ${f}`}).join(", ");return Object.keys(t).length>5?`{ ${i}, ... }`:`{ ${i} }`}return"unknown"},ue=t=>{if(E(t))return`got ${Mt(t)}(${at(t())})`;let e=Mt(t),n=at(t);return`got ${e} (${n})`},Lo=t=>t instanceof Ie?t.detail:t instanceof Error?t.message:String(t),ar=(t,e)=>{let n=`, ${ue(e)}.`;return t.endsWith(n)?t.slice(0,-n.length):t},Io=(t,e,n)=>{if(e instanceof Ie){if(e.propPath===t)return ar(e.detail,n);if(e.propPath===`${t}.value`&&E(n)){let r=ar(e.detail,n());return r.startsWith("expected ")?`expected ref<${r.slice(9)}>`:`expected ref where ${r}`}}return Lo(e)},Vo=(t,e,n)=>{let r=[];for(let o of e){let s=Io(t,o,n);r.includes(s)||r.push(s)}return r.length===0?ue(n):r.length===1?`${r[0]}, ${ue(n)}`:`${r.join(" or ")}, ${ue(n)}`},Po=t=>typeof t=="string"?`"${t}"`:typeof t=="number"||typeof t=="boolean"?String(t):t===null?"null":t===void 0?"undefined":Mt(t),Do=(t,e)=>{typeof t!="string"&&ge(e,`expected string, ${ue(t)}`)},Uo=(t,e)=>{typeof t!="number"&&ge(e,`expected number, ${ue(t)}`)},Ho=(t,e)=>{typeof t!="boolean"&&ge(e,`expected boolean, ${ue(t)}`)},Bo=t=>(e,n)=>{e instanceof t||ge(n,`expected instance of ${t.name||"provided class"}, ${ue(e)}`)},$o=t=>(e,n,r)=>{e!==void 0&&t(e,n,r)},jo=t=>(e,n,r)=>{e!==null&&t(e,n,r)},_o=(...t)=>(e,n,r)=>{let o=[];for(let s of t)try{s(e,n,r);return}catch(i){o.push(i)}ge(n,Vo(n,o,e))},Fo=t=>(e,n)=>{t.includes(e)||ge(n,`expected one of ${t.map(r=>Po(r)).join(", ")}, ${ue(e)}`)},qo=t=>(e,n,r)=>{S(e)||ge(n,`expected array, ${ue(e)}`);let o=e;for(let s=0;s<o.length;++s)t(o[s],`${n}[${s}]`,r)};function zo(t){return(e,n,r)=>{P(e)||ge(n,`expected object, ${ue(e)}`);let o=e;for(let s in t){let i=t[s];if(!i)continue;i(o[s],`${n}.${s}`,r)}}}var Ko=t=>(e,n,r)=>{if(E(e)){t(e(),`${n}.value`,r);return}ge(n,`expected ref, ${ue(e)}`)},Wo={fail:ge,describe:ue,isString:Do,isNumber:Uo,isBoolean:Ho,isClass:Bo,optional:$o,nullable:jo,or:_o,oneOf:Fo,arrayOf:qo,shape:zo,refOf:Ko};var Go=(t,e,n)=>{var i,a;let r=((a=(i=t.tagName)==null?void 0:i.toLowerCase)==null?void 0:a.call(i))||"unknown",o=n instanceof Ie?n.propPath:e,s=n instanceof Ie?n.detail:n instanceof Error?n.message:String(n);return n instanceof Error?new Error(`Invalid prop "${o}" on <${r}>: ${s}`,{cause:n}):new Error(`Invalid prop "${o}" on <${r}>: ${s}`,{cause:n})},ct=class{constructor(e,n,r,o,s,i){p(this,"props");p(this,"start");p(this,"end");p(this,"ctx");p(this,"autoProps",!0);p(this,"entangle",!0);p(this,"enableSwitch",!1);p(this,"onAutoPropsAssigned");p(this,"J");p(this,"Q");p(this,"emit",(e,n)=>{this.J.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.J=n,this.ctx=r,this.start=o,this.end=s,this.Q=i}findContext(e,n=0){var o;if(n<0)return;let r=0;for(let s of(o=this.ctx)!=null?o:[])if(s instanceof e){if(r===n)return s;++r}}requireContext(e,n=0){let r=this.findContext(e,n);if(r!==void 0)return r;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 r in e){let o=e[r];if(!o)continue;let s=o;try{s(n[r],r,this)}catch(i){let a=Go(this.J,r,i);if(this.Q==="warn"){We.warning(a.message,a);continue}throw a}}}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)ee(e),e=e.nextSibling;for(let r of this.ctx)Le(r)}};var He=t=>{let e=t,n=e[ze];if(n)return n;let r={unbinders:[],data:{}};return e[ze]=r,r};var Q=(t,e)=>{He(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 kt={},Ot={},cr=1,ur=t=>{let e=(cr++).toString();return kt[e]=t,Ot[e]=0,e},hn=t=>{Ot[t]+=1},yn=t=>{--Ot[t]===0&&(delete kt[t],delete Ot[t])},lr=t=>kt[t],gn=()=>cr!==1&&Object.keys(kt).length>0,ut="r-switch",Jo=t=>{let e=t.filter(r=>Re(r)).map(r=>[...r.querySelectorAll("[r-switch]")].map(o=>o.getAttribute(ut))),n=new Set;return e.forEach(r=>{r.forEach(o=>o&&n.add(o))}),[...n]},Ge=(t,e)=>{if(!gn())return;let n=Jo(e);n.length!==0&&(n.forEach(hn),Q(t,()=>{n.forEach(yn)}))};var Lt=()=>{},bn=(t,e,n,r)=>{let o=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,r),o.push(i)}Ve(e,o)},Tn=Symbol("r-if"),fr=Symbol("r-else"),pr=t=>t[fr]===1,It=class{constructor(e){p(this,"r");p(this,"M");p(this,"xe");p(this,"X");p(this,"Y");p(this,"T");p(this,"R");this.r=e,this.M=e.o.u.if,this.xe=Pt(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 r=e.parentElement;for(;r!==null&&r!==document.documentElement;){if(r.hasAttribute(n))return!0;r=r.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.E.Z(e)||this.r.E.j(e,o=>{o.hasAttribute(this.M)&&this.y(o)}),n}ee(e){return e[Tn]?!0:(e[Tn]=!0,Vt(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,r){let o=Je(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${r!=null?r:""}`);s.insertBefore(i,e),Ge(i,o),o.forEach(c=>{ee(c)}),e.remove(),n!=="if"&&(e[fr]=1);let a=document.createComment(`__end__ :${n}${r!=null?r:""}`);return s.insertBefore(a,i.nextSibling),{nodes:o,parent:s,commentBegin:i,commentEnd:a}}Re(e,n){if(!e)return[];let r=e.nextElementSibling;if(e.hasAttribute(this.X)){e.removeAttribute(this.X);let{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"else");return[{mount:()=>{bn(o,this.r,s,a)},unmount:()=>{we(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let o=e.getAttribute(this.Y);if(!o)return[];e.removeAttribute(this.Y);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.U(e,"elseif",` => ${o} `),f=this.r.m.O(o),u=f.value,l=this.Re(r,n),m=Lt;return Q(a,()=>{f.stop(),m(),m=Lt}),m=f.subscribe(n),[{mount:()=>{bn(s,this.r,i,c)},unmount:()=>{we(a,c)},isTrue:()=>Be(u()[0]),isMounted:!1},...l]}}N(e,n){let r=e.nextElementSibling,{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"if",` => ${n} `),c=this.r.m.O(n),f=c.value,u=!1,l=this.r.m,m=l.L(),y=()=>{l.C(m,()=>{if(Be(f()[0]))u||(bn(o,this.r,s,a),u=!0),x.forEach(C=>{C.unmount(),C.isMounted=!1});else{we(i,a),u=!1;let C=!1;for(let b of x)!C&&b.isTrue()?(b.isMounted||(b.mount(),b.isMounted=!0),C=!0):(b.unmount(),b.isMounted=!1)}})},x=this.Re(r,y),d=Lt;Q(i,()=>{c.stop(),d(),d=Lt}),y(),d=c.subscribe(y)}};var Je=t=>{let e=me(t)?t.content.childNodes:[t],n=[];for(let r=0;r<e.length;++r){let o=e[r];if(o.nodeType===1){let s=o==null?void 0:o.tagName;if(s==="SCRIPT"||s==="STYLE")continue}n.push(o)}return n},Ve=(t,e)=>{for(let n=0;n<e.length;++n){let r=e[n];r.nodeType===Node.ELEMENT_NODE&&(pr(r)||t.$(r))}},Vt=(t,e)=>{var r;let n=t.querySelectorAll(e);return(r=t.matches)!=null&&r.call(t,e)?[t,...n]:n},me=t=>t instanceof HTMLTemplateElement,Re=t=>t.nodeType===Node.ELEMENT_NODE,lt=t=>t.nodeType===Node.ELEMENT_NODE,mr=t=>t instanceof HTMLSlotElement,ve=t=>me(t)?t.content.childNodes:t.childNodes,we=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let r=n.nextSibling;ee(n),n=r}},dr=function(){return this()},Qo=function(t){return this(t)},Xo=()=>{throw new Error("value is readonly.")},Yo={get:dr,set:Qo,enumerable:!0,configurable:!1},Zo={get:dr,set:Xo,enumerable:!0,configurable:!1},Pe=(t,e)=>{t[J]=e?2:1,Object.defineProperty(t,"value",e?Zo:Yo)},hr=(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},Pt=t=>`[${CSS.escape(t)}]`,Dt=(t,e)=>(t.startsWith("@")&&(t=e.u.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.u.dynamic)),t),xn=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},es=/-(\w)/g,z=xn(t=>t&&t.replace(es,(e,n)=>n?n.toUpperCase():"")),ts=/\B([A-Z])/g,Qe=xn(t=>t&&t.replace(ts,"-$1").toLowerCase()),ft=xn(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var Ut={mount:()=>{}};var Xe=t=>{let e=t.trim();return e?e.split(/\s+/):[]};var Ht=t=>{var n,r;let e=(n=St(t))==null?void 0:n.onMounted;e==null||e.forEach(o=>{o()}),(r=t.mounted)==null||r.call(t)};var Cn=Symbol("scope"),En=t=>{try{or();let e=t();dn(e);let n={context:e,unmount:()=>Le(e),[Cn]:1};return n[Cn]=1,n}finally{sr()}},yr=t=>P(t)?Cn in t:!1;var v=t=>{let e=t;return e!=null&&e[J]>0?e():e};var gr="http://www.w3.org/1999/xlink",ns={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},rs=(t,e,n,r,o,s)=>{var a;if(r){r=v(r),s&&s.includes("camel")&&(r=z(r)),Ye(t,r,v(e[0]),v(o));return}let i=e.length;for(let c=0;c<i;++c){let f=e[c];if(S(f)){let u=v((a=n==null?void 0:n[c])==null?void 0:a[0]),l=v(f[0]),m=v(f[1]);Ye(t,l,m,u)}else if(P(f))for(let u of Object.entries(f)){let l=u[0],m=v(u[1]),y=v(n==null?void 0:n[c]),x=y&&l in y?l:void 0;Ye(t,l,m,x)}else{let u=v(n==null?void 0:n[c]),l=v(e[c++]),m=v(e[c]);Ye(t,l,m,u)}}},Rn={mount:()=>({update:({el:t,values:e,previousValues:n,option:r,previousOption:o,flags:s})=>{rs(t,e,n,r,o,s)}})},Ye=(t,e,n,r)=>{if(r&&r!==e&&t.removeAttribute(r),pe(e)){_(3,"r-bind",t);return}if(!G(e)){_(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){pe(n)?t.removeAttributeNS(gr,e.slice(6,e.length)):t.setAttributeNS(gr,e,n);return}if(pe(n)){t.removeAttribute(e);return}if(e in ns){Be(n)?t.setAttribute(e,""):t.removeAttribute(e);return}t.setAttribute(e,n)};var wn={collectRefObj:!0,mount:({parseResult:t})=>({update:({values:e})=>{let n=t.context,r=e[0];if(P(r))for(let o of Object.entries(r)){let s=o[0],i=o[1],a=n[s];a!==i&&(E(a)?a(i):n[s]=i)}}})};var ce=(t,e)=>{var n;(n=Ue(e))==null||n.onUnmounted.push(t)};var se=(t,e,n,r=!0)=>{if(!E(t))throw q(3,"observe");n&&e(t());let s=t(void 0,void 0,0,e);return r&&ce(s,!0),s};var br=t=>t[J]===2,pt=(t,e)=>{if(t===e)return()=>{};let n=br(t),r=br(e);if(n&&r)return()=>{};if(n){let i=se(t,()=>e(t()));return e(t()),i}if(r){let i=se(e,()=>t(e()));return t(e()),i}let o=se(t,i=>e(i)),s=se(e,i=>t(i));return e(t()),()=>{o(),s()}};var de=[],Tr=t=>{var e;de.length!==0&&((e=de[de.length-1])==null||e.add(t))},Ze=t=>{if(!t)return()=>{};let e={stop:()=>{}};return os(t,e),ce(()=>e.stop(),!0),e.stop},os=(t,e)=>{if(!t)return;let n=[],r=!1,o=()=>{for(let s of n)s();n=[],r=!0};e.stop=o;try{let s=new Set;if(de.push(s),t(i=>n.push(i)),r)return;for(let i of[...s]){let a=se(i,()=>{o(),Ze(t)});n.push(a)}}finally{de.pop()}},vn=t=>{let e=de.length,n=e>0&&de[e-1];try{return n&&de.push(null),t()}finally{n&&de.pop()}},Sn=t=>{try{let e=new Set;return de.push(e),{value:t(),refs:[...e]}}finally{de.pop()}};var mt=t=>!!t&&t[Nt]===1;var te=(t,e,n)=>{if(!E(t))return;let r=t;if(r(void 0,e,1),!n)return;let o=r();if(o){if(S(o)||fe(o))for(let s of o)te(s,e,!0);else if(ke(o))for(let s of o)te(s[0],e,!0),te(s[1],e,!0);if(P(o))for(let s in o)te(o[s],e,!0)}};function ss(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var et=(t,e,n)=>{n.forEach(function(r){let o=t[r];ss(e,r,function(...i){let a=o.apply(this,i),c=this[J];for(let f of c)te(f);return a})})},Bt=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var xr=Array.prototype,An=Object.create(xr),is=["push","pop","shift","unshift","splice","sort","reverse"];et(xr,An,is);var Cr=Map.prototype,$t=Object.create(Cr),as=["set","clear","delete"];Bt($t,"Map");et(Cr,$t,as);var Er=Set.prototype,jt=Object.create(Er),cs=["add","clear","delete"];Bt(jt,"Set");et(Er,jt,cs);var be={},ie=t=>{if(E(t)||mt(t))return t;let e={auto:!0,_value:t},n=c=>P(c)?J in c?!0:S(c)?(Object.setPrototypeOf(c,An),!0):fe(c)?(Object.setPrototypeOf(c,jt),!0):ke(c)?(Object.setPrototypeOf(c,$t),!0):!1:!1,r=n(t),o=new Set,s=(c,f)=>{if(be.stack&&be.stack.length){be.stack[be.stack.length-1].add(a);return}o.size!==0&&vn(()=>{for(let u of[...o.keys()])o.has(u)&&u(c,f)})},i=c=>{let f=c[J];f||(c[J]=f=new Set),f.add(a)},a=(...c)=>{if(!(2 in c)){let u=c[0],l=c[1];return 0 in c?e._value===u||E(u)&&(u=u(),e._value===u)?u:(n(u)&&i(u),e._value=u,e.auto&&s(u,l),e._value):(Tr(a),e._value)}switch(c[2]){case 0:{let u=c[3];if(!u)return()=>{};let l=m=>{o.delete(m)};return o.add(u),()=>{l(u)}}case 1:{let u=c[1],l=e._value;s(l,u);break}case 2:return o.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return Pe(a,!1),r&&i(t),a};var Rr=Symbol("modelBridge"),_t=()=>{},us=t=>!!(t!=null&&t[Rr]),ls=t=>{t[Rr]=1},fs=t=>{let e=ie(t());return ls(e),e},wr={collectRefObj:!0,mount:({parseResult:t,option:e})=>{if(typeof e!="string"||!e)return _t;let n=z(e),r,o,s=_t,i=()=>{s(),s=_t,r=void 0,o=void 0},a=()=>{s(),s=_t},c=(u,l)=>{r!==u&&(a(),s=pt(u,l),r=u)},f=()=>{var y;let u=(y=t.refs[0])!=null?y:t.value()[0],l=t.context,m=l[n];if(!E(u)){if(o&&m===o){o(u);return}if(i(),E(m)){m(u);return}l[n]=ie(u);return}if(us(u)){if(m===u)return;E(m)?c(u,m):l[n]=u;return}o||(o=fs(u)),l[n]=o,c(u,o)};return{update:()=>{f()},unmount:()=>{s()}}}};var Ft=class{constructor(e){p(this,"r");p(this,"_");p(this,"Ee","");p(this,"Ce",-1);this.r=e,this._=e.o.u.inherit}k(e){this.st(e)}it(e){if(this.Ce!==e.size){let n=[...e.keys()];this.Ee=[...n,...n.map(Qe)].join(","),this.Ce=e.size}return this.Ee}ct(e){var n;for(let r=0;r<e.length;++r){let o=(n=e[r])==null?void 0:n.components;if(o)for(let s in o)return!0}return!1}ut(e){if(!me(e))return!1;let n=e.getAttributeNames();return e.hasAttribute("name")?!0:n.some(r=>r.startsWith("#"))}pt(e){return me(e)&&e.getAttributeNames().length===0}st(e){var f,u;let n=this.r,r=n.m,o=n.o.te,s=n.o.F;if(o.size===0&&!this.ct(r.l))return;let i=r.ne(),a=this.re();if(j(a))return;let c=this.lt(e,a);for(let l of c){if(l.hasAttribute(n.R))continue;let m=l.parentNode;if(!m)continue;let y=l.nextSibling,x=z(l.tagName).toUpperCase(),d=i[x],w=d!=null?d:s.get(x);if(!w)continue;let C=w.template;if(!C)continue;let b=l.parentElement;if(!b)continue;let M=new Comment(" begin component: "+l.tagName),D=new Comment(" end component: "+l.tagName);b.insertBefore(M,l),l.remove();let U=n.o.u.context,I=n.o.u.contextAlias,ne=n.o.u.bind,K=(u=(f=w.props)==null?void 0:f.map(z))!=null?u:[],A=[],T=h=>h==="class"||h==="style",V=(h,k,N=!1)=>{let Y={},$=h.hasAttribute(U);return r.C(k,()=>{if(r.v(Y),$?n.y(wn,h,U):h.hasAttribute(I)&&n.y(wn,h,I),K.length===0)return;let Z=new Map(K.map(g=>[g.toLowerCase(),g]));for(let g of[...K,...K.map(Qe)]){let L=h.getAttribute(g);if(L===null)continue;let B=z(g);Y[B]=L,N&&w.inheritAttrs===!0&&T(B)&&A.push({name:g,value:L}),h.removeAttribute(g)}let R=n.q.we(h,!1);for(let[g,L]of R.entries()){let[B,oe]=L.oe;if(!oe)continue;let Ce=Z.get(z(oe).toLowerCase());if(Ce&&!(B!=="."&&B!==":"&&B!==ne)){if(N&&B!=="."&&w.inheritAttrs===!0&&T(Ce)){let Xn=h.getAttribute(g);Xn!==null&&A.push({name:g,value:Xn})}n.y(wr,h,g,!0,Ce,L.se)}}}),Y},F=[...r.L()],qe=()=>{var Y;let h=V(l,F,!0),k=new ct(h,l,F,M,D,n.o.propValidationMode),N=En(()=>{var $;return($=w.context(k))!=null?$:{}}).context;if(k.autoProps){for(let[$,Z]of Object.entries(h))if($ in N){let R=N[$];if(R===Z)continue;if(E(R)){E(Z)?k.entangle?Q(M,pt(Z,R)):R(Z()):R(Z);continue}}else N[$]=Z;for(let $ of K)$ in N||(N[$]=void 0);(Y=k.onAutoPropsAssigned)==null||Y.call(k)}return{componentCtx:N,head:k}},{componentCtx:Te,head:Tt}=qe(),O=[...ve(C)],xt=O.length,H=l.childNodes.length===0,X=h=>{var Z;let k=h.parentElement,N=h.name;if(j(N)&&(N=h.getAttributeNames().filter(R=>R.startsWith("#"))[0],j(N)?N="default":N=N.substring(1)),H){if(N==="default"){let R=n.o.u.text,g=l.getAttribute(R);if(!j(g)){let L=document.createElement("span");L.setAttribute(R,g),k.insertBefore(L,h),l.removeAttribute(R);return}}for(let R of[...h.childNodes])k.insertBefore(R,h);return}let Y=l.querySelector(`template[name='${N}'], template[\\#${N}]`);!Y&&N==="default"&&(Y=(Z=[...l.querySelectorAll("template:not([name])")].find(g=>this.pt(g)))!=null?Z:null);let $=R=>{Tt.enableSwitch&&r.C(F,()=>{r.v(Te);let g=V(h,r.L());r.C(F,()=>{r.v(g);let L=r.L(),B=ur(L);for(let oe of R)Re(oe)&&(oe.setAttribute(ut,B),hn(B),Q(oe,()=>{yn(B)}))})})};if(Y){let R=[...ve(Y)];for(let g of R)k.insertBefore(g,h);$(R)}else{if(N!=="default"){for(let g of[...ve(h)])k.insertBefore(g,h);return}let R=[...ve(l)].filter(g=>!this.ut(g));for(let g of R)k.insertBefore(g,h);$(R)}},re=h=>{if(!Re(h))return;let k=h.querySelectorAll("slot");if(mr(h)){X(h),h.remove();return}for(let N of k)X(N),N.remove()};(()=>{for(let h=0;h<xt;++h)O[h]=O[h].cloneNode(!0),m.insertBefore(O[h],y),re(O[h])})(),b.insertBefore(D,y);let xe=()=>{if(!w.inheritAttrs)return;let h=O.filter(g=>g.nodeType===Node.ELEMENT_NODE),k=h.flatMap(g=>[...g.hasAttribute(this._)?[g]:[],...g.querySelectorAll(`[${this._}]`)]).at(0),N=k!=null?k:h.length===1?h[0]:void 0;if(!N)return;N.removeAttribute(this._);let Y=`${ne}:class`,$=`${ne}:style`,Z=(g,L,B)=>{let oe=N.hasAttribute(g)?g:N.hasAttribute(L)?L:g,Ce=N.getAttribute(oe);N.setAttribute(oe,j(Ce)?B:`${Ce}, ${B}`)},R=(g,L)=>{if(g==="class"){let B=Xe(L);B.length>0&&N.classList.add(...B)}else if(g===":class"||g===Y)Z(":class",Y,L);else if(g==="style"){let B=N.style,oe=l.style;for(let Ce of oe)B.setProperty(Ce,oe.getPropertyValue(Ce))}else if(g===":style"||g===$)Z(":style",$,L);else{let B=Dt(g,n.o);Ye(N,B,L)}};for(let{name:g,value:L}of A)l.setAttribute(g,L);for(let g of l.getAttributeNames())g===U||g===I||R(g,l.getAttribute(g))},Me=()=>{for(let h of l.getAttributeNames())!h.startsWith("@")&&!h.startsWith(n.o.u.on)&&l.removeAttribute(h)},Oe=()=>{xe(),Me(),r.v(Te),n.ve(l,!1),Te.$emit=Tt.emit,Ve(n,O),Q(l,()=>{Le(Te)}),Q(M,()=>{Ee(l)}),Ht(Te)};r.C(F,Oe)}}re(){let e=this.r,n=e.m,r=e.o.te,o=n.ft(),s=this.it(r);return[...s?[s]:[],...o,...o.map(Qe)].join(",")}Z(e){var r;let n=this.re();return!j(n)&&((r=e.matches)==null?void 0:r.call(e,n))}lt(e,n){var s;let r=[];if(j(n))return r;if((s=e.matches)!=null&&s.call(e,n))return[e];let o=this.K(e).reverse();for(;o.length>0;){let i=o.pop();if(i.matches(n)){r.push(i);continue}o.push(...this.K(i).reverse())}return r}j(e,n){let r=this.r,o=this.re(),s=r.o.u.is,i=this.K(e).reverse();for(;i.length>0;){let a=i.pop();n(a),!(!j(o)&&a.matches(o))&&(a.hasAttribute(s)||a.hasAttribute("is")||i.push(...this.K(a).reverse()))}}K(e){let n=e==null?void 0:e.children;if((n==null?void 0:n.length)!=null){let o=[];for(let s=0;s<n.length;++s){let i=n[s];Re(i)&&o.push(i)}return o}let r=e==null?void 0:e.childNodes;if((r==null?void 0:r.length)!=null){let o=[];for(let s=0;s<r.length;++s){let i=r[s];Re(i)&&o.push(i)}return o}return[]}};var Nn=class{constructor(e,n){p(this,"oe");p(this,"se");p(this,"Se",[]);this.oe=e,this.se=n}},qt=class{constructor(e){p(this,"r");p(this,"Ae");p(this,"Ve");p(this,"ie");var r;this.r=e,this.Ae=e.o.dt(),this.ie=new Map;let n=new Map;for(let o of this.Ae){let s=(r=o[0])!=null?r:"",i=n.get(s);i?i.push(o):n.set(s,[o])}this.Ve=n}ke(e){let n=this.ie.get(e);if(n)return n;let r=e,o=r.startsWith(".");o&&(r=":"+r.slice(1));let s=r.indexOf("."),a=(s<0?r:r.substring(0,s)).split(/[:@]/);j(a[0])&&(a[0]=o?".":r[0]);let c=s>=0?r.slice(s+1).split("."):[],f=!1,u=!1;for(let m=0;m<c.length;++m){let y=c[m];if(!f&&y==="camel"?f=!0:!u&&y==="prop"&&(u=!0),f&&u)break}f&&(a[a.length-1]=z(a[a.length-1])),u&&(a[0]=".");let l={terms:a,flags:c};return this.ie.set(e,l),l}we(e,n){let r=new Map;if(!lt(e))return r;let o=this.Ve,s=(a,c)=>{var u;let f=o.get((u=c[0])!=null?u:"");if(f)for(let l=0;l<f.length;++l){if(!c.startsWith(f[l]))continue;let m=r.get(c);if(!m){let y=this.ke(c);m=new Nn(y.terms,y.flags),r.set(c,m)}m.Se.push(a);return}},i=a=>{var f;let c=a.attributes;if(!(!c||c.length===0))for(let u=0;u<c.length;++u){let l=(f=c.item(u))==null?void 0:f.name;l&&s(a,l)}};return i(e),!n||!e.firstElementChild||this.r.E.j(e,i),r}};var vr=()=>{},ps=(t,e)=>{for(let n of t){let r=n.cloneNode(!0);e.appendChild(r)}},zt=class{constructor(e){p(this,"r");p(this,"I");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.E.Z(e)||this.r.E.j(e,r=>{(r.hasAttribute(this.I)||r.hasAttribute("is"))&&this.y(r)}),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 r=n.slice(2).trim().toLowerCase();if(!r)return;let o=e.parentNode;if(!o)return;let s=document.createElement(r);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);o.insertBefore(s,e),e.remove(),this.r.$(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.N(e,n)}U(e,n){let r=Je(e),o=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);o.insertBefore(s,e),Ge(s,r),r.forEach(a=>{ee(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n!=null?n:""}`);return o.insertBefore(i,s.nextSibling),{nodes:r,parent:o,commentBegin:s,commentEnd:i}}N(e,n){let{nodes:r,commentBegin:o,commentEnd:s}=this.U(e,` => ${n} `),i=this.r.m.O(n),a=i.value,c=this.r.m,f=c.L(),u={name:""},l=me(e)?r:[...r[0].childNodes],m=()=>{c.C(f,()=>{var b,M;let d=a()[0];if(P(d)&&(d.name?d=d.name:d=(b=Object.entries(c.ne()).filter(D=>D[1]===d)[0])==null?void 0:b[0]),!G(d)||j(d)){we(o,s);return}if(u.name===d)return;we(o,s);let w=(M=s.parentNode)!=null?M:o.parentNode;if(!w)return;let C=document.createElement(d);for(let D of e.getAttributeNames())D!==this.I&&C.setAttribute(D,e.getAttribute(D));ps(l,C),w.insertBefore(C,s),this.r.$(C),u.name=d})},y=vr;Q(o,()=>{i.stop(),y(),y=vr}),m(),y=i.subscribe(m)}};var ms=(t,e)=>{let[n,r]=e;W(r)?r(t,n):t.innerHTML=n==null?void 0:n.toString()},Kt={mount:()=>({update:({el:t,values:e})=>{ms(t,e)}})};var Wt=class t{constructor(e){p(this,"ae");this.ae=e}static mt(e,n){var y,x;let r=e.m,o=e.o,s=o.u,i=new Set([s.for,s.if,s.else,s.elseif,s.pre]),a=o.B,c=r.ne();if(Object.keys(c).length>0||o.F.size>0)return;let f=e.q,u=[],l=0,m=[];for(let d=n.length-1;d>=0;--d)m.push(n[d]);for(;m.length>0;){let d=m.pop();if(d.nodeType===Node.ELEMENT_NODE){let C=d;if(C.tagName==="TEMPLATE"||C.tagName.includes("-"))return;let b=z(C.tagName).toUpperCase();if(o.F.has(b)||c[b])return;let M=C.attributes;for(let D=0;D<M.length;++D){let U=(y=M.item(D))==null?void 0:y.name;if(!U)continue;if(i.has(U))return;let{terms:I,flags:ne}=f.ke(U),[K,A]=I,T=(x=a[U])!=null?x:a[K];if(T){if(T===Kt)return;u.push({nodeIndex:l,attrName:U,directive:T,option:A,flags:ne})}}++l}let w=d.childNodes;for(let C=w.length-1;C>=0;--C)m.push(w[C])}if(u.length!==0)return new t(u)}y(e,n){let r=[],o=[];for(let s=n.length-1;s>=0;--s)o.push(n[s]);for(;o.length>0;){let s=o.pop();s.nodeType===Node.ELEMENT_NODE&&r.push(s);let i=s.childNodes;for(let a=i.length-1;a>=0;--a)o.push(i[a])}for(let s=0;s<this.ae.length;++s){let i=this.ae[s],a=r[i.nodeIndex];a&&e.y(i.directive,a,i.attrName,!1,i.option,i.flags)}}};var ds=(t,e)=>{let n=e.parentNode;if(n)for(let r=0;r<t.items.length;++r)n.insertBefore(t.items[r],e)},hs=t=>{var a;let e=t.length,n=t.slice(),r=[],o,s,i;for(let c=0;c<e;++c){let f=t[c];if(f===0)continue;let u=r[r.length-1];if(u===void 0||t[u]<f){n[c]=u!=null?u:-1,r.push(c);continue}for(o=0,s=r.length-1;o<s;)i=o+s>>1,t[r[i]]<f?o=i+1:s=i;f<t[r[o]]&&(o>0&&(n[c]=r[o-1]),r[o]=c)}for(o=r.length,s=(a=r[o-1])!=null?a:-1;o-- >0;)r[o]=s,s=n[s];return r},Gt=class{static yt(e){let{oldItems:n,newValues:r,getKey:o,isSameValue:s,mountNewValue:i,removeMountItem:a,endAnchor:c}=e,f=n.length,u=r.length,l=new Array(u),m=new Set;for(let T=0;T<u;++T){let V=o(r[T]);if(V===void 0||m.has(V))return;m.add(V),l[T]=V}let y=new Array(u),x=0,d=f-1,w=u-1;for(;x<=d&&x<=w;){let T=n[x];if(o(T.value)!==l[x]||!s(T.value,r[x]))break;T.value=r[x],y[x]=T,++x}for(;x<=d&&x<=w;){let T=n[d];if(o(T.value)!==l[w]||!s(T.value,r[w]))break;T.value=r[w],y[w]=T,--d,--w}if(x>d){for(let T=w;T>=x;--T){let V=T+1<u?y[T+1].items[0]:c;y[T]=i(T,r[T],V)}return y}if(x>w){for(let T=x;T<=d;++T)a(n[T]);return y}let C=x,b=x,M=w-b+1,D=new Array(M).fill(0),U=new Map;for(let T=b;T<=w;++T)U.set(l[T],T);let I=!1,ne=0;for(let T=C;T<=d;++T){let V=n[T],F=U.get(o(V.value));if(F===void 0){a(V);continue}if(!s(V.value,r[F])){a(V);continue}V.value=r[F],y[F]=V,D[F-b]=T+1,F>=ne?ne=F:I=!0}let K=I?hs(D):[],A=K.length-1;for(let T=M-1;T>=0;--T){let V=b+T,F=V+1<u?y[V+1].items[0]:c;if(D[T]===0){y[V]=i(V,r[V],F);continue}let qe=y[V];I&&(A>=0&&K[A]===T?--A:qe&&ds(qe,F))}return y}};var dt=class{constructor(e){p(this,"x",[]);p(this,"P",new Map);p(this,"ce");this.ce=e}get S(){return this.x.length}ue(e){let n=this.ce(e.value);n!==void 0&&this.P.set(n,e)}pe(e){var r;let n=this.ce((r=this.x[e])==null?void 0:r.value);n!==void 0&&this.P.delete(n)}static ht(e,n){return{items:[],index:e,value:n,order:-1}}v(e){e.order=this.S,this.x.push(e),this.ue(e)}gt(e,n){let r=this.S;for(let o=e;o<r;++o)this.x[o].order=o+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 r=e;r<n;++r)this.x[r].order=r}Ne(e){let n=this.S;for(let r=e;r<n;++r)this.pe(r);this.x.splice(e)}nn(e){return this.P.has(e)}bt(e){var r;let n=this.P.get(e);return(r=n==null?void 0:n.order)!=null?r:-1}};var Mn=Symbol("r-for"),ys=t=>-1,Sr=()=>{},Qt=class Qt{constructor(e){p(this,"r");p(this,"T");p(this,"Oe");p(this,"R");this.r=e,this.T=e.o.u.for,this.Oe=Pt(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.E.Z(e)||this.r.E.j(e,o=>{o.hasAttribute(this.T)&&this.Le(o)}),n}ee(e){return e[Mn]?!0:(e[Mn]=!0,Vt(e,this.Oe).forEach(n=>n[Mn]=!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 pe(e)?[]:(W(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(r=>({*[Symbol.iterator](){for(let o=1;o<=r;o++)yield o}}))(e):Object.entries(e))}Tt(e,n){var xt;let r=this.xt(n);if(!(r!=null&&r.list)){_(1,this.T,n,e);return}let o=this.r.o.u.key,s=this.r.o.u.keyBind,i=(xt=e.getAttribute(o))!=null?xt:e.getAttribute(s);e.removeAttribute(o),e.removeAttribute(s);let a=Je(e),c=Wt.mt(this.r,a),f=e.parentNode;if(!f)return;let u=`${this.T} => ${n}`,l=new Comment(`__begin__ ${u}`);f.insertBefore(l,e),Ge(l,a),a.forEach(H=>{ee(H)}),e.remove();let m=new Comment(`__end__ ${u}`);f.insertBefore(m,l.nextSibling);let y=this.r,x=y.m,d=x.L(),C=d.length===1?[void 0,d[0]]:void 0,b=this.Rt(i),M=(H,X)=>b(H)===b(X),D=(H,X)=>H===X,U=(H,X,re)=>{let ae=r.createContext(X,H),xe=dt.ht(ae.index,X),Me=()=>{var N,Y;let Oe=(Y=(N=m.parentNode)!=null?N:l.parentNode)!=null?Y:f,h=re.previousSibling,k=[];for(let $=0;$<a.length;++$){let Z=a[$].cloneNode(!0);Oe.insertBefore(Z,re),k.push(Z)}for(c?c.y(y,k):Ve(y,k),h=h.nextSibling;h!==re;)xe.items.push(h),h=h.nextSibling};return C?(C[0]=ae.ctx,x.C(C,Me)):x.C(d,()=>{x.v(ae.ctx),Me()}),xe},I=(H,X)=>{let re=O.D(H).items,ae=re[re.length-1].nextSibling;for(let xe of re)ee(xe);O.le(H,U(H,X,ae))},ne=(H,X)=>{O.v(U(H,X,m))},K=H=>{for(let X of O.D(H).items)ee(X)},A=H=>{let X=O.S;for(let re=H;re<X;++re)O.D(re).index(re)},T=H=>{let X=l.parentNode,re=m.parentNode;if(!X||!re)return;let ae=O.S;W(H)&&(H=H());let xe=v(H[0]);if(S(xe)&&xe.length===0){we(l,m),O.Ne(0);return}let Me=[];for(let R of this.Ie(H[0]))Me.push(R);let Oe=Gt.yt({oldItems:O.x,newValues:Me,getKey:b,isSameValue:D,mountNewValue:(R,g,L)=>U(R,g,L),removeMountItem:R=>{for(let g=0;g<R.items.length;++g)ee(R.items[g])},endAnchor:m});if(Oe){O.x=Oe,O.P.clear();for(let R=0;R<Oe.length;++R){let g=Oe[R];g.order=R,g.index(R);let L=b(g.value);L!==void 0&&O.P.set(L,g)}return}let h=0,k=Number.MAX_SAFE_INTEGER,N=ae,Y=this.r.o.forGrowThreshold,$=()=>O.S<N+Y;for(let R of Me){let g=()=>{if(h<ae){let L=O.D(h++);if(M(L.value,R)){if(D(L.value,R))return;I(h-1,R);return}let B=O.bt(b(R));if(B>=h&&B-h<10){if(--h,k=Math.min(k,h),K(h),O.Me(h),--ae,B>h+1)for(let oe=h;oe<B-1&&oe<ae&&!M(O.D(h).value,R);)++oe,K(h),O.Me(h),--ae;g();return}$()?(O.gt(h-1,U(h,R,O.D(h-1).items[0])),k=Math.min(k,h-1),++ae):I(h-1,R)}else ne(h++,R)};g()}let Z=h;for(ae=O.S;h<ae;)K(h++);O.Ne(Z),A(k)},V=()=>{F.stop(),Te(),Te=Sr},F=x.O(r.list),qe=F.value,Te=Sr,Tt=0,O=new dt(b);for(let H of this.Ie(qe()[0]))O.v(U(Tt++,H,m));Q(l,V),Te=F.subscribe(T)}xt(e){var c,f;let n=Qt.Et.exec(e);if(!n)return;let r=(n[1]+((c=n[2])!=null?c:"")).split(",").map(u=>u.trim()),o=r.length>1?r.length-1:-1,s=o!==-1&&(r[o]==="index"||(f=r[o])!=null&&f.startsWith("#"))?r[o]:"";s&&r.splice(o,1);let i=n[3];if(!i||r.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(u,l)=>{let m={},y=v(u);if(!a&&r.length===1)m[r[0]]=u;else if(S(y)){let d=0;for(let w of r)m[w]=y[d++]}else for(let d of r)m[d]=y[d];let x={ctx:m,index:ys};return s&&(x.index=m[s.startsWith("#")?s.substring(1):s]=ie(l)),x}}}Rt(e){if(!e)return r=>r;let n=e.trim();if(!n)return r=>r;if(n.includes(".")){let r=this.Ct(n),o=r.length>1?r.slice(1):void 0;return s=>{let i=v(s),a=this.Pe(i,r);return a!==void 0||!o?a:this.Pe(i,o)}}return r=>{var o;return v((o=v(r))==null?void 0:o[n])}}Ct(e){return e.split(".").filter(n=>n.length>0)}Pe(e,n){var o;let r=e;for(let s of n)r=(o=v(r))==null?void 0:o[s];return v(r)}};p(Qt,"Et",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var Jt=Qt;var Xt=class{constructor(e){p(this,"fe",0);p(this,"de",new Map);p(this,"m");p(this,"De");p(this,"Ue");p(this,"Be");p(this,"E");p(this,"q");p(this,"o");p(this,"R");p(this,"He");this.m=e,this.o=e.o,this.Ue=new Jt(this),this.De=new It(this),this.Be=new zt(this),this.E=new Ft(this),this.q=new qt(this),this.R=this.o.u.pre,this.He=this.o.u.dynamic}wt(e){let n=me(e)?[e]:e.querySelectorAll("template");for(let r of n){if(r.hasAttribute(this.R))continue;let o=r.parentNode;if(!o)continue;let s=r.nextSibling;if(r.remove(),!r.content)continue;let i=[...r.content.childNodes];for(let a of i)o.insertBefore(a,s);Ve(this,i)}}$(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.E.k(e),this.wt(e),this.ve(e,!0)}finally{--this.fe,this.fe===0&&this.vt()}}St(e,n){let r=document;if(!r){let o=e.parentNode;for(;o!=null&&o.parentNode;)o=o.parentNode;if(!o)return null;r=o}return r.querySelector(n)}je(e,n){let r=this.St(e,n);if(!r)return!1;let o=e.parentElement;if(!o)return!1;let s=new Comment(`teleported => '${n}'`);return o.insertBefore(s,e),e.teleportedFrom=s,s.teleportedTo=e,Q(s,()=>{ee(e)}),r.appendChild(e),!0}At(e,n){this.de.set(e,n)}vt(){let e=this.de;if(e.size!==0){this.de=new Map;for(let[n,r]of e.entries())this.je(n,r)}}ve(e,n){var s;let r=this.q.we(e,n),o=this.o.B;for(let[i,a]of r.entries()){let[c,f]=a.oe,u=(s=o[i])!=null?s:o[c];if(!u){console.error("directive not found:",c);continue}let l=a.Se;for(let m=0;m<l.length;++m){let y=l[m];this.y(u,y,i,!1,f,a.se)}}}y(e,n,r,o,s,i){if(n.hasAttribute(this.R))return;let a=n.getAttribute(r);n.removeAttribute(r);let c=f=>{let u=f;for(;u;){let l=u.getAttribute(ut);if(l)return l;u=u.parentElement}return null};if(gn()){let f=c(n);if(f){this.m.C(lr(f),()=>{this.N(e,n,a,s,i)});return}}this.N(e,n,a,s,i)}Vt(e,n,r){return e!==Ut?!1:(j(r)||this.je(n,r)||this.At(n,r),!0)}N(e,n,r,o,s){if(n.nodeType!==Node.ELEMENT_NODE||r==null||this.Vt(e,n,r))return;let i=this.kt(o,e.once),a=this.Mt(e,r),c=this.Nt(a,i);Q(n,c.stop);let f=this.Ot(n,r,a,i,o,s),u=this.Lt(e,f,c);if(!u)return;let l=this.It(f,a,i,o,u);l(),e.once||(c.result=a.subscribe(l),i&&(c.dynamic=i.subscribe(l)))}kt(e,n){let r=hr(e,this.He);if(r)return this.m.O(z(r),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 r={stop:()=>{var o,s,i;e.stop(),n==null||n.stop(),(o=r.result)==null||o.call(r),(s=r.dynamic)==null||s.call(r),(i=r.mounted)==null||i.call(r),r.result=void 0,r.dynamic=void 0,r.mounted=void 0}};return r}Ot(e,n,r,o,s,i){return{el:e,expr:n,values:r.value(),previousValues:void 0,option:o?o.value()[0]:s,previousOption:void 0,flags:i,parseResult:r,dynamicOption:o}}Lt(e,n,r){let o=e.mount(n);if(typeof o=="function"){r.mounted=o;return}return o!=null&&o.unmount&&(r.mounted=o.unmount),o==null?void 0:o.update}It(e,n,r,o,s){let i,a;return()=>{let c=n.value(),f=r?r.value()[0]:o;e.values=c,e.previousValues=i,e.option=f,e.previousOption=a,i=c,a=f,s(e)}}};var gs=(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n==null?void 0:n[o];if(S(s)){let a=s.length;for(let c=0;c<a;++c)Ar(t,s[c],i==null?void 0:i[c])}else Ar(t,s,i)}},On={mount:()=>({update:({el:t,values:e,previousValues:n})=>{gs(t,e,n)}})},Ar=(t,e,n)=>{let r=v(e),o=v(n),s=t.classList,i=G(r),a=G(o);if(r&&!i){let c=r;if(o&&!a){let f=o;for(let u in f)(!(u in c)||!v(c[u]))&&s.remove(u)}for(let f in c)v(c[f])&&s.add(f)}else if(i){if(o!==r){let c=a?Xe(o):[],f=Xe(r);c.length>0&&s.remove(...c),f.length>0&&s.add(...f)}}else if(o){let c=a?Xe(o):[];c.length>0&&s.remove(...c)}};function bs(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=Se(t[r],e[r]);return n}function Se(t,e){if(t===e)return!0;let n=pn(t),r=pn(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=it(t),r=it(e),n||r)return t===e;if(n=S(t),r=S(e),n||r)return n&&r?bs(t,e):!1;if(n=P(t),r=P(e),n||r){if(!n||!r)return!1;let o=Object.keys(t).length,s=Object.keys(e).length;if(o!==s)return!1;for(let i in t){let a=Object.prototype.hasOwnProperty.call(t,i),c=Object.prototype.hasOwnProperty.call(e,i);if(a&&!c||!Se(t[i],e[i]))return!1}return!0}return String(t)===String(e)}function Yt(t,e){return t.findIndex(n=>Se(n,e))}var Nr=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var kn=t=>{if(!E(t))throw q(3,"pause");t(void 0,void 0,3)};var Ln=t=>{if(!E(t))throw q(3,"resume");t(void 0,void 0,4)};var Or={mount:({el:t,parseResult:e,flags:n})=>({update:({values:r})=>{kr(t,r[0])},unmount:Ts(t,e,n)})},kr=(t,e)=>{let n=Pr(t);if(n&&Lr(t))S(e)?e=Yt(e,Ae(t))>-1:fe(e)?e=e.has(Ae(t)):e=vs(t,e),t.checked=e;else if(n&&Ir(t))t.checked=Se(e,Ae(t));else if(n||Dr(t))Vr(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(Ur(t)){let r=t.options,o=r.length,s=t.multiple;for(let i=0;i<o;i++){let a=r[i],c=Ae(a);if(s)S(e)?a.selected=Yt(e,c)>-1:a.selected=e.has(c);else if(Se(Ae(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else _(7,t)},ht=t=>(E(t)&&(t=t()),W(t)&&(t=t()),t?G(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}),Lr=t=>t.type==="checkbox",Ir=t=>t.type==="radio",Vr=t=>t.type==="number"||t.type==="range",Pr=t=>t.tagName==="INPUT",Dr=t=>t.tagName==="TEXTAREA",Ur=t=>t.tagName==="SELECT",Ts=(t,e,n)=>{let r=e.value,o=ht(n==null?void 0:n.join(",")),s=ht(r()[1]),i={int:o.int||s.int,lazy:o.lazy||s.lazy,number:o.number||s.number,trim:o.trim||s.trim};if(!e.refs[0])return _(8,t),()=>{};let a=()=>e.refs[0],c=Pr(t);return c&&Lr(t)?Cs(t,a):c&&Ir(t)?Ss(t,a):c||Dr(t)?xs(t,i,a,r):Ur(t)?As(t,a,r):(_(7,t),()=>{})},Mr=/[.,' ·٫]/,xs=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=Vr(t),a=()=>{!e.trim&&!ht(r()[1]).trim||(t.value=t.value.trim())},c=m=>{let y=m.target;y.composing=1},f=m=>{let y=m.target;y.composing&&(y.composing=0,y.dispatchEvent(new Event(s)))},u=()=>{t.removeEventListener(s,l),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",f),t.removeEventListener("change",f)},l=m=>{let y=n();if(!y)return;let x=m.target;if(!x||x.composing)return;let d=x.value,w=ht(r()[1]);if(i||w.number||w.int){if(w.int)d=parseInt(d);else{if(Mr.test(d[d.length-1])&&d.split(Mr).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(y()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else w.trim&&(d=d.trim());y(d)};return t.addEventListener(s,l),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",f),t.addEventListener("change",f),u},Cs=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=Ae(t),a=t.checked,c=s();if(S(c)){let f=Yt(c,i),u=f!==-1;a&&!u?c.push(i):!a&&u&&c.splice(f,1)}else fe(c)?a?c.add(i):c.delete(i):s(ws(t,a))};return t.addEventListener(n,o),r},Ae=t=>"_value"in t?t._value:t.value,Hr="trueValue",Es="falseValue",Br="true-value",Rs="false-value",ws=(t,e)=>{let n=e?Hr:Es;if(n in t)return t[n];let r=e?Br:Rs;return t.hasAttribute(r)?t.getAttribute(r):e},vs=(t,e)=>{if(Hr in t)return Se(e,t.trueValue);let r=Br;return t.hasAttribute(r)?Se(e,t.getAttribute(r)):Se(e,!0)},Ss=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=Ae(t);s(i)};return t.addEventListener(n,o),r},As=(t,e,n)=>{let r="change",o=Ns(t,n),s=()=>{t.removeEventListener(r,i),o()},i=()=>{let a=e();if(!a)return;let f=ht(n()[1]).number,u=Array.prototype.filter.call(t.options,l=>l.selected).map(l=>f?Nr(Ae(l)):Ae(l));if(t.multiple){let l=a();try{if(kn(a),fe(l)){l.clear();for(let m of u)l.add(m)}else S(l)?(l.splice(0),l.push(...u)):a(u)}finally{Ln(a),te(a)}}else a(u[0])};return t.addEventListener(r,i),s},Ns=(t,e)=>{var c,f;let n=(f=globalThis.MutationObserver)!=null?f:(c=globalThis.window)==null?void 0:c.MutationObserver;if(!n)return()=>{};let r=!1,o=!1,s=()=>{r=!1,!o&&kr(t,e()[0])},i=()=>{r||(r=!0,typeof queueMicrotask=="function"?queueMicrotask(s):Promise.resolve().then(s))},a=new n(i);return a.observe(t,{attributes:!0,attributeFilter:["value"],childList:!0,subtree:!0}),()=>{o=!0,a.disconnect()}};var Ms=["stop","prevent","capture","self","once","left","right","middle","passive"],Os=t=>{let e={};if(j(t))return;let n=t.split(",");for(let r of Ms)e[r]=n.includes(r);return e},ks=(t,e,n,r,o)=>{var f,u;if(r){let l=e.value(),m=v(r.value()[0]);return G(m)?In(t,z(m),()=>e.value()[0],(f=o==null?void 0:o.join(","))!=null?f:l[1]):()=>{}}else if(n){let l=e.value();return In(t,z(n),()=>e.value()[0],(u=o==null?void 0:o.join(","))!=null?u:l[1])}let s=[],i=()=>{s.forEach(l=>l())},a=e.value(),c=a.length;for(let l=0;l<c;++l){let m=a[l];if(W(m)&&(m=m()),P(m))for(let y of Object.entries(m)){let x=y[0],d=()=>{let C=e.value()[l];return W(C)&&(C=C()),C=C[x],W(C)&&(C=C()),C},w=m[x+"_flags"];s.push(In(t,x,d,w))}else _(2,"r-on",t)}return i},Vn={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,mount:({el:t,parseResult:e,option:n,dynamicOption:r,flags:o})=>ks(t,e,n,r,o)},Ls=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e!=null||(e="");let n=[...t.split("."),...e.split(",")];t=n[0];let r=n[1],o=n.includes("ctrl"),s=n.includes("shift"),i=n.includes("alt"),a=n.includes("meta"),c=f=>!(o&&!f.ctrlKey||s&&!f.shiftKey||i&&!f.altKey||a&&!f.metaKey);return r?[t,f=>c(f)?f.key.toUpperCase()===r.toUpperCase():!1]:[t,c]}return[t,n=>!0]},In=(t,e,n,r)=>{if(j(e))return _(5,"r-on",t),()=>{};let o=Os(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=Ls(e,r);let a=u=>{if(!i(u)||!n&&e==="submit"&&(o!=null&&o.prevent))return;let l=n(u);W(l)&&(l=l(u)),W(l)&&l(u)},c=()=>{t.removeEventListener(e,f,s)},f=u=>{if(!o){a(u);return}try{if(o.left&&u.button!==0||o.middle&&u.button!==1||o.right&&u.button!==2||o.self&&u.target!==t)return;o.stop&&u.stopPropagation(),o.prevent&&u.preventDefault(),a(u)}finally{o.once&&c()}};return t.addEventListener(e,f,s),c};var Is=(t,e,n,r)=>{if(n){r&&r.includes("camel")&&(n=z(n)),tt(t,n,e[0]);return}let o=e.length;for(let s=0;s<o;++s){let i=e[s];if(S(i)){let a=i[0],c=i[1];tt(t,a,c)}else if(P(i))for(let a of Object.entries(i)){let c=a[0],f=a[1];tt(t,c,f)}else{let a=e[s++],c=e[s];tt(t,a,c)}}},$r={mount:()=>({update:({el:t,values:e,option:n,flags:r})=>{Is(t,e,n,r)}})};function Vs(t){return!!t||t===""}var tt=(t,e,n)=>{if(pe(e)){_(3,":prop",t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(Ee),1),t[e]=n!=null?n:"";return}let r=t.tagName;if(e==="value"&&r!=="PROGRESS"&&!r.includes("-")){t._value=n;let s=r==="OPTION"?t.getAttribute("value"):t.value,i=n!=null?n:"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let o=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=Vs(n):n==null&&s==="string"?(n="",o=!0):s==="number"&&(n=0,o=!0)}try{t[e]=n}catch(s){o||_(4,e,r,n,s)}o&&t.removeAttribute(e)};var jr={once:!0,mount:({el:t,parseResult:e,expr:n})=>{let r=e,o=r.value()[0],s=S(o),i=r.refs[0];return s?o.push(t):i?i==null||i(t):r.context[n]=t,()=>{if(s){let a=o.indexOf(t);a!==-1&&o.splice(a,1)}else i==null||i(null)}}};var Ps=(t,e)=>{let n=He(t).data,r=n._ord;nr(r)&&(r=n._ord=t.style.display),Be(e[0])?t.style.display=r:t.style.display="none"},_r={mount:()=>({update:({el:t,values:e})=>{Ps(t,e)}})};var Ds=(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n==null?void 0:n[o];if(S(s)){let a=s.length;for(let c=0;c<a;++c)Fr(t,s[c],i==null?void 0:i[c])}else Fr(t,s,i)}},Zt={mount:()=>({update:({el:t,values:e,previousValues:n})=>{Ds(t,e,n)}})},Fr=(t,e,n)=>{let r=v(e),o=v(n),s=t.style,i=G(r);if(r&&!i){let a=r;if(o&&!G(o)){let c=o;for(let f in c)v(a[f])==null&&Dn(s,f,"")}for(let c in a)Dn(s,c,a[c])}else{let a=s.display;if(i?o!==r&&(s.cssText=r):o&&t.removeAttribute("style"),"_ord"in He(t).data)return;s.display=a}},qr=/\s*!important$/;function Dn(t,e,n){let r=v(n);if(S(r))r.forEach(o=>{Dn(t,e,o)});else{let o=r==null?"":String(r);if(e.startsWith("--"))t.setProperty(e,o);else{let s=Us(t,e);qr.test(o)?t.setProperty(Qe(s),o.replace(qr,""),"important"):t[s]=o}}}var zr=["Webkit","Moz","ms"],Pn={};function Us(t,e){let n=Pn[e];if(n)return n;let r=z(e);if(r!=="filter"&&r in t)return Pn[e]=r;r=ft(r);for(let o=0;o<zr.length;o++){let s=zr[o]+r;if(s in t)return Pn[e]=s}return e}var le=t=>Kr(v(t)),Kr=(t,e=new WeakMap)=>{if(!t||!P(t))return t;if(S(t))return t.map(le);if(fe(t)){let r=new Set;for(let o of t.keys())r.add(le(o));return r}if(ke(t)){let r=new Map;for(let o of t)r.set(le(o[0]),le(o[1]));return r}if(e.has(t))return v(e.get(t));let n=Et({},t);e.set(t,n);for(let r of Object.entries(n))n[r[0]]=Kr(v(r[1]),e);return n};var Hs=(t,e)=>{var r;let n=e[0];t.textContent=fe(n)?JSON.stringify(le([...n])):ke(n)?JSON.stringify(le([...n])):P(n)?JSON.stringify(le(n)):(r=n==null?void 0:n.toString())!=null?r:""},Wr={mount:()=>({update:({el:t,values:e})=>{Hs(t,e)}})};var Gr={mount:()=>({update:({el:t,values:e})=>{tt(t,"value",e[0])}})};var nt=t=>(t==null?void 0:t[At])===1;function je(t){if(mt(t))return t;let e;if(E(t)?(e=t,t=e()):e=ie(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[At]=1,S(t)){let n=t.length;for(let r=0;r<n;++r){let o=t[r];nt(o)||(t[r]=je(o))}return e}if(!P(t))return e;for(let n of Object.entries(t)){let r=n[1];if(nt(r))continue;let o=n[0];it(o)||(t[o]=null,t[o]=je(r))}return e}var De=class De{constructor(e){p(this,"B",{});p(this,"u",{});p(this,"dt",()=>Object.keys(this.B).filter(e=>e.length===1||!e.startsWith(":")));p(this,"te",new Map);p(this,"F",new Map);p(this,"forGrowThreshold",10);p(this,"globalContext");p(this,"useInterpolation",!0);p(this,"propValidationMode","throw");if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.Dt()}static getDefault(){var e;return(e=De.$e)!=null?e:De.$e=new De}Dt(){let e={},n=globalThis;for(let r of De.Pt.split(","))e[r]=n[r];return e.ref=je,e.sref=ie,e.flatten=le,e}addComponent(...e){for(let n of e){if(!n.defaultName){We.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={".":$r,":":Rn,"@":Vn,[`${e}on`]:Vn,[`${e}bind`]:Rn,[`${e}html`]:Kt,[`${e}text`]:Wr,[`${e}show`]:_r,[`${e}model`]:Or,":style":Zt,[`${e}style`]:Zt,[`${e}bind:style`]:Zt,":class":On,[`${e}bind:class`]:On,":ref":jr,":value":Gr,[`${e}teleport`]:Ut},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)}};p(De,"$e"),p(De,"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");var he=De;var en=(t,e)=>{if(!t)return;let r=(e!=null?e:he.getDefault()).u,o=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of $s(t,r.pre,s))Bs(i,r.text,o,s)},Bs=(t,e,n,r)=>{var c;let o=t.textContent;if(!o)return;let s=n,i=o.split(s);if(i.length<=1)return;if(((c=t.parentElement)==null?void 0:c.childNodes.length)===1&&i.length===3){let f=i[1],u=Jr(f,r);if(u&&j(i[0])&&j(i[2])){let l=t.parentElement;l.setAttribute(e,f.substring(u.start.length,f.length-u.end.length)),l.innerText="";return}}let a=document.createDocumentFragment();for(let f of i){let u=Jr(f,r);if(u){let l=document.createElement("span");l.setAttribute(e,f.substring(u.start.length,f.length-u.end.length)),a.appendChild(l)}else a.appendChild(document.createTextNode(f))}t.replaceWith(a)},$s=(t,e,n)=>{let r=[],o=s=>{var i;if(s.nodeType===Node.TEXT_NODE)n.some(a=>{var c;return(c=s.textContent)==null?void 0:c.includes(a.start)})&&r.push(s);else{if((i=s==null?void 0:s.hasAttribute)!=null&&i.call(s,e))return;for(let a of ve(s))o(a)}};return o(t),r},Jr=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var js=9,_s=10,Fs=13,qs=32,Ne=46,tn=44,zs=39,Ks=34,nn=40,rt=41,rn=91,Un=93,Hn=63,Ws=59,Qr=58,Xr=123,on=125,_e=43,sn=45,Bn=96,Yr=47,$n=92,Zr=new Set([2,3]),so={"=":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},Gs=Zn(Et({"=>":2},so),{"||":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}),io=Object.keys(so),Js=new Set(io),_n=new Set(["=>"]);io.forEach(t=>_n.add(t));var eo={true:!0,false:!1,null:null},Qs="this",ot="Expected ",Fe="Unexpected ",qn="Unclosed ",Xs=ot+":",to=ot+"expression",Ys="missing }",Zs=Fe+"object property",ei=qn+"(",no=ot+"comma",ro=Fe+"token ",ti=Fe+"period",jn=ot+"expression after ",ni="missing unaryOp argument",ri=qn+"[",oi=ot+"exponent (",si="Variable names cannot start with a number (",ii=qn+'quote after "',yt=t=>t>=48&&t<=57,oo=t=>Gs[t],Fn=class{constructor(e){p(this,"p");p(this,"e");this.p=e,this.e=0}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}z(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95||e>=128}me(e){return this.z(e)||yt(e)}i(e){return new Error(`${e} at character ${this.e}`)}g(){let e=this.h,n=this.p,r=this.e;for(;e===qs||e===js||e===_s||e===Fs;)e=n.charCodeAt(++r);this.e=r}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 r=this.h;if(r===Ws||r===tn)this.e++;else{let o=this.A();if(o)n.push(o);else if(this.e<this.p.length){if(r===e)break;throw this.i(Fe+'"'+this.H+'"')}}}return n}A(){var n;let e=(n=this.Ut())!=null?n:this._e();return this.g(),this.Bt(e)}he(){this.g();let e=this.p,n=this.e,r=e.charCodeAt(n),o=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);if(isNaN(r))return!1;let a=!1,c=0;return r===62&&o===62&&s===62&&i===61?(a=">>>=",c=4):r===61&&o===61&&s===61?(a="===",c=3):r===33&&o===61&&s===61?(a="!==",c=3):r===62&&o===62&&s===62?(a=">>>",c=3):r===60&&o===60&&s===61?(a="<<=",c=3):r===62&&o===62&&s===61?(a=">>=",c=3):r===42&&o===42&&s===61?(a="**=",c=3):r===61&&o===62?(a="=>",c=2):r===124&&o===124?(a="||",c=2):r===63&&o===63?(a="??",c=2):r===38&&o===38?(a="&&",c=2):r===61&&o===61?(a="==",c=2):r===33&&o===61?(a="!=",c=2):r===60&&o===61?(a="<=",c=2):r===62&&o===61?(a=">=",c=2):r===60&&o===60?(a="<<",c=2):r===62&&o===62?(a=">>",c=2):r===43&&o===61?(a="+=",c=2):r===45&&o===61?(a="-=",c=2):r===42&&o===61?(a="*=",c=2):r===47&&o===61?(a="/=",c=2):r===37&&o===61?(a="%=",c=2):r===38&&o===61?(a="&=",c=2):r===94&&o===61?(a="^=",c=2):r===124&&o===61?(a="|=",c=2):r===42&&o===42?(a="**",c=2):r===105&&o===110?this.me(e.charCodeAt(n+2))||(a="in",c=2):r===61?(a="=",c=1):r===124?(a="|",c=1):r===94?(a="^",c=1):r===38?(a="&",c=1):r===60?(a="<",c=1):r===62?(a=">",c=1):r===43?(a="+",c=1):r===45?(a="-",c=1):r===42?(a="*",c=1):r===47?(a="/",c=1):r===37&&(a="%",c=1),a?(this.e+=c,a):!1}_e(){let e,n,r,o,s,i,a,c;if(s=this.W(),!s||(n=this.he(),!n))return s;if(o={value:n,prec:oo(n),right_a:_n.has(n)},i=this.W(),!i)throw this.i(jn+n);let f=[s,o,i];for(;n=this.he();){r=oo(n),o={value:n,prec:r,right_a:_n.has(n)},c=n;let u=l=>o.right_a&&l.right_a?r>l.prec:r<=l.prec;for(;f.length>2&&u(f[f.length-2]);)i=f.pop(),n=f.pop().value,s=f.pop(),e=this.Fe(n,s,i),f.push(e);if(e=this.W(),!e)throw this.i(jn+c);f.push(o,e)}for(a=f.length-1,e=f[a];a>1;)e=this.Fe(f[a-1].value,f[a-2],e),a-=2;return e}W(){let e;if(this.g(),e=this.Ht(),e)return this.ge(e);let n=this.h;if(yt(n)||n===Ne)return this.jt();if(n===zs||n===Ks)e=this.$t();else if(n===rn)e=this._t();else{let r=this.Ft();if(r){let o=this.W();if(!o)throw this.i(ni);return this.ge({type:7,operator:r,argument:o})}this.z(n)?(e=this.be(),e.name in eo?e={type:4,value:eo[e.name],raw:e.name}:e.name===Qs&&(e={type:5})):n===nn&&(e=this.qt())}return e?(e=this.G(e),this.ge(e)):!1}Fe(e,n,r){if(e==="=>"){let o=n.type===1?n.expressions:[n];return{type:15,params:o,body:r}}return Js.has(e)?{type:16,operator:e,left:n,right:r}:{type:8,operator:e,left:n,right:r}}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,r=e.charCodeAt(n),o=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);return r===sn?(this.e++,"-"):r===33?(this.e++,"!"):r===126?(this.e++,"~"):r===_e?(this.e++,"+"):r===110&&o===101&&s===119&&!this.me(i)?(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===rn||n===nn||n===Hn;){let r;if(n===Hn){if(this.p.charCodeAt(this.e+1)!==Ne)break;r=!0,this.e+=2,this.g(),n=this.h}if(this.e++,n===rn){if(e={type:3,computed:!0,object:e,property:this.A()},this.g(),n=this.h,n!==Un)throw this.i(ri);this.e++}else n===nn?e={type:6,arguments:this.Ke(rt),callee:e}:(r&&this.e--,this.g(),e={type:3,computed:!1,object:e,property:this.be()});r&&(e.optional=!0),this.g(),n=this.h}return e}jt(){let e=this.p,n=this.e,r=n;for(;yt(e.charCodeAt(r));)r++;if(e.charCodeAt(r)===Ne)for(r++;yt(e.charCodeAt(r));)r++;let o=e.charCodeAt(r);if(o===101||o===69){r++;let a=e.charCodeAt(r);(a===_e||a===sn)&&r++;let c=r;for(;yt(e.charCodeAt(r));)r++;if(c===r){this.e=r;let f=e.slice(n,r);throw this.i(oi+f+this.H+")")}}this.e=r;let s=e.slice(n,r),i=e.charCodeAt(r);if(this.z(i))throw this.i(si+s+this.H+")");if(i===Ne||s.length===1&&s.charCodeAt(0)===Ne)throw this.i(ti);return{type:4,value:parseFloat(s),raw:s}}$t(){let e=this.p,n=e.length,r=this.e,o=e.charCodeAt(this.e++),s=this.e,i=s,a=[],c=!1,f=!1;for(;s<n;){let l=e.charCodeAt(s);if(l===o){f=!0,this.e=s+1;break}if(l===$n){c||(c=!0),a.push(e.slice(i,s));let m=e.charCodeAt(s+1);a.push(this.ze(m)),s+=2,i=s}else s++}let u=c?a.join("")+e.slice(i,f?s:n):e.slice(i,f?s:n);if(!f)throw this.e=s,this.i(ii+u+'"');return{type:4,value:u,raw:e.substring(r,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(Fe+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=[],r=!1,o=0;for(;this.e<this.p.length;){this.g();let s=this.h;if(s===e){if(r=!0,this.e++,e===rt&&o&&o>=n.length)throw this.i(ro+String.fromCharCode(e));break}else if(s===tn){if(this.e++,o++,o!==n.length){if(e===rt)throw this.i(ro+",");for(let i=n.length;i<o;i++)n.push(null)}}else{if(n.length!==o&&o!==0)throw this.i(no);{let i=this.A();if(!i||i.type===0)throw this.i(no);n.push(i)}}}if(!r)throw this.i(ot+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(ei)}_t(){return this.e++,{type:9,elements:this.Ke(Un)}}Kt(e){if(this.f(Xr)){this.e++;let n=[];for(;!isNaN(this.h);){if(this.g(),this.f(on)){this.e++,e.node=this.G({type:10,properties:n});return}let r=this.A();if(!r)break;if(this.g(),r.type===2&&(this.f(tn)||this.f(on)))n.push({type:12,computed:!1,key:r,value:r,shorthand:!0});else if(this.f(Qr)){this.e++;let o=this.A();if(!o)throw this.i(Zs);let s=r.type===9;n.push({type:12,computed:s,key:s?r.elements[0]:r,value:o,shorthand:!1}),this.g()}else n.push(r);this.f(tn)&&this.e++}throw this.i(Ys)}}zt(e){let n=this.h;if((n===_e||n===sn)&&n===this.p.charCodeAt(this.e+1)){this.e+=2;let r=e.node={type:13,operator:n===_e?"++":"--",argument:this.G(this.be()),prefix:!0};if(!r.argument||!Zr.has(r.argument.type))throw this.i(Fe+r.operator)}}Qt(e){let n=e.node,r=this.h;if((r===_e||r===sn)&&r===this.p.charCodeAt(this.e+1)){if(!Zr.has(n.type))throw this.i(Fe+(r===_e?"++":"--"));this.e+=2,e.node={type:13,operator:r===_e?"++":"--",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.A()})}Zt(e){if(e.node&&this.f(Hn)){this.e++;let n=e.node,r=this.A();if(!r)throw this.i(to);if(this.g(),this.f(Qr)){this.e++;let o=this.A();if(!o)throw this.i(to);e.node={type:11,test:n,consequent:r,alternate:o}}else throw this.i(Xs)}}Yt(e){if(this.g(),this.f(nn)){let n=this.e;if(this.e++,this.g(),this.f(rt)){this.e++;let r=this.he();if(r==="=>"){let o=this._e();if(!o)throw this.i(jn+r);e.node={type:15,params:null,body:o};return}}this.e=n}}Xt(e){let n=e.node,r=n.type;(r===2||r===3)&&this.f(Bn)&&(e.node={type:17,tag:n,quasi:this.qe(e)})}qe(e){if(!this.f(Bn))return;let n=this.p,r=n.length,o={type:19,quasis:[],expressions:[]},s=++this.e,i=[],a=[],c=!1,f=u=>{if(!c){let y=n.slice(s,this.e);return o.quasis.push({type:18,value:{raw:y,cooked:y},tail:u})}i.push(n.slice(s,this.e)),a.push(n.slice(s,this.e));let l=i.join(""),m=a.join("");return i.length=0,a.length=0,c=!1,o.quasis.push({type:18,value:{raw:l,cooked:m},tail:u})};for(;this.e<r;){let u=n.charCodeAt(this.e);if(u===Bn)return f(!0),this.e+=1,e.node=o,o;if(u===36&&n.charCodeAt(this.e+1)===Xr){if(f(!1),this.e+=2,o.expressions.push(...this.ye(on)),!this.f(on))throw this.i("unclosed ${");this.e+=1,s=this.e}else if(u===$n){c||(c=!0),i.push(n.slice(s,this.e)),a.push(n.slice(s,this.e));let l=n.charCodeAt(this.e+1);i.push(n.slice(this.e,this.e+2)),a.push(this.ze(l)),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 r=e.node;for(;r.type===3||r.type===6&&r.callee.type===3;)r=r.type===3?r.object:r.callee.object;r.type=20}Gt(e){if(!this.f(Yr))return;let n=++this.e,r=!1;for(;this.e<this.p.length;){if(this.h===Yr&&!r){let o=this.p.slice(n,this.e),s="";for(;++this.e<this.p.length;){let a=this.h;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.H;else break}let i;try{i=new RegExp(o,s)}catch(a){throw this.i(a.message)}return e.node={type:4,value:i,raw:this.p.slice(n-1,this.e)},e.node=this.G(e.node),e.node}this.f(rn)?r=!0:r&&this.f(Un)&&(r=!1),this.e+=this.f($n)?2:1}throw this.i("Unclosed Regex")}},ao=t=>new Fn(t).parse();var ai={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(t,e)=>{},"+=":(t,e)=>{},"-=":(t,e)=>{},"<<=":(t,e)=>{},">>=":(t,e)=>{},">>>=":(t,e)=>{},"&=":(t,e)=>{},"^=":(t,e)=>{},"|=":(t,e)=>{},"||":(t,e)=>t()||e(),"??":(t,e)=>{var n;return(n=t())!=null?n:e()},"&&":(t,e)=>t()&&e(),"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(t,e)=>t===e,"!==":(t,e)=>t!==e,"<":(t,e)=>t<e,">":(t,e)=>t>e,"<=":(t,e)=>t<=e,">=":(t,e)=>t>=e,in:(t,e)=>t in e,"<<":(t,e)=>t<<e,">>":(t,e)=>t>>e,">>>":(t,e)=>t>>>e,"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e)=>t%e,"**":(t,e)=>Ct(t,e)},ci={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},fo=t=>{if(!(t!=null&&t.some(lo)))return t;let e=[];return t.forEach(n=>lo(n)?e.push(...n):e.push(n)),e},co=(...t)=>fo(t),zn=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},ui={"++":(t,e)=>{let n=t[e];if(E(n)){let r=n();return n(++r),r}return++t[e]},"--":(t,e)=>{let n=t[e];if(E(n)){let r=n();return n(--r),r}return--t[e]}},li={"++":(t,e)=>{let n=t[e];if(E(n)){let r=n();return n(r+1),r}return t[e]++},"--":(t,e)=>{let n=t[e];if(E(n)){let r=n();return n(r-1),r}return t[e]--}},uo={"=":(t,e,n)=>{let r=t[e];return E(r)?r(n):t[e]=n},"+=":(t,e,n)=>{let r=t[e];return E(r)?r(r()+n):t[e]+=n},"-=":(t,e,n)=>{let r=t[e];return E(r)?r(r()-n):t[e]-=n},"*=":(t,e,n)=>{let r=t[e];return E(r)?r(r()*n):t[e]*=n},"/=":(t,e,n)=>{let r=t[e];return E(r)?r(r()/n):t[e]/=n},"%=":(t,e,n)=>{let r=t[e];return E(r)?r(r()%n):t[e]%=n},"**=":(t,e,n)=>{let r=t[e];return E(r)?r(Ct(r(),n)):t[e]=Ct(t[e],n)},"<<=":(t,e,n)=>{let r=t[e];return E(r)?r(r()<<n):t[e]<<=n},">>=":(t,e,n)=>{let r=t[e];return E(r)?r(r()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let r=t[e];return E(r)?r(r()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let r=t[e];return E(r)?r(r()|n):t[e]|=n},"&=":(t,e,n)=>{let r=t[e];return E(r)?r(r()&n):t[e]&=n},"^=":(t,e,n)=>{let r=t[e];return E(r)?r(r()^n):t[e]^=n}},an=(t,e)=>W(t)?t.bind(e):t,Kn=class{constructor(e,n,r,o,s){p(this,"l");p(this,"We");p(this,"Ge");p(this,"Je");p(this,"V");p(this,"Qe");p(this,"Xe");this.l=S(e)?e:[e],this.We=n,this.Ge=r,this.Je=o,this.Xe=!!s}Ye(e,n){if(n&&e in n)return n;for(let r of this.l)if(e in r)return r}2(e,n,r){let o=e.name;if(o==="$root")return this.l[this.l.length-1];if(o==="$parent")return this.l[1];if(o==="$ctx")return[...this.l];if(r&&o in r)return this.V=r[o],an(v(r[o]),r);for(let i of this.l)if(o in i)return this.V=i[o],an(v(i[o]),i);let s=this.We;if(s&&o in s)return this.V=s[o],an(v(s[o]),s)}5(e,n,r){return this.l[0]}0(e,n,r){return this.Ze(n,r,co,...e.body)}1(e,n,r){return this.w(n,r,(...o)=>o.pop(),...e.expressions)}3(e,n,r){let{obj:o,key:s}=this.Te(e,n,r),i=o==null?void 0:o[s];return this.V=i,an(v(i),o)}4(e,n,r){return e.value}6(e,n,r){let o=(i,...a)=>W(i)?i(...fo(a)):i,s=this.w(++n,r,o,e.callee,...e.arguments);return this.V=s,s}7(e,n,r){return this.w(n,r,ci[e.operator],e.argument)}8(e,n,r){let o=ai[e.operator];switch(e.operator){case"||":case"&&":case"??":return o(()=>this.b(e.left,n,r),()=>this.b(e.right,n,r))}return this.w(n,r,o,e.left,e.right)}9(e,n,r){return this.Ze(++n,r,co,...e.elements)}10(e,n,r){let o={},s=(...i)=>{i.forEach(a=>{Object.assign(o,a)})};return this.w(++n,r,s,...e.properties),o}11(e,n,r){return this.w(n,r,o=>this.b(o?e.consequent:e.alternate,n,r),e.test)}12(e,n,r){var u;let o={},s=l=>(l==null?void 0:l.type)!==15,i=(u=this.Je)!=null?u:()=>!1,a=n===0&&this.Xe,c=l=>this.et(a,e.key,n,zn(l,r)),f=l=>this.et(a,e.value,n,zn(l,r));if(e.shorthand){let l=e.key.name;o[l]=s(e.key)&&i(l,n)?c:c()}else if(e.computed){let l=v(c());o[l]=s(e.value)&&i(l,n)?f:f()}else{let l=e.key.type===4?e.key.value:e.key.name;o[l]=s(e.value)&&i(l,n)?()=>f:f()}return o}Te(e,n,r){let o=this.b(e.object,n,r),s=e.computed?this.b(e.property,n,r):e.property.name;return{obj:o,key:s}}13(e,n,r){let o=e.argument,s=e.operator,i=e.prefix?ui:li;if(o.type===2){let a=o.name,c=this.Ye(a,r);return pe(c)?void 0:i[s](c,a)}if(o.type===3){let{obj:a,key:c}=this.Te(o,n,r);return i[s](a,c)}}16(e,n,r){let o=e.left,s=e.operator;if(o.type===2){let i=o.name,a=this.Ye(i,r);if(pe(a))return;let c=this.b(e.right,n,r);return uo[s](a,i,c)}if(o.type===3){let{obj:i,key:a}=this.Te(o,n,r),c=this.b(e.right,n,r);return uo[s](i,a,c)}}14(e,n,r){let o=this.b(e.argument,n,r);return S(o)&&(o.s=po),o}17(e,n,r){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,r)}19(e,n,r){let o=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.w(n,r,o,...e.expressions)}18(e,n,r){return e.value.cooked}20(e,n,r){let o=(s,...i)=>new s(...i);return this.w(n,r,o,e.callee,...e.arguments)}15(e,n,r){return(...o)=>{let s=Object.create(r!=null?r:{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=o[a++]}return this.b(e.body,n,s)}}b(e,n,r){let o=v(this[e.type](e,n,r));return this.Qe=e.type,o}et(e,n,r,o){let s=this.b(n,r,o);return e&&this.tt()?this.V:s}tt(){let e=this.Qe;return(e===2||e===3||e===6)&&E(this.V)}eval(e,n){let{value:r,refs:o}=Sn(()=>this.b(e,-1,n)),s={value:r,refs:o};return this.tt()&&(s.ref=this.V),s}w(e,n,r,...o){let s=o.map(i=>i&&this.b(i,e,n));return r(...s)}Ze(e,n,r,...o){let s=this.Ge;if(!s)return this.w(e,n,r,...o);let i=o.map((a,c)=>a&&(a.type!==15&&s(c,e)?f=>this.b(a,e,zn(f,n)):this.b(a,e,n)));return r(...i)}},po=Symbol("s"),lo=t=>(t==null?void 0:t.s)===po,mo=(t,e,n,r,o,s,i)=>new Kn(e,n,r,o,i).eval(t,s);var ho={},yo=t=>!!t,cn=class{constructor(e,n){p(this,"l");p(this,"o");p(this,"nt",[]);this.l=e,this.o=n}v(e){this.l=[e,...this.l]}ne(){return this.l.map(n=>n.components).filter(yo).reverse().reduce((n,r)=>{for(let[o,s]of Object.entries(r))n[o.toUpperCase()]=s;return n},{})}ft(){let e=[],n=new Set,r=this.l.map(o=>o.components).filter(yo).reverse();for(let o of r)for(let s of Object.keys(o))n.has(s)||(n.add(s),e.push(s));return e}O(e,n,r,o,s){var C;let i=[],a=[],c=new Set,f=()=>{for(let b=0;b<a.length;++b)a[b]();a.length=0},m={value:()=>i,stop:()=>{f(),c.clear()},subscribe:(b,M)=>(c.add(b),M&&b(i),()=>{c.delete(b)}),refs:[],context:this.l[0]};if(j(e))return m;let y=this.o.globalContext,x=[],d=new Set,w=(b,M,D,U)=>{try{let I=mo(b,M,y,n,r,U,o);return D&&I.refs.length>0&&x.push(...I.refs),{value:I.value,refs:I.refs,ref:I.ref}}catch(I){_(6,`evaluation error: ${e}`,I)}return{value:void 0,refs:[]}};try{let b=(C=ho[e])!=null?C:ao("["+e+"]");ho[e]=b;let M=this.l.slice(),D=b.elements,U=D.length,I=new Array(U);m.refs=I;let ne=()=>{x.length=0,s||(d.clear(),f());let K=new Array(U);for(let A=0;A<U;++A){let T=D[A];if(n!=null&&n(A,-1)){K[A]=F=>w(T,M,!1,{$event:F}).value;continue}let V=w(T,M,!0);K[A]=V.value,I[A]=V.ref}if(!s)for(let A of x)d.has(A)||(d.add(A),a.push(se(A,ne)));if(i=K,c.size!==0)for(let A of c)c.has(A)&&A(i)};ne()}catch(b){_(6,`parse error: ${e}`,b)}return m}L(){return this.l.slice()}le(e){this.nt.push(this.l),this.l=e}C(e,n){try{this.le(e),n()}finally{this.en()}}en(){var e;this.l=(e=this.nt.pop())!=null?e:[]}};var go=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},fi=(t,e)=>{let n="";for(let r=e;r<t.length;++r){let o=t[r];if(n){o===n&&(n="");continue}if(o==='"'||o==="'"){n=o;continue}if(o===">")return r}return-1},pi=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
3
- `);)++n;if(n>=t.length||!go(t[n]))return null;let r=n,o=!1;for(;n<t.length&&go(t[n]);){let s=t.charCodeAt(n);s>=65&&s<=90&&(o=!0),++n}return{start:r,end:n,hasUppercase:o}},bo=t=>{switch(t){case"table":case"thead":case"tbody":case"tfoot":return!0;default:return!1}},mi=t=>{switch(t){case"thead":case"tbody":case"tfoot":return!0;default:return!1}},di=t=>{switch(t){case"caption":case"colgroup":case"thead":case"tbody":case"tfoot":case"tr":return!0;default:return!1}},gt=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),hi=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}},yi=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}},gi=(t,e)=>`${t}</${e}>`,To=(t,e)=>`${t.slice(0,t.length-2)}></${e}>`,un=t=>{var i,a;let e=0,n=[],r=[],o=[],s=0;for(;e<t.length;){let c=t.indexOf("<",e);if(c===-1){n.push(t.slice(e));break}if(n.push(t.slice(e,c)),t.startsWith("<!--",c)){let A=t.indexOf("-->",c+4);if(A===-1){n.push(t.slice(c));break}n.push(t.slice(c,A+3)),e=A+3;continue}let f=fi(t,c);if(f===-1){n.push(t.slice(c));break}let u=t.slice(c,f+1),l=u.startsWith("</");if(u.startsWith("<!")||u.startsWith("<?")){n.push(u),e=f+1;continue}let y=pi(u,l);if(!y){n.push(u),e=f+1;continue}let x=u.slice(y.start,y.end),d=y.hasUppercase?"":x;if(l){let A=o[o.length-1];if((A==null?void 0:A.tagName)===x){o.pop(),A.emit&&n.push(u),e=f+1;continue}let T=r[r.length-1];T?(r.pop(),n.push(T.replacementHost?`</${T.replacementHost}>`:u),!T.isTableAlias&&bo(T.effectiveTag)&&--s):n.push(u),e=f+1;continue}let w=u.charCodeAt(u.length-2)===47,C=r[r.length-1],b=null;s===0?b=hi(d):mi((i=C==null?void 0:C.effectiveTag)!=null?i:"")?b=d==="tr"?null:"tr":(C==null?void 0:C.effectiveTag)==="table"?b=di(d)?null:"tr":(C==null?void 0:C.effectiveTag)==="tr"?b=d==="td"||d==="th"?null:"td":(C==null?void 0:C.effectiveTag)==="colgroup"&&(b=d==="col"?null:"col");let M=yi(b),D=M!==void 0,U=w&&!gt.has(b||d),I=!!b&&M===d&&gt.has(d),ne=!w&&!!b&&gt.has(b)&&!I,K=!w&&!b&&gt.has(d);if(b){let A=`${u.slice(0,y.start)}${b} is="${M?`r-${M}`:`regor:${x}`}"${u.slice(y.end)}`;n.push(U?To(A,b):I?gi(A,b):A)}else n.push(U?To(u,x):u);if(ne?o.push({tagName:x,emit:!1}):I&&!w?o.push({tagName:x,emit:!1}):K&&o.push({tagName:x,emit:!0}),!w&&!I&&!ne&&!K&&!gt.has(b!=null?b:d)){let A=(a=M!=null?M:b)!=null?a:d||x;r.push({replacementHost:b,effectiveTag:A,isTableAlias:D}),!D&&bo(A)&&++s}e=f+1}return n.join("")};var bi="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",Ti=new Set(bi.toUpperCase().split(",")),xi="http://www.w3.org/2000/svg",xo=(t,e)=>{me(t)?t.content.appendChild(e):t.appendChild(e)},Wn=(t,e,n,r)=>{var i;let o=t.t;if(o){let a=n&&Ti.has(o.toUpperCase())?document.createElementNS(xi,o.toLowerCase()):document.createElement(o),c=t.a;if(c)for(let u of Object.entries(c)){let l=u[0],m=u[1];l.startsWith("#")&&(m=l.substring(1),l="name"),a.setAttribute(Dt(l,r),m)}let f=t.c;if(f)for(let u of f)Wn(u,a,n,r);xo(e,a);return}let s=t.d;if(s){let a;switch((i=t.n)!=null?i:Node.TEXT_NODE){case Node.COMMENT_NODE:a=document.createComment(s);break;case Node.TEXT_NODE:a=document.createTextNode(s);break}if(a)xo(e,a);else throw new Error("unsupported node type.")}},st=(t,e,n)=>{n!=null||(n=he.getDefault());let r=document.createDocumentFragment();if(!S(t))return Wn(t,r,!!e,n),r;for(let o of t)Wn(o,r,!!e,n);return r};var Ci=(t,e={selector:"#app"},n)=>{G(e)&&(e={selector:"#app",template:e}),yr(t)&&(t=t.context);let r=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!r||!Re(r))throw q(0);n||(n=he.getDefault());let o=()=>{for(let a of[...r.childNodes])ee(a)},s=a=>{for(;a.length>0;)r.appendChild(a[0])};if(e.template){let a=document.createRange().createContextualFragment(un(e.template));o(),s(a.childNodes),e.element=a}else if(e.json){let a=st(e.json,e.isSVG,n);o(),s(a.childNodes)}return n.useInterpolation&&en(r,n),new Gn(t,r,n).y(),Q(r,()=>{Le(t)}),Ht(t),{context:t,unmount:()=>{ee(r)},unbind:()=>{Ee(r)}}},Gn=class{constructor(e,n,r){p(this,"tn");p(this,"rt");p(this,"o");p(this,"m");p(this,"r");this.tn=e,this.rt=n,this.o=r,this.m=new cn([e],r),this.r=new Xt(this.m)}y(){this.r.$(this.rt)}};var bt=t=>{if(S(t))return t.map(o=>bt(o));let e={};if(t.tagName)e.t=t.tagName;else return t.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),t.textContent&&(e.d=t.textContent),e;let n=t.getAttributeNames();n.length>0&&(e.a=Object.fromEntries(n.map(o=>{var s;return[o,(s=t.getAttribute(o))!=null?s:""]})));let r=ve(t);return r.length>0&&(e.c=[...r].map(o=>bt(o))),e};var Ei=(t,e={})=>{var s,i,a,c,f,u;S(e)&&(e={props:e}),G(t)&&(t={template:t});let n=(s=e.context)!=null?s:()=>({}),r=!1;if(t.element){let l=t.element;l.remove(),t.element=l}else if(t.selector){let l=document.querySelector(t.selector);if(!l)throw q(1,t.selector);l.remove(),t.element=l}else if(t.template){let l=document.createRange().createContextualFragment(un(t.template));t.element=l}else t.json&&(t.element=st(t.json,t.isSVG,e.config),r=!0);t.element||(t.element=document.createDocumentFragment()),((i=e.useInterpolation)==null||i)&&en(t.element,(a=e.config)!=null?a:he.getDefault());let o=t.element;if(!r&&(((f=t.isSVG)!=null?f:lt(o)&&((c=o.hasAttribute)!=null&&c.call(o,"isSVG")))||lt(o)&&o.querySelector("[isSVG]"))){let l=o.content,m=l?[...l.childNodes]:[...o.childNodes],y=bt(m);t.element=st(y,!0,e.config)}return{context:n,template:t.element,inheritAttrs:(u=e.inheritAttrs)!=null?u:!0,props:e.props,defaultName:e.defaultName}};var Jn=class{constructor(){p(this,"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 Ri=t=>{var e;(e=Ue())==null||e.onMounted.push(t)};var wi=t=>{let e,n={},r=(...o)=>{if(o.length<=2&&0 in o)throw q(4);return e&&!n.isStopped?e(...o):(e=vi(t,n),e(...o))};return r[J]=1,Pe(r,!0),r.stop=()=>{var o,s;return(s=(o=n.ref)==null?void 0:o.stop)==null?void 0:s.call(o)},ce(()=>r.stop(),!0),r},vi=(t,e)=>{var s;let n=(s=e.ref)!=null?s:ie(null);e.ref=n,e.isStopped=!1;let r=0,o=Ze(()=>{if(r>0){o(),e.isStopped=!0,te(n);return}n(t()),++r});return n.stop=o,n};var Si=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw q(4);return r&&!n.isStopped?r(...s):(r=Ai(t,e,n),r(...s))};return o[J]=1,Pe(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},ce(()=>o.stop(),!0),o},Ai=(t,e,n)=>{var a;let r=(a=n.ref)!=null?a:ie(null);n.ref=r,n.isStopped=!1;let o=0,s=c=>{if(o>0){r.stop(),n.isStopped=!0,te(r);return}let f=t.map(u=>u());r(e(...f)),++o},i=[];for(let c of t){let f=se(c,s);i.push(f)}return s(null),r.stop=()=>{i.forEach(c=>{c()})},r};var Ni=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw q(4);return r&&!n.isStopped?r(...s):(r=Mi(t,e,n),r(...s))};return o[J]=1,Pe(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},ce(()=>o.stop(),!0),o},Mi=(t,e,n)=>{var s;let r=(s=n.ref)!=null?s:ie(null);n.ref=r,n.isStopped=!1;let o=0;return r.stop=se(t,i=>{if(o>0){r.stop(),n.isStopped=!0,te(r);return}r(e(i)),++o},!0),r};var Oi=t=>(t[Nt]=1,t);var ki=(t,e)=>{if(!e)throw q(5);let r=nt(t)?je:a=>a,o=()=>localStorage.setItem(e,JSON.stringify(le(t()))),s=localStorage.getItem(e);if(s!=null)try{t(r(JSON.parse(s)))}catch(a){_(6,`persist: failed to parse data for key ${e}`,a),o()}else o();let i=Ze(o);return ce(i,!0),t};var Qn=(t,...e)=>{let n="",r=t,o=e,s=r.length,i=o.length;for(let a=0;a<s;++a)n+=r[a],a<i&&(n+=o[a]);return n},Li=Qn,Ii=Qn;var Vi=(t,e,n)=>{let r=[],o=()=>{e(t.map(i=>i()))};for(let i of t)r.push(se(i,o));n&&o();let s=()=>{for(let i of r)i()};return ce(s,!0),s};var Pi=t=>{if(!E(t))throw q(3,"observerCount");return t(void 0,void 0,2)};var Di=t=>{Co();try{t()}finally{Eo()}},Co=()=>{be.stack||(be.stack=[]),be.stack.push(new Set)},Eo=()=>{let t=be.stack;if(!t||t.length===0)return;let e=t.pop();if(t.length){let n=t[t.length-1];for(let r of e)n.add(r);return}delete be.stack;for(let n of e)try{te(n)}catch(r){console.error(r)}};export{ct as ComponentHead,Jn as ContextRegistry,he as RegorConfig,Q as addUnbinder,Di as batch,Sn as collectRefs,Si as computeMany,Ni as computeRef,wi as computed,Ci as createApp,Ei as defineComponent,Mo as drainUnbind,Eo as endBatch,pt as entangle,le as flatten,He as getBindData,Qn as html,nt as isDeepRef,mt as isRaw,E as isRef,Oi as markRaw,se as observe,Vi as observeMany,Pi as observerCount,Ri as onMounted,ce as onUnmounted,kn as pause,ki as persist,Wo as pval,Li as raw,je as ref,ee as removeNode,Ln as resume,vn as silence,ie as sref,Co as startBatch,Ii as svg,st as toFragment,bt as toJsonTemplate,te as trigger,Ee as unbind,v as unref,En as useScope,We as warningHandler,Ze as watchEffect};
1
+ var vo=Object.defineProperty,So=Object.defineProperties;var Ao=Object.getOwnPropertyDescriptors;var er=Object.getOwnPropertySymbols;var No=Object.prototype.hasOwnProperty,Mo=Object.prototype.propertyIsEnumerable;var Ct=Math.pow,ln=(t,e,n)=>e in t?vo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Et=(t,e)=>{for(var n in e||(e={}))No.call(e,n)&&ln(t,n,e[n]);if(er)for(var n of er(e))Mo.call(e,n)&&ln(t,n,e[n]);return t},tr=(t,e)=>So(t,Ao(e));var p=(t,e,n)=>ln(t,typeof e!="symbol"?e+"":e,n);var nr=(t,e,n)=>new Promise((r,o)=>{var s=c=>{try{a(n.next(c))}catch(l){o(l)}},i=c=>{try{a(n.throw(c))}catch(l){o(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(s,i);a((n=n.apply(t,e)).next())});var ye=Symbol(":regor");var Re=t=>{let e=[t];for(let n=0;n<e.length;++n){let r=e[n];Oo(r);for(let o=r.lastChild;o!=null;o=o.previousSibling)e.push(o)}},Oo=t=>{let e=t[ye];if(!e)return;let n=e.unbinders;for(let r=0;r<n.length;++r)n[r]();n.length=0,t[ye]=void 0};var Ke=[],Rt=!1,wt,rr=()=>{if(Rt=!1,wt=void 0,Ke.length!==0){for(let t=0;t<Ke.length;++t)Re(Ke[t]);Ke.length=0}},ee=t=>{t.remove(),Ke.push(t),Rt||(Rt=!0,wt=setTimeout(rr,1))},ko=()=>nr(null,null,function*(){Ke.length===0&&!Rt||(wt&&clearTimeout(wt),rr())});var W=t=>typeof t=="function",G=t=>typeof t=="string",or=t=>typeof t=="undefined",pe=t=>t==null||typeof t=="undefined",j=t=>typeof t!="string"||!(t!=null&&t.trim()),Lo=Object.prototype.toString,pn=t=>Lo.call(t),Ve=t=>pn(t)==="[object Map]",le=t=>pn(t)==="[object Set]",mn=t=>pn(t)==="[object Date]",it=t=>typeof t=="symbol",S=Array.isArray,P=t=>t!==null&&typeof t=="object";var sr={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."},q=(t,...e)=>{let n=sr[t];return new Error(W(n)?n.call(sr,...e):n)};var vt=[],ir=()=>{let t={onMounted:[],onUnmounted:[]};return vt.push(t),t},Be=t=>{let e=vt[vt.length-1];if(!e&&!t)throw q(2);return e},ar=t=>{let e=Be();return t&&hn(t),vt.pop(),e},dn=Symbol("csp"),hn=t=>{let e=t,n=e[dn];if(n){let r=Be();if(n===r)return;r.onMounted.length>0&&n.onMounted.push(...r.onMounted),r.onUnmounted.length>0&&n.onUnmounted.push(...r.onUnmounted);return}e[dn]=Be()},St=t=>t[dn];var Ie=t=>{var n,r;let e=(n=St(t))==null?void 0:n.onUnmounted;e==null||e.forEach(o=>{o()}),(r=t.unmounted)==null||r.call(t)};var cr={8:t=>`Model binding requires a ref at ${t.outerHTML}`,7:t=>`Model binding is not supported on ${t.tagName} element at ${t.outerHTML}`,0:(t,e)=>`${t} binding expression is missing at ${e.outerHTML}`,1:(t,e,n)=>`invalid ${t} expression: ${e} at ${n.outerHTML}`,2:(t,e)=>`${t} requires object expression at ${e.outerHTML}`,3:(t,e)=>`${t} binder: key is empty on ${e.outerHTML}.`,4:(t,e,n,r)=>({msg:`Failed setting prop "${t}" on <${e.toLowerCase()}>: value ${n} is invalid.`,args:[r]}),5:(t,e)=>`${t} binding missing event type at ${e.outerHTML}`,6:(t,e)=>({msg:t,args:[e]})},_=(t,...e)=>{let n=cr[t],r=W(n)?n.call(cr,...e):n,o=We.warning;o&&(G(r)?o(r):o(r,...r.args))},We={warning:console.warn};var At=Symbol("ref"),J=Symbol("sref"),Nt=Symbol("raw");var E=t=>t!=null&&t[J]>0;var Pe=class extends Error{constructor(n,r){super(r);p(this,"propPath");p(this,"detail");this.name="PropValidationError",this.propPath=n,this.detail=r}},be=(t,e)=>{throw new Pe(t,`${e}.`)},Mt=t=>{var n;if(t===null)return"null";if(t===void 0)return"undefined";if(E(t))return`ref<${Mt(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(S(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=(n=t==null?void 0:t.constructor)==null?void 0:n.name;return e&&e!=="Object"?e:"object"},Vo=t=>t.length>60?`${t.slice(0,57)}...`:t,at=(t,e=0)=>{if(e>1)return"unknown";if(E(t)){let s=t();return`ref(${at(s,e+1)})`}if(typeof t=="string")return Vo(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(S(t)){let s=t.slice(0,5).map(i=>at(i,e+1)).join(", ");return t.length>5?`[${s}, ...]`:`[${s}]`}if(P(t)){let s=Object.entries(t).slice(0,5);if(s.length===0)return"{}";let i=s.map(([a,c])=>{let l=at(c,e+1);return`${a}: ${l}`}).join(", ");return Object.keys(t).length>5?`{ ${i}, ... }`:`{ ${i} }`}return"unknown"},fe=t=>{if(E(t))return`got ${Mt(t)}(${at(t())})`;let e=Mt(t),n=at(t);return`got ${e} (${n})`},Io=t=>t instanceof Pe?t.detail:t instanceof Error?t.message:String(t),ur=(t,e)=>{let n=`, ${fe(e)}.`;return t.endsWith(n)?t.slice(0,-n.length):t},Po=(t,e,n)=>{if(e instanceof Pe){if(e.propPath===t)return ur(e.detail,n);if(e.propPath===`${t}.value`&&E(n)){let r=ur(e.detail,n());return r.startsWith("expected ")?`expected ref<${r.slice(9)}>`:`expected ref where ${r}`}}return Io(e)},Do=(t,e,n)=>{let r=[];for(let o of e){let s=Po(t,o,n);r.includes(s)||r.push(s)}return r.length===0?fe(n):r.length===1?`${r[0]}, ${fe(n)}`:`${r.join(" or ")}, ${fe(n)}`},Uo=t=>typeof t=="string"?`"${t}"`:typeof t=="number"||typeof t=="boolean"?String(t):t===null?"null":t===void 0?"undefined":Mt(t),Ho=(t,e)=>{typeof t!="string"&&be(e,`expected string, ${fe(t)}`)},Bo=(t,e)=>{typeof t!="number"&&be(e,`expected number, ${fe(t)}`)},$o=(t,e)=>{typeof t!="boolean"&&be(e,`expected boolean, ${fe(t)}`)},jo=t=>(e,n)=>{e instanceof t||be(n,`expected instance of ${t.name||"provided class"}, ${fe(e)}`)},_o=t=>(e,n,r)=>{e!==void 0&&t(e,n,r)},Fo=t=>(e,n,r)=>{e!==null&&t(e,n,r)},qo=(...t)=>(e,n,r)=>{let o=[];for(let s of t)try{s(e,n,r);return}catch(i){o.push(i)}be(n,Do(n,o,e))},zo=t=>(e,n)=>{t.includes(e)||be(n,`expected one of ${t.map(r=>Uo(r)).join(", ")}, ${fe(e)}`)},Ko=t=>(e,n,r)=>{S(e)||be(n,`expected array, ${fe(e)}`);let o=e;for(let s=0;s<o.length;++s)t(o[s],`${n}[${s}]`,r)};function Wo(t){return(e,n,r)=>{P(e)||be(n,`expected object, ${fe(e)}`);let o=e;for(let s in t){let i=t[s];if(!i)continue;i(o[s],`${n}.${s}`,r)}}}var Go=t=>(e,n,r)=>{if(E(e)){t(e(),`${n}.value`,r);return}be(n,`expected ref, ${fe(e)}`)},Jo={fail:be,describe:fe,isString:Ho,isNumber:Bo,isBoolean:$o,isClass:jo,optional:_o,nullable:Fo,or:qo,oneOf:zo,arrayOf:Ko,shape:Wo,refOf:Go};var Qo=(t,e,n)=>{var i,a;let r=((a=(i=t.tagName)==null?void 0:i.toLowerCase)==null?void 0:a.call(i))||"unknown",o=n instanceof Pe?n.propPath:e,s=n instanceof Pe?n.detail:n instanceof Error?n.message:String(n);return n instanceof Error?new Error(`Invalid prop "${o}" on <${r}>: ${s}`,{cause:n}):new Error(`Invalid prop "${o}" on <${r}>: ${s}`,{cause:n})},ct=class{constructor(e,n,r,o,s,i){p(this,"props");p(this,"start");p(this,"end");p(this,"ctx");p(this,"autoProps",!0);p(this,"entangle",!0);p(this,"enableSwitch",!1);p(this,"onAutoPropsAssigned");p(this,"J");p(this,"Q");p(this,"emit",(e,n)=>{this.J.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.J=n,this.ctx=r,this.start=o,this.end=s,this.Q=i}findContext(e,n=0){var o;if(n<0)return;let r=0;for(let s of(o=this.ctx)!=null?o:[])if(s instanceof e){if(r===n)return s;++r}}requireContext(e,n=0){let r=this.findContext(e,n);if(r!==void 0)return r;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 r in e){let o=e[r];if(!o)continue;let s=o;try{s(n[r],r,this)}catch(i){let a=Qo(this.J,r,i);if(this.Q==="warn"){We.warning(a.message,a);continue}throw a}}}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)ee(e),e=e.nextSibling;for(let r of this.ctx)Ie(r)}};var $e=t=>{let e=t,n=e[ye];if(n)return n;let r={unbinders:[],data:{}};return e[ye]=r,r};var Q=(t,e)=>{$e(t).unbinders.push(e)};var je=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 kt={},Ot={},fr=1,lr=t=>{let e=(fr++).toString();return kt[e]=t,Ot[e]=0,e},yn=t=>{Ot[t]+=1},gn=t=>{--Ot[t]===0&&(delete kt[t],delete Ot[t])},pr=t=>kt[t],bn=()=>fr!==1&&Object.keys(kt).length>0,ut="r-switch",Xo=t=>{let e=t.filter(r=>we(r)).map(r=>[...r.querySelectorAll("[r-switch]")].map(o=>o.getAttribute(ut))),n=new Set;return e.forEach(r=>{r.forEach(o=>o&&n.add(o))}),[...n]},Ge=(t,e)=>{if(!bn())return;let n=Xo(e);n.length!==0&&(n.forEach(yn),Q(t,()=>{n.forEach(gn)}))};var Lt=()=>{},Tn=(t,e,n,r)=>{let o=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,r),o.push(i)}De(e,o)},xn=Symbol("r-if"),mr=Symbol("r-else"),dr=t=>t[mr]===1,Vt=class{constructor(e){p(this,"r");p(this,"N");p(this,"xe");p(this,"X");p(this,"Y");p(this,"T");p(this,"R");this.r=e,this.N=e.o.u.if,this.xe=Pt(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 r=e.parentElement;for(;r!==null&&r!==document.documentElement;){if(r.hasAttribute(n))return!0;r=r.parentElement}return!1}k(e){let n=e.hasAttribute(this.N);return n&&this.y(e),e.hasAttribute(this.r.o.u.is)||e.hasAttribute("is")||this.r.E.Z(e)||this.r.E.j(e,o=>{o.hasAttribute(this.N)&&this.y(o)}),n}ee(e){return e[xn]?!0:(e[xn]=!0,It(e,this.xe).forEach(n=>n[xn]=!0),!1)}y(e){if(e.hasAttribute(this.R)||this.ee(e)||this.ot(e,this.T))return;let n=e.getAttribute(this.N);if(!n){_(0,this.N,e);return}e.removeAttribute(this.N),this.M(e,n)}U(e,n,r){let o=Je(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${r!=null?r:""}`);s.insertBefore(i,e),Ge(i,o),o.forEach(c=>{ee(c)}),e.remove(),n!=="if"&&(e[mr]=1);let a=document.createComment(`__end__ :${n}${r!=null?r:""}`);return s.insertBefore(a,i.nextSibling),{nodes:o,parent:s,commentBegin:i,commentEnd:a}}Re(e,n){if(!e)return[];let r=e.nextElementSibling;if(e.hasAttribute(this.X)){e.removeAttribute(this.X);let{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"else");return[{mount:()=>{Tn(o,this.r,s,a)},unmount:()=>{ve(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let o=e.getAttribute(this.Y);if(!o)return[];e.removeAttribute(this.Y);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.U(e,"elseif",` => ${o} `),l=this.r.m.O(o),u=l.value,f=this.Re(r,n),m=Lt;return Q(a,()=>{l.stop(),m(),m=Lt}),m=l.subscribe(n),[{mount:()=>{Tn(s,this.r,i,c)},unmount:()=>{ve(a,c)},isTrue:()=>je(u()[0]),isMounted:!1},...f]}}M(e,n){let r=e.nextElementSibling,{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"if",` => ${n} `),c=this.r.m.O(n),l=c.value,u=!1,f=this.r.m,m=f.L(),y=()=>{f.C(m,()=>{if(je(l()[0]))u||(Tn(o,this.r,s,a),u=!0),x.forEach(C=>{C.unmount(),C.isMounted=!1});else{ve(i,a),u=!1;let C=!1;for(let b of x)!C&&b.isTrue()?(b.isMounted||(b.mount(),b.isMounted=!0),C=!0):(b.unmount(),b.isMounted=!1)}})},x=this.Re(r,y),d=Lt;Q(i,()=>{c.stop(),d(),d=Lt}),y(),d=c.subscribe(y)}};var Je=t=>{let e=me(t)?t.content.childNodes:[t],n=[];for(let r=0;r<e.length;++r){let o=e[r];if(o.nodeType===1){let s=o==null?void 0:o.tagName;if(s==="SCRIPT"||s==="STYLE")continue}n.push(o)}return n},De=(t,e)=>{for(let n=0;n<e.length;++n){let r=e[n];r.nodeType===Node.ELEMENT_NODE&&(dr(r)||t.$(r))}},It=(t,e)=>{var r;let n=t.querySelectorAll(e);return(r=t.matches)!=null&&r.call(t,e)?[t,...n]:n},me=t=>t instanceof HTMLTemplateElement,we=t=>t.nodeType===Node.ELEMENT_NODE,ft=t=>t.nodeType===Node.ELEMENT_NODE,hr=t=>t instanceof HTMLSlotElement,Se=t=>me(t)?t.content.childNodes:t.childNodes,ve=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let r=n.nextSibling;ee(n),n=r}},yr=function(){return this()},Yo=function(t){return this(t)},Zo=()=>{throw new Error("value is readonly.")},es={get:yr,set:Yo,enumerable:!0,configurable:!1},ts={get:yr,set:Zo,enumerable:!0,configurable:!1},Ue=(t,e)=>{t[J]=e?2:1,Object.defineProperty(t,"value",e?ts:es)},gr=(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},Pt=t=>`[${CSS.escape(t)}]`,Dt=(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))},ns=/-(\w)/g,z=Cn(t=>t&&t.replace(ns,(e,n)=>n?n.toUpperCase():"")),rs=/\B([A-Z])/g,Qe=Cn(t=>t&&t.replace(rs,"-$1").toLowerCase()),lt=Cn(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var Ut={mount:()=>{}};var Xe=t=>{let e=t.trim();return e?e.split(/\s+/):[]};var Ht=t=>{var n,r;let e=(n=St(t))==null?void 0:n.onMounted;e==null||e.forEach(o=>{o()}),(r=t.mounted)==null||r.call(t)};var En=Symbol("scope"),Rn=t=>{try{ir();let e=t();hn(e);let n={context:e,unmount:()=>Ie(e),[En]:1};return n[En]=1,n}finally{ar()}},br=t=>P(t)?En in t:!1;var v=t=>{let e=t;return e!=null&&e[J]>0?e():e};var Tr="http://www.w3.org/1999/xlink",os={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},ss=(t,e,n,r,o,s)=>{var a;if(r){r=v(r),s&&s.includes("camel")&&(r=z(r)),Ye(t,r,v(e[0]),v(o));return}let i=e.length;for(let c=0;c<i;++c){let l=e[c];if(S(l)){let u=v((a=n==null?void 0:n[c])==null?void 0:a[0]),f=v(l[0]),m=v(l[1]);Ye(t,f,m,u)}else if(P(l))for(let u of Object.entries(l)){let f=u[0],m=v(u[1]),y=v(n==null?void 0:n[c]),x=y&&f in y?f:void 0;Ye(t,f,m,x)}else{let u=v(n==null?void 0:n[c]),f=v(e[c++]),m=v(e[c]);Ye(t,f,m,u)}}},wn={mount:()=>({update:({el:t,values:e,previousValues:n,option:r,previousOption:o,flags:s})=>{ss(t,e,n,r,o,s)}})},Ye=(t,e,n,r)=>{if(r&&r!==e&&t.removeAttribute(r),pe(e)){_(3,"r-bind",t);return}if(!G(e)){_(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){pe(n)?t.removeAttributeNS(Tr,e.slice(6,e.length)):t.setAttributeNS(Tr,e,n);return}if(pe(n)){t.removeAttribute(e);return}if(e in os){je(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,r=e[0];if(P(r))for(let o of Object.entries(r)){let s=o[0],i=o[1],a=n[s];a!==i&&(E(a)?a(i):n[s]=i)}}})};var ce=(t,e)=>{var n;(n=Be(e))==null||n.onUnmounted.push(t)};var se=(t,e,n,r=!0)=>{if(!E(t))throw q(3,"observe");n&&e(t());let s=t(void 0,void 0,0,e);return r&&ce(s,!0),s};var xr=t=>t[J]===2,pt=(t,e)=>{if(t===e)return()=>{};let n=xr(t),r=xr(e);if(n&&r)return()=>{};if(n){let i=se(t,()=>e(t()));return e(t()),i}if(r){let i=se(e,()=>t(e()));return t(e()),i}let o=se(t,i=>e(i)),s=se(e,i=>t(i));return e(t()),()=>{o(),s()}};var de=[],Cr=t=>{var e;de.length!==0&&((e=de[de.length-1])==null||e.add(t))},Ze=t=>{if(!t)return()=>{};let e={stop:()=>{}};return is(t,e),ce(()=>e.stop(),!0),e.stop},is=(t,e)=>{if(!t)return;let n=[],r=!1,o=()=>{for(let s of n)s();n=[],r=!0};e.stop=o;try{let s=new Set;if(de.push(s),t(i=>n.push(i)),r)return;for(let i of[...s]){let a=se(i,()=>{o(),Ze(t)});n.push(a)}}finally{de.pop()}},Sn=t=>{let e=de.length,n=e>0&&de[e-1];try{return n&&de.push(null),t()}finally{n&&de.pop()}},An=t=>{try{let e=new Set;return de.push(e),{value:t(),refs:[...e]}}finally{de.pop()}};var mt=t=>!!t&&t[Nt]===1;var te=(t,e,n)=>{if(!E(t))return;let r=t;if(r(void 0,e,1),!n)return;let o=r();if(o){if(S(o)||le(o))for(let s of o)te(s,e,!0);else if(Ve(o))for(let s of o)te(s[0],e,!0),te(s[1],e,!0);if(P(o))for(let s in o)te(o[s],e,!0)}};function as(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var et=(t,e,n)=>{n.forEach(function(r){let o=t[r];as(e,r,function(...i){let a=o.apply(this,i),c=this[J];for(let l of c)te(l);return a})})},Bt=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var Er=Array.prototype,Nn=Object.create(Er),cs=["push","pop","shift","unshift","splice","sort","reverse"];et(Er,Nn,cs);var Rr=Map.prototype,$t=Object.create(Rr),us=["set","clear","delete"];Bt($t,"Map");et(Rr,$t,us);var wr=Set.prototype,jt=Object.create(wr),fs=["add","clear","delete"];Bt(jt,"Set");et(wr,jt,fs);var Te={},ie=t=>{if(E(t)||mt(t))return t;let e={auto:!0,_value:t},n=c=>P(c)?J in c?!0:S(c)?(Object.setPrototypeOf(c,Nn),!0):le(c)?(Object.setPrototypeOf(c,jt),!0):Ve(c)?(Object.setPrototypeOf(c,$t),!0):!1:!1,r=n(t),o=new Set,s=(c,l)=>{if(Te.stack&&Te.stack.length){Te.stack[Te.stack.length-1].add(a);return}o.size!==0&&Sn(()=>{for(let u of[...o.keys()])o.has(u)&&u(c,l)})},i=c=>{let l=c[J];l||(c[J]=l=new Set),l.add(a)},a=(...c)=>{if(!(2 in c)){let u=c[0],f=c[1];return 0 in c?e._value===u||E(u)&&(u=u(),e._value===u)?u:(n(u)&&i(u),e._value=u,e.auto&&s(u,f),e._value):(Cr(a),e._value)}switch(c[2]){case 0:{let u=c[3];if(!u)return()=>{};let f=m=>{o.delete(m)};return o.add(u),()=>{f(u)}}case 1:{let u=c[1],f=e._value;s(f,u);break}case 2:return o.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return Ue(a,!1),r&&i(t),a};var vr=Symbol("modelBridge"),_t=()=>{},ls=t=>!!(t!=null&&t[vr]),ps=t=>{t[vr]=1},ms=t=>{let e=ie(t());return ps(e),e},Sr={collectRefObj:!0,mount:({parseResult:t,option:e})=>{if(typeof e!="string"||!e)return _t;let n=z(e),r,o,s=_t,i=()=>{s(),s=_t,r=void 0,o=void 0},a=()=>{s(),s=_t},c=(u,f)=>{r!==u&&(a(),s=pt(u,f),r=u)},l=()=>{var y;let u=(y=t.refs[0])!=null?y:t.value()[0],f=t.context,m=f[n];if(!E(u)){if(o&&m===o){o(u);return}if(i(),E(m)){m(u);return}f[n]=ie(u);return}if(ls(u)){if(m===u)return;E(m)?c(u,m):f[n]=u;return}o||(o=ms(u)),f[n]=o,c(u,o)};return{update:()=>{l()},unmount:()=>{s()}}}};var Ft=class{constructor(e){p(this,"r");p(this,"_");p(this,"Ee","");p(this,"Ce",-1);this.r=e,this._=e.o.u.inherit}k(e){this.st(e)}it(e){if(this.Ce!==e.size){let n=[...e.keys()];this.Ee=[...n,...n.map(Qe)].join(","),this.Ce=e.size}return this.Ee}ct(e){var n;for(let r=0;r<e.length;++r){let o=(n=e[r])==null?void 0:n.components;if(o)for(let s in o)return!0}return!1}ut(e){if(!me(e))return!1;let n=e.getAttributeNames();return e.hasAttribute("name")?!0:n.some(r=>r.startsWith("#"))}pt(e){return me(e)&&e.getAttributeNames().length===0}st(e){var l,u;let n=this.r,r=n.m,o=n.o.te,s=n.o.F;if(o.size===0&&!this.ct(r.l))return;let i=r.ne(),a=this.re();if(j(a))return;let c=this.lt(e,a);for(let f of c){if(f.hasAttribute(n.R))continue;let m=f.parentNode;if(!m)continue;let y=f.nextSibling,x=z(f.tagName).toUpperCase(),d=i[x],w=d!=null?d:s.get(x);if(!w)continue;let C=w.template;if(!C)continue;let b=f.parentElement;if(!b)continue;let M=new Comment(" begin component: "+f.tagName),D=new Comment(" end component: "+f.tagName);b.insertBefore(M,f),f.remove();let U=n.o.u.context,V=n.o.u.contextAlias,ne=n.o.u.bind,K=(u=(l=w.props)==null?void 0:l.map(z))!=null?u:[],A=[],T=h=>h==="class"||h==="style",I=(h,k,N=!1)=>{let Y={},$=h.hasAttribute(U);return r.C(k,()=>{if(r.v(Y),$?n.y(vn,h,U):h.hasAttribute(V)&&n.y(vn,h,V),K.length===0)return;let Z=new Map(K.map(g=>[g.toLowerCase(),g]));for(let g of[...K,...K.map(Qe)]){let L=h.getAttribute(g);if(L===null)continue;let B=z(g);Y[B]=L,N&&w.inheritAttrs===!0&&T(B)&&A.push({name:g,value:L}),h.removeAttribute(g)}let R=n.q.we(h,!1);for(let[g,L]of R.entries()){let[B,oe]=L.oe;if(!oe)continue;let Ee=Z.get(z(oe).toLowerCase());if(Ee&&!(B!=="."&&B!==":"&&B!==ne)){if(N&&B!=="."&&w.inheritAttrs===!0&&T(Ee)){let Zn=h.getAttribute(g);Zn!==null&&A.push({name:g,value:Zn})}n.y(Sr,h,g,!0,Ee,L.se)}}}),Y},F=[...r.L()],ze=()=>{var Y;let h=I(f,F,!0),k=new ct(h,f,F,M,D,n.o.propValidationMode),N=Rn(()=>{var $;return($=w.context(k))!=null?$:{}}).context;if(k.autoProps){for(let[$,Z]of Object.entries(h))if($ in N){let R=N[$];if(R===Z)continue;if(E(R)){E(Z)?k.entangle?Q(M,pt(Z,R)):R(Z()):R(Z);continue}}else N[$]=Z;for(let $ of K)$ in N||(N[$]=void 0);(Y=k.onAutoPropsAssigned)==null||Y.call(k)}return{componentCtx:N,head:k}},{componentCtx:xe,head:Tt}=ze(),O=[...Se(C)],xt=O.length,H=f.childNodes.length===0,X=h=>{var Z;let k=h.parentElement,N=h.name;if(j(N)&&(N=h.getAttributeNames().filter(R=>R.startsWith("#"))[0],j(N)?N="default":N=N.substring(1)),H){if(N==="default"){let R=n.o.u.text,g=f.getAttribute(R);if(!j(g)){let L=document.createElement("span");L.setAttribute(R,g),k.insertBefore(L,h),f.removeAttribute(R);return}}for(let R of[...h.childNodes])k.insertBefore(R,h);return}let Y=f.querySelector(`template[name='${N}'], template[\\#${N}]`);!Y&&N==="default"&&(Y=(Z=[...f.querySelectorAll("template:not([name])")].find(g=>this.pt(g)))!=null?Z:null);let $=R=>{Tt.enableSwitch&&r.C(F,()=>{r.v(xe);let g=I(h,r.L());r.C(F,()=>{r.v(g);let L=r.L(),B=lr(L);for(let oe of R)we(oe)&&(oe.setAttribute(ut,B),yn(B),Q(oe,()=>{gn(B)}))})})};if(Y){let R=[...Se(Y)];for(let g of R)k.insertBefore(g,h);$(R)}else{if(N!=="default"){for(let g of[...Se(h)])k.insertBefore(g,h);return}let R=[...Se(f)].filter(g=>!this.ut(g));for(let g of R)k.insertBefore(g,h);$(R)}},re=h=>{if(!we(h))return;let k=h.querySelectorAll("slot");if(hr(h)){X(h),h.remove();return}for(let N of k)X(N),N.remove()};(()=>{for(let h=0;h<xt;++h)O[h]=O[h].cloneNode(!0),m.insertBefore(O[h],y),re(O[h])})(),b.insertBefore(D,y);let Ce=()=>{if(!w.inheritAttrs)return;let h=O.filter(g=>g.nodeType===Node.ELEMENT_NODE),k=h.flatMap(g=>[...g.hasAttribute(this._)?[g]:[],...g.querySelectorAll(`[${this._}]`)]).at(0),N=k!=null?k:h.length===1?h[0]:void 0;if(!N)return;N.removeAttribute(this._);let Y=`${ne}:class`,$=`${ne}:style`,Z=(g,L,B)=>{let oe=N.hasAttribute(g)?g:N.hasAttribute(L)?L:g,Ee=N.getAttribute(oe);N.setAttribute(oe,j(Ee)?B:`${Ee}, ${B}`)},R=(g,L)=>{if(g==="class"){let B=Xe(L);B.length>0&&N.classList.add(...B)}else if(g===":class"||g===Y)Z(":class",Y,L);else if(g==="style"){let B=N.style,oe=f.style;for(let Ee of oe)B.setProperty(Ee,oe.getPropertyValue(Ee))}else if(g===":style"||g===$)Z(":style",$,L);else{let B=Dt(g,n.o);Ye(N,B,L)}};for(let{name:g,value:L}of A)f.setAttribute(g,L);for(let g of f.getAttributeNames())g===U||g===V||R(g,f.getAttribute(g))},ke=()=>{for(let h of f.getAttributeNames())!h.startsWith("@")&&!h.startsWith(n.o.u.on)&&f.removeAttribute(h)},Le=()=>{Ce(),ke(),r.v(xe),n.ve(f,!1),xe.$emit=Tt.emit,De(n,O),Q(f,()=>{Ie(xe)}),Q(M,()=>{Re(f)}),Ht(xe)};r.C(F,Le)}}re(){let e=this.r,n=e.m,r=e.o.te,o=n.ft(),s=this.it(r);return[...s?[s]:[],...o,...o.map(Qe)].join(",")}Z(e){var r;let n=this.re();return!j(n)&&((r=e.matches)==null?void 0:r.call(e,n))}lt(e,n){var s;let r=[];if(j(n))return r;if((s=e.matches)!=null&&s.call(e,n))return[e];let o=this.K(e).reverse();for(;o.length>0;){let i=o.pop();if(i.matches(n)){r.push(i);continue}o.push(...this.K(i).reverse())}return r}j(e,n){let r=this.r,o=this.re(),s=r.o.u.is,i=this.K(e).reverse();for(;i.length>0;){let a=i.pop();n(a),!(!j(o)&&a.matches(o))&&(a.hasAttribute(s)||a.hasAttribute("is")||i.push(...this.K(a).reverse()))}}K(e){let n=e==null?void 0:e.children;if((n==null?void 0:n.length)!=null){let o=[];for(let s=0;s<n.length;++s){let i=n[s];we(i)&&o.push(i)}return o}let r=e==null?void 0:e.childNodes;if((r==null?void 0:r.length)!=null){let o=[];for(let s=0;s<r.length;++s){let i=r[s];we(i)&&o.push(i)}return o}return[]}};var Mn=class{constructor(e,n){p(this,"oe");p(this,"se");p(this,"Se",[]);this.oe=e,this.se=n}},qt=class{constructor(e){p(this,"r");p(this,"Ae");p(this,"Ve");p(this,"ie");var r;this.r=e,this.Ae=e.o.dt(),this.ie=new Map;let n=new Map;for(let o of this.Ae){let s=(r=o[0])!=null?r:"",i=n.get(s);i?i.push(o):n.set(s,[o])}this.Ve=n}ke(e){let n=this.ie.get(e);if(n)return n;let r=e,o=r.startsWith(".");o&&(r=":"+r.slice(1));let s=r.indexOf("."),a=(s<0?r:r.substring(0,s)).split(/[:@]/);j(a[0])&&(a[0]=o?".":r[0]);let c=s>=0?r.slice(s+1).split("."):[],l=!1,u=!1;for(let m=0;m<c.length;++m){let y=c[m];if(!l&&y==="camel"?l=!0:!u&&y==="prop"&&(u=!0),l&&u)break}l&&(a[a.length-1]=z(a[a.length-1])),u&&(a[0]=".");let f={terms:a,flags:c};return this.ie.set(e,f),f}we(e,n){let r=new Map;if(!ft(e))return r;let o=this.Ve,s=(a,c)=>{var u;let l=o.get((u=c[0])!=null?u:"");if(l)for(let f=0;f<l.length;++f){if(!c.startsWith(l[f]))continue;let m=r.get(c);if(!m){let y=this.ke(c);m=new Mn(y.terms,y.flags),r.set(c,m)}m.Se.push(a);return}},i=a=>{var l;let c=a.attributes;if(!(!c||c.length===0))for(let u=0;u<c.length;++u){let f=(l=c.item(u))==null?void 0:l.name;f&&s(a,f)}};return i(e),!n||!e.firstElementChild||this.r.E.j(e,i),r}};var Ar=()=>{},ds=(t,e)=>{for(let n of t){let r=n.cloneNode(!0);e.appendChild(r)}},zt=class{constructor(e){p(this,"r");p(this,"I");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.E.Z(e)||this.r.E.j(e,r=>{(r.hasAttribute(this.I)||r.hasAttribute("is"))&&this.y(r)}),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 r=n.slice(2).trim().toLowerCase();if(!r)return;let o=e.parentNode;if(!o)return;let s=document.createElement(r);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);o.insertBefore(s,e),e.remove(),this.r.$(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.M(e,n)}U(e,n){let r=Je(e),o=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);o.insertBefore(s,e),Ge(s,r),r.forEach(a=>{ee(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n!=null?n:""}`);return o.insertBefore(i,s.nextSibling),{nodes:r,parent:o,commentBegin:s,commentEnd:i}}M(e,n){let{nodes:r,commentBegin:o,commentEnd:s}=this.U(e,` => ${n} `),i=this.r.m.O(n),a=i.value,c=this.r.m,l=c.L(),u={name:""},f=me(e)?r:[...r[0].childNodes],m=()=>{c.C(l,()=>{var b,M;let d=a()[0];if(P(d)&&(d.name?d=d.name:d=(b=Object.entries(c.ne()).filter(D=>D[1]===d)[0])==null?void 0:b[0]),!G(d)||j(d)){ve(o,s);return}if(u.name===d)return;ve(o,s);let w=(M=s.parentNode)!=null?M:o.parentNode;if(!w)return;let C=document.createElement(d);for(let D of e.getAttributeNames())D!==this.I&&C.setAttribute(D,e.getAttribute(D));ds(f,C),w.insertBefore(C,s),this.r.$(C),u.name=d})},y=Ar;Q(o,()=>{i.stop(),y(),y=Ar}),m(),y=i.subscribe(m)}};var hs=(t,e)=>{let[n,r]=e;W(r)?r(t,n):t.innerHTML=n==null?void 0:n.toString()},Kt={mount:()=>({update:({el:t,values:e})=>{hs(t,e)}})};var Wt=class t{constructor(e){p(this,"ae");this.ae=e}static mt(e,n){var y,x;let r=e.m,o=e.o,s=o.u,i=new Set([s.for,s.if,s.else,s.elseif,s.pre]),a=o.B,c=r.ne();if(Object.keys(c).length>0||o.F.size>0)return;let l=e.q,u=[],f=0,m=[];for(let d=n.length-1;d>=0;--d)m.push(n[d]);for(;m.length>0;){let d=m.pop();if(d.nodeType===Node.ELEMENT_NODE){let C=d;if(C.tagName==="TEMPLATE"||C.tagName.includes("-"))return;let b=z(C.tagName).toUpperCase();if(o.F.has(b)||c[b])return;let M=C.attributes;for(let D=0;D<M.length;++D){let U=(y=M.item(D))==null?void 0:y.name;if(!U)continue;if(i.has(U))return;let{terms:V,flags:ne}=l.ke(U),[K,A]=V,T=(x=a[U])!=null?x:a[K];if(T){if(T===Kt)return;u.push({nodeIndex:f,attrName:U,directive:T,option:A,flags:ne})}}++f}let w=d.childNodes;for(let C=w.length-1;C>=0;--C)m.push(w[C])}if(u.length!==0)return new t(u)}y(e,n){let r=[],o=[];for(let s=n.length-1;s>=0;--s)o.push(n[s]);for(;o.length>0;){let s=o.pop();s.nodeType===Node.ELEMENT_NODE&&r.push(s);let i=s.childNodes;for(let a=i.length-1;a>=0;--a)o.push(i[a])}for(let s=0;s<this.ae.length;++s){let i=this.ae[s],a=r[i.nodeIndex];a&&e.y(i.directive,a,i.attrName,!1,i.option,i.flags)}}};var ys=(t,e)=>{let n=e.parentNode;if(n)for(let r=0;r<t.items.length;++r)n.insertBefore(t.items[r],e)},gs=t=>{var a;let e=t.length,n=t.slice(),r=[],o,s,i;for(let c=0;c<e;++c){let l=t[c];if(l===0)continue;let u=r[r.length-1];if(u===void 0||t[u]<l){n[c]=u!=null?u:-1,r.push(c);continue}for(o=0,s=r.length-1;o<s;)i=o+s>>1,t[r[i]]<l?o=i+1:s=i;l<t[r[o]]&&(o>0&&(n[c]=r[o-1]),r[o]=c)}for(o=r.length,s=(a=r[o-1])!=null?a:-1;o-- >0;)r[o]=s,s=n[s];return r},Gt=class{static yt(e){let{oldItems:n,newValues:r,getKey:o,isSameValue:s,mountNewValue:i,removeMountItem:a,endAnchor:c}=e,l=n.length,u=r.length,f=new Array(u),m=new Set;for(let T=0;T<u;++T){let I=o(r[T]);if(I===void 0||m.has(I))return;m.add(I),f[T]=I}let y=new Array(u),x=0,d=l-1,w=u-1;for(;x<=d&&x<=w;){let T=n[x];if(o(T.value)!==f[x]||!s(T.value,r[x]))break;T.value=r[x],y[x]=T,++x}for(;x<=d&&x<=w;){let T=n[d];if(o(T.value)!==f[w]||!s(T.value,r[w]))break;T.value=r[w],y[w]=T,--d,--w}if(x>d){for(let T=w;T>=x;--T){let I=T+1<u?y[T+1].items[0]:c;y[T]=i(T,r[T],I)}return y}if(x>w){for(let T=x;T<=d;++T)a(n[T]);return y}let C=x,b=x,M=w-b+1,D=new Array(M).fill(0),U=new Map;for(let T=b;T<=w;++T)U.set(f[T],T);let V=!1,ne=0;for(let T=C;T<=d;++T){let I=n[T],F=U.get(o(I.value));if(F===void 0){a(I);continue}if(!s(I.value,r[F])){a(I);continue}I.value=r[F],y[F]=I,D[F-b]=T+1,F>=ne?ne=F:V=!0}let K=V?gs(D):[],A=K.length-1;for(let T=M-1;T>=0;--T){let I=b+T,F=I+1<u?y[I+1].items[0]:c;if(D[T]===0){y[I]=i(I,r[I],F);continue}let ze=y[I];V&&(A>=0&&K[A]===T?--A:ze&&ys(ze,F))}return y}};var dt=class{constructor(e){p(this,"x",[]);p(this,"P",new Map);p(this,"ce");this.ce=e}get S(){return this.x.length}ue(e){let n=this.ce(e.value);n!==void 0&&this.P.set(n,e)}pe(e){var r;let n=this.ce((r=this.x[e])==null?void 0:r.value);n!==void 0&&this.P.delete(n)}static ht(e,n){return{items:[],index:e,value:n,order:-1}}v(e){e.order=this.S,this.x.push(e),this.ue(e)}gt(e,n){let r=this.S;for(let o=e;o<r;++o)this.x[o].order=o+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}Ne(e){this.pe(e),this.x.splice(e,1);let n=this.S;for(let r=e;r<n;++r)this.x[r].order=r}Me(e){let n=this.S;for(let r=e;r<n;++r)this.pe(r);this.x.splice(e)}nn(e){return this.P.has(e)}bt(e){var r;let n=this.P.get(e);return(r=n==null?void 0:n.order)!=null?r:-1}};var On=Symbol("r-for"),bs=t=>-1,Nr=()=>{},Qt=class Qt{constructor(e){p(this,"r");p(this,"T");p(this,"Oe");p(this,"R");this.r=e,this.T=e.o.u.for,this.Oe=Pt(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.E.Z(e)||this.r.E.j(e,o=>{o.hasAttribute(this.T)&&this.Le(o)}),n}ee(e){return e[On]?!0:(e[On]=!0,It(e,this.Oe).forEach(n=>n[On]=!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 pe(e)?[]:(W(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(r=>({*[Symbol.iterator](){for(let o=1;o<=r;o++)yield o}}))(e):Object.entries(e))}Tt(e,n){var xt;let r=this.xt(n);if(!(r!=null&&r.list)){_(1,this.T,n,e);return}let o=this.r.o.u.key,s=this.r.o.u.keyBind,i=(xt=e.getAttribute(o))!=null?xt:e.getAttribute(s);e.removeAttribute(o),e.removeAttribute(s);let a=Je(e),c=Wt.mt(this.r,a),l=e.parentNode;if(!l)return;let u=`${this.T} => ${n}`,f=new Comment(`__begin__ ${u}`);l.insertBefore(f,e),Ge(f,a),a.forEach(H=>{ee(H)}),e.remove();let m=new Comment(`__end__ ${u}`);l.insertBefore(m,f.nextSibling);let y=this.r,x=y.m,d=x.L(),C=d.length===1?[void 0,d[0]]:void 0,b=this.Rt(i),M=(H,X)=>b(H)===b(X),D=(H,X)=>H===X,U=(H,X,re)=>{let ae=r.createContext(X,H),Ce=dt.ht(ae.index,X),ke=()=>{var N,Y;let Le=(Y=(N=m.parentNode)!=null?N:f.parentNode)!=null?Y:l,h=re.previousSibling,k=[];for(let $=0;$<a.length;++$){let Z=a[$].cloneNode(!0);Le.insertBefore(Z,re),k.push(Z)}for(c?c.y(y,k):De(y,k),h=h.nextSibling;h!==re;)Ce.items.push(h),h=h.nextSibling};return C?(C[0]=ae.ctx,x.C(C,ke)):x.C(d,()=>{x.v(ae.ctx),ke()}),Ce},V=(H,X)=>{let re=O.D(H).items,ae=re[re.length-1].nextSibling;for(let Ce of re)ee(Ce);O.le(H,U(H,X,ae))},ne=(H,X)=>{O.v(U(H,X,m))},K=H=>{for(let X of O.D(H).items)ee(X)},A=H=>{let X=O.S;for(let re=H;re<X;++re)O.D(re).index(re)},T=H=>{let X=f.parentNode,re=m.parentNode;if(!X||!re)return;let ae=O.S;W(H)&&(H=H());let Ce=v(H[0]);if(S(Ce)&&Ce.length===0){ve(f,m),O.Me(0);return}let ke=[];for(let R of this.Ie(H[0]))ke.push(R);let Le=Gt.yt({oldItems:O.x,newValues:ke,getKey:b,isSameValue:D,mountNewValue:(R,g,L)=>U(R,g,L),removeMountItem:R=>{for(let g=0;g<R.items.length;++g)ee(R.items[g])},endAnchor:m});if(Le){O.x=Le,O.P.clear();for(let R=0;R<Le.length;++R){let g=Le[R];g.order=R,g.index(R);let L=b(g.value);L!==void 0&&O.P.set(L,g)}return}let h=0,k=Number.MAX_SAFE_INTEGER,N=ae,Y=this.r.o.forGrowThreshold,$=()=>O.S<N+Y;for(let R of ke){let g=()=>{if(h<ae){let L=O.D(h++);if(M(L.value,R)){if(D(L.value,R))return;V(h-1,R);return}let B=O.bt(b(R));if(B>=h&&B-h<10){if(--h,k=Math.min(k,h),K(h),O.Ne(h),--ae,B>h+1)for(let oe=h;oe<B-1&&oe<ae&&!M(O.D(h).value,R);)++oe,K(h),O.Ne(h),--ae;g();return}$()?(O.gt(h-1,U(h,R,O.D(h-1).items[0])),k=Math.min(k,h-1),++ae):V(h-1,R)}else ne(h++,R)};g()}let Z=h;for(ae=O.S;h<ae;)K(h++);O.Me(Z),A(k)},I=()=>{F.stop(),xe(),xe=Nr},F=x.O(r.list),ze=F.value,xe=Nr,Tt=0,O=new dt(b);for(let H of this.Ie(ze()[0]))O.v(U(Tt++,H,m));Q(f,I),xe=F.subscribe(T)}xt(e){var c,l;let n=Qt.Et.exec(e);if(!n)return;let r=(n[1]+((c=n[2])!=null?c:"")).split(",").map(u=>u.trim()),o=r.length>1?r.length-1:-1,s=o!==-1&&(r[o]==="index"||(l=r[o])!=null&&l.startsWith("#"))?r[o]:"";s&&r.splice(o,1);let i=n[3];if(!i||r.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(u,f)=>{let m={},y=v(u);if(!a&&r.length===1)m[r[0]]=u;else if(S(y)){let d=0;for(let w of r)m[w]=y[d++]}else for(let d of r)m[d]=y[d];let x={ctx:m,index:bs};return s&&(x.index=m[s.startsWith("#")?s.substring(1):s]=ie(f)),x}}}Rt(e){if(!e)return r=>r;let n=e.trim();if(!n)return r=>r;if(n.includes(".")){let r=this.Ct(n),o=r.length>1?r.slice(1):void 0;return s=>{let i=v(s),a=this.Pe(i,r);return a!==void 0||!o?a:this.Pe(i,o)}}return r=>{var o;return v((o=v(r))==null?void 0:o[n])}}Ct(e){return e.split(".").filter(n=>n.length>0)}Pe(e,n){var o;let r=e;for(let s of n)r=(o=v(r))==null?void 0:o[s];return v(r)}};p(Qt,"Et",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var Jt=Qt;var Xt=class{constructor(e){p(this,"fe",0);p(this,"de",new Map);p(this,"m");p(this,"De");p(this,"Ue");p(this,"Be");p(this,"E");p(this,"q");p(this,"o");p(this,"R");p(this,"He");this.m=e,this.o=e.o,this.Ue=new Jt(this),this.De=new Vt(this),this.Be=new zt(this),this.E=new Ft(this),this.q=new qt(this),this.R=this.o.u.pre,this.He=this.o.u.dynamic}wt(e){let n=me(e)?[e]:e.querySelectorAll("template");for(let r of n){if(r.hasAttribute(this.R))continue;let o=r.parentNode;if(!o)continue;let s=r.nextSibling;if(r.remove(),!r.content)continue;let i=[...r.content.childNodes];for(let a of i)o.insertBefore(a,s);De(this,i)}}$(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.E.k(e),this.wt(e),this.ve(e,!0)}finally{--this.fe,this.fe===0&&this.vt()}}St(e,n){let r=document;if(!r){let o=e.parentNode;for(;o!=null&&o.parentNode;)o=o.parentNode;if(!o)return null;r=o}return r.querySelector(n)}je(e,n){let r=this.St(e,n);if(!r)return!1;let o=e.parentElement;if(!o)return!1;let s=new Comment(`teleported => '${n}'`);return o.insertBefore(s,e),e.teleportedFrom=s,s.teleportedTo=e,Q(s,()=>{ee(e)}),r.appendChild(e),!0}At(e,n){this.de.set(e,n)}vt(){let e=this.de;if(e.size!==0){this.de=new Map;for(let[n,r]of e.entries())this.je(n,r)}}ve(e,n){var s;let r=this.q.we(e,n),o=this.o.B;for(let[i,a]of r.entries()){let[c,l]=a.oe,u=(s=o[i])!=null?s:o[c];if(!u){console.error("directive not found:",c);continue}let f=a.Se;for(let m=0;m<f.length;++m){let y=f[m];this.y(u,y,i,!1,l,a.se)}}}y(e,n,r,o,s,i){if(n.hasAttribute(this.R))return;let a=n.getAttribute(r);n.removeAttribute(r);let c=l=>{let u=l;for(;u;){let f=u.getAttribute(ut);if(f)return f;u=u.parentElement}return null};if(bn()){let l=c(n);if(l){this.m.C(pr(l),()=>{this.M(e,n,a,s,i)});return}}this.M(e,n,a,s,i)}Vt(e,n,r){return e!==Ut?!1:(j(r)||this.je(n,r)||this.At(n,r),!0)}M(e,n,r,o,s){if(n.nodeType!==Node.ELEMENT_NODE||r==null||this.Vt(e,n,r))return;let i=this.kt(o,e.once),a=this.Nt(e,r),c=this.Mt(a,i);Q(n,c.stop);let l=this.Ot(n,r,a,i,o,s),u=this.Lt(e,l,c);if(!u)return;let f=this.It(l,a,i,o,u);f(),e.once||(c.result=a.subscribe(f),i&&(c.dynamic=i.subscribe(f)))}kt(e,n){let r=gr(e,this.He);if(r)return this.m.O(z(r),void 0,void 0,void 0,n)}Nt(e,n){return this.m.O(n,e.isLazy,e.isLazyKey,e.collectRefObj,e.once)}Mt(e,n){let r={stop:()=>{var o,s,i;e.stop(),n==null||n.stop(),(o=r.result)==null||o.call(r),(s=r.dynamic)==null||s.call(r),(i=r.mounted)==null||i.call(r),r.result=void 0,r.dynamic=void 0,r.mounted=void 0}};return r}Ot(e,n,r,o,s,i){return{el:e,expr:n,values:r.value(),previousValues:void 0,option:o?o.value()[0]:s,previousOption:void 0,flags:i,parseResult:r,dynamicOption:o}}Lt(e,n,r){let o=e.mount(n);if(typeof o=="function"){r.mounted=o;return}return o!=null&&o.unmount&&(r.mounted=o.unmount),o==null?void 0:o.update}It(e,n,r,o,s){let i,a;return()=>{let c=n.value(),l=r?r.value()[0]:o;e.values=c,e.previousValues=i,e.option=l,e.previousOption=a,i=c,a=l,s(e)}}};var Ts=(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n==null?void 0:n[o];if(S(s)){let a=s.length;for(let c=0;c<a;++c)Mr(t,s[c],i==null?void 0:i[c])}else Mr(t,s,i)}},kn={mount:()=>({update:({el:t,values:e,previousValues:n})=>{Ts(t,e,n)}})},Mr=(t,e,n)=>{let r=v(e),o=v(n),s=t.classList,i=G(r),a=G(o);if(r&&!i){let c=r;if(o&&!a){let l=o;for(let u in l)(!(u in c)||!v(c[u]))&&s.remove(u)}for(let l in c)v(c[l])&&s.add(l)}else if(i){if(o!==r){let c=a?Xe(o):[],l=Xe(r);c.length>0&&s.remove(...c),l.length>0&&s.add(...l)}}else if(o){let c=a?Xe(o):[];c.length>0&&s.remove(...c)}};function xs(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=Ae(t[r],e[r]);return n}function Ae(t,e){if(t===e)return!0;let n=mn(t),r=mn(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=it(t),r=it(e),n||r)return t===e;if(n=S(t),r=S(e),n||r)return n&&r?xs(t,e):!1;if(n=P(t),r=P(e),n||r){if(!n||!r)return!1;let o=Object.keys(t).length,s=Object.keys(e).length;if(o!==s)return!1;for(let i in t){let a=Object.prototype.hasOwnProperty.call(t,i),c=Object.prototype.hasOwnProperty.call(e,i);if(a&&!c||!Ae(t[i],e[i]))return!1}return!0}return String(t)===String(e)}function Yt(t,e){return t.findIndex(n=>Ae(n,e))}var Or=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var Ln=t=>{if(!E(t))throw q(3,"pause");t(void 0,void 0,3)};var Vn=t=>{if(!E(t))throw q(3,"resume");t(void 0,void 0,4)};var Lr={mount:({el:t,parseResult:e,flags:n})=>({update:({values:r})=>{Vr(t,r[0])},unmount:Cs(t,e,n)})},Vr=(t,e)=>{let n=Ur(t);if(n&&Ir(t))S(e)?e=Yt(e,Ne(t))>-1:le(e)?e=e.has(Ne(t)):e=As(t,e),t.checked=e;else if(n&&Pr(t))t.checked=Ae(e,Ne(t));else if(n||Hr(t))Dr(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(Br(t)){let r=t.options,o=r.length,s=t.multiple;for(let i=0;i<o;i++){let a=r[i],c=Ne(a);if(s)S(e)?a.selected=Yt(e,c)>-1:a.selected=e.has(c);else if(Ae(Ne(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else _(7,t)},ht=t=>(E(t)&&(t=t()),W(t)&&(t=t()),t?G(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}),Ir=t=>t.type==="checkbox",Pr=t=>t.type==="radio",Dr=t=>t.type==="number"||t.type==="range",Ur=t=>t.tagName==="INPUT",Hr=t=>t.tagName==="TEXTAREA",Br=t=>t.tagName==="SELECT",Cs=(t,e,n)=>{let r=e.value,o=ht(n==null?void 0:n.join(",")),s=ht(r()[1]),i={int:o.int||s.int,lazy:o.lazy||s.lazy,number:o.number||s.number,trim:o.trim||s.trim};if(!e.refs[0])return _(8,t),()=>{};let a=()=>e.refs[0],c=Ur(t);return c&&Ir(t)?Rs(t,a):c&&Pr(t)?Ns(t,a):c||Hr(t)?Es(t,i,a,r):Br(t)?Ms(t,a,r):(_(7,t),()=>{})},kr=/[.,' ·٫]/,Es=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=Dr(t),a=()=>{!e.trim&&!ht(r()[1]).trim||(t.value=t.value.trim())},c=m=>{let y=m.target;y.composing=1},l=m=>{let y=m.target;y.composing&&(y.composing=0,y.dispatchEvent(new Event(s)))},u=()=>{t.removeEventListener(s,f),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",l),t.removeEventListener("change",l)},f=m=>{let y=n();if(!y)return;let x=m.target;if(!x||x.composing)return;let d=x.value,w=ht(r()[1]);if(i||w.number||w.int){if(w.int)d=parseInt(d);else{if(kr.test(d[d.length-1])&&d.split(kr).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(y()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else w.trim&&(d=d.trim());y(d)};return t.addEventListener(s,f),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",l),t.addEventListener("change",l),u},Rs=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=Ne(t),a=t.checked,c=s();if(S(c)){let l=Yt(c,i),u=l!==-1;a&&!u?c.push(i):!a&&u&&c.splice(l,1)}else le(c)?a?c.add(i):c.delete(i):s(Ss(t,a))};return t.addEventListener(n,o),r},Ne=t=>"_value"in t?t._value:t.value,$r="trueValue",ws="falseValue",jr="true-value",vs="false-value",Ss=(t,e)=>{let n=e?$r:ws;if(n in t)return t[n];let r=e?jr:vs;return t.hasAttribute(r)?t.getAttribute(r):e},As=(t,e)=>{if($r in t)return Ae(e,t.trueValue);let r=jr;return t.hasAttribute(r)?Ae(e,t.getAttribute(r)):Ae(e,!0)},Ns=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=Ne(t);s(i)};return t.addEventListener(n,o),r},Ms=(t,e,n)=>{let r="change",o=Os(t,n),s=()=>{t.removeEventListener(r,i),o()},i=()=>{let a=e();if(!a)return;let l=ht(n()[1]).number,u=Array.prototype.filter.call(t.options,f=>f.selected).map(f=>l?Or(Ne(f)):Ne(f));if(t.multiple){let f=a();try{if(Ln(a),le(f)){f.clear();for(let m of u)f.add(m)}else S(f)?(f.splice(0),f.push(...u)):a(u)}finally{Vn(a),te(a)}}else a(u[0])};return t.addEventListener(r,i),s},Os=(t,e)=>{var c,l;let n=(l=globalThis.MutationObserver)!=null?l:(c=globalThis.window)==null?void 0:c.MutationObserver;if(!n)return()=>{};let r=!1,o=!1,s=()=>{r=!1,!o&&Vr(t,e()[0])},i=()=>{r||(r=!0,typeof queueMicrotask=="function"?queueMicrotask(s):Promise.resolve().then(s))},a=new n(i);return a.observe(t,{attributes:!0,attributeFilter:["value"],childList:!0,subtree:!0}),()=>{o=!0,a.disconnect()}};var ks=["stop","prevent","capture","self","once","left","right","middle","passive"],Ls=t=>{let e={};if(j(t))return;let n=t.split(",");for(let r of ks)e[r]=n.includes(r);return e},Vs=(t,e,n,r,o)=>{var l,u;if(r){let f=e.value(),m=v(r.value()[0]);return G(m)?In(t,z(m),()=>e.value()[0],(l=o==null?void 0:o.join(","))!=null?l:f[1]):()=>{}}else if(n){let f=e.value();return In(t,z(n),()=>e.value()[0],(u=o==null?void 0:o.join(","))!=null?u:f[1])}let s=[],i=()=>{s.forEach(f=>f())},a=e.value(),c=a.length;for(let f=0;f<c;++f){let m=a[f];if(W(m)&&(m=m()),P(m))for(let y of Object.entries(m)){let x=y[0],d=()=>{let C=e.value()[f];return W(C)&&(C=C()),C=C[x],W(C)&&(C=C()),C},w=m[x+"_flags"];s.push(In(t,x,d,w))}else _(2,"r-on",t)}return i},Pn={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:r,flags:o})=>Vs(t,e,n,r,o)},Is=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e!=null||(e="");let n=[...t.split("."),...e.split(",")];t=n[0];let r=n[1],o=n.includes("ctrl"),s=n.includes("shift"),i=n.includes("alt"),a=n.includes("meta"),c=l=>!(o&&!l.ctrlKey||s&&!l.shiftKey||i&&!l.altKey||a&&!l.metaKey);return r?[t,l=>c(l)?l.key.toUpperCase()===r.toUpperCase():!1]:[t,c]}return[t,n=>!0]},In=(t,e,n,r)=>{if(j(e))return _(5,"r-on",t),()=>{};let o=Ls(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=Is(e,r);let a=u=>{if(!i(u)||!n&&e==="submit"&&(o!=null&&o.prevent))return;let f=n(u);W(f)&&(f=f(u)),W(f)&&f(u)},c=()=>{t.removeEventListener(e,l,s)},l=u=>{if(!o){a(u);return}try{if(o.left&&u.button!==0||o.middle&&u.button!==1||o.right&&u.button!==2||o.self&&u.target!==t)return;o.stop&&u.stopPropagation(),o.prevent&&u.preventDefault(),a(u)}finally{o.once&&c()}};return t.addEventListener(e,l,s),c};var Ps=(t,e,n,r)=>{if(n){r&&r.includes("camel")&&(n=z(n)),tt(t,n,e[0]);return}let o=e.length;for(let s=0;s<o;++s){let i=e[s];if(S(i)){let a=i[0],c=i[1];tt(t,a,c)}else if(P(i))for(let a of Object.entries(i)){let c=a[0],l=a[1];tt(t,c,l)}else{let a=e[s++],c=e[s];tt(t,a,c)}}},_r={mount:()=>({update:({el:t,values:e,option:n,flags:r})=>{Ps(t,e,n,r)}})};function Ds(t){return!!t||t===""}var tt=(t,e,n)=>{if(pe(e)){_(3,":prop",t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(Re),1),t[e]=n!=null?n:"";return}let r=t.tagName;if(e==="value"&&r!=="PROGRESS"&&!r.includes("-")){t._value=n;let s=r==="OPTION"?t.getAttribute("value"):t.value,i=n!=null?n:"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let o=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=Ds(n):n==null&&s==="string"?(n="",o=!0):s==="number"&&(n=0,o=!0)}try{t[e]=n}catch(s){o||_(4,e,r,n,s)}o&&t.removeAttribute(e)};var Fr={once:!0,mount:({el:t,parseResult:e,expr:n})=>{let r=e,o=r.value()[0],s=S(o),i=r.refs[0];return s?o.push(t):i?i==null||i(t):r.context[n]=t,()=>{if(s){let a=o.indexOf(t);a!==-1&&o.splice(a,1)}else i==null||i(null)}}};var Us=(t,e)=>{let n=$e(t).data,r=n._ord;or(r)&&(r=n._ord=t.style.display),je(e[0])?t.style.display=r:t.style.display="none"},qr={mount:()=>({update:({el:t,values:e})=>{Us(t,e)}})};var Hs=(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n==null?void 0:n[o];if(S(s)){let a=s.length;for(let c=0;c<a;++c)zr(t,s[c],i==null?void 0:i[c])}else zr(t,s,i)}},Zt={mount:()=>({update:({el:t,values:e,previousValues:n})=>{Hs(t,e,n)}})},zr=(t,e,n)=>{let r=v(e),o=v(n),s=t.style,i=G(r);if(r&&!i){let a=r;if(o&&!G(o)){let c=o;for(let l in c)v(a[l])==null&&Un(s,l,"")}for(let c in a)Un(s,c,a[c])}else{let a=s.display;if(i?o!==r&&(s.cssText=r):o&&t.removeAttribute("style"),"_ord"in $e(t).data)return;s.display=a}},Kr=/\s*!important$/;function Un(t,e,n){let r=v(n);if(S(r))r.forEach(o=>{Un(t,e,o)});else{let o=r==null?"":String(r);if(e.startsWith("--"))t.setProperty(e,o);else{let s=Bs(t,e);Kr.test(o)?t.setProperty(Qe(s),o.replace(Kr,""),"important"):t[s]=o}}}var Wr=["Webkit","Moz","ms"],Dn={};function Bs(t,e){let n=Dn[e];if(n)return n;let r=z(e);if(r!=="filter"&&r in t)return Dn[e]=r;r=lt(r);for(let o=0;o<Wr.length;o++){let s=Wr[o]+r;if(s in t)return Dn[e]=s}return e}var en="r-rgi";var ue=t=>Gr(v(t)),Gr=(t,e=new WeakMap)=>{if(!t||!P(t)||t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return t;if(S(t))return t.map(ue);if(le(t)){let r=new Set;for(let o of t.keys())r.add(ue(o));return r}if(Ve(t)){let r=new Map;for(let o of t)r.set(ue(o[0]),ue(o[1]));return r}if(e.has(t))return v(e.get(t));let n=Et({},t);e.set(t,n);for(let r of Object.entries(n))n[r[0]]=Gr(v(r[1]),e);return n};var $s=(t,e)=>{var r;let n=e[0];t.textContent=le(n)?JSON.stringify(ue([...n])):Ve(n)?JSON.stringify(ue([...n])):P(n)?JSON.stringify(ue(n)):(r=n==null?void 0:n.toString())!=null?r:""},js=(t,e)=>{let n=t,r=n[ye];r&&(e[ye]=r,n[ye]=void 0)},_s=t=>{if(t.tagName!=="SPAN"||!t.hasAttribute(en))return t;let e=t.parentNode;if(!e)return t;let n=t.ownerDocument.createTextNode("");return js(t,n),e.replaceChild(n,t),n},Jr={mount:({el:t})=>{let e=_s(t);return{update:({values:n})=>{$s(e,n)}}}};var Qr={mount:()=>({update:({el:t,values:e})=>{tt(t,"value",e[0])}})};var nt=t=>(t==null?void 0:t[At])===1;function Me(t){if(mt(t))return t;let e;if(E(t)?(e=t,t=e()):e=ie(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[At]=1,S(t)){let n=t.length;for(let r=0;r<n;++r){let o=t[r];nt(o)||(t[r]=Me(o))}return e}if(!P(t))return e;for(let n of Object.entries(t)){let r=n[1];if(nt(r))continue;let o=n[0];it(o)||(t[o]=null,t[o]=Me(r))}return e}function Hn(t){return Me(ue(t))}var He=class He{constructor(e){p(this,"B",{});p(this,"u",{});p(this,"dt",()=>Object.keys(this.B).filter(e=>e.length===1||!e.startsWith(":")));p(this,"te",new Map);p(this,"F",new Map);p(this,"forGrowThreshold",10);p(this,"globalContext");p(this,"useInterpolation",!0);p(this,"propValidationMode","throw");if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.Dt()}static getDefault(){var e;return(e=He.$e)!=null?e:He.$e=new He}Dt(){let e={},n=globalThis;for(let r of He.Pt.split(","))e[r]=n[r];return e.ref=Me,e.cref=Hn,e.sref=ie,e.flatten=ue,e}addComponent(...e){for(let n of e){if(!n.defaultName){We.warning("Registered component's default name is not defined",n);continue}this.te.set(lt(n.defaultName),n),this.F.set(lt(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.B={".":_r,":":wn,"@":Pn,[`${e}on`]:Pn,[`${e}bind`]:wn,[`${e}html`]:Kt,[`${e}text`]:Jr,[`${e}show`]:qr,[`${e}model`]:Lr,":style":Zt,[`${e}style`]:Zt,[`${e}bind:style`]:Zt,":class":kn,[`${e}bind:class`]:kn,":ref":Fr,":value":Qr,[`${e}teleport`]:Ut},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)}};p(He,"$e"),p(He,"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");var he=He;var tn=(t,e)=>{if(!t)return;let r=(e!=null?e:he.getDefault()).u,o=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of qs(t,r.pre,s))Fs(i,r.text,o,s)},Fs=(t,e,n,r)=>{var c;let o=t.textContent;if(!o)return;let s=n,i=o.split(s);if(i.length<=1)return;if(((c=t.parentElement)==null?void 0:c.childNodes.length)===1&&i.length===3){let l=i[1],u=Xr(l,r);if(u&&j(i[0])&&j(i[2])){let f=t.parentElement;f.setAttribute(e,l.substring(u.start.length,l.length-u.end.length)),f.innerText="";return}}let a=document.createDocumentFragment();for(let l of i){let u=Xr(l,r);if(u){let f=document.createElement("span");f.setAttribute(en,""),f.setAttribute(e,l.substring(u.start.length,l.length-u.end.length)),a.appendChild(f)}else a.appendChild(document.createTextNode(l))}t.replaceWith(a)},qs=(t,e,n)=>{let r=[],o=s=>{var i;if(s.nodeType===Node.TEXT_NODE)n.some(a=>{var c;return(c=s.textContent)==null?void 0:c.includes(a.start)})&&r.push(s);else{if((i=s==null?void 0:s.hasAttribute)!=null&&i.call(s,e))return;for(let a of Se(s))o(a)}};return o(t),r},Xr=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var zs=9,Ks=10,Ws=13,Gs=32,Oe=46,nn=44,Js=39,Qs=34,rn=40,rt=41,on=91,Bn=93,$n=63,Xs=59,Yr=58,Zr=123,sn=125,Fe=43,an=45,jn=96,eo=47,_n=92,to=new Set([2,3]),ao={"=":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=tr(Et({"=>":2},ao),{"||":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}),co=Object.keys(ao),Zs=new Set(co),qn=new Set(["=>"]);co.forEach(t=>qn.add(t));var no={true:!0,false:!1,null:null},ei="this",ot="Expected ",qe="Unexpected ",Kn="Unclosed ",ti=ot+":",ro=ot+"expression",ni="missing }",ri=qe+"object property",oi=Kn+"(",oo=ot+"comma",so=qe+"token ",si=qe+"period",Fn=ot+"expression after ",ii="missing unaryOp argument",ai=Kn+"[",ci=ot+"exponent (",ui="Variable names cannot start with a number (",fi=Kn+'quote after "',yt=t=>t>=48&&t<=57,io=t=>Ys[t],zn=class{constructor(e){p(this,"p");p(this,"e");this.p=e,this.e=0}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}z(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95||e>=128}me(e){return this.z(e)||yt(e)}i(e){return new Error(`${e} at character ${this.e}`)}g(){let e=this.h,n=this.p,r=this.e;for(;e===Gs||e===zs||e===Ks||e===Ws;)e=n.charCodeAt(++r);this.e=r}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 r=this.h;if(r===Xs||r===nn)this.e++;else{let o=this.A();if(o)n.push(o);else if(this.e<this.p.length){if(r===e)break;throw this.i(qe+'"'+this.H+'"')}}}return n}A(){var n;let e=(n=this.Ut())!=null?n:this._e();return this.g(),this.Bt(e)}he(){this.g();let e=this.p,n=this.e,r=e.charCodeAt(n),o=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);if(isNaN(r))return!1;let a=!1,c=0;return r===62&&o===62&&s===62&&i===61?(a=">>>=",c=4):r===61&&o===61&&s===61?(a="===",c=3):r===33&&o===61&&s===61?(a="!==",c=3):r===62&&o===62&&s===62?(a=">>>",c=3):r===60&&o===60&&s===61?(a="<<=",c=3):r===62&&o===62&&s===61?(a=">>=",c=3):r===42&&o===42&&s===61?(a="**=",c=3):r===61&&o===62?(a="=>",c=2):r===124&&o===124?(a="||",c=2):r===63&&o===63?(a="??",c=2):r===38&&o===38?(a="&&",c=2):r===61&&o===61?(a="==",c=2):r===33&&o===61?(a="!=",c=2):r===60&&o===61?(a="<=",c=2):r===62&&o===61?(a=">=",c=2):r===60&&o===60?(a="<<",c=2):r===62&&o===62?(a=">>",c=2):r===43&&o===61?(a="+=",c=2):r===45&&o===61?(a="-=",c=2):r===42&&o===61?(a="*=",c=2):r===47&&o===61?(a="/=",c=2):r===37&&o===61?(a="%=",c=2):r===38&&o===61?(a="&=",c=2):r===94&&o===61?(a="^=",c=2):r===124&&o===61?(a="|=",c=2):r===42&&o===42?(a="**",c=2):r===105&&o===110?this.me(e.charCodeAt(n+2))||(a="in",c=2):r===61?(a="=",c=1):r===124?(a="|",c=1):r===94?(a="^",c=1):r===38?(a="&",c=1):r===60?(a="<",c=1):r===62?(a=">",c=1):r===43?(a="+",c=1):r===45?(a="-",c=1):r===42?(a="*",c=1):r===47?(a="/",c=1):r===37&&(a="%",c=1),a?(this.e+=c,a):!1}_e(){let e,n,r,o,s,i,a,c;if(s=this.W(),!s||(n=this.he(),!n))return s;if(o={value:n,prec:io(n),right_a:qn.has(n)},i=this.W(),!i)throw this.i(Fn+n);let l=[s,o,i];for(;n=this.he();){r=io(n),o={value:n,prec:r,right_a:qn.has(n)},c=n;let u=f=>o.right_a&&f.right_a?r>f.prec:r<=f.prec;for(;l.length>2&&u(l[l.length-2]);)i=l.pop(),n=l.pop().value,s=l.pop(),e=this.Fe(n,s,i),l.push(e);if(e=this.W(),!e)throw this.i(Fn+c);l.push(o,e)}for(a=l.length-1,e=l[a];a>1;)e=this.Fe(l[a-1].value,l[a-2],e),a-=2;return e}W(){let e;if(this.g(),e=this.Ht(),e)return this.ge(e);let n=this.h;if(yt(n)||n===Oe)return this.jt();if(n===Js||n===Qs)e=this.$t();else if(n===on)e=this._t();else{let r=this.Ft();if(r){let o=this.W();if(!o)throw this.i(ii);return this.ge({type:7,operator:r,argument:o})}this.z(n)?(e=this.be(),e.name in no?e={type:4,value:no[e.name],raw:e.name}:e.name===ei&&(e={type:5})):n===rn&&(e=this.qt())}return e?(e=this.G(e),this.ge(e)):!1}Fe(e,n,r){if(e==="=>"){let o=n.type===1?n.expressions:[n];return{type:15,params:o,body:r}}return Zs.has(e)?{type:16,operator:e,left:n,right:r}:{type:8,operator:e,left:n,right:r}}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,r=e.charCodeAt(n),o=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);return r===an?(this.e++,"-"):r===33?(this.e++,"!"):r===126?(this.e++,"~"):r===Fe?(this.e++,"+"):r===110&&o===101&&s===119&&!this.me(i)?(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===Oe||n===on||n===rn||n===$n;){let r;if(n===$n){if(this.p.charCodeAt(this.e+1)!==Oe)break;r=!0,this.e+=2,this.g(),n=this.h}if(this.e++,n===on){if(e={type:3,computed:!0,object:e,property:this.A()},this.g(),n=this.h,n!==Bn)throw this.i(ai);this.e++}else n===rn?e={type:6,arguments:this.Ke(rt),callee:e}:(r&&this.e--,this.g(),e={type:3,computed:!1,object:e,property:this.be()});r&&(e.optional=!0),this.g(),n=this.h}return e}jt(){let e=this.p,n=this.e,r=n;for(;yt(e.charCodeAt(r));)r++;if(e.charCodeAt(r)===Oe)for(r++;yt(e.charCodeAt(r));)r++;let o=e.charCodeAt(r);if(o===101||o===69){r++;let a=e.charCodeAt(r);(a===Fe||a===an)&&r++;let c=r;for(;yt(e.charCodeAt(r));)r++;if(c===r){this.e=r;let l=e.slice(n,r);throw this.i(ci+l+this.H+")")}}this.e=r;let s=e.slice(n,r),i=e.charCodeAt(r);if(this.z(i))throw this.i(ui+s+this.H+")");if(i===Oe||s.length===1&&s.charCodeAt(0)===Oe)throw this.i(si);return{type:4,value:parseFloat(s),raw:s}}$t(){let e=this.p,n=e.length,r=this.e,o=e.charCodeAt(this.e++),s=this.e,i=s,a=[],c=!1,l=!1;for(;s<n;){let f=e.charCodeAt(s);if(f===o){l=!0,this.e=s+1;break}if(f===_n){c||(c=!0),a.push(e.slice(i,s));let m=e.charCodeAt(s+1);a.push(this.ze(m)),s+=2,i=s}else s++}let u=c?a.join("")+e.slice(i,l?s:n):e.slice(i,l?s:n);if(!l)throw this.e=s,this.i(fi+u+'"');return{type:4,value:u,raw:e.substring(r,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=[],r=!1,o=0;for(;this.e<this.p.length;){this.g();let s=this.h;if(s===e){if(r=!0,this.e++,e===rt&&o&&o>=n.length)throw this.i(so+String.fromCharCode(e));break}else if(s===nn){if(this.e++,o++,o!==n.length){if(e===rt)throw this.i(so+",");for(let i=n.length;i<o;i++)n.push(null)}}else{if(n.length!==o&&o!==0)throw this.i(oo);{let i=this.A();if(!i||i.type===0)throw this.i(oo);n.push(i)}}}if(!r)throw this.i(ot+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(oi)}_t(){return this.e++,{type:9,elements:this.Ke(Bn)}}Kt(e){if(this.f(Zr)){this.e++;let n=[];for(;!isNaN(this.h);){if(this.g(),this.f(sn)){this.e++,e.node=this.G({type:10,properties:n});return}let r=this.A();if(!r)break;if(this.g(),r.type===2&&(this.f(nn)||this.f(sn)))n.push({type:12,computed:!1,key:r,value:r,shorthand:!0});else if(this.f(Yr)){this.e++;let o=this.A();if(!o)throw this.i(ri);let s=r.type===9;n.push({type:12,computed:s,key:s?r.elements[0]:r,value:o,shorthand:!1}),this.g()}else n.push(r);this.f(nn)&&this.e++}throw this.i(ni)}}zt(e){let n=this.h;if((n===Fe||n===an)&&n===this.p.charCodeAt(this.e+1)){this.e+=2;let r=e.node={type:13,operator:n===Fe?"++":"--",argument:this.G(this.be()),prefix:!0};if(!r.argument||!to.has(r.argument.type))throw this.i(qe+r.operator)}}Qt(e){let n=e.node,r=this.h;if((r===Fe||r===an)&&r===this.p.charCodeAt(this.e+1)){if(!to.has(n.type))throw this.i(qe+(r===Fe?"++":"--"));this.e+=2,e.node={type:13,operator:r===Fe?"++":"--",argument:n,prefix:!1}}}Wt(e){this.p.charCodeAt(this.e)===Oe&&this.p.charCodeAt(this.e+1)===Oe&&this.p.charCodeAt(this.e+2)===Oe&&(this.e+=3,e.node={type:14,argument:this.A()})}Zt(e){if(e.node&&this.f($n)){this.e++;let n=e.node,r=this.A();if(!r)throw this.i(ro);if(this.g(),this.f(Yr)){this.e++;let o=this.A();if(!o)throw this.i(ro);e.node={type:11,test:n,consequent:r,alternate:o}}else throw this.i(ti)}}Yt(e){if(this.g(),this.f(rn)){let n=this.e;if(this.e++,this.g(),this.f(rt)){this.e++;let r=this.he();if(r==="=>"){let o=this._e();if(!o)throw this.i(Fn+r);e.node={type:15,params:null,body:o};return}}this.e=n}}Xt(e){let n=e.node,r=n.type;(r===2||r===3)&&this.f(jn)&&(e.node={type:17,tag:n,quasi:this.qe(e)})}qe(e){if(!this.f(jn))return;let n=this.p,r=n.length,o={type:19,quasis:[],expressions:[]},s=++this.e,i=[],a=[],c=!1,l=u=>{if(!c){let y=n.slice(s,this.e);return o.quasis.push({type:18,value:{raw:y,cooked:y},tail:u})}i.push(n.slice(s,this.e)),a.push(n.slice(s,this.e));let f=i.join(""),m=a.join("");return i.length=0,a.length=0,c=!1,o.quasis.push({type:18,value:{raw:f,cooked:m},tail:u})};for(;this.e<r;){let u=n.charCodeAt(this.e);if(u===jn)return l(!0),this.e+=1,e.node=o,o;if(u===36&&n.charCodeAt(this.e+1)===Zr){if(l(!1),this.e+=2,o.expressions.push(...this.ye(sn)),!this.f(sn))throw this.i("unclosed ${");this.e+=1,s=this.e}else if(u===_n){c||(c=!0),i.push(n.slice(s,this.e)),a.push(n.slice(s,this.e));let f=n.charCodeAt(this.e+1);i.push(n.slice(this.e,this.e+2)),a.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 r=e.node;for(;r.type===3||r.type===6&&r.callee.type===3;)r=r.type===3?r.object:r.callee.object;r.type=20}Gt(e){if(!this.f(eo))return;let n=++this.e,r=!1;for(;this.e<this.p.length;){if(this.h===eo&&!r){let o=this.p.slice(n,this.e),s="";for(;++this.e<this.p.length;){let a=this.h;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.H;else break}let i;try{i=new RegExp(o,s)}catch(a){throw this.i(a.message)}return e.node={type:4,value:i,raw:this.p.slice(n-1,this.e)},e.node=this.G(e.node),e.node}this.f(on)?r=!0:r&&this.f(Bn)&&(r=!1),this.e+=this.f(_n)?2:1}throw this.i("Unclosed Regex")}},uo=t=>new zn(t).parse();var li={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(t,e)=>{},"+=":(t,e)=>{},"-=":(t,e)=>{},"<<=":(t,e)=>{},">>=":(t,e)=>{},">>>=":(t,e)=>{},"&=":(t,e)=>{},"^=":(t,e)=>{},"|=":(t,e)=>{},"||":(t,e)=>t()||e(),"??":(t,e)=>{var n;return(n=t())!=null?n:e()},"&&":(t,e)=>t()&&e(),"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(t,e)=>t===e,"!==":(t,e)=>t!==e,"<":(t,e)=>t<e,">":(t,e)=>t>e,"<=":(t,e)=>t<=e,">=":(t,e)=>t>=e,in:(t,e)=>t in e,"<<":(t,e)=>t<<e,">>":(t,e)=>t>>e,">>>":(t,e)=>t>>>e,"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e)=>t%e,"**":(t,e)=>Ct(t,e)},pi={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},mo=t=>{if(!(t!=null&&t.some(po)))return t;let e=[];return t.forEach(n=>po(n)?e.push(...n):e.push(n)),e},fo=(...t)=>mo(t),Wn=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},mi={"++":(t,e)=>{let n=t[e];if(E(n)){let r=n();return n(++r),r}return++t[e]},"--":(t,e)=>{let n=t[e];if(E(n)){let r=n();return n(--r),r}return--t[e]}},di={"++":(t,e)=>{let n=t[e];if(E(n)){let r=n();return n(r+1),r}return t[e]++},"--":(t,e)=>{let n=t[e];if(E(n)){let r=n();return n(r-1),r}return t[e]--}},lo={"=":(t,e,n)=>{let r=t[e];return E(r)?r(n):t[e]=n},"+=":(t,e,n)=>{let r=t[e];return E(r)?r(r()+n):t[e]+=n},"-=":(t,e,n)=>{let r=t[e];return E(r)?r(r()-n):t[e]-=n},"*=":(t,e,n)=>{let r=t[e];return E(r)?r(r()*n):t[e]*=n},"/=":(t,e,n)=>{let r=t[e];return E(r)?r(r()/n):t[e]/=n},"%=":(t,e,n)=>{let r=t[e];return E(r)?r(r()%n):t[e]%=n},"**=":(t,e,n)=>{let r=t[e];return E(r)?r(Ct(r(),n)):t[e]=Ct(t[e],n)},"<<=":(t,e,n)=>{let r=t[e];return E(r)?r(r()<<n):t[e]<<=n},">>=":(t,e,n)=>{let r=t[e];return E(r)?r(r()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let r=t[e];return E(r)?r(r()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let r=t[e];return E(r)?r(r()|n):t[e]|=n},"&=":(t,e,n)=>{let r=t[e];return E(r)?r(r()&n):t[e]&=n},"^=":(t,e,n)=>{let r=t[e];return E(r)?r(r()^n):t[e]^=n}},cn=(t,e)=>W(t)?t.bind(e):t,Gn=class{constructor(e,n,r,o,s){p(this,"l");p(this,"We");p(this,"Ge");p(this,"Je");p(this,"V");p(this,"Qe");p(this,"Xe");this.l=S(e)?e:[e],this.We=n,this.Ge=r,this.Je=o,this.Xe=!!s}Ye(e,n){if(n&&e in n)return n;for(let r of this.l)if(e in r)return r}2(e,n,r){let o=e.name;if(o==="$root")return this.l[this.l.length-1];if(o==="$parent")return this.l[1];if(o==="$ctx")return[...this.l];if(r&&o in r)return this.V=r[o],cn(v(r[o]),r);for(let i of this.l)if(o in i)return this.V=i[o],cn(v(i[o]),i);let s=this.We;if(s&&o in s)return this.V=s[o],cn(v(s[o]),s)}5(e,n,r){return this.l[0]}0(e,n,r){return this.Ze(n,r,fo,...e.body)}1(e,n,r){return this.w(n,r,(...o)=>o.pop(),...e.expressions)}3(e,n,r){let{obj:o,key:s}=this.Te(e,n,r),i=o==null?void 0:o[s];return this.V=i,cn(v(i),o)}4(e,n,r){return e.value}6(e,n,r){let o=(i,...a)=>W(i)?i(...mo(a)):i,s=this.w(++n,r,o,e.callee,...e.arguments);return this.V=s,s}7(e,n,r){return this.w(n,r,pi[e.operator],e.argument)}8(e,n,r){let o=li[e.operator];switch(e.operator){case"||":case"&&":case"??":return o(()=>this.b(e.left,n,r),()=>this.b(e.right,n,r))}return this.w(n,r,o,e.left,e.right)}9(e,n,r){return this.Ze(++n,r,fo,...e.elements)}10(e,n,r){let o={},s=(...i)=>{i.forEach(a=>{Object.assign(o,a)})};return this.w(++n,r,s,...e.properties),o}11(e,n,r){return this.w(n,r,o=>this.b(o?e.consequent:e.alternate,n,r),e.test)}12(e,n,r){var u;let o={},s=f=>(f==null?void 0:f.type)!==15,i=(u=this.Je)!=null?u:()=>!1,a=n===0&&this.Xe,c=f=>this.et(a,e.key,n,Wn(f,r)),l=f=>this.et(a,e.value,n,Wn(f,r));if(e.shorthand){let f=e.key.name;o[f]=s(e.key)&&i(f,n)?c:c()}else if(e.computed){let f=v(c());o[f]=s(e.value)&&i(f,n)?l:l()}else{let f=e.key.type===4?e.key.value:e.key.name;o[f]=s(e.value)&&i(f,n)?()=>l:l()}return o}Te(e,n,r){let o=this.b(e.object,n,r),s=e.computed?this.b(e.property,n,r):e.property.name;return{obj:o,key:s}}13(e,n,r){let o=e.argument,s=e.operator,i=e.prefix?mi:di;if(o.type===2){let a=o.name,c=this.Ye(a,r);return pe(c)?void 0:i[s](c,a)}if(o.type===3){let{obj:a,key:c}=this.Te(o,n,r);return i[s](a,c)}}16(e,n,r){let o=e.left,s=e.operator;if(o.type===2){let i=o.name,a=this.Ye(i,r);if(pe(a))return;let c=this.b(e.right,n,r);return lo[s](a,i,c)}if(o.type===3){let{obj:i,key:a}=this.Te(o,n,r),c=this.b(e.right,n,r);return lo[s](i,a,c)}}14(e,n,r){let o=this.b(e.argument,n,r);return S(o)&&(o.s=ho),o}17(e,n,r){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,r)}19(e,n,r){let o=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.w(n,r,o,...e.expressions)}18(e,n,r){return e.value.cooked}20(e,n,r){let o=(s,...i)=>new s(...i);return this.w(n,r,o,e.callee,...e.arguments)}15(e,n,r){return(...o)=>{let s=Object.create(r!=null?r:{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=o[a++]}return this.b(e.body,n,s)}}b(e,n,r){let o=v(this[e.type](e,n,r));return this.Qe=e.type,o}et(e,n,r,o){let s=this.b(n,r,o);return e&&this.tt()?this.V:s}tt(){let e=this.Qe;return(e===2||e===3||e===6)&&E(this.V)}eval(e,n){let{value:r,refs:o}=An(()=>this.b(e,-1,n)),s={value:r,refs:o};return this.tt()&&(s.ref=this.V),s}w(e,n,r,...o){let s=o.map(i=>i&&this.b(i,e,n));return r(...s)}Ze(e,n,r,...o){let s=this.Ge;if(!s)return this.w(e,n,r,...o);let i=o.map((a,c)=>a&&(a.type!==15&&s(c,e)?l=>this.b(a,e,Wn(l,n)):this.b(a,e,n)));return r(...i)}},ho=Symbol("s"),po=t=>(t==null?void 0:t.s)===ho,yo=(t,e,n,r,o,s,i)=>new Gn(e,n,r,o,i).eval(t,s);var go={},bo=t=>!!t,un=class{constructor(e,n){p(this,"l");p(this,"o");p(this,"nt",[]);this.l=e,this.o=n}v(e){this.l=[e,...this.l]}ne(){return this.l.map(n=>n.components).filter(bo).reverse().reduce((n,r)=>{for(let[o,s]of Object.entries(r))n[o.toUpperCase()]=s;return n},{})}ft(){let e=[],n=new Set,r=this.l.map(o=>o.components).filter(bo).reverse();for(let o of r)for(let s of Object.keys(o))n.has(s)||(n.add(s),e.push(s));return e}O(e,n,r,o,s){var C;let i=[],a=[],c=new Set,l=()=>{for(let b=0;b<a.length;++b)a[b]();a.length=0},m={value:()=>i,stop:()=>{l(),c.clear()},subscribe:(b,M)=>(c.add(b),M&&b(i),()=>{c.delete(b)}),refs:[],context:this.l[0]};if(j(e))return m;let y=this.o.globalContext,x=[],d=new Set,w=(b,M,D,U)=>{try{let V=yo(b,M,y,n,r,U,o);return D&&V.refs.length>0&&x.push(...V.refs),{value:V.value,refs:V.refs,ref:V.ref}}catch(V){_(6,`evaluation error: ${e}`,V)}return{value:void 0,refs:[]}};try{let b=(C=go[e])!=null?C:uo("["+e+"]");go[e]=b;let M=this.l.slice(),D=b.elements,U=D.length,V=new Array(U);m.refs=V;let ne=()=>{x.length=0,s||(d.clear(),l());let K=new Array(U);for(let A=0;A<U;++A){let T=D[A];if(n!=null&&n(A,-1)){K[A]=F=>w(T,M,!1,{$event:F}).value;continue}let I=w(T,M,!0);K[A]=I.value,V[A]=I.ref}if(!s)for(let A of x)d.has(A)||(d.add(A),a.push(se(A,ne)));if(i=K,c.size!==0)for(let A of c)c.has(A)&&A(i)};ne()}catch(b){_(6,`parse error: ${e}`,b)}return m}L(){return this.l.slice()}le(e){this.nt.push(this.l),this.l=e}C(e,n){try{this.le(e),n()}finally{this.en()}}en(){var e;this.l=(e=this.nt.pop())!=null?e:[]}};var To=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 r=e;r<t.length;++r){let o=t[r];if(n){o===n&&(n="");continue}if(o==='"'||o==="'"){n=o;continue}if(o===">")return r}return-1},yi=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
3
+ `);)++n;if(n>=t.length||!To(t[n]))return null;let r=n,o=!1;for(;n<t.length&&To(t[n]);){let s=t.charCodeAt(n);s>=65&&s<=90&&(o=!0),++n}return{start:r,end:n,hasUppercase:o}},xo=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}},gt=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}},xi=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}>`,Co=(t,e)=>`${t.slice(0,t.length-2)}></${e}>`,fn=t=>{var i,a;let e=0,n=[],r=[],o=[],s=0;for(;e<t.length;){let c=t.indexOf("<",e);if(c===-1){n.push(t.slice(e));break}if(n.push(t.slice(e,c)),t.startsWith("<!--",c)){let A=t.indexOf("-->",c+4);if(A===-1){n.push(t.slice(c));break}n.push(t.slice(c,A+3)),e=A+3;continue}let l=hi(t,c);if(l===-1){n.push(t.slice(c));break}let u=t.slice(c,l+1),f=u.startsWith("</");if(u.startsWith("<!")||u.startsWith("<?")){n.push(u),e=l+1;continue}let y=yi(u,f);if(!y){n.push(u),e=l+1;continue}let x=u.slice(y.start,y.end),d=y.hasUppercase?"":x;if(f){let A=o[o.length-1];if((A==null?void 0:A.tagName)===x){o.pop(),A.emit&&n.push(u),e=l+1;continue}let T=r[r.length-1];T?(r.pop(),n.push(T.replacementHost?`</${T.replacementHost}>`:u),!T.isTableAlias&&xo(T.effectiveTag)&&--s):n.push(u),e=l+1;continue}let w=u.charCodeAt(u.length-2)===47,C=r[r.length-1],b=null;s===0?b=Ti(d):gi((i=C==null?void 0:C.effectiveTag)!=null?i:"")?b=d==="tr"?null:"tr":(C==null?void 0:C.effectiveTag)==="table"?b=bi(d)?null:"tr":(C==null?void 0:C.effectiveTag)==="tr"?b=d==="td"||d==="th"?null:"td":(C==null?void 0:C.effectiveTag)==="colgroup"&&(b=d==="col"?null:"col");let M=xi(b),D=M!==void 0,U=w&&!gt.has(b||d),V=!!b&&M===d&&gt.has(d),ne=!w&&!!b&&gt.has(b)&&!V,K=!w&&!b&&gt.has(d);if(b){let A=`${u.slice(0,y.start)}${b} is="${M?`r-${M}`:`regor:${x}`}"${u.slice(y.end)}`;n.push(U?Co(A,b):V?Ci(A,b):A)}else n.push(U?Co(u,x):u);if(ne?o.push({tagName:x,emit:!1}):V&&!w?o.push({tagName:x,emit:!1}):K&&o.push({tagName:x,emit:!0}),!w&&!V&&!ne&&!K&&!gt.has(b!=null?b:d)){let A=(a=M!=null?M:b)!=null?a:d||x;r.push({replacementHost:b,effectiveTag:A,isTableAlias:D}),!D&&xo(A)&&++s}e=l+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",Ri=new Set(Ei.toUpperCase().split(",")),wi="http://www.w3.org/2000/svg",Eo=(t,e)=>{me(t)?t.content.appendChild(e):t.appendChild(e)},Jn=(t,e,n,r)=>{var i;let o=t.t;if(o){let a=n&&Ri.has(o.toUpperCase())?document.createElementNS(wi,o.toLowerCase()):document.createElement(o),c=t.a;if(c)for(let u of Object.entries(c)){let f=u[0],m=u[1];f.startsWith("#")&&(m=f.substring(1),f="name"),a.setAttribute(Dt(f,r),m)}let l=t.c;if(l)for(let u of l)Jn(u,a,n,r);Eo(e,a);return}let s=t.d;if(s){let a;switch((i=t.n)!=null?i:Node.TEXT_NODE){case Node.COMMENT_NODE:a=document.createComment(s);break;case Node.TEXT_NODE:a=document.createTextNode(s);break}if(a)Eo(e,a);else throw new Error("unsupported node type.")}},st=(t,e,n)=>{n!=null||(n=he.getDefault());let r=document.createDocumentFragment();if(!S(t))return Jn(t,r,!!e,n),r;for(let o of t)Jn(o,r,!!e,n);return r};var vi=(t,e={selector:"#app"},n)=>{G(e)&&(e={selector:"#app",template:e}),br(t)&&(t=t.context);let r=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!r||!we(r))throw q(0);n||(n=he.getDefault());let o=()=>{for(let a of[...r.childNodes])ee(a)},s=a=>{for(;a.length>0;)r.appendChild(a[0])};if(e.template){let a=document.createRange().createContextualFragment(fn(e.template));o(),s(a.childNodes),e.element=a}else if(e.json){let a=st(e.json,e.isSVG,n);o(),s(a.childNodes)}return n.useInterpolation&&tn(r,n),new Qn(t,r,n).y(),Q(r,()=>{Ie(t)}),Ht(t),{context:t,unmount:()=>{ee(r)},unbind:()=>{Re(r)}}},Qn=class{constructor(e,n,r){p(this,"tn");p(this,"rt");p(this,"o");p(this,"m");p(this,"r");this.tn=e,this.rt=n,this.o=r,this.m=new un([e],r),this.r=new Xt(this.m)}y(){this.r.$(this.rt)}};var bt=t=>{if(S(t))return t.map(o=>bt(o));let e={};if(t.tagName)e.t=t.tagName;else return t.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),t.textContent&&(e.d=t.textContent),e;let n=t.getAttributeNames();n.length>0&&(e.a=Object.fromEntries(n.map(o=>{var s;return[o,(s=t.getAttribute(o))!=null?s:""]})));let r=Se(t);return r.length>0&&(e.c=[...r].map(o=>bt(o))),e};var Si=(t,e={})=>{var s,i,a,c,l,u;S(e)&&(e={props:e}),G(t)&&(t={template:t});let n=(s=e.context)!=null?s:()=>({}),r=!1;if(t.element){let f=t.element;f.remove(),t.element=f}else if(t.selector){let f=document.querySelector(t.selector);if(!f)throw q(1,t.selector);f.remove(),t.element=f}else if(t.template){let f=document.createRange().createContextualFragment(fn(t.template));t.element=f}else t.json&&(t.element=st(t.json,t.isSVG,e.config),r=!0);t.element||(t.element=document.createDocumentFragment()),((i=e.useInterpolation)==null||i)&&tn(t.element,(a=e.config)!=null?a:he.getDefault());let o=t.element;if(!r&&(((l=t.isSVG)!=null?l:ft(o)&&((c=o.hasAttribute)!=null&&c.call(o,"isSVG")))||ft(o)&&o.querySelector("[isSVG]"))){let f=o.content,m=f?[...f.childNodes]:[...o.childNodes],y=bt(m);t.element=st(y,!0,e.config)}return{context:n,template:t.element,inheritAttrs:(u=e.inheritAttrs)!=null?u:!0,props:e.props,defaultName:e.defaultName}};var Xn=class{constructor(){p(this,"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 Ai=t=>{var e;(e=Be())==null||e.onMounted.push(t)};var Ni=t=>{let e,n={},r=(...o)=>{if(o.length<=2&&0 in o)throw q(4);return e&&!n.isStopped?e(...o):(e=Mi(t,n),e(...o))};return r[J]=1,Ue(r,!0),r.stop=()=>{var o,s;return(s=(o=n.ref)==null?void 0:o.stop)==null?void 0:s.call(o)},ce(()=>r.stop(),!0),r},Mi=(t,e)=>{var s;let n=(s=e.ref)!=null?s:ie(null);e.ref=n,e.isStopped=!1;let r=0,o=Ze(()=>{if(r>0){o(),e.isStopped=!0,te(n);return}n(t()),++r});return n.stop=o,n};var Oi=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw q(4);return r&&!n.isStopped?r(...s):(r=ki(t,e,n),r(...s))};return o[J]=1,Ue(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},ce(()=>o.stop(),!0),o},ki=(t,e,n)=>{var a;let r=(a=n.ref)!=null?a:ie(null);n.ref=r,n.isStopped=!1;let o=0,s=c=>{if(o>0){r.stop(),n.isStopped=!0,te(r);return}let l=t.map(u=>u());r(e(...l)),++o},i=[];for(let c of t){let l=se(c,s);i.push(l)}return s(null),r.stop=()=>{i.forEach(c=>{c()})},r};var Li=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw q(4);return r&&!n.isStopped?r(...s):(r=Vi(t,e,n),r(...s))};return o[J]=1,Ue(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},ce(()=>o.stop(),!0),o},Vi=(t,e,n)=>{var s;let r=(s=n.ref)!=null?s:ie(null);n.ref=r,n.isStopped=!1;let o=0;return r.stop=se(t,i=>{if(o>0){r.stop(),n.isStopped=!0,te(r);return}r(e(i)),++o},!0),r};var Ii=t=>(t[Nt]=1,t);var Pi=(t,e)=>{if(!e)throw q(5);let r=nt(t)?Me:a=>a,o=()=>localStorage.setItem(e,JSON.stringify(ue(t()))),s=localStorage.getItem(e);if(s!=null)try{t(r(JSON.parse(s)))}catch(a){_(6,`persist: failed to parse data for key ${e}`,a),o()}else o();let i=Ze(o);return ce(i,!0),t};var Yn=(t,...e)=>{let n="",r=t,o=e,s=r.length,i=o.length;for(let a=0;a<s;++a)n+=r[a],a<i&&(n+=o[a]);return n},Di=Yn,Ui=Yn;var Hi=(t,e,n)=>{let r=[],o=()=>{e(t.map(i=>i()))};for(let i of t)r.push(se(i,o));n&&o();let s=()=>{for(let i of r)i()};return ce(s,!0),s};var Bi=t=>{if(!E(t))throw q(3,"observerCount");return t(void 0,void 0,2)};var $i=t=>{Ro();try{t()}finally{wo()}},Ro=()=>{Te.stack||(Te.stack=[]),Te.stack.push(new Set)},wo=()=>{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 r of e)n.add(r);return}delete Te.stack;for(let n of e)try{te(n)}catch(r){console.error(r)}};export{ct as ComponentHead,Xn as ContextRegistry,he as RegorConfig,Q as addUnbinder,$i as batch,An as collectRefs,Oi as computeMany,Li as computeRef,Ni as computed,vi as createApp,Hn as cref,Si as defineComponent,ko as drainUnbind,wo as endBatch,pt as entangle,ue as flatten,$e as getBindData,Yn as html,nt as isDeepRef,mt as isRaw,E as isRef,Ii as markRaw,se as observe,Hi as observeMany,Bi as observerCount,Ai as onMounted,ce as onUnmounted,Ln as pause,Pi as persist,Jo as pval,Di as raw,Me as ref,ee as removeNode,Vn as resume,Sn as silence,ie as sref,Ro as startBatch,Ui as svg,st as toFragment,bt as toJsonTemplate,te as trigger,Re as unbind,v as unref,Rn as useScope,We as warningHandler,Ze as watchEffect};
@@ -70,6 +70,7 @@ var Regor = (() => {
70
70
  computeRef: () => computeRef,
71
71
  computed: () => computed,
72
72
  createApp: () => createApp,
73
+ cref: () => cref,
73
74
  defineComponent: () => defineComponent,
74
75
  drainUnbind: () => drainUnbind,
75
76
  endBatch: () => endBatch,
@@ -4226,6 +4227,9 @@ var Regor = (() => {
4226
4227
  return rawName;
4227
4228
  }
4228
4229
 
4230
+ // src/bind/rgi.ts
4231
+ var rgi = "r-rgi";
4232
+
4229
4233
  // src/misc/flatten.ts
4230
4234
  var flatten = (reference) => {
4231
4235
  return flattenContent(unref(reference));
@@ -4233,6 +4237,8 @@ var Regor = (() => {
4233
4237
  var flattenContent = (value, weakMap = /* @__PURE__ */ new WeakMap()) => {
4234
4238
  if (!value) return value;
4235
4239
  if (!isObject(value)) return value;
4240
+ if (value instanceof Node || value instanceof Date || value instanceof RegExp || value instanceof Promise || value instanceof Error)
4241
+ return value;
4236
4242
  if (isArray(value)) {
4237
4243
  return value.map(flatten);
4238
4244
  }
@@ -4265,12 +4271,32 @@ var Regor = (() => {
4265
4271
  const value = values[0];
4266
4272
  el.textContent = isSet(value) ? JSON.stringify(flatten([...value])) : isMap(value) ? JSON.stringify(flatten([...value])) : isObject(value) ? JSON.stringify(flatten(value)) : (_a = value == null ? void 0 : value.toString()) != null ? _a : "";
4267
4273
  };
4274
+ var moveBindData = (from, to) => {
4275
+ const bindableFrom = from;
4276
+ const bindData = bindableFrom[bindDataSymbol];
4277
+ if (!bindData) return;
4278
+ to[bindDataSymbol] = bindData;
4279
+ bindableFrom[bindDataSymbol] = void 0;
4280
+ };
4281
+ var createInterpolationTextNode = (el) => {
4282
+ if (el.tagName !== "SPAN") return el;
4283
+ if (!el.hasAttribute(rgi)) return el;
4284
+ const parent = el.parentNode;
4285
+ if (!parent) return el;
4286
+ const textNode = el.ownerDocument.createTextNode("");
4287
+ moveBindData(el, textNode);
4288
+ parent.replaceChild(textNode, el);
4289
+ return textNode;
4290
+ };
4268
4291
  var textDirective = {
4269
- mount: () => ({
4270
- update: ({ el, values }) => {
4271
- updateText(el, values);
4272
- }
4273
- })
4292
+ mount: ({ el }) => {
4293
+ const target = createInterpolationTextNode(el);
4294
+ return {
4295
+ update: ({ values }) => {
4296
+ updateText(target, values);
4297
+ }
4298
+ };
4299
+ }
4274
4300
  };
4275
4301
 
4276
4302
  // src/directives/value.ts
@@ -4321,6 +4347,11 @@ var Regor = (() => {
4321
4347
  return result;
4322
4348
  }
4323
4349
 
4350
+ // src/reactivity/cref.ts
4351
+ function cref(value) {
4352
+ return ref(flatten(value));
4353
+ }
4354
+
4324
4355
  // src/app/RegorConfig.ts
4325
4356
  var _RegorConfig = class _RegorConfig {
4326
4357
  constructor(globalContext) {
@@ -4381,6 +4412,7 @@ var Regor = (() => {
4381
4412
  obj[key] = global[key];
4382
4413
  }
4383
4414
  obj.ref = ref;
4415
+ obj.cref = cref;
4384
4416
  obj.sref = sref;
4385
4417
  obj.flatten = flatten;
4386
4418
  return obj;
@@ -4508,6 +4540,7 @@ var Regor = (() => {
4508
4540
  const delimiter = getInterpolationDelimiter(part, delimiters);
4509
4541
  if (delimiter) {
4510
4542
  const spanTag = document.createElement("span");
4543
+ spanTag.setAttribute(rgi, "");
4511
4544
  spanTag.setAttribute(
4512
4545
  textDirective2,
4513
4546
  part.substring(