@fluixi/dom 1.0.0-alpha.75 → 1.0.0-alpha.77

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 (44) hide show
  1. package/README.md +59 -212
  2. package/dist/cdn/dom.cjs +1 -1
  3. package/dist/cdn/dom.global.js +1 -1
  4. package/dist/cdn/dom.mjs +1 -1
  5. package/dist/index.cjs +1 -1
  6. package/dist/index.d.ts +2 -1
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +2 -1
  9. package/dist/index.mjs +1 -1
  10. package/dist/lib/dom/hydration.cjs +1 -1
  11. package/dist/lib/dom/hydration.mjs +1 -1
  12. package/dist/lib/dom/index.cjs +1 -1
  13. package/dist/lib/dom/index.mjs +1 -1
  14. package/dist/lib/dom/island.cjs +1 -1
  15. package/dist/lib/dom/island.mjs +1 -1
  16. package/dist/lib/dom/runtime.cjs +1 -1
  17. package/dist/lib/dom/runtime.d.ts +8 -0
  18. package/dist/lib/dom/runtime.d.ts.map +1 -1
  19. package/dist/lib/dom/runtime.js +16 -0
  20. package/dist/lib/dom/runtime.mjs +1 -1
  21. package/dist/lib/dom/versions.cjs +1 -1
  22. package/dist/lib/dom/versions.mjs +1 -1
  23. package/dist/lib/flow/dynamic.d.ts +2 -2
  24. package/dist/lib/flow/dynamic.js +2 -2
  25. package/dist/lib/flow/error-boundary.d.ts +2 -2
  26. package/dist/lib/flow/error-boundary.js +2 -2
  27. package/dist/lib/flow/index-flow.d.ts +2 -2
  28. package/dist/lib/flow/index-flow.js +2 -2
  29. package/dist/lib/flow/index.cjs +1 -1
  30. package/dist/lib/flow/index.mjs +1 -1
  31. package/dist/lib/flow/portal.d.ts +2 -2
  32. package/dist/lib/flow/portal.js +2 -2
  33. package/dist/lib/flow/show.d.ts +2 -2
  34. package/dist/lib/flow/show.js +2 -2
  35. package/dist/lib/flow/switch.d.ts +2 -2
  36. package/dist/lib/flow/switch.js +2 -2
  37. package/dist/lib/index.cjs +1 -1
  38. package/dist/lib/index.mjs +1 -1
  39. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  40. package/dist/version.generated.cjs +1 -1
  41. package/dist/version.generated.d.ts +1 -1
  42. package/dist/version.generated.js +1 -1
  43. package/dist/version.generated.mjs +1 -1
  44. package/package.json +7 -13
