regor 1.5.5 → 1.5.7

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.
@@ -703,6 +703,17 @@ var addUnbinder = (node, unbinder) => {
703
703
  getBindData(node).unbinders.push(unbinder);
704
704
  };
705
705
 
706
+ // src/common/toBoolean.ts
707
+ var toBoolean = (value) => {
708
+ if (typeof value === "string") {
709
+ const normalized = value.trim().toLowerCase();
710
+ if (normalized === "" || normalized === "0" || normalized === "false")
711
+ return false;
712
+ if (normalized === "true") return true;
713
+ }
714
+ return !!value;
715
+ };
716
+
706
717
  // src/bind/switch.ts
707
718
  var switches = {};
708
719
  var switchCounter = {};
@@ -893,7 +904,7 @@ var IfBinder = class {
893
904
  unmount: () => {
894
905
  unmount(commentBegin, commentEnd);
895
906
  },
896
- isTrue: () => !!value()[0],
907
+ isTrue: () => toBoolean(value()[0]),
897
908
  isMounted: false
898
909
  },
899
910
  ...remainingElses
@@ -914,7 +925,7 @@ var IfBinder = class {
914
925
  const capturedContext = parser.__capture();
915
926
  const refresh = () => {
916
927
  parser.__scoped(capturedContext, () => {
917
- if (value()[0]) {
928
+ if (toBoolean(value()[0])) {
918
929
  if (!isIfMounted) {
919
930
  mount(nodes, this.__binder, parent, commentEnd);
920
931
  isIfMounted = true;
@@ -3255,30 +3266,34 @@ var classDirective = {
3255
3266
  })
3256
3267
  };
3257
3268
  var patchClass = (el, next, prev) => {
3269
+ const nextValue = unref(next);
3270
+ const prevValue = unref(prev);
3258
3271
  const classList = el.classList;
3259
- const isClassString = isString(next);
3260
- const isPrevClassString = isString(prev);
3261
- if (next && !isClassString) {
3262
- if (prev && !isPrevClassString) {
3263
- for (const key in prev) {
3264
- if (!(key in next) || !next[key]) {
3272
+ const isClassString = isString(nextValue);
3273
+ const isPrevClassString = isString(prevValue);
3274
+ if (nextValue && !isClassString) {
3275
+ const nextMap = nextValue;
3276
+ if (prevValue && !isPrevClassString) {
3277
+ const prevMap = prevValue;
3278
+ for (const key in prevMap) {
3279
+ if (!(key in nextMap) || !unref(nextMap[key])) {
3265
3280
  classList.remove(key);
3266
3281
  }
3267
3282
  }
3268
3283
  }
3269
- for (const key in next) {
3270
- if (next[key]) classList.add(key);
3284
+ for (const key in nextMap) {
3285
+ if (unref(nextMap[key])) classList.add(key);
3271
3286
  }
3272
3287
  } else {
3273
3288
  if (isClassString) {
3274
- if (prev !== next) {
3275
- const prevTokens = isPrevClassString ? toClassTokens(prev) : [];
3276
- const nextTokens = toClassTokens(next);
3289
+ if (prevValue !== nextValue) {
3290
+ const prevTokens = isPrevClassString ? toClassTokens(prevValue) : [];
3291
+ const nextTokens = toClassTokens(nextValue);
3277
3292
  if (prevTokens.length > 0) classList.remove(...prevTokens);
3278
3293
  if (nextTokens.length > 0) classList.add(...nextTokens);
3279
3294
  }
3280
- } else if (prev) {
3281
- const prevTokens = isPrevClassString ? toClassTokens(prev) : [];
3295
+ } else if (prevValue) {
3296
+ const prevTokens = isPrevClassString ? toClassTokens(prevValue) : [];
3282
3297
  if (prevTokens.length > 0) classList.remove(...prevTokens);
3283
3298
  }
3284
3299
  }
@@ -3919,7 +3934,7 @@ var updateShow = (el, values) => {
3919
3934
  if (isUndefined(originalDisplay)) {
3920
3935
  originalDisplay = data._ord = el.style.display;
3921
3936
  }
3922
- const isVisible = !!values[0];
3937
+ const isVisible = toBoolean(values[0]);
3923
3938
  if (isVisible) el.style.display = originalDisplay;
3924
3939
  else el.style.display = "none";
3925
3940
  };
@@ -3955,26 +3970,30 @@ var styleDirective = {
3955
3970
  })
3956
3971
  };
3957
3972
  var patchStyle = (el, next, prev) => {
3973
+ const nextValue = unref(next);
3974
+ const prevValue = unref(prev);
3958
3975
  const style = el.style;
3959
- const isCssString = isString(next);
3960
- if (next && !isCssString) {
3961
- if (prev && !isString(prev)) {
3962
- for (const key in prev) {
3963
- if (next[key] == null) {
3976
+ const isCssString = isString(nextValue);
3977
+ if (nextValue && !isCssString) {
3978
+ const nextMap = nextValue;
3979
+ if (prevValue && !isString(prevValue)) {
3980
+ const prevMap = prevValue;
3981
+ for (const key in prevMap) {
3982
+ if (unref(nextMap[key]) == null) {
3964
3983
  setStyle(style, key, "");
3965
3984
  }
3966
3985
  }
3967
3986
  }
3968
- for (const key in next) {
3969
- setStyle(style, key, next[key]);
3987
+ for (const key in nextMap) {
3988
+ setStyle(style, key, nextMap[key]);
3970
3989
  }
3971
3990
  } else {
3972
3991
  const currentDisplay = style.display;
3973
3992
  if (isCssString) {
3974
- if (prev !== next) {
3975
- style.cssText = next;
3993
+ if (prevValue !== nextValue) {
3994
+ style.cssText = nextValue;
3976
3995
  }
3977
- } else if (prev) {
3996
+ } else if (prevValue) {
3978
3997
  el.removeAttribute("style");
3979
3998
  }
3980
3999
  const data = getBindData(el).data;
@@ -3984,24 +4003,25 @@ var patchStyle = (el, next, prev) => {
3984
4003
  };
3985
4004
  var importantRE = /\s*!important$/;
3986
4005
  function setStyle(style, name, val) {
3987
- if (isArray(val)) {
3988
- val.forEach((v) => {
4006
+ const value = unref(val);
4007
+ if (isArray(value)) {
4008
+ value.forEach((v) => {
3989
4009
  setStyle(style, name, v);
3990
4010
  });
3991
4011
  } else {
3992
- if (val == null) val = "";
4012
+ const cssValue = value == null ? "" : String(value);
3993
4013
  if (name.startsWith("--")) {
3994
- style.setProperty(name, val);
4014
+ style.setProperty(name, cssValue);
3995
4015
  } else {
3996
4016
  const prefixed = autoPrefix(style, name);
3997
- if (importantRE.test(val)) {
4017
+ if (importantRE.test(cssValue)) {
3998
4018
  style.setProperty(
3999
4019
  hyphenate(prefixed),
4000
- val.replace(importantRE, ""),
4020
+ cssValue.replace(importantRE, ""),
4001
4021
  "important"
4002
4022
  );
4003
4023
  } else {
4004
- style[prefixed] = val;
4024
+ style[prefixed] = cssValue;
4005
4025
  }
4006
4026
  }
4007
4027
  }
@@ -6280,8 +6300,8 @@ var createApp = (context, template = { selector: "#app" }, config) => {
6280
6300
  }
6281
6301
  };
6282
6302
  const appendChildren = (childNodes) => {
6283
- for (const child of childNodes) {
6284
- root.appendChild(child);
6303
+ while (childNodes.length > 0) {
6304
+ root.appendChild(childNodes[0]);
6285
6305
  }
6286
6306
  };
6287
6307
  if (template.template) {
@@ -1,3 +1,3 @@
1
- var lr=Object.defineProperty;var pr=(t,e,n)=>e in t?lr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var m=(t,e,n)=>pr(t,typeof e!="symbol"?e+"":e,n);var $e=Symbol(":regor");var Ce=t=>{let e=[t];for(let n=0;n<e.length;++n){let o=e[n];mr(o);for(let r=o.lastChild;r!=null;r=r.previousSibling)e.push(r)}},mr=t=>{let e=t[$e];if(!e)return;let n=e.unbinders;for(let o=0;o<n.length;++o)n[o]();n.length=0,t[$e]=void 0};var _e=[],ht=!1,yt,zn=()=>{if(ht=!1,yt=void 0,_e.length!==0){for(let t=0;t<_e.length;++t)Ce(_e[t]);_e.length=0}},Q=t=>{t.remove(),_e.push(t),ht||(ht=!0,yt=setTimeout(zn,1))},dr=async()=>{_e.length===0&&!ht||(yt&&clearTimeout(yt),zn())};var K=t=>typeof t=="function",W=t=>typeof t=="string",Kn=t=>typeof t=="undefined",me=t=>t==null||typeof t=="undefined",q=t=>typeof t!="string"||!(t!=null&&t.trim()),hr=Object.prototype.toString,rn=t=>hr.call(t),Oe=t=>rn(t)==="[object Map]",fe=t=>rn(t)==="[object Set]",sn=t=>rn(t)==="[object Date]",nt=t=>typeof t=="symbol",w=Array.isArray,N=t=>t!==null&&typeof t=="object";var Wn={0:"createApp can't find root element. You must define either a valid `selector` or an `element`. Example: createApp({}, {selector: '#app', html: '...'})",1:t=>`Component template cannot be found. selector: ${t} .`,2:"Use composables in scope. usage: useScope(() => new MyApp()).",3:t=>`${t} requires ref source argument`,4:"computed is readonly.",5:"persist requires a string key."},$=(t,...e)=>{let n=Wn[t];return new Error(K(n)?n.call(Wn,...e):n)};var gt=[],Gn=()=>{let t={onMounted:[],onUnmounted:[]};return gt.push(t),t},De=t=>{let e=gt[gt.length-1];if(!e&&!t)throw $(2);return e},Jn=t=>{let e=De();return t&&cn(t),gt.pop(),e},an=Symbol("csp"),cn=t=>{let e=t,n=e[an];if(n){let o=De();if(n===o)return;o.onMounted.length>0&&n.onMounted.push(...o.onMounted),o.onUnmounted.length>0&&n.onUnmounted.push(...o.onUnmounted);return}e[an]=De()},bt=t=>t[an];var Me=t=>{var n,o;let e=(n=bt(t))==null?void 0:n.onUnmounted;e==null||e.forEach(r=>{r()}),(o=t.unmounted)==null||o.call(t)};var Qn={8:t=>`Model binding requires a ref at ${t.outerHTML}`,7:t=>`Model binding is not supported on ${t.tagName} element at ${t.outerHTML}`,0:(t,e)=>`${t} binding expression is missing at ${e.outerHTML}`,1:(t,e,n)=>`invalid ${t} expression: ${e} at ${n.outerHTML}`,2:(t,e)=>`${t} requires object expression at ${e.outerHTML}`,3:(t,e)=>`${t} binder: key is empty on ${e.outerHTML}.`,4:(t,e,n,o)=>({msg:`Failed setting prop "${t}" on <${e.toLowerCase()}>: value ${n} is invalid.`,args:[o]}),5:(t,e)=>`${t} binding missing event type at ${e.outerHTML}`,6:(t,e)=>({msg:t,args:[e]})},H=(t,...e)=>{let n=Qn[t],o=K(n)?n.call(Qn,...e):n,r=Fe.warning;r&&(W(o)?r(o):r(o,...o.args))},Fe={warning:console.warn};var Tt=Symbol("ref"),ee=Symbol("sref"),xt=Symbol("raw");var C=t=>t!=null&&t[ee]===1;var ke=class extends Error{constructor(n,o){super(o);m(this,"propPath");m(this,"detail");this.name="PropValidationError",this.propPath=n,this.detail=o}},be=(t,e)=>{throw new ke(t,`${e}.`)},Ct=t=>{var n;if(t===null)return"null";if(t===void 0)return"undefined";if(C(t))return`ref<${Ct(t())}>`;if(typeof t=="string")return"string";if(typeof t=="number")return"number";if(typeof t=="boolean")return"boolean";if(typeof t=="bigint")return"bigint";if(typeof t=="symbol")return"symbol";if(typeof t=="function")return"function";if(w(t))return"array";if(t instanceof Date)return"Date";if(t instanceof RegExp)return"RegExp";if(t instanceof Map)return"Map";if(t instanceof Set)return"Set";let e=(n=t==null?void 0:t.constructor)==null?void 0:n.name;return e&&e!=="Object"?e:"object"},yr=t=>t.length>60?`${t.slice(0,57)}...`:t,ot=(t,e=0)=>{if(e>1)return"unknown";if(C(t)){let s=t();return`ref(${ot(s,e+1)})`}if(typeof t=="string")return yr(JSON.stringify(t));if(typeof t=="number"||typeof t=="boolean"||typeof t=="bigint"||typeof t=="symbol")return String(t);if(t===null)return"null";if(t===void 0)return"undefined";if(t instanceof Date)return t.toISOString();if(t instanceof RegExp)return String(t);if(w(t)){let s=t.slice(0,5).map(i=>ot(i,e+1)).join(", ");return t.length>5?`[${s}, ...]`:`[${s}]`}if(N(t)){let s=Object.entries(t).slice(0,5);if(s.length===0)return"{}";let i=s.map(([a,c])=>{let l=ot(c,e+1);return`${a}: ${l}`}).join(", ");return Object.keys(t).length>5?`{ ${i}, ... }`:`{ ${i} }`}return"unknown"},ae=t=>{if(C(t))return`got ${Ct(t)}(${ot(t())})`;let e=Ct(t),n=ot(t);return`got ${e} (${n})`},gr=t=>t instanceof ke?t.detail:t instanceof Error?t.message:String(t),Xn=(t,e)=>{let n=`, ${ae(e)}.`;return t.endsWith(n)?t.slice(0,-n.length):t},br=(t,e,n)=>{if(e instanceof ke){if(e.propPath===t)return Xn(e.detail,n);if(e.propPath===`${t}.value`&&C(n)){let o=Xn(e.detail,n());return o.startsWith("expected ")?`expected ref<${o.slice(9)}>`:`expected ref where ${o}`}}return gr(e)},Tr=(t,e,n)=>{let o=[];for(let r of e){let s=br(t,r,n);o.includes(s)||o.push(s)}return o.length===0?ae(n):o.length===1?`${o[0]}, ${ae(n)}`:`${o.join(" or ")}, ${ae(n)}`},xr=t=>typeof t=="string"?`"${t}"`:typeof t=="number"||typeof t=="boolean"?String(t):t===null?"null":t===void 0?"undefined":Ct(t),Cr=(t,e)=>{typeof t!="string"&&be(e,`expected string, ${ae(t)}`)},Er=(t,e)=>{typeof t!="number"&&be(e,`expected number, ${ae(t)}`)},Rr=(t,e)=>{typeof t!="boolean"&&be(e,`expected boolean, ${ae(t)}`)},wr=t=>(e,n)=>{e instanceof t||be(n,`expected instance of ${t.name||"provided class"}, ${ae(e)}`)},Sr=t=>(e,n,o)=>{e!==void 0&&t(e,n,o)},vr=t=>(e,n,o)=>{e!==null&&t(e,n,o)},Ar=(...t)=>(e,n,o)=>{let r=[];for(let s of t)try{s(e,n,o);return}catch(i){r.push(i)}be(n,Tr(n,r,e))},Nr=t=>(e,n)=>{t.includes(e)||be(n,`expected one of ${t.map(o=>xr(o)).join(", ")}, ${ae(e)}`)},Or=t=>(e,n,o)=>{w(e)||be(n,`expected array, ${ae(e)}`);let r=e;for(let s=0;s<r.length;++s)t(r[s],`${n}[${s}]`,o)};function Mr(t){return(e,n,o)=>{N(e)||be(n,`expected object, ${ae(e)}`);let r=e;for(let s in t){let i=t[s];if(!i)continue;i(r[s],`${n}.${s}`,o)}}}var kr=t=>(e,n,o)=>{if(C(e)){t(e(),`${n}.value`,o);return}be(n,`expected ref, ${ae(e)}`)},Lr={fail:be,describe:ae,isString:Cr,isNumber:Er,isBoolean:Rr,isClass:wr,optional:Sr,nullable:vr,or:Ar,oneOf:Nr,arrayOf:Or,shape:Mr,refOf:kr};var Ir=(t,e,n)=>{var i,a;let o=((a=(i=t.tagName)==null?void 0:i.toLowerCase)==null?void 0:a.call(i))||"unknown",r=n instanceof ke?n.propPath:e,s=n instanceof ke?n.detail:n instanceof Error?n.message:String(n);return n instanceof Error?new Error(`Invalid prop "${r}" on <${o}>: ${s}`,{cause:n}):new Error(`Invalid prop "${r}" on <${o}>: ${s}`,{cause:n})},rt=class{constructor(e,n,o,r,s,i){m(this,"props");m(this,"start");m(this,"end");m(this,"ctx");m(this,"autoProps",!0);m(this,"entangle",!0);m(this,"enableSwitch",!1);m(this,"onAutoPropsAssigned");m(this,"G");m(this,"J");m(this,"emit",(e,n)=>{this.G.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.G=n,this.ctx=o,this.start=r,this.end=s,this.J=i}findContext(e,n=0){var r;if(n<0)return;let o=0;for(let s of(r=this.ctx)!=null?r:[])if(s instanceof e){if(o===n)return s;++o}}requireContext(e,n=0){let o=this.findContext(e,n);if(o!==void 0)return o;throw new Error(`${e} was not found in the context stack at occurrence ${n}.`)}validateProps(e){if(this.J==="off")return;let n=this.props;for(let o in e){let r=e[o];if(!r)continue;let s=r;try{s(n[o],o,this)}catch(i){let a=Ir(this.G,o,i);if(this.J==="warn"){Fe.warning(a.message,a);continue}throw a}}}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)Q(e),e=e.nextSibling;for(let o of this.ctx)Me(o)}};var Ue=t=>{let e=t,n=e[$e];if(n)return n;let o={unbinders:[],data:{}};return e[$e]=o,o};var G=(t,e)=>{Ue(t).unbinders.push(e)};var Rt={},Et={},Yn=1,Zn=t=>{let e=(Yn++).toString();return Rt[e]=t,Et[e]=0,e},un=t=>{Et[t]+=1},fn=t=>{--Et[t]===0&&(delete Rt[t],delete Et[t])},eo=t=>Rt[t],ln=()=>Yn!==1&&Object.keys(Rt).length>0,st="r-switch",Vr=t=>{let e=t.filter(o=>Ee(o)).map(o=>[...o.querySelectorAll("[r-switch]")].map(r=>r.getAttribute(st))),n=new Set;return e.forEach(o=>{o.forEach(r=>r&&n.add(r))}),[...n]},qe=(t,e)=>{if(!ln())return;let n=Vr(e);n.length!==0&&(n.forEach(un),G(t,()=>{n.forEach(fn)}))};var wt=()=>{},pn=(t,e,n,o)=>{let r=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,o),r.push(i)}Le(e,r)},mn=Symbol("r-if"),to=Symbol("r-else"),no=t=>t[to]===1,St=class{constructor(e){m(this,"o");m(this,"N");m(this,"ge");m(this,"Q");m(this,"X");m(this,"x");m(this,"R");this.o=e,this.N=e.r.p.if,this.ge=At(e.r.p.if),this.Q=e.r.p.else,this.X=e.r.p.elseif,this.x=e.r.p.for,this.R=e.r.p.pre}rt(e,n){let o=e.parentElement;for(;o!==null&&o!==document.documentElement;){if(o.hasAttribute(n))return!0;o=o.parentElement}return!1}k(e){let n=e.hasAttribute(this.N);return n&&this.y(e),this.o.O.j(e,o=>{o.hasAttribute(this.N)&&this.y(o)}),n}Y(e){return e[mn]?!0:(e[mn]=!0,vt(e,this.ge).forEach(n=>n[mn]=!0),!1)}y(e){if(e.hasAttribute(this.R)||this.Y(e)||this.rt(e,this.x))return;let n=e.getAttribute(this.N);if(!n){H(0,this.N,e);return}e.removeAttribute(this.N),this.M(e,n)}U(e,n,o){let r=ze(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${o!=null?o:""}`);s.insertBefore(i,e),qe(i,r),r.forEach(c=>{Q(c)}),e.remove(),n!=="if"&&(e[to]=1);let a=document.createComment(`__end__ :${n}${o!=null?o:""}`);return s.insertBefore(a,i.nextSibling),{nodes:r,parent:s,commentBegin:i,commentEnd:a}}be(e,n){if(!e)return[];let o=e.nextElementSibling;if(e.hasAttribute(this.Q)){e.removeAttribute(this.Q);let{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"else");return[{mount:()=>{pn(r,this.o,s,a)},unmount:()=>{Re(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let r=e.getAttribute(this.X);if(!r)return[];e.removeAttribute(this.X);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.U(e,"elseif",` => ${r} `),l=this.o.m.V(r),f=l.value,u=this.be(o,n),p=wt;return G(a,()=>{l.stop(),p(),p=wt}),p=l.subscribe(n),[{mount:()=>{pn(s,this.o,i,c)},unmount:()=>{Re(a,c)},isTrue:()=>!!f()[0],isMounted:!1},...u]}}M(e,n){let o=e.nextElementSibling,{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"if",` => ${n} `),c=this.o.m.V(n),l=c.value,f=!1,u=this.o.m,p=u.L(),h=()=>{u.E(p,()=>{if(l()[0])f||(pn(r,this.o,s,a),f=!0),g.forEach(T=>{T.unmount(),T.isMounted=!1});else{Re(i,a),f=!1;let T=!1;for(let R of g)!T&&R.isTrue()?(R.isMounted||(R.mount(),R.isMounted=!0),T=!0):(R.unmount(),R.isMounted=!1)}})},g=this.be(o,h),d=wt;G(i,()=>{c.stop(),d(),d=wt}),h(),d=c.subscribe(h)}};var ze=t=>{let e=de(t)?t.content.childNodes:[t],n=[];for(let o=0;o<e.length;++o){let r=e[o];if(r.nodeType===1){let s=r==null?void 0:r.tagName;if(s==="SCRIPT"||s==="STYLE")continue}n.push(r)}return n},Le=(t,e)=>{for(let n=0;n<e.length;++n){let o=e[n];o.nodeType===Node.ELEMENT_NODE&&(no(o)||t.$(o))}},vt=(t,e)=>{var o;let n=t.querySelectorAll(e);return(o=t.matches)!=null&&o.call(t,e)?[t,...n]:n},de=t=>t instanceof HTMLTemplateElement,Ee=t=>t.nodeType===Node.ELEMENT_NODE,it=t=>t.nodeType===Node.ELEMENT_NODE,oo=t=>t instanceof HTMLSlotElement,we=t=>de(t)?t.content.childNodes:t.childNodes,Re=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let o=n.nextSibling;Q(n),n=o}},ro=function(){return this()},Pr=function(t){return this(t)},Dr=()=>{throw new Error("value is readonly.")},Ur={get:ro,set:Pr,enumerable:!0,configurable:!1},Hr={get:ro,set:Dr,enumerable:!0,configurable:!1},Ie=(t,e)=>{Object.defineProperty(t,"value",e?Hr:Ur)},so=(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},At=t=>`[${CSS.escape(t)}]`,Nt=(t,e)=>(t.startsWith("@")&&(t=e.p.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.p.dynamic)),t),dn=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},Br=/-(\w)/g,_=dn(t=>t&&t.replace(Br,(e,n)=>n?n.toUpperCase():"")),jr=/\B([A-Z])/g,Ke=dn(t=>t&&t.replace(jr,"-$1").toLowerCase()),at=dn(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var Ot={mount:()=>{}};var We=t=>{let e=t.trim();return e?e.split(/\s+/):[]};var Mt=t=>{var n,o;let e=(n=bt(t))==null?void 0:n.onMounted;e==null||e.forEach(r=>{r()}),(o=t.mounted)==null||o.call(t)};var hn=Symbol("scope"),yn=t=>{try{Gn();let e=t();cn(e);let n={context:e,unmount:()=>Me(e),[hn]:1};return n[hn]=1,n}finally{Jn()}},io=t=>N(t)?hn in t:!1;var gn={collectRefObj:!0,mount:({parseResult:t})=>({update:({values:e})=>{let n=t.context,o=e[0];if(N(o))for(let r of Object.entries(o)){let s=r[0],i=r[1],a=n[s];a!==i&&(C(a)?a(i):n[s]=i)}}})};var re=(t,e)=>{var n;(n=De(e))==null||n.onUnmounted.push(t)};var ie=(t,e,n,o=!0)=>{if(!C(t))throw $(3,"observe");n&&e(t());let s=t(void 0,void 0,0,e);return o&&re(s,!0),s};var ct=(t,e)=>{if(t===e)return()=>{};let n=ie(t,r=>e(r)),o=ie(e,r=>t(r));return e(t()),()=>{n(),o()}};var ut=t=>!!t&&t[xt]===1;var Ge=t=>(t==null?void 0:t[Tt])===1;var he=[],ao=t=>{var e;he.length!==0&&((e=he[he.length-1])==null||e.add(t))},Je=t=>{if(!t)return()=>{};let e={stop:()=>{}};return $r(t,e),re(()=>e.stop(),!0),e.stop},$r=(t,e)=>{if(!t)return;let n=[],o=!1,r=()=>{for(let s of n)s();n=[],o=!0};e.stop=r;try{let s=new Set;if(he.push(s),t(i=>n.push(i)),o)return;for(let i of[...s]){let a=ie(i,()=>{r(),Je(t)});n.push(a)}}finally{he.pop()}},bn=t=>{let e=he.length,n=e>0&&he[e-1];try{return n&&he.push(null),t()}finally{n&&he.pop()}},Tn=t=>{try{let e=new Set;return he.push(e),{value:t(),refs:[...e]}}finally{he.pop()}};var te=(t,e,n)=>{if(!C(t))return;let o=t;if(o(void 0,e,1),!n)return;let r=o();if(r){if(w(r)||fe(r))for(let s of r)te(s,e,!0);else if(Oe(r))for(let s of r)te(s[0],e,!0),te(s[1],e,!0);if(N(r))for(let s in r)te(r[s],e,!0)}};function _r(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Qe=(t,e,n)=>{n.forEach(function(o){let r=t[o];_r(e,o,function(...i){let a=r.apply(this,i),c=this[ee];for(let l of c)te(l);return a})})},kt=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var co=Array.prototype,xn=Object.create(co),Fr=["push","pop","shift","unshift","splice","sort","reverse"];Qe(co,xn,Fr);var uo=Map.prototype,Lt=Object.create(uo),qr=["set","clear","delete"];kt(Lt,"Map");Qe(uo,Lt,qr);var fo=Set.prototype,It=Object.create(fo),zr=["add","clear","delete"];kt(It,"Set");Qe(fo,It,zr);var Te={},ce=t=>{if(C(t)||ut(t))return t;let e={auto:!0,_value:t},n=c=>N(c)?ee in c?!0:w(c)?(Object.setPrototypeOf(c,xn),!0):fe(c)?(Object.setPrototypeOf(c,It),!0):Oe(c)?(Object.setPrototypeOf(c,Lt),!0):!1:!1,o=n(t),r=new Set,s=(c,l)=>{if(Te.stack&&Te.stack.length){Te.stack[Te.stack.length-1].add(a);return}r.size!==0&&bn(()=>{for(let f of[...r.keys()])r.has(f)&&f(c,l)})},i=c=>{let l=c[ee];l||(c[ee]=l=new Set),l.add(a)},a=(...c)=>{if(!(2 in c)){let f=c[0],u=c[1];return 0 in c?e._value===f||C(f)&&(f=f(),e._value===f)?f:(n(f)&&i(f),e._value=f,e.auto&&s(f,u),e._value):(ao(a),e._value)}switch(c[2]){case 0:{let f=c[3];if(!f)return()=>{};let u=p=>{r.delete(p)};return r.add(f),()=>{u(f)}}case 1:{let f=c[1],u=e._value;s(u,f);break}case 2:return r.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[ee]=1,Ie(a,!1),o&&i(t),a};var Se=t=>{if(ut(t))return t;let e;if(C(t)?(e=t,t=e()):e=ce(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[Tt]=1,w(t)){let n=t.length;for(let o=0;o<n;++o){let r=t[o];Ge(r)||(t[o]=Se(r))}return e}if(!N(t))return e;for(let n of Object.entries(t)){let o=n[1];if(Ge(o))continue;let r=n[0];nt(r)||(t[r]=null,t[r]=Se(o))}return e};var lo=Symbol("modelBridge"),Vt=()=>{},Kr=t=>!!(t!=null&&t[lo]),Wr=t=>{t[lo]=1},Gr=t=>{let e=Se(t());return Wr(e),e},po={collectRefObj:!0,mount:({parseResult:t,option:e})=>{if(typeof e!="string"||!e)return Vt;let n=_(e),o,r,s=Vt,i=()=>{s(),s=Vt,o=void 0,r=void 0},a=()=>{s(),s=Vt},c=(f,u)=>{o!==f&&(a(),s=ct(f,u),o=f)},l=()=>{var h;let f=(h=t.refs[0])!=null?h:t.value()[0],u=t.context,p=u[n];if(!C(f)){if(r&&p===r){r(f);return}if(i(),C(p)){p(f);return}u[n]=f;return}if(Kr(f)){if(p===f)return;C(p)?c(f,p):u[n]=f;return}r||(r=Gr(f)),u[n]=r,c(f,r)};return{update:()=>{l()},unmount:()=>{s()}}}};var Pt=class{constructor(e){m(this,"o");m(this,"xe");m(this,"Te","");m(this,"Re",-1);this.o=e,this.xe=e.r.p.inherit}k(e){this.ot(e)}st(e){if(this.Re!==e.size){let n=[...e.keys()];this.Te=[...n,...n.map(Ke)].join(","),this.Re=e.size}return this.Te}it(e){var n;for(let o=0;o<e.length;++o){let r=(n=e[o])==null?void 0:n.components;if(r)for(let s in r)return!0}return!1}at(e){if(!de(e))return!1;let n=e.getAttributeNames();return e.hasAttribute("name")?!0:n.some(o=>o.startsWith("#"))}ct(e){return de(e)&&e.getAttributeNames().length===0}ot(e){var l,f;let n=this.o,o=n.m,r=n.r.Z,s=n.r._;if(r.size===0&&!this.it(o.l))return;let i=o.ee(),a=this.Ee();if(q(a))return;let c=this.pt(e,a);for(let u of c){if(u.hasAttribute(n.R))continue;let p=u.parentNode;if(!p)continue;let h=u.nextSibling,g=_(u.tagName).toUpperCase(),d=i[g],E=d!=null?d:s.get(g);if(!E)continue;let T=E.template;if(!T)continue;let R=u.parentElement;if(!R)continue;let k=new Comment(" begin component: "+u.tagName),X=new Comment(" end component: "+u.tagName);R.insertBefore(k,u),u.remove();let P=n.r.p.context,U=n.r.p.contextAlias,le=n.r.p.bind,Y=(f=(l=E.props)==null?void 0:l.map(_))!=null?f:[],L=(x,A)=>{let y={},j=x.hasAttribute(P);return o.E(A,()=>{if(o.w(y),j?n.y(gn,x,P):x.hasAttribute(U)&&n.y(gn,x,U),Y.length===0)return;let D=new Map(Y.map(S=>[S.toLowerCase(),S]));for(let S of[...Y,...Y.map(Ke)]){let V=x.getAttribute(S);V!==null&&(y[_(S)]=V,x.removeAttribute(S))}let J=n.F.Ce(x,!1);for(let[S,V]of J.entries()){let[v,z]=V.te;if(!z)continue;let se=D.get(_(z).toLowerCase());se&&(v!=="."&&v!==":"&&v!==le||n.y(po,x,S,!0,se,V.ne))}}),y},b=[...o.L()],O=()=>{var j;let x=L(u,b),A=new rt(x,u,b,k,X,n.r.propValidationMode),y=yn(()=>{var D;return(D=E.context(A))!=null?D:{}}).context;if(A.autoProps){for(let[D,J]of Object.entries(x))if(D in y){let S=y[D];if(S===J)continue;if(C(S)){C(J)?A.entangle?G(k,ct(J,S)):S(J()):S(J);continue}}else y[D]=J;for(let D of Y)D in y||(y[D]=void 0);(j=A.onAutoPropsAssigned)==null||j.call(A)}return{componentCtx:y,head:A}},{componentCtx:B,head:Pe}=O(),pe=[...we(T)],nn=pe.length,I=u.childNodes.length===0,tt=x=>{var J;let A=x.parentElement,y=x.name;if(q(y)&&(y=x.getAttributeNames().filter(S=>S.startsWith("#"))[0],q(y)?y="default":y=y.substring(1)),I){if(y==="default"){let S=n.r.p.text,V=u.getAttribute(S);if(!q(V)){let v=document.createElement("span");v.setAttribute(S,V),A.insertBefore(v,x),u.removeAttribute(S);return}}for(let S of[...x.childNodes])A.insertBefore(S,x);return}let j=u.querySelector(`template[name='${y}'], template[\\#${y}]`);!j&&y==="default"&&(j=(J=[...u.querySelectorAll("template:not([name])")].find(V=>this.ct(V)))!=null?J:null);let D=S=>{Pe.enableSwitch&&o.E(b,()=>{o.w(B);let V=L(x,o.L());o.E(b,()=>{o.w(V);let v=o.L(),z=Zn(v);for(let se of S)Ee(se)&&(se.setAttribute(st,z),un(z),G(se,()=>{fn(z)}))})})};if(j){let S=[...we(j)];for(let V of S)A.insertBefore(V,x);D(S)}else{if(y!=="default"){for(let V of[...we(x)])A.insertBefore(V,x);return}let S=[...we(u)].filter(V=>!this.at(V));for(let V of S)A.insertBefore(V,x);D(S)}},M=x=>{if(!Ee(x))return;let A=x.querySelectorAll("slot");if(oo(x)){tt(x),x.remove();return}for(let y of A)tt(y),y.remove()};(()=>{for(let x=0;x<nn;++x)pe[x]=pe[x].cloneNode(!0),p.insertBefore(pe[x],h),M(pe[x])})(),R.insertBefore(X,h);let ne=()=>{if(!E.inheritAttrs)return;let x=pe.filter(y=>y.nodeType===Node.ELEMENT_NODE);x.length>1&&(x=x.filter(y=>y.hasAttribute(this.xe)));let A=x[0];if(A)for(let y of u.getAttributeNames()){if(y===P||y===U)continue;let j=u.getAttribute(y);if(y==="class"){let D=We(j);D.length>0&&A.classList.add(...D)}else if(y==="style"){let D=A.style,J=u.style;for(let S of J)D.setProperty(S,J.getPropertyValue(S))}else A.setAttribute(Nt(y,n.r),j)}},oe=()=>{for(let x of u.getAttributeNames())!x.startsWith("@")&&!x.startsWith(n.r.p.on)&&u.removeAttribute(x)},xe=()=>{ne(),oe(),o.w(B),n.we(u,!1),B.$emit=Pe.emit,Le(n,pe),G(u,()=>{Me(B)}),G(k,()=>{Ce(u)}),Mt(B)};o.E(b,xe)}}Ee(){let e=this.o,n=e.m,o=e.r.Z,r=n.ut(),s=this.st(o);return[...s?[s]:[],...r,...r.map(Ke)].join(",")}pt(e,n){var s;let o=[];if(q(n))return o;if((s=e.matches)!=null&&s.call(e,n))return[e];let r=this.q(e).reverse();for(;r.length>0;){let i=r.pop();if(i.matches(n)){o.push(i);continue}r.push(...this.q(i).reverse())}return o}j(e,n){let o=this.Ee(),r=this.q(e).reverse();for(;r.length>0;){let s=r.pop();n(s),!(!q(o)&&s.matches(o))&&r.push(...this.q(s).reverse())}}q(e){let n=e==null?void 0:e.children;if((n==null?void 0:n.length)!=null){let r=[];for(let s=0;s<n.length;++s){let i=n[s];Ee(i)&&r.push(i)}return r}let o=e==null?void 0:e.childNodes;if((o==null?void 0:o.length)!=null){let r=[];for(let s=0;s<o.length;++s){let i=o[s];Ee(i)&&r.push(i)}return r}return[]}};var Cn=class{constructor(e,n){m(this,"te");m(this,"ne");m(this,"ve",[]);this.te=e,this.ne=n}},Dt=class{constructor(e){m(this,"o");m(this,"Se");m(this,"Ae");m(this,"re");var o;this.o=e,this.Se=e.r.lt(),this.re=new Map;let n=new Map;for(let r of this.Se){let s=(o=r[0])!=null?o:"",i=n.get(s);i?i.push(r):n.set(s,[r])}this.Ae=n}ke(e){let n=this.re.get(e);if(n)return n;let o=e,r=o.startsWith(".");r&&(o=":"+o.slice(1));let s=o.indexOf("."),a=(s<0?o:o.substring(0,s)).split(/[:@]/);q(a[0])&&(a[0]=r?".":o[0]);let c=s>=0?o.slice(s+1).split("."):[],l=!1,f=!1;for(let p=0;p<c.length;++p){let h=c[p];if(!l&&h==="camel"?l=!0:!f&&h==="prop"&&(f=!0),l&&f)break}l&&(a[a.length-1]=_(a[a.length-1])),f&&(a[0]=".");let u={terms:a,flags:c};return this.re.set(e,u),u}Ce(e,n){let o=new Map;if(!it(e))return o;let r=this.Ae,s=(a,c)=>{var f;let l=r.get((f=c[0])!=null?f:"");if(l)for(let u=0;u<l.length;++u){if(!c.startsWith(l[u]))continue;let p=o.get(c);if(!p){let h=this.ke(c);p=new Cn(h.terms,h.flags),o.set(c,p)}p.ve.push(a);return}},i=a=>{var l;let c=a.attributes;if(!(!c||c.length===0))for(let f=0;f<c.length;++f){let u=(l=c.item(f))==null?void 0:l.name;u&&s(a,u)}};return i(e),!n||!e.firstElementChild||this.o.O.j(e,i),o}};var mo=()=>{},Jr=(t,e)=>{for(let n of t){let o=n.cloneNode(!0);e.appendChild(o)}},Ut=class{constructor(e){m(this,"o");m(this,"I");this.o=e,this.I=e.r.p.is}k(e){let n=e.hasAttribute(this.I);return(n||e.hasAttribute("is"))&&this.y(e),this.o.O.j(e,o=>{(o.hasAttribute(this.I)||o.hasAttribute("is"))&&this.y(o)}),n}y(e){let n=e.getAttribute(this.I);if(!n){if(n=e.getAttribute("is"),!n)return;if(!n.startsWith("regor:")){if(!n.startsWith("r-"))return;let o=n.slice(2).trim().toLowerCase();if(!o)return;let r=e.parentNode;if(!r)return;let s=document.createElement(o);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);r.insertBefore(s,e),e.remove(),this.o.$(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.M(e,n)}U(e,n){let o=ze(e),r=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);r.insertBefore(s,e),qe(s,o),o.forEach(a=>{Q(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n!=null?n:""}`);return r.insertBefore(i,s.nextSibling),{nodes:o,parent:r,commentBegin:s,commentEnd:i}}M(e,n){let{nodes:o,parent:r,commentBegin:s,commentEnd:i}=this.U(e,` => ${n} `),a=this.o.m.V(n),c=a.value,l=this.o.m,f=l.L(),u={name:""},p=de(e)?o:[...o[0].childNodes],h=()=>{l.E(f,()=>{var R;let E=c()[0];if(N(E)&&(E.name?E=E.name:E=(R=Object.entries(l.ee()).filter(k=>k[1]===E)[0])==null?void 0:R[0]),!W(E)||q(E)){Re(s,i);return}if(u.name===E)return;Re(s,i);let T=document.createElement(E);for(let k of e.getAttributeNames())k!==this.I&&T.setAttribute(k,e.getAttribute(k));Jr(p,T),r.insertBefore(T,i),this.o.$(T),u.name=E})},g=mo;G(s,()=>{a.stop(),g(),g=mo}),h(),g=a.subscribe(h)}};var F=t=>{let e=t;return e!=null&&e[ee]===1?e():e};var Qr=(t,e)=>{let[n,o]=e;K(o)?o(t,n):t.innerHTML=n==null?void 0:n.toString()},Ht={mount:()=>({update:({el:t,values:e})=>{Qr(t,e)}})};var Bt=class t{constructor(e){m(this,"oe");this.oe=e}static ft(e,n){var h,g;let o=e.m,r=e.r,s=r.p,i=new Set([s.for,s.if,s.else,s.elseif,s.pre]),a=r.B,c=o.ee();if(Object.keys(c).length>0||r._.size>0)return;let l=e.F,f=[],u=0,p=[];for(let d=n.length-1;d>=0;--d)p.push(n[d]);for(;p.length>0;){let d=p.pop();if(d.nodeType===Node.ELEMENT_NODE){let T=d;if(T.tagName==="TEMPLATE"||T.tagName.includes("-"))return;let R=_(T.tagName).toUpperCase();if(r._.has(R)||c[R])return;let k=T.attributes;for(let X=0;X<k.length;++X){let P=(h=k.item(X))==null?void 0:h.name;if(!P)continue;if(i.has(P))return;let{terms:U,flags:le}=l.ke(P),[Y,L]=U,b=(g=a[P])!=null?g:a[Y];if(b){if(b===Ht)return;f.push({nodeIndex:u,attrName:P,directive:b,option:L,flags:le})}}++u}let E=d.childNodes;for(let T=E.length-1;T>=0;--T)p.push(E[T])}if(f.length!==0)return new t(f)}y(e,n){let o=[],r=[];for(let s=n.length-1;s>=0;--s)r.push(n[s]);for(;r.length>0;){let s=r.pop();s.nodeType===Node.ELEMENT_NODE&&o.push(s);let i=s.childNodes;for(let a=i.length-1;a>=0;--a)r.push(i[a])}for(let s=0;s<this.oe.length;++s){let i=this.oe[s],a=o[i.nodeIndex];a&&e.y(i.directive,a,i.attrName,!1,i.option,i.flags)}}};var Xr=(t,e)=>{let n=e.parentNode;if(n)for(let o=0;o<t.items.length;++o)n.insertBefore(t.items[o],e)},Yr=t=>{var a;let e=t.length,n=t.slice(),o=[],r,s,i;for(let c=0;c<e;++c){let l=t[c];if(l===0)continue;let f=o[o.length-1];if(f===void 0||t[f]<l){n[c]=f!=null?f:-1,o.push(c);continue}for(r=0,s=o.length-1;r<s;)i=r+s>>1,t[o[i]]<l?r=i+1:s=i;l<t[o[r]]&&(r>0&&(n[c]=o[r-1]),o[r]=c)}for(r=o.length,s=(a=o[r-1])!=null?a:-1;r-- >0;)o[r]=s,s=n[s];return o},jt=class{static dt(e){let{oldItems:n,newValues:o,getKey:r,isSameValue:s,mountNewValue:i,removeMountItem:a,endAnchor:c}=e,l=n.length,f=o.length,u=new Array(f),p=new Set;for(let b=0;b<f;++b){let O=r(o[b]);if(O===void 0||p.has(O))return;p.add(O),u[b]=O}let h=new Array(f),g=0,d=l-1,E=f-1;for(;g<=d&&g<=E;){let b=n[g];if(r(b.value)!==u[g]||!s(b.value,o[g]))break;b.value=o[g],h[g]=b,++g}for(;g<=d&&g<=E;){let b=n[d];if(r(b.value)!==u[E]||!s(b.value,o[E]))break;b.value=o[E],h[E]=b,--d,--E}if(g>d){for(let b=E;b>=g;--b){let O=b+1<f?h[b+1].items[0]:c;h[b]=i(b,o[b],O)}return h}if(g>E){for(let b=g;b<=d;++b)a(n[b]);return h}let T=g,R=g,k=E-R+1,X=new Array(k).fill(0),P=new Map;for(let b=R;b<=E;++b)P.set(u[b],b);let U=!1,le=0;for(let b=T;b<=d;++b){let O=n[b],B=P.get(r(O.value));if(B===void 0){a(O);continue}if(!s(O.value,o[B])){a(O);continue}O.value=o[B],h[B]=O,X[B-R]=b+1,B>=le?le=B:U=!0}let Y=U?Yr(X):[],L=Y.length-1;for(let b=k-1;b>=0;--b){let O=R+b,B=O+1<f?h[O+1].items[0]:c;if(X[b]===0){h[O]=i(O,o[O],B);continue}let Pe=h[O];U&&(L>=0&&Y[L]===b?--L:Pe&&Xr(Pe,B))}return h}};var ft=class{constructor(e){m(this,"T",[]);m(this,"P",new Map);m(this,"se");this.se=e}get v(){return this.T.length}ie(e){let n=this.se(e.value);n!==void 0&&this.P.set(n,e)}ae(e){var o;let n=this.se((o=this.T[e])==null?void 0:o.value);n!==void 0&&this.P.delete(n)}static mt(e,n){return{items:[],index:e,value:n,order:-1}}w(e){e.order=this.v,this.T.push(e),this.ie(e)}yt(e,n){let o=this.v;for(let r=e;r<o;++r)this.T[r].order=r+1;n.order=e,this.T.splice(e,0,n),this.ie(n)}D(e){return this.T[e]}ce(e,n){this.ae(e),this.T[e]=n,this.ie(n),n.order=e}Ne(e){this.ae(e),this.T.splice(e,1);let n=this.v;for(let o=e;o<n;++o)this.T[o].order=o}Oe(e){let n=this.v;for(let o=e;o<n;++o)this.ae(o);this.T.splice(e)}en(e){return this.P.has(e)}ht(e){var o;let n=this.P.get(e);return(o=n==null?void 0:n.order)!=null?o:-1}};var En=Symbol("r-for"),Zr=t=>-1,ho=()=>{},_t=class _t{constructor(e){m(this,"o");m(this,"x");m(this,"Me");m(this,"R");this.o=e,this.x=e.r.p.for,this.Me=At(this.x),this.R=e.r.p.pre}k(e){let n=e.hasAttribute(this.x);return n&&this.Ve(e),this.o.O.j(e,o=>{o.hasAttribute(this.x)&&this.Ve(o)}),n}Y(e){return e[En]?!0:(e[En]=!0,vt(e,this.Me).forEach(n=>n[En]=!0),!1)}Ve(e){if(e.hasAttribute(this.R)||this.Y(e))return;let n=e.getAttribute(this.x);if(!n){H(0,this.x,e);return}e.removeAttribute(this.x),this.gt(e,n)}Le(e){return me(e)?[]:(K(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(o=>({*[Symbol.iterator](){for(let r=1;r<=o;r++)yield r}}))(e):Object.entries(e))}gt(e,n){var tt;let o=this.bt(n);if(!(o!=null&&o.list)){H(1,this.x,n,e);return}let r=this.o.r.p.key,s=this.o.r.p.keyBind,i=(tt=e.getAttribute(r))!=null?tt:e.getAttribute(s);e.removeAttribute(r),e.removeAttribute(s);let a=ze(e),c=Bt.ft(this.o,a),l=e.parentNode;if(!l)return;let f=`${this.x} => ${n}`,u=new Comment(`__begin__ ${f}`);l.insertBefore(u,e),qe(u,a),a.forEach(M=>{Q(M)}),e.remove();let p=new Comment(`__end__ ${f}`);l.insertBefore(p,u.nextSibling);let h=this.o,g=h.m,d=g.L(),T=d.length===1?[void 0,d[0]]:void 0,R=this.xt(i),k=(M,Z)=>R(M)===R(Z),X=(M,Z)=>M===Z,P=(M,Z,ne)=>{let oe=o.createContext(Z,M),xe=ft.mt(oe.index,Z),x=()=>{var D,J;let A=(J=(D=p.parentNode)!=null?D:u.parentNode)!=null?J:l,y=ne.previousSibling,j=[];for(let S=0;S<a.length;++S){let V=a[S].cloneNode(!0);A.insertBefore(V,ne),j.push(V)}for(c?c.y(h,j):Le(h,j),y=y.nextSibling;y!==ne;)xe.items.push(y),y=y.nextSibling};return T?(T[0]=oe.ctx,g.E(T,x)):g.E(d,()=>{g.w(oe.ctx),x()}),xe},U=(M,Z)=>{let ne=I.D(M).items,oe=ne[ne.length-1].nextSibling;for(let xe of ne)Q(xe);I.ce(M,P(M,Z,oe))},le=(M,Z)=>{I.w(P(M,Z,p))},Y=M=>{for(let Z of I.D(M).items)Q(Z)},L=M=>{let Z=I.v;for(let ne=M;ne<Z;++ne)I.D(ne).index(ne)},b=M=>{let Z=u.parentNode,ne=p.parentNode;if(!Z||!ne)return;let oe=I.v;K(M)&&(M=M());let xe=F(M[0]);if(w(xe)&&xe.length===0){Re(u,p),I.Oe(0);return}let x=[];for(let v of this.Le(M[0]))x.push(v);let A=jt.dt({oldItems:I.T,newValues:x,getKey:R,isSameValue:X,mountNewValue:(v,z,se)=>P(v,z,se),removeMountItem:v=>{for(let z=0;z<v.items.length;++z)Q(v.items[z])},endAnchor:p});if(A){I.T=A,I.P.clear();for(let v=0;v<A.length;++v){let z=A[v];z.order=v,z.index(v);let se=R(z.value);se!==void 0&&I.P.set(se,z)}return}let y=0,j=Number.MAX_SAFE_INTEGER,D=oe,J=this.o.r.forGrowThreshold,S=()=>I.v<D+J;for(let v of x){let z=()=>{if(y<oe){let se=I.D(y++);if(k(se.value,v)){if(X(se.value,v))return;U(y-1,v);return}let dt=I.ht(R(v));if(dt>=y&&dt-y<10){if(--y,j=Math.min(j,y),Y(y),I.Ne(y),--oe,dt>y+1)for(let on=y;on<dt-1&&on<oe&&!k(I.D(y).value,v);)++on,Y(y),I.Ne(y),--oe;z();return}S()?(I.yt(y-1,P(y,v,I.D(y-1).items[0])),j=Math.min(j,y-1),++oe):U(y-1,v)}else le(y++,v)};z()}let V=y;for(oe=I.v;y<oe;)Y(y++);I.Oe(V),L(j)},O=()=>{B.stop(),pe(),pe=ho},B=g.V(o.list),Pe=B.value,pe=ho,nn=0,I=new ft(R);for(let M of this.Le(Pe()[0]))I.w(P(nn++,M,p));G(u,O),pe=B.subscribe(b)}bt(e){var c,l;let n=_t.Tt.exec(e);if(!n)return;let o=(n[1]+((c=n[2])!=null?c:"")).split(",").map(f=>f.trim()),r=o.length>1?o.length-1:-1,s=r!==-1&&(o[r]==="index"||(l=o[r])!=null&&l.startsWith("#"))?o[r]:"";s&&o.splice(r,1);let i=n[3];if(!i||o.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(f,u)=>{let p={},h=F(f);if(!a&&o.length===1)p[o[0]]=f;else if(w(h)){let d=0;for(let E of o)p[E]=h[d++]}else for(let d of o)p[d]=h[d];let g={ctx:p,index:Zr};return s&&(g.index=p[s.startsWith("#")?s.substring(1):s]=ce(u)),g}}}xt(e){if(!e)return o=>o;let n=e.trim();if(!n)return o=>o;if(n.includes(".")){let o=this.Rt(n),r=o.length>1?o.slice(1):void 0;return s=>{let i=F(s),a=this.Ie(i,o);return a!==void 0||!r?a:this.Ie(i,r)}}return o=>{var r;return F((r=F(o))==null?void 0:r[n])}}Rt(e){return e.split(".").filter(n=>n.length>0)}Ie(e,n){var r;let o=e;for(let s of n)o=(r=F(o))==null?void 0:r[s];return F(o)}};m(_t,"Tt",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var $t=_t;var Ft=class{constructor(e){m(this,"pe",0);m(this,"ue",new Map);m(this,"m");m(this,"Pe");m(this,"De");m(this,"Ue");m(this,"O");m(this,"F");m(this,"r");m(this,"R");m(this,"Be");this.m=e,this.r=e.r,this.De=new $t(this),this.Pe=new St(this),this.Ue=new Ut(this),this.O=new Pt(this),this.F=new Dt(this),this.R=this.r.p.pre,this.Be=this.r.p.dynamic}Et(e){let n=de(e)?[e]:e.querySelectorAll("template");for(let o of n){if(o.hasAttribute(this.R))continue;let r=o.parentNode;if(!r)continue;let s=o.nextSibling;if(o.remove(),!o.content)continue;let i=[...o.content.childNodes];for(let a of i)r.insertBefore(a,s);Le(this,i)}}$(e){++this.pe;try{if(e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.R)||this.Pe.k(e)||this.De.k(e)||this.Ue.k(e))return;this.O.k(e),this.Et(e),this.we(e,!0)}finally{--this.pe,this.pe===0&&this.Ct()}}wt(e,n){let o=document;if(!o){let r=e.parentNode;for(;r!=null&&r.parentNode;)r=r.parentNode;if(!r)return null;o=r}return o.querySelector(n)}He(e,n){let o=this.wt(e,n);if(!o)return!1;let r=e.parentElement;if(!r)return!1;let s=new Comment(`teleported => '${n}'`);return r.insertBefore(s,e),e.teleportedFrom=s,s.teleportedTo=e,G(s,()=>{Q(e)}),o.appendChild(e),!0}vt(e,n){this.ue.set(e,n)}Ct(){let e=this.ue;if(e.size!==0){this.ue=new Map;for(let[n,o]of e.entries())this.He(n,o)}}we(e,n){var s;let o=this.F.Ce(e,n),r=this.r.B;for(let[i,a]of o.entries()){let[c,l]=a.te,f=(s=r[i])!=null?s:r[c];if(!f){console.error("directive not found:",c);continue}let u=a.ve;for(let p=0;p<u.length;++p){let h=u[p];this.y(f,h,i,!1,l,a.ne)}}}y(e,n,o,r,s,i){if(n.hasAttribute(this.R))return;let a=n.getAttribute(o);n.removeAttribute(o);let c=l=>{let f=l;for(;f;){let u=f.getAttribute(st);if(u)return u;f=f.parentElement}return null};if(ln()){let l=c(n);if(l){this.m.E(eo(l),()=>{this.M(e,n,a,s,i)});return}}this.M(e,n,a,s,i)}St(e,n,o){return e!==Ot?!1:(q(o)||this.He(n,o)||this.vt(n,o),!0)}M(e,n,o,r,s){if(n.nodeType!==Node.ELEMENT_NODE||o==null||this.St(e,n,o))return;let i=this.At(r,e.once),a=this.kt(e,o),c=this.Nt(a,i);G(n,c.stop);let l=this.Ot(n,o,a,i,r,s),f=this.Mt(e,l,c);if(!f)return;let u=this.Vt(l,a,i,r,f);u(),e.once||(c.result=a.subscribe(u),i&&(c.dynamic=i.subscribe(u)))}At(e,n){let o=so(e,this.Be);if(o)return this.m.V(_(o),void 0,void 0,void 0,n)}kt(e,n){return this.m.V(n,e.isLazy,e.isLazyKey,e.collectRefObj,e.once)}Nt(e,n){let o={stop:()=>{var r,s,i;e.stop(),n==null||n.stop(),(r=o.result)==null||r.call(o),(s=o.dynamic)==null||s.call(o),(i=o.mounted)==null||i.call(o),o.result=void 0,o.dynamic=void 0,o.mounted=void 0}};return o}Ot(e,n,o,r,s,i){return{el:e,expr:n,values:o.value(),previousValues:void 0,option:r?r.value()[0]:s,previousOption:void 0,flags:i,parseResult:o,dynamicOption:r}}Mt(e,n,o){let r=e.mount(n);if(typeof r=="function"){o.mounted=r;return}return r!=null&&r.unmount&&(o.mounted=r.unmount),r==null?void 0:r.update}Vt(e,n,o,r,s){let i,a;return()=>{let c=n.value(),l=o?o.value()[0]:r;e.values=c,e.previousValues=i,e.option=l,e.previousOption=a,i=c,a=l,s(e)}}};var yo="http://www.w3.org/1999/xlink",es={itemscope:2,allowfullscreen:2,formnovalidate:2,ismap:2,nomodule:2,novalidate:2,readonly:2,async:1,autofocus:1,autoplay:1,controls:1,default:1,defer:1,disabled:1,hidden:1,inert:1,loop:1,open:1,required:1,reversed:1,scoped:1,seamless:1,checked:1,muted:1,multiple:1,selected:1};function ts(t){return!!t||t===""}var ns=(t,e,n,o,r,s)=>{var a;if(o){s&&s.includes("camel")&&(o=_(o)),qt(t,o,e[0],r);return}let i=e.length;for(let c=0;c<i;++c){let l=e[c];if(w(l)){let f=(a=n==null?void 0:n[c])==null?void 0:a[0],u=l[0],p=l[1];qt(t,u,p,f)}else if(N(l))for(let f of Object.entries(l)){let u=f[0],p=f[1],h=n==null?void 0:n[c],g=h&&u in h?u:void 0;qt(t,u,p,g)}else{let f=n==null?void 0:n[c],u=e[c++],p=e[c];qt(t,u,p,f)}}},Rn={mount:()=>({update:({el:t,values:e,previousValues:n,option:o,previousOption:r,flags:s})=>{ns(t,e,n,o,r,s)}})},qt=(t,e,n,o)=>{if(o&&o!==e&&t.removeAttribute(o),me(e)){H(3,"r-bind",t);return}if(!W(e)){H(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){me(n)?t.removeAttributeNS(yo,e.slice(6,e.length)):t.setAttributeNS(yo,e,n);return}let r=e in es;me(n)||r&&!ts(n)?t.removeAttribute(e):t.setAttribute(e,r?"":n)};var os=(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=n==null?void 0:n[r];if(w(s)){let a=s.length;for(let c=0;c<a;++c)go(t,s[c],i==null?void 0:i[c])}else go(t,s,i)}},wn={mount:()=>({update:({el:t,values:e,previousValues:n})=>{os(t,e,n)}})},go=(t,e,n)=>{let o=t.classList,r=W(e),s=W(n);if(e&&!r){if(n&&!s)for(let i in n)(!(i in e)||!e[i])&&o.remove(i);for(let i in e)e[i]&&o.add(i)}else if(r){if(n!==e){let i=s?We(n):[],a=We(e);i.length>0&&o.remove(...i),a.length>0&&o.add(...a)}}else if(n){let i=s?We(n):[];i.length>0&&o.remove(...i)}};function rs(t,e){if(t.length!==e.length)return!1;let n=!0;for(let o=0;n&&o<t.length;o++)n=ve(t[o],e[o]);return n}function ve(t,e){if(t===e)return!0;let n=sn(t),o=sn(e);if(n||o)return n&&o?t.getTime()===e.getTime():!1;if(n=nt(t),o=nt(e),n||o)return t===e;if(n=w(t),o=w(e),n||o)return n&&o?rs(t,e):!1;if(n=N(t),o=N(e),n||o){if(!n||!o)return!1;let r=Object.keys(t).length,s=Object.keys(e).length;if(r!==s)return!1;for(let i in t){let a=Object.prototype.hasOwnProperty.call(t,i),c=Object.prototype.hasOwnProperty.call(e,i);if(a&&!c||!ve(t[i],e[i]))return!1}return!0}return String(t)===String(e)}function zt(t,e){return t.findIndex(n=>ve(n,e))}var bo=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var Sn=t=>{if(!C(t))throw $(3,"pause");t(void 0,void 0,3)};var vn=t=>{if(!C(t))throw $(3,"resume");t(void 0,void 0,4)};var xo={mount:({el:t,parseResult:e,flags:n})=>({update:({values:o})=>{ss(t,o[0])},unmount:is(t,e,n)})},ss=(t,e)=>{let n=wo(t);if(n&&Co(t))w(e)?e=zt(e,Ae(t))>-1:fe(e)?e=e.has(Ae(t)):e=ps(t,e),t.checked=e;else if(n&&Eo(t))t.checked=ve(e,Ae(t));else if(n||So(t))Ro(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(vo(t)){let o=t.options,r=o.length,s=t.multiple;for(let i=0;i<r;i++){let a=o[i],c=Ae(a);if(s)w(e)?a.selected=zt(e,c)>-1:a.selected=e.has(c);else if(ve(Ae(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else H(7,t)},lt=t=>(C(t)&&(t=t()),K(t)&&(t=t()),t?W(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}),Co=t=>t.type==="checkbox",Eo=t=>t.type==="radio",Ro=t=>t.type==="number"||t.type==="range",wo=t=>t.tagName==="INPUT",So=t=>t.tagName==="TEXTAREA",vo=t=>t.tagName==="SELECT",is=(t,e,n)=>{let o=e.value,r=lt(n==null?void 0:n.join(",")),s=lt(o()[1]),i={int:r.int||s.int,lazy:r.lazy||s.lazy,number:r.number||s.number,trim:r.trim||s.trim};if(!e.refs[0])return H(8,t),()=>{};let a=()=>e.refs[0],c=wo(t);return c&&Co(t)?cs(t,a):c&&Eo(t)?ms(t,a):c||So(t)?as(t,i,a,o):vo(t)?ds(t,a,o):(H(7,t),()=>{})},To=/[.,' ·٫]/,as=(t,e,n,o)=>{let s=e.lazy?"change":"input",i=Ro(t),a=()=>{!e.trim&&!lt(o()[1]).trim||(t.value=t.value.trim())},c=p=>{let h=p.target;h.composing=1},l=p=>{let h=p.target;h.composing&&(h.composing=0,h.dispatchEvent(new Event(s)))},f=()=>{t.removeEventListener(s,u),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",l),t.removeEventListener("change",l)},u=p=>{let h=n();if(!h)return;let g=p.target;if(!g||g.composing)return;let d=g.value,E=lt(o()[1]);if(i||E.number||E.int){if(E.int)d=parseInt(d);else{if(To.test(d[d.length-1])&&d.split(To).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(h()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else E.trim&&(d=d.trim());h(d)};return t.addEventListener(s,u),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",l),t.addEventListener("change",l),f},cs=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let i=Ae(t),a=t.checked,c=s();if(w(c)){let l=zt(c,i),f=l!==-1;a&&!f?c.push(i):!a&&f&&c.splice(l,1)}else fe(c)?a?c.add(i):c.delete(i):s(ls(t,a))};return t.addEventListener(n,r),o},Ae=t=>"_value"in t?t._value:t.value,Ao="trueValue",us="falseValue",No="true-value",fs="false-value",ls=(t,e)=>{let n=e?Ao:us;if(n in t)return t[n];let o=e?No:fs;return t.hasAttribute(o)?t.getAttribute(o):e},ps=(t,e)=>{if(Ao in t)return ve(e,t.trueValue);let o=No;return t.hasAttribute(o)?ve(e,t.getAttribute(o)):ve(e,!0)},ms=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let i=Ae(t);s(i)};return t.addEventListener(n,r),o},ds=(t,e,n)=>{let o="change",r=()=>{t.removeEventListener(o,s)},s=()=>{let i=e();if(!i)return;let c=lt(n()[1]).number,l=Array.prototype.filter.call(t.options,f=>f.selected).map(f=>c?bo(Ae(f)):Ae(f));if(t.multiple){let f=i();try{if(Sn(i),fe(f)){f.clear();for(let u of l)f.add(u)}else w(f)?(f.splice(0),f.push(...l)):i(l)}finally{vn(i),te(i)}}else i(l[0])};return t.addEventListener(o,s),r};var hs=["stop","prevent","capture","self","once","left","right","middle","passive"],ys=t=>{let e={};if(q(t))return;let n=t.split(",");for(let o of hs)e[o]=n.includes(o);return e},gs=(t,e,n,o,r)=>{var l,f;if(o){let u=e.value(),p=F(o.value()[0]);return W(p)?An(t,_(p),()=>e.value()[0],(l=r==null?void 0:r.join(","))!=null?l:u[1]):()=>{}}else if(n){let u=e.value();return An(t,_(n),()=>e.value()[0],(f=r==null?void 0:r.join(","))!=null?f:u[1])}let s=[],i=()=>{s.forEach(u=>u())},a=e.value(),c=a.length;for(let u=0;u<c;++u){let p=a[u];if(K(p)&&(p=p()),N(p))for(let h of Object.entries(p)){let g=h[0],d=()=>{let T=e.value()[u];return K(T)&&(T=T()),T=T[g],K(T)&&(T=T()),T},E=p[g+"_flags"];s.push(An(t,g,d,E))}else H(2,"r-on",t)}return i},Nn={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,mount:({el:t,parseResult:e,option:n,dynamicOption:o,flags:r})=>gs(t,e,n,o,r)},bs=(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 o=n[1],r=n.includes("ctrl"),s=n.includes("shift"),i=n.includes("alt"),a=n.includes("meta"),c=l=>!(r&&!l.ctrlKey||s&&!l.shiftKey||i&&!l.altKey||a&&!l.metaKey);return o?[t,l=>c(l)?l.key.toUpperCase()===o.toUpperCase():!1]:[t,c]}return[t,n=>!0]},An=(t,e,n,o)=>{if(q(e))return H(5,"r-on",t),()=>{};let r=ys(o),s=r?{capture:r.capture,passive:r.passive,once:r.once}:void 0,i;[e,i]=bs(e,o);let a=f=>{if(!i(f)||!n&&e==="submit"&&(r!=null&&r.prevent))return;let u=n(f);K(u)&&(u=u(f)),K(u)&&u(f)},c=()=>{t.removeEventListener(e,l,s)},l=f=>{if(!r){a(f);return}try{if(r.left&&f.button!==0||r.middle&&f.button!==1||r.right&&f.button!==2||r.self&&f.target!==t)return;r.stop&&f.stopPropagation(),r.prevent&&f.preventDefault(),a(f)}finally{r.once&&c()}};return t.addEventListener(e,l,s),c};var Ts=(t,e,n,o)=>{if(n){o&&o.includes("camel")&&(n=_(n)),Xe(t,n,e[0]);return}let r=e.length;for(let s=0;s<r;++s){let i=e[s];if(w(i)){let a=i[0],c=i[1];Xe(t,a,c)}else if(N(i))for(let a of Object.entries(i)){let c=a[0],l=a[1];Xe(t,c,l)}else{let a=e[s++],c=e[s];Xe(t,a,c)}}},Oo={mount:()=>({update:({el:t,values:e,option:n,flags:o})=>{Ts(t,e,n,o)}})};function xs(t){return!!t||t===""}var Xe=(t,e,n)=>{if(me(e)){H(3,":prop",t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(Ce),1),t[e]=n!=null?n:"";return}let o=t.tagName;if(e==="value"&&o!=="PROGRESS"&&!o.includes("-")){t._value=n;let s=o==="OPTION"?t.getAttribute("value"):t.value,i=n!=null?n:"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let r=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=xs(n):n==null&&s==="string"?(n="",r=!0):s==="number"&&(n=0,r=!0)}try{t[e]=n}catch(s){r||H(4,e,o,n,s)}r&&t.removeAttribute(e)};var Mo={once:!0,mount:({el:t,parseResult:e,expr:n})=>{let o=e,r=o.value()[0],s=w(r),i=o.refs[0];return s?r.push(t):i?i==null||i(t):o.context[n]=t,()=>{if(s){let a=r.indexOf(t);a!==-1&&r.splice(a,1)}else i==null||i(null)}}};var Cs=(t,e)=>{let n=Ue(t).data,o=n._ord;Kn(o)&&(o=n._ord=t.style.display),!!e[0]?t.style.display=o:t.style.display="none"},ko={mount:()=>({update:({el:t,values:e})=>{Cs(t,e)}})};var Es=(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=n==null?void 0:n[r];if(w(s)){let a=s.length;for(let c=0;c<a;++c)Lo(t,s[c],i==null?void 0:i[c])}else Lo(t,s,i)}},Kt={mount:()=>({update:({el:t,values:e,previousValues:n})=>{Es(t,e,n)}})},Lo=(t,e,n)=>{let o=t.style,r=W(e);if(e&&!r){if(n&&!W(n))for(let s in n)e[s]==null&&Mn(o,s,"");for(let s in e)Mn(o,s,e[s])}else{let s=o.display;if(r?n!==e&&(o.cssText=e):n&&t.removeAttribute("style"),"_ord"in Ue(t).data)return;o.display=s}},Io=/\s*!important$/;function Mn(t,e,n){if(w(n))n.forEach(o=>{Mn(t,e,o)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let o=Rs(t,e);Io.test(n)?t.setProperty(Ke(o),n.replace(Io,""),"important"):t[o]=n}}var Vo=["Webkit","Moz","ms"],On={};function Rs(t,e){let n=On[e];if(n)return n;let o=_(e);if(o!=="filter"&&o in t)return On[e]=o;o=at(o);for(let r=0;r<Vo.length;r++){let s=Vo[r]+o;if(s in t)return On[e]=s}return e}var ue=t=>Po(F(t)),Po=(t,e=new WeakMap)=>{if(!t||!N(t))return t;if(w(t))return t.map(ue);if(fe(t)){let o=new Set;for(let r of t.keys())o.add(ue(r));return o}if(Oe(t)){let o=new Map;for(let r of t)o.set(ue(r[0]),ue(r[1]));return o}if(e.has(t))return F(e.get(t));let n={...t};e.set(t,n);for(let o of Object.entries(n))n[o[0]]=Po(F(o[1]),e);return n};var ws=(t,e)=>{var o;let n=e[0];t.textContent=fe(n)?JSON.stringify(ue([...n])):Oe(n)?JSON.stringify(ue([...n])):N(n)?JSON.stringify(ue(n)):(o=n==null?void 0:n.toString())!=null?o:""},Do={mount:()=>({update:({el:t,values:e})=>{ws(t,e)}})};var Uo={mount:()=>({update:({el:t,values:e})=>{Xe(t,"value",e[0])}})};var Ve=class Ve{constructor(e){m(this,"B",{});m(this,"p",{});m(this,"lt",()=>Object.keys(this.B).filter(e=>e.length===1||!e.startsWith(":")));m(this,"Z",new Map);m(this,"_",new Map);m(this,"forGrowThreshold",10);m(this,"globalContext");m(this,"useInterpolation",!0);m(this,"propValidationMode","throw");if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.It()}static getDefault(){var e;return(e=Ve.je)!=null?e:Ve.je=new Ve}It(){let e={},n=globalThis;for(let o of Ve.Lt.split(","))e[o]=n[o];return e.ref=Se,e.sref=ce,e.flatten=ue,e}addComponent(...e){for(let n of e){if(!n.defaultName){Fe.warning("Registered component's default name is not defined",n);continue}this.Z.set(at(n.defaultName),n),this._.set(at(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.B={".":Oo,":":Rn,"@":Nn,[`${e}on`]:Nn,[`${e}bind`]:Rn,[`${e}html`]:Ht,[`${e}text`]:Do,[`${e}show`]:ko,[`${e}model`]:xo,":style":Kt,[`${e}style`]:Kt,[`${e}bind:style`]:Kt,":class":wn,[`${e}bind:class`]:wn,":ref":Mo,":value":Uo,[`${e}teleport`]:Ot},this.p={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,context:":context",contextAlias:`${e}context`,bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.B,this.p)}};m(Ve,"je"),m(Ve,"Lt","Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console");var ye=Ve;var Wt=(t,e)=>{if(!t)return;let o=(e!=null?e:ye.getDefault()).p,r=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of vs(t,o.pre,s))Ss(i,o.text,r,s)},Ss=(t,e,n,o)=>{var c;let r=t.textContent;if(!r)return;let s=n,i=r.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],f=Ho(l,o);if(f&&q(i[0])&&q(i[2])){let u=t.parentElement;u.setAttribute(e,l.substring(f.start.length,l.length-f.end.length)),u.innerText="";return}}let a=document.createDocumentFragment();for(let l of i){let f=Ho(l,o);if(f){let u=document.createElement("span");u.setAttribute(e,l.substring(f.start.length,l.length-f.end.length)),a.appendChild(u)}else a.appendChild(document.createTextNode(l))}t.replaceWith(a)},vs=(t,e,n)=>{let o=[],r=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)})&&o.push(s);else{if((i=s==null?void 0:s.hasAttribute)!=null&&i.call(s,e))return;for(let a of we(s))r(a)}};return r(t),o},Ho=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var As=9,Ns=10,Os=13,Ms=32,Ne=46,Gt=44,ks=39,Ls=34,Jt=40,Ye=41,Qt=91,kn=93,Ln=63,Is=59,Bo=58,jo=123,Xt=125,Be=43,Yt=45,In=96,$o=47,Vn=92,_o=new Set([2,3]),Go={"=":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},Vs={"=>":2,...Go,"||":3,"??":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"/":12,"%":12,"**":13},Jo=Object.keys(Go),Ps=new Set(Jo),Dn=new Set(["=>"]);Jo.forEach(t=>Dn.add(t));var Fo={true:!0,false:!1,null:null},Ds="this",Ze="Expected ",je="Unexpected ",Hn="Unclosed ",Us=Ze+":",qo=Ze+"expression",Hs="missing }",Bs=je+"object property",js=Hn+"(",zo=Ze+"comma",Ko=je+"token ",$s=je+"period",Pn=Ze+"expression after ",_s="missing unaryOp argument",Fs=Hn+"[",qs=Ze+"exponent (",zs="Variable names cannot start with a number (",Ks=Hn+'quote after "',pt=t=>t>=48&&t<=57,Wo=t=>Vs[t],Un=class{constructor(e){m(this,"u");m(this,"e");this.u=e,this.e=0}get H(){return this.u.charAt(this.e)}get h(){return this.u.charCodeAt(this.e)}f(e){return this.u.charCodeAt(this.e)===e}K(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95||e>=128}le(e){return this.K(e)||pt(e)}i(e){return new Error(`${e} at character ${this.e}`)}g(){let e=this.h,n=this.u,o=this.e;for(;e===Ms||e===As||e===Ns||e===Os;)e=n.charCodeAt(++o);this.e=o}parse(){let e=this.fe();return e.length===1?e[0]:{type:0,body:e}}fe(e){let n=[];for(;this.e<this.u.length;){let o=this.h;if(o===Is||o===Gt)this.e++;else{let r=this.S();if(r)n.push(r);else if(this.e<this.u.length){if(o===e)break;throw this.i(je+'"'+this.H+'"')}}}return n}S(){var n;let e=(n=this.Pt())!=null?n:this.$e();return this.g(),this.Dt(e)}de(){this.g();let e=this.u,n=this.e,o=e.charCodeAt(n),r=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);if(isNaN(o))return!1;let a=!1,c=0;return o===62&&r===62&&s===62&&i===61?(a=">>>=",c=4):o===61&&r===61&&s===61?(a="===",c=3):o===33&&r===61&&s===61?(a="!==",c=3):o===62&&r===62&&s===62?(a=">>>",c=3):o===60&&r===60&&s===61?(a="<<=",c=3):o===62&&r===62&&s===61?(a=">>=",c=3):o===42&&r===42&&s===61?(a="**=",c=3):o===61&&r===62?(a="=>",c=2):o===124&&r===124?(a="||",c=2):o===63&&r===63?(a="??",c=2):o===38&&r===38?(a="&&",c=2):o===61&&r===61?(a="==",c=2):o===33&&r===61?(a="!=",c=2):o===60&&r===61?(a="<=",c=2):o===62&&r===61?(a=">=",c=2):o===60&&r===60?(a="<<",c=2):o===62&&r===62?(a=">>",c=2):o===43&&r===61?(a="+=",c=2):o===45&&r===61?(a="-=",c=2):o===42&&r===61?(a="*=",c=2):o===47&&r===61?(a="/=",c=2):o===37&&r===61?(a="%=",c=2):o===38&&r===61?(a="&=",c=2):o===94&&r===61?(a="^=",c=2):o===124&&r===61?(a="|=",c=2):o===42&&r===42?(a="**",c=2):o===105&&r===110?this.le(e.charCodeAt(n+2))||(a="in",c=2):o===61?(a="=",c=1):o===124?(a="|",c=1):o===94?(a="^",c=1):o===38?(a="&",c=1):o===60?(a="<",c=1):o===62?(a=">",c=1):o===43?(a="+",c=1):o===45?(a="-",c=1):o===42?(a="*",c=1):o===47?(a="/",c=1):o===37&&(a="%",c=1),a?(this.e+=c,a):!1}$e(){let e,n,o,r,s,i,a,c;if(s=this.z(),!s||(n=this.de(),!n))return s;if(r={value:n,prec:Wo(n),right_a:Dn.has(n)},i=this.z(),!i)throw this.i(Pn+n);let l=[s,r,i];for(;n=this.de();){o=Wo(n),r={value:n,prec:o,right_a:Dn.has(n)},c=n;let f=u=>r.right_a&&u.right_a?o>u.prec:o<=u.prec;for(;l.length>2&&f(l[l.length-2]);)i=l.pop(),n=l.pop().value,s=l.pop(),e=this._e(n,s,i),l.push(e);if(e=this.z(),!e)throw this.i(Pn+c);l.push(r,e)}for(a=l.length-1,e=l[a];a>1;)e=this._e(l[a-1].value,l[a-2],e),a-=2;return e}z(){let e;if(this.g(),e=this.Ut(),e)return this.me(e);let n=this.h;if(pt(n)||n===Ne)return this.Bt();if(n===ks||n===Ls)e=this.Ht();else if(n===Qt)e=this.jt();else{let o=this.$t();if(o){let r=this.z();if(!r)throw this.i(_s);return this.me({type:7,operator:o,argument:r})}this.K(n)?(e=this.ye(),e.name in Fo?e={type:4,value:Fo[e.name],raw:e.name}:e.name===Ds&&(e={type:5})):n===Jt&&(e=this._t())}return e?(e=this.W(e),this.me(e)):!1}_e(e,n,o){if(e==="=>"){let r=n.type===1?n.expressions:[n];return{type:15,params:r,body:o}}return Ps.has(e)?{type:16,operator:e,left:n,right:o}:{type:8,operator:e,left:n,right:o}}Ut(){let e={node:!1};return this.Ft(e),e.node||(this.qt(e),e.node)||(this.Kt(e),e.node)||(this.Fe(e),e.node)||this.zt(e),e.node}me(e){let n={node:e};return this.Wt(n),this.Gt(n),this.Jt(n),n.node}$t(){let e=this.u,n=this.e,o=e.charCodeAt(n),r=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);return o===Yt?(this.e++,"-"):o===33?(this.e++,"!"):o===126?(this.e++,"~"):o===Be?(this.e++,"+"):o===110&&r===101&&s===119&&!this.le(i)?(this.e+=3,"new"):!1}Pt(){let e={};return this.Qt(e),e.node}Dt(e){let n={node:e};return this.Xt(n),n.node}W(e){this.g();let n=this.h;for(;n===Ne||n===Qt||n===Jt||n===Ln;){let o;if(n===Ln){if(this.u.charCodeAt(this.e+1)!==Ne)break;o=!0,this.e+=2,this.g(),n=this.h}if(this.e++,n===Qt){if(e={type:3,computed:!0,object:e,property:this.S()},this.g(),n=this.h,n!==kn)throw this.i(Fs);this.e++}else n===Jt?e={type:6,arguments:this.qe(Ye),callee:e}:(o&&this.e--,this.g(),e={type:3,computed:!1,object:e,property:this.ye()});o&&(e.optional=!0),this.g(),n=this.h}return e}Bt(){let e=this.u,n=this.e,o=n;for(;pt(e.charCodeAt(o));)o++;if(e.charCodeAt(o)===Ne)for(o++;pt(e.charCodeAt(o));)o++;let r=e.charCodeAt(o);if(r===101||r===69){o++;let a=e.charCodeAt(o);(a===Be||a===Yt)&&o++;let c=o;for(;pt(e.charCodeAt(o));)o++;if(c===o){this.e=o;let l=e.slice(n,o);throw this.i(qs+l+this.H+")")}}this.e=o;let s=e.slice(n,o),i=e.charCodeAt(o);if(this.K(i))throw this.i(zs+s+this.H+")");if(i===Ne||s.length===1&&s.charCodeAt(0)===Ne)throw this.i($s);return{type:4,value:parseFloat(s),raw:s}}Ht(){let e=this.u,n=e.length,o=this.e,r=e.charCodeAt(this.e++),s=this.e,i=s,a=[],c=!1,l=!1;for(;s<n;){let u=e.charCodeAt(s);if(u===r){l=!0,this.e=s+1;break}if(u===Vn){c||(c=!0),a.push(e.slice(i,s));let p=e.charCodeAt(s+1);a.push(this.Ke(p)),s+=2,i=s}else s++}let f=c?a.join("")+e.slice(i,l?s:n):e.slice(i,l?s:n);if(!l)throw this.e=s,this.i(Ks+f+'"');return{type:4,value:f,raw:e.substring(o,this.e)}}Ke(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)}}ye(){let e=this.h,n=this.e;if(this.K(e))this.e++;else throw this.i(je+this.H);for(;this.e<this.u.length&&(e=this.h,this.le(e));)this.e++;return{type:2,name:this.u.slice(n,this.e)}}qe(e){let n=[],o=!1,r=0;for(;this.e<this.u.length;){this.g();let s=this.h;if(s===e){if(o=!0,this.e++,e===Ye&&r&&r>=n.length)throw this.i(Ko+String.fromCharCode(e));break}else if(s===Gt){if(this.e++,r++,r!==n.length){if(e===Ye)throw this.i(Ko+",");for(let i=n.length;i<r;i++)n.push(null)}}else{if(n.length!==r&&r!==0)throw this.i(zo);{let i=this.S();if(!i||i.type===0)throw this.i(zo);n.push(i)}}}if(!o)throw this.i(Ze+String.fromCharCode(e));return n}_t(){this.e++;let e=this.fe(Ye);if(this.f(Ye))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(js)}jt(){return this.e++,{type:9,elements:this.qe(kn)}}Ft(e){if(this.f(jo)){this.e++;let n=[];for(;!isNaN(this.h);){if(this.g(),this.f(Xt)){this.e++,e.node=this.W({type:10,properties:n});return}let o=this.S();if(!o)break;if(this.g(),o.type===2&&(this.f(Gt)||this.f(Xt)))n.push({type:12,computed:!1,key:o,value:o,shorthand:!0});else if(this.f(Bo)){this.e++;let r=this.S();if(!r)throw this.i(Bs);let s=o.type===9;n.push({type:12,computed:s,key:s?o.elements[0]:o,value:r,shorthand:!1}),this.g()}else n.push(o);this.f(Gt)&&this.e++}throw this.i(Hs)}}qt(e){let n=this.h;if((n===Be||n===Yt)&&n===this.u.charCodeAt(this.e+1)){this.e+=2;let o=e.node={type:13,operator:n===Be?"++":"--",argument:this.W(this.ye()),prefix:!0};if(!o.argument||!_o.has(o.argument.type))throw this.i(je+o.operator)}}Gt(e){let n=e.node,o=this.h;if((o===Be||o===Yt)&&o===this.u.charCodeAt(this.e+1)){if(!_o.has(n.type))throw this.i(je+(o===Be?"++":"--"));this.e+=2,e.node={type:13,operator:o===Be?"++":"--",argument:n,prefix:!1}}}Kt(e){this.u.charCodeAt(this.e)===Ne&&this.u.charCodeAt(this.e+1)===Ne&&this.u.charCodeAt(this.e+2)===Ne&&(this.e+=3,e.node={type:14,argument:this.S()})}Xt(e){if(e.node&&this.f(Ln)){this.e++;let n=e.node,o=this.S();if(!o)throw this.i(qo);if(this.g(),this.f(Bo)){this.e++;let r=this.S();if(!r)throw this.i(qo);e.node={type:11,test:n,consequent:o,alternate:r}}else throw this.i(Us)}}Qt(e){if(this.g(),this.f(Jt)){let n=this.e;if(this.e++,this.g(),this.f(Ye)){this.e++;let o=this.de();if(o==="=>"){let r=this.$e();if(!r)throw this.i(Pn+o);e.node={type:15,params:null,body:r};return}}this.e=n}}Jt(e){let n=e.node,o=n.type;(o===2||o===3)&&this.f(In)&&(e.node={type:17,tag:n,quasi:this.Fe(e)})}Fe(e){if(!this.f(In))return;let n=this.u,o=n.length,r={type:19,quasis:[],expressions:[]},s=++this.e,i=[],a=[],c=!1,l=f=>{if(!c){let h=n.slice(s,this.e);return r.quasis.push({type:18,value:{raw:h,cooked:h},tail:f})}i.push(n.slice(s,this.e)),a.push(n.slice(s,this.e));let u=i.join(""),p=a.join("");return i.length=0,a.length=0,c=!1,r.quasis.push({type:18,value:{raw:u,cooked:p},tail:f})};for(;this.e<o;){let f=n.charCodeAt(this.e);if(f===In)return l(!0),this.e+=1,e.node=r,r;if(f===36&&n.charCodeAt(this.e+1)===jo){if(l(!1),this.e+=2,r.expressions.push(...this.fe(Xt)),!this.f(Xt))throw this.i("unclosed ${");this.e+=1,s=this.e}else if(f===Vn){c||(c=!0),i.push(n.slice(s,this.e)),a.push(n.slice(s,this.e));let u=n.charCodeAt(this.e+1);i.push(n.slice(this.e,this.e+2)),a.push(this.Ke(u)),this.e+=2,s=this.e}else this.e+=1}throw this.i("Unclosed `")}Wt(e){let n=e.node;if(!n||n.operator!=="new"||!n.argument)return;if(!n.argument||![6,3].includes(n.argument.type))throw this.i("Expected new function()");e.node=n.argument;let o=e.node;for(;o.type===3||o.type===6&&o.callee.type===3;)o=o.type===3?o.object:o.callee.object;o.type=20}zt(e){if(!this.f($o))return;let n=++this.e,o=!1;for(;this.e<this.u.length;){if(this.h===$o&&!o){let r=this.u.slice(n,this.e),s="";for(;++this.e<this.u.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(r,s)}catch(a){throw this.i(a.message)}return e.node={type:4,value:i,raw:this.u.slice(n-1,this.e)},e.node=this.W(e.node),e.node}this.f(Qt)?o=!0:o&&this.f(kn)&&(o=!1),this.e+=this.f(Vn)?2:1}throw this.i("Unclosed Regex")}},Qo=t=>new Un(t).parse();var Ws={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(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)=>t**e},Gs={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},er=t=>{if(!(t!=null&&t.some(Zo)))return t;let e=[];return t.forEach(n=>Zo(n)?e.push(...n):e.push(n)),e},Xo=(...t)=>er(t),Bn=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},Js={"++":(t,e)=>{let n=t[e];if(C(n)){let o=n();return n(++o),o}return++t[e]},"--":(t,e)=>{let n=t[e];if(C(n)){let o=n();return n(--o),o}return--t[e]}},Qs={"++":(t,e)=>{let n=t[e];if(C(n)){let o=n();return n(o+1),o}return t[e]++},"--":(t,e)=>{let n=t[e];if(C(n)){let o=n();return n(o-1),o}return t[e]--}},Yo={"=":(t,e,n)=>{let o=t[e];return C(o)?o(n):t[e]=n},"+=":(t,e,n)=>{let o=t[e];return C(o)?o(o()+n):t[e]+=n},"-=":(t,e,n)=>{let o=t[e];return C(o)?o(o()-n):t[e]-=n},"*=":(t,e,n)=>{let o=t[e];return C(o)?o(o()*n):t[e]*=n},"/=":(t,e,n)=>{let o=t[e];return C(o)?o(o()/n):t[e]/=n},"%=":(t,e,n)=>{let o=t[e];return C(o)?o(o()%n):t[e]%=n},"**=":(t,e,n)=>{let o=t[e];return C(o)?o(o()**n):t[e]**=n},"<<=":(t,e,n)=>{let o=t[e];return C(o)?o(o()<<n):t[e]<<=n},">>=":(t,e,n)=>{let o=t[e];return C(o)?o(o()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let o=t[e];return C(o)?o(o()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let o=t[e];return C(o)?o(o()|n):t[e]|=n},"&=":(t,e,n)=>{let o=t[e];return C(o)?o(o()&n):t[e]&=n},"^=":(t,e,n)=>{let o=t[e];return C(o)?o(o()^n):t[e]^=n}},Zt=(t,e)=>K(t)?t.bind(e):t,jn=class{constructor(e,n,o,r,s){m(this,"l");m(this,"ze");m(this,"We");m(this,"Ge");m(this,"A");m(this,"Je");m(this,"Qe");this.l=w(e)?e:[e],this.ze=n,this.We=o,this.Ge=r,this.Qe=!!s}Xe(e,n){if(n&&e in n)return n;for(let o of this.l)if(e in o)return o}2(e,n,o){let r=e.name;if(r==="$root")return this.l[this.l.length-1];if(r==="$parent")return this.l[1];if(r==="$ctx")return[...this.l];if(o&&r in o)return this.A=o[r],Zt(F(o[r]),o);for(let i of this.l)if(r in i)return this.A=i[r],Zt(F(i[r]),i);let s=this.ze;if(s&&r in s)return this.A=s[r],Zt(F(s[r]),s)}5(e,n,o){return this.l[0]}0(e,n,o){return this.Ye(n,o,Xo,...e.body)}1(e,n,o){return this.C(n,o,(...r)=>r.pop(),...e.expressions)}3(e,n,o){let{obj:r,key:s}=this.he(e,n,o),i=r==null?void 0:r[s];return this.A=i,Zt(F(i),r)}4(e,n,o){return e.value}6(e,n,o){let r=(i,...a)=>K(i)?i(...er(a)):i,s=this.C(++n,o,r,e.callee,...e.arguments);return this.A=s,s}7(e,n,o){return this.C(n,o,Gs[e.operator],e.argument)}8(e,n,o){let r=Ws[e.operator];switch(e.operator){case"||":case"&&":case"??":return r(()=>this.b(e.left,n,o),()=>this.b(e.right,n,o))}return this.C(n,o,r,e.left,e.right)}9(e,n,o){return this.Ye(++n,o,Xo,...e.elements)}10(e,n,o){let r={},s=(...i)=>{i.forEach(a=>{Object.assign(r,a)})};return this.C(++n,o,s,...e.properties),r}11(e,n,o){return this.C(n,o,r=>this.b(r?e.consequent:e.alternate,n,o),e.test)}12(e,n,o){var f;let r={},s=u=>(u==null?void 0:u.type)!==15,i=(f=this.Ge)!=null?f:()=>!1,a=n===0&&this.Qe,c=u=>this.Ze(a,e.key,n,Bn(u,o)),l=u=>this.Ze(a,e.value,n,Bn(u,o));if(e.shorthand){let u=e.key.name;r[u]=s(e.key)&&i(u,n)?c:c()}else if(e.computed){let u=F(c());r[u]=s(e.value)&&i(u,n)?l:l()}else{let u=e.key.type===4?e.key.value:e.key.name;r[u]=s(e.value)&&i(u,n)?()=>l:l()}return r}he(e,n,o){let r=this.b(e.object,n,o),s=e.computed?this.b(e.property,n,o):e.property.name;return{obj:r,key:s}}13(e,n,o){let r=e.argument,s=e.operator,i=e.prefix?Js:Qs;if(r.type===2){let a=r.name,c=this.Xe(a,o);return me(c)?void 0:i[s](c,a)}if(r.type===3){let{obj:a,key:c}=this.he(r,n,o);return i[s](a,c)}}16(e,n,o){let r=e.left,s=e.operator;if(r.type===2){let i=r.name,a=this.Xe(i,o);if(me(a))return;let c=this.b(e.right,n,o);return Yo[s](a,i,c)}if(r.type===3){let{obj:i,key:a}=this.he(r,n,o),c=this.b(e.right,n,o);return Yo[s](i,a,c)}}14(e,n,o){let r=this.b(e.argument,n,o);return w(r)&&(r.s=tr),r}17(e,n,o){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,o)}19(e,n,o){let r=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.C(n,o,r,...e.expressions)}18(e,n,o){return e.value.cooked}20(e,n,o){let r=(s,...i)=>new s(...i);return this.C(n,o,r,e.callee,...e.arguments)}15(e,n,o){return(...r)=>{let s=Object.create(o!=null?o:{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=r[a++]}return this.b(e.body,n,s)}}b(e,n,o){let r=F(this[e.type](e,n,o));return this.Je=e.type,r}Ze(e,n,o,r){let s=this.b(n,o,r);return e&&this.et()?this.A:s}et(){let e=this.Je;return(e===2||e===3||e===6)&&C(this.A)}eval(e,n){let{value:o,refs:r}=Tn(()=>this.b(e,-1,n)),s={value:o,refs:r};return this.et()&&(s.ref=this.A),s}C(e,n,o,...r){let s=r.map(i=>i&&this.b(i,e,n));return o(...s)}Ye(e,n,o,...r){let s=this.We;if(!s)return this.C(e,n,o,...r);let i=r.map((a,c)=>a&&(a.type!==15&&s(c,e)?l=>this.b(a,e,Bn(l,n)):this.b(a,e,n)));return o(...i)}},tr=Symbol("s"),Zo=t=>(t==null?void 0:t.s)===tr,nr=(t,e,n,o,r,s,i)=>new jn(e,n,o,r,i).eval(t,s);var or={},rr=t=>!!t,en=class{constructor(e,n){m(this,"l");m(this,"r");m(this,"tt",[]);this.l=e,this.r=n}w(e){this.l=[e,...this.l]}ee(){return this.l.map(n=>n.components).filter(rr).reverse().reduce((n,o)=>{for(let[r,s]of Object.entries(o))n[r.toUpperCase()]=s;return n},{})}ut(){let e=[],n=new Set,o=this.l.map(r=>r.components).filter(rr).reverse();for(let r of o)for(let s of Object.keys(r))n.has(s)||(n.add(s),e.push(s));return e}V(e,n,o,r,s){var T;let i=[],a=[],c=new Set,l=()=>{for(let R=0;R<a.length;++R)a[R]();a.length=0},p={value:()=>i,stop:()=>{l(),c.clear()},subscribe:(R,k)=>(c.add(R),k&&R(i),()=>{c.delete(R)}),refs:[],context:this.l[0]};if(q(e))return p;let h=this.r.globalContext,g=[],d=new Set,E=(R,k,X,P)=>{try{let U=nr(R,k,h,n,o,P,r);return X&&U.refs.length>0&&g.push(...U.refs),{value:U.value,refs:U.refs,ref:U.ref}}catch(U){H(6,`evaluation error: ${e}`,U)}return{value:void 0,refs:[]}};try{let R=(T=or[e])!=null?T:Qo("["+e+"]");or[e]=R;let k=this.l.slice(),X=R.elements,P=X.length,U=new Array(P);p.refs=U;let le=()=>{g.length=0,s||(d.clear(),l());let Y=new Array(P);for(let L=0;L<P;++L){let b=X[L];if(n!=null&&n(L,-1)){Y[L]=B=>E(b,k,!1,{$event:B}).value;continue}let O=E(b,k,!0);Y[L]=O.value,U[L]=O.ref}if(!s)for(let L of g)d.has(L)||(d.add(L),a.push(ie(L,le)));if(i=Y,c.size!==0)for(let L of c)c.has(L)&&L(i)};le()}catch(R){H(6,`parse error: ${e}`,R)}return p}L(){return this.l.slice()}ce(e){this.tt.push(this.l),this.l=e}E(e,n){try{this.ce(e),n()}finally{this.Yt()}}Yt(){var e;this.l=(e=this.tt.pop())!=null?e:[]}};var sr=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},Xs=(t,e)=>{let n="";for(let o=e;o<t.length;++o){let r=t[o];if(n){r===n&&(n="");continue}if(r==='"'||r==="'"){n=r;continue}if(r===">")return o}return-1},Ys=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
3
- `);)++n;if(n>=t.length||!sr(t[n]))return null;let o=n;for(;n<t.length&&sr(t[n]);)++n;return{start:o,end:n}},ir=new Set(["table","thead","tbody","tfoot"]),Zs=new Set(["thead","tbody","tfoot"]),ei=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),ti=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),ar=(t,e)=>`${t.slice(0,t.length-2)}></${e}>`,tn=t=>{var s;let e=0,n=[],o=[],r=0;for(;e<t.length;){let i=t.indexOf("<",e);if(i===-1){n.push(t.slice(e));break}if(n.push(t.slice(e,i)),t.startsWith("<!--",i)){let T=t.indexOf("-->",i+4);if(T===-1){n.push(t.slice(i));break}n.push(t.slice(i,T+3)),e=T+3;continue}let a=Xs(t,i);if(a===-1){n.push(t.slice(i));break}let c=t.slice(i,a+1),l=c.startsWith("</");if(c.startsWith("<!")||c.startsWith("<?")){n.push(c),e=a+1;continue}let u=Ys(c,l);if(!u){n.push(c),e=a+1;continue}let p=c.slice(u.start,u.end);if(l){let T=o[o.length-1];T?(o.pop(),n.push(T.replacementHost?`</${T.replacementHost}>`:c),ir.has(T.effectiveTag)&&--r):n.push(c),e=a+1;continue}let h=c.charCodeAt(c.length-2)===47,g=o[o.length-1],d=null;r===0?p==="tr"?d="trx":p==="td"?d="tdx":p==="th"&&(d="thx"):Zs.has((s=g==null?void 0:g.effectiveTag)!=null?s:"")?d=p==="tr"?null:"tr":(g==null?void 0:g.effectiveTag)==="table"?d=ei.has(p)?null:"tr":(g==null?void 0:g.effectiveTag)==="tr"&&(d=p==="td"||p==="th"?null:"td");let E=h&&!ti.has(d||p);if(d){let T=d==="trx"||d==="tdx"||d==="thx",R=`${c.slice(0,u.start)}${d} is="${T?`r-${p}`:`regor:${p}`}"${c.slice(u.end)}`;n.push(E?ar(R,d):R)}else n.push(E?ar(c,p):c);if(!h){let T=d==="trx"?"tr":d==="tdx"?"td":d==="thx"?"th":d||p;o.push({replacementHost:d,effectiveTag:T}),ir.has(T)&&++r}e=a+1}return n.join("")};var ni="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",oi=new Set(ni.toUpperCase().split(",")),ri="http://www.w3.org/2000/svg",cr=(t,e)=>{de(t)?t.content.appendChild(e):t.appendChild(e)},$n=(t,e,n,o)=>{var i;let r=t.t;if(r){let a=n&&oi.has(r.toUpperCase())?document.createElementNS(ri,r.toLowerCase()):document.createElement(r),c=t.a;if(c)for(let f of Object.entries(c)){let u=f[0],p=f[1];u.startsWith("#")&&(p=u.substring(1),u="name"),a.setAttribute(Nt(u,o),p)}let l=t.c;if(l)for(let f of l)$n(f,a,n,o);cr(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)cr(e,a);else throw new Error("unsupported node type.")}},et=(t,e,n)=>{n!=null||(n=ye.getDefault());let o=document.createDocumentFragment();if(!w(t))return $n(t,o,!!e,n),o;for(let r of t)$n(r,o,!!e,n);return o};var si=(t,e={selector:"#app"},n)=>{W(e)&&(e={selector:"#app",template:e}),io(t)&&(t=t.context);let o=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!o||!Ee(o))throw $(0);n||(n=ye.getDefault());let r=()=>{for(let a of[...o.childNodes])Q(a)},s=a=>{for(let c of a)o.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(tn(e.template));r(),s(a.childNodes),e.element=a}else if(e.json){let a=et(e.json,e.isSVG,n);r(),s(a.childNodes)}return n.useInterpolation&&Wt(o,n),new _n(t,o,n).y(),G(o,()=>{Me(t)}),Mt(t),{context:t,unmount:()=>{Q(o)},unbind:()=>{Ce(o)}}},_n=class{constructor(e,n,o){m(this,"Zt");m(this,"nt");m(this,"r");m(this,"m");m(this,"o");this.Zt=e,this.nt=n,this.r=o,this.m=new en([e],o),this.o=new Ft(this.m)}y(){this.o.$(this.nt)}};var mt=t=>{if(w(t))return t.map(r=>mt(r));let e={};if(t.tagName)e.t=t.tagName;else return t.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),t.textContent&&(e.d=t.textContent),e;let n=t.getAttributeNames();n.length>0&&(e.a=Object.fromEntries(n.map(r=>{var s;return[r,(s=t.getAttribute(r))!=null?s:""]})));let o=we(t);return o.length>0&&(e.c=[...o].map(r=>mt(r))),e};var ii=(t,e={})=>{var s,i,a,c,l,f;w(e)&&(e={props:e}),W(t)&&(t={template:t});let n=(s=e.context)!=null?s:()=>({}),o=!1;if(t.element){let u=t.element;u.remove(),t.element=u}else if(t.selector){let u=document.querySelector(t.selector);if(!u)throw $(1,t.selector);u.remove(),t.element=u}else if(t.template){let u=document.createRange().createContextualFragment(tn(t.template));t.element=u}else t.json&&(t.element=et(t.json,t.isSVG,e.config),o=!0);t.element||(t.element=document.createDocumentFragment()),((i=e.useInterpolation)==null||i)&&Wt(t.element,(a=e.config)!=null?a:ye.getDefault());let r=t.element;if(!o&&(((l=t.isSVG)!=null?l:it(r)&&((c=r.hasAttribute)!=null&&c.call(r,"isSVG")))||it(r)&&r.querySelector("[isSVG]"))){let u=r.content,p=u?[...u.childNodes]:[...r.childNodes],h=mt(p);t.element=et(h,!0,e.config)}return{context:n,template:t.element,inheritAttrs:(f=e.inheritAttrs)!=null?f:!0,props:e.props,defaultName:e.defaultName}};var Fn=class{constructor(){m(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=De())==null||e.onMounted.push(t)};var ci=t=>{let e,n={},o=(...r)=>{if(r.length<=2&&0 in r)throw $(4);return e&&!n.isStopped?e(...r):(e=ui(t,n),e(...r))};return o[ee]=1,Ie(o,!0),o.stop=()=>{var r,s;return(s=(r=n.ref)==null?void 0:r.stop)==null?void 0:s.call(r)},re(()=>o.stop(),!0),o},ui=(t,e)=>{var s;let n=(s=e.ref)!=null?s:ce(null);e.ref=n,e.isStopped=!1;let o=0,r=Je(()=>{if(o>0){r(),e.isStopped=!0,te(n);return}n(t()),++o});return n.stop=r,n};var fi=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw $(4);return o&&!n.isStopped?o(...s):(o=li(t,e,n),o(...s))};return r[ee]=1,Ie(r,!0),r.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},re(()=>r.stop(),!0),r},li=(t,e,n)=>{var a;let o=(a=n.ref)!=null?a:ce(null);n.ref=o,n.isStopped=!1;let r=0,s=c=>{if(r>0){o.stop(),n.isStopped=!0,te(o);return}let l=t.map(f=>f());o(e(...l)),++r},i=[];for(let c of t){let l=ie(c,s);i.push(l)}return s(null),o.stop=()=>{i.forEach(c=>{c()})},o};var pi=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw $(4);return o&&!n.isStopped?o(...s):(o=mi(t,e,n),o(...s))};return r[ee]=1,Ie(r,!0),r.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},re(()=>r.stop(),!0),r},mi=(t,e,n)=>{var s;let o=(s=n.ref)!=null?s:ce(null);n.ref=o,n.isStopped=!1;let r=0;return o.stop=ie(t,i=>{if(r>0){o.stop(),n.isStopped=!0,te(o);return}o(e(i)),++r},!0),o};var di=t=>(t[xt]=1,t);var hi=(t,e)=>{if(!e)throw $(5);let o=Ge(t)?Se:a=>a,r=()=>localStorage.setItem(e,JSON.stringify(ue(t()))),s=localStorage.getItem(e);if(s!=null)try{t(o(JSON.parse(s)))}catch(a){H(6,`persist: failed to parse data for key ${e}`,a),r()}else r();let i=Je(r);return re(i,!0),t};var qn=(t,...e)=>{let n="",o=t,r=e,s=o.length,i=r.length;for(let a=0;a<s;++a)n+=o[a],a<i&&(n+=r[a]);return n},yi=qn,gi=qn;var bi=(t,e,n)=>{let o=[],r=()=>{e(t.map(i=>i()))};for(let i of t)o.push(ie(i,r));n&&r();let s=()=>{for(let i of o)i()};return re(s,!0),s};var Ti=t=>{if(!C(t))throw $(3,"observerCount");return t(void 0,void 0,2)};var xi=t=>{ur();try{t()}finally{fr()}},ur=()=>{Te.stack||(Te.stack=[]),Te.stack.push(new Set)},fr=()=>{let t=Te.stack;if(!t||t.length===0)return;let e=t.pop();if(t.length){let n=t[t.length-1];for(let o of e)n.add(o);return}delete Te.stack;for(let n of e)try{te(n)}catch(o){console.error(o)}};export{rt as ComponentHead,Fn as ContextRegistry,ye as RegorConfig,G as addUnbinder,xi as batch,Tn as collectRefs,fi as computeMany,pi as computeRef,ci as computed,si as createApp,ii as defineComponent,dr as drainUnbind,fr as endBatch,ct as entangle,ue as flatten,Ue as getBindData,qn as html,Ge as isDeepRef,ut as isRaw,C as isRef,di as markRaw,ie as observe,bi as observeMany,Ti as observerCount,ai as onMounted,re as onUnmounted,Sn as pause,hi as persist,Lr as pval,yi as raw,Se as ref,Q as removeNode,vn as resume,bn as silence,ce as sref,ur as startBatch,gi as svg,et as toFragment,mt as toJsonTemplate,te as trigger,Ce as unbind,F as unref,yn as useScope,Fe as warningHandler,Je as watchEffect};
1
+ var pr=Object.defineProperty;var mr=(t,e,n)=>e in t?pr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var m=(t,e,n)=>mr(t,typeof e!="symbol"?e+"":e,n);var $e=Symbol(":regor");var Ce=t=>{let e=[t];for(let n=0;n<e.length;++n){let o=e[n];dr(o);for(let r=o.lastChild;r!=null;r=r.previousSibling)e.push(r)}},dr=t=>{let e=t[$e];if(!e)return;let n=e.unbinders;for(let o=0;o<n.length;++o)n[o]();n.length=0,t[$e]=void 0};var _e=[],yt=!1,gt,Kn=()=>{if(yt=!1,gt=void 0,_e.length!==0){for(let t=0;t<_e.length;++t)Ce(_e[t]);_e.length=0}},Q=t=>{t.remove(),_e.push(t),yt||(yt=!0,gt=setTimeout(Kn,1))},hr=async()=>{_e.length===0&&!yt||(gt&&clearTimeout(gt),Kn())};var K=t=>typeof t=="function",W=t=>typeof t=="string",Wn=t=>typeof t=="undefined",me=t=>t==null||typeof t=="undefined",q=t=>typeof t!="string"||!(t!=null&&t.trim()),yr=Object.prototype.toString,sn=t=>yr.call(t),Oe=t=>sn(t)==="[object Map]",fe=t=>sn(t)==="[object Set]",an=t=>sn(t)==="[object Date]",nt=t=>typeof t=="symbol",w=Array.isArray,O=t=>t!==null&&typeof t=="object";var Gn={0:"createApp can't find root element. You must define either a valid `selector` or an `element`. Example: createApp({}, {selector: '#app', html: '...'})",1:t=>`Component template cannot be found. selector: ${t} .`,2:"Use composables in scope. usage: useScope(() => new MyApp()).",3:t=>`${t} requires ref source argument`,4:"computed is readonly.",5:"persist requires a string key."},_=(t,...e)=>{let n=Gn[t];return new Error(K(n)?n.call(Gn,...e):n)};var bt=[],Jn=()=>{let t={onMounted:[],onUnmounted:[]};return bt.push(t),t},De=t=>{let e=bt[bt.length-1];if(!e&&!t)throw _(2);return e},Qn=t=>{let e=De();return t&&un(t),bt.pop(),e},cn=Symbol("csp"),un=t=>{let e=t,n=e[cn];if(n){let o=De();if(n===o)return;o.onMounted.length>0&&n.onMounted.push(...o.onMounted),o.onUnmounted.length>0&&n.onUnmounted.push(...o.onUnmounted);return}e[cn]=De()},Tt=t=>t[cn];var ke=t=>{var n,o;let e=(n=Tt(t))==null?void 0:n.onUnmounted;e==null||e.forEach(r=>{r()}),(o=t.unmounted)==null||o.call(t)};var Xn={8:t=>`Model binding requires a ref at ${t.outerHTML}`,7:t=>`Model binding is not supported on ${t.tagName} element at ${t.outerHTML}`,0:(t,e)=>`${t} binding expression is missing at ${e.outerHTML}`,1:(t,e,n)=>`invalid ${t} expression: ${e} at ${n.outerHTML}`,2:(t,e)=>`${t} requires object expression at ${e.outerHTML}`,3:(t,e)=>`${t} binder: key is empty on ${e.outerHTML}.`,4:(t,e,n,o)=>({msg:`Failed setting prop "${t}" on <${e.toLowerCase()}>: value ${n} is invalid.`,args:[o]}),5:(t,e)=>`${t} binding missing event type at ${e.outerHTML}`,6:(t,e)=>({msg:t,args:[e]})},B=(t,...e)=>{let n=Xn[t],o=K(n)?n.call(Xn,...e):n,r=Fe.warning;r&&(W(o)?r(o):r(o,...o.args))},Fe={warning:console.warn};var xt=Symbol("ref"),ee=Symbol("sref"),Ct=Symbol("raw");var C=t=>t!=null&&t[ee]===1;var Me=class extends Error{constructor(n,o){super(o);m(this,"propPath");m(this,"detail");this.name="PropValidationError",this.propPath=n,this.detail=o}},be=(t,e)=>{throw new Me(t,`${e}.`)},Et=t=>{var n;if(t===null)return"null";if(t===void 0)return"undefined";if(C(t))return`ref<${Et(t())}>`;if(typeof t=="string")return"string";if(typeof t=="number")return"number";if(typeof t=="boolean")return"boolean";if(typeof t=="bigint")return"bigint";if(typeof t=="symbol")return"symbol";if(typeof t=="function")return"function";if(w(t))return"array";if(t instanceof Date)return"Date";if(t instanceof RegExp)return"RegExp";if(t instanceof Map)return"Map";if(t instanceof Set)return"Set";let e=(n=t==null?void 0:t.constructor)==null?void 0:n.name;return e&&e!=="Object"?e:"object"},gr=t=>t.length>60?`${t.slice(0,57)}...`:t,ot=(t,e=0)=>{if(e>1)return"unknown";if(C(t)){let s=t();return`ref(${ot(s,e+1)})`}if(typeof t=="string")return gr(JSON.stringify(t));if(typeof t=="number"||typeof t=="boolean"||typeof t=="bigint"||typeof t=="symbol")return String(t);if(t===null)return"null";if(t===void 0)return"undefined";if(t instanceof Date)return t.toISOString();if(t instanceof RegExp)return String(t);if(w(t)){let s=t.slice(0,5).map(i=>ot(i,e+1)).join(", ");return t.length>5?`[${s}, ...]`:`[${s}]`}if(O(t)){let s=Object.entries(t).slice(0,5);if(s.length===0)return"{}";let i=s.map(([a,c])=>{let l=ot(c,e+1);return`${a}: ${l}`}).join(", ");return Object.keys(t).length>5?`{ ${i}, ... }`:`{ ${i} }`}return"unknown"},ae=t=>{if(C(t))return`got ${Et(t)}(${ot(t())})`;let e=Et(t),n=ot(t);return`got ${e} (${n})`},br=t=>t instanceof Me?t.detail:t instanceof Error?t.message:String(t),Yn=(t,e)=>{let n=`, ${ae(e)}.`;return t.endsWith(n)?t.slice(0,-n.length):t},Tr=(t,e,n)=>{if(e instanceof Me){if(e.propPath===t)return Yn(e.detail,n);if(e.propPath===`${t}.value`&&C(n)){let o=Yn(e.detail,n());return o.startsWith("expected ")?`expected ref<${o.slice(9)}>`:`expected ref where ${o}`}}return br(e)},xr=(t,e,n)=>{let o=[];for(let r of e){let s=Tr(t,r,n);o.includes(s)||o.push(s)}return o.length===0?ae(n):o.length===1?`${o[0]}, ${ae(n)}`:`${o.join(" or ")}, ${ae(n)}`},Cr=t=>typeof t=="string"?`"${t}"`:typeof t=="number"||typeof t=="boolean"?String(t):t===null?"null":t===void 0?"undefined":Et(t),Er=(t,e)=>{typeof t!="string"&&be(e,`expected string, ${ae(t)}`)},Rr=(t,e)=>{typeof t!="number"&&be(e,`expected number, ${ae(t)}`)},wr=(t,e)=>{typeof t!="boolean"&&be(e,`expected boolean, ${ae(t)}`)},vr=t=>(e,n)=>{e instanceof t||be(n,`expected instance of ${t.name||"provided class"}, ${ae(e)}`)},Sr=t=>(e,n,o)=>{e!==void 0&&t(e,n,o)},Ar=t=>(e,n,o)=>{e!==null&&t(e,n,o)},Nr=(...t)=>(e,n,o)=>{let r=[];for(let s of t)try{s(e,n,o);return}catch(i){r.push(i)}be(n,xr(n,r,e))},Or=t=>(e,n)=>{t.includes(e)||be(n,`expected one of ${t.map(o=>Cr(o)).join(", ")}, ${ae(e)}`)},kr=t=>(e,n,o)=>{w(e)||be(n,`expected array, ${ae(e)}`);let r=e;for(let s=0;s<r.length;++s)t(r[s],`${n}[${s}]`,o)};function Mr(t){return(e,n,o)=>{O(e)||be(n,`expected object, ${ae(e)}`);let r=e;for(let s in t){let i=t[s];if(!i)continue;i(r[s],`${n}.${s}`,o)}}}var Lr=t=>(e,n,o)=>{if(C(e)){t(e(),`${n}.value`,o);return}be(n,`expected ref, ${ae(e)}`)},Ir={fail:be,describe:ae,isString:Er,isNumber:Rr,isBoolean:wr,isClass:vr,optional:Sr,nullable:Ar,or:Nr,oneOf:Or,arrayOf:kr,shape:Mr,refOf:Lr};var Vr=(t,e,n)=>{var i,a;let o=((a=(i=t.tagName)==null?void 0:i.toLowerCase)==null?void 0:a.call(i))||"unknown",r=n instanceof Me?n.propPath:e,s=n instanceof Me?n.detail:n instanceof Error?n.message:String(n);return n instanceof Error?new Error(`Invalid prop "${r}" on <${o}>: ${s}`,{cause:n}):new Error(`Invalid prop "${r}" on <${o}>: ${s}`,{cause:n})},rt=class{constructor(e,n,o,r,s,i){m(this,"props");m(this,"start");m(this,"end");m(this,"ctx");m(this,"autoProps",!0);m(this,"entangle",!0);m(this,"enableSwitch",!1);m(this,"onAutoPropsAssigned");m(this,"G");m(this,"J");m(this,"emit",(e,n)=>{this.G.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.G=n,this.ctx=o,this.start=r,this.end=s,this.J=i}findContext(e,n=0){var r;if(n<0)return;let o=0;for(let s of(r=this.ctx)!=null?r:[])if(s instanceof e){if(o===n)return s;++o}}requireContext(e,n=0){let o=this.findContext(e,n);if(o!==void 0)return o;throw new Error(`${e} was not found in the context stack at occurrence ${n}.`)}validateProps(e){if(this.J==="off")return;let n=this.props;for(let o in e){let r=e[o];if(!r)continue;let s=r;try{s(n[o],o,this)}catch(i){let a=Vr(this.G,o,i);if(this.J==="warn"){Fe.warning(a.message,a);continue}throw a}}}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)Q(e),e=e.nextSibling;for(let o of this.ctx)ke(o)}};var Ue=t=>{let e=t,n=e[$e];if(n)return n;let o={unbinders:[],data:{}};return e[$e]=o,o};var G=(t,e)=>{Ue(t).unbinders.push(e)};var st=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 wt={},Rt={},Zn=1,eo=t=>{let e=(Zn++).toString();return wt[e]=t,Rt[e]=0,e},fn=t=>{Rt[t]+=1},ln=t=>{--Rt[t]===0&&(delete wt[t],delete Rt[t])},to=t=>wt[t],pn=()=>Zn!==1&&Object.keys(wt).length>0,it="r-switch",Pr=t=>{let e=t.filter(o=>Ee(o)).map(o=>[...o.querySelectorAll("[r-switch]")].map(r=>r.getAttribute(it))),n=new Set;return e.forEach(o=>{o.forEach(r=>r&&n.add(r))}),[...n]},qe=(t,e)=>{if(!pn())return;let n=Pr(e);n.length!==0&&(n.forEach(fn),G(t,()=>{n.forEach(ln)}))};var vt=()=>{},mn=(t,e,n,o)=>{let r=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,o),r.push(i)}Le(e,r)},dn=Symbol("r-if"),no=Symbol("r-else"),oo=t=>t[no]===1,St=class{constructor(e){m(this,"o");m(this,"N");m(this,"ge");m(this,"Q");m(this,"X");m(this,"x");m(this,"R");this.o=e,this.N=e.r.p.if,this.ge=Nt(e.r.p.if),this.Q=e.r.p.else,this.X=e.r.p.elseif,this.x=e.r.p.for,this.R=e.r.p.pre}rt(e,n){let o=e.parentElement;for(;o!==null&&o!==document.documentElement;){if(o.hasAttribute(n))return!0;o=o.parentElement}return!1}k(e){let n=e.hasAttribute(this.N);return n&&this.y(e),this.o.M.j(e,o=>{o.hasAttribute(this.N)&&this.y(o)}),n}Y(e){return e[dn]?!0:(e[dn]=!0,At(e,this.ge).forEach(n=>n[dn]=!0),!1)}y(e){if(e.hasAttribute(this.R)||this.Y(e)||this.rt(e,this.x))return;let n=e.getAttribute(this.N);if(!n){B(0,this.N,e);return}e.removeAttribute(this.N),this.V(e,n)}U(e,n,o){let r=ze(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${o!=null?o:""}`);s.insertBefore(i,e),qe(i,r),r.forEach(c=>{Q(c)}),e.remove(),n!=="if"&&(e[no]=1);let a=document.createComment(`__end__ :${n}${o!=null?o:""}`);return s.insertBefore(a,i.nextSibling),{nodes:r,parent:s,commentBegin:i,commentEnd:a}}be(e,n){if(!e)return[];let o=e.nextElementSibling;if(e.hasAttribute(this.Q)){e.removeAttribute(this.Q);let{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"else");return[{mount:()=>{mn(r,this.o,s,a)},unmount:()=>{Re(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let r=e.getAttribute(this.X);if(!r)return[];e.removeAttribute(this.X);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.U(e,"elseif",` => ${r} `),l=this.o.m.O(r),u=l.value,f=this.be(o,n),p=vt;return G(a,()=>{l.stop(),p(),p=vt}),p=l.subscribe(n),[{mount:()=>{mn(s,this.o,i,c)},unmount:()=>{Re(a,c)},isTrue:()=>st(u()[0]),isMounted:!1},...f]}}V(e,n){let o=e.nextElementSibling,{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"if",` => ${n} `),c=this.o.m.O(n),l=c.value,u=!1,f=this.o.m,p=f.L(),h=()=>{f.E(p,()=>{if(st(l()[0]))u||(mn(r,this.o,s,a),u=!0),g.forEach(T=>{T.unmount(),T.isMounted=!1});else{Re(i,a),u=!1;let T=!1;for(let R of g)!T&&R.isTrue()?(R.isMounted||(R.mount(),R.isMounted=!0),T=!0):(R.unmount(),R.isMounted=!1)}})},g=this.be(o,h),d=vt;G(i,()=>{c.stop(),d(),d=vt}),h(),d=c.subscribe(h)}};var ze=t=>{let e=de(t)?t.content.childNodes:[t],n=[];for(let o=0;o<e.length;++o){let r=e[o];if(r.nodeType===1){let s=r==null?void 0:r.tagName;if(s==="SCRIPT"||s==="STYLE")continue}n.push(r)}return n},Le=(t,e)=>{for(let n=0;n<e.length;++n){let o=e[n];o.nodeType===Node.ELEMENT_NODE&&(oo(o)||t.$(o))}},At=(t,e)=>{var o;let n=t.querySelectorAll(e);return(o=t.matches)!=null&&o.call(t,e)?[t,...n]:n},de=t=>t instanceof HTMLTemplateElement,Ee=t=>t.nodeType===Node.ELEMENT_NODE,at=t=>t.nodeType===Node.ELEMENT_NODE,ro=t=>t instanceof HTMLSlotElement,we=t=>de(t)?t.content.childNodes:t.childNodes,Re=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let o=n.nextSibling;Q(n),n=o}},so=function(){return this()},Dr=function(t){return this(t)},Ur=()=>{throw new Error("value is readonly.")},Hr={get:so,set:Dr,enumerable:!0,configurable:!1},Br={get:so,set:Ur,enumerable:!0,configurable:!1},Ie=(t,e)=>{Object.defineProperty(t,"value",e?Br:Hr)},io=(t,e)=>{if(!t)return!1;if(t.startsWith("["))return t.substring(1,t.length-1);let n=e.length;return t.startsWith(e)?t.substring(n,t.length-n):!1},Nt=t=>`[${CSS.escape(t)}]`,Ot=(t,e)=>(t.startsWith("@")&&(t=e.p.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.p.dynamic)),t),hn=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},jr=/-(\w)/g,F=hn(t=>t&&t.replace(jr,(e,n)=>n?n.toUpperCase():"")),$r=/\B([A-Z])/g,Ke=hn(t=>t&&t.replace($r,"-$1").toLowerCase()),ct=hn(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var kt={mount:()=>{}};var We=t=>{let e=t.trim();return e?e.split(/\s+/):[]};var Mt=t=>{var n,o;let e=(n=Tt(t))==null?void 0:n.onMounted;e==null||e.forEach(r=>{r()}),(o=t.mounted)==null||o.call(t)};var yn=Symbol("scope"),gn=t=>{try{Jn();let e=t();un(e);let n={context:e,unmount:()=>ke(e),[yn]:1};return n[yn]=1,n}finally{Qn()}},ao=t=>O(t)?yn in t:!1;var bn={collectRefObj:!0,mount:({parseResult:t})=>({update:({values:e})=>{let n=t.context,o=e[0];if(O(o))for(let r of Object.entries(o)){let s=r[0],i=r[1],a=n[s];a!==i&&(C(a)?a(i):n[s]=i)}}})};var re=(t,e)=>{var n;(n=De(e))==null||n.onUnmounted.push(t)};var ie=(t,e,n,o=!0)=>{if(!C(t))throw _(3,"observe");n&&e(t());let s=t(void 0,void 0,0,e);return o&&re(s,!0),s};var ut=(t,e)=>{if(t===e)return()=>{};let n=ie(t,r=>e(r)),o=ie(e,r=>t(r));return e(t()),()=>{n(),o()}};var ft=t=>!!t&&t[Ct]===1;var Ge=t=>(t==null?void 0:t[xt])===1;var he=[],co=t=>{var e;he.length!==0&&((e=he[he.length-1])==null||e.add(t))},Je=t=>{if(!t)return()=>{};let e={stop:()=>{}};return _r(t,e),re(()=>e.stop(),!0),e.stop},_r=(t,e)=>{if(!t)return;let n=[],o=!1,r=()=>{for(let s of n)s();n=[],o=!0};e.stop=r;try{let s=new Set;if(he.push(s),t(i=>n.push(i)),o)return;for(let i of[...s]){let a=ie(i,()=>{r(),Je(t)});n.push(a)}}finally{he.pop()}},Tn=t=>{let e=he.length,n=e>0&&he[e-1];try{return n&&he.push(null),t()}finally{n&&he.pop()}},xn=t=>{try{let e=new Set;return he.push(e),{value:t(),refs:[...e]}}finally{he.pop()}};var te=(t,e,n)=>{if(!C(t))return;let o=t;if(o(void 0,e,1),!n)return;let r=o();if(r){if(w(r)||fe(r))for(let s of r)te(s,e,!0);else if(Oe(r))for(let s of r)te(s[0],e,!0),te(s[1],e,!0);if(O(r))for(let s in r)te(r[s],e,!0)}};function Fr(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Qe=(t,e,n)=>{n.forEach(function(o){let r=t[o];Fr(e,o,function(...i){let a=r.apply(this,i),c=this[ee];for(let l of c)te(l);return a})})},Lt=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var uo=Array.prototype,Cn=Object.create(uo),qr=["push","pop","shift","unshift","splice","sort","reverse"];Qe(uo,Cn,qr);var fo=Map.prototype,It=Object.create(fo),zr=["set","clear","delete"];Lt(It,"Map");Qe(fo,It,zr);var lo=Set.prototype,Vt=Object.create(lo),Kr=["add","clear","delete"];Lt(Vt,"Set");Qe(lo,Vt,Kr);var Te={},ce=t=>{if(C(t)||ft(t))return t;let e={auto:!0,_value:t},n=c=>O(c)?ee in c?!0:w(c)?(Object.setPrototypeOf(c,Cn),!0):fe(c)?(Object.setPrototypeOf(c,Vt),!0):Oe(c)?(Object.setPrototypeOf(c,It),!0):!1:!1,o=n(t),r=new Set,s=(c,l)=>{if(Te.stack&&Te.stack.length){Te.stack[Te.stack.length-1].add(a);return}r.size!==0&&Tn(()=>{for(let u of[...r.keys()])r.has(u)&&u(c,l)})},i=c=>{let l=c[ee];l||(c[ee]=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||C(u)&&(u=u(),e._value===u)?u:(n(u)&&i(u),e._value=u,e.auto&&s(u,f),e._value):(co(a),e._value)}switch(c[2]){case 0:{let u=c[3];if(!u)return()=>{};let f=p=>{r.delete(p)};return r.add(u),()=>{f(u)}}case 1:{let u=c[1],f=e._value;s(f,u);break}case 2:return r.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[ee]=1,Ie(a,!1),o&&i(t),a};var ve=t=>{if(ft(t))return t;let e;if(C(t)?(e=t,t=e()):e=ce(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[xt]=1,w(t)){let n=t.length;for(let o=0;o<n;++o){let r=t[o];Ge(r)||(t[o]=ve(r))}return e}if(!O(t))return e;for(let n of Object.entries(t)){let o=n[1];if(Ge(o))continue;let r=n[0];nt(r)||(t[r]=null,t[r]=ve(o))}return e};var po=Symbol("modelBridge"),Pt=()=>{},Wr=t=>!!(t!=null&&t[po]),Gr=t=>{t[po]=1},Jr=t=>{let e=ve(t());return Gr(e),e},mo={collectRefObj:!0,mount:({parseResult:t,option:e})=>{if(typeof e!="string"||!e)return Pt;let n=F(e),o,r,s=Pt,i=()=>{s(),s=Pt,o=void 0,r=void 0},a=()=>{s(),s=Pt},c=(u,f)=>{o!==u&&(a(),s=ut(u,f),o=u)},l=()=>{var h;let u=(h=t.refs[0])!=null?h:t.value()[0],f=t.context,p=f[n];if(!C(u)){if(r&&p===r){r(u);return}if(i(),C(p)){p(u);return}f[n]=u;return}if(Wr(u)){if(p===u)return;C(p)?c(u,p):f[n]=u;return}r||(r=Jr(u)),f[n]=r,c(u,r)};return{update:()=>{l()},unmount:()=>{s()}}}};var Dt=class{constructor(e){m(this,"o");m(this,"xe");m(this,"Te","");m(this,"Re",-1);this.o=e,this.xe=e.r.p.inherit}k(e){this.ot(e)}st(e){if(this.Re!==e.size){let n=[...e.keys()];this.Te=[...n,...n.map(Ke)].join(","),this.Re=e.size}return this.Te}it(e){var n;for(let o=0;o<e.length;++o){let r=(n=e[o])==null?void 0:n.components;if(r)for(let s in r)return!0}return!1}at(e){if(!de(e))return!1;let n=e.getAttributeNames();return e.hasAttribute("name")?!0:n.some(o=>o.startsWith("#"))}ct(e){return de(e)&&e.getAttributeNames().length===0}ot(e){var l,u;let n=this.o,o=n.m,r=n.r.Z,s=n.r._;if(r.size===0&&!this.it(o.l))return;let i=o.ee(),a=this.Ee();if(q(a))return;let c=this.pt(e,a);for(let f of c){if(f.hasAttribute(n.R))continue;let p=f.parentNode;if(!p)continue;let h=f.nextSibling,g=F(f.tagName).toUpperCase(),d=i[g],E=d!=null?d:s.get(g);if(!E)continue;let T=E.template;if(!T)continue;let R=f.parentElement;if(!R)continue;let L=new Comment(" begin component: "+f.tagName),X=new Comment(" end component: "+f.tagName);R.insertBefore(L,f),f.remove();let D=n.r.p.context,H=n.r.p.contextAlias,le=n.r.p.bind,Y=(u=(l=E.props)==null?void 0:l.map(F))!=null?u:[],I=(x,N)=>{let y={},$=x.hasAttribute(D);return o.E(N,()=>{if(o.w(y),$?n.y(bn,x,D):x.hasAttribute(H)&&n.y(bn,x,H),Y.length===0)return;let U=new Map(Y.map(v=>[v.toLowerCase(),v]));for(let v of[...Y,...Y.map(Ke)]){let P=x.getAttribute(v);P!==null&&(y[F(v)]=P,x.removeAttribute(v))}let J=n.F.Ce(x,!1);for(let[v,P]of J.entries()){let[A,z]=P.te;if(!z)continue;let se=U.get(F(z).toLowerCase());se&&(A!=="."&&A!==":"&&A!==le||n.y(mo,x,v,!0,se,P.ne))}}),y},b=[...o.L()],k=()=>{var $;let x=I(f,b),N=new rt(x,f,b,L,X,n.r.propValidationMode),y=gn(()=>{var U;return(U=E.context(N))!=null?U:{}}).context;if(N.autoProps){for(let[U,J]of Object.entries(x))if(U in y){let v=y[U];if(v===J)continue;if(C(v)){C(J)?N.entangle?G(L,ut(J,v)):v(J()):v(J);continue}}else y[U]=J;for(let U of Y)U in y||(y[U]=void 0);($=N.onAutoPropsAssigned)==null||$.call(N)}return{componentCtx:y,head:N}},{componentCtx:j,head:Pe}=k(),pe=[...we(T)],on=pe.length,V=f.childNodes.length===0,tt=x=>{var J;let N=x.parentElement,y=x.name;if(q(y)&&(y=x.getAttributeNames().filter(v=>v.startsWith("#"))[0],q(y)?y="default":y=y.substring(1)),V){if(y==="default"){let v=n.r.p.text,P=f.getAttribute(v);if(!q(P)){let A=document.createElement("span");A.setAttribute(v,P),N.insertBefore(A,x),f.removeAttribute(v);return}}for(let v of[...x.childNodes])N.insertBefore(v,x);return}let $=f.querySelector(`template[name='${y}'], template[\\#${y}]`);!$&&y==="default"&&($=(J=[...f.querySelectorAll("template:not([name])")].find(P=>this.ct(P)))!=null?J:null);let U=v=>{Pe.enableSwitch&&o.E(b,()=>{o.w(j);let P=I(x,o.L());o.E(b,()=>{o.w(P);let A=o.L(),z=eo(A);for(let se of v)Ee(se)&&(se.setAttribute(it,z),fn(z),G(se,()=>{ln(z)}))})})};if($){let v=[...we($)];for(let P of v)N.insertBefore(P,x);U(v)}else{if(y!=="default"){for(let P of[...we(x)])N.insertBefore(P,x);return}let v=[...we(f)].filter(P=>!this.at(P));for(let P of v)N.insertBefore(P,x);U(v)}},M=x=>{if(!Ee(x))return;let N=x.querySelectorAll("slot");if(ro(x)){tt(x),x.remove();return}for(let y of N)tt(y),y.remove()};(()=>{for(let x=0;x<on;++x)pe[x]=pe[x].cloneNode(!0),p.insertBefore(pe[x],h),M(pe[x])})(),R.insertBefore(X,h);let ne=()=>{if(!E.inheritAttrs)return;let x=pe.filter(y=>y.nodeType===Node.ELEMENT_NODE);x.length>1&&(x=x.filter(y=>y.hasAttribute(this.xe)));let N=x[0];if(N)for(let y of f.getAttributeNames()){if(y===D||y===H)continue;let $=f.getAttribute(y);if(y==="class"){let U=We($);U.length>0&&N.classList.add(...U)}else if(y==="style"){let U=N.style,J=f.style;for(let v of J)U.setProperty(v,J.getPropertyValue(v))}else N.setAttribute(Ot(y,n.r),$)}},oe=()=>{for(let x of f.getAttributeNames())!x.startsWith("@")&&!x.startsWith(n.r.p.on)&&f.removeAttribute(x)},xe=()=>{ne(),oe(),o.w(j),n.we(f,!1),j.$emit=Pe.emit,Le(n,pe),G(f,()=>{ke(j)}),G(L,()=>{Ce(f)}),Mt(j)};o.E(b,xe)}}Ee(){let e=this.o,n=e.m,o=e.r.Z,r=n.ut(),s=this.st(o);return[...s?[s]:[],...r,...r.map(Ke)].join(",")}pt(e,n){var s;let o=[];if(q(n))return o;if((s=e.matches)!=null&&s.call(e,n))return[e];let r=this.q(e).reverse();for(;r.length>0;){let i=r.pop();if(i.matches(n)){o.push(i);continue}r.push(...this.q(i).reverse())}return o}j(e,n){let o=this.Ee(),r=this.q(e).reverse();for(;r.length>0;){let s=r.pop();n(s),!(!q(o)&&s.matches(o))&&r.push(...this.q(s).reverse())}}q(e){let n=e==null?void 0:e.children;if((n==null?void 0:n.length)!=null){let r=[];for(let s=0;s<n.length;++s){let i=n[s];Ee(i)&&r.push(i)}return r}let o=e==null?void 0:e.childNodes;if((o==null?void 0:o.length)!=null){let r=[];for(let s=0;s<o.length;++s){let i=o[s];Ee(i)&&r.push(i)}return r}return[]}};var En=class{constructor(e,n){m(this,"te");m(this,"ne");m(this,"ve",[]);this.te=e,this.ne=n}},Ut=class{constructor(e){m(this,"o");m(this,"Se");m(this,"Ae");m(this,"re");var o;this.o=e,this.Se=e.r.lt(),this.re=new Map;let n=new Map;for(let r of this.Se){let s=(o=r[0])!=null?o:"",i=n.get(s);i?i.push(r):n.set(s,[r])}this.Ae=n}ke(e){let n=this.re.get(e);if(n)return n;let o=e,r=o.startsWith(".");r&&(o=":"+o.slice(1));let s=o.indexOf("."),a=(s<0?o:o.substring(0,s)).split(/[:@]/);q(a[0])&&(a[0]=r?".":o[0]);let c=s>=0?o.slice(s+1).split("."):[],l=!1,u=!1;for(let p=0;p<c.length;++p){let h=c[p];if(!l&&h==="camel"?l=!0:!u&&h==="prop"&&(u=!0),l&&u)break}l&&(a[a.length-1]=F(a[a.length-1])),u&&(a[0]=".");let f={terms:a,flags:c};return this.re.set(e,f),f}Ce(e,n){let o=new Map;if(!at(e))return o;let r=this.Ae,s=(a,c)=>{var u;let l=r.get((u=c[0])!=null?u:"");if(l)for(let f=0;f<l.length;++f){if(!c.startsWith(l[f]))continue;let p=o.get(c);if(!p){let h=this.ke(c);p=new En(h.terms,h.flags),o.set(c,p)}p.ve.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.o.M.j(e,i),o}};var ho=()=>{},Qr=(t,e)=>{for(let n of t){let o=n.cloneNode(!0);e.appendChild(o)}},Ht=class{constructor(e){m(this,"o");m(this,"I");this.o=e,this.I=e.r.p.is}k(e){let n=e.hasAttribute(this.I);return(n||e.hasAttribute("is"))&&this.y(e),this.o.M.j(e,o=>{(o.hasAttribute(this.I)||o.hasAttribute("is"))&&this.y(o)}),n}y(e){let n=e.getAttribute(this.I);if(!n){if(n=e.getAttribute("is"),!n)return;if(!n.startsWith("regor:")){if(!n.startsWith("r-"))return;let o=n.slice(2).trim().toLowerCase();if(!o)return;let r=e.parentNode;if(!r)return;let s=document.createElement(o);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);r.insertBefore(s,e),e.remove(),this.o.$(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.V(e,n)}U(e,n){let o=ze(e),r=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);r.insertBefore(s,e),qe(s,o),o.forEach(a=>{Q(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n!=null?n:""}`);return r.insertBefore(i,s.nextSibling),{nodes:o,parent:r,commentBegin:s,commentEnd:i}}V(e,n){let{nodes:o,parent:r,commentBegin:s,commentEnd:i}=this.U(e,` => ${n} `),a=this.o.m.O(n),c=a.value,l=this.o.m,u=l.L(),f={name:""},p=de(e)?o:[...o[0].childNodes],h=()=>{l.E(u,()=>{var R;let E=c()[0];if(O(E)&&(E.name?E=E.name:E=(R=Object.entries(l.ee()).filter(L=>L[1]===E)[0])==null?void 0:R[0]),!W(E)||q(E)){Re(s,i);return}if(f.name===E)return;Re(s,i);let T=document.createElement(E);for(let L of e.getAttributeNames())L!==this.I&&T.setAttribute(L,e.getAttribute(L));Qr(p,T),r.insertBefore(T,i),this.o.$(T),f.name=E})},g=ho;G(s,()=>{a.stop(),g(),g=ho}),h(),g=a.subscribe(h)}};var S=t=>{let e=t;return e!=null&&e[ee]===1?e():e};var Xr=(t,e)=>{let[n,o]=e;K(o)?o(t,n):t.innerHTML=n==null?void 0:n.toString()},Bt={mount:()=>({update:({el:t,values:e})=>{Xr(t,e)}})};var jt=class t{constructor(e){m(this,"oe");this.oe=e}static ft(e,n){var h,g;let o=e.m,r=e.r,s=r.p,i=new Set([s.for,s.if,s.else,s.elseif,s.pre]),a=r.B,c=o.ee();if(Object.keys(c).length>0||r._.size>0)return;let l=e.F,u=[],f=0,p=[];for(let d=n.length-1;d>=0;--d)p.push(n[d]);for(;p.length>0;){let d=p.pop();if(d.nodeType===Node.ELEMENT_NODE){let T=d;if(T.tagName==="TEMPLATE"||T.tagName.includes("-"))return;let R=F(T.tagName).toUpperCase();if(r._.has(R)||c[R])return;let L=T.attributes;for(let X=0;X<L.length;++X){let D=(h=L.item(X))==null?void 0:h.name;if(!D)continue;if(i.has(D))return;let{terms:H,flags:le}=l.ke(D),[Y,I]=H,b=(g=a[D])!=null?g:a[Y];if(b){if(b===Bt)return;u.push({nodeIndex:f,attrName:D,directive:b,option:I,flags:le})}}++f}let E=d.childNodes;for(let T=E.length-1;T>=0;--T)p.push(E[T])}if(u.length!==0)return new t(u)}y(e,n){let o=[],r=[];for(let s=n.length-1;s>=0;--s)r.push(n[s]);for(;r.length>0;){let s=r.pop();s.nodeType===Node.ELEMENT_NODE&&o.push(s);let i=s.childNodes;for(let a=i.length-1;a>=0;--a)r.push(i[a])}for(let s=0;s<this.oe.length;++s){let i=this.oe[s],a=o[i.nodeIndex];a&&e.y(i.directive,a,i.attrName,!1,i.option,i.flags)}}};var Yr=(t,e)=>{let n=e.parentNode;if(n)for(let o=0;o<t.items.length;++o)n.insertBefore(t.items[o],e)},Zr=t=>{var a;let e=t.length,n=t.slice(),o=[],r,s,i;for(let c=0;c<e;++c){let l=t[c];if(l===0)continue;let u=o[o.length-1];if(u===void 0||t[u]<l){n[c]=u!=null?u:-1,o.push(c);continue}for(r=0,s=o.length-1;r<s;)i=r+s>>1,t[o[i]]<l?r=i+1:s=i;l<t[o[r]]&&(r>0&&(n[c]=o[r-1]),o[r]=c)}for(r=o.length,s=(a=o[r-1])!=null?a:-1;r-- >0;)o[r]=s,s=n[s];return o},$t=class{static dt(e){let{oldItems:n,newValues:o,getKey:r,isSameValue:s,mountNewValue:i,removeMountItem:a,endAnchor:c}=e,l=n.length,u=o.length,f=new Array(u),p=new Set;for(let b=0;b<u;++b){let k=r(o[b]);if(k===void 0||p.has(k))return;p.add(k),f[b]=k}let h=new Array(u),g=0,d=l-1,E=u-1;for(;g<=d&&g<=E;){let b=n[g];if(r(b.value)!==f[g]||!s(b.value,o[g]))break;b.value=o[g],h[g]=b,++g}for(;g<=d&&g<=E;){let b=n[d];if(r(b.value)!==f[E]||!s(b.value,o[E]))break;b.value=o[E],h[E]=b,--d,--E}if(g>d){for(let b=E;b>=g;--b){let k=b+1<u?h[b+1].items[0]:c;h[b]=i(b,o[b],k)}return h}if(g>E){for(let b=g;b<=d;++b)a(n[b]);return h}let T=g,R=g,L=E-R+1,X=new Array(L).fill(0),D=new Map;for(let b=R;b<=E;++b)D.set(f[b],b);let H=!1,le=0;for(let b=T;b<=d;++b){let k=n[b],j=D.get(r(k.value));if(j===void 0){a(k);continue}if(!s(k.value,o[j])){a(k);continue}k.value=o[j],h[j]=k,X[j-R]=b+1,j>=le?le=j:H=!0}let Y=H?Zr(X):[],I=Y.length-1;for(let b=L-1;b>=0;--b){let k=R+b,j=k+1<u?h[k+1].items[0]:c;if(X[b]===0){h[k]=i(k,o[k],j);continue}let Pe=h[k];H&&(I>=0&&Y[I]===b?--I:Pe&&Yr(Pe,j))}return h}};var lt=class{constructor(e){m(this,"T",[]);m(this,"P",new Map);m(this,"se");this.se=e}get v(){return this.T.length}ie(e){let n=this.se(e.value);n!==void 0&&this.P.set(n,e)}ae(e){var o;let n=this.se((o=this.T[e])==null?void 0:o.value);n!==void 0&&this.P.delete(n)}static mt(e,n){return{items:[],index:e,value:n,order:-1}}w(e){e.order=this.v,this.T.push(e),this.ie(e)}yt(e,n){let o=this.v;for(let r=e;r<o;++r)this.T[r].order=r+1;n.order=e,this.T.splice(e,0,n),this.ie(n)}D(e){return this.T[e]}ce(e,n){this.ae(e),this.T[e]=n,this.ie(n),n.order=e}Ne(e){this.ae(e),this.T.splice(e,1);let n=this.v;for(let o=e;o<n;++o)this.T[o].order=o}Me(e){let n=this.v;for(let o=e;o<n;++o)this.ae(o);this.T.splice(e)}en(e){return this.P.has(e)}ht(e){var o;let n=this.P.get(e);return(o=n==null?void 0:n.order)!=null?o:-1}};var Rn=Symbol("r-for"),es=t=>-1,yo=()=>{},Ft=class Ft{constructor(e){m(this,"o");m(this,"x");m(this,"Ve");m(this,"R");this.o=e,this.x=e.r.p.for,this.Ve=Nt(this.x),this.R=e.r.p.pre}k(e){let n=e.hasAttribute(this.x);return n&&this.Oe(e),this.o.M.j(e,o=>{o.hasAttribute(this.x)&&this.Oe(o)}),n}Y(e){return e[Rn]?!0:(e[Rn]=!0,At(e,this.Ve).forEach(n=>n[Rn]=!0),!1)}Oe(e){if(e.hasAttribute(this.R)||this.Y(e))return;let n=e.getAttribute(this.x);if(!n){B(0,this.x,e);return}e.removeAttribute(this.x),this.gt(e,n)}Le(e){return me(e)?[]:(K(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(o=>({*[Symbol.iterator](){for(let r=1;r<=o;r++)yield r}}))(e):Object.entries(e))}gt(e,n){var tt;let o=this.bt(n);if(!(o!=null&&o.list)){B(1,this.x,n,e);return}let r=this.o.r.p.key,s=this.o.r.p.keyBind,i=(tt=e.getAttribute(r))!=null?tt:e.getAttribute(s);e.removeAttribute(r),e.removeAttribute(s);let a=ze(e),c=jt.ft(this.o,a),l=e.parentNode;if(!l)return;let u=`${this.x} => ${n}`,f=new Comment(`__begin__ ${u}`);l.insertBefore(f,e),qe(f,a),a.forEach(M=>{Q(M)}),e.remove();let p=new Comment(`__end__ ${u}`);l.insertBefore(p,f.nextSibling);let h=this.o,g=h.m,d=g.L(),T=d.length===1?[void 0,d[0]]:void 0,R=this.xt(i),L=(M,Z)=>R(M)===R(Z),X=(M,Z)=>M===Z,D=(M,Z,ne)=>{let oe=o.createContext(Z,M),xe=lt.mt(oe.index,Z),x=()=>{var U,J;let N=(J=(U=p.parentNode)!=null?U:f.parentNode)!=null?J:l,y=ne.previousSibling,$=[];for(let v=0;v<a.length;++v){let P=a[v].cloneNode(!0);N.insertBefore(P,ne),$.push(P)}for(c?c.y(h,$):Le(h,$),y=y.nextSibling;y!==ne;)xe.items.push(y),y=y.nextSibling};return T?(T[0]=oe.ctx,g.E(T,x)):g.E(d,()=>{g.w(oe.ctx),x()}),xe},H=(M,Z)=>{let ne=V.D(M).items,oe=ne[ne.length-1].nextSibling;for(let xe of ne)Q(xe);V.ce(M,D(M,Z,oe))},le=(M,Z)=>{V.w(D(M,Z,p))},Y=M=>{for(let Z of V.D(M).items)Q(Z)},I=M=>{let Z=V.v;for(let ne=M;ne<Z;++ne)V.D(ne).index(ne)},b=M=>{let Z=f.parentNode,ne=p.parentNode;if(!Z||!ne)return;let oe=V.v;K(M)&&(M=M());let xe=S(M[0]);if(w(xe)&&xe.length===0){Re(f,p),V.Me(0);return}let x=[];for(let A of this.Le(M[0]))x.push(A);let N=$t.dt({oldItems:V.T,newValues:x,getKey:R,isSameValue:X,mountNewValue:(A,z,se)=>D(A,z,se),removeMountItem:A=>{for(let z=0;z<A.items.length;++z)Q(A.items[z])},endAnchor:p});if(N){V.T=N,V.P.clear();for(let A=0;A<N.length;++A){let z=N[A];z.order=A,z.index(A);let se=R(z.value);se!==void 0&&V.P.set(se,z)}return}let y=0,$=Number.MAX_SAFE_INTEGER,U=oe,J=this.o.r.forGrowThreshold,v=()=>V.v<U+J;for(let A of x){let z=()=>{if(y<oe){let se=V.D(y++);if(L(se.value,A)){if(X(se.value,A))return;H(y-1,A);return}let ht=V.ht(R(A));if(ht>=y&&ht-y<10){if(--y,$=Math.min($,y),Y(y),V.Ne(y),--oe,ht>y+1)for(let rn=y;rn<ht-1&&rn<oe&&!L(V.D(y).value,A);)++rn,Y(y),V.Ne(y),--oe;z();return}v()?(V.yt(y-1,D(y,A,V.D(y-1).items[0])),$=Math.min($,y-1),++oe):H(y-1,A)}else le(y++,A)};z()}let P=y;for(oe=V.v;y<oe;)Y(y++);V.Me(P),I($)},k=()=>{j.stop(),pe(),pe=yo},j=g.O(o.list),Pe=j.value,pe=yo,on=0,V=new lt(R);for(let M of this.Le(Pe()[0]))V.w(D(on++,M,p));G(f,k),pe=j.subscribe(b)}bt(e){var c,l;let n=Ft.Tt.exec(e);if(!n)return;let o=(n[1]+((c=n[2])!=null?c:"")).split(",").map(u=>u.trim()),r=o.length>1?o.length-1:-1,s=r!==-1&&(o[r]==="index"||(l=o[r])!=null&&l.startsWith("#"))?o[r]:"";s&&o.splice(r,1);let i=n[3];if(!i||o.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(u,f)=>{let p={},h=S(u);if(!a&&o.length===1)p[o[0]]=u;else if(w(h)){let d=0;for(let E of o)p[E]=h[d++]}else for(let d of o)p[d]=h[d];let g={ctx:p,index:es};return s&&(g.index=p[s.startsWith("#")?s.substring(1):s]=ce(f)),g}}}xt(e){if(!e)return o=>o;let n=e.trim();if(!n)return o=>o;if(n.includes(".")){let o=this.Rt(n),r=o.length>1?o.slice(1):void 0;return s=>{let i=S(s),a=this.Ie(i,o);return a!==void 0||!r?a:this.Ie(i,r)}}return o=>{var r;return S((r=S(o))==null?void 0:r[n])}}Rt(e){return e.split(".").filter(n=>n.length>0)}Ie(e,n){var r;let o=e;for(let s of n)o=(r=S(o))==null?void 0:r[s];return S(o)}};m(Ft,"Tt",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var _t=Ft;var qt=class{constructor(e){m(this,"pe",0);m(this,"ue",new Map);m(this,"m");m(this,"Pe");m(this,"De");m(this,"Ue");m(this,"M");m(this,"F");m(this,"r");m(this,"R");m(this,"Be");this.m=e,this.r=e.r,this.De=new _t(this),this.Pe=new St(this),this.Ue=new Ht(this),this.M=new Dt(this),this.F=new Ut(this),this.R=this.r.p.pre,this.Be=this.r.p.dynamic}Et(e){let n=de(e)?[e]:e.querySelectorAll("template");for(let o of n){if(o.hasAttribute(this.R))continue;let r=o.parentNode;if(!r)continue;let s=o.nextSibling;if(o.remove(),!o.content)continue;let i=[...o.content.childNodes];for(let a of i)r.insertBefore(a,s);Le(this,i)}}$(e){++this.pe;try{if(e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.R)||this.Pe.k(e)||this.De.k(e)||this.Ue.k(e))return;this.M.k(e),this.Et(e),this.we(e,!0)}finally{--this.pe,this.pe===0&&this.Ct()}}wt(e,n){let o=document;if(!o){let r=e.parentNode;for(;r!=null&&r.parentNode;)r=r.parentNode;if(!r)return null;o=r}return o.querySelector(n)}He(e,n){let o=this.wt(e,n);if(!o)return!1;let r=e.parentElement;if(!r)return!1;let s=new Comment(`teleported => '${n}'`);return r.insertBefore(s,e),e.teleportedFrom=s,s.teleportedTo=e,G(s,()=>{Q(e)}),o.appendChild(e),!0}vt(e,n){this.ue.set(e,n)}Ct(){let e=this.ue;if(e.size!==0){this.ue=new Map;for(let[n,o]of e.entries())this.He(n,o)}}we(e,n){var s;let o=this.F.Ce(e,n),r=this.r.B;for(let[i,a]of o.entries()){let[c,l]=a.te,u=(s=r[i])!=null?s:r[c];if(!u){console.error("directive not found:",c);continue}let f=a.ve;for(let p=0;p<f.length;++p){let h=f[p];this.y(u,h,i,!1,l,a.ne)}}}y(e,n,o,r,s,i){if(n.hasAttribute(this.R))return;let a=n.getAttribute(o);n.removeAttribute(o);let c=l=>{let u=l;for(;u;){let f=u.getAttribute(it);if(f)return f;u=u.parentElement}return null};if(pn()){let l=c(n);if(l){this.m.E(to(l),()=>{this.V(e,n,a,s,i)});return}}this.V(e,n,a,s,i)}St(e,n,o){return e!==kt?!1:(q(o)||this.He(n,o)||this.vt(n,o),!0)}V(e,n,o,r,s){if(n.nodeType!==Node.ELEMENT_NODE||o==null||this.St(e,n,o))return;let i=this.At(r,e.once),a=this.kt(e,o),c=this.Nt(a,i);G(n,c.stop);let l=this.Mt(n,o,a,i,r,s),u=this.Vt(e,l,c);if(!u)return;let f=this.Ot(l,a,i,r,u);f(),e.once||(c.result=a.subscribe(f),i&&(c.dynamic=i.subscribe(f)))}At(e,n){let o=io(e,this.Be);if(o)return this.m.O(F(o),void 0,void 0,void 0,n)}kt(e,n){return this.m.O(n,e.isLazy,e.isLazyKey,e.collectRefObj,e.once)}Nt(e,n){let o={stop:()=>{var r,s,i;e.stop(),n==null||n.stop(),(r=o.result)==null||r.call(o),(s=o.dynamic)==null||s.call(o),(i=o.mounted)==null||i.call(o),o.result=void 0,o.dynamic=void 0,o.mounted=void 0}};return o}Mt(e,n,o,r,s,i){return{el:e,expr:n,values:o.value(),previousValues:void 0,option:r?r.value()[0]:s,previousOption:void 0,flags:i,parseResult:o,dynamicOption:r}}Vt(e,n,o){let r=e.mount(n);if(typeof r=="function"){o.mounted=r;return}return r!=null&&r.unmount&&(o.mounted=r.unmount),r==null?void 0:r.update}Ot(e,n,o,r,s){let i,a;return()=>{let c=n.value(),l=o?o.value()[0]:r;e.values=c,e.previousValues=i,e.option=l,e.previousOption=a,i=c,a=l,s(e)}}};var go="http://www.w3.org/1999/xlink",ts={itemscope:2,allowfullscreen:2,formnovalidate:2,ismap:2,nomodule:2,novalidate:2,readonly:2,async:1,autofocus:1,autoplay:1,controls:1,default:1,defer:1,disabled:1,hidden:1,inert:1,loop:1,open:1,required:1,reversed:1,scoped:1,seamless:1,checked:1,muted:1,multiple:1,selected:1};function ns(t){return!!t||t===""}var os=(t,e,n,o,r,s)=>{var a;if(o){s&&s.includes("camel")&&(o=F(o)),zt(t,o,e[0],r);return}let i=e.length;for(let c=0;c<i;++c){let l=e[c];if(w(l)){let u=(a=n==null?void 0:n[c])==null?void 0:a[0],f=l[0],p=l[1];zt(t,f,p,u)}else if(O(l))for(let u of Object.entries(l)){let f=u[0],p=u[1],h=n==null?void 0:n[c],g=h&&f in h?f:void 0;zt(t,f,p,g)}else{let u=n==null?void 0:n[c],f=e[c++],p=e[c];zt(t,f,p,u)}}},wn={mount:()=>({update:({el:t,values:e,previousValues:n,option:o,previousOption:r,flags:s})=>{os(t,e,n,o,r,s)}})},zt=(t,e,n,o)=>{if(o&&o!==e&&t.removeAttribute(o),me(e)){B(3,"r-bind",t);return}if(!W(e)){B(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){me(n)?t.removeAttributeNS(go,e.slice(6,e.length)):t.setAttributeNS(go,e,n);return}let r=e in ts;me(n)||r&&!ns(n)?t.removeAttribute(e):t.setAttribute(e,r?"":n)};var rs=(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=n==null?void 0:n[r];if(w(s)){let a=s.length;for(let c=0;c<a;++c)bo(t,s[c],i==null?void 0:i[c])}else bo(t,s,i)}},vn={mount:()=>({update:({el:t,values:e,previousValues:n})=>{rs(t,e,n)}})},bo=(t,e,n)=>{let o=S(e),r=S(n),s=t.classList,i=W(o),a=W(r);if(o&&!i){let c=o;if(r&&!a){let l=r;for(let u in l)(!(u in c)||!S(c[u]))&&s.remove(u)}for(let l in c)S(c[l])&&s.add(l)}else if(i){if(r!==o){let c=a?We(r):[],l=We(o);c.length>0&&s.remove(...c),l.length>0&&s.add(...l)}}else if(r){let c=a?We(r):[];c.length>0&&s.remove(...c)}};function ss(t,e){if(t.length!==e.length)return!1;let n=!0;for(let o=0;n&&o<t.length;o++)n=Se(t[o],e[o]);return n}function Se(t,e){if(t===e)return!0;let n=an(t),o=an(e);if(n||o)return n&&o?t.getTime()===e.getTime():!1;if(n=nt(t),o=nt(e),n||o)return t===e;if(n=w(t),o=w(e),n||o)return n&&o?ss(t,e):!1;if(n=O(t),o=O(e),n||o){if(!n||!o)return!1;let r=Object.keys(t).length,s=Object.keys(e).length;if(r!==s)return!1;for(let 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 Kt(t,e){return t.findIndex(n=>Se(n,e))}var To=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var Sn=t=>{if(!C(t))throw _(3,"pause");t(void 0,void 0,3)};var An=t=>{if(!C(t))throw _(3,"resume");t(void 0,void 0,4)};var Co={mount:({el:t,parseResult:e,flags:n})=>({update:({values:o})=>{is(t,o[0])},unmount:as(t,e,n)})},is=(t,e)=>{let n=vo(t);if(n&&Eo(t))w(e)?e=Kt(e,Ae(t))>-1:fe(e)?e=e.has(Ae(t)):e=ms(t,e),t.checked=e;else if(n&&Ro(t))t.checked=Se(e,Ae(t));else if(n||So(t))wo(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(Ao(t)){let o=t.options,r=o.length,s=t.multiple;for(let i=0;i<r;i++){let a=o[i],c=Ae(a);if(s)w(e)?a.selected=Kt(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 B(7,t)},pt=t=>(C(t)&&(t=t()),K(t)&&(t=t()),t?W(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}),Eo=t=>t.type==="checkbox",Ro=t=>t.type==="radio",wo=t=>t.type==="number"||t.type==="range",vo=t=>t.tagName==="INPUT",So=t=>t.tagName==="TEXTAREA",Ao=t=>t.tagName==="SELECT",as=(t,e,n)=>{let o=e.value,r=pt(n==null?void 0:n.join(",")),s=pt(o()[1]),i={int:r.int||s.int,lazy:r.lazy||s.lazy,number:r.number||s.number,trim:r.trim||s.trim};if(!e.refs[0])return B(8,t),()=>{};let a=()=>e.refs[0],c=vo(t);return c&&Eo(t)?us(t,a):c&&Ro(t)?ds(t,a):c||So(t)?cs(t,i,a,o):Ao(t)?hs(t,a,o):(B(7,t),()=>{})},xo=/[.,' ·٫]/,cs=(t,e,n,o)=>{let s=e.lazy?"change":"input",i=wo(t),a=()=>{!e.trim&&!pt(o()[1]).trim||(t.value=t.value.trim())},c=p=>{let h=p.target;h.composing=1},l=p=>{let h=p.target;h.composing&&(h.composing=0,h.dispatchEvent(new Event(s)))},u=()=>{t.removeEventListener(s,f),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",l),t.removeEventListener("change",l)},f=p=>{let h=n();if(!h)return;let g=p.target;if(!g||g.composing)return;let d=g.value,E=pt(o()[1]);if(i||E.number||E.int){if(E.int)d=parseInt(d);else{if(xo.test(d[d.length-1])&&d.split(xo).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(h()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else E.trim&&(d=d.trim());h(d)};return t.addEventListener(s,f),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",l),t.addEventListener("change",l),u},us=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let i=Ae(t),a=t.checked,c=s();if(w(c)){let l=Kt(c,i),u=l!==-1;a&&!u?c.push(i):!a&&u&&c.splice(l,1)}else fe(c)?a?c.add(i):c.delete(i):s(ps(t,a))};return t.addEventListener(n,r),o},Ae=t=>"_value"in t?t._value:t.value,No="trueValue",fs="falseValue",Oo="true-value",ls="false-value",ps=(t,e)=>{let n=e?No:fs;if(n in t)return t[n];let o=e?Oo:ls;return t.hasAttribute(o)?t.getAttribute(o):e},ms=(t,e)=>{if(No in t)return Se(e,t.trueValue);let o=Oo;return t.hasAttribute(o)?Se(e,t.getAttribute(o)):Se(e,!0)},ds=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let i=Ae(t);s(i)};return t.addEventListener(n,r),o},hs=(t,e,n)=>{let o="change",r=()=>{t.removeEventListener(o,s)},s=()=>{let i=e();if(!i)return;let c=pt(n()[1]).number,l=Array.prototype.filter.call(t.options,u=>u.selected).map(u=>c?To(Ae(u)):Ae(u));if(t.multiple){let u=i();try{if(Sn(i),fe(u)){u.clear();for(let f of l)u.add(f)}else w(u)?(u.splice(0),u.push(...l)):i(l)}finally{An(i),te(i)}}else i(l[0])};return t.addEventListener(o,s),r};var ys=["stop","prevent","capture","self","once","left","right","middle","passive"],gs=t=>{let e={};if(q(t))return;let n=t.split(",");for(let o of ys)e[o]=n.includes(o);return e},bs=(t,e,n,o,r)=>{var l,u;if(o){let f=e.value(),p=S(o.value()[0]);return W(p)?Nn(t,F(p),()=>e.value()[0],(l=r==null?void 0:r.join(","))!=null?l:f[1]):()=>{}}else if(n){let f=e.value();return Nn(t,F(n),()=>e.value()[0],(u=r==null?void 0:r.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 p=a[f];if(K(p)&&(p=p()),O(p))for(let h of Object.entries(p)){let g=h[0],d=()=>{let T=e.value()[f];return K(T)&&(T=T()),T=T[g],K(T)&&(T=T()),T},E=p[g+"_flags"];s.push(Nn(t,g,d,E))}else B(2,"r-on",t)}return i},On={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,mount:({el:t,parseResult:e,option:n,dynamicOption:o,flags:r})=>bs(t,e,n,o,r)},Ts=(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 o=n[1],r=n.includes("ctrl"),s=n.includes("shift"),i=n.includes("alt"),a=n.includes("meta"),c=l=>!(r&&!l.ctrlKey||s&&!l.shiftKey||i&&!l.altKey||a&&!l.metaKey);return o?[t,l=>c(l)?l.key.toUpperCase()===o.toUpperCase():!1]:[t,c]}return[t,n=>!0]},Nn=(t,e,n,o)=>{if(q(e))return B(5,"r-on",t),()=>{};let r=gs(o),s=r?{capture:r.capture,passive:r.passive,once:r.once}:void 0,i;[e,i]=Ts(e,o);let a=u=>{if(!i(u)||!n&&e==="submit"&&(r!=null&&r.prevent))return;let f=n(u);K(f)&&(f=f(u)),K(f)&&f(u)},c=()=>{t.removeEventListener(e,l,s)},l=u=>{if(!r){a(u);return}try{if(r.left&&u.button!==0||r.middle&&u.button!==1||r.right&&u.button!==2||r.self&&u.target!==t)return;r.stop&&u.stopPropagation(),r.prevent&&u.preventDefault(),a(u)}finally{r.once&&c()}};return t.addEventListener(e,l,s),c};var xs=(t,e,n,o)=>{if(n){o&&o.includes("camel")&&(n=F(n)),Xe(t,n,e[0]);return}let r=e.length;for(let s=0;s<r;++s){let i=e[s];if(w(i)){let a=i[0],c=i[1];Xe(t,a,c)}else if(O(i))for(let a of Object.entries(i)){let c=a[0],l=a[1];Xe(t,c,l)}else{let a=e[s++],c=e[s];Xe(t,a,c)}}},ko={mount:()=>({update:({el:t,values:e,option:n,flags:o})=>{xs(t,e,n,o)}})};function Cs(t){return!!t||t===""}var Xe=(t,e,n)=>{if(me(e)){B(3,":prop",t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(Ce),1),t[e]=n!=null?n:"";return}let o=t.tagName;if(e==="value"&&o!=="PROGRESS"&&!o.includes("-")){t._value=n;let s=o==="OPTION"?t.getAttribute("value"):t.value,i=n!=null?n:"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let r=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=Cs(n):n==null&&s==="string"?(n="",r=!0):s==="number"&&(n=0,r=!0)}try{t[e]=n}catch(s){r||B(4,e,o,n,s)}r&&t.removeAttribute(e)};var Mo={once:!0,mount:({el:t,parseResult:e,expr:n})=>{let o=e,r=o.value()[0],s=w(r),i=o.refs[0];return s?r.push(t):i?i==null||i(t):o.context[n]=t,()=>{if(s){let a=r.indexOf(t);a!==-1&&r.splice(a,1)}else i==null||i(null)}}};var Es=(t,e)=>{let n=Ue(t).data,o=n._ord;Wn(o)&&(o=n._ord=t.style.display),st(e[0])?t.style.display=o:t.style.display="none"},Lo={mount:()=>({update:({el:t,values:e})=>{Es(t,e)}})};var Rs=(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=n==null?void 0:n[r];if(w(s)){let a=s.length;for(let c=0;c<a;++c)Io(t,s[c],i==null?void 0:i[c])}else Io(t,s,i)}},Wt={mount:()=>({update:({el:t,values:e,previousValues:n})=>{Rs(t,e,n)}})},Io=(t,e,n)=>{let o=S(e),r=S(n),s=t.style,i=W(o);if(o&&!i){let a=o;if(r&&!W(r)){let c=r;for(let l in c)S(a[l])==null&&Mn(s,l,"")}for(let c in a)Mn(s,c,a[c])}else{let a=s.display;if(i?r!==o&&(s.cssText=o):r&&t.removeAttribute("style"),"_ord"in Ue(t).data)return;s.display=a}},Vo=/\s*!important$/;function Mn(t,e,n){let o=S(n);if(w(o))o.forEach(r=>{Mn(t,e,r)});else{let r=o==null?"":String(o);if(e.startsWith("--"))t.setProperty(e,r);else{let s=ws(t,e);Vo.test(r)?t.setProperty(Ke(s),r.replace(Vo,""),"important"):t[s]=r}}}var Po=["Webkit","Moz","ms"],kn={};function ws(t,e){let n=kn[e];if(n)return n;let o=F(e);if(o!=="filter"&&o in t)return kn[e]=o;o=ct(o);for(let r=0;r<Po.length;r++){let s=Po[r]+o;if(s in t)return kn[e]=s}return e}var ue=t=>Do(S(t)),Do=(t,e=new WeakMap)=>{if(!t||!O(t))return t;if(w(t))return t.map(ue);if(fe(t)){let o=new Set;for(let r of t.keys())o.add(ue(r));return o}if(Oe(t)){let o=new Map;for(let r of t)o.set(ue(r[0]),ue(r[1]));return o}if(e.has(t))return S(e.get(t));let n={...t};e.set(t,n);for(let o of Object.entries(n))n[o[0]]=Do(S(o[1]),e);return n};var vs=(t,e)=>{var o;let n=e[0];t.textContent=fe(n)?JSON.stringify(ue([...n])):Oe(n)?JSON.stringify(ue([...n])):O(n)?JSON.stringify(ue(n)):(o=n==null?void 0:n.toString())!=null?o:""},Uo={mount:()=>({update:({el:t,values:e})=>{vs(t,e)}})};var Ho={mount:()=>({update:({el:t,values:e})=>{Xe(t,"value",e[0])}})};var Ve=class Ve{constructor(e){m(this,"B",{});m(this,"p",{});m(this,"lt",()=>Object.keys(this.B).filter(e=>e.length===1||!e.startsWith(":")));m(this,"Z",new Map);m(this,"_",new Map);m(this,"forGrowThreshold",10);m(this,"globalContext");m(this,"useInterpolation",!0);m(this,"propValidationMode","throw");if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.It()}static getDefault(){var e;return(e=Ve.je)!=null?e:Ve.je=new Ve}It(){let e={},n=globalThis;for(let o of Ve.Lt.split(","))e[o]=n[o];return e.ref=ve,e.sref=ce,e.flatten=ue,e}addComponent(...e){for(let n of e){if(!n.defaultName){Fe.warning("Registered component's default name is not defined",n);continue}this.Z.set(ct(n.defaultName),n),this._.set(ct(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.B={".":ko,":":wn,"@":On,[`${e}on`]:On,[`${e}bind`]:wn,[`${e}html`]:Bt,[`${e}text`]:Uo,[`${e}show`]:Lo,[`${e}model`]:Co,":style":Wt,[`${e}style`]:Wt,[`${e}bind:style`]:Wt,":class":vn,[`${e}bind:class`]:vn,":ref":Mo,":value":Ho,[`${e}teleport`]:kt},this.p={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,context:":context",contextAlias:`${e}context`,bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.B,this.p)}};m(Ve,"je"),m(Ve,"Lt","Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console");var ye=Ve;var Gt=(t,e)=>{if(!t)return;let o=(e!=null?e:ye.getDefault()).p,r=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of As(t,o.pre,s))Ss(i,o.text,r,s)},Ss=(t,e,n,o)=>{var c;let r=t.textContent;if(!r)return;let s=n,i=r.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=Bo(l,o);if(u&&q(i[0])&&q(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=Bo(l,o);if(u){let f=document.createElement("span");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)},As=(t,e,n)=>{let o=[],r=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)})&&o.push(s);else{if((i=s==null?void 0:s.hasAttribute)!=null&&i.call(s,e))return;for(let a of we(s))r(a)}};return r(t),o},Bo=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var Ns=9,Os=10,ks=13,Ms=32,Ne=46,Jt=44,Ls=39,Is=34,Qt=40,Ye=41,Xt=91,Ln=93,In=63,Vs=59,jo=58,$o=123,Yt=125,Be=43,Zt=45,Vn=96,_o=47,Pn=92,Fo=new Set([2,3]),Jo={"=":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},Ps={"=>":2,...Jo,"||":3,"??":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"/":12,"%":12,"**":13},Qo=Object.keys(Jo),Ds=new Set(Qo),Un=new Set(["=>"]);Qo.forEach(t=>Un.add(t));var qo={true:!0,false:!1,null:null},Us="this",Ze="Expected ",je="Unexpected ",Bn="Unclosed ",Hs=Ze+":",zo=Ze+"expression",Bs="missing }",js=je+"object property",$s=Bn+"(",Ko=Ze+"comma",Wo=je+"token ",_s=je+"period",Dn=Ze+"expression after ",Fs="missing unaryOp argument",qs=Bn+"[",zs=Ze+"exponent (",Ks="Variable names cannot start with a number (",Ws=Bn+'quote after "',mt=t=>t>=48&&t<=57,Go=t=>Ps[t],Hn=class{constructor(e){m(this,"u");m(this,"e");this.u=e,this.e=0}get H(){return this.u.charAt(this.e)}get h(){return this.u.charCodeAt(this.e)}f(e){return this.u.charCodeAt(this.e)===e}K(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95||e>=128}le(e){return this.K(e)||mt(e)}i(e){return new Error(`${e} at character ${this.e}`)}g(){let e=this.h,n=this.u,o=this.e;for(;e===Ms||e===Ns||e===Os||e===ks;)e=n.charCodeAt(++o);this.e=o}parse(){let e=this.fe();return e.length===1?e[0]:{type:0,body:e}}fe(e){let n=[];for(;this.e<this.u.length;){let o=this.h;if(o===Vs||o===Jt)this.e++;else{let r=this.S();if(r)n.push(r);else if(this.e<this.u.length){if(o===e)break;throw this.i(je+'"'+this.H+'"')}}}return n}S(){var n;let e=(n=this.Pt())!=null?n:this.$e();return this.g(),this.Dt(e)}de(){this.g();let e=this.u,n=this.e,o=e.charCodeAt(n),r=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);if(isNaN(o))return!1;let a=!1,c=0;return o===62&&r===62&&s===62&&i===61?(a=">>>=",c=4):o===61&&r===61&&s===61?(a="===",c=3):o===33&&r===61&&s===61?(a="!==",c=3):o===62&&r===62&&s===62?(a=">>>",c=3):o===60&&r===60&&s===61?(a="<<=",c=3):o===62&&r===62&&s===61?(a=">>=",c=3):o===42&&r===42&&s===61?(a="**=",c=3):o===61&&r===62?(a="=>",c=2):o===124&&r===124?(a="||",c=2):o===63&&r===63?(a="??",c=2):o===38&&r===38?(a="&&",c=2):o===61&&r===61?(a="==",c=2):o===33&&r===61?(a="!=",c=2):o===60&&r===61?(a="<=",c=2):o===62&&r===61?(a=">=",c=2):o===60&&r===60?(a="<<",c=2):o===62&&r===62?(a=">>",c=2):o===43&&r===61?(a="+=",c=2):o===45&&r===61?(a="-=",c=2):o===42&&r===61?(a="*=",c=2):o===47&&r===61?(a="/=",c=2):o===37&&r===61?(a="%=",c=2):o===38&&r===61?(a="&=",c=2):o===94&&r===61?(a="^=",c=2):o===124&&r===61?(a="|=",c=2):o===42&&r===42?(a="**",c=2):o===105&&r===110?this.le(e.charCodeAt(n+2))||(a="in",c=2):o===61?(a="=",c=1):o===124?(a="|",c=1):o===94?(a="^",c=1):o===38?(a="&",c=1):o===60?(a="<",c=1):o===62?(a=">",c=1):o===43?(a="+",c=1):o===45?(a="-",c=1):o===42?(a="*",c=1):o===47?(a="/",c=1):o===37&&(a="%",c=1),a?(this.e+=c,a):!1}$e(){let e,n,o,r,s,i,a,c;if(s=this.z(),!s||(n=this.de(),!n))return s;if(r={value:n,prec:Go(n),right_a:Un.has(n)},i=this.z(),!i)throw this.i(Dn+n);let l=[s,r,i];for(;n=this.de();){o=Go(n),r={value:n,prec:o,right_a:Un.has(n)},c=n;let u=f=>r.right_a&&f.right_a?o>f.prec:o<=f.prec;for(;l.length>2&&u(l[l.length-2]);)i=l.pop(),n=l.pop().value,s=l.pop(),e=this._e(n,s,i),l.push(e);if(e=this.z(),!e)throw this.i(Dn+c);l.push(r,e)}for(a=l.length-1,e=l[a];a>1;)e=this._e(l[a-1].value,l[a-2],e),a-=2;return e}z(){let e;if(this.g(),e=this.Ut(),e)return this.me(e);let n=this.h;if(mt(n)||n===Ne)return this.Bt();if(n===Ls||n===Is)e=this.Ht();else if(n===Xt)e=this.jt();else{let o=this.$t();if(o){let r=this.z();if(!r)throw this.i(Fs);return this.me({type:7,operator:o,argument:r})}this.K(n)?(e=this.ye(),e.name in qo?e={type:4,value:qo[e.name],raw:e.name}:e.name===Us&&(e={type:5})):n===Qt&&(e=this._t())}return e?(e=this.W(e),this.me(e)):!1}_e(e,n,o){if(e==="=>"){let r=n.type===1?n.expressions:[n];return{type:15,params:r,body:o}}return Ds.has(e)?{type:16,operator:e,left:n,right:o}:{type:8,operator:e,left:n,right:o}}Ut(){let e={node:!1};return this.Ft(e),e.node||(this.qt(e),e.node)||(this.Kt(e),e.node)||(this.Fe(e),e.node)||this.zt(e),e.node}me(e){let n={node:e};return this.Wt(n),this.Gt(n),this.Jt(n),n.node}$t(){let e=this.u,n=this.e,o=e.charCodeAt(n),r=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);return o===Zt?(this.e++,"-"):o===33?(this.e++,"!"):o===126?(this.e++,"~"):o===Be?(this.e++,"+"):o===110&&r===101&&s===119&&!this.le(i)?(this.e+=3,"new"):!1}Pt(){let e={};return this.Qt(e),e.node}Dt(e){let n={node:e};return this.Xt(n),n.node}W(e){this.g();let n=this.h;for(;n===Ne||n===Xt||n===Qt||n===In;){let o;if(n===In){if(this.u.charCodeAt(this.e+1)!==Ne)break;o=!0,this.e+=2,this.g(),n=this.h}if(this.e++,n===Xt){if(e={type:3,computed:!0,object:e,property:this.S()},this.g(),n=this.h,n!==Ln)throw this.i(qs);this.e++}else n===Qt?e={type:6,arguments:this.qe(Ye),callee:e}:(o&&this.e--,this.g(),e={type:3,computed:!1,object:e,property:this.ye()});o&&(e.optional=!0),this.g(),n=this.h}return e}Bt(){let e=this.u,n=this.e,o=n;for(;mt(e.charCodeAt(o));)o++;if(e.charCodeAt(o)===Ne)for(o++;mt(e.charCodeAt(o));)o++;let r=e.charCodeAt(o);if(r===101||r===69){o++;let a=e.charCodeAt(o);(a===Be||a===Zt)&&o++;let c=o;for(;mt(e.charCodeAt(o));)o++;if(c===o){this.e=o;let l=e.slice(n,o);throw this.i(zs+l+this.H+")")}}this.e=o;let s=e.slice(n,o),i=e.charCodeAt(o);if(this.K(i))throw this.i(Ks+s+this.H+")");if(i===Ne||s.length===1&&s.charCodeAt(0)===Ne)throw this.i(_s);return{type:4,value:parseFloat(s),raw:s}}Ht(){let e=this.u,n=e.length,o=this.e,r=e.charCodeAt(this.e++),s=this.e,i=s,a=[],c=!1,l=!1;for(;s<n;){let f=e.charCodeAt(s);if(f===r){l=!0,this.e=s+1;break}if(f===Pn){c||(c=!0),a.push(e.slice(i,s));let p=e.charCodeAt(s+1);a.push(this.Ke(p)),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(Ws+u+'"');return{type:4,value:u,raw:e.substring(o,this.e)}}Ke(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)}}ye(){let e=this.h,n=this.e;if(this.K(e))this.e++;else throw this.i(je+this.H);for(;this.e<this.u.length&&(e=this.h,this.le(e));)this.e++;return{type:2,name:this.u.slice(n,this.e)}}qe(e){let n=[],o=!1,r=0;for(;this.e<this.u.length;){this.g();let s=this.h;if(s===e){if(o=!0,this.e++,e===Ye&&r&&r>=n.length)throw this.i(Wo+String.fromCharCode(e));break}else if(s===Jt){if(this.e++,r++,r!==n.length){if(e===Ye)throw this.i(Wo+",");for(let i=n.length;i<r;i++)n.push(null)}}else{if(n.length!==r&&r!==0)throw this.i(Ko);{let i=this.S();if(!i||i.type===0)throw this.i(Ko);n.push(i)}}}if(!o)throw this.i(Ze+String.fromCharCode(e));return n}_t(){this.e++;let e=this.fe(Ye);if(this.f(Ye))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i($s)}jt(){return this.e++,{type:9,elements:this.qe(Ln)}}Ft(e){if(this.f($o)){this.e++;let n=[];for(;!isNaN(this.h);){if(this.g(),this.f(Yt)){this.e++,e.node=this.W({type:10,properties:n});return}let o=this.S();if(!o)break;if(this.g(),o.type===2&&(this.f(Jt)||this.f(Yt)))n.push({type:12,computed:!1,key:o,value:o,shorthand:!0});else if(this.f(jo)){this.e++;let r=this.S();if(!r)throw this.i(js);let s=o.type===9;n.push({type:12,computed:s,key:s?o.elements[0]:o,value:r,shorthand:!1}),this.g()}else n.push(o);this.f(Jt)&&this.e++}throw this.i(Bs)}}qt(e){let n=this.h;if((n===Be||n===Zt)&&n===this.u.charCodeAt(this.e+1)){this.e+=2;let o=e.node={type:13,operator:n===Be?"++":"--",argument:this.W(this.ye()),prefix:!0};if(!o.argument||!Fo.has(o.argument.type))throw this.i(je+o.operator)}}Gt(e){let n=e.node,o=this.h;if((o===Be||o===Zt)&&o===this.u.charCodeAt(this.e+1)){if(!Fo.has(n.type))throw this.i(je+(o===Be?"++":"--"));this.e+=2,e.node={type:13,operator:o===Be?"++":"--",argument:n,prefix:!1}}}Kt(e){this.u.charCodeAt(this.e)===Ne&&this.u.charCodeAt(this.e+1)===Ne&&this.u.charCodeAt(this.e+2)===Ne&&(this.e+=3,e.node={type:14,argument:this.S()})}Xt(e){if(e.node&&this.f(In)){this.e++;let n=e.node,o=this.S();if(!o)throw this.i(zo);if(this.g(),this.f(jo)){this.e++;let r=this.S();if(!r)throw this.i(zo);e.node={type:11,test:n,consequent:o,alternate:r}}else throw this.i(Hs)}}Qt(e){if(this.g(),this.f(Qt)){let n=this.e;if(this.e++,this.g(),this.f(Ye)){this.e++;let o=this.de();if(o==="=>"){let r=this.$e();if(!r)throw this.i(Dn+o);e.node={type:15,params:null,body:r};return}}this.e=n}}Jt(e){let n=e.node,o=n.type;(o===2||o===3)&&this.f(Vn)&&(e.node={type:17,tag:n,quasi:this.Fe(e)})}Fe(e){if(!this.f(Vn))return;let n=this.u,o=n.length,r={type:19,quasis:[],expressions:[]},s=++this.e,i=[],a=[],c=!1,l=u=>{if(!c){let h=n.slice(s,this.e);return r.quasis.push({type:18,value:{raw:h,cooked:h},tail:u})}i.push(n.slice(s,this.e)),a.push(n.slice(s,this.e));let f=i.join(""),p=a.join("");return i.length=0,a.length=0,c=!1,r.quasis.push({type:18,value:{raw:f,cooked:p},tail:u})};for(;this.e<o;){let u=n.charCodeAt(this.e);if(u===Vn)return l(!0),this.e+=1,e.node=r,r;if(u===36&&n.charCodeAt(this.e+1)===$o){if(l(!1),this.e+=2,r.expressions.push(...this.fe(Yt)),!this.f(Yt))throw this.i("unclosed ${");this.e+=1,s=this.e}else if(u===Pn){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.Ke(f)),this.e+=2,s=this.e}else this.e+=1}throw this.i("Unclosed `")}Wt(e){let n=e.node;if(!n||n.operator!=="new"||!n.argument)return;if(!n.argument||![6,3].includes(n.argument.type))throw this.i("Expected new function()");e.node=n.argument;let o=e.node;for(;o.type===3||o.type===6&&o.callee.type===3;)o=o.type===3?o.object:o.callee.object;o.type=20}zt(e){if(!this.f(_o))return;let n=++this.e,o=!1;for(;this.e<this.u.length;){if(this.h===_o&&!o){let r=this.u.slice(n,this.e),s="";for(;++this.e<this.u.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(r,s)}catch(a){throw this.i(a.message)}return e.node={type:4,value:i,raw:this.u.slice(n-1,this.e)},e.node=this.W(e.node),e.node}this.f(Xt)?o=!0:o&&this.f(Ln)&&(o=!1),this.e+=this.f(Pn)?2:1}throw this.i("Unclosed Regex")}},Xo=t=>new Hn(t).parse();var Gs={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(t,e)=>{},"+=":(t,e)=>{},"-=":(t,e)=>{},"<<=":(t,e)=>{},">>=":(t,e)=>{},">>>=":(t,e)=>{},"&=":(t,e)=>{},"^=":(t,e)=>{},"|=":(t,e)=>{},"||":(t,e)=>t()||e(),"??":(t,e)=>{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)=>t**e},Js={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},tr=t=>{if(!(t!=null&&t.some(er)))return t;let e=[];return t.forEach(n=>er(n)?e.push(...n):e.push(n)),e},Yo=(...t)=>tr(t),jn=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},Qs={"++":(t,e)=>{let n=t[e];if(C(n)){let o=n();return n(++o),o}return++t[e]},"--":(t,e)=>{let n=t[e];if(C(n)){let o=n();return n(--o),o}return--t[e]}},Xs={"++":(t,e)=>{let n=t[e];if(C(n)){let o=n();return n(o+1),o}return t[e]++},"--":(t,e)=>{let n=t[e];if(C(n)){let o=n();return n(o-1),o}return t[e]--}},Zo={"=":(t,e,n)=>{let o=t[e];return C(o)?o(n):t[e]=n},"+=":(t,e,n)=>{let o=t[e];return C(o)?o(o()+n):t[e]+=n},"-=":(t,e,n)=>{let o=t[e];return C(o)?o(o()-n):t[e]-=n},"*=":(t,e,n)=>{let o=t[e];return C(o)?o(o()*n):t[e]*=n},"/=":(t,e,n)=>{let o=t[e];return C(o)?o(o()/n):t[e]/=n},"%=":(t,e,n)=>{let o=t[e];return C(o)?o(o()%n):t[e]%=n},"**=":(t,e,n)=>{let o=t[e];return C(o)?o(o()**n):t[e]**=n},"<<=":(t,e,n)=>{let o=t[e];return C(o)?o(o()<<n):t[e]<<=n},">>=":(t,e,n)=>{let o=t[e];return C(o)?o(o()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let o=t[e];return C(o)?o(o()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let o=t[e];return C(o)?o(o()|n):t[e]|=n},"&=":(t,e,n)=>{let o=t[e];return C(o)?o(o()&n):t[e]&=n},"^=":(t,e,n)=>{let o=t[e];return C(o)?o(o()^n):t[e]^=n}},en=(t,e)=>K(t)?t.bind(e):t,$n=class{constructor(e,n,o,r,s){m(this,"l");m(this,"ze");m(this,"We");m(this,"Ge");m(this,"A");m(this,"Je");m(this,"Qe");this.l=w(e)?e:[e],this.ze=n,this.We=o,this.Ge=r,this.Qe=!!s}Xe(e,n){if(n&&e in n)return n;for(let o of this.l)if(e in o)return o}2(e,n,o){let r=e.name;if(r==="$root")return this.l[this.l.length-1];if(r==="$parent")return this.l[1];if(r==="$ctx")return[...this.l];if(o&&r in o)return this.A=o[r],en(S(o[r]),o);for(let i of this.l)if(r in i)return this.A=i[r],en(S(i[r]),i);let s=this.ze;if(s&&r in s)return this.A=s[r],en(S(s[r]),s)}5(e,n,o){return this.l[0]}0(e,n,o){return this.Ye(n,o,Yo,...e.body)}1(e,n,o){return this.C(n,o,(...r)=>r.pop(),...e.expressions)}3(e,n,o){let{obj:r,key:s}=this.he(e,n,o),i=r==null?void 0:r[s];return this.A=i,en(S(i),r)}4(e,n,o){return e.value}6(e,n,o){let r=(i,...a)=>K(i)?i(...tr(a)):i,s=this.C(++n,o,r,e.callee,...e.arguments);return this.A=s,s}7(e,n,o){return this.C(n,o,Js[e.operator],e.argument)}8(e,n,o){let r=Gs[e.operator];switch(e.operator){case"||":case"&&":case"??":return r(()=>this.b(e.left,n,o),()=>this.b(e.right,n,o))}return this.C(n,o,r,e.left,e.right)}9(e,n,o){return this.Ye(++n,o,Yo,...e.elements)}10(e,n,o){let r={},s=(...i)=>{i.forEach(a=>{Object.assign(r,a)})};return this.C(++n,o,s,...e.properties),r}11(e,n,o){return this.C(n,o,r=>this.b(r?e.consequent:e.alternate,n,o),e.test)}12(e,n,o){var u;let r={},s=f=>(f==null?void 0:f.type)!==15,i=(u=this.Ge)!=null?u:()=>!1,a=n===0&&this.Qe,c=f=>this.Ze(a,e.key,n,jn(f,o)),l=f=>this.Ze(a,e.value,n,jn(f,o));if(e.shorthand){let f=e.key.name;r[f]=s(e.key)&&i(f,n)?c:c()}else if(e.computed){let f=S(c());r[f]=s(e.value)&&i(f,n)?l:l()}else{let f=e.key.type===4?e.key.value:e.key.name;r[f]=s(e.value)&&i(f,n)?()=>l:l()}return r}he(e,n,o){let r=this.b(e.object,n,o),s=e.computed?this.b(e.property,n,o):e.property.name;return{obj:r,key:s}}13(e,n,o){let r=e.argument,s=e.operator,i=e.prefix?Qs:Xs;if(r.type===2){let a=r.name,c=this.Xe(a,o);return me(c)?void 0:i[s](c,a)}if(r.type===3){let{obj:a,key:c}=this.he(r,n,o);return i[s](a,c)}}16(e,n,o){let r=e.left,s=e.operator;if(r.type===2){let i=r.name,a=this.Xe(i,o);if(me(a))return;let c=this.b(e.right,n,o);return Zo[s](a,i,c)}if(r.type===3){let{obj:i,key:a}=this.he(r,n,o),c=this.b(e.right,n,o);return Zo[s](i,a,c)}}14(e,n,o){let r=this.b(e.argument,n,o);return w(r)&&(r.s=nr),r}17(e,n,o){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,o)}19(e,n,o){let r=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.C(n,o,r,...e.expressions)}18(e,n,o){return e.value.cooked}20(e,n,o){let r=(s,...i)=>new s(...i);return this.C(n,o,r,e.callee,...e.arguments)}15(e,n,o){return(...r)=>{let s=Object.create(o!=null?o:{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=r[a++]}return this.b(e.body,n,s)}}b(e,n,o){let r=S(this[e.type](e,n,o));return this.Je=e.type,r}Ze(e,n,o,r){let s=this.b(n,o,r);return e&&this.et()?this.A:s}et(){let e=this.Je;return(e===2||e===3||e===6)&&C(this.A)}eval(e,n){let{value:o,refs:r}=xn(()=>this.b(e,-1,n)),s={value:o,refs:r};return this.et()&&(s.ref=this.A),s}C(e,n,o,...r){let s=r.map(i=>i&&this.b(i,e,n));return o(...s)}Ye(e,n,o,...r){let s=this.We;if(!s)return this.C(e,n,o,...r);let i=r.map((a,c)=>a&&(a.type!==15&&s(c,e)?l=>this.b(a,e,jn(l,n)):this.b(a,e,n)));return o(...i)}},nr=Symbol("s"),er=t=>(t==null?void 0:t.s)===nr,or=(t,e,n,o,r,s,i)=>new $n(e,n,o,r,i).eval(t,s);var rr={},sr=t=>!!t,tn=class{constructor(e,n){m(this,"l");m(this,"r");m(this,"tt",[]);this.l=e,this.r=n}w(e){this.l=[e,...this.l]}ee(){return this.l.map(n=>n.components).filter(sr).reverse().reduce((n,o)=>{for(let[r,s]of Object.entries(o))n[r.toUpperCase()]=s;return n},{})}ut(){let e=[],n=new Set,o=this.l.map(r=>r.components).filter(sr).reverse();for(let r of o)for(let s of Object.keys(r))n.has(s)||(n.add(s),e.push(s));return e}O(e,n,o,r,s){var T;let i=[],a=[],c=new Set,l=()=>{for(let R=0;R<a.length;++R)a[R]();a.length=0},p={value:()=>i,stop:()=>{l(),c.clear()},subscribe:(R,L)=>(c.add(R),L&&R(i),()=>{c.delete(R)}),refs:[],context:this.l[0]};if(q(e))return p;let h=this.r.globalContext,g=[],d=new Set,E=(R,L,X,D)=>{try{let H=or(R,L,h,n,o,D,r);return X&&H.refs.length>0&&g.push(...H.refs),{value:H.value,refs:H.refs,ref:H.ref}}catch(H){B(6,`evaluation error: ${e}`,H)}return{value:void 0,refs:[]}};try{let R=(T=rr[e])!=null?T:Xo("["+e+"]");rr[e]=R;let L=this.l.slice(),X=R.elements,D=X.length,H=new Array(D);p.refs=H;let le=()=>{g.length=0,s||(d.clear(),l());let Y=new Array(D);for(let I=0;I<D;++I){let b=X[I];if(n!=null&&n(I,-1)){Y[I]=j=>E(b,L,!1,{$event:j}).value;continue}let k=E(b,L,!0);Y[I]=k.value,H[I]=k.ref}if(!s)for(let I of g)d.has(I)||(d.add(I),a.push(ie(I,le)));if(i=Y,c.size!==0)for(let I of c)c.has(I)&&I(i)};le()}catch(R){B(6,`parse error: ${e}`,R)}return p}L(){return this.l.slice()}ce(e){this.tt.push(this.l),this.l=e}E(e,n){try{this.ce(e),n()}finally{this.Yt()}}Yt(){var e;this.l=(e=this.tt.pop())!=null?e:[]}};var ir=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},Ys=(t,e)=>{let n="";for(let o=e;o<t.length;++o){let r=t[o];if(n){r===n&&(n="");continue}if(r==='"'||r==="'"){n=r;continue}if(r===">")return o}return-1},Zs=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
3
+ `);)++n;if(n>=t.length||!ir(t[n]))return null;let o=n;for(;n<t.length&&ir(t[n]);)++n;return{start:o,end:n}},ar=new Set(["table","thead","tbody","tfoot"]),ei=new Set(["thead","tbody","tfoot"]),ti=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),ni=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),cr=(t,e)=>`${t.slice(0,t.length-2)}></${e}>`,nn=t=>{var s;let e=0,n=[],o=[],r=0;for(;e<t.length;){let i=t.indexOf("<",e);if(i===-1){n.push(t.slice(e));break}if(n.push(t.slice(e,i)),t.startsWith("<!--",i)){let T=t.indexOf("-->",i+4);if(T===-1){n.push(t.slice(i));break}n.push(t.slice(i,T+3)),e=T+3;continue}let a=Ys(t,i);if(a===-1){n.push(t.slice(i));break}let c=t.slice(i,a+1),l=c.startsWith("</");if(c.startsWith("<!")||c.startsWith("<?")){n.push(c),e=a+1;continue}let f=Zs(c,l);if(!f){n.push(c),e=a+1;continue}let p=c.slice(f.start,f.end);if(l){let T=o[o.length-1];T?(o.pop(),n.push(T.replacementHost?`</${T.replacementHost}>`:c),ar.has(T.effectiveTag)&&--r):n.push(c),e=a+1;continue}let h=c.charCodeAt(c.length-2)===47,g=o[o.length-1],d=null;r===0?p==="tr"?d="trx":p==="td"?d="tdx":p==="th"&&(d="thx"):ei.has((s=g==null?void 0:g.effectiveTag)!=null?s:"")?d=p==="tr"?null:"tr":(g==null?void 0:g.effectiveTag)==="table"?d=ti.has(p)?null:"tr":(g==null?void 0:g.effectiveTag)==="tr"&&(d=p==="td"||p==="th"?null:"td");let E=h&&!ni.has(d||p);if(d){let T=d==="trx"||d==="tdx"||d==="thx",R=`${c.slice(0,f.start)}${d} is="${T?`r-${p}`:`regor:${p}`}"${c.slice(f.end)}`;n.push(E?cr(R,d):R)}else n.push(E?cr(c,p):c);if(!h){let T=d==="trx"?"tr":d==="tdx"?"td":d==="thx"?"th":d||p;o.push({replacementHost:d,effectiveTag:T}),ar.has(T)&&++r}e=a+1}return n.join("")};var oi="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(oi.toUpperCase().split(",")),si="http://www.w3.org/2000/svg",ur=(t,e)=>{de(t)?t.content.appendChild(e):t.appendChild(e)},_n=(t,e,n,o)=>{var i;let r=t.t;if(r){let a=n&&ri.has(r.toUpperCase())?document.createElementNS(si,r.toLowerCase()):document.createElement(r),c=t.a;if(c)for(let u of Object.entries(c)){let f=u[0],p=u[1];f.startsWith("#")&&(p=f.substring(1),f="name"),a.setAttribute(Ot(f,o),p)}let l=t.c;if(l)for(let u of l)_n(u,a,n,o);ur(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)ur(e,a);else throw new Error("unsupported node type.")}},et=(t,e,n)=>{n!=null||(n=ye.getDefault());let o=document.createDocumentFragment();if(!w(t))return _n(t,o,!!e,n),o;for(let r of t)_n(r,o,!!e,n);return o};var ii=(t,e={selector:"#app"},n)=>{W(e)&&(e={selector:"#app",template:e}),ao(t)&&(t=t.context);let o=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!o||!Ee(o))throw _(0);n||(n=ye.getDefault());let r=()=>{for(let a of[...o.childNodes])Q(a)},s=a=>{for(;a.length>0;)o.appendChild(a[0])};if(e.template){let a=document.createRange().createContextualFragment(nn(e.template));r(),s(a.childNodes),e.element=a}else if(e.json){let a=et(e.json,e.isSVG,n);r(),s(a.childNodes)}return n.useInterpolation&&Gt(o,n),new Fn(t,o,n).y(),G(o,()=>{ke(t)}),Mt(t),{context:t,unmount:()=>{Q(o)},unbind:()=>{Ce(o)}}},Fn=class{constructor(e,n,o){m(this,"Zt");m(this,"nt");m(this,"r");m(this,"m");m(this,"o");this.Zt=e,this.nt=n,this.r=o,this.m=new tn([e],o),this.o=new qt(this.m)}y(){this.o.$(this.nt)}};var dt=t=>{if(w(t))return t.map(r=>dt(r));let e={};if(t.tagName)e.t=t.tagName;else return t.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),t.textContent&&(e.d=t.textContent),e;let n=t.getAttributeNames();n.length>0&&(e.a=Object.fromEntries(n.map(r=>{var s;return[r,(s=t.getAttribute(r))!=null?s:""]})));let o=we(t);return o.length>0&&(e.c=[...o].map(r=>dt(r))),e};var ai=(t,e={})=>{var s,i,a,c,l,u;w(e)&&(e={props:e}),W(t)&&(t={template:t});let n=(s=e.context)!=null?s:()=>({}),o=!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 _(1,t.selector);f.remove(),t.element=f}else if(t.template){let f=document.createRange().createContextualFragment(nn(t.template));t.element=f}else t.json&&(t.element=et(t.json,t.isSVG,e.config),o=!0);t.element||(t.element=document.createDocumentFragment()),((i=e.useInterpolation)==null||i)&&Gt(t.element,(a=e.config)!=null?a:ye.getDefault());let r=t.element;if(!o&&(((l=t.isSVG)!=null?l:at(r)&&((c=r.hasAttribute)!=null&&c.call(r,"isSVG")))||at(r)&&r.querySelector("[isSVG]"))){let f=r.content,p=f?[...f.childNodes]:[...r.childNodes],h=dt(p);t.element=et(h,!0,e.config)}return{context:n,template:t.element,inheritAttrs:(u=e.inheritAttrs)!=null?u:!0,props:e.props,defaultName:e.defaultName}};var qn=class{constructor(){m(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 ci=t=>{var e;(e=De())==null||e.onMounted.push(t)};var ui=t=>{let e,n={},o=(...r)=>{if(r.length<=2&&0 in r)throw _(4);return e&&!n.isStopped?e(...r):(e=fi(t,n),e(...r))};return o[ee]=1,Ie(o,!0),o.stop=()=>{var r,s;return(s=(r=n.ref)==null?void 0:r.stop)==null?void 0:s.call(r)},re(()=>o.stop(),!0),o},fi=(t,e)=>{var s;let n=(s=e.ref)!=null?s:ce(null);e.ref=n,e.isStopped=!1;let o=0,r=Je(()=>{if(o>0){r(),e.isStopped=!0,te(n);return}n(t()),++o});return n.stop=r,n};var li=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw _(4);return o&&!n.isStopped?o(...s):(o=pi(t,e,n),o(...s))};return r[ee]=1,Ie(r,!0),r.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},re(()=>r.stop(),!0),r},pi=(t,e,n)=>{var a;let o=(a=n.ref)!=null?a:ce(null);n.ref=o,n.isStopped=!1;let r=0,s=c=>{if(r>0){o.stop(),n.isStopped=!0,te(o);return}let l=t.map(u=>u());o(e(...l)),++r},i=[];for(let c of t){let l=ie(c,s);i.push(l)}return s(null),o.stop=()=>{i.forEach(c=>{c()})},o};var mi=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw _(4);return o&&!n.isStopped?o(...s):(o=di(t,e,n),o(...s))};return r[ee]=1,Ie(r,!0),r.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},re(()=>r.stop(),!0),r},di=(t,e,n)=>{var s;let o=(s=n.ref)!=null?s:ce(null);n.ref=o,n.isStopped=!1;let r=0;return o.stop=ie(t,i=>{if(r>0){o.stop(),n.isStopped=!0,te(o);return}o(e(i)),++r},!0),o};var hi=t=>(t[Ct]=1,t);var yi=(t,e)=>{if(!e)throw _(5);let o=Ge(t)?ve:a=>a,r=()=>localStorage.setItem(e,JSON.stringify(ue(t()))),s=localStorage.getItem(e);if(s!=null)try{t(o(JSON.parse(s)))}catch(a){B(6,`persist: failed to parse data for key ${e}`,a),r()}else r();let i=Je(r);return re(i,!0),t};var zn=(t,...e)=>{let n="",o=t,r=e,s=o.length,i=r.length;for(let a=0;a<s;++a)n+=o[a],a<i&&(n+=r[a]);return n},gi=zn,bi=zn;var Ti=(t,e,n)=>{let o=[],r=()=>{e(t.map(i=>i()))};for(let i of t)o.push(ie(i,r));n&&r();let s=()=>{for(let i of o)i()};return re(s,!0),s};var xi=t=>{if(!C(t))throw _(3,"observerCount");return t(void 0,void 0,2)};var Ci=t=>{fr();try{t()}finally{lr()}},fr=()=>{Te.stack||(Te.stack=[]),Te.stack.push(new Set)},lr=()=>{let t=Te.stack;if(!t||t.length===0)return;let e=t.pop();if(t.length){let n=t[t.length-1];for(let o of e)n.add(o);return}delete Te.stack;for(let n of e)try{te(n)}catch(o){console.error(o)}};export{rt as ComponentHead,qn as ContextRegistry,ye as RegorConfig,G as addUnbinder,Ci as batch,xn as collectRefs,li as computeMany,mi as computeRef,ui as computed,ii as createApp,ai as defineComponent,hr as drainUnbind,lr as endBatch,ut as entangle,ue as flatten,Ue as getBindData,zn as html,Ge as isDeepRef,ft as isRaw,C as isRef,hi as markRaw,ie as observe,Ti as observeMany,xi as observerCount,ci as onMounted,re as onUnmounted,Sn as pause,yi as persist,Ir as pval,gi as raw,ve as ref,Q as removeNode,An as resume,Tn as silence,ce as sref,fr as startBatch,bi as svg,et as toFragment,dt as toJsonTemplate,te as trigger,Ce as unbind,S as unref,gn as useScope,Fe as warningHandler,Je as watchEffect};