compelem 0.26.3 → 0.26.4

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.
Files changed (2) hide show
  1. package/index.js +2 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
- * compelem v0.26.3.1786624146
2
+ * compelem v0.26.4.1786705689
3
3
  * A modern, reactive, fast, lightweight and flexible lib for building web components
4
4
  * @holyhigh2
5
5
  * git+https://github.com/holyhigh2/compelem.git
6
6
  */
7
- import t,{toPath as e,some as s,isString as r,isUndefined as n,isBlank as o,closest as i,assign as a,isArray as l,each as c,isObject as u,isFunction as h,isSymbol as d,concat as p,startsWith as f,get as g,toArray as _,defaults as m,merge as E,clone as v,kebabCase as w,has as y,set as b,remove as S,size as N,includes as T,find as M,debounce as C,throttle as k,once as R,noop as x,map as A,flatMap as P,test as I,first as L,walkTree as O,filter as D,isEmpty as V,isNil as W,camelCase as H,isNull as B,isDefined as U,trim as j,isBoolean as F,parseJSON as K,cloneDeep as $,keys as G,groupBy as X,last as z,reject as q,compact as Q,intersect as Z,except as J,initial as Y,findIndex as tt,toString as et,reduce as st,snakeCase as rt,range as nt,split as ot,isEqual as it,replace as at,bind as lt,isMatch as ct,isElement as ut,join as ht}from"myfx";const dt="default",pt=/\s+\.?key\s*=/;var ft,gt;!function(t){t[t.RENDER=1]="RENDER",t[t.COMPUTED=2]="COMPUTED",t[t.DIRECTIVE=3]="DIRECTIVE"}(ft||(ft={})),function(t){t.Prod="prod",t.Dev="dev"}(gt||(gt={}));const _t={boolean:Boolean,string:String,number:Number,object:Object,array:Array,function:Function,undefined:Object},mt=new Map,Et={},vt={},wt=new WeakMap,yt=new WeakMap,bt=new WeakMap,St=new WeakMap,Nt=new Map,Tt=new Map,Mt=new WeakMap,Ct=new WeakMap,kt=new WeakMap,Rt=new WeakMap,xt=new WeakMap,At=new WeakMap,Pt=new WeakMap,It=new WeakMap,Lt=new WeakMap,Ot=new WeakMap,Dt=new WeakMap,Vt=new WeakMap,Wt=new WeakMap,Ht=new WeakMap,Bt=new Map,Ut=new WeakMap,jt=new WeakMap,Ft=new WeakMap,Kt=new WeakMap,$t="__data_",Gt="⟬Ċ⟭";class Xt{strings;vars;cssText;constructor(t,e){this.strings=t,this.vars=e}getCssText(){if(this.cssText)return this.cssText;let t="",e=this.strings.length-1;for(let s=0;s<=e;s++){const e=this.strings[s];let r=this.vars[s]??"";r instanceof Xt&&(r=r.getCssText()),t=t+e+r}return this.cssText=t,t}}function zt(t){console.error("[CompElem]",t)}function qt(t,e){console.error(`[CompElem <${t}>]`,e)}function Qt(...t){console.warn("[CompElem]",...t)}function Zt(t,e){console.warn(`[CompElem <${t}>]`,e)}function Jt(t){return e(t).join("-")}function Yt(t){return Object.getPrototypeOf(t)}function te(t){return t===Boolean||s(t,(t=>t===Boolean))}function ee(t){let e=t;return r(t)&&/(?:^true$)|(?:^false$)/.test(e)?e="true"===e:(n(e)||o(e))&&(e=!0),e}const se={getNodes(t,e){let s=t.nextSibling;if(!e)return[s];let r=[];for(;s&&s!==e;)r.push(s),s=s?.nextSibling;return r},insertBefore:function(t,e){if(!t.parentNode)return;let s=document.createDocumentFragment();s.append(...e),t.parentNode.insertBefore(s,t)},remove:function(t,e){if(t===e)return void t?.parentNode?.removeChild(t);let s=t.nextSibling;for(;s&&s!==e;)s?.parentNode?.removeChild(s),s=t.nextSibling},clear(t,e){if(!t)return;let s,r=document.createNodeIterator(t,NodeFilter.SHOW_COMMENT);for(r=document.createNodeIterator(t,NodeFilter.SHOW_COMMENT|NodeFilter.SHOW_ELEMENT);s=r.nextNode();)t!==s&&(s instanceof Comment||s instanceof Xe&&s.destroy())}};function re(t,e){let s=i(t,(t=>t.host&&t.host instanceof Xe),"parentNode");if(!s||s.host!==e)return s?s.host:void 0}function ne(t){return!!vt[t.tagName?.toLowerCase()]}function oe(t,e,s){let r=jt.get(t);r||(r=new Map,jt.set(t,r));let n=r.get(e)??{};r.set(e,a(n,s))}var ie;function ae(...t){return(e,s,r)=>{let n=r.get();return(l(n)?n:[n]).forEach((s=>{let r;if(s instanceof Xt){if(r=Wt.get(s.strings),!r){let t=s.getCssText();r=new CSSStyleSheet,r.replaceSync(t),Wt.set(s.strings,r)}}else s instanceof CSSStyleSheet&&(r=s);if(!r)return;let n=Ht.get(e);n||(n=new Map,Ht.set(e,n)),c(t,(t=>{if(t===ie.GLOBAL)return void(document.adoptedStyleSheets.includes(r)||(document.adoptedStyleSheets=[...document.adoptedStyleSheets,r]));let e=n.get(t);e||(e=[],n.set(t,e)),e.push(r)}))})),r}}function le(t,e){let s=e,r=Reflect.get(s[$t],t);if(ue.__collecting&&ue.__varPathList.push(t),pe.has(r)||fe.get(r)){let n=ge.get(r);n||(n=new Set,ge.set(r,n));let o=he.get(e);o||(o={},he.set(e,o));let i=pe.get(r)??r;if(fe.get(i)?.deref()!==e){let e=de.get(i);e&&(o[e[0]]=t)}return n.add(s.__thisRef),i}if(u(r)&&!h(r)&&!(r instanceof Node)&&!Object.isFrozen(r)){let e=Pt.get(s.constructor),n=e?.has(t);n||(e=It.get(s.constructor),n=e?.has(t)),r=n||"slots"===t?r:_e(r,s,t)}return r}function ce(t,e,s){let r=s;if(!r.__inited)return void Reflect.set(r[$t],t,e);let n=r[$t][t],o=Lt.get(r.constructor),i=o?.get(t),a=pe.get(n);if(i){if(!i.call(r,e,n,[t],e,n))return!0}else{if(Object.is(n,e))return!0;if(u(e)&&a===e)return!0}Reflect.set(r[$t],t,e),me(s,e,n,[t])}!function(t){t.INNER="inner",t.HOST="host",t.GLOBAL="global"}(ie||(ie={}));const ue={popDirectiveQ(){return this.__varPathList.reduceRight(((t,e)=>(t.includes(e)||t.unshift(e),t)),[])},start(){this.__collecting=!0,this.__varPathList=[]},end(t,e){t&&e&&t._regSubViewDeps(ue.popVarPathList(),e),this.__collecting=!1},popVarPathList(){let t=Array.from(new Set(this.__varPathList));return this.__varPathList=[],t},__varPathList:[],__collecting:!1},he=new WeakMap,de=new WeakMap,pe=new WeakMap,fe=new WeakMap,ge=new WeakMap;function _e(t,e,r){if(pe.has(t))return pe.get(t);if(fe.has(t)){if(r){let r=ge.get(t);r||(r=new Set,ge.set(t,r)),s(r.values(),(t=>t.deref()===e))||r.add(new WeakRef(e))}return t}const n=new Proxy(t,{get(t,s,r){if(!s)return;const n=Reflect.get(t,s,r);if(d(s))return n;if(h(n))return n;if("length"===s&&l(t))return n;if("__"===s.substring(0,2))return n;if(ue.__collecting){let t=de.has(r)?p(de.get(r)):[];t.push(s);let e=t.join(".");ue.__varPathList.push(e)}if(pe.has(n))return pe.get(n);let o=n;if(u(n)&&!h(n)&&!(n instanceof Node)&&!Object.isFrozen(n)){let t=de.has(r)?p(de.get(r)):[];o=_e(n,e),t.push(s),de.set(o,t),pe.set(n,o)}return o},set(t,s,r,n){if(!s)return!1;let o=t[s],i=de.get(n)??[],a=p(i,[s]),l=Lt.get(e.constructor),c=l?.get(a[0]),u=a.length>1,h=r,d=o;if(u&&(d=h=e._getPrivateData()[a[0]]),c){if(!c.call(e,h,d,a,r,o))return!0}else if(Object.is(o,r))return!0;let f=r,g=Reflect.set(t,s,f);me(e,f,o,a);let _=ge.get(n),m=[];return _?.forEach((t=>{let e=t.deref();if(!e)return;if(e.isDestroyed)return void m.push(t);let s=(he.get(e)??{})[a[0]],r=a.join(".");r=r.replace(a[0],s),me(e,f,o,r.split("."),h,d)})),m.forEach((t=>{let e=t.deref();he.delete(e),_.delete(t)})),g}});return de.has(n)||de.set(n,r?[r]:[]),pe.set(t,n),r&&fe.set(n,new WeakRef(e)),n}function me(t,e,s,r,n,o){n=n??e,o=o??s,r.length>1&&(o=n=t._getPrivateData()[r[0]]);let i=r.join(".");!function(t,e,s,r,n,o){let i=Yt(t.constructor),a=kt.get(t.constructor)??kt.get(i),l=Ct.get(t.constructor)??Ct.get(i),c=xt.get(t.constructor)??xt.get(i),u=Rt.get(t.constructor)??Rt.get(i),h=Mt.get(t.constructor)??Mt.get(i);a?.forEach((i=>{(r===i||f(i,r+".")&&!Object.is(g(t._getPrivateData(),i),g(e,i))||f(r,i+".")&&l?.includes(i)&&!Object.is(g(t._getPrivateData(),i),g(e,i)))&&p(_(u[i]),_(c[i])).forEach((a=>{a&&!0!==h.get(i)&&(t._watchUpdateArgsInNextTick?.set(a,{newValue:e,oldValue:s,chain:r.split("."),rootObjNew:n,rootObjOld:o,fullMatch:i===r}),t._watchUpdateSetInNextTick?.add(a),h.has(i)&&h.set(i,!0))}))}))}(t,e,s,i,n,o),function(t,e){let s=Ot.get(t.constructor);s?.has(e)&&s.get(e)?.forEach((e=>{t._computedUpdateSetInNextTick.add(e)}))}(t,i),function(t,e){let s=Dt.get(t.constructor);if(!s)return;let r=e.split("."),n="";r.forEach((e=>{n=n?n+"."+e:e,s.has(n)&&(t._cssUpdateInNextTick=!0)}))}(t,i),function(t,e,s,r){t._notify(e,s,r)}(t,n,o,r)}const Ee=new Map;class ve{static nextSet=new Set;static nextPending=!1;static next;static flush(){ve.nextPending=!1;let t=Array.from(ve.nextSet);ve.nextSet.clear(),Ee.clear(),t.forEach((t=>t())),t=null}static pushNext(t){ve.nextSet.add(t),ve.nextPending||(ve.nextPending=!0,ve.next())}}function we(t){if(1===arguments.length)return(e,s,r)=>{t.required=t.required||!1,t.attribute=!1!==t.attribute,ye(e,s,t)};let e=arguments[0],s=arguments[1],r=arguments[2];t={type:void 0,required:!1,attribute:!0},r&&"function"==typeof r.type&&(t=m(r,t),r=void 0),t.shallow=t.shallow||!1,ye(e,s,t)}function ye(t,e,s,r){let n;if(!bt.has(t.constructor)){const e={};let s=t.constructor;for(;(s=Yt(s))!==Xe;)E(e,v(bt.get(s)??{}));n=new Set,c(e,((t,e)=>{if(t.attribute){let t=w(e);n?.add(t)}})),Tt.set(t.constructor,n),bt.set(t.constructor,e)}if(s.attribute){n||(n=Tt.get(t.constructor));let s=w(e);n?.add(s)}if(s.model){let s=St.get(t.constructor);s||(s=[],St.set(t.constructor,s)),s.includes(e)||s.push(e)}if(y(t.constructor,"observedAttributes")||(t.constructor.observedAttributes=[]),n&&(t.constructor.observedAttributes=_(n)),b(bt.get(t.constructor),e,s),s.hasChanged){let r=Lt.get(t.constructor);r||(r=new Map,Lt.set(t.constructor,r)),r.set(e,s.hasChanged)}if(s.shallow){let s=It.get(t.constructor);s||(s=new Set,It.set(t.constructor,s)),s.add(e)}Reflect.defineProperty(t,e,{get(){return le(e,this)},set(s){St.get(t.constructor)?.includes(e)&&function(t,e,s){s.emit("update:"+t,{value:e})}(e,s,this)}})}(()=>{const t=Promise.resolve(),e=ve.flush;ve.next=()=>{t.then(e)}})();const be=new Set;function Se(t){return Tt.get(t)??Tt.get(Yt(t))??be}const Ne=["resize","outside","mutate"],Te=new WeakMap,Me=[],Ce=[],ke=[],Re=new WeakSet,xe=new ResizeObserver((t=>{for(const e of t){const t=Array.isArray(e.contentBoxSize)?e.contentBoxSize[0]:e.contentBoxSize,s=Array.isArray(e.borderBoxSize)?e.borderBoxSize[0]:e.borderBoxSize;if(!Re.has(e.target)){Re.add(e.target);continue}let r=Te.get(e.target);r&&r.forEach((r=>{r({target:e.target,contentBoxSize:t,borderBoxSize:s,type:"resize"})}))}}));var Ae;!function(t){t.Child="child",t.Tree="tree",t.Attr="attr",t.Char="char"}(Ae||(Ae={}));const Pe=new WeakMap,Ie=new MutationObserver((t=>{for(let e=0;e<t.length;e++){const s=t[e];let r=Pe.get(s.target);if(!r)return;let n={target:s.target},o=null;switch(s.type){case"subtree":n.type=Ae.Tree,o=r[Ae.Tree];break;case"childList":n.type=Ae.Child,n.addedNodes=s.addedNodes,n.removedNodes=s.removedNodes,o=r[Ae.Child];break;case"attributes":n.type=Ae.Attr,n.attributeName=s.attributeName,n.oldValue=s.oldValue,o=r[Ae.Attr];break;case"characterData":n.type=Ae.Char,n.oldValue=s.oldValue,o=r[Ae.Char]}o&&(n.type="mutate",o(n))}}));function Le(e,s,r,n,o,i){if("resize"===e)return function(t,e,s,r){let n=Te.get(t);n||(n=[],Te.set(t,n));let o=xe;if(r){let s=e;e=(...r)=>{s(...r),S(n,(t=>t===e)),N(n)<1&&(o.unobserve(t),Te.delete(t))}}return n.push(e),xe.observe(t),(s=!1)=>{S(n,(t=>t===e)),N(n)<1&&(o.unobserve(t),Te.delete(t),s&&(o=t=null))}}(s,r,0,i);if("outside"===e)switch(n[0]){case"mousedown":return function(e,s){return Me.push([e,s]),(r=!1)=>{t.remove(Me,(t=>t[0]===e&&t[1]===s))}}(s,r);case"dblclick":return function(e,s){return ke.push([e,s]),(r=!1)=>{t.remove(ke,(t=>t[0]===e&&t[1]===s))}}(s,r);default:return function(e,s){return Ce.push([e,s]),(r=!1)=>{t.remove(Ce,(t=>t[0]===e&&t[1]===s))}}(s,r)}else if("mutate"===e)return function(t,e,s){let r=T(s,"child"),n=T(s,"attr"),o=T(s,"char"),i=T(s,"tree"),a=Pe.get(t);if(!a)return a={},Pe.set(t,a),r&&(a[Ae.Child]=e),n&&(a[Ae.Attr]=e),o&&(a[Ae.Char]=e),i&&(a[Ae.Tree]=e),Ie.observe(t,{childList:r,attributes:n,characterData:o,subtree:i}),(e=!1)=>{Pe.delete(t),e&&(t=null)}}(s,r,n)}document.addEventListener("mousedown",(t=>{let e=g(t.composedPath(),0,t.target);Me.forEach((([s,r])=>{s.contains(e)||s.contains(i(e,(t=>t instanceof ShadowRoot),"parentNode")?.host)||r({type:"outside",target:s,modifier:"mousedown",event:t})}))}),!1),document.addEventListener("click",(t=>{let e=g(t.composedPath(),0,t.target);Ce.forEach((([s,r])=>{s.contains(e)||s.contains(i(e,(t=>t instanceof ShadowRoot),"parentNode")?.host)||r({type:"outside",target:s,modifier:"click",event:t})}))}),!1),document.addEventListener("dblclick",(t=>{let e=g(t.composedPath(),0,t.target);ke.forEach((([s,r])=>{s.contains(e)||s.contains(i(e,(t=>t instanceof ShadowRoot),"parentNode")?.host)||r({type:"outside",target:s,modifier:"dblclick",event:t})}))}),!1);const Oe=/,|^(debounce:.+)|(debounce$)/,De=/,|^(throttle:.+)|(throttle$)/,Ve="native",We={esc:"escape"},He=()=>{};function Be(t,e,s,r){let n,o=t.split("."),i=o.shift(),a=o.includes("once"),l=e??He;if(n=M(o,(t=>Oe.test(t)))){let t=n.split(":");l=C(l,parseInt(t[1])||100)}if(n=M(o,(t=>De.test(t)))){let t=n.split(":");l=k(l,parseInt(t[1])||100)}if(a&&(l=R(l)),vt[s.tagName?.toLowerCase()]&&(s!==r||o.includes(Ve)||o.push(Ve),!o.includes(Ve)))return Ue(s,r,i,l),x;if(function(t){return Ne.includes(t)}(i))return Le(i,s,l,o,0,a);let c=t=>{if(o.includes("prevent")&&t.preventDefault(),o.includes("stop")&&t.stopPropagation(),!o.includes("self")||t.target===t.currentTarget){if(t instanceof MouseEvent){if(o.includes("left")&&0!=t.button)return;if(o.includes("right")&&2!=t.button)return;if(o.includes("middle")&&1!=t.button)return}else if(t instanceof KeyboardEvent){if(S(o,(t=>"ctrl"==t))[0]&&!t.ctrlKey)return;if(S(o,(t=>"alt"==t))[0]&&!t.altKey)return;if(S(o,(t=>"shift"==t))[0]&&!t.shiftKey)return;if(S(o,(t=>"meta"==t))[0]&&!t.metaKey)return;let e=A(o,(t=>We[t]||t));if(N(e)>0&&!e.includes(t.key.toLowerCase()))return}l(t)}},u={capture:o.includes("capture")||!1,passive:o.includes("passive")||!1};return s.addEventListener(i,c,u),(t=!1)=>{s.removeEventListener(i,c,u),t&&(s=null)}}function Ue(t,e,s,r){let n=g(t,"__c_emit_event_")??e._subComponentEventSn++;b(t,"__c_emit_event_",n);let o=e._subComponentEventMap.get(n);o||(o={},e._subComponentEventMap.set(n,o)),o[s]=r}let je=[],Fe=0;const Ke=new WeakMap,$e={},Ge="slots";class Xe extends HTMLElement{static defaults(t){je=P(t.css,(t=>{if(r(t)){let e=new CSSStyleSheet;return e.replaceSync(t),e}return t instanceof CSSStyleSheet?t:[]})),t.global,c(t,((t,e)=>{I(e[0],/[A-Z]/)}))}#t;#e={};__data_={};#s={};#r;__updateTree;_eventBindList;__docoEventMap;__updateSubViewDeps;_cssUpdateInNextTick=!1;_cssVarOldValueMap;_watchUpdateSetInNextTick;_watchUpdateArgsInNextTick;_computedUpdateSetInNextTick;_subComponentEventSn=0;_subComponentEventMap=new Map;get[Symbol.toStringTag](){return this.constructor.name}get cid(){return this.#t}get attrs(){return this.#n}get props(){return this.#o}get renderRoot(){return this.#i?.deref()}get renderRoots(){return this.#a.flatMap((t=>t.deref()??[]))}get parentComponent(){return this.#l?.deref()}get wrapperComponent(){return this.#c?.deref()}get slots(){return $e}get slotHooks(){return this.#u}get cssSheets(){return Ht.get(this.constructor)?.get(ie.INNER)}get isMounted(){return this.#h}#n;#o;#i;#a;#l;#c;#d={};#u={};#p={};#h=!1;#f=!1;#g;get cssVars(){return{}}__inited=!1;#_=!1;#m;__thisRef;constructor(...t){super(),this.#t=Fe++,this.__updateTree=[],this.__thisRef=new WeakRef(this),this.#m=this.#E.bind(this),1===N(t)&&(this.#o={},a(this.#o,L(t))),Reflect.getOwnPropertyDescriptor(this.constructor.prototype,"slots")||Reflect.defineProperty(this.constructor.prototype,"slots",{get(){return le("slots",this)},set(t){ce("slots",t,this)}});let e=Nt.get(this.constructor)??Nt.get(Yt(this.constructor));e&&e.sort(((t,e)=>e.priority-t.priority)).forEach((t=>t.create(this))),this.#v=this.#w.bind(this)}insertStyleSheet(t){if(!this.#r)return null;let e;if(t instanceof Xt){if(!e){let s=t.getCssText();e=new CSSStyleSheet;try{e.replaceSync(s)}catch(t){}}}else if(t instanceof CSSStyleSheet){if(this.#r.adoptedStyleSheets.includes(t))return t;e=t}return e&&(this.#r.adoptedStyleSheets=[...this.#r.adoptedStyleSheets,e]),e}get rootComponent(){let t=this;for(;t.parentComponent;)t=t.parentComponent;return t}#v;connectedCallback(){let t=i(this.parentNode,(t=>t instanceof Xe||t.host instanceof Xe),"parentNode");this.#l=t?t instanceof Xe?new WeakRef(t):new WeakRef(t.host):void 0;let e=Kt.get(this);e&&(this.#c=new WeakRef(e),Kt.delete(this));let s=Ht.get(this.constructor)?.get(ie.HOST);if(s){let t=this.#c?.deref()?.shadowRoot??this.#l?.deref()?.shadowRoot??this.ownerDocument;this.#c&&!this.#c.deref()?.shadowRoot?.contains(this)&&(t=i(this,(t=>t instanceof HTMLDocument||t instanceof ShadowRoot),"parentNode")),c(s,(e=>{t.adoptedStyleSheets.includes(e)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}))}this.setup(),this.__bindEvents()}disconnectedCallback(){this.__unbindEvents()}__bindEvents(){let t=this._eventBindList;c(t,(t=>{let[e,s,r,n]=t;if(n)return;if(!r)return;let o=Be(e,s&&g(globalThis,s.name)!==s?s.bind(this):s,r,this);t[3]=o}));let e=mt.get(this.constructor);N(e)>0&&(this.__docoEventMap||(this.__docoEventMap=new Map),c(e,(({name:t,targetFn:e,fnName:s})=>{if(this.__docoEventMap.has(t+"@"+s))return;let r=e?e(this):this,n=g(this,s),o=Be(t,n&&g(globalThis,n.name)!==n?n.bind(this):n,r,this);this.__docoEventMap.set(t+"@"+s,o)})))}__unbindEvents(){c(this._eventBindList,(t=>{let[,,,e]=t;e&&e(),t[3]=null}));let t=[];c(this.__docoEventMap,((e,s)=>{e&&e(),t.push(s)})),t.forEach((t=>this.__docoEventMap.delete(t)))}beforeDestroyed(){}destroyed(){}get isDestroyed(){return this.#y}#y=!1;destroy(){if(this.#y)return;this.#y=!0;let t=Nt.get(this.constructor)??Nt.get(Yt(this.constructor));if(t&&t.sort(((t,e)=>e.priority-t.priority)).forEach((t=>{t.destroy(this)})),this.beforeDestroyed(),this.__unbindEvents(),this.__docoEventMap?.clear(),this.__docoEventMap=this._eventBindList=null,Ut.get(this)?.clear(),Ut.delete(this),this._watchUpdateArgsInNextTick?.clear(),this._watchUpdateSetInNextTick?.clear(),this._computedUpdateSetInNextTick?.clear(),this._computedUpdateSetInNextTick=null,this.__updateSubViewDeps?.clear(),this.#l){let t=this.#l.deref();t&&O(t.__updateTree,(e=>{e.__destroyed||e.node?.deref()===this&&(e.destroy(t),S(e.parent?e.parent.children:t.__updateTree,(t=>t===e)))}))}c(this.__updateTree,(t=>t?.destroy(this))),c(this.#d,(t=>{Ke.delete(t),t.remove()})),c(this.#p,(t=>{c(t,(t=>t.remove()))})),c(this.__data_.slots,((t,e)=>{c(t,(t=>t.remove()))})),this.#b.clear(),this.#m=this.__thisRef=this.#p=this.#d=this.#b=this.#e=this.__data_.slots=null,this.remove(),this.#S=this.#i=this.#a=this.#r=this.#s=this.#n=this.#o=this.#i=this.#a=this.#u=this.#v=this.__data_=this.__updateTree=this.#l=this._asyncDirectives=this.#c=null,this.destroyed()}setup(){if(this.__inited)return;if(this.#_)return;this.#_=!0;const t=this.#N();this.propsReady(t);for(const e in t){const s=t[e];this.__data_[e]=s}this.#T(),this.__data_.slots={},Reflect.defineProperty(this.__data_,"__isData",{enumerable:!1,value:!0});let e=Yt(this.constructor);if(kt.get(this.constructor)??kt.get(e)){this._watchUpdateSetInNextTick=new Set,this._watchUpdateArgsInNextTick=new Map;let t=Mt.get(this.constructor)??Mt.get(e),s=At.get(this.constructor)??At.get(e);c(s,((e,s)=>{let r=g(this,s);e.forEach((t=>{t.call(this,r,void 0,s)})),t.has(s)&&t.set(s,!0)}))}let s=a({},wt.get(this.constructor),wt.get(e));if(s){this._computedUpdateSetInNextTick=new Set;let t=Ot.get(this.constructor);t?c(s,((t,e)=>{this[$t][e]=t.call(this)})):(t=new Map,Ot.set(this.constructor,t),c(s,((e,s)=>{b(e,"key",s),ue.start(),this[$t][s]=e.call(this),ue.end(),ue.popVarPathList().forEach((s=>{let r=t.get(s);r||(r=new Set,t.set(s,r)),r.add(e)}))})))}ue.start();let r=this.render();ue.end();let n,i=ue.popVarPathList();this.constructor.prototype._viewDeps||(this.constructor.prototype._viewDeps=i),null===r?(this.#a=[],this.#i=void 0):(this.#r=this.attachShadow({mode:"open"}),this.#r.adoptedStyleSheets=[...je,...Ht.get(this.constructor)?.get(ie.INNER)??[]],n=function(t,e){let s,r=[];_s.has(e.constructor)?(s=_s.get(e.constructor),r=vs(t)):(s=new ss(t,e,r),_s.set(e.constructor,s));let[n,o]=ws(e,s,r);return e.__updateTree=o,n}(r,this),n&&N(n.children)>0&&(this.#a=D(n.children,(t=>t.nodeType===Node.ELEMENT_NODE)).map((t=>new WeakRef(t))),this.#i=this.#a[0])),this.__inited=!0,this.#M();let l=Ft.get(this);l&&(this.#u=l,Ft.delete(this)),c(this.#u,((t,e)=>{this.#C(e)}));const u=this;let h=Nt.get(this.constructor)??Nt.get(Yt(this.constructor));h&&h.sort(((t,e)=>e.priority-t.priority)).forEach((t=>{t.beforeMount(this,((t,e)=>(u.__data_[t]=e,u.__data_[t])))})),this.beforeMount(),setTimeout((()=>{if(!this.isDestroyed){if(this.#h=!0,this.#r){ue.start();let t=this.cssVars;if(ue.end(),!V(t)){this._cssVarOldValueMap={};let e=Dt.get(this.constructor);e||(e=new Set(ue.popVarPathList()),Dt.set(this.constructor,e));let s="";c(t,((t,e)=>{let r="--"+w(e).replace(/^-+/,"");(o(t)||W(t))&&(t="initial"),this._cssVarOldValueMap[r]=t,s+=";"+r+":"+t})),this.style.cssText+=s}}n&&N(n.children)>0&&(this.#r.append(n),jt.delete(this)),h&&h.forEach((t=>{t.mounted(this,((t,e)=>(u.__data_[t]=e,u.__data_[t])))})),this.#g&&this.#g.forEach((t=>ve.pushNext(t))),this.#f&&ve.pushNext(this.#v),this.__bindEvents(),this.mounted()}}),0)}propsReady(t){}render(){return null}beforeMount(){}mounted(){}#E(t){let e=t.currentTarget,s="";c(this.#d,((t,r)=>{if(t===e)return s=r,!1})),this.__inited&&this.#k(e,s===dt?"":s)}#k(t,e){this.#M();let s=g(this.#e[e],"props");s&&c(this.slots,((t,e)=>{t.filter((t=>t.nodeType===Node.ELEMENT_NODE)).forEach((t=>{t instanceof Xe?t.updateProps(s):c(s,((e,s)=>{if(t instanceof HTMLSlotElement){let r=Ke.get(t);if(r){let n=t.name||dt,o=r.#e[n];o||(o=r.#e[n]={props:{}}),o.props||(o.props={}),o.props[s]=e,r.#k(t,n)}}else t.setAttribute(s,e)}))}))})),this.slotChange(t,e)}slotChange(t,e){}attributeChangedCallback(t,e,s){if(!this.__inited)return;if(Object.is(s,e))return;"undefined"===s&&(s=null);let r=H(t),n=bt.get(this.constructor)??bt.get(Yt(this.constructor));if(te(g(n,r).type)){let t=!B(s)&&ee(s);if(g(this,r)===t)return}this.#R(t,e,s)}shouldUpdate(t){return!0}updated(t){}_notify(t=void 0,e,s,r,n){let o=[];for(let i=0;i<s.length;i++){const a=s[i];o.push(a);let l=g(this,o)??t,c=Jt(o);this.#s[c]={value:l,chain:c===Ge?[Ge]:o,oldValue:e,end:o.length===s.length,subNewValue:r,subOldValue:n}}this.isMounted?ve.pushNext(this.#v):this.#f=!0}#w(){if(N(this.#s)<1)return;if(!this.isMounted)return;const t=this.#s;if(this.#s={},!this.shouldUpdate(t))return;let e=Nt.get(this.constructor)??Nt.get(Yt(this.constructor));e&&e.sort(((t,e)=>e.priority-t.priority)).forEach((e=>{e.updated(this,t)}));let s=!1,r=new Set,n=this.constructor.prototype._viewDeps;if(c(t,((t,e)=>{if(!s&&n?.includes(e)&&(s=!0),this.__updateSubViewDeps?.has(e)){let t=this.__updateSubViewDeps.get(e);t&&t.forEach((t=>{r.add(t)}))}})),this._watchUpdateSetInNextTick?.forEach((t=>{let{newValue:e,oldValue:s,chain:r,rootObjNew:n,rootObjOld:o,fullMatch:i}=this._watchUpdateArgsInNextTick.get(t),a=i?e:n,l=i?s:o;t.call(this,a,l,r,e,s)})),this._watchUpdateSetInNextTick?.clear(),this._watchUpdateArgsInNextTick?.clear(),this._computedUpdateSetInNextTick?.forEach((t=>{let e=g(t,"key"),s=this.__data_[e],r=t.call(this);(u(r)||r!==s)&&(this.__data_[e]=r,this._notify(r,s,[e]))})),this._computedUpdateSetInNextTick?.clear(),this._cssUpdateInNextTick){let t=this.cssVars;c(t,((t,e)=>{let s="--"+w(e).replace(/^-+/,"");this._cssVarOldValueMap[s]!=t&&((o(t)||W(t))&&(t="initial"),this._cssVarOldValueMap[s]=t,this.style.setProperty(s,t+""))}))}this.#i?.deref()&&(s&&bs(vs(this.render()),this,this.__updateTree,r,t),N(r)>0&&r.forEach((e=>{!function(t,e,s,r){if(!t||t.__destroyed)return;let n=t.node.deref();const[o,i,a,l]=t.value;let c,u=re(n,e);if(!s){let s=o(n,t.value[1],i,{renderComponent:e,slotComponent:u,varChain:l,updatedMap:r,pointType:g(Bt.get(a),[0],ze.TEXT)});if(!s)return;if(s[0]!==qe.REFRESH)return;c=h(s[1])?vs(s[1].call(e,t.value[1][0])):s[1]}if(!c)return;bs(c,e,t.children,void 0,r)}(e,this,void 0,t)}))),this.#b.forEach((t=>{this.#C(t)})),this.updated(t)}#N(){let t=bt.get(this.constructor)??bt.get(Yt(this.constructor)),e=this.attributes,s=this.tagName,r=E(this.#o??{},jt.get(this.wrapperComponent)?.get(this)??{}),o={};c(e,(({name:e,value:s})=>{if(e[0]===is||e[0]===as||e[0]===ls||e===hs||"slot"===e)return;let r=H(e);t&&!t[r]&&(o[e]=s)})),this.#n=this.#n?a(this.#n,o):o;let i={};if(!t)return i;let h=Object.keys(t),d=h.length;for(let o=0;o<d;o++){const a=h[o],c=w(a),d=this.hasAttribute(c);let p,f=t[a],_=y(r,a),m=g(this,a);if(!("_defaultValue"in f)&&(f._defaultValue=m,!f.type)){n(m)&&qt(s,"Prop '"+a+"' has neither propType nor defaultValue be used for type inference");let t=typeof m;l(m)&&(t="array");let e=_t[t];f.type=e}if(_)p=W(r[a])?m:r[a];else{p=m;let t=e.getNamedItem(c)||e.getNamedItem(as+c)||e.getNamedItem(c+as);t&&(_=!0,p=t.value)}if(f.required&&!_){qt(s,"Prop '"+a+"' is required");break}p=this.#x(t,a,p,d),f.attribute&&U(p)&&!u(p)&&this.#A(f,a,p),this.__data_[a]=p,i[a]=p,delete this[a]}return i}#A(t,e,s){let r=w(e),n=j(s);te(t.type)?(n=ee(s),F(n)?n&&!this.hasAttribute(r)?this.toggleAttribute(r,!0):!n&&this.hasAttribute(r)&&this.toggleAttribute(r,!1):this.getAttribute(r)!==n&&this.setAttribute(r,n)):this.getAttribute(r)!==n&&this.setAttribute(r,n)}#P(t,e){let s=t;try{for(let r=0;r<e.length;r++){const n=e[r];s=n===Boolean?ee(t):n===Number?Number(t):n===String?String(t):n===Object||n===Array?K(t):n===Date?new Date(t):new n(t)}}catch(e){qt(this.tagName,"Convert attribute error with "+t)}return s}#x(t,e,n,o){let i=t[e];if(!i)return n;let a=i.isValid,c=i.type,u=l(c)?c:[c],h=i.converter,d=n;if(!s(u,(t=>t===String))&&r(d)&&!B(d))try{d=h?h(d):this.#P(d,u)}catch(t){qt(this.tagName,`Convert attribute '${e}' error with `+d)}for(let t=0;t<u.length;t++){"Boolean"===u[t].name&&o&&(d=ee(d))}if(W(d))return d;let p=typeof d,f=!U(d);for(let t=0;t<u.length;t++){const e=u[t];if(I(p,e.name,"i")||d instanceof e||Object.prototype.toString.call(d)===Object.prototype.toString.call(e.prototype)){f=!0;break}}return f||qt(this.tagName,`Invalid prop '${e}'. expected '${u.map((t=>t.name||t))}' but got '${p}'`),a&&(a.call(this,d,this.__data_)||qt(this.tagName,`Invalid prop '${e}'. IsValid() check failed`)),d}#T(){let t=yt.get(this.constructor)??yt.get(Yt(this.constructor));t&&c(t,((e,s)=>{let r=t[s],n=g(this,s);if(r){let t=r.prop;n=t?$(this.__data_[t]):g(this,s)}this.__data_[s]=n,delete this[s]}))}#S=C(this.propsReady,100);updateProps(t,e=!1){let s=bt.get(this.constructor)??bt.get(Yt(this.constructor));if(!s)return;if(!this.__inited)return void a(this.#o,t);let r=[];c(t,((t,n)=>{let o=H(n),i=s[o];if(!i)return;t=this.#x(s,o,t);let a=this.__data_[o];if(!e){let e=Lt.get(this.constructor),s=e?.get(o);if(s){if(!s.call(this,t,a,[o],t,a))return!0}else if(u(t)){let e=It.get(this.constructor);if(e?.has(o)&&Object.is(a,t))return!0}else if(Object.is(a,t))return!0}i.attribute&&U(t)&&!u(t)&&r.push([i,o,t]),b(this.__data_,o,t),me(this,t,a,[o])})),a(this.#o,t),r.forEach((([t,e,s])=>{this.#A(t,e,s)})),this.#o&&this.#S(this.#o)}_initProps(t,e){this.#o=E(this.#o||{},t),this.#n=E(this.#n||{},e),c(t,((t,e)=>{if(u(t)){let s=de.get(t);if(s){let t=this.wrapperComponent?yt.get(this.wrapperComponent?.constructor):null,r=s[0];if(t&&t[r]){let s=bt.get(this.constructor);b(s,[e,"shallow"],t[r].shallow)}}}}))}_bindSlot(t,e,s){this.#d[e]||(this.#d[e]=t,Ke.set(t,this));let r="slotchange",n=Be(r,this.#m,t,this);if(this._eventBindList.push([r,this.#m,t,n]),!V(s)){let t=this.#e[e];t||(t=this.#e[e]={}),t.props=s}}#b=new Set;_updateSlot(t,e,s){let r=this.#d[t],n=this.#u[t];if(!n&&!r)return;let o=this.#e[t];if(e&&(o.props||(o.props={}),o.props[e]=s),n)this.#b.add(t);else{let t=r.assignedElements({flatten:!0});for(let r=0;r<t.length;r++){t[r].setAttribute(e,s+"")}}}#M(){if(!this.#i)return;let t=G(this.#d);if(V(t))return;const e=P(this.childNodes,(t=>t.nodeType===Node.COMMENT_NODE?[]:t instanceof HTMLSlotElement?t.assignedNodes({flatten:!0}):t));let s=X(e,(e=>{if(e.nodeType===Node.TEXT_NODE&&t.includes(dt))return dt;if(e instanceof Element){let s=e.getAttribute("slot")||dt;if(t.includes(s))return s}}));if(V(s))return void(this.slots={});c(s,((t,e)=>{if(e){for(;t.length>0;){let e=t[0];if(!(e.nodeType===Node.TEXT_NODE&&o(e.textContent)||e instanceof HTMLSlotElement&&V(e.assignedNodes({flatten:!0}))))break;t.shift()}for(;t.length>0;){let e=z(t);if(!(e.nodeType===Node.TEXT_NODE&&o(e.textContent)||e instanceof HTMLSlotElement&&V(e.assignedNodes({flatten:!0}))))break;t.pop()}}}));let r={};c(s,((t,e)=>{V(t)||(r[e]=t)})),this.slots=r}#C(t){let e=this.#u[t];if(!e)return;let s=this.#e[t];if(!this.__data_.slots)return;if(!this.__data_.slots[t])return;this.renderAsync(e,g(s,"props"));const r=this._asyncDirectives.get(e);let n=r?.buildView(e(g(s,"props"))),o=q(_(n),(t=>t.nodeType===Node.COMMENT_NODE));if(o){let e=this.#p[t];if(!V(e))for(let t=0;t<e.length;t++){const s=e[t];s.parentNode?.removeChild(s)}this.#p[t]=o,this.append(...o),this.#b.clear()}}_asyncDirectives=new WeakMap;renderAsync(t,...e){}#R(t,e,s){if(!this.__inited)return;if(Se(this.constructor).has(t)){let e=H(t);if(B(s)){let t=bt.get(this.constructor)??bt.get(Yt(this.constructor));t&&(s=t[e]._defaultValue)}this.updateProps({[e]:s})}}_regSubViewDeps(t,e){this.__updateSubViewDeps||(this.__updateSubViewDeps=new Map),t.forEach((t=>{let s=this.__updateSubViewDeps.get(t);s||(s=new Set,this.__updateSubViewDeps.set(t,s)),s.add(e)}))}_getPrivateData(){return this.__data_}emit(t,e={},s){if(s&&(e.event=s),e.target=this,y(this.#n,"emit-native"))this.dispatchEvent(new CustomEvent(t,{bubbles:!1,composed:!1,cancelable:!0,detail:e}));else{let s=g(this,"__c_emit_event_");this.wrapperComponent?._callEmitEvent(s,t,e)}}_callEmitEvent(t,e,s){let r=this._subComponentEventMap.get(t),n=g(r,e);h(n)&&n.call(this,s)}nextTick(t){if(!this.isMounted)return this.#g||(this.#g=[]),void this.#g.push(t);ve.pushNext(t)}forceUpdate(){c(this.__data_,((t,e)=>{this.#s[e]={value:void 0,chain:void 0}})),this.#w()}}var ze,qe,Qe;function Ze(t,e,s,r,n,o,i,a,u,h){let d,p=g(Bt.get(t),[0],"");if([ze.TEXT,ze.SLOT].includes(p)?(ue.start(),d=n(e,s,r,{renderComponent:o,slotComponent:i,varChain:a,updatedMap:h,pointType:p}),ue.end(o,u)):d=n(e,s,r,{renderComponent:o,slotComponent:i,varChain:a,updatedMap:h,pointType:p}),!d)return;let[m,E,v,w,y,N]=d;if(m===qe.NONE)return;if(m===qe.REFRESH)return;let T=N;l(N)||(T=A(N,((t,e)=>t)));let M=g(e,"__anchor__"),C={};c(G(e),(t=>{"__anchor__"!==t&&f(t,"__c-")&&(C[t]=g(e,[t]))}));let k=u.subViewRootNodes,R=u.children;if(m===qe.REMOVE){let t=[];c(k,((e,s)=>{if(l(e))c(e,(t=>{let e=t.deref();e.remove(),e instanceof Xe&&e.destroy()}));else{let s=e.deref();s.remove(),t.push(e),s instanceof Xe&&s.destroy()}})),t.forEach((t=>{S(k,(e=>e===t))})),R?.forEach(((t,e)=>{t.destroy(o),R[e]=null})),u.children=Q(R),l(k)?u.subViewRootNodes=[]:u.subViewRootNodes={}}else if(m===qe.REPLACE){c(k,(t=>{let e=t.deref();e.remove(),e instanceof Xe&&e.destroy()})),R?.forEach(((t,e)=>{t.destroy(o),R[e]=null})),u.children=Q(R);let[,t,s]=d;ys(e,u,t,s,o)}else if(m===qe.UPDATE){if(V(k))return void ys(e,u,y,E,o,N,((t,e,s)=>v[s]));let t={},s={};c(w,(s=>{let r=t[s];r||(r=t[s]=[]),D(e.parentElement.childNodes,(t=>g(t,["__c-"+M])==s)).forEach((t=>{r.push(t)}))})),u.children?.forEach((t=>{s[t.key]?s[t.key].push(t):s[t.key]=[t]}));let r,n=w,i=v,a=Z(w,v),l=J(w,a),d=[],p=[],f=!1;if(!V(i)){let e=-1,s=[],r=[],o=0,a=0;for(;a<i.length;a++){const l=i[a];let c=n.findIndex((t=>t===l));if(c<0){let e=i[a-1];t[l]=[],d.push({refKey:e,newKey:l}),o++}else if(c>-1&&c!==a-o){if(e<0||1===Math.abs(e-c)){let e=z(s),r=0===a?Qe.AFTER_BEGIN:e?e.newKey:i[a-1],n=!1;0!==a&&V(t[r])&&(n=!0),s.push({newKey:l,refKey:r,refNew:n})}else{r.push({moveGroup:s,moveIndex:a+s.length});let e=i[a-1],n=!1;V(t[e])&&(n=!0),s=[],s.push({newKey:l,refKey:e,refNew:n})}e=c}}if(s.length>0&&r.push({moveGroup:s,moveIndex:a+s.length}),r.length>0){f=!0;let e=r.sort(((t,e)=>t.moveGroup.length-e.moveGroup.length));if(e.length<2){let{moveGroup:s}=e[0];if(s.length>1){let t=z(s).refKey;s[s.length-2].newKey===t&&(s=Y(s))}Je(s,t,w)}else{let s=z(e).moveIndex;1===Math.abs(e[e.length-2].moveIndex-s)&&(e=Y(e)),e.forEach((({moveGroup:e})=>{e[0].refNew?p.push(e):Je(e,t,w)}))}}}if(d.length>0&&(d.forEach((e=>{let s=tt(v,(t=>t==e.newKey)),r=T[s],n=vs(y.call(o,r,e.newKey,s)),[i,a]=ws(o,E,n);e.fragment=i,c(a,(t=>{t.key=e.newKey,u.children?.push(t)}));let l=_(i.childNodes),h=t[e.newKey];c(l,(t=>{h.push(t),i.childNodes.forEach((t=>b(t,"__c-"+M,e.newKey+""))),c(C,((e,s)=>b(t,s,e)))}))})),o.__bindEvents(),r=function(t){let e,s=[];return t.forEach((t=>{let r=z(s);r&&e===t.refKey?(r.group||(r.group=[r.fragment]),r.group.push(t.fragment)):s.push(t),e=t.newKey})),s}(d),r.forEach(((s,r)=>{let n=s.fragment,o=t[s.refKey??w[0]],i=L(o),a=z(o);if(s.group){let t=document.createDocumentFragment();t.append(...s.group),n=t}i===e?i.before(n):s.refKey?"string"==typeof i||a.after(n):i.before(n)}))),c(p,(e=>{Je(e,t,w)})),l.forEach((e=>{t[e].forEach((t=>{t.parentNode?.removeChild(t)})),s[e].forEach((t=>{t.destroy()}))})),f||l.length>0||r){const t=X(R,(t=>t.key));let e=[],s=0;i.forEach((r=>{t[r]&&t[r].forEach((t=>{t.varIndex=s++,e.push(t)}))})),J(R,e).forEach((t=>t.destroy(o))),u.children=e}let m={};if(c(T,((e,s)=>{let r=v[s],n=t[r];m[r]=n.map((t=>new WeakRef(t)))})),u.subViewRootNodes=m,a.length>0){let t=[];c(N,((e,s,r,n)=>{let i=e,a=vs(y.call(o,i,s,n));t.push(...a)})),bs(t,o,u.children,void 0,h)}}return!0}function Je(t,e,s){t.forEach((({refKey:t,newKey:r})=>{let n=e[r];if(t===Qe.AFTER_BEGIN){let t=e[s[0]];L(t).before(...n)}else if(e[t]){let s=e[t],r=z(s);r?.after(...n)}}))}function Ye(t,e){return Bt.set(t,e),(...e)=>[t(...e),e,t,ue.popDirectiveQ()]}function ts(t,e,s){Bt.get(t)}!function(t){t.ATTR="attr",t.PROP="prop",t.TEXT="text",t.SLOT="slot",t.TAG="tag"}(ze||(ze={})),function(t){t.NONE="NONE",t.REFRESH="REFRESH",t.REMOVE="REMOVE",t.REPLACE="REPLACE",t.UPDATE="UPDATE",t.INIT="INIT"}(qe||(qe={})),function(t){t.AFTER_BEGIN="afterbegin"}(Qe||(Qe={}));const es=new RegExp(`([a-z0-9"'${Gt}])\\s*>\\s*<`,"img");class ss{updatePointMetas;fragment;"emptyEvent‌s";constructor(t,e,s){let[r,n]=this.parseTemplate(t);s&&a(s,n),this.updatePointMetas=[],this.emptyEvent‌s={},this.fragment=function(t,e,s,r,n){const i=document.createElement("template");i.innerHTML=e;const a=document.createNodeIterator(i.content,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT);let u,d,p=0,f=-1,g=-1;for(;u=a.nextNode();)if(f++,d&&!d.contains(u)&&(d=void 0,g=-1),u instanceof HTMLElement||u instanceof SVGElement){ne(u)&&(d=u,g=f);let e={},i=A(u.attributes,(t=>({name:t.name,value:t.value})));for(let a=0;a<i.length;a++){const c=i[a];let{name:_,value:m}=c;if(_!==gs)if(ds.test(_)){let e=s[p];if(l(e)&&h(e[0])){let[,,s,n]=e;ts(s,ze.TAG,r.tagName);let o=new os(p);o.isDirective=!0,o.directiveType=ze.TAG,o.nodeSn=f,o.directiveVarChain=n,d&&(o.slotNodeSn=g),t.push(o),p++}u.removeAttribute(_)}else if(_[0]!==is)if(_!==hs)if(z(_)!==as){if(m.includes(Gt)){let e=new os(p);if(e.attrName=_.replace(/\.|\?|@/,""),e.nodeSn=f,d&&(e.slotNodeSn=g),_[0]===as||_[0]===ls||_[0]===cs){if(_[0]===ls)e.isToggleProp=!0,e.attrName=_.substring(1);else if(_[0]===cs){e.isRefAttr=!0;let t=_.substring(1);const[s,r]=t.split(us);let n=s;switch(r){case"camel":n=H(n);break;case"kebab":n=w(n);break;case"snake":n=rt(n)}e.attrName=n}else{let t=vt[u.tagName.toLowerCase()];bt.get(t);{let t=H(_.substring(1));e.isProp=!0,e.attrName=t}}u.removeAttribute(_)}else e.attrTmpl=m;t.push(e),p++}}else{e[_.substring(0,_.length-1)]=m,u.removeAttribute(_);let t=new os(p);t.attrName=_.substring(0,_.length-1),t.nodeSn=f,t.isPropPerfix=!0}else{if(ds.test(m)){s[p];let e=new os(p);e.isRef=!0,e.nodeSn=f,t.push(e),p++}u.removeAttribute(_)}else{let e=_.substring(1);if(ds.test(m)){let r=new os(p);r.isEvent=!0,r.attrName=e,r.nodeSn=f,t.push(r),s[p],p++}else if(o(m)){let t=n[f];t||(t=n[f]=[]),t.push(e)}u.removeAttribute(_)}}}else{let e=j(u.nodeValue).split(ds);if(e.length<2)continue;c(nt(e.length-1),(n=>{let i=j(e[n]);if(!o(i)){let t=document.createTextNode(i);u.parentNode.insertBefore(t,u),f++}let a=document.createTextNode("");u.parentNode.insertBefore(a,u);let c=new os(p);c.isText=!0,c.nodeSn=f,t.push(c);let _=s[p];if(l(_)&&h(_[0])){let t=d?ze.SLOT:ze.TEXT;c.isDirective=!0,c.directiveType=t,d&&(c.slotNodeSn=g);let[,,e]=_;ts(e,0,r.tagName),_=void 0}p++,f++})),f--;let n=j(z(e));if(o(n)){let t=u.previousSibling;u.parentNode.removeChild(u),u=t}else u.nodeValue=n,f++}return i.content}(this.updatePointMetas,r,n,e,this.emptyEvent‌s)}parseTemplate(t){let e="",s=p(t.vars),r=t.strings.length-1,n=t.vars.length-1,o=0;for(let i=0;i<=r;i++){const r=t.strings[i];let a=g(s,o,"");if(a instanceof rs){let[t,e]=this.parseTemplate(a);a=t,s.splice(o,1,...e),o+=e.length-1}else a=i>n?"":Gt+o;o++,e=e+r+a}return e=e.replace(es,"$1><").trim(),e=Es(e),[e,s]}}class rs{strings;vars;constructor(t,e){this.strings=p(t),this.vars=e}getKey(){let t=this.vars,e="";return c(this.strings,((s,r)=>{if(pt.test(s))return e=et(t[r]),!1})),e}getKeys(){let t=this.vars,e=[];for(let s=0;s<this.strings.length;s++){const r=this.strings[s];if(pt.test(r)){let r=et(t[s]);e.push(r)}}return V(e)&&t.forEach((t=>{if(t instanceof rs){let s=t.getKey();e.push(s)}})),e}append(t){let e=z(this.strings);return t.strings.forEach(((t,s)=>{0!=s?this.strings.push(t):this.strings[this.strings.length-1]=e+t})),this.vars=p(this.vars,t.vars),this}insert(t,e){let s=e.strings.shift();return this.strings[t]+=s,this.strings.splice(t+1,0,...e.strings),this.vars.splice(t,0,...e.vars),this}getHTML(t){let e=[],s=new ss(this,t,e),[r,n]=ws(t,s,e);return st(r.childNodes,((t,e)=>t+(e.nodeType==Node.TEXT_NODE?e.nodeValue:e.outerHTML??"")),"")}destroy(){this.strings=this.vars=null}}class ns{metaInfo;key;varIndex;value;node;subViewRootNodes;__destroyed=!1;children;parent;constructor(t){this.varIndex=t}static createFrom(t){let e=new ns(t.varIndex);return e.metaInfo=t,e}destroy(t){if(this.__destroyed)return;this.__destroyed=!0;let e=this.node,s=this.children;if(this.parent,this.node=this.value=this.children=this.parent=this.metaInfo=null,!e)return;let r=s;r?.forEach(((e,s)=>{e.destroy(t)})),e instanceof Xe&&e.destroy(),t&&se.clear(e.deref(),t),e.deref()?.remove()}insert(t){t.parent=this,this.children||(this.children=[]),this.children.push(t)}}class os{varIndex;attrName;attrTmpl;isText=!1;isDirective=!1;directiveType;directiveVarChain;isProp=!1;isPropPerfix=!1;isToggleProp=!1;isPlaceholder=!1;isEvent=!1;isRef=!1;isKey=!1;isRefAttr=!1;isComponent=!1;isSlot=!1;nodeSn=-1;slotNodeSn=-1;constructor(t){this.varIndex=t}}const is="@",as=".",ls="?",cs="*",us=":",hs="ref",ds=new RegExp(`${Gt}\\d+`),ps=/(<\/?)\s*([A-Z][A-Za-z0-9]*)([\s>])/gm,fs=/\s+([\.?@*])?((?:[a-zA-Z]*[A-Z][^\s<>="']+))(?=[\s=>])/gm,gs="slot-props",_s=new Map;let ms=0;function Es(t){return r(t)?t=(t=t.replace(fs,((t,e,s)=>` ${e??""}${w(s)}`))).replace(ps,((t,e,s,r)=>e+Et[s]+r)):t+""}function vs(t){let e=p(t.vars),s=t.strings.length-1;for(let r=0;r<=s;r++){let s=g(t.vars,r,"");if(s instanceof rs){let t=vs(s);e.splice(r,1,...t)}}return e}function ws(t,e,s){const{fragment:r,updatePointMetas:n,"emptyEvent‌s":o}=e;let i,a=r.cloneNode(!0),l=[],c=[],u=[],h=t._eventBindList;h||(h=t._eventBindList=[]);const d=document.createNodeIterator(a,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT);let p={},f={};n.forEach(((t,e)=>{p[t.nodeSn]||(p[t.nodeSn]=[]),p[t.nodeSn].push(t),t.slotNodeSn>-1&&(f[t.slotNodeSn]=null)}));let g=-1,_=0;for(;i=d.nextNode();){g++,null===f[g]&&(f[g]=i);let e=o[g];e&&e.forEach((t=>{h.push([t,x,i])}));let r={};const n=p[g];n&&n.forEach((t=>{let e=s[_++],n=ns.createFrom(t);if(n.node=new WeakRef(i),n.value=e,t.isProp||t.isPropPerfix)r[t.attrName]=e;else if(t.isRef)e.__setRef(new WeakRef(i));else if(t.isEvent)h.push([t.attrName,e,i]);else if(t.isToggleProp)n.value=!!e,i.toggleAttribute(t.attrName,n.value);else if(t.isRefAttr)i.setAttribute(t.attrName,e);else if(t.isText)if(t.isDirective){let s=t.attrName,r=f[t.slotNodeSn],[o,a,,l]=e;c.push([i,s,r,o,a,l,n])}else i.textContent=e;else if(t.isDirective){let s=f[t.slotNodeSn],[r,n,,o]=e,a=t.attrName;V(o)&&N(t.directiveVarChain)>0&&(o=t.directiveVarChain),u.push([i,a,s,r,n,o,t.directiveType])}else i.setAttribute(t.attrName,t.attrTmpl.replace(ds,e));l.push(n)})),i instanceof HTMLSlotElement?t._bindSlot(i,i.name||"default",r):i instanceof HTMLElement&&ne(i)&&(Kt.set(i,t),oe(t,i,r))}return c.forEach((([e,s,r,n,o,i,a])=>{b(e,"__anchor__",ms++),ue.start();let l=n(e,o,void 0,{renderComponent:t,slotComponent:r,varChain:i,attrName:s,pointType:a.directiveType});if(ue.end(t,a),l&&l.length>1){let[,s,r,n,o]=l;ys(e,a,s,r,t,n,o)}})),u.forEach((([e,s,r,n,o,i,a])=>{n(e,o,void 0,{renderComponent:t,slotComponent:r,varChain:i,attrName:s,pointType:a})})),[a,l]}function ys(t,e,s,r,n,o,i){let a=[],l=i?{}:void 0;o=o??[0];let u=document.createDocumentFragment(),h=g(t,"__anchor__");c(o,((t,o,c,d)=>{ue.start();let p=vs(s.call(n,t,o,d));ue.end(n);let[f,g]=ws(n,r,p),m=_(f.childNodes).map((t=>new WeakRef(t)));if(i){let e=i.call(n,t,o,d)+"";m.forEach((t=>{let s=t.deref();b(s,"__c-"+h,e)})),l[e]=m,g.forEach((t=>{t.key=e})),a.push(...g),u.append(f)}else u=f,e.subViewRootNodes=m,g.forEach((t=>{e.insert(t)}))})),l&&(e.subViewRootNodes=l,a.forEach(((t,s)=>{t.varIndex=s,e.insert(t)}))),u.childNodes.length>0&&(n.__bindEvents(),t.parentNode.insertBefore(u,t))}function bs(t,e,s,r,n){if(!o(t)&&s)for(let o=0;o<s.length;o++){const i=s[o];let a=i.varIndex;if(a<0)continue;let c=i.metaInfo;if(c.isPlaceholder||c.isPropPerfix||c.isRef||c.isEvent||c.isRefAttr||c.isKey)continue;if(i.__destroyed)continue;let h=i.value,d=t,p=i.node.deref();if(!p)continue;let f=ot(a,"-");for(let t=0;t<f.length;t++){const e=f[t];d=g(d,e),d&&d.vars&&o<f.length-1&&(d=d.vars)}if(!u(h)&&h===d)continue;let _=p;if(c.isDirective){let[t,s,o,a]=i.value;if(!l(d))continue;let c=re(p,e),[,u]=d;Ze(o,p,u,s,t,e,c,a,i,n)&&r?.delete(i)}else if(c.isToggleProp){if(!!d===h)continue;_.toggleAttribute(c.attrName,!!d),_ instanceof Xe&&_.updateProps({[c.attrName]:!!d})}else if(c.isProp){if(!u(d)&&d===h)continue;p instanceof Xe?p.updateProps({[c.attrName]:d}):p instanceof HTMLSlotElement&&e._updateSlot(p.getAttribute("name")||"default",c.attrName,d)}else if(c.attrName){if(!it(h,d))switch(c.attrName){case"value":if(p instanceof HTMLInputElement){p.value=d;break}default:p.setAttribute(c.attrName,at(c.attrTmpl,ds,d+""))}}else if(c.isText){let t=i.node,e=et(d??"");e!==t.deref().textContent&&(t.deref().textContent=e)}i.value=d}}function Ss(t,...e){return new rs(r(t)?[t]:t,e)}function Ns(t,...e){if(Vt.has(t))return Vt.get(t);let s=new Xt(t,e),r=t.join("");return V(r)||Vt.set(t,s),s}class Ts{__ref;get current(){return this.__ref?.deref()}__setRef(t){this.__ref=t}}function Ms(){return new Ts}var Cs;!function(t){t.CLASS="class",t.FIELD="field",t.METHOD="method"}(Cs||(Cs={}));class ks{static get priority(){return 0}created(t,...e){}beforeMount(t,e,...s){}mounted(t,e,...s){}updated(t,e){}beforeDestroy(t,...e){}}class Rs{metadata;decorator;key;priority=0;constructor(t,e,s){this.metadata=e,this.decorator=new s(...t),this.priority=g(s,"priority",0)}dispose(){this.metadata=null,this.decorator=null}create(t){let e,s=this.decorator.targets,r=this.metadata[1];u(r)&&U(g(r,"configurable"))?e=Cs.METHOD:n(this.metadata[1])&&(e=Cs.FIELD),!V(s)&&e&&s.includes(e)?this.decorator.created(t,...this.metadata):zt(`Decorator '${this.decorator.constructor.name}' is out of targets, expect '${s.join(",")}' bug got '${e}'`)}beforeMount(t,e){this.decorator.beforeMount(t,e,...this.metadata)}mounted(t,e){this.decorator.mounted(t,e,...this.metadata)}updated(t,e){this.decorator.updated(t,e)}destroy(t){this.decorator.beforeDestroy(t,...this.metadata)}}function xs(t){return(...e)=>(...s)=>{let r=s[0].constructor,n=Nt.get(r);if(!Nt.has(r)){let t=Object.getPrototypeOf(r);n=t?p(Nt.get(t)??[]):[],Nt.set(r,n)}let o=new Rs(e,s.splice(1),t);return n?.push(o),o}}function As(t){return(...e)=>{if(!e||e.length<1)return;let s=e[0].constructor,r=Nt.get(s);if(!Nt.has(s)){let t=Object.getPrototypeOf(s);r=t?p(Nt.get(t)??[]):[],Nt.set(s,r)}let n=new Rs([],e.splice(1),t);return r?.push(n),n}}function Ps(t,e,s){return wt.has(t.constructor)||wt.set(t.constructor,{}),wt.get(t.constructor)[e]=s.get,delete t[e],Reflect.defineProperty(t,e,{get(){return ue.__collecting&&ue.__varPathList.push(e),Reflect.get(this[$t],e)}}),Reflect.getOwnPropertyDescriptor(t,e)}const Is=xs(class extends ks{static get priority(){return Number.MAX_VALUE}created(t,e,...s){let r=g(t,e);b(t,e,C(r,this.wait,this.immediate)),b(t,e+"_$__",r)}beforeDestroy(t,e){b(t,e,null),b(t,e+"_$__",null)}get targets(){return[Cs.METHOD]}wait;immediate;constructor(t,e=!1){super(),this.wait=t,this.immediate=e}});function Ls(t,e){return(s,r,n)=>{if(!mt.has(s.constructor)){let t=[],e=s.constructor;for(;(e=Yt(e))!==Xe;)t=p(t,mt.get(e)??[]);mt.set(s.constructor,t)}mt.get(s.constructor)?.push({name:t,targetFn:e,fnName:r})}}const Os=xs(class extends ks{static get priority(){return Number.MAX_VALUE}created(t,e,s,...r){let n=lt(g(t,s),t);b(t,s,R(n)),b(t,s+"_$__",n)}beforeDestroy(t,e){b(t,e,null),b(t,e+"_$__",null)}get targets(){return[Cs.METHOD]}});var Ds;!function(t){t.ONCE="once"}(Ds||(Ds={}));const Vs=new WeakMap;class Ws extends ks{static get priority(){return Number.MAX_VALUE}get targets(){return[Cs.FIELD]}selector;cache;constructor(t,e){super(),this.selector=t,this.cache=e}static getKey(t){return t}getter(t){let e=t?.shadowRoot?.querySelector(this.selector),s=Vs.get(t);s||(s=new Map,Vs.set(t,s)),s.set(this.selector,e)}mounted(t,e,s,...r){const n=this;let o=new WeakRef(t);Reflect.defineProperty(t,s,{configurable:!0,get(){let t=o.deref();return Vs.has(t)&&Vs.get(t)?.has(n.selector)&&n.cache===Ds.ONCE||n.getter(t),Vs.get(t)?.get(n.selector)}})}beforeDestroy(t,e){Vs.get(t)?.clear(),Vs.delete(t)}updated(t,e){this.cache!==Ds.ONCE&&this.getter(t)}}const Hs=xs(Ws),Bs=xs(class extends Ws{getter(t){let e=t.shadowRoot?.querySelectorAll(this.selector),s=Vs.get(t);s||(s=new Map,Vs.set(t,s)),s.set(this.selector,e)}});function Us(t){if(1===arguments.length)return(e,s)=>{js(e,s,t)};js(arguments[0],arguments[1],{prop:""})}function js(t,e,s){if(!yt.has(t.constructor)){const e={};let s=t.constructor;for(;(s=Yt(s))!==Xe;)E(e,yt.get(s)??{});yt.set(t.constructor,e)}if(s.shallow=s.shallow||!1,b(yt.get(t.constructor),e,s),s.hasChanged){let r=Lt.get(t.constructor);r||(r=new Map,Lt.set(t.constructor,r)),r.set(e,s.hasChanged)}if(s.shallow){let s=Pt.get(t.constructor);s||(s=new Set,Pt.set(t.constructor,s)),s.add(e)}Reflect.defineProperty(t,e,{get(){return le(e,this)},set(t){ce(e,t,this)}})}function Fs(t,e,s){js(t.prototype,e,s||{prop:""})}function Ks(t,e=!1){return s=>{s&&(e?customElements.define(t,s):(Et[s.name]=t,vt[t]=s))}}const $s=xs(class extends ks{static get priority(){return Number.MAX_VALUE}created(t,e,...s){let r=g(t,e);b(t,e,k(r,this.wait)),b(t,e+"_$__",r)}beforeDestroy(t,e){b(t,e,null),b(t,e+"_$__",null)}get targets(){return[Cs.METHOD]}wait;constructor(t){super(),this.wait=t}});function Gs(t,e){return(s,r)=>{let n=xt.get(s.constructor),o=Rt.get(s.constructor),i=Mt.get(s.constructor),c=Ct.get(s.constructor),u=kt.get(s.constructor),h=At.get(s.constructor);if(!u){u=[],kt.set(s.constructor,u),c=[],Ct.set(s.constructor,c),i=new Map,Mt.set(s.constructor,i),n={},xt.set(s.constructor,n),o={},Rt.set(s.constructor,o),h={},At.set(s.constructor,h);let t=Yt(s.constructor);for(;t;)kt.has(t)&&(u.push(...kt.get(t)),c.push(...Ct.get(t)),Mt.get(t)?.forEach(((t,e)=>{i.set(e,t)})),a(n,xt.get(t)),a(o,Rt.get(t)),a(h,At.get(t))),t=Yt(t)}(l(t)?t:[t]).forEach((t=>{let a=s[r];g(e,"once",!1)&&i.set(t,!1);let l=g(e,"deep",!1);if(u.push(t),l?(n[t]=n[t]??new Set,n[t].add(a),c.push(t)):(o[t]=o[t]??new Set,o[t].add(a)),g(e,"immediate",!1)){let e=h[t];e||(e=h[t]=new Set),e.add(a)}}))}}const Xs=["key"],zs=Ye((function(t){return(t,[e],s,{renderComponent:r})=>{let n=t;if(s)c(e,((t,e)=>{n.setAttribute(e,t)}));else if(ne(n)){let t={},s=bt.get(n.constructor);c(e,((e,r)=>{if(Xs.includes(r))return;let o=H(r);(s?s[o]:void 0)?t[r]=e:n.setAttribute(r,e+"")})),oe(r,n,t)}else c(e,((t,e)=>{n.setAttribute(e,t)}))}}),[ze.TAG]),qs=new WeakMap,Qs=Ye((function(t){return(t,[e],s,{renderComponent:n})=>{let o=[];if(l(e)?o=Q(e):u(e)?o=P(e,((t,e)=>t?e:[])):r(e)&&(o=e.split(" ")),o.length<1&&!s)return;let i=t;if(qs.get(i)&&qs.get(i).length===o.length&&ct(qs.get(i),o))return;let a=qs.get(i);c(a,(t=>{i.classList.remove(t)})),c(o,(t=>{i.classList.add(t)})),a=p(o),qs.set(i,a)}}),[ze.TAG]),Zs=new WeakMap,Js=new WeakMap,Ys=Ye((function(t,e,s){return(t,r,o,{renderComponent:i,varChain:a,updatedMap:l})=>{let c=r[0];if(g(o,0),V(c)&&n(o))return[qe.INIT];let u=0,h=Q(A(c,((t,s)=>e.call(i,t,s,u++)+"")));if(h.length!=new Set(h).size)return void zt(`forEach - duplicate key in '${h}'`);let d,p=Zs.get(t);if(Zs.set(t,h),o){if(V(h))return[qe.REMOVE];if(N(h)===N(p)&&it(h,p))return[qe.REFRESH,tr(c,s,i)]}let f=r[2];if(Js.has(t))d=Js.get(t);else{let e=G(c)[0],s=c[e],r=f.call(i,s,e,0);d=new ss(r,i),Js.set(t,d)}return o?[qe.UPDATE,d,h,p,f,c]:[qe.INIT,s,d,c,e]}}),[ze.TEXT,ze.SLOT]);function tr(t,e,s){let r=[];return c(t,((t,n)=>{let o=vs(e.call(s,t,n));r.push(...o)})),r}let er=document.createElement("template"),sr=new WeakMap;const rr=Ye((function(t){return(t,e,s,{renderComponent:r})=>{if(!(s&&e[0]==s[0]||W(e[0])))if(ut(t))t.innerHTML=Es(e[0]);else{let r=sr.get(t);r||(r=document.createTextNode(""),t.parentNode?.insertBefore(r,t),sr.set(t,r)),er.innerHTML=Es(e[0]),o(s)||se.remove(r,t),t.before(er.content.cloneNode(!0))}}}),[ze.TAG,ze.TEXT,ze.SLOT]),nr=new WeakMap,or=new WeakMap,ir=new WeakMap,ar=Ye((function(t,e,s){return(t,[e,s,r],n,{renderComponent:o})=>{let i;if(n){if(!!e==!!n[0]){let e=nr.get(t);return[qe.REFRESH,e]}let a=e?s:r;return e?(i=or.get(t),i||(i=new ss(a.call(o,e),o),or.set(t,i))):(i=ir.get(t),i||(i=new ss(a.call(o,e),o),ir.set(t,i))),[qe.REPLACE,a,i]}let a=e?s:r;return e?(i=or.get(t),i||(i=new ss(a.call(o,e),o),or.set(t,i))):(i=ir.get(t),i||(i=new ss(a.call(o,e),o),ir.set(t,i))),nr.set(t,a),[qe.INIT,a,i]}}),[ze.TEXT,ze.SLOT]),lr=new WeakMap,cr=Ye((function(t,e){return(t,[e,s],r,{renderComponent:n})=>{let o=lr.get(t);return e&&!lr.has(t)&&(o=new ss(s.call(n),n),lr.set(t,o)),r?r[0]?e?[qe.REFRESH,s]:[qe.REMOVE]:e?[qe.REPLACE,s,o]:[qe.NONE]:[qe.INIT,...e?[s,o]:[]]}}),[ze.TEXT,ze.SLOT]);var ur;!function(t){t.CHANGE="change",t.INPUT="input"}(ur||(ur={}));const hr=Ye((function(t,s="value",n){return(t,[s,n,o],i,{varChain:a,renderComponent:l})=>{n=n??"value";const c=t;if(i){const t=i[0],e=s;if(!u(e)&&Object.is(e,t))return;if(c instanceof Xe)c.updateProps({[n]:e});else if(c instanceof HTMLTextAreaElement||c instanceof HTMLSelectElement){if(c.setAttribute(n,e+""),c instanceof HTMLSelectElement){let t=M(c.querySelectorAll("option"),(t=>t.value==e));t&&(t.selected=!0)}}else if(c instanceof HTMLInputElement){if(c.value==e)return;switch(c.type){case"checkbox":case"radio":e?c.setAttribute("checked",""):c.removeAttribute("checked");break;case"text":case"email":case"number":case"password":case"search":case"tel":case"url":c.setAttribute(n,e+""),b(c,n,e);break;default:c.setAttribute(n,e+"")}}return}let h;h=r(o)?e(o)[0]:z(a);const d=ot(h,".")[0];let p=he.get(l),f="";p&&(f=p[d]),d in l||!f||f in l||zt(`model - property '${d}' is not defined on the instance of `+l.tagName);let _=l._eventBindList;if(u(s)||j(s)||(s=""),vt[c.tagName.toLowerCase()]){oe(l,c,{[n]:s}),Ue(c,l,"update:"+n,(function(t){let e=this,s=(he.get(e)??{})[d];!(d in e)&&s&&g(e.wrapperComponent,d)===g(e,s)&&(e=e.wrapperComponent||e),b(e,h,t.value)}))}else if(c instanceof HTMLTextAreaElement){c.setAttribute(n,s+"");let t="input";_.push([t,function(t){let e=t.target;b(this,h,e.value)},c])}else if(c instanceof HTMLInputElement){let t="",e="";switch(c.type){case"checkbox":case"radio":t="checked",e="change";break;default:t="value",e="input"}c.setAttribute(n??t,s+""),_.push([e,function(t){let e=t.target;b(this,h,e.value)},c])}else c instanceof HTMLSelectElement&&(c.setAttribute(n,s+""),_.push(["change",function(t){let e=t.target,s=this,r=(he.get(s)??{})[d];!(d in s)&&r&&g(s.wrapperComponent,d)===g(s,r)&&(s=s.wrapperComponent||s),b(s,h,e.value)},c]))}}),[ze.TAG]),dr=new WeakMap,pr=Ye((function(t,e){return(t,[e,s],r)=>{if(r&&e===r[0])return;let n=t;if(!dr.has(n)){let t=n.style.display;dr.set(n,"none"==t?"unset":t)}n.style.display=e?dr.get(n):"none",s&&s(n,e)}}),[ze.TAG]),fr=Ye((function(t,e){return(t,[e,s],r,{renderComponent:n,slotComponent:o})=>{if(r)return;e=e.bind(n);let i=Ft.get(o);i||(i={},Ft.set(o,i)),i[s||"default"]=e}}),[ze.SLOT]);class gr{static getCssText(t,e=!1){return r(t)?t:ht(A(t,((t,s)=>s.startsWith("--")?s+":"+t+(e?" !important":""):w(s)+":"+t+(e?" !important":""))),";")+";"}static setStyle(t,e){if(r(t)&&!j(t))return;let s=gr.getCssText(t);e.style.cssText=s}}const _r=Ye((function(...t){return(t,e,s,{renderComponent:r})=>{let n=t,o=st(e,((t,e)=>t+gr.getCssText(e)),""),i=Q(o.split(";").map((t=>t.split(":")[0]))),a=Q(n.style.cssText.split(";")),l=q(a,(t=>i.some((e=>t.trim().startsWith(e)))));n.style.cssText=o+l.join(";")}}),[ze.TAG]),mr=new WeakMap,Er=new WeakMap,vr=Ye((function(t,e){return(t,[e,s],r,{renderComponent:n})=>{let o=()=>Ss``,i=[],a=[];c(s,((t,e)=>{if(h(t))i.push(e),a.push(t);else{let e=t[0],s=t[1];i.push(e),a.push(s)}"default"===e&&(o=t)}));let l=tt(i,(t=>h(t)?t(e):t==e)),u=mr.get(t);mr.set(t,l);let d=Er.get(t);if(d||(d=[],Er.set(t,d)),!d[l]){let t=new ss((a[l]??o).call(n),n);d[l]=t}return r?u==l?[qe.REFRESH,a[l]??o]:[qe.REPLACE,a[l]??o,d[l]]:[qe.INIT,a[l]??o,d[l]]}}),[ze.TEXT,ze.SLOT]);function wr(){c(vt,((t,e)=>{customElements.define(e,t)}))}export{Xe as CompElem,gr as CssHelper,ie as Csscope,ks as Decorator,Cs as DecoratorType,Rs as DecoratorWrapper,qe as DirectiveUpdateTag,se as DomUtil,ze as EnterPointType,ur as ModelTriggerType,Ds as QueryCache,rs as Template,Se as _getObservedAttrs,Yt as _getSuper,Jt as _toUpdatePath,oe as addUninitializedSubComponentProp,zs as bind,Qs as classes,Ps as computed,Ms as createRef,Ns as css,ae as csscope,Is as debounced,xs as decorator,As as decoratorWithNoArgs,wr as defineComponents,Ye as directive,ts as directiveScopeChecker,Ls as event,Ys as forEach,ee as getBooleanValue,re as getSlotComponent,Ss as h,rr as html,ar as ifElse,cr as ifTrue,te as isBooleanProp,ne as isCompElemNode,Fs as makeState,hr as model,Os as onced,we as prop,Hs as query,Bs as queryAll,pr as show,zt as showError,qt as showTagError,Zt as showTagWarn,Qt as showWarn,fr as slot,Us as state,_r as styles,Ks as tag,$s as throttled,Ze as updateDirective,Gs as watch,vr as when};
7
+ import t,{toPath as e,some as s,isString as r,isUndefined as n,isBlank as o,closest as i,assign as a,isArray as l,each as c,isObject as u,isFunction as h,isSymbol as d,concat as p,startsWith as f,get as g,toArray as _,defaults as m,merge as E,clone as v,kebabCase as w,has as y,set as b,remove as S,size as N,includes as T,find as M,debounce as C,throttle as k,once as R,noop as x,map as A,flatMap as P,test as I,first as L,walkTree as O,filter as D,isEmpty as V,isNil as W,camelCase as H,isNull as B,isDefined as U,trim as j,isBoolean as F,parseJSON as K,cloneDeep as $,keys as G,groupBy as X,last as z,reject as q,compact as Q,intersect as Z,except as J,initial as Y,findIndex as tt,toString as et,reduce as st,snakeCase as rt,range as nt,split as ot,isEqual as it,replace as at,bind as lt,isMatch as ct,isElement as ut,join as ht}from"myfx";const dt="default",pt=/\s+\.?key\s*=/;var ft,gt;!function(t){t[t.RENDER=1]="RENDER",t[t.COMPUTED=2]="COMPUTED",t[t.DIRECTIVE=3]="DIRECTIVE"}(ft||(ft={})),function(t){t.Prod="prod",t.Dev="dev"}(gt||(gt={}));const _t={boolean:Boolean,string:String,number:Number,object:Object,array:Array,function:Function,undefined:Object},mt=new Map,Et={},vt={},wt=new WeakMap,yt=new WeakMap,bt=new WeakMap,St=new WeakMap,Nt=new Map,Tt=new Map,Mt=new WeakMap,Ct=new WeakMap,kt=new WeakMap,Rt=new WeakMap,xt=new WeakMap,At=new WeakMap,Pt=new WeakMap,It=new WeakMap,Lt=new WeakMap,Ot=new WeakMap,Dt=new WeakMap,Vt=new WeakMap,Wt=new WeakMap,Ht=new WeakMap,Bt=new Map,Ut=new WeakMap,jt=new WeakMap,Ft=new WeakMap,Kt=new WeakMap,$t="__data_",Gt="⟬Ċ⟭";class Xt{strings;vars;cssText;constructor(t,e){this.strings=t,this.vars=e}getCssText(){if(this.cssText)return this.cssText;let t="",e=this.strings.length-1;for(let s=0;s<=e;s++){const e=this.strings[s];let r=this.vars[s]??"";r instanceof Xt&&(r=r.getCssText()),t=t+e+r}return this.cssText=t,t}}function zt(t){console.error("[CompElem]",t)}function qt(t,e){console.error(`[CompElem <${t}>]`,e)}function Qt(...t){console.warn("[CompElem]",...t)}function Zt(t,e){console.warn(`[CompElem <${t}>]`,e)}function Jt(t){return e(t).join("-")}function Yt(t){return Object.getPrototypeOf(t)}function te(t){return t===Boolean||s(t,(t=>t===Boolean))}function ee(t){let e=t;return r(t)&&/(?:^true$)|(?:^false$)/.test(e)?e="true"===e:(n(e)||o(e))&&(e=!0),e}const se={getNodes(t,e){let s=t.nextSibling;if(!e)return[s];let r=[];for(;s&&s!==e;)r.push(s),s=s?.nextSibling;return r},insertBefore:function(t,e){if(!t.parentNode)return;let s=document.createDocumentFragment();s.append(...e),t.parentNode.insertBefore(s,t)},remove:function(t,e){if(t===e)return void t?.parentNode?.removeChild(t);let s=t.nextSibling;for(;s&&s!==e;)s?.parentNode?.removeChild(s),s=t.nextSibling},clear(t,e){if(!t)return;let s,r=document.createNodeIterator(t,NodeFilter.SHOW_COMMENT);for(r=document.createNodeIterator(t,NodeFilter.SHOW_COMMENT|NodeFilter.SHOW_ELEMENT);s=r.nextNode();)t!==s&&(s instanceof Comment||s instanceof Xe&&s.destroy())}};function re(t,e){let s=i(t,(t=>t.host&&t.host instanceof Xe),"parentNode");if(!s||s.host!==e)return s?s.host:void 0}function ne(t){return!!vt[t.tagName?.toLowerCase()]}function oe(t,e,s){let r=jt.get(t);r||(r=new Map,jt.set(t,r));let n=r.get(e)??{};r.set(e,a(n,s))}var ie;function ae(...t){return(e,s,r)=>{let n=r.get();return(l(n)?n:[n]).forEach((s=>{let r;if(s instanceof Xt){if(r=Wt.get(s.strings),!r){let t=s.getCssText();r=new CSSStyleSheet,r.replaceSync(t),Wt.set(s.strings,r)}}else s instanceof CSSStyleSheet&&(r=s);if(!r)return;let n=Ht.get(e);n||(n=new Map,Ht.set(e,n)),c(t,(t=>{if(t===ie.GLOBAL)return void(document.adoptedStyleSheets.includes(r)||(document.adoptedStyleSheets=[...document.adoptedStyleSheets,r]));let e=n.get(t);e||(e=[],n.set(t,e)),e.push(r)}))})),r}}function le(t,e){let s=e,r=Reflect.get(s[$t],t);if(ue.__collecting&&ue.__varPathList.push(t),pe.has(r)||fe.get(r)){let n=ge.get(r);n||(n=new Set,ge.set(r,n));let o=he.get(e);o||(o={},he.set(e,o));let i=pe.get(r)??r;if(fe.get(i)?.deref()!==e){let e=de.get(i);e&&(o[e[0]]=t)}return n.add(s.__thisRef),i}if(u(r)&&!h(r)&&!(r instanceof Node)&&!Object.isFrozen(r)){let e=Pt.get(s.constructor),n=e?.has(t);n||(e=It.get(s.constructor),n=e?.has(t)),r=n||"slots"===t?r:_e(r,s,t)}return r}function ce(t,e,s){let r=s;if(!r.__inited)return void Reflect.set(r[$t],t,e);let n=r[$t][t],o=Lt.get(r.constructor),i=o?.get(t),a=pe.get(n);if(i){if(!i.call(r,e,n,[t],e,n))return!0}else{if(Object.is(n,e))return!0;if(u(e)&&a===e)return!0}Reflect.set(r[$t],t,e),me(s,e,n,[t])}!function(t){t.INNER="inner",t.HOST="host",t.GLOBAL="global"}(ie||(ie={}));const ue={popDirectiveQ(){return this.__varPathList.reduceRight(((t,e)=>(t.includes(e)||t.unshift(e),t)),[])},start(){this.__collecting=!0,this.__varPathList=[]},end(t,e){t&&e&&t._regSubViewDeps(ue.popVarPathList(),e),this.__collecting=!1},popVarPathList(){let t=Array.from(new Set(this.__varPathList));return this.__varPathList=[],t},__varPathList:[],__collecting:!1},he=new WeakMap,de=new WeakMap,pe=new WeakMap,fe=new WeakMap,ge=new WeakMap;function _e(t,e,r){if(pe.has(t))return pe.get(t);if(fe.has(t)){if(r){let r=ge.get(t);r||(r=new Set,ge.set(t,r)),s(r.values(),(t=>t.deref()===e))||r.add(new WeakRef(e))}return t}const n=new Proxy(t,{get(t,s,r){if(!s)return;const n=Reflect.get(t,s,r);if(d(s))return n;if(h(n))return n;if("length"===s&&l(t))return n;if("__"===s.substring(0,2))return n;if(ue.__collecting){let t=de.has(r)?p(de.get(r)):[];t.push(s);let e=t.join(".");ue.__varPathList.push(e)}if(pe.has(n))return pe.get(n);let o=n;if(u(n)&&!h(n)&&!(n instanceof Node)&&!Object.isFrozen(n)){let t=de.has(r)?p(de.get(r)):[];o=_e(n,e),t.push(s),de.set(o,t),pe.set(n,o)}return o},set(t,s,r,n){if(!s)return!1;let o=t[s],i=de.get(n)??[],a=p(i,[s]),l=Lt.get(e.constructor),c=l?.get(a[0]),u=a.length>1,h=r,d=o;if(u&&(d=h=e._getPrivateData()[a[0]]),c){if(!c.call(e,h,d,a,r,o))return!0}else if(Object.is(o,r))return!0;let f=r,g=Reflect.set(t,s,f);me(e,f,o,a);let _=ge.get(n),m=[];return _?.forEach((t=>{let e=t.deref();if(!e)return;if(e.isDestroyed)return void m.push(t);let s=(he.get(e)??{})[a[0]],r=a.join(".");r=r.replace(a[0],s),me(e,f,o,r.split("."),h,d)})),m.forEach((t=>{let e=t.deref();he.delete(e),_.delete(t)})),g}});return de.has(n)||de.set(n,r?[r]:[]),pe.set(t,n),r&&fe.set(n,new WeakRef(e)),n}function me(t,e,s,r,n,o){n=n??e,o=o??s,r.length>1&&(o=n=t._getPrivateData()[r[0]]);let i=r.join(".");!function(t,e,s,r,n,o){let i=Yt(t.constructor),a=kt.get(t.constructor)??kt.get(i),l=Ct.get(t.constructor)??Ct.get(i),c=xt.get(t.constructor)??xt.get(i),u=Rt.get(t.constructor)??Rt.get(i),h=Mt.get(t.constructor)??Mt.get(i);a?.forEach((i=>{(r===i||f(i,r+".")&&!Object.is(g(t._getPrivateData(),i),g(e,i))||f(r,i+".")&&l?.includes(i)&&!Object.is(g(t._getPrivateData(),i),g(e,i)))&&p(_(u[i]),_(c[i])).forEach((a=>{a&&!0!==h.get(i)&&(t._watchUpdateArgsInNextTick?.set(a,{newValue:e,oldValue:s,chain:r.split("."),rootObjNew:n,rootObjOld:o,fullMatch:i===r}),t._watchUpdateSetInNextTick?.add(a),h.has(i)&&h.set(i,!0))}))}))}(t,e,s,i,n,o),function(t,e){let s=Ot.get(t.constructor);s?.has(e)&&s.get(e)?.forEach((e=>{t._computedUpdateSetInNextTick.add(e)}))}(t,i),function(t,e){let s=Dt.get(t.constructor);if(!s)return;let r=e.split("."),n="";r.forEach((e=>{n=n?n+"."+e:e,s.has(n)&&(t._cssUpdateInNextTick=!0)}))}(t,i),function(t,e,s,r){t._notify(e,s,r)}(t,n,o,r)}const Ee=new Map;class ve{static nextSet=new Set;static nextPending=!1;static next;static flush(){ve.nextPending=!1;let t=Array.from(ve.nextSet);ve.nextSet.clear(),Ee.clear(),t.forEach((t=>t())),t=null}static pushNext(t){ve.nextSet.add(t),ve.nextPending||(ve.nextPending=!0,ve.next())}}function we(t){if(1===arguments.length)return(e,s,r)=>{t.required=t.required||!1,t.attribute=!1!==t.attribute,ye(e,s,t)};let e=arguments[0],s=arguments[1],r=arguments[2];t={type:void 0,required:!1,attribute:!0},r&&"function"==typeof r.type&&(t=m(r,t),r=void 0),t.shallow=t.shallow||!1,ye(e,s,t)}function ye(t,e,s,r){let n;if(!bt.has(t.constructor)){const e={};let s=t.constructor;for(;(s=Yt(s))!==Xe;)E(e,v(bt.get(s)??{}));n=new Set,c(e,((t,e)=>{if(t.attribute){let t=w(e);n?.add(t)}})),Tt.set(t.constructor,n),bt.set(t.constructor,e)}if(s.attribute){n||(n=Tt.get(t.constructor));let s=w(e);n?.add(s)}if(s.model){let s=St.get(t.constructor);s||(s=[],St.set(t.constructor,s)),s.includes(e)||s.push(e)}if(y(t.constructor,"observedAttributes")||(t.constructor.observedAttributes=[]),n&&(t.constructor.observedAttributes=_(n)),b(bt.get(t.constructor),e,s),s.hasChanged){let r=Lt.get(t.constructor);r||(r=new Map,Lt.set(t.constructor,r)),r.set(e,s.hasChanged)}if(s.shallow){let s=It.get(t.constructor);s||(s=new Set,It.set(t.constructor,s)),s.add(e)}Reflect.defineProperty(t,e,{get(){return le(e,this)},set(s){St.get(t.constructor)?.includes(e)&&function(t,e,s){s.emit("update:"+t,{value:e})}(e,s,this)}})}(()=>{const t=Promise.resolve(),e=ve.flush;ve.next=()=>{t.then(e)}})();const be=new Set;function Se(t){return Tt.get(t)??Tt.get(Yt(t))??be}const Ne=["resize","outside","mutate"],Te=new WeakMap,Me=[],Ce=[],ke=[],Re=new WeakSet,xe=new ResizeObserver((t=>{for(const e of t){const t=Array.isArray(e.contentBoxSize)?e.contentBoxSize[0]:e.contentBoxSize,s=Array.isArray(e.borderBoxSize)?e.borderBoxSize[0]:e.borderBoxSize;if(!Re.has(e.target)){Re.add(e.target);continue}let r=Te.get(e.target);r&&r.forEach((r=>{r({target:e.target,contentBoxSize:t,borderBoxSize:s,type:"resize"})}))}}));var Ae;!function(t){t.Child="child",t.Tree="tree",t.Attr="attr",t.Char="char"}(Ae||(Ae={}));const Pe=new WeakMap,Ie=new MutationObserver((t=>{for(let e=0;e<t.length;e++){const s=t[e];let r=Pe.get(s.target);if(!r)return;let n={target:s.target},o=null;switch(s.type){case"subtree":n.type=Ae.Tree,o=r[Ae.Tree];break;case"childList":n.type=Ae.Child,n.addedNodes=s.addedNodes,n.removedNodes=s.removedNodes,o=r[Ae.Child];break;case"attributes":n.type=Ae.Attr,n.attributeName=s.attributeName,n.oldValue=s.oldValue,o=r[Ae.Attr];break;case"characterData":n.type=Ae.Char,n.oldValue=s.oldValue,o=r[Ae.Char]}o&&(n.type="mutate",o(n))}}));function Le(e,s,r,n,o,i){if("resize"===e)return function(t,e,s,r){let n=Te.get(t);n||(n=[],Te.set(t,n));let o=xe;if(r){let s=e;e=(...r)=>{s(...r),S(n,(t=>t===e)),N(n)<1&&(o.unobserve(t),Te.delete(t))}}return n.push(e),xe.observe(t),(s=!1)=>{S(n,(t=>t===e)),N(n)<1&&(o.unobserve(t),Te.delete(t),s&&(o=t=null))}}(s,r,0,i);if("outside"===e)switch(n[0]){case"mousedown":return function(e,s){return Me.push([e,s]),(r=!1)=>{t.remove(Me,(t=>t[0]===e&&t[1]===s))}}(s,r);case"dblclick":return function(e,s){return ke.push([e,s]),(r=!1)=>{t.remove(ke,(t=>t[0]===e&&t[1]===s))}}(s,r);default:return function(e,s){return Ce.push([e,s]),(r=!1)=>{t.remove(Ce,(t=>t[0]===e&&t[1]===s))}}(s,r)}else if("mutate"===e)return function(t,e,s){let r=T(s,"child"),n=T(s,"attr"),o=T(s,"char"),i=T(s,"tree"),a=Pe.get(t);if(!a)return a={},Pe.set(t,a),r&&(a[Ae.Child]=e),n&&(a[Ae.Attr]=e),o&&(a[Ae.Char]=e),i&&(a[Ae.Tree]=e),Ie.observe(t,{childList:r,attributes:n,characterData:o,subtree:i}),(e=!1)=>{Pe.delete(t),e&&(t=null)}}(s,r,n)}document.addEventListener("mousedown",(t=>{let e=g(t.composedPath(),0,t.target);Me.forEach((([s,r])=>{s.contains(e)||s.contains(i(e,(t=>t instanceof ShadowRoot),"parentNode")?.host)||r({type:"outside",target:s,modifier:"mousedown",event:t})}))}),!1),document.addEventListener("click",(t=>{let e=g(t.composedPath(),0,t.target);Ce.forEach((([s,r])=>{s.contains(e)||s.contains(i(e,(t=>t instanceof ShadowRoot),"parentNode")?.host)||r({type:"outside",target:s,modifier:"click",event:t})}))}),!1),document.addEventListener("dblclick",(t=>{let e=g(t.composedPath(),0,t.target);ke.forEach((([s,r])=>{s.contains(e)||s.contains(i(e,(t=>t instanceof ShadowRoot),"parentNode")?.host)||r({type:"outside",target:s,modifier:"dblclick",event:t})}))}),!1);const Oe=/,|^(debounce:.+)|(debounce$)/,De=/,|^(throttle:.+)|(throttle$)/,Ve="native",We={esc:"escape"},He=()=>{};function Be(t,e,s,r){let n,o=t.split("."),i=o.shift(),a=o.includes("once"),l=e??He;if(n=M(o,(t=>Oe.test(t)))){let t=n.split(":");l=C(l,parseInt(t[1])||100)}if(n=M(o,(t=>De.test(t)))){let t=n.split(":");l=k(l,parseInt(t[1])||100)}if(a&&(l=R(l)),vt[s.tagName?.toLowerCase()]&&(s!==r||o.includes(Ve)||o.push(Ve),!o.includes(Ve)))return Ue(s,r,i,l),x;if(function(t){return Ne.includes(t)}(i))return Le(i,s,l,o,0,a);let c=t=>{if(o.includes("prevent")&&t.preventDefault(),o.includes("stop")&&t.stopPropagation(),!o.includes("self")||t.target===t.currentTarget){if(t instanceof MouseEvent){if(o.includes("left")&&0!=t.button)return;if(o.includes("right")&&2!=t.button)return;if(o.includes("middle")&&1!=t.button)return}else if(t instanceof KeyboardEvent){if(S(o,(t=>"ctrl"==t))[0]&&!t.ctrlKey)return;if(S(o,(t=>"alt"==t))[0]&&!t.altKey)return;if(S(o,(t=>"shift"==t))[0]&&!t.shiftKey)return;if(S(o,(t=>"meta"==t))[0]&&!t.metaKey)return;let e=A(o,(t=>We[t]||t));if(N(e)>0&&!e.includes(t.key.toLowerCase()))return}l(t)}},u={capture:o.includes("capture")||!1,passive:o.includes("passive")||!1};return s.addEventListener(i,c,u),(t=!1)=>{s.removeEventListener(i,c,u),t&&(s=null)}}function Ue(t,e,s,r){let n=g(t,"__c_emit_event_")??e._subComponentEventSn++;b(t,"__c_emit_event_",n);let o=e._subComponentEventMap.get(n);o||(o={},e._subComponentEventMap.set(n,o)),o[s]=r}let je=[],Fe=0;const Ke=new WeakMap,$e={},Ge="slots";class Xe extends HTMLElement{static defaults(t){je=P(t.css,(t=>{if(r(t)){let e=new CSSStyleSheet;return e.replaceSync(t),e}return t instanceof CSSStyleSheet?t:[]})),t.global,c(t,((t,e)=>{I(e[0],/[A-Z]/)}))}#t;#e={};__data_={};#s={};#r;__updateTree;_eventBindList;__docoEventMap;__updateSubViewDeps;_cssUpdateInNextTick=!1;_cssVarOldValueMap;_watchUpdateSetInNextTick;_watchUpdateArgsInNextTick;_computedUpdateSetInNextTick;_subComponentEventSn=0;_subComponentEventMap=new Map;get[Symbol.toStringTag](){return this.constructor.name}get cid(){return this.#t}get attrs(){return this.#n}get props(){return this.#o}get renderRoot(){return this.#i?.deref()}get renderRoots(){return this.#a.flatMap((t=>t.deref()??[]))}get parentComponent(){return this.#l?.deref()}get wrapperComponent(){return this.#c?.deref()}get slots(){return $e}get slotHooks(){return this.#u}get cssSheets(){return Ht.get(this.constructor)?.get(ie.INNER)}get isMounted(){return this.#h}#n;#o;#i;#a;#l;#c;#d={};#u={};#p={};#h=!1;#f=!1;#g;get cssVars(){return{}}__inited=!1;#_=!1;#m;__thisRef;constructor(...t){super(),this.#t=Fe++,this.__updateTree=[],this.__thisRef=new WeakRef(this),this.#m=this.#E.bind(this),1===N(t)&&(this.#o={},a(this.#o,L(t))),Reflect.getOwnPropertyDescriptor(this.constructor.prototype,"slots")||Reflect.defineProperty(this.constructor.prototype,"slots",{get(){return le("slots",this)},set(t){ce("slots",t,this)}});let e=Nt.get(this.constructor)??Nt.get(Yt(this.constructor));e&&e.sort(((t,e)=>e.priority-t.priority)).forEach((t=>t.create(this))),this.#v=this.#w.bind(this)}insertStyleSheet(t){if(!this.#r)return null;let e;if(t instanceof Xt){if(!e){let s=t.getCssText();e=new CSSStyleSheet;try{e.replaceSync(s)}catch(t){}}}else if(t instanceof CSSStyleSheet){if(this.#r.adoptedStyleSheets.includes(t))return t;e=t}return e&&(this.#r.adoptedStyleSheets=[...this.#r.adoptedStyleSheets,e]),e}get rootComponent(){let t=this;for(;t.parentComponent;)t=t.parentComponent;return t}#v;connectedCallback(){let t=i(this.parentNode,(t=>t instanceof Xe||t.host instanceof Xe),"parentNode");this.#l=t?t instanceof Xe?new WeakRef(t):new WeakRef(t.host):void 0;let e=Kt.get(this);e&&(this.#c=new WeakRef(e),Kt.delete(this));let s=Ht.get(this.constructor)?.get(ie.HOST);if(s){let t=this.#c?.deref()?.shadowRoot??this.#l?.deref()?.shadowRoot??this.ownerDocument;this.#c&&!this.#c.deref()?.shadowRoot?.contains(this)&&(t=i(this,(t=>t instanceof HTMLDocument||t instanceof ShadowRoot),"parentNode")),c(s,(e=>{t.adoptedStyleSheets.includes(e)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}))}this.setup(),this.__bindEvents()}disconnectedCallback(){this.__unbindEvents()}__bindEvents(){let t=this._eventBindList;c(t,(t=>{let[e,s,r,n]=t;if(n)return;if(!r)return;let o=Be(e,s&&g(globalThis,s.name)!==s?s.bind(this):s,r,this);t[3]=o}));let e=mt.get(this.constructor);N(e)>0&&(this.__docoEventMap||(this.__docoEventMap=new Map),c(e,(({name:t,targetFn:e,fnName:s})=>{if(this.__docoEventMap.has(t+"@"+s))return;let r=e?e(this):this,n=g(this,s),o=Be(t,n&&g(globalThis,n.name)!==n?n.bind(this):n,r,this);this.__docoEventMap.set(t+"@"+s,o)})))}__unbindEvents(){c(this._eventBindList,(t=>{let[,,,e]=t;e&&e(),t[3]=null}));let t=[];c(this.__docoEventMap,((e,s)=>{e&&e(),t.push(s)})),t.forEach((t=>this.__docoEventMap.delete(t)))}beforeDestroyed(){}destroyed(){}get isDestroyed(){return this.#y}#y=!1;destroy(){if(this.#y)return;this.#y=!0;let t=Nt.get(this.constructor)??Nt.get(Yt(this.constructor));if(t&&t.sort(((t,e)=>e.priority-t.priority)).forEach((t=>{t.destroy(this)})),this.beforeDestroyed(),this.__unbindEvents(),this.__docoEventMap?.clear(),this.__docoEventMap=this._eventBindList=null,Ut.get(this)?.clear(),Ut.delete(this),this._watchUpdateArgsInNextTick?.clear(),this._watchUpdateSetInNextTick?.clear(),this._computedUpdateSetInNextTick?.clear(),this._computedUpdateSetInNextTick=null,this.__updateSubViewDeps?.clear(),this.#l){let t=this.#l.deref();t&&O(t.__updateTree,(e=>{e.__destroyed||e.node?.deref()===this&&(e.destroy(t),S(e.parent?e.parent.children:t.__updateTree,(t=>t===e)))}))}c(this.__updateTree,(t=>t?.destroy(this))),c(this.#d,(t=>{Ke.delete(t),t.remove()})),c(this.#p,(t=>{c(t,(t=>t.remove()))})),c(this.__data_.slots,((t,e)=>{c(t,(t=>t.remove()))})),this.#b.clear(),this.#m=this.__thisRef=this.#p=this.#d=this.#b=this.#e=this.__data_.slots=null,this.remove(),this.#S=this.#i=this.#a=this.#r=this.#s=this.#n=this.#o=this.#i=this.#a=this.#u=this.#v=this.__data_=this.__updateTree=this.#l=this._asyncDirectives=this.#c=null,this.destroyed()}setup(){if(this.__inited)return;if(this.#_)return;this.#_=!0;const t=this.#N();this.propsReady(t);for(const e in t){const s=t[e];this.__data_[e]=s}this.#T(),this.__data_.slots={},Reflect.defineProperty(this.__data_,"__isData",{enumerable:!1,value:!0});let e=Yt(this.constructor);if(kt.get(this.constructor)??kt.get(e)){this._watchUpdateSetInNextTick=new Set,this._watchUpdateArgsInNextTick=new Map;let t=Mt.get(this.constructor)??Mt.get(e),s=At.get(this.constructor)??At.get(e);c(s,((e,s)=>{let r=g(this,s);e.forEach((t=>{t.call(this,r,void 0,s)})),t.has(s)&&t.set(s,!0)}))}let s=a({},wt.get(this.constructor),wt.get(e));if(s){this._computedUpdateSetInNextTick=new Set;let t=Ot.get(this.constructor);t?c(s,((t,e)=>{this[$t][e]=t.call(this)})):(t=new Map,Ot.set(this.constructor,t),c(s,((e,s)=>{b(e,"key",s),ue.start(),this[$t][s]=e.call(this),ue.end(),ue.popVarPathList().forEach((s=>{let r=t.get(s);r||(r=new Set,t.set(s,r)),r.add(e)}))})))}ue.start();let r=this.render();ue.end();let n,i=ue.popVarPathList();this.constructor.prototype._viewDeps||(this.constructor.prototype._viewDeps=i),null===r?(this.#a=[],this.#i=void 0):(this.#r=this.attachShadow({mode:"open"}),this.#r.adoptedStyleSheets=[...je,...Ht.get(this.constructor)?.get(ie.INNER)??[]],n=function(t,e){let s,r=[];_s.has(e.constructor)?(s=_s.get(e.constructor),r=vs(t)):(s=new ss(t,e,r),_s.set(e.constructor,s));let[n,o]=ws(e,s,r);return e.__updateTree=o,n}(r,this),n&&N(n.children)>0&&(this.#a=D(n.children,(t=>t.nodeType===Node.ELEMENT_NODE)).map((t=>new WeakRef(t))),this.#i=this.#a[0])),this.__inited=!0,this.#M();let l=Ft.get(this);l&&(this.#u=l,Ft.delete(this)),c(this.#u,((t,e)=>{this.#C(e)}));const u=this;let h=Nt.get(this.constructor)??Nt.get(Yt(this.constructor));h&&h.sort(((t,e)=>e.priority-t.priority)).forEach((t=>{t.beforeMount(this,((t,e)=>(u.__data_[t]=e,u.__data_[t])))})),this.beforeMount(),setTimeout((()=>{if(this.isDestroyed)return;this.#h=!0,ue.start();let t=this.cssVars;if(ue.end(),!V(t)){this._cssVarOldValueMap={};let e=Dt.get(this.constructor);e||(e=new Set(ue.popVarPathList()),Dt.set(this.constructor,e));let s="";c(t,((t,e)=>{let r="--"+w(e).replace(/^-+/,"");(o(t)||W(t))&&(t="initial"),this._cssVarOldValueMap[r]=t,s+=";"+r+":"+t})),this.style.cssText+=s}n&&N(n.children)>0&&(this.#r.append(n),jt.delete(this)),h&&h.forEach((t=>{t.mounted(this,((t,e)=>(u.__data_[t]=e,u.__data_[t])))})),this.#g&&this.#g.forEach((t=>ve.pushNext(t))),this.#f&&ve.pushNext(this.#v),this.__bindEvents(),this.mounted()}),0)}propsReady(t){}render(){return null}beforeMount(){}mounted(){}#E(t){let e=t.currentTarget,s="";c(this.#d,((t,r)=>{if(t===e)return s=r,!1})),this.__inited&&this.#k(e,s===dt?"":s)}#k(t,e){this.#M();let s=g(this.#e[e],"props");s&&c(this.slots,((t,e)=>{t.filter((t=>t.nodeType===Node.ELEMENT_NODE)).forEach((t=>{t instanceof Xe?t.updateProps(s):c(s,((e,s)=>{if(t instanceof HTMLSlotElement){let r=Ke.get(t);if(r){let n=t.name||dt,o=r.#e[n];o||(o=r.#e[n]={props:{}}),o.props||(o.props={}),o.props[s]=e,r.#k(t,n)}}else t.setAttribute(s,e)}))}))})),this.slotChange(t,e)}slotChange(t,e){}attributeChangedCallback(t,e,s){if(!this.__inited)return;if(Object.is(s,e))return;"undefined"===s&&(s=null);let r=H(t),n=bt.get(this.constructor)??bt.get(Yt(this.constructor));if(te(g(n,r).type)){let t=!B(s)&&ee(s);if(g(this,r)===t)return}this.#R(t,e,s)}shouldUpdate(t){return!0}updated(t){}_notify(t=void 0,e,s,r,n){let o=[];for(let i=0;i<s.length;i++){const a=s[i];o.push(a);let l=g(this,o)??t,c=Jt(o);this.#s[c]={value:l,chain:c===Ge?[Ge]:o,oldValue:e,end:o.length===s.length,subNewValue:r,subOldValue:n}}this.isMounted?ve.pushNext(this.#v):this.#f=!0}#w(){if(N(this.#s)<1)return;if(!this.isMounted)return;const t=this.#s;if(this.#s={},!this.shouldUpdate(t))return;let e=Nt.get(this.constructor)??Nt.get(Yt(this.constructor));e&&e.sort(((t,e)=>e.priority-t.priority)).forEach((e=>{e.updated(this,t)}));let s=!1,r=new Set,n=this.constructor.prototype._viewDeps;if(c(t,((t,e)=>{if(!s&&n?.includes(e)&&(s=!0),this.__updateSubViewDeps?.has(e)){let t=this.__updateSubViewDeps.get(e);t&&t.forEach((t=>{r.add(t)}))}})),this._watchUpdateSetInNextTick?.forEach((t=>{let{newValue:e,oldValue:s,chain:r,rootObjNew:n,rootObjOld:o,fullMatch:i}=this._watchUpdateArgsInNextTick.get(t),a=i?e:n,l=i?s:o;t.call(this,a,l,r,e,s)})),this._watchUpdateSetInNextTick?.clear(),this._watchUpdateArgsInNextTick?.clear(),this._computedUpdateSetInNextTick?.forEach((t=>{let e=g(t,"key"),s=this.__data_[e],r=t.call(this);(u(r)||r!==s)&&(this.__data_[e]=r,this._notify(r,s,[e]))})),this._computedUpdateSetInNextTick?.clear(),this._cssUpdateInNextTick){let t=this.cssVars;c(t,((t,e)=>{let s="--"+w(e).replace(/^-+/,"");this._cssVarOldValueMap[s]!=t&&((o(t)||W(t))&&(t="initial"),this._cssVarOldValueMap[s]=t,this.style.setProperty(s,t+""))}))}this.#i?.deref()&&(s&&bs(vs(this.render()),this,this.__updateTree,r,t),N(r)>0&&r.forEach((e=>{!function(t,e,s,r){if(!t||t.__destroyed)return;let n=t.node.deref();const[o,i,a,l]=t.value;let c,u=re(n,e);if(!s){let s=o(n,t.value[1],i,{renderComponent:e,slotComponent:u,varChain:l,updatedMap:r,pointType:g(Bt.get(a),[0],ze.TEXT)});if(!s)return;if(s[0]!==qe.REFRESH)return;c=h(s[1])?vs(s[1].call(e,t.value[1][0])):s[1]}if(!c)return;bs(c,e,t.children,void 0,r)}(e,this,void 0,t)}))),this.#b.forEach((t=>{this.#C(t)})),this.updated(t)}#N(){let t=bt.get(this.constructor)??bt.get(Yt(this.constructor)),e=this.attributes,s=this.tagName,r=E(this.#o??{},jt.get(this.wrapperComponent)?.get(this)??{}),o={};c(e,(({name:e,value:s})=>{if(e[0]===is||e[0]===as||e[0]===ls||e===hs||"slot"===e)return;let r=H(e);t&&!t[r]&&(o[e]=s)})),this.#n=this.#n?a(this.#n,o):o;let i={};if(!t)return i;let h=Object.keys(t),d=h.length;for(let o=0;o<d;o++){const a=h[o],c=w(a),d=this.hasAttribute(c);let p,f=t[a],_=y(r,a),m=g(this,a);if(!("_defaultValue"in f)&&(f._defaultValue=m,!f.type)){n(m)&&qt(s,"Prop '"+a+"' has neither propType nor defaultValue be used for type inference");let t=typeof m;l(m)&&(t="array");let e=_t[t];f.type=e}if(_)p=W(r[a])?m:r[a];else{p=m;let t=e.getNamedItem(c)||e.getNamedItem(as+c)||e.getNamedItem(c+as);t&&(_=!0,p=t.value)}if(f.required&&!_){qt(s,"Prop '"+a+"' is required");break}p=this.#x(t,a,p,d),f.attribute&&U(p)&&!u(p)&&this.#A(f,a,p),this.__data_[a]=p,i[a]=p,delete this[a]}return i}#A(t,e,s){let r=w(e),n=j(s);te(t.type)?(n=ee(s),F(n)?n&&!this.hasAttribute(r)?this.toggleAttribute(r,!0):!n&&this.hasAttribute(r)&&this.toggleAttribute(r,!1):this.getAttribute(r)!==n&&this.setAttribute(r,n)):this.getAttribute(r)!==n&&this.setAttribute(r,n)}#P(t,e){let s=t;try{for(let r=0;r<e.length;r++){const n=e[r];s=n===Boolean?ee(t):n===Number?Number(t):n===String?String(t):n===Object||n===Array?K(t):n===Date?new Date(t):new n(t)}}catch(e){qt(this.tagName,"Convert attribute error with "+t)}return s}#x(t,e,n,o){let i=t[e];if(!i)return n;let a=i.isValid,c=i.type,u=l(c)?c:[c],h=i.converter,d=n;if(!s(u,(t=>t===String))&&r(d)&&!B(d))try{d=h?h(d):this.#P(d,u)}catch(t){qt(this.tagName,`Convert attribute '${e}' error with `+d)}for(let t=0;t<u.length;t++){"Boolean"===u[t].name&&o&&(d=ee(d))}if(W(d))return d;let p=typeof d,f=!U(d);for(let t=0;t<u.length;t++){const e=u[t];if(I(p,e.name,"i")||d instanceof e||Object.prototype.toString.call(d)===Object.prototype.toString.call(e.prototype)){f=!0;break}}return f||qt(this.tagName,`Invalid prop '${e}'. expected '${u.map((t=>t.name||t))}' but got '${p}'`),a&&(a.call(this,d,this.__data_)||qt(this.tagName,`Invalid prop '${e}'. IsValid() check failed`)),d}#T(){let t=yt.get(this.constructor)??yt.get(Yt(this.constructor));t&&c(t,((e,s)=>{let r=t[s],n=g(this,s);if(r){let t=r.prop;n=t?$(this.__data_[t]):g(this,s)}this.__data_[s]=n,delete this[s]}))}#S=C(this.propsReady,100);updateProps(t,e=!1){let s=bt.get(this.constructor)??bt.get(Yt(this.constructor));if(!s)return;if(!this.__inited)return void a(this.#o,t);let r=[];c(t,((t,n)=>{let o=H(n),i=s[o];if(!i)return;t=this.#x(s,o,t);let a=this.__data_[o];if(!e){let e=Lt.get(this.constructor),s=e?.get(o);if(s){if(!s.call(this,t,a,[o],t,a))return!0}else if(u(t)){let e=It.get(this.constructor);if(e?.has(o)&&Object.is(a,t))return!0}else if(Object.is(a,t))return!0}i.attribute&&U(t)&&!u(t)&&r.push([i,o,t]),b(this.__data_,o,t),me(this,t,a,[o])})),a(this.#o,t),r.forEach((([t,e,s])=>{this.#A(t,e,s)})),this.#o&&this.#S(this.#o)}_initProps(t,e){this.#o=E(this.#o||{},t),this.#n=E(this.#n||{},e),c(t,((t,e)=>{if(u(t)){let s=de.get(t);if(s){let t=this.wrapperComponent?yt.get(this.wrapperComponent?.constructor):null,r=s[0];if(t&&t[r]){let s=bt.get(this.constructor);b(s,[e,"shallow"],t[r].shallow)}}}}))}_bindSlot(t,e,s){this.#d[e]||(this.#d[e]=t,Ke.set(t,this));let r="slotchange",n=Be(r,this.#m,t,this);if(this._eventBindList.push([r,this.#m,t,n]),!V(s)){let t=this.#e[e];t||(t=this.#e[e]={}),t.props=s}}#b=new Set;_updateSlot(t,e,s){let r=this.#d[t],n=this.#u[t];if(!n&&!r)return;let o=this.#e[t];if(e&&(o.props||(o.props={}),o.props[e]=s),n)this.#b.add(t);else{let t=r.assignedElements({flatten:!0});for(let r=0;r<t.length;r++){t[r].setAttribute(e,s+"")}}}#M(){if(!this.#i)return;let t=G(this.#d);if(V(t))return;const e=P(this.childNodes,(t=>t.nodeType===Node.COMMENT_NODE?[]:t instanceof HTMLSlotElement?t.assignedNodes({flatten:!0}):t));let s=X(e,(e=>{if(e.nodeType===Node.TEXT_NODE&&t.includes(dt))return dt;if(e instanceof Element){let s=e.getAttribute("slot")||dt;if(t.includes(s))return s}}));if(V(s))return void(this.slots={});c(s,((t,e)=>{if(e){for(;t.length>0;){let e=t[0];if(!(e.nodeType===Node.TEXT_NODE&&o(e.textContent)||e instanceof HTMLSlotElement&&V(e.assignedNodes({flatten:!0}))))break;t.shift()}for(;t.length>0;){let e=z(t);if(!(e.nodeType===Node.TEXT_NODE&&o(e.textContent)||e instanceof HTMLSlotElement&&V(e.assignedNodes({flatten:!0}))))break;t.pop()}}}));let r={};c(s,((t,e)=>{V(t)||(r[e]=t)})),this.slots=r}#C(t){let e=this.#u[t];if(!e)return;let s=this.#e[t];if(!this.__data_.slots)return;if(!this.__data_.slots[t])return;this.renderAsync(e,g(s,"props"));const r=this._asyncDirectives.get(e);let n=r?.buildView(e(g(s,"props"))),o=q(_(n),(t=>t.nodeType===Node.COMMENT_NODE));if(o){let e=this.#p[t];if(!V(e))for(let t=0;t<e.length;t++){const s=e[t];s.parentNode?.removeChild(s)}this.#p[t]=o,this.append(...o),this.#b.clear()}}_asyncDirectives=new WeakMap;renderAsync(t,...e){}#R(t,e,s){if(!this.__inited)return;if(Se(this.constructor).has(t)){let e=H(t);if(B(s)){let t=bt.get(this.constructor)??bt.get(Yt(this.constructor));t&&(s=t[e]._defaultValue)}this.updateProps({[e]:s})}}_regSubViewDeps(t,e){this.__updateSubViewDeps||(this.__updateSubViewDeps=new Map),t.forEach((t=>{let s=this.__updateSubViewDeps.get(t);s||(s=new Set,this.__updateSubViewDeps.set(t,s)),s.add(e)}))}_getPrivateData(){return this.__data_}emit(t,e={},s){if(s&&(e.event=s),e.target=this,y(this.#n,"emit-native"))this.dispatchEvent(new CustomEvent(t,{bubbles:!1,composed:!1,cancelable:!0,detail:e}));else{let s=g(this,"__c_emit_event_");this.wrapperComponent?._callEmitEvent(s,t,e)}}_callEmitEvent(t,e,s){let r=this._subComponentEventMap.get(t),n=g(r,e);h(n)&&n.call(this,s)}nextTick(t){if(!this.isMounted)return this.#g||(this.#g=[]),void this.#g.push(t);ve.pushNext(t)}forceUpdate(){c(this.__data_,((t,e)=>{this.#s[e]={value:void 0,chain:void 0}})),this.#w()}}var ze,qe,Qe;function Ze(t,e,s,r,n,o,i,a,u,h){let d,p=g(Bt.get(t),[0],"");if([ze.TEXT,ze.SLOT].includes(p)?(ue.start(),d=n(e,s,r,{renderComponent:o,slotComponent:i,varChain:a,updatedMap:h,pointType:p}),ue.end(o,u)):d=n(e,s,r,{renderComponent:o,slotComponent:i,varChain:a,updatedMap:h,pointType:p}),!d)return;let[m,E,v,w,y,N]=d;if(m===qe.NONE)return;if(m===qe.REFRESH)return;let T=N;l(N)||(T=A(N,((t,e)=>t)));let M=g(e,"__anchor__"),C={};c(G(e),(t=>{"__anchor__"!==t&&f(t,"__c-")&&(C[t]=g(e,[t]))}));let k=u.subViewRootNodes,R=u.children;if(m===qe.REMOVE){let t=[];c(k,((e,s)=>{if(l(e))c(e,(t=>{let e=t.deref();e.remove(),e instanceof Xe&&e.destroy()}));else{let s=e.deref();s.remove(),t.push(e),s instanceof Xe&&s.destroy()}})),t.forEach((t=>{S(k,(e=>e===t))})),R?.forEach(((t,e)=>{t.destroy(o),R[e]=null})),u.children=Q(R),l(k)?u.subViewRootNodes=[]:u.subViewRootNodes={}}else if(m===qe.REPLACE){c(k,(t=>{let e=t.deref();e.remove(),e instanceof Xe&&e.destroy()})),R?.forEach(((t,e)=>{t.destroy(o),R[e]=null})),u.children=Q(R);let[,t,s]=d;ys(e,u,t,s,o)}else if(m===qe.UPDATE){if(V(k))return void ys(e,u,y,E,o,N,((t,e,s)=>v[s]));let t={},s={};c(w,(s=>{let r=t[s];r||(r=t[s]=[]),D(e.parentElement.childNodes,(t=>g(t,["__c-"+M])==s)).forEach((t=>{r.push(t)}))})),u.children?.forEach((t=>{s[t.key]?s[t.key].push(t):s[t.key]=[t]}));let r,n=w,i=v,a=Z(w,v),l=J(w,a),d=[],p=[],f=!1;if(!V(i)){let e=-1,s=[],r=[],o=0,a=0;for(;a<i.length;a++){const l=i[a];let c=n.findIndex((t=>t===l));if(c<0){let e=i[a-1];t[l]=[],d.push({refKey:e,newKey:l}),o++}else if(c>-1&&c!==a-o){if(e<0||1===Math.abs(e-c)){let e=z(s),r=0===a?Qe.AFTER_BEGIN:e?e.newKey:i[a-1],n=!1;0!==a&&V(t[r])&&(n=!0),s.push({newKey:l,refKey:r,refNew:n})}else{r.push({moveGroup:s,moveIndex:a+s.length});let e=i[a-1],n=!1;V(t[e])&&(n=!0),s=[],s.push({newKey:l,refKey:e,refNew:n})}e=c}}if(s.length>0&&r.push({moveGroup:s,moveIndex:a+s.length}),r.length>0){f=!0;let e=r.sort(((t,e)=>t.moveGroup.length-e.moveGroup.length));if(e.length<2){let{moveGroup:s}=e[0];if(s.length>1){let t=z(s).refKey;s[s.length-2].newKey===t&&(s=Y(s))}Je(s,t,w)}else{let s=z(e).moveIndex;1===Math.abs(e[e.length-2].moveIndex-s)&&(e=Y(e)),e.forEach((({moveGroup:e})=>{e[0].refNew?p.push(e):Je(e,t,w)}))}}}if(d.length>0&&(d.forEach((e=>{let s=tt(v,(t=>t==e.newKey)),r=T[s],n=vs(y.call(o,r,e.newKey,s)),[i,a]=ws(o,E,n);e.fragment=i,c(a,(t=>{t.key=e.newKey,u.children?.push(t)}));let l=_(i.childNodes),h=t[e.newKey];c(l,(t=>{h.push(t),i.childNodes.forEach((t=>b(t,"__c-"+M,e.newKey+""))),c(C,((e,s)=>b(t,s,e)))}))})),o.__bindEvents(),r=function(t){let e,s=[];return t.forEach((t=>{let r=z(s);r&&e===t.refKey?(r.group||(r.group=[r.fragment]),r.group.push(t.fragment)):s.push(t),e=t.newKey})),s}(d),r.forEach(((s,r)=>{let n=s.fragment,o=t[s.refKey??w[0]],i=L(o),a=z(o);if(s.group){let t=document.createDocumentFragment();t.append(...s.group),n=t}i===e?i.before(n):s.refKey?"string"==typeof i||a.after(n):i.before(n)}))),c(p,(e=>{Je(e,t,w)})),l.forEach((e=>{t[e].forEach((t=>{t.parentNode?.removeChild(t)})),s[e].forEach((t=>{t.destroy()}))})),f||l.length>0||r){const t=X(R,(t=>t.key));let e=[],s=0;i.forEach((r=>{t[r]&&t[r].forEach((t=>{t.varIndex=s++,e.push(t)}))})),J(R,e).forEach((t=>t.destroy(o))),u.children=e}let m={};if(c(T,((e,s)=>{let r=v[s],n=t[r];m[r]=n.map((t=>new WeakRef(t)))})),u.subViewRootNodes=m,a.length>0){let t=[];c(N,((e,s,r,n)=>{let i=e,a=vs(y.call(o,i,s,n));t.push(...a)})),bs(t,o,u.children,void 0,h)}}return!0}function Je(t,e,s){t.forEach((({refKey:t,newKey:r})=>{let n=e[r];if(t===Qe.AFTER_BEGIN){let t=e[s[0]];L(t).before(...n)}else if(e[t]){let s=e[t],r=z(s);r?.after(...n)}}))}function Ye(t,e){return Bt.set(t,e),(...e)=>[t(...e),e,t,ue.popDirectiveQ()]}function ts(t,e,s){Bt.get(t)}!function(t){t.ATTR="attr",t.PROP="prop",t.TEXT="text",t.SLOT="slot",t.TAG="tag"}(ze||(ze={})),function(t){t.NONE="NONE",t.REFRESH="REFRESH",t.REMOVE="REMOVE",t.REPLACE="REPLACE",t.UPDATE="UPDATE",t.INIT="INIT"}(qe||(qe={})),function(t){t.AFTER_BEGIN="afterbegin"}(Qe||(Qe={}));const es=new RegExp(`([a-z0-9"'${Gt}])\\s*>\\s*<`,"img");class ss{updatePointMetas;fragment;"emptyEvent‌s";constructor(t,e,s){let[r,n]=this.parseTemplate(t);s&&a(s,n),this.updatePointMetas=[],this.emptyEvent‌s={},this.fragment=function(t,e,s,r,n){const i=document.createElement("template");i.innerHTML=e;const a=document.createNodeIterator(i.content,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT);let u,d,p=0,f=-1,g=-1;for(;u=a.nextNode();)if(f++,d&&!d.contains(u)&&(d=void 0,g=-1),u instanceof HTMLElement||u instanceof SVGElement){ne(u)&&(d=u,g=f);let e={},i=A(u.attributes,(t=>({name:t.name,value:t.value})));for(let a=0;a<i.length;a++){const c=i[a];let{name:_,value:m}=c;if(_!==gs)if(ds.test(_)){let e=s[p];if(l(e)&&h(e[0])){let[,,s,n]=e;ts(s,ze.TAG,r.tagName);let o=new os(p);o.isDirective=!0,o.directiveType=ze.TAG,o.nodeSn=f,o.directiveVarChain=n,d&&(o.slotNodeSn=g),t.push(o),p++}u.removeAttribute(_)}else if(_[0]!==is)if(_!==hs)if(z(_)!==as){if(m.includes(Gt)){let e=new os(p);if(e.attrName=_.replace(/\.|\?|@/,""),e.nodeSn=f,d&&(e.slotNodeSn=g),_[0]===as||_[0]===ls||_[0]===cs){if(_[0]===ls)e.isToggleProp=!0,e.attrName=_.substring(1);else if(_[0]===cs){e.isRefAttr=!0;let t=_.substring(1);const[s,r]=t.split(us);let n=s;switch(r){case"camel":n=H(n);break;case"kebab":n=w(n);break;case"snake":n=rt(n)}e.attrName=n}else{let t=vt[u.tagName.toLowerCase()];bt.get(t);{let t=H(_.substring(1));e.isProp=!0,e.attrName=t}}u.removeAttribute(_)}else e.attrTmpl=m;t.push(e),p++}}else{e[_.substring(0,_.length-1)]=m,u.removeAttribute(_);let t=new os(p);t.attrName=_.substring(0,_.length-1),t.nodeSn=f,t.isPropPerfix=!0}else{if(ds.test(m)){s[p];let e=new os(p);e.isRef=!0,e.nodeSn=f,t.push(e),p++}u.removeAttribute(_)}else{let e=_.substring(1);if(ds.test(m)){let r=new os(p);r.isEvent=!0,r.attrName=e,r.nodeSn=f,t.push(r),s[p],p++}else if(o(m)){let t=n[f];t||(t=n[f]=[]),t.push(e)}u.removeAttribute(_)}}}else{let e=j(u.nodeValue).split(ds);if(e.length<2)continue;c(nt(e.length-1),(n=>{let i=j(e[n]);if(!o(i)){let t=document.createTextNode(i);u.parentNode.insertBefore(t,u),f++}let a=document.createTextNode("");u.parentNode.insertBefore(a,u);let c=new os(p);c.isText=!0,c.nodeSn=f,t.push(c);let _=s[p];if(l(_)&&h(_[0])){let t=d?ze.SLOT:ze.TEXT;c.isDirective=!0,c.directiveType=t,d&&(c.slotNodeSn=g);let[,,e]=_;ts(e,0,r.tagName),_=void 0}p++,f++})),f--;let n=j(z(e));if(o(n)){let t=u.previousSibling;u.parentNode.removeChild(u),u=t}else u.nodeValue=n,f++}return i.content}(this.updatePointMetas,r,n,e,this.emptyEvent‌s)}parseTemplate(t){let e="",s=p(t.vars),r=t.strings.length-1,n=t.vars.length-1,o=0;for(let i=0;i<=r;i++){const r=t.strings[i];let a=g(s,o,"");if(a instanceof rs){let[t,e]=this.parseTemplate(a);a=t,s.splice(o,1,...e),o+=e.length-1}else a=i>n?"":Gt+o;o++,e=e+r+a}return e=e.replace(es,"$1><").trim(),e=Es(e),[e,s]}}class rs{strings;vars;constructor(t,e){this.strings=p(t),this.vars=e}getKey(){let t=this.vars,e="";return c(this.strings,((s,r)=>{if(pt.test(s))return e=et(t[r]),!1})),e}getKeys(){let t=this.vars,e=[];for(let s=0;s<this.strings.length;s++){const r=this.strings[s];if(pt.test(r)){let r=et(t[s]);e.push(r)}}return V(e)&&t.forEach((t=>{if(t instanceof rs){let s=t.getKey();e.push(s)}})),e}append(t){let e=z(this.strings);return t.strings.forEach(((t,s)=>{0!=s?this.strings.push(t):this.strings[this.strings.length-1]=e+t})),this.vars=p(this.vars,t.vars),this}insert(t,e){let s=e.strings.shift();return this.strings[t]+=s,this.strings.splice(t+1,0,...e.strings),this.vars.splice(t,0,...e.vars),this}getHTML(t){let e=[],s=new ss(this,t,e),[r,n]=ws(t,s,e);return st(r.childNodes,((t,e)=>t+(e.nodeType==Node.TEXT_NODE?e.nodeValue:e.outerHTML??"")),"")}destroy(){this.strings=this.vars=null}}class ns{metaInfo;key;varIndex;value;node;subViewRootNodes;__destroyed=!1;children;parent;constructor(t){this.varIndex=t}static createFrom(t){let e=new ns(t.varIndex);return e.metaInfo=t,e}destroy(t){if(this.__destroyed)return;this.__destroyed=!0;let e=this.node,s=this.children;if(this.parent,this.node=this.value=this.children=this.parent=this.metaInfo=null,!e)return;let r=s;r?.forEach(((e,s)=>{e.destroy(t)})),e instanceof Xe&&e.destroy(),t&&se.clear(e.deref(),t),e.deref()?.remove()}insert(t){t.parent=this,this.children||(this.children=[]),this.children.push(t)}}class os{varIndex;attrName;attrTmpl;isText=!1;isDirective=!1;directiveType;directiveVarChain;isProp=!1;isPropPerfix=!1;isToggleProp=!1;isPlaceholder=!1;isEvent=!1;isRef=!1;isKey=!1;isRefAttr=!1;isComponent=!1;isSlot=!1;nodeSn=-1;slotNodeSn=-1;constructor(t){this.varIndex=t}}const is="@",as=".",ls="?",cs="*",us=":",hs="ref",ds=new RegExp(`${Gt}\\d+`),ps=/(<\/?)\s*([A-Z][A-Za-z0-9]*)([\s>])/gm,fs=/\s+([\.?@*])?((?:[a-zA-Z]*[A-Z][^\s<>="']+))(?=[\s=>])/gm,gs="slot-props",_s=new Map;let ms=0;function Es(t){return r(t)?t=(t=t.replace(fs,((t,e,s)=>` ${e??""}${w(s)}`))).replace(ps,((t,e,s,r)=>e+Et[s]+r)):t+""}function vs(t){let e=p(t.vars),s=t.strings.length-1;for(let r=0;r<=s;r++){let s=g(t.vars,r,"");if(s instanceof rs){let t=vs(s);e.splice(r,1,...t)}}return e}function ws(t,e,s){const{fragment:r,updatePointMetas:n,"emptyEvent‌s":o}=e;let i,a=r.cloneNode(!0),l=[],c=[],u=[],h=t._eventBindList;h||(h=t._eventBindList=[]);const d=document.createNodeIterator(a,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT);let p={},f={};n.forEach(((t,e)=>{p[t.nodeSn]||(p[t.nodeSn]=[]),p[t.nodeSn].push(t),t.slotNodeSn>-1&&(f[t.slotNodeSn]=null)}));let g=-1,_=0;for(;i=d.nextNode();){g++,null===f[g]&&(f[g]=i);let e=o[g];e&&e.forEach((t=>{h.push([t,x,i])}));let r={};const n=p[g];n&&n.forEach((t=>{let e=s[_++],n=ns.createFrom(t);if(n.node=new WeakRef(i),n.value=e,t.isProp||t.isPropPerfix)r[t.attrName]=e;else if(t.isRef)e.__setRef(new WeakRef(i));else if(t.isEvent)h.push([t.attrName,e,i]);else if(t.isToggleProp)n.value=!!e,i.toggleAttribute(t.attrName,n.value);else if(t.isRefAttr)i.setAttribute(t.attrName,e);else if(t.isText)if(t.isDirective){let s=t.attrName,r=f[t.slotNodeSn],[o,a,,l]=e;c.push([i,s,r,o,a,l,n])}else i.textContent=e;else if(t.isDirective){let s=f[t.slotNodeSn],[r,n,,o]=e,a=t.attrName;V(o)&&N(t.directiveVarChain)>0&&(o=t.directiveVarChain),u.push([i,a,s,r,n,o,t.directiveType])}else i.setAttribute(t.attrName,t.attrTmpl.replace(ds,e));l.push(n)})),i instanceof HTMLSlotElement?t._bindSlot(i,i.name||"default",r):i instanceof HTMLElement&&ne(i)&&(Kt.set(i,t),oe(t,i,r))}return c.forEach((([e,s,r,n,o,i,a])=>{b(e,"__anchor__",ms++),ue.start();let l=n(e,o,void 0,{renderComponent:t,slotComponent:r,varChain:i,attrName:s,pointType:a.directiveType});if(ue.end(t,a),l&&l.length>1){let[,s,r,n,o]=l;ys(e,a,s,r,t,n,o)}})),u.forEach((([e,s,r,n,o,i,a])=>{n(e,o,void 0,{renderComponent:t,slotComponent:r,varChain:i,attrName:s,pointType:a})})),[a,l]}function ys(t,e,s,r,n,o,i){let a=[],l=i?{}:void 0;o=o??[0];let u=document.createDocumentFragment(),h=g(t,"__anchor__");c(o,((t,o,c,d)=>{ue.start();let p=vs(s.call(n,t,o,d));ue.end(n);let[f,g]=ws(n,r,p),m=_(f.childNodes).map((t=>new WeakRef(t)));if(i){let e=i.call(n,t,o,d)+"";m.forEach((t=>{let s=t.deref();b(s,"__c-"+h,e)})),l[e]=m,g.forEach((t=>{t.key=e})),a.push(...g),u.append(f)}else u=f,e.subViewRootNodes=m,g.forEach((t=>{e.insert(t)}))})),l&&(e.subViewRootNodes=l,a.forEach(((t,s)=>{t.varIndex=s,e.insert(t)}))),u.childNodes.length>0&&(n.__bindEvents(),t.parentNode.insertBefore(u,t))}function bs(t,e,s,r,n){if(!o(t)&&s)for(let o=0;o<s.length;o++){const i=s[o];let a=i.varIndex;if(a<0)continue;let c=i.metaInfo;if(c.isPlaceholder||c.isPropPerfix||c.isRef||c.isEvent||c.isRefAttr||c.isKey)continue;if(i.__destroyed)continue;let h=i.value,d=t,p=i.node.deref();if(!p)continue;let f=ot(a,"-");for(let t=0;t<f.length;t++){const e=f[t];d=g(d,e),d&&d.vars&&o<f.length-1&&(d=d.vars)}if(!u(h)&&h===d)continue;let _=p;if(c.isDirective){let[t,s,o,a]=i.value;if(!l(d))continue;let c=re(p,e),[,u]=d;Ze(o,p,u,s,t,e,c,a,i,n)&&r?.delete(i)}else if(c.isToggleProp){if(!!d===h)continue;_.toggleAttribute(c.attrName,!!d),_ instanceof Xe&&_.updateProps({[c.attrName]:!!d})}else if(c.isProp){if(!u(d)&&d===h)continue;p instanceof Xe?p.updateProps({[c.attrName]:d}):p instanceof HTMLSlotElement&&e._updateSlot(p.getAttribute("name")||"default",c.attrName,d)}else if(c.attrName){if(!it(h,d))switch(c.attrName){case"value":if(p instanceof HTMLInputElement){p.value=d;break}default:p.setAttribute(c.attrName,at(c.attrTmpl,ds,d+""))}}else if(c.isText){let t=i.node,e=et(d??"");e!==t.deref().textContent&&(t.deref().textContent=e)}i.value=d}}function Ss(t,...e){return new rs(r(t)?[t]:t,e)}function Ns(t,...e){if(Vt.has(t))return Vt.get(t);let s=new Xt(t,e),r=t.join("");return V(r)||Vt.set(t,s),s}class Ts{__ref;get current(){return this.__ref?.deref()}__setRef(t){this.__ref=t}}function Ms(){return new Ts}var Cs;!function(t){t.CLASS="class",t.FIELD="field",t.METHOD="method"}(Cs||(Cs={}));class ks{static get priority(){return 0}created(t,...e){}beforeMount(t,e,...s){}mounted(t,e,...s){}updated(t,e){}beforeDestroy(t,...e){}}class Rs{metadata;decorator;key;priority=0;constructor(t,e,s){this.metadata=e,this.decorator=new s(...t),this.priority=g(s,"priority",0)}dispose(){this.metadata=null,this.decorator=null}create(t){let e,s=this.decorator.targets,r=this.metadata[1];u(r)&&U(g(r,"configurable"))?e=Cs.METHOD:n(this.metadata[1])&&(e=Cs.FIELD),!V(s)&&e&&s.includes(e)?this.decorator.created(t,...this.metadata):zt(`Decorator '${this.decorator.constructor.name}' is out of targets, expect '${s.join(",")}' bug got '${e}'`)}beforeMount(t,e){this.decorator.beforeMount(t,e,...this.metadata)}mounted(t,e){this.decorator.mounted(t,e,...this.metadata)}updated(t,e){this.decorator.updated(t,e)}destroy(t){this.decorator.beforeDestroy(t,...this.metadata)}}function xs(t){return(...e)=>(...s)=>{let r=s[0].constructor,n=Nt.get(r);if(!Nt.has(r)){let t=Object.getPrototypeOf(r);n=t?p(Nt.get(t)??[]):[],Nt.set(r,n)}let o=new Rs(e,s.splice(1),t);return n?.push(o),o}}function As(t){return(...e)=>{if(!e||e.length<1)return;let s=e[0].constructor,r=Nt.get(s);if(!Nt.has(s)){let t=Object.getPrototypeOf(s);r=t?p(Nt.get(t)??[]):[],Nt.set(s,r)}let n=new Rs([],e.splice(1),t);return r?.push(n),n}}function Ps(t,e,s){return wt.has(t.constructor)||wt.set(t.constructor,{}),wt.get(t.constructor)[e]=s.get,delete t[e],Reflect.defineProperty(t,e,{get(){return ue.__collecting&&ue.__varPathList.push(e),Reflect.get(this[$t],e)}}),Reflect.getOwnPropertyDescriptor(t,e)}const Is=xs(class extends ks{static get priority(){return Number.MAX_VALUE}created(t,e,...s){let r=g(t,e);b(t,e,C(r,this.wait,this.immediate)),b(t,e+"_$__",r)}beforeDestroy(t,e){b(t,e,null),b(t,e+"_$__",null)}get targets(){return[Cs.METHOD]}wait;immediate;constructor(t,e=!1){super(),this.wait=t,this.immediate=e}});function Ls(t,e){return(s,r,n)=>{if(!mt.has(s.constructor)){let t=[],e=s.constructor;for(;(e=Yt(e))!==Xe;)t=p(t,mt.get(e)??[]);mt.set(s.constructor,t)}mt.get(s.constructor)?.push({name:t,targetFn:e,fnName:r})}}const Os=xs(class extends ks{static get priority(){return Number.MAX_VALUE}created(t,e,s,...r){let n=lt(g(t,s),t);b(t,s,R(n)),b(t,s+"_$__",n)}beforeDestroy(t,e){b(t,e,null),b(t,e+"_$__",null)}get targets(){return[Cs.METHOD]}});var Ds;!function(t){t.ONCE="once"}(Ds||(Ds={}));const Vs=new WeakMap;class Ws extends ks{static get priority(){return Number.MAX_VALUE}get targets(){return[Cs.FIELD]}selector;cache;constructor(t,e){super(),this.selector=t,this.cache=e}static getKey(t){return t}getter(t){let e=t?.shadowRoot?.querySelector(this.selector),s=Vs.get(t);s||(s=new Map,Vs.set(t,s)),s.set(this.selector,e)}mounted(t,e,s,...r){const n=this;let o=new WeakRef(t);Reflect.defineProperty(t,s,{configurable:!0,get(){let t=o.deref();return Vs.has(t)&&Vs.get(t)?.has(n.selector)&&n.cache===Ds.ONCE||n.getter(t),Vs.get(t)?.get(n.selector)}})}beforeDestroy(t,e){Vs.get(t)?.clear(),Vs.delete(t)}updated(t,e){this.cache!==Ds.ONCE&&this.getter(t)}}const Hs=xs(Ws),Bs=xs(class extends Ws{getter(t){let e=t.shadowRoot?.querySelectorAll(this.selector),s=Vs.get(t);s||(s=new Map,Vs.set(t,s)),s.set(this.selector,e)}});function Us(t){if(1===arguments.length)return(e,s)=>{js(e,s,t)};js(arguments[0],arguments[1],{prop:""})}function js(t,e,s){if(!yt.has(t.constructor)){const e={};let s=t.constructor;for(;(s=Yt(s))!==Xe;)E(e,yt.get(s)??{});yt.set(t.constructor,e)}if(s.shallow=s.shallow||!1,b(yt.get(t.constructor),e,s),s.hasChanged){let r=Lt.get(t.constructor);r||(r=new Map,Lt.set(t.constructor,r)),r.set(e,s.hasChanged)}if(s.shallow){let s=Pt.get(t.constructor);s||(s=new Set,Pt.set(t.constructor,s)),s.add(e)}Reflect.defineProperty(t,e,{get(){return le(e,this)},set(t){ce(e,t,this)}})}function Fs(t,e,s){js(t.prototype,e,s||{prop:""})}function Ks(t,e=!1){return s=>{s&&(e?customElements.define(t,s):(Et[s.name]=t,vt[t]=s))}}const $s=xs(class extends ks{static get priority(){return Number.MAX_VALUE}created(t,e,...s){let r=g(t,e);b(t,e,k(r,this.wait)),b(t,e+"_$__",r)}beforeDestroy(t,e){b(t,e,null),b(t,e+"_$__",null)}get targets(){return[Cs.METHOD]}wait;constructor(t){super(),this.wait=t}});function Gs(t,e){return(s,r)=>{let n=xt.get(s.constructor),o=Rt.get(s.constructor),i=Mt.get(s.constructor),c=Ct.get(s.constructor),u=kt.get(s.constructor),h=At.get(s.constructor);if(!u){u=[],kt.set(s.constructor,u),c=[],Ct.set(s.constructor,c),i=new Map,Mt.set(s.constructor,i),n={},xt.set(s.constructor,n),o={},Rt.set(s.constructor,o),h={},At.set(s.constructor,h);let t=Yt(s.constructor);for(;t;)kt.has(t)&&(u.push(...kt.get(t)),c.push(...Ct.get(t)),Mt.get(t)?.forEach(((t,e)=>{i.set(e,t)})),a(n,xt.get(t)),a(o,Rt.get(t)),a(h,At.get(t))),t=Yt(t)}(l(t)?t:[t]).forEach((t=>{let a=s[r];g(e,"once",!1)&&i.set(t,!1);let l=g(e,"deep",!1);if(u.push(t),l?(n[t]=n[t]??new Set,n[t].add(a),c.push(t)):(o[t]=o[t]??new Set,o[t].add(a)),g(e,"immediate",!1)){let e=h[t];e||(e=h[t]=new Set),e.add(a)}}))}}const Xs=["key"],zs=Ye((function(t){return(t,[e],s,{renderComponent:r})=>{let n=t;if(s)c(e,((t,e)=>{n.setAttribute(e,t)}));else if(ne(n)){let t={},s=bt.get(n.constructor);c(e,((e,r)=>{if(Xs.includes(r))return;let o=H(r);(s?s[o]:void 0)?t[r]=e:n.setAttribute(r,e+"")})),oe(r,n,t)}else c(e,((t,e)=>{n.setAttribute(e,t)}))}}),[ze.TAG]),qs=new WeakMap,Qs=Ye((function(t){return(t,[e],s,{renderComponent:n})=>{let o=[];if(l(e)?o=Q(e):u(e)?o=P(e,((t,e)=>t?e:[])):r(e)&&(o=e.split(" ")),o.length<1&&!s)return;let i=t;if(qs.get(i)&&qs.get(i).length===o.length&&ct(qs.get(i),o))return;let a=qs.get(i);c(a,(t=>{i.classList.remove(t)})),c(o,(t=>{i.classList.add(t)})),a=p(o),qs.set(i,a)}}),[ze.TAG]),Zs=new WeakMap,Js=new WeakMap,Ys=Ye((function(t,e,s){return(t,r,o,{renderComponent:i,varChain:a,updatedMap:l})=>{let c=r[0];if(g(o,0),V(c)&&n(o))return[qe.INIT];let u=0,h=Q(A(c,((t,s)=>e.call(i,t,s,u++)+"")));if(h.length!=new Set(h).size)return void zt(`forEach - duplicate key in '${h}'`);let d,p=Zs.get(t);if(Zs.set(t,h),o){if(V(h))return[qe.REMOVE];if(N(h)===N(p)&&it(h,p))return[qe.REFRESH,tr(c,s,i)]}let f=r[2];if(Js.has(t))d=Js.get(t);else{let e=G(c)[0],s=c[e],r=f.call(i,s,e,0);d=new ss(r,i),Js.set(t,d)}return o?[qe.UPDATE,d,h,p,f,c]:[qe.INIT,s,d,c,e]}}),[ze.TEXT,ze.SLOT]);function tr(t,e,s){let r=[];return c(t,((t,n)=>{let o=vs(e.call(s,t,n));r.push(...o)})),r}let er=document.createElement("template"),sr=new WeakMap;const rr=Ye((function(t){return(t,e,s,{renderComponent:r})=>{if(!(s&&e[0]==s[0]||W(e[0])))if(ut(t))t.innerHTML=Es(e[0]);else{let r=sr.get(t);r||(r=document.createTextNode(""),t.parentNode?.insertBefore(r,t),sr.set(t,r)),er.innerHTML=Es(e[0]),o(s)||se.remove(r,t),t.before(er.content.cloneNode(!0))}}}),[ze.TAG,ze.TEXT,ze.SLOT]),nr=new WeakMap,or=new WeakMap,ir=new WeakMap,ar=Ye((function(t,e,s){return(t,[e,s,r],n,{renderComponent:o})=>{let i;if(n){if(!!e==!!n[0]){let e=nr.get(t);return[qe.REFRESH,e]}let a=e?s:r;return e?(i=or.get(t),i||(i=new ss(a.call(o,e),o),or.set(t,i))):(i=ir.get(t),i||(i=new ss(a.call(o,e),o),ir.set(t,i))),[qe.REPLACE,a,i]}let a=e?s:r;return e?(i=or.get(t),i||(i=new ss(a.call(o,e),o),or.set(t,i))):(i=ir.get(t),i||(i=new ss(a.call(o,e),o),ir.set(t,i))),nr.set(t,a),[qe.INIT,a,i]}}),[ze.TEXT,ze.SLOT]),lr=new WeakMap,cr=Ye((function(t,e){return(t,[e,s],r,{renderComponent:n})=>{let o=lr.get(t);return e&&!lr.has(t)&&(o=new ss(s.call(n),n),lr.set(t,o)),r?r[0]?e?[qe.REFRESH,s]:[qe.REMOVE]:e?[qe.REPLACE,s,o]:[qe.NONE]:[qe.INIT,...e?[s,o]:[]]}}),[ze.TEXT,ze.SLOT]);var ur;!function(t){t.CHANGE="change",t.INPUT="input"}(ur||(ur={}));const hr=Ye((function(t,s="value",n){return(t,[s,n,o],i,{varChain:a,renderComponent:l})=>{n=n??"value";const c=t;if(i){const t=i[0],e=s;if(!u(e)&&Object.is(e,t))return;if(c instanceof Xe)c.updateProps({[n]:e});else if(c instanceof HTMLTextAreaElement||c instanceof HTMLSelectElement){if(c.setAttribute(n,e+""),c instanceof HTMLSelectElement){let t=M(c.querySelectorAll("option"),(t=>t.value==e));t&&(t.selected=!0)}}else if(c instanceof HTMLInputElement){if(c.value==e)return;switch(c.type){case"checkbox":case"radio":e?c.setAttribute("checked",""):c.removeAttribute("checked");break;case"text":case"email":case"number":case"password":case"search":case"tel":case"url":c.setAttribute(n,e+""),b(c,n,e);break;default:c.setAttribute(n,e+"")}}return}let h;h=r(o)?e(o)[0]:z(a);const d=ot(h,".")[0];let p=he.get(l),f="";p&&(f=p[d]),d in l||!f||f in l||zt(`model - property '${d}' is not defined on the instance of `+l.tagName);let _=l._eventBindList;if(u(s)||j(s)||(s=""),vt[c.tagName.toLowerCase()]){oe(l,c,{[n]:s}),Ue(c,l,"update:"+n,(function(t){let e=this,s=(he.get(e)??{})[d];!(d in e)&&s&&g(e.wrapperComponent,d)===g(e,s)&&(e=e.wrapperComponent||e),b(e,h,t.value)}))}else if(c instanceof HTMLTextAreaElement){c.setAttribute(n,s+"");let t="input";_.push([t,function(t){let e=t.target;b(this,h,e.value)},c])}else if(c instanceof HTMLInputElement){let t="",e="";switch(c.type){case"checkbox":case"radio":t="checked",e="change";break;default:t="value",e="input"}c.setAttribute(n??t,s+""),_.push([e,function(t){let e=t.target;b(this,h,e.value)},c])}else c instanceof HTMLSelectElement&&(c.setAttribute(n,s+""),_.push(["change",function(t){let e=t.target,s=this,r=(he.get(s)??{})[d];!(d in s)&&r&&g(s.wrapperComponent,d)===g(s,r)&&(s=s.wrapperComponent||s),b(s,h,e.value)},c]))}}),[ze.TAG]),dr=new WeakMap,pr=Ye((function(t,e){return(t,[e,s],r)=>{if(r&&e===r[0])return;let n=t;if(!dr.has(n)){let t=n.style.display;dr.set(n,"none"==t?"unset":t)}n.style.display=e?dr.get(n):"none",s&&s(n,e)}}),[ze.TAG]),fr=Ye((function(t,e){return(t,[e,s],r,{renderComponent:n,slotComponent:o})=>{if(r)return;e=e.bind(n);let i=Ft.get(o);i||(i={},Ft.set(o,i)),i[s||"default"]=e}}),[ze.SLOT]);class gr{static getCssText(t,e=!1){return r(t)?t:ht(A(t,((t,s)=>s.startsWith("--")?s+":"+t+(e?" !important":""):w(s)+":"+t+(e?" !important":""))),";")+";"}static setStyle(t,e){if(r(t)&&!j(t))return;let s=gr.getCssText(t);e.style.cssText=s}}const _r=Ye((function(...t){return(t,e,s,{renderComponent:r})=>{let n=t,o=st(e,((t,e)=>t+gr.getCssText(e)),""),i=Q(o.split(";").map((t=>t.split(":")[0]))),a=Q(n.style.cssText.split(";")),l=q(a,(t=>i.some((e=>t.trim().startsWith(e)))));n.style.cssText=o+l.join(";")}}),[ze.TAG]),mr=new WeakMap,Er=new WeakMap,vr=Ye((function(t,e){return(t,[e,s],r,{renderComponent:n})=>{let o=()=>Ss``,i=[],a=[];c(s,((t,e)=>{if(h(t))i.push(e),a.push(t);else{let e=t[0],s=t[1];i.push(e),a.push(s)}"default"===e&&(o=t)}));let l=tt(i,(t=>h(t)?t(e):t==e)),u=mr.get(t);mr.set(t,l);let d=Er.get(t);if(d||(d=[],Er.set(t,d)),!d[l]){let t=new ss((a[l]??o).call(n),n);d[l]=t}return r?u==l?[qe.REFRESH,a[l]??o]:[qe.REPLACE,a[l]??o,d[l]]:[qe.INIT,a[l]??o,d[l]]}}),[ze.TEXT,ze.SLOT]);function wr(){c(vt,((t,e)=>{customElements.define(e,t)}))}export{Xe as CompElem,gr as CssHelper,ie as Csscope,ks as Decorator,Cs as DecoratorType,Rs as DecoratorWrapper,qe as DirectiveUpdateTag,se as DomUtil,ze as EnterPointType,ur as ModelTriggerType,Ds as QueryCache,rs as Template,Se as _getObservedAttrs,Yt as _getSuper,Jt as _toUpdatePath,oe as addUninitializedSubComponentProp,zs as bind,Qs as classes,Ps as computed,Ms as createRef,Ns as css,ae as csscope,Is as debounced,xs as decorator,As as decoratorWithNoArgs,wr as defineComponents,Ye as directive,ts as directiveScopeChecker,Ls as event,Ys as forEach,ee as getBooleanValue,re as getSlotComponent,Ss as h,rr as html,ar as ifElse,cr as ifTrue,te as isBooleanProp,ne as isCompElemNode,Fs as makeState,hr as model,Os as onced,we as prop,Hs as query,Bs as queryAll,pr as show,zt as showError,qt as showTagError,Zt as showTagWarn,Qt as showWarn,fr as slot,Us as state,_r as styles,Ks as tag,$s as throttled,Ze as updateDirective,Gs as watch,vr as when};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "compelem",
3
- "version": "0.26.3",
3
+ "version": "0.26.4",
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",