@@ -1 +1 @@
1
- "use strict";var FluixiDOM=(()=>{var pt=Object.defineProperty;var oo=Object.getOwnPropertyDescriptor;var so=Object.getOwnPropertyNames;var io=Object.prototype.hasOwnProperty;var ao=(e,t)=>{for(var n in t)pt(e,n,{get:t[n],enumerable:!0})},uo=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of so(t))!io.call(e,o)&&o!==n&&pt(e,o,{get:()=>t[o],enumerable:!(r=oo(t,o))||r.enumerable});return e};var lo=e=>uo(pt({},"__esModule",{value:!0}),e);var $i={};ao($i,{ClientOnly:()=>Kt,Dynamic:()=>Rr,ErrorBoundary:()=>kr,FX_DATA_ID:()=>le,For:()=>Tr,Index:()=>Er,Island:()=>yr,JSX_PROPERTIES:()=>qe,Match:()=>Ar,NoSsr:()=>_r,Portal:()=>Cr,SVG_ELEMENTS:()=>mo,SVG_NAMESPACE:()=>Z,Show:()=>Sr,Switch:()=>Nr,VOID_ELEMENTS:()=>yo,addClass:()=>xo,addDelegatedEventListener:()=>ar,addNativeEventListener:()=>Dt,appendChildren:()=>Co,applyElementProp:()=>De,applyProps:()=>Lt,applyUse:()=>qt,asComponent:()=>Ds,asContext:()=>Ms,asOutlet:()=>Os,asProvider:()=>Ps,asRoute:()=>ks,asRouter:()=>Cs,asRoutes:()=>_s,asSuspense:()=>qs,batch:()=>w,captureHydrationCursor:()=>or,checkRenderType:()=>js,classMap:()=>Or,cleanChildren:()=>H,cloneTemplate:()=>lr,closest:()=>bo,createComponent:()=>Ft,createComputed:()=>Sn,createContext:()=>Le,createDynamicElement:()=>wi,createEffect:()=>T,createElement:()=>No,createMemo:()=>m,createNativeElement:()=>Mt,createPortal:()=>ri,createRenderEffect:()=>b,createRequestContext:()=>ae,createResource:()=>Rn,createRoot:()=>O,createSignal:()=>g,createStore:()=>ln,createTemplate:()=>ur,delegate:()=>Po,delegateEvents:()=>Pt,escapeFxJson:()=>Re,escapeHTML:()=>si,fnName:()=>Xs,generateID:()=>Fs,getAttribute:()=>To,getGlobal:()=>Ho,getLitEventName:()=>po,getLocals:()=>Ut,getOffset:()=>Oo,getRequestContext:()=>$,getRequestEvent:()=>tt,getRequestLocals:()=>nt,getServerData:()=>Ce,getStableElementId:()=>Is,getStyle:()=>Ao,handleRef:()=>Ne,hasClass:()=>So,holeContent:()=>Gs,holeEnd:()=>Ks,holeScope:()=>Bs,html:()=>gr,hydrate:()=>it,hydrateAdvancePast:()=>ie,hydrateIslands:()=>mr,indexArray:()=>Ve,initializeIntegration:()=>li,insert:()=>L,insertExpression:()=>ve,intergartionInitialized:()=>ci,isAccessor:()=>ii,isComponent:()=>M,isContext:()=>Zn,isCustomElement:()=>dn,isDOMNode:()=>Fo,isDelegatedEvent:()=>Us,isDomElement:()=>Ke,isDomNode:()=>G,isDomText:()=>Ge,isEventHandler:()=>fo,isFunction:()=>Ws,isIntegrationInitialized:()=>fi,isJSXTemplate:()=>Io,isLitTemplateResult:()=>hn,isNativeElement:()=>oi,isOutlet:()=>Yn,isPromise:()=>we,isProvider:()=>Qn,isReactElement:()=>Lo,isRoute:()=>Jn,isRouter:()=>Gn,isRoutes:()=>Xn,isSVGElement:()=>$t,isServer:()=>v,isSuspense:()=>er,isTemplateFactory:()=>$o,isVisible:()=>_o,iterateFn:()=>Js,keyArray:()=>Fe,makeArrayFlat:()=>cr,mapArray:()=>Ie,mergeProps:()=>ti,observeIntersection:()=>Do,observeResize:()=>qo,onCleanup:()=>S,query:()=>ht,queryAll:()=>go,registerCreateComponent:()=>ui,registerGlobal:()=>Vo,removeAttribute:()=>Eo,removeChildren:()=>Ro,removeClass:()=>wo,removeDelegatedEventListener:()=>Ot,render:()=>It,renderToString:()=>en,renderToStringAsync:()=>nn,resetIntegration:()=>di,runHydrationAt:()=>xe,runWithRequestContext:()=>ue,runWithoutHydration:()=>sr,scrollIntoView:()=>ko,serializeNode:()=>D,serializeResourceData:()=>lt,setAttribute:()=>_,setClassList:()=>Ee,setClassName:()=>Te,setDataRedactor:()=>tn,setDynamicAttribute:()=>Ye,setDynamicBoolAttribute:()=>jt,setDynamicProperty:()=>Qe,setProperty:()=>Se,setRequestStore:()=>Ht,setServerMode:()=>K,setStyle:()=>Ae,setStyles:()=>pn,shouldSetAsProperty:()=>ho,splitProps:()=>ni,spread:()=>ei,styleMap:()=>Pr,svg:()=>br,templateNode:()=>zs,toAttributeName:()=>co,toggleClass:()=>vo,untrack:()=>A,useContext:()=>xn,waitForElement:()=>Mo});function co(e){return e.startsWith("aria-")||e.startsWith("data-")?e:/[A-Z]/.test(e)?e.replace(/([A-Z])/g,"-$1").toLowerCase():e}function fo(e){return e.startsWith("@")||e.startsWith("on")&&e.length>2}function po(e){return e.startsWith("@")?e.slice(1):e.startsWith("on")?e.slice(2).toLowerCase():e}function ho(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 yo=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),mo=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"]),Z="http://www.w3.org/2000/svg";function dn(e){return e.localName.includes("-")}function De(e,t,n,r=!1){if(n==null){e.removeAttribute(t);return}if(dn(e)){e[t]=n;return}_(e,t,n,r)}var qe=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]);function ht(e,t=document){return t.querySelector(e)}function go(e,t=document){return Array.from(t.querySelectorAll(e))}function bo(e,t){return e.closest(t)}function xo(e,...t){e.classList.add(...t)}function wo(e,...t){e.classList.remove(...t)}function vo(e,...t){t.forEach(n=>e.classList.toggle(n))}function So(e,t){return e.classList.contains(t)}function _(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 To(e,t){return e.getAttribute(t)}function Eo(e,t){e.removeAttribute(t)}function pn(e,t){Object.assign(e.style,t)}function Ao(e,t){return window.getComputedStyle(e).getPropertyValue(t)}function No(e,t={},...n){let r=document.createElement(e);return Object.entries(t).forEach(([o,s])=>{if(o==="class"||o==="className")r.className=s;else if(o==="style"&&typeof s=="object")pn(r,s);else if(o.startsWith("on")&&typeof s=="function"){let i=o.slice(2).toLowerCase();r.addEventListener(i,s)}else _(r,o,s)}),n.forEach(o=>{typeof o=="string"?r.appendChild(document.createTextNode(o)):r.appendChild(o)}),r}function Ro(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function Co(e,...t){t.forEach(n=>{typeof n=="string"?e.appendChild(document.createTextNode(n)):e.appendChild(n)})}function _o(e){let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=window.innerHeight&&t.right<=window.innerWidth}function ko(e,t={behavior:"smooth",block:"nearest"}){e.scrollIntoView(t)}function Oo(e){let t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}}function Po(e,t,n,r){let o=s=>{let i=s.target.closest(n);i&&e.contains(i)&&r(s,i)};return e.addEventListener(t,o),()=>{e.removeEventListener(t,o)}}function Mo(e,t=5e3){return new Promise((n,r)=>{let o=ht(e);if(o){n(o);return}let s=new MutationObserver(()=>{let u=ht(e);u&&(s.disconnect(),clearTimeout(i),n(u))});s.observe(document.body,{childList:!0,subtree:!0});let i=setTimeout(()=>{s.disconnect(),r(new Error(`Element ${e} not found within ${t}ms`))},t)})}function Do(e,t,n={}){let r=new IntersectionObserver(o=>{o.forEach(s=>{t(s.isIntersecting)})},n);return r.observe(e),()=>{r.disconnect()}}function qo(e,t){let n=new ResizeObserver(r=>{r.forEach(t)});return n.observe(e),()=>{n.disconnect()}}var jo=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function Lo(e){return typeof e=="object"&&e!==null&&e.$$typeof===jo}function hn(e){return e&&typeof e=="object"&&e.strings&&Array.isArray(e.strings)&&e.values&&Array.isArray(e.values)}function $o(e){if(typeof e!="function")return!1;try{let t=e();return hn(t)}catch{return!1}}function Io(e){return typeof e=="object"&&e!==null&&(e.$$typeof==="template"||typeof e.type=="function")}function Fo(e){return e instanceof Node}function Vo(e,t,n="Fluixi"){typeof globalThis<"u"&&(typeof globalThis[n]>"u"&&(globalThis[n]={}),typeof globalThis[n][e]>"u"&&(globalThis[n][e]=t))}function Ho(e,t,n="Fluixi"){return typeof globalThis<"u"&&typeof globalThis[n]<"u"&&typeof globalThis[n][e]<"u"?globalThis[n][e]:t}var Uo="__fluixi_signal_next_state__",Wo=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},p=globalThis[Uo]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Wo,onSuspend:null,onError:null},yn=0,mn=1,ye=2,gn=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(p.untracked)return;let e=p.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}},zo=class extends gn{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++,this.observers)for(let t of[...this.observers])t.markDirty(ye);mt(this)}}peek(){return this._value}},bn=class extends gn{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=ye,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(p.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===mn&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===ye)break}(this.state===ye||!this._initialized)&&this.recompute(),this.state=yn}recompute(){if(this.sources){for(let i of this.sources)i.observers?.delete(this);this.sources.clear()}let e=p.consumer,t=p.untracked;p.consumer=this,p.untracked=!1;let n,r=!1,o;try{n=this._fn()}catch(i){r=!0,o=i,n=this._value}finally{p.consumer=e,p.untracked=t}let s=!this._initialized||this._threw!==r||(r?o!==this._error:!this._equals(this._value,n));if(this._initialized=!0,this._threw=r,this._error=o,this._value=n,s){if(this.version++,this.observers)for(let i of[...this.observers])i.markDirty(ye);mt(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===yn;if(this.state=e,t){if(this.observers)for(let n of[...this.observers])n.markDirty(mn);mt(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function mt(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}var Bo=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 Ko(e){if(p.untracked)return e();p.untracked=!0;try{return e()}finally{p.untracked=!1}}function ee(e){let t=je(e);return e&&(e.owned??=[]).push(t),t}function te(e,t=!0){me(e,t)}function je(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function Le(e){let t=Symbol("context");return{id:t,defaultValue:e,Provider:n=>{let r=p.owner,o=je(r);(o.contexts=new Map).set(t,n.value),r&&(r.owned??=[]).push(o),p.owner=o;try{return n.children}finally{p.owner=r}}}}function xn(e){let t=p.owner;for(;t;){if(t.contexts&&t.contexts.has(e.id))return t.contexts.get(e.id);t=t.parent}return e.defaultValue}function wn(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 Go(e){p.onSuspend=e}function Xo(e){return p.onSuspend?(p.onSuspend(e,p.owner),!0):!1}function Jo(e){p.onError=e}function I(){return p.owner}function k(e,t){let n=p.owner;p.owner=e;try{return t()}finally{p.owner=n}}function S(e){if(p.owner){if(p.owner.disposed){e();return}(p.owner.cleanups??=[]).push(e)}}function me(e,t=!0){if(!e.disposed){if(e.owned){for(let n=e.owned.length-1;n>=0;n--)me(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 O(e){let t=je(p.owner);p.owner&&(p.owner.owned??=[]).push(t);let n=p.owner;p.owner=t;try{return e(()=>me(t))}finally{p.owner=n}}function Yo(e){p.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Qo(e){e.queued||(e.queued=!0,p.queue.push(e),!p.scheduled&&p.batchDepth===0&&(p.scheduled=!0,p.hostSchedule($e)))}function $e(){if(p.scheduled=!1,p.flushing)return;p.flushing=!0;let e=0;try{for(;p.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let t=p.queue;p.queue=[];for(let n of t)n.queued=!1,n.disposed||n.run()}}finally{p.flushing=!1}}function Zo(){p.batchDepth===0&&$e()}function es(e){p.batchDepth++;try{return e()}finally{--p.batchDepth===0&&$e()}}var ts=class{constructor(e){this.queued=!1,this.disposed=!1,this.owner=je(p.owner),p.owner&&(p.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new bn(()=>{me(this.owner,!1),k(this.owner,()=>{let t=e();typeof t=="function"&&(this.owner.cleanups??=[]).push(t)})}),this.watcher=new Bo(()=>Qo(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"&&p.onSuspend){p.onSuspend(e,this.owner);return}if(p.onError&&p.onError(e,this.owner))return;throw e}}}dispose(){this.disposed||(this.disposed=!0,this.watcher.unwatch(this.computed),me(this.owner))}};function St(e){let t=new ts(e);return()=>t.dispose()}function ns(e){return!!e&&typeof e.then=="function"}Yo(()=>{});var vn=Symbol.for("signal"),rs=Symbol.for("memo"),os=Symbol.for("signal-node");function g(e,t){let n=new zo(e,{equals:t?.equals}),r=(()=>n.get()),o=(s=>{let i=typeof s=="function"?s(n.peek()):s;return n.set(i),Zo(),i});return Object.defineProperty(r,vn,{value:!0,enumerable:!0}),Object.defineProperty(r,os,{value:{get value(){return n.peek()},get version(){return n.version}},enumerable:!1}),[r,o]}function m(e,t,n){let r=t,o=I(),s=new bn(()=>k(o,()=>{try{return r=e(r)}catch(u){if(ns(u))return Xo(u),r;throw u}}),{equals:n?.equals}),i=(()=>s.get());return Object.defineProperty(i,vn,{value:!0,enumerable:!0}),Object.defineProperty(i,rs,{value:!0,enumerable:!0}),i}function T(e,t){let n=t;return St(()=>{n=e(n)})}function Sn(e,t){let n=t;St(()=>{n=e(n)})}function b(e,t){let n=t;return St(()=>{n=e(n)})}function w(e){return es(e)}function A(e){return Ko(e)}function Tn(){return $e(),Promise.resolve()}function Ie(e,t,n){let r=[];return S(()=>{for(let o of r)o.dispose();r=[]}),m(()=>{let o=e()||[];return A(()=>{if(o.length===0){for(let a of r)a.dispose();return r=[],n?.fallback?n.fallback():[]}let s=new Map;for(let a of r)s.has(a.item)||s.set(a.item,a);let i=[],u=new Set;for(let a=0;a<o.length;a++){let l=o[a],c=s.get(l);if(c&&!u.has(c))c.setIndex(a),i.push(c),u.add(c);else{let f,h,y;O(x=>{y=x;let[j,pe]=g(a);h=pe,f=t(l,j)});let N={item:l,rendered:f,dispose:y,setIndex:h};i.push(N),u.add(N)}}for(let a of r)u.has(a)||a.dispose();return r=i,i.map(a=>a.rendered)})})}function Fe(e,t,n,r){let o=[],s=[];return S(()=>{for(let i of s)i.dispose();o=[],s=[]}),m(()=>{let i=e()||[];return A(()=>{if(i.length===0){for(let f of s)f.dispose();return o=[],s=[],r?.fallback?r.fallback():[]}let u=new Map;for(let f=0;f<o.length;f++)u.set(o[f],s[f]);let a=[],l=[],c=new Set;for(let f=0;f<i.length;f++){let h=t(i[f]),y=u.get(h);if(y&&!c.has(h))y.setIndex(f),a.push(y);else{let N,x,j;O(pe=>{j=pe;let[z,he]=g(f);x=he;let ke=m(Q=>(e()||[])[z()]??Q,i[f]);N=n(ke,z)}),a.push({rendered:N,dispose:j,setIndex:x})}l.push(h),c.add(h)}for(let[f,h]of u)c.has(f)||h.dispose();return o=l,s=a,a.map(f=>f.rendered)})})}function Ve(e,t,n){let r=[];return S(()=>{for(let o of r)o.dispose();r=[]}),m(()=>{let o=e()||[];return A(()=>{if(o.length===0){for(let a of r)a.dispose();return r=[],n?.fallback?n.fallback():[]}let s=r.length,i=o.length;for(let a=s;a<i;a++){let l,c,f,h=o[a];O(y=>{f=y;let[N,x]=g(h);c=x,l=t(N,a)}),r.push({rendered:l,setItem:c,dispose:f})}for(let a=i;a<s;a++)r[a].dispose();i<s&&(r=r.slice(0,i));let u=Math.min(s,i);for(let a=0;a<u;a++)r[a].setItem(o[a]);return r.map(a=>a.rendered)})})}var ss=Symbol.for("signal");function E(e){return typeof e=="function"&&e[ss]===!0}var gt=null;function En(e){gt=e}function is(e){gt&&gt(e)}var bt=null;function An(e){bt=e}function as(e){return bt?bt(e):void 0}var xt=null;function He(e){xt=e}function us(){return xt?xt():void 0}var wt=null;function Nn(e){wt=e}function ls(e,t){wt&&wt(e,t)}function cs(e){return!!e&&typeof e.then=="function"}var yt=Symbol();function Rn(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 s=n.transport===!1?void 0:us(),i=s!==void 0?as(s):void 0,u=i!==void 0,[a,l]=g(i!==void 0?i.value:n.initialValue,{equals:!1}),[c,f]=g(void 0,{equals:!1}),[h,y]=g(i!==void 0||n.initialValue!==void 0?"ready":"unresolved",{equals:!1}),[N,x]=g(void 0,{equals:!1}),[j,pe]=g(void 0,{equals:!1}),z=yt,he=!1;T(()=>{let R=r();if(j(),R===!1||R===null||R===void 0){z=yt,w(()=>{y("unresolved"),x(void 0),f(void 0)});return}let Oe=he;if(he=!1,z!==yt&&R===z&&!Oe)return;if(z=R,u){u=!1;return}let Pe=!1;S(()=>Pe=!0);let cn=A(h),ro=A(a),fn=cn==="ready"||cn==="refreshing";w(()=>{y(fn?"refreshing":"pending"),f(void 0)});try{let B=o(R,{value:ro,refetching:fn});cs(B)?(x(B),is(B),B.then(Me=>{Pe||(s!==void 0&&ls(s,Me),w(()=>{l(()=>Me),y("ready"),x(void 0)}))},Me=>{Pe||w(()=>{f(Me),y("errored"),x(void 0)})})):w(()=>{l(()=>B),y("ready"),x(void 0)})}catch(B){if(Pe)return;w(()=>{f(B),y("errored"),x(void 0)})}});let ke=()=>{let R=h();return R==="pending"||R==="refreshing"},Q=(()=>{let R=c();if(R)throw R;if(ke()){let Oe=N();if(Oe)throw Oe}return a()});return Object.defineProperties(Q,{state:{get:h},loading:{get:ke},error:{get:c},latest:{get:a}}),Object.defineProperty(Q,Symbol.for("resource"),{value:!0,enumerable:!0}),Object.defineProperty(Q,Symbol.for("signal"),{value:!0,enumerable:!0}),[Q,{mutate:l,refetch:()=>{he=!0,pe(void 0)}}]}function vt(e){if(typeof e=="function"&&!e.length){let t=e();return E(t)?t:vt(t)}if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=vt(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function Ue(e){let t=m(e);return m(()=>vt(t()))}var fs=Le();Go((e,t)=>{let n=wn(t,fs);n&&(n.increment(),e.finally(()=>n.decrement()))});var ds=Le();Jo((e,t)=>{let n=wn(t,ds);return n?(n.setError(e),!0):!1});var ne=Symbol.for("fluixi-proxy");var Cn="1.0.0-alpha.75";var In="1.0.0-alpha.75";var ps="__fluixi_signal_next_state__",hs=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},oe=globalThis[ps]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:hs,onSuspend:null,onError:null};function ys(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function Fn(e){let t=Symbol("context");return{id:t,defaultValue:e,Provider:n=>{let r=oe.owner,o=ys(r);(o.contexts=new Map).set(t,n.value),r&&(r.owned??=[]).push(o),oe.owner=o;try{return n.children}finally{oe.owner=r}}}}function Vn(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 ms(e){oe.onSuspend=e}function gs(e){oe.onError=e}function bs(e){oe.hostSchedule=e??(t=>{Promise.resolve().then(t)})}bs(()=>{});var xs=Fn();ms((e,t)=>{let n=Vn(t,xs);n&&(n.increment(),e.finally(()=>n.decrement()))});var ws=Fn();gs((e,t)=>{let n=Vn(t,ws);return n?(n.setError(e),!0):!1});var Et=Symbol("store-raw"),_n=Symbol("store-node"),kn=Symbol("store-has"),On=Symbol("store-self"),Pn=Symbol("store-track");var Mn=new WeakMap,Dn=new WeakMap;function Hn(e){let[t,n]=g(e),r=t;return r.$=n,r}function ze(e){let t=Mn.get(e);return t||Mn.set(e,t={keys:new Map}),t}function qn(e,t,n){let r=e.keys.get(t);return r||e.keys.set(t,r=Hn(n)),r}function jn(e){let t=ze(e);(t.all||(t.all=Hn()))()}function Ln(e,t){e.$(typeof t=="function"?()=>t:t)}function Un(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 We(e){if(!Un(e))return e;let t=Dn.get(e);if(t)return t;let n=new Proxy(e,vs);return Dn.set(e,n),n}var vs={get(e,t,n){if(t===Et||t===_n)return e;if(t===ne)return n;if(t===kn)return i=>i in e;if(t==="__proxy")return!0;if(t===Pn||t===On)return jn(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 s=qn(ze(e),t,r)();return Un(s)?We(s):s},set(){return!0},deleteProperty(e,t){return t in e&&ge(e,t,void 0),!0},has(e,t){return t===Et||t===ne||t===_n||t===kn||t===On||t===Pn?!0:(qn(ze(e),t,e[t])(),t in e)},ownKeys(e){return jn(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function ge(e,t,n){if(e[t]===n&&(n!==void 0||t in e))return;let r=Array.isArray(e),o=r?e.length:0;n===void 0?delete e[t]:e[t]=n;let s=ze(e),i=s.keys.get(t);if(i&&Ln(i,n),r&&e.length!==o){let u=s.keys.get("length");u&&Ln(u,e.length)}s.all&&s.all.$(void 0)}function $n(e,t){return typeof e=="function"?e(t):e}function At(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)?At(o,r):ge(e,n,r)}}function Rt(e){let t=[],n=e.replace(/\[([^\]]*)\]/g,".$1");for(let r of n.split("."))r.length&&t.push(r);return t}function Wn(e,t,n){let r=t.length-1;for(let s=0;s<r;s++){let i=t[s];if(i==="*"){let a=t.slice(s+1);if(Array.isArray(e))for(let l=0;l<e.length;l++)Wn(e[l],a,n);return}let u=e[i];(u==null||typeof u!="object")&&(u=/^\d+$/.test(t[s+1])?[]:{},ge(e,i,u)),e=u}let o=t[r];if(o==="*"){if(Array.isArray(e))for(let s=0;s<e.length;s++)ge(e,s,$n(n,e[s]));return}ge(e,o,$n(n,e[o]))}function Tt(e,t,n){Wn(e,Rt(t),n)}function Ss(e,t){let n=t[0];if(typeof n=="function"&&t.length===1){let r=n(e);r&&r!==e&&At(e,r);return}if(Array.isArray(n)&&t.length===1){for(let r of n)Array.isArray(r)&&Tt(e,r[0],r[1]);return}if(n&&typeof n=="object"&&!Array.isArray(n)&&t.length===1){At(e,n);return}if(Array.isArray(t[1])&&t.length>=3){Tt(e,`${n}.${t[1].join(".")}`,t[2]);return}Tt(e,String(n),t[1])}function Nt(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(Nt);let t={};for(let n of Object.keys(e))t[n]=Nt(e[n]);return t}function re(e,t){let n=e;for(let r of Rt(t)){if(n==null)return;n=n[r]}return n}var zn=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...n)=>w(()=>Ss(this.root,n)))}get state(){return We(this.root)}get proxy(){return We(this.root)}get accessor(){return(()=>We(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return Be(this.state);let t=this.state;for(let n of Rt(e)){if(t==null)return;t=t[n]}return Be(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=Nt(t);return e(n),n}))}reconcile(e,t={}){this.set(e)}push(e,...t){let n=re(this.root,e);this.set(e,n.concat(t))}pop(e){let t=re(this.root,e).slice(),n=t.pop();return this.set(e,t),n}shift(e){let t=re(this.root,e).slice(),n=t.shift();return this.set(e,t),n}splice(e,t,n,...r){let o=re(this.root,e).slice(),s=o.splice(t,n,...r);return this.set(e,o),s}insert(e,t,n){let r=re(this.root,e).slice();r.splice(t,0,n),this.set(e,r)}removeAt(e,t){let n=re(this.root,e).slice(),r=n.splice(t,1);return this.set(e,n),r}toObservable(){let[e]=g(this.state);return e.toObservable()}dispose(){}},Ts=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","unwrap","toObservable"];function Es(e,t){for(let n of Ts)e[n]=t[n].bind(t);e.$=t.reactive.bind(t)}function As(e,t={immutable:!0}){let n=new zn(e,t);return Es(n.set,n),[n.proxy,n.set]}function Ns(e,t={}){return new zn(e,{...t,immutable:!1})}function Be(e){if(e==null||typeof e!="object")return e;let t=e[Et];return t!==void 0?t:e}function Rs(e){return A(()=>Be(e))}var Xi=Object.freeze({createStore:As,createMutableStore:Ns,batch:w,unwrap:Be,untrackStore:Rs});var P={dom:Cn,reactive:In};function Bn(e){P.core&&e.setAttribute("fluixi",P.core),e.setAttribute("fx-dom",P.dom),e.setAttribute("fx-reactive",P.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=P)}function Kn(){let e=[P.core,P.dom,P.reactive].filter(t=>t!==void 0);new Set(e).size<=1||console.warn(`[fluixi] package versions disagree — core ${P.core??"(absent)"}, dom ${P.dom}, reactive ${P.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 Cs(e){return Object.defineProperty(e,Symbol.for("fluixi-router"),{value:!0,enumerable:!0}),e}function _s(e){return Object.defineProperty(e,Symbol.for("fluixi-routes"),{value:!0,enumerable:!0}),e}function ks(e){return Object.defineProperty(e,Symbol.for("fluixi-route"),{value:!0,enumerable:!0}),e}function Os(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-outlet"),{value:!0,enumerable:!0}),e}function Ps(e){return Object.defineProperty(e,Symbol.for("fluixi-provider"),{value:!0,enumerable:!0}),e}function Ms(e){return Object.defineProperty(e,Symbol.for("fluixi-context"),{value:!0,enumerable:!0}),e}function Ds(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}function qs(e){return Object.defineProperty(e,Symbol.for("fluixi-suspense"),{value:!0,enumerable:!0}),e}function Gn(e){return typeof e=="function"&&e[Symbol.for("fluixi-router")]===!0}function Xn(e){return typeof e=="function"&&e[Symbol.for("fluixi-routes")]===!0}function Jn(e){return typeof e=="function"&&e[Symbol.for("fluixi-route")]===!0}function Yn(e){return typeof e=="function"&&e[Symbol.for("fluixi-outlet")]===!0}function Qn(e){return typeof e=="function"&&e[Symbol.for("fluixi-provider")]===!0}function Zn(e){return typeof e=="function"&&e[Symbol.for("fluixi-context")]===!0}function M(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}function er(e){return typeof e=="function"&&e[Symbol.for("fluixi-suspense")]===!0}function js(e){return Gn(e)?{type:"router",value:e}:Jn(e)?{type:"route",value:e}:Xn(e)?{type:"routes",value:e}:Yn(e)?{type:"outlet",value:e}:M(e)?{type:"component",value:e}:er(e)?{type:"suspense",value:e}:Qn(e)?{type:"provider",value:e}:Zn(e)?{type:"context",value:e}:{type:"none",value:e}}var v=typeof document>"u";function K(e){v=e}var be=Symbol.for("fluixi.server-node"),Ct=null;function tr(e){Ct=e}function se(){if(!Ct)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return Ct}function G(e){return e!=null&&e[be]===!0?!0:typeof Node<"u"&&e instanceof Node}function Ke(e){return e!=null&&e[be]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function Ge(e){return e!=null&&e[be]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}var d={active:!1,cursor:null,parents:[]},nr=null;function rr(e){nr=e}function Xe(){return nr}function _t(e,t){return d.active&&t.parentNode===e}function kt(e){let t=d.parents.lastIndexOf(e);t!==-1&&(d.parents.length=t),d.cursor=e.nextSibling}function or(){return d.active?d.cursor:null}function xe(e,t){if(!e||e.parentNode==null)return t();let n=d.active,r=d.cursor,o=d.parents;d.active=!0,d.cursor=e,d.parents=[];try{return t()}finally{d.active=n,d.cursor=r,d.parents=o}}function sr(e){if(!d.active)return e();let t=d.cursor,n=d.parents;d.active=!1,d.parents=[];try{return e()}finally{d.active=!0,d.cursor=t,d.parents=n}}function ie(e){if(!d.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&kt(t)}function Ls(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 $s(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 Is(e){return $s(Ls(e))}var Fs=()=>"xxyxxxxxxy-4xx8".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)}),Vs={};var ir=new Map,Je=new Set,Ze=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);function Pt(e){if(!v)for(let t of e)Je.has(t)||Ze.has(t)||(Je.add(t),document.addEventListener(t,Hs))}function Hs(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 ar(e,t,n){if(e[`$$${t}`]=n,Ze.has(t)){let r=`__fx_${t}`;if(!e[r]){let o=s=>{e[`$$${t}`]?.(s)};e.addEventListener(t,o),e[r]=o}return}Je.has(t)||Pt([t])}function Ot(e,t){delete e[`$$${t}`];let n=`__fx_${t}`,r=e[n];r&&(e.removeEventListener(t,r),delete e[n])}function Us(e){return!Ze.has(e)}function Ws(e){return typeof e=="function"}function U(e,t=!1){if(v)return se().createText(e);if(d.active&&!t){let n=Xe()?.hydrateText(e);if(n)return n}return document.createTextNode(e)}function Mt(e,t=!1){if(v)return se().createElement(e,t);if(d.active){let n=Xe()?.hydrateElement(e);if(n)return n}return t?document.createElementNS(Z,e):document.createElement(e)}function ur(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 zs(e,t,n=!1,r=!1){if(v){let o=se();return n?o.parseTemplate(e,r):o.createRaw(e)}if(d.active){let o=Xe()?.hydrateStatic(t);if(o)return o}return lr(ur(e,r),r).firstChild}function Bs(e,t){if(!d.active)return t();let n=xe(e.nextSibling,t);if(typeof n=="function"){let r=n;return((...o)=>d.active?xe(e.nextSibling,()=>r(...o)):r(...o))}return n}function Ks(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 Gs(e,t){let n=[];for(let r=e.nextSibling;r&&r!==t;r=r.nextSibling)n.push(r);return n}function lr(e,t=!1){let n=e.content.cloneNode(!0);return t?n.firstChild:n}function cr(e){return Array.isArray(e)?e.length===2&&e[1]===" "?Array.isArray(e[0])?cr(e[0]):(typeof e[0]=="function",e[0]):e.length===1&&typeof e[0]=="function"?e[0]:e:e}function Xs(e){return typeof e!="function"?null:e._name||e.name||"anonymous"}function Js(e){if(E(e)||M(e)||typeof e!="function")return e;let t=e();for(;typeof t=="function"&&!E(t)&&!M(t);)t=t();return t}var V=0,Ys=200;function Qs(e,t,n,r,o){let s=r,i=new Map;return b(()=>{let u;if(M(e)&&!E(e)){if(!i.has(e)){V++;try{let a=e();i.set(e,a)}finally{V--}}for(u=i.get(e);typeof u=="function"&&E(u);)u=u()}else for(u=e();typeof u=="function"&&E(u);)u=u();{let a=0;for(;typeof u=="function"&&a++<50;)if(M(u)){if(!i.has(u)){let l=u;V++;try{let c=l();i.set(l,c)}finally{V--}}u=i.get(u)}else if(E(u))u=u();else if(u=u(),typeof u!="function"||!E(u)&&!M(u))break}V++;try{s=ve(t,u,n,s,i),o(s)}finally{V--}})}function L(e,t,n,r){if(V>Ys)return console.error("[insert] Exceeded max call depth — possible infinite loop."),()=>null;n!==void 0&&!n&&(n=U("",!0),e.appendChild(n));let o=r??null,s=a=>Array.isArray(a)&&a.some(l=>typeof l=="function"),i=a=>typeof a=="function"?a:()=>a;if(typeof t!="function"&&!s(t)){V++;try{o=ve(e,t,n,o)}finally{V--}return()=>o}let u=Qs(i(t),e,n,o,a=>{o=a});return()=>(u?.(),o)}function ve(e,t,n,r,o){if(t==null||typeof t=="boolean")return H(e,r,n);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return H(e,r,n);if(we(t)){let i=U("",!0);return Array.isArray(r)?r.length>0?(e.replaceChild(i,r[0]),H(e,r.slice(1),n)):C(e,i,n):r?e.replaceChild(i,r):C(e,i,n),t.then(u=>{i.parentNode===e&&ve(e,u,i.nextSibling,i)}).catch(u=>{console.error("Error resolving promise in insertExpression:",u)}),i}let s=typeof t;if(s==="string"||s==="number"){if(s==="number"&&(t=String(t)),Array.isArray(r)){if(r.length===0){let u=U(t);return C(e,u,n),u}if(r.length===1&&r[0].nodeType===3)return r[0].data=t,r;r=H(e,r,n)}if(r&&Ge(r))return r.data=t,r;let i=U(t);return r&&r.parentNode===e?e.replaceChild(i,r):_t(e,i)||C(e,i,n),i}if(G(t))return _t(e,t)?(kt(t),t):Array.isArray(r)?(r.length===0?C(e,t,n):r[0].parentNode===e?(e.replaceChild(t,r[0]),H(e,r.slice(1),n)):C(e,t,n),t):(r?r!==t&&(r.parentNode===e?e.replaceChild(t,r):C(e,t,n)):C(e,t,n),t);if(Array.isArray(t)){let i=[],u=Array.isArray(r)?r:r?[r]:[],a=[];F(t,i,e,n,!0,o,a);let l=Zs(e,u,i,n);for(let c of a){let f=L(e,c.sig,c.marker);S(()=>{H(e,f()),c.marker.parentNode===e&&e.removeChild(c.marker)})}return l}if(s==="object"&&t!==null&&typeof t=="object"){let i=t;if("type"in i&&"props"in i){let u=i;if(typeof u.type=="function"){let a=u.type(u.props||{});return ve(e,a,n,r)}}}return H(e,r,n)}function F(e,t,n,r,o=!0,s,i){for(let u=0;u<e.length;u++){let a=e[u];if(!(a==null||typeof a=="boolean")){for(;typeof a=="function"&&!we(a)&&!E(a)&&!M(a)&&(a=a(),!(a==null||typeof a=="boolean")););if(!(a==null||typeof a=="boolean")){if(typeof a=="function"){let l;for(M(a)&&!E(a)?(s||(s=new Map),s.has(a)||s.set(a,a()),l=s.get(a)):l=a();typeof l=="function"&&!we(l)&&!E(l)&&!M(l);)s||(s=new Map),s.has(l)||s.set(l,l()),l=s.get(l);if(l==null||typeof l=="boolean")continue;if(typeof l=="function"){if(E(l)){if(i){let f=U("",!0);t.push(f),i.push({marker:f,sig:l});continue}let c=l();for(;typeof c=="function"&&E(c);)c=c();if(c==null||typeof c=="boolean")continue;Array.isArray(c)?F(c,t,n,r,o,s):F([c],t,n,r,o,s);continue}continue}Array.isArray(l)?F(l,t,n,r,o,s,i):F([l],t,n,r,o,s,i);continue}if(we(a)){let l=U("",!0);t.push(l),a.then(c=>{if(l.parentNode){let f=[];if(F([c],f,l.parentNode,void 0,!1,s),f.length>0){l.parentNode.replaceChild(f[0],l);for(let h=1;h<f.length;h++)l.parentNode?.insertBefore(f[h],f[h-1].nextSibling)}}}).catch(c=>console.error("Error resolving promise in array:",c));continue}if(Array.isArray(a)){F(a,t,n,r,o,s,i);continue}if(G(a)){t.push(a);continue}if(typeof a=="object"&&a!==null&&"type"in a&&"props"in a){let l=a;if(typeof l.type=="function"){let c=l.type(l.props||{});Array.isArray(c)?F(c,t,n,r,!1,s):F([c],t,n,r,!1,s);continue}}if(typeof a=="string"||typeof a=="number"){let l=String(a);if(l.trim()===""&&l!==" ")continue;t.push(U(l));continue}t.push(U(String(a)))}}}}function Zs(e,t,n,r){for(let f=0;f<n.length;f++){let h=n[f].parentNode;h!==null&&h!==e&&h.nodeType!==11&&(n=n.slice(),n[f]=n[f].cloneNode(!0))}let o=n.length,s=t.length,i=o,u=0,a=0,l=s>0?t[s-1].nextSibling??void 0:r,c=null;for(;u<s||a<i;){if(t[u]===n[a]){u++,a++;continue}for(;s>u&&i>a&&t[s-1]===n[i-1];)s--,i--;if(s===u){let f=i<o?a?n[a-1].nextSibling??void 0:n[i-a]:l;for(;a<i;)C(e,n[a++],f)}else if(i===a)for(;u<s;)(!c||!c.has(t[u]))&&t[u].parentNode===e&&e.removeChild(t[u]),u++;else if(t[u]===n[i-1]&&n[a]===t[s-1]){let f=t[--s].nextSibling;C(e,n[a++],t[u++].nextSibling),C(e,n[--i],f),t[s]=t[u-1]}else{if(!c){c=new Map;let h=a;for(;h<i;)c.set(n[h],h++)}let f=c.get(t[u]);if(f!=null)if(a<f&&f<i){let h=u,y=1;for(;++h<s&&h<i&&!(!c.has(t[h])||c.get(t[h])!==f+y);)y++;if(y>f-a){let N=t[u];for(;a<f;)C(e,n[a++],N)}else t[u].parentNode===e?e.replaceChild(n[a++],t[u++]):(C(e,n[a++],l),u++)}else u++;else t[u].parentNode===e&&e.removeChild(t[u]),u++}}return n}function H(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 C(e,t,n){d.active&&t.parentNode===e||(n&&n.parentNode===e?e.insertBefore(t,n):e.appendChild(t))}function Se(e,t,n){n==null?delete e[t]:e[t]=n}function Dt(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 qt(e,t){let n=(r,o)=>{typeof r=="function"&&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 Ye(e,t,n,r=!1){return typeof n!="function"?(_(e,t,n,r),()=>{}):b(()=>{let o=typeof n=="function"?n():n;_(e,t,o,r)})}function Qe(e,t,n){return typeof n!="function"?(Se(e,t,n),()=>{}):b(()=>{let r=typeof n=="function"?n():n;Se(e,t,r)})}function jt(e,t,n){return typeof n!="function"?(_(e,t,!!n),()=>{}):b(()=>{let r=n();_(e,t,!!r)})}function Te(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){b(()=>Te(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 Ee(e,t,n){if(!(!t||typeof t!="object"))for(let r in t){let o=t[r],s=r.split(/\s+/).filter(Boolean);if(typeof o=="function"&&n)n.push(b(()=>{let i=!!o();for(let u of s)e.classList.toggle(u,i)}));else{let i=!!(typeof o=="function"?o():o);for(let u of s)e.classList.toggle(u,i)}}}function Ae(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 ei(e){let{element:t,props:n,prevProps:r=Vs,isSVG:o=!1,skipChildren:s=!1}=e;if(!t||!Ke(t))return console.error("[spread] Error: element is not a DOM Element!"),()=>{};if(!n)return console.warn("[spread] Warning: props is undefined!"),()=>{};let i=o||t.namespaceURI===Z,u=[];for(let a in n){if(s&&a==="children")continue;let l=n[a],c=r[a];if(l===c)continue;if(a==="ref"){Ne(l,t);continue}if(a==="use"){qt(t,l);continue}if(a.startsWith("on:")){u.push(Dt(t,a.slice(3),l));continue}if(a.startsWith("prop:")){u.push(Qe(t,a.slice(5),l));continue}if(a.startsWith("attr:")){u.push(Ye(t,a.slice(5),l,i));continue}if(a.startsWith("bool:")){u.push(jt(t,a.slice(5),l));continue}if(a==="class"||a==="className"){typeof l=="function"?u.push(b(()=>Te(t,l()))):Te(t,l);continue}if(a==="classList"){typeof l=="function"?u.push(b(()=>Ee(t,l()))):Ee(t,l,u);continue}if(a==="style"){typeof l=="function"?u.push(b(()=>Ae(t,l()))):Ae(t,l);continue}if(a.startsWith("on")){let h=a.slice(2).toLowerCase();c&&Ot(t,h),l&&ar(t,h,l);continue}let f=qe.has(a)||!i&&a in t;typeof l=="function"?u.push(f?Qe(t,a,l):Ye(t,a,l,i)):u.push(b(()=>f?Se(t,a,n[a]):_(t,a,n[a],i)))}for(let a in r)if(!(a in n))if(a.startsWith("on")){let l=a.slice(2).toLowerCase();Ot(t,l)}else qe.has(a)?Se(t,a,null):t.removeAttribute(a);return()=>{u.forEach(a=>a())}}function Lt(e,t,n=!1){for(let r in t){let o=t[r];if(r==="ref"){Ne(o,e);continue}if(r!=="children"){if(r==="use"){qt(e,o);continue}if(r.startsWith("on:")){Dt(e,r.slice(3),o);continue}if(r.startsWith("prop:")){Qe(e,r.slice(5),o);continue}if(r.startsWith("attr:")){Ye(e,r.slice(5),o,n);continue}if(r.startsWith("bool:")){jt(e,r.slice(5),o);continue}if(r.startsWith("on")&&r.length>2){let s=r.slice(2).toLowerCase();if(typeof o=="function")if(Ze.has(s)){e[`$$${s}`]=o;let i=`__fx_${s}`;if(!e[i]){let u=a=>{e[`$$${s}`]?.(a)};e.addEventListener(s,u),e[i]=u}}else e[`$$${s}`]=o,Je.has(s)||Pt([s]);continue}if(r==="class"||r==="className"){Te(e,o);continue}if(r==="classList"){typeof o=="function"?b(()=>Ee(e,o())):Ee(e,o);continue}if(r==="style"){typeof o=="function"?b(()=>Ae(e,o())):Ae(e,o);continue}if(r==="innerHTML"){if(typeof o=="function"){let s=T(()=>{let i=o();for(;typeof i=="function";)i=i();e.innerHTML=i});S(()=>s())}else e.innerHTML=o;continue}if(r==="value"&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA")){if(typeof o=="function"){let s=T(()=>{let i=o();for(;typeof i=="function"&&i.length===0;)i=i();document.activeElement!==e&&(e.value=i??"")});S(()=>{s()})}else b(()=>{document.activeElement!==e&&(e.value=t[r]??"")});continue}if(r==="checked"&&e.tagName==="INPUT"){if(typeof o=="function"){let s=T(()=>{let i=o();for(;typeof i=="function"&&i.length===0;)i=i();document.activeElement!==e&&(e.checked=i??"")});S(()=>{s()})}else b(()=>{document.activeElement!==e&&(e.checked=t[r]??"")});continue}if(r==="value"&&e.tagName==="SELECT"){if(typeof o=="function"){let s=!0,i=T(()=>{let u=o();for(;typeof u=="function"&&u.length===0;)u=u();s?(s=!1,queueMicrotask(()=>{e.value=u??""})):e.value=u??""});S(()=>{i()})}else{let s=!0;b(()=>{let i=t[r];s?(s=!1,queueMicrotask(()=>{e.value=i??""})):e.value=i??""})}continue}if(typeof o=="function"){let s=T(()=>{let i=o();for(;typeof i=="function"&&i.length===0;)i=i();De(e,r,i,n)});S(()=>{s()})}else b(()=>De(e,r,t[r],n))}}}function ti(...e){let t=r=>{for(let o=e.length-1;o>=0;o--){let s=e[o];if(s&&r in s&&s[r]!==void 0)return s[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 s of Reflect.ownKeys(o))r.add(s);return[...r]},getOwnPropertyDescriptor:(r,o)=>n(o)?{enumerable:!0,configurable:!0,get:()=>t(o)}:void 0})}function ni(e,...t){let n=new Set;for(let i of t)for(let u of i)n.add(u);let r=i=>({enumerable:!0,configurable:!0,get:()=>e[i]}),o=t.map(i=>{let u=new Set(i);return new Proxy({},{get:(a,l)=>u.has(l)?e[l]:void 0,has:(a,l)=>u.has(l)&&l in e,ownKeys:()=>Array.from(u).filter(a=>a in e),getOwnPropertyDescriptor:(a,l)=>u.has(l)&&l in e?r(l):void 0})}),s=new Proxy({},{get:(i,u)=>n.has(u)?void 0:e[u],has:(i,u)=>!n.has(u)&&u in e,ownKeys:()=>Reflect.ownKeys(e).filter(i=>!n.has(i)),getOwnPropertyDescriptor:(i,u)=>!n.has(u)&&u in e?r(u):void 0});return[...o,s]}function Ne(e,t){if(e){if(G(e)){let n=t,r=e;if(!n)return;typeof n=="function"?n(r):typeof n=="object"&&"current"in n&&(n.current=r);return}typeof e=="function"?e(t):typeof e=="object"&&"current"in e&&(e.current=t)}}function ri(e,t,n){let r=t||document.body,o=Ue(()=>e),s=[];return w(()=>{let i=b(()=>{let u=o();Array.isArray(u)?(u.forEach(a=>r.appendChild(a)),s.push(()=>{u.forEach(a=>{a.parentNode===r&&r.removeChild(a)})})):G(u)&&(r.appendChild(u),s.push(()=>{u.parentNode===r&&r.removeChild(u)}))});s.push(i),S(()=>{s.forEach(u=>u())})}),null}function oi(e){return typeof e=="string"&&e.toLowerCase()===e}function $t(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 si(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function we(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function ii(e){return typeof e=="function"&&e.length===0&&E(e)}function It(e,t,n){if(!t)throw new Error("Container element is required");let r,o,s=[];return O(i=>{w(()=>{d.active||(t.textContent=""),Bn(t),Kn(),L(t,e)}),o=i}),()=>{o?.(),r?.(),s.forEach(i=>i()),t.textContent=""}}var ai="__fx_dom_create_component__",X=globalThis[ai]??={fn:null};function ui(e){X.fn=e}function li(e={}){let t=e.signalSystem?.createComponent;t&&(X.fn=t)}function Ft(e,t){return X.fn?X.fn(e,t):(()=>e(t))}var ci=()=>X.fn!==null,fi=()=>X.fn!==null;function di(){X.fn=null}var et,dr={getStore:()=>et,run(e,t){let n=et;et=e;try{return t()}finally{et=n}}},Vt=dr;function Ht(e){Vt=e??dr}function ae(e={}){e.locals||(e.locals=e.request?nt(e.request):{});let t=0,n=0,r=null,o=new Map,s=new Map;return{event:e,routeData:new Map,matchedRoute:new Map,nextId:()=>`s${t++}`,nextResourceId:()=>{if(r===null)return`r${n++}`;let i=o.get(r)??0;return o.set(r,i+1),`${r}:r${i}`},nextIslandNamespace:i=>{let u=s.get(i)??0;return s.set(i,u+1),`${i}#${u}`},withResourceScope(i,u){let a=r;r=i;try{return u()}finally{r=a}},pending:new Set,data:new Map}}function ue(e,t){return Vt.run(e,t)}function $(){return Vt.getStore()}function tt(){return $()?.event}function Ut(){let e=tt();return e?(e.locals||(e.locals={}),e.locals):{}}var fr=new WeakMap;function nt(e){let t=fr.get(e);return t||(t={},fr.set(e,t)),t}var le="__FX_DATA__";function Re(e){return e.replace(/[<>&\u2028\u2029]/g,t=>"\\u"+t.charCodeAt(0).toString(16).padStart(4,"0"))}var Wt;function Ce(){let e=globalThis.__FX_DATA__;if(e)return e;if(Wt!==void 0)return Wt;let t=null;if(typeof document<"u"){let n=document.getElementById(le)?.textContent;if(n)try{t=JSON.parse(n)}catch{t=null}}return Wt=t}function rt(){for(;;){for(;d.cursor&&d.cursor.nodeType===3&&d.cursor.data==="";)d.cursor=d.cursor.nextSibling;if(d.cursor!=null||!d.parents.length)return;d.cursor=d.parents.pop().nextSibling}}var pi=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),ot=typeof process<"u"&&process.env&&!1;function st(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 hi(e){rt();let t=d.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(pi.has(e.toLowerCase())?d.cursor=t.nextSibling:(d.parents.push(t),d.cursor=t.firstChild),t):(ot&&t&&st(`<${e}>`,t),null)}function yi(e){rt();let t=d.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(d.cursor=t.nextSibling,t):(ot&&t&&st(`<${e}> (static)`,t),null)}function mi(e){if(e===""){let n=d.cursor;return n&&n.nodeType===3&&n.data!==""?(d.cursor=n.nextSibling,n.data="",n):null}rt();let t=d.cursor;return t&&t.nodeType===3?(d.cursor=t.nextSibling,t.nodeValue!==e&&(t.nodeValue=e),t):(ot&&t&&st(`text ${JSON.stringify(e.slice(0,24))}`,t),null)}function gi(e){rt();let t=d.cursor;return t&&t.nodeType===8&&t.data===e?(d.cursor=t.nextSibling,t):(ot&&t&&st(`marker <!--${e.slice(0,24)}-->`,t),null)}var pr=!1;function bi(){pr||(pr=!0,rr({hydrateElement:hi,hydrateText:mi,hydrateMarker:gi,hydrateStatic:yi}))}function it(e,t,n){bi(),d.active=!0,d.cursor=t.firstChild,d.parents=[];let r=Ce(),o=n?.resourceNamespace,s=0;He(()=>o?`${o}:r${s++}`:`r${s++}`),An(r?i=>i in r?{value:r[i]}:void 0:null);try{return It(e,t)}finally{d.active=!1,d.cursor=null,d.parents=[]}}var zt="fluixi-island";function yr(e){let{component:t,props:n={},name:r}=e,o=Mt(zt),s=r??t.name??"Island";_(o,"name",s),_(o,"props",JSON.stringify(n??{}));let i=v?$():void 0;if(i){let u=i.nextIslandNamespace(s);L(o,()=>i.withResourceScope(u,()=>t(n)))}else L(o,()=>t(n));return o}var hr=!1;function xi(){if(hr||typeof document>"u")return;hr=!0;let e=document.createElement("style");e.textContent=`${zt}{display:contents}`,document.head.appendChild(e)}function mr(e){if(typeof document>"u")return;xi();let t=document.querySelectorAll(zt),n=new Map;t.forEach(r=>{let o=r.getAttribute("name")??"",s=n.get(o)??0;n.set(o,s+1);let i=e[o];if(!i){typeof process>"u"&&console.warn(`[fluixi] island "${o}" has no component in the registry — left static.`);return}let u={};try{u=JSON.parse(r.getAttribute("props")||"{}")}catch{}it(()=>i(u),r,{resourceNamespace:`${o}#${s}`})})}function gr(e,...t){throw new Error("html`` was not compiled — enable the lit format: fluixi({ format: 'lit' }).")}function br(e,...t){throw new Error("svg`` was not compiled — enable the lit format: fluixi({ format: 'lit' }).")}function wi(e,t={}){if(typeof e=="function")return Ft(e,t);if(typeof e!="string"||e.length===0)return null;let n=$t(e);if(v)return se().createElement(e,n);let r=n?document.createElementNS(Z,e):document.createElement(e);return Lt(r,t,n),vi(r,t),r}function vi(e,t){if(!t||t.children===void 0)return;let n=Ue(()=>t.children),r=o=>{L(e,o,typeof o=="function"?null:void 0)};Array.isArray(n)?n.forEach(r):r(n)}function xr(e){return typeof e=="function"?e:(()=>e)}function W(e){return()=>{let t=e();return typeof t=="function"?t():t}}function wr(e){return e!=null&&e!==!1}function vr(e){return!e||typeof e!="object"?!1:!!(typeof e._$litType$<"u"||typeof e._$litDirective$<"u"||Array.isArray(e.strings)&&Array.isArray(e.values))}function Sr(e){let t=W(()=>e.when),n=m(t,void 0),r=m(n,void 0),o=I(),s=null,i=null,u=a=>{a!==i&&(s&&te(s),s=ee(o),i=a)};return m(()=>{let a=r();return u(a?"when":"fallback"),k(s,()=>{if(a){let l=e.children;return typeof l=="function"&&!vr(l)?typeof n=="function"?A(()=>A(n)?l(n()):e.fallback):l(n):l}return e.fallback});return e.fallback??null},void 0,{name:"show"})}function Tr(e){let t=W(()=>e.each),n=()=>e.fallback??null,r=(o,s)=>{let i=e.children,u=Array.isArray(i)?i.map(a=>typeof a=="function"?a(o,s):a):typeof i=="function"?i(o,s):i;return ie(u),u};return e.by?Fe(t,e.by,(o,s)=>r(o,s),{fallback:n}):Ie(t,(o,s)=>r(o,s),{fallback:n})}function Er(e){let t=W(()=>e.each);return Ve(t,(n,r)=>{let o=e.children(n,r);return ie(o),o},{fallback:()=>e.fallback??null})}var Bt=Symbol("match");function Ar(e){return{[Bt]:!0,when:W(()=>e.when),get children(){return e.children}}}function Nr(e){let t=Array.isArray(e.children)?e.children:[e.children],n=I(),r=null,o=-1,s=i=>{i!==o&&(r&&te(r),r=ee(n),o=i)};return m(()=>{for(let i=0;i<t.length;i+=1){let a=t[i],l=0;for(;typeof a=="function"&&!a[Bt]&&l++<10;)a=a();if(!a||typeof a!="object"||a[Bt]!==!0)continue;let c=a.when();if(wr(c))return s(i),k(r,()=>typeof a.children=="function"?a.children(c):a.children)}return s(-2),k(r,()=>e.fallback??null)})}function Rr(e){let t=xr(e.component),{component:n,...r}=e,o=I(),s=null,i;return m(()=>{let u=t();return u!==i&&(s&&te(s),s=ee(o),i=u),u==null?null:typeof u=="string"?{tag:u,props:r}:k(s,()=>u(r))})}function Cr(e){let t=()=>e.mount?typeof e.mount=="function"?e.mount():e.mount:document.body,n,r;return O(o=>{n=o,r=document.createElement("div"),r.style.display="contents",t().appendChild(r),L(r,e.children)&&Ne(e.ref,r)}),S(()=>{n(),r.remove()}),null}function Kt(e){if(v)return e.fallback??null;let t=d.active,[n,r]=g(!t);return t&&queueMicrotask(()=>r(!0)),m(()=>n()?e.children:e.fallback??null,void 0,{name:"client-only"})}var _r=Kt;function kr(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(s){return n(s),typeof e.fallback=="function"?e.fallback(s,r):e.fallback}})}function Or(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(" ")})}function Si(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Pr(e){return m(()=>{let t=typeof e=="function"?e():e,n=[];for(let[r,o]of Object.entries(t)){if(!r)continue;let s=typeof o=="function"?o():o;s!=null&&n.push(`${Si(r)}: ${s}`)}return n.join("; ")})}var ut=1,Jt=3,Yt=8,Mr;Mr=be;var ce=class{constructor(){this[Mr]=!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(){}},J=class e extends ce{constructor(n){super();this.nodeType=Jt;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)}},at=class e extends ce{constructor(n){super();this.nodeType=ut;this.rawOuterHTML=n}get textContent(){return this.rawOuterHTML.replace(/<[^>]*>/g,"")}cloneNode(){return new e(this.rawOuterHTML)}},fe=class e extends ce{constructor(n){super();this.nodeType=Yt;this.data=n}get nodeValue(){return this.data}set nodeValue(n){this.data=n==null?"":String(n)}cloneNode(){return new e(this.data)}},Gt=class{constructor(){this.cssText=""}setProperty(t,n){this[t]=n}removeProperty(t){delete this[t]}},Xt=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}},Y=class e extends ce{constructor(n,r=!1){super();this.nodeType=ut;this.attributes=new Map;this.style=new Gt;this.classList=new Xt(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 J(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 Ti=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),qr=/&/g,jr=/</g,Lr=/>/g,Ei=/"/g;function Qt(e){return e.replace(qr,"&amp;").replace(jr,"&lt;").replace(Lr,"&gt;")}function Dr(e){return e.replace(qr,"&amp;").replace(Ei,"&quot;").replace(jr,"&lt;").replace(Lr,"&gt;")}function Ai(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}function Ni(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(`${Ai(n)}: ${r}`)}return t.join("; ")}function Ri(e){let t="",n=Ni(e.style);for(let[r,o]of e.attributes)r==="style"&&n||(t+=` ${r}="${Dr(o)}"`);if(n){let r=e.attributes.get("style"),o=r?`${r.replace(/;\s*$/,"")}; ${n}`:n;t+=` style="${Dr(o)}"`}return t}function D(e){if(e==null||e===!1||e===!0)return"";if(typeof e=="string")return Qt(e);if(typeof e=="number")return Qt(String(e));if(typeof e=="function")return D(e());if(Array.isArray(e))return e.map(D).join("");if(typeof e.rawOuterHTML=="string")return e.rawOuterHTML;switch(e.nodeType){case Jt:return Qt(e.data??"");case Yt:return`<!--${e.data??""}-->`;case ut:{let t=e.localName,n=`<${t}${Ri(e)}>`;if(Ti.has(t))return n;let r=e.rawHTML!=null?e.rawHTML:(e.childNodes??[]).map(D).join("");return`${n}${r}</${t}>`}}return Array.isArray(e.childNodes)?e.childNodes.map(D).join(""):""}var Ci=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),_i={amp:"&",lt:"<",gt:">",quot:'"',"#39":"'"};function $r(e){return e.replace(/&(#?\w+);/g,(t,n)=>_i[n]??t)}var q=class extends Error{};function Ir(e,t=!1){let n=0,r=[],o=[],s=l=>{let c=o[o.length-1];c?c.appendChild(l):r.push(l)};for(;n<e.length;){let l=e.indexOf("<",n);if(l===-1){u(e.slice(n));break}if(l>n&&u(e.slice(n,l)),e.startsWith("<!--",l)){let c=e.indexOf("-->",l);if(c===-1)throw new q(`unterminated comment at ${l}`);s(new fe(e.slice(l+4,c))),n=c+3;continue}if(e[l+1]==="/"){let c=e.indexOf(">",l);if(c===-1)throw new q(`unterminated closing tag at ${l}`);let f=e.slice(l+2,c).trim().toLowerCase(),h=o.pop();if(!h||h.localName!==f)throw new q(`</${f}> does not close <${h?.localName??"nothing"}>`);n=c+1;continue}n=a(l)}if(o.length>0)throw new q(`unclosed <${o[o.length-1].localName}>`);let i=r[0];if(r.length!==1||!(i instanceof Y))throw new q(`expected exactly one root element, got ${r.length}`);return i;function u(l){l!==""&&s(new J($r(l)))}function a(l){let c=/[\s/>]/.exec(e.slice(l+1));if(!c)throw new q(`unterminated tag at ${l}`);let f=e.slice(l+1,l+1+c.index).toLowerCase(),h=new Y(f,t),y=l+1+c.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 N=y;for(;y<e.length&&!/[\s=/>]/.test(e[y]);)y++;let x=e.slice(N,y);if(x==="")throw new q(`malformed attribute at ${y}`);if(e[y]==="="){if(e[y+1]!=='"')throw new q(`attribute ${x} must have a double-quoted value`);let j=e.indexOf('"',y+2);if(j===-1)throw new q(`unterminated value for ${x}`);h.setAttribute(x,$r(e.slice(y+2,j))),y=j+1}else h.setAttribute(x,"")}return s(h),Ci.has(f)||o.push(h),y}}var Fr=!1;function Hr(){Fr||(Fr=!0,tr({createElement:(e,t)=>new Y(e,t),createText:e=>new J(e),createRaw:e=>new at(e),parseTemplate:(e,t)=>Ir(e,t),createComment:e=>new fe(e)}))}function en(e,t={}){let n=v;Hr(),K(!0);let r=ae(t.event);try{return ue(r,()=>O(o=>{try{let s=typeof e=="function"?e():e;return D(s)}finally{o()}}))}finally{K(n)}}var Vr=!1;function ki(){Vr||(Vr=!0,En(e=>{$()?.pending.add(e)}),He(()=>$()?.nextResourceId()??""),Nn((e,t)=>{e&&$()?.data.set(e,t)}))}var Zt=null;function tn(e){Zt=e}function lt(e){if(e.data.size===0)return"";let t={};for(let[r,o]of e.data){let s=o;if(Zt)try{s=Zt(o,r)}catch{continue}s!==void 0&&(typeof s=="function"||typeof s=="symbol"||(t[r]=s))}if(Object.keys(t).length===0)return"";let n=Re(JSON.stringify(t));return n==="{}"?"":`<script type="application/json" id="${le}">${n}<\/script>`}var Oi=50;async function nn(e,t={}){let n=v;Hr(),K(!0),ki();let r=ae(t.event);try{return await ue(r,async()=>{t.preload&&await t.preload(t.event);let o,s=null,i=()=>{};O(c=>{i=c,s=I(),o=typeof e=="function"?e():e});let u=()=>{try{k(s,()=>D(o))}catch{}};u();let a=0;for(;r.pending.size>0&&a++<Oi;){let c=Array.from(r.pending);r.pending.clear(),await Promise.allSettled(c),await Tn(),u()}let l=k(s,()=>D(o))+lt(r);return i(),l})}finally{K(n)}}var on=Symbol("store-raw"),Ur=Symbol("store-node"),Wr=Symbol("store-has"),zr=Symbol("store-self"),Br=Symbol("store-track");var Kr=new WeakMap,Gr=new WeakMap;function Zr(e){let[t,n]=g(e),r=t;return r.$=n,r}function ft(e){let t=Kr.get(e);return t||Kr.set(e,t={keys:new Map}),t}function Xr(e,t,n){let r=e.keys.get(t);return r||e.keys.set(t,r=Zr(n)),r}function Jr(e){let t=ft(e);(t.all||(t.all=Zr()))()}function Yr(e,t){e.$(typeof t=="function"?()=>t:t)}function eo(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 ct(e){if(!eo(e))return e;let t=Gr.get(e);if(t)return t;let n=new Proxy(e,Pi);return Gr.set(e,n),n}var Pi={get(e,t,n){if(t===on||t===Ur)return e;if(t===ne)return n;if(t===Wr)return i=>i in e;if(t==="__proxy")return!0;if(t===Br||t===zr)return Jr(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 s=Xr(ft(e),t,r)();return eo(s)?ct(s):s},set(){return!0},deleteProperty(e,t){return t in e&&_e(e,t,void 0),!0},has(e,t){return t===on||t===ne||t===Ur||t===Wr||t===zr||t===Br?!0:(Xr(ft(e),t,e[t])(),t in e)},ownKeys(e){return Jr(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function _e(e,t,n){if(e[t]===n&&(n!==void 0||t in e))return;let r=Array.isArray(e),o=r?e.length:0;n===void 0?delete e[t]:e[t]=n;let s=ft(e),i=s.keys.get(t);if(i&&Yr(i,n),r&&e.length!==o){let u=s.keys.get("length");u&&Yr(u,e.length)}s.all&&s.all.$(void 0)}function Qr(e,t){return typeof e=="function"?e(t):e}function sn(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)?sn(o,r):_e(e,n,r)}}function un(e){let t=[],n=e.replace(/\[([^\]]*)\]/g,".$1");for(let r of n.split("."))r.length&&t.push(r);return t}function to(e,t,n){let r=t.length-1;for(let s=0;s<r;s++){let i=t[s];if(i==="*"){let a=t.slice(s+1);if(Array.isArray(e))for(let l=0;l<e.length;l++)to(e[l],a,n);return}let u=e[i];(u==null||typeof u!="object")&&(u=/^\d+$/.test(t[s+1])?[]:{},_e(e,i,u)),e=u}let o=t[r];if(o==="*"){if(Array.isArray(e))for(let s=0;s<e.length;s++)_e(e,s,Qr(n,e[s]));return}_e(e,o,Qr(n,e[o]))}function rn(e,t,n){to(e,un(t),n)}function Mi(e,t){let n=t[0];if(typeof n=="function"&&t.length===1){let r=n(e);r&&r!==e&&sn(e,r);return}if(Array.isArray(n)&&t.length===1){for(let r of n)Array.isArray(r)&&rn(e,r[0],r[1]);return}if(n&&typeof n=="object"&&!Array.isArray(n)&&t.length===1){sn(e,n);return}if(Array.isArray(t[1])&&t.length>=3){rn(e,`${n}.${t[1].join(".")}`,t[2]);return}rn(e,String(n),t[1])}function an(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(an);let t={};for(let n of Object.keys(e))t[n]=an(e[n]);return t}function de(e,t){let n=e;for(let r of un(t)){if(n==null)return;n=n[r]}return n}var no=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...n)=>w(()=>Mi(this.root,n)))}get state(){return ct(this.root)}get proxy(){return ct(this.root)}get accessor(){return(()=>ct(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return dt(this.state);let t=this.state;for(let n of un(e)){if(t==null)return;t=t[n]}return dt(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=an(t);return e(n),n}))}reconcile(e,t={}){this.set(e)}push(e,...t){let n=de(this.root,e);this.set(e,n.concat(t))}pop(e){let t=de(this.root,e).slice(),n=t.pop();return this.set(e,t),n}shift(e){let t=de(this.root,e).slice(),n=t.shift();return this.set(e,t),n}splice(e,t,n,...r){let o=de(this.root,e).slice(),s=o.splice(t,n,...r);return this.set(e,o),s}insert(e,t,n){let r=de(this.root,e).slice();r.splice(t,0,n),this.set(e,r)}removeAt(e,t){let n=de(this.root,e).slice(),r=n.splice(t,1);return this.set(e,n),r}toObservable(){let[e]=g(this.state);return e.toObservable()}dispose(){}},Di=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","unwrap","toObservable"];function qi(e,t){for(let n of Di)e[n]=t[n].bind(t);e.$=t.reactive.bind(t)}function ln(e,t={immutable:!0}){let n=new no(e,t);return qi(n.set,n),[n.proxy,n.set]}function ji(e,t={}){return new no(e,{...t,immutable:!1})}function dt(e){if(e==null||typeof e!="object")return e;let t=e[on];return t!==void 0?t:e}function Li(e){return A(()=>dt(e))}var wl=Object.freeze({createStore:ln,createMutableStore:ji,batch:w,unwrap:dt,untrackStore:Li});return lo($i);})();
1
+ "use strict";var FluixiDOM=(()=>{var pt=Object.defineProperty;var oo=Object.getOwnPropertyDescriptor;var so=Object.getOwnPropertyNames;var io=Object.prototype.hasOwnProperty;var ao=(e,t)=>{for(var n in t)pt(e,n,{get:t[n],enumerable:!0})},uo=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of so(t))!io.call(e,o)&&o!==n&&pt(e,o,{get:()=>t[o],enumerable:!(r=oo(t,o))||r.enumerable});return e};var lo=e=>uo(pt({},"__esModule",{value:!0}),e);var Ii={};ao(Ii,{ClientOnly:()=>Kt,Dynamic:()=>Rr,ErrorBoundary:()=>kr,FX_DATA_ID:()=>le,For:()=>Tr,Index:()=>Er,Island:()=>yr,JSX_PROPERTIES:()=>qe,Match:()=>Ar,NoSsr:()=>_r,Portal:()=>Cr,SVG_ELEMENTS:()=>mo,SVG_NAMESPACE:()=>Q,Show:()=>Sr,Switch:()=>Nr,VOID_ELEMENTS:()=>yo,addClass:()=>xo,addDelegatedEventListener:()=>ar,addNativeEventListener:()=>Dt,appendChildren:()=>Co,applyElementProp:()=>De,applyProps:()=>Lt,applyUse:()=>qt,asComponent:()=>Ds,asContext:()=>Ms,asOutlet:()=>Os,asProvider:()=>Ps,asRoute:()=>ks,asRouter:()=>Cs,asRoutes:()=>_s,asSuspense:()=>qs,batch:()=>w,bindPair:()=>ai,captureHydrationCursor:()=>or,checkRenderType:()=>js,classMap:()=>Or,cleanChildren:()=>H,cloneTemplate:()=>lr,closest:()=>bo,createComponent:()=>Ft,createComputed:()=>Sn,createContext:()=>Le,createDynamicElement:()=>vi,createEffect:()=>T,createElement:()=>No,createMemo:()=>m,createNativeElement:()=>Mt,createPortal:()=>ri,createRenderEffect:()=>b,createRequestContext:()=>ae,createResource:()=>Rn,createRoot:()=>O,createSignal:()=>g,createStore:()=>ln,createTemplate:()=>ur,delegate:()=>Po,delegateEvents:()=>Pt,escapeFxJson:()=>Re,escapeHTML:()=>si,fnName:()=>Xs,generateID:()=>Fs,getAttribute:()=>To,getGlobal:()=>Ho,getLitEventName:()=>po,getLocals:()=>Ut,getOffset:()=>Oo,getRequestContext:()=>$,getRequestEvent:()=>tt,getRequestLocals:()=>nt,getServerData:()=>Ce,getStableElementId:()=>Is,getStyle:()=>Ao,handleRef:()=>Ne,hasClass:()=>So,holeContent:()=>Gs,holeEnd:()=>Ks,holeScope:()=>Bs,html:()=>gr,hydrate:()=>it,hydrateAdvancePast:()=>ie,hydrateIslands:()=>mr,indexArray:()=>Ve,initializeIntegration:()=>ci,insert:()=>L,insertExpression:()=>ve,intergartionInitialized:()=>fi,isAccessor:()=>ii,isComponent:()=>M,isContext:()=>Qn,isCustomElement:()=>dn,isDOMNode:()=>Fo,isDelegatedEvent:()=>Us,isDomElement:()=>Ke,isDomNode:()=>G,isDomText:()=>Ge,isEventHandler:()=>fo,isFunction:()=>Ws,isIntegrationInitialized:()=>di,isJSXTemplate:()=>Io,isLitTemplateResult:()=>hn,isNativeElement:()=>oi,isOutlet:()=>Yn,isPromise:()=>we,isProvider:()=>Zn,isReactElement:()=>Lo,isRoute:()=>Jn,isRouter:()=>Gn,isRoutes:()=>Xn,isSVGElement:()=>$t,isServer:()=>v,isSuspense:()=>er,isTemplateFactory:()=>$o,isVisible:()=>_o,iterateFn:()=>Js,keyArray:()=>Fe,makeArrayFlat:()=>cr,mapArray:()=>Ie,mergeProps:()=>ti,observeIntersection:()=>Do,observeResize:()=>qo,onCleanup:()=>S,query:()=>ht,queryAll:()=>go,registerCreateComponent:()=>li,registerGlobal:()=>Vo,removeAttribute:()=>Eo,removeChildren:()=>Ro,removeClass:()=>wo,removeDelegatedEventListener:()=>Ot,render:()=>It,renderToString:()=>en,renderToStringAsync:()=>nn,resetIntegration:()=>pi,runHydrationAt:()=>xe,runWithRequestContext:()=>ue,runWithoutHydration:()=>sr,scrollIntoView:()=>ko,serializeNode:()=>D,serializeResourceData:()=>lt,setAttribute:()=>_,setClassList:()=>Ee,setClassName:()=>Te,setDataRedactor:()=>tn,setDynamicAttribute:()=>Ye,setDynamicBoolAttribute:()=>jt,setDynamicProperty:()=>Ze,setProperty:()=>Se,setRequestStore:()=>Ht,setServerMode:()=>K,setStyle:()=>Ae,setStyles:()=>pn,shouldSetAsProperty:()=>ho,splitProps:()=>ni,spread:()=>ei,styleMap:()=>Pr,svg:()=>br,templateNode:()=>zs,toAttributeName:()=>co,toggleClass:()=>vo,untrack:()=>A,useContext:()=>xn,waitForElement:()=>Mo});function co(e){return e.startsWith("aria-")||e.startsWith("data-")?e:/[A-Z]/.test(e)?e.replace(/([A-Z])/g,"-$1").toLowerCase():e}function fo(e){return e.startsWith("@")||e.startsWith("on")&&e.length>2}function po(e){return e.startsWith("@")?e.slice(1):e.startsWith("on")?e.slice(2).toLowerCase():e}function ho(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 yo=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),mo=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"]),Q="http://www.w3.org/2000/svg";function dn(e){return e.localName.includes("-")}function De(e,t,n,r=!1){if(n==null){e.removeAttribute(t);return}if(dn(e)){e[t]=n;return}_(e,t,n,r)}var qe=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]);function ht(e,t=document){return t.querySelector(e)}function go(e,t=document){return Array.from(t.querySelectorAll(e))}function bo(e,t){return e.closest(t)}function xo(e,...t){e.classList.add(...t)}function wo(e,...t){e.classList.remove(...t)}function vo(e,...t){t.forEach(n=>e.classList.toggle(n))}function So(e,t){return e.classList.contains(t)}function _(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 To(e,t){return e.getAttribute(t)}function Eo(e,t){e.removeAttribute(t)}function pn(e,t){Object.assign(e.style,t)}function Ao(e,t){return window.getComputedStyle(e).getPropertyValue(t)}function No(e,t={},...n){let r=document.createElement(e);return Object.entries(t).forEach(([o,s])=>{if(o==="class"||o==="className")r.className=s;else if(o==="style"&&typeof s=="object")pn(r,s);else if(o.startsWith("on")&&typeof s=="function"){let i=o.slice(2).toLowerCase();r.addEventListener(i,s)}else _(r,o,s)}),n.forEach(o=>{typeof o=="string"?r.appendChild(document.createTextNode(o)):r.appendChild(o)}),r}function Ro(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function Co(e,...t){t.forEach(n=>{typeof n=="string"?e.appendChild(document.createTextNode(n)):e.appendChild(n)})}function _o(e){let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=window.innerHeight&&t.right<=window.innerWidth}function ko(e,t={behavior:"smooth",block:"nearest"}){e.scrollIntoView(t)}function Oo(e){let t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}}function Po(e,t,n,r){let o=s=>{let i=s.target.closest(n);i&&e.contains(i)&&r(s,i)};return e.addEventListener(t,o),()=>{e.removeEventListener(t,o)}}function Mo(e,t=5e3){return new Promise((n,r)=>{let o=ht(e);if(o){n(o);return}let s=new MutationObserver(()=>{let u=ht(e);u&&(s.disconnect(),clearTimeout(i),n(u))});s.observe(document.body,{childList:!0,subtree:!0});let i=setTimeout(()=>{s.disconnect(),r(new Error(`Element ${e} not found within ${t}ms`))},t)})}function Do(e,t,n={}){let r=new IntersectionObserver(o=>{o.forEach(s=>{t(s.isIntersecting)})},n);return r.observe(e),()=>{r.disconnect()}}function qo(e,t){let n=new ResizeObserver(r=>{r.forEach(t)});return n.observe(e),()=>{n.disconnect()}}var jo=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function Lo(e){return typeof e=="object"&&e!==null&&e.$$typeof===jo}function hn(e){return e&&typeof e=="object"&&e.strings&&Array.isArray(e.strings)&&e.values&&Array.isArray(e.values)}function $o(e){if(typeof e!="function")return!1;try{let t=e();return hn(t)}catch{return!1}}function Io(e){return typeof e=="object"&&e!==null&&(e.$$typeof==="template"||typeof e.type=="function")}function Fo(e){return e instanceof Node}function Vo(e,t,n="Fluixi"){typeof globalThis<"u"&&(typeof globalThis[n]>"u"&&(globalThis[n]={}),typeof globalThis[n][e]>"u"&&(globalThis[n][e]=t))}function Ho(e,t,n="Fluixi"){return typeof globalThis<"u"&&typeof globalThis[n]<"u"&&typeof globalThis[n][e]<"u"?globalThis[n][e]:t}var Uo="__fluixi_signal_next_state__",Wo=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},p=globalThis[Uo]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Wo,onSuspend:null,onError:null},yn=0,mn=1,ye=2,gn=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(p.untracked)return;let e=p.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}},zo=class extends gn{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++,this.observers)for(let t of[...this.observers])t.markDirty(ye);mt(this)}}peek(){return this._value}},bn=class extends gn{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=ye,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(p.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===mn&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===ye)break}(this.state===ye||!this._initialized)&&this.recompute(),this.state=yn}recompute(){if(this.sources){for(let i of this.sources)i.observers?.delete(this);this.sources.clear()}let e=p.consumer,t=p.untracked;p.consumer=this,p.untracked=!1;let n,r=!1,o;try{n=this._fn()}catch(i){r=!0,o=i,n=this._value}finally{p.consumer=e,p.untracked=t}let s=!this._initialized||this._threw!==r||(r?o!==this._error:!this._equals(this._value,n));if(this._initialized=!0,this._threw=r,this._error=o,this._value=n,s){if(this.version++,this.observers)for(let i of[...this.observers])i.markDirty(ye);mt(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===yn;if(this.state=e,t){if(this.observers)for(let n of[...this.observers])n.markDirty(mn);mt(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function mt(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}var Bo=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 Ko(e){if(p.untracked)return e();p.untracked=!0;try{return e()}finally{p.untracked=!1}}function ee(e){let t=je(e);return e&&(e.owned??=[]).push(t),t}function te(e,t=!0){me(e,t)}function je(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function Le(e){let t=Symbol("context");return{id:t,defaultValue:e,Provider:n=>{let r=p.owner,o=je(r);(o.contexts=new Map).set(t,n.value),r&&(r.owned??=[]).push(o),p.owner=o;try{return n.children}finally{p.owner=r}}}}function xn(e){let t=p.owner;for(;t;){if(t.contexts&&t.contexts.has(e.id))return t.contexts.get(e.id);t=t.parent}return e.defaultValue}function wn(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 Go(e){p.onSuspend=e}function Xo(e){return p.onSuspend?(p.onSuspend(e,p.owner),!0):!1}function Jo(e){p.onError=e}function I(){return p.owner}function k(e,t){let n=p.owner;p.owner=e;try{return t()}finally{p.owner=n}}function S(e){if(p.owner){if(p.owner.disposed){e();return}(p.owner.cleanups??=[]).push(e)}}function me(e,t=!0){if(!e.disposed){if(e.owned){for(let n=e.owned.length-1;n>=0;n--)me(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 O(e){let t=je(p.owner);p.owner&&(p.owner.owned??=[]).push(t);let n=p.owner;p.owner=t;try{return e(()=>me(t))}finally{p.owner=n}}function Yo(e){p.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Zo(e){e.queued||(e.queued=!0,p.queue.push(e),!p.scheduled&&p.batchDepth===0&&(p.scheduled=!0,p.hostSchedule($e)))}function $e(){if(p.scheduled=!1,p.flushing)return;p.flushing=!0;let e=0;try{for(;p.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let t=p.queue;p.queue=[];for(let n of t)n.queued=!1,n.disposed||n.run()}}finally{p.flushing=!1}}function Qo(){p.batchDepth===0&&$e()}function es(e){p.batchDepth++;try{return e()}finally{--p.batchDepth===0&&$e()}}var ts=class{constructor(e){this.queued=!1,this.disposed=!1,this.owner=je(p.owner),p.owner&&(p.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new bn(()=>{me(this.owner,!1),k(this.owner,()=>{let t=e();typeof t=="function"&&(this.owner.cleanups??=[]).push(t)})}),this.watcher=new Bo(()=>Zo(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"&&p.onSuspend){p.onSuspend(e,this.owner);return}if(p.onError&&p.onError(e,this.owner))return;throw e}}}dispose(){this.disposed||(this.disposed=!0,this.watcher.unwatch(this.computed),me(this.owner))}};function St(e){let t=new ts(e);return()=>t.dispose()}function ns(e){return!!e&&typeof e.then=="function"}Yo(()=>{});var vn=Symbol.for("signal"),rs=Symbol.for("memo"),os=Symbol.for("signal-node");function g(e,t){let n=new zo(e,{equals:t?.equals}),r=(()=>n.get()),o=(s=>{let i=typeof s=="function"?s(n.peek()):s;return n.set(i),Qo(),i});return Object.defineProperty(r,vn,{value:!0,enumerable:!0}),Object.defineProperty(r,os,{value:{get value(){return n.peek()},get version(){return n.version}},enumerable:!1}),[r,o]}function m(e,t,n){let r=t,o=I(),s=new bn(()=>k(o,()=>{try{return r=e(r)}catch(u){if(ns(u))return Xo(u),r;throw u}}),{equals:n?.equals}),i=(()=>s.get());return Object.defineProperty(i,vn,{value:!0,enumerable:!0}),Object.defineProperty(i,rs,{value:!0,enumerable:!0}),i}function T(e,t){let n=t;return St(()=>{n=e(n)})}function Sn(e,t){let n=t;St(()=>{n=e(n)})}function b(e,t){let n=t;return St(()=>{n=e(n)})}function w(e){return es(e)}function A(e){return Ko(e)}function Tn(){return $e(),Promise.resolve()}function Ie(e,t,n){let r=[];return S(()=>{for(let o of r)o.dispose();r=[]}),m(()=>{let o=e()||[];return A(()=>{if(o.length===0){for(let a of r)a.dispose();return r=[],n?.fallback?n.fallback():[]}let s=new Map;for(let a of r)s.has(a.item)||s.set(a.item,a);let i=[],u=new Set;for(let a=0;a<o.length;a++){let l=o[a],c=s.get(l);if(c&&!u.has(c))c.setIndex(a),i.push(c),u.add(c);else{let f,h,y;O(x=>{y=x;let[j,pe]=g(a);h=pe,f=t(l,j)});let N={item:l,rendered:f,dispose:y,setIndex:h};i.push(N),u.add(N)}}for(let a of r)u.has(a)||a.dispose();return r=i,i.map(a=>a.rendered)})})}function Fe(e,t,n,r){let o=[],s=[];return S(()=>{for(let i of s)i.dispose();o=[],s=[]}),m(()=>{let i=e()||[];return A(()=>{if(i.length===0){for(let f of s)f.dispose();return o=[],s=[],r?.fallback?r.fallback():[]}let u=new Map;for(let f=0;f<o.length;f++)u.set(o[f],s[f]);let a=[],l=[],c=new Set;for(let f=0;f<i.length;f++){let h=t(i[f]),y=u.get(h);if(y&&!c.has(h))y.setIndex(f),a.push(y);else{let N,x,j;O(pe=>{j=pe;let[z,he]=g(f);x=he;let ke=m(Z=>(e()||[])[z()]??Z,i[f]);N=n(ke,z)}),a.push({rendered:N,dispose:j,setIndex:x})}l.push(h),c.add(h)}for(let[f,h]of u)c.has(f)||h.dispose();return o=l,s=a,a.map(f=>f.rendered)})})}function Ve(e,t,n){let r=[];return S(()=>{for(let o of r)o.dispose();r=[]}),m(()=>{let o=e()||[];return A(()=>{if(o.length===0){for(let a of r)a.dispose();return r=[],n?.fallback?n.fallback():[]}let s=r.length,i=o.length;for(let a=s;a<i;a++){let l,c,f,h=o[a];O(y=>{f=y;let[N,x]=g(h);c=x,l=t(N,a)}),r.push({rendered:l,setItem:c,dispose:f})}for(let a=i;a<s;a++)r[a].dispose();i<s&&(r=r.slice(0,i));let u=Math.min(s,i);for(let a=0;a<u;a++)r[a].setItem(o[a]);return r.map(a=>a.rendered)})})}var ss=Symbol.for("signal");function E(e){return typeof e=="function"&&e[ss]===!0}var gt=null;function En(e){gt=e}function is(e){gt&&gt(e)}var bt=null;function An(e){bt=e}function as(e){return bt?bt(e):void 0}var xt=null;function He(e){xt=e}function us(){return xt?xt():void 0}var wt=null;function Nn(e){wt=e}function ls(e,t){wt&&wt(e,t)}function cs(e){return!!e&&typeof e.then=="function"}var yt=Symbol();function Rn(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 s=n.transport===!1?void 0:us(),i=s!==void 0?as(s):void 0,u=i!==void 0,[a,l]=g(i!==void 0?i.value:n.initialValue,{equals:!1}),[c,f]=g(void 0,{equals:!1}),[h,y]=g(i!==void 0||n.initialValue!==void 0?"ready":"unresolved",{equals:!1}),[N,x]=g(void 0,{equals:!1}),[j,pe]=g(void 0,{equals:!1}),z=yt,he=!1;T(()=>{let R=r();if(j(),R===!1||R===null||R===void 0){z=yt,w(()=>{y("unresolved"),x(void 0),f(void 0)});return}let Oe=he;if(he=!1,z!==yt&&R===z&&!Oe)return;if(z=R,u){u=!1;return}let Pe=!1;S(()=>Pe=!0);let cn=A(h),ro=A(a),fn=cn==="ready"||cn==="refreshing";w(()=>{y(fn?"refreshing":"pending"),f(void 0)});try{let B=o(R,{value:ro,refetching:fn});cs(B)?(x(B),is(B),B.then(Me=>{Pe||(s!==void 0&&ls(s,Me),w(()=>{l(()=>Me),y("ready"),x(void 0)}))},Me=>{Pe||w(()=>{f(Me),y("errored"),x(void 0)})})):w(()=>{l(()=>B),y("ready"),x(void 0)})}catch(B){if(Pe)return;w(()=>{f(B),y("errored"),x(void 0)})}});let ke=()=>{let R=h();return R==="pending"||R==="refreshing"},Z=(()=>{let R=c();if(R)throw R;if(ke()){let Oe=N();if(Oe)throw Oe}return a()});return Object.defineProperties(Z,{state:{get:h},loading:{get:ke},error:{get:c},latest:{get:a}}),Object.defineProperty(Z,Symbol.for("resource"),{value:!0,enumerable:!0}),Object.defineProperty(Z,Symbol.for("signal"),{value:!0,enumerable:!0}),[Z,{mutate:l,refetch:()=>{he=!0,pe(void 0)}}]}function vt(e){if(typeof e=="function"&&!e.length){let t=e();return E(t)?t:vt(t)}if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=vt(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function Ue(e){let t=m(e);return m(()=>vt(t()))}var fs=Le();Go((e,t)=>{let n=wn(t,fs);n&&(n.increment(),e.finally(()=>n.decrement()))});var ds=Le();Jo((e,t)=>{let n=wn(t,ds);return n?(n.setError(e),!0):!1});var ne=Symbol.for("fluixi-proxy");var Cn="1.0.0-alpha.77";var In="1.0.0-alpha.77";var ps="__fluixi_signal_next_state__",hs=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},oe=globalThis[ps]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:hs,onSuspend:null,onError:null};function ys(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function Fn(e){let t=Symbol("context");return{id:t,defaultValue:e,Provider:n=>{let r=oe.owner,o=ys(r);(o.contexts=new Map).set(t,n.value),r&&(r.owned??=[]).push(o),oe.owner=o;try{return n.children}finally{oe.owner=r}}}}function Vn(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 ms(e){oe.onSuspend=e}function gs(e){oe.onError=e}function bs(e){oe.hostSchedule=e??(t=>{Promise.resolve().then(t)})}bs(()=>{});var xs=Fn();ms((e,t)=>{let n=Vn(t,xs);n&&(n.increment(),e.finally(()=>n.decrement()))});var ws=Fn();gs((e,t)=>{let n=Vn(t,ws);return n?(n.setError(e),!0):!1});var Et=Symbol("store-raw"),_n=Symbol("store-node"),kn=Symbol("store-has"),On=Symbol("store-self"),Pn=Symbol("store-track");var Mn=new WeakMap,Dn=new WeakMap;function Hn(e){let[t,n]=g(e),r=t;return r.$=n,r}function ze(e){let t=Mn.get(e);return t||Mn.set(e,t={keys:new Map}),t}function qn(e,t,n){let r=e.keys.get(t);return r||e.keys.set(t,r=Hn(n)),r}function jn(e){let t=ze(e);(t.all||(t.all=Hn()))()}function Ln(e,t){e.$(typeof t=="function"?()=>t:t)}function Un(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 We(e){if(!Un(e))return e;let t=Dn.get(e);if(t)return t;let n=new Proxy(e,vs);return Dn.set(e,n),n}var vs={get(e,t,n){if(t===Et||t===_n)return e;if(t===ne)return n;if(t===kn)return i=>i in e;if(t==="__proxy")return!0;if(t===Pn||t===On)return jn(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 s=qn(ze(e),t,r)();return Un(s)?We(s):s},set(){return!0},deleteProperty(e,t){return t in e&&ge(e,t,void 0),!0},has(e,t){return t===Et||t===ne||t===_n||t===kn||t===On||t===Pn?!0:(qn(ze(e),t,e[t])(),t in e)},ownKeys(e){return jn(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function ge(e,t,n){if(e[t]===n&&(n!==void 0||t in e))return;let r=Array.isArray(e),o=r?e.length:0;n===void 0?delete e[t]:e[t]=n;let s=ze(e),i=s.keys.get(t);if(i&&Ln(i,n),r&&e.length!==o){let u=s.keys.get("length");u&&Ln(u,e.length)}s.all&&s.all.$(void 0)}function $n(e,t){return typeof e=="function"?e(t):e}function At(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)?At(o,r):ge(e,n,r)}}function Rt(e){let t=[],n=e.replace(/\[([^\]]*)\]/g,".$1");for(let r of n.split("."))r.length&&t.push(r);return t}function Wn(e,t,n){let r=t.length-1;for(let s=0;s<r;s++){let i=t[s];if(i==="*"){let a=t.slice(s+1);if(Array.isArray(e))for(let l=0;l<e.length;l++)Wn(e[l],a,n);return}let u=e[i];(u==null||typeof u!="object")&&(u=/^\d+$/.test(t[s+1])?[]:{},ge(e,i,u)),e=u}let o=t[r];if(o==="*"){if(Array.isArray(e))for(let s=0;s<e.length;s++)ge(e,s,$n(n,e[s]));return}ge(e,o,$n(n,e[o]))}function Tt(e,t,n){Wn(e,Rt(t),n)}function Ss(e,t){let n=t[0];if(typeof n=="function"&&t.length===1){let r=n(e);r&&r!==e&&At(e,r);return}if(Array.isArray(n)&&t.length===1){for(let r of n)Array.isArray(r)&&Tt(e,r[0],r[1]);return}if(n&&typeof n=="object"&&!Array.isArray(n)&&t.length===1){At(e,n);return}if(Array.isArray(t[1])&&t.length>=3){Tt(e,`${n}.${t[1].join(".")}`,t[2]);return}Tt(e,String(n),t[1])}function Nt(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(Nt);let t={};for(let n of Object.keys(e))t[n]=Nt(e[n]);return t}function re(e,t){let n=e;for(let r of Rt(t)){if(n==null)return;n=n[r]}return n}var zn=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...n)=>w(()=>Ss(this.root,n)))}get state(){return We(this.root)}get proxy(){return We(this.root)}get accessor(){return(()=>We(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return Be(this.state);let t=this.state;for(let n of Rt(e)){if(t==null)return;t=t[n]}return Be(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=Nt(t);return e(n),n}))}reconcile(e,t={}){this.set(e)}push(e,...t){let n=re(this.root,e);this.set(e,n.concat(t))}pop(e){let t=re(this.root,e).slice(),n=t.pop();return this.set(e,t),n}shift(e){let t=re(this.root,e).slice(),n=t.shift();return this.set(e,t),n}splice(e,t,n,...r){let o=re(this.root,e).slice(),s=o.splice(t,n,...r);return this.set(e,o),s}insert(e,t,n){let r=re(this.root,e).slice();r.splice(t,0,n),this.set(e,r)}removeAt(e,t){let n=re(this.root,e).slice(),r=n.splice(t,1);return this.set(e,n),r}toObservable(){let[e]=g(this.state);return e.toObservable()}dispose(){}},Ts=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","unwrap","toObservable"];function Es(e,t){for(let n of Ts)e[n]=t[n].bind(t);e.$=t.reactive.bind(t)}function As(e,t={immutable:!0}){let n=new zn(e,t);return Es(n.set,n),[n.proxy,n.set]}function Ns(e,t={}){return new zn(e,{...t,immutable:!1})}function Be(e){if(e==null||typeof e!="object")return e;let t=e[Et];return t!==void 0?t:e}function Rs(e){return A(()=>Be(e))}var Ji=Object.freeze({createStore:As,createMutableStore:Ns,batch:w,unwrap:Be,untrackStore:Rs});var P={dom:Cn,reactive:In};function Bn(e){P.core&&e.setAttribute("fluixi",P.core),e.setAttribute("fx-dom",P.dom),e.setAttribute("fx-reactive",P.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=P)}function Kn(){let e=[P.core,P.dom,P.reactive].filter(t=>t!==void 0);new Set(e).size<=1||console.warn(`[fluixi] package versions disagree — core ${P.core??"(absent)"}, dom ${P.dom}, reactive ${P.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 Cs(e){return Object.defineProperty(e,Symbol.for("fluixi-router"),{value:!0,enumerable:!0}),e}function _s(e){return Object.defineProperty(e,Symbol.for("fluixi-routes"),{value:!0,enumerable:!0}),e}function ks(e){return Object.defineProperty(e,Symbol.for("fluixi-route"),{value:!0,enumerable:!0}),e}function Os(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-outlet"),{value:!0,enumerable:!0}),e}function Ps(e){return Object.defineProperty(e,Symbol.for("fluixi-provider"),{value:!0,enumerable:!0}),e}function Ms(e){return Object.defineProperty(e,Symbol.for("fluixi-context"),{value:!0,enumerable:!0}),e}function Ds(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}function qs(e){return Object.defineProperty(e,Symbol.for("fluixi-suspense"),{value:!0,enumerable:!0}),e}function Gn(e){return typeof e=="function"&&e[Symbol.for("fluixi-router")]===!0}function Xn(e){return typeof e=="function"&&e[Symbol.for("fluixi-routes")]===!0}function Jn(e){return typeof e=="function"&&e[Symbol.for("fluixi-route")]===!0}function Yn(e){return typeof e=="function"&&e[Symbol.for("fluixi-outlet")]===!0}function Zn(e){return typeof e=="function"&&e[Symbol.for("fluixi-provider")]===!0}function Qn(e){return typeof e=="function"&&e[Symbol.for("fluixi-context")]===!0}function M(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}function er(e){return typeof e=="function"&&e[Symbol.for("fluixi-suspense")]===!0}function js(e){return Gn(e)?{type:"router",value:e}:Jn(e)?{type:"route",value:e}:Xn(e)?{type:"routes",value:e}:Yn(e)?{type:"outlet",value:e}:M(e)?{type:"component",value:e}:er(e)?{type:"suspense",value:e}:Zn(e)?{type:"provider",value:e}:Qn(e)?{type:"context",value:e}:{type:"none",value:e}}var v=typeof document>"u";function K(e){v=e}var be=Symbol.for("fluixi.server-node"),Ct=null;function tr(e){Ct=e}function se(){if(!Ct)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return Ct}function G(e){return e!=null&&e[be]===!0?!0:typeof Node<"u"&&e instanceof Node}function Ke(e){return e!=null&&e[be]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function Ge(e){return e!=null&&e[be]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}var d={active:!1,cursor:null,parents:[]},nr=null;function rr(e){nr=e}function Xe(){return nr}function _t(e,t){return d.active&&t.parentNode===e}function kt(e){let t=d.parents.lastIndexOf(e);t!==-1&&(d.parents.length=t),d.cursor=e.nextSibling}function or(){return d.active?d.cursor:null}function xe(e,t){if(!e||e.parentNode==null)return t();let n=d.active,r=d.cursor,o=d.parents;d.active=!0,d.cursor=e,d.parents=[];try{return t()}finally{d.active=n,d.cursor=r,d.parents=o}}function sr(e){if(!d.active)return e();let t=d.cursor,n=d.parents;d.active=!1,d.parents=[];try{return e()}finally{d.active=!0,d.cursor=t,d.parents=n}}function ie(e){if(!d.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&kt(t)}function Ls(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 $s(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 Is(e){return $s(Ls(e))}var Fs=()=>"xxyxxxxxxy-4xx8".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)}),Vs={};var ir=new Map,Je=new Set,Qe=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);function Pt(e){if(!v)for(let t of e)Je.has(t)||Qe.has(t)||(Je.add(t),document.addEventListener(t,Hs))}function Hs(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 ar(e,t,n){if(e[`$$${t}`]=n,Qe.has(t)){let r=`__fx_${t}`;if(!e[r]){let o=s=>{e[`$$${t}`]?.(s)};e.addEventListener(t,o),e[r]=o}return}Je.has(t)||Pt([t])}function Ot(e,t){delete e[`$$${t}`];let n=`__fx_${t}`,r=e[n];r&&(e.removeEventListener(t,r),delete e[n])}function Us(e){return!Qe.has(e)}function Ws(e){return typeof e=="function"}function U(e,t=!1){if(v)return se().createText(e);if(d.active&&!t){let n=Xe()?.hydrateText(e);if(n)return n}return document.createTextNode(e)}function Mt(e,t=!1){if(v)return se().createElement(e,t);if(d.active){let n=Xe()?.hydrateElement(e);if(n)return n}return t?document.createElementNS(Q,e):document.createElement(e)}function ur(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 zs(e,t,n=!1,r=!1){if(v){let o=se();return n?o.parseTemplate(e,r):o.createRaw(e)}if(d.active){let o=Xe()?.hydrateStatic(t);if(o)return o}return lr(ur(e,r),r).firstChild}function Bs(e,t){if(!d.active)return t();let n=xe(e.nextSibling,t);if(typeof n=="function"){let r=n;return((...o)=>d.active?xe(e.nextSibling,()=>r(...o)):r(...o))}return n}function Ks(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 Gs(e,t){let n=[];for(let r=e.nextSibling;r&&r!==t;r=r.nextSibling)n.push(r);return n}function lr(e,t=!1){let n=e.content.cloneNode(!0);return t?n.firstChild:n}function cr(e){return Array.isArray(e)?e.length===2&&e[1]===" "?Array.isArray(e[0])?cr(e[0]):(typeof e[0]=="function",e[0]):e.length===1&&typeof e[0]=="function"?e[0]:e:e}function Xs(e){return typeof e!="function"?null:e._name||e.name||"anonymous"}function Js(e){if(E(e)||M(e)||typeof e!="function")return e;let t=e();for(;typeof t=="function"&&!E(t)&&!M(t);)t=t();return t}var V=0,Ys=200;function Zs(e,t,n,r,o){let s=r,i=new Map;return b(()=>{let u;if(M(e)&&!E(e)){if(!i.has(e)){V++;try{let a=e();i.set(e,a)}finally{V--}}for(u=i.get(e);typeof u=="function"&&E(u);)u=u()}else for(u=e();typeof u=="function"&&E(u);)u=u();{let a=0;for(;typeof u=="function"&&a++<50;)if(M(u)){if(!i.has(u)){let l=u;V++;try{let c=l();i.set(l,c)}finally{V--}}u=i.get(u)}else if(E(u))u=u();else if(u=u(),typeof u!="function"||!E(u)&&!M(u))break}V++;try{s=ve(t,u,n,s,i),o(s)}finally{V--}})}function L(e,t,n,r){if(V>Ys)return console.error("[insert] Exceeded max call depth — possible infinite loop."),()=>null;n!==void 0&&!n&&(n=U("",!0),e.appendChild(n));let o=r??null,s=a=>Array.isArray(a)&&a.some(l=>typeof l=="function"),i=a=>typeof a=="function"?a:()=>a;if(typeof t!="function"&&!s(t)){V++;try{o=ve(e,t,n,o)}finally{V--}return()=>o}let u=Zs(i(t),e,n,o,a=>{o=a});return()=>(u?.(),o)}function ve(e,t,n,r,o){if(t==null||typeof t=="boolean")return H(e,r,n);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return H(e,r,n);if(we(t)){let i=U("",!0);return Array.isArray(r)?r.length>0?(e.replaceChild(i,r[0]),H(e,r.slice(1),n)):C(e,i,n):r?e.replaceChild(i,r):C(e,i,n),t.then(u=>{i.parentNode===e&&ve(e,u,i.nextSibling,i)}).catch(u=>{console.error("Error resolving promise in insertExpression:",u)}),i}let s=typeof t;if(s==="string"||s==="number"){if(s==="number"&&(t=String(t)),Array.isArray(r)){if(r.length===0){let u=U(t);return C(e,u,n),u}if(r.length===1&&r[0].nodeType===3)return r[0].data=t,r;r=H(e,r,n)}if(r&&Ge(r))return r.data=t,r;let i=U(t);return r&&r.parentNode===e?e.replaceChild(i,r):_t(e,i)||C(e,i,n),i}if(G(t))return _t(e,t)?(kt(t),t):Array.isArray(r)?(r.length===0?C(e,t,n):r[0].parentNode===e?(e.replaceChild(t,r[0]),H(e,r.slice(1),n)):C(e,t,n),t):(r?r!==t&&(r.parentNode===e?e.replaceChild(t,r):C(e,t,n)):C(e,t,n),t);if(Array.isArray(t)){let i=[],u=Array.isArray(r)?r:r?[r]:[],a=[];F(t,i,e,n,!0,o,a);let l=Qs(e,u,i,n);for(let c of a){let f=L(e,c.sig,c.marker);S(()=>{H(e,f()),c.marker.parentNode===e&&e.removeChild(c.marker)})}return l}if(s==="object"&&t!==null&&typeof t=="object"){let i=t;if("type"in i&&"props"in i){let u=i;if(typeof u.type=="function"){let a=u.type(u.props||{});return ve(e,a,n,r)}}}return H(e,r,n)}function F(e,t,n,r,o=!0,s,i){for(let u=0;u<e.length;u++){let a=e[u];if(!(a==null||typeof a=="boolean")){for(;typeof a=="function"&&!we(a)&&!E(a)&&!M(a)&&(a=a(),!(a==null||typeof a=="boolean")););if(!(a==null||typeof a=="boolean")){if(typeof a=="function"){let l;for(M(a)&&!E(a)?(s||(s=new Map),s.has(a)||s.set(a,a()),l=s.get(a)):l=a();typeof l=="function"&&!we(l)&&!E(l)&&!M(l);)s||(s=new Map),s.has(l)||s.set(l,l()),l=s.get(l);if(l==null||typeof l=="boolean")continue;if(typeof l=="function"){if(E(l)){if(i){let f=U("",!0);t.push(f),i.push({marker:f,sig:l});continue}let c=l();for(;typeof c=="function"&&E(c);)c=c();if(c==null||typeof c=="boolean")continue;Array.isArray(c)?F(c,t,n,r,o,s):F([c],t,n,r,o,s);continue}continue}Array.isArray(l)?F(l,t,n,r,o,s,i):F([l],t,n,r,o,s,i);continue}if(we(a)){let l=U("",!0);t.push(l),a.then(c=>{if(l.parentNode){let f=[];if(F([c],f,l.parentNode,void 0,!1,s),f.length>0){l.parentNode.replaceChild(f[0],l);for(let h=1;h<f.length;h++)l.parentNode?.insertBefore(f[h],f[h-1].nextSibling)}}}).catch(c=>console.error("Error resolving promise in array:",c));continue}if(Array.isArray(a)){F(a,t,n,r,o,s,i);continue}if(G(a)){t.push(a);continue}if(typeof a=="object"&&a!==null&&"type"in a&&"props"in a){let l=a;if(typeof l.type=="function"){let c=l.type(l.props||{});Array.isArray(c)?F(c,t,n,r,!1,s):F([c],t,n,r,!1,s);continue}}if(typeof a=="string"||typeof a=="number"){let l=String(a);if(l.trim()===""&&l!==" ")continue;t.push(U(l));continue}t.push(U(String(a)))}}}}function Qs(e,t,n,r){for(let f=0;f<n.length;f++){let h=n[f].parentNode;h!==null&&h!==e&&h.nodeType!==11&&(n=n.slice(),n[f]=n[f].cloneNode(!0))}let o=n.length,s=t.length,i=o,u=0,a=0,l=s>0?t[s-1].nextSibling??void 0:r,c=null;for(;u<s||a<i;){if(t[u]===n[a]){u++,a++;continue}for(;s>u&&i>a&&t[s-1]===n[i-1];)s--,i--;if(s===u){let f=i<o?a?n[a-1].nextSibling??void 0:n[i-a]:l;for(;a<i;)C(e,n[a++],f)}else if(i===a)for(;u<s;)(!c||!c.has(t[u]))&&t[u].parentNode===e&&e.removeChild(t[u]),u++;else if(t[u]===n[i-1]&&n[a]===t[s-1]){let f=t[--s].nextSibling;C(e,n[a++],t[u++].nextSibling),C(e,n[--i],f),t[s]=t[u-1]}else{if(!c){c=new Map;let h=a;for(;h<i;)c.set(n[h],h++)}let f=c.get(t[u]);if(f!=null)if(a<f&&f<i){let h=u,y=1;for(;++h<s&&h<i&&!(!c.has(t[h])||c.get(t[h])!==f+y);)y++;if(y>f-a){let N=t[u];for(;a<f;)C(e,n[a++],N)}else t[u].parentNode===e?e.replaceChild(n[a++],t[u++]):(C(e,n[a++],l),u++)}else u++;else t[u].parentNode===e&&e.removeChild(t[u]),u++}}return n}function H(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 C(e,t,n){d.active&&t.parentNode===e||(n&&n.parentNode===e?e.insertBefore(t,n):e.appendChild(t))}function Se(e,t,n){n==null?delete e[t]:e[t]=n}function Dt(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 qt(e,t){let n=(r,o)=>{typeof r=="function"&&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 Ye(e,t,n,r=!1){return typeof n!="function"?(_(e,t,n,r),()=>{}):b(()=>{let o=typeof n=="function"?n():n;_(e,t,o,r)})}function Ze(e,t,n){return typeof n!="function"?(Se(e,t,n),()=>{}):b(()=>{let r=typeof n=="function"?n():n;Se(e,t,r)})}function jt(e,t,n){return typeof n!="function"?(_(e,t,!!n),()=>{}):b(()=>{let r=n();_(e,t,!!r)})}function Te(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){b(()=>Te(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 Ee(e,t,n){if(!(!t||typeof t!="object"))for(let r in t){let o=t[r],s=r.split(/\s+/).filter(Boolean);if(typeof o=="function"&&n)n.push(b(()=>{let i=!!o();for(let u of s)e.classList.toggle(u,i)}));else{let i=!!(typeof o=="function"?o():o);for(let u of s)e.classList.toggle(u,i)}}}function Ae(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 ei(e){let{element:t,props:n,prevProps:r=Vs,isSVG:o=!1,skipChildren:s=!1}=e;if(!t||!Ke(t))return console.error("[spread] Error: element is not a DOM Element!"),()=>{};if(!n)return console.warn("[spread] Warning: props is undefined!"),()=>{};let i=o||t.namespaceURI===Q,u=[];for(let a in n){if(s&&a==="children")continue;let l=n[a],c=r[a];if(l===c)continue;if(a==="ref"){Ne(l,t);continue}if(a==="use"){qt(t,l);continue}if(a.startsWith("on:")){u.push(Dt(t,a.slice(3),l));continue}if(a.startsWith("prop:")){u.push(Ze(t,a.slice(5),l));continue}if(a.startsWith("attr:")){u.push(Ye(t,a.slice(5),l,i));continue}if(a.startsWith("bool:")){u.push(jt(t,a.slice(5),l));continue}if(a==="class"||a==="className"){typeof l=="function"?u.push(b(()=>Te(t,l()))):Te(t,l);continue}if(a==="classList"){typeof l=="function"?u.push(b(()=>Ee(t,l()))):Ee(t,l,u);continue}if(a==="style"){typeof l=="function"?u.push(b(()=>Ae(t,l()))):Ae(t,l);continue}if(a.startsWith("on")){let h=a.slice(2).toLowerCase();c&&Ot(t,h),l&&ar(t,h,l);continue}let f=qe.has(a)||!i&&a in t;typeof l=="function"?u.push(f?Ze(t,a,l):Ye(t,a,l,i)):u.push(b(()=>f?Se(t,a,n[a]):_(t,a,n[a],i)))}for(let a in r)if(!(a in n))if(a.startsWith("on")){let l=a.slice(2).toLowerCase();Ot(t,l)}else qe.has(a)?Se(t,a,null):t.removeAttribute(a);return()=>{u.forEach(a=>a())}}function Lt(e,t,n=!1){for(let r in t){let o=t[r];if(r==="ref"){Ne(o,e);continue}if(r!=="children"){if(r==="use"){qt(e,o);continue}if(r.startsWith("on:")){Dt(e,r.slice(3),o);continue}if(r.startsWith("prop:")){Ze(e,r.slice(5),o);continue}if(r.startsWith("attr:")){Ye(e,r.slice(5),o,n);continue}if(r.startsWith("bool:")){jt(e,r.slice(5),o);continue}if(r.startsWith("on")&&r.length>2){let s=r.slice(2).toLowerCase();if(typeof o=="function")if(Qe.has(s)){e[`$$${s}`]=o;let i=`__fx_${s}`;if(!e[i]){let u=a=>{e[`$$${s}`]?.(a)};e.addEventListener(s,u),e[i]=u}}else e[`$$${s}`]=o,Je.has(s)||Pt([s]);continue}if(r==="class"||r==="className"){Te(e,o);continue}if(r==="classList"){typeof o=="function"?b(()=>Ee(e,o())):Ee(e,o);continue}if(r==="style"){typeof o=="function"?b(()=>Ae(e,o())):Ae(e,o);continue}if(r==="innerHTML"){if(typeof o=="function"){let s=T(()=>{let i=o();for(;typeof i=="function";)i=i();e.innerHTML=i});S(()=>s())}else e.innerHTML=o;continue}if(r==="value"&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA")){if(typeof o=="function"){let s=T(()=>{let i=o();for(;typeof i=="function"&&i.length===0;)i=i();document.activeElement!==e&&(e.value=i??"")});S(()=>{s()})}else b(()=>{document.activeElement!==e&&(e.value=t[r]??"")});continue}if(r==="checked"&&e.tagName==="INPUT"){if(typeof o=="function"){let s=T(()=>{let i=o();for(;typeof i=="function"&&i.length===0;)i=i();document.activeElement!==e&&(e.checked=i??"")});S(()=>{s()})}else b(()=>{document.activeElement!==e&&(e.checked=t[r]??"")});continue}if(r==="value"&&e.tagName==="SELECT"){if(typeof o=="function"){let s=!0,i=T(()=>{let u=o();for(;typeof u=="function"&&u.length===0;)u=u();s?(s=!1,queueMicrotask(()=>{e.value=u??""})):e.value=u??""});S(()=>{i()})}else{let s=!0;b(()=>{let i=t[r];s?(s=!1,queueMicrotask(()=>{e.value=i??""})):e.value=i??""})}continue}if(typeof o=="function"){let s=T(()=>{let i=o();for(;typeof i=="function"&&i.length===0;)i=i();De(e,r,i,n)});S(()=>{s()})}else b(()=>De(e,r,t[r],n))}}}function ti(...e){let t=r=>{for(let o=e.length-1;o>=0;o--){let s=e[o];if(s&&r in s&&s[r]!==void 0)return s[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 s of Reflect.ownKeys(o))r.add(s);return[...r]},getOwnPropertyDescriptor:(r,o)=>n(o)?{enumerable:!0,configurable:!0,get:()=>t(o)}:void 0})}function ni(e,...t){let n=new Set;for(let i of t)for(let u of i)n.add(u);let r=i=>({enumerable:!0,configurable:!0,get:()=>e[i]}),o=t.map(i=>{let u=new Set(i);return new Proxy({},{get:(a,l)=>u.has(l)?e[l]:void 0,has:(a,l)=>u.has(l)&&l in e,ownKeys:()=>Array.from(u).filter(a=>a in e),getOwnPropertyDescriptor:(a,l)=>u.has(l)&&l in e?r(l):void 0})}),s=new Proxy({},{get:(i,u)=>n.has(u)?void 0:e[u],has:(i,u)=>!n.has(u)&&u in e,ownKeys:()=>Reflect.ownKeys(e).filter(i=>!n.has(i)),getOwnPropertyDescriptor:(i,u)=>!n.has(u)&&u in e?r(u):void 0});return[...o,s]}function Ne(e,t){if(e){if(G(e)){let n=t,r=e;if(!n)return;typeof n=="function"?n(r):typeof n=="object"&&"current"in n&&(n.current=r);return}typeof e=="function"?e(t):typeof e=="object"&&"current"in e&&(e.current=t)}}function ri(e,t,n){let r=t||document.body,o=Ue(()=>e),s=[];return w(()=>{let i=b(()=>{let u=o();Array.isArray(u)?(u.forEach(a=>r.appendChild(a)),s.push(()=>{u.forEach(a=>{a.parentNode===r&&r.removeChild(a)})})):G(u)&&(r.appendChild(u),s.push(()=>{u.parentNode===r&&r.removeChild(u)}))});s.push(i),S(()=>{s.forEach(u=>u())})}),null}function oi(e){return typeof e=="string"&&e.toLowerCase()===e}function $t(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 si(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function we(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function ii(e){return typeof e=="function"&&e.length===0&&E(e)}function It(e,t,n){if(!t)throw new Error("Container element is required");let r,o,s=[];return O(i=>{w(()=>{d.active||(t.textContent=""),Bn(t),Kn(),L(t,e)}),o=i}),()=>{o?.(),r?.(),s.forEach(i=>i()),t.textContent=""}}function ai(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 ui="__fx_dom_create_component__",X=globalThis[ui]??={fn:null};function li(e){X.fn=e}function ci(e={}){let t=e.signalSystem?.createComponent;t&&(X.fn=t)}function Ft(e,t){return X.fn?X.fn(e,t):(()=>e(t))}var fi=()=>X.fn!==null,di=()=>X.fn!==null;function pi(){X.fn=null}var et,dr={getStore:()=>et,run(e,t){let n=et;et=e;try{return t()}finally{et=n}}},Vt=dr;function Ht(e){Vt=e??dr}function ae(e={}){e.locals||(e.locals=e.request?nt(e.request):{});let t=0,n=0,r=null,o=new Map,s=new Map;return{event:e,routeData:new Map,matchedRoute:new Map,nextId:()=>`s${t++}`,nextResourceId:()=>{if(r===null)return`r${n++}`;let i=o.get(r)??0;return o.set(r,i+1),`${r}:r${i}`},nextIslandNamespace:i=>{let u=s.get(i)??0;return s.set(i,u+1),`${i}#${u}`},withResourceScope(i,u){let a=r;r=i;try{return u()}finally{r=a}},pending:new Set,data:new Map}}function ue(e,t){return Vt.run(e,t)}function $(){return Vt.getStore()}function tt(){return $()?.event}function Ut(){let e=tt();return e?(e.locals||(e.locals={}),e.locals):{}}var fr=new WeakMap;function nt(e){let t=fr.get(e);return t||(t={},fr.set(e,t)),t}var le="__FX_DATA__";function Re(e){return e.replace(/[<>&\u2028\u2029]/g,t=>"\\u"+t.charCodeAt(0).toString(16).padStart(4,"0"))}var Wt;function Ce(){let e=globalThis.__FX_DATA__;if(e)return e;if(Wt!==void 0)return Wt;let t=null;if(typeof document<"u"){let n=document.getElementById(le)?.textContent;if(n)try{t=JSON.parse(n)}catch{t=null}}return Wt=t}function rt(){for(;;){for(;d.cursor&&d.cursor.nodeType===3&&d.cursor.data==="";)d.cursor=d.cursor.nextSibling;if(d.cursor!=null||!d.parents.length)return;d.cursor=d.parents.pop().nextSibling}}var hi=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),ot=typeof process<"u"&&process.env&&!1;function st(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 yi(e){rt();let t=d.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(hi.has(e.toLowerCase())?d.cursor=t.nextSibling:(d.parents.push(t),d.cursor=t.firstChild),t):(ot&&t&&st(`<${e}>`,t),null)}function mi(e){rt();let t=d.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(d.cursor=t.nextSibling,t):(ot&&t&&st(`<${e}> (static)`,t),null)}function gi(e){if(e===""){let n=d.cursor;return n&&n.nodeType===3&&n.data!==""?(d.cursor=n.nextSibling,n.data="",n):null}rt();let t=d.cursor;return t&&t.nodeType===3?(d.cursor=t.nextSibling,t.nodeValue!==e&&(t.nodeValue=e),t):(ot&&t&&st(`text ${JSON.stringify(e.slice(0,24))}`,t),null)}function bi(e){rt();let t=d.cursor;return t&&t.nodeType===8&&t.data===e?(d.cursor=t.nextSibling,t):(ot&&t&&st(`marker <!--${e.slice(0,24)}-->`,t),null)}var pr=!1;function xi(){pr||(pr=!0,rr({hydrateElement:yi,hydrateText:gi,hydrateMarker:bi,hydrateStatic:mi}))}function it(e,t,n){xi(),d.active=!0,d.cursor=t.firstChild,d.parents=[];let r=Ce(),o=n?.resourceNamespace,s=0;He(()=>o?`${o}:r${s++}`:`r${s++}`),An(r?i=>i in r?{value:r[i]}:void 0:null);try{return It(e,t)}finally{d.active=!1,d.cursor=null,d.parents=[]}}var zt="fluixi-island";function yr(e){let{component:t,props:n={},name:r}=e,o=Mt(zt),s=r??t.name??"Island";_(o,"name",s),_(o,"props",JSON.stringify(n??{}));let i=v?$():void 0;if(i){let u=i.nextIslandNamespace(s);L(o,()=>i.withResourceScope(u,()=>t(n)))}else L(o,()=>t(n));return o}var hr=!1;function wi(){if(hr||typeof document>"u")return;hr=!0;let e=document.createElement("style");e.textContent=`${zt}{display:contents}`,document.head.appendChild(e)}function mr(e){if(typeof document>"u")return;wi();let t=document.querySelectorAll(zt),n=new Map;t.forEach(r=>{let o=r.getAttribute("name")??"",s=n.get(o)??0;n.set(o,s+1);let i=e[o];if(!i){typeof process>"u"&&console.warn(`[fluixi] island "${o}" has no component in the registry — left static.`);return}let u={};try{u=JSON.parse(r.getAttribute("props")||"{}")}catch{}it(()=>i(u),r,{resourceNamespace:`${o}#${s}`})})}function gr(e,...t){throw new Error("html`` was not compiled — enable the lit format: fluixi({ format: 'lit' }).")}function br(e,...t){throw new Error("svg`` was not compiled — enable the lit format: fluixi({ format: 'lit' }).")}function vi(e,t={}){if(typeof e=="function")return Ft(e,t);if(typeof e!="string"||e.length===0)return null;let n=$t(e);if(v)return se().createElement(e,n);let r=n?document.createElementNS(Q,e):document.createElement(e);return Lt(r,t,n),Si(r,t),r}function Si(e,t){if(!t||t.children===void 0)return;let n=Ue(()=>t.children),r=o=>{L(e,o,typeof o=="function"?null:void 0)};Array.isArray(n)?n.forEach(r):r(n)}function xr(e){return typeof e=="function"?e:(()=>e)}function W(e){return()=>{let t=e();return typeof t=="function"?t():t}}function wr(e){return e!=null&&e!==!1}function vr(e){return!e||typeof e!="object"?!1:!!(typeof e._$litType$<"u"||typeof e._$litDirective$<"u"||Array.isArray(e.strings)&&Array.isArray(e.values))}function Sr(e){let t=W(()=>e.when),n=m(t,void 0),r=m(n,void 0),o=I(),s=null,i=null,u=a=>{a!==i&&(s&&te(s),s=ee(o),i=a)};return m(()=>{let a=r();return u(a?"when":"fallback"),k(s,()=>{if(a){let l=e.children;return typeof l=="function"&&!vr(l)?typeof n=="function"?A(()=>A(n)?l(n()):e.fallback):l(n):l}return e.fallback});return e.fallback??null},void 0,{name:"show"})}function Tr(e){let t=W(()=>e.each),n=()=>e.fallback??null,r=(o,s)=>{let i=e.children,u=Array.isArray(i)?i.map(a=>typeof a=="function"?a(o,s):a):typeof i=="function"?i(o,s):i;return ie(u),u};return e.by?Fe(t,e.by,(o,s)=>r(o,s),{fallback:n}):Ie(t,(o,s)=>r(o,s),{fallback:n})}function Er(e){let t=W(()=>e.each);return Ve(t,(n,r)=>{let o=e.children(n,r);return ie(o),o},{fallback:()=>e.fallback??null})}var Bt=Symbol("match");function Ar(e){return{[Bt]:!0,when:W(()=>e.when),get children(){return e.children}}}function Nr(e){let t=Array.isArray(e.children)?e.children:[e.children],n=I(),r=null,o=-1,s=i=>{i!==o&&(r&&te(r),r=ee(n),o=i)};return m(()=>{for(let i=0;i<t.length;i+=1){let a=t[i],l=0;for(;typeof a=="function"&&!a[Bt]&&l++<10;)a=a();if(!a||typeof a!="object"||a[Bt]!==!0)continue;let c=a.when();if(wr(c))return s(i),k(r,()=>typeof a.children=="function"?a.children(c):a.children)}return s(-2),k(r,()=>e.fallback??null)})}function Rr(e){let t=xr(e.component),{component:n,...r}=e,o=I(),s=null,i;return m(()=>{let u=t();return u!==i&&(s&&te(s),s=ee(o),i=u),u==null?null:typeof u=="string"?{tag:u,props:r}:k(s,()=>u(r))})}function Cr(e){let t=()=>e.mount?typeof e.mount=="function"?e.mount():e.mount:document.body,n,r;return O(o=>{n=o,r=document.createElement("div"),r.style.display="contents",t().appendChild(r),L(r,e.children)&&Ne(e.ref,r)}),S(()=>{n(),r.remove()}),null}function Kt(e){if(v)return e.fallback??null;let t=d.active,[n,r]=g(!t);return t&&queueMicrotask(()=>r(!0)),m(()=>n()?e.children:e.fallback??null,void 0,{name:"client-only"})}var _r=Kt;function kr(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(s){return n(s),typeof e.fallback=="function"?e.fallback(s,r):e.fallback}})}function Or(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(" ")})}function Ti(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Pr(e){return m(()=>{let t=typeof e=="function"?e():e,n=[];for(let[r,o]of Object.entries(t)){if(!r)continue;let s=typeof o=="function"?o():o;s!=null&&n.push(`${Ti(r)}: ${s}`)}return n.join("; ")})}var ut=1,Jt=3,Yt=8,Mr;Mr=be;var ce=class{constructor(){this[Mr]=!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(){}},J=class e extends ce{constructor(n){super();this.nodeType=Jt;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)}},at=class e extends ce{constructor(n){super();this.nodeType=ut;this.rawOuterHTML=n}get textContent(){return this.rawOuterHTML.replace(/<[^>]*>/g,"")}cloneNode(){return new e(this.rawOuterHTML)}},fe=class e extends ce{constructor(n){super();this.nodeType=Yt;this.data=n}get nodeValue(){return this.data}set nodeValue(n){this.data=n==null?"":String(n)}cloneNode(){return new e(this.data)}},Gt=class{constructor(){this.cssText=""}setProperty(t,n){this[t]=n}removeProperty(t){delete this[t]}},Xt=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}},Y=class e extends ce{constructor(n,r=!1){super();this.nodeType=ut;this.attributes=new Map;this.style=new Gt;this.classList=new Xt(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 J(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 Ei=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),qr=/&/g,jr=/</g,Lr=/>/g,Ai=/"/g;function Zt(e){return e.replace(qr,"&amp;").replace(jr,"&lt;").replace(Lr,"&gt;")}function Dr(e){return e.replace(qr,"&amp;").replace(Ai,"&quot;").replace(jr,"&lt;").replace(Lr,"&gt;")}function Ni(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}function Ri(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(`${Ni(n)}: ${r}`)}return t.join("; ")}function Ci(e){let t="",n=Ri(e.style);for(let[r,o]of e.attributes)r==="style"&&n||(t+=` ${r}="${Dr(o)}"`);if(n){let r=e.attributes.get("style"),o=r?`${r.replace(/;\s*$/,"")}; ${n}`:n;t+=` style="${Dr(o)}"`}return t}function D(e){if(e==null||e===!1||e===!0)return"";if(typeof e=="string")return Zt(e);if(typeof e=="number")return Zt(String(e));if(typeof e=="function")return D(e());if(Array.isArray(e))return e.map(D).join("");if(typeof e.rawOuterHTML=="string")return e.rawOuterHTML;switch(e.nodeType){case Jt:return Zt(e.data??"");case Yt:return`<!--${e.data??""}-->`;case ut:{let t=e.localName,n=`<${t}${Ci(e)}>`;if(Ei.has(t))return n;let r=e.rawHTML!=null?e.rawHTML:(e.childNodes??[]).map(D).join("");return`${n}${r}</${t}>`}}return Array.isArray(e.childNodes)?e.childNodes.map(D).join(""):""}var _i=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),ki={amp:"&",lt:"<",gt:">",quot:'"',"#39":"'"};function $r(e){return e.replace(/&(#?\w+);/g,(t,n)=>ki[n]??t)}var q=class extends Error{};function Ir(e,t=!1){let n=0,r=[],o=[],s=l=>{let c=o[o.length-1];c?c.appendChild(l):r.push(l)};for(;n<e.length;){let l=e.indexOf("<",n);if(l===-1){u(e.slice(n));break}if(l>n&&u(e.slice(n,l)),e.startsWith("<!--",l)){let c=e.indexOf("-->",l);if(c===-1)throw new q(`unterminated comment at ${l}`);s(new fe(e.slice(l+4,c))),n=c+3;continue}if(e[l+1]==="/"){let c=e.indexOf(">",l);if(c===-1)throw new q(`unterminated closing tag at ${l}`);let f=e.slice(l+2,c).trim().toLowerCase(),h=o.pop();if(!h||h.localName!==f)throw new q(`</${f}> does not close <${h?.localName??"nothing"}>`);n=c+1;continue}n=a(l)}if(o.length>0)throw new q(`unclosed <${o[o.length-1].localName}>`);let i=r[0];if(r.length!==1||!(i instanceof Y))throw new q(`expected exactly one root element, got ${r.length}`);return i;function u(l){l!==""&&s(new J($r(l)))}function a(l){let c=/[\s/>]/.exec(e.slice(l+1));if(!c)throw new q(`unterminated tag at ${l}`);let f=e.slice(l+1,l+1+c.index).toLowerCase(),h=new Y(f,t),y=l+1+c.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 N=y;for(;y<e.length&&!/[\s=/>]/.test(e[y]);)y++;let x=e.slice(N,y);if(x==="")throw new q(`malformed attribute at ${y}`);if(e[y]==="="){if(e[y+1]!=='"')throw new q(`attribute ${x} must have a double-quoted value`);let j=e.indexOf('"',y+2);if(j===-1)throw new q(`unterminated value for ${x}`);h.setAttribute(x,$r(e.slice(y+2,j))),y=j+1}else h.setAttribute(x,"")}return s(h),_i.has(f)||o.push(h),y}}var Fr=!1;function Hr(){Fr||(Fr=!0,tr({createElement:(e,t)=>new Y(e,t),createText:e=>new J(e),createRaw:e=>new at(e),parseTemplate:(e,t)=>Ir(e,t),createComment:e=>new fe(e)}))}function en(e,t={}){let n=v;Hr(),K(!0);let r=ae(t.event);try{return ue(r,()=>O(o=>{try{let s=typeof e=="function"?e():e;return D(s)}finally{o()}}))}finally{K(n)}}var Vr=!1;function Oi(){Vr||(Vr=!0,En(e=>{$()?.pending.add(e)}),He(()=>$()?.nextResourceId()??""),Nn((e,t)=>{e&&$()?.data.set(e,t)}))}var Qt=null;function tn(e){Qt=e}function lt(e){if(e.data.size===0)return"";let t={};for(let[r,o]of e.data){let s=o;if(Qt)try{s=Qt(o,r)}catch{continue}s!==void 0&&(typeof s=="function"||typeof s=="symbol"||(t[r]=s))}if(Object.keys(t).length===0)return"";let n=Re(JSON.stringify(t));return n==="{}"?"":`<script type="application/json" id="${le}">${n}<\/script>`}var Pi=50;async function nn(e,t={}){let n=v;Hr(),K(!0),Oi();let r=ae(t.event);try{return await ue(r,async()=>{t.preload&&await t.preload(t.event);let o,s=null,i=()=>{};O(c=>{i=c,s=I(),o=typeof e=="function"?e():e});let u=()=>{try{k(s,()=>D(o))}catch{}};u();let a=0;for(;r.pending.size>0&&a++<Pi;){let c=Array.from(r.pending);r.pending.clear(),await Promise.allSettled(c),await Tn(),u()}let l=k(s,()=>D(o))+lt(r);return i(),l})}finally{K(n)}}var on=Symbol("store-raw"),Ur=Symbol("store-node"),Wr=Symbol("store-has"),zr=Symbol("store-self"),Br=Symbol("store-track");var Kr=new WeakMap,Gr=new WeakMap;function Qr(e){let[t,n]=g(e),r=t;return r.$=n,r}function ft(e){let t=Kr.get(e);return t||Kr.set(e,t={keys:new Map}),t}function Xr(e,t,n){let r=e.keys.get(t);return r||e.keys.set(t,r=Qr(n)),r}function Jr(e){let t=ft(e);(t.all||(t.all=Qr()))()}function Yr(e,t){e.$(typeof t=="function"?()=>t:t)}function eo(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 ct(e){if(!eo(e))return e;let t=Gr.get(e);if(t)return t;let n=new Proxy(e,Mi);return Gr.set(e,n),n}var Mi={get(e,t,n){if(t===on||t===Ur)return e;if(t===ne)return n;if(t===Wr)return i=>i in e;if(t==="__proxy")return!0;if(t===Br||t===zr)return Jr(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 s=Xr(ft(e),t,r)();return eo(s)?ct(s):s},set(){return!0},deleteProperty(e,t){return t in e&&_e(e,t,void 0),!0},has(e,t){return t===on||t===ne||t===Ur||t===Wr||t===zr||t===Br?!0:(Xr(ft(e),t,e[t])(),t in e)},ownKeys(e){return Jr(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function _e(e,t,n){if(e[t]===n&&(n!==void 0||t in e))return;let r=Array.isArray(e),o=r?e.length:0;n===void 0?delete e[t]:e[t]=n;let s=ft(e),i=s.keys.get(t);if(i&&Yr(i,n),r&&e.length!==o){let u=s.keys.get("length");u&&Yr(u,e.length)}s.all&&s.all.$(void 0)}function Zr(e,t){return typeof e=="function"?e(t):e}function sn(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)?sn(o,r):_e(e,n,r)}}function un(e){let t=[],n=e.replace(/\[([^\]]*)\]/g,".$1");for(let r of n.split("."))r.length&&t.push(r);return t}function to(e,t,n){let r=t.length-1;for(let s=0;s<r;s++){let i=t[s];if(i==="*"){let a=t.slice(s+1);if(Array.isArray(e))for(let l=0;l<e.length;l++)to(e[l],a,n);return}let u=e[i];(u==null||typeof u!="object")&&(u=/^\d+$/.test(t[s+1])?[]:{},_e(e,i,u)),e=u}let o=t[r];if(o==="*"){if(Array.isArray(e))for(let s=0;s<e.length;s++)_e(e,s,Zr(n,e[s]));return}_e(e,o,Zr(n,e[o]))}function rn(e,t,n){to(e,un(t),n)}function Di(e,t){let n=t[0];if(typeof n=="function"&&t.length===1){let r=n(e);r&&r!==e&&sn(e,r);return}if(Array.isArray(n)&&t.length===1){for(let r of n)Array.isArray(r)&&rn(e,r[0],r[1]);return}if(n&&typeof n=="object"&&!Array.isArray(n)&&t.length===1){sn(e,n);return}if(Array.isArray(t[1])&&t.length>=3){rn(e,`${n}.${t[1].join(".")}`,t[2]);return}rn(e,String(n),t[1])}function an(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(an);let t={};for(let n of Object.keys(e))t[n]=an(e[n]);return t}function de(e,t){let n=e;for(let r of un(t)){if(n==null)return;n=n[r]}return n}var no=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...n)=>w(()=>Di(this.root,n)))}get state(){return ct(this.root)}get proxy(){return ct(this.root)}get accessor(){return(()=>ct(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return dt(this.state);let t=this.state;for(let n of un(e)){if(t==null)return;t=t[n]}return dt(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=an(t);return e(n),n}))}reconcile(e,t={}){this.set(e)}push(e,...t){let n=de(this.root,e);this.set(e,n.concat(t))}pop(e){let t=de(this.root,e).slice(),n=t.pop();return this.set(e,t),n}shift(e){let t=de(this.root,e).slice(),n=t.shift();return this.set(e,t),n}splice(e,t,n,...r){let o=de(this.root,e).slice(),s=o.splice(t,n,...r);return this.set(e,o),s}insert(e,t,n){let r=de(this.root,e).slice();r.splice(t,0,n),this.set(e,r)}removeAt(e,t){let n=de(this.root,e).slice(),r=n.splice(t,1);return this.set(e,n),r}toObservable(){let[e]=g(this.state);return e.toObservable()}dispose(){}},qi=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","unwrap","toObservable"];function ji(e,t){for(let n of qi)e[n]=t[n].bind(t);e.$=t.reactive.bind(t)}function ln(e,t={immutable:!0}){let n=new no(e,t);return ji(n.set,n),[n.proxy,n.set]}function Li(e,t={}){return new no(e,{...t,immutable:!1})}function dt(e){if(e==null||typeof e!="object")return e;let t=e[on];return t!==void 0?t:e}function $i(e){return A(()=>dt(e))}var vl=Object.freeze({createStore:ln,createMutableStore:Li,batch:w,unwrap:dt,untrackStore:$i});return lo(Ii);})();