sprae 13.1.2 → 13.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- var me=Object.defineProperty;var At=(t,e)=>{for(var r in e)me(t,r,{get:e[r],enumerable:!0})};var h=Symbol.dispose||(Symbol.dispose=Symbol("dispose")),p=Symbol("state"),rt=Symbol("on"),C=Symbol("off"),at=Symbol("init"),ft=":",L=t=>t.localName?.includes("-"),A,B,K,X=t=>t(),D=X,U={},P={},ot=null,lt=null,ye=t=>{if(!t?.tagName)return"";let e=t.tagName.toLowerCase();return t.id?e+="#"+t.id:t.className&&(e+="."+t.className.split(" ")[0]),`<${e}>`},ct=(t,e,r=lt)=>{let o=`\u2234 ${t}`;if(r&&(o+=`
1
+ var me=Object.defineProperty;var At=(t,e)=>{for(var r in e)me(t,r,{get:e[r],enumerable:!0})};var h=Symbol.dispose||(Symbol.dispose=Symbol("dispose")),p=Symbol("state"),rt=Symbol("on"),C=Symbol("off"),at=Symbol("init"),ft=":",D=t=>t.localName?.includes("-"),A,B,H,X=t=>t(),k=X,K={},q={},ot=null,lt=null,ye=t=>{if(!t?.tagName)return"";let e=t.tagName.toLowerCase();return t.id?e+="#"+t.id:t.className&&(e+="."+t.className.split(" ")[0]),`<${e}>`},ct=(t,e,r=lt)=>{let o=`\u2234 ${t}`;if(r&&(o+=`
2
2
  in ${ye(r)}`),e){let i=e.length>100?e.slice(0,80)+`\u2026 (${e.length} chars)`:e;o+=ot?`
3
3
  ${ot}="${i}"`:`
4
- ="${i}"`}console.error(o)},ut=(t=document.body,e)=>{if(t[p])return Object.assign(t[p],e);e=Q(e||{});let r=t,o=[],i=[];r[rt]=()=>!i&&(i=o.map(s=>s())),r[C]=()=>(i?.map(s=>s?.()),i=null),r[h]||(r[h]=()=>(r[C](),r[C]=r[rt]=r[h]=r[at]=r[p]=null));let n=r[at]=s=>{let c=s.attributes,f;if(c)for(let a=0;a<c.length;){let{name:l,value:w}=c[a];if(l.startsWith(ft)){s.removeAttribute(l);let N=s[p];if(ot=l,lt=s,o.push(f=Tt(s,l.slice(ft.length),w,e)),i.push(f()),s[p]!==N)return}else a++}if(!(s!==t&&L(s)))if(s.firstChild!==void 0){let a=s.firstChild,l;for(;a;)l=a.nextSibling,a.nodeType==1&&n(a),a=l}else for(let a of s.childNodes)a.nodeType==1&&n(a)};return n(r),ot=lt=null,r[p]===void 0&&!L(t)&&(r[p]=e),e};ut.version="13.1.2";var Tt,jt,y=t=>{let e=Et[t=t.trim()];if(e)return e;try{e=jt(t||"undefined")}catch(r){ct(r,t)}return Et[t]=function(r,o,i){try{let n=e?.call(this,r);return o?n?.then?(n.then(s=>i=o(s)).catch(s=>ct(s,t,this)),()=>typeof i=="function"&&i()):o(n):n}catch(n){ct(n,t,this)}}},Et={},G=t=>(t.compile&&(jt=t.compile),t.prefix&&(ft=t.prefix),t.signal&&(A=t.signal),t.effect&&(B=t.effect),t.computed&&(K=t.computed),t.batch&&(X=t.batch),t.untracked&&(D=t.untracked),t.dir&&(Tt=t.dir)),x=(t,e)=>{for(;e.length;){let[r,...o]=e.pop().split("-"),i=P[r],n;if(i&&(n=i(t,...o))!==t){for(let s in t)n[s]??(n[s]=t[s]);t=n}}return t},H=null,V=t=>{H?.disconnect(),t(),H?.observe(H._root,{childList:!0,subtree:!0})},Lt=(t=document.body,e)=>{let r=Q(e);return ut(t,r),H=new MutationObserver(o=>{for(let i of o){for(let n of i.addedNodes)n.nodeType===1&&n[p]===void 0&&t.contains(n)&&t[at](n);for(let n of i.removedNodes)n.nodeType===1&&!t.contains(n)&&n[h]?.()}}),H._root=t,H.observe(t,{childList:!0,subtree:!0}),r},_=t=>{if(!t.nodeType)return t;let e=t.ownerDocument,r=t.content.cloneNode(!0),o=[...t.attributes],i=e.createTextNode(""),n=(r.append(i),[...r.childNodes]);return{ownerDocument:e,childNodes:n,content:r,remove:()=>r.append(...n),replaceWith(s){s!==i&&(i.before(s),r.append(...n))},attributes:o,removeAttribute(s){o.splice(o.findIndex(c=>c.name===s),1)}}},Dt=t=>t.replace(/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g,(e,r)=>(r?"-":"")+e.toLowerCase()),ge=t=>t.replace(/-([a-z])/g,(e,r)=>r.toUpperCase()),E=(t,e,r)=>r==null||r===!1?t.removeAttribute(e):L(t)?t[ge(e)]=r:t.setAttribute(e,r===!0?"":r),dt=t=>t?typeof t=="string"?t:(Array.isArray(t)?t.map(dt):Object.entries(t).reduce((e,[r,o])=>(o&&e.push(r),e),[])).join(" "):"",q=(t,e)=>{let r=0,o=0,i,n=typeof e=="function"?e:e?c=>setTimeout(c,e):queueMicrotask,s=c=>{i=c,r++||(t(i),n(()=>{let f=r>1;if(r=0,f){if(++o>50){o=0,console.error("\u2234 Reactive loop detected");return}s(i)}else o=0}))};return s},kt=(t,e,r)=>{let o=typeof e=="function"?e:e?i=>setTimeout(i,e):queueMicrotask;return r?(i=>n=>!i&&(t(n),i=1,o(()=>i=0)))():((i=0)=>(n,s=++i)=>o(()=>s==i&&t(n)))()},m=ut;var S=Symbol("signals"),k=Symbol("change"),Y=Symbol("set"),pt=!0,T=(t,e)=>{if(!t||t[Symbol.toStringTag]||t[S])return t;if(t.constructor!==Object)return Array.isArray(t)?be(t):t;let r=Object.keys(t).length,o={},i=new Proxy(Object.assign(o,{[k]:A(r),[S]:o}),{get:(s,c)=>c in o?o.hasOwnProperty(c)&&typeof o[c]=="function"&&!o[c].prototype?o[c].bind(i):o[c]?o[c].valueOf():o[c]:e?e[c]:typeof globalThis[c]=="function"&&!globalThis[c].prototype?globalThis[c].bind(globalThis):globalThis[c],set:(s,c,f)=>c in o?($t(o,c,f),1):(pt=!1,e&&c in e?e[c]=f:(it(o,c,f),o[k].value=++r),pt=!0,1),deleteProperty:(s,c)=>(c in o&&(c[0]!="_"&&o[c]?.[Symbol.dispose]?.(),delete o[c],o[k].value=--r),1),ownKeys:()=>(o[k].value,Reflect.ownKeys(o)),has:(s,c)=>c in o?!0:e?c in e:pt}),n=Object.getOwnPropertyDescriptors(t);for(let s in t)n[s]?.get?(o[s]=K(n[s].get.bind(i)))[Y]=n[s].set?.bind(i):it(o,s,t[s]);return i},be=(t,e=globalThis)=>{let r=Array(t.length).fill(null),o=!1,i=c=>function(){return o=!0,c.apply(this,arguments)},n=A(t.length),s=new Proxy(Object.assign(r,{[k]:n,[S]:r,push:i(r.push),pop:i(r.pop),shift:i(r.shift),unshift:i(r.unshift),splice:i(r.splice)}),{get(c,f){return f==="length"?o?(o=!1,r.length):n.value:typeof f=="symbol"||isNaN(f)?r[f]?.valueOf()??e[f]:(r[f]??(r[f]=A(T(t[f])))).valueOf()},set(c,f,a){if(f==="length"){for(let l=a;l<r.length;l++)delete s[l];n.value=r.length=a}else f>=r.length?(it(r,f,a),s.length=+f+1):r[f]?$t(r,f,a):it(r,f,a);return 1},deleteProperty:(c,f)=>(r[f]?.[Symbol.dispose]?.(),delete r[f],1)});return s},it=(t,e,r)=>t[e]=e[0]=="_"||r?.peek||typeof r=="function"?r:A(T(r)),$t=(t,e,r,o,i)=>e[0]==="_"||typeof t[e]=="function"?t[e]=r:r!==(i=(o=t[e]).peek?.()??o)&&(o[Y]?o[Y](r):Array.isArray(r)&&Array.isArray(i)?k in i?D(()=>X(()=>{for(let n=0;n<r.length;n++)i[n]=r[n];i.length=r.length})):o.value=r:o.value=T(r)),Q=T;var mt={};At(mt,{batch:()=>xe,computed:()=>ve,effect:()=>Wt,signal:()=>Rt,untracked:()=>_e});var $,ht=0,Z,Rt=(t,e,r=new Set,o=()=>e.value)=>e={get value(){return $?.deps.add(r.add($)),t},set value(i){if(i!==t){t=i;for(let n of r)Z?Z.add(n):n()}},peek(){return t},toJSON:o,toString:o,valueOf:o},Wt=(t,e,r,o)=>(r=i=>{let n=e;if(e=null,n?.call?.(),i=$,$=r,ht++>50){ht--,$=i,e=t=r.fn=null;for(let s of o)s.delete(r);o.clear(),console.error("\u2234 Reactive loop detected");return}try{e=t()}finally{$=i,ht--}},r.fn=t,o=r.deps=new Set,r(),i=>{e?.call?.(),e=t=r.fn=null;for(i of o)i.delete(r);o.clear()}),ve=(t,e=Rt(),r,o,i=()=>r.value)=>r={get value(){return o||(o=Wt(()=>e.value=t())),e.value},peek:e.peek,toJSON:i,toString:i,valueOf:i},xe=(t,e=!Z,r)=>{Z??(Z=new Set);try{t()}finally{if(e){[Z,r]=[null,Z];for(let o of r)o()}}},_e=(t,e,r)=>(e=$,$=null,r=t(),$=e,r);var Mt=(t,e)=>{var n,s;let r,o;t._holder?m(o=t,e):(t[n=p]??(t[n]=null),o=t.content?_(t):t,o[s=p]??(o[s]=null),V(()=>t.replaceWith(r=t.ownerDocument.createTextNode(""))),o._holder=r._holder=r,r._clauses=[o._clause=[o,!1]],r._match=null,r.update=q(()=>{let c=r._clauses.find(([,f])=>f);c!=r._match&&V(()=>{r._match?.[0].remove(),r._match?.[0][C]?.(),(r._match=c)&&(r.before(r._match[0].content||r._match[0]),r._match[0][p]?r._match[0][rt]?.():(delete r._match[0][p],m(r._match[0],e)))})}));let i=c=>{o._clause[1]=c,o._holder.update()};return i[C]=()=>{o._holder._match?.[0][C]?.(),o._holder._match=null},i};var Pt=t=>{var o;let e,r=t;for(e=t.content?_(t):t,e[o=p]??(e[o]=null);r&&!(e._holder=r._holder);)r=r.previousSibling;return t.remove(),t[p]=null,e._holder._clauses.push(e._clause=[e,!0]),e._holder.update};var qt=t=>(t.content&&t.replaceWith(t=_(t).childNodes[0]),e=>{e=typeof e=="function"?e(t.textContent):e,e=e==null?"":""+e;let r=t.textContent;if(r===e)return;let o=t.firstChild;if(o&&e.startsWith(r)){o.appendData(e.slice(r.length));return}let i=t.getRootNode().getSelection?.(),n=i?.rangeCount&&t.contains(i.anchorNode)?i.getRangeAt(0).startOffset:-1;if(t.textContent=e,n>=0&&t.firstChild){let s=Math.min(n,t.firstChild.textContent.length),c=new Range;c.setStart(t.firstChild,s),c.collapse(!0),i.removeAllRanges(),i.addRange(c)}});var It=(t,e,r,o)=>{let i=new Set,n;return s=>{if(n=new Set,s)for(let c of dt(typeof s=="function"?s(t.className):s).split(" "))c&&n.add(c);for(let c of i)n.has(c)||t.classList.remove(c);for(let c of n)i.has(c)||t.classList.add(c);t.classList.length||t.removeAttribute("class"),i=n}};var zt=(t,e,r,o)=>{let i;return n=>{if(i===void 0&&(i=t.getAttribute("style")??""),n=typeof n=="function"?n(t.style):n,typeof n=="string")E(t,"style",i?i+"; "+n:n);else{i&&E(t,"style",i);for(let s in n)s[0]=="-"?t.style.setProperty(s,n[s]):s[0]>="A"&&(t.style[s]=n[s])}}};var Ht=()=>t=>typeof t=="function"&&t();var Kt=(t,e)=>(t.type?.startsWith("select")&&m(t,e),t.type==="text"||t.type===""||t.tagName==="TEXTAREA"?(r,o,i)=>(o=t.selectionStart,i=t.selectionEnd,t.setAttribute("value",t.value=r??""),o&&t.setSelectionRange(o,i)):t.type==="checkbox"?r=>(t.checked=r,E(t,"checked",r)):t.type==="radio"?r=>(t.checked=t.value===r,E(t,"checked",t.checked||null)):t.type==="select-one"?r=>{for(let o of t.options)o.value==r?o.setAttribute("selected",""):o.removeAttribute("selected");t.value=r}:t.type==="select-multiple"?r=>{for(let o of t.options)r.some(i=>i==o.value)?o.setAttribute("selected",""):o.removeAttribute("selected")}:r=>t.value=r);var we=(t,e=y(`${t}=__`))=>(r,o)=>{r.__=o,e(r),delete r.__},Ut=(t,e,r)=>{let o=y(r).call(t,e);typeof o=="function"?o(t):we(r)(e,t)};var Vt=(t,e)=>{let r=t[p]=T({},e),o=!1,i,n=t.content&&_(t);return n&&t.replaceWith(i=t.ownerDocument.createTextNode("")),s=>{if(s=typeof s=="function"?s(r):s,s!==r)for(let c in s){let f=Object.getOwnPropertyDescriptor(s,c);if(f?.get){(r[S][c]=K(f.get.bind(r)))[Y]=f.set?.bind(r);continue}let a=typeof s[c]=="function"?s[c].bind(r):s[c];c in r[S]?r[c]=a:r[S][c]=c[0]=="_"||a?.peek?a:A(T(a))}return!o&&(o=!0,!i&&delete t[p],D(()=>(i?.before(n.content||t),m(n||t,r))))}};var Zt=(t,e,r)=>{let[o,i]=r.split(/\bin|of\b/),[n,s="$"]=o.trim().replace(/\(|\)/g,"").split(/\s*,\s*/),c=t.ownerDocument,f=c.createTextNode(""),a,l,w,N=0,j=q(()=>V(()=>{var R,Nt;let d=0,v=w,g=v.length;if(a&&!a[k]){for(let Ot of a[S]||[])Ot[Symbol.dispose]();a=null,N=0}if(g<N)a.length=g;else{if(!a)a=v;else for(;d<N;)a[d]=v[d++];let F=g-d>1?c.createDocumentFragment():null,Ct=F?[]:null;for(;d<g;d++){a[d]=v[d];let z=d,O=t.content?_(t):t.cloneNode(!0),et=O.content||O;if(F)F.appendChild(et),Ct.push([O,z]);else{f.before(et);let he=T({get[n](){return a[z]},[s]:l?l[z]:z},e);m(O,he)}let pe=((Nt=a[R=S]||(a[R]=[]))[d]||(Nt[d]={}))[Symbol.dispose];a[S][d][Symbol.dispose]=()=>{pe?.(),O[Symbol.dispose]?.(),O.remove()}}if(F){f.before(F);for(let[z,O]of Ct){let et=T({get[n](){return a[O]},[s]:l?l[O]:O},e);m(z,et)}}}N=g}));V(()=>t.replaceWith(f)),t[p]=null;let J=()=>{if(a){for(let d of a[S]||[])d[Symbol.dispose]?.();a=null,N=0}};return Object.assign(d=>{l=null,typeof d=="number"?w=Array.from({length:d},(g,R)=>R+1):d?.constructor===Object?(l=Object.keys(d),w=Object.values(d)):w=d||[];let v=B(()=>{w[k]?.value,j()});return()=>{v(),J()}},{eval:y(i)})};var Jt=(t,e,r,o)=>i=>E(t,o,typeof i=="function"&&!L(t)?i(t.getAttribute(o)):i);var Ft=t=>e=>{let r=L(t);for(let o in e)E(t,r?o:Dt(o),e[o])};var Bt=(t,e,r,o)=>{let[i,...n]=o.slice(2).split("."),s=y(r).bind(t),c=x(Object.assign(f=>s(e,a=>typeof a=="function"?a(f):a),{target:t}),n);return c.target.addEventListener(i,c,c),{[Symbol.dispose](){c.target.removeEventListener(i,c),c[Symbol.dispose]?.()}}};var Xt=(t,e,r,o)=>{let i,n,s=y(r).bind(t),c=o.split("..").map((f,a,{length:l})=>f.split(":").reduce((w,N)=>{let[j,...J]=N.slice(2).split("."),d=(g,R)=>i=typeof g=="function"?g(R):g,v=x(Object.assign(g=>(a?d(i,g):s(e,R=>d(R,g)),n(),n=c[(a+1)%l]()),{target:t}),J);return g=>(g=w?.(),v.target.addEventListener(j,v,v),()=>(g?.(),v.target.removeEventListener(j,v)))},null));return n=c[0](),{[Symbol.dispose](){n?.()}}};var Gt=t=>!!t?.content,Qt=(t,e)=>{if(t.content){let r,o=t.innerHTML,i=t.ownerDocument,n=t._holder;return n||t.replaceWith(n=i.createTextNode("")),s=>{if(typeof s=="function"&&(s=s(o)),t._holder&&(t.remove(),t.content.replaceChildren()),r?.[h]?.(),r?.remove(),s!=null&&s!=="")return r=Gt(s)?(o=s.innerHTML,_(s)):_((r=i.createElement("template"),r.innerHTML=o=s,r)),D(()=>m(r,e)),n.before(r.content),t._holder&&t.childNodes.splice(0,1/0,...r.childNodes),r[h];t._holder&&(t.childNodes.length=0,o="")}}return r=>{var o;return r=typeof r=="function"?r(t.innerHTML):r,Gt(r)?t.replaceChildren(r.content.cloneNode(!0)):t.innerHTML=r??"",t[o=p]&&(t[o]=null),D(()=>m(t,e)),t[h]}};var Yt=(t,e,r)=>{let o=t.ownerDocument,i=o.createComment(":portal"),n=null;return t.before(i),s=>{let c=t.getRootNode(),f=typeof s=="string"?c.querySelector?.(s)||o.querySelector(s):s?.nodeType===1?s:s?o.body:null;if(f!==n)return f?f.appendChild(t):i.after(t),n=f,()=>{n&&(i.after(t),n=null)}}};var te=t=>e=>t.hidden=!!e;var yt=(t,e,r,o)=>{let[,...i]=o.split("."),n=y(r).bind(t),s;return x(Object.assign(()=>{let f=n(e,a=>typeof a=="function"?a(t):a);typeof f=="function"&&(s=f)},{target:t}),i)(),{[h](){s?.(),s=null}}};var gt=(t,e,r,o)=>{let[,...i]=o.split("."),n=y(r).bind(t),s=t.type==="checkbox"?()=>t.checked:t.type==="select-multiple"?()=>[...t.selectedOptions].map(f=>f.value):/^(date|time|month|week)/.test(t.type)?()=>t.value:()=>t.selectedIndex<0?null:isNaN(t.valueAsNumber)?t.value:t.valueAsNumber,c=x(Object.assign(()=>{n(e,f=>typeof f=="function"?f(s()):f)},{target:t}),i);return t.addEventListener("input",c),t.addEventListener("change",c),{[h](){t.removeEventListener("input",c),t.removeEventListener("change",c)}}};var ee=(t,e,r,o)=>{let[,...i]=o.split("."),n=y(r).bind(t),s=i.includes("once"),c=x(Object.assign(a=>{n(e,l=>typeof l=="function"?l(a):l)},{target:t}),i),f=new IntersectionObserver(a=>{for(let l of a)l.isIntersecting&&(c(l),s&&f.disconnect())});return f.observe(t),{[h](){f.disconnect()}}};ee.observer=!0;var re=ee;var oe=(t,e,r,o)=>{let[,...i]=o.split("."),n=y(r).bind(t),s=x(Object.assign(f=>{n(e,a=>typeof a=="function"?a(f):a)},{target:t}),i),c=new ResizeObserver(f=>{for(let a of f){let l=a.contentRect;s({width:l.width,height:l.height,entry:a})}});return c.observe(t),{[h](){c.disconnect()}}};oe.observer=!0;var ie=oe;yt.observer=gt.observer=!0;Object.assign(U,{_:Jt,"":Ft,class:It,text:qt,html:Qt,style:zt,fx:Ht,value:Kt,ref:Ut,scope:Vt,if:Mt,else:Pt,each:Zt,portal:Yt,hidden:te,mount:yt,change:gt,intersect:re,resize:ie});var Se=(t,e,r,o)=>{let[i,...n]=e.split("."),s=U[i]||U._;return()=>{let c=A(0),f=x(Object.assign(q(()=>c.value++),{target:t}),n),a=f.target??t,l=s(a,o,r,i);if(!l?.call)return l?.[h];let w=0,N=l.eval??y(r).bind(a),j,J=()=>(typeof j=="function"&&j(),j=null);L(a)||(o=a[p]??o);let d=B(()=>{let g=c.value==w?f():(w=c.value,j=N(o,l));return J});if(!(p in a))return d;let v=0;return()=>{v||(v=1,d(),l[C]?l[C]():a[h]?.())}}},Ne=t=>t?typeof t=="number"?t:(([,e,r]=t.match(/^(\d+)(ms|s|m)?$/)||[])=>(e=+e,r==="s"?e*1e3:r==="m"?e*6e4:e))():0,bt=t=>t==="idle"?requestIdleCallback:t==="raf"?requestAnimationFrame:!t||t==="tick"?queueMicrotask:e=>setTimeout(e,Ne(t));Object.assign(P,{debounce:(t,e,r)=>kt(t,bt(e==="immediate"?r:e),e==="immediate"||r==="immediate"),throttle:(t,e)=>q(t,bt(e)),delay:(t,e)=>((r=bt(e))=>o=>r(()=>t(o)))(),tick:t=>e=>queueMicrotask(()=>t(e)),raf:t=>e=>requestAnimationFrame(()=>t(e)),once:(t,e,r)=>(r=o=>!e&&(e=1,t(o)),r.once=!0,r),window:t=>(t.target=t.target.ownerDocument.defaultView,t),document:t=>(t.target=t.target.ownerDocument,t),root:t=>(t.target=t.target.ownerDocument.documentElement,t),body:t=>(t.target=t.target.ownerDocument.body,t),parent:t=>(t.target=t.target.parentNode,t),self:t=>e=>e.target===t.target&&t(e),away:(t,e)=>{let r=t.target.ownerDocument,o=n=>e=n.target,i=r.currentEvent||r.defaultView?.event;return r.addEventListener("pointerdown",o,!0),Object.assign(n=>n!==i&&!t.target.contains(n.type==="click"?e??n.target:n.target)&&n.target.isConnected&&t(n),{target:r,[h]:()=>r.removeEventListener("pointerdown",o,!0)})},prevent:t=>e=>(e?.preventDefault(),t(e)),stop:(t,e)=>r=>(e?.[0]==="i"?r?.stopImmediatePropagation():r?.stopPropagation(),t(r)),passive:t=>(t.passive=!0,t),capture:t=>(t.capture=!0,t)});P.outside=P.away;var vt={ctrl:t=>t.ctrlKey||t.key==="Control"||t.key==="Ctrl",shift:t=>t.shiftKey||t.key==="Shift",alt:t=>t.altKey||t.key==="Alt",meta:t=>t.metaKey||t.key==="Meta",cmd:t=>t.metaKey||t.key==="Command",arrow:t=>t.key?.startsWith("Arrow"),enter:t=>t.key==="Enter",esc:t=>t.key?.startsWith("Esc"),tab:t=>t.key==="Tab",space:t=>t.key==="\xA0"||t.key==="Space"||t.key===" ",delete:t=>t.key==="Delete"||t.key==="Backspace",digit:t=>/^\d$/.test(t.key),letter:t=>/^\p{L}$/gu.test(t.key),char:t=>/^\S$/.test(t.key)},ne=(t,e)=>vt[t]?.(e)||e.key?.toLowerCase()===t||e.keyCode==t;for(let t in vt)P[t]=(e,r,o)=>i=>vt[t](i)&&(!r||ne(r,i))&&(!o||ne(o,i))&&e(i);var Oe=t=>{let e=0,r="",o=0;for(let i of t){if(r){o?o=0:i==="\\"?o=1:i===r&&(r="");continue}if(i===";"&&!e)return!0;i==="{"?e++:i==="}"?e--:(i==='"'||i==="'"||i==="`")&&(r=i)}return!1};G({compile:t=>(/^(if|let|const)\b/.test(t)||Oe(t)||(t=`return ${t}`),/\bawait\s/.test(t)&&(t=`return (async()=>{${t}})()`),m.constructor(`with(arguments[0]){${t}}`)),dir:(t,e,r,o)=>e.includes("..")?()=>Xt(t,o,r,e)[h]:e.split(":").reduce((i,n)=>{let s=n.split(".")[0],c=U[s],f=n.startsWith("on")?()=>Bt(t,o,r,n)[h]:c?.observer?()=>c(t,o,r,n)[h]:Se(t,n,r,o);return i?(a,l)=>(a=i(),l=f(),()=>{a(),l()}):f},null),...mt});m.use=G;m.store=Q;m.directive=U;m.modifier=P;var ro=m.dispose=t=>t[h]?.();m.start=Lt;var se=m;var St={};At(St,{Computed:()=>M,Effect:()=>I,Signal:()=>b,batch:()=>Ae,computed:()=>Te,effect:()=>de,signal:()=>Ee,untracked:()=>_t});var Ce=Symbol.for("preact-signals");function st(){if(W>1)W--;else{for(var t,e=!1;tt!==void 0;){var r=tt;for(tt=void 0,xt++;r!==void 0;){var o=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&ae(r))try{r.c()}catch(i){e||(t=i,e=!0)}r=o}}if(xt=0,W--,e)throw t}}function Ae(t){if(W>0)return t();W++;try{return t()}finally{st()}}var u=void 0;function _t(t){var e=u;u=void 0;try{return t()}finally{u=e}}var tt=void 0,W=0,xt=0,nt=0;function ce(t){if(u!==void 0){var e=t.n;if(e===void 0||e.t!==u)return e={i:0,S:t,p:u.s,n:void 0,t:u,e:void 0,x:void 0,r:e},u.s!==void 0&&(u.s.n=e),u.s=e,t.n=e,32&u.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=u.s,e.n=void 0,u.s.n=e,u.s=e),e}}function b(t,e){this.v=t,this.i=0,this.n=void 0,this.t=void 0,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}b.prototype.brand=Ce;b.prototype.h=function(){return!0};b.prototype.S=function(t){var e=this,r=this.t;r!==t&&t.e===void 0&&(t.x=r,this.t=t,r!==void 0?r.e=t:_t(function(){var o;(o=e.W)==null||o.call(e)}))};b.prototype.U=function(t){var e=this;if(this.t!==void 0){var r=t.e,o=t.x;r!==void 0&&(r.x=o,t.e=void 0),o!==void 0&&(o.e=r,t.x=void 0),t===this.t&&(this.t=o,o===void 0&&_t(function(){var i;(i=e.Z)==null||i.call(e)}))}};b.prototype.subscribe=function(t){var e=this;return de(function(){var r=e.value,o=u;u=void 0;try{t(r)}finally{u=o}},{name:"sub"})};b.prototype.valueOf=function(){return this.value};b.prototype.toString=function(){return this.value+""};b.prototype.toJSON=function(){return this.value};b.prototype.peek=function(){var t=u;u=void 0;try{return this.value}finally{u=t}};Object.defineProperty(b.prototype,"value",{get:function(){var t=ce(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(xt>100)throw new Error("Cycle detected");this.v=t,this.i++,nt++,W++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{st()}}}});function Ee(t,e){return new b(t,e)}function ae(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function fe(t){for(var e=t.s;e!==void 0;e=e.n){var r=e.S.n;if(r!==void 0&&(e.r=r),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function le(t){for(var e=t.s,r=void 0;e!==void 0;){var o=e.p;e.i===-1?(e.S.U(e),o!==void 0&&(o.n=e.n),e.n!==void 0&&(e.n.p=o)):r=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=o}t.s=r}function M(t,e){b.call(this,void 0),this.x=t,this.s=void 0,this.g=nt-1,this.f=4,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}M.prototype=new b;M.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===nt))return!0;if(this.g=nt,this.f|=1,this.i>0&&!ae(this))return this.f&=-2,!0;var t=u;try{fe(this),u=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return u=t,le(this),this.f&=-2,!0};M.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}b.prototype.S.call(this,t)};M.prototype.U=function(t){if(this.t!==void 0&&(b.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}};M.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}};Object.defineProperty(M.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=ce(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function Te(t,e){return new M(t,e)}function ue(t){var e=t.u;if(t.u=void 0,typeof e=="function"){W++;var r=u;u=void 0;try{e()}catch(o){throw t.f&=-2,t.f|=8,wt(t),o}finally{u=r,st()}}}function wt(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,ue(t)}function je(t){if(u!==this)throw new Error("Out-of-order effect");le(this),u=t,this.f&=-2,8&this.f&&wt(this),st()}function I(t,e){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=e?.name}I.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}};I.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,ue(this),fe(this),W++;var t=u;return u=this,je.bind(this,t)};I.prototype.N=function(){2&this.f||(this.f|=2,this.o=tt,tt=this)};I.prototype.d=function(){this.f|=8,1&this.f||wt(this)};I.prototype.dispose=function(){this.d()};function de(t,e){var r=new I(t,e);try{r.c()}catch(i){throw r.d(),i}var o=r.d.bind(r);return o[Symbol.dispose]=o,o}G(St);var no=se;export{X as batch,K as computed,kt as debounce,no as default,ro as dispose,B as effect,A as signal,m as sprae,Lt as start,Q as store,q as throttle,D as untracked,G as use};
4
+ ="${i}"`}console.error(o)},ut=(t=document.body,e)=>{if(t[p])return Object.assign(t[p],e);e=Q(e||{});let r=t,o=[],i=[];r[rt]=()=>!i&&(i=o.map(s=>s())),r[C]=()=>(i?.map(s=>s?.()),i=null),r[h]||(r[h]=()=>{r[C](),L?._root===r&&(L.disconnect(),L=null),r[C]=r[rt]=r[h]=r[at]=r[p]=null});let n=r[at]=s=>{let c=s.attributes,f;if(c)for(let a=0;a<c.length;){let{name:l,value:w}=c[a];if(l.startsWith(ft)){s.removeAttribute(l);let N=s[p];if(ot=l,lt=s,o.push(f=Tt(s,l.slice(ft.length),w,e)),i.push(f()),s[p]!==N)return}else a++}if(!(s!==t&&D(s)))if(s.firstChild!==void 0){let a=s.firstChild,l;for(;a;)l=a.nextSibling,a.nodeType==1&&n(a),a=l}else for(let a of s.childNodes)a.nodeType==1&&n(a)};return n(r),ot=lt=null,r[p]===void 0&&!D(t)&&(r[p]=e),e};ut.version="13.2.0";var Tt,jt,y=t=>{let e=Et[t=t.trim()];if(e)return e;try{e=jt(t||"undefined")}catch(r){ct(r,t)}return Et[t]=function(r,o,i){try{let n=e?.call(this,r);return o?n?.then?(n.then(s=>i=o(s)).catch(s=>ct(s,t,this)),()=>typeof i=="function"&&i()):o(n):n}catch(n){ct(n,t,this)}}},Et={},G=t=>(t.compile&&(jt=t.compile),t.prefix&&(ft=t.prefix),t.signal&&(A=t.signal),t.effect&&(B=t.effect),t.computed&&(H=t.computed),t.batch&&(X=t.batch),t.untracked&&(k=t.untracked),t.dir&&(Tt=t.dir)),x=(t,e)=>{for(;e.length;){let[r,...o]=e.pop().split("-"),i=q[r],n;if(i&&(n=i(t,...o))!==t){for(let s in t)n[s]??(n[s]=t[s]);t=n}}return t},L=null,U=t=>{L?.disconnect(),t(),L?.observe(L._root,{childList:!0,subtree:!0})},Lt=(t=document.body,e)=>{let r=Q(e);return ut(t,r),L=new MutationObserver(o=>{for(let i of o){for(let n of i.addedNodes)n.nodeType===1&&n[p]===void 0&&t.contains(n)&&t[at](n);for(let n of i.removedNodes)n.nodeType===1&&!t.contains(n)&&n[h]?.()}}),L._root=t,L.observe(t,{childList:!0,subtree:!0}),r},_=t=>{if(!t.nodeType)return t;let e=t.ownerDocument,r=t.content.cloneNode(!0),o=[...t.attributes],i=e.createTextNode(""),n=(r.append(i),[...r.childNodes]);return{ownerDocument:e,childNodes:n,content:r,remove:()=>r.append(...n),replaceWith(s){s!==i&&(i.before(s),r.append(...n))},attributes:o,removeAttribute(s){o.splice(o.findIndex(c=>c.name===s),1)}}},Dt=t=>t.replace(/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g,(e,r)=>(r?"-":"")+e.toLowerCase()),ge=t=>t.replace(/-([a-z])/g,(e,r)=>r.toUpperCase()),E=(t,e,r)=>r==null||r===!1?t.removeAttribute(e):D(t)?t[ge(e)]=r:t.setAttribute(e,r===!0?"":r),dt=t=>t?typeof t=="string"?t:(Array.isArray(t)?t.map(dt):Object.entries(t).reduce((e,[r,o])=>(o&&e.push(r),e),[])).join(" "):"",V=(t,e)=>{let r=0,o=0,i,n=typeof e=="function"?e:e?c=>setTimeout(c,e):queueMicrotask,s=c=>{i=c,r++||(t(i),n(()=>{let f=r>1;if(r=0,f){if(++o>50){o=0,console.error("\u2234 Reactive loop detected");return}s(i)}else o=0}))};return s},kt=(t,e,r)=>{let o=typeof e=="function"?e:e?i=>setTimeout(i,e):queueMicrotask;return r?(i=>n=>!i&&(t(n),i=1,o(()=>i=0)))():((i=0)=>(n,s=++i)=>o(()=>s==i&&t(n)))()},m=ut;var S=Symbol("signals"),$=Symbol("change"),Y=Symbol("set"),pt=!0,T=(t,e)=>{if(!t||t[Symbol.toStringTag]||t[S])return t;if(t.constructor!==Object)return Array.isArray(t)?be(t):t;let r=Object.keys(t).length,o={},i=new Proxy(Object.assign(o,{[$]:A(r),[S]:o}),{get:(s,c)=>c in o?o.hasOwnProperty(c)&&typeof o[c]=="function"&&!o[c].prototype?o[c].bind(i):o[c]?o[c].valueOf():o[c]:e?e[c]:typeof globalThis[c]=="function"&&!globalThis[c].prototype?globalThis[c].bind(globalThis):globalThis[c],set:(s,c,f)=>c in o?($t(o,c,f),1):(pt=!1,e&&c in e?e[c]=f:(it(o,c,f),o[$].value=++r),pt=!0,1),deleteProperty:(s,c)=>(c in o&&(c[0]!="_"&&o[c]?.[Symbol.dispose]?.(),delete o[c],o[$].value=--r),1),ownKeys:()=>(o[$].value,Reflect.ownKeys(o)),has:(s,c)=>c in o?!0:e?c in e:pt}),n=Object.getOwnPropertyDescriptors(t);for(let s in t)n[s]?.get?(o[s]=H(n[s].get.bind(i)))[Y]=n[s].set?.bind(i):it(o,s,t[s]);return i},be=(t,e=globalThis)=>{let r=Array(t.length).fill(null),o=!1,i=c=>function(){return o=!0,c.apply(this,arguments)},n=A(t.length),s=new Proxy(Object.assign(r,{[$]:n,[S]:r,push:i(r.push),pop:i(r.pop),shift:i(r.shift),unshift:i(r.unshift),splice:i(r.splice)}),{get(c,f){return f==="length"?o?(o=!1,r.length):n.value:typeof f=="symbol"||isNaN(f)?r[f]?.valueOf()??e[f]:(r[f]??(r[f]=A(T(t[f])))).valueOf()},set(c,f,a){if(f==="length"){for(let l=a;l<r.length;l++)delete s[l];n.value=r.length=a}else f>=r.length?(it(r,f,a),s.length=+f+1):r[f]?$t(r,f,a):it(r,f,a);return 1},deleteProperty:(c,f)=>(r[f]?.[Symbol.dispose]?.(),delete r[f],1)});return s},it=(t,e,r)=>t[e]=e[0]=="_"||r?.peek||typeof r=="function"?r:A(T(r)),$t=(t,e,r,o,i)=>e[0]==="_"||typeof t[e]=="function"?t[e]=r:r!==(i=(o=t[e]).peek?.()??o)&&(o[Y]?o[Y](r):Array.isArray(r)&&Array.isArray(i)?$ in i?k(()=>X(()=>{for(let n=0;n<r.length;n++)i[n]=r[n];i.length=r.length})):o.value=r:o.value=T(r)),Q=T;var mt={};At(mt,{batch:()=>xe,computed:()=>ve,effect:()=>Wt,signal:()=>Rt,untracked:()=>_e});var R,ht=0,Z,Rt=(t,e,r=new Set,o=()=>e.value)=>e={get value(){return R?.deps.add(r.add(R)),t},set value(i){if(i!==t){t=i;for(let n of r)Z?Z.add(n):n()}},peek(){return t},toJSON:o,toString:o,valueOf:o},Wt=(t,e,r,o)=>(r=i=>{let n=e;if(e=null,n?.call?.(),i=R,R=r,ht++>50){ht--,R=i,e=t=r.fn=null;for(let s of o)s.delete(r);o.clear(),console.error("\u2234 Reactive loop detected");return}try{e=t()}finally{R=i,ht--}},r.fn=t,o=r.deps=new Set,r(),i=>{e?.call?.(),e=t=r.fn=null;for(i of o)i.delete(r);o.clear()}),ve=(t,e=Rt(),r,o,i=()=>r.value)=>r={get value(){return o||(o=Wt(()=>e.value=t())),e.value},peek:e.peek,toJSON:i,toString:i,valueOf:i},xe=(t,e=!Z,r)=>{Z??(Z=new Set);try{t()}finally{if(e){[Z,r]=[null,Z];for(let o of r)o()}}},_e=(t,e,r)=>(e=R,R=null,r=t(),R=e,r);var Mt=(t,e)=>{var n,s;let r,o;t._holder?m(o=t,e):(t[n=p]??(t[n]=null),o=t.content?_(t):t,o[s=p]??(o[s]=null),U(()=>t.replaceWith(r=t.ownerDocument.createTextNode(""))),o._holder=r._holder=r,r._clauses=[o._clause=[o,!1]],r._match=null,r.update=V(()=>{let c=r._clauses.find(([,f])=>f);c!=r._match&&U(()=>{r._match?.[0].remove(),r._match?.[0][C]?.(),(r._match=c)&&(r.before(r._match[0].content||r._match[0]),r._match[0][p]?r._match[0][rt]?.():(delete r._match[0][p],m(r._match[0],e)))})}));let i=c=>{o._clause[1]=c,o._holder.update()};return i[C]=()=>{o._holder._match?.[0][C]?.(),o._holder._match=null},i};var Pt=t=>{var o;let e,r=t;for(e=t.content?_(t):t,e[o=p]??(e[o]=null);r&&!(e._holder=r._holder);)r=r.previousSibling;return t.remove(),t[p]=null,e._holder._clauses.push(e._clause=[e,!0]),e._holder.update};var qt=t=>(t.content&&t.replaceWith(t=_(t).childNodes[0]),e=>{e=typeof e=="function"?e(t.textContent):e,e=e==null?"":""+e;let r=t.textContent;if(r===e)return;let o=t.firstChild;if(o&&e.startsWith(r)){o.appendData(e.slice(r.length));return}let i=t.getRootNode().getSelection?.(),n=i?.rangeCount&&t.contains(i.anchorNode)?i.getRangeAt(0).startOffset:-1;if(t.textContent=e,n>=0&&t.firstChild){let s=Math.min(n,t.firstChild.textContent.length),c=new Range;c.setStart(t.firstChild,s),c.collapse(!0),i.removeAllRanges(),i.addRange(c)}});var It=(t,e,r,o)=>{let i=new Set,n;return s=>{if(n=new Set,s)for(let c of dt(typeof s=="function"?s(t.className):s).split(" "))c&&n.add(c);for(let c of i)n.has(c)||t.classList.remove(c);for(let c of n)i.has(c)||t.classList.add(c);t.classList.length||t.removeAttribute("class"),i=n}};var zt=(t,e,r,o)=>{let i;return n=>{if(i===void 0&&(i=t.getAttribute("style")??""),n=typeof n=="function"?n(t.style):n,typeof n=="string")E(t,"style",i?i+"; "+n:n);else{i&&E(t,"style",i);for(let s in n)s[0]=="-"?t.style.setProperty(s,n[s]):s[0]>="A"&&(t.style[s]=n[s])}}};var Ht=()=>t=>typeof t=="function"&&t();var Kt=(t,e)=>(t.type?.startsWith("select")&&m(t,e),t.type==="text"||t.type===""||t.tagName==="TEXTAREA"?(r,o,i)=>(o=t.selectionStart,i=t.selectionEnd,t.setAttribute("value",t.value=r??""),o&&t.setSelectionRange(o,i)):t.type==="checkbox"?r=>(t.checked=r,E(t,"checked",r)):t.type==="radio"?r=>(t.checked=t.value===r,E(t,"checked",t.checked||null)):t.type==="select-one"?r=>{for(let o of t.options)o.value==r?o.setAttribute("selected",""):o.removeAttribute("selected");t.value=r}:t.type==="select-multiple"?r=>{for(let o of t.options)r.some(i=>i==o.value)?o.setAttribute("selected",""):o.removeAttribute("selected")}:r=>t.value=r);var we=(t,e=y(`${t}=__`))=>(r,o)=>{r.__=o,e(r),delete r.__},Ut=(t,e,r)=>{let o=y(r).call(t,e);typeof o=="function"?o(t):we(r)(e,t)};var Vt=(t,e)=>{let r=t[p]=T({},e),o=!1,i,n=t.content&&_(t);return n&&t.replaceWith(i=t.ownerDocument.createTextNode("")),s=>{if(s=typeof s=="function"?s(r):s,s!==r)for(let c in s){let f=Object.getOwnPropertyDescriptor(s,c);if(f?.get){(r[S][c]=H(f.get.bind(r)))[Y]=f.set?.bind(r);continue}let a=typeof s[c]=="function"?s[c].bind(r):s[c];c in r[S]?r[c]=a:r[S][c]=c[0]=="_"||a?.peek?a:A(T(a))}return!o&&(o=!0,!i&&delete t[p],k(()=>(i?.before(n.content||t),m(n||t,r))))}};var Zt=(t,e,r)=>{let[o,i]=r.split(/\bin|of\b/),[n,s="$"]=o.trim().replace(/\(|\)/g,"").split(/\s*,\s*/),c=t.ownerDocument,f=c.createTextNode(""),a,l,w,N=0,j=V(()=>U(()=>{var W,Nt;let d=0,v=w,g=v.length;if(a&&!a[$]){for(let Ot of a[S]||[])Ot[Symbol.dispose]();a=null,N=0}if(g<N)a.length=g;else{if(!a)a=v;else for(;d<N;)a[d]=v[d++];let F=g-d>1?c.createDocumentFragment():null,Ct=F?[]:null;for(;d<g;d++){a[d]=v[d];let z=d,O=t.content?_(t):t.cloneNode(!0),et=O.content||O;if(F)F.appendChild(et),Ct.push([O,z]);else{f.before(et);let he=T({get[n](){return a[z]},[s]:l?l[z]:z},e);m(O,he)}let pe=((Nt=a[W=S]||(a[W]=[]))[d]||(Nt[d]={}))[Symbol.dispose];a[S][d][Symbol.dispose]=()=>{pe?.(),O[Symbol.dispose]?.(),O.remove()}}if(F){f.before(F);for(let[z,O]of Ct){let et=T({get[n](){return a[O]},[s]:l?l[O]:O},e);m(z,et)}}}N=g}));U(()=>t.replaceWith(f)),t[p]=null;let J=()=>{if(a){for(let d of a[S]||[])d[Symbol.dispose]?.();a=null,N=0}};return Object.assign(d=>{l=null,typeof d=="number"?w=Array.from({length:d},(g,W)=>W+1):d?.constructor===Object?(l=Object.keys(d),w=Object.values(d)):w=d||[];let v=B(()=>{w[$]?.value,j()});return()=>{v(),J()}},{eval:y(i)})};var Jt=(t,e,r,o)=>i=>E(t,o,typeof i=="function"&&!D(t)?i(t.getAttribute(o)):i);var Ft=t=>e=>{let r=D(t);for(let o in e)E(t,r?o:Dt(o),e[o])};var Bt=(t,e,r,o)=>{let[i,...n]=o.slice(2).split("."),s=y(r).bind(t),c=x(Object.assign(f=>s(e,a=>typeof a=="function"?a(f):a),{target:t}),n);return c.target.addEventListener(i,c,c),{[Symbol.dispose](){c.target.removeEventListener(i,c),c[Symbol.dispose]?.()}}};var Xt=(t,e,r,o)=>{let i,n,s=y(r).bind(t),c=o.split("..").map((f,a,{length:l})=>f.split(":").reduce((w,N)=>{let[j,...J]=N.slice(2).split("."),d=(g,W)=>i=typeof g=="function"?g(W):g,v=x(Object.assign(g=>(a?d(i,g):s(e,W=>d(W,g)),n(),n=c[(a+1)%l]()),{target:t}),J);return g=>(g=w?.(),v.target.addEventListener(j,v,v),()=>(g?.(),v.target.removeEventListener(j,v)))},null));return n=c[0](),{[Symbol.dispose](){n?.()}}};var Gt=t=>!!t?.content,Qt=(t,e)=>{if(t.content){let r,o=t.innerHTML,i=t.ownerDocument,n=t._holder;return n||t.replaceWith(n=i.createTextNode("")),s=>{if(typeof s=="function"&&(s=s(o)),t._holder&&(t.remove(),t.content.replaceChildren()),r?.[h]?.(),r?.remove(),s!=null&&s!=="")return r=Gt(s)?(o=s.innerHTML,_(s)):_((r=i.createElement("template"),r.innerHTML=o=s,r)),k(()=>m(r,e)),n.before(r.content),t._holder&&t.childNodes.splice(0,1/0,...r.childNodes),r[h];t._holder&&(t.childNodes.length=0,o="")}}return r=>{var o;return r=typeof r=="function"?r(t.innerHTML):r,Gt(r)?t.replaceChildren(r.content.cloneNode(!0)):t.innerHTML=r??"",t[o=p]&&(t[o]=null),k(()=>m(t,e)),t[h]}};var Yt=(t,e,r)=>{let o=t.ownerDocument,i=o.createComment(":portal"),n=null;return t.before(i),s=>{let c=t.getRootNode(),f=typeof s=="string"?c.querySelector?.(s)||o.querySelector(s):s?.nodeType===1?s:s?o.body:null;if(f!==n)return f?f.appendChild(t):i.after(t),n=f,()=>{n&&(i.after(t),n=null)}}};var te=t=>e=>t.hidden=!!e;var yt=(t,e,r,o)=>{let[,...i]=o.split("."),n=y(r).bind(t),s;return x(Object.assign(()=>{let f=n(e,a=>typeof a=="function"?a(t):a);typeof f=="function"&&(s=f)},{target:t}),i)(),{[h](){s?.(),s=null}}};var gt=(t,e,r,o)=>{let[,...i]=o.split("."),n=y(r).bind(t),s=t.type==="checkbox"?()=>t.checked:t.type==="select-multiple"?()=>[...t.selectedOptions].map(f=>f.value):/^(date|time|month|week)/.test(t.type)?()=>t.value:()=>t.selectedIndex<0?null:isNaN(t.valueAsNumber)?t.value:t.valueAsNumber,c=x(Object.assign(()=>{n(e,f=>typeof f=="function"?f(s()):f)},{target:t}),i);return t.addEventListener("input",c),t.addEventListener("change",c),{[h](){t.removeEventListener("input",c),t.removeEventListener("change",c)}}};var ee=(t,e,r,o)=>{let[,...i]=o.split("."),n=y(r).bind(t),s=i.includes("once"),c=x(Object.assign(a=>{n(e,l=>typeof l=="function"?l(a):l)},{target:t}),i),f=new IntersectionObserver(a=>{for(let l of a)l.isIntersecting&&(c(l),s&&f.disconnect())});return f.observe(t),{[h](){f.disconnect()}}};ee.observer=!0;var re=ee;var oe=(t,e,r,o)=>{let[,...i]=o.split("."),n=y(r).bind(t),s=x(Object.assign(f=>{n(e,a=>typeof a=="function"?a(f):a)},{target:t}),i),c=new ResizeObserver(f=>{for(let a of f){let l=a.contentRect;s({width:l.width,height:l.height,entry:a})}});return c.observe(t),{[h](){c.disconnect()}}};oe.observer=!0;var ie=oe;yt.observer=gt.observer=!0;Object.assign(K,{_:Jt,"":Ft,class:It,text:qt,html:Qt,style:zt,fx:Ht,value:Kt,ref:Ut,scope:Vt,if:Mt,else:Pt,each:Zt,portal:Yt,hidden:te,mount:yt,change:gt,intersect:re,resize:ie});var Se=(t,e,r,o)=>{let[i,...n]=e.split("."),s=K[i]||K._;return()=>{let c=A(0),f=x(Object.assign(()=>c.value++,{target:t}),n),a=f.target??t,l=s(a,o,r,i);if(!l?.call)return l?.[h];let w=0,N=l.eval??y(r).bind(a),j,J=()=>(typeof j=="function"&&j(),j=null);D(a)||(o=a[p]??o);let d=B(()=>{let g=c.value==w?f():(w=c.value,j=N(o,l));return J});if(!(p in a))return d;let v=0;return()=>{v||(v=1,d(),l[C]?l[C]():a[h]?.())}}},Ne=t=>t?typeof t=="number"?t:(([,e,r]=t.match(/^(\d+)(ms|s|m)?$/)||[])=>(e=+e,r==="s"?e*1e3:r==="m"?e*6e4:e))():0,bt=t=>t==="idle"?requestIdleCallback:t==="raf"?requestAnimationFrame:!t||t==="tick"?queueMicrotask:e=>setTimeout(e,Ne(t));Object.assign(q,{debounce:(t,e,r)=>kt(t,bt(e==="immediate"?r:e),e==="immediate"||r==="immediate"),throttle:(t,e)=>V(t,bt(e)),delay:(t,e)=>((r=bt(e))=>o=>r(()=>t(o)))(),tick:t=>e=>queueMicrotask(()=>t(e)),raf:t=>e=>requestAnimationFrame(()=>t(e)),once:(t,e,r)=>(r=o=>!e&&(e=1,t(o)),r.once=!0,r),window:t=>(t.target=t.target.ownerDocument.defaultView,t),document:t=>(t.target=t.target.ownerDocument,t),root:t=>(t.target=t.target.ownerDocument.documentElement,t),body:t=>(t.target=t.target.ownerDocument.body,t),parent:t=>(t.target=t.target.parentNode,t),self:t=>e=>e.target===t.target&&t(e),away:(t,e)=>{let r=t.target.ownerDocument,o=n=>e=n.target,i=r.currentEvent||r.defaultView?.event;return r.addEventListener("pointerdown",o,!0),Object.assign(n=>n!==i&&!t.target.contains(n.type==="click"?e??n.target:n.target)&&n.target.isConnected&&t(n),{target:r,[h]:()=>r.removeEventListener("pointerdown",o,!0)})},prevent:t=>e=>(e?.preventDefault(),t(e)),stop:(t,e)=>r=>(e?.[0]==="i"?r?.stopImmediatePropagation():r?.stopPropagation(),t(r)),passive:t=>(t.passive=!0,t),capture:t=>(t.capture=!0,t)});q.outside=q.away;var vt={ctrl:t=>t.ctrlKey||t.key==="Control"||t.key==="Ctrl",shift:t=>t.shiftKey||t.key==="Shift",alt:t=>t.altKey||t.key==="Alt",meta:t=>t.metaKey||t.key==="Meta",cmd:t=>t.metaKey||t.key==="Command",arrow:t=>t.key?.startsWith("Arrow"),enter:t=>t.key==="Enter",esc:t=>t.key?.startsWith("Esc"),tab:t=>t.key==="Tab",space:t=>t.key==="\xA0"||t.key==="Space"||t.key===" ",delete:t=>t.key==="Delete"||t.key==="Backspace",digit:t=>/^\d$/.test(t.key),letter:t=>/^\p{L}$/gu.test(t.key),char:t=>/^\S$/.test(t.key)},ne=(t,e)=>vt[t]?.(e)||e.key?.toLowerCase()===t||e.keyCode==t;for(let t in vt)q[t]=(e,r,o)=>i=>vt[t](i)&&(!r||ne(r,i))&&(!o||ne(o,i))&&e(i);var Oe=t=>{let e=0,r="",o=0;for(let i of t){if(r){o?o=0:i==="\\"?o=1:i===r&&(r="");continue}if(i===";"&&!e)return!0;i==="{"?e++:i==="}"?e--:(i==='"'||i==="'"||i==="`")&&(r=i)}return!1};G({compile:t=>(/^(if|let|const)\b/.test(t)||Oe(t)||(t=`return ${t}`),/\bawait\s/.test(t)&&(t=`return (async()=>{${t}})()`),m.constructor(`with(arguments[0]){${t}}`)),dir:(t,e,r,o)=>e.includes("..")?()=>Xt(t,o,r,e)[h]:e.split(":").reduce((i,n)=>{let s=n.split(".")[0],c=K[s],f=n.startsWith("on")?()=>Bt(t,o,r,n)[h]:c?.observer?()=>c(t,o,r,n)[h]:Se(t,n,r,o);return i?(a,l)=>(a=i(),l=f(),()=>{a(),l()}):f},null),...mt});m.use=G;m.store=Q;m.directive=K;m.modifier=q;var ro=m.dispose=t=>t[h]?.();m.start=Lt;var se=m;var St={};At(St,{Computed:()=>P,Effect:()=>I,Signal:()=>b,batch:()=>Ae,computed:()=>Te,effect:()=>de,signal:()=>Ee,untracked:()=>_t});var Ce=Symbol.for("preact-signals");function st(){if(M>1)M--;else{for(var t,e=!1;tt!==void 0;){var r=tt;for(tt=void 0,xt++;r!==void 0;){var o=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&ae(r))try{r.c()}catch(i){e||(t=i,e=!0)}r=o}}if(xt=0,M--,e)throw t}}function Ae(t){if(M>0)return t();M++;try{return t()}finally{st()}}var u=void 0;function _t(t){var e=u;u=void 0;try{return t()}finally{u=e}}var tt=void 0,M=0,xt=0,nt=0;function ce(t){if(u!==void 0){var e=t.n;if(e===void 0||e.t!==u)return e={i:0,S:t,p:u.s,n:void 0,t:u,e:void 0,x:void 0,r:e},u.s!==void 0&&(u.s.n=e),u.s=e,t.n=e,32&u.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=u.s,e.n=void 0,u.s.n=e,u.s=e),e}}function b(t,e){this.v=t,this.i=0,this.n=void 0,this.t=void 0,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}b.prototype.brand=Ce;b.prototype.h=function(){return!0};b.prototype.S=function(t){var e=this,r=this.t;r!==t&&t.e===void 0&&(t.x=r,this.t=t,r!==void 0?r.e=t:_t(function(){var o;(o=e.W)==null||o.call(e)}))};b.prototype.U=function(t){var e=this;if(this.t!==void 0){var r=t.e,o=t.x;r!==void 0&&(r.x=o,t.e=void 0),o!==void 0&&(o.e=r,t.x=void 0),t===this.t&&(this.t=o,o===void 0&&_t(function(){var i;(i=e.Z)==null||i.call(e)}))}};b.prototype.subscribe=function(t){var e=this;return de(function(){var r=e.value,o=u;u=void 0;try{t(r)}finally{u=o}},{name:"sub"})};b.prototype.valueOf=function(){return this.value};b.prototype.toString=function(){return this.value+""};b.prototype.toJSON=function(){return this.value};b.prototype.peek=function(){var t=u;u=void 0;try{return this.value}finally{u=t}};Object.defineProperty(b.prototype,"value",{get:function(){var t=ce(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(xt>100)throw new Error("Cycle detected");this.v=t,this.i++,nt++,M++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{st()}}}});function Ee(t,e){return new b(t,e)}function ae(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function fe(t){for(var e=t.s;e!==void 0;e=e.n){var r=e.S.n;if(r!==void 0&&(e.r=r),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function le(t){for(var e=t.s,r=void 0;e!==void 0;){var o=e.p;e.i===-1?(e.S.U(e),o!==void 0&&(o.n=e.n),e.n!==void 0&&(e.n.p=o)):r=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=o}t.s=r}function P(t,e){b.call(this,void 0),this.x=t,this.s=void 0,this.g=nt-1,this.f=4,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}P.prototype=new b;P.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===nt))return!0;if(this.g=nt,this.f|=1,this.i>0&&!ae(this))return this.f&=-2,!0;var t=u;try{fe(this),u=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return u=t,le(this),this.f&=-2,!0};P.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}b.prototype.S.call(this,t)};P.prototype.U=function(t){if(this.t!==void 0&&(b.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}};P.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}};Object.defineProperty(P.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=ce(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function Te(t,e){return new P(t,e)}function ue(t){var e=t.u;if(t.u=void 0,typeof e=="function"){M++;var r=u;u=void 0;try{e()}catch(o){throw t.f&=-2,t.f|=8,wt(t),o}finally{u=r,st()}}}function wt(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,ue(t)}function je(t){if(u!==this)throw new Error("Out-of-order effect");le(this),u=t,this.f&=-2,8&this.f&&wt(this),st()}function I(t,e){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=e?.name}I.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}};I.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,ue(this),fe(this),M++;var t=u;return u=this,je.bind(this,t)};I.prototype.N=function(){2&this.f||(this.f|=2,this.o=tt,tt=this)};I.prototype.d=function(){this.f|=8,1&this.f||wt(this)};I.prototype.dispose=function(){this.d()};function de(t,e){var r=new I(t,e);try{r.c()}catch(i){throw r.d(),i}var o=r.d.bind(r);return o[Symbol.dispose]=o,o}G(St);var no=se;export{X as batch,H as computed,kt as debounce,no as default,ro as dispose,B as effect,A as signal,m as sprae,Lt as start,Q as store,V as throttle,k as untracked,G as use};