compelem 0.25.3 → 0.26.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 CHANGED
@@ -1,4 +1,5 @@
1
1
  import { IComponent } from "./IComponent";
2
+ import { CssTemplate } from "./render/CssTemplate";
2
3
  import { Template } from "./render/Template";
3
4
  import { UpdatePoint } from "./render/UpdatePoint";
4
5
  import { DefaultProps, TplFn } from "./types";
@@ -10,7 +11,6 @@ import { DefaultProps, TplFn } from "./types";
10
11
  */
11
12
  export declare class CompElem<T = HTMLElement> extends HTMLElement implements IComponent<T> {
12
13
  #private;
13
- static __l_globalRule: HTMLStyleElement;
14
14
  static defaults(options: DefaultProps): void;
15
15
  __data_: Record<string, any>;
16
16
  __updateTree: Array<UpdatePoint>;
@@ -36,19 +36,18 @@ export declare class CompElem<T = HTMLElement> extends HTMLElement implements IC
36
36
  get slots(): Record<string, Array<Node>>;
37
37
  get slotHooks(): Record<string, (...args: any[]) => Template>;
38
38
  get cssSheets(): CSSStyleSheet[];
39
- get globalCssSheet(): CSSStyleSheet;
40
39
  get isMounted(): boolean;
41
40
  /**
42
41
  * 组件样式,CSSStyleSheet可动态变更
43
42
  */
44
- static get css(): Array<string | CSSStyleSheet>;
45
- static get globalCss(): string | undefined;
46
- static get hostCss(): string | CSSStyleSheet | undefined;
43
+ static get css(): Array<CssTemplate | CSSStyleSheet>;
44
+ static get globalCss(): CssTemplate | CSSStyleSheet | undefined;
45
+ static get hostCss(): CssTemplate | CSSStyleSheet | undefined;
47
46
  get cssVars(): Record<string, string | number | undefined>;
48
47
  __inited: boolean;
49
48
  __thisRef: WeakRef<any>;
50
49
  constructor(...args: any[]);
51
- insertStyleSheet(sheet: string | CSSStyleSheet): CSSStyleSheet | null;
50
+ insertStyleSheet(sheet: CssTemplate | CSSStyleSheet): CSSStyleSheet | null;
52
51
  /**
53
52
  * Returns the root component in the parent chain, or itself if it's the top-level component.
54
53
  */
package/IComponent.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { CssTemplate } from "./render/CssTemplate";
1
2
  import { Template } from "./render/Template";
2
3
  /**
3
4
  * 组件接口
@@ -16,7 +17,6 @@ export interface IComponent<T = HTMLElement> {
16
17
  get slots(): Record<string, Array<Node>>;
17
18
  get slotHooks(): Record<string, (...args: any[]) => Template>;
18
19
  get cssSheets(): CSSStyleSheet[];
19
- get globalCssSheet(): CSSStyleSheet;
20
20
  get isMounted(): boolean;
21
21
  get cssVars(): Record<string, string | number | undefined>;
22
22
  propsReady(props: Record<string, any>): void;
@@ -51,7 +51,7 @@ export interface IComponent<T = HTMLElement> {
51
51
  * 向组件插入样式表,没有shadowDOM的组件调用无效
52
52
  * @param sheet
53
53
  */
54
- insertStyleSheet(sheet: string | CSSStyleSheet): CSSStyleSheet | null;
54
+ insertStyleSheet(sheet: CssTemplate | CSSStyleSheet): CSSStyleSheet | null;
55
55
  /**
56
56
  * 对于组件应用于原生环境或其他相似环境没有父组件但需要更新属性时调用
57
57
  * @param props {属性名:值} 对象
package/README.md CHANGED
@@ -1,4 +1,5 @@
1
- # CompElem
1
+ ![Logo](./assets/logo.png)
2
+
2
3
  一个现代化、响应式、快速、轻量的WebComponent开发库。为开发者提供丰富、灵活、可扩展的声明式接口
3
4
 
4
5
  ## 概览
@@ -38,7 +39,7 @@ export class PageTest extends CompElem {
38
39
  //////////////////////////////////// styles
39
40
  //静态样式
40
41
  static get css(): Array<string | CSSStyleSheet> {
41
- return [`:host{
42
+ return [css`:host{
42
43
  font-size:16px;
43
44
  }
44
45
  h2,p,i,h3{
@@ -156,14 +157,14 @@ export class PageTest extends CompElem {
156
157
  - ### 样式
157
158
  使用静态函数定义组件样式或全局样式(如弹框),对于包裹在上级组件内的伪类样式(如:hover)时,可通过hostCss进行指定
158
159
  ```ts
159
- static get css(): Array<string | CSSStyleSheet> {
160
+ static get css(): Array<CssTemplate | CSSStyleSheet> {
160
161
  return [];
161
162
  }
162
- static get globalCss(): string {
163
- return '';
163
+ static get globalCss(): CssTemplate | CSSStyleSheet {
164
+ return css`...`;
164
165
  }
165
- static get hostCss(): string {
166
- return '';
166
+ static get hostCss(): CssTemplate | CSSStyleSheet {
167
+ return css`...`;
167
168
  }
168
169
  ```
169
170
  对于需要响应组件状态变化并动态更新样式时可以通过css变量进行变更,该方法会自动追踪内部所有响应状态
@@ -177,12 +178,12 @@ export class PageTest extends CompElem {
177
178
  ```
178
179
  使用 `classes` 和 `styles` 指令设置元素样式
179
180
  ```html
180
- <div class="${classes({...})} c-class1" >
181
+ <div class="c-class1" ${classes({...})}>
181
182
  </div>
182
183
  ```
183
184
  动态样式类支持对象/数组/字符串格式,支持静态样式混写
184
185
  ```html
185
- <div style="${styles('cursor:pointer;...',{...})}" >
186
+ <div style="..." ${styles('cursor:pointer;...',{...})}>
186
187
  </div>
187
188
  ```
188
189
  动态内联样式支持字符串/对象两种格式
@@ -421,7 +422,6 @@ return h` <l-tooltip>
421
422
 
422
423
  - @state 定义组件内状态属性。可选参数{prop},可指定 propName 初始化值
423
424
  - @prop 定义父组件参数,默认不可修改。可选参数{type,required,model,getter,setter}
424
- > 设置 getter/setter 后,该属性的`@watch` 将会失效
425
425
  - @query/queryAll 定义 CssSelector 查询结果
426
426
  - @tag 自定义组件的标签名
427
427
  - @watch 监控 state/prop 变更
@@ -486,4 +486,7 @@ class CustomButton{
486
486
  this.emit('click')
487
487
  }
488
488
  }
489
- ```
489
+ ```
490
+
491
+ ## 扩展
492
+ VSCode - 可在VSCode 扩展中搜索 compelem 即可安装框架扩展
package/constants.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { CompElem } from "./CompElem";
2
2
  import { DecoratorWrapper } from "./decorator";
3
+ import { CssTemplate } from "./render/CssTemplate";
3
4
  import { Getter, PropOption, StateOption, TplFn } from "./types";
4
5
  export declare const SLOT_NAME_DEFAULT = "default";
5
6
  /**
@@ -35,6 +36,8 @@ export declare const PropShallowKeySetMap: WeakMap<Function, Set<string>>;
35
36
  export declare const HasChangedPropOrStateMap: WeakMap<Function, Map<string, Function>>;
36
37
  export declare const ComputedUpdateDepsMap: WeakMap<Function, Map<string, Set<Function>>>;
37
38
  export declare const CssUpdateDepsMap: WeakMap<Function, Set<string>>;
39
+ export declare const CssTemplateCacheMap: WeakMap<TemplateStringsArray, CssTemplate>;
40
+ export declare const CssStyleSheetCacheMap: WeakMap<TemplateStringsArray, CSSStyleSheet>;
38
41
  export declare const DirectiveScopeMap: Map<Function, string[]>;
39
42
  export declare const ComponentDynamicCssUpdaterMap: WeakMap<CompElem<any>, Map<Function, CSSStyleSheet>>;
40
43
  export declare const ComponentUninitializedSubComponentPropMap: WeakMap<CompElem<any>, Map<Node, Record<string, any>>>;
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { createRef, h } from "./render/render";
1
+ import { createRef, css, h } from "./render/render";
2
2
  import { Template } from './render/Template';
3
3
  export * from "./decorator/Decorator";
4
4
  export * from "./decorator/index";
@@ -24,7 +24,7 @@ export * from "./directives/Show";
24
24
  export * from "./directives/Slot";
25
25
  export * from "./directives/Styles";
26
26
  export * from "./directives/When";
27
- export { createRef, h, Template };
27
+ export { createRef, css, h, Template };
28
28
  export declare function defineComponents(): void;
29
29
  export * from './CompElem';
30
30
  export * from './types';
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
- * compelem v0.25.3.1786105190
2
+ * compelem v0.26.0.1786280001
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,isObject as l,isFunction as c,isSymbol as u,isArray as h,concat as d,startsWith as p,get as f,toArray as g,defaults as _,merge as m,clone as E,each as v,kebabCase as w,has as y,set as b,includes as S,find as N,debounce as T,throttle as M,once as C,noop as k,remove as R,map as x,size as A,flatMap as P,test as I,first as D,walkTree as L,isEmpty as O,filter as V,isNil as W,camelCase as H,isNull as U,isDefined as B,trim as F,isBoolean as K,parseJSON as j,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,split as rt,isEqual as nt,replace as ot,snakeCase as it,range 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=new Map,mt={},Et={},vt=new WeakMap,wt=new WeakMap,yt=new WeakMap,bt=new WeakMap,St=new Map,Nt=new Map,Tt=new WeakMap,Mt=new WeakMap,Ct=new WeakMap,kt=new WeakMap,Rt=new WeakMap,xt=new WeakMap,At=new WeakMap,Pt=new WeakMap,It=new WeakMap,Dt=new WeakMap,Lt=new WeakMap,Ot=new Map,Vt=new WeakMap,Wt=new WeakMap,Ht=new WeakMap,Ut=new WeakMap,Bt="__data_",Ft="⟬Ċ⟭";function Kt(t){console.error("[CompElem]",t)}function jt(t,e){console.error(`[CompElem <${t}>]`,e)}function $t(...t){console.warn("[CompElem]",...t)}function Gt(t,e){console.warn(`[CompElem <${t}>]`,e)}function Xt(t){return e(t).join("-")}function zt(t){return Object.getPrototypeOf(t)}function qt(t){return t===Boolean||s(t,(t=>t===Boolean))}function Qt(t){let e=t;return r(t)&&/(?:^true$)|(?:^false$)/.test(e)?e="true"===e:(n(e)||o(e))&&(e=!0),e}const Zt={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 Fe&&s.destroy())}};function Jt(t,e){let s=i(t,(t=>t.host&&t.host instanceof Fe),"parentNode");if(!s||s.host!==e)return s?s.host:void 0}function Yt(t){return!!Et[t.tagName?.toLowerCase()]}function te(t,e,s){let r=Wt.get(t);r||(r=new Map,Wt.set(t,r));let n=r.get(e)??{};r.set(e,a(n,s))}function ee(t,e){let s=e,r=Reflect.get(s[Bt],t);if(re.__collecting&&re.__varPathList.push(t),ie.has(r)||ae.get(r)){let n=le.get(r);n||(n=new Set,le.set(r,n));let o=ne.get(e);o||(o={},ne.set(e,o));let i=ie.get(r)??r;if(ae.get(i)?.deref()!==e){let e=oe.get(i);e&&(o[e[0]]=t)}return n.add(s.__thisRef),i}if(l(r)&&!c(r)&&!(r instanceof Node)&&!Object.isFrozen(r)){let e=At.get(s.constructor),n=e?.has(t);n||(e=Pt.get(s.constructor),n=e?.has(t)),r=n||"slots"===t?r:ce(r,s,t)}return r}function se(t,e,s){let r=s;if(!r.__inited)return void Reflect.set(r[Bt],t,e);let n=r[Bt][t],o=It.get(r.constructor),i=o?.get(t),a=ie.get(n);if(i){if(!i.call(r,e,n,[t],e,n))return!0}else{if(Object.is(n,e))return!0;if(l(e)&&a===e)return!0}Reflect.set(r[Bt],t,e),ue(s,e,n,[t])}const re={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(re.popVarPathList(),e),this.__collecting=!1},popVarPathList(){let t=Array.from(new Set(this.__varPathList));return this.__varPathList=[],t},__varPathList:[],__collecting:!1},ne=new WeakMap,oe=new WeakMap,ie=new WeakMap,ae=new WeakMap,le=new WeakMap;function ce(t,e,r){if(ie.has(t))return ie.get(t);if(ae.has(t)){if(r){let r=le.get(t);r||(r=new Set,le.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(u(s))return n;if(c(n))return n;if("length"===s&&h(t))return n;if("__"===s.substring(0,2))return n;if(re.__collecting){let t=oe.has(r)?d(oe.get(r)):[];t.push(s);let e=t.join(".");re.__varPathList.push(e)}if(ie.has(n))return ie.get(n);let o=n;if(l(n)&&!c(n)&&!(n instanceof Node)&&!Object.isFrozen(n)){let t=oe.has(r)?d(oe.get(r)):[];o=ce(n,e),t.push(s),oe.set(o,t),ie.set(n,o)}return o},set(t,s,r,n){if(!s)return!1;let o=t[s],i=oe.get(n)??[],a=d(i,[s]),l=It.get(e.constructor),c=l?.get(a[0]),u=a.length>1,h=r,p=o;if(u&&(p=h=e._getPrivateData()[a[0]]),c){if(!c.call(e,h,p,a,r,o))return!0}else if(Object.is(o,r))return!0;let f=r,g=Reflect.set(t,s,f);ue(e,f,o,a);let _=le.get(n),m=[];return _?.forEach((t=>{let e=t.deref();if(!e)return;if(e.isDestroyed)return void m.push(t);let s=(ne.get(e)??{})[a[0]],r=a.join(".");r=r.replace(a[0],s),ue(e,f,o,r.split("."),h,p)})),m.forEach((t=>{let e=t.deref();ne.delete(e),_.delete(t)})),g}});return oe.has(n)||oe.set(n,r?[r]:[]),ie.set(t,n),r&&ae.set(n,new WeakRef(e)),n}function ue(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=zt(t.constructor),a=Ct.get(t.constructor)??Ct.get(i),l=Mt.get(t.constructor)??Mt.get(i),c=Rt.get(t.constructor)??Rt.get(i),u=kt.get(t.constructor)??kt.get(i),h=Tt.get(t.constructor)??Tt.get(i);a?.forEach((i=>{(r===i||p(i,r+".")&&!Object.is(f(t._getPrivateData(),i),f(e,i))||p(r,i+".")&&l?.includes(i)&&!Object.is(f(t._getPrivateData(),i),f(e,i)))&&d(g(u[i]),g(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=Dt.get(t.constructor);s?.has(e)&&s.get(e)?.forEach((e=>{t._computedUpdateSetInNextTick.add(e)}))}(t,i),function(t,e){let s=Lt.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 he=new Map;class de{static nextSet=new Set;static nextPending=!1;static next;static flush(){de.nextPending=!1;let t=Array.from(de.nextSet);de.nextSet.clear(),he.clear(),t.forEach((t=>t())),t=null}static pushNext(t){de.nextSet.add(t),de.nextPending||(de.nextPending=!0,de.next())}}function pe(t){if(1===arguments.length)return(e,s,r)=>{t.required=t.required||!1,t.attribute=!1!==t.attribute,fe(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=_(r,t),r=void 0),t.shallow=t.shallow||!1,fe(e,s,t)}function fe(t,e,s,r){let n;if(!yt.has(t.constructor)){const e={};let s=t.constructor;for(;(s=zt(s))!==Fe;)m(e,E(yt.get(s)??{}));n=new Set,v(e,((t,e)=>{if(t.attribute){let t=w(e);n?.add(t)}})),Nt.set(t.constructor,n),yt.set(t.constructor,e)}if(s.attribute){n||(n=Nt.get(t.constructor));let s=w(e);n?.add(s)}if(s.model){let s=bt.get(t.constructor);s||(s=[],bt.set(t.constructor,s)),s.includes(e)||s.push(e)}if(y(t.constructor,"observedAttributes")||(t.constructor.observedAttributes=[]),n&&(t.constructor.observedAttributes=g(n)),b(yt.get(t.constructor),e,s),s.hasChanged){let r=It.get(t.constructor);r||(r=new Map,It.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 ee(e,this)},set(s){bt.get(t.constructor)?.includes(e)&&function(t,e,s){s.emit("update:"+t,{value:e})}(e,s,this)}})}(()=>{const t=Promise.resolve(),e=de.flush;de.next=()=>{t.then(e)}})();const ge=new Set;function _e(t){return Nt.get(t)??Nt.get(zt(t))??ge}const me=["resize","outside","mutate"],Ee=new WeakMap,ve=[],we=[],ye=[],be=new WeakSet,Se=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(!be.has(e.target)){be.add(e.target);continue}let r=Ee.get(e.target);r&&r({target:e.target,contentBoxSize:t,borderBoxSize:s,type:"resize"})}}));var Ne;!function(t){t.Child="child",t.Tree="tree",t.Attr="attr",t.Char="char"}(Ne||(Ne={}));const Te=new WeakMap,Me=new MutationObserver((t=>{for(let e=0;e<t.length;e++){const s=t[e];let r=Te.get(s.target);if(!r)return;let n={target:s.target},o=null;switch(s.type){case"subtree":n.type=Ne.Tree,o=r[Ne.Tree];break;case"childList":n.type=Ne.Child,n.addedNodes=s.addedNodes,n.removedNodes=s.removedNodes,o=r[Ne.Child];break;case"attributes":n.type=Ne.Attr,n.attributeName=s.attributeName,n.oldValue=s.oldValue,o=r[Ne.Attr];break;case"characterData":n.type=Ne.Char,n.oldValue=s.oldValue,o=r[Ne.Char]}o&&(n.type="mutate",o(n))}}));function Ce(e,s,r,n,o){if("resize"===e)return function(t,e){if(Ee.has(t))return;Ee.set(t,e),Se.observe(t);let s=Se;return(e=!1)=>{s.unobserve(t),Ee.delete(t),e&&(s=t=null)}}(s,r);if("outside"===e)switch(n[0]){case"mousedown":return function(e,s){return ve.push([e,s]),(r=!1)=>{t.remove(ve,(t=>t[0]===e&&t[1]===s))}}(s,r);case"dblclick":return function(e,s){return ye.push([e,s]),(r=!1)=>{t.remove(ye,(t=>t[0]===e&&t[1]===s))}}(s,r);default:return function(e,s){return we.push([e,s]),(r=!1)=>{t.remove(we,(t=>t[0]===e&&t[1]===s))}}(s,r)}else if("mutate"===e)return function(t,e,s){let r=S(s,"child"),n=S(s,"attr"),o=S(s,"char"),i=S(s,"tree"),a=Te.get(t);if(!a)return a={},Te.set(t,a),r&&(a[Ne.Child]=e),n&&(a[Ne.Attr]=e),o&&(a[Ne.Char]=e),i&&(a[Ne.Tree]=e),Me.observe(t,{childList:r,attributes:n,characterData:o,subtree:i}),(e=!1)=>{Te.delete(t),e&&(t=null)}}(s,r,n)}document.addEventListener("mousedown",(t=>{let e=f(t.composedPath(),0,t.target);ve.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=f(t.composedPath(),0,t.target);we.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=f(t.composedPath(),0,t.target);ye.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 ke=/,|^(debounce:.+)|(debounce$)/,Re=/,|^(throttle:.+)|(throttle$)/,xe="native",Ae={esc:"escape"},Pe=()=>{};function Ie(t,e,s,r){let n,o=t.split("."),i=o.shift(),a=o.includes("once"),l=e??Pe;if(n=N(o,(t=>ke.test(t)))){let t=n.split(":");l=T(l,parseInt(t[1])||100)}if(n=N(o,(t=>Re.test(t)))){let t=n.split(":");l=M(l,parseInt(t[1])||100)}if(a&&(l=C(l)),Et[s.tagName?.toLowerCase()]&&(s!==r||o.includes(xe)||o.push(xe),!o.includes(xe)))return De(s,r,i,l),k;if(function(t){return me.includes(t)}(i))return Ce(i,s,l,o);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(R(o,(t=>"ctrl"==t))[0]&&!t.ctrlKey)return;if(R(o,(t=>"alt"==t))[0]&&!t.altKey)return;if(R(o,(t=>"shift"==t))[0]&&!t.shiftKey)return;if(R(o,(t=>"meta"==t))[0]&&!t.metaKey)return;let e=x(o,(t=>Ae[t]||t));if(A(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 De(t,e,s,r){let n=f(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}const Le={boolean:Boolean,string:String,number:Number,object:Object,array:Array,function:Function,undefined:Object},Oe=new WeakMap;let Ve=[],We=0;const He=new WeakMap,Ue={},Be="slots";class Fe extends HTMLElement{static __l_globalRule=document.createElement("style");static defaults(t){Ve=P(t.css,(t=>{if(r(t)){let e=new CSSStyleSheet;return e.replaceSync(t),e}return t instanceof CSSStyleSheet?t:[]})),t.global,v(t,((t,e)=>{I(e[0],/[A-Z]/)}))}#t;#e={};__data_={};#s={};#r;__updateTree;_eventBindList;__docoEventMap;__updateSubViewDeps;_cssUpdateInNextTick=!1;_cssVarOldValueMap;__cssSheets;_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 Ue}get slotHooks(){return this.#u}get cssSheets(){return Oe.get(this.constructor)}get globalCssSheet(){return Fe.__l_globalRule.sheet}get isMounted(){return this.#h}#n;#o;#i;#a;#l;#c;#d={};#u={};#p={};#h=!1;#f=!1;#g;static get css(){return[]}static get globalCss(){}static get hostCss(){}get cssVars(){return{}}__inited=!1;#_=!1;#m;__thisRef;constructor(...t){super(),this.#t=We++,this.__updateTree=[],this.__thisRef=new WeakRef(this),this.#m=this.#E.bind(this),1===A(t)&&(this.#o={},a(this.#o,D(t))),Reflect.getOwnPropertyDescriptor(this.constructor.prototype,"slots")||Reflect.defineProperty(this.constructor.prototype,"slots",{get(){return ee("slots",this)},set(t){se("slots",t,this)}});let e=St.get(this.constructor)??St.get(zt(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(r(t)){e=new CSSStyleSheet;try{e.replaceSync(t)}catch(t){}}else{if(this.#r.adoptedStyleSheets.includes(t))return t;e=t}return 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 Fe||t.host instanceof Fe),"parentNode");this.#l=t?t instanceof Fe?new WeakRef(t):new WeakRef(t.host):void 0;let e=Ut.get(this);e&&(this.#c=new WeakRef(e),Ut.delete(this)),Fe.__l_globalRule.parentNode||document.head.appendChild(Fe.__l_globalRule);let s=f(this.constructor,"hostCss"),n=f(this.constructor,"hostCssSheet");if(s){n||(r(s)?(n=new CSSStyleSheet,n.replaceSync(s)):n=s,b(this.constructor,"hostCssSheet",n));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")),t&&n&&!t.adoptedStyleSheets.includes(n)&&(t.adoptedStyleSheets=[...t.adoptedStyleSheets,n])}this.setup(),this.__bindEvents()}disconnectedCallback(){this.__unbindEvents()}__bindEvents(){let t=this._eventBindList;v(t,(t=>{let[e,s,r,n]=t;if(n)return;if(!r)return;let o=Ie(e,s&&f(globalThis,s.name)!==s?s.bind(this):s,r,this);t[3]=o}));let e=_t.get(this.constructor);A(e)>0&&(this.__docoEventMap||(this.__docoEventMap=new Map),v(e,(({name:t,targetFn:e,fnName:s})=>{if(this.__docoEventMap.has(t+"@"+s))return;let r=e?e(this):this,n=f(this,s),o=Ie(t,n&&f(globalThis,n.name)!==n?n.bind(this):n,r,this);this.__docoEventMap.set(t+"@"+s,o)})))}__unbindEvents(){v(this._eventBindList,(t=>{let[,,,e]=t;e&&e(),t[3]=null}));let t=[];v(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=St.get(this.constructor)??St.get(zt(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,Vt.get(this)?.clear(),Vt.delete(this),this._watchUpdateArgsInNextTick?.clear(),this._watchUpdateSetInNextTick?.clear(),this._computedUpdateSetInNextTick?.clear(),this._computedUpdateSetInNextTick=null,this.__cssSheets=null,this.__updateSubViewDeps?.clear(),this.#l){let t=this.#l.deref();t&&L(t.__updateTree,(e=>{e.__destroyed||e.node?.deref()===this&&(e.destroy(t),R(e.parent?e.parent.children:t.__updateTree,(t=>t===e)))}))}v(this.__updateTree,(t=>t?.destroy(this))),v(this.#d,(t=>{He.delete(t),t.remove()})),v(this.#p,(t=>{v(t,(t=>t.remove()))})),v(this.__data_.slots,((t,e)=>{v(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;let t=f(this.constructor,"globalCss");O(t)||!r(t)||f(this.constructor,"_globalRuleInserted")||(Fe.__l_globalRule.textContent+=t,b(this.constructor,"_globalRuleInserted",!0));let e=Oe.get(this.constructor),s=e??[];e||(v(f(this.constructor,"css"),(t=>{if(r(t)){let e=new CSSStyleSheet;e.replaceSync(t),s.push(e)}else c(t)||s.push(t)})),Oe.set(this.constructor,s));const n=this.#N();this.propsReady(n);for(const t in n){const e=n[t];this.__data_[t]=e}this.#T(),this.__data_.slots={},Reflect.defineProperty(this.__data_,"__isData",{enumerable:!1,value:!0});let i=zt(this.constructor);if(Ct.get(this.constructor)??Ct.get(i)){this._watchUpdateSetInNextTick=new Set,this._watchUpdateArgsInNextTick=new Map;let t=Tt.get(this.constructor)??Tt.get(i),e=xt.get(this.constructor)??xt.get(i);v(e,((e,s)=>{let r=f(this,s);e.forEach((t=>{t.call(this,r,void 0,s)})),t.has(s)&&t.set(s,!0)}))}let l=a({},vt.get(this.constructor),vt.get(i));if(l){this._computedUpdateSetInNextTick=new Set;let t=Dt.get(this.constructor);t?v(l,((t,e)=>{this[Bt][e]=t.call(this)})):(t=new Map,Dt.set(this.constructor,t),v(l,((e,s)=>{b(e,"key",s),re.start(),this[Bt][s]=e.call(this),re.end(),re.popVarPathList().forEach((s=>{let r=t.get(s);r||(r=new Set,t.set(s,r)),r.add(e)}))})))}re.start();let u=this.render();re.end();let h,d=re.popVarPathList();this.constructor.prototype._viewDeps||(this.constructor.prototype._viewDeps=d),null===u?(this.#a=[],this.#i=void 0):(this.#r=this.attachShadow({mode:"open"}),this.#r.adoptedStyleSheets=[...Ve,...Oe.get(this.constructor)??[]],h=function(t,e){let s,r=[];hs.has(e.constructor)?(s=hs.get(e.constructor),r=fs(t)):(s=new Ze(t,e,r),hs.set(e.constructor,s));let[n,o]=gs(e,s,r);return e.__updateTree=o,n}(u,this),h&&A(h.children)>0&&(this.#a=V(h.children,(t=>t.nodeType===Node.ELEMENT_NODE)).map((t=>new WeakRef(t))),this.#i=this.#a[0])),this.__inited=!0,this.#M();let p=Ht.get(this);p&&(this.#u=p,Ht.delete(this)),v(this.#u,((t,e)=>{this.#C(e)}));const g=this;let _=St.get(this.constructor)??St.get(zt(this.constructor));_&&_.sort(((t,e)=>e.priority-t.priority)).forEach((t=>{t.beforeMount(this,((t,e)=>(g.__data_[t]=e,g.__data_[t])))})),this.beforeMount(),setTimeout((()=>{if(!this.isDestroyed){if(this.#h=!0,this.#r){re.start();let t=this.cssVars;if(re.end(),!O(t)){this._cssVarOldValueMap={};let e=Lt.get(this.constructor);e||(e=new Set(re.popVarPathList()),Lt.set(this.constructor,e));let s="";v(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}}h&&A(h.children)>0&&(this.#r.append(h),Wt.delete(this)),_&&_.forEach((t=>{t.mounted(this,((t,e)=>(g.__data_[t]=e,g.__data_[t])))})),this.#g&&this.#g.forEach((t=>de.pushNext(t))),this.#f&&de.pushNext(this.#v),this.__bindEvents(),this.mounted()}}),0)}propsReady(t){}render(){return null}beforeMount(){}mounted(){}#E(t){let e=t.currentTarget,s="";v(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=f(this.#e[e],"props");s&&v(this.slots,((t,e)=>{t.filter((t=>t.nodeType===Node.ELEMENT_NODE)).forEach((t=>{t instanceof Fe?t.updateProps(s):v(s,((e,s)=>{if(t instanceof HTMLSlotElement){let r=He.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=yt.get(this.constructor)??yt.get(zt(this.constructor));if(qt(f(n,r).type)){let t=!U(s)&&Qt(s);if(f(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=f(this,o)??t,c=Xt(o);this.#s[c]={value:l,chain:c===Be?[Be]:o,oldValue:e,end:o.length===s.length,subNewValue:r,subOldValue:n}}this.isMounted?de.pushNext(this.#v):this.#f=!0}#w(){if(A(this.#s)<1)return;if(!this.isMounted)return;const t=this.#s;if(this.#s={},!this.shouldUpdate(t))return;let e=St.get(this.constructor)??St.get(zt(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(v(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=f(t,"key"),s=this.__data_[e],r=t.call(this);(l(r)||r!==s)&&(this.__data_[e]=r,this._notify(r,s,[e]))})),this._computedUpdateSetInNextTick?.clear(),this._cssUpdateInNextTick){let t=this.cssVars;v(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&&ms(fs(this.render()),this,this.__updateTree,r,t),A(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 u,h=Jt(n,e);if(!s){let s=o(n,t.value[1],i,{renderComponent:e,slotComponent:h,varChain:l,updatedMap:r,pointType:f(Ot.get(a),[0],Ke.TEXT)});if(!s)return;if(s[0]!==je.REFRESH)return;u=c(s[1])?fs(s[1].call(e,t.value[1][0])):s[1]}if(!u)return;ms(u,e,t.children,void 0,r)}(e,this,void 0,t)}))),this.#b.forEach((t=>{this.#C(t)})),this.updated(t)}#N(){let t=yt.get(this.constructor)??yt.get(zt(this.constructor)),e=this.attributes,s=this.tagName,r=m(this.#o??{},Wt.get(this.wrapperComponent)?.get(this)??{}),o={};v(e,(({name:e,value:s})=>{if(e[0]===es||e[0]===ss||e[0]===rs||e===is||"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 c=Object.keys(t),u=c.length;for(let o=0;o<u;o++){const a=c[o],u=w(a),d=this.hasAttribute(u);let p,g=t[a],_=y(r,a),m=f(this,a);if(!("_defaultValue"in g)&&(g._defaultValue=m,!g.type)){n(m)&&jt(s,"Prop '"+a+"' has neither propType nor defaultValue be used for type inference");let t=typeof m;h(m)&&(t="array");let e=Le[t];g.type=e}if(_)p=W(r[a])?m:r[a];else{p=m;let t=e.getNamedItem(u)||e.getNamedItem(ss+u)||e.getNamedItem(u+ss);t&&(_=!0,p=t.value)}if(g.required&&!_){jt(s,"Prop '"+a+"' is required");break}p=this.#x(t,a,p,d),g.attribute&&B(p)&&!l(p)&&this.#A(g,a,p),this.__data_[a]=p,i[a]=p,delete this[a]}return i}#A(t,e,s){let r=w(e),n=F(s);qt(t.type)?(n=Qt(s),K(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?Qt(t):n===Number?Number(t):n===String?String(t):n===Object||n===Array?j(t):n===Date?new Date(t):new n(t)}}catch(e){jt(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,l=i.type,c=h(l)?l:[l],u=i.converter,d=n;if(!s(c,(t=>t===String))&&r(d)&&!U(d))try{d=u?u(d):this.#P(d,c)}catch(t){jt(this.tagName,`Convert attribute '${e}' error with `+d)}for(let t=0;t<c.length;t++){"Boolean"===c[t].name&&o&&(d=Qt(d))}if(W(d))return d;let p=typeof d,f=!B(d);for(let t=0;t<c.length;t++){const e=c[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||jt(this.tagName,`Invalid prop '${e}'. expected '${c.map((t=>t.name||t))}' but got '${p}'`),a&&(a.call(this,d,this.__data_)||jt(this.tagName,`Invalid prop '${e}'. IsValid() check failed`)),d}#T(){let t=wt.get(this.constructor)??wt.get(zt(this.constructor));t&&v(t,((e,s)=>{let r=t[s],n=f(this,s);if(r){let t=r.prop;n=t?$(this.__data_[t]):f(this,s)}this.__data_[s]=n,delete this[s]}))}#S=T(this.propsReady,100);updateProps(t,e=!1){let s=yt.get(this.constructor)??yt.get(zt(this.constructor));if(!s)return;if(!this.__inited)return void a(this.#o,t);let r=[];v(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=It.get(this.constructor),s=e?.get(o);if(s){if(!s.call(this,t,a,[o],t,a))return!0}else if(l(t)){let e=Pt.get(this.constructor);if(e?.has(o)&&Object.is(a,t))return!0}else if(Object.is(a,t))return!0}i.attribute&&B(t)&&!l(t)&&r.push([i,o,t]),b(this.__data_,o,t),ue(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=m(this.#o||{},t),this.#n=m(this.#n||{},e),v(t,((t,e)=>{if(l(t)){let s=oe.get(t);if(s){let t=this.wrapperComponent?wt.get(this.wrapperComponent?.constructor):null,r=s[0];if(t&&t[r]){let s=yt.get(this.constructor);b(s,[e,"shallow"],t[r].shallow)}}}}))}_bindSlot(t,e,s){this.#d[e]||(this.#d[e]=t,He.set(t,this));let r="slotchange",n=Ie(r,this.#m,t,this);if(this._eventBindList.push([r,this.#m,t,n]),!O(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(O(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(O(s))return void(this.slots={});v(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&&O(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&&O(e.assignedNodes({flatten:!0}))))break;t.pop()}}}));let r={};v(s,((t,e)=>{O(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,f(s,"props"));const r=this._asyncDirectives.get(e);let n=r?.buildView(e(f(s,"props"))),o=q(g(n),(t=>t.nodeType===Node.COMMENT_NODE));if(o){let e=this.#p[t];if(!O(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(_e(this.constructor).has(t)){let e=H(t);if(U(s)){let t=yt.get(this.constructor)??yt.get(zt(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=f(this,"__c_emit_event_");this.wrapperComponent?._callEmitEvent(s,t,e)}}_callEmitEvent(t,e,s){let r=this._subComponentEventMap.get(t),n=f(r,e);c(n)&&n.call(this,s)}nextTick(t){if(!this.isMounted)return this.#g||(this.#g=[]),void this.#g.push(t);de.pushNext(t)}forceUpdate(){v(this.__data_,((t,e)=>{this.#s[e]={value:void 0,chain:void 0}})),this.#w()}}var Ke,je,$e;function Ge(t,e,s,r,n,o,i,a,l,c){let u,d=f(Ot.get(t),[0],"");if([Ke.TEXT,Ke.SLOT].includes(d)?(re.start(),u=n(e,s,r,{renderComponent:o,slotComponent:i,varChain:a,updatedMap:c,pointType:d}),re.end(o,l)):u=n(e,s,r,{renderComponent:o,slotComponent:i,varChain:a,updatedMap:c,pointType:d}),!u)return;let[_,m,E,w,y,S]=u;if(_===je.NONE)return;if(_===je.REFRESH)return;let N=S;h(S)||(N=x(S,((t,e)=>t)));let T=f(e,"__anchor__"),M={};v(G(e),(t=>{"__anchor__"!==t&&p(t,"__c-")&&(M[t]=f(e,[t]))}));let C=l.subViewRootNodes,k=l.children;if(_===je.REMOVE){let t=[];v(C,((e,s)=>{if(h(e))v(e,(t=>{let e=t.deref();e.remove(),e instanceof Fe&&e.destroy()}));else{let s=e.deref();s.remove(),t.push(e),s instanceof Fe&&s.destroy()}})),t.forEach((t=>{R(C,(e=>e===t))})),k?.forEach(((t,e)=>{t.destroy(o),k[e]=null})),l.children=Q(k),h(C)?l.subViewRootNodes=[]:l.subViewRootNodes={}}else if(_===je.REPLACE){v(C,(t=>{let e=t.deref();e.remove(),e instanceof Fe&&e.destroy()})),k?.forEach(((t,e)=>{t.destroy(o),k[e]=null})),l.children=Q(k);let[,t,s]=u;_s(e,l,t,s,o)}else if(_===je.UPDATE){if(O(C))return void _s(e,l,y,m,o,S,((t,e,s)=>E[s]));let t={},s={};v(w,(s=>{let r=t[s];r||(r=t[s]=[]),V(e.parentElement.childNodes,(t=>f(t,["__c-"+T])==s)).forEach((t=>{r.push(t)}))})),l.children?.forEach((t=>{s[t.key]?s[t.key].push(t):s[t.key]=[t]}));let r,n=w,i=E,a=Z(w,E),u=J(w,a),h=[],d=[],p=!1;if(!O(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]=[],h.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?$e.AFTER_BEGIN:e?e.newKey:i[a-1],n=!1;0!==a&&O(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;O(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){p=!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))}Xe(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?d.push(e):Xe(e,t,w)}))}}}if(h.length>0&&(h.forEach((e=>{let s=tt(E,(t=>t==e.newKey)),r=N[s],n=fs(y.call(o,r,e.newKey,s)),[i,a]=gs(o,m,n);e.fragment=i,v(a,(t=>{t.key=e.newKey,l.children?.push(t)}));let c=g(i.childNodes),u=t[e.newKey];v(c,(t=>{u.push(t),i.childNodes.forEach((t=>b(t,"__c-"+T,e.newKey+""))),v(M,((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}(h),r.forEach(((s,r)=>{let n=s.fragment,o=t[s.refKey??w[0]],i=D(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)}))),v(d,(e=>{Xe(e,t,w)})),u.forEach((e=>{t[e].forEach((t=>{t.parentNode?.removeChild(t)})),s[e].forEach((t=>{t.destroy()}))})),p||u.length>0||r){const t=X(k,(t=>t.key));let e=[],s=0;i.forEach((r=>{t[r]&&t[r].forEach((t=>{t.varIndex=s++,e.push(t)}))})),J(k,e).forEach((t=>t.destroy(o))),l.children=e}let _={};if(v(N,((e,s)=>{let r=E[s],n=t[r];_[r]=n.map((t=>new WeakRef(t)))})),l.subViewRootNodes=_,a.length>0){let t=[];v(S,((e,s,r,n)=>{let i=e,a=fs(y.call(o,i,s,n));t.push(...a)})),ms(t,o,l.children,void 0,c)}}return!0}function Xe(t,e,s){t.forEach((({refKey:t,newKey:r})=>{let n=e[r];if(t===$e.AFTER_BEGIN){let t=e[s[0]];D(t).before(...n)}else if(e[t]){let s=e[t],r=z(s);r?.after(...n)}}))}function ze(t,e){return Ot.set(t,e),(...e)=>[t(...e),e,t,re.popDirectiveQ()]}function qe(t,e,s){Ot.get(t)}!function(t){t.ATTR="attr",t.PROP="prop",t.TEXT="text",t.SLOT="slot",t.TAG="tag"}(Ke||(Ke={})),function(t){t.NONE="NONE",t.REFRESH="REFRESH",t.REMOVE="REMOVE",t.REPLACE="REPLACE",t.UPDATE="UPDATE",t.INIT="INIT"}(je||(je={})),function(t){t.AFTER_BEGIN="afterbegin"}($e||($e={}));const Qe=new RegExp(`([a-z0-9"'${Ft}])\\s*>\\s*<`,"img");class Ze{updatePointMetas;fragment;"emptyEvent‌s";constructor(t,e,s){let[r,n]=this.parseTemplate(t);s&&a(s,n),this.updatePointMetas=[],this.emptyEvent‌s={},this.fragment=function(t,e,s,r,n){const i=document.createElement("template");i.innerHTML=e;const a=document.createNodeIterator(i.content,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT);let l,u,d=0,p=-1,f=-1;for(;l=a.nextNode();)if(p++,u&&!u.contains(l)&&(u=void 0,f=-1),l instanceof HTMLElement||l instanceof SVGElement){Yt(l)&&(u=l,f=p);let e={},i=x(l.attributes,(t=>({name:t.name,value:t.value})));for(let a=0;a<i.length;a++){const g=i[a];let{name:_,value:m}=g;if(_!==us)if(as.test(_)){let e=s[d];if(h(e)&&c(e[0])){let[,,s,n]=e;qe(s,Ke.TAG,r.tagName);let o=new ts(d);o.isDirective=!0,o.directiveType=Ke.TAG,o.nodeSn=p,o.directiveVarChain=n,u&&(o.slotNodeSn=f),t.push(o),d++}l.removeAttribute(_)}else if(_[0]!==es)if(_!==is)if(z(_)!==ss){if(m.includes(Ft)){let e=new ts(d);if(e.attrName=_.replace(/\.|\?|@/,""),e.nodeSn=p,u&&(e.slotNodeSn=f),_[0]===ss||_[0]===rs||_[0]===ns){if(_[0]===rs)e.isToggleProp=!0,e.attrName=_.substring(1);else if(_[0]===ns){e.isRefAttr=!0;let t=_.substring(1);const[s,r]=t.split(os);let n=s;switch(r){case"camel":n=H(n);break;case"kebab":n=w(n);break;case"snake":n=it(n)}e.attrName=n}else{let t=Et[l.tagName.toLowerCase()];yt.get(t);{let t=H(_.substring(1));e.isProp=!0,e.attrName=t}}l.removeAttribute(_)}else e.attrTmpl=m;t.push(e),d++}}else{e[_.substring(0,_.length-1)]=m,l.removeAttribute(_);let t=new ts(d);t.attrName=_.substring(0,_.length-1),t.nodeSn=p,t.isPropPerfix=!0}else{if(as.test(m)){s[d];let e=new ts(d);e.isRef=!0,e.nodeSn=p,t.push(e),d++}l.removeAttribute(_)}else{let e=_.substring(1);if(as.test(m)){let r=new ts(d);r.isEvent=!0,r.attrName=e,r.nodeSn=p,t.push(r),s[d],d++}else if(o(m)){let t=n[p];t||(t=n[p]=[]),t.push(e)}l.removeAttribute(_)}}}else{let e=F(l.nodeValue).split(as);if(e.length<2)continue;v(at(e.length-1),(n=>{let i=F(e[n]);if(!o(i)){let t=document.createTextNode(i);l.parentNode.insertBefore(t,l),p++}let a=document.createTextNode("");l.parentNode.insertBefore(a,l);let g=new ts(d);g.isText=!0,g.nodeSn=p,t.push(g);let _=s[d];if(h(_)&&c(_[0])){let t=u?Ke.SLOT:Ke.TEXT;g.isDirective=!0,g.directiveType=t,u&&(g.slotNodeSn=f);let[,,e]=_;qe(e,0,r.tagName),_=void 0}d++,p++})),p--;let n=F(z(e));if(o(n)){let t=l.previousSibling;l.parentNode.removeChild(l),l=t}else l.nodeValue=n,p++}return i.content}(this.updatePointMetas,r,n,e,this.emptyEvent‌s)}parseTemplate(t){let e="",s=d(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=f(s,o,"");if(a instanceof Je){let[t,e]=this.parseTemplate(a);a=t,s.splice(o,1,...e),o+=e.length-1}else a=i>n?"":Ft+o;o++,e=e+r+a}return e=e.replace(Qe,"$1><").trim(),e=ps(e),[e,s]}}class Je{strings;vars;constructor(t,e){this.strings=d(t),this.vars=e}getKey(){let t=this.vars,e="";return v(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 O(e)&&t.forEach((t=>{if(t instanceof Je){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=d(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 Ze(this,t,e),[r,n]=gs(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 Ye{metaInfo;key;varIndex;value;node;subViewRootNodes;__destroyed=!1;children;parent;constructor(t){this.varIndex=t}static createFrom(t){let e=new Ye(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 Fe&&e.destroy(),t&&Zt.clear(e.deref(),t),e.deref()?.remove()}insert(t){t.parent=this,this.children||(this.children=[]),this.children.push(t)}}class ts{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 es="@",ss=".",rs="?",ns="*",os=":",is="ref",as=new RegExp(`${Ft}\\d+`),ls=/(<\/?)\s*([A-Z][A-Za-z0-9]*)([\s>])/gm,cs=/\s+([\.?@*])?((?:[a-zA-Z]*[A-Z][^\s<>="']+))(?=[\s=>])/gm,us="slot-props",hs=new Map;let ds=0;function ps(t){return r(t)?t=(t=t.replace(cs,((t,e,s)=>` ${e??""}${w(s)}`))).replace(ls,((t,e,s,r)=>e+mt[s]+r)):t+""}function fs(t){let e=d(t.vars),s=t.strings.length-1;for(let r=0;r<=s;r++){let s=f(t.vars,r,"");if(s instanceof Je){let t=fs(s);e.splice(r,1,...t)}}return e}function gs(t,e,s){const{fragment:r,updatePointMetas:n,"emptyEvent‌s":o}=e;let i,a=r.cloneNode(!0),l=[],c=[],u=[],h=t._eventBindList;h||(h=t._eventBindList=[]);const d=document.createNodeIterator(a,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT);let p={},f={};n.forEach(((t,e)=>{p[t.nodeSn]||(p[t.nodeSn]=[]),p[t.nodeSn].push(t),t.slotNodeSn>-1&&(f[t.slotNodeSn]=null)}));let g=-1,_=0;for(;i=d.nextNode();){g++,null===f[g]&&(f[g]=i);let e=o[g];e&&e.forEach((t=>{h.push([t,k,i])}));let r={};const n=p[g];n&&n.forEach((t=>{let e=s[_++],n=Ye.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;O(o)&&A(t.directiveVarChain)>0&&(o=t.directiveVarChain),u.push([i,a,s,r,n,o,t.directiveType])}else i.setAttribute(t.attrName,t.attrTmpl.replace(as,e));l.push(n)})),i instanceof HTMLSlotElement?t._bindSlot(i,i.name||"default",r):i instanceof HTMLElement&&Yt(i)&&(Ut.set(i,t),te(t,i,r))}return c.forEach((([e,s,r,n,o,i,a])=>{b(e,"__anchor__",ds++),re.start();let l=n(e,o,void 0,{renderComponent:t,slotComponent:r,varChain:i,attrName:s,pointType:a.directiveType});if(re.end(t,a),l&&l.length>1){let[,s,r,n,o]=l;_s(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 _s(t,e,s,r,n,o,i){let a=[],l=i?{}:void 0;o=o??[0];let c=document.createDocumentFragment(),u=f(t,"__anchor__");v(o,((t,o,h,d)=>{re.start();let p=fs(s.call(n,t,o,d));re.end(n);let[f,_]=gs(n,r,p),m=g(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-"+u,e)})),l[e]=m,_.forEach((t=>{t.key=e})),a.push(..._),c.append(f)}else c=f,e.subViewRootNodes=m,_.forEach((t=>{e.insert(t)}))})),l&&(e.subViewRootNodes=l,a.forEach(((t,s)=>{t.varIndex=s,e.insert(t)}))),c.childNodes.length>0&&(n.__bindEvents(),t.parentNode.insertBefore(c,t))}function ms(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 u=i.value,d=t,p=i.node.deref();if(!p)continue;let g=rt(a,"-");for(let t=0;t<g.length;t++){const e=g[t];d=f(d,e),d&&d.vars&&o<g.length-1&&(d=d.vars)}if(!l(u)&&u===d)continue;let _=p;if(c.isDirective){let[t,s,o,a]=i.value;if(!h(d))continue;let l=Jt(p,e),[,c]=d;Ge(o,p,c,s,t,e,l,a,i,n)&&r?.delete(i)}else if(c.isToggleProp){if(!!d===u)continue;_.toggleAttribute(c.attrName,!!d),_ instanceof Fe&&_.updateProps({[c.attrName]:!!d})}else if(c.isProp){if(!l(d)&&d===u)continue;p instanceof Fe?p.updateProps({[c.attrName]:d}):p instanceof HTMLSlotElement&&e._updateSlot(p.getAttribute("name")||"default",c.attrName,d)}else if(c.attrName){if(!nt(u,d))switch(c.attrName){case"value":if(p instanceof HTMLInputElement){p.value=d;break}default:p.setAttribute(c.attrName,ot(c.attrTmpl,as,d+""))}}else if(c.isText){let t=i.node,e=et(d??"");e!==t.deref().textContent&&(t.deref().textContent=e)}i.value=d}}function Es(t,...e){return new Je(r(t)?[t]:t,e)}class vs{__ref;get current(){return this.__ref?.deref()}__setRef(t){this.__ref=t}}function ws(){return new vs}var ys;!function(t){t.CLASS="class",t.FIELD="field",t.METHOD="method"}(ys||(ys={}));class bs{static get priority(){return 0}created(t,...e){}beforeMount(t,e,...s){}mounted(t,e,...s){}updated(t,e){}beforeDestroy(t,...e){}}class Ss{metadata;decorator;key;priority=0;constructor(t,e,s){this.metadata=e,this.decorator=new s(...t),this.priority=f(s,"priority",0)}dispose(){this.metadata=null,this.decorator=null}create(t){let e,s=this.decorator.targets,r=this.metadata[1];l(r)&&B(f(r,"configurable"))?e=ys.METHOD:n(this.metadata[1])&&(e=ys.FIELD),!O(s)&&e&&s.includes(e)?this.decorator.created(t,...this.metadata):Kt(`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 Ns(t){return(...e)=>(...s)=>{let r=s[0].constructor,n=St.get(r);if(!St.has(r)){let t=Object.getPrototypeOf(r);n=t?d(St.get(t)??[]):[],St.set(r,n)}let o=new Ss(e,s.splice(1),t);return n?.push(o),o}}function Ts(t){return(...e)=>{if(!e||e.length<1)return;let s=e[0].constructor,r=St.get(s);if(!St.has(s)){let t=Object.getPrototypeOf(s);r=t?d(St.get(t)??[]):[],St.set(s,r)}let n=new Ss([],e.splice(1),t);return r?.push(n),n}}function Ms(t,e,s){return vt.has(t.constructor)||vt.set(t.constructor,{}),vt.get(t.constructor)[e]=s.get,delete t[e],Reflect.defineProperty(t,e,{get(){return re.__collecting&&re.__varPathList.push(e),Reflect.get(this[Bt],e)}}),Reflect.getOwnPropertyDescriptor(t,e)}const Cs=Ns(class extends bs{static get priority(){return Number.MAX_VALUE}created(t,e,...s){let r=f(t,e);b(t,e,T(r,this.wait,this.immediate)),b(t,e+"_$__",r)}beforeDestroy(t,e){b(t,e,null),b(t,e+"_$__",null)}get targets(){return[ys.METHOD]}wait;immediate;constructor(t,e=!1){super(),this.wait=t,this.immediate=e}});function ks(t,e){return(s,r,n)=>{if(!_t.has(s.constructor)){let t=[],e=s.constructor;for(;(e=zt(e))!==Fe;)t=d(t,_t.get(e)??[]);_t.set(s.constructor,t)}_t.get(s.constructor)?.push({name:t,targetFn:e,fnName:r})}}const Rs=Ns(class extends bs{static get priority(){return Number.MAX_VALUE}created(t,e,s,...r){let n=lt(f(t,s),t);b(t,s,C(n)),b(t,s+"_$__",n)}beforeDestroy(t,e){b(t,e,null),b(t,e+"_$__",null)}get targets(){return[ys.METHOD]}});var xs;!function(t){t.ONCE="once"}(xs||(xs={}));const As=new WeakMap;class Ps extends bs{static get priority(){return Number.MAX_VALUE}get targets(){return[ys.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=As.get(t);s||(s=new Map,As.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 As.has(t)&&As.get(t)?.has(n.selector)&&n.cache===xs.ONCE||n.getter(t),As.get(t)?.get(n.selector)}})}beforeDestroy(t,e){As.get(t)?.clear(),As.delete(t)}updated(t,e){this.cache!==xs.ONCE&&this.getter(t)}}const Is=Ns(Ps),Ds=Ns(class extends Ps{getter(t){let e=t.shadowRoot?.querySelectorAll(this.selector),s=As.get(t);s||(s=new Map,As.set(t,s)),s.set(this.selector,e)}});function Ls(t){if(1===arguments.length)return(e,s)=>{Os(e,s,t)};Os(arguments[0],arguments[1],{prop:""})}function Os(t,e,s){if(!wt.has(t.constructor)){const e={};let s=t.constructor;for(;(s=zt(s))!==Fe;)m(e,wt.get(s)??{});wt.set(t.constructor,e)}if(s.shallow=s.shallow||!1,b(wt.get(t.constructor),e,s),s.hasChanged){let r=It.get(t.constructor);r||(r=new Map,It.set(t.constructor,r)),r.set(e,s.hasChanged)}if(s.shallow){let s=At.get(t.constructor);s||(s=new Set,At.set(t.constructor,s)),s.add(e)}Reflect.defineProperty(t.constructor.prototype,e,{get(){return ee(e,this)},set(t){se(e,t,this)}})}function Vs(t,e,s){Os(t.prototype,e,s||{prop:""})}function Ws(t,e=!1){return s=>{s&&(e?customElements.define(t,s):(mt[s.name]=t,Et[t]=s))}}const Hs=Ns(class extends bs{static get priority(){return Number.MAX_VALUE}created(t,e,...s){let r=f(t,e);b(t,e,M(r,this.wait)),b(t,e+"_$__",r)}beforeDestroy(t,e){b(t,e,null),b(t,e+"_$__",null)}get targets(){return[ys.METHOD]}wait;constructor(t){super(),this.wait=t}});function Us(t,e){return(s,r)=>{let n=Rt.get(s.constructor),o=kt.get(s.constructor),i=Tt.get(s.constructor),l=Mt.get(s.constructor),c=Ct.get(s.constructor),u=xt.get(s.constructor);if(!c){c=[],Ct.set(s.constructor,c),l=[],Mt.set(s.constructor,l),i=new Map,Tt.set(s.constructor,i),n={},Rt.set(s.constructor,n),o={},kt.set(s.constructor,o),u={},xt.set(s.constructor,u);let t=zt(s.constructor);for(;t;)Ct.has(t)&&(c.push(...Ct.get(t)),l.push(...Mt.get(t)),Tt.get(t)?.forEach(((t,e)=>{i.set(e,t)})),a(n,Rt.get(t)),a(o,kt.get(t)),a(u,xt.get(t))),t=zt(t)}(h(t)?t:[t]).forEach((t=>{let a=s[r];f(e,"once",!1)&&i.set(t,!1);let h=f(e,"deep",!1);if(c.push(t),h?(n[t]=n[t]??new Set,n[t].add(a),l.push(t)):(o[t]=o[t]??new Set,o[t].add(a)),f(e,"immediate",!1)){let e=u[t];e||(e=u[t]=new Set),e.add(a)}}))}}const Bs=["key"],Fs=ze((function(t){return(t,[e],s,{renderComponent:r})=>{let n=t;if(s)v(e,((t,e)=>{n.setAttribute(e,t)}));else if(Yt(n)){let t={},s=yt.get(n.constructor);v(e,((e,r)=>{if(Bs.includes(r))return;let o=H(r);(s?s[o]:void 0)?t[r]=e:n.setAttribute(r,e+"")})),te(r,n,t)}else v(e,((t,e)=>{n.setAttribute(e,t)}))}}),[Ke.TAG]),Ks=new WeakMap,js=ze((function(t){return(t,[e],s,{renderComponent:n})=>{let o=[];if(h(e)?o=Q(e):l(e)?o=P(e,((t,e)=>t?e:[])):r(e)&&(o=e.split(" ")),o.length<1&&!s)return;let i=t;if(Ks.get(i)&&Ks.get(i).length===o.length&&ct(Ks.get(i),o))return;let a=Ks.get(i);v(a,(t=>{i.classList.remove(t)})),v(o,(t=>{i.classList.add(t)})),a=d(o),Ks.set(i,a)}}),[Ke.TAG]),$s=new WeakMap,Gs=new WeakMap,Xs=ze((function(t,e,s){return(t,r,o,{renderComponent:i,varChain:a,updatedMap:l})=>{let c=r[0];if(f(o,0),O(c)&&n(o))return[je.INIT];let u=0,h=Q(x(c,((t,s)=>e.call(i,t,s,u++)+"")));if(h.length!=new Set(h).size)return void Kt(`forEach - duplicate key in '${h}'`);let d,p=$s.get(t);if($s.set(t,h),o){if(O(h))return[je.REMOVE];if(A(h)===A(p)&&nt(h,p))return[je.REFRESH,zs(c,s,i)]}let g=r[2];if(Gs.has(t))d=Gs.get(t);else{let e=G(c)[0],s=c[e],r=g.call(i,s,e,0);d=new Ze(r,i),Gs.set(t,d)}return o?[je.UPDATE,d,h,p,g,c]:[je.INIT,s,d,c,e]}}),[Ke.TEXT,Ke.SLOT]);function zs(t,e,s){let r=[];return v(t,((t,n)=>{let o=fs(e.call(s,t,n));r.push(...o)})),r}let qs=document.createElement("template"),Qs=new WeakMap;const Zs=ze((function(t){return(t,e,s,{renderComponent:r})=>{if(!(s&&e[0]==s[0]||W(e[0])))if(ut(t))t.innerHTML=ps(e[0]);else{let r=Qs.get(t);r||(r=document.createTextNode(""),t.parentNode?.insertBefore(r,t),Qs.set(t,r)),qs.innerHTML=ps(e[0]),o(s)||Zt.remove(r,t),t.before(qs.content.cloneNode(!0))}}}),[Ke.TAG,Ke.TEXT,Ke.SLOT]),Js=new WeakMap,Ys=new WeakMap,tr=new WeakMap,er=ze((function(t,e,s){return(t,[e,s,r],n,{renderComponent:o})=>{let i;if(n){if(!!e==!!n[0]){let e=Js.get(t);return[je.REFRESH,e]}let a=e?s:r;return e?(i=Ys.get(t),i||(i=new Ze(a.call(o,e),o),Ys.set(t,i))):(i=tr.get(t),i||(i=new Ze(a.call(o,e),o),tr.set(t,i))),[je.REPLACE,a,i]}let a=e?s:r;return e?(i=Ys.get(t),i||(i=new Ze(a.call(o,e),o),Ys.set(t,i))):(i=tr.get(t),i||(i=new Ze(a.call(o,e),o),tr.set(t,i))),Js.set(t,a),[je.INIT,a,i]}}),[Ke.TEXT,Ke.SLOT]),sr=new WeakMap,rr=ze((function(t,e){return(t,[e,s],r,{renderComponent:n})=>{let o=sr.get(t);return e&&!sr.has(t)&&(o=new Ze(s.call(n),n),sr.set(t,o)),r?r[0]?e?[je.REFRESH,s]:[je.REMOVE]:e?[je.REPLACE,s,o]:[je.NONE]:[je.INIT,...e?[s,o]:[]]}}),[Ke.TEXT,Ke.SLOT]);var nr;!function(t){t.CHANGE="change",t.INPUT="input"}(nr||(nr={}));const or=ze((function(t,s="value",n){return(t,[s,n,o],i,{varChain:a,renderComponent:c})=>{n=n??"value";const u=t;if(i){const t=i[0],e=s;if(!l(e)&&Object.is(e,t))return;if(u instanceof Fe)u.updateProps({[n]:e});else if(u instanceof HTMLTextAreaElement||u instanceof HTMLSelectElement){if(u.setAttribute(n,e+""),u instanceof HTMLSelectElement){let t=N(u.querySelectorAll("option"),(t=>t.value==e));t&&(t.selected=!0)}}else if(u instanceof HTMLInputElement){if(u.value==e)return;switch(u.type){case"checkbox":case"radio":e?u.setAttribute("checked",""):u.removeAttribute("checked");break;case"text":case"email":case"number":case"password":case"search":case"tel":case"url":u.setAttribute(n,e+""),b(u,n,e);break;default:u.setAttribute(n,e+"")}}return}let h;h=r(o)?e(o)[0]:z(a);const d=rt(h,".")[0];let p=ne.get(c),g="";p&&(g=p[d]),d in c||!g||g in c||Kt(`model - property '${d}' is not defined on the instance of `+c.tagName);let _=c._eventBindList;if(l(s)||F(s)||(s=""),Et[u.tagName.toLowerCase()]){te(c,u,{[n]:s}),De(u,c,"update:"+n,(function(t){let e=this,s=(ne.get(e)??{})[d];!(d in e)&&s&&f(e.wrapperComponent,d)===f(e,s)&&(e=e.wrapperComponent||e),b(e,h,t.value)}))}else if(u instanceof HTMLTextAreaElement){u.setAttribute(n,s+"");let t="input";_.push([t,function(t){let e=t.target;b(this,h,e.value)},u])}else if(u instanceof HTMLInputElement){let t="",e="";switch(u.type){case"checkbox":case"radio":t="checked",e="change";break;default:t="value",e="input"}u.setAttribute(n??t,s+""),_.push([e,function(t){let e=t.target;b(this,h,e.value)},u])}else u instanceof HTMLSelectElement&&(u.setAttribute(n,s+""),_.push(["change",function(t){let e=t.target,s=this,r=(ne.get(s)??{})[d];!(d in s)&&r&&f(s.wrapperComponent,d)===f(s,r)&&(s=s.wrapperComponent||s),b(s,h,e.value)},u]))}}),[Ke.TAG]),ir=new WeakMap,ar=ze((function(t,e){return(t,[e,s],r)=>{if(r&&e===r[0])return;let n=t;if(!ir.has(n)){let t=n.style.display;ir.set(n,"none"==t?"unset":t)}n.style.display=e?ir.get(n):"none",s&&s(n,e)}}),[Ke.TAG]),lr=ze((function(t,e){return(t,[e,s],r,{renderComponent:n,slotComponent:o})=>{if(r)return;e=e.bind(n);let i=Ht.get(o);i||(i={},Ht.set(o,i)),i[s||"default"]=e}}),[Ke.SLOT]);class cr{static getCssText(t,e=!1){return r(t)?t:ht(x(t,((t,s)=>s.startsWith("--")?s+":"+t+(e?" !important":""):w(s)+":"+t+(e?" !important":""))),";")+";"}static setStyle(t,e){if(r(t)&&!F(t))return;let s=cr.getCssText(t);e.style.cssText=s}}const ur=ze((function(...t){return(t,e,s,{renderComponent:r})=>{let n=t,o=st(e,((t,e)=>t+cr.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(";")}}),[Ke.TAG]),hr=new WeakMap,dr=new WeakMap,pr=ze((function(t,e){return(t,[e,s],r,{renderComponent:n})=>{let o=()=>Es``,i=[],a=[];v(s,((t,e)=>{if(c(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=>c(t)?t(e):t==e)),u=hr.get(t);hr.set(t,l);let h=dr.get(t);if(h||(h=[],dr.set(t,h)),!h[l]){let t=new Ze((a[l]??o).call(n),n);h[l]=t}return r?u==l?[je.REFRESH,a[l]??o]:[je.REPLACE,a[l]??o,h[l]]:[je.INIT,a[l]??o,h[l]]}}),[Ke.TEXT,Ke.SLOT]);function fr(){v(Et,((t,e)=>{customElements.define(e,t)}))}export{Fe as CompElem,cr as CssHelper,bs as Decorator,ys as DecoratorType,Ss as DecoratorWrapper,je as DirectiveUpdateTag,Zt as DomUtil,Ke as EnterPointType,nr as ModelTriggerType,xs as QueryCache,Je as Template,_e as _getObservedAttrs,zt as _getSuper,Xt as _toUpdatePath,te as addUninitializedSubComponentProp,Fs as bind,js as classes,Ms as computed,ws as createRef,Cs as debounced,Ns as decorator,Ts as decoratorWithNoArgs,fr as defineComponents,ze as directive,qe as directiveScopeChecker,ks as event,Xs as forEach,Qt as getBooleanValue,Jt as getSlotComponent,Es as h,Zs as html,er as ifElse,rr as ifTrue,qt as isBooleanProp,Yt as isCompElemNode,Vs as makeState,or as model,Rs as onced,pe as prop,Is as query,Ds as queryAll,ar as show,Kt as showError,jt as showTagError,Gt as showTagWarn,$t as showWarn,lr as slot,Ls as state,ur as styles,Ws as tag,Hs as throttled,Ge as updateDirective,Us as watch,pr as when};
7
+ import t,{toPath as e,some as s,isString as r,isUndefined as n,isBlank as o,closest as i,assign as a,isObject as l,isFunction as c,isSymbol as u,isArray as h,concat as d,startsWith as p,get as f,toArray as g,defaults as _,merge as m,clone as E,each as w,kebabCase as v,has as y,set as S,includes as b,find as N,debounce as T,throttle as M,once as C,noop as k,remove as x,map as R,size as A,flatMap as P,test as I,first as D,walkTree as L,filter as O,isEmpty as V,isNil as W,camelCase as H,isNull as U,isDefined as B,trim as F,isBoolean as K,parseJSON as j,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=new Map,mt={},Et={},wt=new WeakMap,vt=new WeakMap,yt=new WeakMap,St=new WeakMap,bt=new Map,Nt=new Map,Tt=new WeakMap,Mt=new WeakMap,Ct=new WeakMap,kt=new WeakMap,xt=new WeakMap,Rt=new WeakMap,At=new WeakMap,Pt=new WeakMap,It=new WeakMap,Dt=new WeakMap,Lt=new WeakMap,Ot=new WeakMap,Vt=new WeakMap,Wt=new Map,Ht=new WeakMap,Ut=new WeakMap,Bt=new WeakMap,Ft=new WeakMap,Kt="__data_",jt="⟬Ċ⟭";function $t(t){console.error("[CompElem]",t)}function Gt(t,e){console.error(`[CompElem <${t}>]`,e)}function Xt(...t){console.warn("[CompElem]",...t)}function zt(t,e){console.warn(`[CompElem <${t}>]`,e)}function qt(t){return e(t).join("-")}function Qt(t){return Object.getPrototypeOf(t)}function Zt(t){return t===Boolean||s(t,(t=>t===Boolean))}function Jt(t){let e=t;return r(t)&&/(?:^true$)|(?:^false$)/.test(e)?e="true"===e:(n(e)||o(e))&&(e=!0),e}const Yt={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 $e&&s.destroy())}};function te(t,e){let s=i(t,(t=>t.host&&t.host instanceof $e),"parentNode");if(!s||s.host!==e)return s?s.host:void 0}function ee(t){return!!Et[t.tagName?.toLowerCase()]}function se(t,e,s){let r=Ut.get(t);r||(r=new Map,Ut.set(t,r));let n=r.get(e)??{};r.set(e,a(n,s))}function re(t,e){let s=e,r=Reflect.get(s[Kt],t);if(oe.__collecting&&oe.__varPathList.push(t),le.has(r)||ce.get(r)){let n=ue.get(r);n||(n=new Set,ue.set(r,n));let o=ie.get(e);o||(o={},ie.set(e,o));let i=le.get(r)??r;if(ce.get(i)?.deref()!==e){let e=ae.get(i);e&&(o[e[0]]=t)}return n.add(s.__thisRef),i}if(l(r)&&!c(r)&&!(r instanceof Node)&&!Object.isFrozen(r)){let e=At.get(s.constructor),n=e?.has(t);n||(e=Pt.get(s.constructor),n=e?.has(t)),r=n||"slots"===t?r:he(r,s,t)}return r}function ne(t,e,s){let r=s;if(!r.__inited)return void Reflect.set(r[Kt],t,e);let n=r[Kt][t],o=It.get(r.constructor),i=o?.get(t),a=le.get(n);if(i){if(!i.call(r,e,n,[t],e,n))return!0}else{if(Object.is(n,e))return!0;if(l(e)&&a===e)return!0}Reflect.set(r[Kt],t,e),de(s,e,n,[t])}const oe={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(oe.popVarPathList(),e),this.__collecting=!1},popVarPathList(){let t=Array.from(new Set(this.__varPathList));return this.__varPathList=[],t},__varPathList:[],__collecting:!1},ie=new WeakMap,ae=new WeakMap,le=new WeakMap,ce=new WeakMap,ue=new WeakMap;function he(t,e,r){if(le.has(t))return le.get(t);if(ce.has(t)){if(r){let r=ue.get(t);r||(r=new Set,ue.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(u(s))return n;if(c(n))return n;if("length"===s&&h(t))return n;if("__"===s.substring(0,2))return n;if(oe.__collecting){let t=ae.has(r)?d(ae.get(r)):[];t.push(s);let e=t.join(".");oe.__varPathList.push(e)}if(le.has(n))return le.get(n);let o=n;if(l(n)&&!c(n)&&!(n instanceof Node)&&!Object.isFrozen(n)){let t=ae.has(r)?d(ae.get(r)):[];o=he(n,e),t.push(s),ae.set(o,t),le.set(n,o)}return o},set(t,s,r,n){if(!s)return!1;let o=t[s],i=ae.get(n)??[],a=d(i,[s]),l=It.get(e.constructor),c=l?.get(a[0]),u=a.length>1,h=r,p=o;if(u&&(p=h=e._getPrivateData()[a[0]]),c){if(!c.call(e,h,p,a,r,o))return!0}else if(Object.is(o,r))return!0;let f=r,g=Reflect.set(t,s,f);de(e,f,o,a);let _=ue.get(n),m=[];return _?.forEach((t=>{let e=t.deref();if(!e)return;if(e.isDestroyed)return void m.push(t);let s=(ie.get(e)??{})[a[0]],r=a.join(".");r=r.replace(a[0],s),de(e,f,o,r.split("."),h,p)})),m.forEach((t=>{let e=t.deref();ie.delete(e),_.delete(t)})),g}});return ae.has(n)||ae.set(n,r?[r]:[]),le.set(t,n),r&&ce.set(n,new WeakRef(e)),n}function de(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=Qt(t.constructor),a=Ct.get(t.constructor)??Ct.get(i),l=Mt.get(t.constructor)??Mt.get(i),c=xt.get(t.constructor)??xt.get(i),u=kt.get(t.constructor)??kt.get(i),h=Tt.get(t.constructor)??Tt.get(i);a?.forEach((i=>{(r===i||p(i,r+".")&&!Object.is(f(t._getPrivateData(),i),f(e,i))||p(r,i+".")&&l?.includes(i)&&!Object.is(f(t._getPrivateData(),i),f(e,i)))&&d(g(u[i]),g(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=Dt.get(t.constructor);s?.has(e)&&s.get(e)?.forEach((e=>{t._computedUpdateSetInNextTick.add(e)}))}(t,i),function(t,e){let s=Lt.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 pe=new Map;class fe{static nextSet=new Set;static nextPending=!1;static next;static flush(){fe.nextPending=!1;let t=Array.from(fe.nextSet);fe.nextSet.clear(),pe.clear(),t.forEach((t=>t())),t=null}static pushNext(t){fe.nextSet.add(t),fe.nextPending||(fe.nextPending=!0,fe.next())}}function ge(t){if(1===arguments.length)return(e,s,r)=>{t.required=t.required||!1,t.attribute=!1!==t.attribute,_e(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=_(r,t),r=void 0),t.shallow=t.shallow||!1,_e(e,s,t)}function _e(t,e,s,r){let n;if(!yt.has(t.constructor)){const e={};let s=t.constructor;for(;(s=Qt(s))!==$e;)m(e,E(yt.get(s)??{}));n=new Set,w(e,((t,e)=>{if(t.attribute){let t=v(e);n?.add(t)}})),Nt.set(t.constructor,n),yt.set(t.constructor,e)}if(s.attribute){n||(n=Nt.get(t.constructor));let s=v(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=g(n)),S(yt.get(t.constructor),e,s),s.hasChanged){let r=It.get(t.constructor);r||(r=new Map,It.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 re(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=fe.flush;fe.next=()=>{t.then(e)}})();const me=new Set;function Ee(t){return Nt.get(t)??Nt.get(Qt(t))??me}const we=["resize","outside","mutate"],ve=new WeakMap,ye=[],Se=[],be=[],Ne=new WeakSet,Te=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(!Ne.has(e.target)){Ne.add(e.target);continue}let r=ve.get(e.target);r&&r({target:e.target,contentBoxSize:t,borderBoxSize:s,type:"resize"})}}));var Me;!function(t){t.Child="child",t.Tree="tree",t.Attr="attr",t.Char="char"}(Me||(Me={}));const Ce=new WeakMap,ke=new MutationObserver((t=>{for(let e=0;e<t.length;e++){const s=t[e];let r=Ce.get(s.target);if(!r)return;let n={target:s.target},o=null;switch(s.type){case"subtree":n.type=Me.Tree,o=r[Me.Tree];break;case"childList":n.type=Me.Child,n.addedNodes=s.addedNodes,n.removedNodes=s.removedNodes,o=r[Me.Child];break;case"attributes":n.type=Me.Attr,n.attributeName=s.attributeName,n.oldValue=s.oldValue,o=r[Me.Attr];break;case"characterData":n.type=Me.Char,n.oldValue=s.oldValue,o=r[Me.Char]}o&&(n.type="mutate",o(n))}}));function xe(e,s,r,n,o){if("resize"===e)return function(t,e){if(ve.has(t))return;ve.set(t,e),Te.observe(t);let s=Te;return(e=!1)=>{s.unobserve(t),ve.delete(t),e&&(s=t=null)}}(s,r);if("outside"===e)switch(n[0]){case"mousedown":return function(e,s){return ye.push([e,s]),(r=!1)=>{t.remove(ye,(t=>t[0]===e&&t[1]===s))}}(s,r);case"dblclick":return function(e,s){return be.push([e,s]),(r=!1)=>{t.remove(be,(t=>t[0]===e&&t[1]===s))}}(s,r);default:return function(e,s){return Se.push([e,s]),(r=!1)=>{t.remove(Se,(t=>t[0]===e&&t[1]===s))}}(s,r)}else if("mutate"===e)return function(t,e,s){let r=b(s,"child"),n=b(s,"attr"),o=b(s,"char"),i=b(s,"tree"),a=Ce.get(t);if(!a)return a={},Ce.set(t,a),r&&(a[Me.Child]=e),n&&(a[Me.Attr]=e),o&&(a[Me.Char]=e),i&&(a[Me.Tree]=e),ke.observe(t,{childList:r,attributes:n,characterData:o,subtree:i}),(e=!1)=>{Ce.delete(t),e&&(t=null)}}(s,r,n)}document.addEventListener("mousedown",(t=>{let e=f(t.composedPath(),0,t.target);ye.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=f(t.composedPath(),0,t.target);Se.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=f(t.composedPath(),0,t.target);be.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 Re=/,|^(debounce:.+)|(debounce$)/,Ae=/,|^(throttle:.+)|(throttle$)/,Pe="native",Ie={esc:"escape"},De=()=>{};function Le(t,e,s,r){let n,o=t.split("."),i=o.shift(),a=o.includes("once"),l=e??De;if(n=N(o,(t=>Re.test(t)))){let t=n.split(":");l=T(l,parseInt(t[1])||100)}if(n=N(o,(t=>Ae.test(t)))){let t=n.split(":");l=M(l,parseInt(t[1])||100)}if(a&&(l=C(l)),Et[s.tagName?.toLowerCase()]&&(s!==r||o.includes(Pe)||o.push(Pe),!o.includes(Pe)))return Oe(s,r,i,l),k;if(function(t){return we.includes(t)}(i))return xe(i,s,l,o);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(x(o,(t=>"ctrl"==t))[0]&&!t.ctrlKey)return;if(x(o,(t=>"alt"==t))[0]&&!t.altKey)return;if(x(o,(t=>"shift"==t))[0]&&!t.shiftKey)return;if(x(o,(t=>"meta"==t))[0]&&!t.metaKey)return;let e=R(o,(t=>Ie[t]||t));if(A(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 Oe(t,e,s,r){let n=f(t,"__c_emit_event_")??e._subComponentEventSn++;S(t,"__c_emit_event_",n);let o=e._subComponentEventMap.get(n);o||(o={},e._subComponentEventMap.set(n,o)),o[s]=r}class Ve{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 Ve&&(r=r.getCssText()),t=t+e+r}return this.cssText=t,t}}const We={boolean:Boolean,string:String,number:Number,object:Object,array:Array,function:Function,undefined:Object},He=new WeakMap;let Ue=[],Be=0;const Fe=new WeakMap,Ke={},je="slots";class $e extends HTMLElement{static defaults(t){Ue=P(t.css,(t=>{if(r(t)){let e=new CSSStyleSheet;return e.replaceSync(t),e}return t instanceof CSSStyleSheet?t:[]})),t.global,w(t,((t,e)=>{I(e[0],/[A-Z]/)}))}#t;#e={};__data_={};#s={};#r;__updateTree;_eventBindList;__docoEventMap;__updateSubViewDeps;_cssUpdateInNextTick=!1;_cssVarOldValueMap;__cssSheets;_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 Ke}get slotHooks(){return this.#u}get cssSheets(){return He.get(this.constructor)}get isMounted(){return this.#h}#n;#o;#i;#a;#l;#c;#d={};#u={};#p={};#h=!1;#f=!1;#g;static get css(){return[]}static get globalCss(){}static get hostCss(){}get cssVars(){return{}}__inited=!1;#_=!1;#m;__thisRef;constructor(...t){super(),this.#t=Be++,this.__updateTree=[],this.__thisRef=new WeakRef(this),this.#m=this.#E.bind(this),1===A(t)&&(this.#o={},a(this.#o,D(t))),Reflect.getOwnPropertyDescriptor(this.constructor.prototype,"slots")||Reflect.defineProperty(this.constructor.prototype,"slots",{get(){return re("slots",this)},set(t){ne("slots",t,this)}});let e=bt.get(this.constructor)??bt.get(Qt(this.constructor));e&&e.sort(((t,e)=>e.priority-t.priority)).forEach((t=>t.create(this))),this.#w=this.#v.bind(this)}insertStyleSheet(t){if(!this.#r)return null;let e;if(t instanceof Ve){let e=Vt.get(t.strings);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 this.#r.adoptedStyleSheets=[...this.#r.adoptedStyleSheets,e],e}get rootComponent(){let t=this;for(;t.parentComponent;)t=t.parentComponent;return t}#w;connectedCallback(){let t=i(this.parentNode,(t=>t instanceof $e||t.host instanceof $e),"parentNode");this.#l=t?t instanceof $e?new WeakRef(t):new WeakRef(t.host):void 0;let e=Ft.get(this);e&&(this.#c=new WeakRef(e),Ft.delete(this));let s=f(this.constructor,"hostCss");if(s){let t;if(s instanceof Ve){if(t=Vt.get(s.strings),!t){let e=s.getCssText();t=new CSSStyleSheet,t.replaceSync(e),Vt.set(s.strings,t)}}else t=s;let e=this.#c?.deref()?.shadowRoot??this.#l?.deref()?.shadowRoot??this.ownerDocument;this.#c&&!this.#c.deref()?.shadowRoot?.contains(this)&&(e=i(this,(t=>t instanceof HTMLDocument||t instanceof ShadowRoot),"parentNode")),e&&t&&!e.adoptedStyleSheets.includes(t)&&(e.adoptedStyleSheets=[...e.adoptedStyleSheets,t])}this.setup(),this.__bindEvents()}disconnectedCallback(){this.__unbindEvents()}__bindEvents(){let t=this._eventBindList;w(t,(t=>{let[e,s,r,n]=t;if(n)return;if(!r)return;let o=Le(e,s&&f(globalThis,s.name)!==s?s.bind(this):s,r,this);t[3]=o}));let e=_t.get(this.constructor);A(e)>0&&(this.__docoEventMap||(this.__docoEventMap=new Map),w(e,(({name:t,targetFn:e,fnName:s})=>{if(this.__docoEventMap.has(t+"@"+s))return;let r=e?e(this):this,n=f(this,s),o=Le(t,n&&f(globalThis,n.name)!==n?n.bind(this):n,r,this);this.__docoEventMap.set(t+"@"+s,o)})))}__unbindEvents(){w(this._eventBindList,(t=>{let[,,,e]=t;e&&e(),t[3]=null}));let t=[];w(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=bt.get(this.constructor)??bt.get(Qt(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,Ht.get(this)?.clear(),Ht.delete(this),this._watchUpdateArgsInNextTick?.clear(),this._watchUpdateSetInNextTick?.clear(),this._computedUpdateSetInNextTick?.clear(),this._computedUpdateSetInNextTick=null,this.__cssSheets=null,this.__updateSubViewDeps?.clear(),this.#l){let t=this.#l.deref();t&&L(t.__updateTree,(e=>{e.__destroyed||e.node?.deref()===this&&(e.destroy(t),x(e.parent?e.parent.children:t.__updateTree,(t=>t===e)))}))}w(this.__updateTree,(t=>t?.destroy(this))),w(this.#d,(t=>{Fe.delete(t),t.remove()})),w(this.#p,(t=>{w(t,(t=>t.remove()))})),w(this.__data_.slots,((t,e)=>{w(t,(t=>t.remove()))})),this.#S.clear(),this.#m=this.__thisRef=this.#p=this.#d=this.#S=this.#e=this.__data_.slots=null,this.remove(),this.#b=this.#i=this.#a=this.#r=this.#s=this.#n=this.#o=this.#i=this.#a=this.#u=this.#w=this.__data_=this.__updateTree=this.#l=this._asyncDirectives=this.#c=null,this.destroyed()}setup(){if(this.__inited)return;if(this.#_)return;this.#_=!0;let t=f(this.constructor,"globalCss");if(t){let e;if(t instanceof Ve){if(e=Vt.get(t.strings),!e){let s=t.getCssText();e=new CSSStyleSheet,e.replaceSync(s),Vt.set(t.strings,e)}}else e=t;document.adoptedStyleSheets=[...document.adoptedStyleSheets,e]}let e=He.get(this.constructor),s=e??[];e||(w(f(this.constructor,"css"),(t=>{if(t instanceof Ve){let e=Vt.get(t.strings);if(!e){let s=t.getCssText();e=new CSSStyleSheet,e.replaceSync(s),Vt.set(t.strings,e)}s.push(e)}else s.push(t)})),He.set(this.constructor,s));const r=this.#N();this.propsReady(r);for(const t in r){const e=r[t];this.__data_[t]=e}this.#T(),this.__data_.slots={},Reflect.defineProperty(this.__data_,"__isData",{enumerable:!1,value:!0});let n=Qt(this.constructor);if(Ct.get(this.constructor)??Ct.get(n)){this._watchUpdateSetInNextTick=new Set,this._watchUpdateArgsInNextTick=new Map;let t=Tt.get(this.constructor)??Tt.get(n),e=Rt.get(this.constructor)??Rt.get(n);w(e,((e,s)=>{let r=f(this,s);e.forEach((t=>{t.call(this,r,void 0,s)})),t.has(s)&&t.set(s,!0)}))}let i=a({},wt.get(this.constructor),wt.get(n));if(i){this._computedUpdateSetInNextTick=new Set;let t=Dt.get(this.constructor);t?w(i,((t,e)=>{this[Kt][e]=t.call(this)})):(t=new Map,Dt.set(this.constructor,t),w(i,((e,s)=>{S(e,"key",s),oe.start(),this[Kt][s]=e.call(this),oe.end(),oe.popVarPathList().forEach((s=>{let r=t.get(s);r||(r=new Set,t.set(s,r)),r.add(e)}))})))}oe.start();let l=this.render();oe.end();let c,u=oe.popVarPathList();this.constructor.prototype._viewDeps||(this.constructor.prototype._viewDeps=u),null===l?(this.#a=[],this.#i=void 0):(this.#r=this.attachShadow({mode:"open"}),this.#r.adoptedStyleSheets=[...Ue,...He.get(this.constructor)??[]],c=function(t,e){let s,r=[];fs.has(e.constructor)?(s=fs.get(e.constructor),r=ms(t)):(s=new ts(t,e,r),fs.set(e.constructor,s));let[n,o]=Es(e,s,r);return e.__updateTree=o,n}(l,this),c&&A(c.children)>0&&(this.#a=O(c.children,(t=>t.nodeType===Node.ELEMENT_NODE)).map((t=>new WeakRef(t))),this.#i=this.#a[0])),this.__inited=!0,this.#M();let h=Bt.get(this);h&&(this.#u=h,Bt.delete(this)),w(this.#u,((t,e)=>{this.#C(e)}));const d=this;let p=bt.get(this.constructor)??bt.get(Qt(this.constructor));p&&p.sort(((t,e)=>e.priority-t.priority)).forEach((t=>{t.beforeMount(this,((t,e)=>(d.__data_[t]=e,d.__data_[t])))})),this.beforeMount(),setTimeout((()=>{if(!this.isDestroyed){if(this.#h=!0,this.#r){oe.start();let t=this.cssVars;if(oe.end(),!V(t)){this._cssVarOldValueMap={};let e=Lt.get(this.constructor);e||(e=new Set(oe.popVarPathList()),Lt.set(this.constructor,e));let s="";w(t,((t,e)=>{let r="--"+v(e).replace(/^-+/,"");(o(t)||W(t))&&(t="initial"),this._cssVarOldValueMap[r]=t,s+=";"+r+":"+t})),this.style.cssText+=s}}c&&A(c.children)>0&&(this.#r.append(c),Ut.delete(this)),p&&p.forEach((t=>{t.mounted(this,((t,e)=>(d.__data_[t]=e,d.__data_[t])))})),this.#g&&this.#g.forEach((t=>fe.pushNext(t))),this.#f&&fe.pushNext(this.#w),this.__bindEvents(),this.mounted()}}),0)}propsReady(t){}render(){return null}beforeMount(){}mounted(){}#E(t){let e=t.currentTarget,s="";w(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=f(this.#e[e],"props");s&&w(this.slots,((t,e)=>{t.filter((t=>t.nodeType===Node.ELEMENT_NODE)).forEach((t=>{t instanceof $e?t.updateProps(s):w(s,((e,s)=>{if(t instanceof HTMLSlotElement){let r=Fe.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=yt.get(this.constructor)??yt.get(Qt(this.constructor));if(Zt(f(n,r).type)){let t=!U(s)&&Jt(s);if(f(this,r)===t)return}this.#x(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=f(this,o)??t,c=qt(o);this.#s[c]={value:l,chain:c===je?[je]:o,oldValue:e,end:o.length===s.length,subNewValue:r,subOldValue:n}}this.isMounted?fe.pushNext(this.#w):this.#f=!0}#v(){if(A(this.#s)<1)return;if(!this.isMounted)return;const t=this.#s;if(this.#s={},!this.shouldUpdate(t))return;let e=bt.get(this.constructor)??bt.get(Qt(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(w(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=f(t,"key"),s=this.__data_[e],r=t.call(this);(l(r)||r!==s)&&(this.__data_[e]=r,this._notify(r,s,[e]))})),this._computedUpdateSetInNextTick?.clear(),this._cssUpdateInNextTick){let t=this.cssVars;w(t,((t,e)=>{let s="--"+v(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&&vs(ms(this.render()),this,this.__updateTree,r,t),A(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 u,h=te(n,e);if(!s){let s=o(n,t.value[1],i,{renderComponent:e,slotComponent:h,varChain:l,updatedMap:r,pointType:f(Wt.get(a),[0],Ge.TEXT)});if(!s)return;if(s[0]!==Xe.REFRESH)return;u=c(s[1])?ms(s[1].call(e,t.value[1][0])):s[1]}if(!u)return;vs(u,e,t.children,void 0,r)}(e,this,void 0,t)}))),this.#S.forEach((t=>{this.#C(t)})),this.updated(t)}#N(){let t=yt.get(this.constructor)??yt.get(Qt(this.constructor)),e=this.attributes,s=this.tagName,r=m(this.#o??{},Ut.get(this.wrapperComponent)?.get(this)??{}),o={};w(e,(({name:e,value:s})=>{if(e[0]===ns||e[0]===os||e[0]===is||e===cs||"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 c=Object.keys(t),u=c.length;for(let o=0;o<u;o++){const a=c[o],u=v(a),d=this.hasAttribute(u);let p,g=t[a],_=y(r,a),m=f(this,a);if(!("_defaultValue"in g)&&(g._defaultValue=m,!g.type)){n(m)&&Gt(s,"Prop '"+a+"' has neither propType nor defaultValue be used for type inference");let t=typeof m;h(m)&&(t="array");let e=We[t];g.type=e}if(_)p=W(r[a])?m:r[a];else{p=m;let t=e.getNamedItem(u)||e.getNamedItem(os+u)||e.getNamedItem(u+os);t&&(_=!0,p=t.value)}if(g.required&&!_){Gt(s,"Prop '"+a+"' is required");break}p=this.#R(t,a,p,d),g.attribute&&B(p)&&!l(p)&&this.#A(g,a,p),this.__data_[a]=p,i[a]=p,delete this[a]}return i}#A(t,e,s){let r=v(e),n=F(s);Zt(t.type)?(n=Jt(s),K(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?Jt(t):n===Number?Number(t):n===String?String(t):n===Object||n===Array?j(t):n===Date?new Date(t):new n(t)}}catch(e){Gt(this.tagName,"Convert attribute error with "+t)}return s}#R(t,e,n,o){let i=t[e];if(!i)return n;let a=i.isValid,l=i.type,c=h(l)?l:[l],u=i.converter,d=n;if(!s(c,(t=>t===String))&&r(d)&&!U(d))try{d=u?u(d):this.#P(d,c)}catch(t){Gt(this.tagName,`Convert attribute '${e}' error with `+d)}for(let t=0;t<c.length;t++){"Boolean"===c[t].name&&o&&(d=Jt(d))}if(W(d))return d;let p=typeof d,f=!B(d);for(let t=0;t<c.length;t++){const e=c[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||Gt(this.tagName,`Invalid prop '${e}'. expected '${c.map((t=>t.name||t))}' but got '${p}'`),a&&(a.call(this,d,this.__data_)||Gt(this.tagName,`Invalid prop '${e}'. IsValid() check failed`)),d}#T(){let t=vt.get(this.constructor)??vt.get(Qt(this.constructor));t&&w(t,((e,s)=>{let r=t[s],n=f(this,s);if(r){let t=r.prop;n=t?$(this.__data_[t]):f(this,s)}this.__data_[s]=n,delete this[s]}))}#b=T(this.propsReady,100);updateProps(t,e=!1){let s=yt.get(this.constructor)??yt.get(Qt(this.constructor));if(!s)return;if(!this.__inited)return void a(this.#o,t);let r=[];w(t,((t,n)=>{let o=H(n),i=s[o];if(!i)return;t=this.#R(s,o,t);let a=this.__data_[o];if(!e){let e=It.get(this.constructor),s=e?.get(o);if(s){if(!s.call(this,t,a,[o],t,a))return!0}else if(l(t)){let e=Pt.get(this.constructor);if(e?.has(o)&&Object.is(a,t))return!0}else if(Object.is(a,t))return!0}i.attribute&&B(t)&&!l(t)&&r.push([i,o,t]),S(this.__data_,o,t),de(this,t,a,[o])})),a(this.#o,t),r.forEach((([t,e,s])=>{this.#A(t,e,s)})),this.#o&&this.#b(this.#o)}_initProps(t,e){this.#o=m(this.#o||{},t),this.#n=m(this.#n||{},e),w(t,((t,e)=>{if(l(t)){let s=ae.get(t);if(s){let t=this.wrapperComponent?vt.get(this.wrapperComponent?.constructor):null,r=s[0];if(t&&t[r]){let s=yt.get(this.constructor);S(s,[e,"shallow"],t[r].shallow)}}}}))}_bindSlot(t,e,s){this.#d[e]||(this.#d[e]=t,Fe.set(t,this));let r="slotchange",n=Le(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}}#S=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.#S.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={});w(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={};w(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,f(s,"props"));const r=this._asyncDirectives.get(e);let n=r?.buildView(e(f(s,"props"))),o=q(g(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.#S.clear()}}_asyncDirectives=new WeakMap;renderAsync(t,...e){}#x(t,e,s){if(!this.__inited)return;if(Ee(this.constructor).has(t)){let e=H(t);if(U(s)){let t=yt.get(this.constructor)??yt.get(Qt(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=f(this,"__c_emit_event_");this.wrapperComponent?._callEmitEvent(s,t,e)}}_callEmitEvent(t,e,s){let r=this._subComponentEventMap.get(t),n=f(r,e);c(n)&&n.call(this,s)}nextTick(t){if(!this.isMounted)return this.#g||(this.#g=[]),void this.#g.push(t);fe.pushNext(t)}forceUpdate(){w(this.__data_,((t,e)=>{this.#s[e]={value:void 0,chain:void 0}})),this.#v()}}var Ge,Xe,ze;function qe(t,e,s,r,n,o,i,a,l,c){let u,d=f(Wt.get(t),[0],"");if([Ge.TEXT,Ge.SLOT].includes(d)?(oe.start(),u=n(e,s,r,{renderComponent:o,slotComponent:i,varChain:a,updatedMap:c,pointType:d}),oe.end(o,l)):u=n(e,s,r,{renderComponent:o,slotComponent:i,varChain:a,updatedMap:c,pointType:d}),!u)return;let[_,m,E,v,y,b]=u;if(_===Xe.NONE)return;if(_===Xe.REFRESH)return;let N=b;h(b)||(N=R(b,((t,e)=>t)));let T=f(e,"__anchor__"),M={};w(G(e),(t=>{"__anchor__"!==t&&p(t,"__c-")&&(M[t]=f(e,[t]))}));let C=l.subViewRootNodes,k=l.children;if(_===Xe.REMOVE){let t=[];w(C,((e,s)=>{if(h(e))w(e,(t=>{let e=t.deref();e.remove(),e instanceof $e&&e.destroy()}));else{let s=e.deref();s.remove(),t.push(e),s instanceof $e&&s.destroy()}})),t.forEach((t=>{x(C,(e=>e===t))})),k?.forEach(((t,e)=>{t.destroy(o),k[e]=null})),l.children=Q(k),h(C)?l.subViewRootNodes=[]:l.subViewRootNodes={}}else if(_===Xe.REPLACE){w(C,(t=>{let e=t.deref();e.remove(),e instanceof $e&&e.destroy()})),k?.forEach(((t,e)=>{t.destroy(o),k[e]=null})),l.children=Q(k);let[,t,s]=u;ws(e,l,t,s,o)}else if(_===Xe.UPDATE){if(V(C))return void ws(e,l,y,m,o,b,((t,e,s)=>E[s]));let t={},s={};w(v,(s=>{let r=t[s];r||(r=t[s]=[]),O(e.parentElement.childNodes,(t=>f(t,["__c-"+T])==s)).forEach((t=>{r.push(t)}))})),l.children?.forEach((t=>{s[t.key]?s[t.key].push(t):s[t.key]=[t]}));let r,n=v,i=E,a=Z(v,E),u=J(v,a),h=[],d=[],p=!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]=[],h.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?ze.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){p=!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))}Qe(s,t,v)}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?d.push(e):Qe(e,t,v)}))}}}if(h.length>0&&(h.forEach((e=>{let s=tt(E,(t=>t==e.newKey)),r=N[s],n=ms(y.call(o,r,e.newKey,s)),[i,a]=Es(o,m,n);e.fragment=i,w(a,(t=>{t.key=e.newKey,l.children?.push(t)}));let c=g(i.childNodes),u=t[e.newKey];w(c,(t=>{u.push(t),i.childNodes.forEach((t=>S(t,"__c-"+T,e.newKey+""))),w(M,((e,s)=>S(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}(h),r.forEach(((s,r)=>{let n=s.fragment,o=t[s.refKey??v[0]],i=D(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)}))),w(d,(e=>{Qe(e,t,v)})),u.forEach((e=>{t[e].forEach((t=>{t.parentNode?.removeChild(t)})),s[e].forEach((t=>{t.destroy()}))})),p||u.length>0||r){const t=X(k,(t=>t.key));let e=[],s=0;i.forEach((r=>{t[r]&&t[r].forEach((t=>{t.varIndex=s++,e.push(t)}))})),J(k,e).forEach((t=>t.destroy(o))),l.children=e}let _={};if(w(N,((e,s)=>{let r=E[s],n=t[r];_[r]=n.map((t=>new WeakRef(t)))})),l.subViewRootNodes=_,a.length>0){let t=[];w(b,((e,s,r,n)=>{let i=e,a=ms(y.call(o,i,s,n));t.push(...a)})),vs(t,o,l.children,void 0,c)}}return!0}function Qe(t,e,s){t.forEach((({refKey:t,newKey:r})=>{let n=e[r];if(t===ze.AFTER_BEGIN){let t=e[s[0]];D(t).before(...n)}else if(e[t]){let s=e[t],r=z(s);r?.after(...n)}}))}function Ze(t,e){return Wt.set(t,e),(...e)=>[t(...e),e,t,oe.popDirectiveQ()]}function Je(t,e,s){Wt.get(t)}!function(t){t.ATTR="attr",t.PROP="prop",t.TEXT="text",t.SLOT="slot",t.TAG="tag"}(Ge||(Ge={})),function(t){t.NONE="NONE",t.REFRESH="REFRESH",t.REMOVE="REMOVE",t.REPLACE="REPLACE",t.UPDATE="UPDATE",t.INIT="INIT"}(Xe||(Xe={})),function(t){t.AFTER_BEGIN="afterbegin"}(ze||(ze={}));const Ye=new RegExp(`([a-z0-9"'${jt}])\\s*>\\s*<`,"img");class ts{updatePointMetas;fragment;"emptyEvent‌s";constructor(t,e,s){let[r,n]=this.parseTemplate(t);s&&a(s,n),this.updatePointMetas=[],this.emptyEvent‌s={},this.fragment=function(t,e,s,r,n){const i=document.createElement("template");i.innerHTML=e;const a=document.createNodeIterator(i.content,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT);let l,u,d=0,p=-1,f=-1;for(;l=a.nextNode();)if(p++,u&&!u.contains(l)&&(u=void 0,f=-1),l instanceof HTMLElement||l instanceof SVGElement){ee(l)&&(u=l,f=p);let e={},i=R(l.attributes,(t=>({name:t.name,value:t.value})));for(let a=0;a<i.length;a++){const g=i[a];let{name:_,value:m}=g;if(_!==ps)if(us.test(_)){let e=s[d];if(h(e)&&c(e[0])){let[,,s,n]=e;Je(s,Ge.TAG,r.tagName);let o=new rs(d);o.isDirective=!0,o.directiveType=Ge.TAG,o.nodeSn=p,o.directiveVarChain=n,u&&(o.slotNodeSn=f),t.push(o),d++}l.removeAttribute(_)}else if(_[0]!==ns)if(_!==cs)if(z(_)!==os){if(m.includes(jt)){let e=new rs(d);if(e.attrName=_.replace(/\.|\?|@/,""),e.nodeSn=p,u&&(e.slotNodeSn=f),_[0]===os||_[0]===is||_[0]===as){if(_[0]===is)e.isToggleProp=!0,e.attrName=_.substring(1);else if(_[0]===as){e.isRefAttr=!0;let t=_.substring(1);const[s,r]=t.split(ls);let n=s;switch(r){case"camel":n=H(n);break;case"kebab":n=v(n);break;case"snake":n=rt(n)}e.attrName=n}else{let t=Et[l.tagName.toLowerCase()];yt.get(t);{let t=H(_.substring(1));e.isProp=!0,e.attrName=t}}l.removeAttribute(_)}else e.attrTmpl=m;t.push(e),d++}}else{e[_.substring(0,_.length-1)]=m,l.removeAttribute(_);let t=new rs(d);t.attrName=_.substring(0,_.length-1),t.nodeSn=p,t.isPropPerfix=!0}else{if(us.test(m)){s[d];let e=new rs(d);e.isRef=!0,e.nodeSn=p,t.push(e),d++}l.removeAttribute(_)}else{let e=_.substring(1);if(us.test(m)){let r=new rs(d);r.isEvent=!0,r.attrName=e,r.nodeSn=p,t.push(r),s[d],d++}else if(o(m)){let t=n[p];t||(t=n[p]=[]),t.push(e)}l.removeAttribute(_)}}}else{let e=F(l.nodeValue).split(us);if(e.length<2)continue;w(nt(e.length-1),(n=>{let i=F(e[n]);if(!o(i)){let t=document.createTextNode(i);l.parentNode.insertBefore(t,l),p++}let a=document.createTextNode("");l.parentNode.insertBefore(a,l);let g=new rs(d);g.isText=!0,g.nodeSn=p,t.push(g);let _=s[d];if(h(_)&&c(_[0])){let t=u?Ge.SLOT:Ge.TEXT;g.isDirective=!0,g.directiveType=t,u&&(g.slotNodeSn=f);let[,,e]=_;Je(e,0,r.tagName),_=void 0}d++,p++})),p--;let n=F(z(e));if(o(n)){let t=l.previousSibling;l.parentNode.removeChild(l),l=t}else l.nodeValue=n,p++}return i.content}(this.updatePointMetas,r,n,e,this.emptyEvent‌s)}parseTemplate(t){let e="",s=d(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=f(s,o,"");if(a instanceof es){let[t,e]=this.parseTemplate(a);a=t,s.splice(o,1,...e),o+=e.length-1}else a=i>n?"":jt+o;o++,e=e+r+a}return e=e.replace(Ye,"$1><").trim(),e=_s(e),[e,s]}}class es{strings;vars;constructor(t,e){this.strings=d(t),this.vars=e}getKey(){let t=this.vars,e="";return w(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 es){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=d(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 ts(this,t,e),[r,n]=Es(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 ss{metaInfo;key;varIndex;value;node;subViewRootNodes;__destroyed=!1;children;parent;constructor(t){this.varIndex=t}static createFrom(t){let e=new ss(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 $e&&e.destroy(),t&&Yt.clear(e.deref(),t),e.deref()?.remove()}insert(t){t.parent=this,this.children||(this.children=[]),this.children.push(t)}}class rs{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 ns="@",os=".",is="?",as="*",ls=":",cs="ref",us=new RegExp(`${jt}\\d+`),hs=/(<\/?)\s*([A-Z][A-Za-z0-9]*)([\s>])/gm,ds=/\s+([\.?@*])?((?:[a-zA-Z]*[A-Z][^\s<>="']+))(?=[\s=>])/gm,ps="slot-props",fs=new Map;let gs=0;function _s(t){return r(t)?t=(t=t.replace(ds,((t,e,s)=>` ${e??""}${v(s)}`))).replace(hs,((t,e,s,r)=>e+mt[s]+r)):t+""}function ms(t){let e=d(t.vars),s=t.strings.length-1;for(let r=0;r<=s;r++){let s=f(t.vars,r,"");if(s instanceof es){let t=ms(s);e.splice(r,1,...t)}}return e}function Es(t,e,s){const{fragment:r,updatePointMetas:n,"emptyEvent‌s":o}=e;let i,a=r.cloneNode(!0),l=[],c=[],u=[],h=t._eventBindList;h||(h=t._eventBindList=[]);const d=document.createNodeIterator(a,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT);let p={},f={};n.forEach(((t,e)=>{p[t.nodeSn]||(p[t.nodeSn]=[]),p[t.nodeSn].push(t),t.slotNodeSn>-1&&(f[t.slotNodeSn]=null)}));let g=-1,_=0;for(;i=d.nextNode();){g++,null===f[g]&&(f[g]=i);let e=o[g];e&&e.forEach((t=>{h.push([t,k,i])}));let r={};const n=p[g];n&&n.forEach((t=>{let e=s[_++],n=ss.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)&&A(t.directiveVarChain)>0&&(o=t.directiveVarChain),u.push([i,a,s,r,n,o,t.directiveType])}else i.setAttribute(t.attrName,t.attrTmpl.replace(us,e));l.push(n)})),i instanceof HTMLSlotElement?t._bindSlot(i,i.name||"default",r):i instanceof HTMLElement&&ee(i)&&(Ft.set(i,t),se(t,i,r))}return c.forEach((([e,s,r,n,o,i,a])=>{S(e,"__anchor__",gs++),oe.start();let l=n(e,o,void 0,{renderComponent:t,slotComponent:r,varChain:i,attrName:s,pointType:a.directiveType});if(oe.end(t,a),l&&l.length>1){let[,s,r,n,o]=l;ws(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 ws(t,e,s,r,n,o,i){let a=[],l=i?{}:void 0;o=o??[0];let c=document.createDocumentFragment(),u=f(t,"__anchor__");w(o,((t,o,h,d)=>{oe.start();let p=ms(s.call(n,t,o,d));oe.end(n);let[f,_]=Es(n,r,p),m=g(f.childNodes).map((t=>new WeakRef(t)));if(i){let e=i.call(n,t,o,d)+"";m.forEach((t=>{let s=t.deref();S(s,"__c-"+u,e)})),l[e]=m,_.forEach((t=>{t.key=e})),a.push(..._),c.append(f)}else c=f,e.subViewRootNodes=m,_.forEach((t=>{e.insert(t)}))})),l&&(e.subViewRootNodes=l,a.forEach(((t,s)=>{t.varIndex=s,e.insert(t)}))),c.childNodes.length>0&&(n.__bindEvents(),t.parentNode.insertBefore(c,t))}function vs(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 u=i.value,d=t,p=i.node.deref();if(!p)continue;let g=ot(a,"-");for(let t=0;t<g.length;t++){const e=g[t];d=f(d,e),d&&d.vars&&o<g.length-1&&(d=d.vars)}if(!l(u)&&u===d)continue;let _=p;if(c.isDirective){let[t,s,o,a]=i.value;if(!h(d))continue;let l=te(p,e),[,c]=d;qe(o,p,c,s,t,e,l,a,i,n)&&r?.delete(i)}else if(c.isToggleProp){if(!!d===u)continue;_.toggleAttribute(c.attrName,!!d),_ instanceof $e&&_.updateProps({[c.attrName]:!!d})}else if(c.isProp){if(!l(d)&&d===u)continue;p instanceof $e?p.updateProps({[c.attrName]:d}):p instanceof HTMLSlotElement&&e._updateSlot(p.getAttribute("name")||"default",c.attrName,d)}else if(c.attrName){if(!it(u,d))switch(c.attrName){case"value":if(p instanceof HTMLInputElement){p.value=d;break}default:p.setAttribute(c.attrName,at(c.attrTmpl,us,d+""))}}else if(c.isText){let t=i.node,e=et(d??"");e!==t.deref().textContent&&(t.deref().textContent=e)}i.value=d}}function ys(t,...e){return new es(r(t)?[t]:t,e)}function Ss(t,...e){if(Ot.has(t))return Ot.get(t);let s=new Ve(t,e);return Ot.set(t,s),s}class bs{__ref;get current(){return this.__ref?.deref()}__setRef(t){this.__ref=t}}function Ns(){return new bs}var Ts;!function(t){t.CLASS="class",t.FIELD="field",t.METHOD="method"}(Ts||(Ts={}));class Ms{static get priority(){return 0}created(t,...e){}beforeMount(t,e,...s){}mounted(t,e,...s){}updated(t,e){}beforeDestroy(t,...e){}}class Cs{metadata;decorator;key;priority=0;constructor(t,e,s){this.metadata=e,this.decorator=new s(...t),this.priority=f(s,"priority",0)}dispose(){this.metadata=null,this.decorator=null}create(t){let e,s=this.decorator.targets,r=this.metadata[1];l(r)&&B(f(r,"configurable"))?e=Ts.METHOD:n(this.metadata[1])&&(e=Ts.FIELD),!V(s)&&e&&s.includes(e)?this.decorator.created(t,...this.metadata):$t(`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 ks(t){return(...e)=>(...s)=>{let r=s[0].constructor,n=bt.get(r);if(!bt.has(r)){let t=Object.getPrototypeOf(r);n=t?d(bt.get(t)??[]):[],bt.set(r,n)}let o=new Cs(e,s.splice(1),t);return n?.push(o),o}}function xs(t){return(...e)=>{if(!e||e.length<1)return;let s=e[0].constructor,r=bt.get(s);if(!bt.has(s)){let t=Object.getPrototypeOf(s);r=t?d(bt.get(t)??[]):[],bt.set(s,r)}let n=new Cs([],e.splice(1),t);return r?.push(n),n}}function Rs(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 oe.__collecting&&oe.__varPathList.push(e),Reflect.get(this[Kt],e)}}),Reflect.getOwnPropertyDescriptor(t,e)}const As=ks(class extends Ms{static get priority(){return Number.MAX_VALUE}created(t,e,...s){let r=f(t,e);S(t,e,T(r,this.wait,this.immediate)),S(t,e+"_$__",r)}beforeDestroy(t,e){S(t,e,null),S(t,e+"_$__",null)}get targets(){return[Ts.METHOD]}wait;immediate;constructor(t,e=!1){super(),this.wait=t,this.immediate=e}});function Ps(t,e){return(s,r,n)=>{if(!_t.has(s.constructor)){let t=[],e=s.constructor;for(;(e=Qt(e))!==$e;)t=d(t,_t.get(e)??[]);_t.set(s.constructor,t)}_t.get(s.constructor)?.push({name:t,targetFn:e,fnName:r})}}const Is=ks(class extends Ms{static get priority(){return Number.MAX_VALUE}created(t,e,s,...r){let n=lt(f(t,s),t);S(t,s,C(n)),S(t,s+"_$__",n)}beforeDestroy(t,e){S(t,e,null),S(t,e+"_$__",null)}get targets(){return[Ts.METHOD]}});var Ds;!function(t){t.ONCE="once"}(Ds||(Ds={}));const Ls=new WeakMap;class Os extends Ms{static get priority(){return Number.MAX_VALUE}get targets(){return[Ts.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=Ls.get(t);s||(s=new Map,Ls.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 Ls.has(t)&&Ls.get(t)?.has(n.selector)&&n.cache===Ds.ONCE||n.getter(t),Ls.get(t)?.get(n.selector)}})}beforeDestroy(t,e){Ls.get(t)?.clear(),Ls.delete(t)}updated(t,e){this.cache!==Ds.ONCE&&this.getter(t)}}const Vs=ks(Os),Ws=ks(class extends Os{getter(t){let e=t.shadowRoot?.querySelectorAll(this.selector),s=Ls.get(t);s||(s=new Map,Ls.set(t,s)),s.set(this.selector,e)}});function Hs(t){if(1===arguments.length)return(e,s)=>{Us(e,s,t)};Us(arguments[0],arguments[1],{prop:""})}function Us(t,e,s){if(!vt.has(t.constructor)){const e={};let s=t.constructor;for(;(s=Qt(s))!==$e;)m(e,vt.get(s)??{});vt.set(t.constructor,e)}if(s.shallow=s.shallow||!1,S(vt.get(t.constructor),e,s),s.hasChanged){let r=It.get(t.constructor);r||(r=new Map,It.set(t.constructor,r)),r.set(e,s.hasChanged)}if(s.shallow){let s=At.get(t.constructor);s||(s=new Set,At.set(t.constructor,s)),s.add(e)}Reflect.defineProperty(t.constructor.prototype,e,{get(){return re(e,this)},set(t){ne(e,t,this)}})}function Bs(t,e,s){Us(t.prototype,e,s||{prop:""})}function Fs(t,e=!1){return s=>{s&&(e?customElements.define(t,s):(mt[s.name]=t,Et[t]=s))}}const Ks=ks(class extends Ms{static get priority(){return Number.MAX_VALUE}created(t,e,...s){let r=f(t,e);S(t,e,M(r,this.wait)),S(t,e+"_$__",r)}beforeDestroy(t,e){S(t,e,null),S(t,e+"_$__",null)}get targets(){return[Ts.METHOD]}wait;constructor(t){super(),this.wait=t}});function js(t,e){return(s,r)=>{let n=xt.get(s.constructor),o=kt.get(s.constructor),i=Tt.get(s.constructor),l=Mt.get(s.constructor),c=Ct.get(s.constructor),u=Rt.get(s.constructor);if(!c){c=[],Ct.set(s.constructor,c),l=[],Mt.set(s.constructor,l),i=new Map,Tt.set(s.constructor,i),n={},xt.set(s.constructor,n),o={},kt.set(s.constructor,o),u={},Rt.set(s.constructor,u);let t=Qt(s.constructor);for(;t;)Ct.has(t)&&(c.push(...Ct.get(t)),l.push(...Mt.get(t)),Tt.get(t)?.forEach(((t,e)=>{i.set(e,t)})),a(n,xt.get(t)),a(o,kt.get(t)),a(u,Rt.get(t))),t=Qt(t)}(h(t)?t:[t]).forEach((t=>{let a=s[r];f(e,"once",!1)&&i.set(t,!1);let h=f(e,"deep",!1);if(c.push(t),h?(n[t]=n[t]??new Set,n[t].add(a),l.push(t)):(o[t]=o[t]??new Set,o[t].add(a)),f(e,"immediate",!1)){let e=u[t];e||(e=u[t]=new Set),e.add(a)}}))}}const $s=["key"],Gs=Ze((function(t){return(t,[e],s,{renderComponent:r})=>{let n=t;if(s)w(e,((t,e)=>{n.setAttribute(e,t)}));else if(ee(n)){let t={},s=yt.get(n.constructor);w(e,((e,r)=>{if($s.includes(r))return;let o=H(r);(s?s[o]:void 0)?t[r]=e:n.setAttribute(r,e+"")})),se(r,n,t)}else w(e,((t,e)=>{n.setAttribute(e,t)}))}}),[Ge.TAG]),Xs=new WeakMap,zs=Ze((function(t){return(t,[e],s,{renderComponent:n})=>{let o=[];if(h(e)?o=Q(e):l(e)?o=P(e,((t,e)=>t?e:[])):r(e)&&(o=e.split(" ")),o.length<1&&!s)return;let i=t;if(Xs.get(i)&&Xs.get(i).length===o.length&&ct(Xs.get(i),o))return;let a=Xs.get(i);w(a,(t=>{i.classList.remove(t)})),w(o,(t=>{i.classList.add(t)})),a=d(o),Xs.set(i,a)}}),[Ge.TAG]),qs=new WeakMap,Qs=new WeakMap,Zs=Ze((function(t,e,s){return(t,r,o,{renderComponent:i,varChain:a,updatedMap:l})=>{let c=r[0];if(f(o,0),V(c)&&n(o))return[Xe.INIT];let u=0,h=Q(R(c,((t,s)=>e.call(i,t,s,u++)+"")));if(h.length!=new Set(h).size)return void $t(`forEach - duplicate key in '${h}'`);let d,p=qs.get(t);if(qs.set(t,h),o){if(V(h))return[Xe.REMOVE];if(A(h)===A(p)&&it(h,p))return[Xe.REFRESH,Js(c,s,i)]}let g=r[2];if(Qs.has(t))d=Qs.get(t);else{let e=G(c)[0],s=c[e],r=g.call(i,s,e,0);d=new ts(r,i),Qs.set(t,d)}return o?[Xe.UPDATE,d,h,p,g,c]:[Xe.INIT,s,d,c,e]}}),[Ge.TEXT,Ge.SLOT]);function Js(t,e,s){let r=[];return w(t,((t,n)=>{let o=ms(e.call(s,t,n));r.push(...o)})),r}let Ys=document.createElement("template"),tr=new WeakMap;const er=Ze((function(t){return(t,e,s,{renderComponent:r})=>{if(!(s&&e[0]==s[0]||W(e[0])))if(ut(t))t.innerHTML=_s(e[0]);else{let r=tr.get(t);r||(r=document.createTextNode(""),t.parentNode?.insertBefore(r,t),tr.set(t,r)),Ys.innerHTML=_s(e[0]),o(s)||Yt.remove(r,t),t.before(Ys.content.cloneNode(!0))}}}),[Ge.TAG,Ge.TEXT,Ge.SLOT]),sr=new WeakMap,rr=new WeakMap,nr=new WeakMap,or=Ze((function(t,e,s){return(t,[e,s,r],n,{renderComponent:o})=>{let i;if(n){if(!!e==!!n[0]){let e=sr.get(t);return[Xe.REFRESH,e]}let a=e?s:r;return e?(i=rr.get(t),i||(i=new ts(a.call(o,e),o),rr.set(t,i))):(i=nr.get(t),i||(i=new ts(a.call(o,e),o),nr.set(t,i))),[Xe.REPLACE,a,i]}let a=e?s:r;return e?(i=rr.get(t),i||(i=new ts(a.call(o,e),o),rr.set(t,i))):(i=nr.get(t),i||(i=new ts(a.call(o,e),o),nr.set(t,i))),sr.set(t,a),[Xe.INIT,a,i]}}),[Ge.TEXT,Ge.SLOT]),ir=new WeakMap,ar=Ze((function(t,e){return(t,[e,s],r,{renderComponent:n})=>{let o=ir.get(t);return e&&!ir.has(t)&&(o=new ts(s.call(n),n),ir.set(t,o)),r?r[0]?e?[Xe.REFRESH,s]:[Xe.REMOVE]:e?[Xe.REPLACE,s,o]:[Xe.NONE]:[Xe.INIT,...e?[s,o]:[]]}}),[Ge.TEXT,Ge.SLOT]);var lr;!function(t){t.CHANGE="change",t.INPUT="input"}(lr||(lr={}));const cr=Ze((function(t,s="value",n){return(t,[s,n,o],i,{varChain:a,renderComponent:c})=>{n=n??"value";const u=t;if(i){const t=i[0],e=s;if(!l(e)&&Object.is(e,t))return;if(u instanceof $e)u.updateProps({[n]:e});else if(u instanceof HTMLTextAreaElement||u instanceof HTMLSelectElement){if(u.setAttribute(n,e+""),u instanceof HTMLSelectElement){let t=N(u.querySelectorAll("option"),(t=>t.value==e));t&&(t.selected=!0)}}else if(u instanceof HTMLInputElement){if(u.value==e)return;switch(u.type){case"checkbox":case"radio":e?u.setAttribute("checked",""):u.removeAttribute("checked");break;case"text":case"email":case"number":case"password":case"search":case"tel":case"url":u.setAttribute(n,e+""),S(u,n,e);break;default:u.setAttribute(n,e+"")}}return}let h;h=r(o)?e(o)[0]:z(a);const d=ot(h,".")[0];let p=ie.get(c),g="";p&&(g=p[d]),d in c||!g||g in c||$t(`model - property '${d}' is not defined on the instance of `+c.tagName);let _=c._eventBindList;if(l(s)||F(s)||(s=""),Et[u.tagName.toLowerCase()]){se(c,u,{[n]:s}),Oe(u,c,"update:"+n,(function(t){let e=this,s=(ie.get(e)??{})[d];!(d in e)&&s&&f(e.wrapperComponent,d)===f(e,s)&&(e=e.wrapperComponent||e),S(e,h,t.value)}))}else if(u instanceof HTMLTextAreaElement){u.setAttribute(n,s+"");let t="input";_.push([t,function(t){let e=t.target;S(this,h,e.value)},u])}else if(u instanceof HTMLInputElement){let t="",e="";switch(u.type){case"checkbox":case"radio":t="checked",e="change";break;default:t="value",e="input"}u.setAttribute(n??t,s+""),_.push([e,function(t){let e=t.target;S(this,h,e.value)},u])}else u instanceof HTMLSelectElement&&(u.setAttribute(n,s+""),_.push(["change",function(t){let e=t.target,s=this,r=(ie.get(s)??{})[d];!(d in s)&&r&&f(s.wrapperComponent,d)===f(s,r)&&(s=s.wrapperComponent||s),S(s,h,e.value)},u]))}}),[Ge.TAG]),ur=new WeakMap,hr=Ze((function(t,e){return(t,[e,s],r)=>{if(r&&e===r[0])return;let n=t;if(!ur.has(n)){let t=n.style.display;ur.set(n,"none"==t?"unset":t)}n.style.display=e?ur.get(n):"none",s&&s(n,e)}}),[Ge.TAG]),dr=Ze((function(t,e){return(t,[e,s],r,{renderComponent:n,slotComponent:o})=>{if(r)return;e=e.bind(n);let i=Bt.get(o);i||(i={},Bt.set(o,i)),i[s||"default"]=e}}),[Ge.SLOT]);class pr{static getCssText(t,e=!1){return r(t)?t:ht(R(t,((t,s)=>s.startsWith("--")?s+":"+t+(e?" !important":""):v(s)+":"+t+(e?" !important":""))),";")+";"}static setStyle(t,e){if(r(t)&&!F(t))return;let s=pr.getCssText(t);e.style.cssText=s}}const fr=Ze((function(...t){return(t,e,s,{renderComponent:r})=>{let n=t,o=st(e,((t,e)=>t+pr.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(";")}}),[Ge.TAG]),gr=new WeakMap,_r=new WeakMap,mr=Ze((function(t,e){return(t,[e,s],r,{renderComponent:n})=>{let o=()=>ys``,i=[],a=[];w(s,((t,e)=>{if(c(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=>c(t)?t(e):t==e)),u=gr.get(t);gr.set(t,l);let h=_r.get(t);if(h||(h=[],_r.set(t,h)),!h[l]){let t=new ts((a[l]??o).call(n),n);h[l]=t}return r?u==l?[Xe.REFRESH,a[l]??o]:[Xe.REPLACE,a[l]??o,h[l]]:[Xe.INIT,a[l]??o,h[l]]}}),[Ge.TEXT,Ge.SLOT]);function Er(){w(Et,((t,e)=>{customElements.define(e,t)}))}export{$e as CompElem,pr as CssHelper,Ms as Decorator,Ts as DecoratorType,Cs as DecoratorWrapper,Xe as DirectiveUpdateTag,Yt as DomUtil,Ge as EnterPointType,lr as ModelTriggerType,Ds as QueryCache,es as Template,Ee as _getObservedAttrs,Qt as _getSuper,qt as _toUpdatePath,se as addUninitializedSubComponentProp,Gs as bind,zs as classes,Rs as computed,Ns as createRef,Ss as css,As as debounced,ks as decorator,xs as decoratorWithNoArgs,Er as defineComponents,Ze as directive,Je as directiveScopeChecker,Ps as event,Zs as forEach,Jt as getBooleanValue,te as getSlotComponent,ys as h,er as html,or as ifElse,ar as ifTrue,Zt as isBooleanProp,ee as isCompElemNode,Bs as makeState,cr as model,Is as onced,ge as prop,Vs as query,Ws as queryAll,hr as show,$t as showError,Gt as showTagError,zt as showTagWarn,Xt as showWarn,dr as slot,Hs as state,fr as styles,Fs as tag,Ks as throttled,qe as updateDirective,js as watch,mr as when};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "compelem",
3
- "version": "0.25.3",
3
+ "version": "0.26.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",
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Css模板
3
+ * @author holyhigh2
4
+ */
5
+ export declare class CssTemplate {
6
+ strings: TemplateStringsArray;
7
+ vars: Array<any>;
8
+ cssText: string | undefined;
9
+ constructor(strings: TemplateStringsArray, vars: Array<any>);
10
+ getCssText(): string;
11
+ }
@@ -1,5 +1,6 @@
1
1
  import { CompElem } from "../CompElem";
2
2
  import { KeyFn, TplFn, UpdatedSource } from "../types";
3
+ import { CssTemplate } from "./CssTemplate";
3
4
  import { Template } from "./Template";
4
5
  import { TemplateMeta } from "./TemplateMeta";
5
6
  import { UpdatePoint } from "./UpdatePoint";
@@ -32,6 +33,12 @@ export declare function updateSubScopeView(subScopeUpdatePoint: UpdatePoint, ren
32
33
  * @param vars
33
34
  */
34
35
  export declare function h(strings: TemplateStringsArray, ...vars: any): Template;
36
+ /**
37
+ * CSS模板函数,用于构建模板
38
+ * @param strings
39
+ * @param vars
40
+ */
41
+ export declare function css(strings: TemplateStringsArray, ...vars: any): CssTemplate;
35
42
  declare class RefObject<T extends Node> {
36
43
  __ref: WeakRef<T> | undefined;
37
44
  get current(): T | undefined;