@estjs/template 0.0.17-beta.7 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/template.cjs +2 -2
- package/dist/template.d.cts +1 -0
- package/dist/template.d.ts +1 -0
- package/dist/template.dev.cjs +426 -152
- package/dist/template.dev.cjs.map +1 -1
- package/dist/template.dev.js +427 -153
- package/dist/template.dev.js.map +1 -1
- package/dist/template.js +2 -2
- package/package.json +4 -4
package/dist/template.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var shared=require('@estjs/shared'),signals=require('@estjs/signals');var an=Object.getOwnPropertySymbols;var Qn=Object.prototype.hasOwnProperty,Zn=Object.prototype.propertyIsEnumerable;var cn=(e,n)=>{var t={};for(var o in e)Qn.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&an)for(var o of an(e))n.indexOf(o)<0&&Zn.call(e,o)&&(t[o]=e[o]);return t};var un=(e,n,t)=>new Promise((o,r)=>{var i=a=>{try{l(t.next(a));}catch(d){r(d);}},s=a=>{try{l(t.throw(a));}catch(d){r(d);}},l=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,s);l((t=t.apply(e,n)).next());});var fn="ref",dn="key",mn="http://www.w3.org/2000/svg",He="http://www.w3.org/2000/xlink",Ve="http://www.w3.org/2000/xmlns/";var Ke=Symbol(""),ue=Symbol(""),je=Symbol(""),pn=Symbol(""),$e=Symbol(""),Ue=Symbol("");var Q=null,nt=0;function D(){return Q}function ge(e){Q=e,signals.setCurrentScope(e==null?void 0:e.effectScope);}function U(e=Q){let n=e?e.effectScope.run(()=>signals.effectScope()):signals.effectScope(true),t={id:++nt,effectScope:n,parent:e,children:null,provides:null,cleanup:null,onMount:null,onUpdate:null,onDestroy:null,isMounted:false,isDestroyed:false};return e&&(e.children||(e.children=new Set),e.children.add(t)),t}function H(e,n){let t=Q;ge(e);try{return e.effectScope.run(n)}finally{ge(t);}}function L(e){var t;if(!e||e.isDestroyed)return;if(e.isDestroyed=true,(t=e.parent)!=null&&t.children&&e.parent.children.delete(e),e.parent=null,e.children&&e.children.size>0){for(let o of e.children)o&&(o.parent=null,L(o));e.children.clear();}let n=Q;if(ge(e),e.onDestroy){for(let o=0;o<e.onDestroy.length;o++)try{e.onDestroy[o]();}catch(r){}e.onDestroy=null;}if(e.cleanup){for(let o=0;o<e.cleanup.length;o++)try{e.cleanup[o]();}catch(r){}e.cleanup=null;}ge(n),e.effectScope.stop(),e.provides&&(e.provides.clear(),e.provides=null),e.onMount=null,e.onUpdate=null,e.children=null;}function K(e){let n=Q;n&&(n.cleanup||(n.cleanup=[]),n.cleanup.push(e));}var lt=/^data:\s*(?:text\/html|text\/xml|application\/xhtml\+xml|image\/svg\+xml|application\/xml)/;function at(e){let n=e.replaceAll(/[\u0000-\u0020]+/g,"").toLowerCase();return shared.startsWith(n,"javascript:")||shared.startsWith(n,"vbscript:")?true:lt.test(n)}function Z(e,n,t,o){if(n===dn){o==null?e.removeAttribute(n):e.setAttribute(n,String(o));return}if(n===shared.SPREAD_NAME){let y=shared.isObject(t)?t:null,T=shared.isObject(o)?o:null;if(y)for(let S in y)S!==shared.SPREAD_NAME&&(!T||!(S in T))&&Z(e,S,y[S],null);if(T)for(let S in T)S!==shared.SPREAD_NAME&&Z(e,S,y==null?void 0:y[S],T[S]);return}let r=(e==null?void 0:e.namespaceURI)===mn,i=r&&shared.startsWith(n,"xlink:"),s=r&&shared.startsWith(n,"xmlns:"),l=shared.isSpecialBooleanAttr(n)||shared.isBooleanAttr(n);if(t===o||n.length>2&&n.charCodeAt(0)===111&&n.charCodeAt(1)===110)return;let a=n.toLowerCase();if(a==="innerhtml"||a==="srcdoc")return;if(o==null){if(i)e.removeAttributeNS(He,n.slice(6));else if(s){let y=n.slice(6);e.removeAttributeNS(Ve,y);}else e.removeAttribute(n);return}if(l){shared.includeBooleanAttr(o)?e.setAttribute(n,""):e.removeAttribute(n);return}let d=shared.isSymbol(o)?String(o):o;if(!((a==="href"||a==="src"||a==="xlink:href"||a==="action"||a==="formaction"||a==="poster")&&shared.isString(d)&&at(d))){if(i){e.setAttributeNS(He,n,String(d));return}if(s){e.setAttributeNS(Ve,n,String(d));return}if(r)e.setAttribute(n,String(d));else if(n in e)try{e[n]=d;}catch(y){e.setAttribute(n,String(d));}else e.setAttribute(n,String(d));}}function Ce(e,n,t,o=false){if(n===t)return;let r=Se(t);if(!r){e.removeAttribute("class");return}(shared.isString(n)?n:Se(n))!==r&&(o?e.setAttribute("class",r):e.className=r);}var Se=shared.normalizeClassName;var vn=/\s*!important$/,gn=/(?:^|;)\s*([a-z][a-z\d-]*)\s*:/gi,ht=["Webkit","Moz","ms"],Be={};function Te(e,n,t){let o=e.style;if(t&&shared.isString(t)){n!==t&&(o.cssText=t);return}if(!t){n&&e.removeAttribute("style");return}if(n&&!shared.isString(n)){let r=n;for(let i in r)(!t||t[i]==null)&&ne(o,i,"");}else if(n&&shared.isString(n)){gn.lastIndex=0;let r;for(;(r=gn.exec(n))!==null;){let i=r[1].trim();i&&t&&shared.isObject(t)&&t[i]==null&&ne(o,i,"");}}if(t&&!shared.isString(t)){let r=t;for(let i in r){let s=r[i];(!n||shared.isString(n)||n[i]!==s)&&s!=null&&ne(o,i,s);}}}function ne(e,n,t){if(shared.isArray(t)){for(let i of t)ne(e,n,i);return}(t==null||t==="")&&(t="");let o=shared.isString(t)&&vn.test(t)?"important":"";if(o&&(t=t.replace(vn,"")),shared.startsWith(n,"--")){o?e.setProperty(n,t,o):e.setProperty(n,t);return}let r=gt(e,n);o?e.setProperty(vt(r),t,o):e[r]=t;}function vt(e){let n=shared.kebabCase(e);return shared.startsWith(e,"Webkit")||shared.startsWith(e,"Moz")||shared.startsWith(e,"ms")?`-${n}`:n}function gt(e,n){let t=Be[n];if(t)return t;let o=shared.camelCase(n);if(o!=="filter"&&o in e)return Be[n]=o;o=shared.capitalize(o);for(let r of ht){let i=r+o;if(i in e)return Be[n]=i}return n}var Ge=0;function En(){return String(Ge++)}function Nt(){Ge=0;}var X=false;function oe(){return X}var te=new Map;function Tt(e){let n=e.querySelectorAll("[data-hk]");for(let t of n){let o=t.dataset.hk;o!=null&&!te.has(o)&&te.set(o,t);}}var we=[],fe=new Map;function bt(){if(typeof document=="undefined")return;let e=document.createNodeIterator(document.body,NodeFilter.SHOW_COMMENT),n;for(;n=e.nextNode();){let t=n.data;if(t==="teleport-anchor")we.push(n);else if(t==="teleport-start"){let o=n.parentElement;if(!o)continue;let r=fe.get(o);r||(r=[],fe.set(o,r)),r.push(n);}}}function We(){var e;return (e=we.shift())!=null?e:null}function ze(e){let n=fe.get(e),t=n==null?void 0:n.shift();if(!t)return null;let o=[],r=t.nextSibling;for(;r;){if(r.nodeType===Node.COMMENT_NODE&&r.data==="teleport-end")return {start:t,end:r,nodes:o};o.push(r),r=r.nextSibling;}return null}function qe(e){X=true,Ge=0,te.clear(),we.length=0,fe.clear(),Tt(e),bt();}function Xe(){X=false,te.clear(),we.length=0,fe.clear();}function Sn(e,n,t){var i,s;if(!X||t&&t.parentNode!==e)return null;if(n.length===0)return [];let o=new Array(n.length),r=t?t.previousSibling:e.lastChild;for(let l=n.length-1;l>=0;l--){if(!r)return null;let a=n[l],d=a.nodeType;if(d===Node.TEXT_NODE){let u=(i=a.textContent)!=null?i:"";if(!u||r.nodeType!==Node.TEXT_NODE)return null;let y=(s=r.textContent)!=null?s:"";if(y===u){o[l]=r,r=r.previousSibling;continue}if(!y.endsWith(u))return null;let T=y.slice(0,y.length-u.length);if(!T)return null;let S=document.createTextNode(T);e.insertBefore(S,r),r.textContent=u,o[l]=r,r=S;continue}if(r.nodeType!==d)return null;if(d===Node.ELEMENT_NODE){if(r.tagName!==a.tagName)return null}else if(d===Node.COMMENT_NODE&&r.data!==a.data)return null;o[l]=r,r=r.previousSibling;}return o}function wt(e){var t,o,r;return (r=(o=e.dataset.hk)!=null?o:(t=e.closest("[data-hk]"))==null?void 0:t.dataset.hk)!=null?r:null}function Cn(e,n){if(X&&e){let t=wt(e);if(t)return `${t}-${n}`}return String(n)}function At(e,n){if(!e||n<0)return null;let t=Cn(e instanceof Element?e:null,n),o=0,r=e.firstChild;for(;r;){if(r.nodeType===Node.COMMENT_NODE){let i=r;if(i.data===t||!X&&i.data===""&&o++===n)return i}r=r.nextSibling;}return null}function _t(e,n){if(!(e instanceof Element)||n<0)return null;let t=Cn(e,n),o=e.firstChild;for(;o;){if(o instanceof Element&&o.getAttribute(shared.HYDRATION_ANCHOR_ATTR)===t)return o;o=o.nextSibling;}return null}function xt(e){if(!shared.isBrowser())return ()=>{throw new Error("[essor] getRenderedElement called in non-browser environment")};let n=null;return ()=>{if(!X)return n||(n=be(e)),n();let t=En(),o=te.get(t);return o?(te.delete(t),o):(shared.warn(`[essor] hydration mismatch: no SSR element for key "${t}"`),n||(n=be(e)),n())}}function kt(e,n,t,o){X||Ce(e,n,t,o);}function Pt(e,n,t,o){X||Z(e,n,t,o);}function Rt(e,n,t){X||Te(e,n,t);}function Ye(e,n){return n&&n.parentNode===e?n:null}function Nn(e,n,t,o){let r=Ye(e,o),i=n.length,s=t.length;if(i===0&&s===0)return t;if(i===0){for(let u=0;u<s;u++)G(e,t[u],r);return t}if(s===0){for(let u=0;u<i;u++)Y(n[u]);return []}let l=0,a=i-1,d=s-1;for(;l<=a&&l<=d&&n[l]===t[l];)l++;for(;a>=l&&d>=l&&n[a]===t[d];)a--,d--;if(l>a){if(l<=d){let u=d+1,y=Ye(e,u<s?t[u]:r);for(let T=l;T<=d;T++)G(e,t[T],y);}}else if(l>d)for(let u=l;u<=a;u++)Y(n[u]);else Dt(e,n,t,l,a,d,r);return t}function Dt(e,n,t,o,r,i,s){let l=i-o+1,a=l<=4?_=>{for(let b=o;b<=i;b++)if(t[b]===_)return b}:(()=>{let _=new Map;for(let b=o;b<=i;b++)_.set(t[b],b);return b=>_.get(b)})(),d=new Int32Array(l),u=0,y=false,T=0;for(let _=o;_<=r;_++){let b=n[_];if(u>=l){Y(b);continue}let F=a(b);F===void 0?Y(b):(d[F-o]=_+1,F>=T?T=F:y=true,u++);}let S=y?Je(d):[],w=S.length-1;for(let _=l-1;_>=0;_--){let b=o+_,F=t[b],p=Ye(e,b+1<t.length?t[b+1]:s);d[_]===0?G(e,F,p):y&&(w<0||_!==S[w]?G(e,F,p):w--);}}function Je(e){let n=new Int32Array(e.length),t=[0],o=e.length,r,i,s,l,a;for(r=0;r<o;r++){let d=e[r];if(d!==0){if(i=t[t.length-1],e[i]<d){n[r]=i,t.push(r);continue}for(s=0,l=t.length-1;s<l;)a=s+l>>1,e[t[a]]<d?s=a+1:l=a;d<e[t[s]]&&(s>0&&(n[r]=t[s-1]),t[s]=r);}}for(s=t.length,l=t[s-1];s-- >0;)t[s]=l,l=n[l];return t}function Y(e){if(e)if($(e))e.destroy();else {let n=e;n.parentNode&&n.remove();}}function G(e,n,t){if(!e||!n)return;let o=$(t)?t.firstChild:t;if($(n)){n.mount(e,o);return}o?e.insertBefore(n,o):e.appendChild(n);}function Ae(e){if(e instanceof Node||$(e))return e;let n=typeof e;return e==null||n==="string"||n==="number"||n==="boolean"||n==="symbol"?document.createTextNode(e===false||e==null?"":String(e)):document.createTextNode(String(e))}function W(e,n,t){if(!e)return;let o=D(),r=[],i=true,s=a=>{if(a instanceof Node)return [a];if($(a))return [a];let d=typeof a;return a==null||d==="string"||d==="number"||d==="boolean"?[Ae(a)]:shared.coerceArray(a).map(u=>shared.isFunction(u)?u():u).flatMap(u=>u).map(Ae)},l=signals.effect(()=>{let a=()=>{let d=shared.isFunction(n)?n():n,u=s(d);if(i&&oe()&&u.every(y=>y instanceof Node&&y.parentNode===e)){r=u,i=false;return}if(i&&oe()){let y=Sn(e,u,t);if(y){r=y,i=false;return}}r=Nn(e,r,u,t),i=false;};o&&!o.isDestroyed?H(o,a):a();});return K(()=>{l.stop();for(let a of r)Y(a);r=[],o=null;}),r}function Mt(e){return (e==null?void 0:e.firstChild)||null}function It(e,n=1){for(;e&&n>0;)e=e.nextSibling,n--;return e||null}function Ot(e,n){if(!e||n<0)return null;let t=e.firstChild;for(;t&&n>0;)t=t.nextSibling,n--;return t||null}function re(e,n,t,o){if(!(o!=null&&o.delegate))return e.addEventListener(n,t,o),()=>e.removeEventListener(n,t,o);let r=o.delegate,i=d=>{let u=d.target;(u.matches(r)||u.closest(r))&&t.call(e,d);},a=o,{delegate:s}=a,l=cn(a,["delegate"]);return e.addEventListener(n,i,l),()=>{e.removeEventListener(n,i,l);}}function Qe(e,n,t){let o=e[n];o||(o=[],e[n]=o),o.push(t);}function wn(e,n,t){let o=e.length;if(o===0)return;let r;for(let i=0;i<o;i++)try{let s=e[i]();if(shared.isPromise(s)){let l=s.catch(a=>{});(r||(r=[])).push(l);}}catch(s){}if(r)return Promise.all(r).then(()=>{})}function J(e){let n=D();if(n){if(n.isMounted){try{let t=e();shared.isPromise(t)&&t.catch(o=>{});}catch(t){}return}Qe(n,"onMount",e);}}function Ht(e){let n=D();n&&Qe(n,"onUpdate",e);}function Ze(e){let n=D();n&&Qe(n,"onDestroy",e);}function An(e){if(e.isDestroyed)return;if(!e.onMount||e.onMount.length===0){e.isMounted=true;return}let n=e.onMount,t=H(e,()=>wn(n,e.id));return n.length=0,e.isMounted=true,t}function _n(e){if(!(e.isDestroyed||!e.onUpdate||e.onUpdate.length===0))return H(e,()=>wn(e.onUpdate,e.id))}function xe(e,n,t=false){let o=Reflect.ownKeys(n);for(let r of o)Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r));if(t){let r=new Set(o);for(let i of Reflect.ownKeys(e))r.has(i)||delete e[i];}}function kn(e,n){let t=Object.getOwnPropertyDescriptor(e,n);return t.get?t.get.call(e):t.value}var Pn;Pn="normal";var ie=class{constructor(n,t={}){this.component=n;this.props=t;this[Pn]=true;this.scope=null;this.state=0;this.beforeNode=void 0;this.renderedNodes=[];this.firstChild=void 0;this.parentNode=void 0;this.rootEventCleanups=[];this.parentScope=D();let o=Object.create(null);xe(o,t),this.reactiveProps=signals.shallowReactive(o);}mount(n,t){var i;if(this.parentNode=n,this.beforeNode=t,this.state=1,this.renderedNodes.length>0){for(let s of this.renderedNodes)G(n,s,t);return this.state=2,this.renderedNodes}let o=U((i=this.parentScope)!=null?i:D());this.scope=o;let r=H(o,()=>{var l;let s=this.component(this.reactiveProps);return shared.isFunction(s)&&(s=s(this.reactiveProps)),(signals.isSignal(s)||signals.isComputed(s))&&(s=s.value),(l=W(n,s,t))!=null?l:[]});return this.renderedNodes=r,this.firstChild=r[0],this.syncSpecialProps(this.props),this.state=2,An(o),this.renderedNodes}update(n){this.props=n,xe(this.reactiveProps,n!=null?n:{},true);let t=this.scope;!t||t.isDestroyed||(this.syncSpecialProps(n),_n(t));}forceUpdate(){if(!this.parentNode)return;let n=this.parentNode,t=this.beforeNode,o=Object.create(null);xe(o,this.reactiveProps),this.destroy(),xe(this.reactiveProps,o),this.mount(n,t);}destroy(){let n=this.scope;if(!(!n||n.isDestroyed)){this.scope=null,this.releaseSpecialProps(),L(n);for(let t of this.renderedNodes)Y(t);this.renderedNodes=[],this.firstChild=void 0,this.parentNode=void 0;for(let t of Reflect.ownKeys(this.reactiveProps))delete this.reactiveProps[t];this.state=0;}}syncSpecialProps(n){if(!n)return;let t=this.firstChild;if(!(!t||!(t instanceof Element))){this.releaseSpecialProps();for(let o of Reflect.ownKeys(n))if(shared.isString(o)){if(o===fn){let r=kn(n,o);this.rootRefCleanup=this.bindRootRef(r,t);continue}if(shared.isOn(o)){let r=kn(n,o);if(!shared.isFunction(r))continue;let i=o.slice(2).toLowerCase();this.bindRootEvent(t,i,r);}}}}bindRootEvent(n,t,o){let r=`_$${t}`,i=n[r];if(shared.isFunction(i)){n[r]=o,this.rootEventCleanups.push(()=>{n[r]===o&&(n[r]=i);});return}this.rootEventCleanups.push(re(n,t,s=>{n.disabled||o.call(n,s);}));}releaseSpecialProps(){for(let n of this.rootEventCleanups)n();this.rootEventCleanups.length=0,this.rootRefCleanup&&(this.rootRefCleanup(),this.rootRefCleanup=void 0);}bindRootRef(n,t){if(shared.isFunction(n))return n(t),()=>n(null);if(signals.isSignal(n)){let o=n,r=o.value;return o.value=t,()=>{o.value===t&&(o.value=r);}}}};function $(e){return !!e&&!!e.normal}function ke(e,n){return $(e)?e:new ie(e,n)}function be(e){let n,t=()=>{let o=document.createElement("template");o.innerHTML=e;let r=o.content.firstChild;if(!r)throw new Error("Invalid template: empty content");return r};return ()=>(n||(n=t())).cloneNode(true)}function Ut(e,n){let t=shared.isString(n)?document.querySelector(n):n;if(!t)return;t.innerHTML&&(t.innerHTML="");let r=U(),i;try{H(r,()=>{let s=ke(e);$(s)&&(i=s,G(t,s));});}catch(s){throw L(r),s}return {root:i,unmount:()=>{i==null||i.destroy(),L(r);}}}function Bt(e,n){let t=shared.isString(n)?document.querySelector(n):n;if(!t)return;qe(t);let o=U(),r;try{H(o,()=>{let i=ke(e);$(i)&&(r=i,W(t,i));});}catch(i){throw L(o),i}finally{Xe();}return {root:r,unmount:()=>{r==null||r.destroy(),L(o);}}}function en(e,n){let t=D();t&&(t.provides||(t.provides=new Map),t.provides.set(e,n));}function de(e,n){let t=D();if(!t)return n;let o=t;for(;o;){if(o.provides&&o.provides.has(e))return o.provides.get(e);o=o.parent;}return n}function nn(e,n){Object.defineProperty(e,"target",{configurable:true,value:n});}function Ln(e){let n=e.target,t=e.type,o=e.target,r=e.currentTarget,i=()=>{let l=n[`_$${t}`];if(l&&shared.isFunction(l)&&!n.disabled){let a=n[`${t}Data`];if(a?l.call(n,a,e):l.call(n,e),e.cancelBubble)return false}return n.host&&!shared.isString(n.host)&&!n.host._$host&&shared.isFunction(n.contains)&&n.contains(e.target)&&nn(e,n.host),true},s=()=>{for(;i()&&(n=n._$host||n.parentNode||n.host););};if(Object.defineProperty(e,"currentTarget",{configurable:true,get(){return n||document}}),e.composedPath){let l=e.composedPath();nn(e,l[0]);for(let a=0;a<l.length-2&&(n=l[a],!!i());a++){if(n._$host){n=n._$host,s();break}if(n.parentNode===r)break}}else s();nn(e,o);}var Pe=Symbol("_$EVENTS");function Wt(e,n=globalThis.document){if(!n)return;let t=n,o=t[Pe]||(t[Pe]=new Set);for(let r of e)o.has(r)||(o.add(r),n.addEventListener(r,Ln));}function zt(e=globalThis.document){if(!e)return;let n=e,t=n[Pe];if(t){for(let o of t.keys())e.removeEventListener(o,Ln);delete n[Pe];}}function se(e,n,t,o){let r=re(e,n,t,o);D()&&K(r);}var Jt=e=>e,Qt=typeof DataTransfer!="undefined"?new DataTransfer().files:[];function In(e,n){let t=e,o=n==null?"":String(n);t.value!==o&&(t.value=o);}var Zt={event:"change",forceChange:true,checkboxArray:true,read:e=>e.checked,write(e,n){let t=e,o=shared.isArray(n)?n.map(String).includes(t.value):!!n;t.checked!==o&&(t.checked=o);}},eo={event:"change",forceChange:true,read(e){let n=e;return n.checked?n.value:""},write(e,n){let t=e,o=String(n)===t.value;t.checked!==o&&(t.checked=o);}},no={event:"change",forceChange:true,read:e=>e.files,write(e,n){if(n==null)try{e.files=Qt;}catch(t){}}},Fn={event:"input",ime:true,read:e=>e.value,write:In},to={event:"change",forceChange:true,read(e){let n=e;return n.multiple?Array.from(n.selectedOptions,t=>t.value):n.value},write(e,n){let t=e;if(!t.multiple)return In(e,n);let o=new Set((shared.isArray(n)?n:[]).map(String));for(let r of Array.from(t.options))r.selected=o.has(r.value);}};function Mn(e){return {event:"input",read:n=>n[e],write(n,t){n[e]=t;}}}function oo(e,n){switch(e.nodeName){case "INPUT":return n==="checked"?e.type==="radio"?eo:Zt:n==="files"?no:n==="value"?Fn:Mn(n);case "SELECT":return to;case "TEXTAREA":return Fn;default:return Mn(n)}}function ro(e,n,t){if(!shared.isString(e))return e;let o=n?e.trim():e;if(t){let r=n?o:o.trim();if(r!==""){let i=Number(r);if(!Number.isNaN(i))return i}}return o}function io(e){let n=e.getRootNode();return (n instanceof Document||n instanceof ShadowRoot)&&n.activeElement===e}function so(e,n){if(n!=="value"||e.nodeName!=="INPUT")return false;let t=e.type;return t==="number"||t==="range"}function lo(e,n,t,o,r={}){if(!e)return;let{event:i,read:s,write:l,forceChange:a,ime:d,checkboxArray:u}=oo(e,n),y=r.trim===true,T=r.number===true||so(e,n),S=r.lazy===true,w=(y||T)&&n!=="files",_=shared.isFunction(t)?t:()=>t,b=w?E=>ro(E,y,T):Jt,F=u?E=>{let g=_();if(!shared.isArray(g))return b(E);let R=e.value,O=g.filter(c=>String(c)!==R);return E&&O.push(R),O}:b,p=false,f=S||a?"change":i,C=()=>{if(p)return;let E=s(e);if(E===void 0)return;let g=F(E);Object.is(_(),g)||o(g);};se(e,f,C),!S&&w&&f!=="change"&&se(e,"change",()=>l(e,b(s(e)))),d&&(se(e,"compositionstart",()=>{p=true;}),se(e,"compositionend",()=>{p=false,S||C();}));let N=signals.effect(()=>{let E=_();d&&p||d&&!S&&io(e)&&Object.is(b(s(e)),E)||l(e,E);});D()&&K(()=>N.stop());}function On(e){let n=e;return Array.isArray(n)&&n.length===1&&(n=n[0]),shared.isFunction(n)?n():n}function Hn(e){let n=Object.getOwnPropertyDescriptor(e,"children");return n!=null&&n.get?()=>On(n.get.call(e)):()=>On(e.children)}function co(e,n){let t=new Set(n);return new Proxy(e,{get(o,r){if(!t.has(r))return Reflect.get(o,r)},ownKeys(o){return Reflect.ownKeys(o).filter(r=>!t.has(r))},getOwnPropertyDescriptor(o,r){if(!t.has(r))return Reflect.getOwnPropertyDescriptor(o,r)},has(o,r){return t.has(r)?false:Reflect.has(o,r)}})}function Vn(e){var t;if(e&&((t=Object.getOwnPropertyDescriptor(e,"children"))!=null&&t.get||signals.isReactive(e)))return [()=>e.children];let n=e==null?void 0:e.children;return n==null?null:n}Vn[Ke]=true;function fo(e){return !!e&&!!e[Ke]}function Re(e){let n=shared.isFunction(e.target)?e.target():e.target;return n==null?null:shared.isString(n)?document.querySelector(n):n}function De(e){return shared.isFunction(e.disabled)?!!e.disabled():!!e.disabled}function jn(e){if(oe()){let u=yo(e);if(u)return u}let n=document.createComment("portal");n[ue]=true;let{children:t}=e;if(t==null)return n;let o=D(),r=null,i=(u,y)=>{r=U(o),H(r,()=>{W(u,()=>t,y);});},s=()=>{r&&(L(r),r=null);},l=(u,y)=>{if(s(),u){let T=n.parentNode;if(!T)return;i(T,n);return}y&&i(y);},a=false,d=signals.effect(()=>{let u=De(e),y=u?null:Re(e);a&&l(u,y);});return J(()=>{a=!0;let u=De(e),y=u?null:Re(e);if(u||y){l(u,y);return}queueMicrotask(()=>{n.parentNode&&l(De(e),Re(e));});}),K(()=>{d.stop(),s();}),n}jn[ue]=true;function yo(e){if(De(e))return null;let n=We();if(!n)return null;let t=Re(e);return !t||!ze(t)?null:(n[ue]=true,n)}function ho(e){return !!e&&!!e[ue]}function Le(e){let n=e;for(;shared.isFunction(n);)n=n();return signals.isSignal(n)||signals.isComputed(n)?Le(n.value):Array.isArray(n)?n.map(t=>Le(t)):n}var me=Symbol("SuspenseContext");function Un(e){var E;if(!shared.isBrowser())return (E=e.fallback)!=null?E:"";let n=D(),t=document.createComment("suspense"),o=document.createComment("/suspense"),r=document.createDocumentFragment();r.append(t,o);let i=true,s=0,l=false,a=null,d=null,u=null,y=null,T=()=>{let g=document.createDocumentFragment();for(;o.previousSibling&&o.previousSibling!==t;)g.prepend(o.previousSibling);d=g;},S=()=>{var R;if(!d)return;let g=(R=o.parentNode)!=null?R:r;for(;d.firstChild;)g.insertBefore(d.firstChild,o);d=null;},w=()=>{e.fallback==null||u||(u=U(n),H(u,()=>{var g;W((g=o.parentNode)!=null?g:r,()=>Le(e.fallback),o);}));},_=()=>{u&&(L(u),u=null);},b=g=>{l=true,a=U(n),H(a,()=>{var R;W((R=o.parentNode)!=null?R:r,()=>Le(g),o);}),l=false,s&&!d&&(T(),w());},F=()=>{d||l||(T(),w());},p=()=>{if(!d)return;let g=e.children!=null&&!shared.isPromise(e.children);a==null&&y==null&&!g||(_(),S(),a||(y?b(y):g&&b(e.children)));},f=()=>{i&&--s===0&&p();},C={register:g=>{s++,F(),g.then(f).catch(R=>{f();});},increment:()=>{s++,F();},decrement:()=>{s=Math.max(0,s-1),s===0&&p();}};en(me,C);let N=e.children;return shared.isPromise(N)?(N.then(g=>{y=g;}).catch(()=>{}),C.register(N)):N!=null?b(N):e.fallback!=null&&F(),K(()=>{i=false,s=0,y=null,a&&L(a),u&&L(u),a=u=null,d=null,t.remove(),o.remove();}),r}Un[je]=true;function Co(e){return !!e&&!!e[je]}function No(e,n){let t=signals.signal(n==null?void 0:n.initialValue),o=signals.signal(true),r=signals.signal(null),i=signals.signal("pending"),s=0,l=null,a=de(me,null),d=()=>un(null,null,function*(){let T=++s;l==null||l.abort(),l=new AbortController,o.value=true,i.value="pending",r.value=null;let S;try{S=Promise.resolve(e(l.signal));}catch(w){r.value=w instanceof Error?w:new Error(String(w)),i.value="errored",o.value=false;return}a==null||a.register(S);try{let w=yield S;T===s&&(t.value=w,i.value="ready",o.value=!1);}catch(w){if(T!==s)return;if(w instanceof DOMException&&w.name==="AbortError"){o.value=false;return}r.value=w instanceof Error?w:new Error(String(w)),i.value="errored",o.value=false;}});d(),K(()=>{s++,l==null||l.abort(),l=null;});let u=(()=>t.value);return u.loading=o,u.error=r,u.state=i,[u,{mutate:T=>{t.value=T,i.value="ready",o.value=false,r.value=null;},refetch:()=>d()}]}function Bn(e){return shared.isFunction(e)?e:e.default}function bo(e,n){if(n==="client-only"){let s=()=>"";return s.__asyncLoader=e,s.__asyncResolved=()=>null,s}let t=null,o=null,r=()=>o!=null?o:o=e().then(s=>{t=Bn(s);}).catch(()=>{});r();let i=s=>t?t(s):"";return i.__asyncLoader=r,i.__asyncResolved=()=>t,i}function wo(e,n){let{loading:t,error:o,delay:r=200,timeout:i,onError:s}=n,l=null,a=null,d="pending",u=null,y=()=>u!=null?u:u=e().then(S=>{l=Bn(S),d="resolved";}).catch(S=>{a=S instanceof Error?S:new Error(String(S)),d="errored",u=null;});y();function T(S){var c;let w=D(),_=document.createComment("async"),b=document.createDocumentFragment();b.appendChild(_);let F=true,p=null,f=null,C=null,N=()=>{f!=null&&clearTimeout(f),C!=null&&clearTimeout(C),f=C=null;},E=(h,m)=>{F&&(w&&w.isDestroyed||(p&&(L(p),p=null),h&&(p=U(w),H(p,()=>{var k;W((k=_.parentNode)!=null?k:b,()=>new ie(h,m),_);}))));};Ze(()=>{F=false,N(),p&&(L(p),p=null),_.remove();});let g=h=>()=>{u=null,d="pending",a=null,t&&E(t),y().then(()=>R(h));},R=h=>{F&&(N(),d==="resolved"&&l?E(l,h):d==="errored"&&a&&(o&&E(o,{error:a,retry:g(h)}),s&&s(a,g(h))));};if(d==="resolved"&&l)return E(l,S),b;if(d==="errored"&&a)return o&&E(o,{error:a,retry:g(S)}),b;let O=y().then(()=>R(S));return (c=de(me))==null||c.register(O),r>0?f=setTimeout(()=>{F&&d==="pending"&&t&&E(t);},r):t&&E(t),i!=null&&(C=setTimeout(()=>{!F||d!=="pending"||(a=new Error(`[defineAsyncComponent] Timeout after ${i}ms`),d="errored",o&&E(o,{error:a,retry:g(S)}),s&&s(a,g(S)));},i)),b}return T.__asyncLoader=y,T.__asyncResolved=()=>l,T}function Ao(e,n={}){var t;return typeof window=="undefined"?bo(e,(t=n.ssr)!=null?t:"blocking"):wo(e,n)}function Gn(e){let n=document.createDocumentFragment(),t=document.createComment("");n.appendChild(t);let o=[],r=[],i=e.key,s=e.children,l=Array.isArray(s)&&s.length===1&&shared.isFunction(s[0])?s[0]:e.children;if(!shared.isFunction(l))throw new TypeError("<For> requires `children` to be a function (item, index) => Node");let a=()=>{var f,C;let p=e.each;return signals.isSignal(p)?(f=p.value)!=null?f:[]:shared.isFunction(p)?(C=p())!=null?C:[]:p!=null?p:[]},d=(p,f)=>i?i(p,f):p,u=(p,f,C)=>{if(p==null||p===false)return [];if(Array.isArray(p)){let E=[];for(let g of p)E.push(...u(g,f,C));return E}if($(p))return G(f,p,C!=null?C:void 0),p.renderedNodes;let N=Ae(p);return G(f,N,C!=null?C:void 0),[N]},y=(p,f)=>{if(!e.fallback)return;r=u(e.fallback(),p,f);},T=()=>{for(let p of r)Y(p);r=[];},S=D(),w=(p,f,C,N,E=d(p,f))=>{var c;let g=(c=D())!=null?c:S,R=U(g),O=[];try{H(R,()=>{O=u(l(p,f),C,N);});}catch(h){throw L(R),h}return {key:E,item:p,nodes:O,scope:R}},_=p=>{L(p.scope);for(let f of p.nodes)f.parentNode&&f.parentNode.removeChild(f);},b=signals.effect(()=>{let p=a(),f=t.parentNode;if(!f){if(p.length===0)y(n,t);else {o=new Array(p.length);let C=0;for(let N of p)o[C]=w(N,C,n,t),C++;}return}F(f,p);});function F(p,f){let C=o.length,N=f.length;if(N===0){for(let v=0;v<C;v++)_(o[v]);o=[],e.fallback&&r.length===0&&y(p,t);return}if(C===0||r.length>0){r.length>0&&T(),o=new Array(N);let v=document.createDocumentFragment();for(let P=0;P<N;P++)o[P]=w(f[P],P,v,null);p.insertBefore(v,t);return}let E=new Map;for(let v=0;v<C;v++){let P=o[v],V=E.get(P.key),q=[P,v];V?V.push(q):E.set(P.key,[q]);}let g=new Array(N),R=[],O=null,c=new Int32Array(N),h=false,m=0,k=new Array(N);for(let v=0;v<N;v++)k[v]=d(f[v],v);for(let v=0;v<N;v++){let P=f[v],V=k[v],q=E.get(V);if(q&&q.length>0){let[ce,z]=q.shift();Object.is(ce.item,P)?(ce.item=P,g[v]=ce,c[v]=z+1,z<m?h=true:m=z):(O||(O=document.createDocumentFragment()),_(ce),g[v]=w(P,v,O,null,V));}else O||(O=document.createDocumentFragment()),g[v]=w(P,v,O,null,V);}for(let v of E.values())for(let[P]of v)R.push(P);for(let v of R)_(v);let A=h?Je(c):[],x=A.length-1,M=t;for(let v=N-1;v>=0;v--){let V=g[v].nodes;if(!(c[v]===0)&&h&&x>=0&&v===A[x]){x--;for(let z=V.length-1;z>=0;z--)M=V[z];continue}for(let z=V.length-1;z>=0;z--){let Oe=V[z];Oe.nextSibling!==M&&p.insertBefore(Oe,M),M=Oe;}}o=g;}return K(()=>{b.stop();for(let p of o)_(p);o=[],T(),t.parentNode&&t.parentNode.removeChild(t);}),n}Gn[pn]=true;function rn(e){var i,s,l,a,d,u,y,T,S,w;let n=(i=e.name)!=null?i:"v",t=(s=e.enterFromClass)!=null?s:`${n}-enter-from`,o=(l=e.enterActiveClass)!=null?l:`${n}-enter-active`,r=(a=e.enterToClass)!=null?a:`${n}-enter-to`;return {enterFrom:t,enterActive:o,enterTo:r,leaveFrom:(d=e.leaveFromClass)!=null?d:`${n}-leave-from`,leaveActive:(u=e.leaveActiveClass)!=null?u:`${n}-leave-active`,leaveTo:(y=e.leaveToClass)!=null?y:`${n}-leave-to`,appearFrom:(T=e.appearFromClass)!=null?T:t,appearActive:(S=e.appearActiveClass)!=null?S:o,appearTo:(w=e.appearToClass)!=null?w:r}}var Wn=e=>e?e.endsWith("ms")?Number(e.slice(0,-2).replace(",",".")):Number(e.slice(0,-1).replace(",","."))*1e3:0;function zn(e,n){let t=e.split(", "),o=n.split(", "),r=0;for(let[i,s]of o.entries()){let l=Wn(s)+Wn(t[i%t.length]||"0s");l>r&&(r=l);}return r}function Xn(e,n){let t=getComputedStyle(e),o=n!=="animation"?zn(t.transitionDelay,t.transitionDuration):0,r=n!=="transition"?zn(t.animationDelay,t.animationDuration):0;return o===0&&r===0?null:o>=r?{event:"transitionend",timeout:o}:{event:"animationend",timeout:r}}function B(e,n){for(let t of n.split(/\s+/))t&&e.classList.add(t);}function j(e,n){for(let t of n.split(/\s+/))t&&e.classList.remove(t);}function ye(e){requestAnimationFrame(()=>requestAnimationFrame(e));}function Ie(e){e.offsetHeight;}function le(e,n,t,o){if(t!=null){setTimeout(o,t);return}let r=Xn(e,n);if(!r){o();return}let i=false,s=()=>{i||(i=true,clearTimeout(a),e.removeEventListener(r.event,l),o());},l=()=>s();e.addEventListener(r.event,l);let a=setTimeout(s,r.timeout+1);}function ae(e,n){return e==null?null:shared.isNumber(e)?e:e[n]}function qn(e){if(e==null||e===false)return null;if(Array.isArray(e))return e[0]instanceof Element?e[0]:null;if(e instanceof Element)return e;if($(e)){let n=e;if(n.scope==null){let o=document.createDocumentFragment();n.mount(o);}let t=n.firstChild;return t instanceof Element?t:null}return null}var Me=Symbol("enter_cb"),pe=Symbol("leave_cb");function Yn(e){let n=document.createComment(""),t=rn(e),o=e.css!==false,r=Hn(e),i="idle",s=null,l=null,a=false,d,u=false,y=false,T=false,S=(f,C)=>{var h;let N=f[pe];N&&N(true),i="entering";let E=C==="appear"?t.appearFrom:t.enterFrom,g=C==="appear"?t.appearActive:t.enterActive,R=C==="appear"?t.appearTo:t.enterTo;(h=e.onBeforeEnter)==null||h.call(e,f),o&&(B(f,E),B(f,g));let O=false,c=m=>{var k,A;O||(O=true,f[Me]=void 0,o&&(j(f,E),j(f,g),j(f,R)),m?(k=e.onEnterCancelled)==null||k.call(e,f):(i="entered",(A=e.onAfterEnter)==null||A.call(e,f)));};f[Me]=c,ye(()=>{if(!O)if(o&&(j(f,E),B(f,R)),e.onEnter)e.onEnter(f,()=>c(false));else if(o){let m=ae(e.duration,"enter");le(f,e.type,m,()=>c(false));}else c(false);});},w=(f,C)=>{var c;let N=f[Me];N&&(N(true),Ie(f)),i="leaving",(c=e.onBeforeLeave)==null||c.call(e,f),o&&(B(f,t.leaveFrom),B(f,t.leaveActive));let E=false,g=h=>{var m,k;E||(E=true,f[pe]=void 0,o&&(j(f,t.leaveFrom),j(f,t.leaveActive),j(f,t.leaveTo)),h?(m=e.onLeaveCancelled)==null||m.call(e,f):(i="idle",C(),(k=e.onAfterLeave)==null||k.call(e,f)));};f[pe]=g;let R=ae(e.duration,"leave"),O=o&&!e.onLeave&&R==null?!!Xn(f,e.type):false;if(!e.onLeave&&R==null&&!O){g(false);return}ye(()=>{E||(o&&(j(f,t.leaveFrom),B(f,t.leaveTo)),e.onLeave?e.onLeave(f,()=>g(false)):o?le(f,e.type,R,()=>g(false)):g(false));});},_=(f,C)=>{if(f&&i==="leaving"&&l){let E=l,g=E[pe];g&&g(true),l=null,s=E,S(E,"enter");return}if(f===s)return;let N=s;if(s=f,N){l=N;let E=N;w(E,()=>{E.parentNode&&E.parentNode.removeChild(E),l===E&&(l=null);});}f&&n.parentNode?(n.parentNode.insertBefore(f,n),C&&!e.appear?i="entered":S(f,C&&e.appear?"appear":"enter")):!N&&!f&&(i="idle");},b=()=>{if(y=false,T||!u)return;let f=d;u=false,d=void 0;try{_(qn(f),!1);}catch(C){}},F=f=>{d=f,u=true,!y&&(y=true,queueMicrotask(b));},p=signals.effect(()=>{let f=r();a?F(f):(d=f,u=true);});return J(()=>{a=!0;let f=u?qn(d):null;u=!1,d=void 0,_(f,!0);}),K(()=>{T=true,p.stop();for(let f of [s,l]){if(!f)continue;let C=f[Me],N=f[pe];C==null||C(true),N==null||N(true),f.parentNode&&f.parentNode.removeChild(f);}s=null,l=null,i="idle";}),n}Yn[$e]=true;function Ro(e){return !!e&&!!e[$e]}function ln(e,n){if(e==null||e===false)return {el:null,comp:null};if(Array.isArray(e)&&e.length===1)return ln(e[0],n);if(shared.isFunction(e))return ln(e(),n);if(e instanceof HTMLElement)return {el:e,comp:null};if($(e)){let t=e;t.scope==null&&t.mount(n);let o=t.firstChild;return o instanceof HTMLElement?{el:o,comp:t}:{el:null,comp:t}}return {el:null,comp:null}}function Fo(e){return {position:e.style.position,top:e.style.top,left:e.style.left,width:e.style.width,height:e.style.height}}function sn(e,n){e.style.position=n.position,e.style.top=n.top,e.style.left=n.left,e.style.width=n.width,e.style.height=n.height;}function Jn(e){var g,R,O;let n=(g=e.tag)!=null?g:"div",t=document.createElement(n),o=rn(e),r=e.css!==false,i=(O=e.moveClass)!=null?O:`${(R=e.name)!=null?R:"v"}-move`,s=e.key,l=e.children,a=Array.isArray(l)&&l.length===1&&shared.isFunction(l[0])?l[0]:e.children;if(!shared.isFunction(a)||!shared.isFunction(s))throw new TypeError("<TransitionGroup> requires `children: (item, index) => Node` and `key: (item, index) => unknown`");let d=()=>{var h,m;let c=e.each;return signals.isSignal(c)?(h=c.value)!=null?h:[]:shared.isFunction(c)?(m=c())!=null?m:[]:c!=null?c:[]},u=[],y=false,T=(c,h)=>{let m=D(),k=U(m),A;try{H(k,()=>{A=a(c,h);});}catch(v){throw L(k),v}let{el:x,comp:M}=ln(A,t);return x?{key:s(c,h),item:c,el:x,comp:M,scope:k,state:"entering"}:(L(k),null)},S=c=>{if(c.comp){for(let h of c.comp.renderedNodes)h.parentNode===t&&t.removeChild(h);return}c.el.parentNode===t&&t.removeChild(c.el);},w=c=>{var h,m;(h=c.cancelEnter)==null||h.call(c,true),(m=c.cancelLeave)==null||m.call(c,true),c.comp&&c.comp.destroy(),S(c),L(c.scope);},_=c=>{var A,x,M;let h=c.el;if((A=c.cancelLeave)==null||A.call(c,true),!r){c.state="present",(x=e.onAfterEnter)==null||x.call(e,h);return}(M=e.onBeforeEnter)==null||M.call(e,h),B(h,o.enterFrom),B(h,o.enterActive);let m=false,k=v=>{var P,V;m||(m=true,c.cancelEnter=void 0,j(h,o.enterFrom),j(h,o.enterActive),j(h,o.enterTo),v?(P=e.onEnterCancelled)==null||P.call(e,h):(c.state="present",(V=e.onAfterEnter)==null||V.call(e,h)));};c.cancelEnter=k,c.state="entering",ye(()=>{if(!m)if(j(h,o.enterFrom),B(h,o.enterTo),e.onEnter)e.onEnter(h,()=>k(false));else {let v=ae(e.duration,"enter");le(h,e.type,v,()=>k(false));}});},b=(c,h)=>{var M,v;let m=c.el;c.cancelEnter&&(c.cancelEnter(true),Ie(m)),c.state="leaving",c.savedStyles=Fo(m);let k=t.getBoundingClientRect();if(m.style.position="absolute",m.style.top=`${h.top-k.top}px`,m.style.left=`${h.left-k.left}px`,m.style.width=`${h.width}px`,m.style.height=`${h.height}px`,!r){c.savedStyles&&sn(m,c.savedStyles),S(c),L(c.scope),c.comp&&c.comp.destroy(),(M=e.onAfterLeave)==null||M.call(e,m);return}(v=e.onBeforeLeave)==null||v.call(e,m),B(m,o.leaveFrom),B(m,o.leaveActive);let A=false,x=P=>{var V,q;if(!A){if(A=true,c.cancelLeave=void 0,j(m,o.leaveFrom),j(m,o.leaveActive),j(m,o.leaveTo),P){c.savedStyles&&sn(m,c.savedStyles),c.savedStyles=void 0,(V=e.onLeaveCancelled)==null||V.call(e,m);return}c.savedStyles&&sn(m,c.savedStyles),c.savedStyles=void 0,S(c),L(c.scope),c.comp&&c.comp.destroy(),(q=e.onAfterLeave)==null||q.call(e,m);}};c.cancelLeave=x,ye(()=>{if(!A)if(j(m,o.leaveFrom),B(m,o.leaveTo),e.onLeave)e.onLeave(m,()=>x(false));else {let P=ae(e.duration,"leave");le(m,e.type,P,()=>x(false));}});},F=(c,h)=>{if(!r||c.state!=="present")return;let m=c.el,k=m.getBoundingClientRect(),A=h.left-k.left,x=h.top-k.top;if(!A&&!x)return;let M=m.style.transform,v=m.style.transitionDuration;m.style.transform=`translate(${A}px, ${x}px)`,m.style.transitionDuration="0s",B(m,i),Ie(m),m.style.transform=M,m.style.transitionDuration=v;let P=ae(e.duration,"enter");le(m,e.type,P,()=>{j(m,i);});},p=()=>{for(let c of u)c.state!=="leaving"&&(c.prevRect=c.el.getBoundingClientRect());},f=c=>{let h=new Map;for(let x of u)h.set(x.key,x);let m=[];for(let[x,M]of c.entries()){let v=s(M,x),P=h.get(v);if(P)h.delete(v),P.item=M,m.push(P);else {let V=T(M,x);V&&m.push(V);}}let k=[];for(let x of h.values())x.state!=="leaving"&&k.push(x);let A=null;for(let x=m.length-1;x>=0;x--){let M=m[x].el;(M.parentNode!==t||M.nextSibling!==A)&&t.insertBefore(M,A),A=M;}return {next:m,leaving:k}},C=(c,h)=>{if(h){let A=[];for(let[x,M]of c.entries()){let v=T(M,x);v&&(v.el.parentNode!==t&&t.appendChild(v.el),v.state="present",A.push(v));}u=A;return}p();let{next:m,leaving:k}=f(c);for(let A of m)A.state!=="present"&&_(A);for(let A of k){let x=A.prevRect;x&&b(A,x);}for(let A of m)A.state!=="present"||!A.prevRect||(F(A,A.prevRect),A.prevRect=void 0);u=m.concat(k);},N=null,E=signals.effect(()=>{let c=d();if(!y){N=c;return}C(c,false);});return J(()=>{y=!0,N&&(C(N,!0),N=null);}),K(()=>{E.stop();for(let c of u)w(c);u=[],t.parentNode&&t.parentNode.removeChild(t);}),t}Jn[Ue]=true;function Mo(e){return !!e&&!!e[Ue]}
|
|
2
|
-
exports.Component=
|
|
1
|
+
'use strict';var shared=require('@estjs/shared'),signals=require('@estjs/signals');var mn=Object.getOwnPropertySymbols;var it=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable;var pn=(e,n)=>{var t={};for(var o in e)it.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&mn)for(var o of mn(e))n.indexOf(o)<0&&st.call(e,o)&&(t[o]=e[o]);return t};var yn=(e,n,t)=>new Promise((o,r)=>{var s=c=>{try{a(t.next(c));}catch(d){r(d);}},l=c=>{try{a(t.throw(c));}catch(d){r(d);}},a=c=>c.done?o(c.value):Promise.resolve(c.value).then(s,l);a((t=t.apply(e,n)).next());});var hn="ref",vn="key",je="http://www.w3.org/2000/svg",$e="http://www.w3.org/2000/xlink",We="http://www.w3.org/2000/xmlns/";var Ue=Symbol(""),fe=Symbol(""),Be=Symbol(""),gn=Symbol(""),Ge=Symbol(""),qe=Symbol("");var ee=null,at=0;function F(){return ee}function Ee(e){ee=e,signals.setCurrentScope(e==null?void 0:e.effectScope);}function W(e=ee){let n=e?e.effectScope.run(()=>signals.effectScope()):signals.effectScope(true),t={id:++at,effectScope:n,parent:e,children:null,provides:null,cleanup:null,onMount:null,onUpdate:null,onDestroy:null,isMounted:false,isDestroyed:false};return e&&(e.children||(e.children=new Set),e.children.add(t)),t}function O(e,n){let t=ee;Ee(e);try{return e.effectScope.run(n)}finally{Ee(t);}}function L(e){var t;if(!e||e.isDestroyed)return;if(e.isDestroyed=true,(t=e.parent)!=null&&t.children&&e.parent.children.delete(e),e.parent=null,e.children&&e.children.size>0){for(let o of e.children)o&&(o.parent=null,L(o));e.children.clear();}let n=ee;if(Ee(e),e.onDestroy){for(let o=0;o<e.onDestroy.length;o++)try{e.onDestroy[o]();}catch(r){}e.onDestroy=null;}if(e.cleanup){for(let o=0;o<e.cleanup.length;o++)try{e.cleanup[o]();}catch(r){}e.cleanup=null;}Ee(n),e.effectScope.stop(),e.provides&&(e.provides.clear(),e.provides=null),e.onMount=null,e.onUpdate=null,e.children=null;}function j(e){let n=ee;n&&(n.cleanup||(n.cleanup=[]),n.cleanup.push(e));}var pt=/^data:\s*(?:text\/html|text\/xml|application\/xhtml\+xml|image\/svg\+xml|application\/xml)/,yt={allowfullscreen:"allowFullscreen",formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",novalidate:"noValidate",readonly:"readOnly"};function Sn(e,n,t){var r;if(e.namespaceURI===je)return;let o=(r=yt[n.toLowerCase()])!=null?r:n;if(!(!(o in e)||typeof e[o]!="boolean"))try{e[o]=t;}catch(s){}}function ht(e){let n=e.replaceAll(/[\u0000-\u0020]+/g,"").toLowerCase();return shared.startsWith(n,"javascript:")||shared.startsWith(n,"vbscript:")?true:pt.test(n)}function ne(e,n,t,o){if(n===vn){o==null?e.removeAttribute(n):e.setAttribute(n,String(o));return}if(n===shared.SPREAD_NAME){let y=shared.isObject(t)?t:null,v=shared.isObject(o)?o:null;if(y)for(let g in y)g!==shared.SPREAD_NAME&&(!v||!(g in v))&&ne(e,g,y[g],null);if(v)for(let g in v)g!==shared.SPREAD_NAME&&ne(e,g,y==null?void 0:y[g],v[g]);return}let r=(e==null?void 0:e.namespaceURI)===je,s=r&&shared.startsWith(n,"xlink:"),l=r&&shared.startsWith(n,"xmlns:"),a=shared.isSpecialBooleanAttr(n)||shared.isBooleanAttr(n);if(t===o||n.length>2&&n.charCodeAt(0)===111&&n.charCodeAt(1)===110)return;let c=n.toLowerCase();if(c==="innerhtml"||c==="srcdoc")return;if(o==null){if(s)e.removeAttributeNS($e,n.slice(6));else if(l){let y=n.slice(6);e.removeAttributeNS(We,y);}else e.removeAttribute(n);(a||c==="indeterminate")&&Sn(e,n,false);return}if(a){let y=shared.includeBooleanAttr(o);y?e.setAttribute(n,""):e.removeAttribute(n),Sn(e,n,y);return}let d=shared.isSymbol(o)?String(o):o;if(!((c==="href"||c==="src"||c==="xlink:href"||c==="action"||c==="formaction"||c==="poster")&&shared.isString(d)&&ht(d))){if(s){e.setAttributeNS($e,n,String(d));return}if(l){e.setAttributeNS(We,n,String(d));return}if(r)e.setAttribute(n,String(d));else if(n in e)try{e[n]=d;}catch(y){e.setAttribute(n,String(d));}else e.setAttribute(n,String(d));}}function Te(e,n,t,o=false){if(n===t)return;let r=Se(t);if(!r){e.removeAttribute("class");return}(shared.isString(n)?n:Se(n))!==r&&(o?e.setAttribute("class",r):e.className=r);}var Se=shared.normalizeClassName;var Tn=/\s*!important$/,Nn=/(?:^|;)\s*([a-z][a-z\d-]*)\s*:/gi,bt=["Webkit","Moz","ms"],ze={};function be(e,n,t){let o=e.style;if(t&&shared.isString(t)){n!==t&&(o.cssText=t);return}if(!t){n&&e.removeAttribute("style");return}if(n&&!shared.isString(n)){let r=n;for(let s in r)(!t||t[s]==null)&&oe(o,s,"");}else if(n&&shared.isString(n)){Nn.lastIndex=0;let r;for(;(r=Nn.exec(n))!==null;){let s=r[1].trim();s&&t&&shared.isObject(t)&&t[s]==null&&oe(o,s,"");}}if(t&&!shared.isString(t)){let r=t;for(let s in r){let l=r[s];(!n||shared.isString(n)||n[s]!==l)&&l!=null&&oe(o,s,l);}}}function oe(e,n,t){if(shared.isArray(t)){for(let s of t)oe(e,n,s);return}(t==null||t==="")&&(t="");let o=shared.isString(t)&&Tn.test(t)?"important":"";if(o&&(t=t.replace(Tn,"")),shared.startsWith(n,"--")){o?e.setProperty(n,t,o):e.setProperty(n,t);return}let r=_t(e,n);o?e.setProperty(wt(r),t,o):e[r]=t;}function wt(e){let n=shared.kebabCase(e);return shared.startsWith(e,"Webkit")||shared.startsWith(e,"Moz")||shared.startsWith(e,"ms")?`-${n}`:n}function _t(e,n){let t=ze[n];if(t)return t;let o=shared.camelCase(n);if(o!=="filter"&&o in e)return ze[n]=o;o=shared.capitalize(o);for(let r of bt){let s=r+o;if(s in e)return ze[n]=s}return n}var Xe=0;function bn(){return String(Xe++)}function Pt(){Xe=0;}var z=false;function ie(){return z}var re=new Map;function Rt(e){let n=e.querySelectorAll("[data-hk]");for(let t of n){let o=t.dataset.hk;o!=null&&!re.has(o)&&re.set(o,t);}}var _e=[],de=new Map;function Dt(){if(typeof document=="undefined")return;let e=document.createNodeIterator(document.body,NodeFilter.SHOW_COMMENT),n;for(;n=e.nextNode();){let t=n.data;if(t==="teleport-anchor")_e.push(n);else if(t==="teleport-start"){let o=n.parentElement;if(!o)continue;let r=de.get(o);r||(r=[],de.set(o,r)),r.push(n);}}}function Ye(){var e;return (e=_e.shift())!=null?e:null}function Je(e){let n=de.get(e),t=n==null?void 0:n.shift();if(!t)return null;let o=[],r=t.nextSibling;for(;r;){if(r.nodeType===Node.COMMENT_NODE&&r.data==="teleport-end")return {start:t,end:r,nodes:o};o.push(r),r=r.nextSibling;}return null}function Qe(e){z=true,Xe=0,re.clear(),_e.length=0,de.clear(),Rt(e),Dt();}function Ze(){z=false,re.clear(),_e.length=0,de.clear();}function wn(e,n,t){var s,l,a;if(!z||t&&t.parentNode!==e)return null;if(n.length===0)return [];let o=new Array(n.length),r=t?t.previousSibling:e.lastChild;for(let c=n.length-1;c>=0;c--){let d=n[c],m=d.nodeType;if(m===Node.TEXT_NODE){let y=(s=d.textContent)!=null?s:"";if(y===""){if((r==null?void 0:r.nodeType)===Node.TEXT_NODE&&((l=r.textContent)!=null?l:"")==="")o[c]=r,r=r.previousSibling;else {let w=document.createTextNode(""),x=c+1<n.length?o[c+1]:t!=null?t:null;e.insertBefore(w,x),o[c]=w;}continue}if(!r||r.nodeType!==Node.TEXT_NODE)return null;let v=(a=r.textContent)!=null?a:"";if(v===y){o[c]=r,r=r.previousSibling;continue}if(!v.endsWith(y))return null;let g=v.slice(0,v.length-y.length);if(!g)return null;let b=document.createTextNode(g);e.insertBefore(b,r),r.textContent=y,o[c]=r,r=b;continue}if(!r||r.nodeType!==m)return null;if(m===Node.ELEMENT_NODE){if(r.tagName!==d.tagName)return null}else if(m===Node.COMMENT_NODE&&r.data!==d.data)return null;o[c]=r,r=r.previousSibling;}return o}function Lt(e){var t,o,r;return (r=(o=e.dataset.hk)!=null?o:(t=e.closest("[data-hk]"))==null?void 0:t.dataset.hk)!=null?r:null}function _n(e,n){if(z&&e){let t=Lt(e);if(t)return `${t}-${n}`}return String(n)}function Ft(e,n){if(!e||n<0)return null;let t=_n(e instanceof Element?e:null,n),o=0,r=e.firstChild;for(;r;){if(r.nodeType===Node.COMMENT_NODE){let s=r;if(s.data===t||!z&&s.data===""&&o++===n)return s}r=r.nextSibling;}return null}function Mt(e,n){if(!(e instanceof Element)||n<0)return null;let t=_n(e,n),o=e.firstChild;for(;o;){if(o instanceof Element&&o.getAttribute(shared.HYDRATION_ANCHOR_ATTR)===t)return o;o=o.nextSibling;}return null}function It(e){if(!shared.isBrowser())return ()=>{throw new Error("[essor] getRenderedElement called in non-browser environment")};let n=null;return ()=>{if(!z)return n||(n=we(e)),n();let t=bn(),o=re.get(t);return o?(re.delete(t),o):(shared.warn(`[essor] hydration mismatch: no SSR element for key "${t}"`),n||(n=we(e)),n())}}function Ot(e,n,t,o){z||Te(e,n,t,o);}function Ht(e,n,t,o){z||ne(e,n,t,o);}function Vt(e,n,t){z||be(e,n,t);}function en(e,n){return n&&n.parentNode===e?n:null}function xn(e,n,t,o){let r=en(e,o),s=n.length,l=t.length;if(s===0&&l===0)return t;if(s===0){for(let m=0;m<l;m++)G(e,t[m],r);return t}if(l===0){for(let m=0;m<s;m++)X(n[m]);return []}let a=0,c=s-1,d=l-1;for(;a<=c&&a<=d&&n[a]===t[a];)a++;for(;c>=a&&d>=a&&n[c]===t[d];)c--,d--;if(a>c){if(a<=d){let m=d+1,y=en(e,m<l?t[m]:r);for(let v=a;v<=d;v++)G(e,t[v],y);}}else if(a>d)for(let m=a;m<=c;m++)X(n[m]);else Kt(e,n,t,a,c,d,r);return t}function Kt(e,n,t,o,r,s,l){let a=s-o+1,c=a<=4?w=>{for(let x=o;x<=s;x++)if(t[x]===w)return x}:(()=>{let w=new Map;for(let x=o;x<=s;x++)w.set(t[x],x);return x=>w.get(x)})(),d=new Int32Array(a),m=0,y=false,v=0;for(let w=o;w<=r;w++){let x=n[w];if(m>=a){X(x);continue}let D=c(x);D===void 0?X(x):(d[D-o]=w+1,D>=v?v=D:y=true,m++);}let g=y?nn(d):[],b=g.length-1;for(let w=a-1;w>=0;w--){let x=o+w,D=t[x],M=en(e,x+1<t.length?t[x+1]:l);d[w]===0?G(e,D,M):y&&(b<0||w!==g[b]?G(e,D,M):b--);}}function nn(e){let n=new Int32Array(e.length),t=[0],o=e.length,r,s,l,a,c;for(r=0;r<o;r++){let d=e[r];if(d!==0){if(s=t[t.length-1],e[s]<d){n[r]=s,t.push(r);continue}for(l=0,a=t.length-1;l<a;)c=l+a>>1,e[t[c]]<d?l=c+1:a=c;d<e[t[l]]&&(l>0&&(n[r]=t[l-1]),t[l]=r);}}for(l=t.length,a=t[l-1];l-- >0;)t[l]=a,a=n[a];return t}function X(e){if(e)if(U(e))e.destroy();else {let n=e;n.parentNode&&n.remove();}}function G(e,n,t){if(!e||!n)return;let o=U(t)?t.firstChild:t;if(U(n)){n.mount(e,o);return}o?e.insertBefore(n,o):e.appendChild(n);}function xe(e){if(e instanceof Node||U(e))return e;let n=typeof e;return e==null||n==="string"||n==="number"||n==="boolean"||n==="symbol"?document.createTextNode(e===false||e==null?"":String(e)):document.createTextNode(String(e))}function q(e,n,t){if(!e)return;let o=F(),r=[],s=true,l=c=>{if(c instanceof Node)return [c];if(U(c))return [c];let d=typeof c;return c==null||d==="string"||d==="number"||d==="boolean"?[xe(c)]:shared.coerceArray(c).map(m=>shared.isFunction(m)?m():m).flatMap(m=>m).map(xe)},a=signals.effect(()=>{let c=()=>{let d=shared.isFunction(n)?n():n,m=typeof d,y=d==null||m==="string"||m==="number"||m==="boolean"||m==="symbol",v=l(d);if(s&&ie()&&v.every(g=>g instanceof Node&&g.parentNode===e)){r=v,s=false;return}if(s&&ie()){let g=wn(e,v,t);if(g){r=g,s=false;return}}if(y&&r.length===1&&v.length===1&&r[0].nodeType===Node.TEXT_NODE&&v[0].nodeType===Node.TEXT_NODE){let g=r[0],b=v[0].textContent;g.textContent!==b&&(g.textContent=b),s=false;return}r=xn(e,r,v,t),s=false;};o&&!o.isDestroyed?O(o,c):c();});return j(()=>{a.stop();for(let c of r)X(c);r=[],o=null;}),r}function Wt(e){return (e==null?void 0:e.firstChild)||null}function Ut(e,n=1){for(;e&&n>0;)e=e.nextSibling,n--;return e||null}function Bt(e,n){if(!e||n<0)return null;let t=e.firstChild;for(;t&&n>0;)t=t.nextSibling,n--;return t||null}function se(e,n,t,o){if(!(o!=null&&o.delegate))return e.addEventListener(n,t,o),()=>e.removeEventListener(n,t,o);let r=o.delegate,s=d=>{d.target.closest(r)&&t.call(e,d);},c=o,{delegate:l}=c,a=pn(c,["delegate"]);return e.addEventListener(n,s,a),()=>{e.removeEventListener(n,s,a);}}function tn(e,n,t){let o=e[n];o||(o=[],e[n]=o),o.push(t);}function Pn(e,n,t){let o=e.length;if(o===0)return;let r;for(let s=0;s<o;s++)try{let l=e[s]();if(shared.isPromise(l)){let a=l.catch(c=>{});(r||(r=[])).push(a);}}catch(l){}if(r)return Promise.all(r).then(()=>{})}function Z(e){let n=F();if(n){if(n.isMounted){try{let t=e();shared.isPromise(t)&&t.catch(o=>{});}catch(t){}return}tn(n,"onMount",e);}}function on(e){let n=F();n&&tn(n,"onUpdate",e);}function rn(e){let n=F();n&&tn(n,"onDestroy",e);}function Rn(e){if(e.isDestroyed)return;if(!e.onMount||e.onMount.length===0){e.isMounted=true;return}let n=e.onMount,t=O(e,()=>Pn(n,e.id));return n.length=0,e.isMounted=true,t}function Dn(e){if(!(e.isDestroyed||!e.onUpdate||e.onUpdate.length===0))return O(e,()=>Pn(e.onUpdate,e.id))}function ke(e,n,t=false){let o=Reflect.ownKeys(n);for(let r of o)Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r));if(t){let r=new Set(o);for(let s of Reflect.ownKeys(e))r.has(s)||delete e[s];}}function Fn(e,n){let t=Object.getOwnPropertyDescriptor(e,n);return t.get?t.get.call(e):t.value}var Mn;Mn="normal";var le=class{constructor(n,t={}){this.component=n;this.props=t;this[Mn]=true;this.scope=null;this.state=0;this.beforeNode=void 0;this.renderedNodes=[];this.firstChild=void 0;this.parentNode=void 0;this.rootEventCleanups=[];this.parentScope=F();let o=Object.create(null);ke(o,t),this.reactiveProps=signals.shallowReactive(o);}mount(n,t){var s;if(this.parentNode=n,this.beforeNode=t,this.state=1,this.renderedNodes.length>0){for(let l of this.renderedNodes)G(n,l,t);return this.state=2,this.renderedNodes}let o=W((s=this.parentScope)!=null?s:F());this.scope=o;let r=O(o,()=>{var a;let l=this.component(this.reactiveProps);return shared.isFunction(l)&&(l=l(this.reactiveProps)),(signals.isSignal(l)||signals.isComputed(l))&&(l=l.value),(a=q(n,l,t))!=null?a:[]});return this.renderedNodes=r,this.firstChild=r[0],this.syncSpecialProps(this.props),this.state=2,Rn(o),this.renderedNodes}update(n){this.props=n,ke(this.reactiveProps,n!=null?n:{},true);let t=this.scope;!t||t.isDestroyed||(this.syncSpecialProps(n),Dn(t));}forceUpdate(){if(!this.parentNode)return;let n=this.parentNode,t=this.beforeNode,o=Object.create(null);ke(o,this.reactiveProps),this.destroy(),ke(this.reactiveProps,o),this.mount(n,t);}destroy(){let n=this.scope;if(!(!n||n.isDestroyed)){this.scope=null,this.releaseSpecialProps(),L(n);for(let t of this.renderedNodes)X(t);this.renderedNodes=[],this.firstChild=void 0,this.parentNode=void 0;for(let t of Reflect.ownKeys(this.reactiveProps))delete this.reactiveProps[t];this.state=0;}}syncSpecialProps(n){if(!n)return;let t=this.getRootElements();if(t.length===0)return;let o=t[0];this.releaseSpecialProps();for(let r of Reflect.ownKeys(n))if(shared.isString(r)){if(r===hn){let s=Fn(n,r);this.rootRefCleanup=this.bindRootRef(s,o);continue}if(shared.isOn(r)){let s=Fn(n,r);if(!shared.isFunction(s))continue;let l=r.slice(2).toLowerCase();for(let a of t)this.bindRootEvent(a,l,s);}}}getRootElements(){let n=[];for(let t of this.renderedNodes)t instanceof Element&&n.push(t);return n}bindRootEvent(n,t,o){let r=`_$${t}`,s=n[r];if(shared.isFunction(s)){n[r]=o,this.rootEventCleanups.push(()=>{n[r]===o&&(n[r]=s);});return}this.rootEventCleanups.push(se(n,t,l=>{n.disabled||o.call(n,l);}));}releaseSpecialProps(){for(let n of this.rootEventCleanups)n();this.rootEventCleanups.length=0,this.rootRefCleanup&&(this.rootRefCleanup(),this.rootRefCleanup=void 0);}bindRootRef(n,t){if(shared.isFunction(n))return n(t),()=>n(null);if(signals.isSignal(n)){let o=n,r=o.value;return o.value=t,()=>{o.value===t&&(o.value=r);}}}};function U(e){return !!e&&!!e.normal}function Pe(e,n){return U(e)?e:new le(e,n)}function we(e){let n,t=()=>{let o=document.createElement("template");o.innerHTML=e;let r=o.content.firstChild;if(!r)throw new Error("Invalid template: empty content");return r};return ()=>(n||(n=t())).cloneNode(true)}function Yt(e,n){let t=shared.isString(n)?document.querySelector(n):n;if(!t)return;t.innerHTML&&(t.innerHTML="");let r=W(),s;try{O(r,()=>{let l=Pe(e);U(l)&&(s=l,G(t,l));});}catch(l){throw L(r),l}return {root:s,unmount:()=>{s==null||s.destroy(),L(r);}}}function Jt(e,n){let t=shared.isString(n)?document.querySelector(n):n;if(!t)return;Qe(t);let o=W(),r;try{O(o,()=>{let s=Pe(e);U(s)&&(r=s,q(t,s));});}catch(s){throw L(o),s}finally{Ze();}return {root:r,unmount:()=>{r==null||r.destroy(),L(o);}}}function sn(e,n){let t=F();t&&(t.provides||(t.provides=new Map),t.provides.set(e,n));}function me(e,n){let t=F();if(!t)return n;let o=t;for(;o;){if(o.provides&&o.provides.has(e))return o.provides.get(e);o=o.parent;}return n}function ln(e,n){Object.defineProperty(e,"target",{configurable:true,value:n});}function Hn(e){let n=e.target,t=e.type,o=e.target,r=e.currentTarget,s=()=>{let a=n[`_$${t}`];if(a&&shared.isFunction(a)&&!n.disabled){let c=n[`${t}Data`];if(c?a.call(n,c,e):a.call(n,e),e.cancelBubble)return false}return n.host&&!shared.isString(n.host)&&!n.host._$host&&shared.isFunction(n.contains)&&n.contains(e.target)&&ln(e,n.host),true},l=()=>{for(;s()&&(n=n._$host||n.parentNode||n.host)&&n!==r;);};Object.defineProperty(e,"currentTarget",{configurable:true,get(){return n||document}});try{if(e.composedPath){let a=e.composedPath();ln(e,a[0]);for(let c=0;c<a.length-2&&(n=a[c],!!s());c++){if(n._$host){n=n._$host,l();break}if(n.parentNode===r)break}}else l();}finally{ln(e,o);}}var Re=Symbol("_$EVENTS");function Zt(e,n=globalThis.document){if(!n)return;let t=n,o=t[Re]||(t[Re]=new Set);for(let r of e)o.has(r)||(o.add(r),n.addEventListener(r,Hn));}function eo(e=globalThis.document){if(!e)return;let n=e,t=n[Re];if(t){for(let o of t.keys())e.removeEventListener(o,Hn);delete n[Re];}}function ae(e,n,t,o){let r=se(e,n,t,o);F()&&j(r);}var ro=e=>e,io=typeof DataTransfer!="undefined"?new DataTransfer().files:[],an=new WeakMap;function jn(e,n){let t=e,o=n==null?"":String(n);t.value!==o&&(t.value=o);}var so={event:"change",forceChange:true,checkboxArray:true,read:e=>e.checked,write(e,n){let t=e,o=shared.isArray(n)?n.map(String).includes(t.value):!!n;t.checked!==o&&(t.checked=o);}},lo={event:"change",forceChange:true,read(e){let n=e;return n.checked?n.value:""},write(e,n){let t=e,o=String(n)===t.value;t.checked!==o&&(t.checked=o);}},ao={event:"change",forceChange:true,read:e=>e.files,write(e,n){if(n==null)try{e.files=io;}catch(t){}}},Vn={event:"input",ime:true,read:e=>e.value,write:jn},co={event:"change",forceChange:true,read(e){let n=e;return n.multiple?Array.from(n.selectedOptions,t=>t.value):n.value},write(e,n){let t=e;if(!t.multiple)return jn(e,n);let o=new Set((shared.isArray(n)?n:[]).map(String));for(let r of Array.from(t.options))r.selected=o.has(r.value);}};function Kn(e){return {event:"input",read:n=>n[e],write(n,t){n[e]=t;}}}function uo(e,n){switch(e.nodeName){case "INPUT":return n==="checked"?e.type==="radio"?lo:so:n==="files"?ao:n==="value"?Vn:Kn(n);case "SELECT":return co;case "TEXTAREA":return Vn;default:return Kn(n)}}function fo(e,n,t){if(!shared.isString(e))return e;let o=n?e.trim():e;if(t){let r=n?o:o.trim();if(r!==""){let s=Number(r);if(!Number.isNaN(s))return s}}return o}function mo(e){let n=e.getRootNode();return (n instanceof Document||n instanceof ShadowRoot)&&n.activeElement===e}function po(e,n){if(n!=="value"||e.nodeName!=="INPUT")return false;let t=e.type;return t==="number"||t==="range"}function yo(e,n,t,o,r={}){if(!e)return;let{event:s,read:l,write:a,forceChange:c,ime:d,checkboxArray:m}=uo(e,n),y=r.trim===true,v=r.number===true||po(e,n),g=r.lazy===true,b=(y||v)&&n!=="files",w=shared.isFunction(t)?t:()=>t,x=b?T=>fo(T,y,v):ro,D=m?T=>{var E;let u=w();if(!shared.isArray(u))return x(T);let _=e.value,i=((E=an.get(u))!=null?E:u).filter(p=>String(p)!==_);return T&&i.push(_),an.set(u,i),i}:x,M=false,V=g||c?"change":s,K=()=>{if(M)return;let T=l(e);if(T===void 0)return;let u=D(T);Object.is(w(),u)||o(u);};ae(e,V,K),!g&&b&&V!=="change"&&ae(e,"change",()=>a(e,x(l(e)))),d&&(ae(e,"compositionstart",()=>{M=true;}),ae(e,"compositionend",()=>{M=false,g||K();}));let h=signals.effect(()=>{let T=w();m&&shared.isArray(T)&&an.set(T,[...T]),!(d&&M)&&(d&&!g&&mo(e)&&Object.is(x(l(e)),T)||a(e,T));});F()&&j(()=>h.stop());}function $n(e){let n=e;return shared.isArray(n)&&n.length===1&&(n=n[0]),shared.isFunction(n)?n():n}function Wn(e){let n=Object.getOwnPropertyDescriptor(e,"children");return n!=null&&n.get?()=>$n(n.get.call(e)):()=>$n(e.children)}function go(e,n){let t=new Set(n);return new Proxy(e,{get(o,r){if(!t.has(r))return Reflect.get(o,r)},ownKeys(o){return Reflect.ownKeys(o).filter(r=>!t.has(r))},getOwnPropertyDescriptor(o,r){if(!t.has(r))return Reflect.getOwnPropertyDescriptor(o,r)},has(o,r){return t.has(r)?false:Reflect.has(o,r)}})}function Un(e){var t;if(e&&((t=Object.getOwnPropertyDescriptor(e,"children"))!=null&&t.get||signals.isReactive(e)))return [()=>e.children];let n=e==null?void 0:e.children;return n==null?null:n}Un[Ue]=true;function Co(e){return !!e&&!!e[Ue]}function Le(e){let n=shared.isFunction(e.target)?e.target():e.target;return n==null?null:shared.isString(n)?document.querySelector(n):n}function Fe(e){return shared.isFunction(e.disabled)?!!e.disabled():!!e.disabled}function Gn(e){if(ie()){let y=No(e);if(y)return y}let n=document.createComment("portal");n[fe]=true;let{children:t}=e;if(t==null)return n;let o=F(),r=null,s=false,l=(y,v)=>{s||o!=null&&o.isDestroyed||(r=W(o),O(r,()=>{q(y,()=>t,v);}));},a=()=>{r&&(L(r),r=null);},c=(y,v)=>{if(!s){if(a(),y){let g=n.parentNode;if(!g)return;l(g,n);return}v&&l(v);}},d=false,m=signals.effect(()=>{let y=Fe(e),v=y?null:Le(e);d&&c(y,v);});return Z(()=>{d=!0;let y=Fe(e),v=y?null:Le(e);if(y||v){c(y,v);return}queueMicrotask(()=>{s||n.parentNode&&c(Fe(e),Le(e));});}),j(()=>{s=true,m.stop(),a();}),n}Gn[fe]=true;function No(e){if(Fe(e))return null;let n=Ye();if(!n)return null;let t=Le(e);return !t||!Je(t)?null:(n[fe]=true,n)}function bo(e){return !!e&&!!e[fe]}function Me(e){let n=e;for(;shared.isFunction(n);)n=n();return signals.isSignal(n)||signals.isComputed(n)?Me(n.value):shared.isArray(n)?n.map(t=>Me(t)):n}var pe=Symbol("SuspenseContext");function zn(e){var A;if(!shared.isBrowser())return (A=e.fallback)!=null?A:"";let n=F(),t=document.createComment("suspense"),o=document.createComment("/suspense"),r=document.createDocumentFragment();r.append(t,o);let s=true,l=0,a=false,c=0,d=null,m=null,y=null,v=null,g=null,b=false,w=[],x=()=>{let f=document.createDocumentFragment();for(;o.previousSibling&&o.previousSibling!==t;)f.prepend(o.previousSibling);y=f;},D=()=>{var C;if(!y)return;let f=(C=o.parentNode)!=null?C:r;for(;y.firstChild;)f.insertBefore(y.firstChild,o);y=null;},M=()=>{e.fallback==null||v||(v=W(n),O(v,()=>{var f;q((f=o.parentNode)!=null?f:r,()=>Me(e.fallback),o);}));},V=()=>{v&&(L(v),v=null);},K=()=>{if(m&&(L(m),m=null),y){for(;y.firstChild;)y.firstChild.remove();y=null;}},h=f=>{let C=W(n);a=true,m=C;try{O(C,()=>{var k;q((k=o.parentNode)!=null?k:r,()=>Me(f),o);});}catch(k){throw m===C&&(m=null),L(C),l=0,w=[],c++,k}finally{a=false;}l&&!y&&(x(),M());},T=()=>{y||a||(x(),M());},u=()=>{if(!y)return;let f=d!=null&&!shared.isPromise(d);m==null&&!b&&!f||(V(),D(),m||(b?h(g):f&&h(d)));},_=(f=c)=>{l++,T();let C=(()=>{C.active&&(C.active=false,!(!s||f!==c)&&--l===0&&u());});return C.active=true,C},S=f=>{s&&f();},i=()=>{for(;w.length>0;){let f=w.shift();if(f.active)return f}},E={register:f=>{let C=_();return f.then(()=>S(C),k=>{S(C);}),C},increment:()=>{let f=_();return w.push(f),f},decrement:()=>{let f=i();f&&S(f);}};sn(pe,E);let p=f=>{let C=++c;d=f!=null?f:null,l=0,g=null,b=false,w=[],K(),V(),shared.isPromise(f)?(f.then(k=>{!s||C!==c||(g=k,b=true);}).catch(()=>{}),E.register(f)):f!=null?h(f):e.fallback!=null&&T();};return p(e.children),on(()=>p(e.children)),j(()=>{s=false,l=0,g=null,m&&L(m),v&&L(v),m=v=null,y=null,t.remove(),o.remove();}),r}zn[Be]=true;function Po(e){return !!e&&!!e[Be]}function Ro(e){return !!e&&typeof e=="object"&&e.name==="AbortError"}function Do(e,n){let t=signals.signal(n==null?void 0:n.initialValue),o=signals.signal(true),r=signals.signal(null),s=signals.signal("pending"),l=0,a=null,c=me(pe,null),d=()=>yn(null,null,function*(){let v=++l;a==null||a.abort(),a=new AbortController,o.value=true,s.value="pending",r.value=null;let g;try{g=Promise.resolve(e(a.signal));}catch(b){r.value=b instanceof Error?b:new Error(String(b)),s.value="errored",o.value=false;return}c==null||c.register(g);try{let b=yield g;v===l&&(t.value=b,s.value="ready",o.value=!1);}catch(b){if(v!==l)return;if(Ro(b)){o.value=false;return}r.value=b instanceof Error?b:new Error(String(b)),s.value="errored",o.value=false;}});d(),j(()=>{l++,a==null||a.abort(),a=null;});let m=(()=>t.value);return m.loading=o,m.error=r,m.state=s,[m,{mutate:v=>{t.value=v,s.value="ready",o.value=false,r.value=null;},refetch:()=>d()}]}function Xn(e){return shared.isFunction(e)?e:e.default}function Fo(e,n){if(n==="client-only"){let l=()=>"";return l.__asyncLoader=e,l.__asyncResolved=()=>null,l}let t=null,o=null,r=()=>o!=null?o:o=e().then(l=>{t=Xn(l);}).catch(()=>{});r();let s=l=>t?t(l):"";return s.__asyncLoader=r,s.__asyncResolved=()=>t,s}function Mo(e,n){let{loading:t,error:o,delay:r=200,timeout:s,onError:l}=n,a=null,c=null,d="pending",m=null,y=0,v=w=>w!==y&&m!=null?m:void 0,g=w=>{if(m&&w===void 0)return m;let x=w!=null?w:++y;return m=e().then(D=>{if(x!==y)return v(x);a=Xn(D),d="resolved";}).catch(D=>{if(x!==y)return v(x);c=D instanceof Error?D:new Error(String(D)),d="errored",m=null;}),m};g();function b(w){var A;let x=F(),D=document.createComment("async"),M=document.createDocumentFragment();M.appendChild(D);let V=true,K=null,h=null,T=null,u=0,_=()=>{h!=null&&clearTimeout(h),T!=null&&clearTimeout(T),h=T=null;},S=(f,C)=>{V&&(x&&x.isDestroyed||(K&&(L(K),K=null),f&&(K=W(x),O(K,()=>{var k;q((k=D.parentNode)!=null?k:M,()=>new le(f,C),D);}))));};rn(()=>{V=false,_(),K&&(L(K),K=null),D.remove();});let i=f=>()=>{if(!V)return;let C=++y;m=null,d="pending",c=null,u++;let k=u;t&&S(t),g(C).then(()=>{V&&k===u&&E(f);});},E=f=>{V&&(_(),d==="resolved"&&a?S(a,f):d==="errored"&&c&&(o&&S(o,{error:c,retry:i(f)}),l&&l(c,i(f))));};if(d==="resolved"&&a)return S(a,w),M;if(d==="errored"&&c)return o&&S(o,{error:c,retry:i(w)}),M;let p=g().then(()=>E(w));return (A=me(pe))==null||A.register(p),r>0?h=setTimeout(()=>{V&&d==="pending"&&t&&S(t);},r):t&&S(t),s!=null&&(T=setTimeout(()=>{if(!V||d!=="pending")return;let f=new Error(`[defineAsyncComponent] Timeout after ${s}ms`);o&&S(o,{error:f,retry:i(w)}),l&&l(f,i(w));},s)),M}return b.__asyncLoader=g,b.__asyncResolved=()=>a,b}function Io(e,n={}){var t;return typeof window=="undefined"?Fo(e,(t=n.ssr)!=null?t:"blocking"):Mo(e,n)}function Jn(e){let n=document.createDocumentFragment(),t=document.createComment("");n.appendChild(t);let o=[],r=[],s=null,l=F(),a=e.key,c=e.children,d=shared.isArray(c)&&c.length===1&&shared.isFunction(c[0])?c[0]:e.children;if(!shared.isFunction(d))throw new TypeError("<For> requires `children` to be a function (item, index) => Node");let m=()=>{var T,u;let h=e.each;return signals.isSignal(h)?(T=h.value)!=null?T:[]:shared.isFunction(h)?(u=h())!=null?u:[]:h!=null?h:[]},y=(h,T)=>a?a(h,T):h,g=h=>{let T=new Array(h.length);for(let[u,_]of h.entries())T[u]=y(_,u);return T},b=(h,T,u)=>{if(h==null||h===false)return [];if(shared.isArray(h)){let S=[];for(let i of h)S.push(...b(i,T,u));return S}if(U(h))return G(T,h,u!=null?u:void 0),h.renderedNodes;let _=xe(h);return G(T,_,u!=null?u:void 0),[_]},w=(h,T)=>{var u;if(e.fallback){s=W((u=F())!=null?u:l);try{O(s,()=>{r=b(e.fallback(),h,T);});}catch(_){throw L(s),s=null,r=[],_}}},x=()=>{s&&(L(s),s=null);for(let h of r)X(h);r=[];},D=(h,T,u,_,S=y(h,T))=>{var A;let i=(A=F())!=null?A:l,E=W(i),p=[];try{O(E,()=>{p=b(d(h,T),u,_);});}catch(f){throw L(E),f}return {key:S,item:h,nodes:p,scope:E}},M=h=>{L(h.scope);for(let T of h.nodes)T.parentNode&&T.parentNode.removeChild(T);},V=signals.effect(()=>{let h=m(),T=t.parentNode;if(!T){if(h.length===0)w(n,t);else {o=new Array(h.length);let u=g(h);for(let[_,S]of h.entries())o[_]=D(S,_,n,t,u[_]);}return}K(T,h);});function K(h,T){let u=o.length,_=T.length;if(_===0){for(let N=0;N<u;N++)M(o[N]);o=[],e.fallback&&r.length===0&&w(h,t);return}if(u===0||r.length>0){r.length>0&&x(),o=new Array(_);let N=document.createDocumentFragment(),P=g(T);for(let R=0;R<_;R++)o[R]=D(T[R],R,N,null,P[R]);signals.untrack(()=>{h.insertBefore(N,t);});return}let S=new Map;for(let N=0;N<u;N++){let P=o[N],R=S.get(P.key),H=[P,N];R?R.push(H):S.set(P.key,[H]);}let i=new Array(_),E=[],p=null,A=new Int32Array(_),f=false,C=0,k=g(T);for(let N=0;N<_;N++){let P=T[N],R=k[N],H=S.get(R);if(H&&H.length>0){let[Y,J]=H.shift();Object.is(Y.item,P)?(Y.item=P,i[N]=Y,A[N]=J+1,J<C?f=true:C=J):(p||(p=document.createDocumentFragment()),signals.untrack(()=>M(Y)),i[N]=D(P,N,p,null,R));}else p||(p=document.createDocumentFragment()),i[N]=D(P,N,p,null,R);}for(let N of S.values())for(let[P]of N)E.push(P);for(let N of E)signals.untrack(()=>M(N));signals.untrack(()=>{let N=f?nn(A):[],P=N.length-1,R=t;for(let H=_-1;H>=0;H--){let J=i[H].nodes;if(!(A[H]===0)&&f&&P>=0&&H===N[P]){P--;for(let Q=J.length-1;Q>=0;Q--)R=J[Q];continue}for(let Q=J.length-1;Q>=0;Q--){let Ke=J[Q];Ke.nextSibling!==R&&h.insertBefore(Ke,R),R=Ke;}}}),o=i;}return j(()=>{V.stop();for(let h of o)M(h);o=[],x(),t.parentNode&&t.parentNode.removeChild(t);}),n}Jn[gn]=true;function un(e){var s,l,a,c,d,m,y,v,g,b;let n=(s=e.name)!=null?s:"v",t=(l=e.enterFromClass)!=null?l:`${n}-enter-from`,o=(a=e.enterActiveClass)!=null?a:`${n}-enter-active`,r=(c=e.enterToClass)!=null?c:`${n}-enter-to`;return {enterFrom:t,enterActive:o,enterTo:r,leaveFrom:(d=e.leaveFromClass)!=null?d:`${n}-leave-from`,leaveActive:(m=e.leaveActiveClass)!=null?m:`${n}-leave-active`,leaveTo:(y=e.leaveToClass)!=null?y:`${n}-leave-to`,appearFrom:(v=e.appearFromClass)!=null?v:t,appearActive:(g=e.appearActiveClass)!=null?g:o,appearTo:(b=e.appearToClass)!=null?b:r}}var Qn=e=>e?e.endsWith("ms")?Number(e.slice(0,-2).replace(",",".")):Number(e.slice(0,-1).replace(",","."))*1e3:0;function Zn(e,n){let t=e.split(", "),o=n.split(", "),r=0;for(let[s,l]of o.entries()){let a=Qn(l)+Qn(t[s%t.length]||"0s");a>r&&(r=a);}return r}function nt(e,n){let t=getComputedStyle(e),o=n!=="animation"?Zn(t.transitionDelay,t.transitionDuration):0,r=n!=="transition"?Zn(t.animationDelay,t.animationDuration):0;return o===0&&r===0?null:o>=r?{event:"transitionend",timeout:o}:{event:"animationend",timeout:r}}function B(e,n){for(let t of n.split(/\s+/))t&&e.classList.add(t);}function $(e,n){for(let t of n.split(/\s+/))t&&e.classList.remove(t);}function he(e){let n=false,t=null,o=requestAnimationFrame(()=>{n||(t=requestAnimationFrame(e));});return ()=>{n=true,cancelAnimationFrame(o),t!=null&&cancelAnimationFrame(t);}}function Ve(e){e.offsetHeight;}function ce(e,n,t,o){if(t!=null){let d=false,m=setTimeout(()=>{d||(d=true,o());},t);return ()=>{d=true,clearTimeout(m);}}let r=nt(e,n);if(!r)return o(),()=>{};let s=false,l=()=>{s||(s=true,clearTimeout(c),e.removeEventListener(r.event,a),o());},a=d=>{d.target===e&&l();};e.addEventListener(r.event,a);let c=setTimeout(l,r.timeout+1);return ()=>{s||(s=true,clearTimeout(c),e.removeEventListener(r.event,a));}}function ue(e,n){return e==null?null:shared.isNumber(e)?e:e[n]}function et(e){if(e==null||e===false)return null;if(shared.isArray(e))return e[0]instanceof Element?e[0]:null;if(e instanceof Element)return e;if(U(e)){let n=e;if(n.scope==null){let o=document.createDocumentFragment();n.mount(o);}let t=n.firstChild;return t instanceof Element?t:null}return null}var He=Symbol("enter_cb"),ye=Symbol("leave_cb");function tt(e){let n=document.createComment(""),t=un(e),o=e.css!==false,r=Wn(e),s="idle",l=null,a=null,c=false,d,m=false,y=false,v=false,g=null,b=null,w=()=>{g==null||g(),g=null;},x=()=>{b==null||b(),b=null;},D=(u,_)=>{var N;w();let S=null,i=()=>{S==null||S(),S=null,g===i&&(g=null);};g=i;let E=u[ye];E&&E(true),s="entering";let p=_==="appear"?t.appearFrom:t.enterFrom,A=_==="appear"?t.appearActive:t.enterActive,f=_==="appear"?t.appearTo:t.enterTo;(N=e.onBeforeEnter)==null||N.call(e,u),o&&(B(u,p),B(u,A));let C=false,k=P=>{var R,H;C||(C=true,i(),u[He]=void 0,o&&($(u,p),$(u,A),$(u,f)),P?(R=e.onEnterCancelled)==null||R.call(e,u):(s="entered",(H=e.onAfterEnter)==null||H.call(e,u)));};u[He]=k,S=he(()=>{if(S=null,!C)if(o&&($(u,p),B(u,f)),e.onEnter)e.onEnter(u,()=>k(false));else if(o){let P=ue(e.duration,"enter");S=ce(u,e.type,P,()=>{S=null,k(false);});}else k(false);});},M=(u,_)=>{var k;x();let S=null,i=()=>{S==null||S(),S=null,b===i&&(b=null);};b=i;let E=u[He];E&&(E(true),Ve(u)),s="leaving",(k=e.onBeforeLeave)==null||k.call(e,u),o&&(B(u,t.leaveFrom),B(u,t.leaveActive));let p=false,A=N=>{var P,R;p||(p=true,i(),u[ye]=void 0,o&&($(u,t.leaveFrom),$(u,t.leaveActive),$(u,t.leaveTo)),N?(P=e.onLeaveCancelled)==null||P.call(e,u):(s="idle",_(),(R=e.onAfterLeave)==null||R.call(e,u)));};u[ye]=A;let f=ue(e.duration,"leave"),C=o&&!e.onLeave&&f==null?!!nt(u,e.type):false;if(!e.onLeave&&f==null&&!C){A(false);return}S=he(()=>{S=null,!p&&(o&&($(u,t.leaveFrom),B(u,t.leaveTo)),e.onLeave?e.onLeave(u,()=>A(false)):o?S=ce(u,e.type,f,()=>{S=null,A(false);}):A(false));});},V=(u,_)=>{if(u&&s==="leaving"&&a){let i=a,E=i[ye];E&&E(true),a=null,l=i,D(i,"enter");return}if(u===l)return;let S=l;if(l=u,S){a=S;let i=S;M(i,()=>{i.parentNode&&i.parentNode.removeChild(i),a===i&&(a=null);});}u&&n.parentNode?(n.parentNode.insertBefore(u,n),_&&!e.appear?s="entered":D(u,_&&e.appear?"appear":"enter")):!S&&!u&&(s="idle");},K=()=>{if(y=false,v||!m)return;let u=d;m=false,d=void 0;try{V(et(u),!1);}catch(_){}},h=u=>{d=u,m=true,!y&&(y=true,queueMicrotask(K));},T=signals.effect(()=>{let u=r();c?h(u):(d=u,m=true);});return Z(()=>{c=!0;let u=m?et(d):null;m=!1,d=void 0,V(u,!0);}),j(()=>{v=true,w(),x(),T.stop();for(let u of [l,a]){if(!u)continue;let _=u[He],S=u[ye];_==null||_(true),S==null||S(true),u.parentNode&&u.parentNode.removeChild(u);}l=null,a=null,s="idle";}),n}tt[Ge]=true;function $o(e){return !!e&&!!e[Ge]}function dn(e,n){if(e==null||e===false)return {el:null,comp:null};if(shared.isArray(e)&&e.length===1)return dn(e[0],n);if(shared.isFunction(e))return dn(e(),n);if(e instanceof HTMLElement)return {el:e,comp:null};if(U(e)){let t=e;t.scope==null&&t.mount(n);let o=t.firstChild;return o instanceof HTMLElement?{el:o,comp:t}:{el:null,comp:t}}return {el:null,comp:null}}function Bo(e){return {position:e.style.position,top:e.style.top,left:e.style.left,width:e.style.width,height:e.style.height}}function fn(e,n){e.style.position=n.position,e.style.top=n.top,e.style.left=n.left,e.style.width=n.width,e.style.height=n.height;}function rt(e){var u,_,S;let n=(u=e.tag)!=null?u:"div",t=document.createElement(n),o=un(e),r=e.css!==false,s=(S=e.moveClass)!=null?S:`${(_=e.name)!=null?_:"v"}-move`,l=e.key,a=e.children,c=shared.isArray(a)&&a.length===1&&shared.isFunction(a[0])?a[0]:e.children;if(!shared.isFunction(c)||!shared.isFunction(l))throw new TypeError("<TransitionGroup> requires `children: (item, index) => Node` and `key: (item, index) => unknown`");let d=()=>{var E,p;let i=e.each;return signals.isSignal(i)?(E=i.value)!=null?E:[]:shared.isFunction(i)?(p=i())!=null?p:[]:i!=null?i:[]},m=[],y=false,v=(i,E)=>{let p=F(),A=W(p),f;try{O(A,()=>{f=c(i,E);});}catch(N){throw L(A),N}let{el:C,comp:k}=dn(f,t);return C?{key:l(i,E),item:i,el:C,comp:k,scope:A,state:"entering"}:(L(A),null)},g=i=>{if(i.comp){for(let E of i.comp.renderedNodes)E.parentNode===t&&t.removeChild(E);return}i.el.parentNode===t&&t.removeChild(i.el);},b=i=>{var E,p,A,f,C;(E=i.cancelEnter)==null||E.call(i,true),(p=i.cancelLeave)==null||p.call(i,true),(A=i.cancelEnterWait)==null||A.call(i),(f=i.cancelLeaveWait)==null||f.call(i),(C=i.cancelMoveWait)==null||C.call(i),i.comp&&i.comp.destroy(),g(i),L(i.scope);},w=i=>{var f,C,k;let E=i.el;if((f=i.cancelLeave)==null||f.call(i,true),!r){i.state="present",(C=e.onAfterEnter)==null||C.call(e,E);return}(k=e.onBeforeEnter)==null||k.call(e,E),B(E,o.enterFrom),B(E,o.enterActive);let p=false,A=N=>{var P,R,H;p||(p=true,i.cancelEnter=void 0,(P=i.cancelEnterWait)==null||P.call(i),i.cancelEnterWait=void 0,$(E,o.enterFrom),$(E,o.enterActive),$(E,o.enterTo),N?(R=e.onEnterCancelled)==null||R.call(e,E):(i.state="present",(H=e.onAfterEnter)==null||H.call(e,E)));};i.cancelEnter=A,i.state="entering",i.cancelEnterWait=he(()=>{if(i.cancelEnterWait=void 0,!p)if($(E,o.enterFrom),B(E,o.enterTo),e.onEnter)e.onEnter(E,()=>A(false));else {let N=ue(e.duration,"enter");i.cancelEnterWait=ce(E,e.type,N,()=>{i.cancelEnterWait=void 0,A(false);});}});},x=(i,E)=>{var k,N;let p=i.el;i.cancelEnter&&(i.cancelEnter(true),Ve(p)),i.state="leaving",i.savedStyles=Bo(p);let A=t.getBoundingClientRect();if(p.style.position="absolute",p.style.top=`${E.top-A.top}px`,p.style.left=`${E.left-A.left}px`,p.style.width=`${E.width}px`,p.style.height=`${E.height}px`,!r){i.savedStyles&&fn(p,i.savedStyles),g(i),L(i.scope),i.comp&&i.comp.destroy(),(k=e.onAfterLeave)==null||k.call(e,p);return}(N=e.onBeforeLeave)==null||N.call(e,p),B(p,o.leaveFrom),B(p,o.leaveActive);let f=false,C=P=>{var R,H,Y;if(!f){if(f=true,i.cancelLeave=void 0,(R=i.cancelLeaveWait)==null||R.call(i),i.cancelLeaveWait=void 0,$(p,o.leaveFrom),$(p,o.leaveActive),$(p,o.leaveTo),P){i.savedStyles&&fn(p,i.savedStyles),i.savedStyles=void 0,(H=e.onLeaveCancelled)==null||H.call(e,p);return}i.savedStyles&&fn(p,i.savedStyles),i.savedStyles=void 0,g(i),L(i.scope),i.comp&&i.comp.destroy(),(Y=e.onAfterLeave)==null||Y.call(e,p);}};i.cancelLeave=C,i.cancelLeaveWait=he(()=>{if(i.cancelLeaveWait=void 0,!f)if($(p,o.leaveFrom),B(p,o.leaveTo),e.onLeave)e.onLeave(p,()=>C(false));else {let P=ue(e.duration,"leave");i.cancelLeaveWait=ce(p,e.type,P,()=>{i.cancelLeaveWait=void 0,C(false);});}});},D=(i,E)=>{var R;if(!r||i.state!=="present")return;let p=i.el,A=p.getBoundingClientRect(),f=E.left-A.left,C=E.top-A.top;if(!f&&!C)return;let k=p.style.transform,N=p.style.transitionDuration;p.style.transform=`translate(${f}px, ${C}px)`,p.style.transitionDuration="0s",B(p,s),Ve(p),p.style.transform=k,p.style.transitionDuration=N;let P=ue(e.duration,"enter");(R=i.cancelMoveWait)==null||R.call(i),i.cancelMoveWait=ce(p,e.type,P,()=>{i.cancelMoveWait=void 0,$(p,s);});},M=()=>{for(let i of m)i.state!=="leaving"&&(i.prevRect=i.el.getBoundingClientRect());},V=i=>{let E=new Map;for(let C of m)E.set(C.key,C);let p=[];for(let[C,k]of i.entries()){let N=l(k,C),P=E.get(N);if(P)E.delete(N),P.item=k,p.push(P);else {let R=v(k,C);R&&p.push(R);}}let A=[];for(let C of E.values())C.state!=="leaving"&&A.push(C);let f=null;for(let C=p.length-1;C>=0;C--){let k=p[C].el;(k.parentNode!==t||k.nextSibling!==f)&&t.insertBefore(k,f),f=k;}return {next:p,leaving:A}},K=(i,E)=>{if(E){let f=[];for(let[C,k]of i.entries()){let N=v(k,C);N&&(N.el.parentNode!==t&&t.appendChild(N.el),N.state="present",f.push(N));}m=f;return}M();let{next:p,leaving:A}=V(i);for(let f of p)f.state!=="present"&&w(f);for(let f of A){let C=f.prevRect;C&&x(f,C);}for(let f of p)f.state!=="present"||!f.prevRect||(D(f,f.prevRect),f.prevRect=void 0);m=p.concat(A);},h=null,T=signals.effect(()=>{let i=d();if(!y){h=i;return}K(i,false);});return Z(()=>{y=!0,h&&(K(h,!0),h=null);}),j(()=>{T.stop();for(let i of m)b(i);m=[],t.parentNode&&t.parentNode.removeChild(t);}),t}rt[qe]=true;function Go(e){return !!e&&!!e[qe]}
|
|
2
|
+
exports.Component=le;exports.For=Jn;exports.Fragment=Un;exports.Portal=Gn;exports.Suspense=zn;exports.Transition=tt;exports.TransitionGroup=rt;exports.addEvent=se;exports.addEventListener=ae;exports.beginHydration=Qe;exports.bindElement=yo;exports.child=Wt;exports.clearDelegatedEvents=eo;exports.consumeTeleportAnchor=Ye;exports.consumeTeleportBlock=Je;exports.createApp=Yt;exports.createComponent=Pe;exports.createResource=Do;exports.defineAsyncComponent=Io;exports.delegateEvents=Zt;exports.endHydration=Ze;exports.getHydrationKey=bn;exports.getRenderedElement=It;exports.hydrate=Jt;exports.hydrationAnchor=Mt;exports.hydrationMarker=Ft;exports.inject=me;exports.insert=q;exports.isComponent=U;exports.isFragment=Co;exports.isHydrating=ie;exports.isPortal=bo;exports.isSuspense=Po;exports.isTransition=$o;exports.isTransitionGroup=Go;exports.next=Ut;exports.normalizeClass=Se;exports.nthChild=Bt;exports.omitProps=go;exports.onDestroy=rn;exports.onMount=Z;exports.onUpdate=on;exports.patchAttr=ne;exports.patchAttrHydrate=Ht;exports.patchClass=Te;exports.patchClassHydrate=Ot;exports.patchStyle=be;exports.patchStyleHydrate=Vt;exports.provide=sn;exports.resetHydrationKey=Pt;exports.setStyle=oe;exports.template=we;
|
package/dist/template.d.cts
CHANGED
|
@@ -82,6 +82,7 @@ declare class Component<P extends ComponentProps = {}> {
|
|
|
82
82
|
* wire them to the actual DOM node.
|
|
83
83
|
*/
|
|
84
84
|
private syncSpecialProps;
|
|
85
|
+
private getRootElements;
|
|
85
86
|
private bindRootEvent;
|
|
86
87
|
/**
|
|
87
88
|
* Remove all listeners/ref bindings currently attached to the root element.
|
package/dist/template.d.ts
CHANGED
|
@@ -82,6 +82,7 @@ declare class Component<P extends ComponentProps = {}> {
|
|
|
82
82
|
* wire them to the actual DOM node.
|
|
83
83
|
*/
|
|
84
84
|
private syncSpecialProps;
|
|
85
|
+
private getRootElements;
|
|
85
86
|
private bindRootEvent;
|
|
86
87
|
/**
|
|
87
88
|
* Remove all listeners/ref bindings currently attached to the root element.
|