compelem 0.26.4 → 0.27.0
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 +3 -7
- package/IComponent.d.ts +11 -0
- package/README.md +50 -12
- package/config.d.ts +10 -0
- package/constants.d.ts +15 -2
- package/decorators/emits.d.ts +14 -0
- package/decorators/tag.d.ts +1 -1
- package/directives/Classes.d.ts +1 -0
- package/directives/Styles.d.ts +4 -2
- package/events/event.d.ts +19 -1
- package/index.d.ts +3 -0
- package/index.js +2 -2
- package/package.json +3 -3
- package/reactive.d.ts +6 -4
- package/render/TemplateMeta.d.ts +3 -1
- package/render/UpdatePoint.d.ts +10 -2
- package/render/UpdatePointMeta.d.ts +1 -0
- package/render/render.d.ts +2 -2
- package/types.d.ts +5 -0
- package/utils.d.ts +4 -3
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 {
|
|
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;
|
|
@@ -81,6 +77,7 @@ export declare class CompElem<T = HTMLElement> extends HTMLElement implements IC
|
|
|
81
77
|
* @returns
|
|
82
78
|
*/
|
|
83
79
|
_notify(nv: any | undefined, ov: any, chain: string[], subNewValue?: any, subOldValue?: any): void;
|
|
80
|
+
requestUpdate(nv: any, ov: any, chain: string[], subNewValue?: any, subOldValue?: any): void;
|
|
84
81
|
updateProps(props: Record<string, any>, force?: boolean): void;
|
|
85
82
|
_initProps(props: Record<string, any>, attrs?: Record<string, any>): void;
|
|
86
83
|
/**
|
|
@@ -98,7 +95,6 @@ export declare class CompElem<T = HTMLElement> extends HTMLElement implements IC
|
|
|
98
95
|
* @param args 自定义参数
|
|
99
96
|
*/
|
|
100
97
|
emit(evName: string, arg?: Record<string, any>, event?: Event): void;
|
|
101
|
-
_callEmitEvent(evSrc: number, evName: string, arg: Record<string, any>): void;
|
|
102
98
|
/**
|
|
103
99
|
* 下一帧执行
|
|
104
100
|
* @param cbk
|
package/IComponent.d.ts
CHANGED
|
@@ -42,11 +42,22 @@ export interface IComponent<T = HTMLElement> {
|
|
|
42
42
|
* @param args 自定义参数
|
|
43
43
|
*/
|
|
44
44
|
emit(evName: string, arg: Record<string, any>, event?: Event): void;
|
|
45
|
+
/**
|
|
46
|
+
* 创建下一帧执行的逻辑
|
|
47
|
+
* @param cbk
|
|
48
|
+
*/
|
|
45
49
|
nextTick(cbk: () => void): void;
|
|
46
50
|
/**
|
|
47
51
|
* 强制更新视图
|
|
48
52
|
*/
|
|
49
53
|
forceUpdate(): void;
|
|
54
|
+
/**
|
|
55
|
+
* 请求指定路径更新
|
|
56
|
+
* @param nv new value
|
|
57
|
+
* @param ov old value
|
|
58
|
+
* @param chain path segment
|
|
59
|
+
*/
|
|
60
|
+
requestUpdate(nv: any, ov: any, chain: string[], subNewValue?: any, subOldValue?: any): void;
|
|
50
61
|
/**
|
|
51
62
|
* 向组件插入样式表,没有shadowDOM的组件调用无效
|
|
52
63
|
* @param sheet
|
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()
|
|
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:
|
|
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
|
-
|
|
449
|
-
```
|
|
450
|
-
|
|
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
|
-
|
|
465
|
+
其中click事件会当作原生事件进行监听
|
|
453
466
|
|
|
454
467
|
### 跨框架事件监听
|
|
455
468
|
如果组件要用于非 `CompElem` 框架时,需要为组件添加 `emit-native`属性,这样框架会将组件事件转为`CustomEvent`
|
|
@@ -484,13 +497,38 @@ return h` <l-tooltip>
|
|
|
484
497
|
```ts
|
|
485
498
|
class CustomButton{
|
|
486
499
|
...
|
|
487
|
-
@event('click
|
|
500
|
+
@event('click', (comp) => comp)
|
|
488
501
|
onClick() {
|
|
489
|
-
this.emit('
|
|
502
|
+
this.emit('myclick')
|
|
490
503
|
}
|
|
491
504
|
}
|
|
492
505
|
```
|
|
493
506
|
|
|
507
|
+
## 全局注入
|
|
508
|
+
### 样式
|
|
509
|
+
对于依赖外部样式表或第三方样式库如 TailwindCSS 可通过`setDefaults`接口进行注入
|
|
510
|
+
```ts
|
|
511
|
+
//main.ts
|
|
512
|
+
import tailwindStyle from "./tailwind.css?inline";
|
|
513
|
+
...
|
|
514
|
+
setDefaults({
|
|
515
|
+
css: [tailwindStyle]
|
|
516
|
+
});
|
|
517
|
+
```
|
|
518
|
+
然后就可以在组件中直接使用样式名书写
|
|
519
|
+
```ts
|
|
520
|
+
return h`
|
|
521
|
+
<button
|
|
522
|
+
class="
|
|
523
|
+
inline-flex items-center justify-center
|
|
524
|
+
font-medium rounded-md" ...>
|
|
525
|
+
...
|
|
526
|
+
</button>
|
|
527
|
+
`
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
|
|
494
531
|
## 扩展
|
|
495
532
|
- [VSCode](https://marketplace.visualstudio.com/items?itemName=holyhigh2.compelem-vscode) - 为h函数和css片段提供语法加亮/智能提示/诊断等功能
|
|
496
|
-
- [Vite](https://www.npmjs.com/package/vite-plugin-compelem-css) - 用于在导入scss/css文件时直接转换为CssTemplate
|
|
533
|
+
- [Vite-css](https://www.npmjs.com/package/vite-plugin-compelem-css) - 用于在导入scss/css文件时直接转换为CssTemplate
|
|
534
|
+
- [Vite-comments](https://www.npmjs.com/package/vite-plugin-compelem-strip-comments) - 用于支持h``模板中的html注释
|
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
|
|
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;
|
package/decorators/tag.d.ts
CHANGED
package/directives/Classes.d.ts
CHANGED
package/directives/Styles.d.ts
CHANGED
|
@@ -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: (
|
|
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
|
|
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
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { createRef, css, h } from "./render/render";
|
|
2
2
|
import { Template } from './render/Template';
|
|
3
|
+
export { reactive as createReactiveState, getCurrentRenderComponent } from "./reactive";
|
|
3
4
|
export * from "./decorator/Decorator";
|
|
4
5
|
export * from "./decorator/index";
|
|
5
6
|
export * from "./decorators/computed";
|
|
6
7
|
export * from "./decorators/csscope";
|
|
7
8
|
export * from "./decorators/debounced";
|
|
9
|
+
export * from "./decorators/emits";
|
|
8
10
|
export * from "./decorators/event";
|
|
9
11
|
export * from "./decorators/onced";
|
|
10
12
|
export * from "./decorators/prop";
|
|
@@ -28,6 +30,7 @@ export * from "./directives/When";
|
|
|
28
30
|
export { createRef, css, h, Template };
|
|
29
31
|
export declare function defineComponents(): void;
|
|
30
32
|
export * from './CompElem';
|
|
33
|
+
export * from './config';
|
|
31
34
|
export * from './types';
|
|
32
35
|
export * from './utils';
|
|
33
36
|
export * from './helpers';
|
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* compelem v0.
|
|
2
|
+
* compelem v0.27.0.1788539994
|
|
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)return;this.#h=!0,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;"emptyEvents";constructor(t,e,s){let[r,n]=this.parseTemplate(t);s&&a(s,n),this.updatePointMetas=[],this.emptyEvents={},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.emptyEvents)}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,"emptyEvents":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,isSymbol as d,isFunction as p,isObject 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 V,first as O,walkTree as L,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,Vt=new WeakMap,Ot=new WeakMap,Lt=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 Vn&&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(Ie&&Pe.push(t),null===r||"object"!=typeof r&&"function"!=typeof r)return r;let s=He.get(r);if(s||Ue.get(r)){let o=je.get(r);o||(o=new Set,je.set(r,o));let i=s??r;if(Ue.get(i)?.deref()!==e){let n=De.get(e);n||(n={},De.set(e,n));let r=We.get(i);r&&(n[r[0]]=t)}return o.add(n.__thisRef),i}if(f(r)&&!p(r)&&!(r instanceof Node)&&!Object.isFrozen(r)){let e=Ot.get(n.constructor),s=e?.has(t);s||(e=Lt.get(n.constructor),s=e?.has(t)),r=s||"slots"===t?r:Ke(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=He.get(s);if(i){if(!i.call(r,e,s,[t],e,s))return!0}else{if(Object.is(s,e))return!0;if(f(e)&&a===e)return!0}Reflect.set(r[Zt],t,e),$e(n,e,s,[t])}function ke(t,e,n,r,s,o){let i=function(t){let e=Vt.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,Vt.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;let Pe=[],Ie=!1,Ve=null;const Oe={popDirectiveQ(){let t=[],e=Pe;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(t){Ie=!0,Pe=[],Ve=t},end(t,e){t&&e&&t._regSubViewDeps(Oe.popVarPathList(),e),Ie=!1,Ve=null},popVarPathList(){let t=Array.from(new Set(Pe));return Pe=[],t},getVarPathList:()=>Pe,isCollection:()=>Ie};function Le(){return Ve}const De=new WeakMap,We=new WeakMap,He=new WeakMap,Ue=new WeakMap,je=new WeakMap;function Ke(t,n,r){if(He.has(t))return He.get(t);if(Ue.has(t)){if(r){let r=je.get(t);r||(r=new Set,je.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(d(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=We.get(r);if(Ie){let t=i?g(i):[];t.push(e),Pe.push(t.join("."))}if(null!==s&&"object"==typeof s&&He.has(s))return He.get(s);let a=s;if(f(s)&&!p(s)&&!(s instanceof Node)&&!Object.isFrozen(s)){let t=i?g(i):[];a=Ke(s,n),t.push(e),We.set(a,t),He.set(s,a)}return a},set(t,e,r,s){if(!e)return!1;let o=t[e],i=We.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);$e(n,p,o,a);let m=je.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=(De.get(e)??{})[a[0]];if(void 0===r)return;let s=a.join(".");s=s.replace(a[0],r),$e(e,p,o,s.split("."),h,d)})),_.forEach((t=>{let e=t.deref();De.delete(e),m.delete(t)})),f}});return We.has(s)||We.set(s,r?[r]:[]),He.set(t,s),r&&Ue.set(s,new WeakRef(n)),s}function Be(t,e,n,r,s,o){t._notify(e,n,r,s,o)}function Fe(t,e,n,r){let s=r.join(".");ke(t,e,n,s,e,n),Re(t,s),xe(t,s)}function $e(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),Be(t,s,o,r,e,n)}class ze{static nextSet=new Set;static nextPending=!1;static next;static flush(){ze.nextPending=!1;let t=Array.from(ze.nextSet);ze.nextSet.clear(),t.forEach((t=>t())),t=null}static pushNext(t){ze.nextSet.add(t),ze.nextPending||(ze.nextPending=!0,ze.next())}}function Ge(t){if(1===arguments.length)return(e,n,r)=>{t.required=t.required||!1,t.attribute=!1!==t.attribute,Xe(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,Xe(e,n,t)}function Xe(t,e,n,r){let s;if(!St.has(t.constructor)){const e={};let n=t.constructor;for(;(n=se(n))!==Vn;)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=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(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=ze.flush;ze.next=()=>{t.then(e)}})();const qe=new Set;function Qe(t){return Mt.get(t)??Mt.get(se(t))??qe}const Ze=["resize","outside","mutate"],Je=new WeakMap,Ye=[],tn=[],en=[],nn=new WeakSet,rn="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(!nn.has(e.target)){nn.add(e.target);continue}let r=Je.get(e.target);r&&r.forEach((r=>{r({target:e.target,contentBoxSize:t,borderBoxSize:n,type:"resize"})}))}})):void 0;var sn;!function(t){t.Child="child",t.Tree="tree",t.Attr="attr",t.Char="char"}(sn||(sn={}));const on=new WeakMap,an="undefined"!=typeof MutationObserver?new MutationObserver((t=>{for(let e=0;e<t.length;e++){const n=t[e];let r=on.get(n.target);if(!r)return;let s={target:n.target},o=null;switch(n.type){case"subtree":s.type=sn.Tree,o=r[sn.Tree];break;case"childList":s.type=sn.Child,s.addedNodes=n.addedNodes,s.removedNodes=n.removedNodes,o=r[sn.Child];break;case"attributes":s.type=sn.Attr,s.attributeName=n.attributeName,s.oldValue=n.oldValue,o=r[sn.Attr];break;case"characterData":s.type=sn.Char,s.oldValue=n.oldValue,o=r[sn.Char]}o&&(s.type="mutate",o(s))}})):void 0;function ln(e,n,r,s,o,i){if("resize"===e)return function(t,e,n,r){if(!rn)return;let s=Je.get(t);s||(s=[],Je.set(t,s));let o=rn;if(r){let n=e;e=(...r)=>{n(...r),T(s,(t=>t===e)),M(s)<1&&(o.unobserve(t),Je.delete(t))}}return s.push(e),rn.observe(t),(n=!1)=>{T(s,(t=>t===e)),M(s)<1&&(o.unobserve(t),Je.delete(t),n&&(o=t=null))}}(n,r,0,i);if("outside"===e)switch(s[0]){case"mousedown":return function(e,n){return Ye.push([e,n]),(r=!1)=>{t.remove(Ye,(t=>t[0]===e&&t[1]===n))}}(n,r);case"dblclick":return function(e,n){return en.push([e,n]),(r=!1)=>{t.remove(en,(t=>t[0]===e&&t[1]===n))}}(n,r);default:return function(e,n){return tn.push([e,n]),(r=!1)=>{t.remove(tn,(t=>t[0]===e&&t[1]===n))}}(n,r)}else if("mutate"===e)return function(t,e,n){if(!an)return;let r=C(n,"child"),s=C(n,"attr"),o=C(n,"char"),i=C(n,"tree"),a=on.get(t);return a?void 0:(a={},on.set(t,a),r&&(a[sn.Child]=e),s&&(a[sn.Attr]=e),o&&(a[sn.Char]=e),i&&(a[sn.Tree]=e),an.observe(t,{childList:r,attributes:s,characterData:o,subtree:i}),(e=!1)=>{on.delete(t),e&&(t=null)})}(n,r,s)}"undefined"!=typeof document&&(document.addEventListener("mousedown",(t=>{let e=_(t.composedPath(),0,t.target);Ye.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);tn.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);en.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 cn=/,|^(debounce:.+)|(debounce$)/,un=/,|^(throttle:.+)|(throttle$)/,hn="once",dn={esc:"escape"},pn=()=>{},fn=new WeakMap;function gn(t){let e=fn.get(t);return void 0===e&&(e=_(globalThis,t.name)!==t,fn.set(t,e)),e}function mn(t,e){let n,r=t??pn;if(n=x(e,(t=>cn.test(t)))){let t=n.split(":");r=A(r,parseInt(t[1])||100)}if(n=x(e,(t=>un.test(t)))){let t=n.split(":");r=P(r,parseInt(t[1])||100)}return e.includes(hn)&&(r=I(r)),r}function _n(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=V(t,(t=>dn[t]||t));if(M(n)>0&&!n.includes(r.key.toLowerCase()))return}t(r)}},options:{capture:r,once:e.includes(hn)||!1,passive:s}}}(mn(t,e),e,n)}function wn(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 yn=new Set(["focus","blur","visibilitychange","wheel"]),vn=new Set(["mouseenter","mouseleave","pointerenter","pointerleave"]),En=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"]),bn=new WeakMap;function Sn(t){let e=bn.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=Sn(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)},bn.set(t,e)),e}function Nn(t){return Sn(t).bindList}function Tn(t){let e=Sn(t);e.abortController||(e.abortController=new AbortController)}function Mn(t){let e=Sn(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&&gn(o)?o.bind(t):o;Cn(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&&gn(a)?a.bind(t):a;Cn(t,n,l,i),e.docoEventMap.set(o,l)}))}function Cn(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!==Vn;){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 wn(r,t,s,mn(n,o))}}if(function(t){return Ze.includes(t)}(s)){let e=ln(s,r,mn(n,o),o,0,o.includes("once"));return void(e&&Sn(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)&&!En.has(s)&&!vn.has(s);if(i){let e=o.includes("capture")||yn.has(s);!function(t,e,n,r,s,o){if(!function(t,e,n){let r=t.renderRoot;if(!r)return!1;Tn(t);let s=Sn(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 kn(t,e,n,r,s);let{handler:i}=_n(n,r,!0),a=Sn(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 kn(t,s,n,o,r)}function kn(t,e,n,r,s){Tn(t);let{handler:o,options:i}=_n(n,r);s.addEventListener(e,o,{capture:i.capture,once:i.once,passive:i.passive,signal:Sn(t).abortController.signal})}let Rn=0;const xn=new WeakMap,An={},Pn="slots",In={};class Vn 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 An}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=Rn++,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,O(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 Vn||t.host instanceof Vn),"parentNode");this.#l=t?t instanceof Vn?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=Sn(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&&L(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=>{xn.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),Oe.start(this),this[Zt][n]=e.call(this),Oe.end(),Oe.popVarPathList().forEach((n=>{let r=t.get(n);r||(r=new Set,t.set(n,r)),r.add(e)}))})))}Oe.start(this);let r=this.render();Oe.end();let i,a=Oe.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=[];rr.has(e.constructor)?(n=rr.get(e.constructor),r=ir(t)):(n=new Bn(t,e,r),rr.set(e.constructor,n));let[s,o]=lr(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,Oe.start(this);let d=this.cssVars;if(Oe.end(),!R(d)){this._cssVarOldValueMap={};let t=Ut.get(this.constructor);t||(t=new Set(Oe.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=>ze.pushNext(t))),this.#f&&ze.pushNext(this.#v),Mn(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 Vn?t.updateProps(n):c(n,((e,n)=>{if(t instanceof HTMLSlotElement){let r=xn.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===Pn?[Pn]:o,oldValue:e,end:o.length===n.length,subNewValue:r,subOldValue:s}}this.isMounted?ze.pushNext(this.#v):this.#f=!0}requestUpdate(t,e,n,r,s){Be(this,t,e,n,r,s)}#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);(f(s)||s!==r)&&(this.__data_[n]=s,Fe(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=ir(this.render()),n=this.#m;if(this.#m=e,ur(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],On.TEXT)});if(!n)return;if(n[0]!==Ln.REFRESH)return;c=p(n[1])?ir(n[1].call(e,t.value[1][0])):n[1]}if(!c)return;ur(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??In: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]===Gn||r[0]===Xn||r[0]===qn||r===Jn||"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),d=h.length;for(let o=0;o<d;o++){const a=h[o],c=i(a),d=this.hasAttribute(c);let p,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)p=W(t[a])?w:t[a];else{p=w;let t=n.getNamedItem(c)||n.getNamedItem(Xn+c)||n.getNamedItem(c+Xn);t&&(m=!0,p=t.value)}if(g.required&&!m){ee(s,"Prop '"+a+"' is required");break}p=this.#x(e,a,p,d),g.attribute&&U(p)&&!f(p)&&this.#A(g,a,p),this.__data_[a]=p,d&&(u[a]=p),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(f(s)){let t=Lt.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)&&!f(s)&&r.push([a,i,s]),S(this.__data_,i,s),t[i]=s,$e(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(f(t)){let n=We.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,xn.set(t,this));if(Cn(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(Qe(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);ze.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 On,Ln,Dn;function Wn(t,e,n,r,s,o,i,a,u,h){let d,f=zt.get(t),g=f?f[0]:"";if(g===On.TEXT||g===On.SLOT?(Oe.start(o),d=s(e,n,r,{renderComponent:o,slotComponent:i,varChain:a,updatedMap:h,pointType:g}),Oe.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===Ln.NONE)return;if(y===Ln.REFRESH){let t=d[1],e=p(t)?ir(t.call(o,n[0])):t;return e&&ur(e,o,u.children,void 0,h),!0}let C=M;l(M)||(C=V(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===Ln.REMOVE){let t=[];c(A,((e,n)=>{if(l(e))c(e,(t=>{t.remove(),t instanceof Vn&&t.destroy()}));else{let n=e;n.remove(),t.push(e),n instanceof Vn&&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===Ln.REPLACE){c(A,(t=>{t.remove(),t instanceof Vn&&t.destroy()})),P?.forEach(((t,e)=>{t.destroy(o),P[e]=null})),u.children=q(P);let[,t,n]=d;cr(e,u,t,n,o)}else if(y===Ln.UPDATE){if(R(A))return void cr(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?Dn.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))}Hn(n,t,b)}else e.forEach((({moveGroup:e})=>{e[0].refNew?y.push(e):Hn(e,t,b)}))}}if(_.length>0&&(_.forEach((e=>{let n=d.get(e.newKey)??-1,r=C[n],s=ir(N.call(o,r,e.newKey,n)),[i,a]=lr(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)))}))})),Mn(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=O(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=>{Hn(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=ir(N.call(o,i,n,s));for(let e=0;e<a.length;e++)t.push(a[e])})),ur(t,o,u.children,void 0,h)}}return!0}function Hn(t,e,n){t.forEach((({refKey:t,newKey:r})=>{let s=e[r];if(t===Dn.AFTER_BEGIN){let t=e[n[0]];O(t).before(...s)}else if(e[t]){let n=e[t],r=G(n);r?.after(...s)}}))}function Un(t,e){return zt.set(t,e),(...e)=>[t(...e),e,t,Oe.popDirectiveQ()]}function jn(t,e,n){zt.get(t)}!function(t){t.ATTR="attr",t.PROP="prop",t.TEXT="text",t.SLOT="slot",t.TAG="tag"}(On||(On={})),function(t){t.NONE="NONE",t.REFRESH="REFRESH",t.REMOVE="REMOVE",t.REPLACE="REPLACE",t.UPDATE="UPDATE",t.INIT="INIT"}(Ln||(Ln={})),function(t){t.AFTER_BEGIN="afterbegin"}(Dn||(Dn={}));const Kn=new RegExp(`([a-z0-9"'${Jt}])\\s*>\\s*<`,"img");class Bn{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!==nr)if(Yn.test(w)){let e=n[g];if(l(e)&&p(e[0])){let[,,n,s]=e;jn(n,On.TAG,r.tagName);let o=new zn(g);o.isDirective=!0,o.directiveType=On.TAG,o.nodeSn=m,o.directiveVarChain=s,f&&(o.slotNodeSn=_),t.push(o),g++}u.push(w)}else if(w[0]!==Gn)if(w!==Jn)if(G(w)!==Xn){if(y.includes(Jt)){let e=new zn(g);if(e.attrName=w.replace(/\.|\?|@/,""),e.nodeSn=m,f&&(e.slotNodeSn=_),w[0]===Xn||w[0]===qn||w[0]===Qn){if(w[0]===qn)e.isToggleProp=!0,e.attrName=w.substring(1);else if(w[0]===Qn){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 zn(g);t.attrName=w.substring(0,w.length-1),t.nodeSn=m,t.isPropPerfix=!0}else{if(Yn.test(y)){n[g];let e=new zn(g);e.isRef=!0,e.nodeSn=m,t.push(e),g++}u.push(w)}else{let e=w.substring(1);if(Yn.test(y)){let r=new zn(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(Yn);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 zn(g);c.isText=!0,c.nodeSn=m,t.push(c);let u=n[g];if(l(u)&&p(u[0])){let t=f?On.SLOT:On.TEXT;c.isDirective=!0,c.directiveType=t,f&&(c.slotNodeSn=_);let[,,e]=u;jn(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 Fn){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(Kn,"$1><").trim(),e=or(e),[e,n]}}class Fn{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 Fn){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 Bn(this,t,e),[r,s]=lr(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 $n{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 Vn),"parentNode");e&&e.host!==t&&(this.__slotComp=e.host)}return this.__slotComp}static createFrom(t){let e=new $n(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 Vn&&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 zn{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 Gn="@",Xn=".",qn="?",Qn="*",Zn=":",Jn="ref",Yn=new RegExp(`${Jt}\\d+`),tr=/(<\/?)\s*([A-Z][A-Za-z0-9]*)([\s>])/gm,er=/\s+([\.?@*])?((?:[a-zA-Z]*[A-Z][^\s<>="']+))(?=[\s=>])/gm,nr="slot-props",rr=new Map;let sr=0;function or(t){return n(t)?t=(t=t.replace(er,((t,e,n)=>` ${e??""}${i(n)}`))).replace(tr,((t,e,n,r)=>e+yt[n]+r)):t+""}function ir(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 Fn?n.push(r):e.push(r??"")}}return e}function ar(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),ar(r,e)):s===Node.TEXT_NODE&&e.push(r)}}function lr(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=Nn(t);const f=[];ar(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=$n.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(Yn,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__=sr++,Oe.start(t);let l=s(e,o,void 0,{renderComponent:t,slotComponent:r,varChain:i,attrName:n,pointType:a.directiveType});if(Oe.end(t,a),l&&l.length>1){let[,n,r,s,o]=l;cr(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 cr(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)=>{Oe.start(s);let p=ir(n.call(s,t,o,d));Oe.end(s);let[f,g]=lr(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&&(Mn(s),t.parentNode.insertBefore(u,t))}function ur(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,d=i.value,p=i.node;if(!p)continue;if(h=t[c],!f(d)&&d===h)continue;let g=p;if(u.isDirective){let[t,n,s,a]=i.value;if(!l(h))continue;let c=i.getSlotComponent(e),[,u]=h;Wn(s,p,u,n,t,e,c,a,i,o)&&r?.delete(i)}else if(u.isToggleProp){if(!!h===d)continue;g.toggleAttribute(u.attrName,!!h),g instanceof Vn&&g.updateProps({[u.attrName]:!!h})}else if(u.isProp){if(!f(h)&&h===d)continue;p instanceof Vn?p.updateProps({[u.attrName]:h}):p instanceof HTMLSlotElement&&e._updateSlot(p.getAttribute("name")||"default",u.attrName,h)}else if(u.attrName)d!=h&&("value"===u.attrName&&p instanceof HTMLInputElement?p.value=h:u.isPureTmpl?p.setAttribute(u.attrName,h+""):p.setAttribute(u.attrName,nt(u.attrTmpl,Yn,h+"")));else if(u.isText){let t=J(h??"");t!==p.textContent&&(p.textContent=t)}i.value=h}}function hr(t,...e){return new Fn(n(t)?[t]:t,e)}function dr(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 pr{__ref;get current(){return this.__ref?.deref()}__setRef(t){this.__ref=t}}function fr(){return new pr}var gr;!function(t){t.CLASS="class",t.FIELD="field",t.METHOD="method"}(gr||(gr={}));class mr{static get priority(){return 0}created(t,...e){}beforeMount(t,e,...n){}mounted(t,e,...n){}updated(t,e){}beforeDestroy(t,...e){}}class _r{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];f(s)&&U(_(s,"configurable"))?e=gr.METHOD:r(this.metadata[1])&&(e=gr.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 wr(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 _r(e,n.splice(1),t);return s?.push(o),s?.sort(((t,e)=>e.priority-t.priority)),o}}function yr(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 _r([],e.splice(1),t);return r?.push(s),r?.sort(((t,e)=>e.priority-t.priority)),s}}function vr(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 Oe.isCollection()&&Oe.getVarPathList().push(e),Reflect.get(this[Zt],e)}}),Reflect.getOwnPropertyDescriptor(t,e)}const Er=wr(class extends mr{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[gr.METHOD]}wait;immediate;constructor(t,e=!1){super(),this.wait=t,this.immediate=e}});function br(...t){return e=>{let n=wt.get(e);n||(n=new Set,wt.set(e,n)),t.forEach((t=>n.add(t)))}}function Sr(t,e){return(n,r,s)=>{if(!_t.has(n.constructor)){let t=[],e=n.constructor;for(;(e=se(e))!==Vn;)t=g(t,_t.get(e)??[]);_t.set(n.constructor,t)}_t.get(n.constructor)?.push({name:t,targetFn:e,fnName:r})}}const Nr=wr(class extends mr{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[gr.METHOD]}});var Tr;!function(t){t.ONCE="once"}(Tr||(Tr={}));const Mr=new WeakMap;class Cr extends mr{static get priority(){return Number.MAX_VALUE}get targets(){return[gr.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=Mr.get(t);n||(n=new Map,Mr.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 Mr.has(t)&&Mr.get(t)?.has(s.selector)&&s.cache===Tr.ONCE||s.getter(t),Mr.get(t)?.get(s.selector)}})}beforeDestroy(t,e){Mr.get(t)?.clear(),Mr.delete(t)}updated(t,e){this.cache!==Tr.ONCE&&this.getter(t)}}const kr=wr(Cr),Rr=wr(class extends Cr{getter(t){let e=t.shadowRoot?.querySelectorAll(this.selector),n=Mr.get(t);n||(n=new Map,Mr.set(t,n)),n.set(this.selector,e)}});function xr(t){if(1===arguments.length)return(e,n)=>{Ar(e,n,t)};Ar(arguments[0],arguments[1],{prop:""})}function Ar(t,e,n){if(!bt.has(t.constructor)){const e={};let n=t.constructor;for(;(n=se(n))!==Vn;)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=Ot.get(t.constructor);n||(n=new Set,Ot.set(t.constructor,n)),n.add(e)}Reflect.defineProperty(t,e,{get(){return Me(e,this)},set(t){Ce(e,t,this)}})}function Pr(t,e,n){Ar(t.prototype,e,n||{prop:""})}function Ir(t,e=!1){return n=>{n&&(e?customElements.define(t,n):(yt[n.name]=t,vt[t]=n))}}const Vr=wr(class extends mr{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[gr.METHOD]}wait;constructor(t){super(),this.wait=t}});function Or(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 Lr=new WeakMap;function Dr(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=Dr(t);n&&(e+=(e?" ":"")+n)})),e}return""}const Wr=Un((function(t){return(t,[e],n)=>{const r=t,s=Dr(e),o=Lr.get(r)??"";s!==o&&(o&&r.classList.remove(...o.split(" ").filter(Boolean)),s&&r.classList.add(...s.split(" ").filter(Boolean)),Lr.set(r,s))}}),[On.TAG]),Hr=new Map,Ur=new WeakMap,jr=new WeakMap,Kr=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 Br(t){if(R(t))return;let e={value:""};if(f(t))e=t;else{if(!n(t)&&!it(t))return;e.value=t,e.important=!1}return e}function Fr(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=Br(t.slice(n+1).trim());s&&(e[r]=s)}})),e}let r={};if(Array.isArray(t))for(const e of t){const t=Fr(e);Object.assign(r,t)}else f(t)&&(r=t);return c(r,((t,n)=>{let r=function(t){if(t.startsWith("--"))return t;if(Hr.has(t))return Hr.get(t);const e=i(t);return Hr.set(t,e),e}(n),s=Br(t);s&&(Kr.has(r)&&!r.startsWith("--")&&ot(s.value)&&(s.value=s.value+"px"),e[r]=s)})),e}const $r=Un((function(t){return(t,e,n)=>{let r=t;const s=Fr(e[0]),o=new Set(Object.keys(s)),i=Ur.get(r);let a=jr.get(r);a||(a={},jr.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)})),Ur.set(r,o)}}),[On.TAG]),zr=["key","ref","emit-native"],Gr=new WeakMap,Xr=new WeakMap,qr=new WeakMap,Qr=new WeakMap,Zr="class",Jr="style";const Yr=Un((function(t){return(t,[e],n,{renderComponent:r})=>{let s=t;if(function(t,e,n){const r=n?Dr(e):"",s=Xr.get(t)??"";r!==s&&(s&&t.classList.remove(...s.split(" ").filter(Boolean)),r&&t.classList.add(...r.split(" ").filter(Boolean)),Xr.set(t,r))}(s,e[Zr],Zr in e),function(t,e,n){const r=n?Fr(e):{},s=new Set(Object.keys(r)),o=qr.get(t);let i=Qr.get(t);i||(i={},Qr.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)})),qr.set(t,s)}(s,e[Jr],Jr in e),n){let t=Gr.get(s);return t||(t={},Gr.set(s,t)),void c(e,((e,n)=>{zr.includes(n)||n===Zr||n===Jr||(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={};Gr.set(s,o),c(e,((e,r)=>{if(zr.includes(r)||r===Zr||r===Jr)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={};Gr.set(s,t),c(e,((e,n)=>{zr.includes(n)||n===Zr||n===Jr||(s.setAttribute(n,e),t[n]=e)}))}}}),[On.TAG]),ts=new WeakMap,es=new WeakMap,ns=new WeakMap;function rs(t,e){let n=We.get(t);if(!n||0===n.length)return null;let r=n.join("."),s=De.get(e),o=s?.[n[0]];return{proxyRoot:r,ctxRoot:void 0!==o?[o,...n.slice(1)].join("."):r}}function ss(t,e,n){let r=Oe.getVarPathList(),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 os(t,e,n,r,s,o){let i=[],a=[],l=!1,u=void 0!==r&&Oe.isCollection(),h=0;return c(t,((t,s)=>{let o=u?Oe.getVarPathList().length:0,c=ir(e.call(n,t,s));u&&!l&&(l=ss(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?ns.set(o,{keys:ts.get(o),varsPerItem:a,cross:l}):ns.delete(o)),i}const is=Un((function(t,e,n){return(t,s,o,{renderComponent:i,updatedMap:a})=>{let l=s[0];if(R(l)&&r(o))return[Ln.INIT];let u=ts.get(t);if(o&&u&&!R(l)&&o[0]===l){let r=rs(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=ns.get(t);if(e&&e.keys===u&&!e.cross&&e.varsPerItem.length===u.length){let t=Oe.isCollection(),a=!1;for(let l of s){let s=t?Oe.getVarPathList().length:0;if(e.varsPerItem[l]=ir(n.call(i,o[l],l)),t&&!e.cross&&ss(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[Ln.REFRESH,t]}}return[Ln.REFRESH,os(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))})),ts.set(t,h),o){if(R(h))return[Ln.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=rs(l,i);return[Ln.REFRESH,e?os(l,n,i,e.proxyRoot,e.ctxRoot,t):os(l,n,i)]}}ns.delete(t);let g=s[2];if(es.has(t))p=es.get(t);else{let e=$(l)[0],n=l[e],r=g.call(i,n,e,0);p=new Bn(r,i),es.set(t,p)}return o?[Ln.UPDATE,p,h,u,g,l]:[Ln.INIT,n,p,l,e]}}),[On.TEXT,On.SLOT]);let as=document.createElement("template"),ls=new WeakMap;const cs=Un((function(t){return(t,e,n,{renderComponent:r})=>{if(!(n&&e[0]==n[0]||W(e[0])))if(at(t))t.innerHTML=or(e[0]);else{let r=ls.get(t);r||(r=document.createTextNode(""),t.parentNode?.insertBefore(r,t),ls.set(t,r)),as.innerHTML=or(e[0]),s(n)||ae.remove(r,t),t.before(as.content.cloneNode(!0))}}}),[On.TAG,On.TEXT,On.SLOT]),us=new WeakMap,hs=new WeakMap,ds=new WeakMap,ps=Un((function(t,e,n){return(t,[e,n,r],s,{renderComponent:o})=>{let i;if(s){if(!!e==!!s[0]){let e=us.get(t);return[Ln.REFRESH,e]}let a=e?n:r;return e?(i=hs.get(t),i||(i=new Bn(a.call(o,e),o),hs.set(t,i))):(i=ds.get(t),i||(i=new Bn(a.call(o,e),o),ds.set(t,i))),[Ln.REPLACE,a,i]}let a=e?n:r;return e?(i=hs.get(t),i||(i=new Bn(a.call(o,e),o),hs.set(t,i))):(i=ds.get(t),i||(i=new Bn(a.call(o,e),o),ds.set(t,i))),us.set(t,a),[Ln.INIT,a,i]}}),[On.TEXT,On.SLOT]),fs=new WeakMap,gs=Un((function(t,e){return(t,[e,n],r,{renderComponent:s})=>{let o=fs.get(t);return e&&!fs.has(t)&&(o=new Bn(n.call(s),s),fs.set(t,o)),r?r[0]?e?[Ln.REFRESH,n]:[Ln.REMOVE]:e?[Ln.REPLACE,n,o]:[Ln.NONE]:[Ln.INIT,...e?[n,o]:[]]}}),[On.TEXT,On.SLOT]);var ms;!function(t){t.CHANGE="change",t.INPUT="input"}(ms||(ms={}));const _s=Un((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(!f(n)&&Object.is(n,t))return;if(l instanceof Vn)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=De.get(a),d="";h&&(d=h[u]),u in a||!d||d in a||te(`model - property '${u}' is not defined on the instance of `+a.tagName);let p=Nn(a);if(f(e)||j(e)||(e=""),vt[l.tagName.toLowerCase()]){ce(a,l,{[r]:e}),wn(l,a,"update:"+r,(function(t){let e=this,n=(De.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";p.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+""),p.push([n,function(t){let e=t.target;S(this,c,e.value)},l])}else l instanceof HTMLSelectElement&&(l.setAttribute(r,e+""),p.push(["change",function(t){let e=t.target,n=this,r=(De.get(n)??{})[u];!(u in n)&&r&&_(n.wrapperComponent,u)===_(n,r)&&(n=n.wrapperComponent||n),S(n,c,e.value)},l]))}}),[On.TAG]),ws=new WeakMap,ys=Un((function(t,e){return(t,[e,n],r)=>{if(r&&e===r[0])return;let s=t;if(!ws.has(s)){let t=s.style.display;ws.set(s,"none"==t?"unset":t)}s.style.display=e?ws.get(s):"none",n&&n(s,e)}}),[On.TAG]),vs=Un((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}}),[On.SLOT]),Es=new WeakMap,bs=new WeakMap,Ss=Un((function(t,e){return(t,[e,n],r,{renderComponent:s})=>{let o=()=>hr``,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=Es.get(t);Es.set(t,l);let h=bs.get(t);if(h||(h=[],bs.set(t,h)),!h[l]){let t=new Bn((a[l]??o).call(s),s);h[l]=t}return r?u==l?[Ln.REFRESH,a[l]??o]:[Ln.REPLACE,a[l]??o,h[l]]:[Ln.INIT,a[l]??o,h[l]]}}),[On.TEXT,On.SLOT]);class Ns{static getCssText(t,e=!1){return n(t)?t:ht(V(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=Ns.getCssText(t);e.style.cssText=r}}function Ts(){c(vt,((t,e)=>{customElements.get(e)||customElements.define(e,t)}))}export{Vn as CompElem,Ns as CssHelper,ge as Csscope,mr as Decorator,gr as DecoratorType,_r as DecoratorWrapper,Ln as DirectiveUpdateTag,ae as DomUtil,On as EnterPointType,ms as ModelTriggerType,Tr as QueryCache,Fn as Template,Qe as _getObservedAttrs,se as _getSuper,ce as addUninitializedSubComponentProp,Yr as bind,de as camelCaseCached,Wr as classes,vr as computed,Ke as createReactiveState,fr as createRef,dr as css,me as csscope,Er as debounced,wr as decorator,yr as decoratorWithNoArgs,Ts as defineComponents,Un as directive,jn as directiveScopeChecker,br as emits,Sr as event,is as forEach,be as getBaseSheets,ie as getBooleanValue,Te as getComponentDefaultProps,ue as getCssVarKey,Le as getCurrentRenderComponent,Se as getDefaultCss,Ne as getGlobalDefaultProps,hr as h,cs as html,ps as ifElse,gs as ifTrue,oe as isBooleanProp,le as isCompElemNode,Pr as makeState,_s as model,Dr as normalizeClass,Fr as normalizeStyle,Nr as onced,Ge as prop,kr as query,Rr as queryAll,ve as setDefaults,ys as show,te as showError,ee as showTagError,re as showTagWarn,ne as showWarn,vs as slot,xr as state,$r as styles,Ir as tag,Vr as throttled,fe as typeNameLower,Wn as updateDirective,Or as watch,Ss as when};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "compelem",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
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",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"@rollup/plugin-node-resolve": "14.1.0",
|
|
31
31
|
"@rollup/plugin-replace": "^6.0.2",
|
|
32
32
|
"@rollup/plugin-terser": "0.4.1",
|
|
33
|
+
"@types/node": "^26.4.1",
|
|
33
34
|
"@typescript-eslint/eslint-plugin": "8.23.0",
|
|
34
35
|
"@typescript-eslint/parser": "^8.23.0",
|
|
35
36
|
"autoprefixer": "^10.4.19",
|
|
36
|
-
"bootstrap-icons": "^1.11.3",
|
|
37
37
|
"eslint": "9.19.0",
|
|
38
38
|
"eslint-config-prettier": "^10.0.1",
|
|
39
|
-
"myfx": "^1.15.
|
|
39
|
+
"myfx": "^1.15.11",
|
|
40
40
|
"postcss": "^8.4.38",
|
|
41
41
|
"prettier": "^2.8.3",
|
|
42
42
|
"rollup-plugin-banner2": "1.2.2",
|
package/reactive.d.ts
CHANGED
|
@@ -10,18 +10,20 @@ export declare function setterValue(propertyKey: string, v: any, context: CompEl
|
|
|
10
10
|
export declare function emitModelEvent(propertyKey: string, v: any, context: CompElem): void;
|
|
11
11
|
export declare const Collector: {
|
|
12
12
|
popDirectiveQ(): string[];
|
|
13
|
-
start(): void;
|
|
13
|
+
start(comp: CompElem<any>): void;
|
|
14
14
|
end(renderComponent?: CompElem, up?: UpdatePoint): void;
|
|
15
15
|
popVarPathList(): string[];
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
getVarPathList(): string[];
|
|
17
|
+
isCollection(): boolean;
|
|
18
18
|
};
|
|
19
|
+
export declare function getCurrentRenderComponent(): CompElem<HTMLElement> | null;
|
|
19
20
|
export declare const OBJECT_VAR_ROOT_PATH_IN_CONTEXT: WeakMap<CompElem<any>, Record<string, string>>;
|
|
20
21
|
export declare const OBJECT_VAR_PATH: WeakMap<any, string[]>;
|
|
21
22
|
export declare const PROXY_MAP: WeakMap<Record<string, any>, ProxyConstructor>;
|
|
22
23
|
export declare const EXTRA_CONTEXT_OF_VAR: WeakMap<any, Set<WeakRef<CompElem<any>>>>;
|
|
23
24
|
export declare function reactive(obj: Record<string, any>, context: CompElem<any>, rootProp?: string): ProxyConstructor;
|
|
24
|
-
export declare function notifyUpdate(context: CompElem
|
|
25
|
+
export declare function notifyUpdate(context: CompElem<any>, newValue: any, oldValue: any, path: string[], subNewValue?: any, subOldValue?: any): void;
|
|
26
|
+
export declare function appendUpdate(context: CompElem<any>, nv: any, ov: any, path: string[]): void;
|
|
25
27
|
export declare function requestUpdate(context: CompElem<any>, nv: any, ov: any, subChain: string[], rootObjNew?: any, rootObjOld?: any): void;
|
|
26
28
|
export declare class Queue {
|
|
27
29
|
static nextSet: Set<Updater>;
|
package/render/TemplateMeta.d.ts
CHANGED
|
@@ -8,7 +8,9 @@ import { UpdatePointMeta } from "./UpdatePointMeta";
|
|
|
8
8
|
export declare class TemplateMeta {
|
|
9
9
|
updatePointMetas: Array<UpdatePointMeta>;
|
|
10
10
|
fragment: DocumentFragment;
|
|
11
|
-
|
|
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
|
}
|
package/render/UpdatePoint.d.ts
CHANGED
|
@@ -8,12 +8,20 @@ export declare class UpdatePoint {
|
|
|
8
8
|
key: string;
|
|
9
9
|
varIndex: number;
|
|
10
10
|
value: any;
|
|
11
|
-
node:
|
|
12
|
-
subViewRootNodes: Record<string,
|
|
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;
|
package/render/render.d.ts
CHANGED
|
@@ -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,
|
|
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
|
|
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
|
|
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;
|