compelem 0.26.3 → 0.26.5

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/CompElem.d.ts CHANGED
@@ -2,7 +2,7 @@ import { IComponent } from "./IComponent";
2
2
  import { CssTemplate } from "./render/CssTemplate";
3
3
  import { Template } from "./render/Template";
4
4
  import { UpdatePoint } from "./render/UpdatePoint";
5
- import { DefaultProps, TplFn } from "./types";
5
+ import { TplFn } from "./types";
6
6
  /**
7
7
  * CompElem基类,意为组件元素。提供了基本内置属性及生命周期等必备接口
8
8
  * 每个组件都需要继承自该类
@@ -11,11 +11,8 @@ import { DefaultProps, TplFn } from "./types";
11
11
  */
12
12
  export declare class CompElem<T = HTMLElement> extends HTMLElement implements IComponent<T> {
13
13
  #private;
14
- static defaults(options: DefaultProps): void;
15
14
  __data_: Record<string, any>;
16
15
  __updateTree: Array<UpdatePoint>;
17
- _eventBindList: Array<[string, Function, Node, Function?]>;
18
- __docoEventMap: Map<string, Function>;
19
16
  __updateSubViewDeps: Map<string, Set<UpdatePoint>>;
20
17
  _cssUpdateInNextTick: boolean;
21
18
  _cssVarOldValueMap: Record<string, string | number>;
@@ -39,6 +36,7 @@ export declare class CompElem<T = HTMLElement> extends HTMLElement implements IC
39
36
  get cssVars(): Record<string, string | number | undefined>;
40
37
  __inited: boolean;
41
38
  __thisRef: WeakRef<any>;
39
+ __superComp: Function;
42
40
  constructor(...args: any[]);
43
41
  insertStyleSheet(sheet: CssTemplate | CSSStyleSheet): CSSStyleSheet | null;
44
42
  /**
@@ -47,8 +45,6 @@ export declare class CompElem<T = HTMLElement> extends HTMLElement implements IC
47
45
  get rootComponent(): CompElem;
48
46
  connectedCallback(): void;
49
47
  disconnectedCallback(): void;
50
- __bindEvents(): void;
51
- __unbindEvents(): void;
52
48
  beforeDestroyed(): void;
53
49
  destroyed(): void;
54
50
  get isDestroyed(): boolean;
@@ -98,7 +94,6 @@ export declare class CompElem<T = HTMLElement> extends HTMLElement implements IC
98
94
  * @param args 自定义参数
99
95
  */
100
96
  emit(evName: string, arg?: Record<string, any>, event?: Event): void;
101
- _callEmitEvent(evSrc: number, evName: string, arg: Record<string, any>): void;
102
97
  /**
103
98
  * 下一帧执行
104
99
  * @param cbk
package/README.md CHANGED
@@ -144,8 +144,8 @@ export class PageTest extends CompElem {
144
144
  对于无体组件无需定义渲染函数,常用于layout、grid等结构控制相关组件。无视图组件仅支持global及host样式,如
145
145
  ```ts
146
146
  @csscope(Csscope.HOST, Csscope.GLOBAL)
147
- static get css(): string {
148
- return `
147
+ static get css() {
148
+ return css`
149
149
  l-main{
150
150
  display: block;
151
151
  flex: 1;
@@ -282,7 +282,7 @@ export class PageTest extends CompElem {
282
282
  - emit(evName: string, arg: Record<string, any>, event?: Event) 抛出自定义事件
283
283
  - nextTick(cbk: () => void) 下一帧执行函数
284
284
  - forceUpdate() 强制更新一次视图
285
- - insertStyleSheet(sheet: string | CSSStyleSheet): CSSStyleSheet 向组件ShadowDOM插入样式表,仅影响组件实例
285
+ - insertStyleSheet(sheet: CssTemplate | CSSStyleSheet): CSSStyleSheet 向组件ShadowDOM插入样式表,仅影响组件实例
286
286
  - destroy() 销毁组件
287
287
 
288
288
  ## 组件渲染流程
@@ -433,9 +433,10 @@ return h` <l-tooltip>
433
433
  - @event 定义事件,支持修饰符
434
434
  - @onced 定义一次性事件
435
435
  - @throttled 定义节流函数
436
+ - @emits 声明组件事件
436
437
 
437
438
  ### 继承
438
- 部分指令可由子类继承不会覆盖,包括@state/@prop/@watch/@computed
439
+ 部分指令可由子类继承不会覆盖,包括@state/@prop/@watch/@computed/@emits
439
440
 
440
441
  ## 事件
441
442
  在CompElem中有三类不同事件,分别返回原生事件对象或自定义对象
@@ -444,12 +445,24 @@ return h` <l-tooltip>
444
445
  2. 扩展原生事件 —— `<div @resize="..."` 在原生元素/组件元素上都可以监听扩展原生事件,监听器回调参数返回自定义数据对象
445
446
  3. 组件事件 —— `<l-select @change="..."` 在组件元素上默认仅可监听组件事件,监听器回调参数返回自定义数据对象
446
447
 
447
- ### 组件原生事件
448
- 如果想要在组件上监听原生事件如`click`等,需要使用`native`关键字
449
- ```html
450
- <l-select @click.native="${...}"></l-select>
448
+ ### 组件事件
449
+ 组件通过`emit`接口触发的事件必须提前通过`@emits`进行注册,如
450
+ ```ts
451
+ @emits('update:value','update:*','change1')
452
+ @tag("page-test")
453
+ export class PageTest extends CompElem {
454
+ ...
455
+ onChange(){
456
+ //如果未声明事件会报错
457
+ this.emit('change1',...)
458
+ }
459
+ }
460
+ ```
461
+ 非组件事件都会作为原生事件进行监听,如
462
+ ```html
463
+ <l-select @change1="${...}" @click="..."></l-select>
451
464
  ```
452
- 此时click事件监听器参数返回原生事件对象
465
+ 其中click事件会当作原生事件进行监听
453
466
 
454
467
  ### 跨框架事件监听
455
468
  如果组件要用于非 `CompElem` 框架时,需要为组件添加 `emit-native`属性,这样框架会将组件事件转为`CustomEvent`
@@ -484,9 +497,9 @@ return h` <l-tooltip>
484
497
  ```ts
485
498
  class CustomButton{
486
499
  ...
487
- @event('click.native', (comp) => comp)
500
+ @event('click', (comp) => comp)
488
501
  onClick() {
489
- this.emit('click')
502
+ this.emit('myclick')
490
503
  }
491
504
  }
492
505
  ```
package/config.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ import type { DefaultProps } from "./types";
2
+ /**
3
+ * 设置全局/组件默认属性
4
+ * @param options
5
+ */
6
+ export declare function setDefaults(options: DefaultProps): void;
7
+ export declare function getBaseSheets(ctor: Function): CSSStyleSheet[];
8
+ export declare const getDefaultCss: () => CSSStyleSheet[];
9
+ export declare const getGlobalDefaultProps: () => Record<string, any>;
10
+ export declare const getComponentDefaultProps: () => Record<string, any>;
package/constants.d.ts CHANGED
@@ -17,7 +17,15 @@ export declare enum Mode {
17
17
  Dev = "dev"
18
18
  }
19
19
  export declare const PropTypeMap: Record<string, Constructor<any>>;
20
+ export interface CompiledWatchMeta {
21
+ rootMap: Map<string, string[]>;
22
+ watchKeysDeep: string[] | undefined;
23
+ watchDeepUpdateMap: Record<string, Set<Function>>;
24
+ watchUpdateMap: Record<string, Set<Function>>;
25
+ onceMap: Map<string, boolean>;
26
+ }
20
27
  export declare const DefinitionCompEventMap: Map<Function, Record<string, any>[]>;
28
+ export declare const DefinitionCompEmitMap: WeakMap<Function, Set<string>>;
21
29
  export declare const DefinitionTagMap: Record<string, string>;
22
30
  export declare const DefinitionComponentMap: Record<string, Function>;
23
31
  export declare const DefinitionComputedMap: WeakMap<Function, Record<string, Getter>>;
@@ -26,26 +34,31 @@ export declare const DefinitionPropMap: WeakMap<Function, Record<string, PropOpt
26
34
  export declare const DefinitionModelMap: WeakMap<Function, string[]>;
27
35
  export declare const DefinitionDecoratorMap: Map<Function, DecoratorWrapper[]>;
28
36
  export declare const ObservedAttrsMap: Map<Function, Set<string>>;
37
+ export declare const ViewDepMap: Map<Function, Set<string>>;
29
38
  export declare const WatchKeysOnceMap: WeakMap<Function, Map<string, boolean>>;
30
39
  export declare const WatchKeysDeepListMap: WeakMap<Function, string[]>;
31
- export declare const WatchKeysListMap: WeakMap<Function, string[]>;
40
+ export declare const WatchKeyRootMap: WeakMap<Function, Map<string, string[]>>;
32
41
  export declare const WatchUpdateMap: WeakMap<Function, Record<string, Set<Function>>>;
33
42
  export declare const WatchDeepUpdateMap: WeakMap<Function, Record<string, Set<Function>>>;
34
43
  export declare const WatchImmediateListMap: WeakMap<Function, Record<string, Set<Function>>>;
44
+ export declare const CompiledWatchMetaMap: WeakMap<Function, CompiledWatchMeta | null>;
35
45
  export declare const StateShallowKeySetMap: WeakMap<Function, Set<string>>;
36
46
  export declare const PropShallowKeySetMap: WeakMap<Function, Set<string>>;
37
47
  export declare const HasChangedPropOrStateMap: WeakMap<Function, Map<string, Function>>;
48
+ export declare const ComputedMapCache: WeakMap<Function, Record<string, Getter>>;
38
49
  export declare const ComputedUpdateDepsMap: WeakMap<Function, Map<string, Set<Function>>>;
39
50
  export declare const CssUpdateDepsMap: WeakMap<Function, Set<string>>;
40
51
  export declare const CssTemplateCacheMap: WeakMap<TemplateStringsArray, CssTemplate>;
41
52
  export declare const CssStyleSheetCacheMap: WeakMap<TemplateStringsArray, CSSStyleSheet>;
42
53
  export declare const CssScopeCacheMap: WeakMap<Function, Map<string, CSSStyleSheet[]>>;
54
+ export declare const CssTemplateSheetMap: WeakMap<CssTemplate, CSSStyleSheet>;
55
+ export declare const CssVarKeyCacheMap: WeakMap<Function, Map<string, string>>;
43
56
  export declare const DirectiveScopeMap: Map<Function, string[]>;
44
57
  export declare const ComponentDynamicCssUpdaterMap: WeakMap<CompElem<any>, Map<Function, CSSStyleSheet>>;
45
58
  export declare const ComponentUninitializedSubComponentPropMap: WeakMap<CompElem<any>, Map<Node, Record<string, any>>>;
46
59
  export declare const ComponentUninitializedSlotFunctionMap: WeakMap<Node, Record<string, TplFn>>;
47
60
  export declare const ComponentUninitializedWrapperComponentMap: WeakMap<Node, CompElem<any>>;
48
- export declare const PATH_SEPARATOR = "-";
61
+ export declare const PATH_SEPARATOR = ".";
49
62
  export declare const PROP_NAME_SLOTS = "slots";
50
63
  export declare const DATA_KEY = "__data_";
51
64
  export declare const PLACEHOLDER = "\u27EC\u010A\u27ED";
@@ -0,0 +1,14 @@
1
+ import type { CompElem } from "../CompElem";
2
+ /**
3
+ * class用装饰器,声明组件的自定义事件
4
+ *
5
+ * 支持通配符 'update:*'(匹配 update:value 等)
6
+ * 支持驼峰/短横线格式,但在父组件中监听时,必须使用短横线格式,如 'state-ready',而不是 'stateReady'
7
+ *
8
+ * @param eventNames 事件名列表,如 'input'、'change'、'update:*'
9
+ * @example
10
+ * @emits('input', 'change', 'update:*')
11
+ * @tag('l-input')
12
+ * class Input extends CompElem { ... }
13
+ */
14
+ export declare function emits(...eventNames: string[]): (target: typeof CompElem<any>) => void;
@@ -1,6 +1,6 @@
1
1
  import { CompElem } from "../CompElem";
2
2
  /**
3
- * class用注解,用于自动注册自定义组件
3
+ * class用装饰器,用于自动注册自定义组件
4
4
  * @param name 自定义组件名称
5
5
  * @param immediate 立即注册,默认false
6
6
  */
@@ -1,3 +1,4 @@
1
+ export declare function normalizeClass(val: Record<string, boolean> | string | Array<Record<string, boolean> | string>): string;
1
2
  /**
2
3
  * 根据变量内容自动插入class,与静态class自动合并
3
4
  * @param styles 对象/数组/字符串
@@ -1,5 +1,7 @@
1
+ import { StyleValueObjectType } from "../types";
2
+ export declare function normalizeStyle(val: Record<string, string> | string | Array<Record<string, string> | string>): Record<string, StyleValueObjectType>;
1
3
  /**
2
- * 根据变量内容设置元素样式,与静态样式自动合并
4
+ * 根据变量内容设置元素样式
3
5
  * @param styles 对象/字符串
4
6
  */
5
- export declare const styles: (...args: (string | Record<string, string>)[]) => import("../types").DirectiveInstance;
7
+ export declare const styles: (style: string | Record<string, string> | (string | Record<string, string>)[]) => import("../types").DirectiveInstance;
package/events/event.d.ts CHANGED
@@ -1,4 +1,22 @@
1
1
  import { CompElem } from "../CompElem";
2
2
  export type EvHadler = (ev: Event) => any;
3
- export declare function addEvent(fullName: string, cbk: EvHadler, node: Element, component: CompElem<any>): ((toRemove?: boolean) => void) | undefined;
3
+ export declare function addEvent(fullName: string, cbk: EvHadler, node: Element, component: CompElem<any>, signal?: AbortSignal): ((toRemove?: boolean) => void) | undefined;
4
4
  export declare function addEmitEvent(node: Element, component: CompElem<any>, evName: string, c: EvHadler): void;
5
+ /**
6
+ * 获取事件注册队列
7
+ */
8
+ export declare function getEventBindList(comp: CompElem<any>): Array<[string, Function, Node, Function?]>;
9
+ export declare function bindEvents(comp: CompElem<any>): void;
10
+ /**
11
+ * 匹配组件声明的 emit 事件(精确名或 'update:*' 通配符),沿继承链向上查找
12
+ */
13
+ export declare function matchEmit(ctor: Function, evName: string): boolean;
14
+ export declare function emitEvent(comp: CompElem, evSrc: number, evName: string, arg: Record<string, any>): void;
15
+ /**
16
+ * 统一注册入口(组件事件不代理 / 扩展事件全局 / 委托或独立监听)
17
+ * @param fullName 事件全名,含修饰符,如 "click.stop.prevent"
18
+ * @param cbk 回调(已绑定 this)
19
+ * @param node 目标节点(Element | Window | Document)
20
+ */
21
+ export declare function registerEvent(comp: CompElem<any>, fullName: string, cbk: EvHadler, node: Element | Window | Document): void;
22
+ export declare function releaseEventHandlers(comp: CompElem<any>): void;
package/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export * from "./decorator/index";
5
5
  export * from "./decorators/computed";
6
6
  export * from "./decorators/csscope";
7
7
  export * from "./decorators/debounced";
8
+ export * from "./decorators/emits";
8
9
  export * from "./decorators/event";
9
10
  export * from "./decorators/onced";
10
11
  export * from "./decorators/prop";
@@ -28,6 +29,7 @@ export * from "./directives/When";
28
29
  export { createRef, css, h, Template };
29
30
  export declare function defineComponents(): void;
30
31
  export * from './CompElem';
32
+ export * from './config';
31
33
  export * from './types';
32
34
  export * from './utils';
33
35
  export * from './helpers';
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
- * compelem v0.26.3.1786624146
2
+ * compelem v0.26.5.1788274559
3
3
  * A modern, reactive, fast, lightweight and flexible lib for building web components
4
4
  * @holyhigh2
5
5
  * git+https://github.com/holyhigh2/compelem.git
6
6
  */
7
- import t,{toPath as e,some as s,isString as r,isUndefined as n,isBlank as o,closest as i,assign as a,isArray as l,each as c,isObject as u,isFunction as h,isSymbol as d,concat as p,startsWith as f,get as g,toArray as _,defaults as m,merge as E,clone as v,kebabCase as w,has as y,set as b,remove as S,size as N,includes as T,find as M,debounce as C,throttle as k,once as R,noop as x,map as A,flatMap as P,test as I,first as L,walkTree as O,filter as D,isEmpty as V,isNil as W,camelCase as H,isNull as B,isDefined as U,trim as j,isBoolean as F,parseJSON as K,cloneDeep as $,keys as G,groupBy as X,last as z,reject as q,compact as Q,intersect as Z,except as J,initial as Y,findIndex as tt,toString as et,reduce as st,snakeCase as rt,range as nt,split as ot,isEqual as it,replace as at,bind as lt,isMatch as ct,isElement as ut,join as ht}from"myfx";const dt="default",pt=/\s+\.?key\s*=/;var ft,gt;!function(t){t[t.RENDER=1]="RENDER",t[t.COMPUTED=2]="COMPUTED",t[t.DIRECTIVE=3]="DIRECTIVE"}(ft||(ft={})),function(t){t.Prod="prod",t.Dev="dev"}(gt||(gt={}));const _t={boolean:Boolean,string:String,number:Number,object:Object,array:Array,function:Function,undefined:Object},mt=new Map,Et={},vt={},wt=new WeakMap,yt=new WeakMap,bt=new WeakMap,St=new WeakMap,Nt=new Map,Tt=new Map,Mt=new WeakMap,Ct=new WeakMap,kt=new WeakMap,Rt=new WeakMap,xt=new WeakMap,At=new WeakMap,Pt=new WeakMap,It=new WeakMap,Lt=new WeakMap,Ot=new WeakMap,Dt=new WeakMap,Vt=new WeakMap,Wt=new WeakMap,Ht=new WeakMap,Bt=new Map,Ut=new WeakMap,jt=new WeakMap,Ft=new WeakMap,Kt=new WeakMap,$t="__data_",Gt="⟬Ċ⟭";class Xt{strings;vars;cssText;constructor(t,e){this.strings=t,this.vars=e}getCssText(){if(this.cssText)return this.cssText;let t="",e=this.strings.length-1;for(let s=0;s<=e;s++){const e=this.strings[s];let r=this.vars[s]??"";r instanceof Xt&&(r=r.getCssText()),t=t+e+r}return this.cssText=t,t}}function zt(t){console.error("[CompElem]",t)}function qt(t,e){console.error(`[CompElem <${t}>]`,e)}function Qt(...t){console.warn("[CompElem]",...t)}function Zt(t,e){console.warn(`[CompElem <${t}>]`,e)}function Jt(t){return e(t).join("-")}function Yt(t){return Object.getPrototypeOf(t)}function te(t){return t===Boolean||s(t,(t=>t===Boolean))}function ee(t){let e=t;return r(t)&&/(?:^true$)|(?:^false$)/.test(e)?e="true"===e:(n(e)||o(e))&&(e=!0),e}const se={getNodes(t,e){let s=t.nextSibling;if(!e)return[s];let r=[];for(;s&&s!==e;)r.push(s),s=s?.nextSibling;return r},insertBefore:function(t,e){if(!t.parentNode)return;let s=document.createDocumentFragment();s.append(...e),t.parentNode.insertBefore(s,t)},remove:function(t,e){if(t===e)return void t?.parentNode?.removeChild(t);let s=t.nextSibling;for(;s&&s!==e;)s?.parentNode?.removeChild(s),s=t.nextSibling},clear(t,e){if(!t)return;let s,r=document.createNodeIterator(t,NodeFilter.SHOW_COMMENT);for(r=document.createNodeIterator(t,NodeFilter.SHOW_COMMENT|NodeFilter.SHOW_ELEMENT);s=r.nextNode();)t!==s&&(s instanceof Comment||s instanceof Xe&&s.destroy())}};function re(t,e){let s=i(t,(t=>t.host&&t.host instanceof Xe),"parentNode");if(!s||s.host!==e)return s?s.host:void 0}function ne(t){return!!vt[t.tagName?.toLowerCase()]}function oe(t,e,s){let r=jt.get(t);r||(r=new Map,jt.set(t,r));let n=r.get(e)??{};r.set(e,a(n,s))}var ie;function ae(...t){return(e,s,r)=>{let n=r.get();return(l(n)?n:[n]).forEach((s=>{let r;if(s instanceof Xt){if(r=Wt.get(s.strings),!r){let t=s.getCssText();r=new CSSStyleSheet,r.replaceSync(t),Wt.set(s.strings,r)}}else s instanceof CSSStyleSheet&&(r=s);if(!r)return;let n=Ht.get(e);n||(n=new Map,Ht.set(e,n)),c(t,(t=>{if(t===ie.GLOBAL)return void(document.adoptedStyleSheets.includes(r)||(document.adoptedStyleSheets=[...document.adoptedStyleSheets,r]));let e=n.get(t);e||(e=[],n.set(t,e)),e.push(r)}))})),r}}function le(t,e){let s=e,r=Reflect.get(s[$t],t);if(ue.__collecting&&ue.__varPathList.push(t),pe.has(r)||fe.get(r)){let n=ge.get(r);n||(n=new Set,ge.set(r,n));let o=he.get(e);o||(o={},he.set(e,o));let i=pe.get(r)??r;if(fe.get(i)?.deref()!==e){let e=de.get(i);e&&(o[e[0]]=t)}return n.add(s.__thisRef),i}if(u(r)&&!h(r)&&!(r instanceof Node)&&!Object.isFrozen(r)){let e=Pt.get(s.constructor),n=e?.has(t);n||(e=It.get(s.constructor),n=e?.has(t)),r=n||"slots"===t?r:_e(r,s,t)}return r}function ce(t,e,s){let r=s;if(!r.__inited)return void Reflect.set(r[$t],t,e);let n=r[$t][t],o=Lt.get(r.constructor),i=o?.get(t),a=pe.get(n);if(i){if(!i.call(r,e,n,[t],e,n))return!0}else{if(Object.is(n,e))return!0;if(u(e)&&a===e)return!0}Reflect.set(r[$t],t,e),me(s,e,n,[t])}!function(t){t.INNER="inner",t.HOST="host",t.GLOBAL="global"}(ie||(ie={}));const ue={popDirectiveQ(){return this.__varPathList.reduceRight(((t,e)=>(t.includes(e)||t.unshift(e),t)),[])},start(){this.__collecting=!0,this.__varPathList=[]},end(t,e){t&&e&&t._regSubViewDeps(ue.popVarPathList(),e),this.__collecting=!1},popVarPathList(){let t=Array.from(new Set(this.__varPathList));return this.__varPathList=[],t},__varPathList:[],__collecting:!1},he=new WeakMap,de=new WeakMap,pe=new WeakMap,fe=new WeakMap,ge=new WeakMap;function _e(t,e,r){if(pe.has(t))return pe.get(t);if(fe.has(t)){if(r){let r=ge.get(t);r||(r=new Set,ge.set(t,r)),s(r.values(),(t=>t.deref()===e))||r.add(new WeakRef(e))}return t}const n=new Proxy(t,{get(t,s,r){if(!s)return;const n=Reflect.get(t,s,r);if(d(s))return n;if(h(n))return n;if("length"===s&&l(t))return n;if("__"===s.substring(0,2))return n;if(ue.__collecting){let t=de.has(r)?p(de.get(r)):[];t.push(s);let e=t.join(".");ue.__varPathList.push(e)}if(pe.has(n))return pe.get(n);let o=n;if(u(n)&&!h(n)&&!(n instanceof Node)&&!Object.isFrozen(n)){let t=de.has(r)?p(de.get(r)):[];o=_e(n,e),t.push(s),de.set(o,t),pe.set(n,o)}return o},set(t,s,r,n){if(!s)return!1;let o=t[s],i=de.get(n)??[],a=p(i,[s]),l=Lt.get(e.constructor),c=l?.get(a[0]),u=a.length>1,h=r,d=o;if(u&&(d=h=e._getPrivateData()[a[0]]),c){if(!c.call(e,h,d,a,r,o))return!0}else if(Object.is(o,r))return!0;let f=r,g=Reflect.set(t,s,f);me(e,f,o,a);let _=ge.get(n),m=[];return _?.forEach((t=>{let e=t.deref();if(!e)return;if(e.isDestroyed)return void m.push(t);let s=(he.get(e)??{})[a[0]],r=a.join(".");r=r.replace(a[0],s),me(e,f,o,r.split("."),h,d)})),m.forEach((t=>{let e=t.deref();he.delete(e),_.delete(t)})),g}});return de.has(n)||de.set(n,r?[r]:[]),pe.set(t,n),r&&fe.set(n,new WeakRef(e)),n}function me(t,e,s,r,n,o){n=n??e,o=o??s,r.length>1&&(o=n=t._getPrivateData()[r[0]]);let i=r.join(".");!function(t,e,s,r,n,o){let i=Yt(t.constructor),a=kt.get(t.constructor)??kt.get(i),l=Ct.get(t.constructor)??Ct.get(i),c=xt.get(t.constructor)??xt.get(i),u=Rt.get(t.constructor)??Rt.get(i),h=Mt.get(t.constructor)??Mt.get(i);a?.forEach((i=>{(r===i||f(i,r+".")&&!Object.is(g(t._getPrivateData(),i),g(e,i))||f(r,i+".")&&l?.includes(i)&&!Object.is(g(t._getPrivateData(),i),g(e,i)))&&p(_(u[i]),_(c[i])).forEach((a=>{a&&!0!==h.get(i)&&(t._watchUpdateArgsInNextTick?.set(a,{newValue:e,oldValue:s,chain:r.split("."),rootObjNew:n,rootObjOld:o,fullMatch:i===r}),t._watchUpdateSetInNextTick?.add(a),h.has(i)&&h.set(i,!0))}))}))}(t,e,s,i,n,o),function(t,e){let s=Ot.get(t.constructor);s?.has(e)&&s.get(e)?.forEach((e=>{t._computedUpdateSetInNextTick.add(e)}))}(t,i),function(t,e){let s=Dt.get(t.constructor);if(!s)return;let r=e.split("."),n="";r.forEach((e=>{n=n?n+"."+e:e,s.has(n)&&(t._cssUpdateInNextTick=!0)}))}(t,i),function(t,e,s,r){t._notify(e,s,r)}(t,n,o,r)}const Ee=new Map;class ve{static nextSet=new Set;static nextPending=!1;static next;static flush(){ve.nextPending=!1;let t=Array.from(ve.nextSet);ve.nextSet.clear(),Ee.clear(),t.forEach((t=>t())),t=null}static pushNext(t){ve.nextSet.add(t),ve.nextPending||(ve.nextPending=!0,ve.next())}}function we(t){if(1===arguments.length)return(e,s,r)=>{t.required=t.required||!1,t.attribute=!1!==t.attribute,ye(e,s,t)};let e=arguments[0],s=arguments[1],r=arguments[2];t={type:void 0,required:!1,attribute:!0},r&&"function"==typeof r.type&&(t=m(r,t),r=void 0),t.shallow=t.shallow||!1,ye(e,s,t)}function ye(t,e,s,r){let n;if(!bt.has(t.constructor)){const e={};let s=t.constructor;for(;(s=Yt(s))!==Xe;)E(e,v(bt.get(s)??{}));n=new Set,c(e,((t,e)=>{if(t.attribute){let t=w(e);n?.add(t)}})),Tt.set(t.constructor,n),bt.set(t.constructor,e)}if(s.attribute){n||(n=Tt.get(t.constructor));let s=w(e);n?.add(s)}if(s.model){let s=St.get(t.constructor);s||(s=[],St.set(t.constructor,s)),s.includes(e)||s.push(e)}if(y(t.constructor,"observedAttributes")||(t.constructor.observedAttributes=[]),n&&(t.constructor.observedAttributes=_(n)),b(bt.get(t.constructor),e,s),s.hasChanged){let r=Lt.get(t.constructor);r||(r=new Map,Lt.set(t.constructor,r)),r.set(e,s.hasChanged)}if(s.shallow){let s=It.get(t.constructor);s||(s=new Set,It.set(t.constructor,s)),s.add(e)}Reflect.defineProperty(t,e,{get(){return le(e,this)},set(s){St.get(t.constructor)?.includes(e)&&function(t,e,s){s.emit("update:"+t,{value:e})}(e,s,this)}})}(()=>{const t=Promise.resolve(),e=ve.flush;ve.next=()=>{t.then(e)}})();const be=new Set;function Se(t){return Tt.get(t)??Tt.get(Yt(t))??be}const Ne=["resize","outside","mutate"],Te=new WeakMap,Me=[],Ce=[],ke=[],Re=new WeakSet,xe=new ResizeObserver((t=>{for(const e of t){const t=Array.isArray(e.contentBoxSize)?e.contentBoxSize[0]:e.contentBoxSize,s=Array.isArray(e.borderBoxSize)?e.borderBoxSize[0]:e.borderBoxSize;if(!Re.has(e.target)){Re.add(e.target);continue}let r=Te.get(e.target);r&&r.forEach((r=>{r({target:e.target,contentBoxSize:t,borderBoxSize:s,type:"resize"})}))}}));var Ae;!function(t){t.Child="child",t.Tree="tree",t.Attr="attr",t.Char="char"}(Ae||(Ae={}));const Pe=new WeakMap,Ie=new MutationObserver((t=>{for(let e=0;e<t.length;e++){const s=t[e];let r=Pe.get(s.target);if(!r)return;let n={target:s.target},o=null;switch(s.type){case"subtree":n.type=Ae.Tree,o=r[Ae.Tree];break;case"childList":n.type=Ae.Child,n.addedNodes=s.addedNodes,n.removedNodes=s.removedNodes,o=r[Ae.Child];break;case"attributes":n.type=Ae.Attr,n.attributeName=s.attributeName,n.oldValue=s.oldValue,o=r[Ae.Attr];break;case"characterData":n.type=Ae.Char,n.oldValue=s.oldValue,o=r[Ae.Char]}o&&(n.type="mutate",o(n))}}));function Le(e,s,r,n,o,i){if("resize"===e)return function(t,e,s,r){let n=Te.get(t);n||(n=[],Te.set(t,n));let o=xe;if(r){let s=e;e=(...r)=>{s(...r),S(n,(t=>t===e)),N(n)<1&&(o.unobserve(t),Te.delete(t))}}return n.push(e),xe.observe(t),(s=!1)=>{S(n,(t=>t===e)),N(n)<1&&(o.unobserve(t),Te.delete(t),s&&(o=t=null))}}(s,r,0,i);if("outside"===e)switch(n[0]){case"mousedown":return function(e,s){return Me.push([e,s]),(r=!1)=>{t.remove(Me,(t=>t[0]===e&&t[1]===s))}}(s,r);case"dblclick":return function(e,s){return ke.push([e,s]),(r=!1)=>{t.remove(ke,(t=>t[0]===e&&t[1]===s))}}(s,r);default:return function(e,s){return Ce.push([e,s]),(r=!1)=>{t.remove(Ce,(t=>t[0]===e&&t[1]===s))}}(s,r)}else if("mutate"===e)return function(t,e,s){let r=T(s,"child"),n=T(s,"attr"),o=T(s,"char"),i=T(s,"tree"),a=Pe.get(t);if(!a)return a={},Pe.set(t,a),r&&(a[Ae.Child]=e),n&&(a[Ae.Attr]=e),o&&(a[Ae.Char]=e),i&&(a[Ae.Tree]=e),Ie.observe(t,{childList:r,attributes:n,characterData:o,subtree:i}),(e=!1)=>{Pe.delete(t),e&&(t=null)}}(s,r,n)}document.addEventListener("mousedown",(t=>{let e=g(t.composedPath(),0,t.target);Me.forEach((([s,r])=>{s.contains(e)||s.contains(i(e,(t=>t instanceof ShadowRoot),"parentNode")?.host)||r({type:"outside",target:s,modifier:"mousedown",event:t})}))}),!1),document.addEventListener("click",(t=>{let e=g(t.composedPath(),0,t.target);Ce.forEach((([s,r])=>{s.contains(e)||s.contains(i(e,(t=>t instanceof ShadowRoot),"parentNode")?.host)||r({type:"outside",target:s,modifier:"click",event:t})}))}),!1),document.addEventListener("dblclick",(t=>{let e=g(t.composedPath(),0,t.target);ke.forEach((([s,r])=>{s.contains(e)||s.contains(i(e,(t=>t instanceof ShadowRoot),"parentNode")?.host)||r({type:"outside",target:s,modifier:"dblclick",event:t})}))}),!1);const Oe=/,|^(debounce:.+)|(debounce$)/,De=/,|^(throttle:.+)|(throttle$)/,Ve="native",We={esc:"escape"},He=()=>{};function Be(t,e,s,r){let n,o=t.split("."),i=o.shift(),a=o.includes("once"),l=e??He;if(n=M(o,(t=>Oe.test(t)))){let t=n.split(":");l=C(l,parseInt(t[1])||100)}if(n=M(o,(t=>De.test(t)))){let t=n.split(":");l=k(l,parseInt(t[1])||100)}if(a&&(l=R(l)),vt[s.tagName?.toLowerCase()]&&(s!==r||o.includes(Ve)||o.push(Ve),!o.includes(Ve)))return Ue(s,r,i,l),x;if(function(t){return Ne.includes(t)}(i))return Le(i,s,l,o,0,a);let c=t=>{if(o.includes("prevent")&&t.preventDefault(),o.includes("stop")&&t.stopPropagation(),!o.includes("self")||t.target===t.currentTarget){if(t instanceof MouseEvent){if(o.includes("left")&&0!=t.button)return;if(o.includes("right")&&2!=t.button)return;if(o.includes("middle")&&1!=t.button)return}else if(t instanceof KeyboardEvent){if(S(o,(t=>"ctrl"==t))[0]&&!t.ctrlKey)return;if(S(o,(t=>"alt"==t))[0]&&!t.altKey)return;if(S(o,(t=>"shift"==t))[0]&&!t.shiftKey)return;if(S(o,(t=>"meta"==t))[0]&&!t.metaKey)return;let e=A(o,(t=>We[t]||t));if(N(e)>0&&!e.includes(t.key.toLowerCase()))return}l(t)}},u={capture:o.includes("capture")||!1,passive:o.includes("passive")||!1};return s.addEventListener(i,c,u),(t=!1)=>{s.removeEventListener(i,c,u),t&&(s=null)}}function Ue(t,e,s,r){let n=g(t,"__c_emit_event_")??e._subComponentEventSn++;b(t,"__c_emit_event_",n);let o=e._subComponentEventMap.get(n);o||(o={},e._subComponentEventMap.set(n,o)),o[s]=r}let je=[],Fe=0;const Ke=new WeakMap,$e={},Ge="slots";class Xe extends HTMLElement{static defaults(t){je=P(t.css,(t=>{if(r(t)){let e=new CSSStyleSheet;return e.replaceSync(t),e}return t instanceof CSSStyleSheet?t:[]})),t.global,c(t,((t,e)=>{I(e[0],/[A-Z]/)}))}#t;#e={};__data_={};#s={};#r;__updateTree;_eventBindList;__docoEventMap;__updateSubViewDeps;_cssUpdateInNextTick=!1;_cssVarOldValueMap;_watchUpdateSetInNextTick;_watchUpdateArgsInNextTick;_computedUpdateSetInNextTick;_subComponentEventSn=0;_subComponentEventMap=new Map;get[Symbol.toStringTag](){return this.constructor.name}get cid(){return this.#t}get attrs(){return this.#n}get props(){return this.#o}get renderRoot(){return this.#i?.deref()}get renderRoots(){return this.#a.flatMap((t=>t.deref()??[]))}get parentComponent(){return this.#l?.deref()}get wrapperComponent(){return this.#c?.deref()}get slots(){return $e}get slotHooks(){return this.#u}get cssSheets(){return Ht.get(this.constructor)?.get(ie.INNER)}get isMounted(){return this.#h}#n;#o;#i;#a;#l;#c;#d={};#u={};#p={};#h=!1;#f=!1;#g;get cssVars(){return{}}__inited=!1;#_=!1;#m;__thisRef;constructor(...t){super(),this.#t=Fe++,this.__updateTree=[],this.__thisRef=new WeakRef(this),this.#m=this.#E.bind(this),1===N(t)&&(this.#o={},a(this.#o,L(t))),Reflect.getOwnPropertyDescriptor(this.constructor.prototype,"slots")||Reflect.defineProperty(this.constructor.prototype,"slots",{get(){return le("slots",this)},set(t){ce("slots",t,this)}});let e=Nt.get(this.constructor)??Nt.get(Yt(this.constructor));e&&e.sort(((t,e)=>e.priority-t.priority)).forEach((t=>t.create(this))),this.#v=this.#w.bind(this)}insertStyleSheet(t){if(!this.#r)return null;let e;if(t instanceof Xt){if(!e){let s=t.getCssText();e=new CSSStyleSheet;try{e.replaceSync(s)}catch(t){}}}else if(t instanceof CSSStyleSheet){if(this.#r.adoptedStyleSheets.includes(t))return t;e=t}return e&&(this.#r.adoptedStyleSheets=[...this.#r.adoptedStyleSheets,e]),e}get rootComponent(){let t=this;for(;t.parentComponent;)t=t.parentComponent;return t}#v;connectedCallback(){let t=i(this.parentNode,(t=>t instanceof Xe||t.host instanceof Xe),"parentNode");this.#l=t?t instanceof Xe?new WeakRef(t):new WeakRef(t.host):void 0;let e=Kt.get(this);e&&(this.#c=new WeakRef(e),Kt.delete(this));let s=Ht.get(this.constructor)?.get(ie.HOST);if(s){let t=this.#c?.deref()?.shadowRoot??this.#l?.deref()?.shadowRoot??this.ownerDocument;this.#c&&!this.#c.deref()?.shadowRoot?.contains(this)&&(t=i(this,(t=>t instanceof HTMLDocument||t instanceof ShadowRoot),"parentNode")),c(s,(e=>{t.adoptedStyleSheets.includes(e)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}))}this.setup(),this.__bindEvents()}disconnectedCallback(){this.__unbindEvents()}__bindEvents(){let t=this._eventBindList;c(t,(t=>{let[e,s,r,n]=t;if(n)return;if(!r)return;let o=Be(e,s&&g(globalThis,s.name)!==s?s.bind(this):s,r,this);t[3]=o}));let e=mt.get(this.constructor);N(e)>0&&(this.__docoEventMap||(this.__docoEventMap=new Map),c(e,(({name:t,targetFn:e,fnName:s})=>{if(this.__docoEventMap.has(t+"@"+s))return;let r=e?e(this):this,n=g(this,s),o=Be(t,n&&g(globalThis,n.name)!==n?n.bind(this):n,r,this);this.__docoEventMap.set(t+"@"+s,o)})))}__unbindEvents(){c(this._eventBindList,(t=>{let[,,,e]=t;e&&e(),t[3]=null}));let t=[];c(this.__docoEventMap,((e,s)=>{e&&e(),t.push(s)})),t.forEach((t=>this.__docoEventMap.delete(t)))}beforeDestroyed(){}destroyed(){}get isDestroyed(){return this.#y}#y=!1;destroy(){if(this.#y)return;this.#y=!0;let t=Nt.get(this.constructor)??Nt.get(Yt(this.constructor));if(t&&t.sort(((t,e)=>e.priority-t.priority)).forEach((t=>{t.destroy(this)})),this.beforeDestroyed(),this.__unbindEvents(),this.__docoEventMap?.clear(),this.__docoEventMap=this._eventBindList=null,Ut.get(this)?.clear(),Ut.delete(this),this._watchUpdateArgsInNextTick?.clear(),this._watchUpdateSetInNextTick?.clear(),this._computedUpdateSetInNextTick?.clear(),this._computedUpdateSetInNextTick=null,this.__updateSubViewDeps?.clear(),this.#l){let t=this.#l.deref();t&&O(t.__updateTree,(e=>{e.__destroyed||e.node?.deref()===this&&(e.destroy(t),S(e.parent?e.parent.children:t.__updateTree,(t=>t===e)))}))}c(this.__updateTree,(t=>t?.destroy(this))),c(this.#d,(t=>{Ke.delete(t),t.remove()})),c(this.#p,(t=>{c(t,(t=>t.remove()))})),c(this.__data_.slots,((t,e)=>{c(t,(t=>t.remove()))})),this.#b.clear(),this.#m=this.__thisRef=this.#p=this.#d=this.#b=this.#e=this.__data_.slots=null,this.remove(),this.#S=this.#i=this.#a=this.#r=this.#s=this.#n=this.#o=this.#i=this.#a=this.#u=this.#v=this.__data_=this.__updateTree=this.#l=this._asyncDirectives=this.#c=null,this.destroyed()}setup(){if(this.__inited)return;if(this.#_)return;this.#_=!0;const t=this.#N();this.propsReady(t);for(const e in t){const s=t[e];this.__data_[e]=s}this.#T(),this.__data_.slots={},Reflect.defineProperty(this.__data_,"__isData",{enumerable:!1,value:!0});let e=Yt(this.constructor);if(kt.get(this.constructor)??kt.get(e)){this._watchUpdateSetInNextTick=new Set,this._watchUpdateArgsInNextTick=new Map;let t=Mt.get(this.constructor)??Mt.get(e),s=At.get(this.constructor)??At.get(e);c(s,((e,s)=>{let r=g(this,s);e.forEach((t=>{t.call(this,r,void 0,s)})),t.has(s)&&t.set(s,!0)}))}let s=a({},wt.get(this.constructor),wt.get(e));if(s){this._computedUpdateSetInNextTick=new Set;let t=Ot.get(this.constructor);t?c(s,((t,e)=>{this[$t][e]=t.call(this)})):(t=new Map,Ot.set(this.constructor,t),c(s,((e,s)=>{b(e,"key",s),ue.start(),this[$t][s]=e.call(this),ue.end(),ue.popVarPathList().forEach((s=>{let r=t.get(s);r||(r=new Set,t.set(s,r)),r.add(e)}))})))}ue.start();let r=this.render();ue.end();let n,i=ue.popVarPathList();this.constructor.prototype._viewDeps||(this.constructor.prototype._viewDeps=i),null===r?(this.#a=[],this.#i=void 0):(this.#r=this.attachShadow({mode:"open"}),this.#r.adoptedStyleSheets=[...je,...Ht.get(this.constructor)?.get(ie.INNER)??[]],n=function(t,e){let s,r=[];_s.has(e.constructor)?(s=_s.get(e.constructor),r=vs(t)):(s=new ss(t,e,r),_s.set(e.constructor,s));let[n,o]=ws(e,s,r);return e.__updateTree=o,n}(r,this),n&&N(n.children)>0&&(this.#a=D(n.children,(t=>t.nodeType===Node.ELEMENT_NODE)).map((t=>new WeakRef(t))),this.#i=this.#a[0])),this.__inited=!0,this.#M();let l=Ft.get(this);l&&(this.#u=l,Ft.delete(this)),c(this.#u,((t,e)=>{this.#C(e)}));const u=this;let h=Nt.get(this.constructor)??Nt.get(Yt(this.constructor));h&&h.sort(((t,e)=>e.priority-t.priority)).forEach((t=>{t.beforeMount(this,((t,e)=>(u.__data_[t]=e,u.__data_[t])))})),this.beforeMount(),setTimeout((()=>{if(!this.isDestroyed){if(this.#h=!0,this.#r){ue.start();let t=this.cssVars;if(ue.end(),!V(t)){this._cssVarOldValueMap={};let e=Dt.get(this.constructor);e||(e=new Set(ue.popVarPathList()),Dt.set(this.constructor,e));let s="";c(t,((t,e)=>{let r="--"+w(e).replace(/^-+/,"");(o(t)||W(t))&&(t="initial"),this._cssVarOldValueMap[r]=t,s+=";"+r+":"+t})),this.style.cssText+=s}}n&&N(n.children)>0&&(this.#r.append(n),jt.delete(this)),h&&h.forEach((t=>{t.mounted(this,((t,e)=>(u.__data_[t]=e,u.__data_[t])))})),this.#g&&this.#g.forEach((t=>ve.pushNext(t))),this.#f&&ve.pushNext(this.#v),this.__bindEvents(),this.mounted()}}),0)}propsReady(t){}render(){return null}beforeMount(){}mounted(){}#E(t){let e=t.currentTarget,s="";c(this.#d,((t,r)=>{if(t===e)return s=r,!1})),this.__inited&&this.#k(e,s===dt?"":s)}#k(t,e){this.#M();let s=g(this.#e[e],"props");s&&c(this.slots,((t,e)=>{t.filter((t=>t.nodeType===Node.ELEMENT_NODE)).forEach((t=>{t instanceof Xe?t.updateProps(s):c(s,((e,s)=>{if(t instanceof HTMLSlotElement){let r=Ke.get(t);if(r){let n=t.name||dt,o=r.#e[n];o||(o=r.#e[n]={props:{}}),o.props||(o.props={}),o.props[s]=e,r.#k(t,n)}}else t.setAttribute(s,e)}))}))})),this.slotChange(t,e)}slotChange(t,e){}attributeChangedCallback(t,e,s){if(!this.__inited)return;if(Object.is(s,e))return;"undefined"===s&&(s=null);let r=H(t),n=bt.get(this.constructor)??bt.get(Yt(this.constructor));if(te(g(n,r).type)){let t=!B(s)&&ee(s);if(g(this,r)===t)return}this.#R(t,e,s)}shouldUpdate(t){return!0}updated(t){}_notify(t=void 0,e,s,r,n){let o=[];for(let i=0;i<s.length;i++){const a=s[i];o.push(a);let l=g(this,o)??t,c=Jt(o);this.#s[c]={value:l,chain:c===Ge?[Ge]:o,oldValue:e,end:o.length===s.length,subNewValue:r,subOldValue:n}}this.isMounted?ve.pushNext(this.#v):this.#f=!0}#w(){if(N(this.#s)<1)return;if(!this.isMounted)return;const t=this.#s;if(this.#s={},!this.shouldUpdate(t))return;let e=Nt.get(this.constructor)??Nt.get(Yt(this.constructor));e&&e.sort(((t,e)=>e.priority-t.priority)).forEach((e=>{e.updated(this,t)}));let s=!1,r=new Set,n=this.constructor.prototype._viewDeps;if(c(t,((t,e)=>{if(!s&&n?.includes(e)&&(s=!0),this.__updateSubViewDeps?.has(e)){let t=this.__updateSubViewDeps.get(e);t&&t.forEach((t=>{r.add(t)}))}})),this._watchUpdateSetInNextTick?.forEach((t=>{let{newValue:e,oldValue:s,chain:r,rootObjNew:n,rootObjOld:o,fullMatch:i}=this._watchUpdateArgsInNextTick.get(t),a=i?e:n,l=i?s:o;t.call(this,a,l,r,e,s)})),this._watchUpdateSetInNextTick?.clear(),this._watchUpdateArgsInNextTick?.clear(),this._computedUpdateSetInNextTick?.forEach((t=>{let e=g(t,"key"),s=this.__data_[e],r=t.call(this);(u(r)||r!==s)&&(this.__data_[e]=r,this._notify(r,s,[e]))})),this._computedUpdateSetInNextTick?.clear(),this._cssUpdateInNextTick){let t=this.cssVars;c(t,((t,e)=>{let s="--"+w(e).replace(/^-+/,"");this._cssVarOldValueMap[s]!=t&&((o(t)||W(t))&&(t="initial"),this._cssVarOldValueMap[s]=t,this.style.setProperty(s,t+""))}))}this.#i?.deref()&&(s&&bs(vs(this.render()),this,this.__updateTree,r,t),N(r)>0&&r.forEach((e=>{!function(t,e,s,r){if(!t||t.__destroyed)return;let n=t.node.deref();const[o,i,a,l]=t.value;let c,u=re(n,e);if(!s){let s=o(n,t.value[1],i,{renderComponent:e,slotComponent:u,varChain:l,updatedMap:r,pointType:g(Bt.get(a),[0],ze.TEXT)});if(!s)return;if(s[0]!==qe.REFRESH)return;c=h(s[1])?vs(s[1].call(e,t.value[1][0])):s[1]}if(!c)return;bs(c,e,t.children,void 0,r)}(e,this,void 0,t)}))),this.#b.forEach((t=>{this.#C(t)})),this.updated(t)}#N(){let t=bt.get(this.constructor)??bt.get(Yt(this.constructor)),e=this.attributes,s=this.tagName,r=E(this.#o??{},jt.get(this.wrapperComponent)?.get(this)??{}),o={};c(e,(({name:e,value:s})=>{if(e[0]===is||e[0]===as||e[0]===ls||e===hs||"slot"===e)return;let r=H(e);t&&!t[r]&&(o[e]=s)})),this.#n=this.#n?a(this.#n,o):o;let i={};if(!t)return i;let h=Object.keys(t),d=h.length;for(let o=0;o<d;o++){const a=h[o],c=w(a),d=this.hasAttribute(c);let p,f=t[a],_=y(r,a),m=g(this,a);if(!("_defaultValue"in f)&&(f._defaultValue=m,!f.type)){n(m)&&qt(s,"Prop '"+a+"' has neither propType nor defaultValue be used for type inference");let t=typeof m;l(m)&&(t="array");let e=_t[t];f.type=e}if(_)p=W(r[a])?m:r[a];else{p=m;let t=e.getNamedItem(c)||e.getNamedItem(as+c)||e.getNamedItem(c+as);t&&(_=!0,p=t.value)}if(f.required&&!_){qt(s,"Prop '"+a+"' is required");break}p=this.#x(t,a,p,d),f.attribute&&U(p)&&!u(p)&&this.#A(f,a,p),this.__data_[a]=p,i[a]=p,delete this[a]}return i}#A(t,e,s){let r=w(e),n=j(s);te(t.type)?(n=ee(s),F(n)?n&&!this.hasAttribute(r)?this.toggleAttribute(r,!0):!n&&this.hasAttribute(r)&&this.toggleAttribute(r,!1):this.getAttribute(r)!==n&&this.setAttribute(r,n)):this.getAttribute(r)!==n&&this.setAttribute(r,n)}#P(t,e){let s=t;try{for(let r=0;r<e.length;r++){const n=e[r];s=n===Boolean?ee(t):n===Number?Number(t):n===String?String(t):n===Object||n===Array?K(t):n===Date?new Date(t):new n(t)}}catch(e){qt(this.tagName,"Convert attribute error with "+t)}return s}#x(t,e,n,o){let i=t[e];if(!i)return n;let a=i.isValid,c=i.type,u=l(c)?c:[c],h=i.converter,d=n;if(!s(u,(t=>t===String))&&r(d)&&!B(d))try{d=h?h(d):this.#P(d,u)}catch(t){qt(this.tagName,`Convert attribute '${e}' error with `+d)}for(let t=0;t<u.length;t++){"Boolean"===u[t].name&&o&&(d=ee(d))}if(W(d))return d;let p=typeof d,f=!U(d);for(let t=0;t<u.length;t++){const e=u[t];if(I(p,e.name,"i")||d instanceof e||Object.prototype.toString.call(d)===Object.prototype.toString.call(e.prototype)){f=!0;break}}return f||qt(this.tagName,`Invalid prop '${e}'. expected '${u.map((t=>t.name||t))}' but got '${p}'`),a&&(a.call(this,d,this.__data_)||qt(this.tagName,`Invalid prop '${e}'. IsValid() check failed`)),d}#T(){let t=yt.get(this.constructor)??yt.get(Yt(this.constructor));t&&c(t,((e,s)=>{let r=t[s],n=g(this,s);if(r){let t=r.prop;n=t?$(this.__data_[t]):g(this,s)}this.__data_[s]=n,delete this[s]}))}#S=C(this.propsReady,100);updateProps(t,e=!1){let s=bt.get(this.constructor)??bt.get(Yt(this.constructor));if(!s)return;if(!this.__inited)return void a(this.#o,t);let r=[];c(t,((t,n)=>{let o=H(n),i=s[o];if(!i)return;t=this.#x(s,o,t);let a=this.__data_[o];if(!e){let e=Lt.get(this.constructor),s=e?.get(o);if(s){if(!s.call(this,t,a,[o],t,a))return!0}else if(u(t)){let e=It.get(this.constructor);if(e?.has(o)&&Object.is(a,t))return!0}else if(Object.is(a,t))return!0}i.attribute&&U(t)&&!u(t)&&r.push([i,o,t]),b(this.__data_,o,t),me(this,t,a,[o])})),a(this.#o,t),r.forEach((([t,e,s])=>{this.#A(t,e,s)})),this.#o&&this.#S(this.#o)}_initProps(t,e){this.#o=E(this.#o||{},t),this.#n=E(this.#n||{},e),c(t,((t,e)=>{if(u(t)){let s=de.get(t);if(s){let t=this.wrapperComponent?yt.get(this.wrapperComponent?.constructor):null,r=s[0];if(t&&t[r]){let s=bt.get(this.constructor);b(s,[e,"shallow"],t[r].shallow)}}}}))}_bindSlot(t,e,s){this.#d[e]||(this.#d[e]=t,Ke.set(t,this));let r="slotchange",n=Be(r,this.#m,t,this);if(this._eventBindList.push([r,this.#m,t,n]),!V(s)){let t=this.#e[e];t||(t=this.#e[e]={}),t.props=s}}#b=new Set;_updateSlot(t,e,s){let r=this.#d[t],n=this.#u[t];if(!n&&!r)return;let o=this.#e[t];if(e&&(o.props||(o.props={}),o.props[e]=s),n)this.#b.add(t);else{let t=r.assignedElements({flatten:!0});for(let r=0;r<t.length;r++){t[r].setAttribute(e,s+"")}}}#M(){if(!this.#i)return;let t=G(this.#d);if(V(t))return;const e=P(this.childNodes,(t=>t.nodeType===Node.COMMENT_NODE?[]:t instanceof HTMLSlotElement?t.assignedNodes({flatten:!0}):t));let s=X(e,(e=>{if(e.nodeType===Node.TEXT_NODE&&t.includes(dt))return dt;if(e instanceof Element){let s=e.getAttribute("slot")||dt;if(t.includes(s))return s}}));if(V(s))return void(this.slots={});c(s,((t,e)=>{if(e){for(;t.length>0;){let e=t[0];if(!(e.nodeType===Node.TEXT_NODE&&o(e.textContent)||e instanceof HTMLSlotElement&&V(e.assignedNodes({flatten:!0}))))break;t.shift()}for(;t.length>0;){let e=z(t);if(!(e.nodeType===Node.TEXT_NODE&&o(e.textContent)||e instanceof HTMLSlotElement&&V(e.assignedNodes({flatten:!0}))))break;t.pop()}}}));let r={};c(s,((t,e)=>{V(t)||(r[e]=t)})),this.slots=r}#C(t){let e=this.#u[t];if(!e)return;let s=this.#e[t];if(!this.__data_.slots)return;if(!this.__data_.slots[t])return;this.renderAsync(e,g(s,"props"));const r=this._asyncDirectives.get(e);let n=r?.buildView(e(g(s,"props"))),o=q(_(n),(t=>t.nodeType===Node.COMMENT_NODE));if(o){let e=this.#p[t];if(!V(e))for(let t=0;t<e.length;t++){const s=e[t];s.parentNode?.removeChild(s)}this.#p[t]=o,this.append(...o),this.#b.clear()}}_asyncDirectives=new WeakMap;renderAsync(t,...e){}#R(t,e,s){if(!this.__inited)return;if(Se(this.constructor).has(t)){let e=H(t);if(B(s)){let t=bt.get(this.constructor)??bt.get(Yt(this.constructor));t&&(s=t[e]._defaultValue)}this.updateProps({[e]:s})}}_regSubViewDeps(t,e){this.__updateSubViewDeps||(this.__updateSubViewDeps=new Map),t.forEach((t=>{let s=this.__updateSubViewDeps.get(t);s||(s=new Set,this.__updateSubViewDeps.set(t,s)),s.add(e)}))}_getPrivateData(){return this.__data_}emit(t,e={},s){if(s&&(e.event=s),e.target=this,y(this.#n,"emit-native"))this.dispatchEvent(new CustomEvent(t,{bubbles:!1,composed:!1,cancelable:!0,detail:e}));else{let s=g(this,"__c_emit_event_");this.wrapperComponent?._callEmitEvent(s,t,e)}}_callEmitEvent(t,e,s){let r=this._subComponentEventMap.get(t),n=g(r,e);h(n)&&n.call(this,s)}nextTick(t){if(!this.isMounted)return this.#g||(this.#g=[]),void this.#g.push(t);ve.pushNext(t)}forceUpdate(){c(this.__data_,((t,e)=>{this.#s[e]={value:void 0,chain:void 0}})),this.#w()}}var ze,qe,Qe;function Ze(t,e,s,r,n,o,i,a,u,h){let d,p=g(Bt.get(t),[0],"");if([ze.TEXT,ze.SLOT].includes(p)?(ue.start(),d=n(e,s,r,{renderComponent:o,slotComponent:i,varChain:a,updatedMap:h,pointType:p}),ue.end(o,u)):d=n(e,s,r,{renderComponent:o,slotComponent:i,varChain:a,updatedMap:h,pointType:p}),!d)return;let[m,E,v,w,y,N]=d;if(m===qe.NONE)return;if(m===qe.REFRESH)return;let T=N;l(N)||(T=A(N,((t,e)=>t)));let M=g(e,"__anchor__"),C={};c(G(e),(t=>{"__anchor__"!==t&&f(t,"__c-")&&(C[t]=g(e,[t]))}));let k=u.subViewRootNodes,R=u.children;if(m===qe.REMOVE){let t=[];c(k,((e,s)=>{if(l(e))c(e,(t=>{let e=t.deref();e.remove(),e instanceof Xe&&e.destroy()}));else{let s=e.deref();s.remove(),t.push(e),s instanceof Xe&&s.destroy()}})),t.forEach((t=>{S(k,(e=>e===t))})),R?.forEach(((t,e)=>{t.destroy(o),R[e]=null})),u.children=Q(R),l(k)?u.subViewRootNodes=[]:u.subViewRootNodes={}}else if(m===qe.REPLACE){c(k,(t=>{let e=t.deref();e.remove(),e instanceof Xe&&e.destroy()})),R?.forEach(((t,e)=>{t.destroy(o),R[e]=null})),u.children=Q(R);let[,t,s]=d;ys(e,u,t,s,o)}else if(m===qe.UPDATE){if(V(k))return void ys(e,u,y,E,o,N,((t,e,s)=>v[s]));let t={},s={};c(w,(s=>{let r=t[s];r||(r=t[s]=[]),D(e.parentElement.childNodes,(t=>g(t,["__c-"+M])==s)).forEach((t=>{r.push(t)}))})),u.children?.forEach((t=>{s[t.key]?s[t.key].push(t):s[t.key]=[t]}));let r,n=w,i=v,a=Z(w,v),l=J(w,a),d=[],p=[],f=!1;if(!V(i)){let e=-1,s=[],r=[],o=0,a=0;for(;a<i.length;a++){const l=i[a];let c=n.findIndex((t=>t===l));if(c<0){let e=i[a-1];t[l]=[],d.push({refKey:e,newKey:l}),o++}else if(c>-1&&c!==a-o){if(e<0||1===Math.abs(e-c)){let e=z(s),r=0===a?Qe.AFTER_BEGIN:e?e.newKey:i[a-1],n=!1;0!==a&&V(t[r])&&(n=!0),s.push({newKey:l,refKey:r,refNew:n})}else{r.push({moveGroup:s,moveIndex:a+s.length});let e=i[a-1],n=!1;V(t[e])&&(n=!0),s=[],s.push({newKey:l,refKey:e,refNew:n})}e=c}}if(s.length>0&&r.push({moveGroup:s,moveIndex:a+s.length}),r.length>0){f=!0;let e=r.sort(((t,e)=>t.moveGroup.length-e.moveGroup.length));if(e.length<2){let{moveGroup:s}=e[0];if(s.length>1){let t=z(s).refKey;s[s.length-2].newKey===t&&(s=Y(s))}Je(s,t,w)}else{let s=z(e).moveIndex;1===Math.abs(e[e.length-2].moveIndex-s)&&(e=Y(e)),e.forEach((({moveGroup:e})=>{e[0].refNew?p.push(e):Je(e,t,w)}))}}}if(d.length>0&&(d.forEach((e=>{let s=tt(v,(t=>t==e.newKey)),r=T[s],n=vs(y.call(o,r,e.newKey,s)),[i,a]=ws(o,E,n);e.fragment=i,c(a,(t=>{t.key=e.newKey,u.children?.push(t)}));let l=_(i.childNodes),h=t[e.newKey];c(l,(t=>{h.push(t),i.childNodes.forEach((t=>b(t,"__c-"+M,e.newKey+""))),c(C,((e,s)=>b(t,s,e)))}))})),o.__bindEvents(),r=function(t){let e,s=[];return t.forEach((t=>{let r=z(s);r&&e===t.refKey?(r.group||(r.group=[r.fragment]),r.group.push(t.fragment)):s.push(t),e=t.newKey})),s}(d),r.forEach(((s,r)=>{let n=s.fragment,o=t[s.refKey??w[0]],i=L(o),a=z(o);if(s.group){let t=document.createDocumentFragment();t.append(...s.group),n=t}i===e?i.before(n):s.refKey?"string"==typeof i||a.after(n):i.before(n)}))),c(p,(e=>{Je(e,t,w)})),l.forEach((e=>{t[e].forEach((t=>{t.parentNode?.removeChild(t)})),s[e].forEach((t=>{t.destroy()}))})),f||l.length>0||r){const t=X(R,(t=>t.key));let e=[],s=0;i.forEach((r=>{t[r]&&t[r].forEach((t=>{t.varIndex=s++,e.push(t)}))})),J(R,e).forEach((t=>t.destroy(o))),u.children=e}let m={};if(c(T,((e,s)=>{let r=v[s],n=t[r];m[r]=n.map((t=>new WeakRef(t)))})),u.subViewRootNodes=m,a.length>0){let t=[];c(N,((e,s,r,n)=>{let i=e,a=vs(y.call(o,i,s,n));t.push(...a)})),bs(t,o,u.children,void 0,h)}}return!0}function Je(t,e,s){t.forEach((({refKey:t,newKey:r})=>{let n=e[r];if(t===Qe.AFTER_BEGIN){let t=e[s[0]];L(t).before(...n)}else if(e[t]){let s=e[t],r=z(s);r?.after(...n)}}))}function Ye(t,e){return Bt.set(t,e),(...e)=>[t(...e),e,t,ue.popDirectiveQ()]}function ts(t,e,s){Bt.get(t)}!function(t){t.ATTR="attr",t.PROP="prop",t.TEXT="text",t.SLOT="slot",t.TAG="tag"}(ze||(ze={})),function(t){t.NONE="NONE",t.REFRESH="REFRESH",t.REMOVE="REMOVE",t.REPLACE="REPLACE",t.UPDATE="UPDATE",t.INIT="INIT"}(qe||(qe={})),function(t){t.AFTER_BEGIN="afterbegin"}(Qe||(Qe={}));const es=new RegExp(`([a-z0-9"'${Gt}])\\s*>\\s*<`,"img");class ss{updatePointMetas;fragment;"emptyEvent‌s";constructor(t,e,s){let[r,n]=this.parseTemplate(t);s&&a(s,n),this.updatePointMetas=[],this.emptyEvent‌s={},this.fragment=function(t,e,s,r,n){const i=document.createElement("template");i.innerHTML=e;const a=document.createNodeIterator(i.content,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT);let u,d,p=0,f=-1,g=-1;for(;u=a.nextNode();)if(f++,d&&!d.contains(u)&&(d=void 0,g=-1),u instanceof HTMLElement||u instanceof SVGElement){ne(u)&&(d=u,g=f);let e={},i=A(u.attributes,(t=>({name:t.name,value:t.value})));for(let a=0;a<i.length;a++){const c=i[a];let{name:_,value:m}=c;if(_!==gs)if(ds.test(_)){let e=s[p];if(l(e)&&h(e[0])){let[,,s,n]=e;ts(s,ze.TAG,r.tagName);let o=new os(p);o.isDirective=!0,o.directiveType=ze.TAG,o.nodeSn=f,o.directiveVarChain=n,d&&(o.slotNodeSn=g),t.push(o),p++}u.removeAttribute(_)}else if(_[0]!==is)if(_!==hs)if(z(_)!==as){if(m.includes(Gt)){let e=new os(p);if(e.attrName=_.replace(/\.|\?|@/,""),e.nodeSn=f,d&&(e.slotNodeSn=g),_[0]===as||_[0]===ls||_[0]===cs){if(_[0]===ls)e.isToggleProp=!0,e.attrName=_.substring(1);else if(_[0]===cs){e.isRefAttr=!0;let t=_.substring(1);const[s,r]=t.split(us);let n=s;switch(r){case"camel":n=H(n);break;case"kebab":n=w(n);break;case"snake":n=rt(n)}e.attrName=n}else{let t=vt[u.tagName.toLowerCase()];bt.get(t);{let t=H(_.substring(1));e.isProp=!0,e.attrName=t}}u.removeAttribute(_)}else e.attrTmpl=m;t.push(e),p++}}else{e[_.substring(0,_.length-1)]=m,u.removeAttribute(_);let t=new os(p);t.attrName=_.substring(0,_.length-1),t.nodeSn=f,t.isPropPerfix=!0}else{if(ds.test(m)){s[p];let e=new os(p);e.isRef=!0,e.nodeSn=f,t.push(e),p++}u.removeAttribute(_)}else{let e=_.substring(1);if(ds.test(m)){let r=new os(p);r.isEvent=!0,r.attrName=e,r.nodeSn=f,t.push(r),s[p],p++}else if(o(m)){let t=n[f];t||(t=n[f]=[]),t.push(e)}u.removeAttribute(_)}}}else{let e=j(u.nodeValue).split(ds);if(e.length<2)continue;c(nt(e.length-1),(n=>{let i=j(e[n]);if(!o(i)){let t=document.createTextNode(i);u.parentNode.insertBefore(t,u),f++}let a=document.createTextNode("");u.parentNode.insertBefore(a,u);let c=new os(p);c.isText=!0,c.nodeSn=f,t.push(c);let _=s[p];if(l(_)&&h(_[0])){let t=d?ze.SLOT:ze.TEXT;c.isDirective=!0,c.directiveType=t,d&&(c.slotNodeSn=g);let[,,e]=_;ts(e,0,r.tagName),_=void 0}p++,f++})),f--;let n=j(z(e));if(o(n)){let t=u.previousSibling;u.parentNode.removeChild(u),u=t}else u.nodeValue=n,f++}return i.content}(this.updatePointMetas,r,n,e,this.emptyEvent‌s)}parseTemplate(t){let e="",s=p(t.vars),r=t.strings.length-1,n=t.vars.length-1,o=0;for(let i=0;i<=r;i++){const r=t.strings[i];let a=g(s,o,"");if(a instanceof rs){let[t,e]=this.parseTemplate(a);a=t,s.splice(o,1,...e),o+=e.length-1}else a=i>n?"":Gt+o;o++,e=e+r+a}return e=e.replace(es,"$1><").trim(),e=Es(e),[e,s]}}class rs{strings;vars;constructor(t,e){this.strings=p(t),this.vars=e}getKey(){let t=this.vars,e="";return c(this.strings,((s,r)=>{if(pt.test(s))return e=et(t[r]),!1})),e}getKeys(){let t=this.vars,e=[];for(let s=0;s<this.strings.length;s++){const r=this.strings[s];if(pt.test(r)){let r=et(t[s]);e.push(r)}}return V(e)&&t.forEach((t=>{if(t instanceof rs){let s=t.getKey();e.push(s)}})),e}append(t){let e=z(this.strings);return t.strings.forEach(((t,s)=>{0!=s?this.strings.push(t):this.strings[this.strings.length-1]=e+t})),this.vars=p(this.vars,t.vars),this}insert(t,e){let s=e.strings.shift();return this.strings[t]+=s,this.strings.splice(t+1,0,...e.strings),this.vars.splice(t,0,...e.vars),this}getHTML(t){let e=[],s=new ss(this,t,e),[r,n]=ws(t,s,e);return st(r.childNodes,((t,e)=>t+(e.nodeType==Node.TEXT_NODE?e.nodeValue:e.outerHTML??"")),"")}destroy(){this.strings=this.vars=null}}class ns{metaInfo;key;varIndex;value;node;subViewRootNodes;__destroyed=!1;children;parent;constructor(t){this.varIndex=t}static createFrom(t){let e=new ns(t.varIndex);return e.metaInfo=t,e}destroy(t){if(this.__destroyed)return;this.__destroyed=!0;let e=this.node,s=this.children;if(this.parent,this.node=this.value=this.children=this.parent=this.metaInfo=null,!e)return;let r=s;r?.forEach(((e,s)=>{e.destroy(t)})),e instanceof Xe&&e.destroy(),t&&se.clear(e.deref(),t),e.deref()?.remove()}insert(t){t.parent=this,this.children||(this.children=[]),this.children.push(t)}}class os{varIndex;attrName;attrTmpl;isText=!1;isDirective=!1;directiveType;directiveVarChain;isProp=!1;isPropPerfix=!1;isToggleProp=!1;isPlaceholder=!1;isEvent=!1;isRef=!1;isKey=!1;isRefAttr=!1;isComponent=!1;isSlot=!1;nodeSn=-1;slotNodeSn=-1;constructor(t){this.varIndex=t}}const is="@",as=".",ls="?",cs="*",us=":",hs="ref",ds=new RegExp(`${Gt}\\d+`),ps=/(<\/?)\s*([A-Z][A-Za-z0-9]*)([\s>])/gm,fs=/\s+([\.?@*])?((?:[a-zA-Z]*[A-Z][^\s<>="']+))(?=[\s=>])/gm,gs="slot-props",_s=new Map;let ms=0;function Es(t){return r(t)?t=(t=t.replace(fs,((t,e,s)=>` ${e??""}${w(s)}`))).replace(ps,((t,e,s,r)=>e+Et[s]+r)):t+""}function vs(t){let e=p(t.vars),s=t.strings.length-1;for(let r=0;r<=s;r++){let s=g(t.vars,r,"");if(s instanceof rs){let t=vs(s);e.splice(r,1,...t)}}return e}function ws(t,e,s){const{fragment:r,updatePointMetas:n,"emptyEvent‌s":o}=e;let i,a=r.cloneNode(!0),l=[],c=[],u=[],h=t._eventBindList;h||(h=t._eventBindList=[]);const d=document.createNodeIterator(a,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT);let p={},f={};n.forEach(((t,e)=>{p[t.nodeSn]||(p[t.nodeSn]=[]),p[t.nodeSn].push(t),t.slotNodeSn>-1&&(f[t.slotNodeSn]=null)}));let g=-1,_=0;for(;i=d.nextNode();){g++,null===f[g]&&(f[g]=i);let e=o[g];e&&e.forEach((t=>{h.push([t,x,i])}));let r={};const n=p[g];n&&n.forEach((t=>{let e=s[_++],n=ns.createFrom(t);if(n.node=new WeakRef(i),n.value=e,t.isProp||t.isPropPerfix)r[t.attrName]=e;else if(t.isRef)e.__setRef(new WeakRef(i));else if(t.isEvent)h.push([t.attrName,e,i]);else if(t.isToggleProp)n.value=!!e,i.toggleAttribute(t.attrName,n.value);else if(t.isRefAttr)i.setAttribute(t.attrName,e);else if(t.isText)if(t.isDirective){let s=t.attrName,r=f[t.slotNodeSn],[o,a,,l]=e;c.push([i,s,r,o,a,l,n])}else i.textContent=e;else if(t.isDirective){let s=f[t.slotNodeSn],[r,n,,o]=e,a=t.attrName;V(o)&&N(t.directiveVarChain)>0&&(o=t.directiveVarChain),u.push([i,a,s,r,n,o,t.directiveType])}else i.setAttribute(t.attrName,t.attrTmpl.replace(ds,e));l.push(n)})),i instanceof HTMLSlotElement?t._bindSlot(i,i.name||"default",r):i instanceof HTMLElement&&ne(i)&&(Kt.set(i,t),oe(t,i,r))}return c.forEach((([e,s,r,n,o,i,a])=>{b(e,"__anchor__",ms++),ue.start();let l=n(e,o,void 0,{renderComponent:t,slotComponent:r,varChain:i,attrName:s,pointType:a.directiveType});if(ue.end(t,a),l&&l.length>1){let[,s,r,n,o]=l;ys(e,a,s,r,t,n,o)}})),u.forEach((([e,s,r,n,o,i,a])=>{n(e,o,void 0,{renderComponent:t,slotComponent:r,varChain:i,attrName:s,pointType:a})})),[a,l]}function ys(t,e,s,r,n,o,i){let a=[],l=i?{}:void 0;o=o??[0];let u=document.createDocumentFragment(),h=g(t,"__anchor__");c(o,((t,o,c,d)=>{ue.start();let p=vs(s.call(n,t,o,d));ue.end(n);let[f,g]=ws(n,r,p),m=_(f.childNodes).map((t=>new WeakRef(t)));if(i){let e=i.call(n,t,o,d)+"";m.forEach((t=>{let s=t.deref();b(s,"__c-"+h,e)})),l[e]=m,g.forEach((t=>{t.key=e})),a.push(...g),u.append(f)}else u=f,e.subViewRootNodes=m,g.forEach((t=>{e.insert(t)}))})),l&&(e.subViewRootNodes=l,a.forEach(((t,s)=>{t.varIndex=s,e.insert(t)}))),u.childNodes.length>0&&(n.__bindEvents(),t.parentNode.insertBefore(u,t))}function bs(t,e,s,r,n){if(!o(t)&&s)for(let o=0;o<s.length;o++){const i=s[o];let a=i.varIndex;if(a<0)continue;let c=i.metaInfo;if(c.isPlaceholder||c.isPropPerfix||c.isRef||c.isEvent||c.isRefAttr||c.isKey)continue;if(i.__destroyed)continue;let h=i.value,d=t,p=i.node.deref();if(!p)continue;let f=ot(a,"-");for(let t=0;t<f.length;t++){const e=f[t];d=g(d,e),d&&d.vars&&o<f.length-1&&(d=d.vars)}if(!u(h)&&h===d)continue;let _=p;if(c.isDirective){let[t,s,o,a]=i.value;if(!l(d))continue;let c=re(p,e),[,u]=d;Ze(o,p,u,s,t,e,c,a,i,n)&&r?.delete(i)}else if(c.isToggleProp){if(!!d===h)continue;_.toggleAttribute(c.attrName,!!d),_ instanceof Xe&&_.updateProps({[c.attrName]:!!d})}else if(c.isProp){if(!u(d)&&d===h)continue;p instanceof Xe?p.updateProps({[c.attrName]:d}):p instanceof HTMLSlotElement&&e._updateSlot(p.getAttribute("name")||"default",c.attrName,d)}else if(c.attrName){if(!it(h,d))switch(c.attrName){case"value":if(p instanceof HTMLInputElement){p.value=d;break}default:p.setAttribute(c.attrName,at(c.attrTmpl,ds,d+""))}}else if(c.isText){let t=i.node,e=et(d??"");e!==t.deref().textContent&&(t.deref().textContent=e)}i.value=d}}function Ss(t,...e){return new rs(r(t)?[t]:t,e)}function Ns(t,...e){if(Vt.has(t))return Vt.get(t);let s=new Xt(t,e),r=t.join("");return V(r)||Vt.set(t,s),s}class Ts{__ref;get current(){return this.__ref?.deref()}__setRef(t){this.__ref=t}}function Ms(){return new Ts}var Cs;!function(t){t.CLASS="class",t.FIELD="field",t.METHOD="method"}(Cs||(Cs={}));class ks{static get priority(){return 0}created(t,...e){}beforeMount(t,e,...s){}mounted(t,e,...s){}updated(t,e){}beforeDestroy(t,...e){}}class Rs{metadata;decorator;key;priority=0;constructor(t,e,s){this.metadata=e,this.decorator=new s(...t),this.priority=g(s,"priority",0)}dispose(){this.metadata=null,this.decorator=null}create(t){let e,s=this.decorator.targets,r=this.metadata[1];u(r)&&U(g(r,"configurable"))?e=Cs.METHOD:n(this.metadata[1])&&(e=Cs.FIELD),!V(s)&&e&&s.includes(e)?this.decorator.created(t,...this.metadata):zt(`Decorator '${this.decorator.constructor.name}' is out of targets, expect '${s.join(",")}' bug got '${e}'`)}beforeMount(t,e){this.decorator.beforeMount(t,e,...this.metadata)}mounted(t,e){this.decorator.mounted(t,e,...this.metadata)}updated(t,e){this.decorator.updated(t,e)}destroy(t){this.decorator.beforeDestroy(t,...this.metadata)}}function xs(t){return(...e)=>(...s)=>{let r=s[0].constructor,n=Nt.get(r);if(!Nt.has(r)){let t=Object.getPrototypeOf(r);n=t?p(Nt.get(t)??[]):[],Nt.set(r,n)}let o=new Rs(e,s.splice(1),t);return n?.push(o),o}}function As(t){return(...e)=>{if(!e||e.length<1)return;let s=e[0].constructor,r=Nt.get(s);if(!Nt.has(s)){let t=Object.getPrototypeOf(s);r=t?p(Nt.get(t)??[]):[],Nt.set(s,r)}let n=new Rs([],e.splice(1),t);return r?.push(n),n}}function Ps(t,e,s){return wt.has(t.constructor)||wt.set(t.constructor,{}),wt.get(t.constructor)[e]=s.get,delete t[e],Reflect.defineProperty(t,e,{get(){return ue.__collecting&&ue.__varPathList.push(e),Reflect.get(this[$t],e)}}),Reflect.getOwnPropertyDescriptor(t,e)}const Is=xs(class extends ks{static get priority(){return Number.MAX_VALUE}created(t,e,...s){let r=g(t,e);b(t,e,C(r,this.wait,this.immediate)),b(t,e+"_$__",r)}beforeDestroy(t,e){b(t,e,null),b(t,e+"_$__",null)}get targets(){return[Cs.METHOD]}wait;immediate;constructor(t,e=!1){super(),this.wait=t,this.immediate=e}});function Ls(t,e){return(s,r,n)=>{if(!mt.has(s.constructor)){let t=[],e=s.constructor;for(;(e=Yt(e))!==Xe;)t=p(t,mt.get(e)??[]);mt.set(s.constructor,t)}mt.get(s.constructor)?.push({name:t,targetFn:e,fnName:r})}}const Os=xs(class extends ks{static get priority(){return Number.MAX_VALUE}created(t,e,s,...r){let n=lt(g(t,s),t);b(t,s,R(n)),b(t,s+"_$__",n)}beforeDestroy(t,e){b(t,e,null),b(t,e+"_$__",null)}get targets(){return[Cs.METHOD]}});var Ds;!function(t){t.ONCE="once"}(Ds||(Ds={}));const Vs=new WeakMap;class Ws extends ks{static get priority(){return Number.MAX_VALUE}get targets(){return[Cs.FIELD]}selector;cache;constructor(t,e){super(),this.selector=t,this.cache=e}static getKey(t){return t}getter(t){let e=t?.shadowRoot?.querySelector(this.selector),s=Vs.get(t);s||(s=new Map,Vs.set(t,s)),s.set(this.selector,e)}mounted(t,e,s,...r){const n=this;let o=new WeakRef(t);Reflect.defineProperty(t,s,{configurable:!0,get(){let t=o.deref();return Vs.has(t)&&Vs.get(t)?.has(n.selector)&&n.cache===Ds.ONCE||n.getter(t),Vs.get(t)?.get(n.selector)}})}beforeDestroy(t,e){Vs.get(t)?.clear(),Vs.delete(t)}updated(t,e){this.cache!==Ds.ONCE&&this.getter(t)}}const Hs=xs(Ws),Bs=xs(class extends Ws{getter(t){let e=t.shadowRoot?.querySelectorAll(this.selector),s=Vs.get(t);s||(s=new Map,Vs.set(t,s)),s.set(this.selector,e)}});function Us(t){if(1===arguments.length)return(e,s)=>{js(e,s,t)};js(arguments[0],arguments[1],{prop:""})}function js(t,e,s){if(!yt.has(t.constructor)){const e={};let s=t.constructor;for(;(s=Yt(s))!==Xe;)E(e,yt.get(s)??{});yt.set(t.constructor,e)}if(s.shallow=s.shallow||!1,b(yt.get(t.constructor),e,s),s.hasChanged){let r=Lt.get(t.constructor);r||(r=new Map,Lt.set(t.constructor,r)),r.set(e,s.hasChanged)}if(s.shallow){let s=Pt.get(t.constructor);s||(s=new Set,Pt.set(t.constructor,s)),s.add(e)}Reflect.defineProperty(t,e,{get(){return le(e,this)},set(t){ce(e,t,this)}})}function Fs(t,e,s){js(t.prototype,e,s||{prop:""})}function Ks(t,e=!1){return s=>{s&&(e?customElements.define(t,s):(Et[s.name]=t,vt[t]=s))}}const $s=xs(class extends ks{static get priority(){return Number.MAX_VALUE}created(t,e,...s){let r=g(t,e);b(t,e,k(r,this.wait)),b(t,e+"_$__",r)}beforeDestroy(t,e){b(t,e,null),b(t,e+"_$__",null)}get targets(){return[Cs.METHOD]}wait;constructor(t){super(),this.wait=t}});function Gs(t,e){return(s,r)=>{let n=xt.get(s.constructor),o=Rt.get(s.constructor),i=Mt.get(s.constructor),c=Ct.get(s.constructor),u=kt.get(s.constructor),h=At.get(s.constructor);if(!u){u=[],kt.set(s.constructor,u),c=[],Ct.set(s.constructor,c),i=new Map,Mt.set(s.constructor,i),n={},xt.set(s.constructor,n),o={},Rt.set(s.constructor,o),h={},At.set(s.constructor,h);let t=Yt(s.constructor);for(;t;)kt.has(t)&&(u.push(...kt.get(t)),c.push(...Ct.get(t)),Mt.get(t)?.forEach(((t,e)=>{i.set(e,t)})),a(n,xt.get(t)),a(o,Rt.get(t)),a(h,At.get(t))),t=Yt(t)}(l(t)?t:[t]).forEach((t=>{let a=s[r];g(e,"once",!1)&&i.set(t,!1);let l=g(e,"deep",!1);if(u.push(t),l?(n[t]=n[t]??new Set,n[t].add(a),c.push(t)):(o[t]=o[t]??new Set,o[t].add(a)),g(e,"immediate",!1)){let e=h[t];e||(e=h[t]=new Set),e.add(a)}}))}}const Xs=["key"],zs=Ye((function(t){return(t,[e],s,{renderComponent:r})=>{let n=t;if(s)c(e,((t,e)=>{n.setAttribute(e,t)}));else if(ne(n)){let t={},s=bt.get(n.constructor);c(e,((e,r)=>{if(Xs.includes(r))return;let o=H(r);(s?s[o]:void 0)?t[r]=e:n.setAttribute(r,e+"")})),oe(r,n,t)}else c(e,((t,e)=>{n.setAttribute(e,t)}))}}),[ze.TAG]),qs=new WeakMap,Qs=Ye((function(t){return(t,[e],s,{renderComponent:n})=>{let o=[];if(l(e)?o=Q(e):u(e)?o=P(e,((t,e)=>t?e:[])):r(e)&&(o=e.split(" ")),o.length<1&&!s)return;let i=t;if(qs.get(i)&&qs.get(i).length===o.length&&ct(qs.get(i),o))return;let a=qs.get(i);c(a,(t=>{i.classList.remove(t)})),c(o,(t=>{i.classList.add(t)})),a=p(o),qs.set(i,a)}}),[ze.TAG]),Zs=new WeakMap,Js=new WeakMap,Ys=Ye((function(t,e,s){return(t,r,o,{renderComponent:i,varChain:a,updatedMap:l})=>{let c=r[0];if(g(o,0),V(c)&&n(o))return[qe.INIT];let u=0,h=Q(A(c,((t,s)=>e.call(i,t,s,u++)+"")));if(h.length!=new Set(h).size)return void zt(`forEach - duplicate key in '${h}'`);let d,p=Zs.get(t);if(Zs.set(t,h),o){if(V(h))return[qe.REMOVE];if(N(h)===N(p)&&it(h,p))return[qe.REFRESH,tr(c,s,i)]}let f=r[2];if(Js.has(t))d=Js.get(t);else{let e=G(c)[0],s=c[e],r=f.call(i,s,e,0);d=new ss(r,i),Js.set(t,d)}return o?[qe.UPDATE,d,h,p,f,c]:[qe.INIT,s,d,c,e]}}),[ze.TEXT,ze.SLOT]);function tr(t,e,s){let r=[];return c(t,((t,n)=>{let o=vs(e.call(s,t,n));r.push(...o)})),r}let er=document.createElement("template"),sr=new WeakMap;const rr=Ye((function(t){return(t,e,s,{renderComponent:r})=>{if(!(s&&e[0]==s[0]||W(e[0])))if(ut(t))t.innerHTML=Es(e[0]);else{let r=sr.get(t);r||(r=document.createTextNode(""),t.parentNode?.insertBefore(r,t),sr.set(t,r)),er.innerHTML=Es(e[0]),o(s)||se.remove(r,t),t.before(er.content.cloneNode(!0))}}}),[ze.TAG,ze.TEXT,ze.SLOT]),nr=new WeakMap,or=new WeakMap,ir=new WeakMap,ar=Ye((function(t,e,s){return(t,[e,s,r],n,{renderComponent:o})=>{let i;if(n){if(!!e==!!n[0]){let e=nr.get(t);return[qe.REFRESH,e]}let a=e?s:r;return e?(i=or.get(t),i||(i=new ss(a.call(o,e),o),or.set(t,i))):(i=ir.get(t),i||(i=new ss(a.call(o,e),o),ir.set(t,i))),[qe.REPLACE,a,i]}let a=e?s:r;return e?(i=or.get(t),i||(i=new ss(a.call(o,e),o),or.set(t,i))):(i=ir.get(t),i||(i=new ss(a.call(o,e),o),ir.set(t,i))),nr.set(t,a),[qe.INIT,a,i]}}),[ze.TEXT,ze.SLOT]),lr=new WeakMap,cr=Ye((function(t,e){return(t,[e,s],r,{renderComponent:n})=>{let o=lr.get(t);return e&&!lr.has(t)&&(o=new ss(s.call(n),n),lr.set(t,o)),r?r[0]?e?[qe.REFRESH,s]:[qe.REMOVE]:e?[qe.REPLACE,s,o]:[qe.NONE]:[qe.INIT,...e?[s,o]:[]]}}),[ze.TEXT,ze.SLOT]);var ur;!function(t){t.CHANGE="change",t.INPUT="input"}(ur||(ur={}));const hr=Ye((function(t,s="value",n){return(t,[s,n,o],i,{varChain:a,renderComponent:l})=>{n=n??"value";const c=t;if(i){const t=i[0],e=s;if(!u(e)&&Object.is(e,t))return;if(c instanceof Xe)c.updateProps({[n]:e});else if(c instanceof HTMLTextAreaElement||c instanceof HTMLSelectElement){if(c.setAttribute(n,e+""),c instanceof HTMLSelectElement){let t=M(c.querySelectorAll("option"),(t=>t.value==e));t&&(t.selected=!0)}}else if(c instanceof HTMLInputElement){if(c.value==e)return;switch(c.type){case"checkbox":case"radio":e?c.setAttribute("checked",""):c.removeAttribute("checked");break;case"text":case"email":case"number":case"password":case"search":case"tel":case"url":c.setAttribute(n,e+""),b(c,n,e);break;default:c.setAttribute(n,e+"")}}return}let h;h=r(o)?e(o)[0]:z(a);const d=ot(h,".")[0];let p=he.get(l),f="";p&&(f=p[d]),d in l||!f||f in l||zt(`model - property '${d}' is not defined on the instance of `+l.tagName);let _=l._eventBindList;if(u(s)||j(s)||(s=""),vt[c.tagName.toLowerCase()]){oe(l,c,{[n]:s}),Ue(c,l,"update:"+n,(function(t){let e=this,s=(he.get(e)??{})[d];!(d in e)&&s&&g(e.wrapperComponent,d)===g(e,s)&&(e=e.wrapperComponent||e),b(e,h,t.value)}))}else if(c instanceof HTMLTextAreaElement){c.setAttribute(n,s+"");let t="input";_.push([t,function(t){let e=t.target;b(this,h,e.value)},c])}else if(c instanceof HTMLInputElement){let t="",e="";switch(c.type){case"checkbox":case"radio":t="checked",e="change";break;default:t="value",e="input"}c.setAttribute(n??t,s+""),_.push([e,function(t){let e=t.target;b(this,h,e.value)},c])}else c instanceof HTMLSelectElement&&(c.setAttribute(n,s+""),_.push(["change",function(t){let e=t.target,s=this,r=(he.get(s)??{})[d];!(d in s)&&r&&g(s.wrapperComponent,d)===g(s,r)&&(s=s.wrapperComponent||s),b(s,h,e.value)},c]))}}),[ze.TAG]),dr=new WeakMap,pr=Ye((function(t,e){return(t,[e,s],r)=>{if(r&&e===r[0])return;let n=t;if(!dr.has(n)){let t=n.style.display;dr.set(n,"none"==t?"unset":t)}n.style.display=e?dr.get(n):"none",s&&s(n,e)}}),[ze.TAG]),fr=Ye((function(t,e){return(t,[e,s],r,{renderComponent:n,slotComponent:o})=>{if(r)return;e=e.bind(n);let i=Ft.get(o);i||(i={},Ft.set(o,i)),i[s||"default"]=e}}),[ze.SLOT]);class gr{static getCssText(t,e=!1){return r(t)?t:ht(A(t,((t,s)=>s.startsWith("--")?s+":"+t+(e?" !important":""):w(s)+":"+t+(e?" !important":""))),";")+";"}static setStyle(t,e){if(r(t)&&!j(t))return;let s=gr.getCssText(t);e.style.cssText=s}}const _r=Ye((function(...t){return(t,e,s,{renderComponent:r})=>{let n=t,o=st(e,((t,e)=>t+gr.getCssText(e)),""),i=Q(o.split(";").map((t=>t.split(":")[0]))),a=Q(n.style.cssText.split(";")),l=q(a,(t=>i.some((e=>t.trim().startsWith(e)))));n.style.cssText=o+l.join(";")}}),[ze.TAG]),mr=new WeakMap,Er=new WeakMap,vr=Ye((function(t,e){return(t,[e,s],r,{renderComponent:n})=>{let o=()=>Ss``,i=[],a=[];c(s,((t,e)=>{if(h(t))i.push(e),a.push(t);else{let e=t[0],s=t[1];i.push(e),a.push(s)}"default"===e&&(o=t)}));let l=tt(i,(t=>h(t)?t(e):t==e)),u=mr.get(t);mr.set(t,l);let d=Er.get(t);if(d||(d=[],Er.set(t,d)),!d[l]){let t=new ss((a[l]??o).call(n),n);d[l]=t}return r?u==l?[qe.REFRESH,a[l]??o]:[qe.REPLACE,a[l]??o,d[l]]:[qe.INIT,a[l]??o,d[l]]}}),[ze.TEXT,ze.SLOT]);function wr(){c(vt,((t,e)=>{customElements.define(e,t)}))}export{Xe as CompElem,gr as CssHelper,ie as Csscope,ks as Decorator,Cs as DecoratorType,Rs as DecoratorWrapper,qe as DirectiveUpdateTag,se as DomUtil,ze as EnterPointType,ur as ModelTriggerType,Ds as QueryCache,rs as Template,Se as _getObservedAttrs,Yt as _getSuper,Jt as _toUpdatePath,oe as addUninitializedSubComponentProp,zs as bind,Qs as classes,Ps as computed,Ms as createRef,Ns as css,ae as csscope,Is as debounced,xs as decorator,As as decoratorWithNoArgs,wr as defineComponents,Ye as directive,ts as directiveScopeChecker,Ls as event,Ys as forEach,ee as getBooleanValue,re as getSlotComponent,Ss as h,rr as html,ar as ifElse,cr as ifTrue,te as isBooleanProp,ne as isCompElemNode,Fs as makeState,hr as model,Os as onced,we as prop,Hs as query,Bs as queryAll,pr as show,zt as showError,qt as showTagError,Zt as showTagWarn,Qt as showWarn,fr as slot,Us as state,_r as styles,Ks as tag,$s as throttled,Ze as updateDirective,Gs as watch,vr as when};
7
+ import t,{some as e,isString as n,isUndefined as r,isBlank as s,assign as o,kebabCase as i,camelCase as a,isArray as l,each as c,flatMap as u,test as h,isObject as d,isFunction as p,isSymbol as f,concat as g,startsWith as m,get as _,toArray as w,defaults as y,merge as v,clone as E,has as b,set as S,closest as N,remove as T,size as M,includes as C,noop as k,isEmpty as R,find as x,debounce as A,throttle as P,once as I,map as O,first as L,walkTree as V,filter as D,isNil as W,isNull as H,isDefined as U,trim as j,isBoolean as K,parseJSON as B,cloneDeep as F,keys as $,groupBy as z,last as G,reject as X,compact as q,initial as Q,except as Z,toString as J,reduce as Y,snakeCase as tt,range as et,replace as nt,bind as rt,isPlainObject as st,isNumeric as ot,isNumber as it,isElement as at,toPath as lt,split as ct,findIndex as ut,join as ht}from"myfx";const dt="default",pt=/\s+\.?key\s*=/;var ft,gt;!function(t){t[t.RENDER=1]="RENDER",t[t.COMPUTED=2]="COMPUTED",t[t.DIRECTIVE=3]="DIRECTIVE"}(ft||(ft={})),function(t){t.Prod="prod",t.Dev="dev"}(gt||(gt={}));const mt={boolean:Boolean,string:String,number:Number,object:Object,array:Array,function:Function,undefined:Object},_t=new Map,wt=new WeakMap,yt={},vt={},Et=new WeakMap,bt=new WeakMap,St=new WeakMap,Nt=new WeakMap,Tt=new Map,Mt=new Map,Ct=new Map,kt=new WeakMap,Rt=new WeakMap,xt=new WeakMap,At=new WeakMap,Pt=new WeakMap,It=new WeakMap,Ot=new WeakMap,Lt=new WeakMap,Vt=new WeakMap,Dt=new WeakMap,Wt=new WeakMap,Ht=new WeakMap,Ut=new WeakMap,jt=new WeakMap,Kt=new WeakMap,Bt=new WeakMap,Ft=new WeakMap,$t=new WeakMap,zt=new Map,Gt=new WeakMap,Xt=new WeakMap,qt=new WeakMap,Qt=new WeakMap,Zt="__data_",Jt="⟬Ċ⟭";class Yt{strings;vars;cssText;constructor(t,e){this.strings=t,this.vars=e}getCssText(){if(this.cssText)return this.cssText;let t="",e=this.strings.length-1;for(let n=0;n<=e;n++){const e=this.strings[n];let r=this.vars[n]??"";r instanceof Yt&&(r=r.getCssText()),t=t+e+r}return this.cssText=t,t}}function te(t){console.error("[CompElem]",t)}function ee(t,e){console.error(`[CompElem <${t}>]`,e)}function ne(...t){console.warn("[CompElem]",...t)}function re(t,e){console.warn(`[CompElem <${t}>]`,e)}function se(t){return Object.getPrototypeOf(t)}function oe(t){return t===Boolean||e(t,(t=>t===Boolean))}function ie(t){let e=t;return n(t)&&/(?:^true$)|(?:^false$)/.test(e)?e="true"===e:(r(e)||s(e))&&(e=!0),e}const ae={getNodes(t,e){let n=t.nextSibling;if(!e)return[n];let r=[];for(;n&&n!==e;)r.push(n),n=n?.nextSibling;return r},insertBefore:function(t,e){if(!t.parentNode)return;let n=document.createDocumentFragment();n.append(...e),t.parentNode.insertBefore(n,t)},remove:function(t,e){if(t===e)return void t?.parentNode?.removeChild(t);let n=t.nextSibling;for(;n&&n!==e;)n?.parentNode?.removeChild(n),n=t.nextSibling},clear(t){if(!t)return;let e=[],n=t=>{let r=t.childNodes;for(let t=0,s=r.length;t<s;t++){let s=r[t];s.nodeType===Node.ELEMENT_NODE&&(s instanceof Rn&&e.push(s),n(s))}};n(t);for(let t=0,n=e.length;t<n;t++)e[t].destroy()}};function le(t){return!!vt[t.tagName?.toLowerCase()]}function ce(t,e,n){let r=Xt.get(t);r||(r=new Map,Xt.set(t,r));let s=r.get(e)??{};r.set(e,o(s,n))}function ue(t,e){let n=$t.get(t);n||(n=new Map,$t.set(t,n));let r=n.get(e);return void 0===r&&(r="--"+i(e).replace(/^-+/,""),n.set(e,r)),r}const he=new Map;function de(t){let e=he.get(t);return void 0!==e||(he.size>1024&&he.clear(),e=a(t),he.set(t,e)),e}const pe=new WeakMap;function fe(t){let e=pe.get(t);return void 0===e&&(e=(t.name||"").toLowerCase(),pe.set(t,e)),e}var ge;function me(...t){return(e,n,r)=>{let s=r.get();return(l(s)?s:[s]).forEach((n=>{let r;if(n instanceof Yt){if(r=Kt.get(n.strings),!r){let t=n.getCssText();r=new CSSStyleSheet,r.replaceSync(t),Kt.set(n.strings,r)}}else n instanceof CSSStyleSheet&&(r=n);if(!r)return;let s=Bt.get(e);s||(s=new Map,Bt.set(e,s)),c(t,(t=>{if(t===ge.GLOBAL)return void(document.adoptedStyleSheets.includes(r)||(document.adoptedStyleSheets=[...document.adoptedStyleSheets,r]));let e=s.get(t);e||(e=[],s.set(t,e)),e.push(r)}))})),r}}!function(t){t.INNER="inner",t.HOST="host",t.GLOBAL="global"}(ge||(ge={}));let _e=[],we={},ye={};function ve(t){_e=u(t.css,(t=>{if(n(t)){let e=new CSSStyleSheet;return e.replaceSync(t),e}return t instanceof CSSStyleSheet?t:[]})),we=t.global,c(t,((t,e)=>{h(e[0],/[A-Z]/)&&(ye[e]=t)})),Ee.clear()}const Ee=new Map;function be(t){let e=Ee.get(t);return e||(e=[...Se(),...Bt.get(t)?.get(ge.INNER)??[]],Ee.set(t,e)),e}const Se=()=>_e,Ne=()=>we,Te=()=>ye;function Me(t,e){let n=e,r=Reflect.get(n[Zt],t);if(Pe.__collecting&&Pe.__varPathList.push(t),null===r||"object"!=typeof r&&"function"!=typeof r)return r;let s=Le.get(r);if(s||Ve.get(r)){let o=De.get(r);o||(o=new Set,De.set(r,o));let i=s??r;if(Ve.get(i)?.deref()!==e){let n=Ie.get(e);n||(n={},Ie.set(e,n));let r=Oe.get(i);r&&(n[r[0]]=t)}return o.add(n.__thisRef),i}if(d(r)&&!p(r)&&!(r instanceof Node)&&!Object.isFrozen(r)){let e=Lt.get(n.constructor),s=e?.has(t);s||(e=Vt.get(n.constructor),s=e?.has(t)),r=s||"slots"===t?r:We(r,n,t)}return r}function Ce(t,e,n){let r=n;if(!r.__inited)return void Reflect.set(r[Zt],t,e);let s=r[Zt][t],o=Dt.get(r.constructor),i=o?.get(t),a=Le.get(s);if(i){if(!i.call(r,e,s,[t],e,s))return!0}else{if(Object.is(s,e))return!0;if(d(e)&&a===e)return!0}Reflect.set(r[Zt],t,e),Ue(n,e,s,[t])}function ke(t,e,n,r,s,o){let i=function(t){let e=Ot.get(t);if(void 0!==e)return e;let n=Object.getPrototypeOf(t),r=xt.get(t)??xt.get(n);return e=r?{rootMap:r,watchKeysDeep:Rt.get(t)??Rt.get(n),watchDeepUpdateMap:Pt.get(t)??Pt.get(n),watchUpdateMap:At.get(t)??At.get(n),onceMap:kt.get(t)??kt.get(n)}:null,Ot.set(t,e),e}(t.constructor);if(!i)return;let{rootMap:a,watchKeysDeep:l,watchDeepUpdateMap:c,watchUpdateMap:u,onceMap:h}=i,d=r.split(".")[0],p=a?.get(d);p?.forEach((i=>{(r===i||m(i,r+".")&&!Object.is(_(t._getPrivateData(),i),_(e,i))||m(r,i+".")&&l?.includes(i)&&!Object.is(_(t._getPrivateData(),i),_(e,i)))&&g(w(u[i]),w(c[i])).forEach((a=>{a&&!0!==h.get(i)&&(t._watchUpdateArgsInNextTick?.set(a,{newValue:e,oldValue:n,chain:r.split("."),rootObjNew:s,rootObjOld:o,fullMatch:i===r}),t._watchUpdateSetInNextTick?.add(a),h.has(i)&&h.set(i,!0))}))}))}function Re(t,e){let n=Ht.get(t.constructor);n?.has(e)&&n.get(e)?.forEach((e=>{t._computedUpdateSetInNextTick.add(e)}))}function xe(t,e){let n=Ut.get(t.constructor);if(!n)return;let r=e.split("."),s="";r.forEach((e=>{s=s?s+"."+e:e,n.has(s)&&(t._cssUpdateInNextTick=!0)}))}const Ae=new Set,Pe={popDirectiveQ(){let t=[],e=this.__varPathList;for(let n=0;n<e.length;n++){let r=e[n];Ae.has(r)||(Ae.add(r),t.push(r))}return Ae.clear(),t},start(){this.__collecting=!0,this.__varPathList=[]},end(t,e){t&&e&&t._regSubViewDeps(Pe.popVarPathList(),e),this.__collecting=!1},popVarPathList(){let t=Array.from(new Set(this.__varPathList));return this.__varPathList=[],t},__varPathList:[],__collecting:!1},Ie=new WeakMap,Oe=new WeakMap,Le=new WeakMap,Ve=new WeakMap,De=new WeakMap;function We(t,n,r){if(Le.has(t))return Le.get(t);if(Ve.has(t)){if(r){let r=De.get(t);r||(r=new Set,De.set(t,r)),e(r.values(),(t=>t.deref()===n))||r.add(new WeakRef(n))}return t}const s=new Proxy(t,{get(t,e,r){if(!e)return;const s=Reflect.get(t,e,r);if(f(e))return s;const o=l(t);if(p(s))return s;if("length"===e&&o)return s;if(95===e.charCodeAt(0)&&95===e.charCodeAt(1))return s;let i=Oe.get(r);if(Pe.__collecting){let t=i?g(i):[];t.push(e),Pe.__varPathList.push(t.join("."))}if(null!==s&&"object"==typeof s&&Le.has(s))return Le.get(s);let a=s;if(d(s)&&!p(s)&&!(s instanceof Node)&&!Object.isFrozen(s)){let t=i?g(i):[];a=We(s,n),t.push(e),Oe.set(a,t),Le.set(s,a)}return a},set(t,e,r,s){if(!e)return!1;let o=t[e],i=Oe.get(s)??[],a=g(i,[e]),l=Dt.get(n.constructor),c=l?.get(a[0]),u=a.length>1,h=r,d=o;if(u&&(d=h=n._getPrivateData()[a[0]]),c){if(!c.call(n,h,d,a,r,o))return!0}else if(Object.is(o,r))return!0;let p=r,f=Reflect.set(t,e,p);Ue(n,p,o,a);let m=De.get(s),_=[];return m?.forEach((t=>{let e=t.deref();if(!e)return;if(e===n)return;if(e.isDestroyed)return void _.push(t);let r=(Ie.get(e)??{})[a[0]];if(void 0===r)return;let s=a.join(".");s=s.replace(a[0],r),Ue(e,p,o,s.split("."),h,d)})),_.forEach((t=>{let e=t.deref();Ie.delete(e),m.delete(t)})),f}});return Oe.has(s)||Oe.set(s,r?[r]:[]),Le.set(t,s),r&&Ve.set(s,new WeakRef(n)),s}function He(t,e,n,r){let s=r.join(".");ke(t,e,n,s,e,n),Re(t,s),xe(t,s)}function Ue(t,e,n,r,s,o){s=s??e,o=o??n,r.length>1&&(o=s=t._getPrivateData()[r[0]]);let i=r.join(".");ke(t,e,n,i,s,o),Re(t,i),xe(t,i),function(t,e,n,r){t._notify(e,n,r)}(t,s,o,r)}class je{static nextSet=new Set;static nextPending=!1;static next;static flush(){je.nextPending=!1;let t=Array.from(je.nextSet);je.nextSet.clear(),t.forEach((t=>t())),t=null}static pushNext(t){je.nextSet.add(t),je.nextPending||(je.nextPending=!0,je.next())}}function Ke(t){if(1===arguments.length)return(e,n,r)=>{t.required=t.required||!1,t.attribute=!1!==t.attribute,Be(e,n,t)};let e=arguments[0],n=arguments[1],r=arguments[2];t={type:void 0,required:!1,attribute:!0},r&&"function"==typeof r.type&&(t=y(r,t),r=void 0),t.shallow=t.shallow||!1,Be(e,n,t)}function Be(t,e,n,r){let s;if(!St.has(t.constructor)){const e={};let n=t.constructor;for(;(n=se(n))!==Rn;)v(e,E(St.get(n)??{}));s=new Set,c(e,((t,e)=>{if(t.attribute){let t=i(e);s?.add(t)}})),Mt.set(t.constructor,s),St.set(t.constructor,e)}if(n.attribute){s||(s=Mt.get(t.constructor));let n=i(e);s?.add(n)}if(n.model){let n=Nt.get(t.constructor);n||(n=[],Nt.set(t.constructor,n)),n.includes(e)||n.push(e)}if(b(t.constructor,"observedAttributes")||(t.constructor.observedAttributes=[]),s&&(t.constructor.observedAttributes=w(s)),S(St.get(t.constructor),e,n),n.hasChanged){let r=Dt.get(t.constructor);r||(r=new Map,Dt.set(t.constructor,r)),r.set(e,n.hasChanged)}if(n.shallow){let n=Vt.get(t.constructor);n||(n=new Set,Vt.set(t.constructor,n)),n.add(e)}Reflect.defineProperty(t,e,{get(){return Me(e,this)},set(n){Nt.get(t.constructor)?.includes(e)&&function(t,e,n){n.emit("update:"+t,{value:e})}(e,n,this)}})}(()=>{const t=Promise.resolve(),e=je.flush;je.next=()=>{t.then(e)}})();const Fe=new Set;function $e(t){return Mt.get(t)??Mt.get(se(t))??Fe}const ze=["resize","outside","mutate"],Ge=new WeakMap,Xe=[],qe=[],Qe=[],Ze=new WeakSet,Je="undefined"!=typeof ResizeObserver?new ResizeObserver((t=>{for(const e of t){const t=Array.isArray(e.contentBoxSize)?e.contentBoxSize[0]:e.contentBoxSize,n=Array.isArray(e.borderBoxSize)?e.borderBoxSize[0]:e.borderBoxSize;if(!Ze.has(e.target)){Ze.add(e.target);continue}let r=Ge.get(e.target);r&&r.forEach((r=>{r({target:e.target,contentBoxSize:t,borderBoxSize:n,type:"resize"})}))}})):void 0;var Ye;!function(t){t.Child="child",t.Tree="tree",t.Attr="attr",t.Char="char"}(Ye||(Ye={}));const tn=new WeakMap,en="undefined"!=typeof MutationObserver?new MutationObserver((t=>{for(let e=0;e<t.length;e++){const n=t[e];let r=tn.get(n.target);if(!r)return;let s={target:n.target},o=null;switch(n.type){case"subtree":s.type=Ye.Tree,o=r[Ye.Tree];break;case"childList":s.type=Ye.Child,s.addedNodes=n.addedNodes,s.removedNodes=n.removedNodes,o=r[Ye.Child];break;case"attributes":s.type=Ye.Attr,s.attributeName=n.attributeName,s.oldValue=n.oldValue,o=r[Ye.Attr];break;case"characterData":s.type=Ye.Char,s.oldValue=n.oldValue,o=r[Ye.Char]}o&&(s.type="mutate",o(s))}})):void 0;function nn(e,n,r,s,o,i){if("resize"===e)return function(t,e,n,r){if(!Je)return;let s=Ge.get(t);s||(s=[],Ge.set(t,s));let o=Je;if(r){let n=e;e=(...r)=>{n(...r),T(s,(t=>t===e)),M(s)<1&&(o.unobserve(t),Ge.delete(t))}}return s.push(e),Je.observe(t),(n=!1)=>{T(s,(t=>t===e)),M(s)<1&&(o.unobserve(t),Ge.delete(t),n&&(o=t=null))}}(n,r,0,i);if("outside"===e)switch(s[0]){case"mousedown":return function(e,n){return Xe.push([e,n]),(r=!1)=>{t.remove(Xe,(t=>t[0]===e&&t[1]===n))}}(n,r);case"dblclick":return function(e,n){return Qe.push([e,n]),(r=!1)=>{t.remove(Qe,(t=>t[0]===e&&t[1]===n))}}(n,r);default:return function(e,n){return qe.push([e,n]),(r=!1)=>{t.remove(qe,(t=>t[0]===e&&t[1]===n))}}(n,r)}else if("mutate"===e)return function(t,e,n){if(!en)return;let r=C(n,"child"),s=C(n,"attr"),o=C(n,"char"),i=C(n,"tree"),a=tn.get(t);return a?void 0:(a={},tn.set(t,a),r&&(a[Ye.Child]=e),s&&(a[Ye.Attr]=e),o&&(a[Ye.Char]=e),i&&(a[Ye.Tree]=e),en.observe(t,{childList:r,attributes:s,characterData:o,subtree:i}),(e=!1)=>{tn.delete(t),e&&(t=null)})}(n,r,s)}"undefined"!=typeof document&&(document.addEventListener("mousedown",(t=>{let e=_(t.composedPath(),0,t.target);Xe.forEach((([n,r])=>{n.contains(e)||n.contains(N(e,(t=>t instanceof ShadowRoot),"parentNode")?.host)||r({type:"outside",target:n,modifier:"mousedown",event:t})}))}),!1),document.addEventListener("click",(t=>{let e=_(t.composedPath(),0,t.target);qe.forEach((([n,r])=>{n.contains(e)||n.contains(N(e,(t=>t instanceof ShadowRoot),"parentNode")?.host)||r({type:"outside",target:n,modifier:"click",event:t})}))}),!1),document.addEventListener("dblclick",(t=>{let e=_(t.composedPath(),0,t.target);Qe.forEach((([n,r])=>{n.contains(e)||n.contains(N(e,(t=>t instanceof ShadowRoot),"parentNode")?.host)||r({type:"outside",target:n,modifier:"dblclick",event:t})}))}),!1));const rn=/,|^(debounce:.+)|(debounce$)/,sn=/,|^(throttle:.+)|(throttle$)/,on="once",an={esc:"escape"},ln=()=>{},cn=new WeakMap;function un(t){let e=cn.get(t);return void 0===e&&(e=_(globalThis,t.name)!==t,cn.set(t,e)),e}function hn(t,e){let n,r=t??ln;if(n=x(e,(t=>rn.test(t)))){let t=n.split(":");r=A(r,parseInt(t[1])||100)}if(n=x(e,(t=>sn.test(t)))){let t=n.split(":");r=P(r,parseInt(t[1])||100)}return e.includes(on)&&(r=I(r)),r}function dn(t,e,n=!1){return function(t,e,n=!1){let r=e.includes("capture")||!1,s=e.includes("passive")||!1;return{handler:r=>{if(e.includes("prevent")&&r.preventDefault(),e.includes("stop")&&r.stopPropagation(),n||!e.includes("self")||r.target===r.currentTarget){if(r instanceof MouseEvent){if(e.includes("left")&&0!=r.button)return;if(e.includes("right")&&2!=r.button)return;if(e.includes("middle")&&1!=r.button)return}else if(r instanceof KeyboardEvent){let t=e.slice();if(T(t,(t=>"ctrl"==t))[0]&&!r.ctrlKey)return;if(T(t,(t=>"alt"==t))[0]&&!r.altKey)return;if(T(t,(t=>"shift"==t))[0]&&!r.shiftKey)return;if(T(t,(t=>"meta"==t))[0]&&!r.metaKey)return;let n=O(t,(t=>an[t]||t));if(M(n)>0&&!n.includes(r.key.toLowerCase()))return}t(r)}},options:{capture:r,once:e.includes(on)||!1,passive:s}}}(hn(t,e),e,n)}function pn(t,e,n,r){let s=_(t,"__c_emit_event_")??e._subComponentEventSn++;S(t,"__c_emit_event_",s);let o=e._subComponentEventMap.get(s);o||(o={},e._subComponentEventMap.set(s,o)),o[n]=r}const fn=new Set(["focus","blur","visibilitychange","wheel"]),gn=new Set(["mouseenter","mouseleave","pointerenter","pointerleave"]),mn=new Set(["load","error","abort","play","pause","playing","waiting","canplay","canplaythrough","loadedmetadata","loadeddata","ended","timeupdate","volumechange","seeking","seeked","progress","stalled","suspend","emptied","ratechange","durationchange","loadstart","transitionstart","transitionrun","transitionend","transitioncancel","animationstart","animationend","animationcancel","animationiteration","scroll","slotchange"]),_n=new WeakMap;function wn(t){let e=_n.get(t);return e||(e={bindList:[],docoEventMap:new Map,handlerMap:new WeakMap,releaseList:[],delegationKeySet:new Set,abortController:void 0,dispatch:e=>function(t,e){let n=t.renderRoot;if(!n)return;let r=e.type;const s=e.composedPath();let o=s.indexOf(n);if(o<0)return;let i=wn(t);t:for(let t=0;t<=o;t++){const n=s[t];if(!(n instanceof HTMLElement))continue;let o=i.handlerMap.get(n)?.get(r);if(!R(o))for(let t=0;t<o.length;t++){let s=o[t];if((!s.parts.includes("self")||e.target===n)&&(s.parts.includes("once")&&(o.splice(t,1),t--,o.length<1&&i.handlerMap.get(n)?.delete(r)),s.handler(e),s.parts.includes("stop")))break t}}}(t,e)},_n.set(t,e)),e}function yn(t){return wn(t).bindList}function vn(t){let e=wn(t);e.abortController||(e.abortController=new AbortController)}function En(t){let e=wn(t);const n=e.bindList;if(n.length>0){e.bindList=[];for(let e=0;e<n.length;e++){let r=n[e],s=r[0],o=r[1],i=r[2];if(!i)continue;if(r[3])continue;let a=o&&un(o)?o.bind(t):o;bn(t,s,a,i),r[3]=k}}let r=_t.get(t.constructor)??_t.get(se(t.constructor));r&&M(r)>0&&c(r,(({name:n,targetFn:r,fnName:s})=>{let o=n+"@"+s;if(e.docoEventMap.has(o))return;let i=r?r(t):t,a=_(t,s),l=a&&un(a)?a.bind(t):a;bn(t,n,l,i),e.docoEventMap.set(o,l)}))}function bn(t,e,n,r){let{evName:s,parts:o}=function(t){let e=t.split(".");return{evName:e.shift(),parts:e}}(e);if(r instanceof Element){let e=vt[r.tagName?.toLowerCase()];if(e){let i=function(t,e){let n=t;for(;n&&n!==Rn;){let t=wt.get(n);if(t){if(t.has(e))return!0;for(let n of t)if(n.endsWith(":*")&&e.startsWith(n.slice(0,-1)))return!0}n=se(n)}return!1}(e,s);if(i)return void pn(r,t,s,hn(n,o))}}if(function(t){return ze.includes(t)}(s)){let e=nn(s,r,hn(n,o),o,0,o.includes("once"));return void(e&&wn(t).releaseList.push(e))}let i=function(t,e){if(!(e instanceof Element))return!1;let n=t.renderRoot;return!!n&&(e===n||n.contains(e))}(t,r)&&!mn.has(s)&&!gn.has(s);if(i){let e=o.includes("capture")||fn.has(s);!function(t,e,n,r,s,o){if(!function(t,e,n){let r=t.renderRoot;if(!r)return!1;vn(t);let s=wn(t),o=(n?"c:":"b:")+e;return s.delegationKeySet.has(o)||(r.addEventListener(e,s.dispatch,{capture:n,signal:s.abortController.signal}),s.delegationKeySet.add(o)),!0}(t,e,o))return void Sn(t,e,n,r,s);let{handler:i}=dn(n,r,!0),a=wn(t),l=a.handlerMap.get(s);l||(l=new Map,a.handlerMap.set(s,l));let c=l.get(e);c||(c=[],l.set(e,c));c.push({handler:i,parts:r})}(t,s,n,o,r,e)}else Sn(t,s,n,o,r)}function Sn(t,e,n,r,s){vn(t);let{handler:o,options:i}=dn(n,r);s.addEventListener(e,o,{capture:i.capture,once:i.once,passive:i.passive,signal:wn(t).abortController.signal})}let Nn=0;const Tn=new WeakMap,Mn={},Cn="slots",kn={};class Rn extends HTMLElement{#t;#e={};__data_={};#n={};#r;__updateTree;__updateSubViewDeps;_cssUpdateInNextTick=!1;_cssVarOldValueMap;_watchUpdateSetInNextTick;_watchUpdateArgsInNextTick;_computedUpdateSetInNextTick;_subComponentEventSn=0;_subComponentEventMap=new Map;get[Symbol.toStringTag](){return this.constructor.name}get cid(){return this.#t}get attrs(){return this.#s}get props(){return this.#o}get renderRoot(){return this.#i?.deref()}get renderRoots(){return this.#a.flatMap((t=>t.deref()??[]))}get parentComponent(){return this.#l?.deref()}get wrapperComponent(){return this.#c?.deref()}get slots(){return Mn}get slotHooks(){return this.#u}get cssSheets(){return Bt.get(this.constructor)?.get(ge.INNER)}get isMounted(){return this.#h}#s;#o;#i;#a;#l;#c;#d={};#u={};#p={};#h=!1;#f=!1;#g;#m;get cssVars(){return{}}__inited=!1;#_=!1;#w;__thisRef;__superComp;constructor(...t){super(),this.#t=Nn++,this.__updateTree=[],this.__thisRef=new WeakRef(this),this.__superComp=se(this.constructor),this.#w=this.#y.bind(this),1===M(t)&&(this.#o={},o(this.#o,L(t))),Reflect.getOwnPropertyDescriptor(this.constructor.prototype,"slots")||Reflect.defineProperty(this.constructor.prototype,"slots",{get(){return Me("slots",this)},set(t){Ce("slots",t,this)}});let e=Tt.get(this.constructor)??Tt.get(this.__superComp);e&&e.sort(((t,e)=>e.priority-t.priority)).forEach((t=>t.create(this))),this.#v=this.#E.bind(this)}insertStyleSheet(t){if(!this.#r)return null;let e;if(t instanceof Yt){if(e=Ft.get(t),!e){let n=t.getCssText();e=new CSSStyleSheet;try{e.replaceSync(n)}catch(t){}Ft.set(t,e)}}else if(t instanceof CSSStyleSheet){if(this.#r.adoptedStyleSheets.includes(t))return t;e=t}return e&&!this.#r.adoptedStyleSheets.includes(e)&&(this.#r.adoptedStyleSheets=[...this.#r.adoptedStyleSheets,e]),e}get rootComponent(){let t=this;for(;t.parentComponent;)t=t.parentComponent;return t}#v;connectedCallback(){let t=N(this.parentNode,(t=>t instanceof Rn||t.host instanceof Rn),"parentNode");this.#l=t?t instanceof Rn?new WeakRef(t):new WeakRef(t.host):void 0;let e=Qt.get(this);e&&(this.#c=new WeakRef(e),Qt.delete(this));let n=Bt.get(this.constructor)?.get(ge.HOST);if(n){let t=this.#c?.deref()?.shadowRoot??this.#l?.deref()?.shadowRoot;t&&t.contains(this)||(t=this.ownerDocument),c(n,(e=>{t.adoptedStyleSheets.includes(e)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}))}this.setup()}disconnectedCallback(){}beforeDestroyed(){}destroyed(){}get isDestroyed(){return this.#b}#b=!1;destroy(){if(this.#b)return;this.#b=!0;let t=Tt.get(this.constructor)??Tt.get(this.__superComp);if(t?.forEach((t=>{t.destroy(this)})),this.beforeDestroyed(),function(t){let e=wn(t);e.abortController?.abort(),e.abortController=void 0,c(e.releaseList,(t=>{"function"==typeof t&&t(!0)})),e.releaseList=[],e.docoEventMap.clear(),e.handlerMap=new WeakMap,e.delegationKeySet.clear(),e.bindList.length=0}(this),Gt.get(this)?.clear(),Gt.delete(this),this._watchUpdateArgsInNextTick?.clear(),this._watchUpdateSetInNextTick?.clear(),this._computedUpdateSetInNextTick?.clear(),this._computedUpdateSetInNextTick=null,this.__updateSubViewDeps?.clear(),this.#l){let t=this.#l.deref();t&&V(t.__updateTree,(e=>{e.__destroyed||e.node===this&&(e.destroy(t),T(e.parent?e.parent.children:t.__updateTree,(t=>t===e)))}))}this.#r&&ae.clear(this.#r),c(this.__updateTree,(t=>t?.destroy(this))),c(this.#d,(t=>{Tn.delete(t),t.remove()})),c(this.#p,(t=>{c(t,(t=>t.remove()))})),c(this.__data_.slots,((t,e)=>{c(t,(t=>t.remove()))})),this.#S.clear(),this.#w=this.__thisRef=this.#p=this.#d=this.#S=this.#e=this.__data_.slots=null,this.remove(),this.#i=this.#a=this.#r=this.#n=this.#s=this.#o=this.#i=this.#a=this.#u=this.#v=this.__data_=this.__updateTree=this.#l=this._asyncDirectives=this.#c=null,this.#m=null,this.destroyed()}setup(){if(this.__inited)return;if(this.#_)return;this.#_=!0;const t=this.#N();this.#o={},o(this.#o,t),this.propsReady(t);for(const e in t){const n=t[e];this.__data_[e]=n}this.#T(),this.__data_.slots={},Reflect.defineProperty(this.__data_,"__isData",{enumerable:!1,value:!0});let e=this.__superComp;if(xt.get(this.constructor)??xt.get(e)){this._watchUpdateSetInNextTick=new Set,this._watchUpdateArgsInNextTick=new Map;let t=kt.get(this.constructor)??kt.get(e),n=It.get(this.constructor)??It.get(e);c(n,((e,n)=>{let r=_(this,n);e.forEach((t=>{t.call(this,r,void 0,n)})),t.has(n)&&t.set(n,!0)}))}let n=Wt.get(this.constructor);if(void 0===n&&(n=o({},Et.get(this.constructor),Et.get(e)),Wt.set(this.constructor,n)),n){this._computedUpdateSetInNextTick=new Set;let t=Ht.get(this.constructor);t?c(n,((t,e)=>{this[Zt][e]=t.call(this)})):(t=new Map,Ht.set(this.constructor,t),c(n,((e,n)=>{S(e,"key",n),Pe.start(),this[Zt][n]=e.call(this),Pe.end(),Pe.popVarPathList().forEach((n=>{let r=t.get(n);r||(r=new Set,t.set(n,r)),r.add(e)}))})))}Pe.start();let r=this.render();Pe.end();let i,a=Pe.popVarPathList();Ct.has(this.constructor)||Ct.set(this.constructor,new Set(a)),null===r?(this.#a=[],this.#i=void 0):(this.#r=this.attachShadow({mode:"open"}),this.#r.adoptedStyleSheets=be(this.constructor),i=function(t,e){let n,r=[];Jn.has(e.constructor)?(n=Jn.get(e.constructor),r=er(t)):(n=new Wn(t,e,r),Jn.set(e.constructor,n));let[s,o]=rr(e,n,r);return e.__updateTree=o,s}(r,this),i&&M(i.children)>0&&(this.#a=D(i.children,(t=>t.nodeType===Node.ELEMENT_NODE)).map((t=>new WeakRef(t))),this.#i=this.#a[0])),this.__inited=!0,this.#M();let l=qt.get(this);l&&(this.#u=l,qt.delete(this)),c(this.#u,((t,e)=>{this.#C(e)}));const u=this;let h=Tt.get(this.constructor)??Tt.get(this.__superComp);if(h?.forEach((t=>{t.beforeMount(this,((t,e)=>(u.__data_[t]=e,u.__data_[t])))})),this.beforeMount(),this.isDestroyed)return;this.#h=!0,Pe.start();let d=this.cssVars;if(Pe.end(),!R(d)){this._cssVarOldValueMap={};let t=Ut.get(this.constructor);t||(t=new Set(Pe.popVarPathList()),Ut.set(this.constructor,t));let e="";c(d,((t,n)=>{let r=ue(this.constructor,n);(s(t)||W(t))&&(t="initial"),this._cssVarOldValueMap[r]=t,e+=";"+r+":"+t})),this.style.cssText+=e}i&&M(i.children)>0&&(this.#r.append(i),Xt.delete(this)),h&&h.forEach((t=>{t.mounted(this,((t,e)=>(u.__data_[t]=e,u.__data_[t])))})),this.#g&&this.#g.forEach((t=>je.pushNext(t))),this.#f&&je.pushNext(this.#v),En(this),this.mounted()}propsReady(t){}render(){return null}beforeMount(){}mounted(){}#y(t){let e=t.currentTarget,n="";c(this.#d,((t,r)=>{if(t===e)return n=r,!1})),this.__inited&&this.#k(e,n===dt?"":n)}#k(t,e){this.#M();let n=_(this.#e[e],"props");n&&c(this.slots,((t,e)=>{t.filter((t=>t.nodeType===Node.ELEMENT_NODE)).forEach((t=>{t instanceof Rn?t.updateProps(n):c(n,((e,n)=>{if(t instanceof HTMLSlotElement){let r=Tn.get(t);if(r){let s=t.name||dt,o=r.#e[s];o||(o=r.#e[s]={props:{}}),o.props||(o.props={}),o.props[n]=e,r.#k(t,s)}}else t.setAttribute(n,e)}))}))})),this.slotChange(t,e)}slotChange(t,e){}attributeChangedCallback(t,e,n){if(!this.__inited)return;if(Object.is(n,e))return;"undefined"===n&&(n=null);let r=de(t),s=St.get(this.constructor)??St.get(this.__superComp);if(oe(_(s,r).type)){let t=!H(n)&&ie(n);if(_(this,r)===t)return}this.#R(t,e,n)}shouldUpdate(t){return!0}updated(t){}_notify(t=void 0,e,n,r,s){let o=[],i=this,a="";for(let l=0;l<n.length;l++){const c=n[l];o.push(c),i=null==i?i:i[c];let u=i??t;a=0===l?c:a+"."+c,this.#n[a]={value:u,chain:a===Cn?[Cn]:o,oldValue:e,end:o.length===n.length,subNewValue:r,subOldValue:s}}this.isMounted?je.pushNext(this.#v):this.#f=!0}#E(){if(M(this.#n)<1)return;if(!this.isMounted)return;const t=this.#n;if(this.#n={},!this.shouldUpdate(t))return;let e=Tt.get(this.constructor)??Tt.get(this.__superComp);e?.forEach((e=>{e.updated(this,t)})),this._watchUpdateSetInNextTick?.forEach((t=>{let{newValue:e,oldValue:n,chain:r,rootObjNew:s,rootObjOld:o,fullMatch:i}=this._watchUpdateArgsInNextTick.get(t),a=i?e:s,l=i?n:o;t.call(this,a,l,r,e,n)})),this._watchUpdateSetInNextTick?.clear(),this._watchUpdateArgsInNextTick?.clear();let n=0;for(;this._computedUpdateSetInNextTick?.size>0&&n<10;){n++;let e=Array.from(this._computedUpdateSetInNextTick);this._computedUpdateSetInNextTick.clear(),e.forEach((e=>{let n=_(e,"key"),r=this.__data_[n],s=e.call(this);(d(s)||s!==r)&&(this.__data_[n]=s,He(this,s,r,[n]),t[n]={value:s,chain:[n],oldValue:r,end:!0})}))}if(this._cssUpdateInNextTick){let t=this.cssVars;c(t,((t,e)=>{let n=ue(this.constructor,e);this._cssVarOldValueMap[n]!=t&&((s(t)||W(t))&&(t="initial"),this._cssVarOldValueMap[n]=t,this.style.setProperty(n,t+""))}))}let r,o=!1,i=Ct.get(this.constructor);if(c(t,((t,e)=>{if(!o&&i?.has(e)&&(o=!0),this.__updateSubViewDeps?.has(e)){let t=this.__updateSubViewDeps.get(e);t&&(r||(r=new Set),t.forEach((t=>{r.add(t)})))}})),this.#i?.deref()){if(o){let e=er(this.render()),n=this.#m;if(this.#m=e,or(e,this,this.__updateTree,r,t,n),n)for(let t=0;t<n.length;t++){let e=n[t];null!==e&&"object"==typeof e&&(n[t]=void 0)}}r&&r.size>0&&r.forEach((e=>{!function(t,e,n,r){if(!t||t.__destroyed)return;let s=t.node;const[o,i,a,l]=t.value;let c,u=t.getSlotComponent(e);if(!n){let n=o(s,t.value[1],i,{renderComponent:e,slotComponent:u,varChain:l,updatedMap:r,pointType:_(zt.get(a),[0],xn.TEXT)});if(!n)return;if(n[0]!==An.REFRESH)return;c=p(n[1])?er(n[1].call(e,t.value[1][0])):n[1]}if(!c)return;or(c,e,t.children,void 0,r)}(e,this,void 0,t)}))}this.#S.forEach((t=>{this.#C(t)})),this.updated(t)}#N(){let t,e=St.get(this.constructor)??St.get(this.__superComp),n=this.attributes,s=this.tagName,a=Xt.get(this.wrapperComponent)?.get(this)??null;t=null==this.#o?a??kn:null==a?this.#o:v(this.#o,a);let c={};for(let t=0,r=n.length;t<r;t++){let{name:r,value:s}=n[t];if(r[0]===Kn||r[0]===Bn||r[0]===Fn||r===Gn||"slot"===r)continue;let o=de(r);e&&!e[o]&&(c[r]=s)}this.#s=this.#s?o(this.#s,c):c;let u={};if(!e)return u;let h=Object.keys(e),p=h.length;for(let o=0;o<p;o++){const a=h[o],c=i(a),p=this.hasAttribute(c);let f,g=e[a],m=b(t,a),w=_(this,a);if(!("_defaultValue"in g)&&(g._defaultValue=w,!g.type)){r(w)&&ee(s,"Prop '"+a+"' has neither propType nor defaultValue be used for type inference");let t=typeof w;l(w)&&(t="array");let e=mt[t];g.type=e}if(m)f=W(t[a])?w:t[a];else{f=w;let t=n.getNamedItem(c)||n.getNamedItem(Bn+c)||n.getNamedItem(c+Bn);t&&(m=!0,f=t.value)}if(g.required&&!m){ee(s,"Prop '"+a+"' is required");break}f=this.#x(e,a,f,p),g.attribute&&U(f)&&!d(f)&&this.#A(g,a,f),this.__data_[a]=f,p&&(u[a]=f),delete this[a]}return u}#A(t,e,n){let r=i(e),s=j(n);oe(t.type)?(s=ie(n),K(s)?s&&!this.hasAttribute(r)?this.toggleAttribute(r,!0):!s&&this.hasAttribute(r)&&this.toggleAttribute(r,!1):this.getAttribute(r)!==s&&this.setAttribute(r,s)):this.getAttribute(r)!==s&&this.setAttribute(r,s)}#P(t,e){let n=t;try{for(let r=0;r<e.length;r++){const s=e[r];n=s===Boolean?ie(t):s===Number?Number(t):s===String?String(t):s===Object||s===Array?B(t):s===Date?new Date(t):new s(t)}}catch(e){ee(this.tagName,"Convert attribute error with "+t)}return n}#x(t,r,s,o){let i=t[r];if(!i)return s;let a=i.isValid,c=i.type,u=l(c)?c:[c],h=i.converter,d=s;if(!e(u,(t=>t===String))&&n(d)&&!H(d))try{d=h?h(d):this.#P(d,u)}catch(t){ee(this.tagName,`Convert attribute '${r}' error with `+d)}for(let t=0;t<u.length;t++){"Boolean"===u[t].name&&o&&(d=ie(d))}if(W(d))return d;let p=typeof d,f=!U(d);for(let t=0;t<u.length;t++){const e=u[t];if(p===fe(e)||d instanceof e||Object.prototype.toString.call(d)===Object.prototype.toString.call(e.prototype)){f=!0;break}}return f||ee(this.tagName,`Invalid prop '${r}'. expected '${u.map((t=>t.name||t))}' but got '${p}'`),a&&(a.call(this,d,this.__data_)||ee(this.tagName,`Invalid prop '${r}'. IsValid() check failed`)),d}#T(){let t=bt.get(this.constructor)??bt.get(this.__superComp);t&&c(t,((e,n)=>{let r=t[n],s=_(this,n);if(r){let t=r.prop;s=t?F(this.__data_[t]):_(this,n)}this.__data_[n]=s,delete this[n]}))}updateProps(t,e=!1){let n=St.get(this.constructor)??St.get(this.__superComp);if(!n)return;if(!this.__inited)return void o(this.#o,t);let r=[];c(t,((s,o)=>{let i=de(o),a=n[i];if(!a)return;s=this.#x(n,i,s);let l=this.__data_[i];if(!e){let t=Dt.get(this.constructor),e=t?.get(i);if(e){if(!e.call(this,s,l,[i],s,l))return!0}else if(d(s)){let t=Vt.get(this.constructor);if(t?.has(i)&&Object.is(l,s))return!0}else if(Object.is(l,s))return!0}a.attribute&&U(s)&&!d(s)&&r.push([a,i,s]),S(this.__data_,i,s),t[i]=s,Ue(this,s,l,[i])})),o(this.#o,t),r.forEach((([t,e,n])=>{this.#A(t,e,n)}))}_initProps(t,e){this.#o=v(this.#o||{},t),this.#s=v(this.#s||{},e),c(t,((t,e)=>{if(d(t)){let n=Oe.get(t);if(n){let t=this.wrapperComponent?bt.get(this.wrapperComponent?.constructor):null,r=n[0];if(t&&t[r]){let n=St.get(this.constructor);S(n,[e,"shallow"],t[r].shallow)}}}}))}_bindSlot(t,e,n){this.#d[e]||(this.#d[e]=t,Tn.set(t,this));if(bn(this,"slotchange",this.#w,t),!R(n)){let t=this.#e[e];t||(t=this.#e[e]={}),t.props=n}}#S=new Set;_updateSlot(t,e,n){let r=this.#d[t],s=this.#u[t];if(!s&&!r)return;let o=this.#e[t];if(e&&(o.props||(o.props={}),o.props[e]=n),s)this.#S.add(t);else{let t=r.assignedElements({flatten:!0});for(let r=0;r<t.length;r++){t[r].setAttribute(e,n+"")}}}#M(){if(!this.#i)return;let t=$(this.#d);if(R(t))return;const e=u(this.childNodes,(t=>t.nodeType===Node.COMMENT_NODE||t.nodeType===Node.TEXT_NODE&&s(t.textContent)?[]:t instanceof HTMLSlotElement?t.assignedNodes({flatten:!0}):t));let n=z(e,(e=>{if(e.nodeType===Node.TEXT_NODE&&t.includes(dt))return dt;if(e instanceof Element){let n=e.getAttribute("slot")||dt;if(t.includes(n))return n}}));if(R(n))return void(this.slots={});c(n,((t,e)=>{if(e){for(;t.length>0;){let e=t[0];if(!(e.nodeType===Node.TEXT_NODE&&s(e.textContent)||e instanceof HTMLSlotElement&&R(e.assignedNodes({flatten:!0}))))break;t.shift()}for(;t.length>0;){let e=G(t);if(!(e.nodeType===Node.TEXT_NODE&&s(e.textContent)||e instanceof HTMLSlotElement&&R(e.assignedNodes({flatten:!0}))))break;t.pop()}}}));let r={};c(n,((t,e)=>{R(t)||(r[e]=t)})),this.slots=r}#C(t){let e=this.#u[t];if(!e)return;let n=this.#e[t];if(!this.__data_.slots)return;if(!this.__data_.slots[t])return;this.renderAsync(e,_(n,"props"));const r=this._asyncDirectives.get(e);let s=r?.buildView(e(_(n,"props"))),o=X(w(s),(t=>t.nodeType===Node.COMMENT_NODE));if(o){let e=this.#p[t];if(!R(e))for(let t=0;t<e.length;t++){const n=e[t];n.parentNode?.removeChild(n)}this.#p[t]=o,this.append(...o),this.#S.clear()}}_asyncDirectives=new WeakMap;renderAsync(t,...e){}#R(t,e,n){if(!this.__inited)return;if($e(this.constructor).has(t)){let e=de(t);if(H(n)){let t=St.get(this.constructor)??St.get(this.__superComp);t&&(n=t[e]._defaultValue)}this.updateProps({[e]:n})}}_regSubViewDeps(t,e){this.__updateSubViewDeps||(this.__updateSubViewDeps=new Map),t.forEach((t=>{let n=this.__updateSubViewDeps.get(t);n||(n=new Set,this.__updateSubViewDeps.set(t,n)),n.add(e)}))}_getPrivateData(){return this.__data_}emit(t,e={},n){if(n&&(e.event=n),e.target=this,b(this.#s,"emit-native"))this.dispatchEvent(new CustomEvent(t,{bubbles:!1,composed:!1,cancelable:!0,detail:e}));else{let n=_(this,"__c_emit_event_");if(!this.wrapperComponent)return;!function(t,e,n,r){let s=t._subComponentEventMap.get(e),o=_(s,n);p(o)&&o.call(t,r)}(this.wrapperComponent,n,t,e)}}nextTick(t){if(!this.isMounted)return this.#g||(this.#g=[]),void this.#g.push(t);je.pushNext(t)}forceUpdate(){let t=Ct.get(this.constructor);t&&t.size>0?t.forEach((t=>{this.#n[t]={value:void 0,chain:void 0}})):this.#n.__force__={value:void 0,chain:void 0},this.#E()}}var xn,An,Pn;function In(t,e,n,r,s,o,i,a,u,h){let d,f=zt.get(t),g=f?f[0]:"";if(g===xn.TEXT||g===xn.SLOT?(Pe.start(),d=s(e,n,r,{renderComponent:o,slotComponent:i,varChain:a,updatedMap:h,pointType:g}),Pe.end(o,u)):d=s(e,n,r,{renderComponent:o,slotComponent:i,varChain:a,updatedMap:h,pointType:g}),!d)return;let[y,v,E,b,N,M]=d;if(y===An.NONE)return;if(y===An.REFRESH){let t=d[1],e=p(t)?er(t.call(o,n[0])):t;return e&&or(e,o,u.children,void 0,h),!0}let C=M;l(M)||(C=O(M,((t,e)=>t)));let k=u.__subViewId;void 0===k&&(k=u.__subViewId=_(e,"__anchor__"));let x=u.__parentViewsIdMap;void 0===x&&(x=u.__parentViewsIdMap={},c($(e),(t=>{"__anchor__"!==t&&m(t,"__c-")&&(x[t]=_(e,[t]))})));let A=u.subViewRootNodes,P=u.children;if(y===An.REMOVE){let t=[];c(A,((e,n)=>{if(l(e))c(e,(t=>{t.remove(),t instanceof Rn&&t.destroy()}));else{let n=e;n.remove(),t.push(e),n instanceof Rn&&n.destroy()}})),t.forEach((t=>{T(A,(e=>e===t))})),P?.forEach(((t,e)=>{t.destroy(o),P[e]=null})),u.children=q(P),l(A)?u.subViewRootNodes=[]:u.subViewRootNodes={}}else if(y===An.REPLACE){c(A,(t=>{t.remove(),t instanceof Rn&&t.destroy()})),P?.forEach(((t,e)=>{t.destroy(o),P[e]=null})),u.children=q(P);let[,t,n]=d;sr(e,u,t,n,o)}else if(y===An.UPDATE){if(R(A))return void sr(e,u,N,v,o,M,((t,e,n)=>E[n]));let t={},n={},r=e.parentElement.childNodes,s="__c-"+k;for(let e=0;e<r.length;e++){let n=r[e],o=n[s];if(null!=o){let e=t[o];e||(e=t[o]=[]),e.push(n)}}u.children?.forEach((t=>{n[t.key]?n[t.key].push(t):n[t.key]=[t]}));let i=b,a=E,l=new Map,d=new Map;i.forEach(((t,e)=>{l.set(t,e)})),a.forEach(((t,e)=>{d.set(t,e)}));const p=new Uint8Array(i.length),f=[];for(let t=0;t<a.length;t++){const e=l.get(a[t]);void 0!==e&&(p[e]=1,f.push(a[t]))}const g=[];for(let t=0;t<i.length;t++)p[t]||g.push(i[t]);let m,_=[],y=[],T=!1;if(!R(a)){let e=-1,n=[],r=[],s=0,o=0;for(;o<a.length;o++){const i=a[o];let c=l.get(i)??-1;if(c<0){let e=a[o-1];t[i]=[],_.push({refKey:e,newKey:i}),s++}else if(c>-1&&c!==o-s){if(e<0||1===Math.abs(e-c)){let e=G(n),r=0===o?Pn.AFTER_BEGIN:e?e.newKey:a[o-1],s=!1;0!==o&&R(t[r])&&(s=!0),n.push({newKey:i,refKey:r,refNew:s})}else{r.push({moveGroup:n,moveIndex:o+n.length});let e=a[o-1],s=!1;R(t[e])&&(s=!0),n=[],n.push({newKey:i,refKey:e,refNew:s})}e=c}}if(n.length>0&&r.push({moveGroup:n,moveIndex:o+n.length}),r.length>0){T=!0;let e=r.sort(((t,e)=>t.moveGroup.length-e.moveGroup.length));if(e.length<2){let{moveGroup:n}=e[0];if(n.length>1){let t=G(n).refKey;n[n.length-2].newKey===t&&(n=Q(n))}On(n,t,b)}else e.forEach((({moveGroup:e})=>{e[0].refNew?y.push(e):On(e,t,b)}))}}if(_.length>0&&(_.forEach((e=>{let n=d.get(e.newKey)??-1,r=C[n],s=er(N.call(o,r,e.newKey,n)),[i,a]=rr(o,v,s);e.fragment=i,c(a,(t=>{t.key=e.newKey,u.children?.push(t)}));let l=w(i.childNodes),h=t[e.newKey],p=e.newKey+"";c(l,(t=>{h.push(t),S(t,"__c-"+k,p),c(x,((e,n)=>S(t,n,e)))}))})),En(o),m=function(t){let e,n=[];return t.forEach((t=>{let r=G(n);r&&e===t.refKey?(r.group||(r.group=[r.fragment]),r.group.push(t.fragment)):n.push(t),e=t.newKey})),n}(_),m.forEach(((n,r)=>{let s=n.fragment,o=t[n.refKey??b[0]],i=L(o),a=G(o);if(n.group){let t=document.createDocumentFragment();t.append(...n.group),s=t}i===e?i.before(s):n.refKey?"string"==typeof i||a.after(s):i.before(s)}))),c(y,(e=>{On(e,t,b)})),g.forEach((e=>{t[e].forEach((t=>{t.parentNode?.removeChild(t)})),n[e].forEach((t=>{t.destroy()}))})),T||g.length>0||m){const t=z(P,(t=>t.key));let e=[],n=0;a.forEach((r=>{t[r]&&t[r].forEach((t=>{t.varIndex=n++,e.push(t)}))})),Z(P,e).forEach((t=>t.destroy(o))),u.children=e}if(T||g.length>0||m){let e={};c(C,((n,r)=>{let s=E[r],o=t[s];e[s]=o})),u.subViewRootNodes=e}if(f.length>0){let t=[];c(M,((e,n,r,s)=>{let i=e,a=er(N.call(o,i,n,s));for(let e=0;e<a.length;e++)t.push(a[e])})),or(t,o,u.children,void 0,h)}}return!0}function On(t,e,n){t.forEach((({refKey:t,newKey:r})=>{let s=e[r];if(t===Pn.AFTER_BEGIN){let t=e[n[0]];L(t).before(...s)}else if(e[t]){let n=e[t],r=G(n);r?.after(...s)}}))}function Ln(t,e){return zt.set(t,e),(...e)=>[t(...e),e,t,Pe.popDirectiveQ()]}function Vn(t,e,n){zt.get(t)}!function(t){t.ATTR="attr",t.PROP="prop",t.TEXT="text",t.SLOT="slot",t.TAG="tag"}(xn||(xn={})),function(t){t.NONE="NONE",t.REFRESH="REFRESH",t.REMOVE="REMOVE",t.REPLACE="REPLACE",t.UPDATE="UPDATE",t.INIT="INIT"}(An||(An={})),function(t){t.AFTER_BEGIN="afterbegin"}(Pn||(Pn={}));const Dn=new RegExp(`([a-z0-9"'${Jt}])\\s*>\\s*<`,"img");class Wn{updatePointMetas;fragment;emptyEvents;upmMap;slotNodeMap;constructor(t,e,n){let[r,u]=this.parseTemplate(t);n&&o(n,u),this.updatePointMetas=[],this.emptyEvents={},this.fragment=function(t,e,n,r,o){const u=document.createElement("template");u.innerHTML=e;const h=document.createNodeIterator(u.content,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT);let d,f,g=0,m=-1,_=-1;for(;d=h.nextNode();)if(m++,f&&!f.contains(d)&&(f=void 0,_=-1),d instanceof HTMLElement||d instanceof SVGElement){le(d)&&(f=d,_=m);let e={};const c=d.attributes,u=[];for(let h=0;h<c.length;h++){let w=c[h].name,y=c[h].value;if(w!==Zn)if(Xn.test(w)){let e=n[g];if(l(e)&&p(e[0])){let[,,n,s]=e;Vn(n,xn.TAG,r.tagName);let o=new jn(g);o.isDirective=!0,o.directiveType=xn.TAG,o.nodeSn=m,o.directiveVarChain=s,f&&(o.slotNodeSn=_),t.push(o),g++}u.push(w)}else if(w[0]!==Kn)if(w!==Gn)if(G(w)!==Bn){if(y.includes(Jt)){let e=new jn(g);if(e.attrName=w.replace(/\.|\?|@/,""),e.nodeSn=m,f&&(e.slotNodeSn=_),w[0]===Bn||w[0]===Fn||w[0]===$n){if(w[0]===Fn)e.isToggleProp=!0,e.attrName=w.substring(1);else if(w[0]===$n){e.isRefAttr=!0;let t=w.substring(1);const[n,r]=t.split(zn);let s=n;switch(r){case"camel":s=a(s);break;case"kebab":s=i(s);break;case"snake":s=tt(s)}e.attrName=s}else{let t=vt[d.tagName.toLowerCase()];St.get(t);{let t=a(w.substring(1));e.isProp=!0,e.attrName=t}}u.push(w)}else e.attrTmpl=y,e.isPureTmpl=y===Jt+g;t.push(e),g++}}else{e[w.substring(0,w.length-1)]=y,u.push(w);let t=new jn(g);t.attrName=w.substring(0,w.length-1),t.nodeSn=m,t.isPropPerfix=!0}else{if(Xn.test(y)){n[g];let e=new jn(g);e.isRef=!0,e.nodeSn=m,t.push(e),g++}u.push(w)}else{let e=w.substring(1);if(Xn.test(y)){let r=new jn(g);r.isEvent=!0,r.attrName=e,r.nodeSn=m,t.push(r),n[g],g++}else if(s(y)){let t=o[m];t||(t=o[m]=[]),t.push(e)}u.push(w)}}for(let t=0;t<u.length;t++)d.removeAttribute(u[t])}else{let e=j(d.nodeValue).split(Xn);if(e.length<2)continue;c(et(e.length-1),(o=>{let i=j(e[o]);if(!s(i)){let t=document.createTextNode(i);d.parentNode.insertBefore(t,d),m++}let a=document.createTextNode("");d.parentNode.insertBefore(a,d);let c=new jn(g);c.isText=!0,c.nodeSn=m,t.push(c);let u=n[g];if(l(u)&&p(u[0])){let t=f?xn.SLOT:xn.TEXT;c.isDirective=!0,c.directiveType=t,f&&(c.slotNodeSn=_);let[,,e]=u;Vn(e,0,r.tagName),u=void 0}g++,m++})),m--;let o=j(G(e));if(s(o)){let t=d.previousSibling;d.parentNode.removeChild(d),d=t}else d.nodeValue=o,m++}return u.content}(this.updatePointMetas,r,u,e,this.emptyEvents),this.upmMap={},this.slotNodeMap={},this.updatePointMetas.forEach(((t,e)=>{this.upmMap[t.nodeSn]||(this.upmMap[t.nodeSn]=[]),this.upmMap[t.nodeSn].push(t),t.slotNodeSn>-1&&(this.slotNodeMap[t.slotNodeSn]=null)}))}parseTemplate(t){let e="",n=g(t.vars),r=t.strings.length-1,s=t.vars.length-1,o=0;for(let i=0;i<=r;i++){const r=t.strings[i];let a=o<n.length?n[o]:"";if(a instanceof Hn){let[t,e]=this.parseTemplate(a);a=t,n.splice(o,1,...e),o+=e.length-1}else a=i>s?"":Jt+o;o++,e=e+r+a}return e=e.replace(Dn,"$1><").trim(),e=tr(e),[e,n]}}class Hn{strings;vars;constructor(t,e){this.strings=t,this.vars=e}getKey(){let t=this.vars,e="";return c(this.strings,((n,r)=>{if(pt.test(n))return e=J(t[r]),!1})),e}getKeys(){let t=this.vars,e=[];for(let n=0;n<this.strings.length;n++){const r=this.strings[n];if(pt.test(r)){let r=J(t[n]);e.push(r)}}return R(e)&&t.forEach((t=>{if(t instanceof Hn){let n=t.getKey();e.push(n)}})),e}append(t){this.strings=g(this.strings);let e=G(this.strings);return t.strings.forEach(((t,n)=>{0!=n?this.strings.push(t):this.strings[this.strings.length-1]=e+t})),this.vars=g(this.vars,t.vars),this}insert(t,e){this.strings=g(this.strings);let n=e.strings[0];return this.strings[t]+=n,this.strings.splice(t+1,0,...e.strings.slice(1)),this.vars.splice(t,0,...e.vars),this}getHTML(t){let e=[],n=new Wn(this,t,e),[r,s]=rr(t,n,e);return Y(r.childNodes,((t,e)=>t+(e.nodeType==Node.TEXT_NODE?e.nodeValue:e.outerHTML??"")),"")}destroy(){this.strings=this.vars=null}}class Un{metaInfo;key;varIndex;value;node;subViewRootNodes;__destroyed=!1;children;parent;__slotCompResolved=!1;__slotComp=null;__subViewId;__parentViewsIdMap;constructor(t){this.varIndex=t}getSlotComponent(t){if(!this.__slotCompResolved&&(this.__slotCompResolved=!0,this.node)){let e=N(this.node,(t=>t.host&&t.host instanceof Rn),"parentNode");e&&e.host!==t&&(this.__slotComp=e.host)}return this.__slotComp}static createFrom(t){let e=new Un(t.varIndex);return e.metaInfo=t,e}destroy(t){if(this.__destroyed)return;this.__destroyed=!0;let e=this.node,n=this.children;if(this.node=this.value=this.children=this.parent=this.metaInfo=null,this.__slotComp=null,this.__parentViewsIdMap=void 0,this.__subViewId=void 0,!e)return;let r=n;r?.forEach(((e,n)=>{e.destroy(t)})),e instanceof Rn&&e.destroy(),t&&e instanceof Element&&ae.clear(e),e?.remove()}insert(t){t.parent=this,this.children||(this.children=[]),this.children.push(t)}}class jn{varIndex;attrName;attrTmpl;isPureTmpl=!1;isText=!1;isDirective=!1;directiveType;directiveVarChain;isProp=!1;isPropPerfix=!1;isToggleProp=!1;isPlaceholder=!1;isEvent=!1;isRef=!1;isKey=!1;isRefAttr=!1;isComponent=!1;isSlot=!1;nodeSn=-1;slotNodeSn=-1;constructor(t){this.varIndex=t}}const Kn="@",Bn=".",Fn="?",$n="*",zn=":",Gn="ref",Xn=new RegExp(`${Jt}\\d+`),qn=/(<\/?)\s*([A-Z][A-Za-z0-9]*)([\s>])/gm,Qn=/\s+([\.?@*])?((?:[a-zA-Z]*[A-Z][^\s<>="']+))(?=[\s=>])/gm,Zn="slot-props",Jn=new Map;let Yn=0;function tr(t){return n(t)?t=(t=t.replace(Qn,((t,e,n)=>` ${e??""}${i(n)}`))).replace(qn,((t,e,n,r)=>e+yt[n]+r)):t+""}function er(t){const e=[],n=[t];for(;n.length;){const t=n.pop(),r=t.strings.length-1;for(let s=0;s<r;s++){const r=t.vars[s];r instanceof Hn?n.push(r):e.push(r??"")}}return e}function nr(t,e){let n=t.childNodes;for(let t=0,r=n.length;t<r;t++){let r=n[t],s=r.nodeType;s===Node.ELEMENT_NODE?(e.push(r),nr(r,e)):s===Node.TEXT_NODE&&e.push(r)}}function rr(t,e,n){const{fragment:r,updatePointMetas:s,emptyEvents:o,upmMap:i,slotNodeMap:a}=e;let l,c=r.cloneNode(!0),u=[],h=[],d=[],p=yn(t);const f=[];nr(c,f);let g=-1,m=0;for(let e=0;e<f.length;e++){l=f[e],g++,null===a[g]&&(a[g]=l);let r,s=o[g];s&&s.forEach((t=>{p.push([t,k,l])}));const c=i[g];c&&c.forEach((t=>{let e=n[m++],s=Un.createFrom(t);if(s.node=l,s.value=e,t.isProp||t.isPropPerfix)(r??(r={}))[t.attrName]=e;else if(t.isRef)e.__setRef(new WeakRef(l));else if(t.isEvent)p.push([t.attrName,e,l]);else if(t.isToggleProp)s.value=!!e,l.toggleAttribute(t.attrName,s.value);else if(t.isRefAttr)l.setAttribute(t.attrName,e);else if(t.isText)if(t.isDirective){let n=t.attrName,r=a[t.slotNodeSn],[o,i,,c]=e;h.push([l,n,r,o,i,c,s])}else l.textContent=e;else if(t.isDirective){let n=a[t.slotNodeSn],[r,s,,o]=e,i=t.attrName;R(o)&&M(t.directiveVarChain)>0&&(o=t.directiveVarChain),d.push([l,i,n,r,s,o,t.directiveType])}else l.setAttribute(t.attrName,t.attrTmpl.replace(Xn,e));u.push(s)})),l instanceof HTMLSlotElement?t._bindSlot(l,l.name||"default",r):l instanceof HTMLElement&&le(l)&&(Qt.set(l,t),r&&ce(t,l,r))}return h.forEach((([e,n,r,s,o,i,a])=>{e.__anchor__=Yn++,Pe.start();let l=s(e,o,void 0,{renderComponent:t,slotComponent:r,varChain:i,attrName:n,pointType:a.directiveType});if(Pe.end(t,a),l&&l.length>1){let[,n,r,s,o]=l;sr(e,a,n,r,t,s,o)}})),d.forEach((([e,n,r,s,o,i,a])=>{s(e,o,void 0,{renderComponent:t,slotComponent:r,varChain:i,attrName:n,pointType:a})})),[c,u]}function sr(t,e,n,r,s,o,i){let a=[],l=i?{}:void 0;o=o??[0];let u=i?document.createDocumentFragment():void 0,h=_(t,"__anchor__");c(o,((t,o,c,d)=>{Pe.start();let p=er(n.call(s,t,o,d));Pe.end(s);let[f,g]=rr(s,r,p),m=w(f.childNodes);if(i){let e=i.call(s,t,o,d)+"";m.forEach((t=>{t["__c-"+h]=e})),l[e]=m;for(let t=0;t<g.length;t++)g[t].key=e,a.push(g[t]);u.append(f)}else u=f,e.subViewRootNodes=m,g.forEach((t=>{e.insert(t)}))})),l&&(e.subViewRootNodes=l,a.forEach(((t,n)=>{t.varIndex=n,e.insert(t)}))),(u?u.childNodes.length:0)>0&&(En(s),t.parentNode.insertBefore(u,t))}function or(t,e,n,r,o,i){if(s(t))return;if(!n)return;let a;if(i&&i.length===t.length){a=new Uint8Array(t.length);for(let e=0;e<t.length;e++){const n=t[e];n===i[e]&&"object"!=typeof n&&(a[e]=1)}}for(let s=0;s<n.length;s++){const i=n[s];let c=i.varIndex;if(c<0)continue;let u=i.metaInfo;if(u.isPlaceholder||u.isPropPerfix||u.isRef||u.isEvent||u.isRefAttr||u.isKey)continue;if(i.__destroyed)continue;if(a&&a[c])continue;let h,p=i.value,f=i.node;if(!f)continue;if(h=t[c],!d(p)&&p===h)continue;let g=f;if(u.isDirective){let[t,n,s,a]=i.value;if(!l(h))continue;let c=i.getSlotComponent(e),[,u]=h;In(s,f,u,n,t,e,c,a,i,o)&&r?.delete(i)}else if(u.isToggleProp){if(!!h===p)continue;g.toggleAttribute(u.attrName,!!h),g instanceof Rn&&g.updateProps({[u.attrName]:!!h})}else if(u.isProp){if(!d(h)&&h===p)continue;f instanceof Rn?f.updateProps({[u.attrName]:h}):f instanceof HTMLSlotElement&&e._updateSlot(f.getAttribute("name")||"default",u.attrName,h)}else if(u.attrName)p!=h&&("value"===u.attrName&&f instanceof HTMLInputElement?f.value=h:u.isPureTmpl?f.setAttribute(u.attrName,h+""):f.setAttribute(u.attrName,nt(u.attrTmpl,Xn,h+"")));else if(u.isText){let t=J(h??"");t!==f.textContent&&(f.textContent=t)}i.value=h}}function ir(t,...e){return new Hn(n(t)?[t]:t,e)}function ar(t,...e){if(jt.has(t))return jt.get(t);let n=new Yt(t,e),r=t.join("");return R(r)||jt.set(t,n),n}class lr{__ref;get current(){return this.__ref?.deref()}__setRef(t){this.__ref=t}}function cr(){return new lr}var ur;!function(t){t.CLASS="class",t.FIELD="field",t.METHOD="method"}(ur||(ur={}));class hr{static get priority(){return 0}created(t,...e){}beforeMount(t,e,...n){}mounted(t,e,...n){}updated(t,e){}beforeDestroy(t,...e){}}class dr{metadata;decorator;key;priority=0;constructor(t,e,n){this.metadata=e,this.decorator=new n(...t),this.priority=_(n,"priority",0)}dispose(){this.metadata=null,this.decorator=null}create(t){let e,n=this.decorator.targets,s=this.metadata[1];d(s)&&U(_(s,"configurable"))?e=ur.METHOD:r(this.metadata[1])&&(e=ur.FIELD),!R(n)&&e&&n.includes(e)?this.decorator.created(t,...this.metadata):te(`Decorator '${this.decorator.constructor.name}' is out of targets, expect '${n.join(",")}' bug got '${e}'`)}beforeMount(t,e){this.decorator.beforeMount(t,e,...this.metadata)}mounted(t,e){this.decorator.mounted(t,e,...this.metadata)}updated(t,e){this.decorator.updated(t,e)}destroy(t){this.decorator.beforeDestroy(t,...this.metadata)}}function pr(t){return(...e)=>(...n)=>{let r=n[0].constructor,s=Tt.get(r);if(!Tt.has(r)){let t=Object.getPrototypeOf(r);s=t?g(Tt.get(t)??[]):[],Tt.set(r,s)}let o=new dr(e,n.splice(1),t);return s?.push(o),s?.sort(((t,e)=>e.priority-t.priority)),o}}function fr(t){return(...e)=>{if(!e||e.length<1)return;let n=e[0].constructor,r=Tt.get(n);if(!Tt.has(n)){let t=Object.getPrototypeOf(n);r=t?g(Tt.get(t)??[]):[],Tt.set(n,r)}let s=new dr([],e.splice(1),t);return r?.push(s),r?.sort(((t,e)=>e.priority-t.priority)),s}}function gr(t,e,n){return Et.has(t.constructor)||Et.set(t.constructor,{}),Et.get(t.constructor)[e]=n.get,delete t[e],Reflect.defineProperty(t,e,{get(){return Pe.__collecting&&Pe.__varPathList.push(e),Reflect.get(this[Zt],e)}}),Reflect.getOwnPropertyDescriptor(t,e)}const mr=pr(class extends hr{static get priority(){return Number.MAX_VALUE}created(t,e,...n){let r=_(t,e);S(t,e,A(r,this.wait,this.immediate)),S(t,e+"_$__",r)}beforeDestroy(t,e){S(t,e,null),S(t,e+"_$__",null)}get targets(){return[ur.METHOD]}wait;immediate;constructor(t,e=!1){super(),this.wait=t,this.immediate=e}});function _r(...t){return e=>{let n=wt.get(e);n||(n=new Set,wt.set(e,n)),t.forEach((t=>n.add(t)))}}function wr(t,e){return(n,r,s)=>{if(!_t.has(n.constructor)){let t=[],e=n.constructor;for(;(e=se(e))!==Rn;)t=g(t,_t.get(e)??[]);_t.set(n.constructor,t)}_t.get(n.constructor)?.push({name:t,targetFn:e,fnName:r})}}const yr=pr(class extends hr{static get priority(){return Number.MAX_VALUE}created(t,e,n,...r){let s=rt(_(t,n),t);S(t,n,I(s)),S(t,n+"_$__",s)}beforeDestroy(t,e){S(t,e,null),S(t,e+"_$__",null)}get targets(){return[ur.METHOD]}});var vr;!function(t){t.ONCE="once"}(vr||(vr={}));const Er=new WeakMap;class br extends hr{static get priority(){return Number.MAX_VALUE}get targets(){return[ur.FIELD]}selector;cache;constructor(t,e){super(),this.selector=t,this.cache=e}static getKey(t){return t}getter(t){let e=t?.shadowRoot?.querySelector(this.selector),n=Er.get(t);n||(n=new Map,Er.set(t,n)),n.set(this.selector,e)}mounted(t,e,n,...r){const s=this;let o=new WeakRef(t);Reflect.defineProperty(t,n,{configurable:!0,get(){let t=o.deref();return Er.has(t)&&Er.get(t)?.has(s.selector)&&s.cache===vr.ONCE||s.getter(t),Er.get(t)?.get(s.selector)}})}beforeDestroy(t,e){Er.get(t)?.clear(),Er.delete(t)}updated(t,e){this.cache!==vr.ONCE&&this.getter(t)}}const Sr=pr(br),Nr=pr(class extends br{getter(t){let e=t.shadowRoot?.querySelectorAll(this.selector),n=Er.get(t);n||(n=new Map,Er.set(t,n)),n.set(this.selector,e)}});function Tr(t){if(1===arguments.length)return(e,n)=>{Mr(e,n,t)};Mr(arguments[0],arguments[1],{prop:""})}function Mr(t,e,n){if(!bt.has(t.constructor)){const e={};let n=t.constructor;for(;(n=se(n))!==Rn;)v(e,bt.get(n)??{});bt.set(t.constructor,e)}if(n.shallow=n.shallow||!1,S(bt.get(t.constructor),e,n),n.hasChanged){let r=Dt.get(t.constructor);r||(r=new Map,Dt.set(t.constructor,r)),r.set(e,n.hasChanged)}if(n.shallow){let n=Lt.get(t.constructor);n||(n=new Set,Lt.set(t.constructor,n)),n.add(e)}Reflect.defineProperty(t,e,{get(){return Me(e,this)},set(t){Ce(e,t,this)}})}function Cr(t,e,n){Mr(t.prototype,e,n||{prop:""})}function kr(t,e=!1){return n=>{n&&(e?customElements.define(t,n):(yt[n.name]=t,vt[t]=n))}}const Rr=pr(class extends hr{static get priority(){return Number.MAX_VALUE}created(t,e,...n){let r=_(t,e);S(t,e,P(r,this.wait)),S(t,e+"_$__",r)}beforeDestroy(t,e){S(t,e,null),S(t,e+"_$__",null)}get targets(){return[ur.METHOD]}wait;constructor(t){super(),this.wait=t}});function xr(t,e){return(n,r)=>{let s=Pt.get(n.constructor),i=At.get(n.constructor),a=kt.get(n.constructor),c=Rt.get(n.constructor),u=xt.get(n.constructor),h=It.get(n.constructor);if(!u){u=new Map,xt.set(n.constructor,u),c=[],Rt.set(n.constructor,c),a=new Map,kt.set(n.constructor,a),s={},Pt.set(n.constructor,s),i={},At.set(n.constructor,i),h={},It.set(n.constructor,h);let t=se(n.constructor);for(;t;)xt.has(t)&&(xt.get(t)?.forEach(((t,e)=>{u.set(e,t)})),c.push(...Rt.get(t)),kt.get(t)?.forEach(((t,e)=>{a.set(e,t)})),o(s,Pt.get(t)),o(i,At.get(t)),o(h,It.get(t))),t=se(t)}(l(t)?t:[t]).forEach((t=>{let o=n[r];_(e,"once",!1)&&a.set(t,!1);let l=_(e,"deep",!1),d=t.split(".")[0],p=u.get(d);if(p||(p=[],u.set(d,p)),p.includes(t)||p.push(t),l?(s[t]=s[t]??new Set,s[t].add(o),c.push(t)):(i[t]=i[t]??new Set,i[t].add(o)),_(e,"immediate",!1)){let e=h[t];e||(e=h[t]=new Set),e.add(o)}}))}}const Ar=new WeakMap;function Pr(t){if("string"==typeof t)return t.trim();if(st(t)){let e="";return c(t,((t,n)=>{t&&(e+=(e?" ":"")+n)})),e}if(Array.isArray(t)){let e="";return c(t,(t=>{const n=Pr(t);n&&(e+=(e?" ":"")+n)})),e}return""}const Ir=Ln((function(t){return(t,[e],n)=>{const r=t,s=Pr(e),o=Ar.get(r)??"";s!==o&&(o&&r.classList.remove(...o.split(" ").filter(Boolean)),s&&r.classList.add(...s.split(" ").filter(Boolean)),Ar.set(r,s))}}),[xn.TAG]),Or=new Map,Lr=new WeakMap,Vr=new WeakMap,Dr=new Set(["width","height","min-width","max-width","min-height","max-height","padding","padding-top","padding-right","padding-bottom","padding-left","margin","margin-top","margin-right","margin-bottom","margin-left","border-width","border-radius","outline-width","outline-offset","top","right","bottom","left","inset","inset-block","inset-inline","inset-block-start","inset-block-end","inset-inline-start","inset-inline-end","font-size","letter-spacing","word-spacing","text-indent","gap","row-gap","column-gap","grid-gap","grid-row-gap","grid-column-gap"]);function Wr(t){if(R(t))return;let e={value:""};if(d(t))e=t;else{if(!n(t)&&!it(t))return;e.value=t,e.important=!1}return e}function Hr(t){let e={};if(n(t)){const n=t.trim();return n&&n.split(";").filter((t=>t.trim())).forEach((t=>{const n=t.indexOf(":");if(n>0){const r=t.slice(0,n).trim();let s=Wr(t.slice(n+1).trim());s&&(e[r]=s)}})),e}let r={};if(Array.isArray(t))for(const e of t){const t=Hr(e);Object.assign(r,t)}else d(t)&&(r=t);return c(r,((t,n)=>{let r=function(t){if(t.startsWith("--"))return t;if(Or.has(t))return Or.get(t);const e=i(t);return Or.set(t,e),e}(n),s=Wr(t);s&&(Dr.has(r)&&!r.startsWith("--")&&ot(s.value)&&(s.value=s.value+"px"),e[r]=s)})),e}const Ur=Ln((function(t){return(t,e,n)=>{let r=t;const s=Hr(e[0]),o=new Set(Object.keys(s)),i=Lr.get(r);let a=Vr.get(r);a||(a={},Vr.set(r,a)),c(i,(t=>{o.has(t)||(r.style.removeProperty(t),delete a[t])})),c(s,((t,e)=>{const n=t.value+""+(t.important?" !important":"");a[e]!==n&&(r.style.setProperty(e,t.value+"",t.important?"important":""),a[e]=n)})),Lr.set(r,o)}}),[xn.TAG]),jr=["key","ref","emit-native"],Kr=new WeakMap,Br=new WeakMap,Fr=new WeakMap,$r=new WeakMap,zr="class",Gr="style";const Xr=Ln((function(t){return(t,[e],n,{renderComponent:r})=>{let s=t;if(function(t,e,n){const r=n?Pr(e):"",s=Br.get(t)??"";r!==s&&(s&&t.classList.remove(...s.split(" ").filter(Boolean)),r&&t.classList.add(...r.split(" ").filter(Boolean)),Br.set(t,r))}(s,e[zr],zr in e),function(t,e,n){const r=n?Hr(e):{},s=new Set(Object.keys(r)),o=Fr.get(t);let i=$r.get(t);i||(i={},$r.set(t,i)),o&&o.forEach((e=>{s.has(e)||(t.style.removeProperty(e),delete i[e])})),c(r,((e,n)=>{const r=e.value+""+(e.important?" !important":"");i[n]!==r&&(t.style.setProperty(n,e.value+"",e.important?"important":""),i[n]=r)})),Fr.set(t,s)}(s,e[Gr],Gr in e),n){let t=Kr.get(s);return t||(t={},Kr.set(s,t)),void c(e,((e,n)=>{jr.includes(n)||n===zr||n===Gr||(t[n]!==e||null!==e&&"object"==typeof e)&&(s.setAttribute(n,e),t[n]=e)}))}if(le(s)){let t={},n=St.get(s.constructor),o={};Kr.set(s,o),c(e,((e,r)=>{if(jr.includes(r)||r===zr||r===Gr)return;let i=a(r);(n?n[i]:void 0)?t[r]=e:(s.setAttribute(r,e+""),o[r]=e)})),ce(r,s,t)}else{let t={};Kr.set(s,t),c(e,((e,n)=>{jr.includes(n)||n===zr||n===Gr||(s.setAttribute(n,e),t[n]=e)}))}}}),[xn.TAG]),qr=new WeakMap,Qr=new WeakMap,Zr=new WeakMap;function Jr(t,e){let n=Oe.get(t);if(!n||0===n.length)return null;let r=n.join("."),s=Ie.get(e),o=s?.[n[0]];return{proxyRoot:r,ctxRoot:void 0!==o?[o,...n.slice(1)].join("."):r}}function Yr(t,e,n){let r=Pe.__varPathList,s=e+"."+n;for(let n=t;n<r.length;n++){let t=r[n];if(t===e||m(t,e+".")&&t!==s&&!m(t,s+"."))return!0}return!1}function ts(t,e,n,r,s,o){let i=[],a=[],l=!1,u=void 0!==r&&Pe.__collecting,h=0;return c(t,((t,s)=>{let o=u?Pe.__varPathList.length:0,c=er(e.call(n,t,s));u&&!l&&(l=Yr(o,r,h)),a.push(c);for(let t=0;t<c.length;t++)i.push(c[t]);h++})),void 0!==o&&void 0!==r&&void 0!==s&&(u?Zr.set(o,{keys:qr.get(o),varsPerItem:a,cross:l}):Zr.delete(o)),i}const es=Ln((function(t,e,n){return(t,s,o,{renderComponent:i,updatedMap:a})=>{let l=s[0];if(R(l)&&r(o))return[An.INIT];let u=qr.get(t);if(o&&u&&!R(l)&&o[0]===l){let r=Jr(l,i);if(r){let s=function(t,e){if(!t)return null;let n=Object.keys(t);if(0===n.length)return null;let r=e+".",s=new Set;for(let o=0;o<n.length;o++){let i=n[o];if(i===e||m(e,i+".")){if(t[i].end)return null;continue}if(!m(i,r))return null;let a=i.slice(r.length),l=a.indexOf("."),c=l<0?a:a.slice(0,l),u=Number(c);if(!Number.isInteger(u)||u<0||String(u)!==c)return null;s.add(u)}return s}(a,r.ctxRoot);if(s){let o=l,a=!1;for(let t of s){if(t>=o.length){a=!0;break}let n=e(o[t],t,t);if((W(n)?null:"string"==typeof n?n:String(n))!==u[t]){a=!0;break}}if(!a){let e=Zr.get(t);if(e&&e.keys===u&&!e.cross&&e.varsPerItem.length===u.length){let t=Pe.__collecting,a=!1;for(let l of s){let s=t?Pe.__varPathList.length:0;if(e.varsPerItem[l]=er(n.call(i,o[l],l)),t&&!e.cross&&Yr(s,r.proxyRoot,l)){e.cross=!0,a=!0;break}}if(!a){let t=[];for(let n=0;n<e.varsPerItem.length;n++){let r=e.varsPerItem[n];for(let e=0;e<r.length;e++)t.push(r[e])}return[An.REFRESH,t]}}return[An.REFRESH,ts(l,n,i,r.proxyRoot,r.ctxRoot,t)]}}}}const h=[],d=new Set;let p,f=0;if(c(l,((t,n)=>{let r=e(t,n,f++);if(W(r))return;const s="string"==typeof r?r:String(r);d.has(s)?te(`forEach - duplicate key in '${h}'`):(d.add(s),h.push(s))})),qr.set(t,h),o){if(R(h))return[An.REMOVE];if(u&&h.length===u.length&&function(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}(h,u)){let e=Jr(l,i);return[An.REFRESH,e?ts(l,n,i,e.proxyRoot,e.ctxRoot,t):ts(l,n,i)]}}Zr.delete(t);let g=s[2];if(Qr.has(t))p=Qr.get(t);else{let e=$(l)[0],n=l[e],r=g.call(i,n,e,0);p=new Wn(r,i),Qr.set(t,p)}return o?[An.UPDATE,p,h,u,g,l]:[An.INIT,n,p,l,e]}}),[xn.TEXT,xn.SLOT]);let ns=document.createElement("template"),rs=new WeakMap;const ss=Ln((function(t){return(t,e,n,{renderComponent:r})=>{if(!(n&&e[0]==n[0]||W(e[0])))if(at(t))t.innerHTML=tr(e[0]);else{let r=rs.get(t);r||(r=document.createTextNode(""),t.parentNode?.insertBefore(r,t),rs.set(t,r)),ns.innerHTML=tr(e[0]),s(n)||ae.remove(r,t),t.before(ns.content.cloneNode(!0))}}}),[xn.TAG,xn.TEXT,xn.SLOT]),os=new WeakMap,is=new WeakMap,as=new WeakMap,ls=Ln((function(t,e,n){return(t,[e,n,r],s,{renderComponent:o})=>{let i;if(s){if(!!e==!!s[0]){let e=os.get(t);return[An.REFRESH,e]}let a=e?n:r;return e?(i=is.get(t),i||(i=new Wn(a.call(o,e),o),is.set(t,i))):(i=as.get(t),i||(i=new Wn(a.call(o,e),o),as.set(t,i))),[An.REPLACE,a,i]}let a=e?n:r;return e?(i=is.get(t),i||(i=new Wn(a.call(o,e),o),is.set(t,i))):(i=as.get(t),i||(i=new Wn(a.call(o,e),o),as.set(t,i))),os.set(t,a),[An.INIT,a,i]}}),[xn.TEXT,xn.SLOT]),cs=new WeakMap,us=Ln((function(t,e){return(t,[e,n],r,{renderComponent:s})=>{let o=cs.get(t);return e&&!cs.has(t)&&(o=new Wn(n.call(s),s),cs.set(t,o)),r?r[0]?e?[An.REFRESH,n]:[An.REMOVE]:e?[An.REPLACE,n,o]:[An.NONE]:[An.INIT,...e?[n,o]:[]]}}),[xn.TEXT,xn.SLOT]);var hs;!function(t){t.CHANGE="change",t.INPUT="input"}(hs||(hs={}));const ds=Ln((function(t,e="value",r){return(t,[e,r,s],o,{varChain:i,renderComponent:a})=>{r=r??"value";const l=t;if(o){const t=o[0],n=e;if(!d(n)&&Object.is(n,t))return;if(l instanceof Rn)l.updateProps({[r]:n});else if(l instanceof HTMLTextAreaElement||l instanceof HTMLSelectElement){if(l.setAttribute(r,n+""),l instanceof HTMLSelectElement){let t=x(l.querySelectorAll("option"),(t=>t.value==n));t&&(t.selected=!0)}}else if(l instanceof HTMLInputElement){if(l.value==n)return;switch(l.type){case"checkbox":case"radio":n?l.setAttribute("checked",""):l.removeAttribute("checked");break;case"text":case"email":case"number":case"password":case"search":case"tel":case"url":l.setAttribute(r,n+""),S(l,r,n);break;default:l.setAttribute(r,n+"")}}return}let c;c=n(s)?lt(s)[0]:G(i);const u=ct(c,".")[0];let h=Ie.get(a),p="";h&&(p=h[u]),u in a||!p||p in a||te(`model - property '${u}' is not defined on the instance of `+a.tagName);let f=yn(a);if(d(e)||j(e)||(e=""),vt[l.tagName.toLowerCase()]){ce(a,l,{[r]:e}),pn(l,a,"update:"+r,(function(t){let e=this,n=(Ie.get(e)??{})[u];!(u in e)&&n&&_(e.wrapperComponent,u)===_(e,n)&&(e=e.wrapperComponent||e),S(e,c,t.value)}))}else if(l instanceof HTMLTextAreaElement){l.setAttribute(r,e+"");let t="input";f.push([t,function(t){let e=t.target;S(this,c,e.value)},l])}else if(l instanceof HTMLInputElement){let t="",n="";switch(l.type){case"checkbox":case"radio":t="checked",n="change";break;default:t="value",n="input"}l.setAttribute(r??t,e+""),f.push([n,function(t){let e=t.target;S(this,c,e.value)},l])}else l instanceof HTMLSelectElement&&(l.setAttribute(r,e+""),f.push(["change",function(t){let e=t.target,n=this,r=(Ie.get(n)??{})[u];!(u in n)&&r&&_(n.wrapperComponent,u)===_(n,r)&&(n=n.wrapperComponent||n),S(n,c,e.value)},l]))}}),[xn.TAG]),ps=new WeakMap,fs=Ln((function(t,e){return(t,[e,n],r)=>{if(r&&e===r[0])return;let s=t;if(!ps.has(s)){let t=s.style.display;ps.set(s,"none"==t?"unset":t)}s.style.display=e?ps.get(s):"none",n&&n(s,e)}}),[xn.TAG]),gs=Ln((function(t,e){return(t,[e,n],r,{renderComponent:s,slotComponent:o})=>{if(r)return;e=e.bind(s);let i=qt.get(o);i||(i={},qt.set(o,i)),i[n||"default"]=e}}),[xn.SLOT]),ms=new WeakMap,_s=new WeakMap,ws=Ln((function(t,e){return(t,[e,n],r,{renderComponent:s})=>{let o=()=>ir``,i=[],a=[];c(n,((t,e)=>{if(p(t))i.push(e),a.push(t);else{let e=t[0],n=t[1];i.push(e),a.push(n)}"default"===e&&(o=t)}));let l=ut(i,(t=>p(t)?t(e):t==e)),u=ms.get(t);ms.set(t,l);let h=_s.get(t);if(h||(h=[],_s.set(t,h)),!h[l]){let t=new Wn((a[l]??o).call(s),s);h[l]=t}return r?u==l?[An.REFRESH,a[l]??o]:[An.REPLACE,a[l]??o,h[l]]:[An.INIT,a[l]??o,h[l]]}}),[xn.TEXT,xn.SLOT]);class ys{static getCssText(t,e=!1){return n(t)?t:ht(O(t,((t,n)=>n.startsWith("--")?n+":"+t+(e?" !important":""):i(n)+":"+t+(e?" !important":""))),";")+";"}static setStyle(t,e){if(n(t)&&!j(t))return;let r=ys.getCssText(t);e.style.cssText=r}}function vs(){c(vt,((t,e)=>{customElements.get(e)||customElements.define(e,t)}))}export{Rn as CompElem,ys as CssHelper,ge as Csscope,hr as Decorator,ur as DecoratorType,dr as DecoratorWrapper,An as DirectiveUpdateTag,ae as DomUtil,xn as EnterPointType,hs as ModelTriggerType,vr as QueryCache,Hn as Template,$e as _getObservedAttrs,se as _getSuper,ce as addUninitializedSubComponentProp,Xr as bind,de as camelCaseCached,Ir as classes,gr as computed,cr as createRef,ar as css,me as csscope,mr as debounced,pr as decorator,fr as decoratorWithNoArgs,vs as defineComponents,Ln as directive,Vn as directiveScopeChecker,_r as emits,wr as event,es as forEach,be as getBaseSheets,ie as getBooleanValue,Te as getComponentDefaultProps,ue as getCssVarKey,Se as getDefaultCss,Ne as getGlobalDefaultProps,ir as h,ss as html,ls as ifElse,us as ifTrue,oe as isBooleanProp,le as isCompElemNode,Cr as makeState,ds as model,Pr as normalizeClass,Hr as normalizeStyle,yr as onced,Ke as prop,Sr as query,Nr as queryAll,ve as setDefaults,fs as show,te as showError,ee as showTagError,re as showTagWarn,ne as showWarn,gs as slot,Tr as state,Ur as styles,kr as tag,Rr as throttled,fe as typeNameLower,In as updateDirective,xr as watch,ws as when};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "compelem",
3
- "version": "0.26.3",
3
+ "version": "0.26.5",
4
4
  "description": "A modern, reactive, fast, lightweight and flexible lib for building web components",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -33,10 +33,9 @@
33
33
  "@typescript-eslint/eslint-plugin": "8.23.0",
34
34
  "@typescript-eslint/parser": "^8.23.0",
35
35
  "autoprefixer": "^10.4.19",
36
- "bootstrap-icons": "^1.11.3",
37
36
  "eslint": "9.19.0",
38
37
  "eslint-config-prettier": "^10.0.1",
39
- "myfx": "^1.15.10",
38
+ "myfx": "^1.15.11",
40
39
  "postcss": "^8.4.38",
41
40
  "prettier": "^2.8.3",
42
41
  "rollup-plugin-banner2": "1.2.2",
package/reactive.d.ts CHANGED
@@ -22,6 +22,7 @@ export declare const PROXY_MAP: WeakMap<Record<string, any>, ProxyConstructor>;
22
22
  export declare const EXTRA_CONTEXT_OF_VAR: WeakMap<any, Set<WeakRef<CompElem<any>>>>;
23
23
  export declare function reactive(obj: Record<string, any>, context: CompElem<any>, rootProp?: string): ProxyConstructor;
24
24
  export declare function notifyUpdate(context: CompElem, newValue: any, oldValue: any, path: string[], subNewValue?: any, subOldValue?: any): void;
25
+ export declare function appendUpdate(context: CompElem<any>, nv: any, ov: any, path: string[]): void;
25
26
  export declare function requestUpdate(context: CompElem<any>, nv: any, ov: any, subChain: string[], rootObjNew?: any, rootObjOld?: any): void;
26
27
  export declare class Queue {
27
28
  static nextSet: Set<Updater>;
@@ -8,7 +8,9 @@ import { UpdatePointMeta } from "./UpdatePointMeta";
8
8
  export declare class TemplateMeta {
9
9
  updatePointMetas: Array<UpdatePointMeta>;
10
10
  fragment: DocumentFragment;
11
- emptyEvent‌s: Record<number, string[]>;
11
+ emptyEvents: Record<number, string[]>;
12
+ upmMap: Record<number, UpdatePointMeta[]>;
13
+ slotNodeMap: Record<number, Node | null>;
12
14
  constructor(tmpl: Template, component: CompElem<any>, vars?: any[]);
13
15
  parseTemplate(tmpl: Template): [string, any[]];
14
16
  }
@@ -8,12 +8,20 @@ export declare class UpdatePoint {
8
8
  key: string;
9
9
  varIndex: number;
10
10
  value: any;
11
- node: WeakRef<Node>;
12
- subViewRootNodes: Record<string, WeakRef<any>[]> | WeakRef<any>[];
11
+ node: Node | null;
12
+ subViewRootNodes: Record<string, any[]> | any[];
13
13
  __destroyed: boolean;
14
14
  children: UpdatePoint[] | null;
15
15
  parent: UpdatePoint | null;
16
+ private __slotCompResolved;
17
+ private __slotComp;
18
+ __subViewId: number | undefined;
19
+ __parentViewsIdMap: Record<string, string> | undefined;
16
20
  constructor(varIndex: number);
21
+ /**
22
+ * 获取更新点所属的slot组件(带缓存)
23
+ */
24
+ getSlotComponent(renderComponent: CompElem<any>): any;
17
25
  static createFrom(upm: UpdatePointMeta): UpdatePoint;
18
26
  destroy(contextComponent?: CompElem<any>): void;
19
27
  insert(up: UpdatePoint): void;
@@ -5,6 +5,7 @@ export declare class UpdatePointMeta {
5
5
  varIndex: number;
6
6
  attrName: string;
7
7
  attrTmpl: string;
8
+ isPureTmpl: boolean;
8
9
  isText: boolean;
9
10
  isDirective: boolean;
10
11
  directiveType: string;
@@ -21,11 +21,11 @@ export declare function buildVars(tmpl: Template): any[];
21
21
  * 构建模板DOM
22
22
  * @param html
23
23
  */
24
- export declare function createTemplate(updatePoints: Array<UpdatePointMeta>, html: string, vars: any[], renderComponent: CompElem, emptyEvent‌s: Record<number, string[]>): DocumentFragment;
24
+ export declare function createTemplate(updatePoints: Array<UpdatePointMeta>, html: string, vars: any[], renderComponent: CompElem, emptyEvents: Record<number, string[]>): DocumentFragment;
25
25
  export declare function renderTemplate(component: CompElem<any>, tmplM: TemplateMeta, vars: any[]): [DocumentFragment, UpdatePoint[]];
26
26
  export declare function buildView(tmpl: Template, component: CompElem<any>): DocumentFragment;
27
27
  export declare function insertSubView(node: Node, point: UpdatePoint, tmplFn: TplFn, tmplM: TemplateMeta, component: CompElem<any>, valueAry?: any[], keyFn?: KeyFn): void;
28
- export declare function updateView(vars: any[], renderComponent: CompElem<any>, updatePoints: UpdatePoint[], renderedUps?: Set<UpdatePoint>, changed?: Record<string, UpdatedSource>): void;
28
+ export declare function updateView(vars: any[], renderComponent: CompElem<any>, updatePoints: UpdatePoint[], renderedUps?: Set<UpdatePoint>, changed?: Record<string, UpdatedSource>, oldVars?: any[]): void;
29
29
  export declare function updateSubScopeView(subScopeUpdatePoint: UpdatePoint, renderComponent: CompElem<any>, tmpl?: Template, updatedMap?: Record<string, UpdatedSource>): void;
30
30
  /**
31
31
  * HTML模板函数,用于构建模板
package/types.d.ts CHANGED
@@ -156,3 +156,8 @@ export type DefaultProps = Partial<{
156
156
  global: Record<string, any>;
157
157
  [key: string]: Record<string, any>;
158
158
  }>;
159
+ export type StyleValueObjectType = {
160
+ value: number | string;
161
+ important?: boolean;
162
+ };
163
+ export type StyleValueType = string | number | StyleValueObjectType;
package/utils.d.ts CHANGED
@@ -3,7 +3,6 @@ export declare function showError(msg: string): void;
3
3
  export declare function showTagError(tagName: string, msg: string): void;
4
4
  export declare function showWarn(...args: unknown[]): void;
5
5
  export declare function showTagWarn(tagName: string, msg: string): void;
6
- export declare function _toUpdatePath(varPath: string[]): string;
7
6
  export declare function _getSuper(cls: CompElem): any;
8
7
  export declare function isBooleanProp(type: any): boolean;
9
8
  export declare function getBooleanValue(v: any): any;
@@ -11,8 +10,10 @@ export declare const DomUtil: {
11
10
  getNodes(startNode: Node, endNode: Node): Node[];
12
11
  insertBefore: (node: Node, newNodes: any[]) => void;
13
12
  remove: (startNode: Node, endNode: Node) => void;
14
- clear(container: Element, comp: CompElem): void;
13
+ clear(container: Element | ShadowRoot | null): void;
15
14
  };
16
- export declare function getSlotComponent(node: Node, renderComponent: CompElem): any;
17
15
  export declare function isCompElemNode(node: Element): boolean;
18
16
  export declare function addUninitializedSubComponentProp(wrapperComponent: CompElem, node: Element, props: Record<string, any>): void;
17
+ export declare function getCssVarKey(ctor: Function, k: string): string;
18
+ export declare function camelCaseCached(name: string): string;
19
+ export declare function typeNameLower(et: Function): string;