@fluixi/dom 1.0.0-alpha.85 → 1.0.0-alpha.86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/cdn/dom-client.cjs +1 -1
  2. package/dist/cdn/dom-client.global.js +2 -2
  3. package/dist/cdn/dom-client.mjs +1 -1
  4. package/dist/cdn/dom.cjs +1 -1
  5. package/dist/cdn/dom.global.js +2 -2
  6. package/dist/cdn/dom.mjs +1 -1
  7. package/dist/index.cjs +2 -2
  8. package/dist/index.mjs +2 -2
  9. package/dist/lib/dom/hydration.cjs +1 -1
  10. package/dist/lib/dom/hydration.mjs +1 -1
  11. package/dist/lib/dom/index.cjs +2 -2
  12. package/dist/lib/dom/index.mjs +2 -2
  13. package/dist/lib/dom/integration.cjs +1 -1
  14. package/dist/lib/dom/integration.mjs +1 -1
  15. package/dist/lib/dom/island.cjs +1 -1
  16. package/dist/lib/dom/island.mjs +1 -1
  17. package/dist/lib/dom/runtime.cjs +2 -2
  18. package/dist/lib/dom/runtime.mjs +2 -2
  19. package/dist/lib/dom/server-renderer.cjs +1 -1
  20. package/dist/lib/dom/server-renderer.mjs +1 -1
  21. package/dist/lib/dom/utils.cjs +1 -1
  22. package/dist/lib/dom/utils.mjs +1 -1
  23. package/dist/lib/dom/versions.cjs +1 -1
  24. package/dist/lib/dom/versions.mjs +1 -1
  25. package/dist/lib/element/attributes.cjs +1 -1
  26. package/dist/lib/element/attributes.mjs +1 -1
  27. package/dist/lib/element/index.cjs +1 -1
  28. package/dist/lib/element/index.mjs +1 -1
  29. package/dist/lib/flow/index.cjs +1 -1
  30. package/dist/lib/flow/index.mjs +1 -1
  31. package/dist/lib/index.cjs +1 -1
  32. package/dist/lib/index.mjs +1 -1
  33. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  34. package/dist/version.generated.cjs +1 -1
  35. package/dist/version.generated.d.ts +1 -1
  36. package/dist/version.generated.js +1 -1
  37. package/dist/version.generated.mjs +1 -1
  38. package/package.json +3 -3
