regor 1.7.1 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/regor.d.ts +23 -0
- package/dist/regor.es2015.cjs.js +9 -0
- package/dist/regor.es2015.cjs.prod.js +3 -3
- package/dist/regor.es2015.esm.js +9 -0
- package/dist/regor.es2015.esm.prod.js +3 -3
- package/dist/regor.es2015.iife.js +9 -0
- package/dist/regor.es2015.iife.prod.js +3 -3
- package/dist/regor.es2019.cjs.js +9 -0
- package/dist/regor.es2019.cjs.prod.js +3 -3
- package/dist/regor.es2019.esm.js +9 -0
- package/dist/regor.es2019.esm.prod.js +3 -3
- package/dist/regor.es2019.iife.js +9 -0
- package/dist/regor.es2019.iife.prod.js +3 -3
- package/dist/regor.es2022.cjs.js +9 -0
- package/dist/regor.es2022.cjs.prod.js +3 -3
- package/dist/regor.es2022.esm.js +9 -0
- package/dist/regor.es2022.esm.prod.js +3 -3
- package/dist/regor.es2022.iife.js +9 -0
- package/dist/regor.es2022.iife.prod.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ Its template syntax is familiar to Vue users (`r-if`, `r-model`, `r-for`, `r-bin
|
|
|
24
24
|
/>
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
- **Flexible Reactivity:** Combine `ref`, `sref`, `batch`, `pause`, `resume`, and `entangle` for explicit state orchestration.
|
|
27
|
+
- **Flexible Reactivity:** Combine `ref`, `cref`, `sref`, `batch`, `pause`, `resume`, and `entangle` for explicit state orchestration.
|
|
28
28
|
- **Static-First + Islands:** Bind to existing DOM without removing server-rendered HTML, ideal for progressive enhancement.
|
|
29
29
|
- **Reentrance:** Mount multiple times in already-mounted regions with same or different app contexts.
|
|
30
30
|
- **Compatibility:** Rendered pages are designed for seamless integration with other libraries manipulating the DOM.
|
|
@@ -340,7 +340,7 @@ Regor is openly inspired by Vue’s concepts (even adopting a similar directive
|
|
|
340
340
|
### Reactivity control model
|
|
341
341
|
|
|
342
342
|
- **Vue:** Uses ES6 Proxies for a highly automated, "magical" reactivity system. You update an object, and Vue figures out what to re-render. However, this magic can sometimes abstract away performance bottlenecks, leading to over-rendering if you aren't careful with deep reactivity.
|
|
343
|
-
- **Regor:** Provides fine-tuned, manual control. It offers `ref` (deep reactivity) and `sref` (simple/shallow reactivity without nested observation). Furthermore, Regor provides advanced control APIs like `pause()` and `resume()` to stop a ref's auto-triggers, `entangle()` to sync two refs effortlessly, and `batch()` for precise state grouping.
|
|
343
|
+
- **Regor:** Provides fine-tuned, manual control. It offers `ref` (deep in-place reactivity), `cref` (copy-first deep reactivity), and `sref` (simple/shallow reactivity without nested observation). Furthermore, Regor provides advanced control APIs like `pause()` and `resume()` to stop a ref's auto-triggers, `entangle()` to sync two refs effortlessly, and `batch()` for precise state grouping.
|
|
344
344
|
- **Verdict:** Vue's reactivity is easier for beginners.. Regor’s reactivity is more flexible and transparent, giving engineers exact tools to orchestrate update semantics and prevent unwanted DOM paints.
|
|
345
345
|
|
|
346
346
|
### TypeScript ergonomics
|
|
@@ -428,6 +428,7 @@ These directives empower you to create dynamic and interactive user interfaces,
|
|
|
428
428
|
**Reactivity Functions**
|
|
429
429
|
|
|
430
430
|
- **`ref`** Creates a deep ref object recursively, modifying the source object in place.
|
|
431
|
+
- **`cref`** Creates a deep ref object recursively from a flattened copy of the source object.
|
|
431
432
|
- **`sref`** Creates a simple ref object from a given value, without nested ref creation.
|
|
432
433
|
- **`isDeepRef`** Returns true if a given ref is created with `ref()` function.
|
|
433
434
|
- **`isRef`** Returns true for any ref, false for non-refs.
|
package/dist/regor.d.ts
CHANGED
|
@@ -778,11 +778,21 @@ export declare const observerCount: <TValueType extends AnyRef>(source: TValueTy
|
|
|
778
778
|
export declare const batch: (updater: () => void) => void;
|
|
779
779
|
export declare const startBatch: () => void;
|
|
780
780
|
export declare const endBatch: () => void;
|
|
781
|
+
/**
|
|
782
|
+
* Creates a deep ref from a flattened copy of the given value.
|
|
783
|
+
*
|
|
784
|
+
* Unlike `ref`, this does not mutate the original object graph during initial
|
|
785
|
+
* conversion. cref is slower than ref. Use it when you need to preserve original object.
|
|
786
|
+
*/
|
|
787
|
+
export declare function cref<TValueType>(value?: TValueType | RefContent<TValueType> | (TValueType extends Ref<infer V1> ? Ref<RefParam<V1>> : never) | (TValueType extends SRef<infer V2> ? SRef<UnwrapRef<V2>> : never) | RefParam<TValueType> | (TValueType extends Array<infer V1> ? V1[] : never) | null): IsNull<TValueType> extends true ? Ref<unknown> : Ref<RefParam<TValueType>>;
|
|
781
788
|
export declare const entangle: (r1: AnyRef, r2: AnyRef) => StopObserving;
|
|
782
789
|
export declare const isDeepRef: (value: unknown) => value is AnyRef;
|
|
783
790
|
export declare const isRef: (value: unknown) => value is AnyRef;
|
|
784
791
|
export declare const pause: <TValueType extends AnyRef>(source: TValueType) => void;
|
|
785
792
|
/**
|
|
793
|
+
* The ref function mutates given value in place. Use it with caution.
|
|
794
|
+
* If you need to create ref without mutating use cref (which is slower).
|
|
795
|
+
*
|
|
786
796
|
* Converts the given value and its nested properties into ref objects recursively and returns the ref.
|
|
787
797
|
* The returned object's type reflects its nested properties as well.
|
|
788
798
|
*
|
|
@@ -840,3 +850,16 @@ export declare function ref<TValueType>(
|
|
|
840
850
|
object,
|
|
841
851
|
): IsNull<TValueType> extends true ? Ref<unknown> : Ref<RefParam<TValueType>>
|
|
842
852
|
export declare function ref(value: string, eventSource?: unknown): Ref<string>
|
|
853
|
+
|
|
854
|
+
export declare function cref(value: string): Ref<string>
|
|
855
|
+
export declare function cref(value: number): Ref<number>
|
|
856
|
+
export declare function cref(value: boolean): Ref<boolean>
|
|
857
|
+
export declare function cref(value: bigint): Ref<bigint>
|
|
858
|
+
export declare function cref(value: symbol): Ref<symbol>
|
|
859
|
+
export declare function cref<TValueType>(
|
|
860
|
+
value: (TValueType extends RawTypes | readonly unknown[]
|
|
861
|
+
? never
|
|
862
|
+
: RefInit<TValueType>) &
|
|
863
|
+
object,
|
|
864
|
+
): IsNull<TValueType> extends true ? Ref<unknown> : Ref<RefParam<TValueType>>
|
|
865
|
+
export declare function cref(value: string, eventSource?: unknown): Ref<string>
|
package/dist/regor.es2015.cjs.js
CHANGED
|
@@ -69,6 +69,7 @@ __export(index_exports, {
|
|
|
69
69
|
computeRef: () => computeRef,
|
|
70
70
|
computed: () => computed,
|
|
71
71
|
createApp: () => createApp,
|
|
72
|
+
cref: () => cref,
|
|
72
73
|
defineComponent: () => defineComponent,
|
|
73
74
|
drainUnbind: () => drainUnbind,
|
|
74
75
|
endBatch: () => endBatch,
|
|
@@ -4233,6 +4234,8 @@ var flatten = (reference) => {
|
|
|
4233
4234
|
var flattenContent = (value, weakMap = /* @__PURE__ */ new WeakMap()) => {
|
|
4234
4235
|
if (!value) return value;
|
|
4235
4236
|
if (!isObject(value)) return value;
|
|
4237
|
+
if (value instanceof Node || value instanceof Date || value instanceof RegExp || value instanceof Promise || value instanceof Error)
|
|
4238
|
+
return value;
|
|
4236
4239
|
if (isArray(value)) {
|
|
4237
4240
|
return value.map(flatten);
|
|
4238
4241
|
}
|
|
@@ -4321,6 +4324,11 @@ function ref(value) {
|
|
|
4321
4324
|
return result;
|
|
4322
4325
|
}
|
|
4323
4326
|
|
|
4327
|
+
// src/reactivity/cref.ts
|
|
4328
|
+
function cref(value) {
|
|
4329
|
+
return ref(flatten(value));
|
|
4330
|
+
}
|
|
4331
|
+
|
|
4324
4332
|
// src/app/RegorConfig.ts
|
|
4325
4333
|
var _RegorConfig = class _RegorConfig {
|
|
4326
4334
|
constructor(globalContext) {
|
|
@@ -4381,6 +4389,7 @@ var _RegorConfig = class _RegorConfig {
|
|
|
4381
4389
|
obj[key] = global[key];
|
|
4382
4390
|
}
|
|
4383
4391
|
obj.ref = ref;
|
|
4392
|
+
obj.cref = cref;
|
|
4384
4393
|
obj.sref = sref;
|
|
4385
4394
|
obj.flatten = flatten;
|
|
4386
4395
|
return obj;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";var Ct=Object.defineProperty,$o=Object.defineProperties,jo=Object.getOwnPropertyDescriptor,_o=Object.getOwnPropertyDescriptors,Fo=Object.getOwnPropertyNames,tr=Object.getOwnPropertySymbols;var nr=Object.prototype.hasOwnProperty,qo=Object.prototype.propertyIsEnumerable;var Et=Math.pow,bn=(t,e,n)=>e in t?Ct(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Rt=(t,e)=>{for(var n in e||(e={}))nr.call(e,n)&&bn(t,n,e[n]);if(tr)for(var n of tr(e))qo.call(e,n)&&bn(t,n,e[n]);return t},rr=(t,e)=>$o(t,_o(e));var zo=(t,e)=>{for(var n in e)Ct(t,n,{get:e[n],enumerable:!0})},Ko=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Fo(e))!nr.call(t,o)&&o!==n&&Ct(t,o,{get:()=>e[o],enumerable:!(r=jo(e,o))||r.enumerable});return t};var Wo=t=>Ko(Ct({},"__esModule",{value:!0}),t);var p=(t,e,n)=>bn(t,typeof e!="symbol"?e+"":e,n);var or=(t,e,n)=>new Promise((r,o)=>{var s=c=>{try{a(n.next(c))}catch(f){o(f)}},i=c=>{try{a(n.throw(c))}catch(f){o(f)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(s,i);a((n=n.apply(t,e)).next())});var _i={};zo(_i,{ComponentHead:()=>Xe,ContextRegistry:()=>yn,RegorConfig:()=>pe,addUnbinder:()=>W,batch:()=>Bo,collectRefs:()=>_t,computeMany:()=>ko,computeRef:()=>Lo,computed:()=>Oo,createApp:()=>Ao,defineComponent:()=>No,drainUnbind:()=>ir,endBatch:()=>Zn,entangle:()=>rt,flatten:()=>ue,getBindData:()=>Ve,html:()=>gn,isDeepRef:()=>qe,isRaw:()=>ot,isRef:()=>E,markRaw:()=>Io,observe:()=>ne,observeMany:()=>Uo,observerCount:()=>Ho,onMounted:()=>Mo,onUnmounted:()=>ae,pause:()=>rn,persist:()=>Vo,pval:()=>mr,raw:()=>Po,ref:()=>Ue,removeNode:()=>G,resume:()=>on,silence:()=>jt,sref:()=>re,startBatch:()=>Yn,svg:()=>Do,toFragment:()=>We,toJsonTemplate:()=>ut,trigger:()=>te,unbind:()=>ye,unref:()=>v,useScope:()=>$t,warningHandler:()=>$e,watchEffect:()=>Fe});module.exports=Wo(_i);var Je=Symbol(":regor");var ye=t=>{let e=[t];for(let n=0;n<e.length;++n){let r=e[n];Go(r);for(let o=r.lastChild;o!=null;o=o.previousSibling)e.push(o)}},Go=t=>{let e=t[Je];if(!e)return;let n=e.unbinders;for(let r=0;r<n.length;++r)n[r]();n.length=0,t[Je]=void 0};var Qe=[],wt=!1,vt,sr=()=>{if(wt=!1,vt=void 0,Qe.length!==0){for(let t=0;t<Qe.length;++t)ye(Qe[t]);Qe.length=0}},G=t=>{t.remove(),Qe.push(t),wt||(wt=!0,vt=setTimeout(sr,1))},ir=()=>or(null,null,function*(){Qe.length===0&&!wt||(vt&&clearTimeout(vt),sr())});var J=t=>typeof t=="function",Q=t=>typeof t=="string",ar=t=>typeof t=="undefined",me=t=>t==null||typeof t=="undefined",j=t=>typeof t!="string"||!(t!=null&&t.trim()),Jo=Object.prototype.toString,Tn=t=>Jo.call(t),ke=t=>Tn(t)==="[object Map]",fe=t=>Tn(t)==="[object Set]",xn=t=>Tn(t)==="[object Date]",lt=t=>typeof t=="symbol",S=Array.isArray,P=t=>t!==null&&typeof t=="object";var cr={0:"createApp can't find root element. You must define either a valid `selector` or an `element`. Example: createApp({}, {selector: '#app', html: '...'})",1:t=>`Component template cannot be found. selector: ${t} .`,2:"Use composables in scope. usage: useScope(() => new MyApp()).",3:t=>`${t} requires ref source argument`,4:"computed is readonly.",5:"persist requires a string key."},q=(t,...e)=>{let n=cr[t];return new Error(J(n)?n.call(cr,...e):n)};var St=[],ur=()=>{let t={onMounted:[],onUnmounted:[]};return St.push(t),t},Be=t=>{let e=St[St.length-1];if(!e&&!t)throw q(2);return e},lr=t=>{let e=Be();return t&&En(t),St.pop(),e},Cn=Symbol("csp"),En=t=>{let e=t,n=e[Cn];if(n){let r=Be();if(n===r)return;r.onMounted.length>0&&n.onMounted.push(...r.onMounted),r.onUnmounted.length>0&&n.onUnmounted.push(...r.onUnmounted);return}e[Cn]=Be()},At=t=>t[Cn];var Le=t=>{var n,r;let e=(n=At(t))==null?void 0:n.onUnmounted;e==null||e.forEach(o=>{o()}),(r=t.unmounted)==null||r.call(t)};var fr={8:t=>`Model binding requires a ref at ${t.outerHTML}`,7:t=>`Model binding is not supported on ${t.tagName} element at ${t.outerHTML}`,0:(t,e)=>`${t} binding expression is missing at ${e.outerHTML}`,1:(t,e,n)=>`invalid ${t} expression: ${e} at ${n.outerHTML}`,2:(t,e)=>`${t} requires object expression at ${e.outerHTML}`,3:(t,e)=>`${t} binder: key is empty on ${e.outerHTML}.`,4:(t,e,n,r)=>({msg:`Failed setting prop "${t}" on <${e.toLowerCase()}>: value ${n} is invalid.`,args:[r]}),5:(t,e)=>`${t} binding missing event type at ${e.outerHTML}`,6:(t,e)=>({msg:t,args:[e]})},_=(t,...e)=>{let n=fr[t],r=J(n)?n.call(fr,...e):n,o=$e.warning;o&&(Q(r)?o(r):o(r,...r.args))},$e={warning:console.warn};var Nt=Symbol("ref"),X=Symbol("sref"),Mt=Symbol("raw");var E=t=>t!=null&&t[X]>0;var Ie=class extends Error{constructor(n,r){super(r);p(this,"propPath");p(this,"detail");this.name="PropValidationError",this.propPath=n,this.detail=r}},be=(t,e)=>{throw new Ie(t,`${e}.`)},Ot=t=>{var n;if(t===null)return"null";if(t===void 0)return"undefined";if(E(t))return`ref<${Ot(t())}>`;if(typeof t=="string")return"string";if(typeof t=="number")return"number";if(typeof t=="boolean")return"boolean";if(typeof t=="bigint")return"bigint";if(typeof t=="symbol")return"symbol";if(typeof t=="function")return"function";if(S(t))return"array";if(t instanceof Date)return"Date";if(t instanceof RegExp)return"RegExp";if(t instanceof Map)return"Map";if(t instanceof Set)return"Set";let e=(n=t==null?void 0:t.constructor)==null?void 0:n.name;return e&&e!=="Object"?e:"object"},Qo=t=>t.length>60?`${t.slice(0,57)}...`:t,ft=(t,e=0)=>{if(e>1)return"unknown";if(E(t)){let s=t();return`ref(${ft(s,e+1)})`}if(typeof t=="string")return Qo(JSON.stringify(t));if(typeof t=="number"||typeof t=="boolean"||typeof t=="bigint"||typeof t=="symbol")return String(t);if(t===null)return"null";if(t===void 0)return"undefined";if(t instanceof Date)return t.toISOString();if(t instanceof RegExp)return String(t);if(S(t)){let s=t.slice(0,5).map(i=>ft(i,e+1)).join(", ");return t.length>5?`[${s}, ...]`:`[${s}]`}if(P(t)){let s=Object.entries(t).slice(0,5);if(s.length===0)return"{}";let i=s.map(([a,c])=>{let f=ft(c,e+1);return`${a}: ${f}`}).join(", ");return Object.keys(t).length>5?`{ ${i}, ... }`:`{ ${i} }`}return"unknown"},le=t=>{if(E(t))return`got ${Ot(t)}(${ft(t())})`;let e=Ot(t),n=ft(t);return`got ${e} (${n})`},Xo=t=>t instanceof Ie?t.detail:t instanceof Error?t.message:String(t),pr=(t,e)=>{let n=`, ${le(e)}.`;return t.endsWith(n)?t.slice(0,-n.length):t},Yo=(t,e,n)=>{if(e instanceof Ie){if(e.propPath===t)return pr(e.detail,n);if(e.propPath===`${t}.value`&&E(n)){let r=pr(e.detail,n());return r.startsWith("expected ")?`expected ref<${r.slice(9)}>`:`expected ref where ${r}`}}return Xo(e)},Zo=(t,e,n)=>{let r=[];for(let o of e){let s=Yo(t,o,n);r.includes(s)||r.push(s)}return r.length===0?le(n):r.length===1?`${r[0]}, ${le(n)}`:`${r.join(" or ")}, ${le(n)}`},es=t=>typeof t=="string"?`"${t}"`:typeof t=="number"||typeof t=="boolean"?String(t):t===null?"null":t===void 0?"undefined":Ot(t),ts=(t,e)=>{typeof t!="string"&&be(e,`expected string, ${le(t)}`)},ns=(t,e)=>{typeof t!="number"&&be(e,`expected number, ${le(t)}`)},rs=(t,e)=>{typeof t!="boolean"&&be(e,`expected boolean, ${le(t)}`)},os=t=>(e,n)=>{e instanceof t||be(n,`expected instance of ${t.name||"provided class"}, ${le(e)}`)},ss=t=>(e,n,r)=>{e!==void 0&&t(e,n,r)},is=t=>(e,n,r)=>{e!==null&&t(e,n,r)},as=(...t)=>(e,n,r)=>{let o=[];for(let s of t)try{s(e,n,r);return}catch(i){o.push(i)}be(n,Zo(n,o,e))},cs=t=>(e,n)=>{t.includes(e)||be(n,`expected one of ${t.map(r=>es(r)).join(", ")}, ${le(e)}`)},us=t=>(e,n,r)=>{S(e)||be(n,`expected array, ${le(e)}`);let o=e;for(let s=0;s<o.length;++s)t(o[s],`${n}[${s}]`,r)};function ls(t){return(e,n,r)=>{P(e)||be(n,`expected object, ${le(e)}`);let o=e;for(let s in t){let i=t[s];if(!i)continue;i(o[s],`${n}.${s}`,r)}}}var fs=t=>(e,n,r)=>{if(E(e)){t(e(),`${n}.value`,r);return}be(n,`expected ref, ${le(e)}`)},mr={fail:be,describe:le,isString:ts,isNumber:ns,isBoolean:rs,isClass:os,optional:ss,nullable:is,or:as,oneOf:cs,arrayOf:us,shape:ls,refOf:fs};var ps=(t,e,n)=>{var i,a;let r=((a=(i=t.tagName)==null?void 0:i.toLowerCase)==null?void 0:a.call(i))||"unknown",o=n instanceof Ie?n.propPath:e,s=n instanceof Ie?n.detail:n instanceof Error?n.message:String(n);return n instanceof Error?new Error(`Invalid prop "${o}" on <${r}>: ${s}`,{cause:n}):new Error(`Invalid prop "${o}" on <${r}>: ${s}`,{cause:n})},Xe=class{constructor(e,n,r,o,s,i){p(this,"props");p(this,"start");p(this,"end");p(this,"ctx");p(this,"autoProps",!0);p(this,"entangle",!0);p(this,"enableSwitch",!1);p(this,"onAutoPropsAssigned");p(this,"J");p(this,"Q");p(this,"emit",(e,n)=>{this.J.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.J=n,this.ctx=r,this.start=o,this.end=s,this.Q=i}findContext(e,n=0){var o;if(n<0)return;let r=0;for(let s of(o=this.ctx)!=null?o:[])if(s instanceof e){if(r===n)return s;++r}}requireContext(e,n=0){let r=this.findContext(e,n);if(r!==void 0)return r;throw new Error(`${e} was not found in the context stack at occurrence ${n}.`)}validateProps(e){if(this.Q==="off")return;let n=this.props;for(let r in e){let o=e[r];if(!o)continue;let s=o;try{s(n[r],r,this)}catch(i){let a=ps(this.J,r,i);if(this.Q==="warn"){$e.warning(a.message,a);continue}throw a}}}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)G(e),e=e.nextSibling;for(let r of this.ctx)Le(r)}};var Ve=t=>{let e=t,n=e[Je];if(n)return n;let r={unbinders:[],data:{}};return e[Je]=r,r};var W=(t,e)=>{Ve(t).unbinders.push(e)};var je=t=>{if(typeof t=="string"){let e=t.trim().toLowerCase();if(e===""||e==="0"||e==="false")return!1;if(e==="true")return!0}return!!t};var Lt={},kt={},dr=1,hr=t=>{let e=(dr++).toString();return Lt[e]=t,kt[e]=0,e},Rn=t=>{kt[t]+=1},wn=t=>{--kt[t]===0&&(delete Lt[t],delete kt[t])},yr=t=>Lt[t],vn=()=>dr!==1&&Object.keys(Lt).length>0,pt="r-switch",ms=t=>{let e=t.filter(r=>Re(r)).map(r=>[...r.querySelectorAll("[r-switch]")].map(o=>o.getAttribute(pt))),n=new Set;return e.forEach(r=>{r.forEach(o=>o&&n.add(o))}),[...n]},Ye=(t,e)=>{if(!vn())return;let n=ms(e);n.length!==0&&(n.forEach(Rn),W(t,()=>{n.forEach(wn)}))};var It=()=>{},Sn=(t,e,n,r)=>{let o=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,r),o.push(i)}Pe(e,o)},An=Symbol("r-if"),gr=Symbol("r-else"),br=t=>t[gr]===1,Vt=class{constructor(e){p(this,"r");p(this,"M");p(this,"xe");p(this,"X");p(this,"Y");p(this,"T");p(this,"R");this.r=e,this.M=e.o.u.if,this.xe=Dt(e.o.u.if),this.X=e.o.u.else,this.Y=e.o.u.elseif,this.T=e.o.u.for,this.R=e.o.u.pre}ot(e,n){let r=e.parentElement;for(;r!==null&&r!==document.documentElement;){if(r.hasAttribute(n))return!0;r=r.parentElement}return!1}k(e){let n=e.hasAttribute(this.M);return n&&this.y(e),e.hasAttribute(this.r.o.u.is)||e.hasAttribute("is")||this.r.E.Z(e)||this.r.E.j(e,o=>{o.hasAttribute(this.M)&&this.y(o)}),n}ee(e){return e[An]?!0:(e[An]=!0,Pt(e,this.xe).forEach(n=>n[An]=!0),!1)}y(e){if(e.hasAttribute(this.R)||this.ee(e)||this.ot(e,this.T))return;let n=e.getAttribute(this.M);if(!n){_(0,this.M,e);return}e.removeAttribute(this.M),this.N(e,n)}U(e,n,r){let o=Ze(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${r!=null?r:""}`);s.insertBefore(i,e),Ye(i,o),o.forEach(c=>{G(c)}),e.remove(),n!=="if"&&(e[gr]=1);let a=document.createComment(`__end__ :${n}${r!=null?r:""}`);return s.insertBefore(a,i.nextSibling),{nodes:o,parent:s,commentBegin:i,commentEnd:a}}Re(e,n){if(!e)return[];let r=e.nextElementSibling;if(e.hasAttribute(this.X)){e.removeAttribute(this.X);let{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"else");return[{mount:()=>{Sn(o,this.r,s,a)},unmount:()=>{we(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let o=e.getAttribute(this.Y);if(!o)return[];e.removeAttribute(this.Y);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.U(e,"elseif",` => ${o} `),f=this.r.m.O(o),u=f.value,l=this.Re(r,n),m=It;return W(a,()=>{f.stop(),m(),m=It}),m=f.subscribe(n),[{mount:()=>{Sn(s,this.r,i,c)},unmount:()=>{we(a,c)},isTrue:()=>je(u()[0]),isMounted:!1},...l]}}N(e,n){let r=e.nextElementSibling,{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"if",` => ${n} `),c=this.r.m.O(n),f=c.value,u=!1,l=this.r.m,m=l.L(),y=()=>{l.C(m,()=>{if(je(f()[0]))u||(Sn(o,this.r,s,a),u=!0),x.forEach(C=>{C.unmount(),C.isMounted=!1});else{we(i,a),u=!1;let C=!1;for(let b of x)!C&&b.isTrue()?(b.isMounted||(b.mount(),b.isMounted=!0),C=!0):(b.unmount(),b.isMounted=!1)}})},x=this.Re(r,y),d=It;W(i,()=>{c.stop(),d(),d=It}),y(),d=c.subscribe(y)}};var Ze=t=>{let e=de(t)?t.content.childNodes:[t],n=[];for(let r=0;r<e.length;++r){let o=e[r];if(o.nodeType===1){let s=o==null?void 0:o.tagName;if(s==="SCRIPT"||s==="STYLE")continue}n.push(o)}return n},Pe=(t,e)=>{for(let n=0;n<e.length;++n){let r=e[n];r.nodeType===Node.ELEMENT_NODE&&(br(r)||t.$(r))}},Pt=(t,e)=>{var r;let n=t.querySelectorAll(e);return(r=t.matches)!=null&&r.call(t,e)?[t,...n]:n},de=t=>t instanceof HTMLTemplateElement,Re=t=>t.nodeType===Node.ELEMENT_NODE,mt=t=>t.nodeType===Node.ELEMENT_NODE,Tr=t=>t instanceof HTMLSlotElement,ve=t=>de(t)?t.content.childNodes:t.childNodes,we=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let r=n.nextSibling;G(n),n=r}},xr=function(){return this()},ds=function(t){return this(t)},hs=()=>{throw new Error("value is readonly.")},ys={get:xr,set:ds,enumerable:!0,configurable:!1},gs={get:xr,set:hs,enumerable:!0,configurable:!1},De=(t,e)=>{t[X]=e?2:1,Object.defineProperty(t,"value",e?gs:ys)},Cr=(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},Dt=t=>`[${CSS.escape(t)}]`,Ut=(t,e)=>(t.startsWith("@")&&(t=e.u.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.u.dynamic)),t),Nn=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},bs=/-(\w)/g,z=Nn(t=>t&&t.replace(bs,(e,n)=>n?n.toUpperCase():"")),Ts=/\B([A-Z])/g,et=Nn(t=>t&&t.replace(Ts,"-$1").toLowerCase()),dt=Nn(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var Ht={mount:()=>{}};var tt=t=>{let e=t.trim();return e?e.split(/\s+/):[]};var Bt=t=>{var n,r;let e=(n=At(t))==null?void 0:n.onMounted;e==null||e.forEach(o=>{o()}),(r=t.mounted)==null||r.call(t)};var Mn=Symbol("scope"),$t=t=>{try{ur();let e=t();En(e);let n={context:e,unmount:()=>Le(e),[Mn]:1};return n[Mn]=1,n}finally{lr()}},Er=t=>P(t)?Mn in t:!1;var v=t=>{let e=t;return e!=null&&e[X]>0?e():e};var Rr="http://www.w3.org/1999/xlink",xs={itemscope:2,allowfullscreen:2,formnovalidate:2,ismap:2,nomodule:2,novalidate:2,readonly:2,async:1,autofocus:1,autoplay:1,controls:1,default:1,defer:1,disabled:1,hidden:1,inert:1,loop:1,open:1,required:1,reversed:1,scoped:1,seamless:1,checked:1,muted:1,multiple:1,selected:1},Cs=(t,e,n,r,o,s)=>{var a;if(r){r=v(r),s&&s.includes("camel")&&(r=z(r)),nt(t,r,v(e[0]),v(o));return}let i=e.length;for(let c=0;c<i;++c){let f=e[c];if(S(f)){let u=v((a=n==null?void 0:n[c])==null?void 0:a[0]),l=v(f[0]),m=v(f[1]);nt(t,l,m,u)}else if(P(f))for(let u of Object.entries(f)){let l=u[0],m=v(u[1]),y=v(n==null?void 0:n[c]),x=y&&l in y?l:void 0;nt(t,l,m,x)}else{let u=v(n==null?void 0:n[c]),l=v(e[c++]),m=v(e[c]);nt(t,l,m,u)}}},On={mount:()=>({update:({el:t,values:e,previousValues:n,option:r,previousOption:o,flags:s})=>{Cs(t,e,n,r,o,s)}})},nt=(t,e,n,r)=>{if(r&&r!==e&&t.removeAttribute(r),me(e)){_(3,"r-bind",t);return}if(!Q(e)){_(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){me(n)?t.removeAttributeNS(Rr,e.slice(6,e.length)):t.setAttributeNS(Rr,e,n);return}if(me(n)){t.removeAttribute(e);return}if(e in xs){je(n)?t.setAttribute(e,""):t.removeAttribute(e);return}t.setAttribute(e,n)};var kn={collectRefObj:!0,mount:({parseResult:t})=>({update:({values:e})=>{let n=t.context,r=e[0];if(P(r))for(let o of Object.entries(r)){let s=o[0],i=o[1],a=n[s];a!==i&&(E(a)?a(i):n[s]=i)}}})};var ae=(t,e)=>{var n;(n=Be(e))==null||n.onUnmounted.push(t)};var ne=(t,e,n,r=!0)=>{if(!E(t))throw q(3,"observe");n&&e(t());let s=t(void 0,void 0,0,e);return r&&ae(s,!0),s};var wr=t=>t[X]===2,rt=(t,e)=>{if(t===e)return()=>{};let n=wr(t),r=wr(e);if(n&&r)return()=>{};if(n){let i=ne(t,()=>e(t()));return e(t()),i}if(r){let i=ne(e,()=>t(e()));return t(e()),i}let o=ne(t,i=>e(i)),s=ne(e,i=>t(i));return e(t()),()=>{o(),s()}};var he=[],vr=t=>{var e;he.length!==0&&((e=he[he.length-1])==null||e.add(t))},Fe=t=>{if(!t)return()=>{};let e={stop:()=>{}};return Es(t,e),ae(()=>e.stop(),!0),e.stop},Es=(t,e)=>{if(!t)return;let n=[],r=!1,o=()=>{for(let s of n)s();n=[],r=!0};e.stop=o;try{let s=new Set;if(he.push(s),t(i=>n.push(i)),r)return;for(let i of[...s]){let a=ne(i,()=>{o(),Fe(t)});n.push(a)}}finally{he.pop()}},jt=t=>{let e=he.length,n=e>0&&he[e-1];try{return n&&he.push(null),t()}finally{n&&he.pop()}},_t=t=>{try{let e=new Set;return he.push(e),{value:t(),refs:[...e]}}finally{he.pop()}};var ot=t=>!!t&&t[Mt]===1;var te=(t,e,n)=>{if(!E(t))return;let r=t;if(r(void 0,e,1),!n)return;let o=r();if(o){if(S(o)||fe(o))for(let s of o)te(s,e,!0);else if(ke(o))for(let s of o)te(s[0],e,!0),te(s[1],e,!0);if(P(o))for(let s in o)te(o[s],e,!0)}};function Rs(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var st=(t,e,n)=>{n.forEach(function(r){let o=t[r];Rs(e,r,function(...i){let a=o.apply(this,i),c=this[X];for(let f of c)te(f);return a})})},Ft=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var Sr=Array.prototype,Ln=Object.create(Sr),ws=["push","pop","shift","unshift","splice","sort","reverse"];st(Sr,Ln,ws);var Ar=Map.prototype,qt=Object.create(Ar),vs=["set","clear","delete"];Ft(qt,"Map");st(Ar,qt,vs);var Nr=Set.prototype,zt=Object.create(Nr),Ss=["add","clear","delete"];Ft(zt,"Set");st(Nr,zt,Ss);var Te={},re=t=>{if(E(t)||ot(t))return t;let e={auto:!0,_value:t},n=c=>P(c)?X in c?!0:S(c)?(Object.setPrototypeOf(c,Ln),!0):fe(c)?(Object.setPrototypeOf(c,zt),!0):ke(c)?(Object.setPrototypeOf(c,qt),!0):!1:!1,r=n(t),o=new Set,s=(c,f)=>{if(Te.stack&&Te.stack.length){Te.stack[Te.stack.length-1].add(a);return}o.size!==0&&jt(()=>{for(let u of[...o.keys()])o.has(u)&&u(c,f)})},i=c=>{let f=c[X];f||(c[X]=f=new Set),f.add(a)},a=(...c)=>{if(!(2 in c)){let u=c[0],l=c[1];return 0 in c?e._value===u||E(u)&&(u=u(),e._value===u)?u:(n(u)&&i(u),e._value=u,e.auto&&s(u,l),e._value):(vr(a),e._value)}switch(c[2]){case 0:{let u=c[3];if(!u)return()=>{};let l=m=>{o.delete(m)};return o.add(u),()=>{l(u)}}case 1:{let u=c[1],l=e._value;s(l,u);break}case 2:return o.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return De(a,!1),r&&i(t),a};var Mr=Symbol("modelBridge"),Kt=()=>{},As=t=>!!(t!=null&&t[Mr]),Ns=t=>{t[Mr]=1},Ms=t=>{let e=re(t());return Ns(e),e},Or={collectRefObj:!0,mount:({parseResult:t,option:e})=>{if(typeof e!="string"||!e)return Kt;let n=z(e),r,o,s=Kt,i=()=>{s(),s=Kt,r=void 0,o=void 0},a=()=>{s(),s=Kt},c=(u,l)=>{r!==u&&(a(),s=rt(u,l),r=u)},f=()=>{var y;let u=(y=t.refs[0])!=null?y:t.value()[0],l=t.context,m=l[n];if(!E(u)){if(o&&m===o){o(u);return}if(i(),E(m)){m(u);return}l[n]=re(u);return}if(As(u)){if(m===u)return;E(m)?c(u,m):l[n]=u;return}o||(o=Ms(u)),l[n]=o,c(u,o)};return{update:()=>{f()},unmount:()=>{s()}}}};var Wt=class{constructor(e){p(this,"r");p(this,"_");p(this,"Ee","");p(this,"Ce",-1);this.r=e,this._=e.o.u.inherit}k(e){this.st(e)}it(e){if(this.Ce!==e.size){let n=[...e.keys()];this.Ee=[...n,...n.map(et)].join(","),this.Ce=e.size}return this.Ee}ct(e){var n;for(let r=0;r<e.length;++r){let o=(n=e[r])==null?void 0:n.components;if(o)for(let s in o)return!0}return!1}ut(e){if(!de(e))return!1;let n=e.getAttributeNames();return e.hasAttribute("name")?!0:n.some(r=>r.startsWith("#"))}pt(e){return de(e)&&e.getAttributeNames().length===0}st(e){var f,u;let n=this.r,r=n.m,o=n.o.te,s=n.o.F;if(o.size===0&&!this.ct(r.l))return;let i=r.ne(),a=this.re();if(j(a))return;let c=this.lt(e,a);for(let l of c){if(l.hasAttribute(n.R))continue;let m=l.parentNode;if(!m)continue;let y=l.nextSibling,x=z(l.tagName).toUpperCase(),d=i[x],w=d!=null?d:s.get(x);if(!w)continue;let C=w.template;if(!C)continue;let b=l.parentElement;if(!b)continue;let M=new Comment(" begin component: "+l.tagName),D=new Comment(" end component: "+l.tagName);b.insertBefore(M,l),l.remove();let U=n.o.u.context,I=n.o.u.contextAlias,oe=n.o.u.bind,K=(u=(f=w.props)==null?void 0:f.map(z))!=null?u:[],A=[],T=h=>h==="class"||h==="style",V=(h,k,N=!1)=>{let Z={},$=h.hasAttribute(U);return r.C(k,()=>{if(r.v(Z),$?n.y(kn,h,U):h.hasAttribute(I)&&n.y(kn,h,I),K.length===0)return;let ee=new Map(K.map(g=>[g.toLowerCase(),g]));for(let g of[...K,...K.map(et)]){let L=h.getAttribute(g);if(L===null)continue;let B=z(g);Z[B]=L,N&&w.inheritAttrs===!0&&T(B)&&A.push({name:g,value:L}),h.removeAttribute(g)}let R=n.q.we(h,!1);for(let[g,L]of R.entries()){let[B,ie]=L.oe;if(!ie)continue;let Ee=ee.get(z(ie).toLowerCase());if(Ee&&!(B!=="."&&B!==":"&&B!==oe)){if(N&&B!=="."&&w.inheritAttrs===!0&&T(Ee)){let er=h.getAttribute(g);er!==null&&A.push({name:g,value:er})}n.y(Or,h,g,!0,Ee,L.se)}}}),Z},F=[...r.L()],Ge=()=>{var Z;let h=V(l,F,!0),k=new Xe(h,l,F,M,D,n.o.propValidationMode),N=$t(()=>{var $;return($=w.context(k))!=null?$:{}}).context;if(k.autoProps){for(let[$,ee]of Object.entries(h))if($ in N){let R=N[$];if(R===ee)continue;if(E(R)){E(ee)?k.entangle?W(M,rt(ee,R)):R(ee()):R(ee);continue}}else N[$]=ee;for(let $ of K)$ in N||(N[$]=void 0);(Z=k.onAutoPropsAssigned)==null||Z.call(k)}return{componentCtx:N,head:k}},{componentCtx:xe,head:Tt}=Ge(),O=[...ve(C)],xt=O.length,H=l.childNodes.length===0,Y=h=>{var ee;let k=h.parentElement,N=h.name;if(j(N)&&(N=h.getAttributeNames().filter(R=>R.startsWith("#"))[0],j(N)?N="default":N=N.substring(1)),H){if(N==="default"){let R=n.o.u.text,g=l.getAttribute(R);if(!j(g)){let L=document.createElement("span");L.setAttribute(R,g),k.insertBefore(L,h),l.removeAttribute(R);return}}for(let R of[...h.childNodes])k.insertBefore(R,h);return}let Z=l.querySelector(`template[name='${N}'], template[\\#${N}]`);!Z&&N==="default"&&(Z=(ee=[...l.querySelectorAll("template:not([name])")].find(g=>this.pt(g)))!=null?ee:null);let $=R=>{Tt.enableSwitch&&r.C(F,()=>{r.v(xe);let g=V(h,r.L());r.C(F,()=>{r.v(g);let L=r.L(),B=hr(L);for(let ie of R)Re(ie)&&(ie.setAttribute(pt,B),Rn(B),W(ie,()=>{wn(B)}))})})};if(Z){let R=[...ve(Z)];for(let g of R)k.insertBefore(g,h);$(R)}else{if(N!=="default"){for(let g of[...ve(h)])k.insertBefore(g,h);return}let R=[...ve(l)].filter(g=>!this.ut(g));for(let g of R)k.insertBefore(g,h);$(R)}},se=h=>{if(!Re(h))return;let k=h.querySelectorAll("slot");if(Tr(h)){Y(h),h.remove();return}for(let N of k)Y(N),N.remove()};(()=>{for(let h=0;h<xt;++h)O[h]=O[h].cloneNode(!0),m.insertBefore(O[h],y),se(O[h])})(),b.insertBefore(D,y);let Ce=()=>{if(!w.inheritAttrs)return;let h=O.filter(g=>g.nodeType===Node.ELEMENT_NODE),k=h.flatMap(g=>[...g.hasAttribute(this._)?[g]:[],...g.querySelectorAll(`[${this._}]`)]).at(0),N=k!=null?k:h.length===1?h[0]:void 0;if(!N)return;N.removeAttribute(this._);let Z=`${oe}:class`,$=`${oe}:style`,ee=(g,L,B)=>{let ie=N.hasAttribute(g)?g:N.hasAttribute(L)?L:g,Ee=N.getAttribute(ie);N.setAttribute(ie,j(Ee)?B:`${Ee}, ${B}`)},R=(g,L)=>{if(g==="class"){let B=tt(L);B.length>0&&N.classList.add(...B)}else if(g===":class"||g===Z)ee(":class",Z,L);else if(g==="style"){let B=N.style,ie=l.style;for(let Ee of ie)B.setProperty(Ee,ie.getPropertyValue(Ee))}else if(g===":style"||g===$)ee(":style",$,L);else{let B=Ut(g,n.o);nt(N,B,L)}};for(let{name:g,value:L}of A)l.setAttribute(g,L);for(let g of l.getAttributeNames())g===U||g===I||R(g,l.getAttribute(g))},Me=()=>{for(let h of l.getAttributeNames())!h.startsWith("@")&&!h.startsWith(n.o.u.on)&&l.removeAttribute(h)},Oe=()=>{Ce(),Me(),r.v(xe),n.ve(l,!1),xe.$emit=Tt.emit,Pe(n,O),W(l,()=>{Le(xe)}),W(M,()=>{ye(l)}),Bt(xe)};r.C(F,Oe)}}re(){let e=this.r,n=e.m,r=e.o.te,o=n.ft(),s=this.it(r);return[...s?[s]:[],...o,...o.map(et)].join(",")}Z(e){var r;let n=this.re();return!j(n)&&((r=e.matches)==null?void 0:r.call(e,n))}lt(e,n){var s;let r=[];if(j(n))return r;if((s=e.matches)!=null&&s.call(e,n))return[e];let o=this.K(e).reverse();for(;o.length>0;){let i=o.pop();if(i.matches(n)){r.push(i);continue}o.push(...this.K(i).reverse())}return r}j(e,n){let r=this.r,o=this.re(),s=r.o.u.is,i=this.K(e).reverse();for(;i.length>0;){let a=i.pop();n(a),!(!j(o)&&a.matches(o))&&(a.hasAttribute(s)||a.hasAttribute("is")||i.push(...this.K(a).reverse()))}}K(e){let n=e==null?void 0:e.children;if((n==null?void 0:n.length)!=null){let o=[];for(let s=0;s<n.length;++s){let i=n[s];Re(i)&&o.push(i)}return o}let r=e==null?void 0:e.childNodes;if((r==null?void 0:r.length)!=null){let o=[];for(let s=0;s<r.length;++s){let i=r[s];Re(i)&&o.push(i)}return o}return[]}};var In=class{constructor(e,n){p(this,"oe");p(this,"se");p(this,"Se",[]);this.oe=e,this.se=n}},Gt=class{constructor(e){p(this,"r");p(this,"Ae");p(this,"Ve");p(this,"ie");var r;this.r=e,this.Ae=e.o.dt(),this.ie=new Map;let n=new Map;for(let o of this.Ae){let s=(r=o[0])!=null?r:"",i=n.get(s);i?i.push(o):n.set(s,[o])}this.Ve=n}ke(e){let n=this.ie.get(e);if(n)return n;let r=e,o=r.startsWith(".");o&&(r=":"+r.slice(1));let s=r.indexOf("."),a=(s<0?r:r.substring(0,s)).split(/[:@]/);j(a[0])&&(a[0]=o?".":r[0]);let c=s>=0?r.slice(s+1).split("."):[],f=!1,u=!1;for(let m=0;m<c.length;++m){let y=c[m];if(!f&&y==="camel"?f=!0:!u&&y==="prop"&&(u=!0),f&&u)break}f&&(a[a.length-1]=z(a[a.length-1])),u&&(a[0]=".");let l={terms:a,flags:c};return this.ie.set(e,l),l}we(e,n){let r=new Map;if(!mt(e))return r;let o=this.Ve,s=(a,c)=>{var u;let f=o.get((u=c[0])!=null?u:"");if(f)for(let l=0;l<f.length;++l){if(!c.startsWith(f[l]))continue;let m=r.get(c);if(!m){let y=this.ke(c);m=new In(y.terms,y.flags),r.set(c,m)}m.Se.push(a);return}},i=a=>{var f;let c=a.attributes;if(!(!c||c.length===0))for(let u=0;u<c.length;++u){let l=(f=c.item(u))==null?void 0:f.name;l&&s(a,l)}};return i(e),!n||!e.firstElementChild||this.r.E.j(e,i),r}};var kr=()=>{},Os=(t,e)=>{for(let n of t){let r=n.cloneNode(!0);e.appendChild(r)}},Jt=class{constructor(e){p(this,"r");p(this,"I");this.r=e,this.I=e.o.u.is}k(e){let n=e.hasAttribute(this.I);return(n||e.hasAttribute("is"))&&this.y(e),this.r.E.Z(e)||this.r.E.j(e,r=>{(r.hasAttribute(this.I)||r.hasAttribute("is"))&&this.y(r)}),n}y(e){let n=e.getAttribute(this.I);if(!n){if(n=e.getAttribute("is"),!n)return;if(!n.startsWith("regor:")){if(!n.startsWith("r-"))return;let r=n.slice(2).trim().toLowerCase();if(!r)return;let o=e.parentNode;if(!o)return;let s=document.createElement(r);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);o.insertBefore(s,e),e.remove(),this.r.$(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.N(e,n)}U(e,n){let r=Ze(e),o=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);o.insertBefore(s,e),Ye(s,r),r.forEach(a=>{G(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n!=null?n:""}`);return o.insertBefore(i,s.nextSibling),{nodes:r,parent:o,commentBegin:s,commentEnd:i}}N(e,n){let{nodes:r,commentBegin:o,commentEnd:s}=this.U(e,` => ${n} `),i=this.r.m.O(n),a=i.value,c=this.r.m,f=c.L(),u={name:""},l=de(e)?r:[...r[0].childNodes],m=()=>{c.C(f,()=>{var b,M;let d=a()[0];if(P(d)&&(d.name?d=d.name:d=(b=Object.entries(c.ne()).filter(D=>D[1]===d)[0])==null?void 0:b[0]),!Q(d)||j(d)){we(o,s);return}if(u.name===d)return;we(o,s);let w=(M=s.parentNode)!=null?M:o.parentNode;if(!w)return;let C=document.createElement(d);for(let D of e.getAttributeNames())D!==this.I&&C.setAttribute(D,e.getAttribute(D));Os(l,C),w.insertBefore(C,s),this.r.$(C),u.name=d})},y=kr;W(o,()=>{i.stop(),y(),y=kr}),m(),y=i.subscribe(m)}};var ks=(t,e)=>{let[n,r]=e;J(r)?r(t,n):t.innerHTML=n==null?void 0:n.toString()},Qt={mount:()=>({update:({el:t,values:e})=>{ks(t,e)}})};var Xt=class t{constructor(e){p(this,"ae");this.ae=e}static mt(e,n){var y,x;let r=e.m,o=e.o,s=o.u,i=new Set([s.for,s.if,s.else,s.elseif,s.pre]),a=o.B,c=r.ne();if(Object.keys(c).length>0||o.F.size>0)return;let f=e.q,u=[],l=0,m=[];for(let d=n.length-1;d>=0;--d)m.push(n[d]);for(;m.length>0;){let d=m.pop();if(d.nodeType===Node.ELEMENT_NODE){let C=d;if(C.tagName==="TEMPLATE"||C.tagName.includes("-"))return;let b=z(C.tagName).toUpperCase();if(o.F.has(b)||c[b])return;let M=C.attributes;for(let D=0;D<M.length;++D){let U=(y=M.item(D))==null?void 0:y.name;if(!U)continue;if(i.has(U))return;let{terms:I,flags:oe}=f.ke(U),[K,A]=I,T=(x=a[U])!=null?x:a[K];if(T){if(T===Qt)return;u.push({nodeIndex:l,attrName:U,directive:T,option:A,flags:oe})}}++l}let w=d.childNodes;for(let C=w.length-1;C>=0;--C)m.push(w[C])}if(u.length!==0)return new t(u)}y(e,n){let r=[],o=[];for(let s=n.length-1;s>=0;--s)o.push(n[s]);for(;o.length>0;){let s=o.pop();s.nodeType===Node.ELEMENT_NODE&&r.push(s);let i=s.childNodes;for(let a=i.length-1;a>=0;--a)o.push(i[a])}for(let s=0;s<this.ae.length;++s){let i=this.ae[s],a=r[i.nodeIndex];a&&e.y(i.directive,a,i.attrName,!1,i.option,i.flags)}}};var Ls=(t,e)=>{let n=e.parentNode;if(n)for(let r=0;r<t.items.length;++r)n.insertBefore(t.items[r],e)},Is=t=>{var a;let e=t.length,n=t.slice(),r=[],o,s,i;for(let c=0;c<e;++c){let f=t[c];if(f===0)continue;let u=r[r.length-1];if(u===void 0||t[u]<f){n[c]=u!=null?u:-1,r.push(c);continue}for(o=0,s=r.length-1;o<s;)i=o+s>>1,t[r[i]]<f?o=i+1:s=i;f<t[r[o]]&&(o>0&&(n[c]=r[o-1]),r[o]=c)}for(o=r.length,s=(a=r[o-1])!=null?a:-1;o-- >0;)r[o]=s,s=n[s];return r},Yt=class{static yt(e){let{oldItems:n,newValues:r,getKey:o,isSameValue:s,mountNewValue:i,removeMountItem:a,endAnchor:c}=e,f=n.length,u=r.length,l=new Array(u),m=new Set;for(let T=0;T<u;++T){let V=o(r[T]);if(V===void 0||m.has(V))return;m.add(V),l[T]=V}let y=new Array(u),x=0,d=f-1,w=u-1;for(;x<=d&&x<=w;){let T=n[x];if(o(T.value)!==l[x]||!s(T.value,r[x]))break;T.value=r[x],y[x]=T,++x}for(;x<=d&&x<=w;){let T=n[d];if(o(T.value)!==l[w]||!s(T.value,r[w]))break;T.value=r[w],y[w]=T,--d,--w}if(x>d){for(let T=w;T>=x;--T){let V=T+1<u?y[T+1].items[0]:c;y[T]=i(T,r[T],V)}return y}if(x>w){for(let T=x;T<=d;++T)a(n[T]);return y}let C=x,b=x,M=w-b+1,D=new Array(M).fill(0),U=new Map;for(let T=b;T<=w;++T)U.set(l[T],T);let I=!1,oe=0;for(let T=C;T<=d;++T){let V=n[T],F=U.get(o(V.value));if(F===void 0){a(V);continue}if(!s(V.value,r[F])){a(V);continue}V.value=r[F],y[F]=V,D[F-b]=T+1,F>=oe?oe=F:I=!0}let K=I?Is(D):[],A=K.length-1;for(let T=M-1;T>=0;--T){let V=b+T,F=V+1<u?y[V+1].items[0]:c;if(D[T]===0){y[V]=i(V,r[V],F);continue}let Ge=y[V];I&&(A>=0&&K[A]===T?--A:Ge&&Ls(Ge,F))}return y}};var ht=class{constructor(e){p(this,"x",[]);p(this,"P",new Map);p(this,"ce");this.ce=e}get S(){return this.x.length}ue(e){let n=this.ce(e.value);n!==void 0&&this.P.set(n,e)}pe(e){var r;let n=this.ce((r=this.x[e])==null?void 0:r.value);n!==void 0&&this.P.delete(n)}static ht(e,n){return{items:[],index:e,value:n,order:-1}}v(e){e.order=this.S,this.x.push(e),this.ue(e)}gt(e,n){let r=this.S;for(let o=e;o<r;++o)this.x[o].order=o+1;n.order=e,this.x.splice(e,0,n),this.ue(n)}D(e){return this.x[e]}le(e,n){this.pe(e),this.x[e]=n,this.ue(n),n.order=e}Me(e){this.pe(e),this.x.splice(e,1);let n=this.S;for(let r=e;r<n;++r)this.x[r].order=r}Ne(e){let n=this.S;for(let r=e;r<n;++r)this.pe(r);this.x.splice(e)}nn(e){return this.P.has(e)}bt(e){var r;let n=this.P.get(e);return(r=n==null?void 0:n.order)!=null?r:-1}};var Vn=Symbol("r-for"),Vs=t=>-1,Lr=()=>{},en=class en{constructor(e){p(this,"r");p(this,"T");p(this,"Oe");p(this,"R");this.r=e,this.T=e.o.u.for,this.Oe=Dt(this.T),this.R=e.o.u.pre}k(e){let n=e.hasAttribute(this.T);return n&&this.Le(e),e.hasAttribute(this.r.o.u.is)||e.hasAttribute("is")||this.r.E.Z(e)||this.r.E.j(e,o=>{o.hasAttribute(this.T)&&this.Le(o)}),n}ee(e){return e[Vn]?!0:(e[Vn]=!0,Pt(e,this.Oe).forEach(n=>n[Vn]=!0),!1)}Le(e){if(e.hasAttribute(this.R)||this.ee(e))return;let n=e.getAttribute(this.T);if(!n){_(0,this.T,e);return}e.removeAttribute(this.T),this.Tt(e,n)}Ie(e){return me(e)?[]:(J(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(r=>({*[Symbol.iterator](){for(let o=1;o<=r;o++)yield o}}))(e):Object.entries(e))}Tt(e,n){var xt;let r=this.xt(n);if(!(r!=null&&r.list)){_(1,this.T,n,e);return}let o=this.r.o.u.key,s=this.r.o.u.keyBind,i=(xt=e.getAttribute(o))!=null?xt:e.getAttribute(s);e.removeAttribute(o),e.removeAttribute(s);let a=Ze(e),c=Xt.mt(this.r,a),f=e.parentNode;if(!f)return;let u=`${this.T} => ${n}`,l=new Comment(`__begin__ ${u}`);f.insertBefore(l,e),Ye(l,a),a.forEach(H=>{G(H)}),e.remove();let m=new Comment(`__end__ ${u}`);f.insertBefore(m,l.nextSibling);let y=this.r,x=y.m,d=x.L(),C=d.length===1?[void 0,d[0]]:void 0,b=this.Rt(i),M=(H,Y)=>b(H)===b(Y),D=(H,Y)=>H===Y,U=(H,Y,se)=>{let ce=r.createContext(Y,H),Ce=ht.ht(ce.index,Y),Me=()=>{var N,Z;let Oe=(Z=(N=m.parentNode)!=null?N:l.parentNode)!=null?Z:f,h=se.previousSibling,k=[];for(let $=0;$<a.length;++$){let ee=a[$].cloneNode(!0);Oe.insertBefore(ee,se),k.push(ee)}for(c?c.y(y,k):Pe(y,k),h=h.nextSibling;h!==se;)Ce.items.push(h),h=h.nextSibling};return C?(C[0]=ce.ctx,x.C(C,Me)):x.C(d,()=>{x.v(ce.ctx),Me()}),Ce},I=(H,Y)=>{let se=O.D(H).items,ce=se[se.length-1].nextSibling;for(let Ce of se)G(Ce);O.le(H,U(H,Y,ce))},oe=(H,Y)=>{O.v(U(H,Y,m))},K=H=>{for(let Y of O.D(H).items)G(Y)},A=H=>{let Y=O.S;for(let se=H;se<Y;++se)O.D(se).index(se)},T=H=>{let Y=l.parentNode,se=m.parentNode;if(!Y||!se)return;let ce=O.S;J(H)&&(H=H());let Ce=v(H[0]);if(S(Ce)&&Ce.length===0){we(l,m),O.Ne(0);return}let Me=[];for(let R of this.Ie(H[0]))Me.push(R);let Oe=Yt.yt({oldItems:O.x,newValues:Me,getKey:b,isSameValue:D,mountNewValue:(R,g,L)=>U(R,g,L),removeMountItem:R=>{for(let g=0;g<R.items.length;++g)G(R.items[g])},endAnchor:m});if(Oe){O.x=Oe,O.P.clear();for(let R=0;R<Oe.length;++R){let g=Oe[R];g.order=R,g.index(R);let L=b(g.value);L!==void 0&&O.P.set(L,g)}return}let h=0,k=Number.MAX_SAFE_INTEGER,N=ce,Z=this.r.o.forGrowThreshold,$=()=>O.S<N+Z;for(let R of Me){let g=()=>{if(h<ce){let L=O.D(h++);if(M(L.value,R)){if(D(L.value,R))return;I(h-1,R);return}let B=O.bt(b(R));if(B>=h&&B-h<10){if(--h,k=Math.min(k,h),K(h),O.Me(h),--ce,B>h+1)for(let ie=h;ie<B-1&&ie<ce&&!M(O.D(h).value,R);)++ie,K(h),O.Me(h),--ce;g();return}$()?(O.gt(h-1,U(h,R,O.D(h-1).items[0])),k=Math.min(k,h-1),++ce):I(h-1,R)}else oe(h++,R)};g()}let ee=h;for(ce=O.S;h<ce;)K(h++);O.Ne(ee),A(k)},V=()=>{F.stop(),xe(),xe=Lr},F=x.O(r.list),Ge=F.value,xe=Lr,Tt=0,O=new ht(b);for(let H of this.Ie(Ge()[0]))O.v(U(Tt++,H,m));W(l,V),xe=F.subscribe(T)}xt(e){var c,f;let n=en.Et.exec(e);if(!n)return;let r=(n[1]+((c=n[2])!=null?c:"")).split(",").map(u=>u.trim()),o=r.length>1?r.length-1:-1,s=o!==-1&&(r[o]==="index"||(f=r[o])!=null&&f.startsWith("#"))?r[o]:"";s&&r.splice(o,1);let i=n[3];if(!i||r.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(u,l)=>{let m={},y=v(u);if(!a&&r.length===1)m[r[0]]=u;else if(S(y)){let d=0;for(let w of r)m[w]=y[d++]}else for(let d of r)m[d]=y[d];let x={ctx:m,index:Vs};return s&&(x.index=m[s.startsWith("#")?s.substring(1):s]=re(l)),x}}}Rt(e){if(!e)return r=>r;let n=e.trim();if(!n)return r=>r;if(n.includes(".")){let r=this.Ct(n),o=r.length>1?r.slice(1):void 0;return s=>{let i=v(s),a=this.Pe(i,r);return a!==void 0||!o?a:this.Pe(i,o)}}return r=>{var o;return v((o=v(r))==null?void 0:o[n])}}Ct(e){return e.split(".").filter(n=>n.length>0)}Pe(e,n){var o;let r=e;for(let s of n)r=(o=v(r))==null?void 0:o[s];return v(r)}};p(en,"Et",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var Zt=en;var tn=class{constructor(e){p(this,"fe",0);p(this,"de",new Map);p(this,"m");p(this,"De");p(this,"Ue");p(this,"Be");p(this,"E");p(this,"q");p(this,"o");p(this,"R");p(this,"He");this.m=e,this.o=e.o,this.Ue=new Zt(this),this.De=new Vt(this),this.Be=new Jt(this),this.E=new Wt(this),this.q=new Gt(this),this.R=this.o.u.pre,this.He=this.o.u.dynamic}wt(e){let n=de(e)?[e]:e.querySelectorAll("template");for(let r of n){if(r.hasAttribute(this.R))continue;let o=r.parentNode;if(!o)continue;let s=r.nextSibling;if(r.remove(),!r.content)continue;let i=[...r.content.childNodes];for(let a of i)o.insertBefore(a,s);Pe(this,i)}}$(e){++this.fe;try{if(e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.R)||this.De.k(e)||this.Ue.k(e)||this.Be.k(e))return;this.E.k(e),this.wt(e),this.ve(e,!0)}finally{--this.fe,this.fe===0&&this.vt()}}St(e,n){let r=document;if(!r){let o=e.parentNode;for(;o!=null&&o.parentNode;)o=o.parentNode;if(!o)return null;r=o}return r.querySelector(n)}je(e,n){let r=this.St(e,n);if(!r)return!1;let o=e.parentElement;if(!o)return!1;let s=new Comment(`teleported => '${n}'`);return o.insertBefore(s,e),e.teleportedFrom=s,s.teleportedTo=e,W(s,()=>{G(e)}),r.appendChild(e),!0}At(e,n){this.de.set(e,n)}vt(){let e=this.de;if(e.size!==0){this.de=new Map;for(let[n,r]of e.entries())this.je(n,r)}}ve(e,n){var s;let r=this.q.we(e,n),o=this.o.B;for(let[i,a]of r.entries()){let[c,f]=a.oe,u=(s=o[i])!=null?s:o[c];if(!u){console.error("directive not found:",c);continue}let l=a.Se;for(let m=0;m<l.length;++m){let y=l[m];this.y(u,y,i,!1,f,a.se)}}}y(e,n,r,o,s,i){if(n.hasAttribute(this.R))return;let a=n.getAttribute(r);n.removeAttribute(r);let c=f=>{let u=f;for(;u;){let l=u.getAttribute(pt);if(l)return l;u=u.parentElement}return null};if(vn()){let f=c(n);if(f){this.m.C(yr(f),()=>{this.N(e,n,a,s,i)});return}}this.N(e,n,a,s,i)}Vt(e,n,r){return e!==Ht?!1:(j(r)||this.je(n,r)||this.At(n,r),!0)}N(e,n,r,o,s){if(n.nodeType!==Node.ELEMENT_NODE||r==null||this.Vt(e,n,r))return;let i=this.kt(o,e.once),a=this.Mt(e,r),c=this.Nt(a,i);W(n,c.stop);let f=this.Ot(n,r,a,i,o,s),u=this.Lt(e,f,c);if(!u)return;let l=this.It(f,a,i,o,u);l(),e.once||(c.result=a.subscribe(l),i&&(c.dynamic=i.subscribe(l)))}kt(e,n){let r=Cr(e,this.He);if(r)return this.m.O(z(r),void 0,void 0,void 0,n)}Mt(e,n){return this.m.O(n,e.isLazy,e.isLazyKey,e.collectRefObj,e.once)}Nt(e,n){let r={stop:()=>{var o,s,i;e.stop(),n==null||n.stop(),(o=r.result)==null||o.call(r),(s=r.dynamic)==null||s.call(r),(i=r.mounted)==null||i.call(r),r.result=void 0,r.dynamic=void 0,r.mounted=void 0}};return r}Ot(e,n,r,o,s,i){return{el:e,expr:n,values:r.value(),previousValues:void 0,option:o?o.value()[0]:s,previousOption:void 0,flags:i,parseResult:r,dynamicOption:o}}Lt(e,n,r){let o=e.mount(n);if(typeof o=="function"){r.mounted=o;return}return o!=null&&o.unmount&&(r.mounted=o.unmount),o==null?void 0:o.update}It(e,n,r,o,s){let i,a;return()=>{let c=n.value(),f=r?r.value()[0]:o;e.values=c,e.previousValues=i,e.option=f,e.previousOption=a,i=c,a=f,s(e)}}};var Ps=(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n==null?void 0:n[o];if(S(s)){let a=s.length;for(let c=0;c<a;++c)Ir(t,s[c],i==null?void 0:i[c])}else Ir(t,s,i)}},Pn={mount:()=>({update:({el:t,values:e,previousValues:n})=>{Ps(t,e,n)}})},Ir=(t,e,n)=>{let r=v(e),o=v(n),s=t.classList,i=Q(r),a=Q(o);if(r&&!i){let c=r;if(o&&!a){let f=o;for(let u in f)(!(u in c)||!v(c[u]))&&s.remove(u)}for(let f in c)v(c[f])&&s.add(f)}else if(i){if(o!==r){let c=a?tt(o):[],f=tt(r);c.length>0&&s.remove(...c),f.length>0&&s.add(...f)}}else if(o){let c=a?tt(o):[];c.length>0&&s.remove(...c)}};function Ds(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=Se(t[r],e[r]);return n}function Se(t,e){if(t===e)return!0;let n=xn(t),r=xn(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=lt(t),r=lt(e),n||r)return t===e;if(n=S(t),r=S(e),n||r)return n&&r?Ds(t,e):!1;if(n=P(t),r=P(e),n||r){if(!n||!r)return!1;let o=Object.keys(t).length,s=Object.keys(e).length;if(o!==s)return!1;for(let i in t){let a=Object.prototype.hasOwnProperty.call(t,i),c=Object.prototype.hasOwnProperty.call(e,i);if(a&&!c||!Se(t[i],e[i]))return!1}return!0}return String(t)===String(e)}function nn(t,e){return t.findIndex(n=>Se(n,e))}var Vr=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var rn=t=>{if(!E(t))throw q(3,"pause");t(void 0,void 0,3)};var on=t=>{if(!E(t))throw q(3,"resume");t(void 0,void 0,4)};var Dr={mount:({el:t,parseResult:e,flags:n})=>({update:({values:r})=>{Ur(t,r[0])},unmount:Us(t,e,n)})},Ur=(t,e)=>{let n=jr(t);if(n&&Hr(t))S(e)?e=nn(e,Ae(t))>-1:fe(e)?e=e.has(Ae(t)):e=Fs(t,e),t.checked=e;else if(n&&Br(t))t.checked=Se(e,Ae(t));else if(n||_r(t))$r(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(Fr(t)){let r=t.options,o=r.length,s=t.multiple;for(let i=0;i<o;i++){let a=r[i],c=Ae(a);if(s)S(e)?a.selected=nn(e,c)>-1:a.selected=e.has(c);else if(Se(Ae(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else _(7,t)},yt=t=>(E(t)&&(t=t()),J(t)&&(t=t()),t?Q(t)?{trim:t.includes("trim"),lazy:t.includes("lazy"),number:t.includes("number"),int:t.includes("int")}:{trim:!!t.trim,lazy:!!t.lazy,number:!!t.number,int:!!t.int}:{trim:!1,lazy:!1,number:!1,int:!1}),Hr=t=>t.type==="checkbox",Br=t=>t.type==="radio",$r=t=>t.type==="number"||t.type==="range",jr=t=>t.tagName==="INPUT",_r=t=>t.tagName==="TEXTAREA",Fr=t=>t.tagName==="SELECT",Us=(t,e,n)=>{let r=e.value,o=yt(n==null?void 0:n.join(",")),s=yt(r()[1]),i={int:o.int||s.int,lazy:o.lazy||s.lazy,number:o.number||s.number,trim:o.trim||s.trim};if(!e.refs[0])return _(8,t),()=>{};let a=()=>e.refs[0],c=jr(t);return c&&Hr(t)?Bs(t,a):c&&Br(t)?qs(t,a):c||_r(t)?Hs(t,i,a,r):Fr(t)?zs(t,a,r):(_(7,t),()=>{})},Pr=/[.,' ·٫]/,Hs=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=$r(t),a=()=>{!e.trim&&!yt(r()[1]).trim||(t.value=t.value.trim())},c=m=>{let y=m.target;y.composing=1},f=m=>{let y=m.target;y.composing&&(y.composing=0,y.dispatchEvent(new Event(s)))},u=()=>{t.removeEventListener(s,l),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",f),t.removeEventListener("change",f)},l=m=>{let y=n();if(!y)return;let x=m.target;if(!x||x.composing)return;let d=x.value,w=yt(r()[1]);if(i||w.number||w.int){if(w.int)d=parseInt(d);else{if(Pr.test(d[d.length-1])&&d.split(Pr).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(y()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else w.trim&&(d=d.trim());y(d)};return t.addEventListener(s,l),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",f),t.addEventListener("change",f),u},Bs=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=Ae(t),a=t.checked,c=s();if(S(c)){let f=nn(c,i),u=f!==-1;a&&!u?c.push(i):!a&&u&&c.splice(f,1)}else fe(c)?a?c.add(i):c.delete(i):s(_s(t,a))};return t.addEventListener(n,o),r},Ae=t=>"_value"in t?t._value:t.value,qr="trueValue",$s="falseValue",zr="true-value",js="false-value",_s=(t,e)=>{let n=e?qr:$s;if(n in t)return t[n];let r=e?zr:js;return t.hasAttribute(r)?t.getAttribute(r):e},Fs=(t,e)=>{if(qr in t)return Se(e,t.trueValue);let r=zr;return t.hasAttribute(r)?Se(e,t.getAttribute(r)):Se(e,!0)},qs=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=Ae(t);s(i)};return t.addEventListener(n,o),r},zs=(t,e,n)=>{let r="change",o=Ks(t,n),s=()=>{t.removeEventListener(r,i),o()},i=()=>{let a=e();if(!a)return;let f=yt(n()[1]).number,u=Array.prototype.filter.call(t.options,l=>l.selected).map(l=>f?Vr(Ae(l)):Ae(l));if(t.multiple){let l=a();try{if(rn(a),fe(l)){l.clear();for(let m of u)l.add(m)}else S(l)?(l.splice(0),l.push(...u)):a(u)}finally{on(a),te(a)}}else a(u[0])};return t.addEventListener(r,i),s},Ks=(t,e)=>{var c,f;let n=(f=globalThis.MutationObserver)!=null?f:(c=globalThis.window)==null?void 0:c.MutationObserver;if(!n)return()=>{};let r=!1,o=!1,s=()=>{r=!1,!o&&Ur(t,e()[0])},i=()=>{r||(r=!0,typeof queueMicrotask=="function"?queueMicrotask(s):Promise.resolve().then(s))},a=new n(i);return a.observe(t,{attributes:!0,attributeFilter:["value"],childList:!0,subtree:!0}),()=>{o=!0,a.disconnect()}};var Ws=["stop","prevent","capture","self","once","left","right","middle","passive"],Gs=t=>{let e={};if(j(t))return;let n=t.split(",");for(let r of Ws)e[r]=n.includes(r);return e},Js=(t,e,n,r,o)=>{var f,u;if(r){let l=e.value(),m=v(r.value()[0]);return Q(m)?Dn(t,z(m),()=>e.value()[0],(f=o==null?void 0:o.join(","))!=null?f:l[1]):()=>{}}else if(n){let l=e.value();return Dn(t,z(n),()=>e.value()[0],(u=o==null?void 0:o.join(","))!=null?u:l[1])}let s=[],i=()=>{s.forEach(l=>l())},a=e.value(),c=a.length;for(let l=0;l<c;++l){let m=a[l];if(J(m)&&(m=m()),P(m))for(let y of Object.entries(m)){let x=y[0],d=()=>{let C=e.value()[l];return J(C)&&(C=C()),C=C[x],J(C)&&(C=C()),C},w=m[x+"_flags"];s.push(Dn(t,x,d,w))}else _(2,"r-on",t)}return i},Un={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,mount:({el:t,parseResult:e,option:n,dynamicOption:r,flags:o})=>Js(t,e,n,r,o)},Qs=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e!=null||(e="");let n=[...t.split("."),...e.split(",")];t=n[0];let r=n[1],o=n.includes("ctrl"),s=n.includes("shift"),i=n.includes("alt"),a=n.includes("meta"),c=f=>!(o&&!f.ctrlKey||s&&!f.shiftKey||i&&!f.altKey||a&&!f.metaKey);return r?[t,f=>c(f)?f.key.toUpperCase()===r.toUpperCase():!1]:[t,c]}return[t,n=>!0]},Dn=(t,e,n,r)=>{if(j(e))return _(5,"r-on",t),()=>{};let o=Gs(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=Qs(e,r);let a=u=>{if(!i(u)||!n&&e==="submit"&&(o!=null&&o.prevent))return;let l=n(u);J(l)&&(l=l(u)),J(l)&&l(u)},c=()=>{t.removeEventListener(e,f,s)},f=u=>{if(!o){a(u);return}try{if(o.left&&u.button!==0||o.middle&&u.button!==1||o.right&&u.button!==2||o.self&&u.target!==t)return;o.stop&&u.stopPropagation(),o.prevent&&u.preventDefault(),a(u)}finally{o.once&&c()}};return t.addEventListener(e,f,s),c};var Xs=(t,e,n,r)=>{if(n){r&&r.includes("camel")&&(n=z(n)),it(t,n,e[0]);return}let o=e.length;for(let s=0;s<o;++s){let i=e[s];if(S(i)){let a=i[0],c=i[1];it(t,a,c)}else if(P(i))for(let a of Object.entries(i)){let c=a[0],f=a[1];it(t,c,f)}else{let a=e[s++],c=e[s];it(t,a,c)}}},Kr={mount:()=>({update:({el:t,values:e,option:n,flags:r})=>{Xs(t,e,n,r)}})};function Ys(t){return!!t||t===""}var it=(t,e,n)=>{if(me(e)){_(3,":prop",t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(ye),1),t[e]=n!=null?n:"";return}let r=t.tagName;if(e==="value"&&r!=="PROGRESS"&&!r.includes("-")){t._value=n;let s=r==="OPTION"?t.getAttribute("value"):t.value,i=n!=null?n:"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let o=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=Ys(n):n==null&&s==="string"?(n="",o=!0):s==="number"&&(n=0,o=!0)}try{t[e]=n}catch(s){o||_(4,e,r,n,s)}o&&t.removeAttribute(e)};var Wr={once:!0,mount:({el:t,parseResult:e,expr:n})=>{let r=e,o=r.value()[0],s=S(o),i=r.refs[0];return s?o.push(t):i?i==null||i(t):r.context[n]=t,()=>{if(s){let a=o.indexOf(t);a!==-1&&o.splice(a,1)}else i==null||i(null)}}};var Zs=(t,e)=>{let n=Ve(t).data,r=n._ord;ar(r)&&(r=n._ord=t.style.display),je(e[0])?t.style.display=r:t.style.display="none"},Gr={mount:()=>({update:({el:t,values:e})=>{Zs(t,e)}})};var ei=(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n==null?void 0:n[o];if(S(s)){let a=s.length;for(let c=0;c<a;++c)Jr(t,s[c],i==null?void 0:i[c])}else Jr(t,s,i)}},sn={mount:()=>({update:({el:t,values:e,previousValues:n})=>{ei(t,e,n)}})},Jr=(t,e,n)=>{let r=v(e),o=v(n),s=t.style,i=Q(r);if(r&&!i){let a=r;if(o&&!Q(o)){let c=o;for(let f in c)v(a[f])==null&&Bn(s,f,"")}for(let c in a)Bn(s,c,a[c])}else{let a=s.display;if(i?o!==r&&(s.cssText=r):o&&t.removeAttribute("style"),"_ord"in Ve(t).data)return;s.display=a}},Qr=/\s*!important$/;function Bn(t,e,n){let r=v(n);if(S(r))r.forEach(o=>{Bn(t,e,o)});else{let o=r==null?"":String(r);if(e.startsWith("--"))t.setProperty(e,o);else{let s=ti(t,e);Qr.test(o)?t.setProperty(et(s),o.replace(Qr,""),"important"):t[s]=o}}}var Xr=["Webkit","Moz","ms"],Hn={};function ti(t,e){let n=Hn[e];if(n)return n;let r=z(e);if(r!=="filter"&&r in t)return Hn[e]=r;r=dt(r);for(let o=0;o<Xr.length;o++){let s=Xr[o]+r;if(s in t)return Hn[e]=s}return e}var ue=t=>Yr(v(t)),Yr=(t,e=new WeakMap)=>{if(!t||!P(t))return t;if(S(t))return t.map(ue);if(fe(t)){let r=new Set;for(let o of t.keys())r.add(ue(o));return r}if(ke(t)){let r=new Map;for(let o of t)r.set(ue(o[0]),ue(o[1]));return r}if(e.has(t))return v(e.get(t));let n=Rt({},t);e.set(t,n);for(let r of Object.entries(n))n[r[0]]=Yr(v(r[1]),e);return n};var ni=(t,e)=>{var r;let n=e[0];t.textContent=fe(n)?JSON.stringify(ue([...n])):ke(n)?JSON.stringify(ue([...n])):P(n)?JSON.stringify(ue(n)):(r=n==null?void 0:n.toString())!=null?r:""},Zr={mount:()=>({update:({el:t,values:e})=>{ni(t,e)}})};var eo={mount:()=>({update:({el:t,values:e})=>{it(t,"value",e[0])}})};var qe=t=>(t==null?void 0:t[Nt])===1;function Ue(t){if(ot(t))return t;let e;if(E(t)?(e=t,t=e()):e=re(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[Nt]=1,S(t)){let n=t.length;for(let r=0;r<n;++r){let o=t[r];qe(o)||(t[r]=Ue(o))}return e}if(!P(t))return e;for(let n of Object.entries(t)){let r=n[1];if(qe(r))continue;let o=n[0];lt(o)||(t[o]=null,t[o]=Ue(r))}return e}var He=class He{constructor(e){p(this,"B",{});p(this,"u",{});p(this,"dt",()=>Object.keys(this.B).filter(e=>e.length===1||!e.startsWith(":")));p(this,"te",new Map);p(this,"F",new Map);p(this,"forGrowThreshold",10);p(this,"globalContext");p(this,"useInterpolation",!0);p(this,"propValidationMode","throw");if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.Dt()}static getDefault(){var e;return(e=He.$e)!=null?e:He.$e=new He}Dt(){let e={},n=globalThis;for(let r of He.Pt.split(","))e[r]=n[r];return e.ref=Ue,e.sref=re,e.flatten=ue,e}addComponent(...e){for(let n of e){if(!n.defaultName){$e.warning("Registered component's default name is not defined",n);continue}this.te.set(dt(n.defaultName),n),this.F.set(dt(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.B={".":Kr,":":On,"@":Un,[`${e}on`]:Un,[`${e}bind`]:On,[`${e}html`]:Qt,[`${e}text`]:Zr,[`${e}show`]:Gr,[`${e}model`]:Dr,":style":sn,[`${e}style`]:sn,[`${e}bind:style`]:sn,":class":Pn,[`${e}bind:class`]:Pn,":ref":Wr,":value":eo,[`${e}teleport`]:Ht},this.u={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,context:":context",contextAlias:`${e}context`,bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.B,this.u)}};p(He,"$e"),p(He,"Pt","Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console");var pe=He;var an=(t,e)=>{if(!t)return;let r=(e!=null?e:pe.getDefault()).u,o=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of oi(t,r.pre,s))ri(i,r.text,o,s)},ri=(t,e,n,r)=>{var c;let o=t.textContent;if(!o)return;let s=n,i=o.split(s);if(i.length<=1)return;if(((c=t.parentElement)==null?void 0:c.childNodes.length)===1&&i.length===3){let f=i[1],u=to(f,r);if(u&&j(i[0])&&j(i[2])){let l=t.parentElement;l.setAttribute(e,f.substring(u.start.length,f.length-u.end.length)),l.innerText="";return}}let a=document.createDocumentFragment();for(let f of i){let u=to(f,r);if(u){let l=document.createElement("span");l.setAttribute(e,f.substring(u.start.length,f.length-u.end.length)),a.appendChild(l)}else a.appendChild(document.createTextNode(f))}t.replaceWith(a)},oi=(t,e,n)=>{let r=[],o=s=>{var i;if(s.nodeType===Node.TEXT_NODE)n.some(a=>{var c;return(c=s.textContent)==null?void 0:c.includes(a.start)})&&r.push(s);else{if((i=s==null?void 0:s.hasAttribute)!=null&&i.call(s,e))return;for(let a of ve(s))o(a)}};return o(t),r},to=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var si=9,ii=10,ai=13,ci=32,Ne=46,cn=44,ui=39,li=34,un=40,at=41,ln=91,$n=93,jn=63,fi=59,no=58,ro=123,fn=125,ze=43,pn=45,_n=96,oo=47,Fn=92,so=new Set([2,3]),fo={"=":2.5,"*=":2.5,"**=":2.5,"/=":2.5,"%=":2.5,"+=":2.5,"-=":2.5,"<<=":2.5,">>=":2.5,">>>=":2.5,"&=":2.5,"^=":2.5,"|=":2.5},pi=rr(Rt({"=>":2},fo),{"||":3,"??":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"/":12,"%":12,"**":13}),po=Object.keys(fo),mi=new Set(po),zn=new Set(["=>"]);po.forEach(t=>zn.add(t));var io={true:!0,false:!1,null:null},di="this",ct="Expected ",Ke="Unexpected ",Wn="Unclosed ",hi=ct+":",ao=ct+"expression",yi="missing }",gi=Ke+"object property",bi=Wn+"(",co=ct+"comma",uo=Ke+"token ",Ti=Ke+"period",qn=ct+"expression after ",xi="missing unaryOp argument",Ci=Wn+"[",Ei=ct+"exponent (",Ri="Variable names cannot start with a number (",wi=Wn+'quote after "',gt=t=>t>=48&&t<=57,lo=t=>pi[t],Kn=class{constructor(e){p(this,"p");p(this,"e");this.p=e,this.e=0}get H(){return this.p.charAt(this.e)}get h(){return this.p.charCodeAt(this.e)}f(e){return this.p.charCodeAt(this.e)===e}z(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95||e>=128}me(e){return this.z(e)||gt(e)}i(e){return new Error(`${e} at character ${this.e}`)}g(){let e=this.h,n=this.p,r=this.e;for(;e===ci||e===si||e===ii||e===ai;)e=n.charCodeAt(++r);this.e=r}parse(){let e=this.ye();return e.length===1?e[0]:{type:0,body:e}}ye(e){let n=[];for(;this.e<this.p.length;){let r=this.h;if(r===fi||r===cn)this.e++;else{let o=this.A();if(o)n.push(o);else if(this.e<this.p.length){if(r===e)break;throw this.i(Ke+'"'+this.H+'"')}}}return n}A(){var n;let e=(n=this.Ut())!=null?n:this._e();return this.g(),this.Bt(e)}he(){this.g();let e=this.p,n=this.e,r=e.charCodeAt(n),o=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);if(isNaN(r))return!1;let a=!1,c=0;return r===62&&o===62&&s===62&&i===61?(a=">>>=",c=4):r===61&&o===61&&s===61?(a="===",c=3):r===33&&o===61&&s===61?(a="!==",c=3):r===62&&o===62&&s===62?(a=">>>",c=3):r===60&&o===60&&s===61?(a="<<=",c=3):r===62&&o===62&&s===61?(a=">>=",c=3):r===42&&o===42&&s===61?(a="**=",c=3):r===61&&o===62?(a="=>",c=2):r===124&&o===124?(a="||",c=2):r===63&&o===63?(a="??",c=2):r===38&&o===38?(a="&&",c=2):r===61&&o===61?(a="==",c=2):r===33&&o===61?(a="!=",c=2):r===60&&o===61?(a="<=",c=2):r===62&&o===61?(a=">=",c=2):r===60&&o===60?(a="<<",c=2):r===62&&o===62?(a=">>",c=2):r===43&&o===61?(a="+=",c=2):r===45&&o===61?(a="-=",c=2):r===42&&o===61?(a="*=",c=2):r===47&&o===61?(a="/=",c=2):r===37&&o===61?(a="%=",c=2):r===38&&o===61?(a="&=",c=2):r===94&&o===61?(a="^=",c=2):r===124&&o===61?(a="|=",c=2):r===42&&o===42?(a="**",c=2):r===105&&o===110?this.me(e.charCodeAt(n+2))||(a="in",c=2):r===61?(a="=",c=1):r===124?(a="|",c=1):r===94?(a="^",c=1):r===38?(a="&",c=1):r===60?(a="<",c=1):r===62?(a=">",c=1):r===43?(a="+",c=1):r===45?(a="-",c=1):r===42?(a="*",c=1):r===47?(a="/",c=1):r===37&&(a="%",c=1),a?(this.e+=c,a):!1}_e(){let e,n,r,o,s,i,a,c;if(s=this.W(),!s||(n=this.he(),!n))return s;if(o={value:n,prec:lo(n),right_a:zn.has(n)},i=this.W(),!i)throw this.i(qn+n);let f=[s,o,i];for(;n=this.he();){r=lo(n),o={value:n,prec:r,right_a:zn.has(n)},c=n;let u=l=>o.right_a&&l.right_a?r>l.prec:r<=l.prec;for(;f.length>2&&u(f[f.length-2]);)i=f.pop(),n=f.pop().value,s=f.pop(),e=this.Fe(n,s,i),f.push(e);if(e=this.W(),!e)throw this.i(qn+c);f.push(o,e)}for(a=f.length-1,e=f[a];a>1;)e=this.Fe(f[a-1].value,f[a-2],e),a-=2;return e}W(){let e;if(this.g(),e=this.Ht(),e)return this.ge(e);let n=this.h;if(gt(n)||n===Ne)return this.jt();if(n===ui||n===li)e=this.$t();else if(n===ln)e=this._t();else{let r=this.Ft();if(r){let o=this.W();if(!o)throw this.i(xi);return this.ge({type:7,operator:r,argument:o})}this.z(n)?(e=this.be(),e.name in io?e={type:4,value:io[e.name],raw:e.name}:e.name===di&&(e={type:5})):n===un&&(e=this.qt())}return e?(e=this.G(e),this.ge(e)):!1}Fe(e,n,r){if(e==="=>"){let o=n.type===1?n.expressions:[n];return{type:15,params:o,body:r}}return mi.has(e)?{type:16,operator:e,left:n,right:r}:{type:8,operator:e,left:n,right:r}}Ht(){let e={node:!1};return this.Kt(e),e.node||(this.zt(e),e.node)||(this.Wt(e),e.node)||(this.qe(e),e.node)||this.Gt(e),e.node}ge(e){let n={node:e};return this.Jt(n),this.Qt(n),this.Xt(n),n.node}Ft(){let e=this.p,n=this.e,r=e.charCodeAt(n),o=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);return r===pn?(this.e++,"-"):r===33?(this.e++,"!"):r===126?(this.e++,"~"):r===ze?(this.e++,"+"):r===110&&o===101&&s===119&&!this.me(i)?(this.e+=3,"new"):!1}Ut(){let e={};return this.Yt(e),e.node}Bt(e){let n={node:e};return this.Zt(n),n.node}G(e){this.g();let n=this.h;for(;n===Ne||n===ln||n===un||n===jn;){let r;if(n===jn){if(this.p.charCodeAt(this.e+1)!==Ne)break;r=!0,this.e+=2,this.g(),n=this.h}if(this.e++,n===ln){if(e={type:3,computed:!0,object:e,property:this.A()},this.g(),n=this.h,n!==$n)throw this.i(Ci);this.e++}else n===un?e={type:6,arguments:this.Ke(at),callee:e}:(r&&this.e--,this.g(),e={type:3,computed:!1,object:e,property:this.be()});r&&(e.optional=!0),this.g(),n=this.h}return e}jt(){let e=this.p,n=this.e,r=n;for(;gt(e.charCodeAt(r));)r++;if(e.charCodeAt(r)===Ne)for(r++;gt(e.charCodeAt(r));)r++;let o=e.charCodeAt(r);if(o===101||o===69){r++;let a=e.charCodeAt(r);(a===ze||a===pn)&&r++;let c=r;for(;gt(e.charCodeAt(r));)r++;if(c===r){this.e=r;let f=e.slice(n,r);throw this.i(Ei+f+this.H+")")}}this.e=r;let s=e.slice(n,r),i=e.charCodeAt(r);if(this.z(i))throw this.i(Ri+s+this.H+")");if(i===Ne||s.length===1&&s.charCodeAt(0)===Ne)throw this.i(Ti);return{type:4,value:parseFloat(s),raw:s}}$t(){let e=this.p,n=e.length,r=this.e,o=e.charCodeAt(this.e++),s=this.e,i=s,a=[],c=!1,f=!1;for(;s<n;){let l=e.charCodeAt(s);if(l===o){f=!0,this.e=s+1;break}if(l===Fn){c||(c=!0),a.push(e.slice(i,s));let m=e.charCodeAt(s+1);a.push(this.ze(m)),s+=2,i=s}else s++}let u=c?a.join("")+e.slice(i,f?s:n):e.slice(i,f?s:n);if(!f)throw this.e=s,this.i(wi+u+'"');return{type:4,value:u,raw:e.substring(r,this.e)}}ze(e){switch(e){case 110:return`
|
|
2
|
-
`;case 114:return"\r";case 116:return" ";case 98:return"\b";case 102:return"\f";case 118:return"\v";default:return isNaN(e)?"":String.fromCharCode(e)}}be(){let e=this.h,n=this.e;if(this.z(e))this.e++;else throw this.i(Ke+this.H);for(;this.e<this.p.length&&(e=this.h,this.me(e));)this.e++;return{type:2,name:this.p.slice(n,this.e)}}Ke(e){let n=[],r=!1,o=0;for(;this.e<this.p.length;){this.g();let s=this.h;if(s===e){if(r=!0,this.e++,e===at&&o&&o>=n.length)throw this.i(uo+String.fromCharCode(e));break}else if(s===cn){if(this.e++,o++,o!==n.length){if(e===at)throw this.i(uo+",");for(let i=n.length;i<o;i++)n.push(null)}}else{if(n.length!==o&&o!==0)throw this.i(co);{let i=this.A();if(!i||i.type===0)throw this.i(co);n.push(i)}}}if(!r)throw this.i(ct+String.fromCharCode(e));return n}qt(){this.e++;let e=this.ye(at);if(this.f(at))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(bi)}_t(){return this.e++,{type:9,elements:this.Ke($n)}}Kt(e){if(this.f(ro)){this.e++;let n=[];for(;!isNaN(this.h);){if(this.g(),this.f(fn)){this.e++,e.node=this.G({type:10,properties:n});return}let r=this.A();if(!r)break;if(this.g(),r.type===2&&(this.f(cn)||this.f(fn)))n.push({type:12,computed:!1,key:r,value:r,shorthand:!0});else if(this.f(no)){this.e++;let o=this.A();if(!o)throw this.i(gi);let s=r.type===9;n.push({type:12,computed:s,key:s?r.elements[0]:r,value:o,shorthand:!1}),this.g()}else n.push(r);this.f(cn)&&this.e++}throw this.i(yi)}}zt(e){let n=this.h;if((n===ze||n===pn)&&n===this.p.charCodeAt(this.e+1)){this.e+=2;let r=e.node={type:13,operator:n===ze?"++":"--",argument:this.G(this.be()),prefix:!0};if(!r.argument||!so.has(r.argument.type))throw this.i(Ke+r.operator)}}Qt(e){let n=e.node,r=this.h;if((r===ze||r===pn)&&r===this.p.charCodeAt(this.e+1)){if(!so.has(n.type))throw this.i(Ke+(r===ze?"++":"--"));this.e+=2,e.node={type:13,operator:r===ze?"++":"--",argument:n,prefix:!1}}}Wt(e){this.p.charCodeAt(this.e)===Ne&&this.p.charCodeAt(this.e+1)===Ne&&this.p.charCodeAt(this.e+2)===Ne&&(this.e+=3,e.node={type:14,argument:this.A()})}Zt(e){if(e.node&&this.f(jn)){this.e++;let n=e.node,r=this.A();if(!r)throw this.i(ao);if(this.g(),this.f(no)){this.e++;let o=this.A();if(!o)throw this.i(ao);e.node={type:11,test:n,consequent:r,alternate:o}}else throw this.i(hi)}}Yt(e){if(this.g(),this.f(un)){let n=this.e;if(this.e++,this.g(),this.f(at)){this.e++;let r=this.he();if(r==="=>"){let o=this._e();if(!o)throw this.i(qn+r);e.node={type:15,params:null,body:o};return}}this.e=n}}Xt(e){let n=e.node,r=n.type;(r===2||r===3)&&this.f(_n)&&(e.node={type:17,tag:n,quasi:this.qe(e)})}qe(e){if(!this.f(_n))return;let n=this.p,r=n.length,o={type:19,quasis:[],expressions:[]},s=++this.e,i=[],a=[],c=!1,f=u=>{if(!c){let y=n.slice(s,this.e);return o.quasis.push({type:18,value:{raw:y,cooked:y},tail:u})}i.push(n.slice(s,this.e)),a.push(n.slice(s,this.e));let l=i.join(""),m=a.join("");return i.length=0,a.length=0,c=!1,o.quasis.push({type:18,value:{raw:l,cooked:m},tail:u})};for(;this.e<r;){let u=n.charCodeAt(this.e);if(u===_n)return f(!0),this.e+=1,e.node=o,o;if(u===36&&n.charCodeAt(this.e+1)===ro){if(f(!1),this.e+=2,o.expressions.push(...this.ye(fn)),!this.f(fn))throw this.i("unclosed ${");this.e+=1,s=this.e}else if(u===Fn){c||(c=!0),i.push(n.slice(s,this.e)),a.push(n.slice(s,this.e));let l=n.charCodeAt(this.e+1);i.push(n.slice(this.e,this.e+2)),a.push(this.ze(l)),this.e+=2,s=this.e}else this.e+=1}throw this.i("Unclosed `")}Jt(e){let n=e.node;if(!n||n.operator!=="new"||!n.argument)return;if(!n.argument||![6,3].includes(n.argument.type))throw this.i("Expected new function()");e.node=n.argument;let r=e.node;for(;r.type===3||r.type===6&&r.callee.type===3;)r=r.type===3?r.object:r.callee.object;r.type=20}Gt(e){if(!this.f(oo))return;let n=++this.e,r=!1;for(;this.e<this.p.length;){if(this.h===oo&&!r){let o=this.p.slice(n,this.e),s="";for(;++this.e<this.p.length;){let a=this.h;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.H;else break}let i;try{i=new RegExp(o,s)}catch(a){throw this.i(a.message)}return e.node={type:4,value:i,raw:this.p.slice(n-1,this.e)},e.node=this.G(e.node),e.node}this.f(ln)?r=!0:r&&this.f($n)&&(r=!1),this.e+=this.f(Fn)?2:1}throw this.i("Unclosed Regex")}},mo=t=>new Kn(t).parse();var vi={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(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)=>Et(t,e)},Si={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},bo=t=>{if(!(t!=null&&t.some(go)))return t;let e=[];return t.forEach(n=>go(n)?e.push(...n):e.push(n)),e},ho=(...t)=>bo(t),Gn=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},Ai={"++":(t,e)=>{let n=t[e];if(E(n)){let r=n();return n(++r),r}return++t[e]},"--":(t,e)=>{let n=t[e];if(E(n)){let r=n();return n(--r),r}return--t[e]}},Ni={"++":(t,e)=>{let n=t[e];if(E(n)){let r=n();return n(r+1),r}return t[e]++},"--":(t,e)=>{let n=t[e];if(E(n)){let r=n();return n(r-1),r}return t[e]--}},yo={"=":(t,e,n)=>{let r=t[e];return E(r)?r(n):t[e]=n},"+=":(t,e,n)=>{let r=t[e];return E(r)?r(r()+n):t[e]+=n},"-=":(t,e,n)=>{let r=t[e];return E(r)?r(r()-n):t[e]-=n},"*=":(t,e,n)=>{let r=t[e];return E(r)?r(r()*n):t[e]*=n},"/=":(t,e,n)=>{let r=t[e];return E(r)?r(r()/n):t[e]/=n},"%=":(t,e,n)=>{let r=t[e];return E(r)?r(r()%n):t[e]%=n},"**=":(t,e,n)=>{let r=t[e];return E(r)?r(Et(r(),n)):t[e]=Et(t[e],n)},"<<=":(t,e,n)=>{let r=t[e];return E(r)?r(r()<<n):t[e]<<=n},">>=":(t,e,n)=>{let r=t[e];return E(r)?r(r()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let r=t[e];return E(r)?r(r()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let r=t[e];return E(r)?r(r()|n):t[e]|=n},"&=":(t,e,n)=>{let r=t[e];return E(r)?r(r()&n):t[e]&=n},"^=":(t,e,n)=>{let r=t[e];return E(r)?r(r()^n):t[e]^=n}},mn=(t,e)=>J(t)?t.bind(e):t,Jn=class{constructor(e,n,r,o,s){p(this,"l");p(this,"We");p(this,"Ge");p(this,"Je");p(this,"V");p(this,"Qe");p(this,"Xe");this.l=S(e)?e:[e],this.We=n,this.Ge=r,this.Je=o,this.Xe=!!s}Ye(e,n){if(n&&e in n)return n;for(let r of this.l)if(e in r)return r}2(e,n,r){let o=e.name;if(o==="$root")return this.l[this.l.length-1];if(o==="$parent")return this.l[1];if(o==="$ctx")return[...this.l];if(r&&o in r)return this.V=r[o],mn(v(r[o]),r);for(let i of this.l)if(o in i)return this.V=i[o],mn(v(i[o]),i);let s=this.We;if(s&&o in s)return this.V=s[o],mn(v(s[o]),s)}5(e,n,r){return this.l[0]}0(e,n,r){return this.Ze(n,r,ho,...e.body)}1(e,n,r){return this.w(n,r,(...o)=>o.pop(),...e.expressions)}3(e,n,r){let{obj:o,key:s}=this.Te(e,n,r),i=o==null?void 0:o[s];return this.V=i,mn(v(i),o)}4(e,n,r){return e.value}6(e,n,r){let o=(i,...a)=>J(i)?i(...bo(a)):i,s=this.w(++n,r,o,e.callee,...e.arguments);return this.V=s,s}7(e,n,r){return this.w(n,r,Si[e.operator],e.argument)}8(e,n,r){let o=vi[e.operator];switch(e.operator){case"||":case"&&":case"??":return o(()=>this.b(e.left,n,r),()=>this.b(e.right,n,r))}return this.w(n,r,o,e.left,e.right)}9(e,n,r){return this.Ze(++n,r,ho,...e.elements)}10(e,n,r){let o={},s=(...i)=>{i.forEach(a=>{Object.assign(o,a)})};return this.w(++n,r,s,...e.properties),o}11(e,n,r){return this.w(n,r,o=>this.b(o?e.consequent:e.alternate,n,r),e.test)}12(e,n,r){var u;let o={},s=l=>(l==null?void 0:l.type)!==15,i=(u=this.Je)!=null?u:()=>!1,a=n===0&&this.Xe,c=l=>this.et(a,e.key,n,Gn(l,r)),f=l=>this.et(a,e.value,n,Gn(l,r));if(e.shorthand){let l=e.key.name;o[l]=s(e.key)&&i(l,n)?c:c()}else if(e.computed){let l=v(c());o[l]=s(e.value)&&i(l,n)?f:f()}else{let l=e.key.type===4?e.key.value:e.key.name;o[l]=s(e.value)&&i(l,n)?()=>f:f()}return o}Te(e,n,r){let o=this.b(e.object,n,r),s=e.computed?this.b(e.property,n,r):e.property.name;return{obj:o,key:s}}13(e,n,r){let o=e.argument,s=e.operator,i=e.prefix?Ai:Ni;if(o.type===2){let a=o.name,c=this.Ye(a,r);return me(c)?void 0:i[s](c,a)}if(o.type===3){let{obj:a,key:c}=this.Te(o,n,r);return i[s](a,c)}}16(e,n,r){let o=e.left,s=e.operator;if(o.type===2){let i=o.name,a=this.Ye(i,r);if(me(a))return;let c=this.b(e.right,n,r);return yo[s](a,i,c)}if(o.type===3){let{obj:i,key:a}=this.Te(o,n,r),c=this.b(e.right,n,r);return yo[s](i,a,c)}}14(e,n,r){let o=this.b(e.argument,n,r);return S(o)&&(o.s=To),o}17(e,n,r){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,r)}19(e,n,r){let o=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.w(n,r,o,...e.expressions)}18(e,n,r){return e.value.cooked}20(e,n,r){let o=(s,...i)=>new s(...i);return this.w(n,r,o,e.callee,...e.arguments)}15(e,n,r){return(...o)=>{let s=Object.create(r!=null?r:{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=o[a++]}return this.b(e.body,n,s)}}b(e,n,r){let o=v(this[e.type](e,n,r));return this.Qe=e.type,o}et(e,n,r,o){let s=this.b(n,r,o);return e&&this.tt()?this.V:s}tt(){let e=this.Qe;return(e===2||e===3||e===6)&&E(this.V)}eval(e,n){let{value:r,refs:o}=_t(()=>this.b(e,-1,n)),s={value:r,refs:o};return this.tt()&&(s.ref=this.V),s}w(e,n,r,...o){let s=o.map(i=>i&&this.b(i,e,n));return r(...s)}Ze(e,n,r,...o){let s=this.Ge;if(!s)return this.w(e,n,r,...o);let i=o.map((a,c)=>a&&(a.type!==15&&s(c,e)?f=>this.b(a,e,Gn(f,n)):this.b(a,e,n)));return r(...i)}},To=Symbol("s"),go=t=>(t==null?void 0:t.s)===To,xo=(t,e,n,r,o,s,i)=>new Jn(e,n,r,o,i).eval(t,s);var Co={},Eo=t=>!!t,dn=class{constructor(e,n){p(this,"l");p(this,"o");p(this,"nt",[]);this.l=e,this.o=n}v(e){this.l=[e,...this.l]}ne(){return this.l.map(n=>n.components).filter(Eo).reverse().reduce((n,r)=>{for(let[o,s]of Object.entries(r))n[o.toUpperCase()]=s;return n},{})}ft(){let e=[],n=new Set,r=this.l.map(o=>o.components).filter(Eo).reverse();for(let o of r)for(let s of Object.keys(o))n.has(s)||(n.add(s),e.push(s));return e}O(e,n,r,o,s){var C;let i=[],a=[],c=new Set,f=()=>{for(let b=0;b<a.length;++b)a[b]();a.length=0},m={value:()=>i,stop:()=>{f(),c.clear()},subscribe:(b,M)=>(c.add(b),M&&b(i),()=>{c.delete(b)}),refs:[],context:this.l[0]};if(j(e))return m;let y=this.o.globalContext,x=[],d=new Set,w=(b,M,D,U)=>{try{let I=xo(b,M,y,n,r,U,o);return D&&I.refs.length>0&&x.push(...I.refs),{value:I.value,refs:I.refs,ref:I.ref}}catch(I){_(6,`evaluation error: ${e}`,I)}return{value:void 0,refs:[]}};try{let b=(C=Co[e])!=null?C:mo("["+e+"]");Co[e]=b;let M=this.l.slice(),D=b.elements,U=D.length,I=new Array(U);m.refs=I;let oe=()=>{x.length=0,s||(d.clear(),f());let K=new Array(U);for(let A=0;A<U;++A){let T=D[A];if(n!=null&&n(A,-1)){K[A]=F=>w(T,M,!1,{$event:F}).value;continue}let V=w(T,M,!0);K[A]=V.value,I[A]=V.ref}if(!s)for(let A of x)d.has(A)||(d.add(A),a.push(ne(A,oe)));if(i=K,c.size!==0)for(let A of c)c.has(A)&&A(i)};oe()}catch(b){_(6,`parse error: ${e}`,b)}return m}L(){return this.l.slice()}le(e){this.nt.push(this.l),this.l=e}C(e,n){try{this.le(e),n()}finally{this.en()}}en(){var e;this.l=(e=this.nt.pop())!=null?e:[]}};var Ro=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},Mi=(t,e)=>{let n="";for(let r=e;r<t.length;++r){let o=t[r];if(n){o===n&&(n="");continue}if(o==='"'||o==="'"){n=o;continue}if(o===">")return r}return-1},Oi=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
|
|
3
|
-
`);)++n;if(n>=t.length||!
|
|
1
|
+
"use strict";var Ct=Object.defineProperty,jo=Object.defineProperties,_o=Object.getOwnPropertyDescriptor,Fo=Object.getOwnPropertyDescriptors,qo=Object.getOwnPropertyNames,nr=Object.getOwnPropertySymbols;var rr=Object.prototype.hasOwnProperty,zo=Object.prototype.propertyIsEnumerable;var Et=Math.pow,Tn=(t,e,n)=>e in t?Ct(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Rt=(t,e)=>{for(var n in e||(e={}))rr.call(e,n)&&Tn(t,n,e[n]);if(nr)for(var n of nr(e))zo.call(e,n)&&Tn(t,n,e[n]);return t},or=(t,e)=>jo(t,Fo(e));var Ko=(t,e)=>{for(var n in e)Ct(t,n,{get:e[n],enumerable:!0})},Wo=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of qo(e))!rr.call(t,o)&&o!==n&&Ct(t,o,{get:()=>e[o],enumerable:!(r=_o(e,o))||r.enumerable});return t};var Go=t=>Wo(Ct({},"__esModule",{value:!0}),t);var p=(t,e,n)=>Tn(t,typeof e!="symbol"?e+"":e,n);var sr=(t,e,n)=>new Promise((r,o)=>{var s=c=>{try{a(n.next(c))}catch(l){o(l)}},i=c=>{try{a(n.throw(c))}catch(l){o(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(s,i);a((n=n.apply(t,e)).next())});var Fi={};Ko(Fi,{ComponentHead:()=>Xe,ContextRegistry:()=>gn,RegorConfig:()=>pe,addUnbinder:()=>W,batch:()=>$o,collectRefs:()=>_t,computeMany:()=>Lo,computeRef:()=>Vo,computed:()=>ko,createApp:()=>No,cref:()=>an,defineComponent:()=>Mo,drainUnbind:()=>ar,endBatch:()=>er,entangle:()=>rt,flatten:()=>ce,getBindData:()=>Pe,html:()=>bn,isDeepRef:()=>qe,isRaw:()=>ot,isRef:()=>E,markRaw:()=>Io,observe:()=>ne,observeMany:()=>Ho,observerCount:()=>Bo,onMounted:()=>Oo,onUnmounted:()=>ae,pause:()=>rn,persist:()=>Po,pval:()=>dr,raw:()=>Do,ref:()=>xe,removeNode:()=>G,resume:()=>on,silence:()=>jt,sref:()=>re,startBatch:()=>Zn,svg:()=>Uo,toFragment:()=>We,toJsonTemplate:()=>ut,trigger:()=>te,unbind:()=>ye,unref:()=>v,useScope:()=>$t,warningHandler:()=>$e,watchEffect:()=>Fe});module.exports=Go(Fi);var Je=Symbol(":regor");var ye=t=>{let e=[t];for(let n=0;n<e.length;++n){let r=e[n];Jo(r);for(let o=r.lastChild;o!=null;o=o.previousSibling)e.push(o)}},Jo=t=>{let e=t[Je];if(!e)return;let n=e.unbinders;for(let r=0;r<n.length;++r)n[r]();n.length=0,t[Je]=void 0};var Qe=[],wt=!1,vt,ir=()=>{if(wt=!1,vt=void 0,Qe.length!==0){for(let t=0;t<Qe.length;++t)ye(Qe[t]);Qe.length=0}},G=t=>{t.remove(),Qe.push(t),wt||(wt=!0,vt=setTimeout(ir,1))},ar=()=>sr(null,null,function*(){Qe.length===0&&!wt||(vt&&clearTimeout(vt),ir())});var J=t=>typeof t=="function",Q=t=>typeof t=="string",cr=t=>typeof t=="undefined",me=t=>t==null||typeof t=="undefined",j=t=>typeof t!="string"||!(t!=null&&t.trim()),Qo=Object.prototype.toString,xn=t=>Qo.call(t),Le=t=>xn(t)==="[object Map]",le=t=>xn(t)==="[object Set]",Cn=t=>xn(t)==="[object Date]",ft=t=>typeof t=="symbol",S=Array.isArray,P=t=>t!==null&&typeof t=="object";var ur={0:"createApp can't find root element. You must define either a valid `selector` or an `element`. Example: createApp({}, {selector: '#app', html: '...'})",1:t=>`Component template cannot be found. selector: ${t} .`,2:"Use composables in scope. usage: useScope(() => new MyApp()).",3:t=>`${t} requires ref source argument`,4:"computed is readonly.",5:"persist requires a string key."},q=(t,...e)=>{let n=ur[t];return new Error(J(n)?n.call(ur,...e):n)};var St=[],fr=()=>{let t={onMounted:[],onUnmounted:[]};return St.push(t),t},Be=t=>{let e=St[St.length-1];if(!e&&!t)throw q(2);return e},lr=t=>{let e=Be();return t&&Rn(t),St.pop(),e},En=Symbol("csp"),Rn=t=>{let e=t,n=e[En];if(n){let r=Be();if(n===r)return;r.onMounted.length>0&&n.onMounted.push(...r.onMounted),r.onUnmounted.length>0&&n.onUnmounted.push(...r.onUnmounted);return}e[En]=Be()},At=t=>t[En];var Ve=t=>{var n,r;let e=(n=At(t))==null?void 0:n.onUnmounted;e==null||e.forEach(o=>{o()}),(r=t.unmounted)==null||r.call(t)};var pr={8:t=>`Model binding requires a ref at ${t.outerHTML}`,7:t=>`Model binding is not supported on ${t.tagName} element at ${t.outerHTML}`,0:(t,e)=>`${t} binding expression is missing at ${e.outerHTML}`,1:(t,e,n)=>`invalid ${t} expression: ${e} at ${n.outerHTML}`,2:(t,e)=>`${t} requires object expression at ${e.outerHTML}`,3:(t,e)=>`${t} binder: key is empty on ${e.outerHTML}.`,4:(t,e,n,r)=>({msg:`Failed setting prop "${t}" on <${e.toLowerCase()}>: value ${n} is invalid.`,args:[r]}),5:(t,e)=>`${t} binding missing event type at ${e.outerHTML}`,6:(t,e)=>({msg:t,args:[e]})},_=(t,...e)=>{let n=pr[t],r=J(n)?n.call(pr,...e):n,o=$e.warning;o&&(Q(r)?o(r):o(r,...r.args))},$e={warning:console.warn};var Nt=Symbol("ref"),X=Symbol("sref"),Mt=Symbol("raw");var E=t=>t!=null&&t[X]>0;var Ie=class extends Error{constructor(n,r){super(r);p(this,"propPath");p(this,"detail");this.name="PropValidationError",this.propPath=n,this.detail=r}},be=(t,e)=>{throw new Ie(t,`${e}.`)},Ot=t=>{var n;if(t===null)return"null";if(t===void 0)return"undefined";if(E(t))return`ref<${Ot(t())}>`;if(typeof t=="string")return"string";if(typeof t=="number")return"number";if(typeof t=="boolean")return"boolean";if(typeof t=="bigint")return"bigint";if(typeof t=="symbol")return"symbol";if(typeof t=="function")return"function";if(S(t))return"array";if(t instanceof Date)return"Date";if(t instanceof RegExp)return"RegExp";if(t instanceof Map)return"Map";if(t instanceof Set)return"Set";let e=(n=t==null?void 0:t.constructor)==null?void 0:n.name;return e&&e!=="Object"?e:"object"},Xo=t=>t.length>60?`${t.slice(0,57)}...`:t,lt=(t,e=0)=>{if(e>1)return"unknown";if(E(t)){let s=t();return`ref(${lt(s,e+1)})`}if(typeof t=="string")return Xo(JSON.stringify(t));if(typeof t=="number"||typeof t=="boolean"||typeof t=="bigint"||typeof t=="symbol")return String(t);if(t===null)return"null";if(t===void 0)return"undefined";if(t instanceof Date)return t.toISOString();if(t instanceof RegExp)return String(t);if(S(t)){let s=t.slice(0,5).map(i=>lt(i,e+1)).join(", ");return t.length>5?`[${s}, ...]`:`[${s}]`}if(P(t)){let s=Object.entries(t).slice(0,5);if(s.length===0)return"{}";let i=s.map(([a,c])=>{let l=lt(c,e+1);return`${a}: ${l}`}).join(", ");return Object.keys(t).length>5?`{ ${i}, ... }`:`{ ${i} }`}return"unknown"},fe=t=>{if(E(t))return`got ${Ot(t)}(${lt(t())})`;let e=Ot(t),n=lt(t);return`got ${e} (${n})`},Yo=t=>t instanceof Ie?t.detail:t instanceof Error?t.message:String(t),mr=(t,e)=>{let n=`, ${fe(e)}.`;return t.endsWith(n)?t.slice(0,-n.length):t},Zo=(t,e,n)=>{if(e instanceof Ie){if(e.propPath===t)return mr(e.detail,n);if(e.propPath===`${t}.value`&&E(n)){let r=mr(e.detail,n());return r.startsWith("expected ")?`expected ref<${r.slice(9)}>`:`expected ref where ${r}`}}return Yo(e)},es=(t,e,n)=>{let r=[];for(let o of e){let s=Zo(t,o,n);r.includes(s)||r.push(s)}return r.length===0?fe(n):r.length===1?`${r[0]}, ${fe(n)}`:`${r.join(" or ")}, ${fe(n)}`},ts=t=>typeof t=="string"?`"${t}"`:typeof t=="number"||typeof t=="boolean"?String(t):t===null?"null":t===void 0?"undefined":Ot(t),ns=(t,e)=>{typeof t!="string"&&be(e,`expected string, ${fe(t)}`)},rs=(t,e)=>{typeof t!="number"&&be(e,`expected number, ${fe(t)}`)},os=(t,e)=>{typeof t!="boolean"&&be(e,`expected boolean, ${fe(t)}`)},ss=t=>(e,n)=>{e instanceof t||be(n,`expected instance of ${t.name||"provided class"}, ${fe(e)}`)},is=t=>(e,n,r)=>{e!==void 0&&t(e,n,r)},as=t=>(e,n,r)=>{e!==null&&t(e,n,r)},cs=(...t)=>(e,n,r)=>{let o=[];for(let s of t)try{s(e,n,r);return}catch(i){o.push(i)}be(n,es(n,o,e))},us=t=>(e,n)=>{t.includes(e)||be(n,`expected one of ${t.map(r=>ts(r)).join(", ")}, ${fe(e)}`)},fs=t=>(e,n,r)=>{S(e)||be(n,`expected array, ${fe(e)}`);let o=e;for(let s=0;s<o.length;++s)t(o[s],`${n}[${s}]`,r)};function ls(t){return(e,n,r)=>{P(e)||be(n,`expected object, ${fe(e)}`);let o=e;for(let s in t){let i=t[s];if(!i)continue;i(o[s],`${n}.${s}`,r)}}}var ps=t=>(e,n,r)=>{if(E(e)){t(e(),`${n}.value`,r);return}be(n,`expected ref, ${fe(e)}`)},dr={fail:be,describe:fe,isString:ns,isNumber:rs,isBoolean:os,isClass:ss,optional:is,nullable:as,or:cs,oneOf:us,arrayOf:fs,shape:ls,refOf:ps};var ms=(t,e,n)=>{var i,a;let r=((a=(i=t.tagName)==null?void 0:i.toLowerCase)==null?void 0:a.call(i))||"unknown",o=n instanceof Ie?n.propPath:e,s=n instanceof Ie?n.detail:n instanceof Error?n.message:String(n);return n instanceof Error?new Error(`Invalid prop "${o}" on <${r}>: ${s}`,{cause:n}):new Error(`Invalid prop "${o}" on <${r}>: ${s}`,{cause:n})},Xe=class{constructor(e,n,r,o,s,i){p(this,"props");p(this,"start");p(this,"end");p(this,"ctx");p(this,"autoProps",!0);p(this,"entangle",!0);p(this,"enableSwitch",!1);p(this,"onAutoPropsAssigned");p(this,"J");p(this,"Q");p(this,"emit",(e,n)=>{this.J.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.J=n,this.ctx=r,this.start=o,this.end=s,this.Q=i}findContext(e,n=0){var o;if(n<0)return;let r=0;for(let s of(o=this.ctx)!=null?o:[])if(s instanceof e){if(r===n)return s;++r}}requireContext(e,n=0){let r=this.findContext(e,n);if(r!==void 0)return r;throw new Error(`${e} was not found in the context stack at occurrence ${n}.`)}validateProps(e){if(this.Q==="off")return;let n=this.props;for(let r in e){let o=e[r];if(!o)continue;let s=o;try{s(n[r],r,this)}catch(i){let a=ms(this.J,r,i);if(this.Q==="warn"){$e.warning(a.message,a);continue}throw a}}}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)G(e),e=e.nextSibling;for(let r of this.ctx)Ve(r)}};var Pe=t=>{let e=t,n=e[Je];if(n)return n;let r={unbinders:[],data:{}};return e[Je]=r,r};var W=(t,e)=>{Pe(t).unbinders.push(e)};var je=t=>{if(typeof t=="string"){let e=t.trim().toLowerCase();if(e===""||e==="0"||e==="false")return!1;if(e==="true")return!0}return!!t};var Lt={},kt={},hr=1,yr=t=>{let e=(hr++).toString();return Lt[e]=t,kt[e]=0,e},wn=t=>{kt[t]+=1},vn=t=>{--kt[t]===0&&(delete Lt[t],delete kt[t])},gr=t=>Lt[t],Sn=()=>hr!==1&&Object.keys(Lt).length>0,pt="r-switch",ds=t=>{let e=t.filter(r=>we(r)).map(r=>[...r.querySelectorAll("[r-switch]")].map(o=>o.getAttribute(pt))),n=new Set;return e.forEach(r=>{r.forEach(o=>o&&n.add(o))}),[...n]},Ye=(t,e)=>{if(!Sn())return;let n=ds(e);n.length!==0&&(n.forEach(wn),W(t,()=>{n.forEach(vn)}))};var Vt=()=>{},An=(t,e,n,r)=>{let o=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,r),o.push(i)}De(e,o)},Nn=Symbol("r-if"),br=Symbol("r-else"),Tr=t=>t[br]===1,It=class{constructor(e){p(this,"r");p(this,"M");p(this,"xe");p(this,"X");p(this,"Y");p(this,"T");p(this,"R");this.r=e,this.M=e.o.u.if,this.xe=Dt(e.o.u.if),this.X=e.o.u.else,this.Y=e.o.u.elseif,this.T=e.o.u.for,this.R=e.o.u.pre}ot(e,n){let r=e.parentElement;for(;r!==null&&r!==document.documentElement;){if(r.hasAttribute(n))return!0;r=r.parentElement}return!1}k(e){let n=e.hasAttribute(this.M);return n&&this.y(e),e.hasAttribute(this.r.o.u.is)||e.hasAttribute("is")||this.r.E.Z(e)||this.r.E.j(e,o=>{o.hasAttribute(this.M)&&this.y(o)}),n}ee(e){return e[Nn]?!0:(e[Nn]=!0,Pt(e,this.xe).forEach(n=>n[Nn]=!0),!1)}y(e){if(e.hasAttribute(this.R)||this.ee(e)||this.ot(e,this.T))return;let n=e.getAttribute(this.M);if(!n){_(0,this.M,e);return}e.removeAttribute(this.M),this.N(e,n)}U(e,n,r){let o=Ze(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${r!=null?r:""}`);s.insertBefore(i,e),Ye(i,o),o.forEach(c=>{G(c)}),e.remove(),n!=="if"&&(e[br]=1);let a=document.createComment(`__end__ :${n}${r!=null?r:""}`);return s.insertBefore(a,i.nextSibling),{nodes:o,parent:s,commentBegin:i,commentEnd:a}}Re(e,n){if(!e)return[];let r=e.nextElementSibling;if(e.hasAttribute(this.X)){e.removeAttribute(this.X);let{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"else");return[{mount:()=>{An(o,this.r,s,a)},unmount:()=>{ve(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let o=e.getAttribute(this.Y);if(!o)return[];e.removeAttribute(this.Y);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.U(e,"elseif",` => ${o} `),l=this.r.m.O(o),u=l.value,f=this.Re(r,n),m=Vt;return W(a,()=>{l.stop(),m(),m=Vt}),m=l.subscribe(n),[{mount:()=>{An(s,this.r,i,c)},unmount:()=>{ve(a,c)},isTrue:()=>je(u()[0]),isMounted:!1},...f]}}N(e,n){let r=e.nextElementSibling,{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"if",` => ${n} `),c=this.r.m.O(n),l=c.value,u=!1,f=this.r.m,m=f.L(),y=()=>{f.C(m,()=>{if(je(l()[0]))u||(An(o,this.r,s,a),u=!0),x.forEach(C=>{C.unmount(),C.isMounted=!1});else{ve(i,a),u=!1;let C=!1;for(let b of x)!C&&b.isTrue()?(b.isMounted||(b.mount(),b.isMounted=!0),C=!0):(b.unmount(),b.isMounted=!1)}})},x=this.Re(r,y),d=Vt;W(i,()=>{c.stop(),d(),d=Vt}),y(),d=c.subscribe(y)}};var Ze=t=>{let e=de(t)?t.content.childNodes:[t],n=[];for(let r=0;r<e.length;++r){let o=e[r];if(o.nodeType===1){let s=o==null?void 0:o.tagName;if(s==="SCRIPT"||s==="STYLE")continue}n.push(o)}return n},De=(t,e)=>{for(let n=0;n<e.length;++n){let r=e[n];r.nodeType===Node.ELEMENT_NODE&&(Tr(r)||t.$(r))}},Pt=(t,e)=>{var r;let n=t.querySelectorAll(e);return(r=t.matches)!=null&&r.call(t,e)?[t,...n]:n},de=t=>t instanceof HTMLTemplateElement,we=t=>t.nodeType===Node.ELEMENT_NODE,mt=t=>t.nodeType===Node.ELEMENT_NODE,xr=t=>t instanceof HTMLSlotElement,Se=t=>de(t)?t.content.childNodes:t.childNodes,ve=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let r=n.nextSibling;G(n),n=r}},Cr=function(){return this()},hs=function(t){return this(t)},ys=()=>{throw new Error("value is readonly.")},gs={get:Cr,set:hs,enumerable:!0,configurable:!1},bs={get:Cr,set:ys,enumerable:!0,configurable:!1},Ue=(t,e)=>{t[X]=e?2:1,Object.defineProperty(t,"value",e?bs:gs)},Er=(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},Dt=t=>`[${CSS.escape(t)}]`,Ut=(t,e)=>(t.startsWith("@")&&(t=e.u.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.u.dynamic)),t),Mn=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},Ts=/-(\w)/g,z=Mn(t=>t&&t.replace(Ts,(e,n)=>n?n.toUpperCase():"")),xs=/\B([A-Z])/g,et=Mn(t=>t&&t.replace(xs,"-$1").toLowerCase()),dt=Mn(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var Ht={mount:()=>{}};var tt=t=>{let e=t.trim();return e?e.split(/\s+/):[]};var Bt=t=>{var n,r;let e=(n=At(t))==null?void 0:n.onMounted;e==null||e.forEach(o=>{o()}),(r=t.mounted)==null||r.call(t)};var On=Symbol("scope"),$t=t=>{try{fr();let e=t();Rn(e);let n={context:e,unmount:()=>Ve(e),[On]:1};return n[On]=1,n}finally{lr()}},Rr=t=>P(t)?On in t:!1;var v=t=>{let e=t;return e!=null&&e[X]>0?e():e};var wr="http://www.w3.org/1999/xlink",Cs={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},Es=(t,e,n,r,o,s)=>{var a;if(r){r=v(r),s&&s.includes("camel")&&(r=z(r)),nt(t,r,v(e[0]),v(o));return}let i=e.length;for(let c=0;c<i;++c){let l=e[c];if(S(l)){let u=v((a=n==null?void 0:n[c])==null?void 0:a[0]),f=v(l[0]),m=v(l[1]);nt(t,f,m,u)}else if(P(l))for(let u of Object.entries(l)){let f=u[0],m=v(u[1]),y=v(n==null?void 0:n[c]),x=y&&f in y?f:void 0;nt(t,f,m,x)}else{let u=v(n==null?void 0:n[c]),f=v(e[c++]),m=v(e[c]);nt(t,f,m,u)}}},kn={mount:()=>({update:({el:t,values:e,previousValues:n,option:r,previousOption:o,flags:s})=>{Es(t,e,n,r,o,s)}})},nt=(t,e,n,r)=>{if(r&&r!==e&&t.removeAttribute(r),me(e)){_(3,"r-bind",t);return}if(!Q(e)){_(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){me(n)?t.removeAttributeNS(wr,e.slice(6,e.length)):t.setAttributeNS(wr,e,n);return}if(me(n)){t.removeAttribute(e);return}if(e in Cs){je(n)?t.setAttribute(e,""):t.removeAttribute(e);return}t.setAttribute(e,n)};var Ln={collectRefObj:!0,mount:({parseResult:t})=>({update:({values:e})=>{let n=t.context,r=e[0];if(P(r))for(let o of Object.entries(r)){let s=o[0],i=o[1],a=n[s];a!==i&&(E(a)?a(i):n[s]=i)}}})};var ae=(t,e)=>{var n;(n=Be(e))==null||n.onUnmounted.push(t)};var ne=(t,e,n,r=!0)=>{if(!E(t))throw q(3,"observe");n&&e(t());let s=t(void 0,void 0,0,e);return r&&ae(s,!0),s};var vr=t=>t[X]===2,rt=(t,e)=>{if(t===e)return()=>{};let n=vr(t),r=vr(e);if(n&&r)return()=>{};if(n){let i=ne(t,()=>e(t()));return e(t()),i}if(r){let i=ne(e,()=>t(e()));return t(e()),i}let o=ne(t,i=>e(i)),s=ne(e,i=>t(i));return e(t()),()=>{o(),s()}};var he=[],Sr=t=>{var e;he.length!==0&&((e=he[he.length-1])==null||e.add(t))},Fe=t=>{if(!t)return()=>{};let e={stop:()=>{}};return Rs(t,e),ae(()=>e.stop(),!0),e.stop},Rs=(t,e)=>{if(!t)return;let n=[],r=!1,o=()=>{for(let s of n)s();n=[],r=!0};e.stop=o;try{let s=new Set;if(he.push(s),t(i=>n.push(i)),r)return;for(let i of[...s]){let a=ne(i,()=>{o(),Fe(t)});n.push(a)}}finally{he.pop()}},jt=t=>{let e=he.length,n=e>0&&he[e-1];try{return n&&he.push(null),t()}finally{n&&he.pop()}},_t=t=>{try{let e=new Set;return he.push(e),{value:t(),refs:[...e]}}finally{he.pop()}};var ot=t=>!!t&&t[Mt]===1;var te=(t,e,n)=>{if(!E(t))return;let r=t;if(r(void 0,e,1),!n)return;let o=r();if(o){if(S(o)||le(o))for(let s of o)te(s,e,!0);else if(Le(o))for(let s of o)te(s[0],e,!0),te(s[1],e,!0);if(P(o))for(let s in o)te(o[s],e,!0)}};function ws(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var st=(t,e,n)=>{n.forEach(function(r){let o=t[r];ws(e,r,function(...i){let a=o.apply(this,i),c=this[X];for(let l of c)te(l);return a})})},Ft=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var Ar=Array.prototype,Vn=Object.create(Ar),vs=["push","pop","shift","unshift","splice","sort","reverse"];st(Ar,Vn,vs);var Nr=Map.prototype,qt=Object.create(Nr),Ss=["set","clear","delete"];Ft(qt,"Map");st(Nr,qt,Ss);var Mr=Set.prototype,zt=Object.create(Mr),As=["add","clear","delete"];Ft(zt,"Set");st(Mr,zt,As);var Te={},re=t=>{if(E(t)||ot(t))return t;let e={auto:!0,_value:t},n=c=>P(c)?X in c?!0:S(c)?(Object.setPrototypeOf(c,Vn),!0):le(c)?(Object.setPrototypeOf(c,zt),!0):Le(c)?(Object.setPrototypeOf(c,qt),!0):!1:!1,r=n(t),o=new Set,s=(c,l)=>{if(Te.stack&&Te.stack.length){Te.stack[Te.stack.length-1].add(a);return}o.size!==0&&jt(()=>{for(let u of[...o.keys()])o.has(u)&&u(c,l)})},i=c=>{let l=c[X];l||(c[X]=l=new Set),l.add(a)},a=(...c)=>{if(!(2 in c)){let u=c[0],f=c[1];return 0 in c?e._value===u||E(u)&&(u=u(),e._value===u)?u:(n(u)&&i(u),e._value=u,e.auto&&s(u,f),e._value):(Sr(a),e._value)}switch(c[2]){case 0:{let u=c[3];if(!u)return()=>{};let f=m=>{o.delete(m)};return o.add(u),()=>{f(u)}}case 1:{let u=c[1],f=e._value;s(f,u);break}case 2:return o.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return Ue(a,!1),r&&i(t),a};var Or=Symbol("modelBridge"),Kt=()=>{},Ns=t=>!!(t!=null&&t[Or]),Ms=t=>{t[Or]=1},Os=t=>{let e=re(t());return Ms(e),e},kr={collectRefObj:!0,mount:({parseResult:t,option:e})=>{if(typeof e!="string"||!e)return Kt;let n=z(e),r,o,s=Kt,i=()=>{s(),s=Kt,r=void 0,o=void 0},a=()=>{s(),s=Kt},c=(u,f)=>{r!==u&&(a(),s=rt(u,f),r=u)},l=()=>{var y;let u=(y=t.refs[0])!=null?y:t.value()[0],f=t.context,m=f[n];if(!E(u)){if(o&&m===o){o(u);return}if(i(),E(m)){m(u);return}f[n]=re(u);return}if(Ns(u)){if(m===u)return;E(m)?c(u,m):f[n]=u;return}o||(o=Os(u)),f[n]=o,c(u,o)};return{update:()=>{l()},unmount:()=>{s()}}}};var Wt=class{constructor(e){p(this,"r");p(this,"_");p(this,"Ee","");p(this,"Ce",-1);this.r=e,this._=e.o.u.inherit}k(e){this.st(e)}it(e){if(this.Ce!==e.size){let n=[...e.keys()];this.Ee=[...n,...n.map(et)].join(","),this.Ce=e.size}return this.Ee}ct(e){var n;for(let r=0;r<e.length;++r){let o=(n=e[r])==null?void 0:n.components;if(o)for(let s in o)return!0}return!1}ut(e){if(!de(e))return!1;let n=e.getAttributeNames();return e.hasAttribute("name")?!0:n.some(r=>r.startsWith("#"))}pt(e){return de(e)&&e.getAttributeNames().length===0}st(e){var l,u;let n=this.r,r=n.m,o=n.o.te,s=n.o.F;if(o.size===0&&!this.ct(r.l))return;let i=r.ne(),a=this.re();if(j(a))return;let c=this.lt(e,a);for(let f of c){if(f.hasAttribute(n.R))continue;let m=f.parentNode;if(!m)continue;let y=f.nextSibling,x=z(f.tagName).toUpperCase(),d=i[x],w=d!=null?d:s.get(x);if(!w)continue;let C=w.template;if(!C)continue;let b=f.parentElement;if(!b)continue;let M=new Comment(" begin component: "+f.tagName),D=new Comment(" end component: "+f.tagName);b.insertBefore(M,f),f.remove();let U=n.o.u.context,V=n.o.u.contextAlias,oe=n.o.u.bind,K=(u=(l=w.props)==null?void 0:l.map(z))!=null?u:[],A=[],T=h=>h==="class"||h==="style",I=(h,k,N=!1)=>{let Z={},$=h.hasAttribute(U);return r.C(k,()=>{if(r.v(Z),$?n.y(Ln,h,U):h.hasAttribute(V)&&n.y(Ln,h,V),K.length===0)return;let ee=new Map(K.map(g=>[g.toLowerCase(),g]));for(let g of[...K,...K.map(et)]){let L=h.getAttribute(g);if(L===null)continue;let B=z(g);Z[B]=L,N&&w.inheritAttrs===!0&&T(B)&&A.push({name:g,value:L}),h.removeAttribute(g)}let R=n.q.we(h,!1);for(let[g,L]of R.entries()){let[B,ie]=L.oe;if(!ie)continue;let Re=ee.get(z(ie).toLowerCase());if(Re&&!(B!=="."&&B!==":"&&B!==oe)){if(N&&B!=="."&&w.inheritAttrs===!0&&T(Re)){let tr=h.getAttribute(g);tr!==null&&A.push({name:g,value:tr})}n.y(kr,h,g,!0,Re,L.se)}}}),Z},F=[...r.L()],Ge=()=>{var Z;let h=I(f,F,!0),k=new Xe(h,f,F,M,D,n.o.propValidationMode),N=$t(()=>{var $;return($=w.context(k))!=null?$:{}}).context;if(k.autoProps){for(let[$,ee]of Object.entries(h))if($ in N){let R=N[$];if(R===ee)continue;if(E(R)){E(ee)?k.entangle?W(M,rt(ee,R)):R(ee()):R(ee);continue}}else N[$]=ee;for(let $ of K)$ in N||(N[$]=void 0);(Z=k.onAutoPropsAssigned)==null||Z.call(k)}return{componentCtx:N,head:k}},{componentCtx:Ce,head:Tt}=Ge(),O=[...Se(C)],xt=O.length,H=f.childNodes.length===0,Y=h=>{var ee;let k=h.parentElement,N=h.name;if(j(N)&&(N=h.getAttributeNames().filter(R=>R.startsWith("#"))[0],j(N)?N="default":N=N.substring(1)),H){if(N==="default"){let R=n.o.u.text,g=f.getAttribute(R);if(!j(g)){let L=document.createElement("span");L.setAttribute(R,g),k.insertBefore(L,h),f.removeAttribute(R);return}}for(let R of[...h.childNodes])k.insertBefore(R,h);return}let Z=f.querySelector(`template[name='${N}'], template[\\#${N}]`);!Z&&N==="default"&&(Z=(ee=[...f.querySelectorAll("template:not([name])")].find(g=>this.pt(g)))!=null?ee:null);let $=R=>{Tt.enableSwitch&&r.C(F,()=>{r.v(Ce);let g=I(h,r.L());r.C(F,()=>{r.v(g);let L=r.L(),B=yr(L);for(let ie of R)we(ie)&&(ie.setAttribute(pt,B),wn(B),W(ie,()=>{vn(B)}))})})};if(Z){let R=[...Se(Z)];for(let g of R)k.insertBefore(g,h);$(R)}else{if(N!=="default"){for(let g of[...Se(h)])k.insertBefore(g,h);return}let R=[...Se(f)].filter(g=>!this.ut(g));for(let g of R)k.insertBefore(g,h);$(R)}},se=h=>{if(!we(h))return;let k=h.querySelectorAll("slot");if(xr(h)){Y(h),h.remove();return}for(let N of k)Y(N),N.remove()};(()=>{for(let h=0;h<xt;++h)O[h]=O[h].cloneNode(!0),m.insertBefore(O[h],y),se(O[h])})(),b.insertBefore(D,y);let Ee=()=>{if(!w.inheritAttrs)return;let h=O.filter(g=>g.nodeType===Node.ELEMENT_NODE),k=h.flatMap(g=>[...g.hasAttribute(this._)?[g]:[],...g.querySelectorAll(`[${this._}]`)]).at(0),N=k!=null?k:h.length===1?h[0]:void 0;if(!N)return;N.removeAttribute(this._);let Z=`${oe}:class`,$=`${oe}:style`,ee=(g,L,B)=>{let ie=N.hasAttribute(g)?g:N.hasAttribute(L)?L:g,Re=N.getAttribute(ie);N.setAttribute(ie,j(Re)?B:`${Re}, ${B}`)},R=(g,L)=>{if(g==="class"){let B=tt(L);B.length>0&&N.classList.add(...B)}else if(g===":class"||g===Z)ee(":class",Z,L);else if(g==="style"){let B=N.style,ie=f.style;for(let Re of ie)B.setProperty(Re,ie.getPropertyValue(Re))}else if(g===":style"||g===$)ee(":style",$,L);else{let B=Ut(g,n.o);nt(N,B,L)}};for(let{name:g,value:L}of A)f.setAttribute(g,L);for(let g of f.getAttributeNames())g===U||g===V||R(g,f.getAttribute(g))},Oe=()=>{for(let h of f.getAttributeNames())!h.startsWith("@")&&!h.startsWith(n.o.u.on)&&f.removeAttribute(h)},ke=()=>{Ee(),Oe(),r.v(Ce),n.ve(f,!1),Ce.$emit=Tt.emit,De(n,O),W(f,()=>{Ve(Ce)}),W(M,()=>{ye(f)}),Bt(Ce)};r.C(F,ke)}}re(){let e=this.r,n=e.m,r=e.o.te,o=n.ft(),s=this.it(r);return[...s?[s]:[],...o,...o.map(et)].join(",")}Z(e){var r;let n=this.re();return!j(n)&&((r=e.matches)==null?void 0:r.call(e,n))}lt(e,n){var s;let r=[];if(j(n))return r;if((s=e.matches)!=null&&s.call(e,n))return[e];let o=this.K(e).reverse();for(;o.length>0;){let i=o.pop();if(i.matches(n)){r.push(i);continue}o.push(...this.K(i).reverse())}return r}j(e,n){let r=this.r,o=this.re(),s=r.o.u.is,i=this.K(e).reverse();for(;i.length>0;){let a=i.pop();n(a),!(!j(o)&&a.matches(o))&&(a.hasAttribute(s)||a.hasAttribute("is")||i.push(...this.K(a).reverse()))}}K(e){let n=e==null?void 0:e.children;if((n==null?void 0:n.length)!=null){let o=[];for(let s=0;s<n.length;++s){let i=n[s];we(i)&&o.push(i)}return o}let r=e==null?void 0:e.childNodes;if((r==null?void 0:r.length)!=null){let o=[];for(let s=0;s<r.length;++s){let i=r[s];we(i)&&o.push(i)}return o}return[]}};var In=class{constructor(e,n){p(this,"oe");p(this,"se");p(this,"Se",[]);this.oe=e,this.se=n}},Gt=class{constructor(e){p(this,"r");p(this,"Ae");p(this,"Ve");p(this,"ie");var r;this.r=e,this.Ae=e.o.dt(),this.ie=new Map;let n=new Map;for(let o of this.Ae){let s=(r=o[0])!=null?r:"",i=n.get(s);i?i.push(o):n.set(s,[o])}this.Ve=n}ke(e){let n=this.ie.get(e);if(n)return n;let r=e,o=r.startsWith(".");o&&(r=":"+r.slice(1));let s=r.indexOf("."),a=(s<0?r:r.substring(0,s)).split(/[:@]/);j(a[0])&&(a[0]=o?".":r[0]);let c=s>=0?r.slice(s+1).split("."):[],l=!1,u=!1;for(let m=0;m<c.length;++m){let y=c[m];if(!l&&y==="camel"?l=!0:!u&&y==="prop"&&(u=!0),l&&u)break}l&&(a[a.length-1]=z(a[a.length-1])),u&&(a[0]=".");let f={terms:a,flags:c};return this.ie.set(e,f),f}we(e,n){let r=new Map;if(!mt(e))return r;let o=this.Ve,s=(a,c)=>{var u;let l=o.get((u=c[0])!=null?u:"");if(l)for(let f=0;f<l.length;++f){if(!c.startsWith(l[f]))continue;let m=r.get(c);if(!m){let y=this.ke(c);m=new In(y.terms,y.flags),r.set(c,m)}m.Se.push(a);return}},i=a=>{var l;let c=a.attributes;if(!(!c||c.length===0))for(let u=0;u<c.length;++u){let f=(l=c.item(u))==null?void 0:l.name;f&&s(a,f)}};return i(e),!n||!e.firstElementChild||this.r.E.j(e,i),r}};var Lr=()=>{},ks=(t,e)=>{for(let n of t){let r=n.cloneNode(!0);e.appendChild(r)}},Jt=class{constructor(e){p(this,"r");p(this,"I");this.r=e,this.I=e.o.u.is}k(e){let n=e.hasAttribute(this.I);return(n||e.hasAttribute("is"))&&this.y(e),this.r.E.Z(e)||this.r.E.j(e,r=>{(r.hasAttribute(this.I)||r.hasAttribute("is"))&&this.y(r)}),n}y(e){let n=e.getAttribute(this.I);if(!n){if(n=e.getAttribute("is"),!n)return;if(!n.startsWith("regor:")){if(!n.startsWith("r-"))return;let r=n.slice(2).trim().toLowerCase();if(!r)return;let o=e.parentNode;if(!o)return;let s=document.createElement(r);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);o.insertBefore(s,e),e.remove(),this.r.$(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.N(e,n)}U(e,n){let r=Ze(e),o=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);o.insertBefore(s,e),Ye(s,r),r.forEach(a=>{G(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n!=null?n:""}`);return o.insertBefore(i,s.nextSibling),{nodes:r,parent:o,commentBegin:s,commentEnd:i}}N(e,n){let{nodes:r,commentBegin:o,commentEnd:s}=this.U(e,` => ${n} `),i=this.r.m.O(n),a=i.value,c=this.r.m,l=c.L(),u={name:""},f=de(e)?r:[...r[0].childNodes],m=()=>{c.C(l,()=>{var b,M;let d=a()[0];if(P(d)&&(d.name?d=d.name:d=(b=Object.entries(c.ne()).filter(D=>D[1]===d)[0])==null?void 0:b[0]),!Q(d)||j(d)){ve(o,s);return}if(u.name===d)return;ve(o,s);let w=(M=s.parentNode)!=null?M:o.parentNode;if(!w)return;let C=document.createElement(d);for(let D of e.getAttributeNames())D!==this.I&&C.setAttribute(D,e.getAttribute(D));ks(f,C),w.insertBefore(C,s),this.r.$(C),u.name=d})},y=Lr;W(o,()=>{i.stop(),y(),y=Lr}),m(),y=i.subscribe(m)}};var Ls=(t,e)=>{let[n,r]=e;J(r)?r(t,n):t.innerHTML=n==null?void 0:n.toString()},Qt={mount:()=>({update:({el:t,values:e})=>{Ls(t,e)}})};var Xt=class t{constructor(e){p(this,"ae");this.ae=e}static mt(e,n){var y,x;let r=e.m,o=e.o,s=o.u,i=new Set([s.for,s.if,s.else,s.elseif,s.pre]),a=o.B,c=r.ne();if(Object.keys(c).length>0||o.F.size>0)return;let l=e.q,u=[],f=0,m=[];for(let d=n.length-1;d>=0;--d)m.push(n[d]);for(;m.length>0;){let d=m.pop();if(d.nodeType===Node.ELEMENT_NODE){let C=d;if(C.tagName==="TEMPLATE"||C.tagName.includes("-"))return;let b=z(C.tagName).toUpperCase();if(o.F.has(b)||c[b])return;let M=C.attributes;for(let D=0;D<M.length;++D){let U=(y=M.item(D))==null?void 0:y.name;if(!U)continue;if(i.has(U))return;let{terms:V,flags:oe}=l.ke(U),[K,A]=V,T=(x=a[U])!=null?x:a[K];if(T){if(T===Qt)return;u.push({nodeIndex:f,attrName:U,directive:T,option:A,flags:oe})}}++f}let w=d.childNodes;for(let C=w.length-1;C>=0;--C)m.push(w[C])}if(u.length!==0)return new t(u)}y(e,n){let r=[],o=[];for(let s=n.length-1;s>=0;--s)o.push(n[s]);for(;o.length>0;){let s=o.pop();s.nodeType===Node.ELEMENT_NODE&&r.push(s);let i=s.childNodes;for(let a=i.length-1;a>=0;--a)o.push(i[a])}for(let s=0;s<this.ae.length;++s){let i=this.ae[s],a=r[i.nodeIndex];a&&e.y(i.directive,a,i.attrName,!1,i.option,i.flags)}}};var Vs=(t,e)=>{let n=e.parentNode;if(n)for(let r=0;r<t.items.length;++r)n.insertBefore(t.items[r],e)},Is=t=>{var a;let e=t.length,n=t.slice(),r=[],o,s,i;for(let c=0;c<e;++c){let l=t[c];if(l===0)continue;let u=r[r.length-1];if(u===void 0||t[u]<l){n[c]=u!=null?u:-1,r.push(c);continue}for(o=0,s=r.length-1;o<s;)i=o+s>>1,t[r[i]]<l?o=i+1:s=i;l<t[r[o]]&&(o>0&&(n[c]=r[o-1]),r[o]=c)}for(o=r.length,s=(a=r[o-1])!=null?a:-1;o-- >0;)r[o]=s,s=n[s];return r},Yt=class{static yt(e){let{oldItems:n,newValues:r,getKey:o,isSameValue:s,mountNewValue:i,removeMountItem:a,endAnchor:c}=e,l=n.length,u=r.length,f=new Array(u),m=new Set;for(let T=0;T<u;++T){let I=o(r[T]);if(I===void 0||m.has(I))return;m.add(I),f[T]=I}let y=new Array(u),x=0,d=l-1,w=u-1;for(;x<=d&&x<=w;){let T=n[x];if(o(T.value)!==f[x]||!s(T.value,r[x]))break;T.value=r[x],y[x]=T,++x}for(;x<=d&&x<=w;){let T=n[d];if(o(T.value)!==f[w]||!s(T.value,r[w]))break;T.value=r[w],y[w]=T,--d,--w}if(x>d){for(let T=w;T>=x;--T){let I=T+1<u?y[T+1].items[0]:c;y[T]=i(T,r[T],I)}return y}if(x>w){for(let T=x;T<=d;++T)a(n[T]);return y}let C=x,b=x,M=w-b+1,D=new Array(M).fill(0),U=new Map;for(let T=b;T<=w;++T)U.set(f[T],T);let V=!1,oe=0;for(let T=C;T<=d;++T){let I=n[T],F=U.get(o(I.value));if(F===void 0){a(I);continue}if(!s(I.value,r[F])){a(I);continue}I.value=r[F],y[F]=I,D[F-b]=T+1,F>=oe?oe=F:V=!0}let K=V?Is(D):[],A=K.length-1;for(let T=M-1;T>=0;--T){let I=b+T,F=I+1<u?y[I+1].items[0]:c;if(D[T]===0){y[I]=i(I,r[I],F);continue}let Ge=y[I];V&&(A>=0&&K[A]===T?--A:Ge&&Vs(Ge,F))}return y}};var ht=class{constructor(e){p(this,"x",[]);p(this,"P",new Map);p(this,"ce");this.ce=e}get S(){return this.x.length}ue(e){let n=this.ce(e.value);n!==void 0&&this.P.set(n,e)}pe(e){var r;let n=this.ce((r=this.x[e])==null?void 0:r.value);n!==void 0&&this.P.delete(n)}static ht(e,n){return{items:[],index:e,value:n,order:-1}}v(e){e.order=this.S,this.x.push(e),this.ue(e)}gt(e,n){let r=this.S;for(let o=e;o<r;++o)this.x[o].order=o+1;n.order=e,this.x.splice(e,0,n),this.ue(n)}D(e){return this.x[e]}le(e,n){this.pe(e),this.x[e]=n,this.ue(n),n.order=e}Me(e){this.pe(e),this.x.splice(e,1);let n=this.S;for(let r=e;r<n;++r)this.x[r].order=r}Ne(e){let n=this.S;for(let r=e;r<n;++r)this.pe(r);this.x.splice(e)}nn(e){return this.P.has(e)}bt(e){var r;let n=this.P.get(e);return(r=n==null?void 0:n.order)!=null?r:-1}};var Pn=Symbol("r-for"),Ps=t=>-1,Vr=()=>{},en=class en{constructor(e){p(this,"r");p(this,"T");p(this,"Oe");p(this,"R");this.r=e,this.T=e.o.u.for,this.Oe=Dt(this.T),this.R=e.o.u.pre}k(e){let n=e.hasAttribute(this.T);return n&&this.Le(e),e.hasAttribute(this.r.o.u.is)||e.hasAttribute("is")||this.r.E.Z(e)||this.r.E.j(e,o=>{o.hasAttribute(this.T)&&this.Le(o)}),n}ee(e){return e[Pn]?!0:(e[Pn]=!0,Pt(e,this.Oe).forEach(n=>n[Pn]=!0),!1)}Le(e){if(e.hasAttribute(this.R)||this.ee(e))return;let n=e.getAttribute(this.T);if(!n){_(0,this.T,e);return}e.removeAttribute(this.T),this.Tt(e,n)}Ie(e){return me(e)?[]:(J(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(r=>({*[Symbol.iterator](){for(let o=1;o<=r;o++)yield o}}))(e):Object.entries(e))}Tt(e,n){var xt;let r=this.xt(n);if(!(r!=null&&r.list)){_(1,this.T,n,e);return}let o=this.r.o.u.key,s=this.r.o.u.keyBind,i=(xt=e.getAttribute(o))!=null?xt:e.getAttribute(s);e.removeAttribute(o),e.removeAttribute(s);let a=Ze(e),c=Xt.mt(this.r,a),l=e.parentNode;if(!l)return;let u=`${this.T} => ${n}`,f=new Comment(`__begin__ ${u}`);l.insertBefore(f,e),Ye(f,a),a.forEach(H=>{G(H)}),e.remove();let m=new Comment(`__end__ ${u}`);l.insertBefore(m,f.nextSibling);let y=this.r,x=y.m,d=x.L(),C=d.length===1?[void 0,d[0]]:void 0,b=this.Rt(i),M=(H,Y)=>b(H)===b(Y),D=(H,Y)=>H===Y,U=(H,Y,se)=>{let ue=r.createContext(Y,H),Ee=ht.ht(ue.index,Y),Oe=()=>{var N,Z;let ke=(Z=(N=m.parentNode)!=null?N:f.parentNode)!=null?Z:l,h=se.previousSibling,k=[];for(let $=0;$<a.length;++$){let ee=a[$].cloneNode(!0);ke.insertBefore(ee,se),k.push(ee)}for(c?c.y(y,k):De(y,k),h=h.nextSibling;h!==se;)Ee.items.push(h),h=h.nextSibling};return C?(C[0]=ue.ctx,x.C(C,Oe)):x.C(d,()=>{x.v(ue.ctx),Oe()}),Ee},V=(H,Y)=>{let se=O.D(H).items,ue=se[se.length-1].nextSibling;for(let Ee of se)G(Ee);O.le(H,U(H,Y,ue))},oe=(H,Y)=>{O.v(U(H,Y,m))},K=H=>{for(let Y of O.D(H).items)G(Y)},A=H=>{let Y=O.S;for(let se=H;se<Y;++se)O.D(se).index(se)},T=H=>{let Y=f.parentNode,se=m.parentNode;if(!Y||!se)return;let ue=O.S;J(H)&&(H=H());let Ee=v(H[0]);if(S(Ee)&&Ee.length===0){ve(f,m),O.Ne(0);return}let Oe=[];for(let R of this.Ie(H[0]))Oe.push(R);let ke=Yt.yt({oldItems:O.x,newValues:Oe,getKey:b,isSameValue:D,mountNewValue:(R,g,L)=>U(R,g,L),removeMountItem:R=>{for(let g=0;g<R.items.length;++g)G(R.items[g])},endAnchor:m});if(ke){O.x=ke,O.P.clear();for(let R=0;R<ke.length;++R){let g=ke[R];g.order=R,g.index(R);let L=b(g.value);L!==void 0&&O.P.set(L,g)}return}let h=0,k=Number.MAX_SAFE_INTEGER,N=ue,Z=this.r.o.forGrowThreshold,$=()=>O.S<N+Z;for(let R of Oe){let g=()=>{if(h<ue){let L=O.D(h++);if(M(L.value,R)){if(D(L.value,R))return;V(h-1,R);return}let B=O.bt(b(R));if(B>=h&&B-h<10){if(--h,k=Math.min(k,h),K(h),O.Me(h),--ue,B>h+1)for(let ie=h;ie<B-1&&ie<ue&&!M(O.D(h).value,R);)++ie,K(h),O.Me(h),--ue;g();return}$()?(O.gt(h-1,U(h,R,O.D(h-1).items[0])),k=Math.min(k,h-1),++ue):V(h-1,R)}else oe(h++,R)};g()}let ee=h;for(ue=O.S;h<ue;)K(h++);O.Ne(ee),A(k)},I=()=>{F.stop(),Ce(),Ce=Vr},F=x.O(r.list),Ge=F.value,Ce=Vr,Tt=0,O=new ht(b);for(let H of this.Ie(Ge()[0]))O.v(U(Tt++,H,m));W(f,I),Ce=F.subscribe(T)}xt(e){var c,l;let n=en.Et.exec(e);if(!n)return;let r=(n[1]+((c=n[2])!=null?c:"")).split(",").map(u=>u.trim()),o=r.length>1?r.length-1:-1,s=o!==-1&&(r[o]==="index"||(l=r[o])!=null&&l.startsWith("#"))?r[o]:"";s&&r.splice(o,1);let i=n[3];if(!i||r.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(u,f)=>{let m={},y=v(u);if(!a&&r.length===1)m[r[0]]=u;else if(S(y)){let d=0;for(let w of r)m[w]=y[d++]}else for(let d of r)m[d]=y[d];let x={ctx:m,index:Ps};return s&&(x.index=m[s.startsWith("#")?s.substring(1):s]=re(f)),x}}}Rt(e){if(!e)return r=>r;let n=e.trim();if(!n)return r=>r;if(n.includes(".")){let r=this.Ct(n),o=r.length>1?r.slice(1):void 0;return s=>{let i=v(s),a=this.Pe(i,r);return a!==void 0||!o?a:this.Pe(i,o)}}return r=>{var o;return v((o=v(r))==null?void 0:o[n])}}Ct(e){return e.split(".").filter(n=>n.length>0)}Pe(e,n){var o;let r=e;for(let s of n)r=(o=v(r))==null?void 0:o[s];return v(r)}};p(en,"Et",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var Zt=en;var tn=class{constructor(e){p(this,"fe",0);p(this,"de",new Map);p(this,"m");p(this,"De");p(this,"Ue");p(this,"Be");p(this,"E");p(this,"q");p(this,"o");p(this,"R");p(this,"He");this.m=e,this.o=e.o,this.Ue=new Zt(this),this.De=new It(this),this.Be=new Jt(this),this.E=new Wt(this),this.q=new Gt(this),this.R=this.o.u.pre,this.He=this.o.u.dynamic}wt(e){let n=de(e)?[e]:e.querySelectorAll("template");for(let r of n){if(r.hasAttribute(this.R))continue;let o=r.parentNode;if(!o)continue;let s=r.nextSibling;if(r.remove(),!r.content)continue;let i=[...r.content.childNodes];for(let a of i)o.insertBefore(a,s);De(this,i)}}$(e){++this.fe;try{if(e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.R)||this.De.k(e)||this.Ue.k(e)||this.Be.k(e))return;this.E.k(e),this.wt(e),this.ve(e,!0)}finally{--this.fe,this.fe===0&&this.vt()}}St(e,n){let r=document;if(!r){let o=e.parentNode;for(;o!=null&&o.parentNode;)o=o.parentNode;if(!o)return null;r=o}return r.querySelector(n)}je(e,n){let r=this.St(e,n);if(!r)return!1;let o=e.parentElement;if(!o)return!1;let s=new Comment(`teleported => '${n}'`);return o.insertBefore(s,e),e.teleportedFrom=s,s.teleportedTo=e,W(s,()=>{G(e)}),r.appendChild(e),!0}At(e,n){this.de.set(e,n)}vt(){let e=this.de;if(e.size!==0){this.de=new Map;for(let[n,r]of e.entries())this.je(n,r)}}ve(e,n){var s;let r=this.q.we(e,n),o=this.o.B;for(let[i,a]of r.entries()){let[c,l]=a.oe,u=(s=o[i])!=null?s:o[c];if(!u){console.error("directive not found:",c);continue}let f=a.Se;for(let m=0;m<f.length;++m){let y=f[m];this.y(u,y,i,!1,l,a.se)}}}y(e,n,r,o,s,i){if(n.hasAttribute(this.R))return;let a=n.getAttribute(r);n.removeAttribute(r);let c=l=>{let u=l;for(;u;){let f=u.getAttribute(pt);if(f)return f;u=u.parentElement}return null};if(Sn()){let l=c(n);if(l){this.m.C(gr(l),()=>{this.N(e,n,a,s,i)});return}}this.N(e,n,a,s,i)}Vt(e,n,r){return e!==Ht?!1:(j(r)||this.je(n,r)||this.At(n,r),!0)}N(e,n,r,o,s){if(n.nodeType!==Node.ELEMENT_NODE||r==null||this.Vt(e,n,r))return;let i=this.kt(o,e.once),a=this.Mt(e,r),c=this.Nt(a,i);W(n,c.stop);let l=this.Ot(n,r,a,i,o,s),u=this.Lt(e,l,c);if(!u)return;let f=this.It(l,a,i,o,u);f(),e.once||(c.result=a.subscribe(f),i&&(c.dynamic=i.subscribe(f)))}kt(e,n){let r=Er(e,this.He);if(r)return this.m.O(z(r),void 0,void 0,void 0,n)}Mt(e,n){return this.m.O(n,e.isLazy,e.isLazyKey,e.collectRefObj,e.once)}Nt(e,n){let r={stop:()=>{var o,s,i;e.stop(),n==null||n.stop(),(o=r.result)==null||o.call(r),(s=r.dynamic)==null||s.call(r),(i=r.mounted)==null||i.call(r),r.result=void 0,r.dynamic=void 0,r.mounted=void 0}};return r}Ot(e,n,r,o,s,i){return{el:e,expr:n,values:r.value(),previousValues:void 0,option:o?o.value()[0]:s,previousOption:void 0,flags:i,parseResult:r,dynamicOption:o}}Lt(e,n,r){let o=e.mount(n);if(typeof o=="function"){r.mounted=o;return}return o!=null&&o.unmount&&(r.mounted=o.unmount),o==null?void 0:o.update}It(e,n,r,o,s){let i,a;return()=>{let c=n.value(),l=r?r.value()[0]:o;e.values=c,e.previousValues=i,e.option=l,e.previousOption=a,i=c,a=l,s(e)}}};var Ds=(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n==null?void 0:n[o];if(S(s)){let a=s.length;for(let c=0;c<a;++c)Ir(t,s[c],i==null?void 0:i[c])}else Ir(t,s,i)}},Dn={mount:()=>({update:({el:t,values:e,previousValues:n})=>{Ds(t,e,n)}})},Ir=(t,e,n)=>{let r=v(e),o=v(n),s=t.classList,i=Q(r),a=Q(o);if(r&&!i){let c=r;if(o&&!a){let l=o;for(let u in l)(!(u in c)||!v(c[u]))&&s.remove(u)}for(let l in c)v(c[l])&&s.add(l)}else if(i){if(o!==r){let c=a?tt(o):[],l=tt(r);c.length>0&&s.remove(...c),l.length>0&&s.add(...l)}}else if(o){let c=a?tt(o):[];c.length>0&&s.remove(...c)}};function Us(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=Ae(t[r],e[r]);return n}function Ae(t,e){if(t===e)return!0;let n=Cn(t),r=Cn(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=ft(t),r=ft(e),n||r)return t===e;if(n=S(t),r=S(e),n||r)return n&&r?Us(t,e):!1;if(n=P(t),r=P(e),n||r){if(!n||!r)return!1;let o=Object.keys(t).length,s=Object.keys(e).length;if(o!==s)return!1;for(let i in t){let a=Object.prototype.hasOwnProperty.call(t,i),c=Object.prototype.hasOwnProperty.call(e,i);if(a&&!c||!Ae(t[i],e[i]))return!1}return!0}return String(t)===String(e)}function nn(t,e){return t.findIndex(n=>Ae(n,e))}var Pr=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var rn=t=>{if(!E(t))throw q(3,"pause");t(void 0,void 0,3)};var on=t=>{if(!E(t))throw q(3,"resume");t(void 0,void 0,4)};var Ur={mount:({el:t,parseResult:e,flags:n})=>({update:({values:r})=>{Hr(t,r[0])},unmount:Hs(t,e,n)})},Hr=(t,e)=>{let n=_r(t);if(n&&Br(t))S(e)?e=nn(e,Ne(t))>-1:le(e)?e=e.has(Ne(t)):e=qs(t,e),t.checked=e;else if(n&&$r(t))t.checked=Ae(e,Ne(t));else if(n||Fr(t))jr(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(qr(t)){let r=t.options,o=r.length,s=t.multiple;for(let i=0;i<o;i++){let a=r[i],c=Ne(a);if(s)S(e)?a.selected=nn(e,c)>-1:a.selected=e.has(c);else if(Ae(Ne(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else _(7,t)},yt=t=>(E(t)&&(t=t()),J(t)&&(t=t()),t?Q(t)?{trim:t.includes("trim"),lazy:t.includes("lazy"),number:t.includes("number"),int:t.includes("int")}:{trim:!!t.trim,lazy:!!t.lazy,number:!!t.number,int:!!t.int}:{trim:!1,lazy:!1,number:!1,int:!1}),Br=t=>t.type==="checkbox",$r=t=>t.type==="radio",jr=t=>t.type==="number"||t.type==="range",_r=t=>t.tagName==="INPUT",Fr=t=>t.tagName==="TEXTAREA",qr=t=>t.tagName==="SELECT",Hs=(t,e,n)=>{let r=e.value,o=yt(n==null?void 0:n.join(",")),s=yt(r()[1]),i={int:o.int||s.int,lazy:o.lazy||s.lazy,number:o.number||s.number,trim:o.trim||s.trim};if(!e.refs[0])return _(8,t),()=>{};let a=()=>e.refs[0],c=_r(t);return c&&Br(t)?$s(t,a):c&&$r(t)?zs(t,a):c||Fr(t)?Bs(t,i,a,r):qr(t)?Ks(t,a,r):(_(7,t),()=>{})},Dr=/[.,' ·٫]/,Bs=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=jr(t),a=()=>{!e.trim&&!yt(r()[1]).trim||(t.value=t.value.trim())},c=m=>{let y=m.target;y.composing=1},l=m=>{let y=m.target;y.composing&&(y.composing=0,y.dispatchEvent(new Event(s)))},u=()=>{t.removeEventListener(s,f),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",l),t.removeEventListener("change",l)},f=m=>{let y=n();if(!y)return;let x=m.target;if(!x||x.composing)return;let d=x.value,w=yt(r()[1]);if(i||w.number||w.int){if(w.int)d=parseInt(d);else{if(Dr.test(d[d.length-1])&&d.split(Dr).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(y()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else w.trim&&(d=d.trim());y(d)};return t.addEventListener(s,f),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",l),t.addEventListener("change",l),u},$s=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=Ne(t),a=t.checked,c=s();if(S(c)){let l=nn(c,i),u=l!==-1;a&&!u?c.push(i):!a&&u&&c.splice(l,1)}else le(c)?a?c.add(i):c.delete(i):s(Fs(t,a))};return t.addEventListener(n,o),r},Ne=t=>"_value"in t?t._value:t.value,zr="trueValue",js="falseValue",Kr="true-value",_s="false-value",Fs=(t,e)=>{let n=e?zr:js;if(n in t)return t[n];let r=e?Kr:_s;return t.hasAttribute(r)?t.getAttribute(r):e},qs=(t,e)=>{if(zr in t)return Ae(e,t.trueValue);let r=Kr;return t.hasAttribute(r)?Ae(e,t.getAttribute(r)):Ae(e,!0)},zs=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=Ne(t);s(i)};return t.addEventListener(n,o),r},Ks=(t,e,n)=>{let r="change",o=Ws(t,n),s=()=>{t.removeEventListener(r,i),o()},i=()=>{let a=e();if(!a)return;let l=yt(n()[1]).number,u=Array.prototype.filter.call(t.options,f=>f.selected).map(f=>l?Pr(Ne(f)):Ne(f));if(t.multiple){let f=a();try{if(rn(a),le(f)){f.clear();for(let m of u)f.add(m)}else S(f)?(f.splice(0),f.push(...u)):a(u)}finally{on(a),te(a)}}else a(u[0])};return t.addEventListener(r,i),s},Ws=(t,e)=>{var c,l;let n=(l=globalThis.MutationObserver)!=null?l:(c=globalThis.window)==null?void 0:c.MutationObserver;if(!n)return()=>{};let r=!1,o=!1,s=()=>{r=!1,!o&&Hr(t,e()[0])},i=()=>{r||(r=!0,typeof queueMicrotask=="function"?queueMicrotask(s):Promise.resolve().then(s))},a=new n(i);return a.observe(t,{attributes:!0,attributeFilter:["value"],childList:!0,subtree:!0}),()=>{o=!0,a.disconnect()}};var Gs=["stop","prevent","capture","self","once","left","right","middle","passive"],Js=t=>{let e={};if(j(t))return;let n=t.split(",");for(let r of Gs)e[r]=n.includes(r);return e},Qs=(t,e,n,r,o)=>{var l,u;if(r){let f=e.value(),m=v(r.value()[0]);return Q(m)?Un(t,z(m),()=>e.value()[0],(l=o==null?void 0:o.join(","))!=null?l:f[1]):()=>{}}else if(n){let f=e.value();return Un(t,z(n),()=>e.value()[0],(u=o==null?void 0:o.join(","))!=null?u:f[1])}let s=[],i=()=>{s.forEach(f=>f())},a=e.value(),c=a.length;for(let f=0;f<c;++f){let m=a[f];if(J(m)&&(m=m()),P(m))for(let y of Object.entries(m)){let x=y[0],d=()=>{let C=e.value()[f];return J(C)&&(C=C()),C=C[x],J(C)&&(C=C()),C},w=m[x+"_flags"];s.push(Un(t,x,d,w))}else _(2,"r-on",t)}return i},Hn={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,mount:({el:t,parseResult:e,option:n,dynamicOption:r,flags:o})=>Qs(t,e,n,r,o)},Xs=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e!=null||(e="");let n=[...t.split("."),...e.split(",")];t=n[0];let r=n[1],o=n.includes("ctrl"),s=n.includes("shift"),i=n.includes("alt"),a=n.includes("meta"),c=l=>!(o&&!l.ctrlKey||s&&!l.shiftKey||i&&!l.altKey||a&&!l.metaKey);return r?[t,l=>c(l)?l.key.toUpperCase()===r.toUpperCase():!1]:[t,c]}return[t,n=>!0]},Un=(t,e,n,r)=>{if(j(e))return _(5,"r-on",t),()=>{};let o=Js(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=Xs(e,r);let a=u=>{if(!i(u)||!n&&e==="submit"&&(o!=null&&o.prevent))return;let f=n(u);J(f)&&(f=f(u)),J(f)&&f(u)},c=()=>{t.removeEventListener(e,l,s)},l=u=>{if(!o){a(u);return}try{if(o.left&&u.button!==0||o.middle&&u.button!==1||o.right&&u.button!==2||o.self&&u.target!==t)return;o.stop&&u.stopPropagation(),o.prevent&&u.preventDefault(),a(u)}finally{o.once&&c()}};return t.addEventListener(e,l,s),c};var Ys=(t,e,n,r)=>{if(n){r&&r.includes("camel")&&(n=z(n)),it(t,n,e[0]);return}let o=e.length;for(let s=0;s<o;++s){let i=e[s];if(S(i)){let a=i[0],c=i[1];it(t,a,c)}else if(P(i))for(let a of Object.entries(i)){let c=a[0],l=a[1];it(t,c,l)}else{let a=e[s++],c=e[s];it(t,a,c)}}},Wr={mount:()=>({update:({el:t,values:e,option:n,flags:r})=>{Ys(t,e,n,r)}})};function Zs(t){return!!t||t===""}var it=(t,e,n)=>{if(me(e)){_(3,":prop",t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(ye),1),t[e]=n!=null?n:"";return}let r=t.tagName;if(e==="value"&&r!=="PROGRESS"&&!r.includes("-")){t._value=n;let s=r==="OPTION"?t.getAttribute("value"):t.value,i=n!=null?n:"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let o=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=Zs(n):n==null&&s==="string"?(n="",o=!0):s==="number"&&(n=0,o=!0)}try{t[e]=n}catch(s){o||_(4,e,r,n,s)}o&&t.removeAttribute(e)};var Gr={once:!0,mount:({el:t,parseResult:e,expr:n})=>{let r=e,o=r.value()[0],s=S(o),i=r.refs[0];return s?o.push(t):i?i==null||i(t):r.context[n]=t,()=>{if(s){let a=o.indexOf(t);a!==-1&&o.splice(a,1)}else i==null||i(null)}}};var ei=(t,e)=>{let n=Pe(t).data,r=n._ord;cr(r)&&(r=n._ord=t.style.display),je(e[0])?t.style.display=r:t.style.display="none"},Jr={mount:()=>({update:({el:t,values:e})=>{ei(t,e)}})};var ti=(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n==null?void 0:n[o];if(S(s)){let a=s.length;for(let c=0;c<a;++c)Qr(t,s[c],i==null?void 0:i[c])}else Qr(t,s,i)}},sn={mount:()=>({update:({el:t,values:e,previousValues:n})=>{ti(t,e,n)}})},Qr=(t,e,n)=>{let r=v(e),o=v(n),s=t.style,i=Q(r);if(r&&!i){let a=r;if(o&&!Q(o)){let c=o;for(let l in c)v(a[l])==null&&$n(s,l,"")}for(let c in a)$n(s,c,a[c])}else{let a=s.display;if(i?o!==r&&(s.cssText=r):o&&t.removeAttribute("style"),"_ord"in Pe(t).data)return;s.display=a}},Xr=/\s*!important$/;function $n(t,e,n){let r=v(n);if(S(r))r.forEach(o=>{$n(t,e,o)});else{let o=r==null?"":String(r);if(e.startsWith("--"))t.setProperty(e,o);else{let s=ni(t,e);Xr.test(o)?t.setProperty(et(s),o.replace(Xr,""),"important"):t[s]=o}}}var Yr=["Webkit","Moz","ms"],Bn={};function ni(t,e){let n=Bn[e];if(n)return n;let r=z(e);if(r!=="filter"&&r in t)return Bn[e]=r;r=dt(r);for(let o=0;o<Yr.length;o++){let s=Yr[o]+r;if(s in t)return Bn[e]=s}return e}var ce=t=>Zr(v(t)),Zr=(t,e=new WeakMap)=>{if(!t||!P(t)||t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return t;if(S(t))return t.map(ce);if(le(t)){let r=new Set;for(let o of t.keys())r.add(ce(o));return r}if(Le(t)){let r=new Map;for(let o of t)r.set(ce(o[0]),ce(o[1]));return r}if(e.has(t))return v(e.get(t));let n=Rt({},t);e.set(t,n);for(let r of Object.entries(n))n[r[0]]=Zr(v(r[1]),e);return n};var ri=(t,e)=>{var r;let n=e[0];t.textContent=le(n)?JSON.stringify(ce([...n])):Le(n)?JSON.stringify(ce([...n])):P(n)?JSON.stringify(ce(n)):(r=n==null?void 0:n.toString())!=null?r:""},eo={mount:()=>({update:({el:t,values:e})=>{ri(t,e)}})};var to={mount:()=>({update:({el:t,values:e})=>{it(t,"value",e[0])}})};var qe=t=>(t==null?void 0:t[Nt])===1;function xe(t){if(ot(t))return t;let e;if(E(t)?(e=t,t=e()):e=re(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[Nt]=1,S(t)){let n=t.length;for(let r=0;r<n;++r){let o=t[r];qe(o)||(t[r]=xe(o))}return e}if(!P(t))return e;for(let n of Object.entries(t)){let r=n[1];if(qe(r))continue;let o=n[0];ft(o)||(t[o]=null,t[o]=xe(r))}return e}function an(t){return xe(ce(t))}var He=class He{constructor(e){p(this,"B",{});p(this,"u",{});p(this,"dt",()=>Object.keys(this.B).filter(e=>e.length===1||!e.startsWith(":")));p(this,"te",new Map);p(this,"F",new Map);p(this,"forGrowThreshold",10);p(this,"globalContext");p(this,"useInterpolation",!0);p(this,"propValidationMode","throw");if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.Dt()}static getDefault(){var e;return(e=He.$e)!=null?e:He.$e=new He}Dt(){let e={},n=globalThis;for(let r of He.Pt.split(","))e[r]=n[r];return e.ref=xe,e.cref=an,e.sref=re,e.flatten=ce,e}addComponent(...e){for(let n of e){if(!n.defaultName){$e.warning("Registered component's default name is not defined",n);continue}this.te.set(dt(n.defaultName),n),this.F.set(dt(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.B={".":Wr,":":kn,"@":Hn,[`${e}on`]:Hn,[`${e}bind`]:kn,[`${e}html`]:Qt,[`${e}text`]:eo,[`${e}show`]:Jr,[`${e}model`]:Ur,":style":sn,[`${e}style`]:sn,[`${e}bind:style`]:sn,":class":Dn,[`${e}bind:class`]:Dn,":ref":Gr,":value":to,[`${e}teleport`]:Ht},this.u={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,context:":context",contextAlias:`${e}context`,bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.B,this.u)}};p(He,"$e"),p(He,"Pt","Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console");var pe=He;var cn=(t,e)=>{if(!t)return;let r=(e!=null?e:pe.getDefault()).u,o=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of si(t,r.pre,s))oi(i,r.text,o,s)},oi=(t,e,n,r)=>{var c;let o=t.textContent;if(!o)return;let s=n,i=o.split(s);if(i.length<=1)return;if(((c=t.parentElement)==null?void 0:c.childNodes.length)===1&&i.length===3){let l=i[1],u=no(l,r);if(u&&j(i[0])&&j(i[2])){let f=t.parentElement;f.setAttribute(e,l.substring(u.start.length,l.length-u.end.length)),f.innerText="";return}}let a=document.createDocumentFragment();for(let l of i){let u=no(l,r);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)},si=(t,e,n)=>{let r=[],o=s=>{var i;if(s.nodeType===Node.TEXT_NODE)n.some(a=>{var c;return(c=s.textContent)==null?void 0:c.includes(a.start)})&&r.push(s);else{if((i=s==null?void 0:s.hasAttribute)!=null&&i.call(s,e))return;for(let a of Se(s))o(a)}};return o(t),r},no=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var ii=9,ai=10,ci=13,ui=32,Me=46,un=44,fi=39,li=34,fn=40,at=41,ln=91,jn=93,_n=63,pi=59,ro=58,oo=123,pn=125,ze=43,mn=45,Fn=96,so=47,qn=92,io=new Set([2,3]),po={"=":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},mi=or(Rt({"=>":2},po),{"||":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}),mo=Object.keys(po),di=new Set(mo),Kn=new Set(["=>"]);mo.forEach(t=>Kn.add(t));var ao={true:!0,false:!1,null:null},hi="this",ct="Expected ",Ke="Unexpected ",Gn="Unclosed ",yi=ct+":",co=ct+"expression",gi="missing }",bi=Ke+"object property",Ti=Gn+"(",uo=ct+"comma",fo=Ke+"token ",xi=Ke+"period",zn=ct+"expression after ",Ci="missing unaryOp argument",Ei=Gn+"[",Ri=ct+"exponent (",wi="Variable names cannot start with a number (",vi=Gn+'quote after "',gt=t=>t>=48&&t<=57,lo=t=>mi[t],Wn=class{constructor(e){p(this,"p");p(this,"e");this.p=e,this.e=0}get H(){return this.p.charAt(this.e)}get h(){return this.p.charCodeAt(this.e)}f(e){return this.p.charCodeAt(this.e)===e}z(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95||e>=128}me(e){return this.z(e)||gt(e)}i(e){return new Error(`${e} at character ${this.e}`)}g(){let e=this.h,n=this.p,r=this.e;for(;e===ui||e===ii||e===ai||e===ci;)e=n.charCodeAt(++r);this.e=r}parse(){let e=this.ye();return e.length===1?e[0]:{type:0,body:e}}ye(e){let n=[];for(;this.e<this.p.length;){let r=this.h;if(r===pi||r===un)this.e++;else{let o=this.A();if(o)n.push(o);else if(this.e<this.p.length){if(r===e)break;throw this.i(Ke+'"'+this.H+'"')}}}return n}A(){var n;let e=(n=this.Ut())!=null?n:this._e();return this.g(),this.Bt(e)}he(){this.g();let e=this.p,n=this.e,r=e.charCodeAt(n),o=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);if(isNaN(r))return!1;let a=!1,c=0;return r===62&&o===62&&s===62&&i===61?(a=">>>=",c=4):r===61&&o===61&&s===61?(a="===",c=3):r===33&&o===61&&s===61?(a="!==",c=3):r===62&&o===62&&s===62?(a=">>>",c=3):r===60&&o===60&&s===61?(a="<<=",c=3):r===62&&o===62&&s===61?(a=">>=",c=3):r===42&&o===42&&s===61?(a="**=",c=3):r===61&&o===62?(a="=>",c=2):r===124&&o===124?(a="||",c=2):r===63&&o===63?(a="??",c=2):r===38&&o===38?(a="&&",c=2):r===61&&o===61?(a="==",c=2):r===33&&o===61?(a="!=",c=2):r===60&&o===61?(a="<=",c=2):r===62&&o===61?(a=">=",c=2):r===60&&o===60?(a="<<",c=2):r===62&&o===62?(a=">>",c=2):r===43&&o===61?(a="+=",c=2):r===45&&o===61?(a="-=",c=2):r===42&&o===61?(a="*=",c=2):r===47&&o===61?(a="/=",c=2):r===37&&o===61?(a="%=",c=2):r===38&&o===61?(a="&=",c=2):r===94&&o===61?(a="^=",c=2):r===124&&o===61?(a="|=",c=2):r===42&&o===42?(a="**",c=2):r===105&&o===110?this.me(e.charCodeAt(n+2))||(a="in",c=2):r===61?(a="=",c=1):r===124?(a="|",c=1):r===94?(a="^",c=1):r===38?(a="&",c=1):r===60?(a="<",c=1):r===62?(a=">",c=1):r===43?(a="+",c=1):r===45?(a="-",c=1):r===42?(a="*",c=1):r===47?(a="/",c=1):r===37&&(a="%",c=1),a?(this.e+=c,a):!1}_e(){let e,n,r,o,s,i,a,c;if(s=this.W(),!s||(n=this.he(),!n))return s;if(o={value:n,prec:lo(n),right_a:Kn.has(n)},i=this.W(),!i)throw this.i(zn+n);let l=[s,o,i];for(;n=this.he();){r=lo(n),o={value:n,prec:r,right_a:Kn.has(n)},c=n;let u=f=>o.right_a&&f.right_a?r>f.prec:r<=f.prec;for(;l.length>2&&u(l[l.length-2]);)i=l.pop(),n=l.pop().value,s=l.pop(),e=this.Fe(n,s,i),l.push(e);if(e=this.W(),!e)throw this.i(zn+c);l.push(o,e)}for(a=l.length-1,e=l[a];a>1;)e=this.Fe(l[a-1].value,l[a-2],e),a-=2;return e}W(){let e;if(this.g(),e=this.Ht(),e)return this.ge(e);let n=this.h;if(gt(n)||n===Me)return this.jt();if(n===fi||n===li)e=this.$t();else if(n===ln)e=this._t();else{let r=this.Ft();if(r){let o=this.W();if(!o)throw this.i(Ci);return this.ge({type:7,operator:r,argument:o})}this.z(n)?(e=this.be(),e.name in ao?e={type:4,value:ao[e.name],raw:e.name}:e.name===hi&&(e={type:5})):n===fn&&(e=this.qt())}return e?(e=this.G(e),this.ge(e)):!1}Fe(e,n,r){if(e==="=>"){let o=n.type===1?n.expressions:[n];return{type:15,params:o,body:r}}return di.has(e)?{type:16,operator:e,left:n,right:r}:{type:8,operator:e,left:n,right:r}}Ht(){let e={node:!1};return this.Kt(e),e.node||(this.zt(e),e.node)||(this.Wt(e),e.node)||(this.qe(e),e.node)||this.Gt(e),e.node}ge(e){let n={node:e};return this.Jt(n),this.Qt(n),this.Xt(n),n.node}Ft(){let e=this.p,n=this.e,r=e.charCodeAt(n),o=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);return r===mn?(this.e++,"-"):r===33?(this.e++,"!"):r===126?(this.e++,"~"):r===ze?(this.e++,"+"):r===110&&o===101&&s===119&&!this.me(i)?(this.e+=3,"new"):!1}Ut(){let e={};return this.Yt(e),e.node}Bt(e){let n={node:e};return this.Zt(n),n.node}G(e){this.g();let n=this.h;for(;n===Me||n===ln||n===fn||n===_n;){let r;if(n===_n){if(this.p.charCodeAt(this.e+1)!==Me)break;r=!0,this.e+=2,this.g(),n=this.h}if(this.e++,n===ln){if(e={type:3,computed:!0,object:e,property:this.A()},this.g(),n=this.h,n!==jn)throw this.i(Ei);this.e++}else n===fn?e={type:6,arguments:this.Ke(at),callee:e}:(r&&this.e--,this.g(),e={type:3,computed:!1,object:e,property:this.be()});r&&(e.optional=!0),this.g(),n=this.h}return e}jt(){let e=this.p,n=this.e,r=n;for(;gt(e.charCodeAt(r));)r++;if(e.charCodeAt(r)===Me)for(r++;gt(e.charCodeAt(r));)r++;let o=e.charCodeAt(r);if(o===101||o===69){r++;let a=e.charCodeAt(r);(a===ze||a===mn)&&r++;let c=r;for(;gt(e.charCodeAt(r));)r++;if(c===r){this.e=r;let l=e.slice(n,r);throw this.i(Ri+l+this.H+")")}}this.e=r;let s=e.slice(n,r),i=e.charCodeAt(r);if(this.z(i))throw this.i(wi+s+this.H+")");if(i===Me||s.length===1&&s.charCodeAt(0)===Me)throw this.i(xi);return{type:4,value:parseFloat(s),raw:s}}$t(){let e=this.p,n=e.length,r=this.e,o=e.charCodeAt(this.e++),s=this.e,i=s,a=[],c=!1,l=!1;for(;s<n;){let f=e.charCodeAt(s);if(f===o){l=!0,this.e=s+1;break}if(f===qn){c||(c=!0),a.push(e.slice(i,s));let m=e.charCodeAt(s+1);a.push(this.ze(m)),s+=2,i=s}else s++}let u=c?a.join("")+e.slice(i,l?s:n):e.slice(i,l?s:n);if(!l)throw this.e=s,this.i(vi+u+'"');return{type:4,value:u,raw:e.substring(r,this.e)}}ze(e){switch(e){case 110:return`
|
|
2
|
+
`;case 114:return"\r";case 116:return" ";case 98:return"\b";case 102:return"\f";case 118:return"\v";default:return isNaN(e)?"":String.fromCharCode(e)}}be(){let e=this.h,n=this.e;if(this.z(e))this.e++;else throw this.i(Ke+this.H);for(;this.e<this.p.length&&(e=this.h,this.me(e));)this.e++;return{type:2,name:this.p.slice(n,this.e)}}Ke(e){let n=[],r=!1,o=0;for(;this.e<this.p.length;){this.g();let s=this.h;if(s===e){if(r=!0,this.e++,e===at&&o&&o>=n.length)throw this.i(fo+String.fromCharCode(e));break}else if(s===un){if(this.e++,o++,o!==n.length){if(e===at)throw this.i(fo+",");for(let i=n.length;i<o;i++)n.push(null)}}else{if(n.length!==o&&o!==0)throw this.i(uo);{let i=this.A();if(!i||i.type===0)throw this.i(uo);n.push(i)}}}if(!r)throw this.i(ct+String.fromCharCode(e));return n}qt(){this.e++;let e=this.ye(at);if(this.f(at))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(Ti)}_t(){return this.e++,{type:9,elements:this.Ke(jn)}}Kt(e){if(this.f(oo)){this.e++;let n=[];for(;!isNaN(this.h);){if(this.g(),this.f(pn)){this.e++,e.node=this.G({type:10,properties:n});return}let r=this.A();if(!r)break;if(this.g(),r.type===2&&(this.f(un)||this.f(pn)))n.push({type:12,computed:!1,key:r,value:r,shorthand:!0});else if(this.f(ro)){this.e++;let o=this.A();if(!o)throw this.i(bi);let s=r.type===9;n.push({type:12,computed:s,key:s?r.elements[0]:r,value:o,shorthand:!1}),this.g()}else n.push(r);this.f(un)&&this.e++}throw this.i(gi)}}zt(e){let n=this.h;if((n===ze||n===mn)&&n===this.p.charCodeAt(this.e+1)){this.e+=2;let r=e.node={type:13,operator:n===ze?"++":"--",argument:this.G(this.be()),prefix:!0};if(!r.argument||!io.has(r.argument.type))throw this.i(Ke+r.operator)}}Qt(e){let n=e.node,r=this.h;if((r===ze||r===mn)&&r===this.p.charCodeAt(this.e+1)){if(!io.has(n.type))throw this.i(Ke+(r===ze?"++":"--"));this.e+=2,e.node={type:13,operator:r===ze?"++":"--",argument:n,prefix:!1}}}Wt(e){this.p.charCodeAt(this.e)===Me&&this.p.charCodeAt(this.e+1)===Me&&this.p.charCodeAt(this.e+2)===Me&&(this.e+=3,e.node={type:14,argument:this.A()})}Zt(e){if(e.node&&this.f(_n)){this.e++;let n=e.node,r=this.A();if(!r)throw this.i(co);if(this.g(),this.f(ro)){this.e++;let o=this.A();if(!o)throw this.i(co);e.node={type:11,test:n,consequent:r,alternate:o}}else throw this.i(yi)}}Yt(e){if(this.g(),this.f(fn)){let n=this.e;if(this.e++,this.g(),this.f(at)){this.e++;let r=this.he();if(r==="=>"){let o=this._e();if(!o)throw this.i(zn+r);e.node={type:15,params:null,body:o};return}}this.e=n}}Xt(e){let n=e.node,r=n.type;(r===2||r===3)&&this.f(Fn)&&(e.node={type:17,tag:n,quasi:this.qe(e)})}qe(e){if(!this.f(Fn))return;let n=this.p,r=n.length,o={type:19,quasis:[],expressions:[]},s=++this.e,i=[],a=[],c=!1,l=u=>{if(!c){let y=n.slice(s,this.e);return o.quasis.push({type:18,value:{raw:y,cooked:y},tail:u})}i.push(n.slice(s,this.e)),a.push(n.slice(s,this.e));let f=i.join(""),m=a.join("");return i.length=0,a.length=0,c=!1,o.quasis.push({type:18,value:{raw:f,cooked:m},tail:u})};for(;this.e<r;){let u=n.charCodeAt(this.e);if(u===Fn)return l(!0),this.e+=1,e.node=o,o;if(u===36&&n.charCodeAt(this.e+1)===oo){if(l(!1),this.e+=2,o.expressions.push(...this.ye(pn)),!this.f(pn))throw this.i("unclosed ${");this.e+=1,s=this.e}else if(u===qn){c||(c=!0),i.push(n.slice(s,this.e)),a.push(n.slice(s,this.e));let f=n.charCodeAt(this.e+1);i.push(n.slice(this.e,this.e+2)),a.push(this.ze(f)),this.e+=2,s=this.e}else this.e+=1}throw this.i("Unclosed `")}Jt(e){let n=e.node;if(!n||n.operator!=="new"||!n.argument)return;if(!n.argument||![6,3].includes(n.argument.type))throw this.i("Expected new function()");e.node=n.argument;let r=e.node;for(;r.type===3||r.type===6&&r.callee.type===3;)r=r.type===3?r.object:r.callee.object;r.type=20}Gt(e){if(!this.f(so))return;let n=++this.e,r=!1;for(;this.e<this.p.length;){if(this.h===so&&!r){let o=this.p.slice(n,this.e),s="";for(;++this.e<this.p.length;){let a=this.h;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.H;else break}let i;try{i=new RegExp(o,s)}catch(a){throw this.i(a.message)}return e.node={type:4,value:i,raw:this.p.slice(n-1,this.e)},e.node=this.G(e.node),e.node}this.f(ln)?r=!0:r&&this.f(jn)&&(r=!1),this.e+=this.f(qn)?2:1}throw this.i("Unclosed Regex")}},ho=t=>new Wn(t).parse();var Si={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(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)=>Et(t,e)},Ai={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},To=t=>{if(!(t!=null&&t.some(bo)))return t;let e=[];return t.forEach(n=>bo(n)?e.push(...n):e.push(n)),e},yo=(...t)=>To(t),Jn=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},Ni={"++":(t,e)=>{let n=t[e];if(E(n)){let r=n();return n(++r),r}return++t[e]},"--":(t,e)=>{let n=t[e];if(E(n)){let r=n();return n(--r),r}return--t[e]}},Mi={"++":(t,e)=>{let n=t[e];if(E(n)){let r=n();return n(r+1),r}return t[e]++},"--":(t,e)=>{let n=t[e];if(E(n)){let r=n();return n(r-1),r}return t[e]--}},go={"=":(t,e,n)=>{let r=t[e];return E(r)?r(n):t[e]=n},"+=":(t,e,n)=>{let r=t[e];return E(r)?r(r()+n):t[e]+=n},"-=":(t,e,n)=>{let r=t[e];return E(r)?r(r()-n):t[e]-=n},"*=":(t,e,n)=>{let r=t[e];return E(r)?r(r()*n):t[e]*=n},"/=":(t,e,n)=>{let r=t[e];return E(r)?r(r()/n):t[e]/=n},"%=":(t,e,n)=>{let r=t[e];return E(r)?r(r()%n):t[e]%=n},"**=":(t,e,n)=>{let r=t[e];return E(r)?r(Et(r(),n)):t[e]=Et(t[e],n)},"<<=":(t,e,n)=>{let r=t[e];return E(r)?r(r()<<n):t[e]<<=n},">>=":(t,e,n)=>{let r=t[e];return E(r)?r(r()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let r=t[e];return E(r)?r(r()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let r=t[e];return E(r)?r(r()|n):t[e]|=n},"&=":(t,e,n)=>{let r=t[e];return E(r)?r(r()&n):t[e]&=n},"^=":(t,e,n)=>{let r=t[e];return E(r)?r(r()^n):t[e]^=n}},dn=(t,e)=>J(t)?t.bind(e):t,Qn=class{constructor(e,n,r,o,s){p(this,"l");p(this,"We");p(this,"Ge");p(this,"Je");p(this,"V");p(this,"Qe");p(this,"Xe");this.l=S(e)?e:[e],this.We=n,this.Ge=r,this.Je=o,this.Xe=!!s}Ye(e,n){if(n&&e in n)return n;for(let r of this.l)if(e in r)return r}2(e,n,r){let o=e.name;if(o==="$root")return this.l[this.l.length-1];if(o==="$parent")return this.l[1];if(o==="$ctx")return[...this.l];if(r&&o in r)return this.V=r[o],dn(v(r[o]),r);for(let i of this.l)if(o in i)return this.V=i[o],dn(v(i[o]),i);let s=this.We;if(s&&o in s)return this.V=s[o],dn(v(s[o]),s)}5(e,n,r){return this.l[0]}0(e,n,r){return this.Ze(n,r,yo,...e.body)}1(e,n,r){return this.w(n,r,(...o)=>o.pop(),...e.expressions)}3(e,n,r){let{obj:o,key:s}=this.Te(e,n,r),i=o==null?void 0:o[s];return this.V=i,dn(v(i),o)}4(e,n,r){return e.value}6(e,n,r){let o=(i,...a)=>J(i)?i(...To(a)):i,s=this.w(++n,r,o,e.callee,...e.arguments);return this.V=s,s}7(e,n,r){return this.w(n,r,Ai[e.operator],e.argument)}8(e,n,r){let o=Si[e.operator];switch(e.operator){case"||":case"&&":case"??":return o(()=>this.b(e.left,n,r),()=>this.b(e.right,n,r))}return this.w(n,r,o,e.left,e.right)}9(e,n,r){return this.Ze(++n,r,yo,...e.elements)}10(e,n,r){let o={},s=(...i)=>{i.forEach(a=>{Object.assign(o,a)})};return this.w(++n,r,s,...e.properties),o}11(e,n,r){return this.w(n,r,o=>this.b(o?e.consequent:e.alternate,n,r),e.test)}12(e,n,r){var u;let o={},s=f=>(f==null?void 0:f.type)!==15,i=(u=this.Je)!=null?u:()=>!1,a=n===0&&this.Xe,c=f=>this.et(a,e.key,n,Jn(f,r)),l=f=>this.et(a,e.value,n,Jn(f,r));if(e.shorthand){let f=e.key.name;o[f]=s(e.key)&&i(f,n)?c:c()}else if(e.computed){let f=v(c());o[f]=s(e.value)&&i(f,n)?l:l()}else{let f=e.key.type===4?e.key.value:e.key.name;o[f]=s(e.value)&&i(f,n)?()=>l:l()}return o}Te(e,n,r){let o=this.b(e.object,n,r),s=e.computed?this.b(e.property,n,r):e.property.name;return{obj:o,key:s}}13(e,n,r){let o=e.argument,s=e.operator,i=e.prefix?Ni:Mi;if(o.type===2){let a=o.name,c=this.Ye(a,r);return me(c)?void 0:i[s](c,a)}if(o.type===3){let{obj:a,key:c}=this.Te(o,n,r);return i[s](a,c)}}16(e,n,r){let o=e.left,s=e.operator;if(o.type===2){let i=o.name,a=this.Ye(i,r);if(me(a))return;let c=this.b(e.right,n,r);return go[s](a,i,c)}if(o.type===3){let{obj:i,key:a}=this.Te(o,n,r),c=this.b(e.right,n,r);return go[s](i,a,c)}}14(e,n,r){let o=this.b(e.argument,n,r);return S(o)&&(o.s=xo),o}17(e,n,r){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,r)}19(e,n,r){let o=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.w(n,r,o,...e.expressions)}18(e,n,r){return e.value.cooked}20(e,n,r){let o=(s,...i)=>new s(...i);return this.w(n,r,o,e.callee,...e.arguments)}15(e,n,r){return(...o)=>{let s=Object.create(r!=null?r:{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=o[a++]}return this.b(e.body,n,s)}}b(e,n,r){let o=v(this[e.type](e,n,r));return this.Qe=e.type,o}et(e,n,r,o){let s=this.b(n,r,o);return e&&this.tt()?this.V:s}tt(){let e=this.Qe;return(e===2||e===3||e===6)&&E(this.V)}eval(e,n){let{value:r,refs:o}=_t(()=>this.b(e,-1,n)),s={value:r,refs:o};return this.tt()&&(s.ref=this.V),s}w(e,n,r,...o){let s=o.map(i=>i&&this.b(i,e,n));return r(...s)}Ze(e,n,r,...o){let s=this.Ge;if(!s)return this.w(e,n,r,...o);let i=o.map((a,c)=>a&&(a.type!==15&&s(c,e)?l=>this.b(a,e,Jn(l,n)):this.b(a,e,n)));return r(...i)}},xo=Symbol("s"),bo=t=>(t==null?void 0:t.s)===xo,Co=(t,e,n,r,o,s,i)=>new Qn(e,n,r,o,i).eval(t,s);var Eo={},Ro=t=>!!t,hn=class{constructor(e,n){p(this,"l");p(this,"o");p(this,"nt",[]);this.l=e,this.o=n}v(e){this.l=[e,...this.l]}ne(){return this.l.map(n=>n.components).filter(Ro).reverse().reduce((n,r)=>{for(let[o,s]of Object.entries(r))n[o.toUpperCase()]=s;return n},{})}ft(){let e=[],n=new Set,r=this.l.map(o=>o.components).filter(Ro).reverse();for(let o of r)for(let s of Object.keys(o))n.has(s)||(n.add(s),e.push(s));return e}O(e,n,r,o,s){var C;let i=[],a=[],c=new Set,l=()=>{for(let b=0;b<a.length;++b)a[b]();a.length=0},m={value:()=>i,stop:()=>{l(),c.clear()},subscribe:(b,M)=>(c.add(b),M&&b(i),()=>{c.delete(b)}),refs:[],context:this.l[0]};if(j(e))return m;let y=this.o.globalContext,x=[],d=new Set,w=(b,M,D,U)=>{try{let V=Co(b,M,y,n,r,U,o);return D&&V.refs.length>0&&x.push(...V.refs),{value:V.value,refs:V.refs,ref:V.ref}}catch(V){_(6,`evaluation error: ${e}`,V)}return{value:void 0,refs:[]}};try{let b=(C=Eo[e])!=null?C:ho("["+e+"]");Eo[e]=b;let M=this.l.slice(),D=b.elements,U=D.length,V=new Array(U);m.refs=V;let oe=()=>{x.length=0,s||(d.clear(),l());let K=new Array(U);for(let A=0;A<U;++A){let T=D[A];if(n!=null&&n(A,-1)){K[A]=F=>w(T,M,!1,{$event:F}).value;continue}let I=w(T,M,!0);K[A]=I.value,V[A]=I.ref}if(!s)for(let A of x)d.has(A)||(d.add(A),a.push(ne(A,oe)));if(i=K,c.size!==0)for(let A of c)c.has(A)&&A(i)};oe()}catch(b){_(6,`parse error: ${e}`,b)}return m}L(){return this.l.slice()}le(e){this.nt.push(this.l),this.l=e}C(e,n){try{this.le(e),n()}finally{this.en()}}en(){var e;this.l=(e=this.nt.pop())!=null?e:[]}};var wo=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},Oi=(t,e)=>{let n="";for(let r=e;r<t.length;++r){let o=t[r];if(n){o===n&&(n="");continue}if(o==='"'||o==="'"){n=o;continue}if(o===">")return r}return-1},ki=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
|
|
3
|
+
`);)++n;if(n>=t.length||!wo(t[n]))return null;let r=n,o=!1;for(;n<t.length&&wo(t[n]);){let s=t.charCodeAt(n);s>=65&&s<=90&&(o=!0),++n}return{start:r,end:n,hasUppercase:o}},vo=t=>{switch(t){case"table":case"thead":case"tbody":case"tfoot":return!0;default:return!1}},Li=t=>{switch(t){case"thead":case"tbody":case"tfoot":return!0;default:return!1}},Vi=t=>{switch(t){case"caption":case"colgroup":case"thead":case"tbody":case"tfoot":case"tr":return!0;default:return!1}},bt=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Ii=t=>{switch(t){case"caption":return"captionx";case"thead":return"theadx";case"tbody":return"tbodyx";case"tfoot":return"tfootx";case"tr":return"trx";case"td":return"tdx";case"th":return"thx";case"colgroup":return"colgroupx";case"col":return"colx";default:return null}},Pi=t=>{switch(t){case"captionx":return"caption";case"theadx":return"thead";case"tbodyx":return"tbody";case"tfootx":return"tfoot";case"trx":return"tr";case"tdx":return"td";case"thx":return"th";case"colgroupx":return"colgroup";case"colx":return"col";default:return}},Di=(t,e)=>`${t}</${e}>`,So=(t,e)=>`${t.slice(0,t.length-2)}></${e}>`,yn=t=>{var i,a;let e=0,n=[],r=[],o=[],s=0;for(;e<t.length;){let c=t.indexOf("<",e);if(c===-1){n.push(t.slice(e));break}if(n.push(t.slice(e,c)),t.startsWith("<!--",c)){let A=t.indexOf("-->",c+4);if(A===-1){n.push(t.slice(c));break}n.push(t.slice(c,A+3)),e=A+3;continue}let l=Oi(t,c);if(l===-1){n.push(t.slice(c));break}let u=t.slice(c,l+1),f=u.startsWith("</");if(u.startsWith("<!")||u.startsWith("<?")){n.push(u),e=l+1;continue}let y=ki(u,f);if(!y){n.push(u),e=l+1;continue}let x=u.slice(y.start,y.end),d=y.hasUppercase?"":x;if(f){let A=o[o.length-1];if((A==null?void 0:A.tagName)===x){o.pop(),A.emit&&n.push(u),e=l+1;continue}let T=r[r.length-1];T?(r.pop(),n.push(T.replacementHost?`</${T.replacementHost}>`:u),!T.isTableAlias&&vo(T.effectiveTag)&&--s):n.push(u),e=l+1;continue}let w=u.charCodeAt(u.length-2)===47,C=r[r.length-1],b=null;s===0?b=Ii(d):Li((i=C==null?void 0:C.effectiveTag)!=null?i:"")?b=d==="tr"?null:"tr":(C==null?void 0:C.effectiveTag)==="table"?b=Vi(d)?null:"tr":(C==null?void 0:C.effectiveTag)==="tr"?b=d==="td"||d==="th"?null:"td":(C==null?void 0:C.effectiveTag)==="colgroup"&&(b=d==="col"?null:"col");let M=Pi(b),D=M!==void 0,U=w&&!bt.has(b||d),V=!!b&&M===d&&bt.has(d),oe=!w&&!!b&&bt.has(b)&&!V,K=!w&&!b&&bt.has(d);if(b){let A=`${u.slice(0,y.start)}${b} is="${M?`r-${M}`:`regor:${x}`}"${u.slice(y.end)}`;n.push(U?So(A,b):V?Di(A,b):A)}else n.push(U?So(u,x):u);if(oe?o.push({tagName:x,emit:!1}):V&&!w?o.push({tagName:x,emit:!1}):K&&o.push({tagName:x,emit:!0}),!w&&!V&&!oe&&!K&&!bt.has(b!=null?b:d)){let A=(a=M!=null?M:b)!=null?a:d||x;r.push({replacementHost:b,effectiveTag:A,isTableAlias:D}),!D&&vo(A)&&++s}e=l+1}return n.join("")};var Ui="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",Hi=new Set(Ui.toUpperCase().split(",")),Bi="http://www.w3.org/2000/svg",Ao=(t,e)=>{de(t)?t.content.appendChild(e):t.appendChild(e)},Xn=(t,e,n,r)=>{var i;let o=t.t;if(o){let a=n&&Hi.has(o.toUpperCase())?document.createElementNS(Bi,o.toLowerCase()):document.createElement(o),c=t.a;if(c)for(let u of Object.entries(c)){let f=u[0],m=u[1];f.startsWith("#")&&(m=f.substring(1),f="name"),a.setAttribute(Ut(f,r),m)}let l=t.c;if(l)for(let u of l)Xn(u,a,n,r);Ao(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)Ao(e,a);else throw new Error("unsupported node type.")}},We=(t,e,n)=>{n!=null||(n=pe.getDefault());let r=document.createDocumentFragment();if(!S(t))return Xn(t,r,!!e,n),r;for(let o of t)Xn(o,r,!!e,n);return r};var No=(t,e={selector:"#app"},n)=>{Q(e)&&(e={selector:"#app",template:e}),Rr(t)&&(t=t.context);let r=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!r||!we(r))throw q(0);n||(n=pe.getDefault());let o=()=>{for(let a of[...r.childNodes])G(a)},s=a=>{for(;a.length>0;)r.appendChild(a[0])};if(e.template){let a=document.createRange().createContextualFragment(yn(e.template));o(),s(a.childNodes),e.element=a}else if(e.json){let a=We(e.json,e.isSVG,n);o(),s(a.childNodes)}return n.useInterpolation&&cn(r,n),new Yn(t,r,n).y(),W(r,()=>{Ve(t)}),Bt(t),{context:t,unmount:()=>{G(r)},unbind:()=>{ye(r)}}},Yn=class{constructor(e,n,r){p(this,"tn");p(this,"rt");p(this,"o");p(this,"m");p(this,"r");this.tn=e,this.rt=n,this.o=r,this.m=new hn([e],r),this.r=new tn(this.m)}y(){this.r.$(this.rt)}};var ut=t=>{if(S(t))return t.map(o=>ut(o));let e={};if(t.tagName)e.t=t.tagName;else return t.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),t.textContent&&(e.d=t.textContent),e;let n=t.getAttributeNames();n.length>0&&(e.a=Object.fromEntries(n.map(o=>{var s;return[o,(s=t.getAttribute(o))!=null?s:""]})));let r=Se(t);return r.length>0&&(e.c=[...r].map(o=>ut(o))),e};var Mo=(t,e={})=>{var s,i,a,c,l,u;S(e)&&(e={props:e}),Q(t)&&(t={template:t});let n=(s=e.context)!=null?s:()=>({}),r=!1;if(t.element){let f=t.element;f.remove(),t.element=f}else if(t.selector){let f=document.querySelector(t.selector);if(!f)throw q(1,t.selector);f.remove(),t.element=f}else if(t.template){let f=document.createRange().createContextualFragment(yn(t.template));t.element=f}else t.json&&(t.element=We(t.json,t.isSVG,e.config),r=!0);t.element||(t.element=document.createDocumentFragment()),((i=e.useInterpolation)==null||i)&&cn(t.element,(a=e.config)!=null?a:pe.getDefault());let o=t.element;if(!r&&(((l=t.isSVG)!=null?l:mt(o)&&((c=o.hasAttribute)!=null&&c.call(o,"isSVG")))||mt(o)&&o.querySelector("[isSVG]"))){let f=o.content,m=f?[...f.childNodes]:[...o.childNodes],y=ut(m);t.element=We(y,!0,e.config)}return{context:n,template:t.element,inheritAttrs:(u=e.inheritAttrs)!=null?u:!0,props:e.props,defaultName:e.defaultName}};var gn=class{constructor(){p(this,"byConstructor",new Map)}register(e){this.byConstructor.set(e.constructor,e)}unregisterByClass(e){this.byConstructor.delete(e)}unregister(e){let n=e.constructor;this.byConstructor.get(n)===e&&this.byConstructor.delete(n)}find(e){for(let n of this.byConstructor.values())if(n instanceof e)return n}require(e){let n=this.find(e);if(n)return n;throw new Error(`${e.name} is not registered in ContextRegistry.`)}};var Oo=t=>{var e;(e=Be())==null||e.onMounted.push(t)};var ko=t=>{let e,n={},r=(...o)=>{if(o.length<=2&&0 in o)throw q(4);return e&&!n.isStopped?e(...o):(e=$i(t,n),e(...o))};return r[X]=1,Ue(r,!0),r.stop=()=>{var o,s;return(s=(o=n.ref)==null?void 0:o.stop)==null?void 0:s.call(o)},ae(()=>r.stop(),!0),r},$i=(t,e)=>{var s;let n=(s=e.ref)!=null?s:re(null);e.ref=n,e.isStopped=!1;let r=0,o=Fe(()=>{if(r>0){o(),e.isStopped=!0,te(n);return}n(t()),++r});return n.stop=o,n};var Lo=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw q(4);return r&&!n.isStopped?r(...s):(r=ji(t,e,n),r(...s))};return o[X]=1,Ue(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},ae(()=>o.stop(),!0),o},ji=(t,e,n)=>{var a;let r=(a=n.ref)!=null?a:re(null);n.ref=r,n.isStopped=!1;let o=0,s=c=>{if(o>0){r.stop(),n.isStopped=!0,te(r);return}let l=t.map(u=>u());r(e(...l)),++o},i=[];for(let c of t){let l=ne(c,s);i.push(l)}return s(null),r.stop=()=>{i.forEach(c=>{c()})},r};var Vo=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw q(4);return r&&!n.isStopped?r(...s):(r=_i(t,e,n),r(...s))};return o[X]=1,Ue(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},ae(()=>o.stop(),!0),o},_i=(t,e,n)=>{var s;let r=(s=n.ref)!=null?s:re(null);n.ref=r,n.isStopped=!1;let o=0;return r.stop=ne(t,i=>{if(o>0){r.stop(),n.isStopped=!0,te(r);return}r(e(i)),++o},!0),r};var Io=t=>(t[Mt]=1,t);var Po=(t,e)=>{if(!e)throw q(5);let r=qe(t)?xe:a=>a,o=()=>localStorage.setItem(e,JSON.stringify(ce(t()))),s=localStorage.getItem(e);if(s!=null)try{t(r(JSON.parse(s)))}catch(a){_(6,`persist: failed to parse data for key ${e}`,a),o()}else o();let i=Fe(o);return ae(i,!0),t};var bn=(t,...e)=>{let n="",r=t,o=e,s=r.length,i=o.length;for(let a=0;a<s;++a)n+=r[a],a<i&&(n+=o[a]);return n},Do=bn,Uo=bn;var Ho=(t,e,n)=>{let r=[],o=()=>{e(t.map(i=>i()))};for(let i of t)r.push(ne(i,o));n&&o();let s=()=>{for(let i of r)i()};return ae(s,!0),s};var Bo=t=>{if(!E(t))throw q(3,"observerCount");return t(void 0,void 0,2)};var $o=t=>{Zn();try{t()}finally{er()}},Zn=()=>{Te.stack||(Te.stack=[]),Te.stack.push(new Set)},er=()=>{let t=Te.stack;if(!t||t.length===0)return;let e=t.pop();if(t.length){let n=t[t.length-1];for(let r of e)n.add(r);return}delete Te.stack;for(let n of e)try{te(n)}catch(r){console.error(r)}};
|
package/dist/regor.es2015.esm.js
CHANGED
|
@@ -4166,6 +4166,8 @@ var flatten = (reference) => {
|
|
|
4166
4166
|
var flattenContent = (value, weakMap = /* @__PURE__ */ new WeakMap()) => {
|
|
4167
4167
|
if (!value) return value;
|
|
4168
4168
|
if (!isObject(value)) return value;
|
|
4169
|
+
if (value instanceof Node || value instanceof Date || value instanceof RegExp || value instanceof Promise || value instanceof Error)
|
|
4170
|
+
return value;
|
|
4169
4171
|
if (isArray(value)) {
|
|
4170
4172
|
return value.map(flatten);
|
|
4171
4173
|
}
|
|
@@ -4254,6 +4256,11 @@ function ref(value) {
|
|
|
4254
4256
|
return result;
|
|
4255
4257
|
}
|
|
4256
4258
|
|
|
4259
|
+
// src/reactivity/cref.ts
|
|
4260
|
+
function cref(value) {
|
|
4261
|
+
return ref(flatten(value));
|
|
4262
|
+
}
|
|
4263
|
+
|
|
4257
4264
|
// src/app/RegorConfig.ts
|
|
4258
4265
|
var _RegorConfig = class _RegorConfig {
|
|
4259
4266
|
constructor(globalContext) {
|
|
@@ -4314,6 +4321,7 @@ var _RegorConfig = class _RegorConfig {
|
|
|
4314
4321
|
obj[key] = global[key];
|
|
4315
4322
|
}
|
|
4316
4323
|
obj.ref = ref;
|
|
4324
|
+
obj.cref = cref;
|
|
4317
4325
|
obj.sref = sref;
|
|
4318
4326
|
obj.flatten = flatten;
|
|
4319
4327
|
return obj;
|
|
@@ -7010,6 +7018,7 @@ export {
|
|
|
7010
7018
|
computeRef,
|
|
7011
7019
|
computed,
|
|
7012
7020
|
createApp,
|
|
7021
|
+
cref,
|
|
7013
7022
|
defineComponent,
|
|
7014
7023
|
drainUnbind,
|
|
7015
7024
|
endBatch,
|