regor 1.3.1 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -271,8 +271,6 @@ Special thanks to the Vue team and its community for creating a thriving ecosyst
271
271
 
272
272
  Regor also utilizes [**Jsep**](https://github.com/EricSmekens/jsep), a fast and lightweight JavaScript expression parser. Jsep's contribution to Regor's functionality is greatly appreciated.
273
273
 
274
- Additionally, we would like to acknowledge the [**happy-dom**](https://github.com/capricorn86/happy-dom) library, which played a significant role in our testing process.
275
-
276
274
  We also extend a warm welcome to any future contributors who join the Regor project. Your contributions will play a vital role in shaping the framework's growth and evolution.
277
275
 
278
276
  Thank you to everyone who has contributed, inspired, and supported Regor's development journey. Your dedication and passion are invaluable.
package/dist/regor.d.ts CHANGED
@@ -42,16 +42,16 @@ export type IsNull<T> = [
42
42
  ] ? true : false;
43
43
  export type Equals<T, U> = T extends U ? (U extends T ? true : false) : false;
44
44
  export type RawTypes = string | Function | number | boolean | symbol | undefined | null | bigint | Map<unknown, unknown> | Set<unknown> | WeakMap<object, unknown> | WeakSet<object> | Node | EventTarget | Event | RawMarker | Date | RegExp | Promise<unknown> | Error;
45
- declare const RefSymbol: unique symbol;
46
45
  declare const RawSymbol: unique symbol;
47
46
  declare const ScopeSymbol: unique symbol;
48
- export type AnyRef = (newValue?: any, eventSource?: any) => any & {
49
- [RefSymbol]: true;
50
- };
51
- export type Ref<TValueType> = ((newValue?: RefContent<TValueType> | Ref<RefParam<TValueType>> | SRef<RefContent<TValueType>>, eventSource?: any) => RefContent<TValueType>) & {
47
+ export type BivariantAnyRefCall = {
48
+ bivarianceHack(newValue?: unknown, eventSource?: unknown): unknown;
49
+ }["bivarianceHack"];
50
+ export type AnyRef = BivariantAnyRefCall;
51
+ export type Ref<TValueType> = ((newValue?: RefContent<TValueType> | Ref<RefParam<TValueType>> | SRef<RefContent<TValueType>>, eventSource?: unknown) => RefContent<TValueType>) & {
52
52
  value: RefContent<TValueType>;
53
53
  };
54
- export type SRef<TValueType> = ((newValue?: TValueType | SRef<TValueType>, eventSource?: any) => SRefContent<TValueType>) & {
54
+ export type SRef<TValueType> = ((newValue?: TValueType | SRef<TValueType>, eventSource?: unknown) => SRefContent<TValueType>) & {
55
55
  value: SRefContent<TValueType>;
56
56
  };
57
57
  export type ComputedRef<TValueType> = SRef<TValueType> & {
@@ -74,7 +74,7 @@ export type FlattenRef<TRef> = TRef extends Array<infer V1> ? Array<FlattenRef<V
74
74
  [Key in keyof TRef]: FlattenRef<TRef[Key]>;
75
75
  };
76
76
  export type Flat<TValueType> = Equals<RefParam<TValueType>, FlattenRef<TValueType>> extends true ? RefParam<TValueType> : FlattenRef<TValueType>;
77
- export type ObserveCallback<TValueType> = (newValue: TValueType, eventSource?: any) => void;
77
+ export type ObserveCallback<TValueType> = (newValue: TValueType, eventSource?: unknown) => void;
78
78
  export type StopObserving = () => void;
79
79
  export declare interface IRegorContext extends Record<string, unknown> {
80
80
  components?: Record<string, Component>;
@@ -91,7 +91,7 @@ export interface Directive {
91
91
  * The refs in parseResult are still reactive. */
92
92
  once?: boolean;
93
93
  /** Called on every value change. */
94
- onChange?: (el: HTMLElement, values: any[], previousValues?: any[], option?: any, previousOption?: any, flags?: string[]) => void;
94
+ onChange?: (el: HTMLElement, values: unknown[], previousValues?: unknown[], option?: unknown, previousOption?: unknown, flags?: string[]) => void;
95
95
  /** Called on binding. Returns unbinder. */
96
96
  onBind?: (el: HTMLElement, parseResult: ParseResult, expr: string, option?: string, dynamicOption?: ParseResult, flags?: string[]) => Unbinder;
97
97
  }
@@ -209,7 +209,7 @@ export interface CreateComponentOptions<TContext extends IRegorContext | object
209
209
  * The props defined in the props list can be used with :foo or r-bind:foo syntax.
210
210
  * `<MyComponent :prop-kebab-1="1" r-bind:prop-kebab-2="x ? 1 : 0" :props="{ propFoo3: true, propFoo4: x ? 'a' : 'b' }></MyComponent>`
211
211
  * It is required to define prop-kebab-1 and prop-kebab-2 in the props list camelized.
212
- * It is not required to define propFoo3 and propFoo4 in the props list because it uses :props binding. :props binding enables binding to any property of component regardless it is explicitly defined in props list.
212
+ * It is not required to define propFoo3 and propFoo4 in the props list because it uses :props binding. :props binding enables binding to arbitrary component properties regardless they are explicitly defined in props list.
213
213
  */
214
214
  props?: string[];
215
215
  /** The default name of the component.
@@ -228,14 +228,17 @@ export declare const createComponent: <TContext extends IRegorContext | object =
228
228
  export declare const toFragment: (json: JSONTemplate | JSONTemplate[], isSVG?: boolean, config?: RegorConfig) => DocumentFragment;
229
229
  export declare const toJsonTemplate: (node: Element | Element[]) => JSONTemplate | JSONTemplate[];
230
230
  export declare const addUnbinder: (node: Node, unbinder: Unbinder) => void;
231
- export declare const getBindData: (node: any) => BindData;
231
+ export declare const getBindData: (node: object) => BindData;
232
232
  export declare const removeNode: (node: ChildNode) => void;
233
233
  export declare const unbind: (node: Node) => void;
234
234
  export declare const onMounted: (onMounted: OnMounted) => void;
235
235
  export declare const onUnmounted: (onUnmounted: OnUnmounted, noThrow?: boolean) => void;
236
236
  export declare const useScope: <TRegorContext extends IRegorContext | object>(context: () => TRegorContext) => Scope<TRegorContext>;
237
237
  export declare const computed: <TReturnType>(compute: () => TReturnType) => ComputedRef<UnwrapRef<TReturnType>>;
238
- export declare const computeMany: <TReturnType>(sources: AnyRef[], compute: (...values: any[]) => TReturnType) => ComputedRef<UnwrapRef<TReturnType>>;
238
+ export type ComputeManySourceValues<TSources extends readonly AnyRef[]> = {
239
+ [TIndex in keyof TSources]: UnwrapRef<TSources[TIndex]>;
240
+ };
241
+ export declare const computeMany: <const TSources extends readonly AnyRef[], TReturnType>(sources: TSources, compute: (...values: ComputeManySourceValues<TSources>) => TReturnType) => ComputedRef<UnwrapRef<TReturnType>>;
239
242
  export declare const computeRef: <TValueType extends AnyRef, TReturnType>(source: TValueType, compute: (value: UnwrapRef<TValueType>) => TReturnType) => ComputedRef<UnwrapRef<TReturnType>>;
240
243
  export declare const watchEffect: (effect: (onCleanup?: OnCleanup) => void) => StopObserving;
241
244
  export declare const silence: <TReturnType>(action: () => TReturnType) => TReturnType;
@@ -244,17 +247,20 @@ export declare const collectRefs: <TReturnType>(action: () => TReturnType) => {
244
247
  refs: AnyRef[];
245
248
  };
246
249
  export declare const warningHandler: {
247
- warning: (...data: any[]) => void;
250
+ warning: (...data: unknown[]) => void;
248
251
  };
249
252
  export declare const flatten: <TValueType>(reference: TValueType | Ref<TValueType> | SRef<TValueType> | ComputedRef<TValueType>) => Flat<TValueType>;
250
- export declare const isRaw: (value: any) => boolean;
253
+ export declare const isRaw: (value: unknown) => boolean;
251
254
  export type Raw<TValueType> = TValueType & RawMarker;
252
255
  export declare const markRaw: <TValueType extends object>(value: TValueType) => Raw<TValueType>;
253
256
  export declare const persist: <TRef extends AnyRef>(anyRef: TRef, key: string) => TRef;
254
- export declare const html: (templates: TemplateStringsArray, ...args: any[]) => string;
255
- export declare const raw: (templates: TemplateStringsArray, ...args: any[]) => string;
257
+ export declare const html: (templates: TemplateStringsArray, ...args: unknown[]) => string;
258
+ export declare const raw: (templates: TemplateStringsArray, ...args: unknown[]) => string;
256
259
  export declare const observe: <TValueType extends AnyRef>(source: TValueType, observer: ObserveCallback<UnwrapRef<TValueType>>, init?: boolean) => StopObserving;
257
- export declare const observeMany: (sources: AnyRef[], observer: ObserveCallback<any[]>, init?: boolean) => StopObserving;
260
+ export type ObserveManySourceValues<TSources extends readonly AnyRef[]> = {
261
+ [TIndex in keyof TSources]: UnwrapRef<TSources[TIndex]>;
262
+ };
263
+ export declare const observeMany: <const TSources extends readonly AnyRef[]>(sources: TSources, observer: (values: ObserveManySourceValues<TSources>) => void, init?: boolean) => StopObserving;
258
264
  export declare const observerCount: <TValueType extends AnyRef>(source: TValueType) => number;
259
265
  export declare const batch: (updater: () => void) => void;
260
266
  export declare const startBatch: () => void;
@@ -304,7 +310,7 @@ export declare const resume: <TValueType extends AnyRef>(source: TValueType) =>
304
310
  * @returns An sref object representing the input value.
305
311
  */
306
312
  export declare const sref: <TValueType>(value?: TValueType | (TValueType extends SRef<infer V2> ? SRef<UnwrapRef<V2>> : never) | (TValueType extends Array<infer V1> ? V1[] : never) | null) => IsNull<TValueType> extends true ? SRef<unknown> : SRef<SRefContent<TValueType>>;
307
- export declare const trigger: <TValueType extends AnyRef>(source: TValueType, eventSource?: any, isRecursive?: boolean) => void;
313
+ export declare const trigger: <TValueType extends AnyRef>(source: TValueType, eventSource?: unknown, isRecursive?: boolean) => void;
308
314
  export declare const unref: <TValueType>(value: TValueType) => UnwrapRef<TValueType>;
309
315
 
310
316
  export {};
@@ -254,13 +254,14 @@ var ComponentHead = class {
254
254
 
255
255
  // src/cleanup/getBindData.ts
256
256
  var getBindData = (node) => {
257
- const bindData = node[bindDataSymbol];
257
+ const bindableNode = node;
258
+ const bindData = bindableNode[bindDataSymbol];
258
259
  if (bindData) return bindData;
259
260
  const newBindData = {
260
261
  unbinders: [],
261
262
  data: {}
262
263
  };
263
- node[bindDataSymbol] = newBindData;
264
+ bindableNode[bindDataSymbol] = newBindData;
264
265
  return newBindData;
265
266
  };
266
267
 
@@ -292,7 +293,9 @@ var warning = (type, ...args) => {
292
293
  if (isString(item)) handler(item);
293
294
  else handler(item, ...item.args);
294
295
  };
295
- var warningHandler = { warning: console.warn };
296
+ var warningHandler = {
297
+ warning: console.warn
298
+ };
296
299
 
297
300
  // src/composition/onUnmounted.ts
298
301
  var onUnmounted = (onUnmounted2, noThrow) => {
@@ -1794,12 +1797,9 @@ var _ForBinder = class _ForBinder {
1794
1797
  const result = config.createContext(newValue, i2);
1795
1798
  const mountItem = MountList.__createItem(result.index, newValue);
1796
1799
  parser.__scoped(capturedContext, () => {
1797
- var _a2;
1800
+ var _a2, _b;
1798
1801
  parser.__push(result.ctx);
1799
- const insertParent = (_a2 = commentEnd.parentNode) != null ? _a2 : commentBegin.parentNode;
1800
- if (!insertParent) {
1801
- throw new Error("[r-for] cannot mount: missing anchor parent");
1802
- }
1802
+ const insertParent = (_b = (_a2 = commentEnd.parentNode) != null ? _a2 : commentBegin.parentNode) != null ? _b : parent;
1803
1803
  let start = nextSibling.previousSibling;
1804
1804
  const childNodes = [];
1805
1805
  for (const x of nodes) {
@@ -1839,6 +1839,9 @@ var _ForBinder = class _ForBinder {
1839
1839
  }
1840
1840
  };
1841
1841
  const updateDom = (newValues) => {
1842
+ const beginParent = commentBegin.parentNode;
1843
+ const endParent = commentEnd.parentNode;
1844
+ if (!beginParent || !endParent) return;
1842
1845
  let len = mountList.__length;
1843
1846
  if (isFunction(newValues)) newValues = newValues();
1844
1847
  const unrefedNewValue = unref(newValues[0]);
@@ -5302,7 +5305,10 @@ var computeManyOnce = (sources, compute, status) => {
5302
5305
  trigger(result);
5303
5306
  return;
5304
5307
  }
5305
- result(compute(...sources.map((x) => x())));
5308
+ const values = sources.map(
5309
+ (source) => source()
5310
+ );
5311
+ result(compute(...values));
5306
5312
  ++i;
5307
5313
  };
5308
5314
  const stopObservingList = [];
@@ -5416,7 +5422,9 @@ var raw = html;
5416
5422
  var observeMany = (sources, observer, init) => {
5417
5423
  const stopObservingList = [];
5418
5424
  const callObserver = () => {
5419
- observer(sources.map((y) => y()));
5425
+ observer(
5426
+ sources.map((source) => source())
5427
+ );
5420
5428
  };
5421
5429
  for (const source of sources) {
5422
5430
  stopObservingList.push(observe(source, callObserver));
@@ -1,4 +1,4 @@
1
- "use strict";var ct=Object.defineProperty,fo=Object.defineProperties,lo=Object.getOwnPropertyDescriptor,uo=Object.getOwnPropertyDescriptors,mo=Object.getOwnPropertyNames,In=Object.getOwnPropertySymbols;var Dn=Object.prototype.hasOwnProperty,ho=Object.prototype.propertyIsEnumerable;var pt=Math.pow,Qt=(t,e,n)=>e in t?ct(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ft=(t,e)=>{for(var n in e||(e={}))Dn.call(e,n)&&Qt(t,n,e[n]);if(In)for(var n of In(e))ho.call(e,n)&&Qt(t,n,e[n]);return t},Un=(t,e)=>fo(t,uo(e));var yo=(t,e)=>{for(var n in e)ct(t,n,{get:e[n],enumerable:!0})},go=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of mo(e))!Dn.call(t,o)&&o!==n&&ct(t,o,{get:()=>e[o],enumerable:!(r=lo(e,o))||r.enumerable});return t};var bo=t=>go(ct({},"__esModule",{value:!0}),t);var m=(t,e,n)=>Qt(t,typeof e!="symbol"?e+"":e,n);var _s={};yo(_s,{ComponentHead:()=>Be,RegorConfig:()=>ee,addUnbinder:()=>H,batch:()=>po,collectRefs:()=>xt,computeMany:()=>no,computeRef:()=>ro,computed:()=>to,createApp:()=>Yr,createComponent:()=>Zr,endBatch:()=>Mn,entangle:()=>$e,flatten:()=>X,getBindData:()=>Ee,html:()=>An,isDeepRef:()=>Me,isRaw:()=>Fe,isRef:()=>g,markRaw:()=>oo,observe:()=>A,observeMany:()=>ao,observerCount:()=>co,onMounted:()=>eo,onUnmounted:()=>J,pause:()=>Ut,persist:()=>so,raw:()=>io,ref:()=>le,removeNode:()=>V,resume:()=>Ht,silence:()=>Rt,sref:()=>G,startBatch:()=>Nn,toFragment:()=>Ie,toJsonTemplate:()=>Qe,trigger:()=>K,unbind:()=>ae,unref:()=>j,useScope:()=>Ct,warningHandler:()=>tt,watchEffect:()=>ke});module.exports=bo(_s);var He=Symbol(":regor");var ae=t=>{let e=[t];for(;e.length>0;){let n=e.shift();To(n);let r=n.childNodes;if(r)for(let o of r)e.push(o)}},To=t=>{let e=t[He];if(e){for(let n of e.unbinders)n();e.unbinders.splice(0),delete t[He]}};var V=t=>{t.remove(),setTimeout(()=>ae(t),1)};var B=t=>typeof t=="function",_=t=>typeof t=="string",Hn=t=>typeof t=="undefined",ne=t=>t==null||typeof t=="undefined",z=t=>typeof t!="string"||!(t!=null&&t.trim()),Eo=Object.prototype.toString,Xt=t=>Eo.call(t),be=t=>Xt(t)==="[object Map]",Z=t=>Xt(t)==="[object Set]",Yt=t=>Xt(t)==="[object Date]",et=t=>typeof t=="symbol",x=Array.isArray,N=t=>t!==null&&typeof t=="object";var Bn={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."},D=(t,...e)=>{let n=Bn[t];return new Error(B(n)?n.call(Bn,...e):n)};var lt=[],_n=()=>{let t={onMounted:[],onUnmounted:[]};return lt.push(t),t},Oe=t=>{let e=lt[lt.length-1];if(!e&&!t)throw D(2);return e},Pn=t=>{let e=Oe();return t&&en(t),lt.pop(),e},Zt=Symbol("csp"),en=t=>{let e=t,n=e[Zt];if(n){let r=Oe();if(n===r)return;r.onMounted.length>0&&n.onMounted.push(...r.onMounted),r.onUnmounted.length>0&&n.onUnmounted.push(...r.onUnmounted);return}e[Zt]=Oe()},ut=t=>t[Zt];var Te=t=>{var n,r;let e=(n=ut(t))==null?void 0:n.onUnmounted;e==null||e.forEach(o=>{o()}),(r=t.unmounted)==null||r.call(t)};var Be=class{constructor(e,n,r,o,s){m(this,"props");m(this,"start");m(this,"end");m(this,"ctx");m(this,"autoProps",!0);m(this,"entangle",!0);m(this,"enableSwitch",!1);m(this,"onAutoPropsAssigned");m(this,"pe");m(this,"emit",(e,n)=>{this.pe.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.pe=n,this.ctx=r,this.start=o,this.end=s}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)V(e),e=e.nextSibling;for(let r of this.ctx)Te(r)}};var Ee=t=>{let e=t[He];if(e)return e;let n={unbinders:[],data:{}};return t[He]=n,n};var H=(t,e)=>{Ee(t).unbinders.push(e)};var jn={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]})},k=(t,...e)=>{let n=jn[t],r=B(n)?n.call(jn,...e):n,o=tt.warning;o&&(_(r)?o(r):o(r,...r.args))},tt={warning:console.warn};var J=(t,e)=>{var n;(n=Oe(e))==null||n.onUnmounted.push(t)};var mt=Symbol("ref"),Q=Symbol("sref"),dt=Symbol("raw");var g=t=>(t==null?void 0:t[Q])===1;var A=(t,e,n)=>{if(!g(t))throw D(3,"observe");n&&e(t());let o=t(void 0,void 0,0,e);return J(o,!0),o};var yt={},ht={},Vn=1,$n=t=>{let e=(Vn++).toString();return yt[e]=t,ht[e]=0,e},tn=t=>{ht[t]+=1},nn=t=>{--ht[t]===0&&(delete yt[t],delete ht[t])},Fn=t=>yt[t],rn=()=>Vn!==1&&Object.keys(yt).length>0,nt="r-switch",Co=t=>{let e=t.filter(r=>Ae(r)).map(r=>[...r.querySelectorAll("[r-switch]")].map(o=>o.getAttribute(nt))),n=new Set;return e.forEach(r=>{r.forEach(o=>o&&n.add(o))}),[...n]},_e=(t,e)=>{if(!rn())return;let n=Co(e);n.length!==0&&(n.forEach(tn),H(t,()=>{n.forEach(nn)}))};var on=(t,e,n,r)=>{let o=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,r),o.push(i)}Re(e,o)},sn=Symbol("r-if"),qn=Symbol("r-else"),zn=t=>t[qn]===1,gt=class{constructor(e){m(this,"p");m(this,"B");m(this,"K");m(this,"z");m(this,"W");m(this,"b");m(this,"T");this.p=e,this.B=e.o.f.if,this.K=je(e.o.f.if),this.z=e.o.f.else,this.W=e.o.f.elseif,this.b=e.o.f.for,this.T=e.o.f.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=Ce(e,this.K);for(let o of r)this.x(o);return n}G(e){return e[sn]?!0:(e[sn]=!0,Ce(e,this.K).forEach(n=>n[sn]=!0),!1)}x(e){if(e.hasAttribute(this.T)||this.G(e)||this.qe(e,this.b))return;let n=e.getAttribute(this.B);if(!n){k(0,this.B,e);return}e.removeAttribute(this.B),this.L(e,n)}P(e,n,r){let o=Pe(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${r!=null?r:""}`);s.insertBefore(i,e),_e(i,o),o.forEach(c=>{V(c)}),e.remove(),n!=="if"&&(e[qn]=1);let a=document.createComment(`__end__ :${n}${r!=null?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:()=>{on(o,this.p,s,a)},unmount:()=>{me(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} `),p=this.p.h.C(o),f=p.value,l=this.ce(r,n),u=[];H(a,()=>{p.stop();for(let d of u)d();u.length=0});let h=A(f,n);return u.push(h),[{mount:()=>{on(s,this.p,i,c)},unmount:()=>{me(a,c)},isTrue:()=>!!f()[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),p=c.value,f=!1,l=this.p.h,u=l.V(),y=()=>{l.v(u,()=>{if(p()[0])f||(on(o,this.p,s,a),f=!0),h.forEach(E=>{E.unmount(),E.isMounted=!1});else{me(i,a),f=!1;let E=!1;for(let L of h)!E&&L.isTrue()?(L.isMounted||(L.mount(),L.isMounted=!0),E=!0):(L.unmount(),L.isMounted=!1)}})},h=this.ce(r,y),d=[];H(i,()=>{c.stop();for(let E of d)E();d.length=0}),y();let C=A(p,y);d.push(C)}};var Pe=t=>{let e=pe(t)?t.content.childNodes:[t];return Array.from(e).filter(n=>{let r=n==null?void 0:n.tagName;return r!=="SCRIPT"&&r!=="STYLE"})},Re=(t,e)=>{for(let n of e)zn(n)||t.H(n)},Ce=(t,e)=>{var r;let n=t.querySelectorAll(e);return(r=t.matches)!=null&&r.call(t,e)?[t,...n]:n},pe=t=>t instanceof HTMLTemplateElement,Ae=t=>t.nodeType===Node.ELEMENT_NODE,rt=t=>t.nodeType===Node.ELEMENT_NODE,Kn=t=>t instanceof HTMLSlotElement,de=t=>pe(t)?t.content.childNodes:t.childNodes,me=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let r=n.nextSibling;V(n),n=r}},xe=(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})},Wn=(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},je=t=>`[${CSS.escape(t)}]`,bt=(t,e)=>(t.startsWith("@")&&(t=e.f.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.f.dynamic)),t),an=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},Ro=/-(\w)/g,P=an(t=>t&&t.replace(Ro,(e,n)=>n?n.toUpperCase():"")),xo=/\B([A-Z])/g,Ve=an(t=>t&&t.replace(xo,"-$1").toLowerCase()),ot=an(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var Tt={};var Et=t=>{var n,r;let e=(n=ut(t))==null?void 0:n.onMounted;e==null||e.forEach(o=>{o()}),(r=t.mounted)==null||r.call(t)};var cn=Symbol("scope"),Ct=t=>{try{_n();let e=t();en(e);let n={context:e,unmount:()=>Te(e),[cn]:1};return n[cn]=1,n}finally{Pn()}},Gn=t=>N(t)?cn in t:!1;var Jn={collectRefObj:!0,onBind:(t,e)=>A(e.value,()=>{let r=e.value(),o=e.context,s=r[0];if(N(s))for(let i of Object.entries(s)){let a=i[0],c=i[1],p=o[a];p!==c&&(g(p)?p(c):o[a]=c)}},!0)};var Qn={collectRefObj:!0,once:!0,onBind:(t,e)=>{let n=e.value(),r=e.context,o=n[0];if(!N(o))return()=>{};for(let s of Object.entries(o)){let i=s[0],a=s[1],c=r[i];c!==a&&(g(c)?c(a):r[i]=a)}return()=>{}}};var $e=(t,e)=>{if(t===e)return()=>{};let n=A(t,o=>e(o)),r=A(e,o=>t(o));return e(t()),()=>{n(),r()}};var Fe=t=>!!t&&t[dt]===1;var Me=t=>(t==null?void 0:t[mt])===1;var re=[],Xn=t=>{var e;re.length!==0&&((e=re[re.length-1])==null||e.add(t))},ke=t=>{if(!t)return()=>{};let e={stop:()=>{}};return vo(t,e),J(()=>e.stop(),!0),e.stop},vo=(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(re.push(s),t(i=>n.push(i)),r)return;for(let i of[...s]){let a=A(i,()=>{o(),ke(t)});n.push(a)}}finally{re.pop()}},Rt=t=>{let e=re.length,n=e>0&&re[e-1];try{return n&&re.push(null),t()}finally{n&&re.pop()}},xt=t=>{try{let e=new Set;return re.push(e),{value:t(),refs:[...e]}}finally{re.pop()}};var K=(t,e,n)=>{if(!g(t))return;let r=t;if(r(void 0,e,1),!n)return;let o=r();if(o){if(x(o)||Z(o))for(let s of o)K(s,e,!0);else if(be(o))for(let s of o)K(s[0],e,!0),K(s[1],e,!0);if(N(o))for(let s in o)K(o[s],e,!0)}};function So(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var qe=(t,e,n)=>{n.forEach(function(r){let o=t[r];So(e,r,function(...i){let a=o.apply(this,i),c=this[Q];for(let p of c)K(p);return a})})},vt=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var Yn=Array.prototype,pn=Object.create(Yn),wo=["push","pop","shift","unshift","splice","sort","reverse"];qe(Yn,pn,wo);var Zn=Map.prototype,St=Object.create(Zn),Oo=["set","clear","delete"];vt(St,"Map");qe(Zn,St,Oo);var er=Set.prototype,wt=Object.create(er),Ao=["add","clear","delete"];vt(wt,"Set");qe(er,wt,Ao);var fe={},G=t=>{if(g(t)||Fe(t))return t;let e={auto:!0,_value:t},n=c=>N(c)?Q in c?!0:x(c)?(Object.setPrototypeOf(c,pn),!0):Z(c)?(Object.setPrototypeOf(c,wt),!0):be(c)?(Object.setPrototypeOf(c,St),!0):!1:!1,r=n(t),o=new Set,s=(c,p)=>{if(fe.stack&&fe.stack.length){fe.stack[fe.stack.length-1].add(a);return}o.size!==0&&Rt(()=>{for(let f of[...o.keys()])o.has(f)&&f(c,p)})},i=c=>{let p=c[Q];p||(c[Q]=p=new Set),p.add(a)},a=(...c)=>{if(!(2 in c)){let f=c[0],l=c[1];return 0 in c?e._value===f||g(f)&&(f=f(),e._value===f)?f:(n(f)&&i(f),e._value=f,e.auto&&s(f,l),e._value):(Xn(a),e._value)}switch(c[2]){case 0:{let f=c[3];if(!f)return()=>{};let l=u=>{o.delete(u)};return o.add(f),()=>{l(f)}}case 1:{let f=c[1],l=e._value;s(l,f);break}case 2:return o.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[Q]=1,xe(a,!1),r&&i(t),a};var le=t=>{if(Fe(t))return t;let e;if(g(t)?(e=t,t=e()):e=G(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[mt]=1,x(t)){let n=t.length;for(let r=0;r<n;++r){let o=t[r];Me(o)||(t[r]=le(o))}return e}if(!N(t))return e;for(let n of Object.entries(t)){let r=n[1];if(Me(r))continue;let o=n[0];et(o)||(t[o]=null,t[o]=le(r))}return e};var tr=Symbol("modelBridge"),No=t=>!!(t!=null&&t[tr]),Mo=t=>{t[tr]=1},ko=t=>{let e=le(t());return Mo(e),e},nr={collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(!r)return()=>{};let i=P(r),a,c,p=()=>{},f=()=>{p(),p=()=>{},a=void 0,c=void 0},l=()=>{p(),p=()=>{}},u=(h,d)=>{a!==h&&(l(),p=$e(h,d),a=h)},y=A(e.value,()=>{var C;let h=(C=e.refs[0])!=null?C:e.value()[0],d=e.context,T=d[i];if(!g(h)){if(c&&T===c){c(h);return}if(f(),g(T)){T(h);return}d[i]=h;return}if(No(h)){if(T===h)return;g(T)?u(h,T):d[i]=h;return}c||(c=ko(h)),d[i]=c,u(h,c)},!0);return()=>{p(),y()}}};var Ot=class{constructor(e){m(this,"p");m(this,"fe");this.p=e,this.fe=e.o.f.inherit}N(e){this.Ke(e)}Ke(e){var l;let n=this.p,r=n.h,o=n.o.le,s=n.o.ue,i=r.me(),a=r.ze(),c=[...o.keys(),...a,...[...o.keys()].map(Ve),...a.map(Ve)].join(",");if(z(c))return;let p=e.querySelectorAll(c),f=(l=e.matches)!=null&&l.call(e,c)?[e,...p]:p;for(let u of f){if(u.hasAttribute(n.T))continue;let y=u.parentNode;if(!y)continue;let h=u.nextSibling,d=P(u.tagName).toUpperCase(),T=i[d],C=T!=null?T:s.get(d);if(!C)continue;let E=C.template;if(!E)continue;let L=u.parentElement;if(!L)continue;let U=new Comment(" begin component: "+u.tagName),oe=new Comment(" end component: "+u.tagName);L.insertBefore(U,u),u.remove();let Xe=n.o.f.props,Ye=n.o.f.propsOnce,Wt=n.o.f.bind,Ze=(b,S)=>{let R={},W=b.hasAttribute(Xe),F=b.hasAttribute(Ye);return r.v(S,()=>{r.S(R),W&&n.x(Jn,b,Xe),F&&n.x(Qn,b,Ye);let v=C.props;if(!v||v.length===0)return;v=v.map(P);let q=new Map(v.map(Y=>[Y.toLowerCase(),Y]));for(let Y of v.concat(v.map(Ve))){let ue=b.getAttribute(Y);ue!==null&&(R[P(Y)]=ue,b.removeAttribute(Y))}let Gt=n.J.de(b,!1);for(let[Y,ue]of Gt.entries()){let[Jt,kn]=ue.Q;if(!kn)continue;let Ln=q.get(P(kn).toLowerCase());Ln&&(Jt!=="."&&Jt!==":"&&Jt!==Wt||n.x(nr,b,Y,!0,Ln,ue.X))}}),R},ge=[...r.V()],at=()=>{var W;let b=Ze(u,ge),S=new Be(b,u,ge,U,oe),R=Ct(()=>{var F;return(F=C.context(S))!=null?F:{}}).context;if(S.autoProps){for(let[F,v]of Object.entries(b))if(F in R){let q=R[F];if(q===v)continue;S.entangle&&g(q)&&g(v)&&H(U,$e(v,q))}else R[F]=v;(W=S.onAutoPropsAssigned)==null||W.call(S)}return{componentCtx:R,head:S}},{componentCtx:we,head:I}=at(),se=[...de(E)],w=se.length,M=u.childNodes.length===0,$=b=>{let S=b.parentElement;if(M){for(let v of[...b.childNodes])S.insertBefore(v,b);return}let R=b.name;z(R)&&(R=b.getAttributeNames().filter(v=>v.startsWith("#"))[0],z(R)?R="default":R=R.substring(1));let W=u.querySelector(`template[name='${R}'], template[\\#${R}]`);!W&&R==="default"&&(W=u.querySelector("template:not([name])"),W&&W.getAttributeNames().filter(v=>v.startsWith("#")).length>0&&(W=null));let F=v=>{I.enableSwitch&&r.v(ge,()=>{r.S(we);let q=Ze(b,r.V());r.v(ge,()=>{r.S(q);let Gt=r.V(),Y=$n(Gt);for(let ue of v)Ae(ue)&&(ue.setAttribute(nt,Y),tn(Y),H(ue,()=>{nn(Y)}))})})};if(W){let v=[...de(W)];for(let q of v)S.insertBefore(q,b);F(v)}else{if(R!=="default"){for(let q of[...de(b)])S.insertBefore(q,b);return}let v=[...de(u)].filter(q=>!pe(q));for(let q of v)S.insertBefore(q,b);F(v)}},O=b=>{if(!Ae(b))return;let S=b.querySelectorAll("slot");if(Kn(b)){$(b),b.remove();return}for(let R of S)$(R),R.remove()};(()=>{for(let b=0;b<w;++b)se[b]=se[b].cloneNode(!0),y.insertBefore(se[b],h),O(se[b])})(),L.insertBefore(oe,h);let De=()=>{if(!C.inheritAttrs)return;let b=se.filter(R=>R.nodeType===Node.ELEMENT_NODE);b.length>1&&(b=b.filter(R=>R.hasAttribute(this.fe)));let S=b[0];if(S)for(let R of u.getAttributeNames()){if(R===Xe||R===Ye)continue;let W=u.getAttribute(R);if(R==="class")S.classList.add(...W.split(" "));else if(R==="style"){let F=S.style,v=u.style;for(let q of v)F.setProperty(q,v.getPropertyValue(q))}else S.setAttribute(bt(R,n.o),W)}},ie=()=>{for(let b of u.getAttributeNames())!b.startsWith("@")&&!b.startsWith(n.o.f.on)&&u.removeAttribute(b)},Ue=()=>{De(),ie(),r.S(we),n.ye(u,!1),we.$emit=I.emit,Re(n,se),H(u,()=>{Te(we)}),H(U,()=>{ae(u)}),Et(we)};r.v(ge,Ue)}}};var fn=class{constructor(e){m(this,"he");m(this,"Q",[]);m(this,"X",[]);m(this,"ge",[]);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(z(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]=P(o[i])}s.includes("prop")&&(o[0]=".")}}},At=class{constructor(e){m(this,"p");m(this,"be");this.p=e,this.be=e.o.We()}de(e,n){let r=new Map;if(!rt(e))return r;let o=this.be,s=a=>{let c=a.getAttributeNames().filter(p=>o.some(f=>p.startsWith(f)));for(let p of c)r.has(p)||r.set(p,new fn(p)),r.get(p).ge.push(a)};if(s(e),!n)return r;let i=e.querySelectorAll("*");for(let a of i)s(a);return r}};var Lo=(t,e)=>{for(let n of t){let r=n.cloneNode(!0);e.appendChild(r)}},Nt=class{constructor(e){m(this,"p");m(this,"I");m(this,"Te");this.p=e,this.I=e.o.f.is,this.Te=je(this.I)+", [is]"}N(e){let n=e.hasAttribute(this.I),r=Ce(e,this.Te);for(let o of r)this.x(o);return n}x(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=Pe(e),o=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);o.insertBefore(s,e),_e(s,r),r.forEach(a=>{V(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n!=null?n:""}`);return o.insertBefore(i,s.nextSibling),{nodes:r,parent:o,commentBegin:s,commentEnd:i}}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,p=this.p.h,f=p.V(),l={name:""},u=pe(e)?r:[...r[0].childNodes],y=()=>{p.v(f,()=>{var L;let C=c()[0];if(N(C)&&(C.name?C=C.name:C=(L=Object.entries(p.me()).filter(U=>U[1]===C)[0])==null?void 0:L[0]),!_(C)||z(C)){me(s,i);return}if(l.name===C)return;me(s,i);let E=document.createElement(C);for(let U of e.getAttributeNames())U!==this.I&&E.setAttribute(U,e.getAttribute(U));Lo(u,E),o.insertBefore(E,i),this.p.H(E),l.name=C})},h=[];H(s,()=>{a.stop();for(let C of h)C();h.length=0}),y();let T=A(c,y);h.push(T)}};var j=t=>g(t)?t():t;var st=class{constructor(e){m(this,"R",[]);m(this,"_",new Map);m(this,"Y");this.Y=e}get w(){return this.R.length}Z(e){let n=this.Y(e.value);n!==void 0&&this._.set(n,e)}ee(e){var r;let n=this.Y((r=this.R[e])==null?void 0:r.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.R.push(e),this.Z(e)}Je(e,n){let r=this.w;for(let o=e;o<r;++o)this.R[o].order=o+1;n.order=e,this.R.splice(e,0,n),this.Z(n)}D(e){return this.R[e]}te(e,n){this.ee(e),this.R[e]=n,this.Z(n),n.order=e}xe(e){this.ee(e),this.R.splice(e,1);let n=this.w;for(let r=e;r<n;++r)this.R[r].order=r}Re(e){let n=this.w;for(let r=e;r<n;++r)this.ee(r);this.R.splice(e)}Ct(e){return this._.has(e)}Qe(e){var r;let n=this._.get(e);return(r=n==null?void 0:n.order)!=null?r:-1}};var ln=Symbol("r-for"),kt=class kt{constructor(e){m(this,"p");m(this,"b");m(this,"ne");m(this,"T");this.p=e,this.b=e.o.f.for,this.ne=je(this.b),this.T=e.o.f.pre}N(e){let n=e.hasAttribute(this.b),r=Ce(e,this.ne);for(let o of r)this.Xe(o);return n}G(e){return e[ln]?!0:(e[ln]=!0,Ce(e,this.ne).forEach(n=>n[ln]=!0),!1)}Xe(e){if(e.hasAttribute(this.T)||this.G(e))return;let n=e.getAttribute(this.b);if(!n){k(0,this.b,e);return}e.removeAttribute(this.b),this.Ye(e,n)}Ee(e){return ne(e)?[]:(B(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){var se;let r=this.Ze(n);if(!(r!=null&&r.list)){k(1,this.b,n,e);return}let o=this.p.o.f.key,s=this.p.o.f.keyBind,i=(se=e.getAttribute(o))!=null?se:e.getAttribute(s);e.removeAttribute(o),e.removeAttribute(s);let a=i?w=>{var M;return j((M=j(w))==null?void 0:M[i])}:w=>w,c=(w,M)=>a(w)===a(M),p=Pe(e),f=e.parentNode;if(!f)return;let l=`${this.b} => ${n}`,u=new Comment(`__begin__ ${l}`);f.insertBefore(u,e),_e(u,p),p.forEach(w=>{V(w)}),e.remove();let y=new Comment(`__end__ ${l}`);f.insertBefore(y,u.nextSibling);let h=this.p,d=h.h,T=d.V(),C=(w,M,$)=>{let O=r.createContext(M,w),te=st.Ge(O.index,M);return d.v(T,()=>{var b;d.S(O.ctx);let De=(b=y.parentNode)!=null?b:u.parentNode;if(!De)throw new Error("[r-for] cannot mount: missing anchor parent");let ie=$.previousSibling,Ue=[];for(let S of p){let R=S.cloneNode(!0);De.insertBefore(R,$),Ue.push(R)}for(Re(h,Ue),ie=ie.nextSibling;ie!==$;)te.items.push(ie),ie=ie.nextSibling}),te},E=(w,M)=>{let $=I.D(w).items,O=$[$.length-1].nextSibling;for(let te of $)V(te);I.te(w,C(w,M,O))},L=(w,M)=>{I.S(C(w,M,y))},U=w=>{for(let M of I.D(w).items)V(M)},oe=w=>{let M=I.w;for(let $=w;$<M;++$)I.D($).index($)},Xe=w=>{let M=I.w;B(w)&&(w=w());let $=j(w[0]);if(x($)&&$.length===0){me(u,y),I.Re(0);return}let O=0,te=Number.MAX_SAFE_INTEGER,De=M,ie=this.p.o.forGrowThreshold,Ue=()=>I.w<De+ie;for(let S of this.Ee(w[0])){let R=()=>{if(O<M){let W=I.D(O++);if(c(W.value,S))return;let F=I.Qe(a(S));if(F>=O&&F-O<10){if(--O,te=Math.min(te,O),U(O),I.xe(O),--M,F>O+1)for(let v=O;v<F-1&&v<M&&!c(I.D(O).value,S);)++v,U(O),I.xe(O),--M;R();return}Ue()?(I.Je(O-1,C(O,S,I.D(O-1).items[0])),te=Math.min(te,O-1),++M):E(O-1,S)}else L(O++,S)};R()}let b=O;for(M=I.w;O<M;)U(O++);I.Re(b),oe(te)},Ye=()=>{at=A(ge,Xe)},Wt=()=>{Ze.stop(),at()},Ze=d.C(r.list),ge=Ze.value,at,we=0,I=new st(a);for(let w of this.Ee(ge()[0]))I.S(C(we++,w,y));H(u,Wt),Ye()}Ze(e){var c,p;let n=kt.et.exec(e);if(!n)return;let r=(n[1]+((c=n[2])!=null?c:"")).split(",").map(f=>f.trim()),o=r.length>1?r.length-1:-1,s=o!==-1&&(r[o]==="index"||(p=r[o])!=null&&p.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:(f,l)=>{let u={},y=j(f);if(!a&&r.length===1)u[r[0]]=f;else if(x(y)){let d=0;for(let T of r)u[T]=y[d++]}else for(let d of r)u[d]=y[d];let h={ctx:u,index:G(-1)};return s&&(h.index=u[s.startsWith("#")?s.substring(1):s]=G(l)),h}}}};m(kt,"et",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var Mt=kt;var Lt=class{constructor(e){m(this,"h");m(this,"Ce");m(this,"ve");m(this,"Se");m(this,"we");m(this,"J");m(this,"o");m(this,"T");m(this,"Ae");this.h=e,this.o=e.o,this.ve=new Mt(this),this.Ce=new gt(this),this.Se=new Nt(this),this.we=new Ot(this),this.J=new At(this),this.T=this.o.f.pre,this.Ae=this.o.f.dynamic}tt(e){let n=pe(e)?[e]:e.querySelectorAll("template");for(let r of n){if(r.hasAttribute(this.T))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);Re(this,i)}}H(e){e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.T)||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){var s;let r=this.J.de(e,n),o=this.o.j;for(let[i,a]of r.entries()){let[c,p]=a.Q,f=(s=o[i])!=null?s:o[c];if(!f){console.error("directive not found:",c);continue}a.ge.forEach(l=>{this.x(f,l,i,!1,p,a.X)})}}x(e,n,r,o,s,i){if(n.hasAttribute(this.T))return;let a=n.getAttribute(r);n.removeAttribute(r);let c=p=>{let f=p.getAttribute(nt);return f||(p.parentElement?c(p.parentElement):null)};if(rn()){let p=c(n);if(p){this.h.v(Fn(p),()=>{this.L(e,n,a,s,i)});return}}this.L(e,n,a,s,i)}nt(e,n,r){if(e!==Tt)return!1;if(z(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,H(i,()=>{V(n)}),o.appendChild(n)}return!0}L(e,n,r,o,s){var T;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=[];H(n,()=>{i.stop(),f==null||f.stop();for(let C of a)C();a.length=0});let p=Wn(o,this.Ae),f;p&&(f=this.h.C(P(p),void 0,void 0,void 0,e.once));let l,u=()=>(l=i.value(),l),y,h=()=>f?(y=f.value()[0],y):(y=o,o),d=()=>{if(!e.onChange)return;let C=A(i.value,E=>{var oe;let L=l,U=y;(oe=e.onChange)==null||oe.call(e,n,u(),L,h(),U,s)});if(a.push(C),f){let E=A(f.value,L=>{var oe;let U=y;(oe=e.onChange)==null||oe.call(e,n,u(),U,h(),U,s)});a.push(E)}};e.once||d(),e.onBind&&a.push(e.onBind(n,i,r,o,f,s)),(T=e.onChange)==null||T.call(e,n,u(),void 0,h(),void 0,s)}};var rr="http://www.w3.org/1999/xlink",Io={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 Do(t){return!!t||t===""}var un={onChange:(t,e,n,r,o,s)=>{var a;if(r){s&&s.includes("camel")&&(r=P(r)),It(t,r,e[0],o);return}let i=e.length;for(let c=0;c<i;++c){let p=e[c];if(x(p)){let f=(a=n==null?void 0:n[c])==null?void 0:a[0],l=p[0],u=p[1];It(t,l,u,f)}else if(N(p))for(let f of Object.entries(p)){let l=f[0],u=f[1],y=n==null?void 0:n[c],h=y&&l in y?l:void 0;It(t,l,u,h)}else{let f=n==null?void 0:n[c],l=e[c++],u=e[c];It(t,l,u,f)}}}},It=(t,e,n,r)=>{if(r&&r!==e&&t.removeAttribute(r),ne(e)){k(3,name,t);return}if(!_(e)){k(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){ne(n)?t.removeAttributeNS(rr,e.slice(6,e.length)):t.setAttributeNS(rr,e,n);return}let o=e in Io;ne(n)||o&&!Do(n)?t.removeAttribute(e):t.setAttribute(e,o?"":n)};var mn={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n==null?void 0:n[o];if(x(s)){let a=s.length;for(let c=0;c<a;++c)or(t,s[c],i==null?void 0:i[c])}else or(t,s,i)}}},or=(t,e,n)=>{let r=t.classList,o=_(e),s=_(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 sr={onChange:(t,e)=>{let[n,r]=e;B(r)?r(t,n):t.innerHTML=n==null?void 0:n.toString()}};function Uo(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=he(t[r],e[r]);return n}function he(t,e){if(t===e)return!0;let n=Yt(t),r=Yt(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=et(t),r=et(e),n||r)return t===e;if(n=x(t),r=x(e),n||r)return n&&r?Uo(t,e):!1;if(n=N(t),r=N(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||!he(t[i],e[i]))return!1}}return String(t)===String(e)}function Dt(t,e){return t.findIndex(n=>he(n,e))}var ir=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var Ut=t=>{if(!g(t))throw D(3,"pause");t(void 0,void 0,3)};var Ht=t=>{if(!g(t))throw D(3,"resume");t(void 0,void 0,4)};var cr={onChange:(t,e)=>{Ho(t,e[0])},onBind:(t,e,n,r,o,s)=>Bo(t,e,s)},Ho=(t,e)=>{let n=ur(t);if(n&&pr(t))x(e)?e=Dt(e,ye(t))>-1:Z(e)?e=e.has(ye(t)):e=Fo(t,e),t.checked=e;else if(n&&fr(t))t.checked=he(e,ye(t));else if(n||mr(t))lr(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(dr(t)){let r=t.options,o=r.length,s=t.multiple;for(let i=0;i<o;i++){let a=r[i],c=ye(a);if(s)x(e)?a.selected=Dt(e,c)>-1:a.selected=e.has(c);else if(he(ye(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else k(7,t)},it=t=>(g(t)&&(t=t()),B(t)&&(t=t()),t?_(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}),pr=t=>t.type==="checkbox",fr=t=>t.type==="radio",lr=t=>t.type==="number"||t.type==="range",ur=t=>t.tagName==="INPUT",mr=t=>t.tagName==="TEXTAREA",dr=t=>t.tagName==="SELECT",Bo=(t,e,n)=>{let r=e.value,o=it(n==null?void 0:n.join(",")),s=it(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 k(8,t),()=>{};let a=()=>e.refs[0],c=ur(t);return c&&pr(t)?Po(t,a):c&&fr(t)?qo(t,a):c||mr(t)?_o(t,i,a,r):dr(t)?zo(t,a,r):(k(7,t),()=>{})},ar=/[.,' ·٫]/,_o=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=lr(t),a=()=>{!e.trim&&!it(r()[1]).trim||(t.value=t.value.trim())},c=u=>{let y=u.target;y.composing=1},p=u=>{let y=u.target;y.composing&&(y.composing=0,y.dispatchEvent(new Event(s)))},f=()=>{t.removeEventListener(s,l),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",p),t.removeEventListener("change",p)},l=u=>{let y=n();if(!y)return;let h=u.target;if(!h||h.composing)return;let d=h.value,T=it(r()[1]);if(i||T.number||T.int){if(T.int)d=parseInt(d);else{if(ar.test(d[d.length-1])&&d.split(ar).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(y()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else T.trim&&(d=d.trim());y(d)};return t.addEventListener(s,l),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",p),t.addEventListener("change",p),f},Po=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=ye(t),a=t.checked,c=s();if(x(c)){let p=Dt(c,i),f=p!==-1;a&&!f?c.push(i):!a&&f&&c.splice(p,1)}else Z(c)?a?c.add(i):c.delete(i):s($o(t,a))};return t.addEventListener(n,o),r},ye=t=>"_value"in t?t._value:t.value,hr="trueValue",jo="falseValue",yr="true-value",Vo="false-value",$o=(t,e)=>{let n=e?hr:jo;if(n in t)return t[n];let r=e?yr:Vo;return t.hasAttribute(r)?t.getAttribute(r):e},Fo=(t,e)=>{if(hr in t)return he(e,t.trueValue);let r=yr;return t.hasAttribute(r)?he(e,t.getAttribute(r)):he(e,!0)},qo=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=ye(t);s(i)};return t.addEventListener(n,o),r},zo=(t,e,n)=>{let r="change",o=()=>{t.removeEventListener(r,s)},s=()=>{let i=e();if(!i)return;let c=it(n()[1]).number,p=Array.prototype.filter.call(t.options,f=>f.selected).map(f=>c?ir(ye(f)):ye(f));if(t.multiple){let f=i();try{if(Ut(i),Z(f)){f.clear();for(let l of p)f.add(l)}else x(f)?(f.splice(0),f.push(...p)):i(p)}finally{Ht(i),K(i)}}else i(p[0])};return t.addEventListener(r,s),o};var Ko=["stop","prevent","capture","self","once","left","right","middle","passive"],Wo=t=>{let e={};if(z(t))return;let n=t.split(",");for(let r of Ko)e[r]=n.includes(r);return e},hn={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)=>{var f,l;if(o){let u=e.value(),y=j(o.value()[0]);return _(y)?dn(t,P(y),()=>e.value()[0],(f=s==null?void 0:s.join(","))!=null?f:u[1]):()=>{}}else if(r){let u=e.value();return dn(t,P(r),()=>e.value()[0],(l=s==null?void 0:s.join(","))!=null?l:u[1])}let i=[],a=()=>{i.forEach(u=>u())},c=e.value(),p=c.length;for(let u=0;u<p;++u){let y=c[u];if(B(y)&&(y=y()),N(y))for(let h of Object.entries(y)){let d=h[0],T=()=>{let E=e.value()[u];return B(E)&&(E=E()),E=E[d],B(E)&&(E=E()),E},C=y[d+"_flags"];i.push(dn(t,d,T,C))}else k(2,name,t)}return a}},Go=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e!=null||(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=p=>!(o&&!p.ctrlKey||s&&!p.shiftKey||i&&!p.altKey||a&&!p.metaKey);return r?[t,p=>c(p)?p.key.toUpperCase()===r.toUpperCase():!1]:[t,c]}return[t,n=>!0]},dn=(t,e,n,r)=>{if(z(e))return k(5,name,t),()=>{};let o=Wo(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=Go(e,r);let a=f=>{if(!i(f)||!n&&e==="submit"&&(o!=null&&o.prevent))return;let l=n(f);B(l)&&(l=l(f)),B(l)&&l(f)},c=()=>{t.removeEventListener(e,p,s)},p=f=>{if(!o){a(f);return}try{if(o.left&&f.button!==0||o.middle&&f.button!==1||o.right&&f.button!==2||o.self&&f.target!==t)return;o.stop&&f.stopPropagation(),o.prevent&&f.preventDefault(),a(f)}finally{o.once&&c()}};return t.addEventListener(e,p,s),c};var gr={onChange:(t,e,n,r,o,s)=>{if(r){s&&s.includes("camel")&&(r=P(r)),ze(t,r,e[0]);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(x(c)){let p=c[0],f=c[1];ze(t,p,f)}else if(N(c))for(let p of Object.entries(c)){let f=p[0],l=p[1];ze(t,f,l)}else{let p=e[a++],f=e[a];ze(t,p,f)}}}};function Jo(t){return!!t||t===""}var ze=(t,e,n)=>{if(ne(e)){k(3,name,t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(ae),1),t[e]=n!=null?n:"";return}let r=t.tagName;if(e==="value"&&r!=="PROGRESS"&&!r.includes("-")){t._value=n;let s=r==="OPTION"?t.getAttribute("value"):t.value,i=n!=null?n:"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let o=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=Jo(n):n==null&&s==="string"?(n="",o=!0):s==="number"&&(n=0,o=!0)}try{t[e]=n}catch(s){o||k(4,e,r,n,s)}o&&t.removeAttribute(e)};var br={once:!0,onBind:(t,e,n)=>{let r=e.value()[0],o=x(r),s=e.refs[0];return o?r.push(t):s?s==null||s(t):e.context[n]=t,()=>{if(o){let i=r.indexOf(t);i!==-1&&r.splice(i,1)}else s==null||s(null)}}};var Tr={onChange:(t,e)=>{let n=Ee(t).data,r=n._ord;Hn(r)&&(r=n._ord=t.style.display),!!e[0]?t.style.display=r:t.style.display="none"}};var bn={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n==null?void 0:n[o];if(x(s)){let a=s.length;for(let c=0;c<a;++c)Er(t,s[c],i==null?void 0:i[c])}else Er(t,s,i)}}},Er=(t,e,n)=>{let r=t.style,o=_(e);if(e&&!o){if(n&&!_(n))for(let s in n)e[s]==null&&gn(r,s,"");for(let s in e)gn(r,s,e[s])}else{let s=r.display;if(o?n!==e&&(r.cssText=e):n&&t.removeAttribute("style"),"_ord"in Ee(t).data)return;r.display=s}},Cr=/\s*!important$/;function gn(t,e,n){if(x(n))n.forEach(r=>{gn(t,e,r)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let r=Qo(t,e);Cr.test(n)?t.setProperty(Ve(r),n.replace(Cr,""),"important"):t[r]=n}}var Rr=["Webkit","Moz","ms"],yn={};function Qo(t,e){let n=yn[e];if(n)return n;let r=P(e);if(r!=="filter"&&r in t)return yn[e]=r;r=ot(r);for(let o=0;o<Rr.length;o++){let s=Rr[o]+r;if(s in t)return yn[e]=s}return e}var X=t=>xr(j(t)),xr=(t,e=new WeakMap)=>{if(!t||!N(t))return t;if(x(t))return t.map(X);if(Z(t)){let r=new Set;for(let o of t.keys())r.add(X(o));return r}if(be(t)){let r=new Map;for(let o of t)r.set(X(o[0]),X(o[1]));return r}if(e.has(t))return j(e.get(t));let n=ft({},t);e.set(t,n);for(let r of Object.entries(n))n[r[0]]=xr(j(r[1]),e);return n};var vr={onChange:(t,e)=>{var r;let n=e[0];t.textContent=Z(n)?JSON.stringify(X([...n])):be(n)?JSON.stringify(X([...n])):N(n)?JSON.stringify(X(n)):(r=n==null?void 0:n.toString())!=null?r:""}};var Sr={onChange:(t,e)=>{ze(t,"value",e[0])}};var ve=class ve{constructor(e){m(this,"j",{});m(this,"f",{});m(this,"We",()=>Object.keys(this.j).filter(e=>e.length===1||!e.startsWith(":")));m(this,"le",new Map);m(this,"ue",new Map);m(this,"forGrowThreshold",10);m(this,"globalContext");m(this,"useInterpolation",!0);if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.ot()}static getDefault(){var e;return(e=ve.Oe)!=null?e:ve.Oe=new ve}ot(){let e={},n=globalThis;for(let r of ve.rt.split(","))e[r]=n[r];return e.ref=le,e.sref=G,e.flatten=X,e}addComponent(...e){for(let n of e){if(!n.defaultName){tt.warning("Registered component's default name is not defined",n);continue}this.le.set(ot(n.defaultName),n),this.ue.set(ot(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.j={".":gr,":":un,"@":hn,[`${e}on`]:hn,[`${e}bind`]:un,[`${e}html`]:sr,[`${e}text`]:vr,[`${e}show`]:Tr,[`${e}model`]:cr,":style":bn,[`${e}bind:style`]:bn,":class":mn,[`${e}bind:class`]:mn,":ref":br,":value":Sr,[`${e}teleport`]:Tt},this.f={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.f)}};m(ve,"Oe"),m(ve,"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");var ee=ve;var Bt=(t,e)=>{if(!t)return;let r=(e!=null?e:ee.getDefault()).f,o=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of Yo(t,r.pre,s))Xo(i,r.text,o,s)},Xo=(t,e,n,r)=>{var c;let o=t.textContent;if(!o)return;let s=n,i=o.split(s);if(i.length<=1)return;if(((c=t.parentElement)==null?void 0:c.childNodes.length)===1&&i.length===3){let p=i[1],f=wr(p,r);if(f&&z(i[0])&&z(i[2])){let l=t.parentElement;l.setAttribute(e,p.substring(f.start.length,p.length-f.end.length)),l.innerText="";return}}let a=document.createDocumentFragment();for(let p of i){let f=wr(p,r);if(f){let l=document.createElement("span");l.setAttribute(e,p.substring(f.start.length,p.length-f.end.length)),a.appendChild(l)}else a.appendChild(document.createTextNode(p))}t.replaceWith(a)},Yo=(t,e,n)=>{let r=[],o=s=>{var i;if(s.nodeType===Node.TEXT_NODE)n.some(a=>{var c;return(c=s.textContent)==null?void 0:c.includes(a.start)})&&r.push(s);else{if((i=s==null?void 0:s.hasAttribute)!=null&&i.call(s,e))return;for(let a of de(s))o(a)}};return o(t),r},wr=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var Zo=9,es=10,ts=13,ns=32,Se=46,_t=44,rs=39,os=34,Pt=40,Ke=41,jt=91,Vt=93,Tn=63,ss=59,Or=58,is=123,$t=125,Cn=43,as=45,Ar=96,Nr=47,cs=92,Mr=[2,3],kr=[Cn,as],Br={"-":1,"!":1,"~":1,"+":1,new:1},_r={"=":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},Ge=Un(ft({"=>":2},_r),{"||":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}),Pr=Object.keys(_r),ps=new Set(Pr),Ft=new Set;Ft.add("=>");Pr.forEach(t=>Ft.add(t));var fs=new Set(["$","_"]),Lr={true:!0,false:!1,null:null},ls="this";function jr(t){return Math.max(0,...Object.keys(t).map(e=>e.length))}var us=jr(Br),ms=jr(Ge),Je="Expected ",Le="Unexpected ",xn="Unclosed ",ds=Je+":",Ir=Je+"expression",hs="missing }",ys=Le+"object property",gs=xn+"(",Dr=Je+"comma",Ur=Le+"token ",bs=Le+"period",En=Je+"expression after ",Ts="missing unaryOp argument",Es=xn+"[",Cs=Je+"exponent (",Rs="Variable names cannot start with a number (",xs=xn+'quote after "';var We=t=>t>=48&&t<=57,Hr=t=>Ge[t]||0,Rn=class{constructor(e){m(this,"st",{0:[this.it],1:[this.at,this.pt,this.ct],2:[this.ft,this.lt,this.ut,this.Ne,this.mt],3:[this.dt,this.yt,this.ht]});m(this,"r");m(this,"e");this.r=e,this.e=0}get M(){return this.r.charAt(this.e)}get l(){return this.r.charCodeAt(this.e)}m(e){return this.r.charCodeAt(this.e)===e}U(e){let n=String.fromCharCode(e);return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!(n in Ge)||fs.has(n)}re(e){return this.U(e)||We(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.l,n=this.r,r=this.e;for(;e===ns||e===Zo||e===es||e===ts;)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.l;if(r===ss||r===_t)this.e++;else{let o=this.A();if(o)n.push(o);else if(this.e<this.r.length){if(r===e)break;throw this.i(Le+'"'+this.M+'"')}}}return n}A(){var n;let e=(n=this.k(0,1))!=null?n:this.Me();return this.y(),this.k(1,0,e)}se(){this.y();let e=this.e,n=this.r,r=n.substr(e,ms),o=r.length;for(;o>0;){if(r in Ge&&(!this.U(this.l)||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:Hr(n),right_a:Ft.has(n)},i=this.$(),!i)throw this.i(En+n);let p=[s,o,i];for(;n=this.se();){if(r=Hr(n),r===0){this.e-=n.length;break}o={value:n,prec:r,right_a:Ft.has(n)},c=n;let f=l=>o.right_a&&l.right_a?r>l.prec:r<=l.prec;for(;p.length>2&&f(p[p.length-2]);)i=p.pop(),n=p.pop().value,s=p.pop(),e={type:8,operator:n,left:s,right:i},p.push(e);if(e=this.$(),!e)throw this.i(En+c);p.push(o,e)}for(a=p.length-1,e=p[a];a>1;)e={type:8,operator:p[a-1].value,left:p[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.l;if(We(o)||o===Se)return this.gt();if(o===rs||o===os)r=this.bt();else if(o===jt)r=this.Tt();else{for(e=this.r.substr(this.e,us),n=e.length;n>0;){if(Object.prototype.hasOwnProperty.call(Br,e)&&(!this.U(this.l)||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(Ts);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 Lr?r={type:4,value:Lr[r.name],raw:r.name}:r.name===ls&&(r={type:5})):o===Pt&&(r=this.xt())}return r?(r=this.F(r),this.k(3,0,r)):this.k(3,0,!1)}F(e){this.y();let n=this.l;for(;n===Se||n===jt||n===Pt||n===Tn;){let r;if(n===Tn){if(this.r.charCodeAt(this.e+1)!==Se)break;r=!0,this.e+=2,this.y(),n=this.l}if(this.e++,n===jt){if(e={type:3,computed:!0,object:e,property:this.A()},this.y(),n=this.l,n!==Vt)throw this.i(Es);this.e++}else n===Pt?e={type:6,arguments:this.ke(Ke),callee:e}:(n===Se||r)&&(r&&this.e--,this.y(),e={type:3,computed:!1,object:e,property:this.ie()});r&&(e.optional=!0),this.y(),n=this.l}return e}gt(){let e="",n;for(;We(this.l);)e+=this.r.charAt(this.e++);if(this.m(Se))for(e+=this.r.charAt(this.e++);We(this.l);)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++));We(this.l);)e+=this.r.charAt(this.e++);if(!We(this.r.charCodeAt(this.e-1)))throw this.i(Cs+e+this.M+")")}let r=this.l;if(this.U(r))throw this.i(Rs+e+this.M+")");if(r===Se||e.length===1&&e.charCodeAt(0)===Se)throw this.i(bs);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(xs+e+'"');return{type:4,value:e,raw:this.r.substring(n,this.e)}}ie(){let e=this.l,n=this.e;if(this.U(e))this.e++;else throw this.i(Le+this.M);for(;this.e<this.r.length&&(e=this.l,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.l;if(s===e){if(r=!0,this.e++,e===Ke&&o&&o>=n.length)throw this.i(Ur+String.fromCharCode(e));break}else if(s===_t){if(this.e++,o++,o!==n.length){if(e===Ke)throw this.i(Ur+",");if(e===Vt)for(let i=n.length;i<o;i++)n.push(null)}}else{if(n.length!==o&&o!==0)throw this.i(Dr);{let i=this.A();if(!i||i.type===0)throw this.i(Dr);n.push(i)}}}if(!r)throw this.i(Je+String.fromCharCode(e));return n}xt(){this.e++;let e=this.oe(Ke);if(this.m(Ke))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(gs)}Tt(){return this.e++,{type:9,elements:this.ke(Vt)}}ft(e){if(this.m(is)){this.e++;let n=[];for(;!isNaN(this.l);){if(this.y(),this.m($t)){this.e++,e.node=this.F({type:10,properties:n});return}let r=this.A();if(!r)break;if(this.y(),r.type===2&&(this.m(_t)||this.m($t)))n.push({type:12,computed:!1,key:r,value:r,shorthand:!0});else if(this.m(Or)){this.e++;let o=this.A();if(!o)throw this.i(ys);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(_t)&&this.e++}throw this.i(hs)}}lt(e){let n=this.l;if(kr.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){this.e+=2;let r=e.node={type:13,operator:n===Cn?"++":"--",argument:this.F(this.ie()),prefix:!0};if(!r.argument||!Mr.includes(r.argument.type))throw this.i(Le+r.operator)}}yt(e){if(e.node){let n=this.l;if(kr.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){if(!Mr.includes(e.node.type))throw this.i(Le+e.node.operator);this.e+=2,e.node={type:13,operator:n===Cn?"++":"--",argument:e.node,prefix:!1}}}}ut(e){[0,1,2].every(n=>this.r.charCodeAt(this.e+n)===Se)&&(this.e+=3,e.node={type:14,argument:this.A()})}ct(e){if(e.node&&this.m(Tn)){this.e++;let n=e.node,r=this.A();if(!r)throw this.i(Ir);if(this.y(),this.m(Or)){this.e++;let o=this.A();if(!o)throw this.i(Ir);if(e.node={type:11,test:n,consequent:r,alternate:o},n.operator&&Ge[n.operator]<=.9){let s=n;for(;s.right.operator&&Ge[s.right.operator]<=.9;)s=s.right;e.node.test=s.right,s.right=e.node,e.node=n}}else throw this.i(ds)}}it(e){if(this.y(),this.m(Pt)){let n=this.e;if(this.e++,this.y(),this.m(Ke)){this.e++;let r=this.se();if(r==="=>"){let o=this.Me();if(!o)throw this.i(En+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){ps.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(Ar)&&(e.node={type:17,tag:e.node,quasi:this.Ne(e)})}Ne(e){if(!this.m(Ar))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($t)),!this.m($t))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){var o;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&&((o=r==null?void 0:r.callee)==null?void 0:o.type)===3;)r=r.type===3?r.object:r.callee.object;r.type=20}mt(e){if(!this.m(Nr))return;let n=++this.e,r=!1;for(;this.e<this.r.length;){if(this.l===Nr&&!r){let o=this.r.slice(n,this.e),s="";for(;++this.e<this.r.length;){let a=this.l;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(jt)?r=!0:r&&this.m(Vt)&&(r=!1),this.e+=this.m(cs)?2:1}throw this.i("Unclosed Regex")}},Vr=t=>new Rn(t).parse();var vs={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(t,e)=>{},"+=":(t,e)=>{},"-=":(t,e)=>{},"<<=":(t,e)=>{},">>=":(t,e)=>{},">>>=":(t,e)=>{},"&=":(t,e)=>{},"^=":(t,e)=>{},"|=":(t,e)=>{},"||":(t,e)=>t()||e(),"??":(t,e)=>{var n;return(n=t())!=null?n:e()},"&&":(t,e)=>t()&&e(),"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(t,e)=>t===e,"!==":(t,e)=>t!==e,"<":(t,e)=>t<e,">":(t,e)=>t>e,"<=":(t,e)=>t<=e,">=":(t,e)=>t>=e,in:(t,e)=>t in e,"<<":(t,e)=>t<<e,">>":(t,e)=>t>>e,">>>":(t,e)=>t>>>e,"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e)=>t%e,"**":(t,e)=>pt(t,e)},Ss={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},zr=t=>{if(!(t!=null&&t.some(qr)))return t;let e=[];return t.forEach(n=>qr(n)?e.push(...n):e.push(n)),e},$r=(...t)=>zr(t),vn=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},ws={"++":(t,e)=>{let n=t[e];if(g(n)){let r=n();return n(++r),r}return++t[e]},"--":(t,e)=>{let n=t[e];if(g(n)){let r=n();return n(--r),r}return--t[e]}},Os={"++":(t,e)=>{let n=t[e];if(g(n)){let r=n();return n(r+1),r}return t[e]++},"--":(t,e)=>{let n=t[e];if(g(n)){let r=n();return n(r-1),r}return t[e]--}},Fr={"=":(t,e,n)=>{let r=t[e];return g(r)?r(n):t[e]=n},"+=":(t,e,n)=>{let r=t[e];return g(r)?r(r()+n):t[e]+=n},"-=":(t,e,n)=>{let r=t[e];return g(r)?r(r()-n):t[e]-=n},"*=":(t,e,n)=>{let r=t[e];return g(r)?r(r()*n):t[e]*=n},"/=":(t,e,n)=>{let r=t[e];return g(r)?r(r()/n):t[e]/=n},"%=":(t,e,n)=>{let r=t[e];return g(r)?r(r()%n):t[e]%=n},"**=":(t,e,n)=>{let r=t[e];return g(r)?r(pt(r(),n)):t[e]=pt(t[e],n)},"<<=":(t,e,n)=>{let r=t[e];return g(r)?r(r()<<n):t[e]<<=n},">>=":(t,e,n)=>{let r=t[e];return g(r)?r(r()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let r=t[e];return g(r)?r(r()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let r=t[e];return g(r)?r(r()|n):t[e]|=n},"&=":(t,e,n)=>{let r=t[e];return g(r)?r(r()&n):t[e]&=n},"^=":(t,e,n)=>{let r=t[e];return g(r)?r(r()^n):t[e]^=n}},qt=(t,e)=>B(t)?t.bind(e):t,Sn=class{constructor(e,n,r,o,s){m(this,"u");m(this,"Ve");m(this,"Ie");m(this,"De");m(this,"O");m(this,"Ue");m(this,"Be");this.u=x(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.O=r[o],qt(j(r[o]),r);for(let i of this.u)if(o in i)return this.O=i[o],qt(j(i[o]),i);let s=this.Ve;if(s&&o in s)return this.O=s[o],qt(j(s[o]),s)}5(e,n,r){return this.u[0]}0(e,n,r){return this.He(n,r,$r,...e.body)}1(e,n,r){return this.E(n,r,(...o)=>o.pop(),...e.expressions)}3(e,n,r){let{obj:o,key:s}=this.ae(e,n,r),i=o==null?void 0:o[s];return this.O=i,qt(j(i),o)}4(e,n,r){return e.value}6(e,n,r){let o=(i,...a)=>B(i)?i(...zr(a)):i,s=this.E(++n,r,o,e.callee,...e.arguments);return this.O=s,s}7(e,n,r){return this.E(n,r,Ss[e.operator],e.argument)}8(e,n,r){let o=vs[e.operator];switch(e.operator){case"||":case"&&":case"??":return o(()=>this.g(e.left,n,r),()=>this.g(e.right,n,r))}return this.E(n,r,o,e.left,e.right)}9(e,n,r){return this.He(++n,r,$r,...e.elements)}10(e,n,r){let o={},s=(...i)=>{i.forEach(a=>{Object.assign(o,a)})};return this.E(++n,r,s,...e.properties),o}11(e,n,r){return this.E(n,r,o=>this.g(o?e.consequent:e.alternate,n,r),e.test)}12(e,n,r){var f;let o={},s=l=>(l==null?void 0:l.type)!==15,i=(f=this.De)!=null?f:()=>!1,a=n===0&&this.Be,c=l=>this._e(a,e.key,n,vn(l,r)),p=l=>this._e(a,e.value,n,vn(l,r));if(e.shorthand){let l=e.key.name;o[l]=s(e.key)&&i(l,n)?c:c()}else if(e.computed){let l=j(c());o[l]=s(e.value)&&i(l,n)?p:p()}else{let l=e.key.type===4?e.key.value:e.key.name;o[l]=s(e.value)&&i(l,n)?()=>p:p()}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?ws:Os;if(o.type===2){let a=o.name,c=this.Pe(a,r);return ne(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(ne(a))return;let c=this.g(e.right,n,r);return Fr[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 Fr[s](i,a,c)}}14(e,n,r){let o=this.g(e.argument,n,r);return x(o)&&(o.s=Kr),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.E(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.E(n,r,o,e.callee,...e.arguments)}15(e,n,r){return(...o)=>{let s=Object.create(r!=null?r:{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=o[a++]}return this.g(e.body,n,s)}}g(e,n,r){let o=j(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.O:s}je(){let e=this.Ue;return(e===2||e===3||e===6)&&g(this.O)}eval(e,n){let{value:r,refs:o}=xt(()=>this.g(e,-1,n)),s={value:r,refs:o};return this.je()&&(s.ref=this.O),s}E(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.E(e,n,r,...o);let i=o.map((a,c)=>a&&(a.type!==15&&s(c,e)?p=>this.g(a,e,vn(p,n)):this.g(a,e,n)));return r(...i)}},Kr=Symbol("s"),qr=t=>(t==null?void 0:t.s)===Kr,Wr=(t,e,n,r,o,s,i)=>new Sn(e,n,r,o,i).eval(t,s);var Gr={},zt=class{constructor(e,n){m(this,"u");m(this,"o");m(this,"$e",[]);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){var y;let i=G([]),a=[],c=()=>{for(let h of a)h();a.length=0},p={value:i,stop:c,refs:[],context:this.u[0]};if(z(e))return p;let f=this.o.globalContext,l=[],u=(h,d,T,C)=>{try{let E=Wr(h,d,f,n,r,C,o);return T&&l.push(...E.refs),{value:E.value,refs:E.refs,ref:E.ref}}catch(E){k(6,`evaluation error: ${e}`,E)}return{value:void 0,refs:[]}};try{let h=(y=Gr[e])!=null?y:Vr("["+e+"]");Gr[e]=h;let d=this.u,T=()=>{l.splice(0),c();let C=h.elements.map((E,L)=>n!=null&&n(L,-1)?{value:U=>u(E,d,!1,{$event:U}).value,refs:[]}:u(E,d,!0));if(!s)for(let E of l){let L=A(E,T);a.push(L)}p.refs=C.map(E=>E.ref),i(C.map(E=>E.value))};T()}catch(h){k(6,`parse error: ${e}`,h)}return p}V(){return this.u}te(e){this.$e.push(this.u),this.u=e}v(e,n){try{this.te(e),n()}finally{this.Rt()}}Rt(){var e;this.u=(e=this.$e.pop())!=null?e:[]}};var Jr=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},As=(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},Ns=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
4
- `);)++n;if(n>=t.length||!Jr(t[n]))return null;let r=n;for(;n<t.length&&Jr(t[n]);)++n;return{start:r,end:n}},Qr=new Set(["table","thead","tbody","tfoot"]),Ms=new Set(["thead","tbody","tfoot"]),ks=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),Kt=t=>{var s;let e=0,n=[],r=[],o=0;for(;e<t.length;){let i=t.indexOf("<",e);if(i===-1){n.push(t.slice(e));break}if(n.push(t.slice(e,i)),t.startsWith("<!--",i)){let T=t.indexOf("-->",i+4);if(T===-1){n.push(t.slice(i));break}n.push(t.slice(i,T+3)),e=T+3;continue}let a=As(t,i);if(a===-1){n.push(t.slice(i));break}let c=t.slice(i,a+1),p=c.startsWith("</");if(c.startsWith("<!")||c.startsWith("<?")){n.push(c),e=a+1;continue}let l=Ns(c,p);if(!l){n.push(c),e=a+1;continue}let u=c.slice(l.start,l.end);if(p){let T=r[r.length-1];T?(r.pop(),n.push(T.replacementHost?`</${T.replacementHost}>`:c),Qr.has(T.effectiveTag)&&--o):n.push(c),e=a+1;continue}let y=c.charCodeAt(c.length-2)===47,h=r[r.length-1],d=null;if(o===0?u==="tr"?d="trx":u==="td"?d="tdx":u==="th"&&(d="thx"):Ms.has((s=h==null?void 0:h.effectiveTag)!=null?s:"")?d=u==="tr"?null:"tr":(h==null?void 0:h.effectiveTag)==="table"?d=ks.has(u)?null:"tr":(h==null?void 0:h.effectiveTag)==="tr"&&(d=u==="td"||u==="th"?null:"td"),d){let T=d==="trx"||d==="tdx"||d==="thx";n.push(`${c.slice(0,l.start)}${d} is="${T?`r-${u}`:`regor:${u}`}"${c.slice(l.end)}`)}else y&&(h==null?void 0:h.effectiveTag)==="tr"?n.push(`${c.slice(0,c.length-2)}></${u}>`):n.push(c);if(!y){let T=d==="trx"?"tr":d==="tdx"?"td":d==="thx"?"th":d||u;r.push({replacementHost:d,effectiveTag:T}),Qr.has(T)&&++o}e=a+1}return n.join("")};var Ls="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",Is=new Set(Ls.toUpperCase().split(",")),Ds="http://www.w3.org/2000/svg",Xr=(t,e)=>{pe(t)?t.content.appendChild(e):t.appendChild(e)},wn=(t,e,n,r)=>{var i;let o=t.t;if(o){let a=n&&Is.has(o.toUpperCase())?document.createElementNS(Ds,o.toLowerCase()):document.createElement(o),c=t.a;if(c)for(let f of Object.entries(c)){let l=f[0],u=f[1];l.startsWith("#")&&(u=l.substring(1),l="name"),a.setAttribute(bt(l,r),u)}let p=t.c;if(p)for(let f of p)wn(f,a,n,r);Xr(e,a);return}let s=t.d;if(s){let a;switch((i=t.n)!=null?i:Node.TEXT_NODE){case Node.COMMENT_NODE:a=document.createComment(s);break;case Node.TEXT_NODE:a=document.createTextNode(s);break}if(a)Xr(e,a);else throw new Error("unsupported node type.")}},Ie=(t,e,n)=>{n!=null||(n=ee.getDefault());let r=document.createDocumentFragment();if(!x(t))return wn(t,r,!!e,n),r;for(let o of t)wn(o,r,!!e,n);return r};var Yr=(t,e={selector:"#app"},n)=>{_(e)&&(e={selector:"#app",template:e}),Gn(t)&&(t=t.context);let r=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!r||!Ae(r))throw D(0);n||(n=ee.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(Kt(e.template));o(),s(a.childNodes),e.element=a}else if(e.json){let a=Ie(e.json,e.isSVG,n);o(),s(a.childNodes)}return n.useInterpolation&&Bt(r,n),new On(t,r,n).x(),H(r,()=>{Te(t)}),Et(t),{context:t,unmount:()=>{V(r)},unbind:()=>{ae(r)}}},On=class{constructor(e,n,r){m(this,"Et");m(this,"Fe");m(this,"o");m(this,"h");m(this,"p");this.Et=e,this.Fe=n,this.o=r,this.h=new zt([e],r),this.p=new Lt(this.h)}x(){this.p.H(this.Fe)}};var Qe=t=>{if(x(t))return t.map(o=>Qe(o));let e={};if(t.tagName)e.t=t.tagName;else return t.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),t.textContent&&(e.d=t.textContent),e;let n=t.getAttributeNames();n.length>0&&(e.a=Object.fromEntries(n.map(o=>{var s;return[o,(s=t.getAttribute(o))!=null?s:""]})));let r=de(t);return r.length>0&&(e.c=[...r].map(o=>Qe(o))),e};var Zr=(t,e={})=>{var s,i,a,c,p,f;x(e)&&(e={props:e}),_(t)&&(t={template:t});let n=(s=e.context)!=null?s:()=>({}),r=!1;if(t.element){let l=t.element;l.remove(),t.element=l}else if(t.selector){let l=document.querySelector(t.selector);if(!l)throw D(1,t.selector);l.remove(),t.element=l}else if(t.template){let l=document.createRange().createContextualFragment(Kt(t.template));t.element=l}else t.json&&(t.element=Ie(t.json,t.isSVG,e.config),r=!0);t.element||(t.element=document.createDocumentFragment()),((i=e.useInterpolation)==null||i)&&Bt(t.element,(a=e.config)!=null?a:ee.getDefault());let o=t.element;if(!r&&(((p=t.isSVG)!=null?p:rt(o)&&((c=o.hasAttribute)!=null&&c.call(o,"isSVG")))||rt(o)&&o.querySelector("[isSVG]"))){let l=o.content,u=l?[...l.childNodes]:[...o.childNodes],y=Qe(u);t.element=Ie(y,!0,e.config)}return{context:n,template:t.element,inheritAttrs:(f=e.inheritAttrs)!=null?f:!0,props:e.props,defaultName:e.defaultName}};var eo=t=>{var e;(e=Oe())==null||e.onMounted.push(t)};var to=t=>{let e,n={},r=(...o)=>{if(o.length<=2&&0 in o)throw D(4);return e&&!n.isStopped?e(...o):(e=Us(t,n),e(...o))};return r[Q]=1,xe(r,!0),r.stop=()=>{var o,s;return(s=(o=n.ref)==null?void 0:o.stop)==null?void 0:s.call(o)},J(()=>r.stop(),!0),r},Us=(t,e)=>{var s;let n=(s=e.ref)!=null?s:G(null);e.ref=n,e.isStopped=!1;let r=0,o=ke(()=>{if(r>0){o(),e.isStopped=!0,K(n);return}n(t()),++r});return n.stop=o,n};var no=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw D(4);return r&&!n.isStopped?r(...s):(r=Hs(t,e,n),r(...s))};return o[Q]=1,xe(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},J(()=>o.stop(),!0),o},Hs=(t,e,n)=>{var a;let r=(a=n.ref)!=null?a:G(null);n.ref=r,n.isStopped=!1;let o=0,s=c=>{if(o>0){r.stop(),n.isStopped=!0,K(r);return}r(e(...t.map(p=>p()))),++o},i=[];for(let c of t){let p=A(c,s);i.push(p)}return s(null),r.stop=()=>{i.forEach(c=>{c()})},r};var ro=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw D(4);return r&&!n.isStopped?r(...s):(r=Bs(t,e,n),r(...s))};return o[Q]=1,xe(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},J(()=>o.stop(),!0),o},Bs=(t,e,n)=>{var s;let r=(s=n.ref)!=null?s:G(null);n.ref=r,n.isStopped=!1;let o=0;return r.stop=A(t,i=>{if(o>0){r.stop(),n.isStopped=!0,K(r);return}r(e(i)),++o},!0),r};var oo=t=>(t[dt]=1,t);var so=(t,e)=>{if(!e)throw D(5);let r=Me(t)?le:a=>a,o=()=>localStorage.setItem(e,JSON.stringify(X(t()))),s=localStorage.getItem(e);if(s!=null)try{t(r(JSON.parse(s)))}catch(a){k(6,`persist: failed to parse data for key ${e}`,a),o()}else o();let i=ke(o);return J(i,!0),t};var An=(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},io=An;var ao=(t,e,n)=>{let r=[],o=()=>{e(t.map(i=>i()))};for(let i of t)r.push(A(i,o));n&&o();let s=()=>{for(let i of r)i()};return J(s,!0),s};var co=t=>{if(!g(t))throw D(3,"observerCount");return t(void 0,void 0,2)};var po=t=>{Nn();try{t()}finally{Mn()}},Nn=()=>{fe.stack||(fe.stack=[]),fe.stack.push(new Set)},Mn=()=>{let t=fe.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 fe.stack;for(let n of e)try{K(n)}catch(r){console.error(r)}};
1
+ "use strict";var pt=Object.defineProperty,fo=Object.defineProperties,lo=Object.getOwnPropertyDescriptor,uo=Object.getOwnPropertyDescriptors,mo=Object.getOwnPropertyNames,In=Object.getOwnPropertySymbols;var Dn=Object.prototype.hasOwnProperty,ho=Object.prototype.propertyIsEnumerable;var ft=Math.pow,Qt=(t,e,n)=>e in t?pt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lt=(t,e)=>{for(var n in e||(e={}))Dn.call(e,n)&&Qt(t,n,e[n]);if(In)for(var n of In(e))ho.call(e,n)&&Qt(t,n,e[n]);return t},Un=(t,e)=>fo(t,uo(e));var yo=(t,e)=>{for(var n in e)pt(t,n,{get:e[n],enumerable:!0})},go=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of mo(e))!Dn.call(t,o)&&o!==n&&pt(t,o,{get:()=>e[o],enumerable:!(r=lo(e,o))||r.enumerable});return t};var bo=t=>go(pt({},"__esModule",{value:!0}),t);var m=(t,e,n)=>Qt(t,typeof e!="symbol"?e+"":e,n);var _s={};yo(_s,{ComponentHead:()=>_e,RegorConfig:()=>ne,addUnbinder:()=>B,batch:()=>po,collectRefs:()=>vt,computeMany:()=>no,computeRef:()=>ro,computed:()=>to,createApp:()=>Yr,createComponent:()=>Zr,endBatch:()=>Mn,entangle:()=>Fe,flatten:()=>Z,getBindData:()=>Ce,html:()=>An,isDeepRef:()=>Le,isRaw:()=>qe,isRef:()=>g,markRaw:()=>oo,observe:()=>w,observeMany:()=>ao,observerCount:()=>co,onMounted:()=>eo,onUnmounted:()=>J,pause:()=>Ht,persist:()=>so,raw:()=>io,ref:()=>le,removeNode:()=>F,resume:()=>Bt,silence:()=>xt,sref:()=>W,startBatch:()=>Nn,toFragment:()=>Ue,toJsonTemplate:()=>Xe,trigger:()=>z,unbind:()=>ae,unref:()=>j,useScope:()=>Rt,warningHandler:()=>nt,watchEffect:()=>Ie});module.exports=bo(_s);var Be=Symbol(":regor");var ae=t=>{let e=[t];for(;e.length>0;){let n=e.shift();To(n);let r=n.childNodes;if(r)for(let o of r)e.push(o)}},To=t=>{let e=t[Be];if(e){for(let n of e.unbinders)n();e.unbinders.splice(0),delete t[Be]}};var F=t=>{t.remove(),setTimeout(()=>ae(t),1)};var _=t=>typeof t=="function",P=t=>typeof t=="string",Hn=t=>typeof t=="undefined",re=t=>t==null||typeof t=="undefined",q=t=>typeof t!="string"||!(t!=null&&t.trim()),Eo=Object.prototype.toString,Xt=t=>Eo.call(t),Te=t=>Xt(t)==="[object Map]",te=t=>Xt(t)==="[object Set]",Yt=t=>Xt(t)==="[object Date]",tt=t=>typeof t=="symbol",R=Array.isArray,O=t=>t!==null&&typeof t=="object";var Bn={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."},U=(t,...e)=>{let n=Bn[t];return new Error(_(n)?n.call(Bn,...e):n)};var ut=[],_n=()=>{let t={onMounted:[],onUnmounted:[]};return ut.push(t),t},Ne=t=>{let e=ut[ut.length-1];if(!e&&!t)throw U(2);return e},Pn=t=>{let e=Ne();return t&&en(t),ut.pop(),e},Zt=Symbol("csp"),en=t=>{let e=t,n=e[Zt];if(n){let r=Ne();if(n===r)return;r.onMounted.length>0&&n.onMounted.push(...r.onMounted),r.onUnmounted.length>0&&n.onUnmounted.push(...r.onUnmounted);return}e[Zt]=Ne()},mt=t=>t[Zt];var Ee=t=>{var n,r;let e=(n=mt(t))==null?void 0:n.onUnmounted;e==null||e.forEach(o=>{o()}),(r=t.unmounted)==null||r.call(t)};var _e=class{constructor(e,n,r,o,s){m(this,"props");m(this,"start");m(this,"end");m(this,"ctx");m(this,"autoProps",!0);m(this,"entangle",!0);m(this,"enableSwitch",!1);m(this,"onAutoPropsAssigned");m(this,"pe");m(this,"emit",(e,n)=>{this.pe.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.pe=n,this.ctx=r,this.start=o,this.end=s}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)F(e),e=e.nextSibling;for(let r of this.ctx)Ee(r)}};var Ce=t=>{let e=t,n=e[Be];if(n)return n;let r={unbinders:[],data:{}};return e[Be]=r,r};var B=(t,e)=>{Ce(t).unbinders.push(e)};var Vn={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=Vn[t],r=_(n)?n.call(Vn,...e):n,o=nt.warning;o&&(P(r)?o(r):o(r,...r.args))},nt={warning:console.warn};var J=(t,e)=>{var n;(n=Ne(e))==null||n.onUnmounted.push(t)};var dt=Symbol("ref"),X=Symbol("sref"),ht=Symbol("raw");var g=t=>(t==null?void 0:t[X])===1;var w=(t,e,n)=>{if(!g(t))throw U(3,"observe");n&&e(t());let o=t(void 0,void 0,0,e);return J(o,!0),o};var gt={},yt={},jn=1,$n=t=>{let e=(jn++).toString();return gt[e]=t,yt[e]=0,e},tn=t=>{yt[t]+=1},nn=t=>{--yt[t]===0&&(delete gt[t],delete yt[t])},Fn=t=>gt[t],rn=()=>jn!==1&&Object.keys(gt).length>0,rt="r-switch",Co=t=>{let e=t.filter(r=>Me(r)).map(r=>[...r.querySelectorAll("[r-switch]")].map(o=>o.getAttribute(rt))),n=new Set;return e.forEach(r=>{r.forEach(o=>o&&n.add(o))}),[...n]},Pe=(t,e)=>{if(!rn())return;let n=Co(e);n.length!==0&&(n.forEach(tn),B(t,()=>{n.forEach(nn)}))};var on=(t,e,n,r)=>{let o=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,r),o.push(i)}xe(e,o)},sn=Symbol("r-if"),qn=Symbol("r-else"),zn=t=>t[qn]===1,bt=class{constructor(e){m(this,"p");m(this,"B");m(this,"K");m(this,"z");m(this,"W");m(this,"b");m(this,"T");this.p=e,this.B=e.o.f.if,this.K=je(e.o.f.if),this.z=e.o.f.else,this.W=e.o.f.elseif,this.b=e.o.f.for,this.T=e.o.f.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=Re(e,this.K);for(let o of r)this.x(o);return n}G(e){return e[sn]?!0:(e[sn]=!0,Re(e,this.K).forEach(n=>n[sn]=!0),!1)}x(e){if(e.hasAttribute(this.T)||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=Ve(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${r!=null?r:""}`);s.insertBefore(i,e),Pe(i,o),o.forEach(c=>{F(c)}),e.remove(),n!=="if"&&(e[qn]=1);let a=document.createComment(`__end__ :${n}${r!=null?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:()=>{on(o,this.p,s,a)},unmount:()=>{me(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} `),p=this.p.h.C(o),f=p.value,l=this.ce(r,n),u=[];B(a,()=>{p.stop();for(let d of u)d();u.length=0});let h=w(f,n);return u.push(h),[{mount:()=>{on(s,this.p,i,c)},unmount:()=>{me(a,c)},isTrue:()=>!!f()[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),p=c.value,f=!1,l=this.p.h,u=l.V(),y=()=>{l.v(u,()=>{if(p()[0])f||(on(o,this.p,s,a),f=!0),h.forEach(E=>{E.unmount(),E.isMounted=!1});else{me(i,a),f=!1;let E=!1;for(let I of h)!E&&I.isTrue()?(I.isMounted||(I.mount(),I.isMounted=!0),E=!0):(I.unmount(),I.isMounted=!1)}})},h=this.ce(r,y),d=[];B(i,()=>{c.stop();for(let E of d)E();d.length=0}),y();let C=w(p,y);d.push(C)}};var Ve=t=>{let e=pe(t)?t.content.childNodes:[t];return Array.from(e).filter(n=>{let r=n==null?void 0:n.tagName;return r!=="SCRIPT"&&r!=="STYLE"})},xe=(t,e)=>{for(let n of e)zn(n)||t.H(n)},Re=(t,e)=>{var r;let n=t.querySelectorAll(e);return(r=t.matches)!=null&&r.call(t,e)?[t,...n]:n},pe=t=>t instanceof HTMLTemplateElement,Me=t=>t.nodeType===Node.ELEMENT_NODE,ot=t=>t.nodeType===Node.ELEMENT_NODE,Kn=t=>t instanceof HTMLSlotElement,de=t=>pe(t)?t.content.childNodes:t.childNodes,me=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let r=n.nextSibling;F(n),n=r}},ve=(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})},Wn=(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},je=t=>`[${CSS.escape(t)}]`,Tt=(t,e)=>(t.startsWith("@")&&(t=e.f.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.f.dynamic)),t),an=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},Ro=/-(\w)/g,V=an(t=>t&&t.replace(Ro,(e,n)=>n?n.toUpperCase():"")),xo=/\B([A-Z])/g,$e=an(t=>t&&t.replace(xo,"-$1").toLowerCase()),st=an(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var Et={};var Ct=t=>{var n,r;let e=(n=mt(t))==null?void 0:n.onMounted;e==null||e.forEach(o=>{o()}),(r=t.mounted)==null||r.call(t)};var cn=Symbol("scope"),Rt=t=>{try{_n();let e=t();en(e);let n={context:e,unmount:()=>Ee(e),[cn]:1};return n[cn]=1,n}finally{Pn()}},Gn=t=>O(t)?cn in t:!1;var Jn={collectRefObj:!0,onBind:(t,e)=>w(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],p=o[a];p!==c&&(g(p)?p(c):o[a]=c)}},!0)};var Qn={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&&(g(c)?c(a):r[i]=a)}return()=>{}}};var Fe=(t,e)=>{if(t===e)return()=>{};let n=w(t,o=>e(o)),r=w(e,o=>t(o));return e(t()),()=>{n(),r()}};var qe=t=>!!t&&t[ht]===1;var Le=t=>(t==null?void 0:t[dt])===1;var oe=[],Xn=t=>{var e;oe.length!==0&&((e=oe[oe.length-1])==null||e.add(t))},Ie=t=>{if(!t)return()=>{};let e={stop:()=>{}};return vo(t,e),J(()=>e.stop(),!0),e.stop},vo=(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(oe.push(s),t(i=>n.push(i)),r)return;for(let i of[...s]){let a=w(i,()=>{o(),Ie(t)});n.push(a)}}finally{oe.pop()}},xt=t=>{let e=oe.length,n=e>0&&oe[e-1];try{return n&&oe.push(null),t()}finally{n&&oe.pop()}},vt=t=>{try{let e=new Set;return oe.push(e),{value:t(),refs:[...e]}}finally{oe.pop()}};var z=(t,e,n)=>{if(!g(t))return;let r=t;if(r(void 0,e,1),!n)return;let o=r();if(o){if(R(o)||te(o))for(let s of o)z(s,e,!0);else if(Te(o))for(let s of o)z(s[0],e,!0),z(s[1],e,!0);if(O(o))for(let s in o)z(o[s],e,!0)}};function So(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var ze=(t,e,n)=>{n.forEach(function(r){let o=t[r];So(e,r,function(...i){let a=o.apply(this,i),c=this[X];for(let p of c)z(p);return a})})},St=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var Yn=Array.prototype,pn=Object.create(Yn),wo=["push","pop","shift","unshift","splice","sort","reverse"];ze(Yn,pn,wo);var Zn=Map.prototype,wt=Object.create(Zn),Oo=["set","clear","delete"];St(wt,"Map");ze(Zn,wt,Oo);var er=Set.prototype,Ot=Object.create(er),Ao=["add","clear","delete"];St(Ot,"Set");ze(er,Ot,Ao);var fe={},W=t=>{if(g(t)||qe(t))return t;let e={auto:!0,_value:t},n=c=>O(c)?X in c?!0:R(c)?(Object.setPrototypeOf(c,pn),!0):te(c)?(Object.setPrototypeOf(c,Ot),!0):Te(c)?(Object.setPrototypeOf(c,wt),!0):!1:!1,r=n(t),o=new Set,s=(c,p)=>{if(fe.stack&&fe.stack.length){fe.stack[fe.stack.length-1].add(a);return}o.size!==0&&xt(()=>{for(let f of[...o.keys()])o.has(f)&&f(c,p)})},i=c=>{let p=c[X];p||(c[X]=p=new Set),p.add(a)},a=(...c)=>{if(!(2 in c)){let f=c[0],l=c[1];return 0 in c?e._value===f||g(f)&&(f=f(),e._value===f)?f:(n(f)&&i(f),e._value=f,e.auto&&s(f,l),e._value):(Xn(a),e._value)}switch(c[2]){case 0:{let f=c[3];if(!f)return()=>{};let l=u=>{o.delete(u)};return o.add(f),()=>{l(f)}}case 1:{let f=c[1],l=e._value;s(l,f);break}case 2:return o.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[X]=1,ve(a,!1),r&&i(t),a};var le=t=>{if(qe(t))return t;let e;if(g(t)?(e=t,t=e()):e=W(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[dt]=1,R(t)){let n=t.length;for(let r=0;r<n;++r){let o=t[r];Le(o)||(t[r]=le(o))}return e}if(!O(t))return e;for(let n of Object.entries(t)){let r=n[1];if(Le(r))continue;let o=n[0];tt(o)||(t[o]=null,t[o]=le(r))}return e};var tr=Symbol("modelBridge"),No=t=>!!(t!=null&&t[tr]),Mo=t=>{t[tr]=1},ko=t=>{let e=le(t());return Mo(e),e},nr={collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(!r)return()=>{};let i=V(r),a,c,p=()=>{},f=()=>{p(),p=()=>{},a=void 0,c=void 0},l=()=>{p(),p=()=>{}},u=(h,d)=>{a!==h&&(l(),p=Fe(h,d),a=h)},y=w(e.value,()=>{var C;let h=(C=e.refs[0])!=null?C:e.value()[0],d=e.context,T=d[i];if(!g(h)){if(c&&T===c){c(h);return}if(f(),g(T)){T(h);return}d[i]=h;return}if(No(h)){if(T===h)return;g(T)?u(h,T):d[i]=h;return}c||(c=ko(h)),d[i]=c,u(h,c)},!0);return()=>{p(),y()}}};var At=class{constructor(e){m(this,"p");m(this,"fe");this.p=e,this.fe=e.o.f.inherit}N(e){this.Ke(e)}Ke(e){var l;let n=this.p,r=n.h,o=n.o.le,s=n.o.ue,i=r.me(),a=r.ze(),c=[...o.keys(),...a,...[...o.keys()].map($e),...a.map($e)].join(",");if(q(c))return;let p=e.querySelectorAll(c),f=(l=e.matches)!=null&&l.call(e,c)?[e,...p]:p;for(let u of f){if(u.hasAttribute(n.T))continue;let y=u.parentNode;if(!y)continue;let h=u.nextSibling,d=V(u.tagName).toUpperCase(),T=i[d],C=T!=null?T:s.get(d);if(!C)continue;let E=C.template;if(!E)continue;let I=u.parentElement;if(!I)continue;let H=new Comment(" begin component: "+u.tagName),se=new Comment(" end component: "+u.tagName);I.insertBefore(H,u),u.remove();let Ye=n.o.f.props,Ze=n.o.f.propsOnce,Gt=n.o.f.bind,et=(b,N)=>{let x={},M=b.hasAttribute(Ye),G=b.hasAttribute(Ze);return r.v(N,()=>{r.S(x),M&&n.x(Jn,b,Ye),G&&n.x(Qn,b,Ze);let v=C.props;if(!v||v.length===0)return;v=v.map(V);let k=new Map(v.map(ee=>[ee.toLowerCase(),ee]));for(let ee of v.concat(v.map($e))){let ue=b.getAttribute(ee);ue!==null&&(x[V(ee)]=ue,b.removeAttribute(ee))}let Ae=n.J.de(b,!1);for(let[ee,ue]of Ae.entries()){let[Jt,kn]=ue.Q;if(!kn)continue;let Ln=k.get(V(kn).toLowerCase());Ln&&(Jt!=="."&&Jt!==":"&&Jt!==Gt||n.x(nr,b,ee,!0,Ln,ue.X))}}),x},ge=[...r.V()],ct=()=>{var M;let b=et(u,ge),N=new _e(b,u,ge,H,se),x=Rt(()=>{var G;return(G=C.context(N))!=null?G:{}}).context;if(N.autoProps){for(let[G,v]of Object.entries(b))if(G in x){let k=x[G];if(k===v)continue;N.entangle&&g(k)&&g(v)&&B(H,Fe(v,k))}else x[G]=v;(M=N.onAutoPropsAssigned)==null||M.call(N)}return{componentCtx:x,head:N}},{componentCtx:Oe,head:D}=ct(),ie=[...de(E)],S=ie.length,$=u.childNodes.length===0,K=b=>{let N=b.parentElement;if($){for(let v of[...b.childNodes])N.insertBefore(v,b);return}let x=b.name;q(x)&&(x=b.getAttributeNames().filter(v=>v.startsWith("#"))[0],q(x)?x="default":x=x.substring(1));let M=u.querySelector(`template[name='${x}'], template[\\#${x}]`);!M&&x==="default"&&(M=u.querySelector("template:not([name])"),M&&M.getAttributeNames().filter(v=>v.startsWith("#")).length>0&&(M=null));let G=v=>{D.enableSwitch&&r.v(ge,()=>{r.S(Oe);let k=et(b,r.V());r.v(ge,()=>{r.S(k);let Ae=r.V(),ee=$n(Ae);for(let ue of v)Me(ue)&&(ue.setAttribute(rt,ee),tn(ee),B(ue,()=>{nn(ee)}))})})};if(M){let v=[...de(M)];for(let k of v)N.insertBefore(k,b);G(v)}else{if(x!=="default"){for(let k of[...de(b)])N.insertBefore(k,b);return}let v=[...de(u)].filter(k=>!pe(k));for(let k of v)N.insertBefore(k,b);G(v)}},Q=b=>{if(!Me(b))return;let N=b.querySelectorAll("slot");if(Kn(b)){K(b),b.remove();return}for(let x of N)K(x),x.remove()};(()=>{for(let b=0;b<S;++b)ie[b]=ie[b].cloneNode(!0),y.insertBefore(ie[b],h),Q(ie[b])})(),I.insertBefore(se,h);let A=()=>{if(!C.inheritAttrs)return;let b=ie.filter(x=>x.nodeType===Node.ELEMENT_NODE);b.length>1&&(b=b.filter(x=>x.hasAttribute(this.fe)));let N=b[0];if(N)for(let x of u.getAttributeNames()){if(x===Ye||x===Ze)continue;let M=u.getAttribute(x);if(x==="class")N.classList.add(...M.split(" "));else if(x==="style"){let G=N.style,v=u.style;for(let k of v)G.setProperty(k,v.getPropertyValue(k))}else N.setAttribute(Tt(x,n.o),M)}},Y=()=>{for(let b of u.getAttributeNames())!b.startsWith("@")&&!b.startsWith(n.o.f.on)&&u.removeAttribute(b)},He=()=>{A(),Y(),r.S(Oe),n.ye(u,!1),Oe.$emit=D.emit,xe(n,ie),B(u,()=>{Ee(Oe)}),B(H,()=>{ae(u)}),Ct(Oe)};r.v(ge,He)}}};var fn=class{constructor(e){m(this,"he");m(this,"Q",[]);m(this,"X",[]);m(this,"ge",[]);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(q(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]=V(o[i])}s.includes("prop")&&(o[0]=".")}}},Nt=class{constructor(e){m(this,"p");m(this,"be");this.p=e,this.be=e.o.We()}de(e,n){let r=new Map;if(!ot(e))return r;let o=this.be,s=a=>{let c=a.getAttributeNames().filter(p=>o.some(f=>p.startsWith(f)));for(let p of c)r.has(p)||r.set(p,new fn(p)),r.get(p).ge.push(a)};if(s(e),!n)return r;let i=e.querySelectorAll("*");for(let a of i)s(a);return r}};var Lo=(t,e)=>{for(let n of t){let r=n.cloneNode(!0);e.appendChild(r)}},Mt=class{constructor(e){m(this,"p");m(this,"I");m(this,"Te");this.p=e,this.I=e.o.f.is,this.Te=je(this.I)+", [is]"}N(e){let n=e.hasAttribute(this.I),r=Re(e,this.Te);for(let o of r)this.x(o);return n}x(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=Ve(e),o=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);o.insertBefore(s,e),Pe(s,r),r.forEach(a=>{F(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n!=null?n:""}`);return o.insertBefore(i,s.nextSibling),{nodes:r,parent:o,commentBegin:s,commentEnd:i}}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,p=this.p.h,f=p.V(),l={name:""},u=pe(e)?r:[...r[0].childNodes],y=()=>{p.v(f,()=>{var I;let C=c()[0];if(O(C)&&(C.name?C=C.name:C=(I=Object.entries(p.me()).filter(H=>H[1]===C)[0])==null?void 0:I[0]),!P(C)||q(C)){me(s,i);return}if(l.name===C)return;me(s,i);let E=document.createElement(C);for(let H of e.getAttributeNames())H!==this.I&&E.setAttribute(H,e.getAttribute(H));Lo(u,E),o.insertBefore(E,i),this.p.H(E),l.name=C})},h=[];B(s,()=>{a.stop();for(let C of h)C();h.length=0}),y();let T=w(c,y);h.push(T)}};var j=t=>g(t)?t():t;var it=class{constructor(e){m(this,"R",[]);m(this,"_",new Map);m(this,"Y");this.Y=e}get w(){return this.R.length}Z(e){let n=this.Y(e.value);n!==void 0&&this._.set(n,e)}ee(e){var r;let n=this.Y((r=this.R[e])==null?void 0:r.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.R.push(e),this.Z(e)}Je(e,n){let r=this.w;for(let o=e;o<r;++o)this.R[o].order=o+1;n.order=e,this.R.splice(e,0,n),this.Z(n)}D(e){return this.R[e]}te(e,n){this.ee(e),this.R[e]=n,this.Z(n),n.order=e}xe(e){this.ee(e),this.R.splice(e,1);let n=this.w;for(let r=e;r<n;++r)this.R[r].order=r}Re(e){let n=this.w;for(let r=e;r<n;++r)this.ee(r);this.R.splice(e)}Ct(e){return this._.has(e)}Qe(e){var r;let n=this._.get(e);return(r=n==null?void 0:n.order)!=null?r:-1}};var ln=Symbol("r-for"),Lt=class Lt{constructor(e){m(this,"p");m(this,"b");m(this,"ne");m(this,"T");this.p=e,this.b=e.o.f.for,this.ne=je(this.b),this.T=e.o.f.pre}N(e){let n=e.hasAttribute(this.b),r=Re(e,this.ne);for(let o of r)this.Xe(o);return n}G(e){return e[ln]?!0:(e[ln]=!0,Re(e,this.ne).forEach(n=>n[ln]=!0),!1)}Xe(e){if(e.hasAttribute(this.T)||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)}Ee(e){return re(e)?[]:(_(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){var ie;let r=this.Ze(n);if(!(r!=null&&r.list)){L(1,this.b,n,e);return}let o=this.p.o.f.key,s=this.p.o.f.keyBind,i=(ie=e.getAttribute(o))!=null?ie:e.getAttribute(s);e.removeAttribute(o),e.removeAttribute(s);let a=i?S=>{var $;return j(($=j(S))==null?void 0:$[i])}:S=>S,c=(S,$)=>a(S)===a($),p=Ve(e),f=e.parentNode;if(!f)return;let l=`${this.b} => ${n}`,u=new Comment(`__begin__ ${l}`);f.insertBefore(u,e),Pe(u,p),p.forEach(S=>{F(S)}),e.remove();let y=new Comment(`__end__ ${l}`);f.insertBefore(y,u.nextSibling);let h=this.p,d=h.h,T=d.V(),C=(S,$,K)=>{let Q=r.createContext($,S),be=it.Ge(Q.index,$);return d.v(T,()=>{var b,N;d.S(Q.ctx);let A=(N=(b=y.parentNode)!=null?b:u.parentNode)!=null?N:f,Y=K.previousSibling,He=[];for(let x of p){let M=x.cloneNode(!0);A.insertBefore(M,K),He.push(M)}for(xe(h,He),Y=Y.nextSibling;Y!==K;)be.items.push(Y),Y=Y.nextSibling}),be},E=(S,$)=>{let K=D.D(S).items,Q=K[K.length-1].nextSibling;for(let be of K)F(be);D.te(S,C(S,$,Q))},I=(S,$)=>{D.S(C(S,$,y))},H=S=>{for(let $ of D.D(S).items)F($)},se=S=>{let $=D.w;for(let K=S;K<$;++K)D.D(K).index(K)},Ye=S=>{let $=u.parentNode,K=y.parentNode;if(!$||!K)return;let Q=D.w;_(S)&&(S=S());let be=j(S[0]);if(R(be)&&be.length===0){me(u,y),D.Re(0);return}let A=0,Y=Number.MAX_SAFE_INTEGER,He=Q,b=this.p.o.forGrowThreshold,N=()=>D.w<He+b;for(let M of this.Ee(S[0])){let G=()=>{if(A<Q){let v=D.D(A++);if(c(v.value,M))return;let k=D.Qe(a(M));if(k>=A&&k-A<10){if(--A,Y=Math.min(Y,A),H(A),D.xe(A),--Q,k>A+1)for(let Ae=A;Ae<k-1&&Ae<Q&&!c(D.D(A).value,M);)++Ae,H(A),D.xe(A),--Q;G();return}N()?(D.Je(A-1,C(A,M,D.D(A-1).items[0])),Y=Math.min(Y,A-1),++Q):E(A-1,M)}else I(A++,M)};G()}let x=A;for(Q=D.w;A<Q;)H(A++);D.Re(x),se(Y)},Ze=()=>{ct=w(ge,Ye)},Gt=()=>{et.stop(),ct()},et=d.C(r.list),ge=et.value,ct,Oe=0,D=new it(a);for(let S of this.Ee(ge()[0]))D.S(C(Oe++,S,y));B(u,Gt),Ze()}Ze(e){var c,p;let n=Lt.et.exec(e);if(!n)return;let r=(n[1]+((c=n[2])!=null?c:"")).split(",").map(f=>f.trim()),o=r.length>1?r.length-1:-1,s=o!==-1&&(r[o]==="index"||(p=r[o])!=null&&p.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:(f,l)=>{let u={},y=j(f);if(!a&&r.length===1)u[r[0]]=f;else if(R(y)){let d=0;for(let T of r)u[T]=y[d++]}else for(let d of r)u[d]=y[d];let h={ctx:u,index:W(-1)};return s&&(h.index=u[s.startsWith("#")?s.substring(1):s]=W(l)),h}}}};m(Lt,"et",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var kt=Lt;var It=class{constructor(e){m(this,"h");m(this,"Ce");m(this,"ve");m(this,"Se");m(this,"we");m(this,"J");m(this,"o");m(this,"T");m(this,"Ae");this.h=e,this.o=e.o,this.ve=new kt(this),this.Ce=new bt(this),this.Se=new Mt(this),this.we=new At(this),this.J=new Nt(this),this.T=this.o.f.pre,this.Ae=this.o.f.dynamic}tt(e){let n=pe(e)?[e]:e.querySelectorAll("template");for(let r of n){if(r.hasAttribute(this.T))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);xe(this,i)}}H(e){e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.T)||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){var s;let r=this.J.de(e,n),o=this.o.j;for(let[i,a]of r.entries()){let[c,p]=a.Q,f=(s=o[i])!=null?s:o[c];if(!f){console.error("directive not found:",c);continue}a.ge.forEach(l=>{this.x(f,l,i,!1,p,a.X)})}}x(e,n,r,o,s,i){if(n.hasAttribute(this.T))return;let a=n.getAttribute(r);n.removeAttribute(r);let c=p=>{let f=p.getAttribute(rt);return f||(p.parentElement?c(p.parentElement):null)};if(rn()){let p=c(n);if(p){this.h.v(Fn(p),()=>{this.L(e,n,a,s,i)});return}}this.L(e,n,a,s,i)}nt(e,n,r){if(e!==Et)return!1;if(q(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,B(i,()=>{F(n)}),o.appendChild(n)}return!0}L(e,n,r,o,s){var T;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=[];B(n,()=>{i.stop(),f==null||f.stop();for(let C of a)C();a.length=0});let p=Wn(o,this.Ae),f;p&&(f=this.h.C(V(p),void 0,void 0,void 0,e.once));let l,u=()=>(l=i.value(),l),y,h=()=>f?(y=f.value()[0],y):(y=o,o),d=()=>{if(!e.onChange)return;let C=w(i.value,E=>{var se;let I=l,H=y;(se=e.onChange)==null||se.call(e,n,u(),I,h(),H,s)});if(a.push(C),f){let E=w(f.value,I=>{var se;let H=y;(se=e.onChange)==null||se.call(e,n,u(),H,h(),H,s)});a.push(E)}};e.once||d(),e.onBind&&a.push(e.onBind(n,i,r,o,f,s)),(T=e.onChange)==null||T.call(e,n,u(),void 0,h(),void 0,s)}};var rr="http://www.w3.org/1999/xlink",Io={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 Do(t){return!!t||t===""}var un={onChange:(t,e,n,r,o,s)=>{var a;if(r){s&&s.includes("camel")&&(r=V(r)),Dt(t,r,e[0],o);return}let i=e.length;for(let c=0;c<i;++c){let p=e[c];if(R(p)){let f=(a=n==null?void 0:n[c])==null?void 0:a[0],l=p[0],u=p[1];Dt(t,l,u,f)}else if(O(p))for(let f of Object.entries(p)){let l=f[0],u=f[1],y=n==null?void 0:n[c],h=y&&l in y?l:void 0;Dt(t,l,u,h)}else{let f=n==null?void 0:n[c],l=e[c++],u=e[c];Dt(t,l,u,f)}}}},Dt=(t,e,n,r)=>{if(r&&r!==e&&t.removeAttribute(r),re(e)){L(3,name,t);return}if(!P(e)){L(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){re(n)?t.removeAttributeNS(rr,e.slice(6,e.length)):t.setAttributeNS(rr,e,n);return}let o=e in Io;re(n)||o&&!Do(n)?t.removeAttribute(e):t.setAttribute(e,o?"":n)};var mn={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n==null?void 0:n[o];if(R(s)){let a=s.length;for(let c=0;c<a;++c)or(t,s[c],i==null?void 0:i[c])}else or(t,s,i)}}},or=(t,e,n)=>{let r=t.classList,o=P(e),s=P(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 sr={onChange:(t,e)=>{let[n,r]=e;_(r)?r(t,n):t.innerHTML=n==null?void 0:n.toString()}};function Uo(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=he(t[r],e[r]);return n}function he(t,e){if(t===e)return!0;let n=Yt(t),r=Yt(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=tt(t),r=tt(e),n||r)return t===e;if(n=R(t),r=R(e),n||r)return n&&r?Uo(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||!he(t[i],e[i]))return!1}}return String(t)===String(e)}function Ut(t,e){return t.findIndex(n=>he(n,e))}var ir=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var Ht=t=>{if(!g(t))throw U(3,"pause");t(void 0,void 0,3)};var Bt=t=>{if(!g(t))throw U(3,"resume");t(void 0,void 0,4)};var cr={onChange:(t,e)=>{Ho(t,e[0])},onBind:(t,e,n,r,o,s)=>Bo(t,e,s)},Ho=(t,e)=>{let n=ur(t);if(n&&pr(t))R(e)?e=Ut(e,ye(t))>-1:te(e)?e=e.has(ye(t)):e=Fo(t,e),t.checked=e;else if(n&&fr(t))t.checked=he(e,ye(t));else if(n||mr(t))lr(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(dr(t)){let r=t.options,o=r.length,s=t.multiple;for(let i=0;i<o;i++){let a=r[i],c=ye(a);if(s)R(e)?a.selected=Ut(e,c)>-1:a.selected=e.has(c);else if(he(ye(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else L(7,t)},at=t=>(g(t)&&(t=t()),_(t)&&(t=t()),t?P(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}),pr=t=>t.type==="checkbox",fr=t=>t.type==="radio",lr=t=>t.type==="number"||t.type==="range",ur=t=>t.tagName==="INPUT",mr=t=>t.tagName==="TEXTAREA",dr=t=>t.tagName==="SELECT",Bo=(t,e,n)=>{let r=e.value,o=at(n==null?void 0:n.join(",")),s=at(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=ur(t);return c&&pr(t)?Po(t,a):c&&fr(t)?qo(t,a):c||mr(t)?_o(t,i,a,r):dr(t)?zo(t,a,r):(L(7,t),()=>{})},ar=/[.,' ·٫]/,_o=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=lr(t),a=()=>{!e.trim&&!at(r()[1]).trim||(t.value=t.value.trim())},c=u=>{let y=u.target;y.composing=1},p=u=>{let y=u.target;y.composing&&(y.composing=0,y.dispatchEvent(new Event(s)))},f=()=>{t.removeEventListener(s,l),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",p),t.removeEventListener("change",p)},l=u=>{let y=n();if(!y)return;let h=u.target;if(!h||h.composing)return;let d=h.value,T=at(r()[1]);if(i||T.number||T.int){if(T.int)d=parseInt(d);else{if(ar.test(d[d.length-1])&&d.split(ar).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(y()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else T.trim&&(d=d.trim());y(d)};return t.addEventListener(s,l),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",p),t.addEventListener("change",p),f},Po=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=ye(t),a=t.checked,c=s();if(R(c)){let p=Ut(c,i),f=p!==-1;a&&!f?c.push(i):!a&&f&&c.splice(p,1)}else te(c)?a?c.add(i):c.delete(i):s($o(t,a))};return t.addEventListener(n,o),r},ye=t=>"_value"in t?t._value:t.value,hr="trueValue",Vo="falseValue",yr="true-value",jo="false-value",$o=(t,e)=>{let n=e?hr:Vo;if(n in t)return t[n];let r=e?yr:jo;return t.hasAttribute(r)?t.getAttribute(r):e},Fo=(t,e)=>{if(hr in t)return he(e,t.trueValue);let r=yr;return t.hasAttribute(r)?he(e,t.getAttribute(r)):he(e,!0)},qo=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=ye(t);s(i)};return t.addEventListener(n,o),r},zo=(t,e,n)=>{let r="change",o=()=>{t.removeEventListener(r,s)},s=()=>{let i=e();if(!i)return;let c=at(n()[1]).number,p=Array.prototype.filter.call(t.options,f=>f.selected).map(f=>c?ir(ye(f)):ye(f));if(t.multiple){let f=i();try{if(Ht(i),te(f)){f.clear();for(let l of p)f.add(l)}else R(f)?(f.splice(0),f.push(...p)):i(p)}finally{Bt(i),z(i)}}else i(p[0])};return t.addEventListener(r,s),o};var Ko=["stop","prevent","capture","self","once","left","right","middle","passive"],Wo=t=>{let e={};if(q(t))return;let n=t.split(",");for(let r of Ko)e[r]=n.includes(r);return e},hn={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)=>{var f,l;if(o){let u=e.value(),y=j(o.value()[0]);return P(y)?dn(t,V(y),()=>e.value()[0],(f=s==null?void 0:s.join(","))!=null?f:u[1]):()=>{}}else if(r){let u=e.value();return dn(t,V(r),()=>e.value()[0],(l=s==null?void 0:s.join(","))!=null?l:u[1])}let i=[],a=()=>{i.forEach(u=>u())},c=e.value(),p=c.length;for(let u=0;u<p;++u){let y=c[u];if(_(y)&&(y=y()),O(y))for(let h of Object.entries(y)){let d=h[0],T=()=>{let E=e.value()[u];return _(E)&&(E=E()),E=E[d],_(E)&&(E=E()),E},C=y[d+"_flags"];i.push(dn(t,d,T,C))}else L(2,name,t)}return a}},Go=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e!=null||(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=p=>!(o&&!p.ctrlKey||s&&!p.shiftKey||i&&!p.altKey||a&&!p.metaKey);return r?[t,p=>c(p)?p.key.toUpperCase()===r.toUpperCase():!1]:[t,c]}return[t,n=>!0]},dn=(t,e,n,r)=>{if(q(e))return L(5,name,t),()=>{};let o=Wo(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=Go(e,r);let a=f=>{if(!i(f)||!n&&e==="submit"&&(o!=null&&o.prevent))return;let l=n(f);_(l)&&(l=l(f)),_(l)&&l(f)},c=()=>{t.removeEventListener(e,p,s)},p=f=>{if(!o){a(f);return}try{if(o.left&&f.button!==0||o.middle&&f.button!==1||o.right&&f.button!==2||o.self&&f.target!==t)return;o.stop&&f.stopPropagation(),o.prevent&&f.preventDefault(),a(f)}finally{o.once&&c()}};return t.addEventListener(e,p,s),c};var gr={onChange:(t,e,n,r,o,s)=>{if(r){s&&s.includes("camel")&&(r=V(r)),Ke(t,r,e[0]);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(R(c)){let p=c[0],f=c[1];Ke(t,p,f)}else if(O(c))for(let p of Object.entries(c)){let f=p[0],l=p[1];Ke(t,f,l)}else{let p=e[a++],f=e[a];Ke(t,p,f)}}}};function Jo(t){return!!t||t===""}var Ke=(t,e,n)=>{if(re(e)){L(3,name,t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(ae),1),t[e]=n!=null?n:"";return}let r=t.tagName;if(e==="value"&&r!=="PROGRESS"&&!r.includes("-")){t._value=n;let s=r==="OPTION"?t.getAttribute("value"):t.value,i=n!=null?n:"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let o=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=Jo(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 br={once:!0,onBind:(t,e,n)=>{let r=e.value()[0],o=R(r),s=e.refs[0];return o?r.push(t):s?s==null||s(t):e.context[n]=t,()=>{if(o){let i=r.indexOf(t);i!==-1&&r.splice(i,1)}else s==null||s(null)}}};var Tr={onChange:(t,e)=>{let n=Ce(t).data,r=n._ord;Hn(r)&&(r=n._ord=t.style.display),!!e[0]?t.style.display=r:t.style.display="none"}};var bn={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n==null?void 0:n[o];if(R(s)){let a=s.length;for(let c=0;c<a;++c)Er(t,s[c],i==null?void 0:i[c])}else Er(t,s,i)}}},Er=(t,e,n)=>{let r=t.style,o=P(e);if(e&&!o){if(n&&!P(n))for(let s in n)e[s]==null&&gn(r,s,"");for(let s in e)gn(r,s,e[s])}else{let s=r.display;if(o?n!==e&&(r.cssText=e):n&&t.removeAttribute("style"),"_ord"in Ce(t).data)return;r.display=s}},Cr=/\s*!important$/;function gn(t,e,n){if(R(n))n.forEach(r=>{gn(t,e,r)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let r=Qo(t,e);Cr.test(n)?t.setProperty($e(r),n.replace(Cr,""),"important"):t[r]=n}}var Rr=["Webkit","Moz","ms"],yn={};function Qo(t,e){let n=yn[e];if(n)return n;let r=V(e);if(r!=="filter"&&r in t)return yn[e]=r;r=st(r);for(let o=0;o<Rr.length;o++){let s=Rr[o]+r;if(s in t)return yn[e]=s}return e}var Z=t=>xr(j(t)),xr=(t,e=new WeakMap)=>{if(!t||!O(t))return t;if(R(t))return t.map(Z);if(te(t)){let r=new Set;for(let o of t.keys())r.add(Z(o));return r}if(Te(t)){let r=new Map;for(let o of t)r.set(Z(o[0]),Z(o[1]));return r}if(e.has(t))return j(e.get(t));let n=lt({},t);e.set(t,n);for(let r of Object.entries(n))n[r[0]]=xr(j(r[1]),e);return n};var vr={onChange:(t,e)=>{var r;let n=e[0];t.textContent=te(n)?JSON.stringify(Z([...n])):Te(n)?JSON.stringify(Z([...n])):O(n)?JSON.stringify(Z(n)):(r=n==null?void 0:n.toString())!=null?r:""}};var Sr={onChange:(t,e)=>{Ke(t,"value",e[0])}};var Se=class Se{constructor(e){m(this,"j",{});m(this,"f",{});m(this,"We",()=>Object.keys(this.j).filter(e=>e.length===1||!e.startsWith(":")));m(this,"le",new Map);m(this,"ue",new Map);m(this,"forGrowThreshold",10);m(this,"globalContext");m(this,"useInterpolation",!0);if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.ot()}static getDefault(){var e;return(e=Se.Oe)!=null?e:Se.Oe=new Se}ot(){let e={},n=globalThis;for(let r of Se.rt.split(","))e[r]=n[r];return e.ref=le,e.sref=W,e.flatten=Z,e}addComponent(...e){for(let n of e){if(!n.defaultName){nt.warning("Registered component's default name is not defined",n);continue}this.le.set(st(n.defaultName),n),this.ue.set(st(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.j={".":gr,":":un,"@":hn,[`${e}on`]:hn,[`${e}bind`]:un,[`${e}html`]:sr,[`${e}text`]:vr,[`${e}show`]:Tr,[`${e}model`]:cr,":style":bn,[`${e}bind:style`]:bn,":class":mn,[`${e}bind:class`]:mn,":ref":br,":value":Sr,[`${e}teleport`]:Et},this.f={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.f)}};m(Se,"Oe"),m(Se,"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");var ne=Se;var _t=(t,e)=>{if(!t)return;let r=(e!=null?e:ne.getDefault()).f,o=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of Yo(t,r.pre,s))Xo(i,r.text,o,s)},Xo=(t,e,n,r)=>{var c;let o=t.textContent;if(!o)return;let s=n,i=o.split(s);if(i.length<=1)return;if(((c=t.parentElement)==null?void 0:c.childNodes.length)===1&&i.length===3){let p=i[1],f=wr(p,r);if(f&&q(i[0])&&q(i[2])){let l=t.parentElement;l.setAttribute(e,p.substring(f.start.length,p.length-f.end.length)),l.innerText="";return}}let a=document.createDocumentFragment();for(let p of i){let f=wr(p,r);if(f){let l=document.createElement("span");l.setAttribute(e,p.substring(f.start.length,p.length-f.end.length)),a.appendChild(l)}else a.appendChild(document.createTextNode(p))}t.replaceWith(a)},Yo=(t,e,n)=>{let r=[],o=s=>{var i;if(s.nodeType===Node.TEXT_NODE)n.some(a=>{var c;return(c=s.textContent)==null?void 0:c.includes(a.start)})&&r.push(s);else{if((i=s==null?void 0:s.hasAttribute)!=null&&i.call(s,e))return;for(let a of de(s))o(a)}};return o(t),r},wr=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var Zo=9,es=10,ts=13,ns=32,we=46,Pt=44,rs=39,os=34,Vt=40,We=41,jt=91,$t=93,Tn=63,ss=59,Or=58,is=123,Ft=125,Cn=43,as=45,Ar=96,Nr=47,cs=92,Mr=[2,3],kr=[Cn,as],Br={"-":1,"!":1,"~":1,"+":1,new:1},_r={"=":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},Je=Un(lt({"=>":2},_r),{"||":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}),Pr=Object.keys(_r),ps=new Set(Pr),qt=new Set;qt.add("=>");Pr.forEach(t=>qt.add(t));var fs=new Set(["$","_"]),Lr={true:!0,false:!1,null:null},ls="this";function Vr(t){return Math.max(0,...Object.keys(t).map(e=>e.length))}var us=Vr(Br),ms=Vr(Je),Qe="Expected ",De="Unexpected ",xn="Unclosed ",ds=Qe+":",Ir=Qe+"expression",hs="missing }",ys=De+"object property",gs=xn+"(",Dr=Qe+"comma",Ur=De+"token ",bs=De+"period",En=Qe+"expression after ",Ts="missing unaryOp argument",Es=xn+"[",Cs=Qe+"exponent (",Rs="Variable names cannot start with a number (",xs=xn+'quote after "';var Ge=t=>t>=48&&t<=57,Hr=t=>Je[t]||0,Rn=class{constructor(e){m(this,"st",{0:[this.it],1:[this.at,this.pt,this.ct],2:[this.ft,this.lt,this.ut,this.Ne,this.mt],3:[this.dt,this.yt,this.ht]});m(this,"r");m(this,"e");this.r=e,this.e=0}get M(){return this.r.charAt(this.e)}get l(){return this.r.charCodeAt(this.e)}m(e){return this.r.charCodeAt(this.e)===e}U(e){let n=String.fromCharCode(e);return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!(n in Je)||fs.has(n)}re(e){return this.U(e)||Ge(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.l,n=this.r,r=this.e;for(;e===ns||e===Zo||e===es||e===ts;)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.l;if(r===ss||r===Pt)this.e++;else{let o=this.A();if(o)n.push(o);else if(this.e<this.r.length){if(r===e)break;throw this.i(De+'"'+this.M+'"')}}}return n}A(){var n;let e=(n=this.k(0,1))!=null?n:this.Me();return this.y(),this.k(1,0,e)}se(){this.y();let e=this.e,n=this.r,r=n.substr(e,ms),o=r.length;for(;o>0;){if(r in Je&&(!this.U(this.l)||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:Hr(n),right_a:qt.has(n)},i=this.$(),!i)throw this.i(En+n);let p=[s,o,i];for(;n=this.se();){if(r=Hr(n),r===0){this.e-=n.length;break}o={value:n,prec:r,right_a:qt.has(n)},c=n;let f=l=>o.right_a&&l.right_a?r>l.prec:r<=l.prec;for(;p.length>2&&f(p[p.length-2]);)i=p.pop(),n=p.pop().value,s=p.pop(),e={type:8,operator:n,left:s,right:i},p.push(e);if(e=this.$(),!e)throw this.i(En+c);p.push(o,e)}for(a=p.length-1,e=p[a];a>1;)e={type:8,operator:p[a-1].value,left:p[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.l;if(Ge(o)||o===we)return this.gt();if(o===rs||o===os)r=this.bt();else if(o===jt)r=this.Tt();else{for(e=this.r.substr(this.e,us),n=e.length;n>0;){if(Object.prototype.hasOwnProperty.call(Br,e)&&(!this.U(this.l)||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(Ts);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 Lr?r={type:4,value:Lr[r.name],raw:r.name}:r.name===ls&&(r={type:5})):o===Vt&&(r=this.xt())}return r?(r=this.F(r),this.k(3,0,r)):this.k(3,0,!1)}F(e){this.y();let n=this.l;for(;n===we||n===jt||n===Vt||n===Tn;){let r;if(n===Tn){if(this.r.charCodeAt(this.e+1)!==we)break;r=!0,this.e+=2,this.y(),n=this.l}if(this.e++,n===jt){if(e={type:3,computed:!0,object:e,property:this.A()},this.y(),n=this.l,n!==$t)throw this.i(Es);this.e++}else n===Vt?e={type:6,arguments:this.ke(We),callee:e}:(n===we||r)&&(r&&this.e--,this.y(),e={type:3,computed:!1,object:e,property:this.ie()});r&&(e.optional=!0),this.y(),n=this.l}return e}gt(){let e="",n;for(;Ge(this.l);)e+=this.r.charAt(this.e++);if(this.m(we))for(e+=this.r.charAt(this.e++);Ge(this.l);)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++));Ge(this.l);)e+=this.r.charAt(this.e++);if(!Ge(this.r.charCodeAt(this.e-1)))throw this.i(Cs+e+this.M+")")}let r=this.l;if(this.U(r))throw this.i(Rs+e+this.M+")");if(r===we||e.length===1&&e.charCodeAt(0)===we)throw this.i(bs);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(xs+e+'"');return{type:4,value:e,raw:this.r.substring(n,this.e)}}ie(){let e=this.l,n=this.e;if(this.U(e))this.e++;else throw this.i(De+this.M);for(;this.e<this.r.length&&(e=this.l,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.l;if(s===e){if(r=!0,this.e++,e===We&&o&&o>=n.length)throw this.i(Ur+String.fromCharCode(e));break}else if(s===Pt){if(this.e++,o++,o!==n.length){if(e===We)throw this.i(Ur+",");if(e===$t)for(let i=n.length;i<o;i++)n.push(null)}}else{if(n.length!==o&&o!==0)throw this.i(Dr);{let i=this.A();if(!i||i.type===0)throw this.i(Dr);n.push(i)}}}if(!r)throw this.i(Qe+String.fromCharCode(e));return n}xt(){this.e++;let e=this.oe(We);if(this.m(We))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(gs)}Tt(){return this.e++,{type:9,elements:this.ke($t)}}ft(e){if(this.m(is)){this.e++;let n=[];for(;!isNaN(this.l);){if(this.y(),this.m(Ft)){this.e++,e.node=this.F({type:10,properties:n});return}let r=this.A();if(!r)break;if(this.y(),r.type===2&&(this.m(Pt)||this.m(Ft)))n.push({type:12,computed:!1,key:r,value:r,shorthand:!0});else if(this.m(Or)){this.e++;let o=this.A();if(!o)throw this.i(ys);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(Pt)&&this.e++}throw this.i(hs)}}lt(e){let n=this.l;if(kr.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){this.e+=2;let r=e.node={type:13,operator:n===Cn?"++":"--",argument:this.F(this.ie()),prefix:!0};if(!r.argument||!Mr.includes(r.argument.type))throw this.i(De+r.operator)}}yt(e){if(e.node){let n=this.l;if(kr.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){if(!Mr.includes(e.node.type))throw this.i(De+e.node.operator);this.e+=2,e.node={type:13,operator:n===Cn?"++":"--",argument:e.node,prefix:!1}}}}ut(e){[0,1,2].every(n=>this.r.charCodeAt(this.e+n)===we)&&(this.e+=3,e.node={type:14,argument:this.A()})}ct(e){if(e.node&&this.m(Tn)){this.e++;let n=e.node,r=this.A();if(!r)throw this.i(Ir);if(this.y(),this.m(Or)){this.e++;let o=this.A();if(!o)throw this.i(Ir);if(e.node={type:11,test:n,consequent:r,alternate:o},n.operator&&Je[n.operator]<=.9){let s=n;for(;s.right.operator&&Je[s.right.operator]<=.9;)s=s.right;e.node.test=s.right,s.right=e.node,e.node=n}}else throw this.i(ds)}}it(e){if(this.y(),this.m(Vt)){let n=this.e;if(this.e++,this.y(),this.m(We)){this.e++;let r=this.se();if(r==="=>"){let o=this.Me();if(!o)throw this.i(En+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){ps.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(Ar)&&(e.node={type:17,tag:e.node,quasi:this.Ne(e)})}Ne(e){if(!this.m(Ar))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(Ft)),!this.m(Ft))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){var o;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&&((o=r==null?void 0:r.callee)==null?void 0:o.type)===3;)r=r.type===3?r.object:r.callee.object;r.type=20}mt(e){if(!this.m(Nr))return;let n=++this.e,r=!1;for(;this.e<this.r.length;){if(this.l===Nr&&!r){let o=this.r.slice(n,this.e),s="";for(;++this.e<this.r.length;){let a=this.l;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(jt)?r=!0:r&&this.m($t)&&(r=!1),this.e+=this.m(cs)?2:1}throw this.i("Unclosed Regex")}},jr=t=>new Rn(t).parse();var vs={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(t,e)=>{},"+=":(t,e)=>{},"-=":(t,e)=>{},"<<=":(t,e)=>{},">>=":(t,e)=>{},">>>=":(t,e)=>{},"&=":(t,e)=>{},"^=":(t,e)=>{},"|=":(t,e)=>{},"||":(t,e)=>t()||e(),"??":(t,e)=>{var n;return(n=t())!=null?n:e()},"&&":(t,e)=>t()&&e(),"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(t,e)=>t===e,"!==":(t,e)=>t!==e,"<":(t,e)=>t<e,">":(t,e)=>t>e,"<=":(t,e)=>t<=e,">=":(t,e)=>t>=e,in:(t,e)=>t in e,"<<":(t,e)=>t<<e,">>":(t,e)=>t>>e,">>>":(t,e)=>t>>>e,"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e)=>t%e,"**":(t,e)=>ft(t,e)},Ss={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},zr=t=>{if(!(t!=null&&t.some(qr)))return t;let e=[];return t.forEach(n=>qr(n)?e.push(...n):e.push(n)),e},$r=(...t)=>zr(t),vn=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},ws={"++":(t,e)=>{let n=t[e];if(g(n)){let r=n();return n(++r),r}return++t[e]},"--":(t,e)=>{let n=t[e];if(g(n)){let r=n();return n(--r),r}return--t[e]}},Os={"++":(t,e)=>{let n=t[e];if(g(n)){let r=n();return n(r+1),r}return t[e]++},"--":(t,e)=>{let n=t[e];if(g(n)){let r=n();return n(r-1),r}return t[e]--}},Fr={"=":(t,e,n)=>{let r=t[e];return g(r)?r(n):t[e]=n},"+=":(t,e,n)=>{let r=t[e];return g(r)?r(r()+n):t[e]+=n},"-=":(t,e,n)=>{let r=t[e];return g(r)?r(r()-n):t[e]-=n},"*=":(t,e,n)=>{let r=t[e];return g(r)?r(r()*n):t[e]*=n},"/=":(t,e,n)=>{let r=t[e];return g(r)?r(r()/n):t[e]/=n},"%=":(t,e,n)=>{let r=t[e];return g(r)?r(r()%n):t[e]%=n},"**=":(t,e,n)=>{let r=t[e];return g(r)?r(ft(r(),n)):t[e]=ft(t[e],n)},"<<=":(t,e,n)=>{let r=t[e];return g(r)?r(r()<<n):t[e]<<=n},">>=":(t,e,n)=>{let r=t[e];return g(r)?r(r()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let r=t[e];return g(r)?r(r()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let r=t[e];return g(r)?r(r()|n):t[e]|=n},"&=":(t,e,n)=>{let r=t[e];return g(r)?r(r()&n):t[e]&=n},"^=":(t,e,n)=>{let r=t[e];return g(r)?r(r()^n):t[e]^=n}},zt=(t,e)=>_(t)?t.bind(e):t,Sn=class{constructor(e,n,r,o,s){m(this,"u");m(this,"Ve");m(this,"Ie");m(this,"De");m(this,"O");m(this,"Ue");m(this,"Be");this.u=R(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.O=r[o],zt(j(r[o]),r);for(let i of this.u)if(o in i)return this.O=i[o],zt(j(i[o]),i);let s=this.Ve;if(s&&o in s)return this.O=s[o],zt(j(s[o]),s)}5(e,n,r){return this.u[0]}0(e,n,r){return this.He(n,r,$r,...e.body)}1(e,n,r){return this.E(n,r,(...o)=>o.pop(),...e.expressions)}3(e,n,r){let{obj:o,key:s}=this.ae(e,n,r),i=o==null?void 0:o[s];return this.O=i,zt(j(i),o)}4(e,n,r){return e.value}6(e,n,r){let o=(i,...a)=>_(i)?i(...zr(a)):i,s=this.E(++n,r,o,e.callee,...e.arguments);return this.O=s,s}7(e,n,r){return this.E(n,r,Ss[e.operator],e.argument)}8(e,n,r){let o=vs[e.operator];switch(e.operator){case"||":case"&&":case"??":return o(()=>this.g(e.left,n,r),()=>this.g(e.right,n,r))}return this.E(n,r,o,e.left,e.right)}9(e,n,r){return this.He(++n,r,$r,...e.elements)}10(e,n,r){let o={},s=(...i)=>{i.forEach(a=>{Object.assign(o,a)})};return this.E(++n,r,s,...e.properties),o}11(e,n,r){return this.E(n,r,o=>this.g(o?e.consequent:e.alternate,n,r),e.test)}12(e,n,r){var f;let o={},s=l=>(l==null?void 0:l.type)!==15,i=(f=this.De)!=null?f:()=>!1,a=n===0&&this.Be,c=l=>this._e(a,e.key,n,vn(l,r)),p=l=>this._e(a,e.value,n,vn(l,r));if(e.shorthand){let l=e.key.name;o[l]=s(e.key)&&i(l,n)?c:c()}else if(e.computed){let l=j(c());o[l]=s(e.value)&&i(l,n)?p:p()}else{let l=e.key.type===4?e.key.value:e.key.name;o[l]=s(e.value)&&i(l,n)?()=>p:p()}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?ws:Os;if(o.type===2){let a=o.name,c=this.Pe(a,r);return re(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(re(a))return;let c=this.g(e.right,n,r);return Fr[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 Fr[s](i,a,c)}}14(e,n,r){let o=this.g(e.argument,n,r);return R(o)&&(o.s=Kr),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.E(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.E(n,r,o,e.callee,...e.arguments)}15(e,n,r){return(...o)=>{let s=Object.create(r!=null?r:{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=o[a++]}return this.g(e.body,n,s)}}g(e,n,r){let o=j(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.O:s}je(){let e=this.Ue;return(e===2||e===3||e===6)&&g(this.O)}eval(e,n){let{value:r,refs:o}=vt(()=>this.g(e,-1,n)),s={value:r,refs:o};return this.je()&&(s.ref=this.O),s}E(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.E(e,n,r,...o);let i=o.map((a,c)=>a&&(a.type!==15&&s(c,e)?p=>this.g(a,e,vn(p,n)):this.g(a,e,n)));return r(...i)}},Kr=Symbol("s"),qr=t=>(t==null?void 0:t.s)===Kr,Wr=(t,e,n,r,o,s,i)=>new Sn(e,n,r,o,i).eval(t,s);var Gr={},Kt=class{constructor(e,n){m(this,"u");m(this,"o");m(this,"$e",[]);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){var y;let i=W([]),a=[],c=()=>{for(let h of a)h();a.length=0},p={value:i,stop:c,refs:[],context:this.u[0]};if(q(e))return p;let f=this.o.globalContext,l=[],u=(h,d,T,C)=>{try{let E=Wr(h,d,f,n,r,C,o);return T&&l.push(...E.refs),{value:E.value,refs:E.refs,ref:E.ref}}catch(E){L(6,`evaluation error: ${e}`,E)}return{value:void 0,refs:[]}};try{let h=(y=Gr[e])!=null?y:jr("["+e+"]");Gr[e]=h;let d=this.u,T=()=>{l.splice(0),c();let C=h.elements.map((E,I)=>n!=null&&n(I,-1)?{value:H=>u(E,d,!1,{$event:H}).value,refs:[]}:u(E,d,!0));if(!s)for(let E of l){let I=w(E,T);a.push(I)}p.refs=C.map(E=>E.ref),i(C.map(E=>E.value))};T()}catch(h){L(6,`parse error: ${e}`,h)}return p}V(){return this.u}te(e){this.$e.push(this.u),this.u=e}v(e,n){try{this.te(e),n()}finally{this.Rt()}}Rt(){var e;this.u=(e=this.$e.pop())!=null?e:[]}};var Jr=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},As=(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},Ns=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
4
+ `);)++n;if(n>=t.length||!Jr(t[n]))return null;let r=n;for(;n<t.length&&Jr(t[n]);)++n;return{start:r,end:n}},Qr=new Set(["table","thead","tbody","tfoot"]),Ms=new Set(["thead","tbody","tfoot"]),ks=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),Wt=t=>{var s;let e=0,n=[],r=[],o=0;for(;e<t.length;){let i=t.indexOf("<",e);if(i===-1){n.push(t.slice(e));break}if(n.push(t.slice(e,i)),t.startsWith("<!--",i)){let T=t.indexOf("-->",i+4);if(T===-1){n.push(t.slice(i));break}n.push(t.slice(i,T+3)),e=T+3;continue}let a=As(t,i);if(a===-1){n.push(t.slice(i));break}let c=t.slice(i,a+1),p=c.startsWith("</");if(c.startsWith("<!")||c.startsWith("<?")){n.push(c),e=a+1;continue}let l=Ns(c,p);if(!l){n.push(c),e=a+1;continue}let u=c.slice(l.start,l.end);if(p){let T=r[r.length-1];T?(r.pop(),n.push(T.replacementHost?`</${T.replacementHost}>`:c),Qr.has(T.effectiveTag)&&--o):n.push(c),e=a+1;continue}let y=c.charCodeAt(c.length-2)===47,h=r[r.length-1],d=null;if(o===0?u==="tr"?d="trx":u==="td"?d="tdx":u==="th"&&(d="thx"):Ms.has((s=h==null?void 0:h.effectiveTag)!=null?s:"")?d=u==="tr"?null:"tr":(h==null?void 0:h.effectiveTag)==="table"?d=ks.has(u)?null:"tr":(h==null?void 0:h.effectiveTag)==="tr"&&(d=u==="td"||u==="th"?null:"td"),d){let T=d==="trx"||d==="tdx"||d==="thx";n.push(`${c.slice(0,l.start)}${d} is="${T?`r-${u}`:`regor:${u}`}"${c.slice(l.end)}`)}else y&&(h==null?void 0:h.effectiveTag)==="tr"?n.push(`${c.slice(0,c.length-2)}></${u}>`):n.push(c);if(!y){let T=d==="trx"?"tr":d==="tdx"?"td":d==="thx"?"th":d||u;r.push({replacementHost:d,effectiveTag:T}),Qr.has(T)&&++o}e=a+1}return n.join("")};var Ls="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",Is=new Set(Ls.toUpperCase().split(",")),Ds="http://www.w3.org/2000/svg",Xr=(t,e)=>{pe(t)?t.content.appendChild(e):t.appendChild(e)},wn=(t,e,n,r)=>{var i;let o=t.t;if(o){let a=n&&Is.has(o.toUpperCase())?document.createElementNS(Ds,o.toLowerCase()):document.createElement(o),c=t.a;if(c)for(let f of Object.entries(c)){let l=f[0],u=f[1];l.startsWith("#")&&(u=l.substring(1),l="name"),a.setAttribute(Tt(l,r),u)}let p=t.c;if(p)for(let f of p)wn(f,a,n,r);Xr(e,a);return}let s=t.d;if(s){let a;switch((i=t.n)!=null?i:Node.TEXT_NODE){case Node.COMMENT_NODE:a=document.createComment(s);break;case Node.TEXT_NODE:a=document.createTextNode(s);break}if(a)Xr(e,a);else throw new Error("unsupported node type.")}},Ue=(t,e,n)=>{n!=null||(n=ne.getDefault());let r=document.createDocumentFragment();if(!R(t))return wn(t,r,!!e,n),r;for(let o of t)wn(o,r,!!e,n);return r};var Yr=(t,e={selector:"#app"},n)=>{P(e)&&(e={selector:"#app",template:e}),Gn(t)&&(t=t.context);let r=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!r||!Me(r))throw U(0);n||(n=ne.getDefault());let o=()=>{for(let a of[...r.childNodes])F(a)},s=a=>{for(let c of a)r.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(Wt(e.template));o(),s(a.childNodes),e.element=a}else if(e.json){let a=Ue(e.json,e.isSVG,n);o(),s(a.childNodes)}return n.useInterpolation&&_t(r,n),new On(t,r,n).x(),B(r,()=>{Ee(t)}),Ct(t),{context:t,unmount:()=>{F(r)},unbind:()=>{ae(r)}}},On=class{constructor(e,n,r){m(this,"Et");m(this,"Fe");m(this,"o");m(this,"h");m(this,"p");this.Et=e,this.Fe=n,this.o=r,this.h=new Kt([e],r),this.p=new It(this.h)}x(){this.p.H(this.Fe)}};var Xe=t=>{if(R(t))return t.map(o=>Xe(o));let e={};if(t.tagName)e.t=t.tagName;else return t.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),t.textContent&&(e.d=t.textContent),e;let n=t.getAttributeNames();n.length>0&&(e.a=Object.fromEntries(n.map(o=>{var s;return[o,(s=t.getAttribute(o))!=null?s:""]})));let r=de(t);return r.length>0&&(e.c=[...r].map(o=>Xe(o))),e};var Zr=(t,e={})=>{var s,i,a,c,p,f;R(e)&&(e={props:e}),P(t)&&(t={template:t});let n=(s=e.context)!=null?s:()=>({}),r=!1;if(t.element){let l=t.element;l.remove(),t.element=l}else if(t.selector){let l=document.querySelector(t.selector);if(!l)throw U(1,t.selector);l.remove(),t.element=l}else if(t.template){let l=document.createRange().createContextualFragment(Wt(t.template));t.element=l}else t.json&&(t.element=Ue(t.json,t.isSVG,e.config),r=!0);t.element||(t.element=document.createDocumentFragment()),((i=e.useInterpolation)==null||i)&&_t(t.element,(a=e.config)!=null?a:ne.getDefault());let o=t.element;if(!r&&(((p=t.isSVG)!=null?p:ot(o)&&((c=o.hasAttribute)!=null&&c.call(o,"isSVG")))||ot(o)&&o.querySelector("[isSVG]"))){let l=o.content,u=l?[...l.childNodes]:[...o.childNodes],y=Xe(u);t.element=Ue(y,!0,e.config)}return{context:n,template:t.element,inheritAttrs:(f=e.inheritAttrs)!=null?f:!0,props:e.props,defaultName:e.defaultName}};var eo=t=>{var e;(e=Ne())==null||e.onMounted.push(t)};var to=t=>{let e,n={},r=(...o)=>{if(o.length<=2&&0 in o)throw U(4);return e&&!n.isStopped?e(...o):(e=Us(t,n),e(...o))};return r[X]=1,ve(r,!0),r.stop=()=>{var o,s;return(s=(o=n.ref)==null?void 0:o.stop)==null?void 0:s.call(o)},J(()=>r.stop(),!0),r},Us=(t,e)=>{var s;let n=(s=e.ref)!=null?s:W(null);e.ref=n,e.isStopped=!1;let r=0,o=Ie(()=>{if(r>0){o(),e.isStopped=!0,z(n);return}n(t()),++r});return n.stop=o,n};var no=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw U(4);return r&&!n.isStopped?r(...s):(r=Hs(t,e,n),r(...s))};return o[X]=1,ve(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},J(()=>o.stop(),!0),o},Hs=(t,e,n)=>{var a;let r=(a=n.ref)!=null?a:W(null);n.ref=r,n.isStopped=!1;let o=0,s=c=>{if(o>0){r.stop(),n.isStopped=!0,z(r);return}let p=t.map(f=>f());r(e(...p)),++o},i=[];for(let c of t){let p=w(c,s);i.push(p)}return s(null),r.stop=()=>{i.forEach(c=>{c()})},r};var ro=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw U(4);return r&&!n.isStopped?r(...s):(r=Bs(t,e,n),r(...s))};return o[X]=1,ve(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},J(()=>o.stop(),!0),o},Bs=(t,e,n)=>{var s;let r=(s=n.ref)!=null?s:W(null);n.ref=r,n.isStopped=!1;let o=0;return r.stop=w(t,i=>{if(o>0){r.stop(),n.isStopped=!0,z(r);return}r(e(i)),++o},!0),r};var oo=t=>(t[ht]=1,t);var so=(t,e)=>{if(!e)throw U(5);let r=Le(t)?le:a=>a,o=()=>localStorage.setItem(e,JSON.stringify(Z(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=Ie(o);return J(i,!0),t};var An=(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},io=An;var ao=(t,e,n)=>{let r=[],o=()=>{e(t.map(i=>i()))};for(let i of t)r.push(w(i,o));n&&o();let s=()=>{for(let i of r)i()};return J(s,!0),s};var co=t=>{if(!g(t))throw U(3,"observerCount");return t(void 0,void 0,2)};var po=t=>{Nn();try{t()}finally{Mn()}},Nn=()=>{fe.stack||(fe.stack=[]),fe.stack.push(new Set)},Mn=()=>{let t=fe.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 fe.stack;for(let n of e)try{z(n)}catch(r){console.error(r)}};
@@ -191,13 +191,14 @@ var ComponentHead = class {
191
191
 
192
192
  // src/cleanup/getBindData.ts
193
193
  var getBindData = (node) => {
194
- const bindData = node[bindDataSymbol];
194
+ const bindableNode = node;
195
+ const bindData = bindableNode[bindDataSymbol];
195
196
  if (bindData) return bindData;
196
197
  const newBindData = {
197
198
  unbinders: [],
198
199
  data: {}
199
200
  };
200
- node[bindDataSymbol] = newBindData;
201
+ bindableNode[bindDataSymbol] = newBindData;
201
202
  return newBindData;
202
203
  };
203
204
 
@@ -229,7 +230,9 @@ var warning = (type, ...args) => {
229
230
  if (isString(item)) handler(item);
230
231
  else handler(item, ...item.args);
231
232
  };
232
- var warningHandler = { warning: console.warn };
233
+ var warningHandler = {
234
+ warning: console.warn
235
+ };
233
236
 
234
237
  // src/composition/onUnmounted.ts
235
238
  var onUnmounted = (onUnmounted2, noThrow) => {
@@ -1731,12 +1734,9 @@ var _ForBinder = class _ForBinder {
1731
1734
  const result = config.createContext(newValue, i2);
1732
1735
  const mountItem = MountList.__createItem(result.index, newValue);
1733
1736
  parser.__scoped(capturedContext, () => {
1734
- var _a2;
1737
+ var _a2, _b;
1735
1738
  parser.__push(result.ctx);
1736
- const insertParent = (_a2 = commentEnd.parentNode) != null ? _a2 : commentBegin.parentNode;
1737
- if (!insertParent) {
1738
- throw new Error("[r-for] cannot mount: missing anchor parent");
1739
- }
1739
+ const insertParent = (_b = (_a2 = commentEnd.parentNode) != null ? _a2 : commentBegin.parentNode) != null ? _b : parent;
1740
1740
  let start = nextSibling.previousSibling;
1741
1741
  const childNodes = [];
1742
1742
  for (const x of nodes) {
@@ -1776,6 +1776,9 @@ var _ForBinder = class _ForBinder {
1776
1776
  }
1777
1777
  };
1778
1778
  const updateDom = (newValues) => {
1779
+ const beginParent = commentBegin.parentNode;
1780
+ const endParent = commentEnd.parentNode;
1781
+ if (!beginParent || !endParent) return;
1779
1782
  let len = mountList.__length;
1780
1783
  if (isFunction(newValues)) newValues = newValues();
1781
1784
  const unrefedNewValue = unref(newValues[0]);
@@ -5239,7 +5242,10 @@ var computeManyOnce = (sources, compute, status) => {
5239
5242
  trigger(result);
5240
5243
  return;
5241
5244
  }
5242
- result(compute(...sources.map((x) => x())));
5245
+ const values = sources.map(
5246
+ (source) => source()
5247
+ );
5248
+ result(compute(...values));
5243
5249
  ++i;
5244
5250
  };
5245
5251
  const stopObservingList = [];
@@ -5353,7 +5359,9 @@ var raw = html;
5353
5359
  var observeMany = (sources, observer, init) => {
5354
5360
  const stopObservingList = [];
5355
5361
  const callObserver = () => {
5356
- observer(sources.map((y) => y()));
5362
+ observer(
5363
+ sources.map((source) => source())
5364
+ );
5357
5365
  };
5358
5366
  for (const source of sources) {
5359
5367
  stopObservingList.push(observe(source, callObserver));