@@ -1,2 +1,2 @@
1
- /*! @fluixi/dom v1.0.0-alpha.85 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
2
- "use strict";var FluixiDOM=(()=>{var Ft=Object.defineProperty;var hs=Object.getOwnPropertyDescriptor;var ys=Object.getOwnPropertyNames;var ms=Object.prototype.hasOwnProperty;var gs=(e,t)=>{for(var n in t)Ft(e,n,{get:t[n],enumerable:!0})},bs=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ys(t))!ms.call(e,o)&&o!==n&&Ft(e,o,{get:()=>t[o],enumerable:!(r=hs(t,o))||r.enumerable});return e};var vs=e=>bs(Ft({},"__esModule",{value:!0}),e);var Du={};gs(Du,{ClientOnly:()=>_n,Dynamic:()=>ko,ErrorBoundary:()=>Do,FX_DATA_ID:()=>we,For:()=>Ro,Index:()=>_o,Island:()=>vo,JSX_PROPERTIES:()=>ze,Match:()=>Oo,NoSsr:()=>Mo,Portal:()=>Po,SVG_ELEMENTS:()=>As,SVG_NAMESPACE:()=>fe,Show:()=>No,Switch:()=>Co,VOID_ELEMENTS:()=>Ts,addClass:()=>_s,addDelegatedEventListener:()=>Lr,addNativeEventListener:()=>un,appendChildren:()=>$s,applyElementProp:()=>Be,applyProps:()=>ln,applyUse:()=>an,asComponent:()=>tn,asContext:()=>qi,asOutlet:()=>Ii,asProvider:()=>$i,asRoute:()=>ji,asRouter:()=>Mi,asRoutes:()=>Di,asSuspense:()=>Li,batch:()=>S,bindPair:()=>hc,captureHydrationCursor:()=>Mr,checkRenderType:()=>Vi,classMap:()=>jo,cleanChildren:()=>X,cloneTemplate:()=>Hr,closest:()=>Rs,createComponent:()=>xn,createComputed:()=>fr,createContext:()=>Ye,createDynamicElement:()=>ru,createEffect:()=>T,createElement:()=>js,createMemo:()=>m,createNativeElement:()=>cn,createPortal:()=>fc,createRenderEffect:()=>b,createRequestContext:()=>be,createResource:()=>yr,createRoot:()=>M,createSignal:()=>g,createStore:()=>Ht,createTemplate:()=>Vr,delegate:()=>Hs,delegateEvents:()=>sn,effect:()=>br,escapeFxJson:()=>Ve,escapeHTML:()=>dc,fnName:()=>nc,generateID:()=>Bi,getAttribute:()=>Ps,getGlobal:()=>Ys,getLitEventName:()=>Ss,getLocals:()=>Tn,getOffset:()=>Vs,getRequestContext:()=>W,getRequestEvent:()=>Et,getRequestLocals:()=>Tt,getServerData:()=>He,getStableElementId:()=>Ki,getStyle:()=>Ds,handleRef:()=>qe,hasClass:()=>ks,holeContent:()=>tc,holeEnd:()=>ec,holeScope:()=>Zi,html:()=>xo,hydrate:()=>_t,hydrateAdvancePast:()=>ye,hydrateIslands:()=>wo,indexArray:()=>tt,initializeIntegration:()=>Bc,insert:()=>U,insertExpression:()=>Me,intergartionInitialized:()=>zc,isAccessor:()=>pc,isComponent:()=>$,isContext:()=>_r,isCustomElement:()=>zn,isDOMNode:()=>Xs,isDelegatedEvent:()=>Xi,isDomElement:()=>ot,isDomNode:()=>oe,isDomText:()=>st,isEventHandler:()=>xs,isFunction:()=>Ji,isIntegrationInitialized:()=>Gc,isJSXTemplate:()=>Gs,isLitTemplateResult:()=>Xn,isNativeElement:()=>lc,isOutlet:()=>Nr,isPromise:()=>Pe,isProvider:()=>Rr,isReactElement:()=>Bs,isRoute:()=>Ar,isRouter:()=>Er,isRoutes:()=>Tr,isSVGElement:()=>dn,isServer:()=>A,isSuspense:()=>Or,isTemplateFactory:()=>zs,isVisible:()=>qs,iterateFn:()=>rc,keyArray:()=>et,makeArrayFlat:()=>Fr,mapArray:()=>Qe,memo:()=>gr,mergeProps:()=>uc,observeIntersection:()=>Us,observeResize:()=>Ws,onCleanup:()=>x,query:()=>Ut,queryAll:()=>Ns,registerCreateComponent:()=>Kc,registerGlobal:()=>Js,removeAttribute:()=>Ms,removeChildren:()=>Is,removeClass:()=>Os,removeDelegatedEventListener:()=>on,render:()=>pn,renderToString:()=>jn,renderToStringAsync:()=>$n,resetIntegration:()=>Xc,runHydrationAt:()=>ke,runWithRequestContext:()=>ve,runWithoutHydration:()=>Dr,scrollIntoView:()=>Ls,serializeNode:()=>L,serializeResourceData:()=>kt,setAttribute:()=>C,setClassList:()=>Ie,setClassName:()=>je,setDataRedactor:()=>In,setDynamicAttribute:()=>ft,setDynamicBoolAttribute:()=>fn,setDynamicProperty:()=>lt,setProperty:()=>De,setRequestStore:()=>En,setServerMode:()=>re,setStyle:()=>$e,setStyles:()=>Gn,shouldSetAsProperty:()=>Es,signal:()=>mr,splitProps:()=>ac,spread:()=>cc,store:()=>ds,styleMap:()=>Io,svg:()=>So,templateNode:()=>Yi,toAttributeName:()=>ws,toggleClass:()=>Cs,untrack:()=>E,useContext:()=>cr,waitForElement:()=>Fs});function ws(e){return e.startsWith("aria-")||e.startsWith("data-")?e:/[A-Z]/.test(e)?e.replace(/([A-Z])/g,"-$1").toLowerCase():e}function xs(e){return e.startsWith("@")||e.startsWith("on")&&e.length>2}function Ss(e){return e.startsWith("@")?e.slice(1):e.startsWith("on")?e.slice(2).toLowerCase():e}function Es(e,t){let n=new Set(["checked","value","selected","disabled","readonly","required","multiple","open","contenteditable","draggable","spellcheck"]),r={input:new Set(["value","checked","indeterminate"]),textarea:new Set(["value"]),select:new Set(["value"]),option:new Set(["selected","value"]),audio:new Set(["volume","currentTime","paused"]),video:new Set(["volume","currentTime","paused"]),img:new Set(["src","srcset"]),iframe:new Set(["src"]),a:new Set(["href"])};return n.has(t)||r[e]&&r[e].has(t)}var Ts=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),As=new Set(["svg","g","path","circle","rect","line","polyline","polygon","ellipse","text","tspan","use","defs","symbol","mask","clipPath","pattern","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","foreignObject"]),fe="http://www.w3.org/2000/svg";function zn(e){return e.localName.includes("-")}function Be(e,t,n,r=!1){if(n==null){e.removeAttribute(t);return}if(zn(e)){e[t]=n;return}C(e,t,n,r)}var ze=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]);function Ut(e,t=document){return t.querySelector(e)}function Ns(e,t=document){return Array.from(t.querySelectorAll(e))}function Rs(e,t){return e.closest(t)}function _s(e,...t){e.classList.add(...t)}function Os(e,...t){e.classList.remove(...t)}function Cs(e,...t){t.forEach(n=>e.classList.toggle(n))}function ks(e,t){return e.classList.contains(t)}function C(e,t,n,r=!1){if(n==null||n===!1){e.removeAttribute(t);return}if(n===!0){e.setAttribute(t,"");return}if(typeof n=="object"){e.setAttribute(t,JSON.stringify(n));return}e.setAttribute(t,String(n))}function Ps(e,t){return e.getAttribute(t)}function Ms(e,t){e.removeAttribute(t)}function Gn(e,t){Object.assign(e.style,t)}function Ds(e,t){return window.getComputedStyle(e).getPropertyValue(t)}function js(e,t={},...n){let r=document.createElement(e);return Object.entries(t).forEach(([o,i])=>{if(o==="class"||o==="className")r.className=i;else if(o==="style"&&typeof i=="object")Gn(r,i);else if(o.startsWith("on")&&typeof i=="function"){let s=o.slice(2).toLowerCase();r.addEventListener(s,i)}else C(r,o,i)}),n.forEach(o=>{typeof o=="string"?r.appendChild(document.createTextNode(o)):r.appendChild(o)}),r}function Is(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function $s(e,...t){t.forEach(n=>{typeof n=="string"?e.appendChild(document.createTextNode(n)):e.appendChild(n)})}function qs(e){let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=window.innerHeight&&t.right<=window.innerWidth}function Ls(e,t={behavior:"smooth",block:"nearest"}){e.scrollIntoView(t)}function Vs(e){let t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}}function Hs(e,t,n,r){let o=i=>{let s=i.target.closest(n);s&&e.contains(s)&&r(i,s)};return e.addEventListener(t,o),()=>{e.removeEventListener(t,o)}}function Fs(e,t=5e3){return new Promise((n,r)=>{let o=Ut(e);if(o){n(o);return}let i=new MutationObserver(()=>{let c=Ut(e);c&&(i.disconnect(),clearTimeout(s),n(c))});i.observe(document.body,{childList:!0,subtree:!0});let s=setTimeout(()=>{i.disconnect(),r(new Error(`Element ${e} not found within ${t}ms`))},t)})}function Us(e,t,n={}){let r=new IntersectionObserver(o=>{o.forEach(i=>{t(i.isIntersecting)})},n);return r.observe(e),()=>{r.disconnect()}}function Ws(e,t){let n=new ResizeObserver(r=>{r.forEach(t)});return n.observe(e),()=>{n.disconnect()}}var Ks=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function Bs(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ks}function Xn(e){return e&&typeof e=="object"&&e.strings&&Array.isArray(e.strings)&&e.values&&Array.isArray(e.values)}function zs(e){if(typeof e!="function")return!1;try{let t=e();return Xn(t)}catch{return!1}}function Gs(e){return typeof e=="object"&&e!==null&&(e.$$typeof==="template"||typeof e.type=="function")}function Xs(e){return e instanceof Node}function Js(e,t,n="Fluixi"){typeof globalThis<"u"&&(typeof globalThis[n]>"u"&&(globalThis[n]={}),typeof globalThis[n][e]>"u"&&(globalThis[n][e]=t))}function Ys(e,t,n="Fluixi"){return typeof globalThis<"u"&&typeof globalThis[n]<"u"&&typeof globalThis[n][e]<"u"?globalThis[n][e]:t}var Yt="1.0.0-alpha.85",er=Yt.split(".")[0],Jn=`__fluixi_signal_state_v${er}__`,tr=`__fluixi_signal_builds_v${er}__`,Zs=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};function nr(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Zs,onSuspend:null,onError:null,observer:null}}var Ge=globalThis;function Qs(e){let t=nr(),n=e;for(let r of Object.keys(t))r in e||(n[r]=t[r]);return e}function ei(){let e=Ge[Jn];return e?Qs(e):Ge[Jn]=nr()}var l=ei();(Ge[tr]??=[]).push(Yt);function rr(){return[...new Set(Ge[tr]??[])]}function ti(e){return l.observer=e,()=>{l.observer===e&&(l.observer=null)}}var k=[],ni;function Zt(e){let t=l.observer;t&&t.created(e.parents===void 0?{...e,parents:k,origin:e.origin??ni}:e)}function ri(e){return l.observer?(k.push(e),!0):!1}function oi(){k.pop()}function si(e){l.observer?.ran?.(e)}function ii(e,t){l.observer?.wrote?.(e,t)}function D(e,t,n,r){let o=l.observer;!o?.bound||!k.length||o.bound(k[k.length-1],e,t,n,r)}function j(e,t,n,r){let o=l.observer;!o?.directive||!k.length||o.directive(k[k.length-1],e,t,n,r)}function ci(e){l.observer?.contextCreated?.(e)}function Kt(e,t,n){let r=l.observer;!r?.context||!k.length||r.context(k[k.length-1],e,t,n)}function Qt(e){l.observer?.disposed?.(e)}var ui="__FLUIXI_DEVTOOLS_HOOK__",Yn=globalThis[ui];if(typeof Yn?.inject=="function")try{Yn.inject({observeReactiveNodes:ti,version:Yt})}catch{}function or(){return l.observer!=null}var Zn=0,Qn=1,Re=2,sr=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(l.untracked)return;let e=l.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}},ai=class extends sr{constructor(e,t){super(),this._value=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){return this.track(),this._value}set(e){if(!this._equals(this._value,e)){if(this._value=e,this.version++,ii(this,l.consumer),this.observers)for(let t of[...this.observers])t.markDirty(Re);Bt(this)}}peek(){return this._value}},ir=class extends sr{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=Re,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(l.consumer===this)throw new Error("Signal.Computed cannot read itself");if(this.track(),this.updateIfNecessary(),this._threw)throw this._error;return this._value}updateIfNecessary(){if(this.state===Qn&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===Re)break}(this.state===Re||!this._initialized)&&this.recompute(),this.state=Zn}recompute(){if(this.sources){for(let c of this.sources)c.observers?.delete(this);this.sources.clear()}let e=l.consumer,t=l.untracked,n=ri(this);l.consumer=this,l.untracked=!1;let r,o=!1,i;try{r=this._fn()}catch(c){o=!0,i=c,r=this._value}finally{l.consumer=e,l.untracked=t,n&&oi()}let s=!this._initialized||this._threw!==o||(o?i!==this._error:!this._equals(this._value,r));if(this._initialized=!0,this._threw=o,this._error=i,this._value=r,si(this),s){if(this.version++,this.observers)for(let c of[...this.observers])c.markDirty(Re);Bt(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===Zn;if(this.state=e,t){if(this.observers)for(let n of[...this.observers])n.markDirty(Qn);Bt(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function Bt(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}var fi=class{constructor(e){this._watched=new Set,this._pending=new Set,this._notifyFn=e}watch(...e){for(let t of e)this._watched.add(t),(t.watchers??=new Set).add(this)}unwatch(...e){for(let t of e)this._watched.delete(t),t.watchers?.delete(this),this._pending.delete(t)}getPending(){let e=[...this._pending];return this._pending.clear(),e}_notify(e){if(!this._watched.has(e)||this._pending.has(e))return;let t=this._pending.size===0;this._pending.add(e),t&&this._notifyFn()}};function li(e){if(l.untracked)return e();l.untracked=!0;try{return e()}finally{l.untracked=!1}}function le(e){let t=Je(e);return e&&(e.owned??=[]).push(t),t}function de(e,t=!0){_e(e,t)}function Je(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function Ye(e,t){let n=Symbol(t??"context");return ci(n),{id:n,defaultValue:e,Provider:o=>{Kt(n,"provide",o.value);let i=l.owner,s=Je(i);(s.contexts=new Map).set(n,o.value),i&&(i.owned??=[]).push(s),l.owner=s;try{return o.children}finally{l.owner=i}}}}function cr(e){let t=l.owner;for(;t;){if(t.contexts&&t.contexts.has(e.id)){let n=t.contexts.get(e.id);return Kt(e.id,"read",n),n}t=t.parent}return Kt(e.id,"read",e.defaultValue),e.defaultValue}function ur(e,t){let n=e;for(;n;){if(n.contexts&&n.contexts.has(t.id))return n.contexts.get(t.id);n=n.parent}return t.defaultValue}function di(e){l.onSuspend=e}function pi(e){return l.onSuspend?(l.onSuspend(e,l.owner),!0):!1}function hi(e){l.onError=e}function K(){return l.owner}function P(e,t){let n=l.owner;l.owner=e;try{return t()}finally{l.owner=n}}function x(e){if(l.owner){if(l.owner.disposed){e();return}(l.owner.cleanups??=[]).push(e)}}function _e(e,t=!0){if(!e.disposed){if(e.owned){for(let n=e.owned.length-1;n>=0;n--)_e(e.owned[n]);e.owned=null}if(e.cleanups){for(let n=e.cleanups.length-1;n>=0;n--)e.cleanups[n]();e.cleanups=null}t&&(e.disposed=!0)}}function M(e){let t=Je(l.owner);l.owner&&(l.owner.owned??=[]).push(t);let n=l.owner;l.owner=t;try{return e(()=>_e(t))}finally{l.owner=n}}function yi(e){l.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function mi(e){e.queued||(e.queued=!0,l.queue.push(e),!l.scheduled&&l.batchDepth===0&&(l.scheduled=!0,l.hostSchedule(Ze)))}function Ze(){if(l.scheduled=!1,l.flushing)return;l.flushing=!0;let e=0;try{for(;l.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let t=l.queue;l.queue=[];for(let n of t)n.queued=!1,n.disposed||n.run()}}finally{l.flushing=!1}}function gi(){l.batchDepth===0&&Ze()}function bi(e){l.batchDepth++;try{return e()}finally{--l.batchDepth===0&&Ze()}}var vi=class{constructor(e,t=!1){this.queued=!1,this.disposed=!1,this.owner=Je(l.owner),l.owner&&(l.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new ir(()=>{_e(this.owner,!1),P(this.owner,()=>{let n=e();typeof n=="function"&&(this.owner.cleanups??=[]).push(n)})}),Zt({kind:"effect",node:this.computed,handle:this,internal:!t}),this.watcher=new fi(()=>mi(this)),this.run(),this.watcher.watch(this.computed)}run(){if(!this.disposed){this.watcher.getPending();try{this.computed.get()}catch(e){if(e&&typeof e.then=="function"&&l.onSuspend){l.onSuspend(e,this.owner);return}if(l.onError&&l.onError(e,this.owner))return;throw e}}}dispose(){this.disposed||(this.disposed=!0,Qt(this.computed),this.watcher.unwatch(this.computed),_e(this.owner))}};function en(e,t=!1){let n=new vi(e,t);return()=>n.dispose()}function wi(e){return!!e&&typeof e.then=="function"}yi(()=>{});var ar=Symbol.for("signal"),xi=Symbol.for("memo"),Si=Symbol.for("signal-node");function g(e,t){let n=new ai(e,{equals:t?.equals}),r=(()=>n.get()),o=(i=>{let s=typeof i=="function"?i(n.peek()):i;return n.set(s),gi(),s});return Object.defineProperty(r,ar,{value:!0,enumerable:!0}),Object.defineProperty(r,Si,{value:{get value(){return n.peek()},get version(){return n.version}},enumerable:!1}),Zt({kind:"signal",node:n,handle:r,name:t?.name,set:o}),or()&&x(()=>Qt(n)),[r,o]}function m(e,t,n){let r=t,o=K(),i=new ir(()=>P(o,()=>{try{return r=e(r)}catch(c){if(wi(c))return pi(c),r;throw c}}),{equals:n?.equals}),s=(()=>i.get());return Object.defineProperty(s,ar,{value:!0,enumerable:!0}),Object.defineProperty(s,xi,{value:!0,enumerable:!0}),Zt({kind:"memo",node:i,handle:s,name:n?.name}),or()&&x(()=>Qt(i)),s}function T(e,t){let n=t;return en(()=>{n=e(n)},!0)}function fr(e,t){let n=t;en(()=>{n=e(n)})}function b(e,t){let n=t;return en(()=>{n=e(n)})}function S(e){return bi(e)}function E(e){return li(e)}function lr(){return Ze(),Promise.resolve()}function Qe(e,t,n){let r=[];return x(()=>{for(let o of r)o.dispose();r=[]}),m(()=>{let o=e()||[];return E(()=>{if(o.length===0){for(let u of r)u.dispose();return r=[],n?.fallback?n.fallback():[]}let i=new Map;for(let u of r)i.has(u.item)||i.set(u.item,u);let s=[],c=new Set;for(let u=0;u<o.length;u++){let a=o[u],f=i.get(a);if(f&&!c.has(f))f.setIndex(u),s.push(f),c.add(f);else{let d,h,y;M(w=>{y=w;let[F,Ae]=g(u,{name:"row index"});h=Ae,d=t(a,F)});let R={item:a,rendered:d,dispose:y,setIndex:h};s.push(R),c.add(R)}}for(let u of r)c.has(u)||u.dispose();return r=s,s.map(u=>u.rendered)})},void 0,{name:"mapArray"})}function et(e,t,n,r){let o=[],i=[];return x(()=>{for(let s of i)s.dispose();o=[],i=[]}),m(()=>{let s=e()||[];return E(()=>{if(s.length===0){for(let d of i)d.dispose();return o=[],i=[],r?.fallback?r.fallback():[]}let c=new Map;for(let d=0;d<o.length;d++)c.set(o[d],i[d]);let u=[],a=[],f=new Set;for(let d=0;d<s.length;d++){let h=t(s[d]),y=c.get(h);if(y&&!f.has(h))y.setIndex(d),u.push(y);else{let R,w,F;M(Ae=>{F=Ae;let[te,Ne]=g(d,{name:"row index"});w=Ne;let Ue=m(ae=>{let G=(e()||[])[te()];return G??ae},s[d]);R=n(Ue,te)}),u.push({rendered:R,dispose:F,setIndex:w})}a.push(h),f.add(h)}for(let[d,h]of c)f.has(d)||h.dispose();return o=a,i=u,u.map(d=>d.rendered)})},void 0,{name:"keyArray"})}function tt(e,t,n){let r=[];return x(()=>{for(let o of r)o.dispose();r=[]}),m(()=>{let o=e()||[];return E(()=>{if(o.length===0){for(let u of r)u.dispose();return r=[],n?.fallback?n.fallback():[]}let i=r.length,s=o.length;for(let u=i;u<s;u++){let a,f,d,h=o[u];M(y=>{d=y;let[R,w]=g(h);f=w,a=t(R,u)}),r.push({rendered:a,setItem:f,dispose:d})}for(let u=s;u<i;u++)r[u].dispose();s<i&&(r=r.slice(0,s));let c=Math.min(i,s);for(let u=0;u<c;u++)r[u].setItem(o[u]);return r.map(u=>u.rendered)})},void 0,{name:"indexArray"})}var Ei=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0,Ti=typeof process>"u"?Ei:!1,Ai=Symbol.for("signal");function N(e){return typeof e=="function"&&e[Ai]===!0}var zt=null;function dr(e){zt=e}function Ni(e){zt&&zt(e)}var Gt=null;function pr(e){Gt=e}function Ri(e){return Gt?Gt(e):void 0}var Xt=null;function nt(e){Xt=e}function _i(){return Xt?Xt():void 0}var Jt=null;function hr(e){Jt=e}function Oi(e,t){Jt&&Jt(e,t)}function Ci(e){return!!e&&typeof e.then=="function"}var Wt=Symbol();function yr(e,t,n={}){let r,o;typeof t=="function"?(r=typeof e=="function"?e:()=>e,o=t):(r=()=>!0,o=e,t&&typeof t=="object"&&(n=t));let i=n.transport===!1?void 0:_i(),s=i!==void 0?Ri(i):void 0,c=s!==void 0,[u,a]=g(s!==void 0?s.value:n.initialValue,{equals:!1}),[f,d]=g(void 0,{equals:!1}),[h,y]=g(s!==void 0||n.initialValue!==void 0?"ready":"unresolved",{equals:!1}),[R,w]=g(void 0,{equals:!1}),[F,Ae]=g(void 0,{equals:!1}),te=Wt,Ne=!1;T(()=>{let _=r();if(F(),_===!1||_===null||_===void 0){te=Wt,S(()=>{y("unresolved"),w(void 0),d(void 0)});return}let G=Ne;if(Ne=!1,te!==Wt&&_===te&&!G)return;if(te=_,c){c=!1;return}let We=!1;x(()=>We=!0);let Kn=E(h),ps=E(u),Bn=Kn==="ready"||Kn==="refreshing";S(()=>{y(Bn?"refreshing":"pending"),d(void 0)});try{let ne=o(_,{value:ps,refetching:Bn});Ci(ne)?(w(ne),Ni(ne),ne.then(Ke=>{We||(i!==void 0&&Oi(i,Ke),S(()=>{a(()=>Ke),y("ready"),w(void 0)}))},Ke=>{We||S(()=>{d(Ke),y("errored"),w(void 0)})})):S(()=>{a(()=>ne),y("ready"),w(void 0)})}catch(ne){if(We)return;S(()=>{d(ne),y("errored"),w(void 0)})}});let Ue=()=>{let _=h();return _==="pending"||_==="refreshing"},ae=(()=>{let _=f();if(_)throw _;if(Ue()){let G=R();if(G)throw G}return u()});return Object.defineProperties(ae,{state:{get:h},loading:{get:Ue},error:{get:f},latest:{get:u}}),Object.defineProperty(ae,Symbol.for("resource"),{value:!0,enumerable:!0}),Object.defineProperty(ae,Symbol.for("signal"),{value:!0,enumerable:!0}),[ae,{mutate:a,refetch:()=>{Ne=!0,Ae(void 0)}}]}function Xe(e){if(typeof e=="function"&&!e.length){let t=e();return N(t)?t:Xe(t)}if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=Xe(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function rt(e){let t=m(e);return Ti?m(()=>Xe(t()),void 0,{name:"children"}):m(()=>Xe(t()))}var ki=Ye();di((e,t)=>{let n=ur(t,ki);n&&(n.increment(),e.finally(()=>n.decrement()))});var Pi=Ye();hi((e,t)=>{let n=ur(t,Pi);return n?(n.setError(e),!0):!1});var pe=Symbol.for("fluixi-proxy");function mr(e,t){let[n,r]=g(e,t);return Object.assign(n,{set:r})}function gr(e,t,n){return m(e,t,n)}function br(e,t){return T(e,t)}var vr="1.0.0-alpha.85";var wr="1.0.0-alpha.85";var I={dom:vr,reactive:wr};function xr(e){I.core&&e.setAttribute("fluixi",I.core),e.setAttribute("fx-dom",I.dom),e.setAttribute("fx-reactive",I.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=I)}function Sr(){let e=rr();e.length>1&&console.warn(`[fluixi] ${e.length} builds of @fluixi/reactive are driving one reactive graph: ${e.join(", ")}. They share it on purpose, so signals still cross between them, but the oldest one decided what the graph looks like. Build the components on one release, or load them as shared-runtime bundles.`);let t=[I.core,I.dom,I.reactive].filter(n=>n!==void 0);new Set(t).size<=1||console.warn(`[fluixi] package versions disagree: core ${I.core??"(absent)"}, dom ${I.dom}, reactive ${I.reactive}. These ship as one release, so a mismatch usually means a stale lockfile or two copies resolved side by side. Reinstall, or check for duplicates with \`pnpm why @fluixi/dom\`.`)}function Mi(e){return Object.defineProperty(e,Symbol.for("fluixi-router"),{value:!0,enumerable:!0}),e}function Di(e){return Object.defineProperty(e,Symbol.for("fluixi-routes"),{value:!0,enumerable:!0}),e}function ji(e){return Object.defineProperty(e,Symbol.for("fluixi-route"),{value:!0,enumerable:!0}),e}function Ii(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-outlet"),{value:!0,enumerable:!0}),e}function $i(e){return Object.defineProperty(e,Symbol.for("fluixi-provider"),{value:!0,enumerable:!0}),e}function qi(e){return Object.defineProperty(e,Symbol.for("fluixi-context"),{value:!0,enumerable:!0}),e}function tn(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}function Li(e){return Object.defineProperty(e,Symbol.for("fluixi-suspense"),{value:!0,enumerable:!0}),e}function Er(e){return typeof e=="function"&&e[Symbol.for("fluixi-router")]===!0}function Tr(e){return typeof e=="function"&&e[Symbol.for("fluixi-routes")]===!0}function Ar(e){return typeof e=="function"&&e[Symbol.for("fluixi-route")]===!0}function Nr(e){return typeof e=="function"&&e[Symbol.for("fluixi-outlet")]===!0}function Rr(e){return typeof e=="function"&&e[Symbol.for("fluixi-provider")]===!0}function _r(e){return typeof e=="function"&&e[Symbol.for("fluixi-context")]===!0}function $(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}function Or(e){return typeof e=="function"&&e[Symbol.for("fluixi-suspense")]===!0}function Vi(e){return Er(e)?{type:"router",value:e}:Ar(e)?{type:"route",value:e}:Tr(e)?{type:"routes",value:e}:Nr(e)?{type:"outlet",value:e}:$(e)?{type:"component",value:e}:Or(e)?{type:"suspense",value:e}:Rr(e)?{type:"provider",value:e}:_r(e)?{type:"context",value:e}:{type:"none",value:e}}var Ce=Symbol.for("fluixi.server-node"),Hi=Symbol.for("fluixi.dom.server-host"),Fi=globalThis,Oe=Fi[Hi]??={server:typeof document>"u",nodes:null};function A(){return Oe.server}function re(e){Oe.server=e}function Cr(e){Oe.nodes=e}function he(){if(!Oe.nodes)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return Oe.nodes}function oe(e){return e!=null&&e[Ce]===!0?!0:typeof Node<"u"&&e instanceof Node}function ot(e){return e!=null&&e[Ce]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function st(e){return e!=null&&e[Ce]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}var p={active:!1,cursor:null,parents:[]},kr=null;function Pr(e){kr=e}function it(){return kr}function nn(e,t){return p.active&&t.parentNode===e}function rn(e){let t=p.parents.lastIndexOf(e);t!==-1&&(p.parents.length=t),p.cursor=e.nextSibling}function Mr(){return p.active?p.cursor:null}function ke(e,t){if(!e||e.parentNode==null)return t();let n=p.active,r=p.cursor,o=p.parents;p.active=!0,p.cursor=e,p.parents=[];try{return t()}finally{p.active=n,p.cursor=r,p.parents=o}}function Dr(e){if(!p.active)return e();let t=p.cursor,n=p.parents;p.active=!1,p.parents=[];try{return e()}finally{p.active=!0,p.cursor=t,p.parents=n}}function ye(e){if(!p.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&rn(t)}function Ui(e){let t=[];for(;e&&e.nodeType===1;){let n=e.tagName.toLowerCase();if(e.id){n+=`#${e.id}`,t.unshift(n);break}e.getAttribute("data-id")&&(n+=`[data-id="${e.getAttribute("data-id")}"]`);let r=0,o=e;for(;o=o.previousElementSibling;)o.tagName===e.tagName&&r++;n+=`:nth-of-type(${r+1})`,t.unshift(n),e=e.parentElement}return t.join(">")}function Wi(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return`el_${Math.abs(t)}`}function Ki(e){return Wi(Ui(e))}var Bi=()=>"xxyxxxxxxy-4xx8".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)}),zi={};var ct="__fx_at",qr="__fx_loc";function jr(e,t){return t&&(e[qr]=t),e}var Ir=new Map,ut=new Set,dt=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);function sn(e){if(!A())for(let t of e)ut.has(t)||dt.has(t)||(ut.add(t),document.addEventListener(t,Gi))}function Gi(e){let t=`$$${e.type}`,n=e.composedPath&&e.composedPath()[0]||e.target;for(;n;){let r=n[t];if(r&&!n.disabled&&(r(e),e.cancelBubble))return;n=n.host&&n.host!==n&&n.host instanceof Element?n.host:n.parentNode}}function Lr(e,t,n){if(e[`$$${t}`]=n,dt.has(t)){let r=`__fx_${t}`;if(!e[r]){let o=i=>{e[`$$${t}`]?.(i)};e.addEventListener(t,o),e[r]=o}return}ut.has(t)||sn([t])}function on(e,t){delete e[`$$${t}`];let n=`__fx_${t}`,r=e[n];r&&(e.removeEventListener(t,r),delete e[n])}function Xi(e){return!dt.has(e)}function Ji(e){return typeof e=="function"}function J(e,t=!1){if(A())return he().createText(e);if(p.active&&!t){let n=it()?.hydrateText(e);if(n)return n}return document.createTextNode(e)}function cn(e,t=!1,n){if(A())return he().createElement(e,t);if(p.active){let r=it()?.hydrateElement(e);if(r)return n?jr(r,n):r}return jr(t?document.createElementNS(fe,e):document.createElement(e),n)}function Vr(e,t=!1){let n=Ir.get(e);if(n)return n;let r=document.createElement("template");return t?r.innerHTML=`<svg>${e}</svg>`:r.innerHTML=e,Ir.set(e,r),r}function Yi(e,t,n=!1,r=!1,o){if(A()){let i=he();return n?i.parseTemplate(e,r):i.createRaw(e)}if(p.active){let i=it()?.hydrateStatic(t);if(i)return $r(i,o)}return $r(Hr(Vr(e,r),r).firstChild,o)}function $r(e,t){let n=e;if(!t||typeof n?.querySelectorAll!="function")return e;let r=[n,...n.querySelectorAll("*")];for(let o=0;o<r.length&&o*2+1<t.pos.length;o++){let i=t.pos[o*2];i&&(r[o][qr]={file:t.file,line:i,column:t.pos[o*2+1]})}return e}function Zi(e,t){if(!p.active)return t();let n=ke(e.nextSibling,t);if(typeof n=="function"){let r=n;return Qi(r,(...i)=>p.active?ke(e.nextSibling,()=>r(...i)):r(...i))}return n}function Qi(e,t){let n=e[ct];return n!==void 0&&(t[ct]=n),t}function ec(e){for(let t=e.nextSibling;t;t=t.nextSibling)if(t.nodeType===8&&t.data==="fx/")return t;throw new Error("[fluixi] template hole is missing its closing marker")}function tc(e,t){let n=[];for(let r=e.nextSibling;r&&r!==t;r=r.nextSibling)n.push(r);return n}function Hr(e,t=!1){let n=e.content.cloneNode(!0);return t?n.firstChild:n}function Fr(e){return Array.isArray(e)?e.length===2&&e[1]===" "?Array.isArray(e[0])?Fr(e[0]):(typeof e[0]=="function",e[0]):e.length===1&&typeof e[0]=="function"?e[0]:e:e}function nc(e){return typeof e!="function"?null:e._name||e.name||"anonymous"}function rc(e){if(N(e)||$(e)||typeof e!="function")return e;let t=e();for(;typeof t=="function"&&!N(t)&&!$(t);)t=t();return t}var z=0,oc=200;function sc(e,t,n,r,o){let i=r,s=new Map;return b(()=>{D(n??t,"content",void 0,e);let c;if($(e)&&!N(e)){if(!s.has(e)){z++;try{let u=e();s.set(e,u)}finally{z--}}for(c=s.get(e);typeof c=="function"&&N(c);)c=c()}else for(c=e();typeof c=="function"&&N(c);)c=c();{let u=0;for(;typeof c=="function"&&u++<50;)if($(c)){if(!s.has(c)){let a=c;z++;try{let f=a();s.set(a,f)}finally{z--}}c=s.get(c)}else if(N(c))c=c();else if(c=c(),typeof c!="function"||!N(c)&&!$(c))break}z++;try{i=Me(t,c,n,i,s),o(i)}finally{z--}})}function U(e,t,n,r){if(z>oc)return console.error("[insert] Exceeded max call depth, possible infinite loop."),()=>null;n!==void 0&&!n&&(n=J("",!0),e.appendChild(n));let o=r??null,i=u=>Array.isArray(u)&&u.some(a=>typeof a=="function"),s=u=>typeof u=="function"?u:()=>u;if(typeof t!="function"&&!i(t)){z++;try{o=Me(e,t,n,o)}finally{z--}return()=>o}let c=sc(s(t),e,n,o,u=>{o=u});return()=>(c?.(),o)}function Me(e,t,n,r,o){if(t==null||typeof t=="boolean")return X(e,r,n);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return X(e,r,n);if(Pe(t)){let s=J("",!0);return Array.isArray(r)?r.length>0?(e.replaceChild(s,r[0]),X(e,r.slice(1),n)):O(e,s,n):r?e.replaceChild(s,r):O(e,s,n),t.then(c=>{s.parentNode===e&&Me(e,c,s.nextSibling,s)}).catch(c=>{console.error("Error resolving promise in insertExpression:",c)}),s}let i=typeof t;if(i==="string"||i==="number"){if(i==="number"&&(t=String(t)),Array.isArray(r)){if(r.length===0){let c=J(t);return O(e,c,n),c}if(r.length===1&&r[0].nodeType===3)return r[0].data=t,r;r=X(e,r,n)}if(r&&st(r))return r.data=t,r;let s=J(t);return r&&r.parentNode===e?e.replaceChild(s,r):nn(e,s)||O(e,s,n),s}if(oe(t))return nn(e,t)?(rn(t),t):Array.isArray(r)?(r.length===0?O(e,t,n):r[0].parentNode===e?(e.replaceChild(t,r[0]),X(e,r.slice(1),n)):O(e,t,n),t):(r?r!==t&&(r.parentNode===e?e.replaceChild(t,r):O(e,t,n)):O(e,t,n),t);if(Array.isArray(t)){let s=[],c=Array.isArray(r)?r:r?[r]:[],u=[];B(t,s,e,n,!0,o,u);let a=ic(e,c,s,n);for(let f of u){let d=U(e,f.sig,f.marker);x(()=>{X(e,d()),f.marker.parentNode===e&&e.removeChild(f.marker)})}return a}if(i==="object"&&t!==null&&typeof t=="object"){let s=t;if("type"in s&&"props"in s){let c=s;if(typeof c.type=="function"){let u=c.type(c.props||{});return Me(e,u,n,r)}}}return X(e,r,n)}function B(e,t,n,r,o=!0,i,s){for(let c=0;c<e.length;c++){let u=e[c];if(!(u==null||typeof u=="boolean")){for(;typeof u=="function"&&!Pe(u)&&!N(u)&&!$(u)&&(u=u(),!(u==null||typeof u=="boolean")););if(!(u==null||typeof u=="boolean")){if(typeof u=="function"){let a;for($(u)&&!N(u)?(i||(i=new Map),i.has(u)||i.set(u,u()),a=i.get(u)):a=u();typeof a=="function"&&!Pe(a)&&!N(a)&&!$(a);)i||(i=new Map),i.has(a)||i.set(a,a()),a=i.get(a);if(a==null||typeof a=="boolean")continue;if(typeof a=="function"){if(N(a)){if(s){let d=J("",!0);t.push(d),s.push({marker:d,sig:a});continue}let f=a();for(;typeof f=="function"&&N(f);)f=f();if(f==null||typeof f=="boolean")continue;Array.isArray(f)?B(f,t,n,r,o,i):B([f],t,n,r,o,i);continue}continue}Array.isArray(a)?B(a,t,n,r,o,i,s):B([a],t,n,r,o,i,s);continue}if(Pe(u)){let a=J("",!0);t.push(a),u.then(f=>{if(a.parentNode){let d=[];if(B([f],d,a.parentNode,void 0,!1,i),d.length>0){a.parentNode.replaceChild(d[0],a);for(let h=1;h<d.length;h++)a.parentNode?.insertBefore(d[h],d[h-1].nextSibling)}}}).catch(f=>console.error("Error resolving promise in array:",f));continue}if(Array.isArray(u)){B(u,t,n,r,o,i,s);continue}if(oe(u)){t.push(u);continue}if(typeof u=="object"&&u!==null&&"type"in u&&"props"in u){let a=u;if(typeof a.type=="function"){let f=a.type(a.props||{});Array.isArray(f)?B(f,t,n,r,!1,i):B([f],t,n,r,!1,i);continue}}if(typeof u=="string"||typeof u=="number"){let a=String(u);if(a.trim()===""&&a!==" ")continue;t.push(J(a));continue}t.push(J(String(u)))}}}}function ic(e,t,n,r){for(let d=0;d<n.length;d++){let h=n[d].parentNode;h!==null&&h!==e&&h.nodeType!==11&&(n=n.slice(),n[d]=n[d].cloneNode(!0))}let o=n.length,i=t.length,s=o,c=0,u=0,a=i>0?t[i-1].nextSibling??void 0:r,f=null;for(;c<i||u<s;){if(t[c]===n[u]){c++,u++;continue}for(;i>c&&s>u&&t[i-1]===n[s-1];)i--,s--;if(i===c){let d=s<o?u?n[u-1].nextSibling??void 0:n[s-u]:a;for(;u<s;)O(e,n[u++],d)}else if(s===u)for(;c<i;)(!f||!f.has(t[c]))&&t[c].parentNode===e&&e.removeChild(t[c]),c++;else if(t[c]===n[s-1]&&n[u]===t[i-1]){let d=t[--i].nextSibling;O(e,n[u++],t[c++].nextSibling),O(e,n[--s],d),t[i]=t[c-1]}else{if(!f){f=new Map;let h=u;for(;h<s;)f.set(n[h],h++)}let d=f.get(t[c]);if(d!=null)if(u<d&&d<s){let h=c,y=1;for(;++h<i&&h<s&&!(!f.has(t[h])||f.get(t[h])!==d+y);)y++;if(y>d-u){let R=t[c];for(;u<d;)O(e,n[u++],R)}else t[c].parentNode===e?e.replaceChild(n[u++],t[c++]):(O(e,n[u++],a),c++)}else c++;else t[c].parentNode===e&&e.removeChild(t[c]),c++}}return n}function X(e,t,n){if(t)if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r].parentNode===e&&e.removeChild(t[r]);else t.parentNode===e&&e.removeChild(t);return null}function O(e,t,n){p.active&&t.parentNode===e||(n&&n.parentNode===e?e.insertBefore(t,n):e.appendChild(t))}function De(e,t,n){n==null?delete e[t]:e[t]=n}function un(e,t,n){let r=n,o;return Array.isArray(n)&&(r=n[0],o=n[1]),typeof r!="function"?()=>{}:(e.addEventListener(t,r,o),()=>e.removeEventListener(t,r,o))}function Ur(e,t){if(!t||typeof t!="function")return;let n=t[ct]?.name;if(!n)return;let r=n.indexOf(":");r!==-1&&j(e,n.slice(0,r),n.slice(r+1),t)}function at(e,t,n){let r=typeof n=="function"?E(()=>n()):n;if(!(!r||typeof r!="object"))for(let o of Object.keys(r))j(e,t,o)}function an(e,t){let n=(r,o)=>{typeof r=="function"&&(j(e,"use",r.name||"use",o),r(e,o??(()=>{})))};if(typeof t=="function"){n(t);return}if(Array.isArray(t)){if(typeof t[0]=="function"){n(t[0],t[1]);return}for(let r of t)Array.isArray(r)?n(r[0],r[1]):n(r)}}function ft(e,t,n,r=!1){return Ur(e,n),typeof n!="function"?(C(e,t,n,r),()=>{}):b(()=>{D(e,"attribute",t,n);let o=typeof n=="function"?n():n;C(e,t,o,r)})}function lt(e,t,n){return typeof n!="function"?(De(e,t,n),()=>{}):(Ur(e,n),b(()=>{D(e,"property",t,n);let r=typeof n=="function"?n():n;De(e,t,r)}))}function fn(e,t,n){return typeof n!="function"?(C(e,t,!!n),()=>{}):b(()=>{D(e,"attribute",t,n);let r=n();C(e,t,!!r)})}function je(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){b(()=>{D(e,"attribute","class",t),je(e,t())});return}if(typeof t=="string"){e.setAttribute("class",t);return}if(Array.isArray(t)){e.setAttribute("class",t.filter(Boolean).join(" "));return}if(typeof t=="object"){let n=Object.keys(t).filter(r=>{let o=t[r];return typeof o=="function"?o():!!o}).join(" ");e.setAttribute("class",n);return}e.setAttribute("class",String(t))}function Ie(e,t,n){if(!(!t||typeof t!="object"))for(let r in t){let o=t[r],i=r.split(/\s+/).filter(Boolean);if(typeof o=="function"&&n)n.push(b(()=>{let s=!!o();for(let c of i)e.classList.toggle(c,s)}));else{let s=!!(typeof o=="function"?o():o);for(let c of i)e.classList.toggle(c,s)}}}function $e(e,t){let n=t;for(;typeof n=="function";)n=n();if(n==null){e.removeAttribute("style");return}if(typeof n=="string"){e.style.cssText=n;return}if(typeof n=="object")for(let r in n){let o=n[r];o==null?e.style[r]="":e.style[r]=o}}function cc(e){let{element:t,props:n,prevProps:r=zi,isSVG:o=!1,skipChildren:i=!1}=e;if(!t||!ot(t))return console.error("[spread] Error: element is not a DOM Element!"),()=>{};if(!n)return console.warn("[spread] Warning: props is undefined!"),()=>{};let s=o||t.namespaceURI===fe,c=[];for(let u in n){if(i&&u==="children")continue;let a=n[u],f=r[u];if(a===f)continue;if(u==="ref"){qe(a,t);continue}if(u==="use"){an(t,a);continue}if(u.startsWith("on:")){c.push(un(t,u.slice(3),a));continue}if(u.startsWith("prop:")){j(t,"prop",u.slice(5),a),c.push(lt(t,u.slice(5),a));continue}if(u.startsWith("attr:")){j(t,"attr",u.slice(5),a),c.push(ft(t,u.slice(5),a,s));continue}if(u.startsWith("bool:")){j(t,"bool",u.slice(5),a),c.push(fn(t,u.slice(5),a));continue}if(u==="class"||u==="className"){typeof a=="function"?c.push(b(()=>{D(t,"attribute","class",a),je(t,a())})):je(t,a);continue}if(u==="classList"){at(t,"class",a),typeof a=="function"?c.push(b(()=>{D(t,"attribute","class",a),Ie(t,a())})):Ie(t,a,c);continue}if(u==="style"){at(t,"style",a),typeof a=="function"?c.push(b(()=>{D(t,"attribute","style",a),$e(t,a())})):$e(t,a);continue}if(u.startsWith("on")){let h=u.slice(2).toLowerCase();f&&on(t,h),a&&Lr(t,h,a);continue}let d=ze.has(u)||!s&&u in t;typeof a=="function"?c.push(d?lt(t,u,a):ft(t,u,a,s)):c.push(b(()=>d?De(t,u,n[u]):C(t,u,n[u],s)))}for(let u in r)if(!(u in n))if(u.startsWith("on")){let a=u.slice(2).toLowerCase();on(t,a)}else ze.has(u)?De(t,u,null):t.removeAttribute(u);return()=>{c.forEach(u=>u())}}function ln(e,t,n=!1){for(let r in t){let o=t[r];if(r==="ref"){qe(o,e);continue}if(r!=="children"){if(r==="use"){an(e,o);continue}if(r.startsWith("on:")){un(e,r.slice(3),o);continue}if(r.startsWith("prop:")){j(e,"prop",r.slice(5),o),lt(e,r.slice(5),o);continue}if(r.startsWith("attr:")){j(e,"attr",r.slice(5),o),ft(e,r.slice(5),o,n);continue}if(r.startsWith("bool:")){j(e,"bool",r.slice(5),o),fn(e,r.slice(5),o);continue}if(r.startsWith("on")&&r.length>2){let i=r.slice(2).toLowerCase();if(typeof o=="function")if(dt.has(i)){e[`$$${i}`]=o;let s=`__fx_${i}`;if(!e[s]){let c=u=>{e[`$$${i}`]?.(u)};e.addEventListener(i,c),e[s]=c}}else e[`$$${i}`]=o,ut.has(i)||sn([i]);continue}if(r==="class"||r==="className"){je(e,o);continue}if(r==="classList"){at(e,"class",o),typeof o=="function"?b(()=>{D(e,"attribute","class",o),Ie(e,o())}):Ie(e,o);continue}if(r==="style"){at(e,"style",o),typeof o=="function"?b(()=>{D(e,"attribute","style",o),$e(e,o())}):$e(e,o);continue}if(r==="innerHTML"){if(typeof o=="function"){let i=T(()=>{let s=o();for(;typeof s=="function";)s=s();e.innerHTML=s});x(()=>i())}else e.innerHTML=o;continue}if(r==="value"&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA")){if(typeof o=="function"){let i=T(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();document.activeElement!==e&&(e.value=s??"")});x(()=>{i()})}else b(()=>{document.activeElement!==e&&(e.value=t[r]??"")});continue}if(r==="checked"&&e.tagName==="INPUT"){if(typeof o=="function"){let i=T(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();document.activeElement!==e&&(e.checked=s??"")});x(()=>{i()})}else b(()=>{document.activeElement!==e&&(e.checked=t[r]??"")});continue}if(r==="value"&&e.tagName==="SELECT"){if(typeof o=="function"){let i=!0,s=T(()=>{let c=o();for(;typeof c=="function"&&c.length===0;)c=c();i?(i=!1,queueMicrotask(()=>{e.value=c??""})):e.value=c??""});x(()=>{s()})}else{let i=!0;b(()=>{let s=t[r];i?(i=!1,queueMicrotask(()=>{e.value=s??""})):e.value=s??""})}continue}if(typeof o=="function"){let i=T(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();Be(e,r,s,n)});x(()=>{i()})}else b(()=>Be(e,r,t[r],n))}}}function uc(...e){let t=r=>{for(let o=e.length-1;o>=0;o--){let i=e[o];if(i&&r in i&&i[r]!==void 0)return i[r]}},n=r=>{for(let o of e)if(o&&r in o)return!0;return!1};return new Proxy({},{get:(r,o)=>t(o),has:(r,o)=>n(o),ownKeys:()=>{let r=new Set;for(let o of e)if(o)for(let i of Reflect.ownKeys(o))r.add(i);return[...r]},getOwnPropertyDescriptor:(r,o)=>n(o)?{enumerable:!0,configurable:!0,get:()=>t(o)}:void 0})}function ac(e,...t){let n=new Set;for(let s of t)for(let c of s)n.add(c);let r=s=>({enumerable:!0,configurable:!0,get:()=>e[s]}),o=t.map(s=>{let c=new Set(s);return new Proxy({},{get:(u,a)=>c.has(a)?e[a]:void 0,has:(u,a)=>c.has(a)&&a in e,ownKeys:()=>Array.from(c).filter(u=>u in e),getOwnPropertyDescriptor:(u,a)=>c.has(a)&&a in e?r(a):void 0})}),i=new Proxy({},{get:(s,c)=>n.has(c)?void 0:e[c],has:(s,c)=>!n.has(c)&&c in e,ownKeys:()=>Reflect.ownKeys(e).filter(s=>!n.has(s)),getOwnPropertyDescriptor:(s,c)=>!n.has(c)&&c in e?r(c):void 0});return[...o,i]}function qe(e,t){if(!e)return;let n=e[ct]?.name;if(j(t,"ref",n||typeof e=="function"&&e.name||"ref",e),oe(e)){let r=t,o=e;if(!r)return;typeof r=="function"?r(o):typeof r=="object"&&"current"in r&&(r.current=o);return}typeof e=="function"?e(t):typeof e=="object"&&"current"in e&&(e.current=t)}function fc(e,t,n){let r=t||document.body,o=rt(()=>e),i=[];return S(()=>{let s=b(()=>{let c=o();Array.isArray(c)?(c.forEach(u=>r.appendChild(u)),i.push(()=>{c.forEach(u=>{u.parentNode===r&&r.removeChild(u)})})):oe(c)&&(r.appendChild(c),i.push(()=>{c.parentNode===r&&r.removeChild(c)}))});i.push(s),x(()=>{i.forEach(c=>c())})}),null}function lc(e){return typeof e=="string"&&e.toLowerCase()===e}function dn(e){return e==="svg"||e==="path"||e==="circle"||e==="rect"||e==="line"||e==="polygon"||e==="polyline"||e==="ellipse"||e==="g"||e==="defs"||e==="clipPath"||e==="text"}function dc(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function Pe(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function pc(e){return typeof e=="function"&&e.length===0&&N(e)}function pn(e,t,n){if(!t)throw new Error("Container element is required");let r,o,i=[];return M(s=>{S(()=>{p.active||(t.textContent=""),xr(t),Sr(),U(t,e)}),o=s}),()=>{o?.(),r?.(),i.forEach(s=>s()),t.textContent=""}}function hc(e){if(Array.isArray(e))return e;if(typeof e=="function"&&typeof e.set=="function")return[e,e.set];throw new TypeError("[fluixi] bind: needs a signal, either `signal(...)` or the `[get, set]` pair from `createSignal(...)`.")}var wn="1.0.0-alpha.85";var no=wn.split(".")[0],Wr=`__fluixi_signal_state_v${no}__`,yc=`__fluixi_signal_builds_v${no}__`,mc=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};function ro(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:mc,onSuspend:null,onError:null,observer:null}}var hn=globalThis;function gc(e){let t=ro(),n=e;for(let r of Object.keys(t))r in e||(n[r]=t[r]);return e}function bc(){let e=hn[Wr];return e?gc(e):hn[Wr]=ro()}var v=bc();(hn[yc]??=[]).push(wn);function vc(e){return v.observer=e,()=>{v.observer===e&&(v.observer=null)}}var se=[],pt;function wc(e,t){if(!v.observer)return t();let n=pt;pt=e;try{return t()}finally{pt=n}}function xc(e){let t=v.observer;t&&t.created(e.parents===void 0?{...e,parents:se,origin:e.origin??pt}:e)}function oo(e){let t=v.observer;!t?.props||!se.length||!e||t.props(se[se.length-1],e)}function Sc(e){v.observer?.contextCreated?.(e)}function Ec(e,t,n){let r=v.observer;!r?.context||!se.length||r.context(se[se.length-1],e,t,n)}function Kr(e,t,n){v.observer?.moved?.(e,t,n)}function Br(e){v.observer?.disposed?.(e)}var Tc="__FLUIXI_DEVTOOLS_HOOK__",zr=globalThis[Tc];if(typeof zr?.inject=="function")try{zr.inject({observeReactiveNodes:vc,version:wn})}catch{}function so(){return v.observer!=null}function Ac(e){if(v.untracked)return e();v.untracked=!0;try{return e()}finally{v.untracked=!1}}function Nc(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function io(e,t){let n=Symbol(t??"context");return Sc(n),{id:n,defaultValue:e,Provider:o=>{Ec(n,"provide",o.value);let i=v.owner,s=Nc(i);(s.contexts=new Map).set(n,o.value),i&&(i.owned??=[]).push(s),v.owner=s;try{return o.children}finally{v.owner=i}}}}function co(e,t){let n=e;for(;n;){if(n.contexts&&n.contexts.has(t.id))return n.contexts.get(t.id);n=n.parent}return t.defaultValue}function Rc(e){v.onSuspend=e}function _c(e){v.onError=e}function Oc(e){v.hostSchedule=e??(t=>{Promise.resolve().then(t)})}Oc(()=>{});function uo(e){return Ac(e)}var ia=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0;var Cc=Symbol.for("signal");function ao(e){return typeof e=="function"&&e[Cc]===!0}var kc=io();Rc((e,t)=>{let n=co(t,kc);n&&(n.increment(),e.finally(()=>n.decrement()))});var Pc=io();_c((e,t)=>{let n=co(t,Pc);return n?(n.setError(e),!0):!1});var mt=Symbol("store-raw"),Gr=Symbol("store-node"),Xr=Symbol("store-has"),Jr=Symbol("store-self"),Yr=Symbol("store-track");var Le=new WeakMap,yn=new WeakMap,ge=new WeakMap,gt=new WeakMap;function Mc(e,t){if(!me(e)||!so())return;let n=new Set,r=s=>{if(!(!me(s)||n.has(s))){n.add(s);for(let c of Object.values(s))r(c)}};r(gt.get(t)??t);let o=new Set,i=s=>{if(!me(s))return;let c=s;if(n.has(c)||o.has(c))return;o.add(c);let u=Le.get(c);if(u){for(let a of u.keys.values())Br(a);u.all&&Br(u.all),Le.delete(c),ge.delete(c),yn.delete(c)}for(let a of Object.values(c))i(a)};i(e)}var bt=(e,t,n)=>n?`${e}[${String(t)}]`:`${e}.${String(t)}`;function fo(e,t,n){let r=t?.owner,o=r&&n!==void 0?bt(r.name,n,t?.array):void 0,[i,s]=wc(r?.store,()=>g(e,o?{name:o}:void 0)),c=i;return c.$=s,c}function vt(e){let t=Le.get(e);return t?t.owner||(t.owner=ge.get(e)):Le.set(e,t={keys:new Map,owner:ge.get(e),array:Array.isArray(e)}),t}function Zr(e,t,n){let r=e.keys.get(t);return r||e.keys.set(t,r=fo(n,e,t)),r}function Dc(e,t,n,r){let o=ge.get(e);if(o&&o.store===t&&o.name===n)return;let i={store:t,name:n};ge.set(e,i),gt.set(e,gt.get(r)??r);let s=Le.get(e);if(s&&(s.owner=i,!!so())){for(let[c,u]of s.keys)Kr(u,t,bt(n,c,s.array));s.all&&Kr(s.all,t,bt(n,"*",s.array))}}function Qr(e){let t=vt(e);(t.all||(t.all=fo(void 0,t,"*")))()}function eo(e,t){e.$(typeof t=="function"?()=>t:t)}function me(e){if(e==null||typeof e!="object")return!1;if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function ht(e){if(!me(e))return e;let t=yn.get(e);if(t)return t;let n=new Proxy(e,jc);return yn.set(e,n),n}var jc={get(e,t,n){if(t===mt||t===Gr)return e;if(t===pe)return n;if(t===Xr)return u=>u in e;if(t==="__proxy")return!0;if(t===Yr||t===Jr)return Qr(e),n;let r=e[t];if(typeof r=="function"&&!Object.prototype.hasOwnProperty.call(e,t))return r;let o=Object.getOwnPropertyDescriptor(e,t);if(o&&o.get)return o.get.call(n);let i=vt(e),s=Zr(i,t,r),c=s();return me(c)?(i.owner&&Dc(c,s,bt(i.owner.name,t,i.array),e),ht(c)):c},set(){return!0},deleteProperty(e,t){return t in e&&q(e,t,void 0),!0},has(e,t){return t===mt||t===pe||t===Gr||t===Xr||t===Jr||t===Yr?!0:(Zr(vt(e),t,e[t])(),t in e)},ownKeys(e){return Qr(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function lo(e,t=new Set){if(e==null||typeof e!="object")return e;let n=e[mt]??e;if(t.has(n)||!me(n))return n;t.add(n);let r=!1,o=s=>{let c=lo(s,t);return c!==s&&(r=!0),c};if(Array.isArray(n)){let s=n.map(o);return r?s:n}let i={};for(let s of Object.keys(n))i[s]=o(n[s]);return r?i:n}function q(e,t,n){let r=lo(n),o=e[t];if(o===r&&(r!==void 0||t in e))return;let i=Array.isArray(e),s=i?e.length:0;r===void 0?delete e[t]:e[t]=r;let c=vt(e),u=c.keys.get(t);if(u&&eo(u,r),Mc(o,e),i&&e.length!==s){let a=c.keys.get("length");a&&eo(a,e.length)}c.all&&c.all.$(void 0)}function mn(e,t){return typeof e=="function"?e(t):e}function gn(e,t){for(let n of Object.keys(t)){let r=t[n],o=e[n];r&&typeof r=="object"&&!Array.isArray(r)&&o&&typeof o=="object"&&!Array.isArray(o)?gn(o,r):q(e,n,r)}}function xt(e){let t=[],n=e.replace(/\[([^\]]*)\]/g,".$1");for(let r of n.split("."))r.length&&t.push(r);return t}function po(e,t,n){let r=t.length-1;for(let i=0;i<r;i++){let s=t[i];if(s==="*"){let u=t.slice(i+1);if(Array.isArray(e))for(let a=0;a<e.length;a++)po(e[a],u,n);return}let c=e[s];(c==null||typeof c!="object")&&(c=/^\d+$/.test(t[i+1])?[]:{},q(e,s,c)),e=c}let o=t[r];if(o==="*"){if(Array.isArray(e))for(let i=0;i<e.length;i++)q(e,i,mn(n,e[i]));return}q(e,o,mn(n,e[o]))}function to(e,t,n){po(e,xt(t),n)}function Ic(e){return Array.isArray(e)&&e.length>0&&e.every(t=>Array.isArray(t)&&t.length>=2&&typeof t[0]=="string")}function yt(e,t){for(let n=e.length-1;n>=t.length;n--)q(e,String(n),void 0);e.length!==t.length&&q(e,"length",t.length);for(let n=0;n<t.length;n++)q(e,String(n),t[n])}function $c(e,t){let n=t[0];if(typeof n=="function"&&t.length===1){let r=n(e);r&&r!==e&&gn(e,r);return}if(Array.isArray(n)&&t.length===1){if(Ic(n)){for(let r of n)to(e,r[0],r[1]);return}if(Array.isArray(e)){yt(e,n);return}if(n.length===0)return;throw new TypeError("[fluixi] set() was given an array that is neither a batch of [path, value] pairs nor a replacement for an array root. Name the path you meant, as in set('items', [...]).")}if(n&&typeof n=="object"&&!Array.isArray(n)&&t.length===1){gn(e,n);return}if(t.length>=3){bn(e,t.slice(0,-1),t[t.length-1]);return}to(e,String(n),t[1])}function qc(e,t){if(typeof t=="function"){if(!Array.isArray(e))return[];let n=[];for(let r=0;r<e.length;r++)t(e[r],r)&&n.push(r);return n}if(Array.isArray(t))return Array.isArray(e)?t.map(Number):t.map(String);if(t&&typeof t=="object"&&("from"in t||"to"in t||"by"in t)){if(!Array.isArray(e))return[];let n=t.by??1,r=t.from??0,o=t.to??e.length-1,i=[];for(let s=r;s<=o;s+=n)s>=0&&s<e.length&&i.push(s);return i}return t==="*"?Array.isArray(e)?e.map((n,r)=>r):Object.keys(e??{}):[t]}function bn(e,t,n){if(e==null)return;let[r,...o]=t;if(typeof r=="string"){let s=xt(r);if(s.length>1){bn(e,[...s,...o],n);return}}let i=qc(e,r);if(o.length===0){for(let s of i)q(e,s,mn(n,e[s]));return}for(let s of i){let c=e[s];if(c==null||typeof c!="object"){let u=o[0];c=typeof u=="number"||/^\d+$/.test(String(u))?[]:{},q(e,s,c)}bn(c,o,n)}}function vn(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(vn);let t={};for(let n of Object.keys(e))t[n]=vn(e[n]);return t}function Y(e,t){let n=e;for(let r of xt(t)){if(n==null)return;n=n[r]}return n}var ho=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...n)=>S(()=>$c(this.root,n))),e&&typeof e=="object"&&(ge.set(e,{store:this,name:t.name??"store"}),gt.set(e,e)),xc({kind:"store",node:this,handle:()=>this.root,name:t.name})}get state(){return ht(this.root)}get proxy(){return ht(this.root)}get accessor(){return(()=>ht(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return wt(this.state);let t=this.state;for(let n of xt(e)){if(t==null)return;t=t[n]}return wt(t)}select(e){return m(()=>e(this.state))}subscribe(e){return T(()=>e(this.state))}watch(e,t){let n;return T(()=>{let r=e(this.state);Object.is(r,n)||(t(r,n),n=r)})}reactive(e){return m(()=>this.state[e])}produce(e){this.set((t=>{let n=vn(t);return e(n),n}))}reconcile(e,t={}){this.set(e)}push(e,...t){let n=Y(this.root,e);this.set(e,n.concat(t))}pop(e){let t=Y(this.root,e).slice(),n=t.pop();return this.set(e,t),n}shift(e){let t=Y(this.root,e).slice(),n=t.shift();return this.set(e,t),n}splice(e,t,n,...r){let o=Y(this.root,e).slice(),i=o.splice(t,n,...r);return this.set(e,o),i}insert(e,t,n){let r=Y(this.root,e).slice();r.splice(t,0,n),this.set(e,r)}removeAt(e,t){let n=Y(this.root,e).slice(),r=n.splice(t,1);return this.set(e,n),r}replace(e,t){if(arguments.length>=2){let r=Y(this.root,String(e)),o=t;if(Array.isArray(r)&&Array.isArray(o)){yt(r,o);return}this.set(e,o);return}let n=this.root;if(Array.isArray(n)&&Array.isArray(e)){yt(n,e);return}this.set(e)}clear(e){let t=e===void 0?this.root:Y(this.root,e);if(Array.isArray(t)){yt(t,[]);return}if(t&&typeof t=="object")for(let n of Object.keys(t))q(t,n,void 0)}toObservable(){let[e]=g(this.state);return e.toObservable()}dispose(){}},Lc=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","replace","clear","unwrap","toObservable"];function Vc(e,t){for(let n of Lc)e[n]=t[n].bind(t);e.$=t.reactive.bind(t)}function Hc(e,t={immutable:!0}){let n=new ho(e,t);return Vc(n.set,n),[n.proxy,n.set]}function Fc(e,t={}){return new ho(e,{...t,immutable:!1})}function wt(e){if(e==null||typeof e!="object")return e;let t=e[mt];return t!==void 0?t:e}function Uc(e){return E(()=>wt(e))}var ua=Object.freeze({createStore:Hc,createMutableStore:Fc,batch:S,unwrap:wt,untrackStore:Uc});var Wc="__fx_dom_create_component__",ie=globalThis[Wc]??={fn:null};function Kc(e){ie.fn=e}function Bc(e={}){let t=e.signalSystem?.createComponent;t&&(ie.fn=t)}function xn(e,t){if(ie.fn)return ie.fn(e,t);t&&oo(t);let n=typeof e=="function"?uo(()=>e(t)):e,r=n!=null&&(typeof n=="function"||typeof n=="object");if(r)try{n.$name=e?.name}catch{}return r&&!ao(n)?tn(n):n}var zc=()=>ie.fn!==null,Gc=()=>ie.fn!==null;function Xc(){ie.fn=null}var St,mo={getStore:()=>St,run(e,t){let n=St;St=e;try{return t()}finally{St=n}}},Sn=mo;function En(e){Sn=e??mo}function be(e={}){e.locals||(e.locals=e.request?Tt(e.request):{});let t=0,n=0,r=null,o=new Map,i=new Map;return{event:e,routeData:new Map,matchedRoute:new Map,nextId:()=>`s${t++}`,nextResourceId:()=>{if(r===null)return`r${n++}`;let s=o.get(r)??0;return o.set(r,s+1),`${r}:r${s}`},nextIslandNamespace:s=>{let c=i.get(s)??0;return i.set(s,c+1),`${s}#${c}`},withResourceScope(s,c){let u=r;r=s;try{return c()}finally{r=u}},pending:new Set,data:new Map}}function ve(e,t){return Sn.run(e,t)}function W(){return Sn.getStore()}function Et(){return W()?.event}function Tn(){let e=Et();return e?(e.locals||(e.locals={}),e.locals):{}}var yo=new WeakMap;function Tt(e){let t=yo.get(e);return t||(t={},yo.set(e,t)),t}var we="__FX_DATA__";function Ve(e){return e.replace(/[<>&\u2028\u2029]/g,t=>"\\u"+t.charCodeAt(0).toString(16).padStart(4,"0"))}var An;function He(){let e=globalThis.__FX_DATA__;if(e)return e;if(An!==void 0)return An;let t=null;if(typeof document<"u"){let n=document.getElementById(we)?.textContent;if(n)try{t=JSON.parse(n)}catch{t=null}}return An=t}function At(){for(;;){for(;p.cursor&&p.cursor.nodeType===3&&p.cursor.data==="";)p.cursor=p.cursor.nextSibling;if(p.cursor!=null||!p.parents.length)return;p.cursor=p.parents.pop().nextSibling}}var Jc=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Nt=typeof process<"u"&&process.env&&!1;function Rt(e,t){let n=t.nodeType===1?`<${t.tagName.toLowerCase()}>`:t.nodeType===3?`text ${JSON.stringify((t.nodeValue??"").slice(0,24))}`:t.nodeType===8?"comment":"node";console.warn(`[fluixi] hydration mismatch: expected ${e} but the server DOM has ${n}. Server and client rendered different markup; recreating this node on the client. Check for non-deterministic render (Date.now(), Math.random(), browser-only branches, untransported data).`)}function Yc(e){At();let t=p.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(Jc.has(e.toLowerCase())?p.cursor=t.nextSibling:(p.parents.push(t),p.cursor=t.firstChild),t):(Nt&&t&&Rt(`<${e}>`,t),null)}function Zc(e){At();let t=p.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(p.cursor=t.nextSibling,t):(Nt&&t&&Rt(`<${e}> (static)`,t),null)}function Qc(e){if(e===""){let n=p.cursor;return n&&n.nodeType===3&&n.data!==""?(p.cursor=n.nextSibling,n.data="",n):null}At();let t=p.cursor;return t&&t.nodeType===3?(p.cursor=t.nextSibling,t.nodeValue!==e&&(t.nodeValue=e),t):(Nt&&t&&Rt(`text ${JSON.stringify(e.slice(0,24))}`,t),null)}function eu(e){At();let t=p.cursor;return t&&t.nodeType===8&&t.data===e?(p.cursor=t.nextSibling,t):(Nt&&t&&Rt(`marker <!--${e.slice(0,24)}-->`,t),null)}var go=!1;function tu(){go||(go=!0,Pr({hydrateElement:Yc,hydrateText:Qc,hydrateMarker:eu,hydrateStatic:Zc}))}function _t(e,t,n){tu(),p.active=!0,p.cursor=t.firstChild,p.parents=[];let r=He(),o=n?.resourceNamespace,i=0;nt(()=>o?`${o}:r${i++}`:`r${i++}`),pr(r?s=>s in r?{value:r[s]}:void 0:null);try{return pn(e,t)}finally{p.active=!1,p.cursor=null,p.parents=[]}}var Nn="fluixi-island";function vo(e){let{component:t,props:n={},name:r}=e,o=cn(Nn),i=r??t.name??"Island";C(o,"name",i),C(o,"props",JSON.stringify(n??{}));let s=A()?W():void 0;if(s){let c=s.nextIslandNamespace(i);U(o,()=>s.withResourceScope(c,()=>t(n)))}else U(o,()=>t(n));return o}var bo=!1;function nu(){if(bo||typeof document>"u")return;bo=!0;let e=document.createElement("style");e.textContent=`${Nn}{display:contents}`,document.head.appendChild(e)}function wo(e){if(typeof document>"u")return;nu();let t=document.querySelectorAll(Nn),n=new Map;t.forEach(r=>{let o=r.getAttribute("name")??"",i=n.get(o)??0;n.set(o,i+1);let s=e[o];if(!s){typeof process>"u"&&console.warn(`[fluixi] island "${o}" has no component in the registry, left static.`);return}let c={};try{c=JSON.parse(r.getAttribute("props")||"{}")}catch{}_t(()=>s(c),r,{resourceNamespace:`${o}#${i}`})})}function xo(e,...t){throw new Error("html`` was not compiled, enable the lit format: fluixi({ format: 'lit' }).")}function So(e,...t){throw new Error("svg`` was not compiled, enable the lit format: fluixi({ format: 'lit' }).")}function ru(e,t={}){if(typeof e=="function")return xn(e,t);if(typeof e!="string"||e.length===0)return null;let n=dn(e);if(A())return he().createElement(e,n);let r=n?document.createElementNS(fe,e):document.createElement(e);return ln(r,t,n),ou(r,t),r}function ou(e,t){if(!t||t.children===void 0)return;let n=rt(()=>t.children),r=o=>{U(e,o,typeof o=="function"?null:void 0)};Array.isArray(n)?n.forEach(r):r(n)}function Eo(e){return typeof e=="function"?e:(()=>e)}function Z(e){return()=>{let t=e();return typeof t=="function"?t():t}}function To(e){return e!=null&&e!==!1}function Ao(e){return!e||typeof e!="object"?!1:!!(typeof e._$litType$<"u"||typeof e._$litDirective$<"u"||Array.isArray(e.strings)&&Array.isArray(e.values))}function No(e){let t=Z(()=>e.when),n=m(t,void 0,{name:"Show.when"}),r=m(n,void 0,{name:"Show.cond"}),o=K(),i=null,s=null,c=u=>{u!==s&&(i&&de(i),i=le(o),s=u)};return m(()=>{let u=r();return c(u?"when":"fallback"),P(i,()=>{if(u){let a=e.children;return typeof a=="function"&&!Ao(a)?typeof n=="function"?E(()=>E(n)?a(n()):e.fallback):a(n):a}return e.fallback});return e.fallback??null},void 0,{name:"Show.result"})}function Ro(e){let t=Z(()=>e.each),n=()=>e.fallback??null,r=(o,i)=>{let s=e.children,c=Array.isArray(s)?s.map(u=>typeof u=="function"?u(o,i):u):typeof s=="function"?s(o,i):s;return ye(c),c};return e.by?et(t,e.by,(o,i)=>r(o,i),{fallback:n}):Qe(t,(o,i)=>r(o,i),{fallback:n})}function _o(e){let t=Z(()=>e.each);return tt(t,(n,r)=>{let o=e.children(n,r);return ye(o),o},{fallback:()=>e.fallback??null})}var Rn=Symbol("match");function Oo(e){return{[Rn]:!0,when:Z(()=>e.when),get children(){return e.children}}}function Co(e){let t=Array.isArray(e.children)?e.children:[e.children],n=K(),r=null,o=-1,i=s=>{s!==o&&(r&&de(r),r=le(n),o=s)};return m(()=>{for(let s=0;s<t.length;s+=1){let u=t[s],a=0;for(;typeof u=="function"&&!u[Rn]&&a++<10;)u=u();if(!u||typeof u!="object"||u[Rn]!==!0)continue;let f=u.when();if(To(f))return i(s),P(r,()=>typeof u.children=="function"?u.children(f):u.children)}return i(-2),P(r,()=>e.fallback??null)},void 0,{name:"Switch"})}function ko(e){let t=Eo(e.component),{component:n,...r}=e,o=K(),i=null,s;return m(()=>{let c=t();return c!==s&&(i&&de(i),i=le(o),s=c),c==null?null:typeof c=="string"?{tag:c,props:r}:P(i,()=>c(r))},void 0,{name:"Dynamic"})}function Po(e){let t=()=>e.mount?typeof e.mount=="function"?e.mount():e.mount:document.body,n,r;return M(o=>{n=o,r=document.createElement("div"),r.style.display="contents",t().appendChild(r),U(r,e.children)&&qe(e.ref,r)}),x(()=>{n(),r.remove()}),null}function _n(e){if(A())return e.fallback??null;let t=p.active,[n,r]=g(!t);return t&&queueMicrotask(()=>r(!0)),m(()=>n()?e.children:e.fallback??null,void 0,{name:"client-only"})}var Mo=_n;function Do(e){let[t,n]=g(null),r=()=>n(null);return m(()=>{let o=t();if(o!==null)return typeof e.fallback=="function"?e.fallback(o,r):e.fallback;try{return typeof e.children=="function"?e.children():e.children}catch(i){return n(i),typeof e.fallback=="function"?e.fallback(i,r):e.fallback}},void 0,{name:"ErrorBoundary"})}function jo(e){return m(()=>{let t=typeof e=="function"?e():e,n=[];for(let[r,o]of Object.entries(t)){if(!r)continue;(typeof o=="function"?o():o)&&n.push(r)}return n.join(" ")},void 0,{name:"ClassMap"})}function su(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Io(e){return m(()=>{let t=typeof e=="function"?e():e,n=[];for(let[r,o]of Object.entries(t)){if(!r)continue;let i=typeof o=="function"?o():o;i!=null&&n.push(`${su(r)}: ${i}`)}return n.join("; ")},void 0,{name:"StyleMap"})}var Ct=1,kn=3,Pn=8,$o;$o=Ce;var xe=class{constructor(){this[$o]=!0;this.parentNode=null;this.childNodes=[]}get firstChild(){return this.childNodes[0]??null}get lastChild(){return this.childNodes[this.childNodes.length-1]??null}get nextSibling(){let t=this.parentNode;if(!t)return null;let n=t.childNodes.indexOf(this);return n>=0?t.childNodes[n+1]??null:null}get previousSibling(){let t=this.parentNode;if(!t)return null;let n=t.childNodes.indexOf(this);return n>0?t.childNodes[n-1]??null:null}get parentElement(){return this.parentNode}appendChild(t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=this,this.childNodes.push(t),t}insertBefore(t,n){if(n==null)return this.appendChild(t);t.parentNode&&t.parentNode.removeChild(t);let r=this.childNodes.indexOf(n);return t.parentNode=this,r<0?this.childNodes.push(t):this.childNodes.splice(r,0,t),t}removeChild(t){let n=this.childNodes.indexOf(t);return n>=0&&this.childNodes.splice(n,1),t.parentNode=null,t}replaceChild(t,n){let r=this.childNodes.indexOf(n);return r>=0&&(t.parentNode&&t.parentNode.removeChild(t),t.parentNode=this,this.childNodes[r]=t,n.parentNode=null),n}addEventListener(){}removeEventListener(){}},ce=class e extends xe{constructor(n){super();this.nodeType=kn;this.data=n}get nodeValue(){return this.data}set nodeValue(n){this.data=n==null?"":String(n)}get textContent(){return this.data}set textContent(n){this.data=n==null?"":String(n)}cloneNode(){return new e(this.data)}},Ot=class e extends xe{constructor(n){super();this.nodeType=Ct;this.rawOuterHTML=n}get textContent(){return this.rawOuterHTML.replace(/<[^>]*>/g,"")}cloneNode(){return new e(this.rawOuterHTML)}},Se=class e extends xe{constructor(n){super();this.nodeType=Pn;this.data=n}get nodeValue(){return this.data}set nodeValue(n){this.data=n==null?"":String(n)}cloneNode(){return new e(this.data)}},On=class{constructor(){this.cssText=""}setProperty(t,n){this[t]=n}removeProperty(t){delete this[t]}},Cn=class{constructor(t){this.el=t}list(){let t=this.el.getAttribute("class");return t?t.split(/\s+/).filter(Boolean):[]}write(t){t.length?this.el.setAttribute("class",t.join(" ")):this.el.removeAttribute("class")}add(...t){let n=this.list();for(let r of t)n.includes(r)||n.push(r);this.write(n)}remove(...t){this.write(this.list().filter(n=>!t.includes(n)))}contains(t){return this.list().includes(t)}toggle(t,n){let r=this.contains(t),o=n===void 0?!r:n;return o?this.add(t):this.remove(t),o}},ue=class e extends xe{constructor(n,r=!1){super();this.nodeType=Ct;this.attributes=new Map;this.style=new On;this.classList=new Cn(this);this.rawHTML=null;this.localName=n.toLowerCase(),this.tagName=r?n:n.toUpperCase(),this.isSVG=r,this.namespaceURI=r?"http://www.w3.org/2000/svg":null}setAttribute(n,r){this.attributes.set(n,String(r))}removeAttribute(n){this.attributes.delete(n)}getAttribute(n){return this.attributes.has(n)?this.attributes.get(n):null}hasAttribute(n){return this.attributes.has(n)}get id(){return this.getAttribute("id")??""}set id(n){n==null?this.removeAttribute("id"):this.setAttribute("id",n)}get className(){return this.getAttribute("class")??""}set className(n){n==null?this.removeAttribute("class"):this.setAttribute("class",n)}get htmlFor(){return this.getAttribute("for")??""}set htmlFor(n){n==null?this.removeAttribute("for"):this.setAttribute("for",n)}set value(n){n==null?this.removeAttribute("value"):this.setAttribute("value",String(n))}set checked(n){n?this.setAttribute("checked",""):this.removeAttribute("checked")}set selected(n){n?this.setAttribute("selected",""):this.removeAttribute("selected")}set indeterminate(n){}get textContent(){return this.childNodes.map(n=>n.textContent??"").join("")}set textContent(n){for(let r of this.childNodes)r.parentNode=null;this.childNodes=[],this.rawHTML=null,n!=null&&n!==""&&this.appendChild(new ce(String(n)))}set innerText(n){this.textContent=n}set innerHTML(n){for(let r of this.childNodes)r.parentNode=null;this.childNodes=[],this.rawHTML=n==null?"":String(n)}cloneNode(n=!1){let r=new e(this.localName,this.isSVG);if(r.attributes=new Map(this.attributes),r.style.cssText=this.style.cssText,r.rawHTML=this.rawHTML,n)for(let o of this.childNodes)r.appendChild(o.cloneNode(!0));return r}};var iu=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Lo=/&/g,Vo=/</g,Ho=/>/g,cu=/"/g;function Mn(e){return e.replace(Lo,"&amp;").replace(Vo,"&lt;").replace(Ho,"&gt;")}function qo(e){return e.replace(Lo,"&amp;").replace(cu,"&quot;").replace(Vo,"&lt;").replace(Ho,"&gt;")}function uu(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}function au(e){if(!e)return"";let t=[];e.cssText&&t.push(e.cssText.trim().replace(/;\s*$/,""));for(let n of Object.keys(e)){if(n==="cssText")continue;let r=e[n];r==null||r===""||t.push(`${uu(n)}: ${r}`)}return t.join("; ")}function fu(e){let t="",n=au(e.style);for(let[r,o]of e.attributes)r==="style"&&n||(t+=` ${r}="${qo(o)}"`);if(n){let r=e.attributes.get("style"),o=r?`${r.replace(/;\s*$/,"")}; ${n}`:n;t+=` style="${qo(o)}"`}return t}function L(e){if(e==null||e===!1||e===!0)return"";if(typeof e=="string")return Mn(e);if(typeof e=="number")return Mn(String(e));if(typeof e=="function")return L(e());if(Array.isArray(e))return e.map(L).join("");if(typeof e.rawOuterHTML=="string")return e.rawOuterHTML;switch(e.nodeType){case kn:return Mn(e.data??"");case Pn:return`<!--${e.data??""}-->`;case Ct:{let t=e.localName,n=`<${t}${fu(e)}>`;if(iu.has(t))return n;let r=e.rawHTML!=null?e.rawHTML:(e.childNodes??[]).map(L).join("");return`${n}${r}</${t}>`}}return Array.isArray(e.childNodes)?e.childNodes.map(L).join(""):""}var lu=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),du={amp:"&",lt:"<",gt:">",quot:'"',"#39":"'"};function Fo(e){return e.replace(/&(#?\w+);/g,(t,n)=>du[n]??t)}var V=class extends Error{};function Uo(e,t=!1){let n=0,r=[],o=[],i=a=>{let f=o[o.length-1];f?f.appendChild(a):r.push(a)};for(;n<e.length;){let a=e.indexOf("<",n);if(a===-1){c(e.slice(n));break}if(a>n&&c(e.slice(n,a)),e.startsWith("<!--",a)){let f=e.indexOf("-->",a);if(f===-1)throw new V(`unterminated comment at ${a}`);i(new Se(e.slice(a+4,f))),n=f+3;continue}if(e[a+1]==="/"){let f=e.indexOf(">",a);if(f===-1)throw new V(`unterminated closing tag at ${a}`);let d=e.slice(a+2,f).trim().toLowerCase(),h=o.pop();if(!h||h.localName!==d)throw new V(`</${d}> does not close <${h?.localName??"nothing"}>`);n=f+1;continue}n=u(a)}if(o.length>0)throw new V(`unclosed <${o[o.length-1].localName}>`);let s=r[0];if(r.length!==1||!(s instanceof ue))throw new V(`expected exactly one root element, got ${r.length}`);return s;function c(a){a!==""&&i(new ce(Fo(a)))}function u(a){let f=/[\s/>]/.exec(e.slice(a+1));if(!f)throw new V(`unterminated tag at ${a}`);let d=e.slice(a+1,a+1+f.index).toLowerCase(),h=new ue(d,t),y=a+1+f.index;for(;y<e.length;){for(;y<e.length&&/\s/.test(e[y]);)y++;if(e[y]===">"){y++;break}if(e[y]==="/"&&e[y+1]===">"){y+=2;break}let R=y;for(;y<e.length&&!/[\s=/>]/.test(e[y]);)y++;let w=e.slice(R,y);if(w==="")throw new V(`malformed attribute at ${y}`);if(e[y]==="="){if(e[y+1]!=='"')throw new V(`attribute ${w} must have a double-quoted value`);let F=e.indexOf('"',y+2);if(F===-1)throw new V(`unterminated value for ${w}`);h.setAttribute(w,Fo(e.slice(y+2,F))),y=F+1}else h.setAttribute(w,"")}return i(h),lu.has(d)||o.push(h),y}}var Wo=!1;function Bo(){Wo||(Wo=!0,Cr({createElement:(e,t)=>new ue(e,t),createText:e=>new ce(e),createRaw:e=>new Ot(e),parseTemplate:(e,t)=>Uo(e,t),createComment:e=>new Se(e)}))}function jn(e,t={}){let n=A();Bo(),re(!0);let r=be(t.event);try{return ve(r,()=>M(o=>{try{let i=typeof e=="function"?e():e;return L(i)}finally{o()}}))}finally{re(n)}}var Ko=!1;function pu(){Ko||(Ko=!0,dr(e=>{W()?.pending.add(e)}),nt(()=>W()?.nextResourceId()??""),hr((e,t)=>{e&&W()?.data.set(e,t)}))}var Dn=null;function In(e){Dn=e}function kt(e){if(e.data.size===0)return"";let t={};for(let[r,o]of e.data){let i=o;if(Dn)try{i=Dn(o,r)}catch{continue}i!==void 0&&(typeof i=="function"||typeof i=="symbol"||(t[r]=i))}if(Object.keys(t).length===0)return"";let n=Ve(JSON.stringify(t));return n==="{}"?"":`<script type="application/json" id="${we}">${n}<\/script>`}var hu=50;async function $n(e,t={}){let n=A();Bo(),re(!0),pu();let r=be(t.event);try{return await ve(r,async()=>{t.preload&&await t.preload(t.event);let o,i=null,s=()=>{};M(f=>{s=f,i=K(),o=typeof e=="function"?e():e});let c=()=>{try{P(i,()=>L(o))}catch{}};c();let u=0;for(;r.pending.size>0&&u++<hu;){let f=Array.from(r.pending);r.pending.clear(),await Promise.allSettled(f),await lr(),c()}let a=P(i,()=>L(o))+kt(r);return s(),a})}finally{re(n)}}var Wn="1.0.0-alpha.85",ss=Wn.split(".")[0],zo=`__fluixi_signal_state_v${ss}__`,yu=`__fluixi_signal_builds_v${ss}__`,mu=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};function is(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:mu,onSuspend:null,onError:null,observer:null}}var qn=globalThis;function gu(e){let t=is(),n=e;for(let r of Object.keys(t))r in e||(n[r]=t[r]);return e}function bu(){let e=qn[zo];return e?gu(e):qn[zo]=is()}var ee=bu();(qn[yu]??=[]).push(Wn);function vu(e){return ee.observer=e,()=>{ee.observer===e&&(ee.observer=null)}}var wu=[],Pt;function xu(e,t){if(!ee.observer)return t();let n=Pt;Pt=e;try{return t()}finally{Pt=n}}function Su(e){let t=ee.observer;t&&t.created(e.parents===void 0?{...e,parents:wu,origin:e.origin??Pt}:e)}function Go(e,t,n){ee.observer?.moved?.(e,t,n)}function Xo(e){ee.observer?.disposed?.(e)}var Eu="__FLUIXI_DEVTOOLS_HOOK__",Jo=globalThis[Eu];if(typeof Jo?.inject=="function")try{Jo.inject({observeReactiveNodes:vu,version:Wn})}catch{}function cs(){return ee.observer!=null}var jt=Symbol("store-raw"),Yo=Symbol("store-node"),Zo=Symbol("store-has"),Qo=Symbol("store-self"),es=Symbol("store-track");var Fe=new WeakMap,Ln=new WeakMap,Te=new WeakMap,It=new WeakMap;function Tu(e,t){if(!Ee(e)||!cs())return;let n=new Set,r=s=>{if(!(!Ee(s)||n.has(s))){n.add(s);for(let c of Object.values(s))r(c)}};r(It.get(t)??t);let o=new Set,i=s=>{if(!Ee(s))return;let c=s;if(n.has(c)||o.has(c))return;o.add(c);let u=Fe.get(c);if(u){for(let a of u.keys.values())Xo(a);u.all&&Xo(u.all),Fe.delete(c),Te.delete(c),Ln.delete(c)}for(let a of Object.values(c))i(a)};i(e)}var $t=(e,t,n)=>n?`${e}[${String(t)}]`:`${e}.${String(t)}`;function us(e,t,n){let r=t?.owner,o=r&&n!==void 0?$t(r.name,n,t?.array):void 0,[i,s]=xu(r?.store,()=>g(e,o?{name:o}:void 0)),c=i;return c.$=s,c}function qt(e){let t=Fe.get(e);return t?t.owner||(t.owner=Te.get(e)):Fe.set(e,t={keys:new Map,owner:Te.get(e),array:Array.isArray(e)}),t}function ts(e,t,n){let r=e.keys.get(t);return r||e.keys.set(t,r=us(n,e,t)),r}function Au(e,t,n,r){let o=Te.get(e);if(o&&o.store===t&&o.name===n)return;let i={store:t,name:n};Te.set(e,i),It.set(e,It.get(r)??r);let s=Fe.get(e);if(s&&(s.owner=i,!!cs())){for(let[c,u]of s.keys)Go(u,t,$t(n,c,s.array));s.all&&Go(s.all,t,$t(n,"*",s.array))}}function ns(e){let t=qt(e);(t.all||(t.all=us(void 0,t,"*")))()}function rs(e,t){e.$(typeof t=="function"?()=>t:t)}function Ee(e){if(e==null||typeof e!="object")return!1;if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Mt(e){if(!Ee(e))return e;let t=Ln.get(e);if(t)return t;let n=new Proxy(e,Nu);return Ln.set(e,n),n}var Nu={get(e,t,n){if(t===jt||t===Yo)return e;if(t===pe)return n;if(t===Zo)return u=>u in e;if(t==="__proxy")return!0;if(t===es||t===Qo)return ns(e),n;let r=e[t];if(typeof r=="function"&&!Object.prototype.hasOwnProperty.call(e,t))return r;let o=Object.getOwnPropertyDescriptor(e,t);if(o&&o.get)return o.get.call(n);let i=qt(e),s=ts(i,t,r),c=s();return Ee(c)?(i.owner&&Au(c,s,$t(i.owner.name,t,i.array),e),Mt(c)):c},set(){return!0},deleteProperty(e,t){return t in e&&H(e,t,void 0),!0},has(e,t){return t===jt||t===pe||t===Yo||t===Zo||t===Qo||t===es?!0:(ts(qt(e),t,e[t])(),t in e)},ownKeys(e){return ns(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function as(e,t=new Set){if(e==null||typeof e!="object")return e;let n=e[jt]??e;if(t.has(n)||!Ee(n))return n;t.add(n);let r=!1,o=s=>{let c=as(s,t);return c!==s&&(r=!0),c};if(Array.isArray(n)){let s=n.map(o);return r?s:n}let i={};for(let s of Object.keys(n))i[s]=o(n[s]);return r?i:n}function H(e,t,n){let r=as(n),o=e[t];if(o===r&&(r!==void 0||t in e))return;let i=Array.isArray(e),s=i?e.length:0;r===void 0?delete e[t]:e[t]=r;let c=qt(e),u=c.keys.get(t);if(u&&rs(u,r),Tu(o,e),i&&e.length!==s){let a=c.keys.get("length");a&&rs(a,e.length)}c.all&&c.all.$(void 0)}function Vn(e,t){return typeof e=="function"?e(t):e}function Hn(e,t){for(let n of Object.keys(t)){let r=t[n],o=e[n];r&&typeof r=="object"&&!Array.isArray(r)&&o&&typeof o=="object"&&!Array.isArray(o)?Hn(o,r):H(e,n,r)}}function Vt(e){let t=[],n=e.replace(/\[([^\]]*)\]/g,".$1");for(let r of n.split("."))r.length&&t.push(r);return t}function fs(e,t,n){let r=t.length-1;for(let i=0;i<r;i++){let s=t[i];if(s==="*"){let u=t.slice(i+1);if(Array.isArray(e))for(let a=0;a<e.length;a++)fs(e[a],u,n);return}let c=e[s];(c==null||typeof c!="object")&&(c=/^\d+$/.test(t[i+1])?[]:{},H(e,s,c)),e=c}let o=t[r];if(o==="*"){if(Array.isArray(e))for(let i=0;i<e.length;i++)H(e,i,Vn(n,e[i]));return}H(e,o,Vn(n,e[o]))}function os(e,t,n){fs(e,Vt(t),n)}function Ru(e){return Array.isArray(e)&&e.length>0&&e.every(t=>Array.isArray(t)&&t.length>=2&&typeof t[0]=="string")}function Dt(e,t){for(let n=e.length-1;n>=t.length;n--)H(e,String(n),void 0);e.length!==t.length&&H(e,"length",t.length);for(let n=0;n<t.length;n++)H(e,String(n),t[n])}function _u(e,t){let n=t[0];if(typeof n=="function"&&t.length===1){let r=n(e);r&&r!==e&&Hn(e,r);return}if(Array.isArray(n)&&t.length===1){if(Ru(n)){for(let r of n)os(e,r[0],r[1]);return}if(Array.isArray(e)){Dt(e,n);return}if(n.length===0)return;throw new TypeError("[fluixi] set() was given an array that is neither a batch of [path, value] pairs nor a replacement for an array root. Name the path you meant, as in set('items', [...]).")}if(n&&typeof n=="object"&&!Array.isArray(n)&&t.length===1){Hn(e,n);return}if(t.length>=3){Fn(e,t.slice(0,-1),t[t.length-1]);return}os(e,String(n),t[1])}function Ou(e,t){if(typeof t=="function"){if(!Array.isArray(e))return[];let n=[];for(let r=0;r<e.length;r++)t(e[r],r)&&n.push(r);return n}if(Array.isArray(t))return Array.isArray(e)?t.map(Number):t.map(String);if(t&&typeof t=="object"&&("from"in t||"to"in t||"by"in t)){if(!Array.isArray(e))return[];let n=t.by??1,r=t.from??0,o=t.to??e.length-1,i=[];for(let s=r;s<=o;s+=n)s>=0&&s<e.length&&i.push(s);return i}return t==="*"?Array.isArray(e)?e.map((n,r)=>r):Object.keys(e??{}):[t]}function Fn(e,t,n){if(e==null)return;let[r,...o]=t;if(typeof r=="string"){let s=Vt(r);if(s.length>1){Fn(e,[...s,...o],n);return}}let i=Ou(e,r);if(o.length===0){for(let s of i)H(e,s,Vn(n,e[s]));return}for(let s of i){let c=e[s];if(c==null||typeof c!="object"){let u=o[0];c=typeof u=="number"||/^\d+$/.test(String(u))?[]:{},H(e,s,c)}Fn(c,o,n)}}function Un(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(Un);let t={};for(let n of Object.keys(e))t[n]=Un(e[n]);return t}function Q(e,t){let n=e;for(let r of Vt(t)){if(n==null)return;n=n[r]}return n}var ls=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...n)=>S(()=>_u(this.root,n))),e&&typeof e=="object"&&(Te.set(e,{store:this,name:t.name??"store"}),It.set(e,e)),Su({kind:"store",node:this,handle:()=>this.root,name:t.name})}get state(){return Mt(this.root)}get proxy(){return Mt(this.root)}get accessor(){return(()=>Mt(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return Lt(this.state);let t=this.state;for(let n of Vt(e)){if(t==null)return;t=t[n]}return Lt(t)}select(e){return m(()=>e(this.state))}subscribe(e){return T(()=>e(this.state))}watch(e,t){let n;return T(()=>{let r=e(this.state);Object.is(r,n)||(t(r,n),n=r)})}reactive(e){return m(()=>this.state[e])}produce(e){this.set((t=>{let n=Un(t);return e(n),n}))}reconcile(e,t={}){this.set(e)}push(e,...t){let n=Q(this.root,e);this.set(e,n.concat(t))}pop(e){let t=Q(this.root,e).slice(),n=t.pop();return this.set(e,t),n}shift(e){let t=Q(this.root,e).slice(),n=t.shift();return this.set(e,t),n}splice(e,t,n,...r){let o=Q(this.root,e).slice(),i=o.splice(t,n,...r);return this.set(e,o),i}insert(e,t,n){let r=Q(this.root,e).slice();r.splice(t,0,n),this.set(e,r)}removeAt(e,t){let n=Q(this.root,e).slice(),r=n.splice(t,1);return this.set(e,n),r}replace(e,t){if(arguments.length>=2){let r=Q(this.root,String(e)),o=t;if(Array.isArray(r)&&Array.isArray(o)){Dt(r,o);return}this.set(e,o);return}let n=this.root;if(Array.isArray(n)&&Array.isArray(e)){Dt(n,e);return}this.set(e)}clear(e){let t=e===void 0?this.root:Q(this.root,e);if(Array.isArray(t)){Dt(t,[]);return}if(t&&typeof t=="object")for(let n of Object.keys(t))H(t,n,void 0)}toObservable(){let[e]=g(this.state);return e.toObservable()}dispose(){}},Cu=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","replace","clear","unwrap","toObservable"];function ku(e,t){for(let n of Cu)e[n]=t[n].bind(t);e.$=t.reactive.bind(t)}function Ht(e,t={immutable:!0}){let n=new ls(e,t);return ku(n.set,n),[n.proxy,n.set]}function Pu(e,t={}){return new ls(e,{...t,immutable:!1})}function Lt(e){if(e==null||typeof e!="object")return e;let t=e[jt];return t!==void 0?t:e}function Mu(e){return E(()=>Lt(e))}var xl=Object.freeze({createStore:Ht,createMutableStore:Pu,batch:S,unwrap:Lt,untrackStore:Mu});function ds(e,t){let[n,r]=Ht(e,t);return new Proxy(n,{get:(o,i)=>i==="set"?r:o[i],has:(o,i)=>i==="set"||Reflect.has(o,i)})}return vs(Du);})();
1
+ /*! @fluixi/dom v1.0.0-alpha.86 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
2
+ "use strict";var FluixiDOM=(()=>{var Ft=Object.defineProperty;var hs=Object.getOwnPropertyDescriptor;var ys=Object.getOwnPropertyNames;var ms=Object.prototype.hasOwnProperty;var gs=(e,t)=>{for(var n in t)Ft(e,n,{get:t[n],enumerable:!0})},bs=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ys(t))!ms.call(e,o)&&o!==n&&Ft(e,o,{get:()=>t[o],enumerable:!(r=hs(t,o))||r.enumerable});return e};var vs=e=>bs(Ft({},"__esModule",{value:!0}),e);var Du={};gs(Du,{ClientOnly:()=>_n,Dynamic:()=>ko,ErrorBoundary:()=>Do,FX_DATA_ID:()=>we,For:()=>Ro,Index:()=>_o,Island:()=>vo,JSX_PROPERTIES:()=>ze,Match:()=>Oo,NoSsr:()=>Mo,Portal:()=>Po,SVG_ELEMENTS:()=>As,SVG_NAMESPACE:()=>fe,Show:()=>No,Switch:()=>Co,VOID_ELEMENTS:()=>Ts,addClass:()=>_s,addDelegatedEventListener:()=>Lr,addNativeEventListener:()=>un,appendChildren:()=>$s,applyElementProp:()=>Be,applyProps:()=>ln,applyUse:()=>an,asComponent:()=>tn,asContext:()=>qi,asOutlet:()=>Ii,asProvider:()=>$i,asRoute:()=>ji,asRouter:()=>Mi,asRoutes:()=>Di,asSuspense:()=>Li,batch:()=>S,bindPair:()=>hc,captureHydrationCursor:()=>Mr,checkRenderType:()=>Vi,classMap:()=>jo,cleanChildren:()=>X,cloneTemplate:()=>Hr,closest:()=>Rs,createComponent:()=>xn,createComputed:()=>fr,createContext:()=>Ye,createDynamicElement:()=>ru,createEffect:()=>T,createElement:()=>js,createMemo:()=>m,createNativeElement:()=>cn,createPortal:()=>fc,createRenderEffect:()=>b,createRequestContext:()=>be,createResource:()=>yr,createRoot:()=>M,createSignal:()=>g,createStore:()=>Ht,createTemplate:()=>Vr,delegate:()=>Hs,delegateEvents:()=>sn,effect:()=>br,escapeFxJson:()=>Ve,escapeHTML:()=>dc,fnName:()=>nc,generateID:()=>Bi,getAttribute:()=>Ps,getGlobal:()=>Ys,getLitEventName:()=>Ss,getLocals:()=>Tn,getOffset:()=>Vs,getRequestContext:()=>W,getRequestEvent:()=>Et,getRequestLocals:()=>Tt,getServerData:()=>He,getStableElementId:()=>Ki,getStyle:()=>Ds,handleRef:()=>qe,hasClass:()=>ks,holeContent:()=>tc,holeEnd:()=>ec,holeScope:()=>Zi,html:()=>xo,hydrate:()=>_t,hydrateAdvancePast:()=>ye,hydrateIslands:()=>wo,indexArray:()=>tt,initializeIntegration:()=>Bc,insert:()=>U,insertExpression:()=>Me,intergartionInitialized:()=>zc,isAccessor:()=>pc,isComponent:()=>$,isContext:()=>_r,isCustomElement:()=>zn,isDOMNode:()=>Xs,isDelegatedEvent:()=>Xi,isDomElement:()=>ot,isDomNode:()=>oe,isDomText:()=>st,isEventHandler:()=>xs,isFunction:()=>Ji,isIntegrationInitialized:()=>Gc,isJSXTemplate:()=>Gs,isLitTemplateResult:()=>Xn,isNativeElement:()=>lc,isOutlet:()=>Nr,isPromise:()=>Pe,isProvider:()=>Rr,isReactElement:()=>Bs,isRoute:()=>Ar,isRouter:()=>Er,isRoutes:()=>Tr,isSVGElement:()=>dn,isServer:()=>A,isSuspense:()=>Or,isTemplateFactory:()=>zs,isVisible:()=>qs,iterateFn:()=>rc,keyArray:()=>et,makeArrayFlat:()=>Fr,mapArray:()=>Qe,memo:()=>gr,mergeProps:()=>uc,observeIntersection:()=>Us,observeResize:()=>Ws,onCleanup:()=>x,query:()=>Ut,queryAll:()=>Ns,registerCreateComponent:()=>Kc,registerGlobal:()=>Js,removeAttribute:()=>Ms,removeChildren:()=>Is,removeClass:()=>Os,removeDelegatedEventListener:()=>on,render:()=>pn,renderToString:()=>jn,renderToStringAsync:()=>$n,resetIntegration:()=>Xc,runHydrationAt:()=>ke,runWithRequestContext:()=>ve,runWithoutHydration:()=>Dr,scrollIntoView:()=>Ls,serializeNode:()=>L,serializeResourceData:()=>kt,setAttribute:()=>C,setClassList:()=>Ie,setClassName:()=>je,setDataRedactor:()=>In,setDynamicAttribute:()=>ft,setDynamicBoolAttribute:()=>fn,setDynamicProperty:()=>lt,setProperty:()=>De,setRequestStore:()=>En,setServerMode:()=>re,setStyle:()=>$e,setStyles:()=>Gn,shouldSetAsProperty:()=>Es,signal:()=>mr,splitProps:()=>ac,spread:()=>cc,store:()=>ds,styleMap:()=>Io,svg:()=>So,templateNode:()=>Yi,toAttributeName:()=>ws,toggleClass:()=>Cs,untrack:()=>E,useContext:()=>cr,waitForElement:()=>Fs});function ws(e){return e.startsWith("aria-")||e.startsWith("data-")?e:/[A-Z]/.test(e)?e.replace(/([A-Z])/g,"-$1").toLowerCase():e}function xs(e){return e.startsWith("@")||e.startsWith("on")&&e.length>2}function Ss(e){return e.startsWith("@")?e.slice(1):e.startsWith("on")?e.slice(2).toLowerCase():e}function Es(e,t){let n=new Set(["checked","value","selected","disabled","readonly","required","multiple","open","contenteditable","draggable","spellcheck"]),r={input:new Set(["value","checked","indeterminate"]),textarea:new Set(["value"]),select:new Set(["value"]),option:new Set(["selected","value"]),audio:new Set(["volume","currentTime","paused"]),video:new Set(["volume","currentTime","paused"]),img:new Set(["src","srcset"]),iframe:new Set(["src"]),a:new Set(["href"])};return n.has(t)||r[e]&&r[e].has(t)}var Ts=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),As=new Set(["svg","g","path","circle","rect","line","polyline","polygon","ellipse","text","tspan","use","defs","symbol","mask","clipPath","pattern","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","foreignObject"]),fe="http://www.w3.org/2000/svg";function zn(e){return e.localName.includes("-")}function Be(e,t,n,r=!1){if(n==null){e.removeAttribute(t);return}if(zn(e)){e[t]=n;return}C(e,t,n,r)}var ze=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]);function Ut(e,t=document){return t.querySelector(e)}function Ns(e,t=document){return Array.from(t.querySelectorAll(e))}function Rs(e,t){return e.closest(t)}function _s(e,...t){e.classList.add(...t)}function Os(e,...t){e.classList.remove(...t)}function Cs(e,...t){t.forEach(n=>e.classList.toggle(n))}function ks(e,t){return e.classList.contains(t)}function C(e,t,n,r=!1){if(n==null||n===!1){e.removeAttribute(t);return}if(n===!0){e.setAttribute(t,"");return}if(typeof n=="object"){e.setAttribute(t,JSON.stringify(n));return}e.setAttribute(t,String(n))}function Ps(e,t){return e.getAttribute(t)}function Ms(e,t){e.removeAttribute(t)}function Gn(e,t){Object.assign(e.style,t)}function Ds(e,t){return window.getComputedStyle(e).getPropertyValue(t)}function js(e,t={},...n){let r=document.createElement(e);return Object.entries(t).forEach(([o,i])=>{if(o==="class"||o==="className")r.className=i;else if(o==="style"&&typeof i=="object")Gn(r,i);else if(o.startsWith("on")&&typeof i=="function"){let s=o.slice(2).toLowerCase();r.addEventListener(s,i)}else C(r,o,i)}),n.forEach(o=>{typeof o=="string"?r.appendChild(document.createTextNode(o)):r.appendChild(o)}),r}function Is(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function $s(e,...t){t.forEach(n=>{typeof n=="string"?e.appendChild(document.createTextNode(n)):e.appendChild(n)})}function qs(e){let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=window.innerHeight&&t.right<=window.innerWidth}function Ls(e,t={behavior:"smooth",block:"nearest"}){e.scrollIntoView(t)}function Vs(e){let t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}}function Hs(e,t,n,r){let o=i=>{let s=i.target.closest(n);s&&e.contains(s)&&r(i,s)};return e.addEventListener(t,o),()=>{e.removeEventListener(t,o)}}function Fs(e,t=5e3){return new Promise((n,r)=>{let o=Ut(e);if(o){n(o);return}let i=new MutationObserver(()=>{let c=Ut(e);c&&(i.disconnect(),clearTimeout(s),n(c))});i.observe(document.body,{childList:!0,subtree:!0});let s=setTimeout(()=>{i.disconnect(),r(new Error(`Element ${e} not found within ${t}ms`))},t)})}function Us(e,t,n={}){let r=new IntersectionObserver(o=>{o.forEach(i=>{t(i.isIntersecting)})},n);return r.observe(e),()=>{r.disconnect()}}function Ws(e,t){let n=new ResizeObserver(r=>{r.forEach(t)});return n.observe(e),()=>{n.disconnect()}}var Ks=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function Bs(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ks}function Xn(e){return e&&typeof e=="object"&&e.strings&&Array.isArray(e.strings)&&e.values&&Array.isArray(e.values)}function zs(e){if(typeof e!="function")return!1;try{let t=e();return Xn(t)}catch{return!1}}function Gs(e){return typeof e=="object"&&e!==null&&(e.$$typeof==="template"||typeof e.type=="function")}function Xs(e){return e instanceof Node}function Js(e,t,n="Fluixi"){typeof globalThis<"u"&&(typeof globalThis[n]>"u"&&(globalThis[n]={}),typeof globalThis[n][e]>"u"&&(globalThis[n][e]=t))}function Ys(e,t,n="Fluixi"){return typeof globalThis<"u"&&typeof globalThis[n]<"u"&&typeof globalThis[n][e]<"u"?globalThis[n][e]:t}var Yt="1.0.0-alpha.86",er=Yt.split(".")[0],Jn=`__fluixi_signal_state_v${er}__`,tr=`__fluixi_signal_builds_v${er}__`,Zs=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};function nr(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Zs,onSuspend:null,onError:null,observer:null}}var Ge=globalThis;function Qs(e){let t=nr(),n=e;for(let r of Object.keys(t))r in e||(n[r]=t[r]);return e}function ei(){let e=Ge[Jn];return e?Qs(e):Ge[Jn]=nr()}var l=ei();(Ge[tr]??=[]).push(Yt);function rr(){return[...new Set(Ge[tr]??[])]}function ti(e){return l.observer=e,()=>{l.observer===e&&(l.observer=null)}}var k=[],ni;function Zt(e){let t=l.observer;t&&t.created(e.parents===void 0?{...e,parents:k,origin:e.origin??ni}:e)}function ri(e){return l.observer?(k.push(e),!0):!1}function oi(){k.pop()}function si(e){l.observer?.ran?.(e)}function ii(e,t){l.observer?.wrote?.(e,t)}function D(e,t,n,r){let o=l.observer;!o?.bound||!k.length||o.bound(k[k.length-1],e,t,n,r)}function j(e,t,n,r){let o=l.observer;!o?.directive||!k.length||o.directive(k[k.length-1],e,t,n,r)}function ci(e){l.observer?.contextCreated?.(e)}function Kt(e,t,n){let r=l.observer;!r?.context||!k.length||r.context(k[k.length-1],e,t,n)}function Qt(e){l.observer?.disposed?.(e)}var ui="__FLUIXI_DEVTOOLS_HOOK__",Yn=globalThis[ui];if(typeof Yn?.inject=="function")try{Yn.inject({observeReactiveNodes:ti,version:Yt})}catch{}function or(){return l.observer!=null}var Zn=0,Qn=1,Re=2,sr=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(l.untracked)return;let e=l.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}},ai=class extends sr{constructor(e,t){super(),this._value=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){return this.track(),this._value}set(e){if(!this._equals(this._value,e)){if(this._value=e,this.version++,ii(this,l.consumer),this.observers)for(let t of[...this.observers])t.markDirty(Re);Bt(this)}}peek(){return this._value}},ir=class extends sr{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=Re,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(l.consumer===this)throw new Error("Signal.Computed cannot read itself");if(this.track(),this.updateIfNecessary(),this._threw)throw this._error;return this._value}updateIfNecessary(){if(this.state===Qn&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===Re)break}(this.state===Re||!this._initialized)&&this.recompute(),this.state=Zn}recompute(){if(this.sources){for(let c of this.sources)c.observers?.delete(this);this.sources.clear()}let e=l.consumer,t=l.untracked,n=ri(this);l.consumer=this,l.untracked=!1;let r,o=!1,i;try{r=this._fn()}catch(c){o=!0,i=c,r=this._value}finally{l.consumer=e,l.untracked=t,n&&oi()}let s=!this._initialized||this._threw!==o||(o?i!==this._error:!this._equals(this._value,r));if(this._initialized=!0,this._threw=o,this._error=i,this._value=r,si(this),s){if(this.version++,this.observers)for(let c of[...this.observers])c.markDirty(Re);Bt(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===Zn;if(this.state=e,t){if(this.observers)for(let n of[...this.observers])n.markDirty(Qn);Bt(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function Bt(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}var fi=class{constructor(e){this._watched=new Set,this._pending=new Set,this._notifyFn=e}watch(...e){for(let t of e)this._watched.add(t),(t.watchers??=new Set).add(this)}unwatch(...e){for(let t of e)this._watched.delete(t),t.watchers?.delete(this),this._pending.delete(t)}getPending(){let e=[...this._pending];return this._pending.clear(),e}_notify(e){if(!this._watched.has(e)||this._pending.has(e))return;let t=this._pending.size===0;this._pending.add(e),t&&this._notifyFn()}};function li(e){if(l.untracked)return e();l.untracked=!0;try{return e()}finally{l.untracked=!1}}function le(e){let t=Je(e);return e&&(e.owned??=[]).push(t),t}function de(e,t=!0){_e(e,t)}function Je(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function Ye(e,t){let n=Symbol(t??"context");return ci(n),{id:n,defaultValue:e,Provider:o=>{Kt(n,"provide",o.value);let i=l.owner,s=Je(i);(s.contexts=new Map).set(n,o.value),i&&(i.owned??=[]).push(s),l.owner=s;try{return o.children}finally{l.owner=i}}}}function cr(e){let t=l.owner;for(;t;){if(t.contexts&&t.contexts.has(e.id)){let n=t.contexts.get(e.id);return Kt(e.id,"read",n),n}t=t.parent}return Kt(e.id,"read",e.defaultValue),e.defaultValue}function ur(e,t){let n=e;for(;n;){if(n.contexts&&n.contexts.has(t.id))return n.contexts.get(t.id);n=n.parent}return t.defaultValue}function di(e){l.onSuspend=e}function pi(e){return l.onSuspend?(l.onSuspend(e,l.owner),!0):!1}function hi(e){l.onError=e}function K(){return l.owner}function P(e,t){let n=l.owner;l.owner=e;try{return t()}finally{l.owner=n}}function x(e){if(l.owner){if(l.owner.disposed){e();return}(l.owner.cleanups??=[]).push(e)}}function _e(e,t=!0){if(!e.disposed){if(e.owned){for(let n=e.owned.length-1;n>=0;n--)_e(e.owned[n]);e.owned=null}if(e.cleanups){for(let n=e.cleanups.length-1;n>=0;n--)e.cleanups[n]();e.cleanups=null}t&&(e.disposed=!0)}}function M(e){let t=Je(l.owner);l.owner&&(l.owner.owned??=[]).push(t);let n=l.owner;l.owner=t;try{return e(()=>_e(t))}finally{l.owner=n}}function yi(e){l.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function mi(e){e.queued||(e.queued=!0,l.queue.push(e),!l.scheduled&&l.batchDepth===0&&(l.scheduled=!0,l.hostSchedule(Ze)))}function Ze(){if(l.scheduled=!1,l.flushing)return;l.flushing=!0;let e=0;try{for(;l.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let t=l.queue;l.queue=[];for(let n of t)n.queued=!1,n.disposed||n.run()}}finally{l.flushing=!1}}function gi(){l.batchDepth===0&&Ze()}function bi(e){l.batchDepth++;try{return e()}finally{--l.batchDepth===0&&Ze()}}var vi=class{constructor(e,t=!1){this.queued=!1,this.disposed=!1,this.owner=Je(l.owner),l.owner&&(l.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new ir(()=>{_e(this.owner,!1),P(this.owner,()=>{let n=e();typeof n=="function"&&(this.owner.cleanups??=[]).push(n)})}),Zt({kind:"effect",node:this.computed,handle:this,internal:!t}),this.watcher=new fi(()=>mi(this)),this.run(),this.watcher.watch(this.computed)}run(){if(!this.disposed){this.watcher.getPending();try{this.computed.get()}catch(e){if(e&&typeof e.then=="function"&&l.onSuspend){l.onSuspend(e,this.owner);return}if(l.onError&&l.onError(e,this.owner))return;throw e}}}dispose(){this.disposed||(this.disposed=!0,Qt(this.computed),this.watcher.unwatch(this.computed),_e(this.owner))}};function en(e,t=!1){let n=new vi(e,t);return()=>n.dispose()}function wi(e){return!!e&&typeof e.then=="function"}yi(()=>{});var ar=Symbol.for("signal"),xi=Symbol.for("memo"),Si=Symbol.for("signal-node");function g(e,t){let n=new ai(e,{equals:t?.equals}),r=(()=>n.get()),o=(i=>{let s=typeof i=="function"?i(n.peek()):i;return n.set(s),gi(),s});return Object.defineProperty(r,ar,{value:!0,enumerable:!0}),Object.defineProperty(r,Si,{value:{get value(){return n.peek()},get version(){return n.version}},enumerable:!1}),Zt({kind:"signal",node:n,handle:r,name:t?.name,set:o}),or()&&x(()=>Qt(n)),[r,o]}function m(e,t,n){let r=t,o=K(),i=new ir(()=>P(o,()=>{try{return r=e(r)}catch(c){if(wi(c))return pi(c),r;throw c}}),{equals:n?.equals}),s=(()=>i.get());return Object.defineProperty(s,ar,{value:!0,enumerable:!0}),Object.defineProperty(s,xi,{value:!0,enumerable:!0}),Zt({kind:"memo",node:i,handle:s,name:n?.name}),or()&&x(()=>Qt(i)),s}function T(e,t){let n=t;return en(()=>{n=e(n)},!0)}function fr(e,t){let n=t;en(()=>{n=e(n)})}function b(e,t){let n=t;return en(()=>{n=e(n)})}function S(e){return bi(e)}function E(e){return li(e)}function lr(){return Ze(),Promise.resolve()}function Qe(e,t,n){let r=[];return x(()=>{for(let o of r)o.dispose();r=[]}),m(()=>{let o=e()||[];return E(()=>{if(o.length===0){for(let u of r)u.dispose();return r=[],n?.fallback?n.fallback():[]}let i=new Map;for(let u of r)i.has(u.item)||i.set(u.item,u);let s=[],c=new Set;for(let u=0;u<o.length;u++){let a=o[u],f=i.get(a);if(f&&!c.has(f))f.setIndex(u),s.push(f),c.add(f);else{let d,h,y;M(w=>{y=w;let[F,Ae]=g(u,{name:"row index"});h=Ae,d=t(a,F)});let R={item:a,rendered:d,dispose:y,setIndex:h};s.push(R),c.add(R)}}for(let u of r)c.has(u)||u.dispose();return r=s,s.map(u=>u.rendered)})},void 0,{name:"mapArray"})}function et(e,t,n,r){let o=[],i=[];return x(()=>{for(let s of i)s.dispose();o=[],i=[]}),m(()=>{let s=e()||[];return E(()=>{if(s.length===0){for(let d of i)d.dispose();return o=[],i=[],r?.fallback?r.fallback():[]}let c=new Map;for(let d=0;d<o.length;d++)c.set(o[d],i[d]);let u=[],a=[],f=new Set;for(let d=0;d<s.length;d++){let h=t(s[d]),y=c.get(h);if(y&&!f.has(h))y.setIndex(d),u.push(y);else{let R,w,F;M(Ae=>{F=Ae;let[te,Ne]=g(d,{name:"row index"});w=Ne;let Ue=m(ae=>{let G=(e()||[])[te()];return G??ae},s[d]);R=n(Ue,te)}),u.push({rendered:R,dispose:F,setIndex:w})}a.push(h),f.add(h)}for(let[d,h]of c)f.has(d)||h.dispose();return o=a,i=u,u.map(d=>d.rendered)})},void 0,{name:"keyArray"})}function tt(e,t,n){let r=[];return x(()=>{for(let o of r)o.dispose();r=[]}),m(()=>{let o=e()||[];return E(()=>{if(o.length===0){for(let u of r)u.dispose();return r=[],n?.fallback?n.fallback():[]}let i=r.length,s=o.length;for(let u=i;u<s;u++){let a,f,d,h=o[u];M(y=>{d=y;let[R,w]=g(h);f=w,a=t(R,u)}),r.push({rendered:a,setItem:f,dispose:d})}for(let u=s;u<i;u++)r[u].dispose();s<i&&(r=r.slice(0,s));let c=Math.min(i,s);for(let u=0;u<c;u++)r[u].setItem(o[u]);return r.map(u=>u.rendered)})},void 0,{name:"indexArray"})}var Ei=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0,Ti=typeof process>"u"?Ei:!1,Ai=Symbol.for("signal");function N(e){return typeof e=="function"&&e[Ai]===!0}var zt=null;function dr(e){zt=e}function Ni(e){zt&&zt(e)}var Gt=null;function pr(e){Gt=e}function Ri(e){return Gt?Gt(e):void 0}var Xt=null;function nt(e){Xt=e}function _i(){return Xt?Xt():void 0}var Jt=null;function hr(e){Jt=e}function Oi(e,t){Jt&&Jt(e,t)}function Ci(e){return!!e&&typeof e.then=="function"}var Wt=Symbol();function yr(e,t,n={}){let r,o;typeof t=="function"?(r=typeof e=="function"?e:()=>e,o=t):(r=()=>!0,o=e,t&&typeof t=="object"&&(n=t));let i=n.transport===!1?void 0:_i(),s=i!==void 0?Ri(i):void 0,c=s!==void 0,[u,a]=g(s!==void 0?s.value:n.initialValue,{equals:!1}),[f,d]=g(void 0,{equals:!1}),[h,y]=g(s!==void 0||n.initialValue!==void 0?"ready":"unresolved",{equals:!1}),[R,w]=g(void 0,{equals:!1}),[F,Ae]=g(void 0,{equals:!1}),te=Wt,Ne=!1;T(()=>{let _=r();if(F(),_===!1||_===null||_===void 0){te=Wt,S(()=>{y("unresolved"),w(void 0),d(void 0)});return}let G=Ne;if(Ne=!1,te!==Wt&&_===te&&!G)return;if(te=_,c){c=!1;return}let We=!1;x(()=>We=!0);let Kn=E(h),ps=E(u),Bn=Kn==="ready"||Kn==="refreshing";S(()=>{y(Bn?"refreshing":"pending"),d(void 0)});try{let ne=o(_,{value:ps,refetching:Bn});Ci(ne)?(w(ne),Ni(ne),ne.then(Ke=>{We||(i!==void 0&&Oi(i,Ke),S(()=>{a(()=>Ke),y("ready"),w(void 0)}))},Ke=>{We||S(()=>{d(Ke),y("errored"),w(void 0)})})):S(()=>{a(()=>ne),y("ready"),w(void 0)})}catch(ne){if(We)return;S(()=>{d(ne),y("errored"),w(void 0)})}});let Ue=()=>{let _=h();return _==="pending"||_==="refreshing"},ae=(()=>{let _=f();if(_)throw _;if(Ue()){let G=R();if(G)throw G}return u()});return Object.defineProperties(ae,{state:{get:h},loading:{get:Ue},error:{get:f},latest:{get:u}}),Object.defineProperty(ae,Symbol.for("resource"),{value:!0,enumerable:!0}),Object.defineProperty(ae,Symbol.for("signal"),{value:!0,enumerable:!0}),[ae,{mutate:a,refetch:()=>{Ne=!0,Ae(void 0)}}]}function Xe(e){if(typeof e=="function"&&!e.length){let t=e();return N(t)?t:Xe(t)}if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=Xe(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function rt(e){let t=m(e);return Ti?m(()=>Xe(t()),void 0,{name:"children"}):m(()=>Xe(t()))}var ki=Ye();di((e,t)=>{let n=ur(t,ki);n&&(n.increment(),e.finally(()=>n.decrement()))});var Pi=Ye();hi((e,t)=>{let n=ur(t,Pi);return n?(n.setError(e),!0):!1});var pe=Symbol.for("fluixi-proxy");function mr(e,t){let[n,r]=g(e,t);return Object.assign(n,{set:r})}function gr(e,t,n){return m(e,t,n)}function br(e,t){return T(e,t)}var vr="1.0.0-alpha.86";var wr="1.0.0-alpha.86";var I={dom:vr,reactive:wr};function xr(e){I.core&&e.setAttribute("fluixi",I.core),e.setAttribute("fx-dom",I.dom),e.setAttribute("fx-reactive",I.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=I)}function Sr(){let e=rr();e.length>1&&console.warn(`[fluixi] ${e.length} builds of @fluixi/reactive are driving one reactive graph: ${e.join(", ")}. They share it on purpose, so signals still cross between them, but the oldest one decided what the graph looks like. Build the components on one release, or load them as shared-runtime bundles.`);let t=[I.core,I.dom,I.reactive].filter(n=>n!==void 0);new Set(t).size<=1||console.warn(`[fluixi] package versions disagree: core ${I.core??"(absent)"}, dom ${I.dom}, reactive ${I.reactive}. These ship as one release, so a mismatch usually means a stale lockfile or two copies resolved side by side. Reinstall, or check for duplicates with \`pnpm why @fluixi/dom\`.`)}function Mi(e){return Object.defineProperty(e,Symbol.for("fluixi-router"),{value:!0,enumerable:!0}),e}function Di(e){return Object.defineProperty(e,Symbol.for("fluixi-routes"),{value:!0,enumerable:!0}),e}function ji(e){return Object.defineProperty(e,Symbol.for("fluixi-route"),{value:!0,enumerable:!0}),e}function Ii(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-outlet"),{value:!0,enumerable:!0}),e}function $i(e){return Object.defineProperty(e,Symbol.for("fluixi-provider"),{value:!0,enumerable:!0}),e}function qi(e){return Object.defineProperty(e,Symbol.for("fluixi-context"),{value:!0,enumerable:!0}),e}function tn(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}function Li(e){return Object.defineProperty(e,Symbol.for("fluixi-suspense"),{value:!0,enumerable:!0}),e}function Er(e){return typeof e=="function"&&e[Symbol.for("fluixi-router")]===!0}function Tr(e){return typeof e=="function"&&e[Symbol.for("fluixi-routes")]===!0}function Ar(e){return typeof e=="function"&&e[Symbol.for("fluixi-route")]===!0}function Nr(e){return typeof e=="function"&&e[Symbol.for("fluixi-outlet")]===!0}function Rr(e){return typeof e=="function"&&e[Symbol.for("fluixi-provider")]===!0}function _r(e){return typeof e=="function"&&e[Symbol.for("fluixi-context")]===!0}function $(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}function Or(e){return typeof e=="function"&&e[Symbol.for("fluixi-suspense")]===!0}function Vi(e){return Er(e)?{type:"router",value:e}:Ar(e)?{type:"route",value:e}:Tr(e)?{type:"routes",value:e}:Nr(e)?{type:"outlet",value:e}:$(e)?{type:"component",value:e}:Or(e)?{type:"suspense",value:e}:Rr(e)?{type:"provider",value:e}:_r(e)?{type:"context",value:e}:{type:"none",value:e}}var Ce=Symbol.for("fluixi.server-node"),Hi=Symbol.for("fluixi.dom.server-host"),Fi=globalThis,Oe=Fi[Hi]??={server:typeof document>"u",nodes:null};function A(){return Oe.server}function re(e){Oe.server=e}function Cr(e){Oe.nodes=e}function he(){if(!Oe.nodes)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return Oe.nodes}function oe(e){return e!=null&&e[Ce]===!0?!0:typeof Node<"u"&&e instanceof Node}function ot(e){return e!=null&&e[Ce]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function st(e){return e!=null&&e[Ce]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}var p={active:!1,cursor:null,parents:[]},kr=null;function Pr(e){kr=e}function it(){return kr}function nn(e,t){return p.active&&t.parentNode===e}function rn(e){let t=p.parents.lastIndexOf(e);t!==-1&&(p.parents.length=t),p.cursor=e.nextSibling}function Mr(){return p.active?p.cursor:null}function ke(e,t){if(!e||e.parentNode==null)return t();let n=p.active,r=p.cursor,o=p.parents;p.active=!0,p.cursor=e,p.parents=[];try{return t()}finally{p.active=n,p.cursor=r,p.parents=o}}function Dr(e){if(!p.active)return e();let t=p.cursor,n=p.parents;p.active=!1,p.parents=[];try{return e()}finally{p.active=!0,p.cursor=t,p.parents=n}}function ye(e){if(!p.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&rn(t)}function Ui(e){let t=[];for(;e&&e.nodeType===1;){let n=e.tagName.toLowerCase();if(e.id){n+=`#${e.id}`,t.unshift(n);break}e.getAttribute("data-id")&&(n+=`[data-id="${e.getAttribute("data-id")}"]`);let r=0,o=e;for(;o=o.previousElementSibling;)o.tagName===e.tagName&&r++;n+=`:nth-of-type(${r+1})`,t.unshift(n),e=e.parentElement}return t.join(">")}function Wi(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return`el_${Math.abs(t)}`}function Ki(e){return Wi(Ui(e))}var Bi=()=>"xxyxxxxxxy-4xx8".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)}),zi={};var ct="__fx_at",qr="__fx_loc";function jr(e,t){return t&&(e[qr]=t),e}var Ir=new Map,ut=new Set,dt=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);function sn(e){if(!A())for(let t of e)ut.has(t)||dt.has(t)||(ut.add(t),document.addEventListener(t,Gi))}function Gi(e){let t=`$$${e.type}`,n=e.composedPath&&e.composedPath()[0]||e.target;for(;n;){let r=n[t];if(r&&!n.disabled&&(r(e),e.cancelBubble))return;n=n.host&&n.host!==n&&n.host instanceof Element?n.host:n.parentNode}}function Lr(e,t,n){if(e[`$$${t}`]=n,dt.has(t)){let r=`__fx_${t}`;if(!e[r]){let o=i=>{e[`$$${t}`]?.(i)};e.addEventListener(t,o),e[r]=o}return}ut.has(t)||sn([t])}function on(e,t){delete e[`$$${t}`];let n=`__fx_${t}`,r=e[n];r&&(e.removeEventListener(t,r),delete e[n])}function Xi(e){return!dt.has(e)}function Ji(e){return typeof e=="function"}function J(e,t=!1){if(A())return he().createText(e);if(p.active&&!t){let n=it()?.hydrateText(e);if(n)return n}return document.createTextNode(e)}function cn(e,t=!1,n){if(A())return he().createElement(e,t);if(p.active){let r=it()?.hydrateElement(e);if(r)return n?jr(r,n):r}return jr(t?document.createElementNS(fe,e):document.createElement(e),n)}function Vr(e,t=!1){let n=Ir.get(e);if(n)return n;let r=document.createElement("template");return t?r.innerHTML=`<svg>${e}</svg>`:r.innerHTML=e,Ir.set(e,r),r}function Yi(e,t,n=!1,r=!1,o){if(A()){let i=he();return n?i.parseTemplate(e,r):i.createRaw(e)}if(p.active){let i=it()?.hydrateStatic(t);if(i)return $r(i,o)}return $r(Hr(Vr(e,r),r).firstChild,o)}function $r(e,t){let n=e;if(!t||typeof n?.querySelectorAll!="function")return e;let r=[n,...n.querySelectorAll("*")];for(let o=0;o<r.length&&o*2+1<t.pos.length;o++){let i=t.pos[o*2];i&&(r[o][qr]={file:t.file,line:i,column:t.pos[o*2+1]})}return e}function Zi(e,t){if(!p.active)return t();let n=ke(e.nextSibling,t);if(typeof n=="function"){let r=n;return Qi(r,(...i)=>p.active?ke(e.nextSibling,()=>r(...i)):r(...i))}return n}function Qi(e,t){let n=e[ct];return n!==void 0&&(t[ct]=n),t}function ec(e){for(let t=e.nextSibling;t;t=t.nextSibling)if(t.nodeType===8&&t.data==="fx/")return t;throw new Error("[fluixi] template hole is missing its closing marker")}function tc(e,t){let n=[];for(let r=e.nextSibling;r&&r!==t;r=r.nextSibling)n.push(r);return n}function Hr(e,t=!1){let n=e.content.cloneNode(!0);return t?n.firstChild:n}function Fr(e){return Array.isArray(e)?e.length===2&&e[1]===" "?Array.isArray(e[0])?Fr(e[0]):(typeof e[0]=="function",e[0]):e.length===1&&typeof e[0]=="function"?e[0]:e:e}function nc(e){return typeof e!="function"?null:e._name||e.name||"anonymous"}function rc(e){if(N(e)||$(e)||typeof e!="function")return e;let t=e();for(;typeof t=="function"&&!N(t)&&!$(t);)t=t();return t}var z=0,oc=200;function sc(e,t,n,r,o){let i=r,s=new Map;return b(()=>{D(n??t,"content",void 0,e);let c;if($(e)&&!N(e)){if(!s.has(e)){z++;try{let u=e();s.set(e,u)}finally{z--}}for(c=s.get(e);typeof c=="function"&&N(c);)c=c()}else for(c=e();typeof c=="function"&&N(c);)c=c();{let u=0;for(;typeof c=="function"&&u++<50;)if($(c)){if(!s.has(c)){let a=c;z++;try{let f=a();s.set(a,f)}finally{z--}}c=s.get(c)}else if(N(c))c=c();else if(c=c(),typeof c!="function"||!N(c)&&!$(c))break}z++;try{i=Me(t,c,n,i,s),o(i)}finally{z--}})}function U(e,t,n,r){if(z>oc)return console.error("[insert] Exceeded max call depth, possible infinite loop."),()=>null;n!==void 0&&!n&&(n=J("",!0),e.appendChild(n));let o=r??null,i=u=>Array.isArray(u)&&u.some(a=>typeof a=="function"),s=u=>typeof u=="function"?u:()=>u;if(typeof t!="function"&&!i(t)){z++;try{o=Me(e,t,n,o)}finally{z--}return()=>o}let c=sc(s(t),e,n,o,u=>{o=u});return()=>(c?.(),o)}function Me(e,t,n,r,o){if(t==null||typeof t=="boolean")return X(e,r,n);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return X(e,r,n);if(Pe(t)){let s=J("",!0);return Array.isArray(r)?r.length>0?(e.replaceChild(s,r[0]),X(e,r.slice(1),n)):O(e,s,n):r?e.replaceChild(s,r):O(e,s,n),t.then(c=>{s.parentNode===e&&Me(e,c,s.nextSibling,s)}).catch(c=>{console.error("Error resolving promise in insertExpression:",c)}),s}let i=typeof t;if(i==="string"||i==="number"){if(i==="number"&&(t=String(t)),Array.isArray(r)){if(r.length===0){let c=J(t);return O(e,c,n),c}if(r.length===1&&r[0].nodeType===3)return r[0].data=t,r;r=X(e,r,n)}if(r&&st(r))return r.data=t,r;let s=J(t);return r&&r.parentNode===e?e.replaceChild(s,r):nn(e,s)||O(e,s,n),s}if(oe(t))return nn(e,t)?(rn(t),t):Array.isArray(r)?(r.length===0?O(e,t,n):r[0].parentNode===e?(e.replaceChild(t,r[0]),X(e,r.slice(1),n)):O(e,t,n),t):(r?r!==t&&(r.parentNode===e?e.replaceChild(t,r):O(e,t,n)):O(e,t,n),t);if(Array.isArray(t)){let s=[],c=Array.isArray(r)?r:r?[r]:[],u=[];B(t,s,e,n,!0,o,u);let a=ic(e,c,s,n);for(let f of u){let d=U(e,f.sig,f.marker);x(()=>{X(e,d()),f.marker.parentNode===e&&e.removeChild(f.marker)})}return a}if(i==="object"&&t!==null&&typeof t=="object"){let s=t;if("type"in s&&"props"in s){let c=s;if(typeof c.type=="function"){let u=c.type(c.props||{});return Me(e,u,n,r)}}}return X(e,r,n)}function B(e,t,n,r,o=!0,i,s){for(let c=0;c<e.length;c++){let u=e[c];if(!(u==null||typeof u=="boolean")){for(;typeof u=="function"&&!Pe(u)&&!N(u)&&!$(u)&&(u=u(),!(u==null||typeof u=="boolean")););if(!(u==null||typeof u=="boolean")){if(typeof u=="function"){let a;for($(u)&&!N(u)?(i||(i=new Map),i.has(u)||i.set(u,u()),a=i.get(u)):a=u();typeof a=="function"&&!Pe(a)&&!N(a)&&!$(a);)i||(i=new Map),i.has(a)||i.set(a,a()),a=i.get(a);if(a==null||typeof a=="boolean")continue;if(typeof a=="function"){if(N(a)){if(s){let d=J("",!0);t.push(d),s.push({marker:d,sig:a});continue}let f=a();for(;typeof f=="function"&&N(f);)f=f();if(f==null||typeof f=="boolean")continue;Array.isArray(f)?B(f,t,n,r,o,i):B([f],t,n,r,o,i);continue}continue}Array.isArray(a)?B(a,t,n,r,o,i,s):B([a],t,n,r,o,i,s);continue}if(Pe(u)){let a=J("",!0);t.push(a),u.then(f=>{if(a.parentNode){let d=[];if(B([f],d,a.parentNode,void 0,!1,i),d.length>0){a.parentNode.replaceChild(d[0],a);for(let h=1;h<d.length;h++)a.parentNode?.insertBefore(d[h],d[h-1].nextSibling)}}}).catch(f=>console.error("Error resolving promise in array:",f));continue}if(Array.isArray(u)){B(u,t,n,r,o,i,s);continue}if(oe(u)){t.push(u);continue}if(typeof u=="object"&&u!==null&&"type"in u&&"props"in u){let a=u;if(typeof a.type=="function"){let f=a.type(a.props||{});Array.isArray(f)?B(f,t,n,r,!1,i):B([f],t,n,r,!1,i);continue}}if(typeof u=="string"||typeof u=="number"){let a=String(u);if(a.trim()===""&&a!==" ")continue;t.push(J(a));continue}t.push(J(String(u)))}}}}function ic(e,t,n,r){for(let d=0;d<n.length;d++){let h=n[d].parentNode;h!==null&&h!==e&&h.nodeType!==11&&(n=n.slice(),n[d]=n[d].cloneNode(!0))}let o=n.length,i=t.length,s=o,c=0,u=0,a=i>0?t[i-1].nextSibling??void 0:r,f=null;for(;c<i||u<s;){if(t[c]===n[u]){c++,u++;continue}for(;i>c&&s>u&&t[i-1]===n[s-1];)i--,s--;if(i===c){let d=s<o?u?n[u-1].nextSibling??void 0:n[s-u]:a;for(;u<s;)O(e,n[u++],d)}else if(s===u)for(;c<i;)(!f||!f.has(t[c]))&&t[c].parentNode===e&&e.removeChild(t[c]),c++;else if(t[c]===n[s-1]&&n[u]===t[i-1]){let d=t[--i].nextSibling;O(e,n[u++],t[c++].nextSibling),O(e,n[--s],d),t[i]=t[c-1]}else{if(!f){f=new Map;let h=u;for(;h<s;)f.set(n[h],h++)}let d=f.get(t[c]);if(d!=null)if(u<d&&d<s){let h=c,y=1;for(;++h<i&&h<s&&!(!f.has(t[h])||f.get(t[h])!==d+y);)y++;if(y>d-u){let R=t[c];for(;u<d;)O(e,n[u++],R)}else t[c].parentNode===e?e.replaceChild(n[u++],t[c++]):(O(e,n[u++],a),c++)}else c++;else t[c].parentNode===e&&e.removeChild(t[c]),c++}}return n}function X(e,t,n){if(t)if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r].parentNode===e&&e.removeChild(t[r]);else t.parentNode===e&&e.removeChild(t);return null}function O(e,t,n){p.active&&t.parentNode===e||(n&&n.parentNode===e?e.insertBefore(t,n):e.appendChild(t))}function De(e,t,n){n==null?delete e[t]:e[t]=n}function un(e,t,n){let r=n,o;return Array.isArray(n)&&(r=n[0],o=n[1]),typeof r!="function"?()=>{}:(e.addEventListener(t,r,o),()=>e.removeEventListener(t,r,o))}function Ur(e,t){if(!t||typeof t!="function")return;let n=t[ct]?.name;if(!n)return;let r=n.indexOf(":");r!==-1&&j(e,n.slice(0,r),n.slice(r+1),t)}function at(e,t,n){let r=typeof n=="function"?E(()=>n()):n;if(!(!r||typeof r!="object"))for(let o of Object.keys(r))j(e,t,o)}function an(e,t){let n=(r,o)=>{typeof r=="function"&&(j(e,"use",r.name||"use",o),r(e,o??(()=>{})))};if(typeof t=="function"){n(t);return}if(Array.isArray(t)){if(typeof t[0]=="function"){n(t[0],t[1]);return}for(let r of t)Array.isArray(r)?n(r[0],r[1]):n(r)}}function ft(e,t,n,r=!1){return Ur(e,n),typeof n!="function"?(C(e,t,n,r),()=>{}):b(()=>{D(e,"attribute",t,n);let o=typeof n=="function"?n():n;C(e,t,o,r)})}function lt(e,t,n){return typeof n!="function"?(De(e,t,n),()=>{}):(Ur(e,n),b(()=>{D(e,"property",t,n);let r=typeof n=="function"?n():n;De(e,t,r)}))}function fn(e,t,n){return typeof n!="function"?(C(e,t,!!n),()=>{}):b(()=>{D(e,"attribute",t,n);let r=n();C(e,t,!!r)})}function je(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){b(()=>{D(e,"attribute","class",t),je(e,t())});return}if(typeof t=="string"){e.setAttribute("class",t);return}if(Array.isArray(t)){e.setAttribute("class",t.filter(Boolean).join(" "));return}if(typeof t=="object"){let n=Object.keys(t).filter(r=>{let o=t[r];return typeof o=="function"?o():!!o}).join(" ");e.setAttribute("class",n);return}e.setAttribute("class",String(t))}function Ie(e,t,n){if(!(!t||typeof t!="object"))for(let r in t){let o=t[r],i=r.split(/\s+/).filter(Boolean);if(typeof o=="function"&&n)n.push(b(()=>{let s=!!o();for(let c of i)e.classList.toggle(c,s)}));else{let s=!!(typeof o=="function"?o():o);for(let c of i)e.classList.toggle(c,s)}}}function $e(e,t){let n=t;for(;typeof n=="function";)n=n();if(n==null){e.removeAttribute("style");return}if(typeof n=="string"){e.style.cssText=n;return}if(typeof n=="object")for(let r in n){let o=n[r];o==null?e.style[r]="":e.style[r]=o}}function cc(e){let{element:t,props:n,prevProps:r=zi,isSVG:o=!1,skipChildren:i=!1}=e;if(!t||!ot(t))return console.error("[spread] Error: element is not a DOM Element!"),()=>{};if(!n)return console.warn("[spread] Warning: props is undefined!"),()=>{};let s=o||t.namespaceURI===fe,c=[];for(let u in n){if(i&&u==="children")continue;let a=n[u],f=r[u];if(a===f)continue;if(u==="ref"){qe(a,t);continue}if(u==="use"){an(t,a);continue}if(u.startsWith("on:")){c.push(un(t,u.slice(3),a));continue}if(u.startsWith("prop:")){j(t,"prop",u.slice(5),a),c.push(lt(t,u.slice(5),a));continue}if(u.startsWith("attr:")){j(t,"attr",u.slice(5),a),c.push(ft(t,u.slice(5),a,s));continue}if(u.startsWith("bool:")){j(t,"bool",u.slice(5),a),c.push(fn(t,u.slice(5),a));continue}if(u==="class"||u==="className"){typeof a=="function"?c.push(b(()=>{D(t,"attribute","class",a),je(t,a())})):je(t,a);continue}if(u==="classList"){at(t,"class",a),typeof a=="function"?c.push(b(()=>{D(t,"attribute","class",a),Ie(t,a())})):Ie(t,a,c);continue}if(u==="style"){at(t,"style",a),typeof a=="function"?c.push(b(()=>{D(t,"attribute","style",a),$e(t,a())})):$e(t,a);continue}if(u.startsWith("on")){let h=u.slice(2).toLowerCase();f&&on(t,h),a&&Lr(t,h,a);continue}let d=ze.has(u)||!s&&u in t;typeof a=="function"?c.push(d?lt(t,u,a):ft(t,u,a,s)):c.push(b(()=>d?De(t,u,n[u]):C(t,u,n[u],s)))}for(let u in r)if(!(u in n))if(u.startsWith("on")){let a=u.slice(2).toLowerCase();on(t,a)}else ze.has(u)?De(t,u,null):t.removeAttribute(u);return()=>{c.forEach(u=>u())}}function ln(e,t,n=!1){for(let r in t){let o=t[r];if(r==="ref"){qe(o,e);continue}if(r!=="children"){if(r==="use"){an(e,o);continue}if(r.startsWith("on:")){un(e,r.slice(3),o);continue}if(r.startsWith("prop:")){j(e,"prop",r.slice(5),o),lt(e,r.slice(5),o);continue}if(r.startsWith("attr:")){j(e,"attr",r.slice(5),o),ft(e,r.slice(5),o,n);continue}if(r.startsWith("bool:")){j(e,"bool",r.slice(5),o),fn(e,r.slice(5),o);continue}if(r.startsWith("on")&&r.length>2){let i=r.slice(2).toLowerCase();if(typeof o=="function")if(dt.has(i)){e[`$$${i}`]=o;let s=`__fx_${i}`;if(!e[s]){let c=u=>{e[`$$${i}`]?.(u)};e.addEventListener(i,c),e[s]=c}}else e[`$$${i}`]=o,ut.has(i)||sn([i]);continue}if(r==="class"||r==="className"){je(e,o);continue}if(r==="classList"){at(e,"class",o),typeof o=="function"?b(()=>{D(e,"attribute","class",o),Ie(e,o())}):Ie(e,o);continue}if(r==="style"){at(e,"style",o),typeof o=="function"?b(()=>{D(e,"attribute","style",o),$e(e,o())}):$e(e,o);continue}if(r==="innerHTML"){if(typeof o=="function"){let i=T(()=>{let s=o();for(;typeof s=="function";)s=s();e.innerHTML=s});x(()=>i())}else e.innerHTML=o;continue}if(r==="value"&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA")){if(typeof o=="function"){let i=T(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();document.activeElement!==e&&(e.value=s??"")});x(()=>{i()})}else b(()=>{document.activeElement!==e&&(e.value=t[r]??"")});continue}if(r==="checked"&&e.tagName==="INPUT"){if(typeof o=="function"){let i=T(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();document.activeElement!==e&&(e.checked=s??"")});x(()=>{i()})}else b(()=>{document.activeElement!==e&&(e.checked=t[r]??"")});continue}if(r==="value"&&e.tagName==="SELECT"){if(typeof o=="function"){let i=!0,s=T(()=>{let c=o();for(;typeof c=="function"&&c.length===0;)c=c();i?(i=!1,queueMicrotask(()=>{e.value=c??""})):e.value=c??""});x(()=>{s()})}else{let i=!0;b(()=>{let s=t[r];i?(i=!1,queueMicrotask(()=>{e.value=s??""})):e.value=s??""})}continue}if(typeof o=="function"){let i=T(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();Be(e,r,s,n)});x(()=>{i()})}else b(()=>Be(e,r,t[r],n))}}}function uc(...e){let t=r=>{for(let o=e.length-1;o>=0;o--){let i=e[o];if(i&&r in i&&i[r]!==void 0)return i[r]}},n=r=>{for(let o of e)if(o&&r in o)return!0;return!1};return new Proxy({},{get:(r,o)=>t(o),has:(r,o)=>n(o),ownKeys:()=>{let r=new Set;for(let o of e)if(o)for(let i of Reflect.ownKeys(o))r.add(i);return[...r]},getOwnPropertyDescriptor:(r,o)=>n(o)?{enumerable:!0,configurable:!0,get:()=>t(o)}:void 0})}function ac(e,...t){let n=new Set;for(let s of t)for(let c of s)n.add(c);let r=s=>({enumerable:!0,configurable:!0,get:()=>e[s]}),o=t.map(s=>{let c=new Set(s);return new Proxy({},{get:(u,a)=>c.has(a)?e[a]:void 0,has:(u,a)=>c.has(a)&&a in e,ownKeys:()=>Array.from(c).filter(u=>u in e),getOwnPropertyDescriptor:(u,a)=>c.has(a)&&a in e?r(a):void 0})}),i=new Proxy({},{get:(s,c)=>n.has(c)?void 0:e[c],has:(s,c)=>!n.has(c)&&c in e,ownKeys:()=>Reflect.ownKeys(e).filter(s=>!n.has(s)),getOwnPropertyDescriptor:(s,c)=>!n.has(c)&&c in e?r(c):void 0});return[...o,i]}function qe(e,t){if(!e)return;let n=e[ct]?.name;if(j(t,"ref",n||typeof e=="function"&&e.name||"ref",e),oe(e)){let r=t,o=e;if(!r)return;typeof r=="function"?r(o):typeof r=="object"&&"current"in r&&(r.current=o);return}typeof e=="function"?e(t):typeof e=="object"&&"current"in e&&(e.current=t)}function fc(e,t,n){let r=t||document.body,o=rt(()=>e),i=[];return S(()=>{let s=b(()=>{let c=o();Array.isArray(c)?(c.forEach(u=>r.appendChild(u)),i.push(()=>{c.forEach(u=>{u.parentNode===r&&r.removeChild(u)})})):oe(c)&&(r.appendChild(c),i.push(()=>{c.parentNode===r&&r.removeChild(c)}))});i.push(s),x(()=>{i.forEach(c=>c())})}),null}function lc(e){return typeof e=="string"&&e.toLowerCase()===e}function dn(e){return e==="svg"||e==="path"||e==="circle"||e==="rect"||e==="line"||e==="polygon"||e==="polyline"||e==="ellipse"||e==="g"||e==="defs"||e==="clipPath"||e==="text"}function dc(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function Pe(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function pc(e){return typeof e=="function"&&e.length===0&&N(e)}function pn(e,t,n){if(!t)throw new Error("Container element is required");let r,o,i=[];return M(s=>{S(()=>{p.active||(t.textContent=""),xr(t),Sr(),U(t,e)}),o=s}),()=>{o?.(),r?.(),i.forEach(s=>s()),t.textContent=""}}function hc(e){if(Array.isArray(e))return e;if(typeof e=="function"&&typeof e.set=="function")return[e,e.set];throw new TypeError("[fluixi] bind: needs a signal, either `signal(...)` or the `[get, set]` pair from `createSignal(...)`.")}var wn="1.0.0-alpha.86";var no=wn.split(".")[0],Wr=`__fluixi_signal_state_v${no}__`,yc=`__fluixi_signal_builds_v${no}__`,mc=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};function ro(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:mc,onSuspend:null,onError:null,observer:null}}var hn=globalThis;function gc(e){let t=ro(),n=e;for(let r of Object.keys(t))r in e||(n[r]=t[r]);return e}function bc(){let e=hn[Wr];return e?gc(e):hn[Wr]=ro()}var v=bc();(hn[yc]??=[]).push(wn);function vc(e){return v.observer=e,()=>{v.observer===e&&(v.observer=null)}}var se=[],pt;function wc(e,t){if(!v.observer)return t();let n=pt;pt=e;try{return t()}finally{pt=n}}function xc(e){let t=v.observer;t&&t.created(e.parents===void 0?{...e,parents:se,origin:e.origin??pt}:e)}function oo(e){let t=v.observer;!t?.props||!se.length||!e||t.props(se[se.length-1],e)}function Sc(e){v.observer?.contextCreated?.(e)}function Ec(e,t,n){let r=v.observer;!r?.context||!se.length||r.context(se[se.length-1],e,t,n)}function Kr(e,t,n){v.observer?.moved?.(e,t,n)}function Br(e){v.observer?.disposed?.(e)}var Tc="__FLUIXI_DEVTOOLS_HOOK__",zr=globalThis[Tc];if(typeof zr?.inject=="function")try{zr.inject({observeReactiveNodes:vc,version:wn})}catch{}function so(){return v.observer!=null}function Ac(e){if(v.untracked)return e();v.untracked=!0;try{return e()}finally{v.untracked=!1}}function Nc(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function io(e,t){let n=Symbol(t??"context");return Sc(n),{id:n,defaultValue:e,Provider:o=>{Ec(n,"provide",o.value);let i=v.owner,s=Nc(i);(s.contexts=new Map).set(n,o.value),i&&(i.owned??=[]).push(s),v.owner=s;try{return o.children}finally{v.owner=i}}}}function co(e,t){let n=e;for(;n;){if(n.contexts&&n.contexts.has(t.id))return n.contexts.get(t.id);n=n.parent}return t.defaultValue}function Rc(e){v.onSuspend=e}function _c(e){v.onError=e}function Oc(e){v.hostSchedule=e??(t=>{Promise.resolve().then(t)})}Oc(()=>{});function uo(e){return Ac(e)}var ia=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0;var Cc=Symbol.for("signal");function ao(e){return typeof e=="function"&&e[Cc]===!0}var kc=io();Rc((e,t)=>{let n=co(t,kc);n&&(n.increment(),e.finally(()=>n.decrement()))});var Pc=io();_c((e,t)=>{let n=co(t,Pc);return n?(n.setError(e),!0):!1});var mt=Symbol("store-raw"),Gr=Symbol("store-node"),Xr=Symbol("store-has"),Jr=Symbol("store-self"),Yr=Symbol("store-track");var Le=new WeakMap,yn=new WeakMap,ge=new WeakMap,gt=new WeakMap;function Mc(e,t){if(!me(e)||!so())return;let n=new Set,r=s=>{if(!(!me(s)||n.has(s))){n.add(s);for(let c of Object.values(s))r(c)}};r(gt.get(t)??t);let o=new Set,i=s=>{if(!me(s))return;let c=s;if(n.has(c)||o.has(c))return;o.add(c);let u=Le.get(c);if(u){for(let a of u.keys.values())Br(a);u.all&&Br(u.all),Le.delete(c),ge.delete(c),yn.delete(c)}for(let a of Object.values(c))i(a)};i(e)}var bt=(e,t,n)=>n?`${e}[${String(t)}]`:`${e}.${String(t)}`;function fo(e,t,n){let r=t?.owner,o=r&&n!==void 0?bt(r.name,n,t?.array):void 0,[i,s]=wc(r?.store,()=>g(e,o?{name:o}:void 0)),c=i;return c.$=s,c}function vt(e){let t=Le.get(e);return t?t.owner||(t.owner=ge.get(e)):Le.set(e,t={keys:new Map,owner:ge.get(e),array:Array.isArray(e)}),t}function Zr(e,t,n){let r=e.keys.get(t);return r||e.keys.set(t,r=fo(n,e,t)),r}function Dc(e,t,n,r){let o=ge.get(e);if(o&&o.store===t&&o.name===n)return;let i={store:t,name:n};ge.set(e,i),gt.set(e,gt.get(r)??r);let s=Le.get(e);if(s&&(s.owner=i,!!so())){for(let[c,u]of s.keys)Kr(u,t,bt(n,c,s.array));s.all&&Kr(s.all,t,bt(n,"*",s.array))}}function Qr(e){let t=vt(e);(t.all||(t.all=fo(void 0,t,"*")))()}function eo(e,t){e.$(typeof t=="function"?()=>t:t)}function me(e){if(e==null||typeof e!="object")return!1;if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function ht(e){if(!me(e))return e;let t=yn.get(e);if(t)return t;let n=new Proxy(e,jc);return yn.set(e,n),n}var jc={get(e,t,n){if(t===mt||t===Gr)return e;if(t===pe)return n;if(t===Xr)return u=>u in e;if(t==="__proxy")return!0;if(t===Yr||t===Jr)return Qr(e),n;let r=e[t];if(typeof r=="function"&&!Object.prototype.hasOwnProperty.call(e,t))return r;let o=Object.getOwnPropertyDescriptor(e,t);if(o&&o.get)return o.get.call(n);let i=vt(e),s=Zr(i,t,r),c=s();return me(c)?(i.owner&&Dc(c,s,bt(i.owner.name,t,i.array),e),ht(c)):c},set(){return!0},deleteProperty(e,t){return t in e&&q(e,t,void 0),!0},has(e,t){return t===mt||t===pe||t===Gr||t===Xr||t===Jr||t===Yr?!0:(Zr(vt(e),t,e[t])(),t in e)},ownKeys(e){return Qr(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function lo(e,t=new Set){if(e==null||typeof e!="object")return e;let n=e[mt]??e;if(t.has(n)||!me(n))return n;t.add(n);let r=!1,o=s=>{let c=lo(s,t);return c!==s&&(r=!0),c};if(Array.isArray(n)){let s=n.map(o);return r?s:n}let i={};for(let s of Object.keys(n))i[s]=o(n[s]);return r?i:n}function q(e,t,n){let r=lo(n),o=e[t];if(o===r&&(r!==void 0||t in e))return;let i=Array.isArray(e),s=i?e.length:0;r===void 0?delete e[t]:e[t]=r;let c=vt(e),u=c.keys.get(t);if(u&&eo(u,r),Mc(o,e),i&&e.length!==s){let a=c.keys.get("length");a&&eo(a,e.length)}c.all&&c.all.$(void 0)}function mn(e,t){return typeof e=="function"?e(t):e}function gn(e,t){for(let n of Object.keys(t)){let r=t[n],o=e[n];r&&typeof r=="object"&&!Array.isArray(r)&&o&&typeof o=="object"&&!Array.isArray(o)?gn(o,r):q(e,n,r)}}function xt(e){let t=[],n=e.replace(/\[([^\]]*)\]/g,".$1");for(let r of n.split("."))r.length&&t.push(r);return t}function po(e,t,n){let r=t.length-1;for(let i=0;i<r;i++){let s=t[i];if(s==="*"){let u=t.slice(i+1);if(Array.isArray(e))for(let a=0;a<e.length;a++)po(e[a],u,n);return}let c=e[s];(c==null||typeof c!="object")&&(c=/^\d+$/.test(t[i+1])?[]:{},q(e,s,c)),e=c}let o=t[r];if(o==="*"){if(Array.isArray(e))for(let i=0;i<e.length;i++)q(e,i,mn(n,e[i]));return}q(e,o,mn(n,e[o]))}function to(e,t,n){po(e,xt(t),n)}function Ic(e){return Array.isArray(e)&&e.length>0&&e.every(t=>Array.isArray(t)&&t.length>=2&&typeof t[0]=="string")}function yt(e,t){for(let n=e.length-1;n>=t.length;n--)q(e,String(n),void 0);e.length!==t.length&&q(e,"length",t.length);for(let n=0;n<t.length;n++)q(e,String(n),t[n])}function $c(e,t){let n=t[0];if(typeof n=="function"&&t.length===1){let r=n(e);r&&r!==e&&gn(e,r);return}if(Array.isArray(n)&&t.length===1){if(Ic(n)){for(let r of n)to(e,r[0],r[1]);return}if(Array.isArray(e)){yt(e,n);return}if(n.length===0)return;throw new TypeError("[fluixi] set() was given an array that is neither a batch of [path, value] pairs nor a replacement for an array root. Name the path you meant, as in set('items', [...]).")}if(n&&typeof n=="object"&&!Array.isArray(n)&&t.length===1){gn(e,n);return}if(t.length>=3){bn(e,t.slice(0,-1),t[t.length-1]);return}to(e,String(n),t[1])}function qc(e,t){if(typeof t=="function"){if(!Array.isArray(e))return[];let n=[];for(let r=0;r<e.length;r++)t(e[r],r)&&n.push(r);return n}if(Array.isArray(t))return Array.isArray(e)?t.map(Number):t.map(String);if(t&&typeof t=="object"&&("from"in t||"to"in t||"by"in t)){if(!Array.isArray(e))return[];let n=t.by??1,r=t.from??0,o=t.to??e.length-1,i=[];for(let s=r;s<=o;s+=n)s>=0&&s<e.length&&i.push(s);return i}return t==="*"?Array.isArray(e)?e.map((n,r)=>r):Object.keys(e??{}):[t]}function bn(e,t,n){if(e==null)return;let[r,...o]=t;if(typeof r=="string"){let s=xt(r);if(s.length>1){bn(e,[...s,...o],n);return}}let i=qc(e,r);if(o.length===0){for(let s of i)q(e,s,mn(n,e[s]));return}for(let s of i){let c=e[s];if(c==null||typeof c!="object"){let u=o[0];c=typeof u=="number"||/^\d+$/.test(String(u))?[]:{},q(e,s,c)}bn(c,o,n)}}function vn(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(vn);let t={};for(let n of Object.keys(e))t[n]=vn(e[n]);return t}function Y(e,t){let n=e;for(let r of xt(t)){if(n==null)return;n=n[r]}return n}var ho=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...n)=>S(()=>$c(this.root,n))),e&&typeof e=="object"&&(ge.set(e,{store:this,name:t.name??"store"}),gt.set(e,e)),xc({kind:"store",node:this,handle:()=>this.root,name:t.name})}get state(){return ht(this.root)}get proxy(){return ht(this.root)}get accessor(){return(()=>ht(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return wt(this.state);let t=this.state;for(let n of xt(e)){if(t==null)return;t=t[n]}return wt(t)}select(e){return m(()=>e(this.state))}subscribe(e){return T(()=>e(this.state))}watch(e,t){let n;return T(()=>{let r=e(this.state);Object.is(r,n)||(t(r,n),n=r)})}reactive(e){return m(()=>this.state[e])}produce(e){this.set((t=>{let n=vn(t);return e(n),n}))}reconcile(e,t={}){this.set(e)}push(e,...t){let n=Y(this.root,e);this.set(e,n.concat(t))}pop(e){let t=Y(this.root,e).slice(),n=t.pop();return this.set(e,t),n}shift(e){let t=Y(this.root,e).slice(),n=t.shift();return this.set(e,t),n}splice(e,t,n,...r){let o=Y(this.root,e).slice(),i=o.splice(t,n,...r);return this.set(e,o),i}insert(e,t,n){let r=Y(this.root,e).slice();r.splice(t,0,n),this.set(e,r)}removeAt(e,t){let n=Y(this.root,e).slice(),r=n.splice(t,1);return this.set(e,n),r}replace(e,t){if(arguments.length>=2){let r=Y(this.root,String(e)),o=t;if(Array.isArray(r)&&Array.isArray(o)){yt(r,o);return}this.set(e,o);return}let n=this.root;if(Array.isArray(n)&&Array.isArray(e)){yt(n,e);return}this.set(e)}clear(e){let t=e===void 0?this.root:Y(this.root,e);if(Array.isArray(t)){yt(t,[]);return}if(t&&typeof t=="object")for(let n of Object.keys(t))q(t,n,void 0)}toObservable(){let[e]=g(this.state);return e.toObservable()}dispose(){}},Lc=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","replace","clear","unwrap","toObservable"];function Vc(e,t){for(let n of Lc)e[n]=t[n].bind(t);e.$=t.reactive.bind(t)}function Hc(e,t={immutable:!0}){let n=new ho(e,t);return Vc(n.set,n),[n.proxy,n.set]}function Fc(e,t={}){return new ho(e,{...t,immutable:!1})}function wt(e){if(e==null||typeof e!="object")return e;let t=e[mt];return t!==void 0?t:e}function Uc(e){return E(()=>wt(e))}var ua=Object.freeze({createStore:Hc,createMutableStore:Fc,batch:S,unwrap:wt,untrackStore:Uc});var Wc="__fx_dom_create_component__",ie=globalThis[Wc]??={fn:null};function Kc(e){ie.fn=e}function Bc(e={}){let t=e.signalSystem?.createComponent;t&&(ie.fn=t)}function xn(e,t){if(ie.fn)return ie.fn(e,t);t&&oo(t);let n=typeof e=="function"?uo(()=>e(t)):e,r=n!=null&&(typeof n=="function"||typeof n=="object");if(r)try{n.$name=e?.name}catch{}return r&&!ao(n)?tn(n):n}var zc=()=>ie.fn!==null,Gc=()=>ie.fn!==null;function Xc(){ie.fn=null}var St,mo={getStore:()=>St,run(e,t){let n=St;St=e;try{return t()}finally{St=n}}},Sn=mo;function En(e){Sn=e??mo}function be(e={}){e.locals||(e.locals=e.request?Tt(e.request):{});let t=0,n=0,r=null,o=new Map,i=new Map;return{event:e,routeData:new Map,matchedRoute:new Map,nextId:()=>`s${t++}`,nextResourceId:()=>{if(r===null)return`r${n++}`;let s=o.get(r)??0;return o.set(r,s+1),`${r}:r${s}`},nextIslandNamespace:s=>{let c=i.get(s)??0;return i.set(s,c+1),`${s}#${c}`},withResourceScope(s,c){let u=r;r=s;try{return c()}finally{r=u}},pending:new Set,data:new Map}}function ve(e,t){return Sn.run(e,t)}function W(){return Sn.getStore()}function Et(){return W()?.event}function Tn(){let e=Et();return e?(e.locals||(e.locals={}),e.locals):{}}var yo=new WeakMap;function Tt(e){let t=yo.get(e);return t||(t={},yo.set(e,t)),t}var we="__FX_DATA__";function Ve(e){return e.replace(/[<>&\u2028\u2029]/g,t=>"\\u"+t.charCodeAt(0).toString(16).padStart(4,"0"))}var An;function He(){let e=globalThis.__FX_DATA__;if(e)return e;if(An!==void 0)return An;let t=null;if(typeof document<"u"){let n=document.getElementById(we)?.textContent;if(n)try{t=JSON.parse(n)}catch{t=null}}return An=t}function At(){for(;;){for(;p.cursor&&p.cursor.nodeType===3&&p.cursor.data==="";)p.cursor=p.cursor.nextSibling;if(p.cursor!=null||!p.parents.length)return;p.cursor=p.parents.pop().nextSibling}}var Jc=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Nt=typeof process<"u"&&process.env&&!1;function Rt(e,t){let n=t.nodeType===1?`<${t.tagName.toLowerCase()}>`:t.nodeType===3?`text ${JSON.stringify((t.nodeValue??"").slice(0,24))}`:t.nodeType===8?"comment":"node";console.warn(`[fluixi] hydration mismatch: expected ${e} but the server DOM has ${n}. Server and client rendered different markup; recreating this node on the client. Check for non-deterministic render (Date.now(), Math.random(), browser-only branches, untransported data).`)}function Yc(e){At();let t=p.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(Jc.has(e.toLowerCase())?p.cursor=t.nextSibling:(p.parents.push(t),p.cursor=t.firstChild),t):(Nt&&t&&Rt(`<${e}>`,t),null)}function Zc(e){At();let t=p.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(p.cursor=t.nextSibling,t):(Nt&&t&&Rt(`<${e}> (static)`,t),null)}function Qc(e){if(e===""){let n=p.cursor;return n&&n.nodeType===3&&n.data!==""?(p.cursor=n.nextSibling,n.data="",n):null}At();let t=p.cursor;return t&&t.nodeType===3?(p.cursor=t.nextSibling,t.nodeValue!==e&&(t.nodeValue=e),t):(Nt&&t&&Rt(`text ${JSON.stringify(e.slice(0,24))}`,t),null)}function eu(e){At();let t=p.cursor;return t&&t.nodeType===8&&t.data===e?(p.cursor=t.nextSibling,t):(Nt&&t&&Rt(`marker <!--${e.slice(0,24)}-->`,t),null)}var go=!1;function tu(){go||(go=!0,Pr({hydrateElement:Yc,hydrateText:Qc,hydrateMarker:eu,hydrateStatic:Zc}))}function _t(e,t,n){tu(),p.active=!0,p.cursor=t.firstChild,p.parents=[];let r=He(),o=n?.resourceNamespace,i=0;nt(()=>o?`${o}:r${i++}`:`r${i++}`),pr(r?s=>s in r?{value:r[s]}:void 0:null);try{return pn(e,t)}finally{p.active=!1,p.cursor=null,p.parents=[]}}var Nn="fluixi-island";function vo(e){let{component:t,props:n={},name:r}=e,o=cn(Nn),i=r??t.name??"Island";C(o,"name",i),C(o,"props",JSON.stringify(n??{}));let s=A()?W():void 0;if(s){let c=s.nextIslandNamespace(i);U(o,()=>s.withResourceScope(c,()=>t(n)))}else U(o,()=>t(n));return o}var bo=!1;function nu(){if(bo||typeof document>"u")return;bo=!0;let e=document.createElement("style");e.textContent=`${Nn}{display:contents}`,document.head.appendChild(e)}function wo(e){if(typeof document>"u")return;nu();let t=document.querySelectorAll(Nn),n=new Map;t.forEach(r=>{let o=r.getAttribute("name")??"",i=n.get(o)??0;n.set(o,i+1);let s=e[o];if(!s){typeof process>"u"&&console.warn(`[fluixi] island "${o}" has no component in the registry, left static.`);return}let c={};try{c=JSON.parse(r.getAttribute("props")||"{}")}catch{}_t(()=>s(c),r,{resourceNamespace:`${o}#${i}`})})}function xo(e,...t){throw new Error("html`` was not compiled, enable the lit format: fluixi({ format: 'lit' }).")}function So(e,...t){throw new Error("svg`` was not compiled, enable the lit format: fluixi({ format: 'lit' }).")}function ru(e,t={}){if(typeof e=="function")return xn(e,t);if(typeof e!="string"||e.length===0)return null;let n=dn(e);if(A())return he().createElement(e,n);let r=n?document.createElementNS(fe,e):document.createElement(e);return ln(r,t,n),ou(r,t),r}function ou(e,t){if(!t||t.children===void 0)return;let n=rt(()=>t.children),r=o=>{U(e,o,typeof o=="function"?null:void 0)};Array.isArray(n)?n.forEach(r):r(n)}function Eo(e){return typeof e=="function"?e:(()=>e)}function Z(e){return()=>{let t=e();return typeof t=="function"?t():t}}function To(e){return e!=null&&e!==!1}function Ao(e){return!e||typeof e!="object"?!1:!!(typeof e._$litType$<"u"||typeof e._$litDirective$<"u"||Array.isArray(e.strings)&&Array.isArray(e.values))}function No(e){let t=Z(()=>e.when),n=m(t,void 0,{name:"Show.when"}),r=m(n,void 0,{name:"Show.cond"}),o=K(),i=null,s=null,c=u=>{u!==s&&(i&&de(i),i=le(o),s=u)};return m(()=>{let u=r();return c(u?"when":"fallback"),P(i,()=>{if(u){let a=e.children;return typeof a=="function"&&!Ao(a)?typeof n=="function"?E(()=>E(n)?a(n()):e.fallback):a(n):a}return e.fallback});return e.fallback??null},void 0,{name:"Show.result"})}function Ro(e){let t=Z(()=>e.each),n=()=>e.fallback??null,r=(o,i)=>{let s=e.children,c=Array.isArray(s)?s.map(u=>typeof u=="function"?u(o,i):u):typeof s=="function"?s(o,i):s;return ye(c),c};return e.by?et(t,e.by,(o,i)=>r(o,i),{fallback:n}):Qe(t,(o,i)=>r(o,i),{fallback:n})}function _o(e){let t=Z(()=>e.each);return tt(t,(n,r)=>{let o=e.children(n,r);return ye(o),o},{fallback:()=>e.fallback??null})}var Rn=Symbol("match");function Oo(e){return{[Rn]:!0,when:Z(()=>e.when),get children(){return e.children}}}function Co(e){let t=Array.isArray(e.children)?e.children:[e.children],n=K(),r=null,o=-1,i=s=>{s!==o&&(r&&de(r),r=le(n),o=s)};return m(()=>{for(let s=0;s<t.length;s+=1){let u=t[s],a=0;for(;typeof u=="function"&&!u[Rn]&&a++<10;)u=u();if(!u||typeof u!="object"||u[Rn]!==!0)continue;let f=u.when();if(To(f))return i(s),P(r,()=>typeof u.children=="function"?u.children(f):u.children)}return i(-2),P(r,()=>e.fallback??null)},void 0,{name:"Switch"})}function ko(e){let t=Eo(e.component),{component:n,...r}=e,o=K(),i=null,s;return m(()=>{let c=t();return c!==s&&(i&&de(i),i=le(o),s=c),c==null?null:typeof c=="string"?{tag:c,props:r}:P(i,()=>c(r))},void 0,{name:"Dynamic"})}function Po(e){let t=()=>e.mount?typeof e.mount=="function"?e.mount():e.mount:document.body,n,r;return M(o=>{n=o,r=document.createElement("div"),r.style.display="contents",t().appendChild(r),U(r,e.children)&&qe(e.ref,r)}),x(()=>{n(),r.remove()}),null}function _n(e){if(A())return e.fallback??null;let t=p.active,[n,r]=g(!t);return t&&queueMicrotask(()=>r(!0)),m(()=>n()?e.children:e.fallback??null,void 0,{name:"client-only"})}var Mo=_n;function Do(e){let[t,n]=g(null),r=()=>n(null);return m(()=>{let o=t();if(o!==null)return typeof e.fallback=="function"?e.fallback(o,r):e.fallback;try{return typeof e.children=="function"?e.children():e.children}catch(i){return n(i),typeof e.fallback=="function"?e.fallback(i,r):e.fallback}},void 0,{name:"ErrorBoundary"})}function jo(e){return m(()=>{let t=typeof e=="function"?e():e,n=[];for(let[r,o]of Object.entries(t)){if(!r)continue;(typeof o=="function"?o():o)&&n.push(r)}return n.join(" ")},void 0,{name:"ClassMap"})}function su(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Io(e){return m(()=>{let t=typeof e=="function"?e():e,n=[];for(let[r,o]of Object.entries(t)){if(!r)continue;let i=typeof o=="function"?o():o;i!=null&&n.push(`${su(r)}: ${i}`)}return n.join("; ")},void 0,{name:"StyleMap"})}var Ct=1,kn=3,Pn=8,$o;$o=Ce;var xe=class{constructor(){this[$o]=!0;this.parentNode=null;this.childNodes=[]}get firstChild(){return this.childNodes[0]??null}get lastChild(){return this.childNodes[this.childNodes.length-1]??null}get nextSibling(){let t=this.parentNode;if(!t)return null;let n=t.childNodes.indexOf(this);return n>=0?t.childNodes[n+1]??null:null}get previousSibling(){let t=this.parentNode;if(!t)return null;let n=t.childNodes.indexOf(this);return n>0?t.childNodes[n-1]??null:null}get parentElement(){return this.parentNode}appendChild(t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=this,this.childNodes.push(t),t}insertBefore(t,n){if(n==null)return this.appendChild(t);t.parentNode&&t.parentNode.removeChild(t);let r=this.childNodes.indexOf(n);return t.parentNode=this,r<0?this.childNodes.push(t):this.childNodes.splice(r,0,t),t}removeChild(t){let n=this.childNodes.indexOf(t);return n>=0&&this.childNodes.splice(n,1),t.parentNode=null,t}replaceChild(t,n){let r=this.childNodes.indexOf(n);return r>=0&&(t.parentNode&&t.parentNode.removeChild(t),t.parentNode=this,this.childNodes[r]=t,n.parentNode=null),n}addEventListener(){}removeEventListener(){}},ce=class e extends xe{constructor(n){super();this.nodeType=kn;this.data=n}get nodeValue(){return this.data}set nodeValue(n){this.data=n==null?"":String(n)}get textContent(){return this.data}set textContent(n){this.data=n==null?"":String(n)}cloneNode(){return new e(this.data)}},Ot=class e extends xe{constructor(n){super();this.nodeType=Ct;this.rawOuterHTML=n}get textContent(){return this.rawOuterHTML.replace(/<[^>]*>/g,"")}cloneNode(){return new e(this.rawOuterHTML)}},Se=class e extends xe{constructor(n){super();this.nodeType=Pn;this.data=n}get nodeValue(){return this.data}set nodeValue(n){this.data=n==null?"":String(n)}cloneNode(){return new e(this.data)}},On=class{constructor(){this.cssText=""}setProperty(t,n){this[t]=n}removeProperty(t){delete this[t]}},Cn=class{constructor(t){this.el=t}list(){let t=this.el.getAttribute("class");return t?t.split(/\s+/).filter(Boolean):[]}write(t){t.length?this.el.setAttribute("class",t.join(" ")):this.el.removeAttribute("class")}add(...t){let n=this.list();for(let r of t)n.includes(r)||n.push(r);this.write(n)}remove(...t){this.write(this.list().filter(n=>!t.includes(n)))}contains(t){return this.list().includes(t)}toggle(t,n){let r=this.contains(t),o=n===void 0?!r:n;return o?this.add(t):this.remove(t),o}},ue=class e extends xe{constructor(n,r=!1){super();this.nodeType=Ct;this.attributes=new Map;this.style=new On;this.classList=new Cn(this);this.rawHTML=null;this.localName=n.toLowerCase(),this.tagName=r?n:n.toUpperCase(),this.isSVG=r,this.namespaceURI=r?"http://www.w3.org/2000/svg":null}setAttribute(n,r){this.attributes.set(n,String(r))}removeAttribute(n){this.attributes.delete(n)}getAttribute(n){return this.attributes.has(n)?this.attributes.get(n):null}hasAttribute(n){return this.attributes.has(n)}get id(){return this.getAttribute("id")??""}set id(n){n==null?this.removeAttribute("id"):this.setAttribute("id",n)}get className(){return this.getAttribute("class")??""}set className(n){n==null?this.removeAttribute("class"):this.setAttribute("class",n)}get htmlFor(){return this.getAttribute("for")??""}set htmlFor(n){n==null?this.removeAttribute("for"):this.setAttribute("for",n)}set value(n){n==null?this.removeAttribute("value"):this.setAttribute("value",String(n))}set checked(n){n?this.setAttribute("checked",""):this.removeAttribute("checked")}set selected(n){n?this.setAttribute("selected",""):this.removeAttribute("selected")}set indeterminate(n){}get textContent(){return this.childNodes.map(n=>n.textContent??"").join("")}set textContent(n){for(let r of this.childNodes)r.parentNode=null;this.childNodes=[],this.rawHTML=null,n!=null&&n!==""&&this.appendChild(new ce(String(n)))}set innerText(n){this.textContent=n}set innerHTML(n){for(let r of this.childNodes)r.parentNode=null;this.childNodes=[],this.rawHTML=n==null?"":String(n)}cloneNode(n=!1){let r=new e(this.localName,this.isSVG);if(r.attributes=new Map(this.attributes),r.style.cssText=this.style.cssText,r.rawHTML=this.rawHTML,n)for(let o of this.childNodes)r.appendChild(o.cloneNode(!0));return r}};var iu=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Lo=/&/g,Vo=/</g,Ho=/>/g,cu=/"/g;function Mn(e){return e.replace(Lo,"&amp;").replace(Vo,"&lt;").replace(Ho,"&gt;")}function qo(e){return e.replace(Lo,"&amp;").replace(cu,"&quot;").replace(Vo,"&lt;").replace(Ho,"&gt;")}function uu(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}function au(e){if(!e)return"";let t=[];e.cssText&&t.push(e.cssText.trim().replace(/;\s*$/,""));for(let n of Object.keys(e)){if(n==="cssText")continue;let r=e[n];r==null||r===""||t.push(`${uu(n)}: ${r}`)}return t.join("; ")}function fu(e){let t="",n=au(e.style);for(let[r,o]of e.attributes)r==="style"&&n||(t+=` ${r}="${qo(o)}"`);if(n){let r=e.attributes.get("style"),o=r?`${r.replace(/;\s*$/,"")}; ${n}`:n;t+=` style="${qo(o)}"`}return t}function L(e){if(e==null||e===!1||e===!0)return"";if(typeof e=="string")return Mn(e);if(typeof e=="number")return Mn(String(e));if(typeof e=="function")return L(e());if(Array.isArray(e))return e.map(L).join("");if(typeof e.rawOuterHTML=="string")return e.rawOuterHTML;switch(e.nodeType){case kn:return Mn(e.data??"");case Pn:return`<!--${e.data??""}-->`;case Ct:{let t=e.localName,n=`<${t}${fu(e)}>`;if(iu.has(t))return n;let r=e.rawHTML!=null?e.rawHTML:(e.childNodes??[]).map(L).join("");return`${n}${r}</${t}>`}}return Array.isArray(e.childNodes)?e.childNodes.map(L).join(""):""}var lu=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),du={amp:"&",lt:"<",gt:">",quot:'"',"#39":"'"};function Fo(e){return e.replace(/&(#?\w+);/g,(t,n)=>du[n]??t)}var V=class extends Error{};function Uo(e,t=!1){let n=0,r=[],o=[],i=a=>{let f=o[o.length-1];f?f.appendChild(a):r.push(a)};for(;n<e.length;){let a=e.indexOf("<",n);if(a===-1){c(e.slice(n));break}if(a>n&&c(e.slice(n,a)),e.startsWith("<!--",a)){let f=e.indexOf("-->",a);if(f===-1)throw new V(`unterminated comment at ${a}`);i(new Se(e.slice(a+4,f))),n=f+3;continue}if(e[a+1]==="/"){let f=e.indexOf(">",a);if(f===-1)throw new V(`unterminated closing tag at ${a}`);let d=e.slice(a+2,f).trim().toLowerCase(),h=o.pop();if(!h||h.localName!==d)throw new V(`</${d}> does not close <${h?.localName??"nothing"}>`);n=f+1;continue}n=u(a)}if(o.length>0)throw new V(`unclosed <${o[o.length-1].localName}>`);let s=r[0];if(r.length!==1||!(s instanceof ue))throw new V(`expected exactly one root element, got ${r.length}`);return s;function c(a){a!==""&&i(new ce(Fo(a)))}function u(a){let f=/[\s/>]/.exec(e.slice(a+1));if(!f)throw new V(`unterminated tag at ${a}`);let d=e.slice(a+1,a+1+f.index).toLowerCase(),h=new ue(d,t),y=a+1+f.index;for(;y<e.length;){for(;y<e.length&&/\s/.test(e[y]);)y++;if(e[y]===">"){y++;break}if(e[y]==="/"&&e[y+1]===">"){y+=2;break}let R=y;for(;y<e.length&&!/[\s=/>]/.test(e[y]);)y++;let w=e.slice(R,y);if(w==="")throw new V(`malformed attribute at ${y}`);if(e[y]==="="){if(e[y+1]!=='"')throw new V(`attribute ${w} must have a double-quoted value`);let F=e.indexOf('"',y+2);if(F===-1)throw new V(`unterminated value for ${w}`);h.setAttribute(w,Fo(e.slice(y+2,F))),y=F+1}else h.setAttribute(w,"")}return i(h),lu.has(d)||o.push(h),y}}var Wo=!1;function Bo(){Wo||(Wo=!0,Cr({createElement:(e,t)=>new ue(e,t),createText:e=>new ce(e),createRaw:e=>new Ot(e),parseTemplate:(e,t)=>Uo(e,t),createComment:e=>new Se(e)}))}function jn(e,t={}){let n=A();Bo(),re(!0);let r=be(t.event);try{return ve(r,()=>M(o=>{try{let i=typeof e=="function"?e():e;return L(i)}finally{o()}}))}finally{re(n)}}var Ko=!1;function pu(){Ko||(Ko=!0,dr(e=>{W()?.pending.add(e)}),nt(()=>W()?.nextResourceId()??""),hr((e,t)=>{e&&W()?.data.set(e,t)}))}var Dn=null;function In(e){Dn=e}function kt(e){if(e.data.size===0)return"";let t={};for(let[r,o]of e.data){let i=o;if(Dn)try{i=Dn(o,r)}catch{continue}i!==void 0&&(typeof i=="function"||typeof i=="symbol"||(t[r]=i))}if(Object.keys(t).length===0)return"";let n=Ve(JSON.stringify(t));return n==="{}"?"":`<script type="application/json" id="${we}">${n}<\/script>`}var hu=50;async function $n(e,t={}){let n=A();Bo(),re(!0),pu();let r=be(t.event);try{return await ve(r,async()=>{t.preload&&await t.preload(t.event);let o,i=null,s=()=>{};M(f=>{s=f,i=K(),o=typeof e=="function"?e():e});let c=()=>{try{P(i,()=>L(o))}catch{}};c();let u=0;for(;r.pending.size>0&&u++<hu;){let f=Array.from(r.pending);r.pending.clear(),await Promise.allSettled(f),await lr(),c()}let a=P(i,()=>L(o))+kt(r);return s(),a})}finally{re(n)}}var Wn="1.0.0-alpha.86",ss=Wn.split(".")[0],zo=`__fluixi_signal_state_v${ss}__`,yu=`__fluixi_signal_builds_v${ss}__`,mu=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};function is(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:mu,onSuspend:null,onError:null,observer:null}}var qn=globalThis;function gu(e){let t=is(),n=e;for(let r of Object.keys(t))r in e||(n[r]=t[r]);return e}function bu(){let e=qn[zo];return e?gu(e):qn[zo]=is()}var ee=bu();(qn[yu]??=[]).push(Wn);function vu(e){return ee.observer=e,()=>{ee.observer===e&&(ee.observer=null)}}var wu=[],Pt;function xu(e,t){if(!ee.observer)return t();let n=Pt;Pt=e;try{return t()}finally{Pt=n}}function Su(e){let t=ee.observer;t&&t.created(e.parents===void 0?{...e,parents:wu,origin:e.origin??Pt}:e)}function Go(e,t,n){ee.observer?.moved?.(e,t,n)}function Xo(e){ee.observer?.disposed?.(e)}var Eu="__FLUIXI_DEVTOOLS_HOOK__",Jo=globalThis[Eu];if(typeof Jo?.inject=="function")try{Jo.inject({observeReactiveNodes:vu,version:Wn})}catch{}function cs(){return ee.observer!=null}var jt=Symbol("store-raw"),Yo=Symbol("store-node"),Zo=Symbol("store-has"),Qo=Symbol("store-self"),es=Symbol("store-track");var Fe=new WeakMap,Ln=new WeakMap,Te=new WeakMap,It=new WeakMap;function Tu(e,t){if(!Ee(e)||!cs())return;let n=new Set,r=s=>{if(!(!Ee(s)||n.has(s))){n.add(s);for(let c of Object.values(s))r(c)}};r(It.get(t)??t);let o=new Set,i=s=>{if(!Ee(s))return;let c=s;if(n.has(c)||o.has(c))return;o.add(c);let u=Fe.get(c);if(u){for(let a of u.keys.values())Xo(a);u.all&&Xo(u.all),Fe.delete(c),Te.delete(c),Ln.delete(c)}for(let a of Object.values(c))i(a)};i(e)}var $t=(e,t,n)=>n?`${e}[${String(t)}]`:`${e}.${String(t)}`;function us(e,t,n){let r=t?.owner,o=r&&n!==void 0?$t(r.name,n,t?.array):void 0,[i,s]=xu(r?.store,()=>g(e,o?{name:o}:void 0)),c=i;return c.$=s,c}function qt(e){let t=Fe.get(e);return t?t.owner||(t.owner=Te.get(e)):Fe.set(e,t={keys:new Map,owner:Te.get(e),array:Array.isArray(e)}),t}function ts(e,t,n){let r=e.keys.get(t);return r||e.keys.set(t,r=us(n,e,t)),r}function Au(e,t,n,r){let o=Te.get(e);if(o&&o.store===t&&o.name===n)return;let i={store:t,name:n};Te.set(e,i),It.set(e,It.get(r)??r);let s=Fe.get(e);if(s&&(s.owner=i,!!cs())){for(let[c,u]of s.keys)Go(u,t,$t(n,c,s.array));s.all&&Go(s.all,t,$t(n,"*",s.array))}}function ns(e){let t=qt(e);(t.all||(t.all=us(void 0,t,"*")))()}function rs(e,t){e.$(typeof t=="function"?()=>t:t)}function Ee(e){if(e==null||typeof e!="object")return!1;if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Mt(e){if(!Ee(e))return e;let t=Ln.get(e);if(t)return t;let n=new Proxy(e,Nu);return Ln.set(e,n),n}var Nu={get(e,t,n){if(t===jt||t===Yo)return e;if(t===pe)return n;if(t===Zo)return u=>u in e;if(t==="__proxy")return!0;if(t===es||t===Qo)return ns(e),n;let r=e[t];if(typeof r=="function"&&!Object.prototype.hasOwnProperty.call(e,t))return r;let o=Object.getOwnPropertyDescriptor(e,t);if(o&&o.get)return o.get.call(n);let i=qt(e),s=ts(i,t,r),c=s();return Ee(c)?(i.owner&&Au(c,s,$t(i.owner.name,t,i.array),e),Mt(c)):c},set(){return!0},deleteProperty(e,t){return t in e&&H(e,t,void 0),!0},has(e,t){return t===jt||t===pe||t===Yo||t===Zo||t===Qo||t===es?!0:(ts(qt(e),t,e[t])(),t in e)},ownKeys(e){return ns(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function as(e,t=new Set){if(e==null||typeof e!="object")return e;let n=e[jt]??e;if(t.has(n)||!Ee(n))return n;t.add(n);let r=!1,o=s=>{let c=as(s,t);return c!==s&&(r=!0),c};if(Array.isArray(n)){let s=n.map(o);return r?s:n}let i={};for(let s of Object.keys(n))i[s]=o(n[s]);return r?i:n}function H(e,t,n){let r=as(n),o=e[t];if(o===r&&(r!==void 0||t in e))return;let i=Array.isArray(e),s=i?e.length:0;r===void 0?delete e[t]:e[t]=r;let c=qt(e),u=c.keys.get(t);if(u&&rs(u,r),Tu(o,e),i&&e.length!==s){let a=c.keys.get("length");a&&rs(a,e.length)}c.all&&c.all.$(void 0)}function Vn(e,t){return typeof e=="function"?e(t):e}function Hn(e,t){for(let n of Object.keys(t)){let r=t[n],o=e[n];r&&typeof r=="object"&&!Array.isArray(r)&&o&&typeof o=="object"&&!Array.isArray(o)?Hn(o,r):H(e,n,r)}}function Vt(e){let t=[],n=e.replace(/\[([^\]]*)\]/g,".$1");for(let r of n.split("."))r.length&&t.push(r);return t}function fs(e,t,n){let r=t.length-1;for(let i=0;i<r;i++){let s=t[i];if(s==="*"){let u=t.slice(i+1);if(Array.isArray(e))for(let a=0;a<e.length;a++)fs(e[a],u,n);return}let c=e[s];(c==null||typeof c!="object")&&(c=/^\d+$/.test(t[i+1])?[]:{},H(e,s,c)),e=c}let o=t[r];if(o==="*"){if(Array.isArray(e))for(let i=0;i<e.length;i++)H(e,i,Vn(n,e[i]));return}H(e,o,Vn(n,e[o]))}function os(e,t,n){fs(e,Vt(t),n)}function Ru(e){return Array.isArray(e)&&e.length>0&&e.every(t=>Array.isArray(t)&&t.length>=2&&typeof t[0]=="string")}function Dt(e,t){for(let n=e.length-1;n>=t.length;n--)H(e,String(n),void 0);e.length!==t.length&&H(e,"length",t.length);for(let n=0;n<t.length;n++)H(e,String(n),t[n])}function _u(e,t){let n=t[0];if(typeof n=="function"&&t.length===1){let r=n(e);r&&r!==e&&Hn(e,r);return}if(Array.isArray(n)&&t.length===1){if(Ru(n)){for(let r of n)os(e,r[0],r[1]);return}if(Array.isArray(e)){Dt(e,n);return}if(n.length===0)return;throw new TypeError("[fluixi] set() was given an array that is neither a batch of [path, value] pairs nor a replacement for an array root. Name the path you meant, as in set('items', [...]).")}if(n&&typeof n=="object"&&!Array.isArray(n)&&t.length===1){Hn(e,n);return}if(t.length>=3){Fn(e,t.slice(0,-1),t[t.length-1]);return}os(e,String(n),t[1])}function Ou(e,t){if(typeof t=="function"){if(!Array.isArray(e))return[];let n=[];for(let r=0;r<e.length;r++)t(e[r],r)&&n.push(r);return n}if(Array.isArray(t))return Array.isArray(e)?t.map(Number):t.map(String);if(t&&typeof t=="object"&&("from"in t||"to"in t||"by"in t)){if(!Array.isArray(e))return[];let n=t.by??1,r=t.from??0,o=t.to??e.length-1,i=[];for(let s=r;s<=o;s+=n)s>=0&&s<e.length&&i.push(s);return i}return t==="*"?Array.isArray(e)?e.map((n,r)=>r):Object.keys(e??{}):[t]}function Fn(e,t,n){if(e==null)return;let[r,...o]=t;if(typeof r=="string"){let s=Vt(r);if(s.length>1){Fn(e,[...s,...o],n);return}}let i=Ou(e,r);if(o.length===0){for(let s of i)H(e,s,Vn(n,e[s]));return}for(let s of i){let c=e[s];if(c==null||typeof c!="object"){let u=o[0];c=typeof u=="number"||/^\d+$/.test(String(u))?[]:{},H(e,s,c)}Fn(c,o,n)}}function Un(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(Un);let t={};for(let n of Object.keys(e))t[n]=Un(e[n]);return t}function Q(e,t){let n=e;for(let r of Vt(t)){if(n==null)return;n=n[r]}return n}var ls=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...n)=>S(()=>_u(this.root,n))),e&&typeof e=="object"&&(Te.set(e,{store:this,name:t.name??"store"}),It.set(e,e)),Su({kind:"store",node:this,handle:()=>this.root,name:t.name})}get state(){return Mt(this.root)}get proxy(){return Mt(this.root)}get accessor(){return(()=>Mt(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return Lt(this.state);let t=this.state;for(let n of Vt(e)){if(t==null)return;t=t[n]}return Lt(t)}select(e){return m(()=>e(this.state))}subscribe(e){return T(()=>e(this.state))}watch(e,t){let n;return T(()=>{let r=e(this.state);Object.is(r,n)||(t(r,n),n=r)})}reactive(e){return m(()=>this.state[e])}produce(e){this.set((t=>{let n=Un(t);return e(n),n}))}reconcile(e,t={}){this.set(e)}push(e,...t){let n=Q(this.root,e);this.set(e,n.concat(t))}pop(e){let t=Q(this.root,e).slice(),n=t.pop();return this.set(e,t),n}shift(e){let t=Q(this.root,e).slice(),n=t.shift();return this.set(e,t),n}splice(e,t,n,...r){let o=Q(this.root,e).slice(),i=o.splice(t,n,...r);return this.set(e,o),i}insert(e,t,n){let r=Q(this.root,e).slice();r.splice(t,0,n),this.set(e,r)}removeAt(e,t){let n=Q(this.root,e).slice(),r=n.splice(t,1);return this.set(e,n),r}replace(e,t){if(arguments.length>=2){let r=Q(this.root,String(e)),o=t;if(Array.isArray(r)&&Array.isArray(o)){Dt(r,o);return}this.set(e,o);return}let n=this.root;if(Array.isArray(n)&&Array.isArray(e)){Dt(n,e);return}this.set(e)}clear(e){let t=e===void 0?this.root:Q(this.root,e);if(Array.isArray(t)){Dt(t,[]);return}if(t&&typeof t=="object")for(let n of Object.keys(t))H(t,n,void 0)}toObservable(){let[e]=g(this.state);return e.toObservable()}dispose(){}},Cu=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","replace","clear","unwrap","toObservable"];function ku(e,t){for(let n of Cu)e[n]=t[n].bind(t);e.$=t.reactive.bind(t)}function Ht(e,t={immutable:!0}){let n=new ls(e,t);return ku(n.set,n),[n.proxy,n.set]}function Pu(e,t={}){return new ls(e,{...t,immutable:!1})}function Lt(e){if(e==null||typeof e!="object")return e;let t=e[jt];return t!==void 0?t:e}function Mu(e){return E(()=>Lt(e))}var xl=Object.freeze({createStore:Ht,createMutableStore:Pu,batch:S,unwrap:Lt,untrackStore:Mu});function ds(e,t){let[n,r]=Ht(e,t);return new Proxy(n,{get:(o,i)=>i==="set"?r:o[i],has:(o,i)=>i==="set"||Reflect.has(o,i)})}return vs(Du);})();
package/dist/cdn/dom.mjs CHANGED
@@ -323,7 +323,7 @@ import {
323
323
  } from "@fluixi/reactive/signal";
324
324
 
325
325
  // src/version.generated.ts
326
- var VERSION = "1.0.0-alpha.85";
326
+ var VERSION = "1.0.0-alpha.86";
327
327
 
328
328
  // src/lib/dom/versions.ts
329
329
  import { VERSION as REACTIVE } from "@fluixi/reactive/version";
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! @fluixi/dom v1.0.0-alpha.85 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
1
+ /*! @fluixi/dom v1.0.0-alpha.86 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
2
2
  "use strict";
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -502,7 +502,7 @@ function getGlobal(key, value, _Key = "Fluixi") {
502
502
  var import_signal2 = require("@fluixi/reactive/signal");
503
503
 
504
504
  // src/version.generated.ts
505
- var VERSION = "1.0.0-alpha.85";
505
+ var VERSION = "1.0.0-alpha.86";
506
506
 
507
507
  // src/lib/dom/versions.ts
508
508
  var import_version = require("@fluixi/reactive/version");
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! @fluixi/dom v1.0.0-alpha.85 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
1
+ /*! @fluixi/dom v1.0.0-alpha.86 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
2
2
 
3
3
  // src/lib/dom/utils.ts
4
4
  function toAttributeName(key) {
@@ -325,7 +325,7 @@ import {
325
325
  } from "@fluixi/reactive/signal";
326
326
 
327
327
  // src/version.generated.ts
328
- var VERSION = "1.0.0-alpha.85";
328
+ var VERSION = "1.0.0-alpha.86";
329
329
 
330
330
  // src/lib/dom/versions.ts
331
331
  import { VERSION as REACTIVE } from "@fluixi/reactive/version";
@@ -28,7 +28,7 @@ module.exports = __toCommonJS(hydration_exports);
28
28
  var import_signal2 = require("@fluixi/reactive/signal");
29
29
 
30
30
  // src/version.generated.ts
31
- var VERSION = "1.0.0-alpha.85";
31
+ var VERSION = "1.0.0-alpha.86";
32
32
 
33
33
  // src/lib/dom/versions.ts
34
34
  var import_version = require("@fluixi/reactive/version");
@@ -4,7 +4,7 @@ import {
4
4
  } from "@fluixi/reactive/signal";
5
5
 
6
6
  // src/version.generated.ts
7
- var VERSION = "1.0.0-alpha.85";
7
+ var VERSION = "1.0.0-alpha.86";
8
8
 
9
9
  // src/lib/dom/versions.ts
10
10
  import { VERSION as REACTIVE } from "@fluixi/reactive/version";
@@ -1,4 +1,4 @@
1
- /*! @fluixi/dom v1.0.0-alpha.85 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
1
+ /*! @fluixi/dom v1.0.0-alpha.86 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
2
2
  "use strict";
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -446,7 +446,7 @@ function getGlobal(key, value, _Key = "Fluixi") {
446
446
  var import_signal2 = require("@fluixi/reactive/signal");
447
447
 
448
448
  // src/version.generated.ts
449
- var VERSION = "1.0.0-alpha.85";
449
+ var VERSION = "1.0.0-alpha.86";
450
450
 
451
451
  // src/lib/dom/versions.ts
452
452
  var import_version = require("@fluixi/reactive/version");
@@ -1,4 +1,4 @@
1
- /*! @fluixi/dom v1.0.0-alpha.85 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
1
+ /*! @fluixi/dom v1.0.0-alpha.86 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
2
2
 
3
3
  // src/lib/dom/utils.ts
4
4
  function toAttributeName(key) {
@@ -325,7 +325,7 @@ import {
325
325
  } from "@fluixi/reactive/signal";
326
326
 
327
327
  // src/version.generated.ts
328
- var VERSION = "1.0.0-alpha.85";
328
+ var VERSION = "1.0.0-alpha.86";
329
329
 
330
330
  // src/lib/dom/versions.ts
331
331
  import { VERSION as REACTIVE } from "@fluixi/reactive/version";
@@ -1,4 +1,4 @@
1
- /*! @fluixi/dom v1.0.0-alpha.85 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
1
+ /*! @fluixi/dom v1.0.0-alpha.86 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
2
2
  "use strict";
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,4 +1,4 @@
1
- /*! @fluixi/dom v1.0.0-alpha.85 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
1
+ /*! @fluixi/dom v1.0.0-alpha.86 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
2
2
 
3
3
  // src/lib/dom/integration.ts
4
4
  import { untrack, isSignal, reportReactiveProps } from "@fluixi/reactive";
@@ -48,7 +48,7 @@ function setAttribute(element, name, value, isSVG = false) {
48
48
  var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
49
49
 
50
50
  // src/version.generated.ts
51
- var VERSION = "1.0.0-alpha.85";
51
+ var VERSION = "1.0.0-alpha.86";
52
52
 
53
53
  // src/lib/dom/versions.ts
54
54
  var import_version = require("@fluixi/reactive/version");
@@ -23,7 +23,7 @@ function setAttribute(element, name, value, isSVG = false) {
23
23
  var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
24
24
 
25
25
  // src/version.generated.ts
26
- var VERSION = "1.0.0-alpha.85";
26
+ var VERSION = "1.0.0-alpha.86";
27
27
 
28
28
  // src/lib/dom/versions.ts
29
29
  import { VERSION as REACTIVE } from "@fluixi/reactive/version";
@@ -1,4 +1,4 @@
1
- /*! @fluixi/dom v1.0.0-alpha.85 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
1
+ /*! @fluixi/dom v1.0.0-alpha.86 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
2
2
  "use strict";
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -112,7 +112,7 @@ function setAttribute(element, name, value, isSVG = false) {
112
112
  var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
113
113
 
114
114
  // src/version.generated.ts
115
- var VERSION = "1.0.0-alpha.85";
115
+ var VERSION = "1.0.0-alpha.86";
116
116
 
117
117
  // src/lib/dom/versions.ts
118
118
  var import_version = require("@fluixi/reactive/version");
@@ -1,4 +1,4 @@
1
- /*! @fluixi/dom v1.0.0-alpha.85 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
1
+ /*! @fluixi/dom v1.0.0-alpha.86 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
2
2
 
3
3
  // src/lib/dom/runtime.ts
4
4
  import {
@@ -50,7 +50,7 @@ function setAttribute(element, name, value, isSVG = false) {
50
50
  var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
51
51
 
52
52
  // src/version.generated.ts
53
- var VERSION = "1.0.0-alpha.85";
53
+ var VERSION = "1.0.0-alpha.86";
54
54
 
55
55
  // src/lib/dom/versions.ts
56
56
  import { VERSION as REACTIVE } from "@fluixi/reactive/version";
@@ -1,4 +1,4 @@
1
- /*! @fluixi/dom v1.0.0-alpha.85 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
1
+ /*! @fluixi/dom v1.0.0-alpha.86 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
2
2
  "use strict";
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,4 +1,4 @@
1
- /*! @fluixi/dom v1.0.0-alpha.85 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
1
+ /*! @fluixi/dom v1.0.0-alpha.86 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
2
2
 
3
3
  // src/lib/dom/server/host.ts
4
4
  var SERVER_NODE = /* @__PURE__ */ Symbol.for("fluixi.server-node");
@@ -1,4 +1,4 @@
1
- /*! @fluixi/dom v1.0.0-alpha.85 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
1
+ /*! @fluixi/dom v1.0.0-alpha.86 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
2
2
  "use strict";
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;