regor 1.2.4 → 1.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/regor.d.ts +1 -1
- package/dist/regor.es2015.cjs.js +53 -28
- package/dist/regor.es2015.cjs.prod.js +4 -4
- package/dist/regor.es2015.esm.js +53 -28
- package/dist/regor.es2015.esm.prod.js +4 -4
- package/dist/regor.es2015.iife.js +53 -28
- package/dist/regor.es2015.iife.prod.js +4 -4
- package/dist/regor.es2019.cjs.js +53 -28
- package/dist/regor.es2019.cjs.prod.js +4 -4
- package/dist/regor.es2019.esm.js +53 -28
- package/dist/regor.es2019.esm.prod.js +4 -4
- package/dist/regor.es2019.iife.js +53 -28
- package/dist/regor.es2019.iife.prod.js +4 -4
- package/dist/regor.es2022.cjs.js +53 -28
- package/dist/regor.es2022.cjs.prod.js +4 -4
- package/dist/regor.es2022.esm.js +53 -28
- package/dist/regor.es2022.esm.prod.js +4 -4
- package/dist/regor.es2022.iife.js +53 -28
- package/dist/regor.es2022.iife.prod.js +4 -4
- package/package.json +1 -1
package/dist/regor.es2022.cjs.js
CHANGED
|
@@ -736,6 +736,19 @@ var propsOnceDirective = {
|
|
|
736
736
|
}
|
|
737
737
|
};
|
|
738
738
|
|
|
739
|
+
// src/reactivity/entangle.ts
|
|
740
|
+
var entangle = (r1, r2) => {
|
|
741
|
+
if (r1 === r2) return () => {
|
|
742
|
+
};
|
|
743
|
+
const stop1 = observe(r1, (v) => r2(v));
|
|
744
|
+
const stop2 = observe(r2, (v) => r1(v));
|
|
745
|
+
r2(r1());
|
|
746
|
+
return () => {
|
|
747
|
+
stop1();
|
|
748
|
+
stop2();
|
|
749
|
+
};
|
|
750
|
+
};
|
|
751
|
+
|
|
739
752
|
// src/directives/single-prop.ts
|
|
740
753
|
var singlePropDirective = {
|
|
741
754
|
collectRefObj: true,
|
|
@@ -743,38 +756,42 @@ var singlePropDirective = {
|
|
|
743
756
|
if (!option) return () => {
|
|
744
757
|
};
|
|
745
758
|
const key = camelize(option);
|
|
759
|
+
let stopEntangle = () => {
|
|
760
|
+
};
|
|
746
761
|
const stopObserving = observe(
|
|
747
762
|
parseResult.value,
|
|
748
763
|
() => {
|
|
749
764
|
const value = parseResult.refs[0] ?? parseResult.value()[0];
|
|
750
765
|
const ctx = parseResult.context;
|
|
751
|
-
const ctxKey = ctx[
|
|
766
|
+
const ctxKey = ctx[key];
|
|
752
767
|
if (ctxKey === value) return;
|
|
768
|
+
if (isRef(value)) {
|
|
769
|
+
if (isRef(ctxKey)) {
|
|
770
|
+
stopEntangle();
|
|
771
|
+
stopEntangle = entangle(value, ctxKey);
|
|
772
|
+
return;
|
|
773
|
+
}
|
|
774
|
+
ctx[key] = value;
|
|
775
|
+
return;
|
|
776
|
+
}
|
|
777
|
+
stopEntangle();
|
|
778
|
+
stopEntangle = () => {
|
|
779
|
+
};
|
|
753
780
|
if (isRef(ctxKey)) {
|
|
754
781
|
ctxKey(value);
|
|
755
|
-
|
|
756
|
-
ctx[key] = value;
|
|
782
|
+
return;
|
|
757
783
|
}
|
|
784
|
+
ctx[key] = value;
|
|
758
785
|
},
|
|
759
786
|
true
|
|
760
787
|
);
|
|
761
|
-
return
|
|
788
|
+
return () => {
|
|
789
|
+
stopEntangle();
|
|
790
|
+
stopObserving();
|
|
791
|
+
};
|
|
762
792
|
}
|
|
763
793
|
};
|
|
764
794
|
|
|
765
|
-
// src/reactivity/entangle.ts
|
|
766
|
-
var entangle = (r1, r2) => {
|
|
767
|
-
if (r1 === r2) return () => {
|
|
768
|
-
};
|
|
769
|
-
const stop1 = observe(r1, (v) => r2(v));
|
|
770
|
-
const stop2 = observe(r2, (v) => r1(v));
|
|
771
|
-
r2(r1());
|
|
772
|
-
return () => {
|
|
773
|
-
stop1();
|
|
774
|
-
stop2();
|
|
775
|
-
};
|
|
776
|
-
};
|
|
777
|
-
|
|
778
795
|
// src/bind/ComponentBinder.ts
|
|
779
796
|
var ComponentBinder = class {
|
|
780
797
|
__binder;
|
|
@@ -2334,21 +2351,21 @@ var attachDOMChangeListener = (el, parseResult, directiveFlags) => {
|
|
|
2334
2351
|
number: f1.number || f2.number,
|
|
2335
2352
|
trim: f1.trim || f2.trim
|
|
2336
2353
|
};
|
|
2337
|
-
|
|
2338
|
-
if (!modelRef) {
|
|
2354
|
+
if (!parseResult.refs[0]) {
|
|
2339
2355
|
warning(8 /* ModelRequiresRef */, el);
|
|
2340
2356
|
return () => {
|
|
2341
2357
|
};
|
|
2342
2358
|
}
|
|
2359
|
+
const getModelRef = () => parseResult.refs[0];
|
|
2343
2360
|
const isAnInput = isInput(el);
|
|
2344
2361
|
if (isAnInput && isCheckBox(el)) {
|
|
2345
|
-
return handleCheckBox(el,
|
|
2362
|
+
return handleCheckBox(el, getModelRef);
|
|
2346
2363
|
} else if (isAnInput && isRadio(el)) {
|
|
2347
|
-
return handleRadio(el,
|
|
2364
|
+
return handleRadio(el, getModelRef);
|
|
2348
2365
|
} else if (isAnInput || isTextArea(el)) {
|
|
2349
|
-
return handleInputAndTextArea(el, flags,
|
|
2366
|
+
return handleInputAndTextArea(el, flags, getModelRef, parsedValue);
|
|
2350
2367
|
} else if (isSelect(el)) {
|
|
2351
|
-
return handleSelect(el,
|
|
2368
|
+
return handleSelect(el, getModelRef, parsedValue);
|
|
2352
2369
|
} else {
|
|
2353
2370
|
warning(7 /* ModelNotSupportOnElement */, el);
|
|
2354
2371
|
return () => {
|
|
@@ -2356,7 +2373,7 @@ var attachDOMChangeListener = (el, parseResult, directiveFlags) => {
|
|
|
2356
2373
|
}
|
|
2357
2374
|
};
|
|
2358
2375
|
var decimalSeparators = /[.,' ·٫]/;
|
|
2359
|
-
var handleInputAndTextArea = (el, flags,
|
|
2376
|
+
var handleInputAndTextArea = (el, flags, getModelRef, parsedValue) => {
|
|
2360
2377
|
const isLazy = flags.lazy;
|
|
2361
2378
|
const eventType = isLazy ? "change" : "input";
|
|
2362
2379
|
const isNumber = isNumberInput(el);
|
|
@@ -2383,6 +2400,8 @@ var handleInputAndTextArea = (el, flags, modelRef, parsedValue) => {
|
|
|
2383
2400
|
el.removeEventListener("change", onCompositionEnd);
|
|
2384
2401
|
};
|
|
2385
2402
|
const listener = (event) => {
|
|
2403
|
+
const modelRef = getModelRef();
|
|
2404
|
+
if (!modelRef) return;
|
|
2386
2405
|
const target = event.target;
|
|
2387
2406
|
if (!target || target.composing) return;
|
|
2388
2407
|
let value = target.value;
|
|
@@ -2414,12 +2433,14 @@ var handleInputAndTextArea = (el, flags, modelRef, parsedValue) => {
|
|
|
2414
2433
|
el.addEventListener("change", onCompositionEnd);
|
|
2415
2434
|
return unbinder;
|
|
2416
2435
|
};
|
|
2417
|
-
var handleCheckBox = (el,
|
|
2436
|
+
var handleCheckBox = (el, getModelRef) => {
|
|
2418
2437
|
const eventType = "change";
|
|
2419
2438
|
const unbinder = () => {
|
|
2420
2439
|
el.removeEventListener(eventType, listener);
|
|
2421
2440
|
};
|
|
2422
2441
|
const listener = () => {
|
|
2442
|
+
const modelRef = getModelRef();
|
|
2443
|
+
if (!modelRef) return;
|
|
2423
2444
|
const elementValue = getValue(el);
|
|
2424
2445
|
const checked = el.checked;
|
|
2425
2446
|
const modelValue = modelRef();
|
|
@@ -2470,24 +2491,28 @@ var getCheckboxChecked = (el, value) => {
|
|
|
2470
2491
|
return looseEqual(value, el.getAttribute(attrKey));
|
|
2471
2492
|
return looseEqual(value, true);
|
|
2472
2493
|
};
|
|
2473
|
-
var handleRadio = (el,
|
|
2494
|
+
var handleRadio = (el, getModelRef) => {
|
|
2474
2495
|
const eventType = "change";
|
|
2475
2496
|
const unbinder = () => {
|
|
2476
2497
|
el.removeEventListener(eventType, listener);
|
|
2477
2498
|
};
|
|
2478
2499
|
const listener = () => {
|
|
2500
|
+
const modelRef = getModelRef();
|
|
2501
|
+
if (!modelRef) return;
|
|
2479
2502
|
const elementValue = getValue(el);
|
|
2480
2503
|
modelRef(elementValue);
|
|
2481
2504
|
};
|
|
2482
2505
|
el.addEventListener(eventType, listener);
|
|
2483
2506
|
return unbinder;
|
|
2484
2507
|
};
|
|
2485
|
-
var handleSelect = (el,
|
|
2508
|
+
var handleSelect = (el, getModelRef, parsedValue) => {
|
|
2486
2509
|
const eventType = "change";
|
|
2487
2510
|
const unbinder = () => {
|
|
2488
2511
|
el.removeEventListener(eventType, listener);
|
|
2489
2512
|
};
|
|
2490
2513
|
const listener = () => {
|
|
2514
|
+
const modelRef = getModelRef();
|
|
2515
|
+
if (!modelRef) return;
|
|
2491
2516
|
const flags = getFlags(parsedValue()[1]);
|
|
2492
2517
|
const number = flags.number;
|
|
2493
2518
|
const selectedValue = Array.prototype.filter.call(el.options, (o) => o.selected).map(
|
|
@@ -4738,8 +4763,8 @@ var Parser = class {
|
|
|
4738
4763
|
stopObserverList.push(stopObserving);
|
|
4739
4764
|
}
|
|
4740
4765
|
}
|
|
4741
|
-
value(evaluated.map((x) => x.value));
|
|
4742
4766
|
result.refs = evaluated.map((x) => x.ref);
|
|
4767
|
+
value(evaluated.map((x) => x.value));
|
|
4743
4768
|
};
|
|
4744
4769
|
refresh();
|
|
4745
4770
|
} catch (e) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Ft=Object.defineProperty;var Zr=Object.getOwnPropertyDescriptor;var eo=Object.getOwnPropertyNames;var to=Object.prototype.hasOwnProperty;var no=(t,e)=>{for(var n in e)Ft(t,n,{get:e[n],enumerable:!0})},ro=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of eo(e))!to.call(t,o)&&o!==n&&Ft(t,o,{get:()=>e[o],enumerable:!(r=Zr(e,o))||r.enumerable});return t};var oo=t=>ro(Ft({},"__esModule",{value:!0}),t);var Cs={};no(Cs,{ComponentHead:()=>Le,RegorConfig:()=>Y,addUnbinder:()=>D,batch:()=>Yr,collectRefs:()=>Et,computeMany:()=>zr,computeRef:()=>Kr,computed:()=>qr,createApp:()=>jr,createComponent:()=>$r,endBatch:()=>vn,entangle:()=>ht,flatten:()=>J,getBindData:()=>ye,html:()=>xn,isDeepRef:()=>we,isRaw:()=>_e,isRef:()=>h,markRaw:()=>Wr,observe:()=>S,observeMany:()=>Qr,observerCount:()=>Xr,onMounted:()=>Fr,onUnmounted:()=>K,pause:()=>At,persist:()=>Gr,raw:()=>Jr,ref:()=>Ee,removeNode:()=>V,resume:()=>Nt,silence:()=>Tt,sref:()=>q,startBatch:()=>Cn,toFragment:()=>Ae,toJsonTemplate:()=>qe,trigger:()=>F,unbind:()=>re,unref:()=>B,useScope:()=>dt,warningHandler:()=>Je,watchEffect:()=>Se});module.exports=oo(Cs);var ke=Symbol(":regor");var re=t=>{let e=[t];for(;e.length>0;){let n=e.shift();so(n);let r=n.childNodes;if(r)for(let o of r)e.push(o)}},so=t=>{let e=t[ke];if(e){for(let n of e.unbinders)n();e.unbinders.splice(0),delete t[ke]}};var V=t=>{t.remove(),setTimeout(()=>re(t),1)};var U=t=>typeof t=="function",H=t=>typeof t=="string",wn=t=>typeof t>"u",ee=t=>t==null||typeof t>"u",$=t=>typeof t!="string"||!t?.trim(),io=Object.prototype.toString,qt=t=>io.call(t),de=t=>qt(t)==="[object Map]",X=t=>qt(t)==="[object Set]",zt=t=>qt(t)==="[object Date]",Ge=t=>typeof t=="symbol",T=Array.isArray,O=t=>t!==null&&typeof t=="object";var On={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."},I=(t,...e)=>{let n=On[t];return new Error(U(n)?n.call(On,...e):n)};var ot=[],An=()=>{let t={onMounted:[],onUnmounted:[]};return ot.push(t),t},Ce=t=>{let e=ot[ot.length-1];if(!e&&!t)throw I(2);return e},Nn=t=>{let e=Ce();return t&&Wt(t),ot.pop(),e},Kt=Symbol("csp"),Wt=t=>{let e=t,n=e[Kt];if(n){let r=Ce();if(n===r)return;r.onMounted.length>0&&n.onMounted.push(...r.onMounted),r.onUnmounted.length>0&&n.onUnmounted.push(...r.onUnmounted);return}e[Kt]=Ce()},st=t=>t[Kt];var he=t=>{st(t)?.onUnmounted?.forEach(n=>{n()}),t.unmounted?.()};var Le=class{props;start;end;ctx;autoProps=!0;entangle=!0;enableSwitch=!1;onAutoPropsAssigned;pe;constructor(e,n,r,o,s){this.props=e,this.pe=n,this.ctx=r,this.start=o,this.end=s}emit=(e,n)=>{this.pe.dispatchEvent(new CustomEvent(e,{detail:n}))};unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)V(e),e=e.nextSibling;for(let r of this.ctx)he(r)}};var ye=t=>{let e=t[ke];if(e)return e;let n={unbinders:[],data:{}};return t[ke]=n,n};var D=(t,e)=>{ye(t).unbinders.push(e)};var Mn={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]})},L=(t,...e)=>{let n=Mn[t],r=U(n)?n.call(Mn,...e):n,o=Je.warning;o&&(H(r)?o(r):o(r,...r.args))},Je={warning:console.warn};var K=(t,e)=>{Ce(e)?.onUnmounted.push(t)};var it=Symbol("ref"),W=Symbol("sref"),at=Symbol("raw");var h=t=>t?.[W]===1;var S=(t,e,n)=>{if(!h(t))throw I(3,"observe");n&&e(t());let o=t(void 0,void 0,0,e);return K(o,!0),o};var pt={},ct={},kn=1,Ln=t=>{let e=(kn++).toString();return pt[e]=t,ct[e]=0,e},Gt=t=>{ct[t]+=1},Jt=t=>{--ct[t]===0&&(delete pt[t],delete ct[t])},In=t=>pt[t],Qt=()=>kn!==1&&Object.keys(pt).length>0,Qe="r-switch",ao=t=>{let e=t.filter(r=>ve(r)).map(r=>[...r.querySelectorAll("[r-switch]")].map(o=>o.getAttribute(Qe))),n=new Set;return e.forEach(r=>{r.forEach(o=>o&&n.add(o))}),[...n]},Ie=(t,e)=>{if(!Qt())return;let n=ao(e);n.length!==0&&(n.forEach(Gt),D(t,()=>{n.forEach(Jt)}))};var Xt=(t,e,n,r)=>{let o=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,r),o.push(i)}be(e,o)},Yt=Symbol("r-if"),Dn=Symbol("r-else"),Un=t=>t[Dn]===1,ft=class{p;B;K;z;W;b;x;constructor(e){this.p=e,this.B=e.o.l.if,this.K=Ue(e.o.l.if),this.z=e.o.l.else,this.W=e.o.l.elseif,this.b=e.o.l.for,this.x=e.o.l.pre}qe(e,n){let r=e.parentElement;for(;r!==null&&r!==document.documentElement;){if(r.hasAttribute(n))return!0;r=r.parentElement}return!1}N(e){let n=e.hasAttribute(this.B),r=ge(e,this.K);for(let o of r)this.T(o);return n}G(e){return e[Yt]?!0:(e[Yt]=!0,ge(e,this.K).forEach(n=>n[Yt]=!0),!1)}T(e){if(e.hasAttribute(this.x)||this.G(e)||this.qe(e,this.b))return;let n=e.getAttribute(this.B);if(!n){L(0,this.B,e);return}e.removeAttribute(this.B),this.L(e,n)}P(e,n,r){let o=De(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${r??""}`);s.insertBefore(i,e),Ie(i,o),o.forEach(c=>{V(c)}),e.remove(),n!=="if"&&(e[Dn]=1);let a=document.createComment(`__end__ :${n}${r??""}`);return s.insertBefore(a,i.nextSibling),{nodes:o,parent:s,commentBegin:i,commentEnd:a}}ce(e,n){if(!e)return[];let r=e.nextElementSibling;if(e.hasAttribute(this.z)){e.removeAttribute(this.z);let{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"else");return[{mount:()=>{Xt(o,this.p,s,a)},unmount:()=>{ce(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let o=e.getAttribute(this.W);if(!o)return[];e.removeAttribute(this.W);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.P(e,"elseif",` => ${o} `),f=this.p.h.C(o),p=f.value,l=this.ce(r,n),y=[];D(a,()=>{f.stop();for(let b of y)b();y.length=0});let u=S(p,n);return y.push(u),[{mount:()=>{Xt(s,this.p,i,c)},unmount:()=>{ce(a,c)},isTrue:()=>!!p()[0],isMounted:!1}].concat(l)}}L(e,n){let r=e.nextElementSibling,{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"if",` => ${n} `),c=this.p.h.C(n),f=c.value,p=!1,l=this.p.h,y=l.V(),m=()=>{l.v(y,()=>{if(f()[0])p||(Xt(o,this.p,s,a),p=!0),u.forEach(M=>{M.unmount(),M.isMounted=!1});else{ce(i,a),p=!1;let M=!1;for(let A of u)!M&&A.isTrue()?(A.isMounted||(A.mount(),A.isMounted=!0),M=!0):(A.unmount(),A.isMounted=!1)}})},u=this.ce(r,m),b=[];D(i,()=>{c.stop();for(let M of b)M();b.length=0}),m();let g=S(f,m);b.push(g)}};var De=t=>{let e=se(t)?t.content.childNodes:[t];return Array.from(e).filter(n=>{let r=n?.tagName;return r!=="SCRIPT"&&r!=="STYLE"})},be=(t,e)=>{for(let n of e)Un(n)||t.H(n)},ge=(t,e)=>{let n=t.querySelectorAll(e);return t.matches?.(e)?[t,...n]:n},se=t=>t instanceof HTMLTemplateElement,ve=t=>t.nodeType===Node.ELEMENT_NODE,Xe=t=>t.nodeType===Node.ELEMENT_NODE,Hn=t=>t instanceof HTMLSlotElement,pe=t=>se(t)?t.content.childNodes:t.childNodes,ce=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let r=n.nextSibling;V(n),n=r}},Te=(t,e)=>{Object.defineProperty(t,"value",{get(){return t()},set(n){if(e)throw new Error("value is readonly.");return t(n)},enumerable:!0,configurable:!1})},_n=(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},Ue=t=>`[${CSS.escape(t)}]`,lt=(t,e)=>(t.startsWith("@")&&(t=e.l.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.l.dynamic)),t),Zt=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},co=/-(\w)/g,_=Zt(t=>t&&t.replace(co,(e,n)=>n?n.toUpperCase():"")),po=/\B([A-Z])/g,He=Zt(t=>t&&t.replace(po,"-$1").toLowerCase()),Ye=Zt(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var ut={};var mt=t=>{st(t)?.onMounted?.forEach(n=>{n()}),t.mounted?.()};var en=Symbol("scope"),dt=t=>{try{An();let e=t();Wt(e);let n={context:e,unmount:()=>he(e),[en]:1};return n[en]=1,n}finally{Nn()}},Bn=t=>O(t)?en in t:!1;var Vn={collectRefObj:!0,onBind:(t,e)=>S(e.value,()=>{let r=e.value(),o=e.context,s=r[0];if(O(s))for(let i of Object.entries(s)){let a=i[0],c=i[1],f=o[a];f!==c&&(h(f)?f(c):o[a]=c)}},!0)};var Pn={collectRefObj:!0,once:!0,onBind:(t,e)=>{let n=e.value(),r=e.context,o=n[0];if(!O(o))return()=>{};for(let s of Object.entries(o)){let i=s[0],a=s[1],c=r[i];c!==a&&(h(c)?c(a):r[i]=a)}return()=>{}}};var jn={collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(!r)return()=>{};let i=_(r);return S(e.value,()=>{let c=e.refs[0]??e.value()[0],f=e.context,p=f[r];p!==c&&(h(p)?p(c):f[i]=c)},!0)}};var ht=(t,e)=>{if(t===e)return()=>{};let n=S(t,o=>e(o)),r=S(e,o=>t(o));return e(t()),()=>{n(),r()}};var yt=class{p;le;constructor(e){this.p=e,this.le=e.o.l.inherit}N(e){this.Ke(e)}Ke(e){let n=this.p,r=n.h,o=n.o.fe,s=n.o.ue,i=r.me(),a=r.ze(),c=[...o.keys(),...a,...[...o.keys()].map(He),...a.map(He)].join(",");if($(c))return;let f=e.querySelectorAll(c),p=e.matches?.(c)?[e,...f]:f;for(let l of p){if(l.hasAttribute(n.x))continue;let y=l.parentNode;if(!y)continue;let m=l.nextSibling,u=_(l.tagName).toUpperCase(),C=i[u]??s.get(u);if(!C)continue;let g=C.template;if(!g)continue;let M=l.parentElement;if(!M)continue;let A=new Comment(" begin component: "+l.tagName),Ne=new Comment(" end component: "+l.tagName);M.insertBefore(A,l),l.remove();let ze=n.o.l.props,Ke=n.o.l.propsOnce,Pt=n.o.l.bind,tt=(d,N)=>{let E={},j=d.hasAttribute(ze),z=d.hasAttribute(Ke);return r.v(N,()=>{r.S(E),j&&n.T(Vn,d,ze),z&&n.T(Pn,d,Ke);let x=C.props;if(!x||x.length===0)return;x=x.map(_);let G=new Map(x.map(Q=>[Q.toLowerCase(),Q]));for(let Q of x.concat(x.map(He))){let ae=d.getAttribute(Q);ae!==null&&(E[_(Q)]=ae,d.removeAttribute(Q))}let jt=n.J.de(d,!1);for(let[Q,ae]of jt.entries()){let[$t,Rn]=ae.Q;if(!Rn)continue;let Sn=G.get(_(Rn).toLowerCase());Sn&&($t!=="."&&$t!==":"&&$t!==Pt||n.T(jn,d,Q,!0,Sn,ae.X))}}),E},ue=[...r.V()],nt=()=>{let d=tt(l,ue),N=new Le(d,l,ue,A,Ne),E=dt(()=>C.context(N)??{}).context;if(N.autoProps){for(let[j,z]of Object.entries(d))if(j in E){let x=E[j];if(x===z)continue;N.entangle&&h(x)&&h(z)&&D(A,ht(z,x))}else E[j]=z;N.onAutoPropsAssigned?.()}return{componentCtx:E,head:N}},{componentCtx:me,head:rt}=nt(),w=[...pe(g)],v=w.length,k=l.childNodes.length===0,P=d=>{let N=d.parentElement;if(k){for(let x of[...d.childNodes])N.insertBefore(x,d);return}let E=d.name;$(E)&&(E=d.getAttributeNames().filter(x=>x.startsWith("#"))[0],$(E)?E="default":E=E.substring(1));let j=l.querySelector(`template[name='${E}'], template[\\#${E}]`);!j&&E==="default"&&(j=l.querySelector("template:not([name])"),j&&j.getAttributeNames().filter(x=>x.startsWith("#")).length>0&&(j=null));let z=x=>{rt.enableSwitch&&r.v(ue,()=>{r.S(me);let G=tt(d,r.V());r.v(ue,()=>{r.S(G);let jt=r.V(),Q=Ln(jt);for(let ae of x)ve(ae)&&(ae.setAttribute(Qe,Q),Gt(Q),D(ae,()=>{Jt(Q)}))})})};if(j){let x=[...pe(j)];for(let G of x)N.insertBefore(G,d);z(x)}else{if(E!=="default"){for(let G of[...pe(d)])N.insertBefore(G,d);return}let x=[...pe(l)].filter(G=>!se(G));for(let G of x)N.insertBefore(G,d);z(x)}},R=d=>{if(!ve(d))return;let N=d.querySelectorAll("slot");if(Hn(d)){P(d),d.remove();return}for(let E of N)P(E),E.remove()};(()=>{for(let d=0;d<v;++d)w[d]=w[d].cloneNode(!0),y.insertBefore(w[d],m),R(w[d])})(),M.insertBefore(Ne,m);let ne=()=>{if(!C.inheritAttrs)return;let d=w.filter(E=>E.nodeType===Node.ELEMENT_NODE);d.length>1&&(d=d.filter(E=>E.hasAttribute(this.le)));let N=d[0];if(N)for(let E of l.getAttributeNames()){if(E===ze||E===Ke)continue;let j=l.getAttribute(E);if(E==="class")N.classList.add(...j.split(" "));else if(E==="style"){let z=N.style,x=l.style;for(let G of x)z.setProperty(G,x.getPropertyValue(G))}else N.setAttribute(lt(E,n.o),j)}},Me=()=>{for(let d of l.getAttributeNames())!d.startsWith("@")&&!d.startsWith(n.o.l.on)&&l.removeAttribute(d)},We=()=>{ne(),Me(),r.S(me),n.ye(l,!1),me.$emit=rt.emit,be(n,w),D(l,()=>{he(me)}),D(A,()=>{re(l)}),mt(me)};r.v(ue,We)}}};var tn=class{he;Q=[];X=[];ge=[];constructor(e){this.he=e,this.C()}C(){let e=this.he,n=e.startsWith(".");n&&(e=":"+e.slice(1));let r=e.indexOf("."),o=this.Q=(r<0?e:e.substring(0,r)).split(/[:@]/);if($(o[0])&&(o[0]=n?".":e[0]),r>=0){let s=this.X=e.slice(r+1).split(".");if(s.includes("camel")){let i=o.length-1;o[i]=_(o[i])}s.includes("prop")&&(o[0]=".")}}},gt=class{p;be;constructor(e){this.p=e,this.be=e.o.We()}de(e,n){let r=new Map;if(!Xe(e))return r;let o=this.be,s=a=>{let c=a.getAttributeNames().filter(f=>o.some(p=>f.startsWith(p)));for(let f of c)r.has(f)||r.set(f,new tn(f)),r.get(f).ge.push(a)};if(s(e),!n)return r;let i=e.querySelectorAll("*");for(let a of i)s(a);return r}};var fo=(t,e)=>{for(let n of t){let r=n.cloneNode(!0);e.appendChild(r)}},bt=class{p;I;xe;constructor(e){this.p=e,this.I=e.o.l.is,this.xe=Ue(this.I)+", [is]"}N(e){let n=e.hasAttribute(this.I),r=ge(e,this.xe);for(let o of r)this.T(o);return n}T(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.p.H(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.L(e,n)}P(e,n){let r=De(e),o=e.parentNode,s=document.createComment(`__begin__ dynamic ${n??""}`);o.insertBefore(s,e),Ie(s,r),r.forEach(a=>{V(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n??""}`);return o.insertBefore(i,s.nextSibling),{nodes:r,parent:o,commentBegin:s,commentEnd:i}}L(e,n){let{nodes:r,parent:o,commentBegin:s,commentEnd:i}=this.P(e,` => ${n} `),a=this.p.h.C(n),c=a.value,f=this.p.h,p=f.V(),l={name:""},y=se(e)?r:[...r[0].childNodes],m=()=>{f.v(p,()=>{let g=c()[0];if(O(g)&&(g.name?g=g.name:g=Object.entries(f.me()).filter(A=>A[1]===g)[0]?.[0]),!H(g)||$(g)){ce(s,i);return}if(l.name===g)return;ce(s,i);let M=document.createElement(g);for(let A of e.getAttributeNames())A!==this.I&&M.setAttribute(A,e.getAttribute(A));fo(y,M),o.insertBefore(M,i),this.p.H(M),l.name=g})},u=[];D(s,()=>{a.stop();for(let g of u)g();u.length=0}),m();let C=S(c,m);u.push(C)}};var te=[],$n=t=>{te.length!==0&&te[te.length-1]?.add(t)},Se=t=>{if(!t)return()=>{};let e={stop:()=>{}};return lo(t,e),K(()=>e.stop(),!0),e.stop},lo=(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(te.push(s),t(i=>n.push(i)),r)return;for(let i of[...s]){let a=S(i,()=>{o(),Se(t)});n.push(a)}}finally{te.pop()}},Tt=t=>{let e=te.length,n=e>0&&te[e-1];try{return n&&te.push(null),t()}finally{n&&te.pop()}},Et=t=>{try{let e=new Set;return te.push(e),{value:t(),refs:[...e]}}finally{te.pop()}};var _e=t=>!!t&&t[at]===1;var F=(t,e,n)=>{if(!h(t))return;let r=t;if(r(void 0,e,1),!n)return;let o=r();if(o){if(T(o)||X(o))for(let s of o)F(s,e,!0);else if(de(o))for(let s of o)F(s[0],e,!0),F(s[1],e,!0);if(O(o))for(let s in o)F(o[s],e,!0)}};function uo(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Be=(t,e,n)=>{n.forEach(function(r){let o=t[r];uo(e,r,function(...i){let a=o.apply(this,i),c=this[W];for(let f of c)F(f);return a})})},xt=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var Fn=Array.prototype,nn=Object.create(Fn),mo=["push","pop","shift","unshift","splice","sort","reverse"];Be(Fn,nn,mo);var qn=Map.prototype,Ct=Object.create(qn),ho=["set","clear","delete"];xt(Ct,"Map");Be(qn,Ct,ho);var zn=Set.prototype,vt=Object.create(zn),yo=["add","clear","delete"];xt(vt,"Set");Be(zn,vt,yo);var ie={},q=t=>{if(h(t)||_e(t))return t;let e={auto:!0,_value:t},n=c=>O(c)?W in c?!0:T(c)?(Object.setPrototypeOf(c,nn),!0):X(c)?(Object.setPrototypeOf(c,vt),!0):de(c)?(Object.setPrototypeOf(c,Ct),!0):!1:!1,r=n(t),o=new Set,s=(c,f)=>{if(ie.stack&&ie.stack.length){ie.stack[ie.stack.length-1].add(a);return}o.size!==0&&Tt(()=>{for(let p of[...o.keys()])o.has(p)&&p(c,f)})},i=c=>{let f=c[W];f||(c[W]=f=new Set),f.add(a)},a=(...c)=>{if(!(2 in c)){let p=c[0],l=c[1];return 0 in c?e._value===p||h(p)&&(p=p(),e._value===p)?p:(n(p)&&i(p),e._value=p,e.auto&&s(p,l),e._value):($n(a),e._value)}switch(c[2]){case 0:{let p=c[3];if(!p)return()=>{};let l=y=>{o.delete(y)};return o.add(p),()=>{l(p)}}case 1:{let p=c[1],l=e._value;s(l,p);break}case 2:return o.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[W]=1,Te(a,!1),r&&i(t),a};var B=t=>h(t)?t():t;var Ze=class{E=[];_=new Map;get w(){return this.E.length}Y;constructor(e){this.Y=e}Z(e){let n=this.Y(e.value);n!==void 0&&this._.set(n,e)}ee(e){let n=this.Y(this.E[e]?.value);n!==void 0&&this._.delete(n)}static Ge(e,n){return{items:[],index:e,value:n,order:-1}}S(e){e.order=this.w,this.E.push(e),this.Z(e)}Je(e,n){let r=this.w;for(let o=e;o<r;++o)this.E[o].order=o+1;n.order=e,this.E.splice(e,0,n),this.Z(n)}D(e){return this.E[e]}te(e,n){this.ee(e),this.E[e]=n,this.Z(n),n.order=e}Te(e){this.ee(e),this.E.splice(e,1);let n=this.w;for(let r=e;r<n;++r)this.E[r].order=r}Ee(e){let n=this.w;for(let r=e;r<n;++r)this.ee(r);this.E.splice(e)}Ct(e){return this._.has(e)}Qe(e){return this._.get(e)?.order??-1}};var rn=Symbol("r-for"),Rt=class t{p;b;ne;x;constructor(e){this.p=e,this.b=e.o.l.for,this.ne=Ue(this.b),this.x=e.o.l.pre}N(e){let n=e.hasAttribute(this.b),r=ge(e,this.ne);for(let o of r)this.Xe(o);return n}G(e){return e[rn]?!0:(e[rn]=!0,ge(e,this.ne).forEach(n=>n[rn]=!0),!1)}Xe(e){if(e.hasAttribute(this.x)||this.G(e))return;let n=e.getAttribute(this.b);if(!n){L(0,this.b,e);return}e.removeAttribute(this.b),this.Ye(e,n)}Re(e){return ee(e)?[]:(U(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))}Ye(e,n){let r=this.Ze(n);if(!r?.list){L(1,this.b,n,e);return}let o=this.p.o.l.key,s=this.p.o.l.keyBind,i=e.getAttribute(o)??e.getAttribute(s);e.removeAttribute(o),e.removeAttribute(s);let a=i?v=>B(B(v)?.[i]):v=>v,c=(v,k)=>a(v)===a(k),f=De(e),p=e.parentNode;if(!p)return;let l=`${this.b} => ${n}`,y=new Comment(`__begin__ ${l}`);p.insertBefore(y,e),Ie(y,f),f.forEach(v=>{V(v)}),e.remove();let m=new Comment(`__end__ ${l}`);p.insertBefore(m,y.nextSibling);let u=this.p,b=u.h,C=b.V(),g=(v,k,P)=>{let R=r.createContext(k,v),Z=Ze.Ge(R.index,k);return b.v(C,()=>{b.S(R.ctx);let ne=P.previousSibling,Me=[];for(let We of f){let d=We.cloneNode(!0);p.insertBefore(d,P),Me.push(d)}for(be(u,Me),ne=ne.nextSibling;ne!==P;)Z.items.push(ne),ne=ne.nextSibling}),Z},M=(v,k)=>{let P=w.D(v).items,R=P[P.length-1].nextSibling;for(let Z of P)V(Z);w.te(v,g(v,k,R))},A=(v,k)=>{w.S(g(v,k,m))},Ne=v=>{for(let k of w.D(v).items)V(k)},ze=v=>{let k=w.w;for(let P=v;P<k;++P)w.D(P).index(P)},Ke=v=>{let k=w.w;U(v)&&(v=v());let P=B(v[0]);if(T(P)&&P.length===0){ce(y,m),w.Ee(0);return}let R=0,Z=Number.MAX_SAFE_INTEGER,ne=k,Me=this.p.o.forGrowThreshold,We=()=>w.w<ne+Me;for(let N of this.Re(v[0])){let E=()=>{if(R<k){let j=w.D(R++);if(c(j.value,N))return;let z=w.Qe(a(N));if(z>=R&&z-R<10){if(--R,Z=Math.min(Z,R),Ne(R),w.Te(R),--k,z>R+1)for(let x=R;x<z-1&&x<k&&!c(w.D(R).value,N);)++x,Ne(R),w.Te(R),--k;E();return}We()?(w.Je(R-1,g(R,N,w.D(R-1).items[0])),Z=Math.min(Z,R-1),++k):M(R-1,N)}else A(R++,N)};E()}let d=R;for(k=w.w;R<k;)Ne(R++);w.Ee(d),ze(Z)},Pt=()=>{me=S(nt,Ke)},tt=()=>{ue.stop(),me()},ue=b.C(r.list),nt=ue.value,me,rt=0,w=new Ze(a);for(let v of this.Re(nt()[0]))w.S(g(rt++,v,m));D(y,tt),Pt()}static et=/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/;Ze(e){let n=t.et.exec(e);if(!n)return;let r=(n[1]+(n[2]??"")).split(",").map(c=>c.trim()),o=r.length>1?r.length-1:-1,s=o!==-1&&(r[o]==="index"||r[o]?.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:(c,f)=>{let p={},l=B(c);if(!a&&r.length===1)p[r[0]]=c;else if(T(l)){let m=0;for(let u of r)p[u]=l[m++]}else for(let m of r)p[m]=l[m];let y={ctx:p,index:q(-1)};return s&&(y.index=p[s.startsWith("#")?s.substring(1):s]=q(f)),y}}}};var St=class{h;Ce;ve;Se;we;J;o;x;Oe;constructor(e){this.h=e,this.o=e.o,this.ve=new Rt(this),this.Ce=new ft(this),this.Se=new bt(this),this.we=new yt(this),this.J=new gt(this),this.x=this.o.l.pre,this.Oe=this.o.l.dynamic}tt(e){let n=se(e)?[e]:e.querySelectorAll("template");for(let r of n){if(r.hasAttribute(this.x))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);be(this,i)}}H(e){e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.x)||this.Ce.N(e)||this.ve.N(e)||this.Se.N(e)||(this.we.N(e),this.tt(e),this.ye(e,!0))}ye(e,n){let r=this.J.de(e,n),o=this.o.j;for(let[s,i]of r.entries()){let[a,c]=i.Q,f=o[s]??o[a];if(!f){console.error("directive not found:",a);continue}i.ge.forEach(p=>{this.T(f,p,s,!1,c,i.X)})}}T(e,n,r,o,s,i){if(n.hasAttribute(this.x))return;let a=n.getAttribute(r);n.removeAttribute(r);let c=f=>{let p=f.getAttribute(Qe);return p||(f.parentElement?c(f.parentElement):null)};if(Qt()){let f=c(n);if(f){this.h.v(In(f),()=>{this.L(e,n,a,s,i)});return}}this.L(e,n,a,s,i)}nt(e,n,r){if(e!==ut)return!1;if($(r))return!0;let o=document.querySelector(r);if(o){let s=n.parentElement;if(!s)return!0;let i=new Comment(`teleported => '${r}'`);s.insertBefore(i,n),n.teleportedFrom=i,i.teleportedTo=n,D(i,()=>{V(n)}),o.appendChild(n)}return!0}L(e,n,r,o,s){if(n.nodeType!==Node.ELEMENT_NODE||r==null||this.nt(e,n,r))return;let i=this.h.C(r,e.isLazy,e.isLazyKey,e.collectRefObj,e.once),a=[];D(n,()=>{i.stop(),p?.stop();for(let C of a)C();a.length=0});let f=_n(o,this.Oe),p;f&&(p=this.h.C(_(f),void 0,void 0,void 0,e.once));let l,y=()=>(l=i.value(),l),m,u=()=>p?(m=p.value()[0],m):(m=o,o),b=()=>{if(!e.onChange)return;let C=S(i.value,g=>{let M=l,A=m;e.onChange?.(n,y(),M,u(),A,s)});if(a.push(C),p){let g=S(p.value,M=>{let A=m;e.onChange?.(n,y(),A,u(),A,s)});a.push(g)}};e.once||b(),e.onBind&&a.push(e.onBind(n,i,r,o,p,s)),e.onChange?.(n,y(),void 0,u(),void 0,s)}};var Kn="http://www.w3.org/1999/xlink",go={itemscope:2,allowfullscreen:2,formnovalidate:2,ismap:2,nomodule:2,novalidate:2,readonly:2,async:1,autofocus:1,autoplay:1,controls:1,default:1,defer:1,disabled:1,hidden:1,inert:1,loop:1,open:1,required:1,reversed:1,scoped:1,seamless:1,checked:1,muted:1,multiple:1,selected:1};function bo(t){return!!t||t===""}var on={onChange:(t,e,n,r,o,s)=>{if(r){s&&s.includes("camel")&&(r=_(r)),wt(t,r,e[0],o);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(T(c)){let f=n?.[a]?.[0],p=c[0],l=c[1];wt(t,p,l,f)}else if(O(c))for(let f of Object.entries(c)){let p=f[0],l=f[1],y=n?.[a],m=y&&p in y?p:void 0;wt(t,p,l,m)}else{let f=n?.[a],p=e[a++],l=e[a];wt(t,p,l,f)}}}},wt=(t,e,n,r)=>{if(r&&r!==e&&t.removeAttribute(r),ee(e)){L(3,name,t);return}if(!H(e)){L(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){ee(n)?t.removeAttributeNS(Kn,e.slice(6,e.length)):t.setAttributeNS(Kn,e,n);return}let o=e in go;ee(n)||o&&!bo(n)?t.removeAttribute(e):t.setAttribute(e,o?"":n)};var sn={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n?.[o];if(T(s)){let a=s.length;for(let c=0;c<a;++c)Wn(t,s[c],i?.[c])}else Wn(t,s,i)}}},Wn=(t,e,n)=>{let r=t.classList,o=H(e),s=H(n);if(e&&!o){if(n&&!s)for(let i in n)(!(i in e)||!e[i])&&r.remove(i);for(let i in e)e[i]&&r.add(i)}else o?n!==e&&(s&&r.remove(...n.trim().split(/\s+/)),r.add(...e.trim().split(/\s+/))):n&&s&&r.remove(...n.trim().split(/\s+/))};var Gn={onChange:(t,e)=>{let[n,r]=e;U(r)?r(t,n):t.innerHTML=n?.toString()}};function To(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=fe(t[r],e[r]);return n}function fe(t,e){if(t===e)return!0;let n=zt(t),r=zt(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=Ge(t),r=Ge(e),n||r)return t===e;if(n=T(t),r=T(e),n||r)return n&&r?To(t,e):!1;if(n=O(t),r=O(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=t.hasOwnProperty(i),c=e.hasOwnProperty(i);if(a&&!c||!a&&c||!fe(t[i],e[i]))return!1}}return String(t)===String(e)}function Ot(t,e){return t.findIndex(n=>fe(n,e))}var Jn=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var At=t=>{if(!h(t))throw I(3,"pause");t(void 0,void 0,3)};var Nt=t=>{if(!h(t))throw I(3,"resume");t(void 0,void 0,4)};var Xn={onChange:(t,e)=>{Eo(t,e[0])},onBind:(t,e,n,r,o,s)=>xo(t,e,s)},Eo=(t,e)=>{let n=tr(t);if(n&&Yn(t))T(e)?e=Ot(e,le(t))>-1:X(e)?e=e.has(le(t)):e=Oo(t,e),t.checked=e;else if(n&&Zn(t))t.checked=fe(e,le(t));else if(n||nr(t))er(t)?t.value!==e?.toString()&&(t.value=e):t.value!==e&&(t.value=e);else if(rr(t)){let r=t.options,o=r.length,s=t.multiple;for(let i=0;i<o;i++){let a=r[i],c=le(a);if(s)T(e)?a.selected=Ot(e,c)>-1:a.selected=e.has(c);else if(fe(le(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else L(7,t)},et=t=>(h(t)&&(t=t()),U(t)&&(t=t()),t?H(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}),Yn=t=>t.type==="checkbox",Zn=t=>t.type==="radio",er=t=>t.type==="number"||t.type==="range",tr=t=>t.tagName==="INPUT",nr=t=>t.tagName==="TEXTAREA",rr=t=>t.tagName==="SELECT",xo=(t,e,n)=>{let r=e.value,o=et(n?.join(",")),s=et(r()[1]),i={int:o.int||s.int,lazy:o.lazy||s.lazy,number:o.number||s.number,trim:o.trim||s.trim},a=e.refs[0];if(!a)return L(8,t),()=>{};let c=tr(t);return c&&Yn(t)?vo(t,a):c&&Zn(t)?Ao(t,a):c||nr(t)?Co(t,i,a,r):rr(t)?No(t,a,r):(L(7,t),()=>{})},Qn=/[.,' ·٫]/,Co=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=er(t),a=()=>{!e.trim&&!et(r()[1]).trim||(t.value=t.value.trim())},c=y=>{let m=y.target;m.composing=1},f=y=>{let m=y.target;m.composing&&(m.composing=0,m.dispatchEvent(new Event(s)))},p=()=>{t.removeEventListener(s,l),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",f),t.removeEventListener("change",f)},l=y=>{let m=y.target;if(!m||m.composing)return;let u=m.value,b=et(r()[1]);if(i||b.number||b.int){if(b.int)u=parseInt(u);else{if(Qn.test(u[u.length-1])&&u.split(Qn).length===2){if(u+="0",u=parseFloat(u),isNaN(u))u="";else if(n()===u)return}u=parseFloat(u)}isNaN(u)&&(u=""),t.value=u}else b.trim&&(u=u.trim());n(u)};return t.addEventListener(s,l),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",f),t.addEventListener("change",f),p},vo=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=le(t),i=t.checked,a=e();if(T(a)){let c=Ot(a,s),f=c!==-1;i&&!f?a.push(s):!i&&f&&a.splice(c,1)}else X(a)?i?a.add(s):a.delete(s):e(wo(t,i))};return t.addEventListener(n,o),r},le=t=>"_value"in t?t._value:t.value,or="trueValue",Ro="falseValue",sr="true-value",So="false-value",wo=(t,e)=>{let n=e?or:Ro;if(n in t)return t[n];let r=e?sr:So;return t.hasAttribute(r)?t.getAttribute(r):e},Oo=(t,e)=>{if(or in t)return fe(e,t.trueValue);let r=sr;return t.hasAttribute(r)?fe(e,t.getAttribute(r)):fe(e,!0)},Ao=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=le(t);e(s)};return t.addEventListener(n,o),r},No=(t,e,n)=>{let r="change",o=()=>{t.removeEventListener(r,s)},s=()=>{let a=et(n()[1]).number,c=Array.prototype.filter.call(t.options,f=>f.selected).map(f=>a?Jn(le(f)):le(f));if(t.multiple){let f=e();try{if(At(e),X(f)){f.clear();for(let p of c)f.add(p)}else T(f)?(f.splice(0),f.push(...c)):e(c)}finally{Nt(e),F(e)}}else e(c[0])};return t.addEventListener(r,s),o};var Mo=["stop","prevent","capture","self","once","left","right","middle","passive"],ko=t=>{let e={};if($(t))return;let n=t.split(",");for(let r of Mo)e[r]=n.includes(r);return e},cn={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(o){let p=e.value(),l=B(o.value()[0]);return H(l)?an(t,_(l),()=>e.value()[0],s?.join(",")??p[1]):()=>{}}else if(r){let p=e.value();return an(t,_(r),()=>e.value()[0],s?.join(",")??p[1])}let i=[],a=()=>{i.forEach(p=>p())},c=e.value(),f=c.length;for(let p=0;p<f;++p){let l=c[p];if(U(l)&&(l=l()),O(l))for(let y of Object.entries(l)){let m=y[0],u=()=>{let C=e.value()[p];return U(C)&&(C=C()),C=C[m],U(C)&&(C=C()),C},b=l[m+"_flags"];i.push(an(t,m,u,b))}else L(2,name,t)}return a}},Lo=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e??="";let n=t.split(".").concat(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]},an=(t,e,n,r)=>{if($(e))return L(5,name,t),()=>{};let o=ko(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=Lo(e,r);let a=p=>{if(!i(p)||!n&&e==="submit"&&o?.prevent)return;let l=n(p);U(l)&&(l=l(p)),U(l)&&l(p)},c=()=>{t.removeEventListener(e,f,s)},f=p=>{if(!o){a(p);return}try{if(o.left&&p.button!==0||o.middle&&p.button!==1||o.right&&p.button!==2||o.self&&p.target!==t)return;o.stop&&p.stopPropagation(),o.prevent&&p.preventDefault(),a(p)}finally{o.once&&c()}};return t.addEventListener(e,f,s),c};var ir={onChange:(t,e,n,r,o,s)=>{if(r){s&&s.includes("camel")&&(r=_(r)),Ve(t,r,e[0]);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(T(c)){let f=c[0],p=c[1];Ve(t,f,p)}else if(O(c))for(let f of Object.entries(c)){let p=f[0],l=f[1];Ve(t,p,l)}else{let f=e[a++],p=e[a];Ve(t,f,p)}}}};function Io(t){return!!t||t===""}var Ve=(t,e,n)=>{if(ee(e)){L(3,name,t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(re),1),t[e]=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??"";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=Io(n):n==null&&s==="string"?(n="",o=!0):s==="number"&&(n=0,o=!0)}try{t[e]=n}catch(s){o||L(4,e,r,n,s)}o&&t.removeAttribute(e)};var ar={once:!0,onBind:(t,e,n)=>{let r=e.value()[0],o=T(r),s=e.refs[0];return o?r.push(t):s?s?.(t):e.context[n]=t,()=>{if(o){let i=r.indexOf(t);i!==-1&&r.splice(i,1)}else s?.(null)}}};var cr={onChange:(t,e)=>{let n=ye(t).data,r=n._ord;wn(r)&&(r=n._ord=t.style.display),!!e[0]?t.style.display=r:t.style.display="none"}};var ln={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n?.[o];if(T(s)){let a=s.length;for(let c=0;c<a;++c)pr(t,s[c],i?.[c])}else pr(t,s,i)}}},pr=(t,e,n)=>{let r=t.style,o=H(e);if(e&&!o){if(n&&!H(n))for(let s in n)e[s]==null&&fn(r,s,"");for(let s in e)fn(r,s,e[s])}else{let s=r.display;if(o?n!==e&&(r.cssText=e):n&&t.removeAttribute("style"),"_ord"in ye(t).data)return;r.display=s}},fr=/\s*!important$/;function fn(t,e,n){if(T(n))n.forEach(r=>{fn(t,e,r)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let r=Do(t,e);fr.test(n)?t.setProperty(He(r),n.replace(fr,""),"important"):t[r]=n}}var lr=["Webkit","Moz","ms"],pn={};function Do(t,e){let n=pn[e];if(n)return n;let r=_(e);if(r!=="filter"&&r in t)return pn[e]=r;r=Ye(r);for(let o=0;o<lr.length;o++){let s=lr[o]+r;if(s in t)return pn[e]=s}return e}var J=t=>ur(B(t)),ur=(t,e=new WeakMap)=>{if(!t||!O(t))return t;if(T(t))return t.map(J);if(X(t)){let r=new Set;for(let o of t.keys())r.add(J(o));return r}if(de(t)){let r=new Map;for(let o of t)r.set(J(o[0]),J(o[1]));return r}if(e.has(t))return B(e.get(t));let n={...t};e.set(t,n);for(let r of Object.entries(n))n[r[0]]=ur(B(r[1]),e);return n};var mr={onChange:(t,e)=>{let n=e[0];t.textContent=X(n)?JSON.stringify(J([...n])):de(n)?JSON.stringify(J([...n])):O(n)?JSON.stringify(J(n)):n?.toString()??""}};var dr={onChange:(t,e)=>{Ve(t,"value",e[0])}};var we=t=>t?.[it]===1;var Ee=t=>{if(_e(t))return t;let e;if(h(t)?(e=t,t=e()):e=q(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[it]=1,T(t)){let n=t.length;for(let r=0;r<n;++r){let o=t[r];we(o)||(t[r]=Ee(o))}return e}if(!O(t))return e;for(let n of Object.entries(t)){let r=n[1];if(we(r))continue;let o=n[0];Ge(o)||(t[o]=null,t[o]=Ee(r))}return e};var Y=class t{static getDefault(){return t.Ae??(t.Ae=new t)}j={};l={};We=()=>Object.keys(this.j).filter(e=>e.length===1||!e.startsWith(":"));fe=new Map;ue=new Map;static Ae;static rt="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console";forGrowThreshold=10;globalContext;useInterpolation=!0;constructor(e){if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.ot()}ot(){let e={},n=globalThis;for(let r of t.rt.split(","))e[r]=n[r];return e.ref=Ee,e.sref=q,e.flatten=J,e}addComponent(...e){for(let n of e){if(!n.defaultName){Je.warning("Registered component's default name is not defined",n);continue}this.fe.set(Ye(n.defaultName),n),this.ue.set(Ye(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.j={".":ir,":":on,"@":cn,[`${e}on`]:cn,[`${e}bind`]:on,[`${e}html`]:Gn,[`${e}text`]:mr,[`${e}show`]:cr,[`${e}model`]:Xn,":style":ln,[`${e}bind:style`]:ln,":class":sn,[`${e}bind:class`]:sn,":ref":ar,":value":dr,[`${e}teleport`]:ut},this.l={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,props:":props",propsOnce:":props-once",bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.j,this.l)}};var Mt=(t,e)=>{if(!t)return;let r=(e??Y.getDefault()).l,o=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of Ho(t,r.pre,s))Uo(i,r.text,o,s)},Uo=(t,e,n,r)=>{let o=t.textContent;if(!o)return;let s=n,i=o.split(s);if(i.length<=1)return;if(t.parentElement?.childNodes.length===1&&i.length===3){let c=i[1],f=hr(c,r);if(f&&$(i[0])&&$(i[2])){let p=t.parentElement;p.setAttribute(e,c.substring(f.start.length,c.length-f.end.length)),p.innerText="";return}}let a=document.createDocumentFragment();for(let c of i){let f=hr(c,r);if(f){let p=document.createElement("span");p.setAttribute(e,c.substring(f.start.length,c.length-f.end.length)),a.appendChild(p)}else a.appendChild(document.createTextNode(c))}t.replaceWith(a)},Ho=(t,e,n)=>{let r=[],o=s=>{if(s.nodeType===Node.TEXT_NODE)n.some(i=>s.textContent?.includes(i.start))&&r.push(s);else{if(s?.hasAttribute?.(e))return;for(let i of pe(s))o(i)}};return o(t),r},hr=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var _o=9,Bo=10,Vo=13,Po=32,xe=46,kt=44,jo=39,$o=34,Lt=40,Pe=41,It=91,Dt=93,un=63,Fo=59,yr=58,qo=123,Ut=125,dn=43,zo=45,gr=96,br=47,Ko=92,Tr=[2,3],Er=[dn,zo],wr={"-":1,"!":1,"~":1,"+":1,new:1},Or={"=":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},$e={"=>":2,...Or,"||":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},Ar=Object.keys(Or),Wo=new Set(Ar),Ht=new Set;Ht.add("=>");Ar.forEach(t=>Ht.add(t));var Go=new Set(["$","_"]),xr={true:!0,false:!1,null:null},Jo="this";function Nr(t){return Math.max(0,...Object.keys(t).map(e=>e.length))}var Qo=Nr(wr),Xo=Nr($e),Fe="Expected ",Oe="Unexpected ",yn="Unclosed ",Yo=Fe+":",Cr=Fe+"expression",Zo="missing }",es=Oe+"object property",ts=yn+"(",vr=Fe+"comma",Rr=Oe+"token ",ns=Oe+"period",mn=Fe+"expression after ",rs="missing unaryOp argument",os=yn+"[",ss=Fe+"exponent (",is="Variable names cannot start with a number (",as=yn+'quote after "';var je=t=>t>=48&&t<=57,Sr=t=>$e[t]||0,hn=class{st={0:[this.it],1:[this.at,this.pt,this.ct],2:[this.lt,this.ft,this.ut,this.Ne,this.mt],3:[this.dt,this.yt,this.ht]};r;e;get M(){return this.r.charAt(this.e)}get f(){return this.r.charCodeAt(this.e)}m(e){return this.r.charCodeAt(this.e)===e}constructor(e){this.r=e,this.e=0}U(e){let n=String.fromCharCode(e);return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!(n in $e)||Go.has(n)}re(e){return this.U(e)||je(e)}i(e){return new Error(`${e} at character ${this.e}`)}k(e,n,r){let o=this.st[e];if(!o)return r;let s={node:r},i=a=>{a.call(this,s)};return n===0?o.forEach(i):o.find(i),s.node}y(){let e=this.f,n=this.r,r=this.e;for(;e===Po||e===_o||e===Bo||e===Vo;)e=n.charCodeAt(++r);this.e=r}parse(){let e=this.oe();return e.length===1?e[0]:{type:0,body:e}}oe(e){let n=[];for(;this.e<this.r.length;){let r=this.f;if(r===Fo||r===kt)this.e++;else{let o=this.O();if(o)n.push(o);else if(this.e<this.r.length){if(r===e)break;throw this.i(Oe+'"'+this.M+'"')}}}return n}O(){let e=this.k(0,1)??this.Me();return this.y(),this.k(1,0,e)}se(){this.y();let e=this.e,n=this.r,r=n.substr(e,Xo),o=r.length;for(;o>0;){if(r in $e&&(!this.U(this.f)||e+r.length<n.length&&!this.re(n.charCodeAt(e+r.length))))return e+=o,this.e=e,r;r=r.substr(0,--o)}return!1}Me(){let e,n,r,o,s,i,a,c;if(s=this.$(),!s||(n=this.se(),!n))return s;if(o={value:n,prec:Sr(n),right_a:Ht.has(n)},i=this.$(),!i)throw this.i(mn+n);let f=[s,o,i];for(;n=this.se();){if(r=Sr(n),r===0){this.e-=n.length;break}o={value:n,prec:r,right_a:Ht.has(n)},c=n;let p=l=>o.right_a&&l.right_a?r>l.prec:r<=l.prec;for(;f.length>2&&p(f[f.length-2]);)i=f.pop(),n=f.pop().value,s=f.pop(),e={type:8,operator:n,left:s,right:i},f.push(e);if(e=this.$(),!e)throw this.i(mn+c);f.push(o,e)}for(a=f.length-1,e=f[a];a>1;)e={type:8,operator:f[a-1].value,left:f[a-2],right:e},a-=2;return e}$(){let e,n,r;if(this.y(),r=this.k(2,1),r)return this.k(3,0,r);let o=this.f;if(je(o)||o===xe)return this.gt();if(o===jo||o===$o)r=this.bt();else if(o===It)r=this.xt();else{for(e=this.r.substr(this.e,Qo),n=e.length;n>0;){if(Object.prototype.hasOwnProperty.call(wr,e)&&(!this.U(this.f)||this.e+e.length<this.r.length&&!this.re(this.r.charCodeAt(this.e+e.length)))){this.e+=n;let s=this.$();if(!s)throw this.i(rs);return this.k(3,0,{type:7,operator:e,argument:s})}e=e.substr(0,--n)}this.U(o)?(r=this.ie(),r.name in xr?r={type:4,value:xr[r.name],raw:r.name}:r.name===Jo&&(r={type:5})):o===Lt&&(r=this.Tt())}return r?(r=this.F(r),this.k(3,0,r)):this.k(3,0,!1)}F(e){this.y();let n=this.f;for(;n===xe||n===It||n===Lt||n===un;){let r;if(n===un){if(this.r.charCodeAt(this.e+1)!==xe)break;r=!0,this.e+=2,this.y(),n=this.f}if(this.e++,n===It){if(e={type:3,computed:!0,object:e,property:this.O()},this.y(),n=this.f,n!==Dt)throw this.i(os);this.e++}else n===Lt?e={type:6,arguments:this.ke(Pe),callee:e}:(n===xe||r)&&(r&&this.e--,this.y(),e={type:3,computed:!1,object:e,property:this.ie()});r&&(e.optional=!0),this.y(),n=this.f}return e}gt(){let e="",n;for(;je(this.f);)e+=this.r.charAt(this.e++);if(this.m(xe))for(e+=this.r.charAt(this.e++);je(this.f);)e+=this.r.charAt(this.e++);if(n=this.M,n==="e"||n==="E"){for(e+=this.r.charAt(this.e++),n=this.M,(n==="+"||n==="-")&&(e+=this.r.charAt(this.e++));je(this.f);)e+=this.r.charAt(this.e++);if(!je(this.r.charCodeAt(this.e-1)))throw this.i(ss+e+this.M+")")}let r=this.f;if(this.U(r))throw this.i(is+e+this.M+")");if(r===xe||e.length===1&&e.charCodeAt(0)===xe)throw this.i(ns);return{type:4,value:parseFloat(e),raw:e}}bt(){let e="",n=this.e,r=this.r.charAt(this.e++),o=!1;for(;this.e<this.r.length;){let s=this.r.charAt(this.e++);if(s===r){o=!0;break}else if(s==="\\")switch(s=this.r.charAt(this.e++),s){case"n":e+=`
|
|
2
|
-
`;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=s}else e+=s}if(!o)throw this.i(as+e+'"');return{type:4,value:e,raw:this.r.substring(n,this.e)}}ie(){let e=this.f,n=this.e;if(this.U(e))this.e++;else throw this.i(Oe+this.M);for(;this.e<this.r.length&&(e=this.f,this.re(e));)this.e++;return{type:2,name:this.r.slice(n,this.e)}}ke(e){let n=[],r=!1,o=0;for(;this.e<this.r.length;){this.y();let s=this.f;if(s===e){if(r=!0,this.e++,e===
|
|
3
|
-
`;break;case"r":r+="\r";break;case"t":r+=" ";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;default:r+=c}else r+=c,o+=c}throw this.i("Unclosed `")}dt(e){let n=e.node;if(!n||n.operator!=="new"||!n.argument)return;if(!n.argument||![6,3].includes(n.argument.type))throw this.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}mt(e){if(!this.m(br))return;let n=++this.e,r=!1;for(;this.e<this.r.length;){if(this.f===br&&!r){let o=this.r.slice(n,this.e),s="";for(;++this.e<this.r.length;){let a=this.f;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.M;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.r.slice(n-1,this.e)},e.node=this.F(e.node),e.node}this.m(It)?r=!0:r&&this.m(Dt)&&(r=!1),this.e+=this.m(Ko)?2:1}throw this.i("Unclosed Regex")}},Mr=t=>new hn(t).parse();var cs={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(t,e)=>{},"+=":(t,e)=>{},"-=":(t,e)=>{},"<<=":(t,e)=>{},">>=":(t,e)=>{},">>>=":(t,e)=>{},"&=":(t,e)=>{},"^=":(t,e)=>{},"|=":(t,e)=>{},"||":(t,e)=>t()||e(),"??":(t,e)=>t()??e(),"&&":(t,e)=>t()&&e(),"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(t,e)=>t===e,"!==":(t,e)=>t!==e,"<":(t,e)=>t<e,">":(t,e)=>t>e,"<=":(t,e)=>t<=e,">=":(t,e)=>t>=e,in:(t,e)=>t in e,"<<":(t,e)=>t<<e,">>":(t,e)=>t>>e,">>>":(t,e)=>t>>>e,"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e)=>t%e,"**":(t,e)=>t**e},ps={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},Dr=t=>{if(!t?.some(Ir))return t;let e=[];return t.forEach(n=>Ir(n)?e.push(...n):e.push(n)),e},kr=(...t)=>Dr(t),gn=(t,e)=>{if(!t)return e;let n=Object.create(e??{});return n.$event=t,n},fs={"++":(t,e)=>{let n=t[e];if(
|
|
4
|
-
`);)++n;if(n>=t.length||!Br(t[n]))return null;let r=n;for(;n<t.length&&Br(t[n]);)++n;return{start:r,end:n}},Vr=new Set(["table","thead","tbody","tfoot"]),ds=new Set(["thead","tbody","tfoot"]),hs=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),Vt=t=>{let e=0,n=[],r=[],o=0;for(;e<t.length;){let s=t.indexOf("<",e);if(s===-1){n.push(t.slice(e));break}if(n.push(t.slice(e,s)),t.startsWith("<!--",s)){let
|
|
1
|
+
"use strict";var Ft=Object.defineProperty;var Zr=Object.getOwnPropertyDescriptor;var eo=Object.getOwnPropertyNames;var to=Object.prototype.hasOwnProperty;var no=(t,e)=>{for(var n in e)Ft(t,n,{get:e[n],enumerable:!0})},ro=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of eo(e))!to.call(t,o)&&o!==n&&Ft(t,o,{get:()=>e[o],enumerable:!(r=Zr(e,o))||r.enumerable});return t};var oo=t=>ro(Ft({},"__esModule",{value:!0}),t);var Cs={};no(Cs,{ComponentHead:()=>Le,RegorConfig:()=>Y,addUnbinder:()=>D,batch:()=>Yr,collectRefs:()=>Et,computeMany:()=>zr,computeRef:()=>Kr,computed:()=>qr,createApp:()=>jr,createComponent:()=>$r,endBatch:()=>vn,entangle:()=>_e,flatten:()=>J,getBindData:()=>ye,html:()=>xn,isDeepRef:()=>we,isRaw:()=>Be,isRef:()=>d,markRaw:()=>Wr,observe:()=>S,observeMany:()=>Qr,observerCount:()=>Xr,onMounted:()=>Fr,onUnmounted:()=>K,pause:()=>At,persist:()=>Gr,raw:()=>Jr,ref:()=>Ee,removeNode:()=>V,resume:()=>Nt,silence:()=>Tt,sref:()=>q,startBatch:()=>Cn,toFragment:()=>Ae,toJsonTemplate:()=>ze,trigger:()=>F,unbind:()=>re,unref:()=>B,useScope:()=>ht,warningHandler:()=>Qe,watchEffect:()=>Se});module.exports=oo(Cs);var ke=Symbol(":regor");var re=t=>{let e=[t];for(;e.length>0;){let n=e.shift();so(n);let r=n.childNodes;if(r)for(let o of r)e.push(o)}},so=t=>{let e=t[ke];if(e){for(let n of e.unbinders)n();e.unbinders.splice(0),delete t[ke]}};var V=t=>{t.remove(),setTimeout(()=>re(t),1)};var U=t=>typeof t=="function",H=t=>typeof t=="string",wn=t=>typeof t>"u",ee=t=>t==null||typeof t>"u",$=t=>typeof t!="string"||!t?.trim(),io=Object.prototype.toString,qt=t=>io.call(t),de=t=>qt(t)==="[object Map]",X=t=>qt(t)==="[object Set]",zt=t=>qt(t)==="[object Date]",Je=t=>typeof t=="symbol",T=Array.isArray,O=t=>t!==null&&typeof t=="object";var On={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."},I=(t,...e)=>{let n=On[t];return new Error(U(n)?n.call(On,...e):n)};var st=[],An=()=>{let t={onMounted:[],onUnmounted:[]};return st.push(t),t},Ce=t=>{let e=st[st.length-1];if(!e&&!t)throw I(2);return e},Nn=t=>{let e=Ce();return t&&Wt(t),st.pop(),e},Kt=Symbol("csp"),Wt=t=>{let e=t,n=e[Kt];if(n){let r=Ce();if(n===r)return;r.onMounted.length>0&&n.onMounted.push(...r.onMounted),r.onUnmounted.length>0&&n.onUnmounted.push(...r.onUnmounted);return}e[Kt]=Ce()},it=t=>t[Kt];var he=t=>{it(t)?.onUnmounted?.forEach(n=>{n()}),t.unmounted?.()};var Le=class{props;start;end;ctx;autoProps=!0;entangle=!0;enableSwitch=!1;onAutoPropsAssigned;pe;constructor(e,n,r,o,s){this.props=e,this.pe=n,this.ctx=r,this.start=o,this.end=s}emit=(e,n)=>{this.pe.dispatchEvent(new CustomEvent(e,{detail:n}))};unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)V(e),e=e.nextSibling;for(let r of this.ctx)he(r)}};var ye=t=>{let e=t[ke];if(e)return e;let n={unbinders:[],data:{}};return t[ke]=n,n};var D=(t,e)=>{ye(t).unbinders.push(e)};var Mn={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]})},L=(t,...e)=>{let n=Mn[t],r=U(n)?n.call(Mn,...e):n,o=Qe.warning;o&&(H(r)?o(r):o(r,...r.args))},Qe={warning:console.warn};var K=(t,e)=>{Ce(e)?.onUnmounted.push(t)};var at=Symbol("ref"),W=Symbol("sref"),ct=Symbol("raw");var d=t=>t?.[W]===1;var S=(t,e,n)=>{if(!d(t))throw I(3,"observe");n&&e(t());let o=t(void 0,void 0,0,e);return K(o,!0),o};var ft={},pt={},kn=1,Ln=t=>{let e=(kn++).toString();return ft[e]=t,pt[e]=0,e},Gt=t=>{pt[t]+=1},Jt=t=>{--pt[t]===0&&(delete ft[t],delete pt[t])},In=t=>ft[t],Qt=()=>kn!==1&&Object.keys(ft).length>0,Xe="r-switch",ao=t=>{let e=t.filter(r=>ve(r)).map(r=>[...r.querySelectorAll("[r-switch]")].map(o=>o.getAttribute(Xe))),n=new Set;return e.forEach(r=>{r.forEach(o=>o&&n.add(o))}),[...n]},Ie=(t,e)=>{if(!Qt())return;let n=ao(e);n.length!==0&&(n.forEach(Gt),D(t,()=>{n.forEach(Jt)}))};var Xt=(t,e,n,r)=>{let o=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,r),o.push(i)}be(e,o)},Yt=Symbol("r-if"),Dn=Symbol("r-else"),Un=t=>t[Dn]===1,lt=class{p;B;K;z;W;b;x;constructor(e){this.p=e,this.B=e.o.l.if,this.K=Ue(e.o.l.if),this.z=e.o.l.else,this.W=e.o.l.elseif,this.b=e.o.l.for,this.x=e.o.l.pre}qe(e,n){let r=e.parentElement;for(;r!==null&&r!==document.documentElement;){if(r.hasAttribute(n))return!0;r=r.parentElement}return!1}N(e){let n=e.hasAttribute(this.B),r=ge(e,this.K);for(let o of r)this.T(o);return n}G(e){return e[Yt]?!0:(e[Yt]=!0,ge(e,this.K).forEach(n=>n[Yt]=!0),!1)}T(e){if(e.hasAttribute(this.x)||this.G(e)||this.qe(e,this.b))return;let n=e.getAttribute(this.B);if(!n){L(0,this.B,e);return}e.removeAttribute(this.B),this.L(e,n)}P(e,n,r){let o=De(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${r??""}`);s.insertBefore(i,e),Ie(i,o),o.forEach(c=>{V(c)}),e.remove(),n!=="if"&&(e[Dn]=1);let a=document.createComment(`__end__ :${n}${r??""}`);return s.insertBefore(a,i.nextSibling),{nodes:o,parent:s,commentBegin:i,commentEnd:a}}ce(e,n){if(!e)return[];let r=e.nextElementSibling;if(e.hasAttribute(this.z)){e.removeAttribute(this.z);let{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"else");return[{mount:()=>{Xt(o,this.p,s,a)},unmount:()=>{ce(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let o=e.getAttribute(this.W);if(!o)return[];e.removeAttribute(this.W);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.P(e,"elseif",` => ${o} `),f=this.p.h.C(o),p=f.value,l=this.ce(r,n),b=[];D(a,()=>{f.stop();for(let m of b)m();b.length=0});let y=S(p,n);return b.push(y),[{mount:()=>{Xt(s,this.p,i,c)},unmount:()=>{ce(a,c)},isTrue:()=>!!p()[0],isMounted:!1}].concat(l)}}L(e,n){let r=e.nextElementSibling,{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"if",` => ${n} `),c=this.p.h.C(n),f=c.value,p=!1,l=this.p.h,b=l.V(),u=()=>{l.v(b,()=>{if(f()[0])p||(Xt(o,this.p,s,a),p=!0),y.forEach(M=>{M.unmount(),M.isMounted=!1});else{ce(i,a),p=!1;let M=!1;for(let A of y)!M&&A.isTrue()?(A.isMounted||(A.mount(),A.isMounted=!0),M=!0):(A.unmount(),A.isMounted=!1)}})},y=this.ce(r,u),m=[];D(i,()=>{c.stop();for(let M of m)M();m.length=0}),u();let g=S(f,u);m.push(g)}};var De=t=>{let e=se(t)?t.content.childNodes:[t];return Array.from(e).filter(n=>{let r=n?.tagName;return r!=="SCRIPT"&&r!=="STYLE"})},be=(t,e)=>{for(let n of e)Un(n)||t.H(n)},ge=(t,e)=>{let n=t.querySelectorAll(e);return t.matches?.(e)?[t,...n]:n},se=t=>t instanceof HTMLTemplateElement,ve=t=>t.nodeType===Node.ELEMENT_NODE,Ye=t=>t.nodeType===Node.ELEMENT_NODE,Hn=t=>t instanceof HTMLSlotElement,pe=t=>se(t)?t.content.childNodes:t.childNodes,ce=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let r=n.nextSibling;V(n),n=r}},Te=(t,e)=>{Object.defineProperty(t,"value",{get(){return t()},set(n){if(e)throw new Error("value is readonly.");return t(n)},enumerable:!0,configurable:!1})},_n=(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},Ue=t=>`[${CSS.escape(t)}]`,ut=(t,e)=>(t.startsWith("@")&&(t=e.l.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.l.dynamic)),t),Zt=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},co=/-(\w)/g,_=Zt(t=>t&&t.replace(co,(e,n)=>n?n.toUpperCase():"")),po=/\B([A-Z])/g,He=Zt(t=>t&&t.replace(po,"-$1").toLowerCase()),Ze=Zt(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var mt={};var dt=t=>{it(t)?.onMounted?.forEach(n=>{n()}),t.mounted?.()};var en=Symbol("scope"),ht=t=>{try{An();let e=t();Wt(e);let n={context:e,unmount:()=>he(e),[en]:1};return n[en]=1,n}finally{Nn()}},Bn=t=>O(t)?en in t:!1;var Vn={collectRefObj:!0,onBind:(t,e)=>S(e.value,()=>{let r=e.value(),o=e.context,s=r[0];if(O(s))for(let i of Object.entries(s)){let a=i[0],c=i[1],f=o[a];f!==c&&(d(f)?f(c):o[a]=c)}},!0)};var Pn={collectRefObj:!0,once:!0,onBind:(t,e)=>{let n=e.value(),r=e.context,o=n[0];if(!O(o))return()=>{};for(let s of Object.entries(o)){let i=s[0],a=s[1],c=r[i];c!==a&&(d(c)?c(a):r[i]=a)}return()=>{}}};var _e=(t,e)=>{if(t===e)return()=>{};let n=S(t,o=>e(o)),r=S(e,o=>t(o));return e(t()),()=>{n(),r()}};var jn={collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(!r)return()=>{};let i=_(r),a=()=>{},c=S(e.value,()=>{let f=e.refs[0]??e.value()[0],p=e.context,l=p[i];if(l!==f){if(d(f)){if(d(l)){a(),a=_e(f,l);return}p[i]=f;return}if(a(),a=()=>{},d(l)){l(f);return}p[i]=f}},!0);return()=>{a(),c()}}};var yt=class{p;le;constructor(e){this.p=e,this.le=e.o.l.inherit}N(e){this.Ke(e)}Ke(e){let n=this.p,r=n.h,o=n.o.fe,s=n.o.ue,i=r.me(),a=r.ze(),c=[...o.keys(),...a,...[...o.keys()].map(He),...a.map(He)].join(",");if($(c))return;let f=e.querySelectorAll(c),p=e.matches?.(c)?[e,...f]:f;for(let l of p){if(l.hasAttribute(n.x))continue;let b=l.parentNode;if(!b)continue;let u=l.nextSibling,y=_(l.tagName).toUpperCase(),x=i[y]??s.get(y);if(!x)continue;let g=x.template;if(!g)continue;let M=l.parentElement;if(!M)continue;let A=new Comment(" begin component: "+l.tagName),Ne=new Comment(" end component: "+l.tagName);M.insertBefore(A,l),l.remove();let Ke=n.o.l.props,We=n.o.l.propsOnce,Pt=n.o.l.bind,nt=(h,N)=>{let E={},j=h.hasAttribute(Ke),z=h.hasAttribute(We);return r.v(N,()=>{r.S(E),j&&n.T(Vn,h,Ke),z&&n.T(Pn,h,We);let C=x.props;if(!C||C.length===0)return;C=C.map(_);let G=new Map(C.map(Q=>[Q.toLowerCase(),Q]));for(let Q of C.concat(C.map(He))){let ae=h.getAttribute(Q);ae!==null&&(E[_(Q)]=ae,h.removeAttribute(Q))}let jt=n.J.de(h,!1);for(let[Q,ae]of jt.entries()){let[$t,Rn]=ae.Q;if(!Rn)continue;let Sn=G.get(_(Rn).toLowerCase());Sn&&($t!=="."&&$t!==":"&&$t!==Pt||n.T(jn,h,Q,!0,Sn,ae.X))}}),E},ue=[...r.V()],rt=()=>{let h=nt(l,ue),N=new Le(h,l,ue,A,Ne),E=ht(()=>x.context(N)??{}).context;if(N.autoProps){for(let[j,z]of Object.entries(h))if(j in E){let C=E[j];if(C===z)continue;N.entangle&&d(C)&&d(z)&&D(A,_e(z,C))}else E[j]=z;N.onAutoPropsAssigned?.()}return{componentCtx:E,head:N}},{componentCtx:me,head:ot}=rt(),w=[...pe(g)],v=w.length,k=l.childNodes.length===0,P=h=>{let N=h.parentElement;if(k){for(let C of[...h.childNodes])N.insertBefore(C,h);return}let E=h.name;$(E)&&(E=h.getAttributeNames().filter(C=>C.startsWith("#"))[0],$(E)?E="default":E=E.substring(1));let j=l.querySelector(`template[name='${E}'], template[\\#${E}]`);!j&&E==="default"&&(j=l.querySelector("template:not([name])"),j&&j.getAttributeNames().filter(C=>C.startsWith("#")).length>0&&(j=null));let z=C=>{ot.enableSwitch&&r.v(ue,()=>{r.S(me);let G=nt(h,r.V());r.v(ue,()=>{r.S(G);let jt=r.V(),Q=Ln(jt);for(let ae of C)ve(ae)&&(ae.setAttribute(Xe,Q),Gt(Q),D(ae,()=>{Jt(Q)}))})})};if(j){let C=[...pe(j)];for(let G of C)N.insertBefore(G,h);z(C)}else{if(E!=="default"){for(let G of[...pe(h)])N.insertBefore(G,h);return}let C=[...pe(l)].filter(G=>!se(G));for(let G of C)N.insertBefore(G,h);z(C)}},R=h=>{if(!ve(h))return;let N=h.querySelectorAll("slot");if(Hn(h)){P(h),h.remove();return}for(let E of N)P(E),E.remove()};(()=>{for(let h=0;h<v;++h)w[h]=w[h].cloneNode(!0),b.insertBefore(w[h],u),R(w[h])})(),M.insertBefore(Ne,u);let ne=()=>{if(!x.inheritAttrs)return;let h=w.filter(E=>E.nodeType===Node.ELEMENT_NODE);h.length>1&&(h=h.filter(E=>E.hasAttribute(this.le)));let N=h[0];if(N)for(let E of l.getAttributeNames()){if(E===Ke||E===We)continue;let j=l.getAttribute(E);if(E==="class")N.classList.add(...j.split(" "));else if(E==="style"){let z=N.style,C=l.style;for(let G of C)z.setProperty(G,C.getPropertyValue(G))}else N.setAttribute(ut(E,n.o),j)}},Me=()=>{for(let h of l.getAttributeNames())!h.startsWith("@")&&!h.startsWith(n.o.l.on)&&l.removeAttribute(h)},Ge=()=>{ne(),Me(),r.S(me),n.ye(l,!1),me.$emit=ot.emit,be(n,w),D(l,()=>{he(me)}),D(A,()=>{re(l)}),dt(me)};r.v(ue,Ge)}}};var tn=class{he;Q=[];X=[];ge=[];constructor(e){this.he=e,this.C()}C(){let e=this.he,n=e.startsWith(".");n&&(e=":"+e.slice(1));let r=e.indexOf("."),o=this.Q=(r<0?e:e.substring(0,r)).split(/[:@]/);if($(o[0])&&(o[0]=n?".":e[0]),r>=0){let s=this.X=e.slice(r+1).split(".");if(s.includes("camel")){let i=o.length-1;o[i]=_(o[i])}s.includes("prop")&&(o[0]=".")}}},gt=class{p;be;constructor(e){this.p=e,this.be=e.o.We()}de(e,n){let r=new Map;if(!Ye(e))return r;let o=this.be,s=a=>{let c=a.getAttributeNames().filter(f=>o.some(p=>f.startsWith(p)));for(let f of c)r.has(f)||r.set(f,new tn(f)),r.get(f).ge.push(a)};if(s(e),!n)return r;let i=e.querySelectorAll("*");for(let a of i)s(a);return r}};var fo=(t,e)=>{for(let n of t){let r=n.cloneNode(!0);e.appendChild(r)}},bt=class{p;I;xe;constructor(e){this.p=e,this.I=e.o.l.is,this.xe=Ue(this.I)+", [is]"}N(e){let n=e.hasAttribute(this.I),r=ge(e,this.xe);for(let o of r)this.T(o);return n}T(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.p.H(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.L(e,n)}P(e,n){let r=De(e),o=e.parentNode,s=document.createComment(`__begin__ dynamic ${n??""}`);o.insertBefore(s,e),Ie(s,r),r.forEach(a=>{V(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n??""}`);return o.insertBefore(i,s.nextSibling),{nodes:r,parent:o,commentBegin:s,commentEnd:i}}L(e,n){let{nodes:r,parent:o,commentBegin:s,commentEnd:i}=this.P(e,` => ${n} `),a=this.p.h.C(n),c=a.value,f=this.p.h,p=f.V(),l={name:""},b=se(e)?r:[...r[0].childNodes],u=()=>{f.v(p,()=>{let g=c()[0];if(O(g)&&(g.name?g=g.name:g=Object.entries(f.me()).filter(A=>A[1]===g)[0]?.[0]),!H(g)||$(g)){ce(s,i);return}if(l.name===g)return;ce(s,i);let M=document.createElement(g);for(let A of e.getAttributeNames())A!==this.I&&M.setAttribute(A,e.getAttribute(A));fo(b,M),o.insertBefore(M,i),this.p.H(M),l.name=g})},y=[];D(s,()=>{a.stop();for(let g of y)g();y.length=0}),u();let x=S(c,u);y.push(x)}};var te=[],$n=t=>{te.length!==0&&te[te.length-1]?.add(t)},Se=t=>{if(!t)return()=>{};let e={stop:()=>{}};return lo(t,e),K(()=>e.stop(),!0),e.stop},lo=(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(te.push(s),t(i=>n.push(i)),r)return;for(let i of[...s]){let a=S(i,()=>{o(),Se(t)});n.push(a)}}finally{te.pop()}},Tt=t=>{let e=te.length,n=e>0&&te[e-1];try{return n&&te.push(null),t()}finally{n&&te.pop()}},Et=t=>{try{let e=new Set;return te.push(e),{value:t(),refs:[...e]}}finally{te.pop()}};var Be=t=>!!t&&t[ct]===1;var F=(t,e,n)=>{if(!d(t))return;let r=t;if(r(void 0,e,1),!n)return;let o=r();if(o){if(T(o)||X(o))for(let s of o)F(s,e,!0);else if(de(o))for(let s of o)F(s[0],e,!0),F(s[1],e,!0);if(O(o))for(let s in o)F(o[s],e,!0)}};function uo(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Ve=(t,e,n)=>{n.forEach(function(r){let o=t[r];uo(e,r,function(...i){let a=o.apply(this,i),c=this[W];for(let f of c)F(f);return a})})},xt=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var Fn=Array.prototype,nn=Object.create(Fn),mo=["push","pop","shift","unshift","splice","sort","reverse"];Ve(Fn,nn,mo);var qn=Map.prototype,Ct=Object.create(qn),ho=["set","clear","delete"];xt(Ct,"Map");Ve(qn,Ct,ho);var zn=Set.prototype,vt=Object.create(zn),yo=["add","clear","delete"];xt(vt,"Set");Ve(zn,vt,yo);var ie={},q=t=>{if(d(t)||Be(t))return t;let e={auto:!0,_value:t},n=c=>O(c)?W in c?!0:T(c)?(Object.setPrototypeOf(c,nn),!0):X(c)?(Object.setPrototypeOf(c,vt),!0):de(c)?(Object.setPrototypeOf(c,Ct),!0):!1:!1,r=n(t),o=new Set,s=(c,f)=>{if(ie.stack&&ie.stack.length){ie.stack[ie.stack.length-1].add(a);return}o.size!==0&&Tt(()=>{for(let p of[...o.keys()])o.has(p)&&p(c,f)})},i=c=>{let f=c[W];f||(c[W]=f=new Set),f.add(a)},a=(...c)=>{if(!(2 in c)){let p=c[0],l=c[1];return 0 in c?e._value===p||d(p)&&(p=p(),e._value===p)?p:(n(p)&&i(p),e._value=p,e.auto&&s(p,l),e._value):($n(a),e._value)}switch(c[2]){case 0:{let p=c[3];if(!p)return()=>{};let l=b=>{o.delete(b)};return o.add(p),()=>{l(p)}}case 1:{let p=c[1],l=e._value;s(l,p);break}case 2:return o.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[W]=1,Te(a,!1),r&&i(t),a};var B=t=>d(t)?t():t;var et=class{E=[];_=new Map;get w(){return this.E.length}Y;constructor(e){this.Y=e}Z(e){let n=this.Y(e.value);n!==void 0&&this._.set(n,e)}ee(e){let n=this.Y(this.E[e]?.value);n!==void 0&&this._.delete(n)}static Ge(e,n){return{items:[],index:e,value:n,order:-1}}S(e){e.order=this.w,this.E.push(e),this.Z(e)}Je(e,n){let r=this.w;for(let o=e;o<r;++o)this.E[o].order=o+1;n.order=e,this.E.splice(e,0,n),this.Z(n)}D(e){return this.E[e]}te(e,n){this.ee(e),this.E[e]=n,this.Z(n),n.order=e}Te(e){this.ee(e),this.E.splice(e,1);let n=this.w;for(let r=e;r<n;++r)this.E[r].order=r}Ee(e){let n=this.w;for(let r=e;r<n;++r)this.ee(r);this.E.splice(e)}Ct(e){return this._.has(e)}Qe(e){return this._.get(e)?.order??-1}};var rn=Symbol("r-for"),Rt=class t{p;b;ne;x;constructor(e){this.p=e,this.b=e.o.l.for,this.ne=Ue(this.b),this.x=e.o.l.pre}N(e){let n=e.hasAttribute(this.b),r=ge(e,this.ne);for(let o of r)this.Xe(o);return n}G(e){return e[rn]?!0:(e[rn]=!0,ge(e,this.ne).forEach(n=>n[rn]=!0),!1)}Xe(e){if(e.hasAttribute(this.x)||this.G(e))return;let n=e.getAttribute(this.b);if(!n){L(0,this.b,e);return}e.removeAttribute(this.b),this.Ye(e,n)}Re(e){return ee(e)?[]:(U(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))}Ye(e,n){let r=this.Ze(n);if(!r?.list){L(1,this.b,n,e);return}let o=this.p.o.l.key,s=this.p.o.l.keyBind,i=e.getAttribute(o)??e.getAttribute(s);e.removeAttribute(o),e.removeAttribute(s);let a=i?v=>B(B(v)?.[i]):v=>v,c=(v,k)=>a(v)===a(k),f=De(e),p=e.parentNode;if(!p)return;let l=`${this.b} => ${n}`,b=new Comment(`__begin__ ${l}`);p.insertBefore(b,e),Ie(b,f),f.forEach(v=>{V(v)}),e.remove();let u=new Comment(`__end__ ${l}`);p.insertBefore(u,b.nextSibling);let y=this.p,m=y.h,x=m.V(),g=(v,k,P)=>{let R=r.createContext(k,v),Z=et.Ge(R.index,k);return m.v(x,()=>{m.S(R.ctx);let ne=P.previousSibling,Me=[];for(let Ge of f){let h=Ge.cloneNode(!0);p.insertBefore(h,P),Me.push(h)}for(be(y,Me),ne=ne.nextSibling;ne!==P;)Z.items.push(ne),ne=ne.nextSibling}),Z},M=(v,k)=>{let P=w.D(v).items,R=P[P.length-1].nextSibling;for(let Z of P)V(Z);w.te(v,g(v,k,R))},A=(v,k)=>{w.S(g(v,k,u))},Ne=v=>{for(let k of w.D(v).items)V(k)},Ke=v=>{let k=w.w;for(let P=v;P<k;++P)w.D(P).index(P)},We=v=>{let k=w.w;U(v)&&(v=v());let P=B(v[0]);if(T(P)&&P.length===0){ce(b,u),w.Ee(0);return}let R=0,Z=Number.MAX_SAFE_INTEGER,ne=k,Me=this.p.o.forGrowThreshold,Ge=()=>w.w<ne+Me;for(let N of this.Re(v[0])){let E=()=>{if(R<k){let j=w.D(R++);if(c(j.value,N))return;let z=w.Qe(a(N));if(z>=R&&z-R<10){if(--R,Z=Math.min(Z,R),Ne(R),w.Te(R),--k,z>R+1)for(let C=R;C<z-1&&C<k&&!c(w.D(R).value,N);)++C,Ne(R),w.Te(R),--k;E();return}Ge()?(w.Je(R-1,g(R,N,w.D(R-1).items[0])),Z=Math.min(Z,R-1),++k):M(R-1,N)}else A(R++,N)};E()}let h=R;for(k=w.w;R<k;)Ne(R++);w.Ee(h),Ke(Z)},Pt=()=>{me=S(rt,We)},nt=()=>{ue.stop(),me()},ue=m.C(r.list),rt=ue.value,me,ot=0,w=new et(a);for(let v of this.Re(rt()[0]))w.S(g(ot++,v,u));D(b,nt),Pt()}static et=/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/;Ze(e){let n=t.et.exec(e);if(!n)return;let r=(n[1]+(n[2]??"")).split(",").map(c=>c.trim()),o=r.length>1?r.length-1:-1,s=o!==-1&&(r[o]==="index"||r[o]?.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:(c,f)=>{let p={},l=B(c);if(!a&&r.length===1)p[r[0]]=c;else if(T(l)){let u=0;for(let y of r)p[y]=l[u++]}else for(let u of r)p[u]=l[u];let b={ctx:p,index:q(-1)};return s&&(b.index=p[s.startsWith("#")?s.substring(1):s]=q(f)),b}}}};var St=class{h;Ce;ve;Se;we;J;o;x;Oe;constructor(e){this.h=e,this.o=e.o,this.ve=new Rt(this),this.Ce=new lt(this),this.Se=new bt(this),this.we=new yt(this),this.J=new gt(this),this.x=this.o.l.pre,this.Oe=this.o.l.dynamic}tt(e){let n=se(e)?[e]:e.querySelectorAll("template");for(let r of n){if(r.hasAttribute(this.x))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);be(this,i)}}H(e){e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.x)||this.Ce.N(e)||this.ve.N(e)||this.Se.N(e)||(this.we.N(e),this.tt(e),this.ye(e,!0))}ye(e,n){let r=this.J.de(e,n),o=this.o.j;for(let[s,i]of r.entries()){let[a,c]=i.Q,f=o[s]??o[a];if(!f){console.error("directive not found:",a);continue}i.ge.forEach(p=>{this.T(f,p,s,!1,c,i.X)})}}T(e,n,r,o,s,i){if(n.hasAttribute(this.x))return;let a=n.getAttribute(r);n.removeAttribute(r);let c=f=>{let p=f.getAttribute(Xe);return p||(f.parentElement?c(f.parentElement):null)};if(Qt()){let f=c(n);if(f){this.h.v(In(f),()=>{this.L(e,n,a,s,i)});return}}this.L(e,n,a,s,i)}nt(e,n,r){if(e!==mt)return!1;if($(r))return!0;let o=document.querySelector(r);if(o){let s=n.parentElement;if(!s)return!0;let i=new Comment(`teleported => '${r}'`);s.insertBefore(i,n),n.teleportedFrom=i,i.teleportedTo=n,D(i,()=>{V(n)}),o.appendChild(n)}return!0}L(e,n,r,o,s){if(n.nodeType!==Node.ELEMENT_NODE||r==null||this.nt(e,n,r))return;let i=this.h.C(r,e.isLazy,e.isLazyKey,e.collectRefObj,e.once),a=[];D(n,()=>{i.stop(),p?.stop();for(let x of a)x();a.length=0});let f=_n(o,this.Oe),p;f&&(p=this.h.C(_(f),void 0,void 0,void 0,e.once));let l,b=()=>(l=i.value(),l),u,y=()=>p?(u=p.value()[0],u):(u=o,o),m=()=>{if(!e.onChange)return;let x=S(i.value,g=>{let M=l,A=u;e.onChange?.(n,b(),M,y(),A,s)});if(a.push(x),p){let g=S(p.value,M=>{let A=u;e.onChange?.(n,b(),A,y(),A,s)});a.push(g)}};e.once||m(),e.onBind&&a.push(e.onBind(n,i,r,o,p,s)),e.onChange?.(n,b(),void 0,y(),void 0,s)}};var Kn="http://www.w3.org/1999/xlink",go={itemscope:2,allowfullscreen:2,formnovalidate:2,ismap:2,nomodule:2,novalidate:2,readonly:2,async:1,autofocus:1,autoplay:1,controls:1,default:1,defer:1,disabled:1,hidden:1,inert:1,loop:1,open:1,required:1,reversed:1,scoped:1,seamless:1,checked:1,muted:1,multiple:1,selected:1};function bo(t){return!!t||t===""}var on={onChange:(t,e,n,r,o,s)=>{if(r){s&&s.includes("camel")&&(r=_(r)),wt(t,r,e[0],o);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(T(c)){let f=n?.[a]?.[0],p=c[0],l=c[1];wt(t,p,l,f)}else if(O(c))for(let f of Object.entries(c)){let p=f[0],l=f[1],b=n?.[a],u=b&&p in b?p:void 0;wt(t,p,l,u)}else{let f=n?.[a],p=e[a++],l=e[a];wt(t,p,l,f)}}}},wt=(t,e,n,r)=>{if(r&&r!==e&&t.removeAttribute(r),ee(e)){L(3,name,t);return}if(!H(e)){L(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){ee(n)?t.removeAttributeNS(Kn,e.slice(6,e.length)):t.setAttributeNS(Kn,e,n);return}let o=e in go;ee(n)||o&&!bo(n)?t.removeAttribute(e):t.setAttribute(e,o?"":n)};var sn={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n?.[o];if(T(s)){let a=s.length;for(let c=0;c<a;++c)Wn(t,s[c],i?.[c])}else Wn(t,s,i)}}},Wn=(t,e,n)=>{let r=t.classList,o=H(e),s=H(n);if(e&&!o){if(n&&!s)for(let i in n)(!(i in e)||!e[i])&&r.remove(i);for(let i in e)e[i]&&r.add(i)}else o?n!==e&&(s&&r.remove(...n.trim().split(/\s+/)),r.add(...e.trim().split(/\s+/))):n&&s&&r.remove(...n.trim().split(/\s+/))};var Gn={onChange:(t,e)=>{let[n,r]=e;U(r)?r(t,n):t.innerHTML=n?.toString()}};function To(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=fe(t[r],e[r]);return n}function fe(t,e){if(t===e)return!0;let n=zt(t),r=zt(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=Je(t),r=Je(e),n||r)return t===e;if(n=T(t),r=T(e),n||r)return n&&r?To(t,e):!1;if(n=O(t),r=O(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=t.hasOwnProperty(i),c=e.hasOwnProperty(i);if(a&&!c||!a&&c||!fe(t[i],e[i]))return!1}}return String(t)===String(e)}function Ot(t,e){return t.findIndex(n=>fe(n,e))}var Jn=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var At=t=>{if(!d(t))throw I(3,"pause");t(void 0,void 0,3)};var Nt=t=>{if(!d(t))throw I(3,"resume");t(void 0,void 0,4)};var Xn={onChange:(t,e)=>{Eo(t,e[0])},onBind:(t,e,n,r,o,s)=>xo(t,e,s)},Eo=(t,e)=>{let n=tr(t);if(n&&Yn(t))T(e)?e=Ot(e,le(t))>-1:X(e)?e=e.has(le(t)):e=Oo(t,e),t.checked=e;else if(n&&Zn(t))t.checked=fe(e,le(t));else if(n||nr(t))er(t)?t.value!==e?.toString()&&(t.value=e):t.value!==e&&(t.value=e);else if(rr(t)){let r=t.options,o=r.length,s=t.multiple;for(let i=0;i<o;i++){let a=r[i],c=le(a);if(s)T(e)?a.selected=Ot(e,c)>-1:a.selected=e.has(c);else if(fe(le(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else L(7,t)},tt=t=>(d(t)&&(t=t()),U(t)&&(t=t()),t?H(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}),Yn=t=>t.type==="checkbox",Zn=t=>t.type==="radio",er=t=>t.type==="number"||t.type==="range",tr=t=>t.tagName==="INPUT",nr=t=>t.tagName==="TEXTAREA",rr=t=>t.tagName==="SELECT",xo=(t,e,n)=>{let r=e.value,o=tt(n?.join(",")),s=tt(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 L(8,t),()=>{};let a=()=>e.refs[0],c=tr(t);return c&&Yn(t)?vo(t,a):c&&Zn(t)?Ao(t,a):c||nr(t)?Co(t,i,a,r):rr(t)?No(t,a,r):(L(7,t),()=>{})},Qn=/[.,' ·٫]/,Co=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=er(t),a=()=>{!e.trim&&!tt(r()[1]).trim||(t.value=t.value.trim())},c=b=>{let u=b.target;u.composing=1},f=b=>{let u=b.target;u.composing&&(u.composing=0,u.dispatchEvent(new Event(s)))},p=()=>{t.removeEventListener(s,l),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",f),t.removeEventListener("change",f)},l=b=>{let u=n();if(!u)return;let y=b.target;if(!y||y.composing)return;let m=y.value,x=tt(r()[1]);if(i||x.number||x.int){if(x.int)m=parseInt(m);else{if(Qn.test(m[m.length-1])&&m.split(Qn).length===2){if(m+="0",m=parseFloat(m),isNaN(m))m="";else if(u()===m)return}m=parseFloat(m)}isNaN(m)&&(m=""),t.value=m}else x.trim&&(m=m.trim());u(m)};return t.addEventListener(s,l),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",f),t.addEventListener("change",f),p},vo=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=le(t),a=t.checked,c=s();if(T(c)){let f=Ot(c,i),p=f!==-1;a&&!p?c.push(i):!a&&p&&c.splice(f,1)}else X(c)?a?c.add(i):c.delete(i):s(wo(t,a))};return t.addEventListener(n,o),r},le=t=>"_value"in t?t._value:t.value,or="trueValue",Ro="falseValue",sr="true-value",So="false-value",wo=(t,e)=>{let n=e?or:Ro;if(n in t)return t[n];let r=e?sr:So;return t.hasAttribute(r)?t.getAttribute(r):e},Oo=(t,e)=>{if(or in t)return fe(e,t.trueValue);let r=sr;return t.hasAttribute(r)?fe(e,t.getAttribute(r)):fe(e,!0)},Ao=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=le(t);s(i)};return t.addEventListener(n,o),r},No=(t,e,n)=>{let r="change",o=()=>{t.removeEventListener(r,s)},s=()=>{let i=e();if(!i)return;let c=tt(n()[1]).number,f=Array.prototype.filter.call(t.options,p=>p.selected).map(p=>c?Jn(le(p)):le(p));if(t.multiple){let p=i();try{if(At(i),X(p)){p.clear();for(let l of f)p.add(l)}else T(p)?(p.splice(0),p.push(...f)):i(f)}finally{Nt(i),F(i)}}else i(f[0])};return t.addEventListener(r,s),o};var Mo=["stop","prevent","capture","self","once","left","right","middle","passive"],ko=t=>{let e={};if($(t))return;let n=t.split(",");for(let r of Mo)e[r]=n.includes(r);return e},cn={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(o){let p=e.value(),l=B(o.value()[0]);return H(l)?an(t,_(l),()=>e.value()[0],s?.join(",")??p[1]):()=>{}}else if(r){let p=e.value();return an(t,_(r),()=>e.value()[0],s?.join(",")??p[1])}let i=[],a=()=>{i.forEach(p=>p())},c=e.value(),f=c.length;for(let p=0;p<f;++p){let l=c[p];if(U(l)&&(l=l()),O(l))for(let b of Object.entries(l)){let u=b[0],y=()=>{let x=e.value()[p];return U(x)&&(x=x()),x=x[u],U(x)&&(x=x()),x},m=l[u+"_flags"];i.push(an(t,u,y,m))}else L(2,name,t)}return a}},Lo=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e??="";let n=t.split(".").concat(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]},an=(t,e,n,r)=>{if($(e))return L(5,name,t),()=>{};let o=ko(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=Lo(e,r);let a=p=>{if(!i(p)||!n&&e==="submit"&&o?.prevent)return;let l=n(p);U(l)&&(l=l(p)),U(l)&&l(p)},c=()=>{t.removeEventListener(e,f,s)},f=p=>{if(!o){a(p);return}try{if(o.left&&p.button!==0||o.middle&&p.button!==1||o.right&&p.button!==2||o.self&&p.target!==t)return;o.stop&&p.stopPropagation(),o.prevent&&p.preventDefault(),a(p)}finally{o.once&&c()}};return t.addEventListener(e,f,s),c};var ir={onChange:(t,e,n,r,o,s)=>{if(r){s&&s.includes("camel")&&(r=_(r)),Pe(t,r,e[0]);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(T(c)){let f=c[0],p=c[1];Pe(t,f,p)}else if(O(c))for(let f of Object.entries(c)){let p=f[0],l=f[1];Pe(t,p,l)}else{let f=e[a++],p=e[a];Pe(t,f,p)}}}};function Io(t){return!!t||t===""}var Pe=(t,e,n)=>{if(ee(e)){L(3,name,t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(re),1),t[e]=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??"";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=Io(n):n==null&&s==="string"?(n="",o=!0):s==="number"&&(n=0,o=!0)}try{t[e]=n}catch(s){o||L(4,e,r,n,s)}o&&t.removeAttribute(e)};var ar={once:!0,onBind:(t,e,n)=>{let r=e.value()[0],o=T(r),s=e.refs[0];return o?r.push(t):s?s?.(t):e.context[n]=t,()=>{if(o){let i=r.indexOf(t);i!==-1&&r.splice(i,1)}else s?.(null)}}};var cr={onChange:(t,e)=>{let n=ye(t).data,r=n._ord;wn(r)&&(r=n._ord=t.style.display),!!e[0]?t.style.display=r:t.style.display="none"}};var ln={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n?.[o];if(T(s)){let a=s.length;for(let c=0;c<a;++c)pr(t,s[c],i?.[c])}else pr(t,s,i)}}},pr=(t,e,n)=>{let r=t.style,o=H(e);if(e&&!o){if(n&&!H(n))for(let s in n)e[s]==null&&fn(r,s,"");for(let s in e)fn(r,s,e[s])}else{let s=r.display;if(o?n!==e&&(r.cssText=e):n&&t.removeAttribute("style"),"_ord"in ye(t).data)return;r.display=s}},fr=/\s*!important$/;function fn(t,e,n){if(T(n))n.forEach(r=>{fn(t,e,r)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let r=Do(t,e);fr.test(n)?t.setProperty(He(r),n.replace(fr,""),"important"):t[r]=n}}var lr=["Webkit","Moz","ms"],pn={};function Do(t,e){let n=pn[e];if(n)return n;let r=_(e);if(r!=="filter"&&r in t)return pn[e]=r;r=Ze(r);for(let o=0;o<lr.length;o++){let s=lr[o]+r;if(s in t)return pn[e]=s}return e}var J=t=>ur(B(t)),ur=(t,e=new WeakMap)=>{if(!t||!O(t))return t;if(T(t))return t.map(J);if(X(t)){let r=new Set;for(let o of t.keys())r.add(J(o));return r}if(de(t)){let r=new Map;for(let o of t)r.set(J(o[0]),J(o[1]));return r}if(e.has(t))return B(e.get(t));let n={...t};e.set(t,n);for(let r of Object.entries(n))n[r[0]]=ur(B(r[1]),e);return n};var mr={onChange:(t,e)=>{let n=e[0];t.textContent=X(n)?JSON.stringify(J([...n])):de(n)?JSON.stringify(J([...n])):O(n)?JSON.stringify(J(n)):n?.toString()??""}};var dr={onChange:(t,e)=>{Pe(t,"value",e[0])}};var we=t=>t?.[at]===1;var Ee=t=>{if(Be(t))return t;let e;if(d(t)?(e=t,t=e()):e=q(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[at]=1,T(t)){let n=t.length;for(let r=0;r<n;++r){let o=t[r];we(o)||(t[r]=Ee(o))}return e}if(!O(t))return e;for(let n of Object.entries(t)){let r=n[1];if(we(r))continue;let o=n[0];Je(o)||(t[o]=null,t[o]=Ee(r))}return e};var Y=class t{static getDefault(){return t.Ae??(t.Ae=new t)}j={};l={};We=()=>Object.keys(this.j).filter(e=>e.length===1||!e.startsWith(":"));fe=new Map;ue=new Map;static Ae;static rt="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console";forGrowThreshold=10;globalContext;useInterpolation=!0;constructor(e){if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.ot()}ot(){let e={},n=globalThis;for(let r of t.rt.split(","))e[r]=n[r];return e.ref=Ee,e.sref=q,e.flatten=J,e}addComponent(...e){for(let n of e){if(!n.defaultName){Qe.warning("Registered component's default name is not defined",n);continue}this.fe.set(Ze(n.defaultName),n),this.ue.set(Ze(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.j={".":ir,":":on,"@":cn,[`${e}on`]:cn,[`${e}bind`]:on,[`${e}html`]:Gn,[`${e}text`]:mr,[`${e}show`]:cr,[`${e}model`]:Xn,":style":ln,[`${e}bind:style`]:ln,":class":sn,[`${e}bind:class`]:sn,":ref":ar,":value":dr,[`${e}teleport`]:mt},this.l={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,props:":props",propsOnce:":props-once",bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.j,this.l)}};var Mt=(t,e)=>{if(!t)return;let r=(e??Y.getDefault()).l,o=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of Ho(t,r.pre,s))Uo(i,r.text,o,s)},Uo=(t,e,n,r)=>{let o=t.textContent;if(!o)return;let s=n,i=o.split(s);if(i.length<=1)return;if(t.parentElement?.childNodes.length===1&&i.length===3){let c=i[1],f=hr(c,r);if(f&&$(i[0])&&$(i[2])){let p=t.parentElement;p.setAttribute(e,c.substring(f.start.length,c.length-f.end.length)),p.innerText="";return}}let a=document.createDocumentFragment();for(let c of i){let f=hr(c,r);if(f){let p=document.createElement("span");p.setAttribute(e,c.substring(f.start.length,c.length-f.end.length)),a.appendChild(p)}else a.appendChild(document.createTextNode(c))}t.replaceWith(a)},Ho=(t,e,n)=>{let r=[],o=s=>{if(s.nodeType===Node.TEXT_NODE)n.some(i=>s.textContent?.includes(i.start))&&r.push(s);else{if(s?.hasAttribute?.(e))return;for(let i of pe(s))o(i)}};return o(t),r},hr=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var _o=9,Bo=10,Vo=13,Po=32,xe=46,kt=44,jo=39,$o=34,Lt=40,je=41,It=91,Dt=93,un=63,Fo=59,yr=58,qo=123,Ut=125,dn=43,zo=45,gr=96,br=47,Ko=92,Tr=[2,3],Er=[dn,zo],wr={"-":1,"!":1,"~":1,"+":1,new:1},Or={"=":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},Fe={"=>":2,...Or,"||":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},Ar=Object.keys(Or),Wo=new Set(Ar),Ht=new Set;Ht.add("=>");Ar.forEach(t=>Ht.add(t));var Go=new Set(["$","_"]),xr={true:!0,false:!1,null:null},Jo="this";function Nr(t){return Math.max(0,...Object.keys(t).map(e=>e.length))}var Qo=Nr(wr),Xo=Nr(Fe),qe="Expected ",Oe="Unexpected ",yn="Unclosed ",Yo=qe+":",Cr=qe+"expression",Zo="missing }",es=Oe+"object property",ts=yn+"(",vr=qe+"comma",Rr=Oe+"token ",ns=Oe+"period",mn=qe+"expression after ",rs="missing unaryOp argument",os=yn+"[",ss=qe+"exponent (",is="Variable names cannot start with a number (",as=yn+'quote after "';var $e=t=>t>=48&&t<=57,Sr=t=>Fe[t]||0,hn=class{st={0:[this.it],1:[this.at,this.pt,this.ct],2:[this.lt,this.ft,this.ut,this.Ne,this.mt],3:[this.dt,this.yt,this.ht]};r;e;get M(){return this.r.charAt(this.e)}get f(){return this.r.charCodeAt(this.e)}m(e){return this.r.charCodeAt(this.e)===e}constructor(e){this.r=e,this.e=0}U(e){let n=String.fromCharCode(e);return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!(n in Fe)||Go.has(n)}re(e){return this.U(e)||$e(e)}i(e){return new Error(`${e} at character ${this.e}`)}k(e,n,r){let o=this.st[e];if(!o)return r;let s={node:r},i=a=>{a.call(this,s)};return n===0?o.forEach(i):o.find(i),s.node}y(){let e=this.f,n=this.r,r=this.e;for(;e===Po||e===_o||e===Bo||e===Vo;)e=n.charCodeAt(++r);this.e=r}parse(){let e=this.oe();return e.length===1?e[0]:{type:0,body:e}}oe(e){let n=[];for(;this.e<this.r.length;){let r=this.f;if(r===Fo||r===kt)this.e++;else{let o=this.O();if(o)n.push(o);else if(this.e<this.r.length){if(r===e)break;throw this.i(Oe+'"'+this.M+'"')}}}return n}O(){let e=this.k(0,1)??this.Me();return this.y(),this.k(1,0,e)}se(){this.y();let e=this.e,n=this.r,r=n.substr(e,Xo),o=r.length;for(;o>0;){if(r in Fe&&(!this.U(this.f)||e+r.length<n.length&&!this.re(n.charCodeAt(e+r.length))))return e+=o,this.e=e,r;r=r.substr(0,--o)}return!1}Me(){let e,n,r,o,s,i,a,c;if(s=this.$(),!s||(n=this.se(),!n))return s;if(o={value:n,prec:Sr(n),right_a:Ht.has(n)},i=this.$(),!i)throw this.i(mn+n);let f=[s,o,i];for(;n=this.se();){if(r=Sr(n),r===0){this.e-=n.length;break}o={value:n,prec:r,right_a:Ht.has(n)},c=n;let p=l=>o.right_a&&l.right_a?r>l.prec:r<=l.prec;for(;f.length>2&&p(f[f.length-2]);)i=f.pop(),n=f.pop().value,s=f.pop(),e={type:8,operator:n,left:s,right:i},f.push(e);if(e=this.$(),!e)throw this.i(mn+c);f.push(o,e)}for(a=f.length-1,e=f[a];a>1;)e={type:8,operator:f[a-1].value,left:f[a-2],right:e},a-=2;return e}$(){let e,n,r;if(this.y(),r=this.k(2,1),r)return this.k(3,0,r);let o=this.f;if($e(o)||o===xe)return this.gt();if(o===jo||o===$o)r=this.bt();else if(o===It)r=this.xt();else{for(e=this.r.substr(this.e,Qo),n=e.length;n>0;){if(Object.prototype.hasOwnProperty.call(wr,e)&&(!this.U(this.f)||this.e+e.length<this.r.length&&!this.re(this.r.charCodeAt(this.e+e.length)))){this.e+=n;let s=this.$();if(!s)throw this.i(rs);return this.k(3,0,{type:7,operator:e,argument:s})}e=e.substr(0,--n)}this.U(o)?(r=this.ie(),r.name in xr?r={type:4,value:xr[r.name],raw:r.name}:r.name===Jo&&(r={type:5})):o===Lt&&(r=this.Tt())}return r?(r=this.F(r),this.k(3,0,r)):this.k(3,0,!1)}F(e){this.y();let n=this.f;for(;n===xe||n===It||n===Lt||n===un;){let r;if(n===un){if(this.r.charCodeAt(this.e+1)!==xe)break;r=!0,this.e+=2,this.y(),n=this.f}if(this.e++,n===It){if(e={type:3,computed:!0,object:e,property:this.O()},this.y(),n=this.f,n!==Dt)throw this.i(os);this.e++}else n===Lt?e={type:6,arguments:this.ke(je),callee:e}:(n===xe||r)&&(r&&this.e--,this.y(),e={type:3,computed:!1,object:e,property:this.ie()});r&&(e.optional=!0),this.y(),n=this.f}return e}gt(){let e="",n;for(;$e(this.f);)e+=this.r.charAt(this.e++);if(this.m(xe))for(e+=this.r.charAt(this.e++);$e(this.f);)e+=this.r.charAt(this.e++);if(n=this.M,n==="e"||n==="E"){for(e+=this.r.charAt(this.e++),n=this.M,(n==="+"||n==="-")&&(e+=this.r.charAt(this.e++));$e(this.f);)e+=this.r.charAt(this.e++);if(!$e(this.r.charCodeAt(this.e-1)))throw this.i(ss+e+this.M+")")}let r=this.f;if(this.U(r))throw this.i(is+e+this.M+")");if(r===xe||e.length===1&&e.charCodeAt(0)===xe)throw this.i(ns);return{type:4,value:parseFloat(e),raw:e}}bt(){let e="",n=this.e,r=this.r.charAt(this.e++),o=!1;for(;this.e<this.r.length;){let s=this.r.charAt(this.e++);if(s===r){o=!0;break}else if(s==="\\")switch(s=this.r.charAt(this.e++),s){case"n":e+=`
|
|
2
|
+
`;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=s}else e+=s}if(!o)throw this.i(as+e+'"');return{type:4,value:e,raw:this.r.substring(n,this.e)}}ie(){let e=this.f,n=this.e;if(this.U(e))this.e++;else throw this.i(Oe+this.M);for(;this.e<this.r.length&&(e=this.f,this.re(e));)this.e++;return{type:2,name:this.r.slice(n,this.e)}}ke(e){let n=[],r=!1,o=0;for(;this.e<this.r.length;){this.y();let s=this.f;if(s===e){if(r=!0,this.e++,e===je&&o&&o>=n.length)throw this.i(Rr+String.fromCharCode(e));break}else if(s===kt){if(this.e++,o++,o!==n.length){if(e===je)throw this.i(Rr+",");if(e===Dt)for(let i=n.length;i<o;i++)n.push(null)}}else{if(n.length!==o&&o!==0)throw this.i(vr);{let i=this.O();if(!i||i.type===0)throw this.i(vr);n.push(i)}}}if(!r)throw this.i(qe+String.fromCharCode(e));return n}Tt(){this.e++;let e=this.oe(je);if(this.m(je))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(ts)}xt(){return this.e++,{type:9,elements:this.ke(Dt)}}lt(e){if(this.m(qo)){this.e++;let n=[];for(;!isNaN(this.f);){if(this.y(),this.m(Ut)){this.e++,e.node=this.F({type:10,properties:n});return}let r=this.O();if(!r)break;if(this.y(),r.type===2&&(this.m(kt)||this.m(Ut)))n.push({type:12,computed:!1,key:r,value:r,shorthand:!0});else if(this.m(yr)){this.e++;let o=this.O();if(!o)throw this.i(es);let s=r.type===9;n.push({type:12,computed:s,key:s?r.elements[0]:r,value:o,shorthand:!1}),this.y()}else r&&n.push(r);this.m(kt)&&this.e++}throw this.i(Zo)}}ft(e){let n=this.f;if(Er.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){this.e+=2;let r=e.node={type:13,operator:n===dn?"++":"--",argument:this.F(this.ie()),prefix:!0};if(!r.argument||!Tr.includes(r.argument.type))throw this.i(Oe+r.operator)}}yt(e){if(e.node){let n=this.f;if(Er.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){if(!Tr.includes(e.node.type))throw this.i(Oe+e.node.operator);this.e+=2,e.node={type:13,operator:n===dn?"++":"--",argument:e.node,prefix:!1}}}}ut(e){[0,1,2].every(n=>this.r.charCodeAt(this.e+n)===xe)&&(this.e+=3,e.node={type:14,argument:this.O()})}ct(e){if(e.node&&this.m(un)){this.e++;let n=e.node,r=this.O();if(!r)throw this.i(Cr);if(this.y(),this.m(yr)){this.e++;let o=this.O();if(!o)throw this.i(Cr);if(e.node={type:11,test:n,consequent:r,alternate:o},n.operator&&Fe[n.operator]<=.9){let s=n;for(;s.right.operator&&Fe[s.right.operator]<=.9;)s=s.right;e.node.test=s.right,s.right=e.node,e.node=n}}else throw this.i(Yo)}}it(e){if(this.y(),this.m(Lt)){let n=this.e;if(this.e++,this.y(),this.m(je)){this.e++;let r=this.se();if(r==="=>"){let o=this.Me();if(!o)throw this.i(mn+r);e.node={type:15,params:null,body:o};return}}this.e=n}}at(e){this.Le(e.node)}Le(e){e&&(Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.Le(n)}),e.operator==="=>"&&(e.type=15,e.params=e.left?[e.left]:null,e.body=e.right,e.params&&e.params[0].type===1&&(e.params=e.params[0].expressions),delete e.left,delete e.right,delete e.operator))}pt(e){e.node&&this.q(e.node)}q(e){Wo.has(e.operator)?(e.type=16,this.q(e.left),this.q(e.right)):e.operator||Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.q(n)})}ht(e){if(!e.node)return;let n=e.node.type;(n===2||n===3)&&this.m(gr)&&(e.node={type:17,tag:e.node,quasi:this.Ne(e)})}Ne(e){if(!this.m(gr))return;let n={type:19,quasis:[],expressions:[]},r="",o="",s=!1,i=this.r.length,a=()=>n.quasis.push({type:18,value:{raw:o,cooked:r},tail:s});for(;this.e<i;){let c=this.r.charAt(++this.e);if(c==="`")return this.e+=1,s=!0,a(),e.node=n,n;if(c==="$"&&this.r.charAt(this.e+1)==="{"){if(this.e+=2,a(),o="",r="",n.expressions.push(...this.oe(Ut)),!this.m(Ut))throw this.i("unclosed ${")}else if(c==="\\")switch(o+=c,c=this.r.charAt(++this.e),o+=c,c){case"n":r+=`
|
|
3
|
+
`;break;case"r":r+="\r";break;case"t":r+=" ";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;default:r+=c}else r+=c,o+=c}throw this.i("Unclosed `")}dt(e){let n=e.node;if(!n||n.operator!=="new"||!n.argument)return;if(!n.argument||![6,3].includes(n.argument.type))throw this.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}mt(e){if(!this.m(br))return;let n=++this.e,r=!1;for(;this.e<this.r.length;){if(this.f===br&&!r){let o=this.r.slice(n,this.e),s="";for(;++this.e<this.r.length;){let a=this.f;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.M;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.r.slice(n-1,this.e)},e.node=this.F(e.node),e.node}this.m(It)?r=!0:r&&this.m(Dt)&&(r=!1),this.e+=this.m(Ko)?2:1}throw this.i("Unclosed Regex")}},Mr=t=>new hn(t).parse();var cs={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(t,e)=>{},"+=":(t,e)=>{},"-=":(t,e)=>{},"<<=":(t,e)=>{},">>=":(t,e)=>{},">>>=":(t,e)=>{},"&=":(t,e)=>{},"^=":(t,e)=>{},"|=":(t,e)=>{},"||":(t,e)=>t()||e(),"??":(t,e)=>t()??e(),"&&":(t,e)=>t()&&e(),"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(t,e)=>t===e,"!==":(t,e)=>t!==e,"<":(t,e)=>t<e,">":(t,e)=>t>e,"<=":(t,e)=>t<=e,">=":(t,e)=>t>=e,in:(t,e)=>t in e,"<<":(t,e)=>t<<e,">>":(t,e)=>t>>e,">>>":(t,e)=>t>>>e,"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e)=>t%e,"**":(t,e)=>t**e},ps={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},Dr=t=>{if(!t?.some(Ir))return t;let e=[];return t.forEach(n=>Ir(n)?e.push(...n):e.push(n)),e},kr=(...t)=>Dr(t),gn=(t,e)=>{if(!t)return e;let n=Object.create(e??{});return n.$event=t,n},fs={"++":(t,e)=>{let n=t[e];if(d(n)){let r=n();return n(++r),r}return++t[e]},"--":(t,e)=>{let n=t[e];if(d(n)){let r=n();return n(--r),r}return--t[e]}},ls={"++":(t,e)=>{let n=t[e];if(d(n)){let r=n();return n(r+1),r}return t[e]++},"--":(t,e)=>{let n=t[e];if(d(n)){let r=n();return n(r-1),r}return t[e]--}},Lr={"=":(t,e,n)=>{let r=t[e];return d(r)?r(n):t[e]=n},"+=":(t,e,n)=>{let r=t[e];return d(r)?r(r()+n):t[e]+=n},"-=":(t,e,n)=>{let r=t[e];return d(r)?r(r()-n):t[e]-=n},"*=":(t,e,n)=>{let r=t[e];return d(r)?r(r()*n):t[e]*=n},"/=":(t,e,n)=>{let r=t[e];return d(r)?r(r()/n):t[e]/=n},"%=":(t,e,n)=>{let r=t[e];return d(r)?r(r()%n):t[e]%=n},"**=":(t,e,n)=>{let r=t[e];return d(r)?r(r()**n):t[e]**=n},"<<=":(t,e,n)=>{let r=t[e];return d(r)?r(r()<<n):t[e]<<=n},">>=":(t,e,n)=>{let r=t[e];return d(r)?r(r()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let r=t[e];return d(r)?r(r()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let r=t[e];return d(r)?r(r()|n):t[e]|=n},"&=":(t,e,n)=>{let r=t[e];return d(r)?r(r()&n):t[e]&=n},"^=":(t,e,n)=>{let r=t[e];return d(r)?r(r()^n):t[e]^=n}},_t=(t,e)=>U(t)?t.bind(e):t,bn=class{u;Ve;Ie;De;A;Ue;Be;constructor(e,n,r,o,s){this.u=T(e)?e:[e],this.Ve=n,this.Ie=r,this.De=o,this.Be=!!s}Pe(e,n){if(n&&e in n)return n;for(let r of this.u)if(e in r)return r}2(e,n,r){let o=e.name;if(o==="$root")return this.u[this.u.length-1];if(o==="$parent")return this.u[1];if(o==="$ctx")return[...this.u];if(r&&o in r)return this.A=r[o],_t(B(r[o]),r);for(let i of this.u)if(o in i)return this.A=i[o],_t(B(i[o]),i);let s=this.Ve;if(s&&o in s)return this.A=s[o],_t(B(s[o]),s)}5(e,n,r){return this.u[0]}0(e,n,r){return this.He(n,r,kr,...e.body)}1(e,n,r){return this.R(n,r,(...o)=>o.pop(),...e.expressions)}3(e,n,r){let{obj:o,key:s}=this.ae(e,n,r),i=o?.[s];return this.A=i,_t(B(i),o)}4(e,n,r){return e.value}6(e,n,r){let o=(i,...a)=>U(i)?i(...Dr(a)):i,s=this.R(++n,r,o,e.callee,...e.arguments);return this.A=s,s}7(e,n,r){return this.R(n,r,ps[e.operator],e.argument)}8(e,n,r){let o=cs[e.operator];switch(e.operator){case"||":case"&&":case"??":return o(()=>this.g(e.left,n,r),()=>this.g(e.right,n,r))}return this.R(n,r,o,e.left,e.right)}9(e,n,r){return this.He(++n,r,kr,...e.elements)}10(e,n,r){let o={},s=(...i)=>{i.forEach(a=>{Object.assign(o,a)})};return this.R(++n,r,s,...e.properties),o}11(e,n,r){return this.R(n,r,o=>this.g(o?e.consequent:e.alternate,n,r),e.test)}12(e,n,r){let o={},s=p=>p?.type!==15,i=this.De??(()=>!1),a=n===0&&this.Be,c=p=>this._e(a,e.key,n,gn(p,r)),f=p=>this._e(a,e.value,n,gn(p,r));if(e.shorthand){let p=e.key.name;o[p]=s(e.key)&&i(p,n)?c:c()}else if(e.computed){let p=B(c());o[p]=s(e.value)&&i(p,n)?f:f()}else{let p=e.key.type===4?e.key.value:e.key.name;o[p]=s(e.value)&&i(p,n)?()=>f:f()}return o}ae(e,n,r){let o=this.g(e.object,n,r),s=e.computed?this.g(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?fs:ls;if(o.type===2){let a=o.name,c=this.Pe(a,r);return ee(c)?void 0:i[s](c,a)}if(o.type===3){let{obj:a,key:c}=this.ae(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.Pe(i,r);if(ee(a))return;let c=this.g(e.right,n,r);return Lr[s](a,i,c)}if(o.type===3){let{obj:i,key:a}=this.ae(o,n,r),c=this.g(e.right,n,r);return Lr[s](i,a,c)}}14(e,n,r){let o=this.g(e.argument,n,r);return T(o)&&(o.s=Ur),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.R(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.R(n,r,o,e.callee,...e.arguments)}15(e,n,r){return(...o)=>{let s=Object.create(r??{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=o[a++]}return this.g(e.body,n,s)}}g(e,n,r){let o=B(this[e.type](e,n,r));return this.Ue=e.type,o}_e(e,n,r,o){let s=this.g(n,r,o);return e&&this.je()?this.A:s}je(){let e=this.Ue;return(e===2||e===3||e===6)&&d(this.A)}eval(e,n){let{value:r,refs:o}=Et(()=>this.g(e,-1,n)),s={value:r,refs:o};return this.je()&&(s.ref=this.A),s}R(e,n,r,...o){let s=o.map(i=>i&&this.g(i,e,n));return r(...s)}He(e,n,r,...o){let s=this.Ie;if(!s)return this.R(e,n,r,...o);let i=o.map((a,c)=>a&&(a.type!==15&&s(c,e)?f=>this.g(a,e,gn(f,n)):this.g(a,e,n)));return r(...i)}},Ur=Symbol("s"),Ir=t=>t?.s===Ur,Hr=(t,e,n,r,o,s,i)=>new bn(e,n,r,o,i).eval(t,s);var _r={},Bt=class{u;o;constructor(e,n){this.u=e,this.o=n}S(e){this.u=[e,...this.u]}me(){return this.u.map(n=>n.components).filter(n=>!!n).reverse().reduce((n,r)=>{for(let[o,s]of Object.entries(r))n[o.toUpperCase()]=s;return n},{})}ze(){let e=[],n=new Set,r=this.u.map(o=>o.components).filter(o=>!!o).reverse();for(let o of r)for(let s of Object.keys(o))n.has(s)||(n.add(s),e.push(s));return e}C(e,n,r,o,s){let i=q([]),a=[],c=()=>{for(let u of a)u();a.length=0},f={value:i,stop:c,refs:[],context:this.u[0]};if($(e))return f;let p=this.o.globalContext,l=[],b=(u,y,m,x)=>{try{let g=Hr(u,y,p,n,r,x,o);return m&&l.push(...g.refs),{value:g.value,refs:g.refs,ref:g.ref}}catch(g){L(6,`evaluation error: ${e}`,g)}return{value:void 0,refs:[]}};try{let u=_r[e]??Mr("["+e+"]");_r[e]=u;let y=this.u,m=()=>{l.splice(0),c();let x=u.elements.map((g,M)=>n?.(M,-1)?{value:A=>b(g,y,!1,{$event:A}).value,refs:[]}:b(g,y,!0));if(!s)for(let g of l){let M=S(g,m);a.push(M)}f.refs=x.map(g=>g.ref),i(x.map(g=>g.value))};m()}catch(u){L(6,`parse error: ${e}`,u)}return f}V(){return this.u}$e=[];te(e){this.$e.push(this.u),this.u=e}v(e,n){try{this.te(e),n()}finally{this.Et()}}Et(){this.u=this.$e.pop()??[]}};var Br=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},us=(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},ms=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
|
|
4
|
+
`);)++n;if(n>=t.length||!Br(t[n]))return null;let r=n;for(;n<t.length&&Br(t[n]);)++n;return{start:r,end:n}},Vr=new Set(["table","thead","tbody","tfoot"]),ds=new Set(["thead","tbody","tfoot"]),hs=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),Vt=t=>{let e=0,n=[],r=[],o=0;for(;e<t.length;){let s=t.indexOf("<",e);if(s===-1){n.push(t.slice(e));break}if(n.push(t.slice(e,s)),t.startsWith("<!--",s)){let m=t.indexOf("-->",s+4);if(m===-1){n.push(t.slice(s));break}n.push(t.slice(s,m+3)),e=m+3;continue}let i=us(t,s);if(i===-1){n.push(t.slice(s));break}let a=t.slice(s,i+1),c=a.startsWith("</");if(a.startsWith("<!")||a.startsWith("<?")){n.push(a),e=i+1;continue}let p=ms(a,c);if(!p){n.push(a),e=i+1;continue}let l=a.slice(p.start,p.end);if(c){let m=r[r.length-1];m?(r.pop(),n.push(m.replacementHost?`</${m.replacementHost}>`:a),Vr.has(m.effectiveTag)&&--o):n.push(a),e=i+1;continue}let b=a.charCodeAt(a.length-2)===47,u=r[r.length-1],y=null;if(o===0?l==="tr"?y="trx":l==="td"?y="tdx":l==="th"&&(y="thx"):ds.has(u?.effectiveTag??"")?y=l==="tr"?null:"tr":u?.effectiveTag==="table"?y=hs.has(l)?null:"tr":u?.effectiveTag==="tr"&&(y=l==="td"||l==="th"?null:"td"),y){let m=y==="trx"||y==="tdx"||y==="thx";n.push(`${a.slice(0,p.start)}${y} is="${m?`r-${l}`:`regor:${l}`}"${a.slice(p.end)}`)}else b&&u?.effectiveTag==="tr"?n.push(`${a.slice(0,a.length-2)}></${l}>`):n.push(a);if(!b){let m=y==="trx"?"tr":y==="tdx"?"td":y==="thx"?"th":y||l;r.push({replacementHost:y,effectiveTag:m}),Vr.has(m)&&++o}e=i+1}return n.join("")};var ys="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",gs=new Set(ys.toUpperCase().split(",")),bs="http://www.w3.org/2000/svg",Pr=(t,e)=>{se(t)?t.content.appendChild(e):t.appendChild(e)},Tn=(t,e,n,r)=>{let o=t.t;if(o){let i=n&&gs.has(o.toUpperCase())?document.createElementNS(bs,o.toLowerCase()):document.createElement(o),a=t.a;if(a)for(let f of Object.entries(a)){let p=f[0],l=f[1];p.startsWith("#")&&(l=p.substring(1),p="name"),i.setAttribute(ut(p,r),l)}let c=t.c;if(c)for(let f of c)Tn(f,i,n,r);Pr(e,i);return}let s=t.d;if(s){let i;switch(t.n??Node.TEXT_NODE){case Node.COMMENT_NODE:i=document.createComment(s);break;case Node.TEXT_NODE:i=document.createTextNode(s);break}if(i)Pr(e,i);else throw new Error("unsupported node type.")}},Ae=(t,e,n)=>{n??=Y.getDefault();let r=document.createDocumentFragment();if(!T(t))return Tn(t,r,!!e,n),r;for(let o of t)Tn(o,r,!!e,n);return r};var jr=(t,e={selector:"#app"},n)=>{H(e)&&(e={selector:"#app",template:e}),Bn(t)&&(t=t.context);let r=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!r||!ve(r))throw I(0);n||(n=Y.getDefault());let o=()=>{for(let a of[...r.childNodes])V(a)},s=a=>{for(let c of a)r.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(Vt(e.template));o(),s(a.childNodes),e.element=a}else if(e.json){let a=Ae(e.json,e.isSVG,n);o(),s(a.childNodes)}return n.useInterpolation&&Mt(r,n),new En(t,r,n).T(),D(r,()=>{he(t)}),dt(t),{context:t,unmount:()=>{V(r)},unbind:()=>{re(r)}}},En=class{Rt;Fe;o;h;p;constructor(e,n,r){this.Rt=e,this.Fe=n,this.o=r,this.h=new Bt([e],r),this.p=new St(this.h)}T(){this.p.H(this.Fe)}};var ze=t=>{if(T(t))return t.map(o=>ze(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=>[o,t.getAttribute(o)??""])));let r=pe(t);return r.length>0&&(e.c=[...r].map(o=>ze(o))),e};var $r=(t,e={})=>{T(e)&&(e={props:e}),H(t)&&(t={template:t});let n=e.context??(()=>({})),r=!1;if(t.element){let s=t.element;s.remove(),t.element=s}else if(t.selector){let s=document.querySelector(t.selector);if(!s)throw I(1,t.selector);s.remove(),t.element=s}else if(t.template){let s=document.createRange().createContextualFragment(Vt(t.template));t.element=s}else t.json&&(t.element=Ae(t.json,t.isSVG,e.config),r=!0);t.element||(t.element=document.createDocumentFragment()),(e.useInterpolation??!0)&&Mt(t.element,e.config??Y.getDefault());let o=t.element;if(!r&&((t.isSVG??(Ye(o)&&o.hasAttribute?.("isSVG")))||Ye(o)&&o.querySelector("[isSVG]"))){let s=o.content,i=s?[...s.childNodes]:[...o.childNodes],a=ze(i);t.element=Ae(a,!0,e.config)}return{context:n,template:t.element,inheritAttrs:e.inheritAttrs??!0,props:e.props,defaultName:e.defaultName}};var Fr=t=>{Ce()?.onMounted.push(t)};var qr=t=>{let e,n={},r=(...o)=>{if(o.length<=2&&0 in o)throw I(4);return e&&!n.isStopped?e(...o):(e=Ts(t,n),e(...o))};return r[W]=1,Te(r,!0),r.stop=()=>n.ref?.stop?.(),K(()=>r.stop(),!0),r},Ts=(t,e)=>{let n=e.ref??q(null);e.ref=n,e.isStopped=!1;let r=0,o=Se(()=>{if(r>0){o(),e.isStopped=!0,F(n);return}n(t()),++r});return n.stop=o,n};var zr=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return r&&!n.isStopped?r(...s):(r=Es(t,e,n),r(...s))};return o[W]=1,Te(o,!0),o.stop=()=>n.ref?.stop?.(),K(()=>o.stop(),!0),o},Es=(t,e,n)=>{let r=n.ref??q(null);n.ref=r,n.isStopped=!1;let o=0,s=a=>{if(o>0){r.stop(),n.isStopped=!0,F(r);return}r(e(...t.map(c=>c()))),++o},i=[];for(let a of t){let c=S(a,s);i.push(c)}return s(null),r.stop=()=>{i.forEach(a=>{a()})},r};var Kr=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return r&&!n.isStopped?r(...s):(r=xs(t,e,n),r(...s))};return o[W]=1,Te(o,!0),o.stop=()=>n.ref?.stop?.(),K(()=>o.stop(),!0),o},xs=(t,e,n)=>{let r=n.ref??q(null);n.ref=r,n.isStopped=!1;let o=0;return r.stop=S(t,s=>{if(o>0){r.stop(),n.isStopped=!0,F(r);return}r(e(s)),++o},!0),r};var Wr=t=>(t[ct]=1,t);var Gr=(t,e)=>{if(!e)throw I(5);let r=we(t)?Ee:a=>a,o=()=>localStorage.setItem(e,JSON.stringify(J(t()))),s=localStorage.getItem(e);if(s!=null)try{t(r(JSON.parse(s)))}catch(a){L(6,`persist: failed to parse data for key ${e}`,a),o()}else o();let i=Se(o);return K(i,!0),t};var xn=(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},Jr=xn;var Qr=(t,e,n)=>{let r=[],o=()=>{e(t.map(i=>i()))};for(let i of t)r.push(S(i,o));n&&o();let s=()=>{for(let i of r)i()};return K(s,!0),s};var Xr=t=>{if(!d(t))throw I(3,"observerCount");return t(void 0,void 0,2)};var Yr=t=>{Cn();try{t()}finally{vn()}},Cn=()=>{ie.stack||(ie.stack=[]),ie.stack.push(new Set)},vn=()=>{let t=ie.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 ie.stack;for(let n of e)try{F(n)}catch(r){console.error(r)}};
|