@fluixi/core 1.0.0-alpha.83 → 1.0.0-alpha.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/core.global.js +2 -1
- package/dist/cli/generate.cjs +4117 -292
- package/dist/cli/generate.mjs +4122 -292
- package/dist/cli/index.cjs +4117 -292
- package/dist/cli/index.mjs +4122 -292
- package/dist/cli/run.cjs +63 -1
- package/dist/cli/run.mjs +39 -1
- package/dist/src/cdn/chunk-VNLCQBFQ.mjs +747 -0
- package/dist/src/cdn/core.cjs +1279 -1
- package/dist/src/cdn/core.d.ts +3 -3
- package/dist/src/cdn/core.js +3 -3
- package/dist/src/cdn/core.mjs +642 -1
- package/dist/src/cdn/router-WMN2AA7E.mjs +66 -0
- package/dist/src/index.cjs +1201 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -11
- package/dist/src/index.mjs +1313 -1
- package/dist/src/jsx-dev-runtime.cjs +26 -1
- package/dist/src/jsx-dev-runtime.mjs +24 -1
- package/dist/src/jsx-runtime.cjs +26 -1
- package/dist/src/jsx-runtime.js +0 -9
- package/dist/src/jsx-runtime.mjs +24 -1
- package/dist/src/lib/client/chunk-2C2KDDQV.mjs +133 -0
- package/dist/src/lib/client/index.cjs +870 -1
- package/dist/src/lib/client/index.d.ts +17 -6
- package/dist/src/lib/client/index.d.ts.map +1 -1
- package/dist/src/lib/client/index.js +26 -19
- package/dist/src/lib/client/index.mjs +222 -1
- package/dist/src/lib/client/router-X526HSWQ.mjs +548 -0
- package/dist/src/lib/context/context.cjs +118 -1
- package/dist/src/lib/context/context.d.ts +19 -37
- package/dist/src/lib/context/context.d.ts.map +1 -1
- package/dist/src/lib/context/context.js +8 -45
- package/dist/src/lib/context/context.mjs +99 -1
- package/dist/src/lib/context/index.cjs +120 -1
- package/dist/src/lib/context/index.mjs +99 -1
- package/dist/src/lib/control-flow.cjs +35 -1
- package/dist/src/lib/control-flow.mjs +25 -1
- package/dist/src/lib/core.cjs +1200 -1
- package/dist/src/lib/core.d.ts +0 -2
- package/dist/src/lib/core.d.ts.map +1 -1
- package/dist/src/lib/core.js +14 -48
- package/dist/src/lib/core.mjs +1313 -1
- package/dist/src/lib/env/index.cjs +60 -1
- package/dist/src/lib/env/index.d.ts +5 -5
- package/dist/src/lib/env/index.js +5 -5
- package/dist/src/lib/env/index.mjs +39 -1
- package/dist/src/lib/i18n/index.cjs +108 -1
- package/dist/src/lib/i18n/index.d.ts +31 -10
- package/dist/src/lib/i18n/index.d.ts.map +1 -1
- package/dist/src/lib/i18n/index.js +31 -10
- package/dist/src/lib/i18n/index.mjs +88 -1
- package/dist/src/lib/index.cjs +633 -1
- package/dist/src/lib/index.d.ts +0 -2
- package/dist/src/lib/index.d.ts.map +1 -1
- package/dist/src/lib/index.js +5 -11
- package/dist/src/lib/index.mjs +721 -1
- package/dist/src/lib/isomorphic.cjs +85 -1
- package/dist/src/lib/isomorphic.d.ts +41 -8
- package/dist/src/lib/isomorphic.d.ts.map +1 -1
- package/dist/src/lib/isomorphic.js +38 -5
- package/dist/src/lib/isomorphic.mjs +64 -1
- package/dist/src/lib/jsx-runtime/index.cjs +21 -1
- package/dist/src/lib/jsx-runtime/index.d.ts +1 -1
- package/dist/src/lib/jsx-runtime/index.js +1 -11
- package/dist/src/lib/jsx-runtime/index.mjs +4 -1
- package/dist/src/lib/jsx-runtime/jsx-dev-runtime.cjs +21 -1
- package/dist/src/lib/jsx-runtime/jsx-dev-runtime.mjs +4 -1
- package/dist/src/lib/plugins/fluixi-routes-plugin.cjs +302 -8
- package/dist/src/lib/plugins/fluixi-routes-plugin.d.ts +15 -1
- package/dist/src/lib/plugins/fluixi-routes-plugin.d.ts.map +1 -1
- package/dist/src/lib/plugins/fluixi-routes-plugin.js +19 -5
- package/dist/src/lib/plugins/fluixi-routes-plugin.mjs +271 -8
- package/dist/src/lib/plugins/index.cjs +311 -8
- package/dist/src/lib/plugins/index.mjs +279 -8
- package/dist/src/lib/plugins/route-codegen.cjs +73 -8
- package/dist/src/lib/plugins/route-codegen.d.ts +0 -1
- package/dist/src/lib/plugins/route-codegen.d.ts.map +1 -1
- package/dist/src/lib/plugins/route-codegen.js +4 -5
- package/dist/src/lib/plugins/route-codegen.mjs +52 -8
- package/dist/src/lib/plugins/route-scanner.cjs +189 -1
- package/dist/src/lib/plugins/route-scanner.d.ts +1 -2
- package/dist/src/lib/plugins/route-scanner.d.ts.map +1 -1
- package/dist/src/lib/plugins/route-scanner.js +7 -8
- package/dist/src/lib/plugins/route-scanner.mjs +158 -1
- package/dist/src/lib/plugins/vite.cjs +27 -1
- package/dist/src/lib/plugins/vite.mjs +6 -1
- package/dist/src/lib/render/await.cjs +38 -1
- package/dist/src/lib/render/await.d.ts +18 -0
- package/dist/src/lib/render/await.d.ts.map +1 -1
- package/dist/src/lib/render/await.js +20 -2
- package/dist/src/lib/render/await.mjs +17 -1
- package/dist/src/lib/render/component.cjs +221 -1
- package/dist/src/lib/render/component.d.ts +3 -44
- package/dist/src/lib/render/component.d.ts.map +1 -1
- package/dist/src/lib/render/component.js +23 -55
- package/dist/src/lib/render/component.mjs +214 -1
- package/dist/src/lib/render/deferred.cjs +175 -1
- package/dist/src/lib/render/deferred.js +5 -5
- package/dist/src/lib/render/deferred.mjs +158 -1
- package/dist/src/lib/render/index.cjs +573 -1
- package/dist/src/lib/render/index.d.ts +3 -17
- package/dist/src/lib/render/index.d.ts.map +1 -1
- package/dist/src/lib/render/index.js +8 -22
- package/dist/src/lib/render/index.mjs +590 -1
- package/dist/src/lib/render/lazy.cjs +67 -1
- package/dist/src/lib/render/lazy.d.ts +22 -1
- package/dist/src/lib/render/lazy.d.ts.map +1 -1
- package/dist/src/lib/render/lazy.js +26 -5
- package/dist/src/lib/render/lazy.mjs +50 -1
- package/dist/src/lib/render/suspense.cjs +141 -1
- package/dist/src/lib/render/suspense.d.ts +40 -0
- package/dist/src/lib/render/suspense.d.ts.map +1 -1
- package/dist/src/lib/render/suspense.js +46 -6
- package/dist/src/lib/render/suspense.mjs +136 -1
- package/dist/src/lib/render/versions.cjs +35 -1
- package/dist/src/lib/render/versions.js +6 -6
- package/dist/src/lib/render/versions.mjs +14 -1
- package/dist/src/lib/router/data.cjs +230 -1
- package/dist/src/lib/router/data.d.ts +1 -13
- package/dist/src/lib/router/data.d.ts.map +1 -1
- package/dist/src/lib/router/data.js +0 -12
- package/dist/src/lib/router/data.mjs +214 -1
- package/dist/src/lib/router/index.cjs +627 -1
- package/dist/src/lib/router/index.d.ts +62 -10
- package/dist/src/lib/router/index.d.ts.map +1 -1
- package/dist/src/lib/router/index.js +85 -33
- package/dist/src/lib/router/index.mjs +639 -1
- package/dist/src/lib/server/hydration.cjs +169 -1
- package/dist/src/lib/server/hydration.d.ts +15 -55
- package/dist/src/lib/server/hydration.d.ts.map +1 -1
- package/dist/src/lib/server/hydration.js +23 -62
- package/dist/src/lib/server/hydration.mjs +148 -1
- package/dist/src/lib/server/index.cjs +401 -11
- package/dist/src/lib/server/index.d.ts +30 -6
- package/dist/src/lib/server/index.d.ts.map +1 -1
- package/dist/src/lib/server/index.js +34 -11
- package/dist/src/lib/server/index.mjs +379 -11
- package/dist/src/lib/server/reactive.cjs +197 -1
- package/dist/src/lib/server/reactive.d.ts +18 -77
- package/dist/src/lib/server/reactive.d.ts.map +1 -1
- package/dist/src/lib/server/reactive.js +19 -78
- package/dist/src/lib/server/reactive.mjs +176 -1
- package/dist/src/lib/theme/index.cjs +110 -1
- package/dist/src/lib/theme/index.d.ts +19 -4
- package/dist/src/lib/theme/index.d.ts.map +1 -1
- package/dist/src/lib/theme/index.js +17 -2
- package/dist/src/lib/theme/index.mjs +89 -1
- package/dist/src/lib/utils/index.cjs +209 -1
- package/dist/src/lib/utils/index.d.ts +0 -93
- package/dist/src/lib/utils/index.d.ts.map +1 -1
- package/dist/src/lib/utils/index.js +0 -93
- package/dist/src/lib/utils/index.mjs +188 -1
- package/dist/src/routes.cjs +37 -1
- package/dist/src/routes.d.ts +1 -1
- package/dist/src/routes.js +2 -2
- package/dist/src/routes.mjs +17 -1
- package/dist/src/server.cjs +400 -11
- package/dist/src/server.d.ts +0 -1
- package/dist/src/server.d.ts.map +1 -1
- package/dist/src/server.js +0 -1
- package/dist/src/server.mjs +377 -11
- package/dist/src/utils.cjs +21 -1
- package/dist/src/utils.d.ts +1 -1
- package/dist/src/utils.js +1 -1
- package/dist/src/utils.mjs +4 -1
- package/dist/src/version.generated.cjs +26 -1
- package/dist/src/version.generated.d.ts +1 -1
- package/dist/src/version.generated.js +2 -2
- package/dist/src/version.generated.mjs +5 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +17 -16
- package/src/index.ts +2 -14
- package/dist/src/cdn/chunk-55BT3H6E.mjs +0 -1
- package/dist/src/cdn/router-5JJZBK4E.mjs +0 -1
- package/dist/src/lib/client/chunk-SM4WHBOP.mjs +0 -1
- package/dist/src/lib/client/router-IBD4WPQT.mjs +0 -1
package/dist/cdn/core.global.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";var Fluixi=(()=>{var Gt=Object.defineProperty;var us=Object.getOwnPropertyDescriptor;var cs=Object.getOwnPropertyNames;var fs=Object.prototype.hasOwnProperty;var L=(e,t)=>()=>(e&&(t=e(e=0)),t);var mn=(e,t)=>{for(var r in t)Gt(e,r,{get:t[r],enumerable:!0})},ds=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of cs(t))!fs.call(e,o)&&o!==r&&Gt(e,o,{get:()=>t[o],enumerable:!(n=us(t,o))||n.enumerable});return e};var ps=e=>ds(Gt({},"__esModule",{value:!0}),e);function gs(e){return y.observer=e,()=>{y.observer===e&&(y.observer=null)}}function rr(e){let t=y.observer;t&&t.created(e.parents===void 0?{...e,parents:W,origin:e.origin??vs}:e)}function bs(e){return y.observer?(W.push(e),!0):!1}function ws(){W.pop()}function As(e){y.observer?.ran?.(e)}function xs(e,t){y.observer?.wrote?.(e,t)}function B(e,t,r,n){let o=y.observer;!o?.bound||!W.length||o.bound(W[W.length-1],e,t,r,n)}function J(e,t,r,n){let o=y.observer;!o?.directive||!W.length||o.directive(W[W.length-1],e,t,r,n)}function Ss(e){y.observer?.contextCreated?.(e)}function Zt(e,t,r){let n=y.observer;!n?.context||!W.length||n.context(W[W.length-1],e,t,r)}function nr(e){y.observer?.disposed?.(e)}function xn(){return y.observer!=null}function Qt(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}function Ts(e){if(y.untracked)return e();y.untracked=!0;try{return e()}finally{y.untracked=!1}}function pe(e){let t=Ne(e);return e&&(e.owned??=[]).push(t),t}function he(e,t=!0){Re(e,t)}function On(e){return!!e&&e.disposed===!0}function Ne(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function X(e,t){let r=Symbol(t??"context");return Ss(r),{id:r,defaultValue:e,Provider:n=>{Zt(r,"provide",n.value);let o=y.owner,s=Ne(o);(s.contexts=new Map).set(r,n.value),o&&(o.owned??=[]).push(s),y.owner=s;try{return n.children}finally{y.owner=o}}}}function V(e){let t=y.owner;for(;t;){if(t.contexts&&t.contexts.has(e.id)){let r=t.contexts.get(e.id);return Zt(e.id,"read",r),r}t=t.parent}return Zt(e.id,"read",e.defaultValue),e.defaultValue}function Cn(e,t){let r=e;for(;r;){if(r.contexts&&r.contexts.has(t.id))return r.contexts.get(t.id);r=r.parent}return t.defaultValue}function _s(e,t,r){let n=Ne(y.owner);(n.contexts=new Map).set(e.id,t),y.owner&&(y.owner.owned??=[]).push(n);let o=y.owner;y.owner=n;try{return r()}finally{y.owner=o}}function Ps(e){y.onSuspend=e}function Es(e){return y.onSuspend?(y.onSuspend(e,y.owner),!0):!1}function js(e){y.onError=e}function R(){return y.owner}function Tn(e){let t=y.owner;return y.owner=e,t}function N(e,t){let r=y.owner;y.owner=e;try{return t()}finally{y.owner=r}}function x(e){if(y.owner){if(y.owner.disposed){e();return}(y.owner.cleanups??=[]).push(e)}}function Re(e,t=!0){if(!e.disposed){if(e.owned){for(let r=e.owned.length-1;r>=0;r--)Re(e.owned[r]);e.owned=null}if(e.cleanups){for(let r=e.cleanups.length-1;r>=0;r--)e.cleanups[r]();e.cleanups=null}t&&(e.disposed=!0)}}function I(e){let t=Ne(y.owner);y.owner&&(y.owner.owned??=[]).push(t);let r=y.owner;y.owner=t;try{return e(()=>Re(t))}finally{y.owner=r}}function $s(e){y.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Rs(e){e.queued||(e.queued=!0,y.queue.push(e),!y.scheduled&&y.batchDepth===0&&(y.scheduled=!0,y.hostSchedule(or)))}function or(){if(y.scheduled=!1,y.flushing)return;y.flushing=!0;let e=0;try{for(;y.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let t=y.queue;y.queue=[];for(let r of t)r.queued=!1,r.disposed||r.run()}}finally{y.flushing=!1}}function Ns(){y.batchDepth===0&&or()}function Ms(e){y.batchDepth++;try{return e()}finally{--y.batchDepth===0&&or()}}function ir(e,t=!1){let r=new Ls(e,t);return()=>r.dispose()}function Ds(e){return!!e&&typeof e.then=="function"}function b(e,t){let r=new Os(e,{equals:t?.equals}),n=(()=>r.get()),o=(s=>{let a=typeof s=="function"?s(r.peek()):s;return r.set(a),Ns(),a});return Object.defineProperty(n,_n,{value:!0,enumerable:!0}),Object.defineProperty(n,qs,{value:{get value(){return r.peek()},get version(){return r.version}},enumerable:!1}),rr({kind:"signal",node:r,handle:n,name:t?.name,set:o}),xn()&&x(()=>nr(r)),[n,o]}function g(e,t,r){let n=t,o=R(),s=new kn(()=>N(o,()=>{try{return n=e(n)}catch(i){if(Ds(i))return Es(i),n;throw i}}),{equals:r?.equals}),a=(()=>s.get());return Object.defineProperty(a,_n,{value:!0,enumerable:!0}),Object.defineProperty(a,Is,{value:!0,enumerable:!0}),rr({kind:"memo",node:s,handle:a,name:r?.name}),xn()&&x(()=>nr(s)),a}function S(e,t){let r=t;return ir(()=>{r=e(r)},!0)}function Pn(e,t){let r=t;ir(()=>{r=e(r)})}function _(e,t){let r=t;return ir(()=>{r=e(r)})}function E(e){return Ms(e)}function O(e){return Ts(e)}function En(e,t,r){let n=[];return x(()=>{for(let o of n)o.dispose();n=[]}),g(()=>{let o=e()||[];return O(()=>{if(o.length===0){for(let l of n)l.dispose();return n=[],r?.fallback?r.fallback():[]}let s=new Map;for(let l of n)s.has(l.item)||s.set(l.item,l);let a=[],i=new Set;for(let l=0;l<o.length;l++){let u=o[l],f=s.get(u);if(f&&!i.has(f))f.setIndex(l),a.push(f),i.add(f);else{let c,d,h;I(m=>{h=m;let[w,C]=b(l,{name:"row index"});d=C,c=t(u,w)});let p={item:u,rendered:c,dispose:h,setIndex:d};a.push(p),i.add(p)}}for(let l of n)i.has(l)||l.dispose();return n=a,a.map(l=>l.rendered)})},void 0,{name:"mapArray"})}function jn(e,t,r,n){let o=[],s=[];return x(()=>{for(let a of s)a.dispose();o=[],s=[]}),g(()=>{let a=e()||[];return O(()=>{if(a.length===0){for(let c of s)c.dispose();return o=[],s=[],n?.fallback?n.fallback():[]}let i=new Map;for(let c=0;c<o.length;c++)i.set(o[c],s[c]);let l=[],u=[],f=new Set;for(let c=0;c<a.length;c++){let d=t(a[c]),h=i.get(d);if(h&&!f.has(d))h.setIndex(c),l.push(h);else{let p,m,w;I(C=>{w=C;let[M,je]=b(c,{name:"row index"});m=je;let Ye=g(de=>(e()||[])[M()]??de,a[c]);p=r(Ye,M)}),l.push({rendered:p,dispose:w,setIndex:m})}u.push(d),f.add(d)}for(let[c,d]of i)f.has(c)||d.dispose();return o=u,s=l,l.map(c=>c.rendered)})},void 0,{name:"keyArray"})}function $n(e,t,r){let n=[];return x(()=>{for(let o of n)o.dispose();n=[]}),g(()=>{let o=e()||[];return O(()=>{if(o.length===0){for(let l of n)l.dispose();return n=[],r?.fallback?r.fallback():[]}let s=n.length,a=o.length;for(let l=s;l<a;l++){let u,f,c,d=o[l];I(h=>{c=h;let[p,m]=b(d);f=m,u=t(p,l)}),n.push({rendered:u,setItem:f,dispose:c})}for(let l=a;l<s;l++)n[l].dispose();a<s&&(n=n.slice(0,a));let i=Math.min(s,a);for(let l=0;l<i;l++)n[l].setItem(o[l]);return n.map(l=>l.rendered)})},void 0,{name:"indexArray"})}function $(e){return typeof e=="function"&&e[Ws]===!0}function Vs(e){wn&&wn(e)}function Rn(e){er=e}function Us(e){return er?er(e):void 0}function Nn(e){tr=e}function zs(){return tr?tr():void 0}function Ks(e,t){An&&An(e,t)}function Mn(e,t=(r,n)=>r===n){let r=new Map;return S(()=>{let n=e();for(let[o,s]of r){let[a,i]=s,l=t(o,n);a()!==l&&i(l)}}),n=>{let o=r.get(n);if(!o){let[s,a]=b(!1);o=[s,a],r.set(n,o);let i=e();a(t(n,i))}return o[0]()}}function Ln(e,t){let[r,n]=b(e(),t);return S(()=>{let o=e();t?.timeoutMs?setTimeout(()=>n(()=>o),t.timeoutMs):typeof requestIdleCallback=="function"?requestIdleCallback(()=>n(()=>o)):Promise.resolve().then(()=>n(()=>o))}),r}function Dn(e,t){let r,n=(...o)=>{r!==void 0&&clearTimeout(r),r=setTimeout(()=>{r=void 0,e(...o)},t)};return x(()=>{r!==void 0&&clearTimeout(r)}),n}function Bs(e){return!!e&&typeof e.then=="function"}function ee(e,t,r={}){let n,o;typeof t=="function"?(n=typeof e=="function"?e:()=>e,o=t):(n=()=>!0,o=e,t&&typeof t=="object"&&(r=t));let s=r.transport===!1?void 0:zs(),a=s!==void 0?Us(s):void 0,i=a!==void 0,[l,u]=b(a!==void 0?a.value:r.initialValue,{equals:!1}),[f,c]=b(void 0,{equals:!1}),[d,h]=b(a!==void 0||r.initialValue!==void 0?"ready":"unresolved",{equals:!1}),[p,m]=b(void 0,{equals:!1}),[w,C]=b(void 0,{equals:!1}),M=Yt,je=!1;S(()=>{let D=n();if(w(),D===!1||D===null||D===void 0){M=Yt,E(()=>{h("unresolved"),m(void 0),c(void 0)});return}let Ze=je;if(je=!1,M!==Yt&&D===M&&!Ze)return;if(M=D,i){i=!1;return}let Qe=!1;x(()=>Qe=!0);let hn=O(d),ls=O(l),yn=hn==="ready"||hn==="refreshing";E(()=>{h(yn?"refreshing":"pending"),c(void 0)});try{let ne=o(D,{value:ls,refetching:yn});Bs(ne)?(m(ne),Vs(ne),ne.then(et=>{Qe||(s!==void 0&&Ks(s,et),E(()=>{u(()=>et),h("ready"),m(void 0)}))},et=>{Qe||E(()=>{c(et),h("errored"),m(void 0)})})):E(()=>{u(()=>ne),h("ready"),m(void 0)})}catch(ne){if(Qe)return;E(()=>{c(ne),h("errored"),m(void 0)})}});let Ye=()=>{let D=d();return D==="pending"||D==="refreshing"},de=(()=>{let D=f();if(D)throw D;if(Ye()){let Ze=p();if(Ze)throw Ze}return l()});return Object.defineProperties(de,{state:{get:d},loading:{get:Ye},error:{get:f},latest:{get:l}}),Object.defineProperty(de,Symbol.for("resource"),{value:!0,enumerable:!0}),Object.defineProperty(de,Symbol.for("signal"),{value:!0,enumerable:!0}),[de,{mutate:u,refetch:()=>{je=!0,C(void 0)}}]}function tt(e){if(typeof e=="function"&&!e.length){let t=e();return $(t)?t:tt(t)}if(Array.isArray(e)){let t=[];for(let r=0;r<e.length;r++){let n=tt(e[r]);Array.isArray(n)?t.push.apply(t,n):t.push(n)}return t}return e}function oe(e){let t=g(e);return Fs?g(()=>tt(t()),void 0,{name:"children"}):g(()=>tt(t()))}function qn(){let[e,t]=b(0),r=0;return{increment:()=>t(r+=1),decrement:()=>t(r-=1),inFallback:()=>e()>0}}function sr(e,t){return _s(In,e,t)}var hs,ys,y,ms,W,vs,ks,gn,vn,bn,$e,Sn,Os,kn,Cs,Ls,_n,Is,qs,Hs,Fs,Ws,wn,er,tr,An,Yt,In,Js,ye,A=L(()=>{"use strict";hs="__fluixi_signal_next_state__",ys=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},y=globalThis[hs]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:ys,onSuspend:null,onError:null,observer:null},ms="1.0.0-alpha.83";W=[];ks="__FLUIXI_DEVTOOLS_HOOK__",gn=globalThis[ks];if(typeof gn?.inject=="function")try{gn.inject({observeReactiveNodes:gs,version:ms})}catch{}vn=0,bn=1,$e=2,Sn=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(y.untracked)return;let e=y.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}},Os=class extends Sn{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++,xs(this,y.consumer),this.observers)for(let t of[...this.observers])t.markDirty($e);Qt(this)}}peek(){return this._value}},kn=class extends Sn{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=$e,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(y.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===bn&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===$e)break}(this.state===$e||!this._initialized)&&this.recompute(),this.state=vn}recompute(){if(this.sources){for(let i of this.sources)i.observers?.delete(this);this.sources.clear()}let e=y.consumer,t=y.untracked,r=bs(this);y.consumer=this,y.untracked=!1;let n,o=!1,s;try{n=this._fn()}catch(i){o=!0,s=i,n=this._value}finally{y.consumer=e,y.untracked=t,r&&ws()}let a=!this._initialized||this._threw!==o||(o?s!==this._error:!this._equals(this._value,n));if(this._initialized=!0,this._threw=o,this._error=s,this._value=n,As(this),a){if(this.version++,this.observers)for(let i of[...this.observers])i.markDirty($e);Qt(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===vn;if(this.state=e,t){if(this.observers)for(let r of[...this.observers])r.markDirty(bn);Qt(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};Cs=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()}};Ls=class{constructor(e,t=!1){this.queued=!1,this.disposed=!1,this.owner=Ne(y.owner),y.owner&&(y.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new kn(()=>{Re(this.owner,!1),N(this.owner,()=>{let r=e();typeof r=="function"&&(this.owner.cleanups??=[]).push(r)})}),rr({kind:"effect",node:this.computed,handle:this,internal:!t}),this.watcher=new Cs(()=>Rs(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"&&y.onSuspend){y.onSuspend(e,this.owner);return}if(y.onError&&y.onError(e,this.owner))return;throw e}}}dispose(){this.disposed||(this.disposed=!0,nr(this.computed),this.watcher.unwatch(this.computed),Re(this.owner))}};$s(()=>{});_n=Symbol.for("signal"),Is=Symbol.for("memo"),qs=Symbol.for("signal-node");Hs=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0,Fs=typeof process>"u"?Hs:!1,Ws=Symbol.for("signal");wn=null;er=null;tr=null;An=null;Yt=Symbol();In=X();Ps((e,t)=>{let r=Cn(t,In);r&&(r.increment(),e.finally(()=>r.decrement()))});Js=X();js((e,t)=>{let r=Cn(t,Js);return r?(r.setError(e),!0):!1});ye=Symbol.for("fluixi-proxy")});var ao,lo=L(()=>{"use strict";ao="1.0.0-alpha.83"});function La(e){return P.observer=e,()=>{P.observer===e&&(P.observer=null)}}function Da(e,t){if(!P.observer)return t();let r=ft;ft=e;try{return t()}finally{ft=r}}function Ia(e){let t=P.observer;t&&t.created(e.parents===void 0?{...e,parents:ie,origin:e.origin??ft}:e)}function Ao(e){let t=P.observer;!t?.props||!ie.length||!e||t.props(ie[ie.length-1],e)}function qa(e){P.observer?.contextCreated?.(e)}function Ha(e,t,r){let n=P.observer;!n?.context||!ie.length||n.context(ie[ie.length-1],e,t,r)}function uo(e,t,r){P.observer?.moved?.(e,t,r)}function co(e){P.observer?.disposed?.(e)}function xo(){return P.observer!=null}function Wa(e){if(P.untracked)return e();P.untracked=!0;try{return e()}finally{P.untracked=!1}}function Va(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function So(e,t){let r=Symbol(t??"context");return qa(r),{id:r,defaultValue:e,Provider:n=>{Ha(r,"provide",n.value);let o=P.owner,s=Va(o);(s.contexts=new Map).set(r,n.value),o&&(o.owned??=[]).push(s),P.owner=s;try{return n.children}finally{P.owner=o}}}}function ko(e,t){let r=e;for(;r;){if(r.contexts&&r.contexts.has(t.id))return r.contexts.get(t.id);r=r.parent}return t.defaultValue}function Ua(e){P.onSuspend=e}function za(e){P.onError=e}function Ka(e){P.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Oo(e){return Wa(e)}function Co(e){return typeof e=="function"&&e[Ba]===!0}function Ga(e,t){if(!we(e)||!xo())return;let r=new Set,n=a=>{if(!(!we(a)||r.has(a))){r.add(a);for(let i of Object.values(a))n(i)}};n(ht.get(t)??t);let o=new Set,s=a=>{if(!we(a))return;let i=a;if(r.has(i)||o.has(i))return;o.add(i);let l=Ie.get(i);if(l){for(let u of l.keys.values())co(u);l.all&&co(l.all),Ie.delete(i),Ae.delete(i),mr.delete(i)}for(let u of Object.values(i))s(u)};s(e)}function To(e,t,r){let n=t?.owner,o=n&&r!==void 0?yt(n.name,r,t?.array):void 0,[s,a]=Da(n?.store,()=>b(e,o?{name:o}:void 0)),i=s;return i.$=a,i}function mt(e){let t=Ie.get(e);return t?t.owner||(t.owner=Ae.get(e)):Ie.set(e,t={keys:new Map,owner:Ae.get(e),array:Array.isArray(e)}),t}function go(e,t,r){let n=e.keys.get(t);return n||e.keys.set(t,n=To(r,e,t)),n}function Ya(e,t,r,n){let o=Ae.get(e);if(o&&o.store===t&&o.name===r)return;let s={store:t,name:r};Ae.set(e,s),ht.set(e,ht.get(n)??n);let a=Ie.get(e);if(a&&(a.owner=s,!!xo())){for(let[i,l]of a.keys)uo(l,t,yt(r,i,a.array));a.all&&uo(a.all,t,yt(r,"*",a.array))}}function vo(e){let t=mt(e);(t.all||(t.all=To(void 0,t,"*")))()}function bo(e,t){e.$(typeof t=="function"?()=>t:t)}function we(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 dt(e){if(!we(e))return e;let t=mr.get(e);if(t)return t;let r=new Proxy(e,Za);return mr.set(e,r),r}function _o(e,t=new Set){if(e==null||typeof e!="object")return e;let r=e[pt]??e;if(t.has(r)||!we(r))return r;t.add(r);let n=!1,o=a=>{let i=_o(a,t);return i!==a&&(n=!0),i};if(Array.isArray(r)){let a=r.map(o);return n?a:r}let s={};for(let a of Object.keys(r))s[a]=o(r[a]);return n?s:r}function De(e,t,r){let n=_o(r),o=e[t];if(o===n&&(n!==void 0||t in e))return;let s=Array.isArray(e),a=s?e.length:0;n===void 0?delete e[t]:e[t]=n;let i=mt(e),l=i.keys.get(t);if(l&&bo(l,n),Ga(o,e),s&&e.length!==a){let u=i.keys.get("length");u&&bo(u,e.length)}i.all&&i.all.$(void 0)}function wo(e,t){return typeof e=="function"?e(t):e}function gr(e,t){for(let r of Object.keys(t)){let n=t[r],o=e[r];n&&typeof n=="object"&&!Array.isArray(n)&&o&&typeof o=="object"&&!Array.isArray(o)?gr(o,n):De(e,r,n)}}function br(e){let t=[],r=e.replace(/\[([^\]]*)\]/g,".$1");for(let n of r.split("."))n.length&&t.push(n);return t}function Po(e,t,r){let n=t.length-1;for(let s=0;s<n;s++){let a=t[s];if(a==="*"){let l=t.slice(s+1);if(Array.isArray(e))for(let u=0;u<e.length;u++)Po(e[u],l,r);return}let i=e[a];(i==null||typeof i!="object")&&(i=/^\d+$/.test(t[s+1])?[]:{},De(e,a,i)),e=i}let o=t[n];if(o==="*"){if(Array.isArray(e))for(let s=0;s<e.length;s++)De(e,s,wo(r,e[s]));return}De(e,o,wo(r,e[o]))}function yr(e,t,r){Po(e,br(t),r)}function Qa(e,t){let r=t[0];if(typeof r=="function"&&t.length===1){let n=r(e);n&&n!==e&&gr(e,n);return}if(Array.isArray(r)&&t.length===1){for(let n of r)Array.isArray(n)&&yr(e,n[0],n[1]);return}if(r&&typeof r=="object"&&!Array.isArray(r)&&t.length===1){gr(e,r);return}if(Array.isArray(t[1])&&t.length>=3){yr(e,`${r}.${t[1].join(".")}`,t[2]);return}yr(e,String(r),t[1])}function vr(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(vr);let t={};for(let r of Object.keys(e))t[r]=vr(e[r]);return t}function be(e,t){let r=e;for(let n of br(t)){if(r==null)return;r=r[n]}return r}function tl(e,t){for(let r of el)e[r]=t[r].bind(t);e.$=t.reactive.bind(t)}function rl(e,t={immutable:!0}){let r=new Eo(e,t);return tl(r.set,r),[r.proxy,r.set]}function nl(e,t={}){return new Eo(e,{...t,immutable:!1})}function gt(e){if(e==null||typeof e!="object")return e;let t=e[pt];return t!==void 0?t:e}function ol(e){return O(()=>gt(e))}var Ra,Na,Ma,P,ie,ft,Fa,fo,ec,Ba,Ja,Xa,pt,po,ho,yo,mo,Ie,mr,Ae,ht,yt,Za,Eo,el,rc,jo=L(()=>{"use strict";A();Ra="1.0.0-alpha.83",Na="__fluixi_signal_next_state__",Ma=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},P=globalThis[Na]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Ma,onSuspend:null,onError:null,observer:null};ie=[];Fa="__FLUIXI_DEVTOOLS_HOOK__",fo=globalThis[Fa];if(typeof fo?.inject=="function")try{fo.inject({observeReactiveNodes:La,version:Ra})}catch{}Ka(()=>{});ec=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0,Ba=Symbol.for("signal");Ja=So();Ua((e,t)=>{let r=ko(t,Ja);r&&(r.increment(),e.finally(()=>r.decrement()))});Xa=So();za((e,t)=>{let r=ko(t,Xa);return r?(r.setError(e),!0):!1});pt=Symbol("store-raw"),po=Symbol("store-node"),ho=Symbol("store-has"),yo=Symbol("store-self"),mo=Symbol("store-track"),Ie=new WeakMap,mr=new WeakMap,Ae=new WeakMap,ht=new WeakMap;yt=(e,t,r)=>r?`${e}[${String(t)}]`:`${e}.${String(t)}`;Za={get(e,t,r){if(t===pt||t===po)return e;if(t===ye)return r;if(t===ho)return l=>l in e;if(t==="__proxy")return!0;if(t===mo||t===yo)return vo(e),r;let n=e[t];if(typeof n=="function"&&!Object.prototype.hasOwnProperty.call(e,t))return n;let o=Object.getOwnPropertyDescriptor(e,t);if(o&&o.get)return o.get.call(r);let s=mt(e),a=go(s,t,n),i=a();return we(i)?(s.owner&&Ya(i,a,yt(s.owner.name,t,s.array),e),dt(i)):i},set(){return!0},deleteProperty(e,t){return t in e&&De(e,t,void 0),!0},has(e,t){return t===pt||t===ye||t===po||t===ho||t===yo||t===mo?!0:(go(mt(e),t,e[t])(),t in e)},ownKeys(e){return vo(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};Eo=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...r)=>E(()=>Qa(this.root,r))),e&&typeof e=="object"&&(Ae.set(e,{store:this,name:t.name??"store"}),ht.set(e,e)),Ia({kind:"store",node:this,handle:()=>this.root,name:t.name})}get state(){return dt(this.root)}get proxy(){return dt(this.root)}get accessor(){return(()=>dt(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return gt(this.state);let t=this.state;for(let r of br(e)){if(t==null)return;t=t[r]}return gt(t)}select(e){return g(()=>e(this.state))}subscribe(e){return S(()=>e(this.state))}watch(e,t){let r;return S(()=>{let n=e(this.state);Object.is(n,r)||(t(n,r),r=n)})}reactive(e){return g(()=>this.state[e])}produce(e){this.set((t=>{let r=vr(t);return e(r),r}))}reconcile(e,t={}){this.set(e)}push(e,...t){let r=be(this.root,e);this.set(e,r.concat(t))}pop(e){let t=be(this.root,e).slice(),r=t.pop();return this.set(e,t),r}shift(e){let t=be(this.root,e).slice(),r=t.shift();return this.set(e,t),r}splice(e,t,r,...n){let o=be(this.root,e).slice(),s=o.splice(t,r,...n);return this.set(e,o),s}insert(e,t,r){let n=be(this.root,e).slice();n.splice(t,0,r),this.set(e,n)}removeAt(e,t){let r=be(this.root,e).slice(),n=r.splice(t,1);return this.set(e,r),n}toObservable(){let[e]=b(this.state);return e.toObservable()}dispose(){}},el=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","unwrap","toObservable"];rc=Object.freeze({createStore:rl,createMutableStore:nl,batch:E,unwrap:gt,untrackStore:ol})});function il(e){return e.localName.includes("-")}function $o(e,t,r,n=!1){if(r==null){e.removeAttribute(t);return}if(il(e)){e[t]=r;return}T(e,t,r,n)}function qo(e,...t){e.classList.add(...t)}function Ho(e,...t){e.classList.remove(...t)}function Fo(e,...t){t.forEach(r=>e.classList.toggle(r))}function T(e,t,r,n=!1){if(r==null||r===!1){e.removeAttribute(t);return}if(r===!0){e.setAttribute(t,"");return}if(typeof r=="object"){e.setAttribute(t,JSON.stringify(r));return}e.setAttribute(t,String(r))}function Wo(e){return e&&typeof e=="object"&&e.strings&&Array.isArray(e.strings)&&e.values&&Array.isArray(e.values)}function Ot(e){return e instanceof Node}function Vo(e){H.core=e}function Ct(e){H.core&&e.setAttribute("fluixi",H.core),e.setAttribute("fx-dom",H.dom),e.setAttribute("fx-reactive",H.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=H)}function Tt(){let e=[H.core,H.dom,H.reactive].filter(t=>t!==void 0);new Set(e).size<=1||console.warn(`[fluixi] package versions disagree — core ${H.core??"(absent)"}, dom ${H.dom}, reactive ${H.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 Uo(e){return Object.defineProperty(e,Symbol.for("fluixi-provider"),{value:!0,enumerable:!0}),e}function qe(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}function zo(e){return Object.defineProperty(e,Symbol.for("fluixi-suspense"),{value:!0,enumerable:!0}),e}function al(e){return typeof e=="function"&&e[Symbol.for("fluixi-router")]===!0}function ll(e){return typeof e=="function"&&e[Symbol.for("fluixi-routes")]===!0}function ul(e){return typeof e=="function"&&e[Symbol.for("fluixi-route")]===!0}function cl(e){return typeof e=="function"&&e[Symbol.for("fluixi-outlet")]===!0}function fl(e){return typeof e=="function"&&e[Symbol.for("fluixi-provider")]===!0}function dl(e){return typeof e=="function"&&e[Symbol.for("fluixi-context")]===!0}function Z(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}function pl(e){return typeof e=="function"&&e[Symbol.for("fluixi-suspense")]===!0}function Ko(e){return al(e)?{type:"router",value:e}:ul(e)?{type:"route",value:e}:ll(e)?{type:"routes",value:e}:cl(e)?{type:"outlet",value:e}:Z(e)?{type:"component",value:e}:pl(e)?{type:"suspense",value:e}:fl(e)?{type:"provider",value:e}:dl(e)?{type:"context",value:e}:{type:"none",value:e}}function U(){return Ar.server}function Cr(){if(!Ar.nodes)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return Ar.nodes}function Tr(e){return e!=null&&e[_t]===!0?!0:typeof Node<"u"&&e instanceof Node}function ml(e){return e!=null&&e[_t]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function gl(e){return e!=null&&e[_t]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}function vl(e){Bo=e}function Jo(){return Bo}function No(e,t){return v.active&&t.parentNode===e}function Xo(e){let t=v.parents.lastIndexOf(e);t!==-1&&(v.parents.length=t),v.cursor=e.nextSibling}function Go(e){if(!v.active)return e();let t=v.cursor,r=v.parents;v.active=!1,v.parents=[];try{return e()}finally{v.active=!0,v.cursor=t,v.parents=r}}function Yo(e){if(!v.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&Xo(t)}function Mo(e,t){return t&&(e[wl]=t),e}function ae(e){if(!U())for(let t of e)bt.has(t)||_r.has(t)||(bt.add(t),document.addEventListener(t,Al))}function Al(e){let t=`$$${e.type}`,r=e.composedPath&&e.composedPath()[0]||e.target;for(;r;){let n=r[t];if(n&&!r.disabled&&(n(e),e.cancelBubble))return;r=r.host&&r.host!==r&&r.host instanceof Element?r.host:r.parentNode}}function xl(e,t,r){if(e[`$$${t}`]=r,_r.has(t)){let n=`__fx_${t}`;if(!e[n]){let o=s=>{e[`$$${t}`]?.(s)};e.addEventListener(t,o),e[n]=o}return}bt.has(t)||ae([t])}function Lo(e,t){delete e[`$$${t}`];let r=`__fx_${t}`,n=e[r];n&&(e.removeEventListener(t,n),delete e[r])}function re(e,t=!1){if(U())return Cr().createText(e);if(v.active&&!t){let r=Jo()?.hydrateText(e);if(r)return r}return document.createTextNode(e)}function Se(e,t=!1,r){if(U())return Cr().createElement(e,t);if(v.active){let n=Jo()?.hydrateElement(e);if(n)return r?Mo(n,r):n}return Mo(t?document.createElementNS(Or,e):document.createElement(e),r)}function kl(e,t,r,n,o){let s=n,a=new Map;return _(()=>{B(r??t,"content",void 0,e);let i;if(Z(e)&&!$(e)){if(!a.has(e)){Y++;try{let l=e();a.set(e,l)}finally{Y--}}for(i=a.get(e);typeof i=="function"&&$(i);)i=i()}else for(i=e();typeof i=="function"&&$(i);)i=i();{let l=0;for(;typeof i=="function"&&l++<50;)if(Z(i)){if(!a.has(i)){let u=i;Y++;try{let f=u();a.set(u,f)}finally{Y--}}i=a.get(i)}else if($(i))i=i();else if(i=i(),typeof i!="function"||!$(i)&&!Z(i))break}Y++;try{s=wt(t,i,r,s,a),o(s)}finally{Y--}})}function F(e,t,r,n){if(Y>Sl)return console.error("[insert] Exceeded max call depth — possible infinite loop."),()=>null;r!==void 0&&!r&&(r=re("",!0),e.appendChild(r));let o=n??null,s=l=>Array.isArray(l)&&l.some(u=>typeof u=="function"),a=l=>typeof l=="function"?l:()=>l;if(typeof t!="function"&&!s(t)){Y++;try{o=wt(e,t,r,o)}finally{Y--}return()=>o}let i=kl(a(t),e,r,o,l=>{o=l});return()=>(i?.(),o)}function wt(e,t,r,n,o){if(t==null||typeof t=="boolean")return se(e,n,r);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return se(e,n,r);if(vt(t)){let a=re("",!0);return Array.isArray(n)?n.length>0?(e.replaceChild(a,n[0]),se(e,n.slice(1),r)):q(e,a,r):n?e.replaceChild(a,n):q(e,a,r),t.then(i=>{a.parentNode===e&&wt(e,i,a.nextSibling,a)}).catch(i=>{console.error("Error resolving promise in insertExpression:",i)}),a}let s=typeof t;if(s==="string"||s==="number"){if(s==="number"&&(t=String(t)),Array.isArray(n)){if(n.length===0){let i=re(t);return q(e,i,r),i}if(n.length===1&&n[0].nodeType===3)return n[0].data=t,n;n=se(e,n,r)}if(n&&gl(n))return n.data=t,n;let a=re(t);return n&&n.parentNode===e?e.replaceChild(a,n):No(e,a)||q(e,a,r),a}if(Tr(t))return No(e,t)?(Xo(t),t):Array.isArray(n)?(n.length===0?q(e,t,r):n[0].parentNode===e?(e.replaceChild(t,n[0]),se(e,n.slice(1),r)):q(e,t,r),t):(n?n!==t&&(n.parentNode===e?e.replaceChild(t,n):q(e,t,r)):q(e,t,r),t);if(Array.isArray(t)){let a=[],i=Array.isArray(n)?n:n?[n]:[],l=[];G(t,a,e,r,!0,o,l);let u=Ol(e,i,a,r);for(let f of l){let c=F(e,f.sig,f.marker);x(()=>{se(e,c()),f.marker.parentNode===e&&e.removeChild(f.marker)})}return u}if(s==="object"&&t!==null&&typeof t=="object"){let a=t;if("type"in a&&"props"in a){let i=a;if(typeof i.type=="function"){let l=i.type(i.props||{});return wt(e,l,r,n)}}}return se(e,n,r)}function G(e,t,r,n,o=!0,s,a){for(let i=0;i<e.length;i++){let l=e[i];if(!(l==null||typeof l=="boolean")){for(;typeof l=="function"&&!vt(l)&&!$(l)&&!Z(l)&&(l=l(),!(l==null||typeof l=="boolean")););if(!(l==null||typeof l=="boolean")){if(typeof l=="function"){let u;for(Z(l)&&!$(l)?(s||(s=new Map),s.has(l)||s.set(l,l()),u=s.get(l)):u=l();typeof u=="function"&&!vt(u)&&!$(u)&&!Z(u);)s||(s=new Map),s.has(u)||s.set(u,u()),u=s.get(u);if(u==null||typeof u=="boolean")continue;if(typeof u=="function"){if($(u)){if(a){let c=re("",!0);t.push(c),a.push({marker:c,sig:u});continue}let f=u();for(;typeof f=="function"&&$(f);)f=f();if(f==null||typeof f=="boolean")continue;Array.isArray(f)?G(f,t,r,n,o,s):G([f],t,r,n,o,s);continue}continue}Array.isArray(u)?G(u,t,r,n,o,s,a):G([u],t,r,n,o,s,a);continue}if(vt(l)){let u=re("",!0);t.push(u),l.then(f=>{if(u.parentNode){let c=[];if(G([f],c,u.parentNode,void 0,!1,s),c.length>0){u.parentNode.replaceChild(c[0],u);for(let d=1;d<c.length;d++)u.parentNode?.insertBefore(c[d],c[d-1].nextSibling)}}}).catch(f=>console.error("Error resolving promise in array:",f));continue}if(Array.isArray(l)){G(l,t,r,n,o,s,a);continue}if(Tr(l)){t.push(l);continue}if(typeof l=="object"&&l!==null&&"type"in l&&"props"in l){let u=l;if(typeof u.type=="function"){let f=u.type(u.props||{});Array.isArray(f)?G(f,t,r,n,!1,s):G([f],t,r,n,!1,s);continue}}if(typeof l=="string"||typeof l=="number"){let u=String(l);if(u.trim()===""&&u!==" ")continue;t.push(re(u));continue}t.push(re(String(l)))}}}}function Ol(e,t,r,n){for(let c=0;c<r.length;c++){let d=r[c].parentNode;d!==null&&d!==e&&d.nodeType!==11&&(r=r.slice(),r[c]=r[c].cloneNode(!0))}let o=r.length,s=t.length,a=o,i=0,l=0,u=s>0?t[s-1].nextSibling??void 0:n,f=null;for(;i<s||l<a;){if(t[i]===r[l]){i++,l++;continue}for(;s>i&&a>l&&t[s-1]===r[a-1];)s--,a--;if(s===i){let c=a<o?l?r[l-1].nextSibling??void 0:r[a-l]:u;for(;l<a;)q(e,r[l++],c)}else if(a===l)for(;i<s;)(!f||!f.has(t[i]))&&t[i].parentNode===e&&e.removeChild(t[i]),i++;else if(t[i]===r[a-1]&&r[l]===t[s-1]){let c=t[--s].nextSibling;q(e,r[l++],t[i++].nextSibling),q(e,r[--a],c),t[s]=t[i-1]}else{if(!f){f=new Map;let d=l;for(;d<a;)f.set(r[d],d++)}let c=f.get(t[i]);if(c!=null)if(l<c&&c<a){let d=i,h=1;for(;++d<s&&d<a&&!(!f.has(t[d])||f.get(t[d])!==c+h);)h++;if(h>c-l){let p=t[i];for(;l<c;)q(e,r[l++],p)}else t[i].parentNode===e?e.replaceChild(r[l++],t[i++]):(q(e,r[l++],u),i++)}else i++;else t[i].parentNode===e&&e.removeChild(t[i]),i++}}return r}function se(e,t,r){if(t)if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n].parentNode===e&&e.removeChild(t[n]);else t.parentNode===e&&e.removeChild(t);return null}function q(e,t,r){v.active&&t.parentNode===e||(r&&r.parentNode===e?e.insertBefore(t,r):e.appendChild(t))}function xe(e,t,r){r==null?delete e[t]:e[t]=r}function Qo(e,t,r){let n=r,o;return Array.isArray(r)&&(n=r[0],o=r[1]),typeof n!="function"?()=>{}:(e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o))}function ei(e,t){if(!t||typeof t!="function")return;let r=t[Zo]?.name;if(!r)return;let n=r.indexOf(":");n!==-1&&J(e,r.slice(0,n),r.slice(n+1),t)}function At(e,t,r){let n=typeof r=="function"?O(()=>r()):r;if(!(!n||typeof n!="object"))for(let o of Object.keys(n))J(e,t,o)}function ti(e,t){let r=(n,o)=>{typeof n=="function"&&(J(e,"use",n.name||"use",o),n(e,o??(()=>{})))};if(typeof t=="function"){r(t);return}if(Array.isArray(t)){if(typeof t[0]=="function"){r(t[0],t[1]);return}for(let n of t)Array.isArray(n)?r(n[0],n[1]):r(n)}}function xr(e,t,r,n=!1){return ei(e,r),typeof r!="function"?(T(e,t,r,n),()=>{}):_(()=>{B(e,"attribute",t,r);let o=typeof r=="function"?r():r;T(e,t,o,n)})}function Sr(e,t,r){return typeof r!="function"?(xe(e,t,r),()=>{}):(ei(e,r),_(()=>{B(e,"property",t,r);let n=typeof r=="function"?r():r;xe(e,t,n)}))}function ri(e,t,r){return typeof r!="function"?(T(e,t,!!r),()=>{}):_(()=>{B(e,"attribute",t,r);let n=r();T(e,t,!!n)})}function xt(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){_(()=>{B(e,"attribute","class",t),xt(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 r=Object.keys(t).filter(n=>{let o=t[n];return typeof o=="function"?o():!!o}).join(" ");e.setAttribute("class",r);return}e.setAttribute("class",String(t))}function St(e,t,r){if(!(!t||typeof t!="object"))for(let n in t){let o=t[n],s=n.split(/\s+/).filter(Boolean);if(typeof o=="function"&&r)r.push(_(()=>{let a=!!o();for(let i of s)e.classList.toggle(i,a)}));else{let a=!!(typeof o=="function"?o():o);for(let i of s)e.classList.toggle(i,a)}}}function kt(e,t){let r=t;for(;typeof r=="function";)r=r();if(r==null){e.removeAttribute("style");return}if(typeof r=="string"){e.style.cssText=r;return}if(typeof r=="object")for(let n in r){let o=r[n];o==null?e.style[n]="":e.style[n]=o}}function ni(e){let{element:t,props:r,prevProps:n=bl,isSVG:o=!1,skipChildren:s=!1}=e;if(!t||!ml(t))return console.error("[spread] Error: element is not a DOM Element!"),()=>{};if(!r)return console.warn("[spread] Warning: props is undefined!"),()=>{};let a=o||t.namespaceURI===Or,i=[];for(let l in r){if(s&&l==="children")continue;let u=r[l],f=n[l];if(u===f)continue;if(l==="ref"){Pr(u,t);continue}if(l==="use"){ti(t,u);continue}if(l.startsWith("on:")){i.push(Qo(t,l.slice(3),u));continue}if(l.startsWith("prop:")){J(t,"prop",l.slice(5),u),i.push(Sr(t,l.slice(5),u));continue}if(l.startsWith("attr:")){J(t,"attr",l.slice(5),u),i.push(xr(t,l.slice(5),u,a));continue}if(l.startsWith("bool:")){J(t,"bool",l.slice(5),u),i.push(ri(t,l.slice(5),u));continue}if(l==="class"||l==="className"){typeof u=="function"?i.push(_(()=>{B(t,"attribute","class",u),xt(t,u())})):xt(t,u);continue}if(l==="classList"){At(t,"class",u),typeof u=="function"?i.push(_(()=>{B(t,"attribute","class",u),St(t,u())})):St(t,u,i);continue}if(l==="style"){At(t,"style",u),typeof u=="function"?i.push(_(()=>{B(t,"attribute","style",u),kt(t,u())})):kt(t,u);continue}if(l.startsWith("on")){let d=l.slice(2).toLowerCase();f&&Lo(t,d),u&&xl(t,d,u);continue}let c=Ro.has(l)||!a&&l in t;typeof u=="function"?i.push(c?Sr(t,l,u):xr(t,l,u,a)):i.push(_(()=>c?xe(t,l,r[l]):T(t,l,r[l],a)))}for(let l in n)if(!(l in r))if(l.startsWith("on")){let u=l.slice(2).toLowerCase();Lo(t,u)}else Ro.has(l)?xe(t,l,null):t.removeAttribute(l);return()=>{i.forEach(l=>l())}}function Cl(e,t,r=!1){for(let n in t){let o=t[n];if(n==="ref"){Pr(o,e);continue}if(n!=="children"){if(n==="use"){ti(e,o);continue}if(n.startsWith("on:")){Qo(e,n.slice(3),o);continue}if(n.startsWith("prop:")){J(e,"prop",n.slice(5),o),Sr(e,n.slice(5),o);continue}if(n.startsWith("attr:")){J(e,"attr",n.slice(5),o),xr(e,n.slice(5),o,r);continue}if(n.startsWith("bool:")){J(e,"bool",n.slice(5),o),ri(e,n.slice(5),o);continue}if(n.startsWith("on")&&n.length>2){let s=n.slice(2).toLowerCase();if(typeof o=="function")if(_r.has(s)){e[`$$${s}`]=o;let a=`__fx_${s}`;if(!e[a]){let i=l=>{e[`$$${s}`]?.(l)};e.addEventListener(s,i),e[a]=i}}else e[`$$${s}`]=o,bt.has(s)||ae([s]);continue}if(n==="class"||n==="className"){xt(e,o);continue}if(n==="classList"){At(e,"class",o),typeof o=="function"?_(()=>{B(e,"attribute","class",o),St(e,o())}):St(e,o);continue}if(n==="style"){At(e,"style",o),typeof o=="function"?_(()=>{B(e,"attribute","style",o),kt(e,o())}):kt(e,o);continue}if(n==="innerHTML"){if(typeof o=="function"){let s=S(()=>{let a=o();for(;typeof a=="function";)a=a();e.innerHTML=a});x(()=>s())}else e.innerHTML=o;continue}if(n==="value"&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA")){if(typeof o=="function"){let s=S(()=>{let a=o();for(;typeof a=="function"&&a.length===0;)a=a();document.activeElement!==e&&(e.value=a??"")});x(()=>{s()})}else _(()=>{document.activeElement!==e&&(e.value=t[n]??"")});continue}if(n==="checked"&&e.tagName==="INPUT"){if(typeof o=="function"){let s=S(()=>{let a=o();for(;typeof a=="function"&&a.length===0;)a=a();document.activeElement!==e&&(e.checked=a??"")});x(()=>{s()})}else _(()=>{document.activeElement!==e&&(e.checked=t[n]??"")});continue}if(n==="value"&&e.tagName==="SELECT"){if(typeof o=="function"){let s=!0,a=S(()=>{let i=o();for(;typeof i=="function"&&i.length===0;)i=i();s?(s=!1,queueMicrotask(()=>{e.value=i??""})):e.value=i??""});x(()=>{a()})}else{let s=!0;_(()=>{let a=t[n];s?(s=!1,queueMicrotask(()=>{e.value=a??""})):e.value=a??""})}continue}if(typeof o=="function"){let s=S(()=>{let a=o();for(;typeof a=="function"&&a.length===0;)a=a();$o(e,n,a,r)});x(()=>{s()})}else _(()=>$o(e,n,t[n],r))}}}function Pr(e,t){if(!e)return;let r=e[Zo]?.name;if(J(t,"ref",r||typeof e=="function"&&e.name||"ref",e),Tr(e)){let n=t,o=e;if(!n)return;typeof n=="function"?n(o):typeof n=="object"&&"current"in n&&(n.current=o);return}typeof e=="function"?e(t):typeof e=="object"&&"current"in e&&(e.current=t)}function Tl(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 vt(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function Er(e,t,r){if(!t)throw new Error("Container element is required");let n,o,s=[];return I(a=>{E(()=>{v.active||(t.textContent=""),Ct(t),Tt(),F(t,e)}),o=a}),()=>{o?.(),n?.(),s.forEach(a=>a()),t.textContent=""}}function z(e,t){if(Do.fn)return Do.fn(e,t);t&&Ao(t);let r=typeof e=="function"?Oo(()=>e(t)):e,n=r!=null&&(typeof r=="function"||typeof r=="object");if(n)try{r.$name=e?.name}catch{}return n&&!Co(r)?qe(r):r}function jr(){let e=globalThis.__FX_DATA__;if(e)return e;if(wr!==void 0)return wr;let t=null;if(typeof document<"u"){let r=document.getElementById(Pl)?.textContent;if(r)try{t=JSON.parse(r)}catch{t=null}}return wr=t}function Pt(){for(;;){for(;v.cursor&&v.cursor.nodeType===3&&v.cursor.data==="";)v.cursor=v.cursor.nextSibling;if(v.cursor!=null||!v.parents.length)return;v.cursor=v.parents.pop().nextSibling}}function jt(e,t){let r=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 ${r}. 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 jl(e){Pt();let t=v.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(El.has(e.toLowerCase())?v.cursor=t.nextSibling:(v.parents.push(t),v.cursor=t.firstChild),t):(Et&&t&&jt(`<${e}>`,t),null)}function $l(e){Pt();let t=v.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(v.cursor=t.nextSibling,t):(Et&&t&&jt(`<${e}> (static)`,t),null)}function Rl(e){if(e===""){let r=v.cursor;return r&&r.nodeType===3&&r.data!==""?(v.cursor=r.nextSibling,r.data="",r):null}Pt();let t=v.cursor;return t&&t.nodeType===3?(v.cursor=t.nextSibling,t.nodeValue!==e&&(t.nodeValue=e),t):(Et&&t&&jt(`text ${JSON.stringify(e.slice(0,24))}`,t),null)}function Nl(e){Pt();let t=v.cursor;return t&&t.nodeType===8&&t.data===e?(v.cursor=t.nextSibling,t):(Et&&t&&jt(`marker <!--${e.slice(0,24)}-->`,t),null)}function Ml(){Io||(Io=!0,vl({hydrateElement:jl,hydrateText:Rl,hydrateMarker:Nl,hydrateStatic:$l}))}function $t(e,t,r){Ml(),v.active=!0,v.cursor=t.firstChild,v.parents=[];let n=jr(),o=r?.resourceNamespace,s=0;Nn(()=>o?`${o}:r${s++}`:`r${s++}`),Rn(n?a=>a in n?{value:n[a]}:void 0:null);try{return Er(e,t)}finally{v.active=!1,v.cursor=null,v.parents=[]}}function oi(e,t={}){if(typeof e=="function")return z(e,t);if(typeof e!="string"||e.length===0)return null;let r=Tl(e);if(U())return Cr().createElement(e,r);let n=r?document.createElementNS(Or,e):document.createElement(e);return Cl(n,t,r),Ll(n,t),n}function Ll(e,t){if(!t||t.children===void 0)return;let r=oe(()=>t.children),n=o=>{F(e,o,typeof o=="function"?null:void 0)};Array.isArray(r)?r.forEach(n):n(r)}function Dl(e){return typeof e=="function"?e:(()=>e)}function Rt(e){return()=>{let t=e();return typeof t=="function"?t():t}}function Il(e){return e!=null&&e!==!1}function ql(e){return!e||typeof e!="object"?!1:!!(typeof e._$litType$<"u"||typeof e._$litDirective$<"u"||Array.isArray(e.strings)&&Array.isArray(e.values))}function ii(e){let t=Rt(()=>e.when),r=g(t,void 0,{name:"Show.when"}),n=g(r,void 0,{name:"Show.cond"}),o=R(),s=null,a=null,i=l=>{l!==a&&(s&&he(s),s=pe(o),a=l)};return g(()=>{let l=n();return i(l?"when":"fallback"),N(s,()=>{if(l){let u=e.children;return typeof u=="function"&&!ql(u)?typeof r=="function"?O(()=>O(r)?u(r()):e.fallback):u(r):u}return e.fallback})},void 0,{name:"Show.result"})}function si(e){let t=Rt(()=>e.each),r=()=>e.fallback??null,n=(o,s)=>{let a=e.children,i=Array.isArray(a)?a.map(l=>typeof l=="function"?l(o,s):l):typeof a=="function"?a(o,s):a;return Yo(i),i};return e.by?jn(t,e.by,(o,s)=>n(o,s),{fallback:r}):En(t,(o,s)=>n(o,s),{fallback:r})}function ai(e){let t=Rt(()=>e.each);return $n(t,(r,n)=>{let o=e.children(r,n);return Yo(o),o},{fallback:()=>e.fallback??null})}function li(e){return{[kr]:!0,when:Rt(()=>e.when),get children(){return e.children}}}function ui(e){let t=Array.isArray(e.children)?e.children:[e.children],r=R(),n=null,o=-1,s=a=>{a!==o&&(n&&he(n),n=pe(r),o=a)};return g(()=>{for(let a=0;a<t.length;a+=1){let i=t[a],l=0;for(;typeof i=="function"&&!i[kr]&&l++<10;)i=i();if(!i||typeof i!="object"||i[kr]!==!0)continue;let u=i.when();if(Il(u))return s(a),N(n,()=>typeof i.children=="function"?i.children(u):i.children)}return s(-2),N(n,()=>e.fallback??null)},void 0,{name:"Switch"})}function ci(e){let t=Dl(e.component),{component:r,...n}=e,o=R(),s=null,a;return g(()=>{let i=t();return i!==a&&(s&&he(s),s=pe(o),a=i),i==null?null:typeof i=="string"?{tag:i,props:n}:N(s,()=>i(n))},void 0,{name:"Dynamic"})}function fi(e){let t=()=>e.mount?typeof e.mount=="function"?e.mount():e.mount:document.body,r,n;return I(o=>{r=o,n=document.createElement("div"),n.style.display="contents",t().appendChild(n),F(n,e.children)&&Pr(e.ref,n)}),x(()=>{r(),n.remove()}),null}function $r(e){if(U())return e.fallback??null;let t=v.active,[r,n]=b(!t);return t&&queueMicrotask(()=>n(!0)),g(()=>r()?e.children:e.fallback??null,void 0,{name:"client-only"})}function pi(e){let[t,r]=b(null),n=()=>r(null);return g(()=>{let o=t();if(o!==null)return typeof e.fallback=="function"?e.fallback(o,n):e.fallback;try{return typeof e.children=="function"?e.children():e.children}catch(s){return r(s),typeof e.fallback=="function"?e.fallback(s,n):e.fallback}},void 0,{name:"ErrorBoundary"})}function hi(e){return g(()=>{let t=typeof e=="function"?e():e,r=[];for(let[n,o]of Object.entries(t))n&&(typeof o=="function"?o():o)&&r.push(n);return r.join(" ")},void 0,{name:"ClassMap"})}function Hl(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function yi(e){return g(()=>{let t=typeof e=="function"?e():e,r=[];for(let[n,o]of Object.entries(t)){if(!n)continue;let s=typeof o=="function"?o():o;s!=null&&r.push(`${Hl(n)}: ${s}`)}return r.join("; ")},void 0,{name:"StyleMap"})}var Or,Ro,ic,sl,H,_t,hl,yl,Ar,v,Bo,bl,Zo,wl,bt,_r,Y,Sl,_l,Do,Pl,wr,El,Et,Io,kr,di,Fl,j=L(()=>{"use strict";A();lo();A();jo();A();A();A();A();A();A();A();A();A();A();A();A();Or="http://www.w3.org/2000/svg";Ro=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]);ic=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;sl="1.0.0-alpha.83",H={dom:sl,reactive:ao};_t=Symbol.for("fluixi.server-node"),hl=Symbol.for("fluixi.dom.server-host"),yl=globalThis,Ar=yl[hl]??={server:typeof document>"u",nodes:null};v={active:!1,cursor:null,parents:[]},Bo=null;bl={},Zo="__fx_at",wl="__fx_loc";bt=new Set,_r=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);Y=0,Sl=200;_l="__fx_dom_create_component__",Do=globalThis[_l]??={fn:null};Pl="__FX_DATA__";El=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Et=typeof process<"u"&&process.env&&!1;Io=!1;kr=Symbol("match");di=$r;Fl=_t});function wi(e){if(e!=null&&(typeof e=="object"||typeof e=="function"))try{e.$lazy=!0}catch{}return e}function Oe(e,t){let r,n,o;function s(){return n||(n=e().then(i=>r=i.default)),n}t?.preload&&s();let a=(i=>{if(r){let l=r;return wi(O(()=>l(i)))}if(!o){let[l]=ee(()=>s(),{transport:!1});if(o=l,l.error)throw l.error}return g(()=>{let l=o();return l?wi(z(l,i)):void 0})});return a.preload=()=>s().then(()=>{}),a.$lazy=!0,a.loader=e,a}var Ft=L(()=>{"use strict";j();A()});function Kl(){Oi||(Oi=!0,!(typeof process<"u")&&console.warn("[fluixi] createProvider({ context, value, children }) reads `children` eagerly: the object literal materialises `children` BEFORE the context is stamped, so a routed <Outlet/> that has siblings inside the provider renders detached and its descendants see no context under SSR. Use the lazy form instead:\n createProvider(Context, value, props) // children stays a getter\n // or JSX: <Context.Provider value={…}>{props.children}</Context.Provider>"))}function Wt(e,t,r){let n=!!e?.Provider,o=n?e:e.context,s=n?t:e.value,a=n?!1:e.debug??!1;n||Kl();let i=typeof s=="function"?s():s,l=n?r:e;return o.Provider({value:i,get children(){return l?.children},debug:a})}function Ci(e){let t=Te(e);return[t,n=>Wt(t,n.value,n)]}function Ir(e,t){if(e.length===0)return oe(()=>t);let[r,n]=e[0],o=e.slice(1);return Wt(r,n,{get children(){return Ir(o,t)}})}function Ti(e){return t=>{let r=_e(e);return t.children(r)}}function _i(e,t){let r=_e(e);return r===e.defaultValue?t():r}function Te(e,t){let r=X(e,t),n=o=>(o.debug,r.Provider({value:o.value,get children(){return o.children},debug:o.debug}));return typeof Symbol<"u"&&Symbol.for&&(n.$$typeof=Symbol.for("react.provider")),n.$$typeof=Symbol.for("react.provider"),{id:r.id,Provider:Uo(n),defaultValue:e}}function _e(e){let t=V(e);return t!==void 0?t:e.defaultValue}var Oi,qr=L(()=>{"use strict";j();A();A();Oi=!1});function Li(){return Mi}function Wr(e){Mi=e}function Di(e,t){Vt.set(e,t)}function Ii(e){return Vt.get(e)}function Ql(){Vt.clear()}function qi(){if(typeof window>"u")return!1;let e=document.getElementById("__FLUIXI_HYDRATION__");if(!e||e.getAttribute("type")!=="application/json")return!1;try{let t=e.textContent||"{}",r=JSON.parse(t);for(let[n,o]of Object.entries(r))Vt.set(n,o);return!0}catch(t){return console.error("Failed to deserialize hydration data:",t),!1}}function Vr(){if(typeof window>"u")return;let e=document.getElementById("__FLUIXI_HYDRATION__");e&&e.remove();let t=document.createTreeWalker(document.body,NodeFilter.SHOW_COMMENT,null),r=[],n;for(;n=t.nextNode();){let o=n,s=o.nodeValue||"";(s.startsWith("#")||s.startsWith("/"))&&r.push(o)}r.forEach(o=>o.remove()),Ql()}function Hi(){return typeof window>"u"}var Mi,Vt,Ur=L(()=>{"use strict";Mi=!1,Vt=new Map;typeof window<"u"&&window.addEventListener("load",()=>{setTimeout(Vr,100)})});function Kt(e,t,r={}){let{preserveStructure:n,multiple:o,throwOnError:s=!1,defaultValue:a,maxDepth:i=20}=r;if(!e||typeof e!="object")return a;if(!t)return e;if(Array.isArray(t))if(n){let f={};for(let c of t){let d=Kt(e,c,{...r,preserveStructure:!1});d!==void 0&&hu(f,c,d)}return f}else return t.map(f=>Kt(e,f,{...r,preserveStructure:!1}));let l=Xr(t,{...r,throwOnError:s});if(l.length===0)return e;if(typeof n>"u"||n===!1){let f=yu(e,t);return o===!1&&Array.isArray(f)?f[0]:f===void 0&&a!==void 0?a:f}let u=K(e,l,0,i);return u===void 0&&a!==void 0?a:u}function yu(e,t,r={}){let{createMissing:n=!1,add:o=!1,debug:s=!1}=r,a=Xr(t),i=e,l=!1,u="",f=t;if(typeof i=="object"&&!Array.isArray(i)&&f.length>0&&i[f])return i=i[f],i;for(let c=0;c<a.length;c++){let d=a[c],h=a.length>1?c===a.length-1:!1;if(i===null&&!n)return;let p=a[c+1];switch(d.type){case"property":if(i&&typeof i=="object")if(Array.isArray(i)){if(typeof d.value=="number"){let m=d.value;if(n&&m>=i.length)for(let w=i.length;w<=m;w++)i.push(void 0);if(n&&(i[m]===null||i[m]===void 0)&&(!h||l)&&(p?i[m]=p.type==="index"||p.type==="slice"||p.type==="union"||p.type==="wildcard"?[]:{}:i[m]=null,l=!1),i=i[m],p){l=!0;continue}}else o?i.push({[String(d.value)]:null}):i=i.map(m=>m[String(d.value)]);if(p)continue;return Wi(i)}else{if(i[u]&&u.split(".").length>=2){i=i[u];continue}if(n&&(i[String(d.value)]===null||i[String(d.value)]===void 0)&&(!h||l)&&(p?i[String(d.value)]=p.type==="index"||p.type==="slice"||p.type==="union"||p.type==="wildcard"?[]:{}:i[String(d.value)]=null,l=!1,i=i[String(d.value)],p)){l=!0;continue}if(i?(!i[String(d.value)]&&n&&(i[String(d.value)]=null),i=i[String(d.value)]):i={[String(d.value)]:null},p)continue}else if(n)i={},i[String(d.value)]=p.type==="index"||p.type==="slice"||p.type==="union"||p.type==="wildcard"||r.type==="array"?[]:{},i=i[String(d.value)];else return;break;case"index":case"wildcard":if(Array.isArray(i)){if(d.type==="index"){let m=d.value;if(m<0){i=i[i.length-Math.abs(m)];continue}if(n&&(m>=i.length||i[m]==null||i[m]==null)&&!h){for(let w=i.length;w<=m;w++)i.push(void 0);p&&(i[m]=p.type==="index"||p.type==="slice"||p.type==="union"||p.type==="wildcard"?[]:{})}i=i[m]}else if(!h)continue}else if(n){let m=a[c+1];i=[];let w=d.value;for(let C=0;C<=w;C++)i.push(void 0);i[w]=m.type==="index"||m.type==="slice"||m.type==="union"||m.type==="wildcard"||r.type==="array"?[]:{},i=i[w]}else{if(d.type==="index"&&typeof i=="object"&&i&&i[String(d.value)]!==void 0){i=i[String(d.value)];continue}if(typeof i=="object"){i=Object.values(i);continue}return}break;default:return}}return Wi(i)}function Wi(e){return Array.isArray(e)?e.filter(t=>typeof t<"u"):e}var Bt,K,Xr,pu,hu,Gr=L(()=>{"use strict";Bt=e=>e==null||Array.isArray(e)||typeof e=="function"||e instanceof Date||e instanceof RegExp||e instanceof Map||e instanceof Set||e instanceof Error?!1:typeof e=="object",K=(e,t,r,n)=>{if(r>n)return;if(t.length===0)return e;let o=t[0],s=t.slice(1);if(o.type==="descendant"){let a=K(e,s,r+1,n);if(a!==void 0)return a;if(e&&typeof e=="object")if(Array.isArray(e)){let i=[];for(let l=0;l<e.length;l++){let u=K(e[l],t,r+1,n);u!==void 0&&(i[l]=u)}return i.length>0?i:void 0}else{let i={};for(let l in e)if(e.hasOwnProperty(l)){let u=K(e[l],t,r+1,n);u!==void 0&&(i[l]=u)}return Object.keys(i).length>0?i:void 0}return}switch(o.type){case"property":if(Bt(e)&&o.value&&String(o.value)in e){let a=e[String(o.value)],i=K(a,s,r+1,n);if(i!==void 0)return{[String(o.value)]:i}}break;case"index":if(Array.isArray(e)){let a=o.value;if(a>=0&&a<e.length){let i=K(e[a],s,r+1,n);if(i!==void 0){let l=new Array(e.length).filter(u=>u!==void 0);return l[a]=i,l}}}else if(e&&typeof e=="object"){let a=String(o.value);if(a in e){let i=K(e[a],s,r+1,n);if(i!==void 0)return{[a]:i}}}break;case"wildcard":if(e&&typeof e=="object")if(Array.isArray(e)){let a=[],i=!1;for(let l=0;l<e.length;l++){let u=K(e[l],s,r+1,n);u!==void 0&&(a[l]=u,i=!0)}return i?a:void 0}else{let a={},i=!1;for(let l in e)if(e.hasOwnProperty(l)){let u=K(e[l],s,r+1,n);u!==void 0&&(a[l]=u,i=!0)}return i?a:void 0}break;case"slice":if(Array.isArray(e)){let[a,i]=o.value,l=Math.max(0,a),u=Math.min(e.length,i===1/0?e.length:i),f=[],c=!1;for(let d=l;d<u;d++){let h=K(e[d],s,r+1,n);h!==void 0&&(f[d]=h,c=!0)}return c?f:void 0}break;case"union":if(Array.isArray(e)){let a=o.value,i=[],l=!1;for(let u of a)if(u>=0&&u<e.length){let f=K(e[u],s,r+1,n);f!==void 0&&(i[u]=f,l=!0)}return l?i:void 0}break;case"filter":if(Array.isArray(e)){let a=o.value,i=[],l=!1;for(let u=0;u<e.length;u++)if(a(e[u])){let f=K(e[u],s,r+1,n);f!==void 0&&(i[u]=f,l=!0)}return l?i:void 0}break}},Xr=(e,t={})=>{let{type:r="auto",throwOnError:n=!1}=t;if(!e||typeof e!="string")return[];let o=[],s="",a=!1,i=!1,l="",u="",f=0,c=r==="auto"?(h=>h.includes("..")?"descendant":h.includes("[?(")?"filter":h.includes("[:")||h.includes("[0:")?"slice":h.includes("[,")||h.includes("[0,1]")?"union":h.includes("[*]")||h.includes(".*.")?"wildcard":h.includes("[]")?"array-wildcard":h.includes("[")&&h.includes("]")?"bracket":"dot")(e):r,d=h=>{let p=h.trim();if(p==="*"||p==="")return{type:"wildcard",value:p===""?"[]":"*",raw:p===""?"[]":h};if(p==="[]")return{type:"wildcard",value:"[]",raw:h};if(/^-?\d+$/.test(p))return{type:"index",value:parseInt(p,10),raw:h};if(p.includes(":")){let m=p.split(":").map(M=>M.trim()),w=m[0]===""?0:parseInt(m[0],10),C=m[1]===""?1/0:parseInt(m[1],10);if(isNaN(w)||isNaN(C)){if(n)throw new Error(`Invalid slice notation: ${h}`);return{type:"wildcard",value:"*",raw:h}}return{type:"slice",value:[w,C],raw:h}}if(p.includes(",")){let m=p.split(",").map(w=>{let C=parseInt(w.trim(),10);return isNaN(C)?-1:C}).filter(w=>w>=0);if(m.length===0){if(n)throw new Error(`Invalid union notation: ${h}`);return{type:"wildcard",value:"*",raw:h}}return{type:"union",value:m,raw:h}}if(p.startsWith("?(")&&p.endsWith(")")){let m=p.slice(2,-1);try{return{type:"filter",value:pu(m),raw:h}}catch(w){if(n)throw w;return{type:"wildcard",value:"*",raw:h}}}return p.startsWith('"')&&p.endsWith('"')||p.startsWith("'")&&p.endsWith("'")?{type:"property",value:p.slice(1,-1),raw:h}:{type:"property",value:p,raw:h}};for(let h=0;h<e.length;h++){let p=e[h],m=e[h+1];if((p==='"'||p==="'")&&!i){i=!0,l=p;continue}else if(p===l&&i){i=!1,l="",p==='"'||p==="'"||(a?u+=p:s+=p);continue}if(i){a?u+=p:s+=p;continue}if(p==="["&&!a){s&&(o.push({type:"property",value:s,raw:s}),s=""),a=!0,u="";continue}if(p==="]"&&a&&!i){a=!1;let C=d(u);o.push(C);continue}let w=o.length>0?o[o.length-1]:null;if(p==="."&&!a&&!i){if(m==="."){let C=e.split("..")[0];o.push({type:"property",value:C,raw:C}),o.push({type:"descendant",value:"..",raw:".."}),h++}else s&&(s==="*"?o.push({type:"wildcard",value:s,raw:s}):o.push({type:"property",value:s,raw:s}),s="");continue}if(a)u+=p;else if(w&&w.type!=="descendant")s+=p;else{let C=e.split(w?.raw)[1];C!==void 0?s=C:s+=p}}return s&&o.push({type:"property",value:s,raw:s}),o.map(h=>{if(h.type==="property"&&typeof h.value=="string"&&/^-?\d+$/.test(h.value)){let p=parseInt(h.value,10);if(!isNaN(p))return{...h,type:"index",value:p}}return h})},pu=e=>{let t=e.replace(/@\.([a-zA-Z_$][\w$]*)/g,(r,n)=>`item.${n}`).replace(/@/g,"item");try{return new Function("item",`return ${t}`)}catch{throw new Error(`Invalid filter expression: ${e}`)}},hu=(e,t,r)=>{let n=Xr(t),o=e;for(let s=0;s<n.length;s++){let a=n[s],i=s===n.length-1;switch(a.type){case"property":if(i)o[String(a.value)]=r;else{if(!o[String(a.value)]){let u=n[s+1];o[String(a.value)]=u.type==="index"||u.type==="slice"||u.type==="union"||u.type==="wildcard"?[]:{}}o=o[String(a.value)]}break;case"index":Array.isArray(o)||(o=[]);let l=a.value;if(i){if(l>=o.length)for(let u=o.length;u<=l;u++)o.push(void 0);o[l]=r}else{if(!o[l]){let u=n[s+1];o[l]=u.type==="index"||u.type==="slice"||u.type==="union"||u.type==="wildcard"?[]:{}}o=o[l]}break;case"wildcard":if(Array.isArray(o))if(i)for(let u=0;u<o.length;u++)o[u]=r;else{let u=n[s+1];for(let f=0;f<o.length;f++)o[f]||(o[f]=u.type==="index"||u.type==="slice"||u.type==="union"||u.type==="wildcard"?[]:{});o.length>0&&(o=o[0])}break}}}});function mu(e,t,r){let n=new Uint8Array(t.length);e:for(let o=0;o<e.length;o++){for(let s=0;s<t.length;s++)if(!n[s]&&ue(e[o],t[s],r)){n[s]=1;continue e}return!1}return!0}var ue,Vi=L(()=>{"use strict";Gr();ue=(e,t,r={})=>{if(e===t)return!0;if(e==null||t==null||typeof e!=typeof t)return!1;let n=Array.isArray(e),o=Array.isArray(t);if(n!==o)return!1;if(n&&o)return e.length!==t.length?!1:r.unordered?mu(e,t,r):e.every((m,w)=>ue(m,t[w],r));if(typeof e!="object")return e===t;let s=e instanceof Date,a=t instanceof Date;if(s!==a)return!1;if(s)return e.getTime()===t.getTime();let i=e instanceof RegExp,l=t instanceof RegExp;if(i!==l)return!1;if(i)return e.toString()===t.toString();let u=e instanceof Map,f=t instanceof Map;if(u!==f)return!1;if(u){if(e.size!==t.size)return!1;for(let[m,w]of e)if(!t.has(m)||!ue(w,t.get(m),r))return!1;return!0}let c=e instanceof Set,d=t instanceof Set;if(c!==d)return!1;if(c){if(e.size!==t.size)return!1;let m=[...t],w=new Uint8Array(m.length);e:for(let C of e){for(let M=0;M<m.length;M++)if(!w[M]&&ue(C,m[M],r)){w[M]=1;continue e}return!1}return!0}if(!Bt(e)||!Bt(t))return!1;let h=Object.keys(e),p=Object.keys(t);if(h.length!==p.length)return!1;for(let m of h)if(!Object.prototype.hasOwnProperty.call(t,m)||!ue(e[m],t[m],r))return!1;return!0}});function gu(e){return e.startsWith("//")?e.replace(/^\/+/,"/"):e}function Pe(e,t,r=!1){let n=[];if(e===t)return{params:{},path:t};if(!r&&e==="/"&&t.startsWith("/"))return{params:{},path:"/"};let o=e.replace(/:([a-zA-Z0-9_]+)/g,(l,u)=>(n.push(u),"([^/]+)")).replace(/\*([a-zA-Z0-9_]*)/g,(l,u)=>(u&&n.push(u),"(.*)"));o.startsWith("/")||(o="/"+o),o===""&&(o="/");let s=new RegExp(`^${o}${r?"$":"(?=/|$)"}`),a=t.match(s);if(!a)return null;let i={};return n.forEach((l,u)=>{i[l]=a[u+1]}),{params:i,path:a[0]}}function Yr(e){let t=e.path.split("/").filter(Boolean);if(t.length===0)return 5;let r=0;for(let n of t)n.startsWith("*")?r+=1:n.startsWith(":")?r+=10:r+=100;return r}function Ui(e){return[...e].sort((t,r)=>Yr(r)-Yr(t))}function ce(e,t){let r=t.length>1?t.replace(/\/+$/,"")||"/":t,n=zi(e,r);if(!n)return null;let o=[],s="",a={};for(let i of n.layers){s=gu(vu(s,i.consumed));let l={};for(let[u,f]of Object.entries(i.params))u in a||(l[u]=f),a[u]=f;o.push({route:i.route,component:i.route.component,params:l,pathname:s||"/"})}return{matched:o,params:a,pathname:t}}function zi(e,t){if(!e||e.length===0)return null;let r=Ui(e);for(let n of r){let o=!!n.children&&n.children.length>0,s=Pe(n.path,t,!o);if(s){if(o){let a=zi(n.children,t);if(a)return{layers:[{route:n,params:s.params,consumed:s.path},...a.layers]};continue}return{layers:[{route:n,params:s.params,consumed:s.path}]}}}return null}function vu(e,t){if(!e)return t;if(t===e)return e;if(t.startsWith(e))return t;let r=e.replace(/\/$/,""),n=t.replace(/^\//,"");return`${r}/${n}`}var Zr=L(()=>{"use strict"});function Qr(e){let t=e,r="",n=t.indexOf("#");n!==-1&&(r=t.slice(n),t=t.slice(0,n));let o="",s=t.indexOf("?");return s!==-1&&(o=t.slice(s),t=t.slice(0,s)),{pathname:t||"/",search:o,hash:r}}function ze(e="/"){let t=[{path:e,state:null}],r=0,n=new Set,o=()=>n.forEach(s=>s());return{get(){let{path:s,state:a}=t[r];return{...Qr(s),state:a}},push(s,a=null){t=t.slice(0,r+1),t.push({path:s,state:a}),r=t.length-1,o()},replace(s,a=null){t[r]={path:s,state:a},o()},subscribe(s){return n.add(s),()=>n.delete(s)}}}function fe(){let e=typeof window<"u"?window:void 0,t=new Set,r=()=>t.forEach(n=>n());return e&&e.addEventListener("popstate",r),{get(){if(!e)return{pathname:"/",search:"",hash:"",state:null};let{pathname:n,search:o,hash:s}=e.location;return{pathname:n,search:o,hash:s,state:e.history.state??null}},push(n,o=null){e?.history.pushState(o,"",n),r()},replace(n,o=null){e?.history.replaceState(o,"",n),r()},subscribe(n){return t.add(n),()=>t.delete(n)}}}var en=L(()=>{"use strict"});function bu(e){let t={};return e&&new URLSearchParams(e.startsWith("?")?e.slice(1):e).forEach((n,o)=>t[o]=n),t}function wu(e,t){if(!t)return e||"/";let r=t.replace(/\/$/,"");return e===r?"/":e.startsWith(r+"/")?e.slice(r.length)||"/":e||"/"}function Au(e,t){return!t||/^https?:\/\//.test(e)?e:`${t.replace(/\/$/,"")}${e.startsWith("/")?e:"/"+e}`}function tn(e){let{routes:t,history:r,base:n}=e,o=new Set,s=()=>{let f=r.get();return{pathname:f.pathname,search:f.search,hash:f.hash,state:f.state,query:bu(f.search)}},a=f=>ce(t,wu(f,n)),i=(()=>{let f=s();return{location:f,match:a(f.pathname)}})(),l=()=>{let f=s();i={location:f,match:a(f.pathname)},o.forEach(c=>c(i))},u=r.subscribe(l);return{state(){return i},subscribe(f){return o.add(f),()=>o.delete(f)},navigate(f,c={}){let d=Au(f,n);c.replace?r.replace(d,c.state??null):r.push(d,c.state??null)},match(f){return a(f)},destroy(){u(),o.clear()}}}var Ki=L(()=>{"use strict";Zr();en()});var rn=L(()=>{"use strict";Zr();en();Ki()});function Bi(e,t){return async(...r)=>{let n=t+":"+JSON.stringify(r);if(Li()||typeof window<"u"){let s=Ii(n);if(s!==void 0)return s}if(Be.has(n))return Be.get(n);if(Ke.has(n))return Ke.get(n);let o=Promise.resolve(e(...r)).then(s=>(Be.set(n,s),Ke.delete(n),Hi()&&Di(n,s),s),s=>{throw Ke.delete(n),s});return Ke.set(n,o),o}}function Ji(e){let t=typeof e=="string"?r=>r.startsWith(e):e;for(let r of Be.keys())t(r)&&(Be.delete(r),Su.add(r));xu(r=>r+1)}function Xi(e,t){let[r]=ee(t||(()=>!0),e);return r}function Gi(e){return nn.has(e)||nn.set(e,b(void 0)),nn.get(e)}function on(e,t){let r=t||e.name||"action",n=async o=>{let[,s]=Gi(r),a=()=>s(void 0),i=()=>n(o);s({input:o,pending:!0,clear:a,retry:i});try{let l=await e(o);return s({input:o,result:l,pending:!1,clear:a,retry:i}),l}catch(l){throw s({input:o,error:l,pending:!1,clear:a,retry:i}),l}};return n.url=r,n.with=o=>on((...s)=>e(o,...s),t),n}function Yi(e){let[t]=Gi(e.url);return t}function Zi(e){return e}var Be,Ke,Qd,xu,Su,nn,ku,ep,Qi=L(()=>{"use strict";A();Ur();qr();Be=new Map,Ke=new Map;[Qd,xu]=b(0),Su=new Set;nn=new Map;ku=Te(void 0,"route-data"),ep=ku.Provider});var os={};mn(os,{A:()=>dn,Form:()=>Mu,Link:()=>Xt,Outlet:()=>an,Redirect:()=>ln,Router:()=>sn,action:()=>on,cache:()=>Bi,createAsync:()=>Xi,createBrowserHistory:()=>fe,createMemoryHistory:()=>ze,lazy:()=>Oe,matchPath:()=>Pe,matchRoutes:()=>ce,preloadRoutes:()=>Lu,revalidate:()=>Ji,runWithOwner:()=>N,select:()=>ju,useAction:()=>Zi,useLevelParams:()=>Pu,useLinkNavigation:()=>$u,useLocation:()=>Ge,useMatch:()=>cn,useNavigate:()=>Jt,useParam:()=>un,useParamSelector:()=>Eu,useParams:()=>Xe,useRouteData:()=>Ru,useRouter:()=>Ee,useSearchParams:()=>fn,useSubmission:()=>Yi});function Ou(e,t,r){let n,o=e.route.data;if(typeof o=="function"){let f=!1;x(()=>{f=!0});let c=R(),[d]=ee(()=>o({params:r.params,location:r.location},c,()=>f));n=d}let s=()=>rs.Provider({value:n,get children(){return ts.Provider({value:e.params,get children(){return es.Provider({value:{depth:t,...r},get children(){return z(e.component,{})}})}})}});if(!n)return s();let a=n,i=()=>a.loading,[l,u]=b(O(()=>!i()));return S(()=>u(!i())),g(()=>l()?s():null)}function ns(e){let t=e.depth+1,[r,n]=b(O(()=>e.matched()[t]?.component));return S(()=>{let o=e.matched()[t]?.component;n(()=>o)}),g(()=>{if(!r())return e.notFound?e.notFound():null;let s=O(()=>e.matched())[t];return Ou(s,t,{matched:e.matched,params:e.params,location:e.location})})}function Cu(e){return e==null?Tu():typeof e=="function"?z(e,{}):e}function Tu(){let e=Se("div");T(e,"class","fx-not-found"),T(e,"role","main"),T(e,"style","min-height:60vh;display:grid;place-content:center;gap:.25rem;text-align:center;font-family:system-ui,-apple-system,sans-serif");let t=Se("h1");T(t,"style","margin:0;font-size:2.5rem;font-weight:700"),F(t,"404");let r=Se("p");return T(r,"style","margin:0;opacity:.7"),F(r,"This page could not be found."),e.appendChild(t),e.appendChild(r),e}function sn(e){let t=e.history??fe(),r=tn({routes:e.routes,base:e.base,history:t}),[n,o]=b(r.state()),s=r.subscribe(o);x(()=>{s(),r.destroy()});let a=g(()=>(n().match?.matched??[]).filter(f=>f.component)),i={router:r,location:g(()=>n().location),params:g(()=>n().match?.params??{})},l={depth:-1,matched:a,params:i.params,location:i.location,notFound:()=>Cu(e.notFound)},u;return Je.Provider({value:i,get children(){return u??=ns(l)}})}function an(){let e=V(es);return e?ns(e):null}function ln(e){let t=V(Je);if(t&&typeof window<"u"){let r=!1;x(()=>r=!0),queueMicrotask(()=>{r||t.router.navigate(e.to,{replace:e.replace!==!1})})}return null}function Ee(){let e=V(Je);if(e)return e;if(typeof window>"u")return _u;throw new Error("[router] useRouter must be used within <Router>")}function Xe(){let e=Ee().params;return g(()=>e(),{},{equals:(t,r)=>JSON.stringify(t)===JSON.stringify(r)})}function Pu(){return V(ts)??{}}function un(e){let t=Xe();return g(()=>t()[e])}function Eu(e,t){let r=Xe();return g(()=>e(r()),void 0,t?{equals:t}:void 0)}function cn(e){let t=Ge();return g(()=>Pe(typeof e=="function"?e():e,t.pathname))}function fn(){let e=Ge(),t=Jt();return[g(()=>e.query),(o,s)=>{let a=new URLSearchParams(e.search);for(let[l,u]of Object.entries(o))u===null?a.delete(l):a.set(l,u);let i=a.toString();t(e.pathname+(i?`?${i}`:""),s)}]}function ju(e,t){let r=(n,o)=>ue(n,o);return t!==void 0?g(()=>Kt(e(),t),void 0,{equals:r}):g(e,void 0,{equals:r})}function Ge(){let{location:e}=Ee();return new Proxy({},{get:(t,r)=>e()[r],has:(t,r)=>r in e(),ownKeys:()=>Reflect.ownKeys(e()),getOwnPropertyDescriptor:(t,r)=>Object.getOwnPropertyDescriptor(e(),r)})}function $u(e={}){let t=V(Je);return r=>{if(!t||r.defaultPrevented||r.button!==0||r.metaKey||r.ctrlKey||r.shiftKey||r.altKey)return;let o=r.target?.closest?.("a");if(!o||!o.getAttribute("href")||o.target&&o.target!=="_self"||o.hasAttribute("download")||/(^|\s)external(\s|$)/.test(o.getAttribute("rel")??""))return;let s=new URL(o.href);s.protocol!=="http:"&&s.protocol!=="https:"||s.origin===window.location.origin&&(s.hash&&s.pathname===window.location.pathname&&s.search===window.location.search||e.shouldNavigate&&!e.shouldNavigate(s,o)||(r.preventDefault(),t.router.navigate(s.pathname+s.search+s.hash,{replace:e.replace})))}}function Jt(){let{router:e}=Ee();return(t,r)=>e.navigate(t,r)}function Ru(){return V(rs)??(()=>{})}function Xt(e){let t=V(Je),r=()=>t?.router.navigate(Q(e.href)??"",{replace:Q(e.replace)}),n=Se("a");T(n,"href",Q(e.href)??""),e.slot&&T(n,"slot",Q(e.slot));for(let s of Object.keys(e)){if(Nu.has(s))continue;let a=e[s];a!=null&&typeof a!="function"&&T(n,s,String(a))}if(typeof n.addEventListener=="function")n.addEventListener("click",s=>{s.metaKey||s.ctrlKey||s.shiftKey||s.altKey||(s.preventDefault(),r())});else{let s=Q(e.className??e.class)??"";s&&T(n,"class",s)}typeof n.addEventListener=="function"&&S(()=>{let s=Q(e.href)??"";n.setAttribute("href",s);let a=Q(e.className??e.class)??"",i=Q(e.activeClass)??"",l=Q(e.active)??t?.location().pathname===s;n.className=[a,l?i:""].filter(Boolean).join(" ")});let o=e.children;return o!=null&&F(n,o),n}function Mu(e){let t=e.action,r=e.className??e.class,n=t.url??"",o=Se("form");T(o,"method","post"),n&&T(o,"action",n),r&&T(o,"class",r);for(let a of Object.keys(e)){if(a==="action"||a==="children"||a==="class"||a==="className")continue;let i=e[a];i!=null&&typeof i!="function"&&T(o,a,String(i))}typeof o.addEventListener=="function"&&o.addEventListener("submit",a=>{a.preventDefault();let i={};new FormData(o).forEach((l,u)=>{i[u]=l}),Promise.resolve(t(i)).catch(()=>{})});let s=e.children;return s!=null&&F(o,s),o}async function Lu(e,t){let r=ce(e,t);if(!r)return;let n=[];for(let o of r.matched){let s=o.component;s&&typeof s.preload=="function"&&n.push(s.preload())}await Promise.all(n)}var Je,es,ts,rs,_u,Q,Nu,dn,pn=L(()=>{"use strict";A();j();A();Gr();Vi();rn();rn();Qi();Ft();A();Je=X(void 0,"router"),es=X(void 0,"outlet"),ts=X(void 0,"route-params"),rs=X(void 0,"route-data");_u={router:{navigate:()=>{}},location:()=>({pathname:"",search:"",hash:"",query:{}}),params:()=>({})};Q=e=>typeof e=="function"?e():e,Nu=new Set(["href","slot","class","className","active","activeClass","replace","children"]);dn=Xt});var Iu={};mn(Iu,{$component:()=>Mr,A:()=>dn,ClientOnly:()=>$r,DEV:()=>He,Dynamic:()=>ci,ErrorBoundary:()=>pi,FRAMEWORK_NAME:()=>Ni,For:()=>si,Fragment:()=>Hr,Index:()=>ai,Link:()=>Xt,Match:()=>li,NoSsr:()=>di,Outlet:()=>an,Portal:()=>fi,Redirect:()=>ln,Router:()=>sn,Show:()=>ii,Store:()=>ct,Suspense:()=>We,Switch:()=>ui,VERSION:()=>Ri,addClass:()=>qo,batch:()=>E,classMap:()=>hi,cleanupDelegation:()=>ki,composeProviders:()=>Ir,createBrowserHistory:()=>fe,createComponent:()=>ke,createComputed:()=>Pn,createConsumer:()=>Ti,createContext:()=>Te,createContextWithProvider:()=>Ci,createDebounce:()=>Dn,createDeferred:()=>Ln,createEffect:()=>S,createIsomorphicState:()=>Pi,createMemo:()=>g,createMemoryHistory:()=>ze,createProvider:()=>Wt,createRenderEffect:()=>_,createResource:()=>ee,createRoot:()=>I,createSelector:()=>Mn,createSignal:()=>b,createStore:()=>pr,delegateEvents:()=>ae,devOnly:()=>Dr,getFrameworkInfo:()=>Zl,getOwner:()=>R,getSharedConfig:()=>Nr,hydrate:()=>$t,initDelegation:()=>Si,insert:()=>F,isDOMNode:()=>Ot,isDev:()=>Lr,isLitTemplateResult:()=>Wo,isRenderable:()=>xi,jsx:()=>Fr,jsxs:()=>$i,lazy:()=>Oe,mount:()=>ss,onCleanup:()=>x,onMount:()=>Nt,onUnmount:()=>Mt,portal:()=>Ai,read:()=>zn,reduce:()=>Un,removeClass:()=>Ho,render:()=>Ce,runWithOwner:()=>N,setAttribute:()=>T,setOwner:()=>Tn,setProperty:()=>xe,spread:()=>ni,startClient:()=>as,styleMap:()=>yi,toggleClass:()=>Fo,untrack:()=>O,untrackStore:()=>hr,useCallback:()=>Ht,useContext:()=>_e,useEffect:()=>Fe,useEventListener:()=>qt,useLocation:()=>Ge,useMatch:()=>cn,useMemo:()=>Lt,useNavigate:()=>Jt,useParam:()=>un,useParams:()=>Xe,useProvide:()=>_i,useReducer:()=>It,useRef:()=>Dt,useRouter:()=>Ee,useSearchParams:()=>fn});A();A();var Xs="__fluixi_signal_next_state__",Gs=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},k=globalThis[Xs]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Gs,onSuspend:null,onError:null,observer:null},Ys="1.0.0-alpha.83";function Zs(e){return k.observer=e,()=>{k.observer===e&&(k.observer=null)}}var ar=[],Qs;function ea(e){let t=k.observer;t&&t.created(e.parents===void 0?{...e,parents:ar,origin:e.origin??Qs}:e)}function ta(e){return k.observer?(ar.push(e),!0):!1}function ra(){ar.pop()}function na(e){k.observer?.ran?.(e)}function oa(e){k.observer?.disposed?.(e)}var ia="__FLUIXI_DEVTOOLS_HOOK__",Hn=globalThis[ia];if(typeof Hn?.inject=="function")try{Hn.inject({observeReactiveNodes:Zs,version:Ys})}catch{}function sa(){return k.observer!=null}var Fn=0,Wn=1,rt=2,aa=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(k.untracked)return;let e=k.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}};var la=class extends aa{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=rt,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(k.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===Wn&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===rt)break}(this.state===rt||!this._initialized)&&this.recompute(),this.state=Fn}recompute(){if(this.sources){for(let i of this.sources)i.observers?.delete(this);this.sources.clear()}let e=k.consumer,t=k.untracked,r=ta(this);k.consumer=this,k.untracked=!1;let n,o=!1,s;try{n=this._fn()}catch(i){o=!0,s=i,n=this._value}finally{k.consumer=e,k.untracked=t,r&&ra()}let a=!this._initialized||this._threw!==o||(o?s!==this._error:!this._equals(this._value,n));if(this._initialized=!0,this._threw=o,this._error=s,this._value=n,na(this),a){if(this.version++,this.observers)for(let i of[...this.observers])i.markDirty(rt);Vn(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===Fn;if(this.state=e,t){if(this.observers)for(let r of[...this.observers])r.markDirty(Wn);Vn(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function Vn(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}function ua(e){return k.onSuspend?(k.onSuspend(e,k.owner),!0):!1}function ca(){return k.owner}function fa(e,t){let r=k.owner;k.owner=e;try{return t()}finally{k.owner=r}}function da(e){if(k.owner){if(k.owner.disposed){e();return}(k.owner.cleanups??=[]).push(e)}}function pa(e){k.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function ha(e){return!!e&&typeof e.then=="function"}pa(()=>{});var ya=Symbol.for("signal"),ma=Symbol.for("memo");function ga(e,t,r){let n=t,o=ca(),s=new la(()=>fa(o,()=>{try{return n=e(n)}catch(i){if(ha(i))return ua(i),n;throw i}}),{equals:r?.equals}),a=(()=>s.get());return Object.defineProperty(a,ya,{value:!0,enumerable:!0}),Object.defineProperty(a,ma,{value:!0,enumerable:!0}),ea({kind:"memo",node:s,handle:a,name:r?.name}),sa()&&da(()=>oa(s)),a}function Un(e,t,r,n){return ga(()=>e().reduce(t,r),void 0,n)}function zn(e){let t=e;for(;typeof t=="function";)t=t();return t}A();var va="__fluixi_signal_next_state__",ba=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},te=globalThis[va]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:ba,onSuspend:null,onError:null,observer:null},wa="1.0.0-alpha.83";function Aa(e){return te.observer=e,()=>{te.observer===e&&(te.observer=null)}}var xa=[],nt;function Sa(e,t){if(!te.observer)return t();let r=nt;nt=e;try{return t()}finally{nt=r}}function ka(e){let t=te.observer;t&&t.created(e.parents===void 0?{...e,parents:xa,origin:e.origin??nt}:e)}function Kn(e,t,r){te.observer?.moved?.(e,t,r)}function Bn(e){te.observer?.disposed?.(e)}var Oa="__FLUIXI_DEVTOOLS_HOOK__",Jn=globalThis[Oa];if(typeof Jn?.inject=="function")try{Jn.inject({observeReactiveNodes:Aa,version:wa})}catch{}function no(){return te.observer!=null}var it=Symbol("store-raw"),Xn=Symbol("store-node"),Gn=Symbol("store-has"),Yn=Symbol("store-self"),Zn=Symbol("store-track");var Le=new WeakMap,ur=new WeakMap,ve=new WeakMap,st=new WeakMap;function Ca(e,t){if(!ge(e)||!no())return;let r=new Set,n=a=>{if(!(!ge(a)||r.has(a))){r.add(a);for(let i of Object.values(a))n(i)}};n(st.get(t)??t);let o=new Set,s=a=>{if(!ge(a))return;let i=a;if(r.has(i)||o.has(i))return;o.add(i);let l=Le.get(i);if(l){for(let u of l.keys.values())Bn(u);l.all&&Bn(l.all),Le.delete(i),ve.delete(i),ur.delete(i)}for(let u of Object.values(i))s(u)};s(e)}var at=(e,t,r)=>r?`${e}[${String(t)}]`:`${e}.${String(t)}`;function oo(e,t,r){let n=t?.owner,o=n&&r!==void 0?at(n.name,r,t?.array):void 0,[s,a]=Sa(n?.store,()=>b(e,o?{name:o}:void 0)),i=s;return i.$=a,i}function lt(e){let t=Le.get(e);return t?t.owner||(t.owner=ve.get(e)):Le.set(e,t={keys:new Map,owner:ve.get(e),array:Array.isArray(e)}),t}function Qn(e,t,r){let n=e.keys.get(t);return n||e.keys.set(t,n=oo(r,e,t)),n}function Ta(e,t,r,n){let o=ve.get(e);if(o&&o.store===t&&o.name===r)return;let s={store:t,name:r};ve.set(e,s),st.set(e,st.get(n)??n);let a=Le.get(e);if(a&&(a.owner=s,!!no())){for(let[i,l]of a.keys)Kn(l,t,at(r,i,a.array));a.all&&Kn(a.all,t,at(r,"*",a.array))}}function eo(e){let t=lt(e);(t.all||(t.all=oo(void 0,t,"*")))()}function to(e,t){e.$(typeof t=="function"?()=>t:t)}function ge(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 ot(e){if(!ge(e))return e;let t=ur.get(e);if(t)return t;let r=new Proxy(e,_a);return ur.set(e,r),r}var _a={get(e,t,r){if(t===it||t===Xn)return e;if(t===ye)return r;if(t===Gn)return l=>l in e;if(t==="__proxy")return!0;if(t===Zn||t===Yn)return eo(e),r;let n=e[t];if(typeof n=="function"&&!Object.prototype.hasOwnProperty.call(e,t))return n;let o=Object.getOwnPropertyDescriptor(e,t);if(o&&o.get)return o.get.call(r);let s=lt(e),a=Qn(s,t,n),i=a();return ge(i)?(s.owner&&Ta(i,a,at(s.owner.name,t,s.array),e),ot(i)):i},set(){return!0},deleteProperty(e,t){return t in e&&Me(e,t,void 0),!0},has(e,t){return t===it||t===ye||t===Xn||t===Gn||t===Yn||t===Zn?!0:(Qn(lt(e),t,e[t])(),t in e)},ownKeys(e){return eo(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function io(e,t=new Set){if(e==null||typeof e!="object")return e;let r=e[it]??e;if(t.has(r)||!ge(r))return r;t.add(r);let n=!1,o=a=>{let i=io(a,t);return i!==a&&(n=!0),i};if(Array.isArray(r)){let a=r.map(o);return n?a:r}let s={};for(let a of Object.keys(r))s[a]=o(r[a]);return n?s:r}function Me(e,t,r){let n=io(r),o=e[t];if(o===n&&(n!==void 0||t in e))return;let s=Array.isArray(e),a=s?e.length:0;n===void 0?delete e[t]:e[t]=n;let i=lt(e),l=i.keys.get(t);if(l&&to(l,n),Ca(o,e),s&&e.length!==a){let u=i.keys.get("length");u&&to(u,e.length)}i.all&&i.all.$(void 0)}function ro(e,t){return typeof e=="function"?e(t):e}function cr(e,t){for(let r of Object.keys(t)){let n=t[r],o=e[r];n&&typeof n=="object"&&!Array.isArray(n)&&o&&typeof o=="object"&&!Array.isArray(o)?cr(o,n):Me(e,r,n)}}function dr(e){let t=[],r=e.replace(/\[([^\]]*)\]/g,".$1");for(let n of r.split("."))n.length&&t.push(n);return t}function so(e,t,r){let n=t.length-1;for(let s=0;s<n;s++){let a=t[s];if(a==="*"){let l=t.slice(s+1);if(Array.isArray(e))for(let u=0;u<e.length;u++)so(e[u],l,r);return}let i=e[a];(i==null||typeof i!="object")&&(i=/^\d+$/.test(t[s+1])?[]:{},Me(e,a,i)),e=i}let o=t[n];if(o==="*"){if(Array.isArray(e))for(let s=0;s<e.length;s++)Me(e,s,ro(r,e[s]));return}Me(e,o,ro(r,e[o]))}function lr(e,t,r){so(e,dr(t),r)}function Pa(e,t){let r=t[0];if(typeof r=="function"&&t.length===1){let n=r(e);n&&n!==e&&cr(e,n);return}if(Array.isArray(r)&&t.length===1){for(let n of r)Array.isArray(n)&&lr(e,n[0],n[1]);return}if(r&&typeof r=="object"&&!Array.isArray(r)&&t.length===1){cr(e,r);return}if(Array.isArray(t[1])&&t.length>=3){lr(e,`${r}.${t[1].join(".")}`,t[2]);return}lr(e,String(r),t[1])}function fr(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(fr);let t={};for(let r of Object.keys(e))t[r]=fr(e[r]);return t}function me(e,t){let r=e;for(let n of dr(t)){if(r==null)return;r=r[n]}return r}var ct=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...r)=>E(()=>Pa(this.root,r))),e&&typeof e=="object"&&(ve.set(e,{store:this,name:t.name??"store"}),st.set(e,e)),ka({kind:"store",node:this,handle:()=>this.root,name:t.name})}get state(){return ot(this.root)}get proxy(){return ot(this.root)}get accessor(){return(()=>ot(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return ut(this.state);let t=this.state;for(let r of dr(e)){if(t==null)return;t=t[r]}return ut(t)}select(e){return g(()=>e(this.state))}subscribe(e){return S(()=>e(this.state))}watch(e,t){let r;return S(()=>{let n=e(this.state);Object.is(n,r)||(t(n,r),r=n)})}reactive(e){return g(()=>this.state[e])}produce(e){this.set((t=>{let r=fr(t);return e(r),r}))}reconcile(e,t={}){this.set(e)}push(e,...t){let r=me(this.root,e);this.set(e,r.concat(t))}pop(e){let t=me(this.root,e).slice(),r=t.pop();return this.set(e,t),r}shift(e){let t=me(this.root,e).slice(),r=t.shift();return this.set(e,t),r}splice(e,t,r,...n){let o=me(this.root,e).slice(),s=o.splice(t,r,...n);return this.set(e,o),s}insert(e,t,r){let n=me(this.root,e).slice();n.splice(t,0,r),this.set(e,n)}removeAt(e,t){let r=me(this.root,e).slice(),n=r.splice(t,1);return this.set(e,r),n}toObservable(){let[e]=b(this.state);return e.toObservable()}dispose(){}},Ea=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","unwrap","toObservable"];function ja(e,t){for(let r of Ea)e[r]=t[r].bind(t);e.$=t.reactive.bind(t)}function pr(e,t={immutable:!0}){let r=new ct(e,t);return ja(r.set,r),[r.proxy,r.set]}function $a(e,t={}){return new ct(e,{...t,immutable:!1})}function ut(e){if(e==null||typeof e!="object")return e;let t=e[it];return t!==void 0?t:e}function hr(e){return O(()=>ut(e))}var Gu=Object.freeze({createStore:pr,createMutableStore:$a,batch:E,unwrap:ut,untrackStore:hr});j();A();j();var mi="1.0.0-alpha.83";j();Vo(mi);j();j();j();A();var Wl={context:null,owner:null};function Nr(){return Wl}var He=typeof process<"u"&&!1,Rr=Symbol.for("fluixi-lifecycle");function gi(){let e=R();if(!e)return null;if(!e[Rr]){let t={mounts:[],effects:[],scheduled:!1};e[Rr]=t}return e[Rr]}function vi(e){if(e.scheduled)return;if(U()){e.mounts=[],e.effects=[];return}e.scheduled=!0;let t=R();queueMicrotask(()=>{if(On(t)){e.mounts=[],e.effects=[];return}N(t,()=>{for(let r of e.mounts)try{let n=r();typeof n=="function"&&x(n)}catch(n){console.error("Error in onMount callback:",n)}for(let r of e.effects){let n;S(()=>{n&&n(),n=r()}),x(()=>{n&&n()})}e.mounts=[],e.effects=[]})})}function ke(e,t){return z(e,t)}function Mr(e,t){let r=typeof e=="function"?O(()=>e(t)):e,n=r!=null&&(typeof r=="function"||typeof r=="object");if(n)try{r.$name=e.name}catch{}return n&&!$(r)?qe(r):r}function Nt(e,t=!0){if(U())return;let r=gi();if(r){if(!t){r.scheduled||e();return}r.mounts.push(e),vi(r)}else{if(!t){e();return}S(()=>{let n=O(e);typeof n=="function"&&x(n)})}}function Mt(e){x(e)}function Fe(e){let t=gi();if(t)t.effects.push(e),vi(t);else{let r;S(()=>{r&&r(),r=e()}),x(()=>{r&&r()})}}function Lt(e){return g(e)}function Dt(e){let t={current:e};return x(()=>{t.current=null}),t}function It(e,t){let[r,n]=b(t);return[r,s=>{n(e(r(),s))}]}function qt(e,t,r,n){Fe(()=>{let o=e&&"current"in e?e.current:e;if(o)return o.addEventListener(t,r,n),()=>{o.removeEventListener(t,r,n)}})}function Ht(e){return e}function Lr(){return He}function Dr(e){He&&e()}A();j();function bi(e){return!!(e&&typeof e=="object"&&typeof e.then=="function"||e instanceof Promise)}var Vl=X(void 0,"suspense-list");function We(e){return z(Ul,e)}function Ul(e){let t=qn(),r=V(Vl),n=r?r.register(t.inFallback):void 0;function o(c){return c==null||typeof c=="boolean"?null:typeof c=="function"&&Z(c)&&!$(c)?c():c}let s=Go(()=>o(e.fallback??null)),a=sr(t,()=>oe(()=>e.children)),i=(c,d)=>{if(!(d>8))if(Array.isArray(c))for(let h of c)i(h,d+1);else typeof c=="function"&&$(c)&&i(c(),d+1)};sr(t,()=>{_(()=>i(a,0))});let[l,u]=b(void 0),f=bi(a);return f&&(t.increment(),a.then(c=>{u(()=>c),t.decrement()},()=>t.decrement())),g(()=>(n?n.showFallback():t.inFallback())?s:f?l():a)}zo(We);Object.defineProperty(We,"__suspense",{value:!0,enumerable:!0});Ft();Ft();function Ce(e,t,r={}){if(ae(["click","input","change","submit"]),U())throw new Error("render() is for client-side only. Use renderToString() on server.");if(!t)throw new Error("Container element is required");let n;return I(o=>{n=o;let s=typeof e=="function"?e():e;t.textContent="",Ct(t),Tt(),F(t,()=>s)}),()=>{n&&(n(),n=void 0)}}function zl(e){return e&&typeof e=="object"&&(e._$litType$!==void 0||e._$litDirective$!==void 0)}function Ai(e,t,r={}){let n=document.createElement("div");n.setAttribute("data-portal","true"),t.appendChild(n);let o=Ce(e,n,r);return()=>{o(),t.contains(n)&&t.removeChild(n)}}function xi(e){return!!(e==null||typeof e=="function"||Ot(e)||zl(e)||Array.isArray(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean")}function Si(){U()||ae(["click","input","change","submit"])}function ki(){U()}qr();A();j();var Bl="__fluixi_iso_states__",Jl="__iso:";function Xl(){return globalThis[Bl]??=new Map}function Gl(e){if(typeof window>"u")return;let t=jr();return t?t[Jl+e]:void 0}function Pi(e,t){let r=Gl(e),n=r!==void 0?r:typeof window<"u"&&t.client?t.client():t.fallback,[o,s]=b(n);return Xl().set(e,{server:t.server,set:s}),{value:o,set:s,key:e}}j();j();j();j();j();A();var Hr=Symbol.for("fluixi.fragment"),Ei=typeof window>"u";function ji(e){return e==null||e===!1?null:Array.isArray(e)?e.map(ji).flat():e}function Fr(e,t,r){if(e==null)return null;let n=t||{};if(r!==void 0&&(n.key=r),e===Hr)return g(()=>qe(ji(n.children)));if(typeof e=="function"){let{type:o}=Ko(e);return e.$$typeof===Symbol.for("react.provider")||o==="provider"?e(n):Ei?{type:e,props:n}:g(()=>z(e,n),void 0,{name:"jsx component"})}return typeof e=="string"&&e.trim().length>0?Yl(e,n):null}var $i=Fr;function Yl(e,t){return Ei?{type:e,props:t||{}}:oi(e,t)}var Ri="0.0.1",Ni="Fluixi";function Zl(){return{name:Ni,version:Ri,features:{ssr:!0,hydration:!0,jsx:!0,litHtml:!0,signals:!0,fineGrained:!0,lazy:!0,hooks:!0,devMode:!0}}}j();Ur();A();A();function le(e){return typeof e=="function"?e():e}function eu(e){if(typeof e=="string")return e;let t=[];return t.push(e.index===!1?"noindex":"index"),t.push(e.follow===!1?"nofollow":"follow"),e.noarchive&&t.push("noarchive"),e.nosnippet&&t.push("nosnippet"),e.noimageindex&&t.push("noimageindex"),e.maxSnippet!=null&&t.push(`max-snippet:${e.maxSnippet}`),e.maxImagePreview&&t.push(`max-image-preview:${e.maxImagePreview}`),e.maxVideoPreview!=null&&t.push(`max-video-preview:${e.maxVideoPreview}`),t.join(", ")}function zr(){let e=[],[t,r]=b(0);return{sources:e,version:t,push(n){return e.push(n),r(o=>o+1),()=>{let o=e.indexOf(n);o!==-1&&(e.splice(o,1),r(s=>s+1))}}}}var tu=null;function Kr(e){tu=e}function Ut(e){let t=5381;for(let r=0;r<e.length;r++)t=t*33^e.charCodeAt(r);return(t>>>0).toString(36)}function ru(e){return e.charset!=null?"meta:charset":e.property?"meta:property:"+e.property:e.name?"meta:name:"+e.name:e["http-equiv"]?"meta:http-equiv:"+e["http-equiv"]:"meta:"+Ut(JSON.stringify(e))}function nu(e,t){let r=typeof t=="string"?{url:t}:t;e.push({tag:"meta",key:"meta:property:og:image:"+r.url,attrs:{property:"og:image",content:r.url}}),r.secureUrl&&e.push({tag:"meta",key:"meta:property:og:image:secure:"+r.url,attrs:{property:"og:image:secure_url",content:r.secureUrl}}),r.type&&e.push({tag:"meta",key:"meta:property:og:image:type:"+r.url,attrs:{property:"og:image:type",content:r.type}}),r.width!=null&&e.push({tag:"meta",key:"meta:property:og:image:width:"+r.url,attrs:{property:"og:image:width",content:String(r.width)}}),r.height!=null&&e.push({tag:"meta",key:"meta:property:og:image:height:"+r.url,attrs:{property:"og:image:height",content:String(r.height)}}),r.alt&&e.push({tag:"meta",key:"meta:property:og:image:alt:"+r.url,attrs:{property:"og:image:alt",content:r.alt}})}function ou(e,t){let r=(n,o)=>{o!=null&&t.push({tag:"meta",key:"meta:property:og:"+n,attrs:{property:"og:"+n,content:o}})};r("title",e.title),r("description",e.description),r("type",e.type),r("url",e.url),r("site_name",e.siteName),r("locale",e.locale);for(let n of e.localeAlternate??[])t.push({tag:"meta",key:"meta:property:og:locale:alt:"+n,attrs:{property:"og:locale:alternate",content:n}});if(e.image!=null){let n=Array.isArray(e.image)?e.image:[e.image];for(let o of n)nu(t,o)}if(e.video){let n=typeof e.video=="string"?{url:e.video}:e.video;r("video",n.url),"type"in n&&n.type&&r("video:type",n.type),"width"in n&&n.width!=null&&r("video:width",String(n.width)),"height"in n&&n.height!=null&&r("video:height",String(n.height))}if(e.audio){let n=typeof e.audio=="string"?{url:e.audio}:e.audio;r("audio",n.url),"type"in n&&n.type&&r("audio:type",n.type)}if(e.article){let n=e.article;r("article:published_time",n.publishedTime),r("article:modified_time",n.modifiedTime),r("article:expiration_time",n.expirationTime),r("article:section",n.section);for(let o of[].concat(n.author??[]))t.push({tag:"meta",key:"meta:property:og:article:author:"+o,attrs:{property:"article:author",content:o}});for(let o of[].concat(n.tag??[]))t.push({tag:"meta",key:"meta:property:og:article:tag:"+o,attrs:{property:"article:tag",content:o}})}if(e.book){let n=e.book;r("book:isbn",n.isbn),r("book:release_date",n.releaseDate);for(let o of[].concat(n.author??[]))t.push({tag:"meta",key:"meta:property:og:book:author:"+o,attrs:{property:"book:author",content:o}});for(let o of[].concat(n.tag??[]))t.push({tag:"meta",key:"meta:property:og:book:tag:"+o,attrs:{property:"book:tag",content:o}})}if(e.profile){let n=e.profile;r("profile:first_name",n.firstName),r("profile:last_name",n.lastName),r("profile:username",n.username),r("profile:gender",n.gender)}}function iu(e,t){let r=(n,o)=>{o!=null&&t.push({tag:"meta",key:"meta:name:twitter:"+n,attrs:{name:"twitter:"+n,content:o}})};r("card",e.card),r("site",e.site),r("creator",e.creator),r("title",e.title),r("description",e.description),r("image",e.image),r("image:alt",e.imageAlt),r("player",e.player),e.playerWidth!=null&&r("player:width",String(e.playerWidth)),e.playerHeight!=null&&r("player:height",String(e.playerHeight)),e.app&&(r("app:name:iphone",e.app.name),r("app:id:iphone",e.app.idIphone),r("app:id:ipad",e.app.idIpad),r("app:id:googleplay",e.app.idGooglePlay))}function su(e,t){let r=(n,o)=>t.push({tag:"link",key:n,attrs:o});if(e.icon!=null){let n=typeof e.icon=="string"?[{url:e.icon}]:e.icon;for(let o of n)r("link:icon:"+o.url,{rel:"icon",href:o.url,...o.type?{type:o.type}:{},...o.sizes?{sizes:o.sizes}:{}})}if(e.apple!=null){let n=typeof e.apple=="string"?[{url:e.apple}]:e.apple;for(let o of n)r("link:apple-touch-icon:"+o.url,{rel:"apple-touch-icon",href:o.url,...o.sizes?{sizes:o.sizes}:{}})}e.mask&&r("link:mask-icon",{rel:"mask-icon",href:e.mask.url,...e.mask.color?{color:e.mask.color}:{}}),e.shortcut&&r("link:shortcut",{rel:"shortcut icon",href:e.shortcut}),e.msTileImage&&t.push({tag:"meta",key:"meta:name:msapplication-TileImage",attrs:{name:"msapplication-TileImage",content:e.msTileImage}}),e.msTileColor&&t.push({tag:"meta",key:"meta:name:msapplication-TileColor",attrs:{name:"msapplication-TileColor",content:e.msTileColor}})}function au(e,t,r){let n=(c,d)=>t.push({tag:"meta",key:c,attrs:d}),o=le(e.title);o!==void 0&&(r.title=o),e.titleTemplate!==void 0&&(r.template=e.titleTemplate);let s=le(e.lang);s!==void 0&&t.push({tag:"htmlAttr",key:"html:lang",name:"lang",value:s}),e.charset!==void 0&&n("meta:charset",{charset:e.charset}),e.viewport!==void 0&&n("meta:name:viewport",{name:"viewport",content:e.viewport});let a=le(e.description);a!==void 0&&n("meta:name:description",{name:"description",content:a});let i=le(e.keywords);i!==void 0&&n("meta:name:keywords",{name:"keywords",content:Array.isArray(i)?i.join(", "):i}),e.author!==void 0&&n("meta:name:author",{name:"author",content:e.author}),e.robots!==void 0&&n("meta:name:robots",{name:"robots",content:eu(e.robots)}),e.generator!==void 0&&n("meta:name:generator",{name:"generator",content:e.generator}),e.applicationName!==void 0&&n("meta:name:application-name",{name:"application-name",content:e.applicationName}),e.referrer!==void 0&&n("meta:name:referrer",{name:"referrer",content:e.referrer}),e.colorScheme!==void 0&&n("meta:name:color-scheme",{name:"color-scheme",content:e.colorScheme});let l=le(e.themeColor);l!==void 0&&n("meta:name:theme-color",{name:"theme-color",content:l});let u=le(e.canonical);if(u!==void 0&&t.push({tag:"link",key:"link:rel:canonical",attrs:{rel:"canonical",href:u}}),e.manifest!==void 0&&t.push({tag:"link",key:"link:rel:manifest",attrs:{rel:"manifest",href:e.manifest}}),e.base!==void 0&&t.push({tag:"base",key:"base",attrs:{href:e.base}}),e.verification){let c={google:"google-site-verification",bing:"msvalidate.01",yandex:"yandex-verification",pinterest:"p:domain_verify"};for(let[d,h]of Object.entries(e.verification)){if(h==null)continue;let p=c[d]??d;n("meta:name:"+p,{name:p,content:h})}}for(let c of e.alternates??[])t.push({tag:"link",key:"link:alternate:hreflang:"+c.hreflang,attrs:{rel:"alternate",hreflang:c.hreflang,href:c.href}});for(let c of e.feeds??[])t.push({tag:"link",key:"link:alternate:feed:"+c.href,attrs:{rel:"alternate",type:c.type??"application/rss+xml",href:c.href,...c.title?{title:c.title}:{}}});e.og&&ou(e.og,t),e.twitter&&iu(e.twitter,t),e.icons&&su(e.icons,t);let f=le(e.jsonLd);if(f!==void 0){let c=Array.isArray(f)?f:[f];for(let d of c){let h=JSON.stringify(d);t.push({tag:"script",key:"script:ldjson:"+Ut(h),attrs:{type:"application/ld+json"},children:h})}}for(let c of e.meta??[]){let d={};for(let[h,p]of Object.entries(c))p!=null&&(d[h==="httpEquiv"?"http-equiv":h]=p);t.push({tag:"meta",key:ru(d),attrs:d})}for(let c of e.link??[]){let d={};for(let[h,p]of Object.entries(c))p!=null&&(d[h]=p);t.push({tag:"link",key:"link:"+(d.rel??"")+":"+(d.href??Ut(JSON.stringify(d))),attrs:d})}for(let c of e.script??[]){let d={},h;for(let[p,m]of Object.entries(c))m!=null&&(p==="children"?h=m:d[p]=m);t.push({tag:"script",key:"script:"+(d.src??Ut((h??"")+JSON.stringify(d))),attrs:d,children:h})}}function lu(e,t){return typeof e=="function"?e(t):e.includes("%s")?e.replace("%s",t):e}function zt(e){let t=[],r={};for(let s of e.sources){let a=typeof s=="function"?s():s;au(a,t,r)}r.title!==void 0&&t.push({tag:"title",key:"title",children:r.template?lu(r.template,r.title):r.title});let n=new Map,o={};for(let s of t){if(s.tag==="htmlAttr"){o[s.name]=s.value;continue}n.set(s.key,s)}return{tags:[...n.values()],htmlAttrs:o}}var Ve="data-fh",Ue="data-fh-key";function Br(e){for(let t=e.firstChild;t;t=t.nextSibling)if(t.nodeType===8&&t.data.startsWith("fh:")){t.parentNode?.removeChild(t);return}}A();function Fi(e,t){for(let r of Array.from(e.attributes))r.name===Ve||r.name===Ue||r.name in t||e.removeAttribute(r.name);for(let[r,n]of Object.entries(t))e.getAttribute(r)!==n&&e.setAttribute(r,n)}function uu(e){let t=document.createElement(e.tag);return Fi(t,e.attrs),t.setAttribute(Ve,""),t.setAttribute(Ue,e.key),e.tag==="script"&&e.children!=null&&(t.textContent=e.children),t}function cu(e,t){let r=document.head,n=new Map;for(let a of Array.from(r.querySelectorAll(`[${Ve}]`))){let i=a.getAttribute(Ue);a.tagName!=="TITLE"&&i&&n.set(i,a)}let o=null,s=new Set;for(let a of e){if(a.tag==="title"){o=a.children;continue}if(a.tag==="htmlAttr")continue;s.add(a.key);let i=n.get(a.key);i&&i.tagName===a.tag.toUpperCase()?(Fi(i,a.attrs),a.tag==="script"&&(i.textContent??"")!==(a.children??"")&&(i.textContent=a.children??"")):(i&&i.remove(),r.appendChild(uu(a)))}for(let[a,i]of n)s.has(a)||i.remove();o!=null&&document.title!==o&&(document.title=o);for(let[a,i]of Object.entries(t))document.documentElement.getAttribute(a)!==i&&document.documentElement.setAttribute(a,i)}function Jr(e){return I(t=>(S(()=>{e.version();let{tags:r,htmlAttrs:n}=zt(e);cu(r,n)}),x(()=>{}),t))}function ss(e,t){if(!t)throw new Error("Container element not found for mount()");Er(()=>e(),t)}var is=e=>g(()=>ke(e));async function as(e,t={}){let r=typeof t.root=="string"?document.querySelector(t.root):t.root??document.querySelector("#app");if(!r)throw new Error(`[Fluixi] Mount container not found: ${t.root??"#app"}`);let n=!!document.getElementById("__FLUIXI_HYDRATION__")||!!t.routes&&r.firstElementChild!=null,o=t.hydrate??n,s=zr();if(Kr(s),Br(r),o){if(t.routes&&t.routes.length){let{preloadRoutes:a}=await Promise.resolve().then(()=>(pn(),os));await a(t.routes,window.location.pathname)}qi(),Wr(!0),$t(is(e),r),Du(),setTimeout(()=>{Wr(!1),Vr()},100)}else Ce(is(e),r);Jr(s)}function Du(){if(typeof window>"u")return;let e=window;typeof e.__FX_REPLAY_STOP__=="function"&&e.__FX_REPLAY_STOP__();let t=e.__FX_REPLAY__;if(e.__FX_REPLAY__=void 0,e.__FX_REPLAY_STOP__=void 0,!(!Array.isArray(t)||t.length===0))for(let r of t){let n=r&&r.target;if(!n||n.isConnected===!1||typeof n.dispatchEvent!="function")continue;let o=r.type,s=o==="click"?new MouseEvent(o,{bubbles:!0,cancelable:!0}):new Event(o,{bubbles:!0,cancelable:!0});n.dispatchEvent(s)}}pn();return ps(Iu);})();
|
|
1
|
+
/*! @fluixi/core v1.0.0-alpha.84 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
|
+
"use strict";var Fluixi=(()=>{var Zt=Object.defineProperty;var Rs=Object.getOwnPropertyDescriptor;var Ps=Object.getOwnPropertyNames;var $s=Object.prototype.hasOwnProperty;var H=(e,t)=>()=>(e&&(t=e(e=0)),t);var vn=(e,t)=>{for(var r in t)Zt(e,r,{get:t[r],enumerable:!0})},Ns=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ps(t))!$s.call(e,o)&&o!==r&&Zt(e,o,{get:()=>t[o],enumerable:!(n=Rs(t,o))||n.enumerable});return e};var Ms=e=>Ns(Zt({},"__esModule",{value:!0}),e);function Tn(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Is,onSuspend:null,onError:null,observer:null}}function Ls(e){let t=Tn(),r=e;for(let n of Object.keys(t))n in e||(r[n]=t[n]);return e}function Ds(){let e=et[wn];return e?Ls(e):et[wn]=Tn()}function En(){return[...new Set(et[On]??[])]}function qs(e){return y.observer=e,()=>{y.observer===e&&(y.observer=null)}}function ir(e){let t=y.observer;t&&t.created(e.parents===void 0?{...e,parents:j,origin:e.origin??Vs}:e)}function Ws(e){return y.observer?(j.push(e),!0):!1}function Fs(){j.pop()}function Hs(e){y.observer?.ran?.(e)}function js(e,t){y.observer?.wrote?.(e,t)}function B(e,t,r,n){let o=y.observer;!o?.bound||!j.length||o.bound(j[j.length-1],e,t,r,n)}function J(e,t,r,n){let o=y.observer;!o?.directive||!j.length||o.directive(j[j.length-1],e,t,r,n)}function Ks(e){y.observer?.contextCreated?.(e)}function er(e,t,r){let n=y.observer;!n?.context||!j.length||n.context(j[j.length-1],e,t,r)}function sr(e){y.observer?.disposed?.(e)}function Cn(){return y.observer!=null}function tr(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}function Js(e){if(y.untracked)return e();y.untracked=!0;try{return e()}finally{y.untracked=!1}}function ge(e){let t=Le(e);return e&&(e.owned??=[]).push(t),t}function ve(e,t=!0){Ie(e,t)}function $n(e){return!!e&&e.disposed===!0}function Le(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function X(e,t){let r=Symbol(t??"context");return Ks(r),{id:r,defaultValue:e,Provider:o=>{er(r,"provide",o.value);let i=y.owner,a=Le(i);(a.contexts=new Map).set(r,o.value),i&&(i.owned??=[]).push(a),y.owner=a;try{return o.children}finally{y.owner=i}}}}function K(e){let t=y.owner;for(;t;){if(t.contexts&&t.contexts.has(e.id)){let r=t.contexts.get(e.id);return er(e.id,"read",r),r}t=t.parent}return er(e.id,"read",e.defaultValue),e.defaultValue}function Nn(e,t){let r=e;for(;r;){if(r.contexts&&r.contexts.has(t.id))return r.contexts.get(t.id);r=r.parent}return t.defaultValue}function Xs(e,t,r){let n=Le(y.owner);(n.contexts=new Map).set(e.id,t),y.owner&&(y.owner.owned??=[]).push(n);let o=y.owner;y.owner=n;try{return r()}finally{y.owner=o}}function Gs(e){y.onSuspend=e}function Ys(e){return y.onSuspend?(y.onSuspend(e,y.owner),!0):!1}function Zs(e){y.onError=e}function N(){return y.owner}function Mn(e){let t=y.owner;return y.owner=e,t}function I(e,t){let r=y.owner;y.owner=e;try{return t()}finally{y.owner=r}}function S(e){if(y.owner){if(y.owner.disposed){e();return}(y.owner.cleanups??=[]).push(e)}}function Ie(e,t=!0){if(!e.disposed){if(e.owned){for(let r=e.owned.length-1;r>=0;r--)Ie(e.owned[r]);e.owned=null}if(e.cleanups){for(let r=e.cleanups.length-1;r>=0;r--)e.cleanups[r]();e.cleanups=null}t&&(e.disposed=!0)}}function q(e){let t=Le(y.owner);y.owner&&(y.owner.owned??=[]).push(t);let r=y.owner;y.owner=t;try{return e(()=>Ie(t))}finally{y.owner=r}}function Qs(e){y.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function ea(e){e.queued||(e.queued=!0,y.queue.push(e),!y.scheduled&&y.batchDepth===0&&(y.scheduled=!0,y.hostSchedule(ar)))}function ar(){if(y.scheduled=!1,y.flushing)return;y.flushing=!0;let e=0;try{for(;y.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let t=y.queue;y.queue=[];for(let r of t)r.queued=!1,r.disposed||r.run()}}finally{y.flushing=!1}}function ta(){y.batchDepth===0&&ar()}function ra(e){y.batchDepth++;try{return e()}finally{--y.batchDepth===0&&ar()}}function cr(e,t=!1){let r=new na(e,t);return()=>r.dispose()}function oa(e){return!!e&&typeof e.then=="function"}function w(e,t){let r=new zs(e,{equals:t?.equals}),n=(()=>r.get()),o=(i=>{let a=typeof i=="function"?i(r.peek()):i;return r.set(a),ta(),a});return Object.defineProperty(n,In,{value:!0,enumerable:!0}),Object.defineProperty(n,sa,{value:{get value(){return r.peek()},get version(){return r.version}},enumerable:!1}),ir({kind:"signal",node:r,handle:n,name:t?.name,set:o}),Cn()&&S(()=>sr(r)),[n,o]}function m(e,t,r){let n=t,o=N(),i=new Pn(()=>I(o,()=>{try{return n=e(n)}catch(s){if(oa(s))return Ys(s),n;throw s}}),{equals:r?.equals}),a=(()=>i.get());return Object.defineProperty(a,In,{value:!0,enumerable:!0}),Object.defineProperty(a,ia,{value:!0,enumerable:!0}),ir({kind:"memo",node:i,handle:a,name:r?.name}),Cn()&&S(()=>sr(i)),a}function x(e,t){let r=t;return cr(()=>{r=e(r)},!0)}function Ln(e,t){let r=t;cr(()=>{r=e(r)})}function C(e,t){let r=t;return cr(()=>{r=e(r)})}function $(e){return ra(e)}function O(e){return Js(e)}function Dn(e,t,r){let n=[];return S(()=>{for(let o of n)o.dispose();n=[]}),m(()=>{let o=e()||[];return O(()=>{if(o.length===0){for(let c of n)c.dispose();return n=[],r?.fallback?r.fallback():[]}let i=new Map;for(let c of n)i.has(c.item)||i.set(c.item,c);let a=[],s=new Set;for(let c=0;c<o.length;c++){let u=o[c],l=i.get(u);if(l&&!s.has(l))l.setIndex(c),a.push(l),s.add(l);else{let f,d,g;q(p=>{g=p;let[b,T]=w(c,{name:"row index"});d=T,f=t(u,b)});let h={item:u,rendered:f,dispose:g,setIndex:d};a.push(h),s.add(h)}}for(let c of n)s.has(c)||c.dispose();return n=a,a.map(c=>c.rendered)})},void 0,{name:"mapArray"})}function qn(e,t,r,n){let o=[],i=[];return S(()=>{for(let a of i)a.dispose();o=[],i=[]}),m(()=>{let a=e()||[];return O(()=>{if(a.length===0){for(let f of i)f.dispose();return o=[],i=[],n?.fallback?n.fallback():[]}let s=new Map;for(let f=0;f<o.length;f++)s.set(o[f],i[f]);let c=[],u=[],l=new Set;for(let f=0;f<a.length;f++){let d=t(a[f]),g=s.get(d);if(g&&!l.has(d))g.setIndex(f),c.push(g);else{let h,p,b;q(T=>{b=T;let[_,ce]=w(f,{name:"row index"});p=ce;let Ye=m(me=>{let re=(e()||[])[_()];return re??me},a[f]);h=r(Ye,_)}),c.push({rendered:h,dispose:b,setIndex:p})}u.push(d),l.add(d)}for(let[f,d]of s)l.has(f)||d.dispose();return o=u,i=c,c.map(f=>f.rendered)})},void 0,{name:"keyArray"})}function Vn(e,t,r){let n=[];return S(()=>{for(let o of n)o.dispose();n=[]}),m(()=>{let o=e()||[];return O(()=>{if(o.length===0){for(let c of n)c.dispose();return n=[],r?.fallback?r.fallback():[]}let i=n.length,a=o.length;for(let c=i;c<a;c++){let u,l,f,d=o[c];q(g=>{f=g;let[h,p]=w(d);l=p,u=t(h,c)}),n.push({rendered:u,setItem:l,dispose:f})}for(let c=a;c<i;c++)n[c].dispose();a<i&&(n=n.slice(0,a));let s=Math.min(i,a);for(let c=0;c<s;c++)n[c].setItem(o[c]);return n.map(c=>c.rendered)})},void 0,{name:"indexArray"})}function M(e){return typeof e=="function"&&e[ua]===!0}function fa(e){xn&&xn(e)}function Wn(e){rr=e}function la(e){return rr?rr(e):void 0}function Fn(e){nr=e}function da(){return nr?nr():void 0}function pa(e,t){kn&&kn(e,t)}function Hn(e,t=(r,n)=>r===n){let r=new Map;return x(()=>{let n=e();for(let[o,i]of r){let[a,s]=i,c=t(o,n);a()!==c&&s(c)}}),n=>{let o=r.get(n);if(!o){let[i,a]=w(!1);o=[i,a],r.set(n,o);let s=e();a(t(n,s))}return o[0]()}}function jn(e,t){let[r,n]=w(e(),t);return x(()=>{let o=e();t?.timeoutMs?setTimeout(()=>n(()=>o),t.timeoutMs):typeof requestIdleCallback=="function"?requestIdleCallback(()=>n(()=>o)):Promise.resolve().then(()=>n(()=>o))}),r}function Kn(e,t){let r,n=(...o)=>{r!==void 0&&clearTimeout(r),r=setTimeout(()=>{r=void 0,e(...o)},t)};return S(()=>{r!==void 0&&clearTimeout(r)}),n}function ha(e){return!!e&&typeof e.then=="function"}function ne(e,t,r={}){let n,o;typeof t=="function"?(n=typeof e=="function"?e:()=>e,o=t):(n=()=>!0,o=e,t&&typeof t=="object"&&(r=t));let i=r.transport===!1?void 0:da(),a=i!==void 0?la(i):void 0,s=a!==void 0,[c,u]=w(a!==void 0?a.value:r.initialValue,{equals:!1}),[l,f]=w(void 0,{equals:!1}),[d,g]=w(a!==void 0||r.initialValue!==void 0?"ready":"unresolved",{equals:!1}),[h,p]=w(void 0,{equals:!1}),[b,T]=w(void 0,{equals:!1}),_=Qt,ce=!1;x(()=>{let D=n();if(b(),D===!1||D===null||D===void 0){_=Qt,$(()=>{g("unresolved"),p(void 0),f(void 0)});return}let re=ce;if(ce=!1,_!==Qt&&D===_&&!re)return;if(_=D,s){s=!1;return}let Ze=!1;S(()=>Ze=!0);let mn=O(d),Cs=O(c),gn=mn==="ready"||mn==="refreshing";$(()=>{g(gn?"refreshing":"pending"),f(void 0)});try{let ue=o(D,{value:Cs,refetching:gn});ha(ue)?(p(ue),fa(ue),ue.then(Qe=>{Ze||(i!==void 0&&pa(i,Qe),$(()=>{u(()=>Qe),g("ready"),p(void 0)}))},Qe=>{Ze||$(()=>{f(Qe),g("errored"),p(void 0)})})):$(()=>{u(()=>ue),g("ready"),p(void 0)})}catch(ue){if(Ze)return;$(()=>{f(ue),g("errored"),p(void 0)})}});let Ye=()=>{let D=d();return D==="pending"||D==="refreshing"},me=(()=>{let D=l();if(D)throw D;if(Ye()){let re=h();if(re)throw re}return c()});return Object.defineProperties(me,{state:{get:d},loading:{get:Ye},error:{get:l},latest:{get:c}}),Object.defineProperty(me,Symbol.for("resource"),{value:!0,enumerable:!0}),Object.defineProperty(me,Symbol.for("signal"),{value:!0,enumerable:!0}),[me,{mutate:u,refetch:()=>{ce=!0,T(void 0)}}]}function tt(e){if(typeof e=="function"&&!e.length){let t=e();return M(t)?t:tt(t)}if(Array.isArray(e)){let t=[];for(let r=0;r<e.length;r++){let n=tt(e[r]);Array.isArray(n)?t.push.apply(t,n):t.push(n)}return t}return e}function fe(e){let t=m(e);return ca?m(()=>tt(t()),void 0,{name:"children"}):m(()=>tt(t()))}function zn(){let[e,t]=w(0),r=0;return{increment:()=>t(r+=1),decrement:()=>t(r-=1),inFallback:()=>e()>0}}function ur(e,t){return Xs(Un,e,t)}var or,_n,wn,On,Is,et,y,j,Vs,Us,bn,An,Sn,Me,Rn,zs,Pn,Bs,na,In,ia,sa,aa,ca,ua,xn,rr,nr,kn,Qt,Un,ya,we,A=H(()=>{"use strict";or="1.0.0-alpha.84",_n=or.split(".")[0],wn=`__fluixi_signal_state_v${_n}__`,On=`__fluixi_signal_builds_v${_n}__`,Is=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};et=globalThis;y=Ds();(et[On]??=[]).push(or);j=[];Us="__FLUIXI_DEVTOOLS_HOOK__",bn=globalThis[Us];if(typeof bn?.inject=="function")try{bn.inject({observeReactiveNodes:qs,version:or})}catch{}An=0,Sn=1,Me=2,Rn=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(y.untracked)return;let e=y.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}},zs=class extends Rn{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++,js(this,y.consumer),this.observers)for(let t of[...this.observers])t.markDirty(Me);tr(this)}}peek(){return this._value}},Pn=class extends Rn{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=Me,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(y.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===Sn&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===Me)break}(this.state===Me||!this._initialized)&&this.recompute(),this.state=An}recompute(){if(this.sources){for(let s of this.sources)s.observers?.delete(this);this.sources.clear()}let e=y.consumer,t=y.untracked,r=Ws(this);y.consumer=this,y.untracked=!1;let n,o=!1,i;try{n=this._fn()}catch(s){o=!0,i=s,n=this._value}finally{y.consumer=e,y.untracked=t,r&&Fs()}let a=!this._initialized||this._threw!==o||(o?i!==this._error:!this._equals(this._value,n));if(this._initialized=!0,this._threw=o,this._error=i,this._value=n,Hs(this),a){if(this.version++,this.observers)for(let s of[...this.observers])s.markDirty(Me);tr(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===An;if(this.state=e,t){if(this.observers)for(let r of[...this.observers])r.markDirty(Sn);tr(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};Bs=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()}};na=class{constructor(e,t=!1){this.queued=!1,this.disposed=!1,this.owner=Le(y.owner),y.owner&&(y.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new Pn(()=>{Ie(this.owner,!1),I(this.owner,()=>{let r=e();typeof r=="function"&&(this.owner.cleanups??=[]).push(r)})}),ir({kind:"effect",node:this.computed,handle:this,internal:!t}),this.watcher=new Bs(()=>ea(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"&&y.onSuspend){y.onSuspend(e,this.owner);return}if(y.onError&&y.onError(e,this.owner))return;throw e}}}dispose(){this.disposed||(this.disposed=!0,sr(this.computed),this.watcher.unwatch(this.computed),Ie(this.owner))}};Qs(()=>{});In=Symbol.for("signal"),ia=Symbol.for("memo"),sa=Symbol.for("signal-node");aa=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0,ca=typeof process>"u"?aa:!1,ua=Symbol.for("signal");xn=null;rr=null;nr=null;kn=null;Qt=Symbol();Un=X();Gs((e,t)=>{let r=Nn(t,Un);r&&(r.increment(),e.finally(()=>r.decrement()))});ya=X();Zs((e,t)=>{let r=Nn(t,ya);return r?(r.setError(e),!0):!1});we=Symbol.for("fluixi-proxy")});var Ao,So=H(()=>{"use strict";Ao="1.0.0-alpha.84"});function Lo(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:oc,onSuspend:null,onError:null,observer:null}}function ic(e){let t=Lo(),r=e;for(let n of Object.keys(t))n in e||(r[n]=t[n]);return e}function sc(){let e=xr[xo];return e?ic(e):xr[xo]=Lo()}function ac(e){return R.observer=e,()=>{R.observer===e&&(R.observer=null)}}function cc(e,t){if(!R.observer)return t();let r=dt;dt=e;try{return t()}finally{dt=r}}function uc(e){let t=R.observer;t&&t.created(e.parents===void 0?{...e,parents:le,origin:e.origin??dt}:e)}function Do(e){let t=R.observer;!t?.props||!le.length||!e||t.props(le[le.length-1],e)}function fc(e){R.observer?.contextCreated?.(e)}function lc(e,t,r){let n=R.observer;!n?.context||!le.length||n.context(le[le.length-1],e,t,r)}function ko(e,t,r){R.observer?.moved?.(e,t,r)}function _o(e){R.observer?.disposed?.(e)}function qo(){return R.observer!=null}function pc(e){if(R.untracked)return e();R.untracked=!0;try{return e()}finally{R.untracked=!1}}function hc(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function Vo(e,t){let r=Symbol(t??"context");return fc(r),{id:r,defaultValue:e,Provider:o=>{lc(r,"provide",o.value);let i=R.owner,a=hc(i);(a.contexts=new Map).set(r,o.value),i&&(i.owned??=[]).push(a),R.owner=a;try{return o.children}finally{R.owner=i}}}}function Wo(e,t){let r=e;for(;r;){if(r.contexts&&r.contexts.has(t.id))return r.contexts.get(t.id);r=r.parent}return t.defaultValue}function yc(e){R.onSuspend=e}function mc(e){R.onError=e}function gc(e){R.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Fo(e){return pc(e)}function Ho(e){return typeof e=="function"&&e[vc]===!0}function Ac(e,t){if(!Se(e)||!qo())return;let r=new Set,n=a=>{if(!(!Se(a)||r.has(a))){r.add(a);for(let s of Object.values(a))n(s)}};n(mt.get(t)??t);let o=new Set,i=a=>{if(!Se(a))return;let s=a;if(r.has(s)||o.has(s))return;o.add(s);let c=qe.get(s);if(c){for(let u of c.keys.values())_o(u);c.all&&_o(c.all),qe.delete(s),xe.delete(s),kr.delete(s)}for(let u of Object.values(s))i(u)};i(e)}function jo(e,t,r){let n=t?.owner,o=n&&r!==void 0?gt(n.name,r,t?.array):void 0,[i,a]=cc(n?.store,()=>w(e,o?{name:o}:void 0)),s=i;return s.$=a,s}function vt(e){let t=qe.get(e);return t?t.owner||(t.owner=xe.get(e)):qe.set(e,t={keys:new Map,owner:xe.get(e),array:Array.isArray(e)}),t}function Po(e,t,r){let n=e.keys.get(t);return n||e.keys.set(t,n=jo(r,e,t)),n}function Sc(e,t,r,n){let o=xe.get(e);if(o&&o.store===t&&o.name===r)return;let i={store:t,name:r};xe.set(e,i),mt.set(e,mt.get(n)??n);let a=qe.get(e);if(a&&(a.owner=i,!!qo())){for(let[s,c]of a.keys)ko(c,t,gt(r,s,a.array));a.all&&ko(a.all,t,gt(r,"*",a.array))}}function $o(e){let t=vt(e);(t.all||(t.all=jo(void 0,t,"*")))()}function No(e,t){e.$(typeof t=="function"?()=>t:t)}function Se(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 pt(e){if(!Se(e))return e;let t=kr.get(e);if(t)return t;let r=new Proxy(e,xc);return kr.set(e,r),r}function Ko(e,t=new Set){if(e==null||typeof e!="object")return e;let r=e[yt]??e;if(t.has(r)||!Se(r))return r;t.add(r);let n=!1,o=a=>{let s=Ko(a,t);return s!==a&&(n=!0),s};if(Array.isArray(r)){let a=r.map(o);return n?a:r}let i={};for(let a of Object.keys(r))i[a]=o(r[a]);return n?i:r}function Y(e,t,r){let n=Ko(r),o=e[t];if(o===n&&(n!==void 0||t in e))return;let i=Array.isArray(e),a=i?e.length:0;n===void 0?delete e[t]:e[t]=n;let s=vt(e),c=s.keys.get(t);if(c&&No(c,n),Ac(o,e),i&&e.length!==a){let u=s.keys.get("length");u&&No(u,e.length)}s.all&&s.all.$(void 0)}function Mo(e,t){return typeof e=="function"?e(t):e}function _r(e,t){for(let r of Object.keys(t)){let n=t[r],o=e[r];n&&typeof n=="object"&&!Array.isArray(n)&&o&&typeof o=="object"&&!Array.isArray(o)?_r(o,n):Y(e,r,n)}}function Er(e){let t=[],r=e.replace(/\[([^\]]*)\]/g,".$1");for(let n of r.split("."))n.length&&t.push(n);return t}function Uo(e,t,r){let n=t.length-1;for(let i=0;i<n;i++){let a=t[i];if(a==="*"){let c=t.slice(i+1);if(Array.isArray(e))for(let u=0;u<e.length;u++)Uo(e[u],c,r);return}let s=e[a];(s==null||typeof s!="object")&&(s=/^\d+$/.test(t[i+1])?[]:{},Y(e,a,s)),e=s}let o=t[n];if(o==="*"){if(Array.isArray(e))for(let i=0;i<e.length;i++)Y(e,i,Mo(r,e[i]));return}Y(e,o,Mo(r,e[o]))}function Sr(e,t,r){Uo(e,Er(t),r)}function kc(e){return Array.isArray(e)&&e.length>0&&e.every(t=>Array.isArray(t)&&t.length>=2&&typeof t[0]=="string")}function ht(e,t){for(let r=e.length-1;r>=t.length;r--)Y(e,String(r),void 0);e.length!==t.length&&Y(e,"length",t.length);for(let r=0;r<t.length;r++)Y(e,String(r),t[r])}function _c(e,t){let r=t[0];if(typeof r=="function"&&t.length===1){let n=r(e);n&&n!==e&&_r(e,n);return}if(Array.isArray(r)&&t.length===1){if(kc(r)){for(let n of r)Sr(e,n[0],n[1]);return}if(Array.isArray(e)){ht(e,r);return}if(r.length===0)return;throw new TypeError("[fluixi] set() was given an array that is neither a batch of [path, value] pairs nor a replacement for an array root. Name the path you meant, as in set('items', [...]).")}if(r&&typeof r=="object"&&!Array.isArray(r)&&t.length===1){_r(e,r);return}if(Array.isArray(t[1])&&t.length>=3){Sr(e,`${r}.${t[1].join(".")}`,t[2]);return}Sr(e,String(r),t[1])}function Or(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(Or);let t={};for(let r of Object.keys(e))t[r]=Or(e[r]);return t}function se(e,t){let r=e;for(let n of Er(t)){if(r==null)return;r=r[n]}return r}function Tc(e,t){for(let r of Oc)e[r]=t[r].bind(t);e.$=t.reactive.bind(t)}function Ec(e,t={immutable:!0}){let r=new zo(e,t);return Tc(r.set,r),[r.proxy,r.set]}function Cc(e,t={}){return new zo(e,{...t,immutable:!1})}function wt(e){if(e==null||typeof e!="object")return e;let t=e[yt];return t!==void 0?t:e}function Rc(e){return O(()=>wt(e))}var Tr,Io,xo,nc,oc,xr,R,le,dt,dc,Oo,Df,vc,wc,bc,yt,To,Eo,Co,Ro,qe,kr,xe,mt,gt,xc,zo,Oc,Vf,Bo=H(()=>{"use strict";A();Tr="1.0.0-alpha.84",Io=Tr.split(".")[0],xo=`__fluixi_signal_state_v${Io}__`,nc=`__fluixi_signal_builds_v${Io}__`,oc=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};xr=globalThis;R=sc();(xr[nc]??=[]).push(Tr);le=[];dc="__FLUIXI_DEVTOOLS_HOOK__",Oo=globalThis[dc];if(typeof Oo?.inject=="function")try{Oo.inject({observeReactiveNodes:ac,version:Tr})}catch{}gc(()=>{});Df=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0,vc=Symbol.for("signal");wc=Vo();yc((e,t)=>{let r=Wo(t,wc);r&&(r.increment(),e.finally(()=>r.decrement()))});bc=Vo();mc((e,t)=>{let r=Wo(t,bc);return r?(r.setError(e),!0):!1});yt=Symbol("store-raw"),To=Symbol("store-node"),Eo=Symbol("store-has"),Co=Symbol("store-self"),Ro=Symbol("store-track"),qe=new WeakMap,kr=new WeakMap,xe=new WeakMap,mt=new WeakMap;gt=(e,t,r)=>r?`${e}[${String(t)}]`:`${e}.${String(t)}`;xc={get(e,t,r){if(t===yt||t===To)return e;if(t===we)return r;if(t===Eo)return c=>c in e;if(t==="__proxy")return!0;if(t===Ro||t===Co)return $o(e),r;let n=e[t];if(typeof n=="function"&&!Object.prototype.hasOwnProperty.call(e,t))return n;let o=Object.getOwnPropertyDescriptor(e,t);if(o&&o.get)return o.get.call(r);let i=vt(e),a=Po(i,t,n),s=a();return Se(s)?(i.owner&&Sc(s,a,gt(i.owner.name,t,i.array),e),pt(s)):s},set(){return!0},deleteProperty(e,t){return t in e&&Y(e,t,void 0),!0},has(e,t){return t===yt||t===we||t===To||t===Eo||t===Co||t===Ro?!0:(Po(vt(e),t,e[t])(),t in e)},ownKeys(e){return $o(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};zo=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...r)=>$(()=>_c(this.root,r))),e&&typeof e=="object"&&(xe.set(e,{store:this,name:t.name??"store"}),mt.set(e,e)),uc({kind:"store",node:this,handle:()=>this.root,name:t.name})}get state(){return pt(this.root)}get proxy(){return pt(this.root)}get accessor(){return(()=>pt(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return wt(this.state);let t=this.state;for(let r of Er(e)){if(t==null)return;t=t[r]}return wt(t)}select(e){return m(()=>e(this.state))}subscribe(e){return x(()=>e(this.state))}watch(e,t){let r;return x(()=>{let n=e(this.state);Object.is(n,r)||(t(n,r),r=n)})}reactive(e){return m(()=>this.state[e])}produce(e){this.set((t=>{let r=Or(t);return e(r),r}))}reconcile(e,t={}){this.set(e)}push(e,...t){let r=se(this.root,e);this.set(e,r.concat(t))}pop(e){let t=se(this.root,e).slice(),r=t.pop();return this.set(e,t),r}shift(e){let t=se(this.root,e).slice(),r=t.shift();return this.set(e,t),r}splice(e,t,r,...n){let o=se(this.root,e).slice(),i=o.splice(t,r,...n);return this.set(e,o),i}insert(e,t,r){let n=se(this.root,e).slice();n.splice(t,0,r),this.set(e,n)}removeAt(e,t){let r=se(this.root,e).slice(),n=r.splice(t,1);return this.set(e,r),n}replace(e,t){if(arguments.length>=2){let n=se(this.root,String(e)),o=t;if(Array.isArray(n)&&Array.isArray(o)){ht(n,o);return}this.set(e,o);return}let r=this.root;if(Array.isArray(r)&&Array.isArray(e)){ht(r,e);return}this.set(e)}clear(e){let t=e===void 0?this.root:se(this.root,e);if(Array.isArray(t)){ht(t,[]);return}if(t&&typeof t=="object")for(let r of Object.keys(t))Y(t,r,void 0)}toObservable(){let[e]=w(this.state);return e.toObservable()}dispose(){}},Oc=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","replace","clear","unwrap","toObservable"];Vf=Object.freeze({createStore:Ec,createMutableStore:Cc,batch:$,unwrap:wt,untrackStore:Rc})});function Pc(e){return e.localName.includes("-")}function Jo(e,t,r,n=!1){if(r==null){e.removeAttribute(t);return}if(Pc(e)){e[t]=r;return}E(e,t,r,n)}function ti(e,...t){e.classList.add(...t)}function ri(e,...t){e.classList.remove(...t)}function ni(e,...t){t.forEach(r=>e.classList.toggle(r))}function E(e,t,r,n=!1){if(r==null||r===!1){e.removeAttribute(t);return}if(r===!0){e.setAttribute(t,"");return}if(typeof r=="object"){e.setAttribute(t,JSON.stringify(r));return}e.setAttribute(t,String(r))}function oi(e){return e&&typeof e=="object"&&e.strings&&Array.isArray(e.strings)&&e.values&&Array.isArray(e.values)}function Tt(e){return e instanceof Node}function ii(e){W.core=e}function Et(e){W.core&&e.setAttribute("fluixi",W.core),e.setAttribute("fx-dom",W.dom),e.setAttribute("fx-reactive",W.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=W)}function Ct(){let e=En();e.length>1&&console.warn(`[fluixi] ${e.length} builds of @fluixi/reactive are driving one reactive graph: ${e.join(", ")}. They share it on purpose, so signals still cross between them, but the oldest one decided what the graph looks like. Build the components on one release, or load them as shared-runtime bundles.`);let t=[W.core,W.dom,W.reactive].filter(r=>r!==void 0);new Set(t).size<=1||console.warn(`[fluixi] package versions disagree: core ${W.core??"(absent)"}, dom ${W.dom}, reactive ${W.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 si(e){return Object.defineProperty(e,Symbol.for("fluixi-provider"),{value:!0,enumerable:!0}),e}function Ve(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}function ai(e){return Object.defineProperty(e,Symbol.for("fluixi-suspense"),{value:!0,enumerable:!0}),e}function Nc(e){return typeof e=="function"&&e[Symbol.for("fluixi-router")]===!0}function Mc(e){return typeof e=="function"&&e[Symbol.for("fluixi-routes")]===!0}function Ic(e){return typeof e=="function"&&e[Symbol.for("fluixi-route")]===!0}function Lc(e){return typeof e=="function"&&e[Symbol.for("fluixi-outlet")]===!0}function Dc(e){return typeof e=="function"&&e[Symbol.for("fluixi-provider")]===!0}function qc(e){return typeof e=="function"&&e[Symbol.for("fluixi-context")]===!0}function ee(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}function Vc(e){return typeof e=="function"&&e[Symbol.for("fluixi-suspense")]===!0}function ci(e){return Nc(e)?{type:"router",value:e}:Ic(e)?{type:"route",value:e}:Mc(e)?{type:"routes",value:e}:Lc(e)?{type:"outlet",value:e}:ee(e)?{type:"component",value:e}:Vc(e)?{type:"suspense",value:e}:Dc(e)?{type:"provider",value:e}:qc(e)?{type:"context",value:e}:{type:"none",value:e}}function L(){return Rr.server}function Ir(){if(!Rr.nodes)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return Rr.nodes}function Lr(e){return e!=null&&e[Rt]===!0?!0:typeof Node<"u"&&e instanceof Node}function Hc(e){return e!=null&&e[Rt]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function jc(e){return e!=null&&e[Rt]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}function Kc(e){ui=e}function fi(){return ui}function Go(e,t){return v.active&&t.parentNode===e}function li(e){let t=v.parents.lastIndexOf(e);t!==-1&&(v.parents.length=t),v.cursor=e.nextSibling}function di(e){if(!v.active)return e();let t=v.cursor,r=v.parents;v.active=!1,v.parents=[];try{return e()}finally{v.active=!0,v.cursor=t,v.parents=r}}function pi(e){if(!v.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&li(t)}function Yo(e,t){return t&&(e[zc]=t),e}function pe(e){if(!L())for(let t of e)At.has(t)||Dr.has(t)||(At.add(t),document.addEventListener(t,Bc))}function Bc(e){let t=`$$${e.type}`,r=e.composedPath&&e.composedPath()[0]||e.target;for(;r;){let n=r[t];if(n&&!r.disabled&&(n(e),e.cancelBubble))return;r=r.host&&r.host!==r&&r.host instanceof Element?r.host:r.parentNode}}function Jc(e,t,r){if(e[`$$${t}`]=r,Dr.has(t)){let n=`__fx_${t}`;if(!e[n]){let o=i=>{e[`$$${t}`]?.(i)};e.addEventListener(t,o),e[n]=o}return}At.has(t)||pe([t])}function Zo(e,t){delete e[`$$${t}`];let r=`__fx_${t}`,n=e[r];n&&(e.removeEventListener(t,n),delete e[r])}function ae(e,t=!1){if(L())return Ir().createText(e);if(v.active&&!t){let r=fi()?.hydrateText(e);if(r)return r}return document.createTextNode(e)}function _e(e,t=!1,r){if(L())return Ir().createElement(e,t);if(v.active){let n=fi()?.hydrateElement(e);if(n)return r?Yo(n,r):n}return Yo(t?document.createElementNS(Mr,e):document.createElement(e),r)}function Gc(e,t,r,n,o){let i=n,a=new Map;return C(()=>{B(r??t,"content",void 0,e);let s;if(ee(e)&&!M(e)){if(!a.has(e)){Q++;try{let c=e();a.set(e,c)}finally{Q--}}for(s=a.get(e);typeof s=="function"&&M(s);)s=s()}else for(s=e();typeof s=="function"&&M(s);)s=s();{let c=0;for(;typeof s=="function"&&c++<50;)if(ee(s)){if(!a.has(s)){let u=s;Q++;try{let l=u();a.set(u,l)}finally{Q--}}s=a.get(s)}else if(M(s))s=s();else if(s=s(),typeof s!="function"||!M(s)&&!ee(s))break}Q++;try{i=St(t,s,r,i,a),o(i)}finally{Q--}})}function F(e,t,r,n){if(Q>Xc)return console.error("[insert] Exceeded max call depth, possible infinite loop."),()=>null;r!==void 0&&!r&&(r=ae("",!0),e.appendChild(r));let o=n??null,i=c=>Array.isArray(c)&&c.some(u=>typeof u=="function"),a=c=>typeof c=="function"?c:()=>c;if(typeof t!="function"&&!i(t)){Q++;try{o=St(e,t,r,o)}finally{Q--}return()=>o}let s=Gc(a(t),e,r,o,c=>{o=c});return()=>(s?.(),o)}function St(e,t,r,n,o){if(t==null||typeof t=="boolean")return de(e,n,r);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return de(e,n,r);if(bt(t)){let a=ae("",!0);return Array.isArray(n)?n.length>0?(e.replaceChild(a,n[0]),de(e,n.slice(1),r)):V(e,a,r):n?e.replaceChild(a,n):V(e,a,r),t.then(s=>{a.parentNode===e&&St(e,s,a.nextSibling,a)}).catch(s=>{console.error("Error resolving promise in insertExpression:",s)}),a}let i=typeof t;if(i==="string"||i==="number"){if(i==="number"&&(t=String(t)),Array.isArray(n)){if(n.length===0){let s=ae(t);return V(e,s,r),s}if(n.length===1&&n[0].nodeType===3)return n[0].data=t,n;n=de(e,n,r)}if(n&&jc(n))return n.data=t,n;let a=ae(t);return n&&n.parentNode===e?e.replaceChild(a,n):Go(e,a)||V(e,a,r),a}if(Lr(t))return Go(e,t)?(li(t),t):Array.isArray(n)?(n.length===0?V(e,t,r):n[0].parentNode===e?(e.replaceChild(t,n[0]),de(e,n.slice(1),r)):V(e,t,r),t):(n?n!==t&&(n.parentNode===e?e.replaceChild(t,n):V(e,t,r)):V(e,t,r),t);if(Array.isArray(t)){let a=[],s=Array.isArray(n)?n:n?[n]:[],c=[];Z(t,a,e,r,!0,o,c);let u=Yc(e,s,a,r);for(let l of c){let f=F(e,l.sig,l.marker);S(()=>{de(e,f()),l.marker.parentNode===e&&e.removeChild(l.marker)})}return u}if(i==="object"&&t!==null&&typeof t=="object"){let a=t;if("type"in a&&"props"in a){let s=a;if(typeof s.type=="function"){let c=s.type(s.props||{});return St(e,c,r,n)}}}return de(e,n,r)}function Z(e,t,r,n,o=!0,i,a){for(let s=0;s<e.length;s++){let c=e[s];if(!(c==null||typeof c=="boolean")){for(;typeof c=="function"&&!bt(c)&&!M(c)&&!ee(c)&&(c=c(),!(c==null||typeof c=="boolean")););if(!(c==null||typeof c=="boolean")){if(typeof c=="function"){let u;for(ee(c)&&!M(c)?(i||(i=new Map),i.has(c)||i.set(c,c()),u=i.get(c)):u=c();typeof u=="function"&&!bt(u)&&!M(u)&&!ee(u);)i||(i=new Map),i.has(u)||i.set(u,u()),u=i.get(u);if(u==null||typeof u=="boolean")continue;if(typeof u=="function"){if(M(u)){if(a){let f=ae("",!0);t.push(f),a.push({marker:f,sig:u});continue}let l=u();for(;typeof l=="function"&&M(l);)l=l();if(l==null||typeof l=="boolean")continue;Array.isArray(l)?Z(l,t,r,n,o,i):Z([l],t,r,n,o,i);continue}continue}Array.isArray(u)?Z(u,t,r,n,o,i,a):Z([u],t,r,n,o,i,a);continue}if(bt(c)){let u=ae("",!0);t.push(u),c.then(l=>{if(u.parentNode){let f=[];if(Z([l],f,u.parentNode,void 0,!1,i),f.length>0){u.parentNode.replaceChild(f[0],u);for(let d=1;d<f.length;d++)u.parentNode?.insertBefore(f[d],f[d-1].nextSibling)}}}).catch(l=>console.error("Error resolving promise in array:",l));continue}if(Array.isArray(c)){Z(c,t,r,n,o,i,a);continue}if(Lr(c)){t.push(c);continue}if(typeof c=="object"&&c!==null&&"type"in c&&"props"in c){let u=c;if(typeof u.type=="function"){let l=u.type(u.props||{});Array.isArray(l)?Z(l,t,r,n,!1,i):Z([l],t,r,n,!1,i);continue}}if(typeof c=="string"||typeof c=="number"){let u=String(c);if(u.trim()===""&&u!==" ")continue;t.push(ae(u));continue}t.push(ae(String(c)))}}}}function Yc(e,t,r,n){for(let f=0;f<r.length;f++){let d=r[f].parentNode;d!==null&&d!==e&&d.nodeType!==11&&(r=r.slice(),r[f]=r[f].cloneNode(!0))}let o=r.length,i=t.length,a=o,s=0,c=0,u=i>0?t[i-1].nextSibling??void 0:n,l=null;for(;s<i||c<a;){if(t[s]===r[c]){s++,c++;continue}for(;i>s&&a>c&&t[i-1]===r[a-1];)i--,a--;if(i===s){let f=a<o?c?r[c-1].nextSibling??void 0:r[a-c]:u;for(;c<a;)V(e,r[c++],f)}else if(a===c)for(;s<i;)(!l||!l.has(t[s]))&&t[s].parentNode===e&&e.removeChild(t[s]),s++;else if(t[s]===r[a-1]&&r[c]===t[i-1]){let f=t[--i].nextSibling;V(e,r[c++],t[s++].nextSibling),V(e,r[--a],f),t[i]=t[s-1]}else{if(!l){l=new Map;let d=c;for(;d<a;)l.set(r[d],d++)}let f=l.get(t[s]);if(f!=null)if(c<f&&f<a){let d=s,g=1;for(;++d<i&&d<a&&!(!l.has(t[d])||l.get(t[d])!==f+g);)g++;if(g>f-c){let h=t[s];for(;c<f;)V(e,r[c++],h)}else t[s].parentNode===e?e.replaceChild(r[c++],t[s++]):(V(e,r[c++],u),s++)}else s++;else t[s].parentNode===e&&e.removeChild(t[s]),s++}}return r}function de(e,t,r){if(t)if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n].parentNode===e&&e.removeChild(t[n]);else t.parentNode===e&&e.removeChild(t);return null}function V(e,t,r){v.active&&t.parentNode===e||(r&&r.parentNode===e?e.insertBefore(t,r):e.appendChild(t))}function ke(e,t,r){r==null?delete e[t]:e[t]=r}function yi(e,t,r){let n=r,o;return Array.isArray(r)&&(n=r[0],o=r[1]),typeof n!="function"?()=>{}:(e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o))}function mi(e,t){if(!t||typeof t!="function")return;let r=t[hi]?.name;if(!r)return;let n=r.indexOf(":");n!==-1&&J(e,r.slice(0,n),r.slice(n+1),t)}function xt(e,t,r){let n=typeof r=="function"?O(()=>r()):r;if(!(!n||typeof n!="object"))for(let o of Object.keys(n))J(e,t,o)}function gi(e,t){let r=(n,o)=>{typeof n=="function"&&(J(e,"use",n.name||"use",o),n(e,o??(()=>{})))};if(typeof t=="function"){r(t);return}if(Array.isArray(t)){if(typeof t[0]=="function"){r(t[0],t[1]);return}for(let n of t)Array.isArray(n)?r(n[0],n[1]):r(n)}}function Pr(e,t,r,n=!1){return mi(e,r),typeof r!="function"?(E(e,t,r,n),()=>{}):C(()=>{B(e,"attribute",t,r);let o=typeof r=="function"?r():r;E(e,t,o,n)})}function $r(e,t,r){return typeof r!="function"?(ke(e,t,r),()=>{}):(mi(e,r),C(()=>{B(e,"property",t,r);let n=typeof r=="function"?r():r;ke(e,t,n)}))}function vi(e,t,r){return typeof r!="function"?(E(e,t,!!r),()=>{}):C(()=>{B(e,"attribute",t,r);let n=r();E(e,t,!!n)})}function kt(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){C(()=>{B(e,"attribute","class",t),kt(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 r=Object.keys(t).filter(n=>{let o=t[n];return typeof o=="function"?o():!!o}).join(" ");e.setAttribute("class",r);return}e.setAttribute("class",String(t))}function _t(e,t,r){if(!(!t||typeof t!="object"))for(let n in t){let o=t[n],i=n.split(/\s+/).filter(Boolean);if(typeof o=="function"&&r)r.push(C(()=>{let a=!!o();for(let s of i)e.classList.toggle(s,a)}));else{let a=!!(typeof o=="function"?o():o);for(let s of i)e.classList.toggle(s,a)}}}function Ot(e,t){let r=t;for(;typeof r=="function";)r=r();if(r==null){e.removeAttribute("style");return}if(typeof r=="string"){e.style.cssText=r;return}if(typeof r=="object")for(let n in r){let o=r[n];o==null?e.style[n]="":e.style[n]=o}}function wi(e){let{element:t,props:r,prevProps:n=Uc,isSVG:o=!1,skipChildren:i=!1}=e;if(!t||!Hc(t))return console.error("[spread] Error: element is not a DOM Element!"),()=>{};if(!r)return console.warn("[spread] Warning: props is undefined!"),()=>{};let a=o||t.namespaceURI===Mr,s=[];for(let c in r){if(i&&c==="children")continue;let u=r[c],l=n[c];if(u===l)continue;if(c==="ref"){qr(u,t);continue}if(c==="use"){gi(t,u);continue}if(c.startsWith("on:")){s.push(yi(t,c.slice(3),u));continue}if(c.startsWith("prop:")){J(t,"prop",c.slice(5),u),s.push($r(t,c.slice(5),u));continue}if(c.startsWith("attr:")){J(t,"attr",c.slice(5),u),s.push(Pr(t,c.slice(5),u,a));continue}if(c.startsWith("bool:")){J(t,"bool",c.slice(5),u),s.push(vi(t,c.slice(5),u));continue}if(c==="class"||c==="className"){typeof u=="function"?s.push(C(()=>{B(t,"attribute","class",u),kt(t,u())})):kt(t,u);continue}if(c==="classList"){xt(t,"class",u),typeof u=="function"?s.push(C(()=>{B(t,"attribute","class",u),_t(t,u())})):_t(t,u,s);continue}if(c==="style"){xt(t,"style",u),typeof u=="function"?s.push(C(()=>{B(t,"attribute","style",u),Ot(t,u())})):Ot(t,u);continue}if(c.startsWith("on")){let d=c.slice(2).toLowerCase();l&&Zo(t,d),u&&Jc(t,d,u);continue}let f=Xo.has(c)||!a&&c in t;typeof u=="function"?s.push(f?$r(t,c,u):Pr(t,c,u,a)):s.push(C(()=>f?ke(t,c,r[c]):E(t,c,r[c],a)))}for(let c in n)if(!(c in r))if(c.startsWith("on")){let u=c.slice(2).toLowerCase();Zo(t,u)}else Xo.has(c)?ke(t,c,null):t.removeAttribute(c);return()=>{s.forEach(c=>c())}}function Zc(e,t,r=!1){for(let n in t){let o=t[n];if(n==="ref"){qr(o,e);continue}if(n!=="children"){if(n==="use"){gi(e,o);continue}if(n.startsWith("on:")){yi(e,n.slice(3),o);continue}if(n.startsWith("prop:")){J(e,"prop",n.slice(5),o),$r(e,n.slice(5),o);continue}if(n.startsWith("attr:")){J(e,"attr",n.slice(5),o),Pr(e,n.slice(5),o,r);continue}if(n.startsWith("bool:")){J(e,"bool",n.slice(5),o),vi(e,n.slice(5),o);continue}if(n.startsWith("on")&&n.length>2){let i=n.slice(2).toLowerCase();if(typeof o=="function")if(Dr.has(i)){e[`$$${i}`]=o;let a=`__fx_${i}`;if(!e[a]){let s=c=>{e[`$$${i}`]?.(c)};e.addEventListener(i,s),e[a]=s}}else e[`$$${i}`]=o,At.has(i)||pe([i]);continue}if(n==="class"||n==="className"){kt(e,o);continue}if(n==="classList"){xt(e,"class",o),typeof o=="function"?C(()=>{B(e,"attribute","class",o),_t(e,o())}):_t(e,o);continue}if(n==="style"){xt(e,"style",o),typeof o=="function"?C(()=>{B(e,"attribute","style",o),Ot(e,o())}):Ot(e,o);continue}if(n==="innerHTML"){if(typeof o=="function"){let i=x(()=>{let a=o();for(;typeof a=="function";)a=a();e.innerHTML=a});S(()=>i())}else e.innerHTML=o;continue}if(n==="value"&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA")){if(typeof o=="function"){let i=x(()=>{let a=o();for(;typeof a=="function"&&a.length===0;)a=a();document.activeElement!==e&&(e.value=a??"")});S(()=>{i()})}else C(()=>{document.activeElement!==e&&(e.value=t[n]??"")});continue}if(n==="checked"&&e.tagName==="INPUT"){if(typeof o=="function"){let i=x(()=>{let a=o();for(;typeof a=="function"&&a.length===0;)a=a();document.activeElement!==e&&(e.checked=a??"")});S(()=>{i()})}else C(()=>{document.activeElement!==e&&(e.checked=t[n]??"")});continue}if(n==="value"&&e.tagName==="SELECT"){if(typeof o=="function"){let i=!0,a=x(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();i?(i=!1,queueMicrotask(()=>{e.value=s??""})):e.value=s??""});S(()=>{a()})}else{let i=!0;C(()=>{let a=t[n];i?(i=!1,queueMicrotask(()=>{e.value=a??""})):e.value=a??""})}continue}if(typeof o=="function"){let i=x(()=>{let a=o();for(;typeof a=="function"&&a.length===0;)a=a();Jo(e,n,a,r)});S(()=>{i()})}else C(()=>Jo(e,n,t[n],r))}}}function qr(e,t){if(!e)return;let r=e[hi]?.name;if(J(t,"ref",r||typeof e=="function"&&e.name||"ref",e),Lr(e)){let n=t,o=e;if(!n)return;typeof n=="function"?n(o):typeof n=="object"&&"current"in n&&(n.current=o);return}typeof e=="function"?e(t):typeof e=="object"&&"current"in e&&(e.current=t)}function Qc(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 bt(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function Vr(e,t,r){if(!t)throw new Error("Container element is required");let n,o,i=[];return q(a=>{$(()=>{v.active||(t.textContent=""),Et(t),Ct(),F(t,e)}),o=a}),()=>{o?.(),n?.(),i.forEach(a=>a()),t.textContent=""}}function U(e,t){if(Qo.fn)return Qo.fn(e,t);t&&Do(t);let r=typeof e=="function"?Fo(()=>e(t)):e,n=r!=null&&(typeof r=="function"||typeof r=="object");if(n)try{r.$name=e?.name}catch{}return n&&!Ho(r)?Ve(r):r}function Wr(){let e=globalThis.__FX_DATA__;if(e)return e;if(Cr!==void 0)return Cr;let t=null;if(typeof document<"u"){let r=document.getElementById(tu)?.textContent;if(r)try{t=JSON.parse(r)}catch{t=null}}return Cr=t}function Pt(){for(;;){for(;v.cursor&&v.cursor.nodeType===3&&v.cursor.data==="";)v.cursor=v.cursor.nextSibling;if(v.cursor!=null||!v.parents.length)return;v.cursor=v.parents.pop().nextSibling}}function Nt(e,t){let r=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 ${r}. 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 nu(e){Pt();let t=v.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(ru.has(e.toLowerCase())?v.cursor=t.nextSibling:(v.parents.push(t),v.cursor=t.firstChild),t):($t&&t&&Nt(`<${e}>`,t),null)}function ou(e){Pt();let t=v.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(v.cursor=t.nextSibling,t):($t&&t&&Nt(`<${e}> (static)`,t),null)}function iu(e){if(e===""){let r=v.cursor;return r&&r.nodeType===3&&r.data!==""?(v.cursor=r.nextSibling,r.data="",r):null}Pt();let t=v.cursor;return t&&t.nodeType===3?(v.cursor=t.nextSibling,t.nodeValue!==e&&(t.nodeValue=e),t):($t&&t&&Nt(`text ${JSON.stringify(e.slice(0,24))}`,t),null)}function su(e){Pt();let t=v.cursor;return t&&t.nodeType===8&&t.data===e?(v.cursor=t.nextSibling,t):($t&&t&&Nt(`marker <!--${e.slice(0,24)}-->`,t),null)}function au(){ei||(ei=!0,Kc({hydrateElement:nu,hydrateText:iu,hydrateMarker:su,hydrateStatic:ou}))}function Mt(e,t,r){au(),v.active=!0,v.cursor=t.firstChild,v.parents=[];let n=Wr(),o=r?.resourceNamespace,i=0;Fn(()=>o?`${o}:r${i++}`:`r${i++}`),Wn(n?a=>a in n?{value:n[a]}:void 0:null);try{return Vr(e,t)}finally{v.active=!1,v.cursor=null,v.parents=[]}}function bi(e,t={}){if(typeof e=="function")return U(e,t);if(typeof e!="string"||e.length===0)return null;let r=Qc(e);if(L())return Ir().createElement(e,r);let n=r?document.createElementNS(Mr,e):document.createElement(e);return Zc(n,t,r),cu(n,t),n}function cu(e,t){if(!t||t.children===void 0)return;let r=fe(()=>t.children),n=o=>{F(e,o,typeof o=="function"?null:void 0)};Array.isArray(r)?r.forEach(n):n(r)}function uu(e){return typeof e=="function"?e:(()=>e)}function It(e){return()=>{let t=e();return typeof t=="function"?t():t}}function fu(e){return e!=null&&e!==!1}function lu(e){return!e||typeof e!="object"?!1:!!(typeof e._$litType$<"u"||typeof e._$litDirective$<"u"||Array.isArray(e.strings)&&Array.isArray(e.values))}function Ai(e){let t=It(()=>e.when),r=m(t,void 0,{name:"Show.when"}),n=m(r,void 0,{name:"Show.cond"}),o=N(),i=null,a=null,s=c=>{c!==a&&(i&&ve(i),i=ge(o),a=c)};return m(()=>{let c=n();return s(c?"when":"fallback"),I(i,()=>{if(c){let u=e.children;return typeof u=="function"&&!lu(u)?typeof r=="function"?O(()=>O(r)?u(r()):e.fallback):u(r):u}return e.fallback});return e.fallback??null},void 0,{name:"Show.result"})}function Si(e){let t=It(()=>e.each),r=()=>e.fallback??null,n=(o,i)=>{let a=e.children,s=Array.isArray(a)?a.map(c=>typeof c=="function"?c(o,i):c):typeof a=="function"?a(o,i):a;return pi(s),s};return e.by?qn(t,e.by,(o,i)=>n(o,i),{fallback:r}):Dn(t,(o,i)=>n(o,i),{fallback:r})}function xi(e){let t=It(()=>e.each);return Vn(t,(r,n)=>{let o=e.children(r,n);return pi(o),o},{fallback:()=>e.fallback??null})}function ki(e){return{[Nr]:!0,when:It(()=>e.when),get children(){return e.children}}}function _i(e){let t=Array.isArray(e.children)?e.children:[e.children],r=N(),n=null,o=-1,i=a=>{a!==o&&(n&&ve(n),n=ge(r),o=a)};return m(()=>{for(let a=0;a<t.length;a+=1){let c=t[a],u=0;for(;typeof c=="function"&&!c[Nr]&&u++<10;)c=c();if(!c||typeof c!="object"||c[Nr]!==!0)continue;let l=c.when();if(fu(l))return i(a),I(n,()=>typeof c.children=="function"?c.children(l):c.children)}return i(-2),I(n,()=>e.fallback??null)},void 0,{name:"Switch"})}function Oi(e){let t=uu(e.component),{component:r,...n}=e,o=N(),i=null,a;return m(()=>{let s=t();return s!==a&&(i&&ve(i),i=ge(o),a=s),s==null?null:typeof s=="string"?{tag:s,props:n}:I(i,()=>s(n))},void 0,{name:"Dynamic"})}function Ti(e){let t=()=>e.mount?typeof e.mount=="function"?e.mount():e.mount:document.body,r,n;return q(o=>{r=o,n=document.createElement("div"),n.style.display="contents",t().appendChild(n),F(n,e.children)&&qr(e.ref,n)}),S(()=>{r(),n.remove()}),null}function Fr(e){if(L())return e.fallback??null;let t=v.active,[r,n]=w(!t);return t&&queueMicrotask(()=>n(!0)),m(()=>r()?e.children:e.fallback??null,void 0,{name:"client-only"})}function Ci(e){let[t,r]=w(null),n=()=>r(null);return m(()=>{let o=t();if(o!==null)return typeof e.fallback=="function"?e.fallback(o,n):e.fallback;try{return typeof e.children=="function"?e.children():e.children}catch(i){return r(i),typeof e.fallback=="function"?e.fallback(i,n):e.fallback}},void 0,{name:"ErrorBoundary"})}function Ri(e){return m(()=>{let t=typeof e=="function"?e():e,r=[];for(let[n,o]of Object.entries(t)){if(!n)continue;(typeof o=="function"?o():o)&&r.push(n)}return r.join(" ")},void 0,{name:"ClassMap"})}function du(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Pi(e){return m(()=>{let t=typeof e=="function"?e():e,r=[];for(let[n,o]of Object.entries(t)){if(!n)continue;let i=typeof o=="function"?o():o;i!=null&&r.push(`${du(n)}: ${i}`)}return r.join("; ")},void 0,{name:"StyleMap"})}var Mr,Xo,Hf,$c,W,Rt,Wc,Fc,Rr,v,ui,Uc,hi,zc,At,Dr,Q,Xc,eu,Qo,tu,Cr,ru,$t,ei,Nr,Ei,pu,P=H(()=>{"use strict";A();So();A();A();Bo();A();A();A();A();A();A();A();A();A();A();A();A();Mr="http://www.w3.org/2000/svg";Xo=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]);Hf=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;$c="1.0.0-alpha.84",W={dom:$c,reactive:Ao};Rt=Symbol.for("fluixi.server-node"),Wc=Symbol.for("fluixi.dom.server-host"),Fc=globalThis,Rr=Fc[Wc]??={server:typeof document>"u",nodes:null};v={active:!1,cursor:null,parents:[]},ui=null;Uc={},hi="__fx_at",zc="__fx_loc";At=new Set,Dr=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);Q=0,Xc=200;eu="__fx_dom_create_component__",Qo=globalThis[eu]??={fn:null};tu="__FX_DATA__";ru=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),$t=typeof process<"u"&&process.env&&!1;ei=!1;Nr=Symbol("match");Ei=Fr;pu=Rt});function Li(e){if(e!=null&&(typeof e=="object"||typeof e=="function"))try{e.$lazy=!0}catch{}return e}function Te(e,t){let r,n,o;function i(){return n||(n=e().then(s=>r=s.default)),n}t?.preload&&i();let a=(s=>{if(r){let c=r;return Li(O(()=>c(s)))}if(!o){let[c]=ne(()=>i(),{transport:!1});if(o=c,c.error)throw c.error}return m(()=>{let c=o();return c?Li(U(c,s)):void 0})});return a.preload=()=>i().then(()=>{}),a.$lazy=!0,a.loader=e,a}var jt=H(()=>{"use strict";P();A()});function vu(){Fi||(Fi=!0,!(typeof process<"u")&&console.warn("[fluixi] createProvider({ context, value, children }) reads `children` eagerly: the object literal materialises `children` BEFORE the context is stamped, so a routed <Outlet/> that has siblings inside the provider renders detached and its descendants see no context under SSR. Use the lazy form instead:\n createProvider(Context, value, props) // children stays a getter\n // or JSX: <Context.Provider value={...}>{props.children}</Context.Provider>"))}function Kt(e,t,r){let n=!!e?.Provider,o=n?e:e.context,i=n?t:e.value,a=n?!1:e.debug??!1;n||vu();let s=typeof i=="function"?i():i,c=n?r:e;return o.Provider({value:s,get children(){return c?.children},debug:a})}function Hi(e){let t=Ce(e);return[t,n=>Kt(t,n.value,n)]}function Br(e,t){if(e.length===0)return fe(()=>t);let[r,n]=e[0],o=e.slice(1);return Kt(r,n,{get children(){return Br(o,t)}})}function ji(e){return t=>{let r=Re(e);return t.children(r)}}function Ki(e,t){let r=Re(e);return r===e.defaultValue?t():r}function Ce(e,t){let r=X(e,t),n=o=>(o.debug,r.Provider({value:o.value,get children(){return o.children},debug:o.debug}));return typeof Symbol<"u"&&Symbol.for&&(n.$$typeof=Symbol.for("react.provider")),n.$$typeof=Symbol.for("react.provider"),{id:r.id,Provider:si(n),defaultValue:e}}function Re(e){let t=K(e);return t!==void 0?t:e.defaultValue}var Fi,Jr=H(()=>{"use strict";P();A();A();Fi=!1});function Zi(){return Yi}function Yr(e){Yi=e}function Qi(e,t){Ut.set(e,t)}function es(e){return Ut.get(e)}function _u(){Ut.clear()}function ts(){if(typeof window>"u")return!1;let e=document.getElementById("__FLUIXI_HYDRATION__");if(!e||e.getAttribute("type")!=="application/json")return!1;try{let t=e.textContent||"{}",r=JSON.parse(t);for(let[n,o]of Object.entries(r))Ut.set(n,o);return!0}catch(t){return console.error("Failed to deserialize hydration data:",t),!1}}function Zr(){if(typeof window>"u")return;let e=document.getElementById("__FLUIXI_HYDRATION__");e&&e.remove();let t=document.createTreeWalker(document.body,NodeFilter.SHOW_COMMENT,null),r=[],n;for(;n=t.nextNode();){let o=n,i=o.nodeValue||"";(i.startsWith("#")||i.startsWith("/"))&&r.push(o)}r.forEach(o=>o.remove()),_u()}function rs(){return L()}var Yi,Ut,Qr=H(()=>{"use strict";P();Yi=!1,Ut=new Map;typeof window<"u"&&window.addEventListener("load",()=>{setTimeout(Zr,100)})});function Bt(e,t,r={}){let{preserveStructure:n,multiple:o,throwOnError:i=!1,defaultValue:a,maxDepth:s=20}=r;if(!e||typeof e!="object")return a;if(!t)return e;if(Array.isArray(t))if(n){let l={};for(let f of t){let d=Bt(e,f,{...r,preserveStructure:!1});d!==void 0&&Ju(l,f,d)}return l}else return t.map(l=>Bt(e,l,{...r,preserveStructure:!1}));let c=rn(t,{...r,throwOnError:i});if(c.length===0)return e;if(typeof n>"u"||n===!1){let l=Xu(e,t);return o===!1&&Array.isArray(l)?l[0]:l===void 0&&a!==void 0?a:l}let u=z(e,c,0,s);return u===void 0&&a!==void 0?a:u}function Xu(e,t,r={}){let{createMissing:n=!1,add:o=!1,debug:i=!1}=r,a=rn(t),s=e,c=!1,u="",l=t;if(typeof s=="object"&&!Array.isArray(s)&&l.length>0&&s[l])return s=s[l],s;for(let f=0;f<a.length;f++){let d=a[f],g=a.length>1?f===a.length-1:!1;if(s===null&&!n)return;let h=a[f+1];switch(d.type){case"property":if(s&&typeof s=="object")if(Array.isArray(s)){if(typeof d.value=="number"){let p=d.value;if(n&&p>=s.length)for(let b=s.length;b<=p;b++)s.push(void 0);if(n&&(s[p]===null||s[p]===void 0)&&(!g||c)&&(h?s[p]=h.type==="index"||h.type==="slice"||h.type==="union"||h.type==="wildcard"?[]:{}:s[p]=null,c=!1),s=s[p],h){c=!0;continue}}else o?s.push({[String(d.value)]:null}):s=s.map(p=>p[String(d.value)]);if(h)continue;return us(s)}else{if(s[u]&&u.split(".").length>=2){s=s[u];continue}if(n&&(s[String(d.value)]===null||s[String(d.value)]===void 0)&&(!g||c)&&(h?s[String(d.value)]=h.type==="index"||h.type==="slice"||h.type==="union"||h.type==="wildcard"?[]:{}:s[String(d.value)]=null,c=!1,s=s[String(d.value)],h)){c=!0;continue}if(s?(!s[String(d.value)]&&n&&(s[String(d.value)]=null),s=s[String(d.value)]):s={[String(d.value)]:null},h)continue}else if(n)s={},s[String(d.value)]=h.type==="index"||h.type==="slice"||h.type==="union"||h.type==="wildcard"||r.type==="array"?[]:{},s=s[String(d.value)];else return;break;case"index":case"wildcard":if(Array.isArray(s)){if(d.type==="index"){let p=d.value;if(p<0){s=s[s.length-Math.abs(p)];continue}if(n&&(p>=s.length||s[p]==null||s[p]==null)&&!g){for(let b=s.length;b<=p;b++)s.push(void 0);h&&(s[p]=h.type==="index"||h.type==="slice"||h.type==="union"||h.type==="wildcard"?[]:{})}s=s[p]}else if(!g)continue}else if(n){let p=a[f+1];s=[];let b=d.value;for(let T=0;T<=b;T++)s.push(void 0);s[b]=p.type==="index"||p.type==="slice"||p.type==="union"||p.type==="wildcard"||r.type==="array"?[]:{},s=s[b]}else{if(d.type==="index"&&typeof s=="object"&&s&&s[String(d.value)]!==void 0){s=s[String(d.value)];continue}if(typeof s=="object"){s=Object.values(s);continue}return}break;default:return}}return us(s)}function us(e){return Array.isArray(e)?e.filter(t=>typeof t<"u"):e}var Jt,z,rn,Bu,Ju,nn=H(()=>{"use strict";Jt=e=>e==null||Array.isArray(e)||typeof e=="function"||e instanceof Date||e instanceof RegExp||e instanceof Map||e instanceof Set||e instanceof Error?!1:typeof e=="object",z=(e,t,r,n)=>{if(r>n)return;if(t.length===0)return e;let o=t[0],i=t.slice(1);if(o.type==="descendant"){let a=z(e,i,r+1,n);if(a!==void 0)return a;if(e&&typeof e=="object")if(Array.isArray(e)){let s=[];for(let c=0;c<e.length;c++){let u=z(e[c],t,r+1,n);u!==void 0&&(s[c]=u)}return s.length>0?s:void 0}else{let s={};for(let c in e)if(e.hasOwnProperty(c)){let u=z(e[c],t,r+1,n);u!==void 0&&(s[c]=u)}return Object.keys(s).length>0?s:void 0}return}switch(o.type){case"property":if(Jt(e)&&o.value&&String(o.value)in e){let a=e[String(o.value)],s=z(a,i,r+1,n);if(s!==void 0)return{[String(o.value)]:s}}break;case"index":if(Array.isArray(e)){let a=o.value;if(a>=0&&a<e.length){let s=z(e[a],i,r+1,n);if(s!==void 0){let c=new Array(e.length).filter(u=>u!==void 0);return c[a]=s,c}}}else if(e&&typeof e=="object"){let a=String(o.value);if(a in e){let s=z(e[a],i,r+1,n);if(s!==void 0)return{[a]:s}}}break;case"wildcard":if(e&&typeof e=="object")if(Array.isArray(e)){let a=[],s=!1;for(let c=0;c<e.length;c++){let u=z(e[c],i,r+1,n);u!==void 0&&(a[c]=u,s=!0)}return s?a:void 0}else{let a={},s=!1;for(let c in e)if(e.hasOwnProperty(c)){let u=z(e[c],i,r+1,n);u!==void 0&&(a[c]=u,s=!0)}return s?a:void 0}break;case"slice":if(Array.isArray(e)){let[a,s]=o.value,c=Math.max(0,a),u=Math.min(e.length,s===1/0?e.length:s),l=[],f=!1;for(let d=c;d<u;d++){let g=z(e[d],i,r+1,n);g!==void 0&&(l[d]=g,f=!0)}return f?l:void 0}break;case"union":if(Array.isArray(e)){let a=o.value,s=[],c=!1;for(let u of a)if(u>=0&&u<e.length){let l=z(e[u],i,r+1,n);l!==void 0&&(s[u]=l,c=!0)}return c?s:void 0}break;case"filter":if(Array.isArray(e)){let a=o.value,s=[],c=!1;for(let u=0;u<e.length;u++)if(a(e[u])){let l=z(e[u],i,r+1,n);l!==void 0&&(s[u]=l,c=!0)}return c?s:void 0}break}},rn=(e,t={})=>{let{type:r="auto",throwOnError:n=!1}=t;if(!e||typeof e!="string")return[];let o=[],i="",a=!1,s=!1,c="",u="",l=0,d=r==="auto"?(h=>h.includes("..")?"descendant":h.includes("[?(")?"filter":h.includes("[:")||h.includes("[0:")?"slice":h.includes("[,")||h.includes("[0,1]")?"union":h.includes("[*]")||h.includes(".*.")?"wildcard":h.includes("[]")?"array-wildcard":h.includes("[")&&h.includes("]")?"bracket":"dot")(e):r,g=h=>{let p=h.trim();if(p==="*"||p==="")return{type:"wildcard",value:p===""?"[]":"*",raw:p===""?"[]":h};if(p==="[]")return{type:"wildcard",value:"[]",raw:h};if(/^-?\d+$/.test(p))return{type:"index",value:parseInt(p,10),raw:h};if(p.includes(":")){let b=p.split(":").map(ce=>ce.trim()),T=b[0]===""?0:parseInt(b[0],10),_=b[1]===""?1/0:parseInt(b[1],10);if(isNaN(T)||isNaN(_)){if(n)throw new Error(`Invalid slice notation: ${h}`);return{type:"wildcard",value:"*",raw:h}}return{type:"slice",value:[T,_],raw:h}}if(p.includes(",")){let b=p.split(",").map(T=>{let _=parseInt(T.trim(),10);return isNaN(_)?-1:_}).filter(T=>T>=0);if(b.length===0){if(n)throw new Error(`Invalid union notation: ${h}`);return{type:"wildcard",value:"*",raw:h}}return{type:"union",value:b,raw:h}}if(p.startsWith("?(")&&p.endsWith(")")){let b=p.slice(2,-1);try{return{type:"filter",value:Bu(b),raw:h}}catch(T){if(n)throw T;return{type:"wildcard",value:"*",raw:h}}}return p.startsWith('"')&&p.endsWith('"')||p.startsWith("'")&&p.endsWith("'")?{type:"property",value:p.slice(1,-1),raw:h}:{type:"property",value:p,raw:h}};for(let h=0;h<e.length;h++){let p=e[h],b=e[h+1];if((p==='"'||p==="'")&&!s){s=!0,c=p;continue}else if(p===c&&s){s=!1,c="",p==='"'||p==="'"||(a?u+=p:i+=p);continue}if(s){a?u+=p:i+=p;continue}if(p==="["&&!a){i&&(o.push({type:"property",value:i,raw:i}),i=""),a=!0,u="";continue}if(p==="]"&&a&&!s){a=!1;let _=g(u);o.push(_);continue}let T=o.length>0?o[o.length-1]:null;if(p==="."&&!a&&!s){if(b==="."){let _=e.split("..")[0];o.push({type:"property",value:_,raw:_}),o.push({type:"descendant",value:"..",raw:".."}),h++}else i&&(i==="*"?o.push({type:"wildcard",value:i,raw:i}):o.push({type:"property",value:i,raw:i}),i="");continue}if(a)u+=p;else if(T&&T.type!=="descendant")i+=p;else{let _=e.split(T?.raw)[1];_!==void 0?i=_:i+=p}}return i&&o.push({type:"property",value:i,raw:i}),o.map(h=>{if(h.type==="property"&&typeof h.value=="string"&&/^-?\d+$/.test(h.value)){let p=parseInt(h.value,10);if(!isNaN(p))return{...h,type:"index",value:p}}return h})},Bu=e=>{let t=e.replace(/@\.([a-zA-Z_$][\w$]*)/g,(r,n)=>`item.${n}`).replace(/@/g,"item");try{return new Function("item",`return ${t}`)}catch{throw new Error(`Invalid filter expression: ${e}`)}},Ju=(e,t,r)=>{let n=rn(t),o=e;for(let i=0;i<n.length;i++){let a=n[i],s=i===n.length-1;switch(a.type){case"property":if(s)o[String(a.value)]=r;else{if(!o[String(a.value)]){let u=n[i+1];o[String(a.value)]=u.type==="index"||u.type==="slice"||u.type==="union"||u.type==="wildcard"?[]:{}}o=o[String(a.value)]}break;case"index":Array.isArray(o)||(o=[]);let c=a.value;if(s){if(c>=o.length)for(let u=o.length;u<=c;u++)o.push(void 0);o[c]=r}else{if(!o[c]){let u=n[i+1];o[c]=u.type==="index"||u.type==="slice"||u.type==="union"||u.type==="wildcard"?[]:{}}o=o[c]}break;case"wildcard":if(Array.isArray(o))if(s)for(let u=0;u<o.length;u++)o[u]=r;else{let u=n[i+1];for(let l=0;l<o.length;l++)o[l]||(o[l]=u.type==="index"||u.type==="slice"||u.type==="union"||u.type==="wildcard"?[]:{});o.length>0&&(o=o[0])}break}}}});function Gu(e,t,r){let n=new Uint8Array(t.length);e:for(let o=0;o<e.length;o++){for(let i=0;i<t.length;i++)if(!n[i]&&ye(e[o],t[i],r)){n[i]=1;continue e}return!1}return!0}var ye,fs=H(()=>{"use strict";nn();ye=(e,t,r={})=>{if(e===t)return!0;if(e==null||t==null||typeof e!=typeof t)return!1;let n=Array.isArray(e),o=Array.isArray(t);if(n!==o)return!1;if(n&&o)return e.length!==t.length?!1:r.unordered?Gu(e,t,r):e.every((p,b)=>ye(p,t[b],r));if(typeof e!="object")return e===t;let i=e instanceof Date,a=t instanceof Date;if(i!==a)return!1;if(i)return e.getTime()===t.getTime();let s=e instanceof RegExp,c=t instanceof RegExp;if(s!==c)return!1;if(s)return e.toString()===t.toString();let u=e instanceof Map,l=t instanceof Map;if(u!==l)return!1;if(u){if(e.size!==t.size)return!1;for(let[p,b]of e)if(!t.has(p)||!ye(b,t.get(p),r))return!1;return!0}let f=e instanceof Set,d=t instanceof Set;if(f!==d)return!1;if(f){if(e.size!==t.size)return!1;let p=[...t],b=new Uint8Array(p.length);e:for(let T of e){for(let _=0;_<p.length;_++)if(!b[_]&&ye(T,p[_],r)){b[_]=1;continue e}return!1}return!0}if(!Jt(e)||!Jt(t))return!1;let g=Object.keys(e),h=Object.keys(t);if(g.length!==h.length)return!1;for(let p of g)if(!Object.prototype.hasOwnProperty.call(t,p)||!ye(e[p],t[p],r))return!1;return!0}});function Yu(e){return e.startsWith("//")?e.replace(/^\/+/,"/"):e}function Ke(e,t,r=!1){let n=[];if(e===t)return{params:{},path:t};if(!r&&e==="/"&&t.startsWith("/"))return{params:{},path:"/"};let o=e.replace(/:([a-zA-Z0-9_]+)/g,(c,u)=>(n.push(u),"([^/]+)")).replace(/\*([a-zA-Z0-9_]*)/g,(c,u)=>(u&&n.push(u),"(.*)"));o.startsWith("/")||(o="/"+o),o===""&&(o="/");let i=new RegExp(`^${o}${r?"$":"(?=/|$)"}`),a=t.match(i);if(!a)return null;let s={};return n.forEach((c,u)=>{s[c]=a[u+1]}),{params:s,path:a[0]}}function ls(e){let t=e.path.split("/").filter(Boolean);if(t.length===0)return 5;let r=0;for(let n of t)n.startsWith("*")?r+=1:n.startsWith(":")?r+=10:r+=100;return r}function Zu(e){return[...e].sort((t,r)=>ls(r)-ls(t))}function Ue(e,t){let r=t.length>1?t.replace(/\/+$/,"")||"/":t,n=ds(e,r);if(!n)return null;let o=[],i="",a={};for(let s of n.layers){i=Yu(Qu(i,s.consumed));let c={};for(let[u,l]of Object.entries(s.params))u in a||(c[u]=l),a[u]=l;o.push({route:s.route,component:s.route.component,params:c,pathname:i||"/"})}return{matched:o,params:a,pathname:t}}function ds(e,t){if(!e||e.length===0)return null;let r=Zu(e);for(let n of r){let o=!!n.children&&n.children.length>0,i=Ke(n.path,t,!o);if(i){if(o){let a=ds(n.children,t);if(a)return{layers:[{route:n,params:i.params,consumed:i.path},...a.layers]};continue}return{layers:[{route:n,params:i.params,consumed:i.path}]}}}return null}function Qu(e,t){if(!e)return t;if(t===e)return e;if(t.startsWith(e))return t;let r=e.replace(/\/$/,""),n=t.replace(/^\//,"");return`${r}/${n}`}function ef(e){let t=e,r="",n=t.indexOf("#");n!==-1&&(r=t.slice(n),t=t.slice(0,n));let o="",i=t.indexOf("?");return i!==-1&&(o=t.slice(i),t=t.slice(0,i)),{pathname:t||"/",search:o,hash:r}}function Xt(e="/"){let t=[{path:e,state:null}],r=0,n=new Set,o=()=>n.forEach(i=>i());return{get(){let{path:i,state:a}=t[r];return{...ef(i),state:a}},push(i,a=null){t=t.slice(0,r+1),t.push({path:i,state:a}),r=t.length-1,o()},replace(i,a=null){t[r]={path:i,state:a},o()},subscribe(i){return n.add(i),()=>n.delete(i)}}}function $e(){let e=typeof window<"u"?window:void 0,t=new Set,r=()=>t.forEach(n=>n());return e&&e.addEventListener("popstate",r),{get(){if(!e)return{pathname:"/",search:"",hash:"",state:null};let{pathname:n,search:o,hash:i}=e.location;return{pathname:n,search:o,hash:i,state:e.history.state??null}},push(n,o=null){e?.history.pushState(o,"",n),r()},replace(n,o=null){e?.history.replaceState(o,"",n),r()},subscribe(n){return t.add(n),()=>t.delete(n)}}}function tf(e){let t={};return e&&new URLSearchParams(e.startsWith("?")?e.slice(1):e).forEach((n,o)=>t[o]=n),t}function rf(e,t){if(!t)return e||"/";let r=t.replace(/\/$/,"");return e===r?"/":e.startsWith(r+"/")?e.slice(r.length)||"/":e||"/"}function nf(e,t){return!t||/^https?:\/\//.test(e)?e:`${t.replace(/\/$/,"")}${e.startsWith("/")?e:"/"+e}`}function ps(e){let{routes:t,history:r,base:n}=e,o=new Set,i=()=>{let l=r.get();return{pathname:l.pathname,search:l.search,hash:l.hash,state:l.state,query:tf(l.search)}},a=l=>Ue(t,rf(l,n)),s=(()=>{let l=i();return{location:l,match:a(l.pathname)}})(),c=()=>{let l=i();s={location:l,match:a(l.pathname)},o.forEach(f=>f(s))},u=r.subscribe(c);return{state(){return s},subscribe(l){return o.add(l),()=>o.delete(l)},navigate(l,f={}){let d=nf(l,n);f.replace?r.replace(d,f.state??null):r.push(d,f.state??null)},match(l){return a(l)},destroy(){u(),o.clear()}}}var on=H(()=>{"use strict";});function hs(e,t){return async(...r)=>{let n=t+":"+JSON.stringify(r);if(Zi()||typeof window<"u"){let i=es(n);if(i!==void 0)return i}if(Be.has(n))return Be.get(n);if(ze.has(n))return ze.get(n);let o=Promise.resolve(e(...r)).then(i=>(Be.set(n,i),ze.delete(n),rs()&&Qi(n,i),i),i=>{throw ze.delete(n),i});return ze.set(n,o),o}}function ys(e){let t=typeof e=="string"?r=>r.startsWith(e):e;for(let r of Be.keys())t(r)&&(Be.delete(r),sf.add(r));of(r=>r+1)}function ms(e,t){let[r]=ne(t||(()=>!0),e);return r}function gs(e){return sn.has(e)||sn.set(e,w(void 0)),sn.get(e)}function an(e,t){let r=t||e.name||"action",n=async o=>{let[,i]=gs(r),a=()=>i(void 0),s=()=>n(o);i({input:o,pending:!0,clear:a,retry:s});try{let c=await e(o);return i({input:o,result:c,pending:!1,clear:a,retry:s}),c}catch(c){throw i({input:o,error:c,pending:!1,clear:a,retry:s}),c}};return n.url=r,n.with=o=>an((...i)=>e(o,...i),t),n}function vs(e){let[t]=gs(e.url);return t}function ws(e){return e}var Be,ze,Jd,of,sf,sn,af,Xd,bs=H(()=>{"use strict";A();Qr();Jr();Be=new Map,ze=new Map;[Jd,of]=w(0),sf=new Set;sn=new Map;af=Ce(void 0,"route-data"),Xd=af.Provider});var _s={};vn(_s,{A:()=>hn,Form:()=>vf,Link:()=>Yt,Outlet:()=>un,Redirect:()=>fn,Router:()=>cn,action:()=>an,cache:()=>hs,createAsync:()=>ms,createBrowserHistory:()=>$e,createMemoryHistory:()=>Xt,lazy:()=>Te,matchPath:()=>Ke,matchRoutes:()=>Ue,preloadRoutes:()=>wf,revalidate:()=>ys,runWithOwner:()=>I,select:()=>hf,useAction:()=>ws,useLevelParams:()=>df,useLinkNavigation:()=>yf,useLocation:()=>Ge,useMatch:()=>dn,useNavigate:()=>Gt,useParam:()=>ln,useParamSelector:()=>pf,useParams:()=>Xe,useRouteData:()=>mf,useRouter:()=>Ne,useSearchParams:()=>pn,useSubmission:()=>vs});function cf(e,t,r){let n,o=e.route.data;if(typeof o=="function"){let l=!1;S(()=>{l=!0});let f=N(),[d]=ne(()=>o({params:r.params,location:r.location},f,()=>l));n=d}let i=()=>xs.Provider({value:n,get children(){return Ss.Provider({value:e.params,get children(){return As.Provider({value:{depth:t,...r},get children(){return U(e.component,{})}})}})}});if(!n)return i();let a=n,s=()=>a.loading,[c,u]=w(O(()=>!s()));return x(()=>u(!s())),m(()=>c()?i():null)}function ks(e){let t=e.depth+1,[r,n]=w(O(()=>e.matched()[t]?.component));return x(()=>{let o=e.matched()[t]?.component;n(()=>o)}),m(()=>{if(!r())return e.notFound?e.notFound():null;let i=O(()=>e.matched())[t];return cf(i,t,{matched:e.matched,params:e.params,location:e.location})})}function uf(e){return e==null?ff():typeof e=="function"?U(e,{}):e}function ff(){let e=_e("div");E(e,"class","fx-not-found"),E(e,"role","main"),E(e,"style","min-height:60vh;display:grid;place-content:center;gap:.25rem;text-align:center;font-family:system-ui,-apple-system,sans-serif");let t=_e("h1");E(t,"style","margin:0;font-size:2.5rem;font-weight:700"),F(t,"404");let r=_e("p");return E(r,"style","margin:0;opacity:.7"),F(r,"This page could not be found."),e.appendChild(t),e.appendChild(r),e}function cn(e){let t=e.history??$e(),r=ps({routes:e.routes,base:e.base,history:t}),[n,o]=w(r.state()),i=r.subscribe(o);S(()=>{i(),r.destroy()});let a=m(()=>(n().match?.matched??[]).filter(l=>l.component)),s={router:r,location:m(()=>n().location),params:m(()=>n().match?.params??{})},c={depth:-1,matched:a,params:s.params,location:s.location,notFound:()=>uf(e.notFound)},u;return Je.Provider({value:s,get children(){return u??=ks(c)}})}function un(){let e=K(As);return e?ks(e):null}function fn(e){let t=K(Je);if(t&&typeof window<"u"){let r=!1;S(()=>r=!0),queueMicrotask(()=>{r||t.router.navigate(e.to,{replace:e.replace!==!1})})}return null}function Ne(){let e=K(Je);if(e)return e;if(typeof window>"u")return lf;throw new Error("[router] useRouter must be used within <Router>")}function Xe(){let e=Ne().params;return m(()=>e(),{},{equals:(t,r)=>JSON.stringify(t)===JSON.stringify(r)})}function df(){return K(Ss)??{}}function ln(e){let t=Xe();return m(()=>t()[e])}function pf(e,t){let r=Xe();return m(()=>e(r()),void 0,t?{equals:t}:void 0)}function dn(e){let t=Ge();return m(()=>Ke(typeof e=="function"?e():e,t.pathname))}function pn(){let e=Ge(),t=Gt();return[m(()=>e.query),(o,i)=>{let a=new URLSearchParams(e.search);for(let[c,u]of Object.entries(o))u===null?a.delete(c):a.set(c,u);let s=a.toString();t(e.pathname+(s?`?${s}`:""),i)}]}function hf(e,t){let r=(n,o)=>ye(n,o);return t!==void 0?m(()=>Bt(e(),t),void 0,{equals:r}):m(e,void 0,{equals:r})}function Ge(){let{location:e}=Ne();return new Proxy({},{get:(t,r)=>e()[r],has:(t,r)=>r in e(),ownKeys:()=>Reflect.ownKeys(e()),getOwnPropertyDescriptor:(t,r)=>Object.getOwnPropertyDescriptor(e(),r)})}function yf(e={}){let t=K(Je);return r=>{if(!t||r.defaultPrevented||r.button!==0||r.metaKey||r.ctrlKey||r.shiftKey||r.altKey)return;let o=r.target?.closest?.("a");if(!o||!o.getAttribute("href")||o.target&&o.target!=="_self"||o.hasAttribute("download")||/(^|\s)external(\s|$)/.test(o.getAttribute("rel")??""))return;let i=new URL(o.href);i.protocol!=="http:"&&i.protocol!=="https:"||i.origin===window.location.origin&&(i.hash&&i.pathname===window.location.pathname&&i.search===window.location.search||e.shouldNavigate&&!e.shouldNavigate(i,o)||(r.preventDefault(),t.router.navigate(i.pathname+i.search+i.hash,{replace:e.replace})))}}function Gt(){let{router:e}=Ne();return(t,r)=>e.navigate(t,r)}function mf(){return K(xs)??(()=>{})}function Yt(e){let t=K(Je),r=()=>t?.router.navigate(te(e.href)??"",{replace:te(e.replace)}),n=_e("a");E(n,"href",te(e.href)??""),e.slot&&E(n,"slot",te(e.slot));for(let i of Object.keys(e)){if(gf.has(i))continue;let a=e[i];a!=null&&typeof a!="function"&&E(n,i,String(a))}if(typeof n.addEventListener=="function")n.addEventListener("click",i=>{i.metaKey||i.ctrlKey||i.shiftKey||i.altKey||(i.preventDefault(),r())});else{let i=te(e.className??e.class)??"";i&&E(n,"class",i)}typeof n.addEventListener=="function"&&x(()=>{let i=te(e.href)??"";n.setAttribute("href",i);let a=te(e.className??e.class)??"",s=te(e.activeClass)??"",c=te(e.active)??t?.location().pathname===i;n.className=[a,c?s:""].filter(Boolean).join(" ")});let o=e.children;return o!=null&&F(n,o),n}function vf(e){let t=e.action,r=e.className??e.class,n=t.url??"",o=_e("form");E(o,"method","post"),n&&E(o,"action",n),r&&E(o,"class",r);for(let a of Object.keys(e)){if(a==="action"||a==="children"||a==="class"||a==="className")continue;let s=e[a];s!=null&&typeof s!="function"&&E(o,a,String(s))}typeof o.addEventListener=="function"&&o.addEventListener("submit",a=>{a.preventDefault();let s={};new FormData(o).forEach((c,u)=>{s[u]=c}),Promise.resolve(t(s)).catch(()=>{})});let i=e.children;return i!=null&&F(o,i),o}async function wf(e,t){let r=Ue(e,t);if(!r)return;let n=[];for(let o of r.matched){let i=o.component;i&&typeof i.preload=="function"&&n.push(i.preload())}await Promise.all(n)}var Je,As,Ss,xs,lf,te,gf,hn,yn=H(()=>{"use strict";A();P();A();nn();fs();on();on();bs();jt();A();Je=X(void 0,"router"),As=X(void 0,"outlet"),Ss=X(void 0,"route-params"),xs=X(void 0,"route-data");lf={router:{navigate:()=>{}},location:()=>({pathname:"",search:"",hash:"",query:{}}),params:()=>({})};te=e=>typeof e=="function"?e():e,gf=new Set(["href","slot","class","className","active","activeClass","replace","children"]);hn=Yt});var Af={};vn(Af,{$component:()=>Kr,A:()=>hn,ClientOnly:()=>Fr,DEV:()=>We,Dynamic:()=>Oi,ErrorBoundary:()=>Ci,FRAMEWORK_NAME:()=>Gi,For:()=>Si,Fragment:()=>Xr,Index:()=>xi,Link:()=>Yt,Match:()=>ki,NoSsr:()=>Ei,Outlet:()=>un,Portal:()=>Ti,Redirect:()=>fn,Router:()=>cn,Show:()=>Ai,Store:()=>lt,Suspense:()=>He,Switch:()=>_i,VERSION:()=>Xi,addClass:()=>ti,batch:()=>$,classMap:()=>Ri,cleanupDelegation:()=>Wi,composeProviders:()=>Br,createBrowserHistory:()=>$e,createComponent:()=>Oe,createComputed:()=>Ln,createConsumer:()=>ji,createContext:()=>Ce,createContextWithProvider:()=>Hi,createDebounce:()=>Kn,createDeferred:()=>jn,createEffect:()=>x,createIsomorphicState:()=>Ui,createMemo:()=>m,createMemoryHistory:()=>Xt,createProvider:()=>Kt,createRenderEffect:()=>C,createResource:()=>ne,createRoot:()=>q,createSelector:()=>Hn,createSignal:()=>w,createStore:()=>br,delegateEvents:()=>pe,devOnly:()=>zr,getFrameworkInfo:()=>ku,getOwner:()=>N,getSharedConfig:()=>jr,hydrate:()=>Mt,initDelegation:()=>Vi,insert:()=>F,isDOMNode:()=>Tt,isDev:()=>Ur,isLitTemplateResult:()=>oi,isRenderable:()=>qi,jsx:()=>Gr,jsxs:()=>Ji,lazy:()=>Te,mount:()=>Ts,onCleanup:()=>S,onMount:()=>Lt,onUnmount:()=>Dt,portal:()=>Di,read:()=>to,reduce:()=>eo,removeClass:()=>ri,render:()=>Ee,runWithOwner:()=>I,setAttribute:()=>E,setOwner:()=>Mn,setProperty:()=>ke,spread:()=>wi,startClient:()=>Es,styleMap:()=>Pi,toggleClass:()=>ni,untrack:()=>O,untrackStore:()=>Ar,useCallback:()=>Ht,useContext:()=>Re,useEffect:()=>Fe,useEventListener:()=>Ft,useLocation:()=>Ge,useMatch:()=>dn,useMemo:()=>qt,useNavigate:()=>Gt,useParam:()=>ln,useParams:()=>Xe,useProvide:()=>Ki,useReducer:()=>Wt,useRef:()=>Vt,useRouter:()=>Ne,useSearchParams:()=>pn});A();A();var lr="1.0.0-alpha.84",Zn=lr.split(".")[0],Bn=`__fluixi_signal_state_v${Zn}__`,ma=`__fluixi_signal_builds_v${Zn}__`,ga=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};function Qn(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:ga,onSuspend:null,onError:null,observer:null}}var fr=globalThis;function va(e){let t=Qn(),r=e;for(let n of Object.keys(t))n in e||(r[n]=t[n]);return e}function wa(){let e=fr[Bn];return e?va(e):fr[Bn]=Qn()}var k=wa();(fr[ma]??=[]).push(lr);function ba(e){return k.observer=e,()=>{k.observer===e&&(k.observer=null)}}var dr=[],Aa;function Sa(e){let t=k.observer;t&&t.created(e.parents===void 0?{...e,parents:dr,origin:e.origin??Aa}:e)}function xa(e){return k.observer?(dr.push(e),!0):!1}function ka(){dr.pop()}function _a(e){k.observer?.ran?.(e)}function Oa(e){k.observer?.disposed?.(e)}var Ta="__FLUIXI_DEVTOOLS_HOOK__",Jn=globalThis[Ta];if(typeof Jn?.inject=="function")try{Jn.inject({observeReactiveNodes:ba,version:lr})}catch{}function Ea(){return k.observer!=null}var Xn=0,Gn=1,rt=2,Ca=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(k.untracked)return;let e=k.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}};var Ra=class extends Ca{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=rt,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(k.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===Gn&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===rt)break}(this.state===rt||!this._initialized)&&this.recompute(),this.state=Xn}recompute(){if(this.sources){for(let s of this.sources)s.observers?.delete(this);this.sources.clear()}let e=k.consumer,t=k.untracked,r=xa(this);k.consumer=this,k.untracked=!1;let n,o=!1,i;try{n=this._fn()}catch(s){o=!0,i=s,n=this._value}finally{k.consumer=e,k.untracked=t,r&&ka()}let a=!this._initialized||this._threw!==o||(o?i!==this._error:!this._equals(this._value,n));if(this._initialized=!0,this._threw=o,this._error=i,this._value=n,_a(this),a){if(this.version++,this.observers)for(let s of[...this.observers])s.markDirty(rt);Yn(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===Xn;if(this.state=e,t){if(this.observers)for(let r of[...this.observers])r.markDirty(Gn);Yn(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function Yn(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}function Pa(e){return k.onSuspend?(k.onSuspend(e,k.owner),!0):!1}function $a(){return k.owner}function Na(e,t){let r=k.owner;k.owner=e;try{return t()}finally{k.owner=r}}function Ma(e){if(k.owner){if(k.owner.disposed){e();return}(k.owner.cleanups??=[]).push(e)}}function Ia(e){k.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function La(e){return!!e&&typeof e.then=="function"}Ia(()=>{});var Da=Symbol.for("signal"),qa=Symbol.for("memo");function Va(e,t,r){let n=t,o=$a(),i=new Ra(()=>Na(o,()=>{try{return n=e(n)}catch(s){if(La(s))return Pa(s),n;throw s}}),{equals:r?.equals}),a=(()=>i.get());return Object.defineProperty(a,Da,{value:!0,enumerable:!0}),Object.defineProperty(a,qa,{value:!0,enumerable:!0}),Sa({kind:"memo",node:i,handle:a,name:r?.name}),Ea()&&Ma(()=>Oa(i)),a}function eo(e,t,r,n){return Va(()=>e().reduce(t,r),void 0,n)}function to(e){let t=e;for(;typeof t=="function";)t=t();return t}A();var vr="1.0.0-alpha.84",yo=vr.split(".")[0],ro=`__fluixi_signal_state_v${yo}__`,Wa=`__fluixi_signal_builds_v${yo}__`,Fa=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};function mo(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Fa,onSuspend:null,onError:null,observer:null}}var hr=globalThis;function Ha(e){let t=mo(),r=e;for(let n of Object.keys(t))n in e||(r[n]=t[n]);return e}function ja(){let e=hr[ro];return e?Ha(e):hr[ro]=mo()}var ie=ja();(hr[Wa]??=[]).push(vr);function Ka(e){return ie.observer=e,()=>{ie.observer===e&&(ie.observer=null)}}var Ua=[],nt;function za(e,t){if(!ie.observer)return t();let r=nt;nt=e;try{return t()}finally{nt=r}}function Ba(e){let t=ie.observer;t&&t.created(e.parents===void 0?{...e,parents:Ua,origin:e.origin??nt}:e)}function no(e,t,r){ie.observer?.moved?.(e,t,r)}function oo(e){ie.observer?.disposed?.(e)}var Ja="__FLUIXI_DEVTOOLS_HOOK__",io=globalThis[Ja];if(typeof io?.inject=="function")try{io.inject({observeReactiveNodes:Ka,version:vr})}catch{}function go(){return ie.observer!=null}var st=Symbol("store-raw"),so=Symbol("store-node"),ao=Symbol("store-has"),co=Symbol("store-self"),uo=Symbol("store-track");var De=new WeakMap,yr=new WeakMap,Ae=new WeakMap,at=new WeakMap;function Xa(e,t){if(!be(e)||!go())return;let r=new Set,n=a=>{if(!(!be(a)||r.has(a))){r.add(a);for(let s of Object.values(a))n(s)}};n(at.get(t)??t);let o=new Set,i=a=>{if(!be(a))return;let s=a;if(r.has(s)||o.has(s))return;o.add(s);let c=De.get(s);if(c){for(let u of c.keys.values())oo(u);c.all&&oo(c.all),De.delete(s),Ae.delete(s),yr.delete(s)}for(let u of Object.values(s))i(u)};i(e)}var ct=(e,t,r)=>r?`${e}[${String(t)}]`:`${e}.${String(t)}`;function vo(e,t,r){let n=t?.owner,o=n&&r!==void 0?ct(n.name,r,t?.array):void 0,[i,a]=za(n?.store,()=>w(e,o?{name:o}:void 0)),s=i;return s.$=a,s}function ut(e){let t=De.get(e);return t?t.owner||(t.owner=Ae.get(e)):De.set(e,t={keys:new Map,owner:Ae.get(e),array:Array.isArray(e)}),t}function fo(e,t,r){let n=e.keys.get(t);return n||e.keys.set(t,n=vo(r,e,t)),n}function Ga(e,t,r,n){let o=Ae.get(e);if(o&&o.store===t&&o.name===r)return;let i={store:t,name:r};Ae.set(e,i),at.set(e,at.get(n)??n);let a=De.get(e);if(a&&(a.owner=i,!!go())){for(let[s,c]of a.keys)no(c,t,ct(r,s,a.array));a.all&&no(a.all,t,ct(r,"*",a.array))}}function lo(e){let t=ut(e);(t.all||(t.all=vo(void 0,t,"*")))()}function po(e,t){e.$(typeof t=="function"?()=>t:t)}function be(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 ot(e){if(!be(e))return e;let t=yr.get(e);if(t)return t;let r=new Proxy(e,Ya);return yr.set(e,r),r}var Ya={get(e,t,r){if(t===st||t===so)return e;if(t===we)return r;if(t===ao)return c=>c in e;if(t==="__proxy")return!0;if(t===uo||t===co)return lo(e),r;let n=e[t];if(typeof n=="function"&&!Object.prototype.hasOwnProperty.call(e,t))return n;let o=Object.getOwnPropertyDescriptor(e,t);if(o&&o.get)return o.get.call(r);let i=ut(e),a=fo(i,t,n),s=a();return be(s)?(i.owner&&Ga(s,a,ct(i.owner.name,t,i.array),e),ot(s)):s},set(){return!0},deleteProperty(e,t){return t in e&&G(e,t,void 0),!0},has(e,t){return t===st||t===we||t===so||t===ao||t===co||t===uo?!0:(fo(ut(e),t,e[t])(),t in e)},ownKeys(e){return lo(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function wo(e,t=new Set){if(e==null||typeof e!="object")return e;let r=e[st]??e;if(t.has(r)||!be(r))return r;t.add(r);let n=!1,o=a=>{let s=wo(a,t);return s!==a&&(n=!0),s};if(Array.isArray(r)){let a=r.map(o);return n?a:r}let i={};for(let a of Object.keys(r))i[a]=o(r[a]);return n?i:r}function G(e,t,r){let n=wo(r),o=e[t];if(o===n&&(n!==void 0||t in e))return;let i=Array.isArray(e),a=i?e.length:0;n===void 0?delete e[t]:e[t]=n;let s=ut(e),c=s.keys.get(t);if(c&&po(c,n),Xa(o,e),i&&e.length!==a){let u=s.keys.get("length");u&&po(u,e.length)}s.all&&s.all.$(void 0)}function ho(e,t){return typeof e=="function"?e(t):e}function mr(e,t){for(let r of Object.keys(t)){let n=t[r],o=e[r];n&&typeof n=="object"&&!Array.isArray(n)&&o&&typeof o=="object"&&!Array.isArray(o)?mr(o,n):G(e,r,n)}}function wr(e){let t=[],r=e.replace(/\[([^\]]*)\]/g,".$1");for(let n of r.split("."))n.length&&t.push(n);return t}function bo(e,t,r){let n=t.length-1;for(let i=0;i<n;i++){let a=t[i];if(a==="*"){let c=t.slice(i+1);if(Array.isArray(e))for(let u=0;u<e.length;u++)bo(e[u],c,r);return}let s=e[a];(s==null||typeof s!="object")&&(s=/^\d+$/.test(t[i+1])?[]:{},G(e,a,s)),e=s}let o=t[n];if(o==="*"){if(Array.isArray(e))for(let i=0;i<e.length;i++)G(e,i,ho(r,e[i]));return}G(e,o,ho(r,e[o]))}function pr(e,t,r){bo(e,wr(t),r)}function Za(e){return Array.isArray(e)&&e.length>0&&e.every(t=>Array.isArray(t)&&t.length>=2&&typeof t[0]=="string")}function it(e,t){for(let r=e.length-1;r>=t.length;r--)G(e,String(r),void 0);e.length!==t.length&&G(e,"length",t.length);for(let r=0;r<t.length;r++)G(e,String(r),t[r])}function Qa(e,t){let r=t[0];if(typeof r=="function"&&t.length===1){let n=r(e);n&&n!==e&&mr(e,n);return}if(Array.isArray(r)&&t.length===1){if(Za(r)){for(let n of r)pr(e,n[0],n[1]);return}if(Array.isArray(e)){it(e,r);return}if(r.length===0)return;throw new TypeError("[fluixi] set() was given an array that is neither a batch of [path, value] pairs nor a replacement for an array root. Name the path you meant, as in set('items', [...]).")}if(r&&typeof r=="object"&&!Array.isArray(r)&&t.length===1){mr(e,r);return}if(Array.isArray(t[1])&&t.length>=3){pr(e,`${r}.${t[1].join(".")}`,t[2]);return}pr(e,String(r),t[1])}function gr(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(gr);let t={};for(let r of Object.keys(e))t[r]=gr(e[r]);return t}function oe(e,t){let r=e;for(let n of wr(t)){if(r==null)return;r=r[n]}return r}var lt=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...r)=>$(()=>Qa(this.root,r))),e&&typeof e=="object"&&(Ae.set(e,{store:this,name:t.name??"store"}),at.set(e,e)),Ba({kind:"store",node:this,handle:()=>this.root,name:t.name})}get state(){return ot(this.root)}get proxy(){return ot(this.root)}get accessor(){return(()=>ot(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return ft(this.state);let t=this.state;for(let r of wr(e)){if(t==null)return;t=t[r]}return ft(t)}select(e){return m(()=>e(this.state))}subscribe(e){return x(()=>e(this.state))}watch(e,t){let r;return x(()=>{let n=e(this.state);Object.is(n,r)||(t(n,r),r=n)})}reactive(e){return m(()=>this.state[e])}produce(e){this.set((t=>{let r=gr(t);return e(r),r}))}reconcile(e,t={}){this.set(e)}push(e,...t){let r=oe(this.root,e);this.set(e,r.concat(t))}pop(e){let t=oe(this.root,e).slice(),r=t.pop();return this.set(e,t),r}shift(e){let t=oe(this.root,e).slice(),r=t.shift();return this.set(e,t),r}splice(e,t,r,...n){let o=oe(this.root,e).slice(),i=o.splice(t,r,...n);return this.set(e,o),i}insert(e,t,r){let n=oe(this.root,e).slice();n.splice(t,0,r),this.set(e,n)}removeAt(e,t){let r=oe(this.root,e).slice(),n=r.splice(t,1);return this.set(e,r),n}replace(e,t){if(arguments.length>=2){let n=oe(this.root,String(e)),o=t;if(Array.isArray(n)&&Array.isArray(o)){it(n,o);return}this.set(e,o);return}let r=this.root;if(Array.isArray(r)&&Array.isArray(e)){it(r,e);return}this.set(e)}clear(e){let t=e===void 0?this.root:oe(this.root,e);if(Array.isArray(t)){it(t,[]);return}if(t&&typeof t=="object")for(let r of Object.keys(t))G(t,r,void 0)}toObservable(){let[e]=w(this.state);return e.toObservable()}dispose(){}},ec=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","replace","clear","unwrap","toObservable"];function tc(e,t){for(let r of ec)e[r]=t[r].bind(t);e.$=t.reactive.bind(t)}function br(e,t={immutable:!0}){let r=new lt(e,t);return tc(r.set,r),[r.proxy,r.set]}function rc(e,t={}){return new lt(e,{...t,immutable:!1})}function ft(e){if(e==null||typeof e!="object")return e;let t=e[st];return t!==void 0?t:e}function Ar(e){return O(()=>ft(e))}var Nf=Object.freeze({createStore:br,createMutableStore:rc,batch:$,unwrap:ft,untrackStore:Ar});P();A();P();var $i="1.0.0-alpha.84";P();ii($i);P();P();P();A();var hu={context:null,owner:null};function jr(){return hu}var We=typeof process<"u"&&!1,Hr=Symbol.for("fluixi-lifecycle");function Ni(){let e=N();if(!e)return null;if(!e[Hr]){let t={mounts:[],effects:[],scheduled:!1};e[Hr]=t}return e[Hr]}function Mi(e){if(e.scheduled)return;if(L()){e.mounts=[],e.effects=[];return}e.scheduled=!0;let t=N();queueMicrotask(()=>{if($n(t)){e.mounts=[],e.effects=[];return}I(t,()=>{for(let r of e.mounts)try{let n=r();typeof n=="function"&&S(n)}catch(n){console.error("Error in onMount callback:",n)}for(let r of e.effects){let n;x(()=>{n&&n(),n=r()}),S(()=>{n&&n()})}e.mounts=[],e.effects=[]})})}function Oe(e,t){return U(e,t)}function Kr(e,t){let r=typeof e=="function"?O(()=>e(t)):e,n=r!=null&&(typeof r=="function"||typeof r=="object");if(n)try{r.$name=e.name}catch{}return n&&!M(r)?Ve(r):r}function Lt(e,t=!0){if(L())return;let r=Ni();if(r){if(!t){r.scheduled||e();return}r.mounts.push(e),Mi(r)}else{if(!t){e();return}x(()=>{let n=O(e);typeof n=="function"&&S(n)})}}function Dt(e){S(e)}function Fe(e){let t=Ni();if(t)t.effects.push(e),Mi(t);else{let r;x(()=>{r&&r(),r=e()}),S(()=>{r&&r()})}}function qt(e){return m(e)}function Vt(e){let t={current:e};return S(()=>{t.current=null}),t}function Wt(e,t){let[r,n]=w(t);return[r,i=>{n(e(r(),i))}]}function Ft(e,t,r,n){Fe(()=>{let o=e&&"current"in e?e.current:e;if(o)return o.addEventListener(t,r,n),()=>{o.removeEventListener(t,r,n)}})}function Ht(e){return e}function Ur(){return We}function zr(e){We&&e()}A();P();function Ii(e){return!!(e&&typeof e=="object"&&typeof e.then=="function"||e instanceof Promise)}var yu=X(void 0,"suspense-list");function He(e){return U(mu,e)}function mu(e){let t=zn(),r=K(yu),n=r?r.register(t.inFallback):void 0;function o(f){return f==null||typeof f=="boolean"?null:typeof f=="function"&&ee(f)&&!M(f)?f():f}let i=di(()=>o(e.fallback??null)),a=ur(t,()=>fe(()=>e.children)),s=(f,d)=>{if(!(d>8))if(Array.isArray(f))for(let g of f)s(g,d+1);else typeof f=="function"&&M(f)&&s(f(),d+1)};ur(t,()=>{C(()=>s(a,0))});let[c,u]=w(void 0),l=Ii(a);return l&&(t.increment(),a.then(f=>{u(()=>f),t.decrement()},()=>t.decrement())),m(()=>(n?n.showFallback():t.inFallback())?i:l?c():a)}ai(He);Object.defineProperty(He,"__suspense",{value:!0,enumerable:!0});jt();jt();function Ee(e,t,r={}){if(pe(["click","input","change","submit"]),L())throw new Error("render() is for client-side only. Use renderToString() on server.");if(!t)throw new Error("Container element is required");let n;return q(o=>{n=o;let i=typeof e=="function"?e():e;t.textContent="",Et(t),Ct(),F(t,()=>i)}),()=>{n&&(n(),n=void 0)}}function gu(e){return e&&typeof e=="object"&&(e._$litType$!==void 0||e._$litDirective$!==void 0)}function Di(e,t,r={}){let n=document.createElement("div");n.setAttribute("data-portal","true"),t.appendChild(n);let o=Ee(e,n,r);return()=>{o(),t.contains(n)&&t.removeChild(n)}}function qi(e){return!!(e==null||typeof e=="function"||Tt(e)||gu(e)||Array.isArray(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean")}function Vi(){L()||pe(["click","input","change","submit"])}function Wi(){L()}Jr();A();P();var wu="__fluixi_iso_states__",bu="__iso:";function Au(){return globalThis[wu]??=new Map}function Su(e){if(typeof window>"u")return;let t=Wr();return t?t[bu+e]:void 0}function Ui(e,t){let r=Su(e),n=r!==void 0?r:typeof window<"u"&&t.client?t.client():t.fallback,[o,i]=w(n);return Au().set(e,{server:t.server,set:i}),{value:o,set:i,key:e}}P();P();P();P();P();A();var Xr=Symbol.for("fluixi.fragment"),zi=typeof window>"u";function Bi(e){return e==null||e===!1?null:Array.isArray(e)?e.map(Bi).flat():e}function Gr(e,t,r){if(e==null)return null;let n=t||{};if(r!==void 0&&(n.key=r),e===Xr)return m(()=>Ve(Bi(n.children)));if(typeof e=="function"){let{type:o}=ci(e);return e.$$typeof===Symbol.for("react.provider")||o==="provider"?e(n):zi?{type:e,props:n}:m(()=>U(e,n),void 0,{name:"jsx component"})}return typeof e=="string"&&e.trim().length>0?xu(e,n):null}var Ji=Gr;function xu(e,t){return zi?{type:e,props:t||{}}:bi(e,t)}var Xi="0.0.1",Gi="Fluixi";function ku(){return{name:Gi,version:Xi,features:{ssr:!0,hydration:!0,jsx:!0,litHtml:!0,signals:!0,fineGrained:!0,lazy:!0,hooks:!0,devMode:!0}}}P();Qr();A();A();A();var Ou=Object.defineProperty,Tu=(e,t)=>{for(var r in t)Ou(e,r,{get:t[r],enumerable:!0})};function he(e){return typeof e=="function"?e():e}function Eu(e){if(typeof e=="string")return e;let t=[];return t.push(e.index===!1?"noindex":"index"),t.push(e.follow===!1?"nofollow":"follow"),e.noarchive&&t.push("noarchive"),e.nosnippet&&t.push("nosnippet"),e.noimageindex&&t.push("noimageindex"),e.maxSnippet!=null&&t.push(`max-snippet:${e.maxSnippet}`),e.maxImagePreview&&t.push(`max-image-preview:${e.maxImagePreview}`),e.maxVideoPreview!=null&&t.push(`max-video-preview:${e.maxVideoPreview}`),t.join(", ")}function ns(){let e=[],[t,r]=w(0);return{sources:e,version:t,push(n){return e.push(n),r(o=>o+1),()=>{let o=e.indexOf(n);o!==-1&&(e.splice(o,1),r(i=>i+1))}}}}var os=null;function is(e){os=e}function Cu(){return os}function Pe(e){let t=Cu();if(!t)return globalThis.process?.env?.NODE_ENV!=="production"&&console.warn("[fluixi/head] useHead() called with no active head registry — ignored."),()=>{};let r=t.push(e);return typeof window<"u"&&N()&&S(r),r}function zt(e){let t=5381;for(let r=0;r<e.length;r++)t=t*33^e.charCodeAt(r);return(t>>>0).toString(36)}function Ru(e){return e.charset!=null?"meta:charset":e.property?"meta:property:"+e.property:e.name?"meta:name:"+e.name:e["http-equiv"]?"meta:http-equiv:"+e["http-equiv"]:"meta:"+zt(JSON.stringify(e))}function Pu(e,t){let r=typeof t=="string"?{url:t}:t;e.push({tag:"meta",key:"meta:property:og:image:"+r.url,attrs:{property:"og:image",content:r.url}}),r.secureUrl&&e.push({tag:"meta",key:"meta:property:og:image:secure:"+r.url,attrs:{property:"og:image:secure_url",content:r.secureUrl}}),r.type&&e.push({tag:"meta",key:"meta:property:og:image:type:"+r.url,attrs:{property:"og:image:type",content:r.type}}),r.width!=null&&e.push({tag:"meta",key:"meta:property:og:image:width:"+r.url,attrs:{property:"og:image:width",content:String(r.width)}}),r.height!=null&&e.push({tag:"meta",key:"meta:property:og:image:height:"+r.url,attrs:{property:"og:image:height",content:String(r.height)}}),r.alt&&e.push({tag:"meta",key:"meta:property:og:image:alt:"+r.url,attrs:{property:"og:image:alt",content:r.alt}})}function $u(e,t){let r=(n,o)=>{o!=null&&t.push({tag:"meta",key:"meta:property:og:"+n,attrs:{property:"og:"+n,content:o}})};r("title",e.title),r("description",e.description),r("type",e.type),r("url",e.url),r("site_name",e.siteName),r("locale",e.locale);for(let n of e.localeAlternate??[])t.push({tag:"meta",key:"meta:property:og:locale:alt:"+n,attrs:{property:"og:locale:alternate",content:n}});if(e.image!=null){let n=Array.isArray(e.image)?e.image:[e.image];for(let o of n)Pu(t,o)}if(e.video){let n=typeof e.video=="string"?{url:e.video}:e.video;r("video",n.url),"type"in n&&n.type&&r("video:type",n.type),"width"in n&&n.width!=null&&r("video:width",String(n.width)),"height"in n&&n.height!=null&&r("video:height",String(n.height))}if(e.audio){let n=typeof e.audio=="string"?{url:e.audio}:e.audio;r("audio",n.url),"type"in n&&n.type&&r("audio:type",n.type)}if(e.article){let n=e.article;r("article:published_time",n.publishedTime),r("article:modified_time",n.modifiedTime),r("article:expiration_time",n.expirationTime),r("article:section",n.section);for(let o of[].concat(n.author??[]))t.push({tag:"meta",key:"meta:property:og:article:author:"+o,attrs:{property:"article:author",content:o}});for(let o of[].concat(n.tag??[]))t.push({tag:"meta",key:"meta:property:og:article:tag:"+o,attrs:{property:"article:tag",content:o}})}if(e.book){let n=e.book;r("book:isbn",n.isbn),r("book:release_date",n.releaseDate);for(let o of[].concat(n.author??[]))t.push({tag:"meta",key:"meta:property:og:book:author:"+o,attrs:{property:"book:author",content:o}});for(let o of[].concat(n.tag??[]))t.push({tag:"meta",key:"meta:property:og:book:tag:"+o,attrs:{property:"book:tag",content:o}})}if(e.profile){let n=e.profile;r("profile:first_name",n.firstName),r("profile:last_name",n.lastName),r("profile:username",n.username),r("profile:gender",n.gender)}}function Nu(e,t){let r=(n,o)=>{o!=null&&t.push({tag:"meta",key:"meta:name:twitter:"+n,attrs:{name:"twitter:"+n,content:o}})};r("card",e.card),r("site",e.site),r("creator",e.creator),r("title",e.title),r("description",e.description),r("image",e.image),r("image:alt",e.imageAlt),r("player",e.player),e.playerWidth!=null&&r("player:width",String(e.playerWidth)),e.playerHeight!=null&&r("player:height",String(e.playerHeight)),e.app&&(r("app:name:iphone",e.app.name),r("app:id:iphone",e.app.idIphone),r("app:id:ipad",e.app.idIpad),r("app:id:googleplay",e.app.idGooglePlay))}function Mu(e,t){let r=(n,o)=>t.push({tag:"link",key:n,attrs:o});if(e.icon!=null){let n=typeof e.icon=="string"?[{url:e.icon}]:e.icon;for(let o of n)r("link:icon:"+o.url,{rel:"icon",href:o.url,...o.type?{type:o.type}:{},...o.sizes?{sizes:o.sizes}:{}})}if(e.apple!=null){let n=typeof e.apple=="string"?[{url:e.apple}]:e.apple;for(let o of n)r("link:apple-touch-icon:"+o.url,{rel:"apple-touch-icon",href:o.url,...o.sizes?{sizes:o.sizes}:{}})}e.mask&&r("link:mask-icon",{rel:"mask-icon",href:e.mask.url,...e.mask.color?{color:e.mask.color}:{}}),e.shortcut&&r("link:shortcut",{rel:"shortcut icon",href:e.shortcut}),e.msTileImage&&t.push({tag:"meta",key:"meta:name:msapplication-TileImage",attrs:{name:"msapplication-TileImage",content:e.msTileImage}}),e.msTileColor&&t.push({tag:"meta",key:"meta:name:msapplication-TileColor",attrs:{name:"msapplication-TileColor",content:e.msTileColor}})}function Iu(e,t,r){let n=(f,d)=>t.push({tag:"meta",key:f,attrs:d}),o=he(e.title);o!==void 0&&(r.title=o),e.titleTemplate!==void 0&&(r.template=e.titleTemplate);let i=he(e.lang);i!==void 0&&t.push({tag:"htmlAttr",key:"html:lang",name:"lang",value:i}),e.charset!==void 0&&n("meta:charset",{charset:e.charset}),e.viewport!==void 0&&n("meta:name:viewport",{name:"viewport",content:e.viewport});let a=he(e.description);a!==void 0&&n("meta:name:description",{name:"description",content:a});let s=he(e.keywords);s!==void 0&&n("meta:name:keywords",{name:"keywords",content:Array.isArray(s)?s.join(", "):s}),e.author!==void 0&&n("meta:name:author",{name:"author",content:e.author}),e.robots!==void 0&&n("meta:name:robots",{name:"robots",content:Eu(e.robots)}),e.generator!==void 0&&n("meta:name:generator",{name:"generator",content:e.generator}),e.applicationName!==void 0&&n("meta:name:application-name",{name:"application-name",content:e.applicationName}),e.referrer!==void 0&&n("meta:name:referrer",{name:"referrer",content:e.referrer}),e.colorScheme!==void 0&&n("meta:name:color-scheme",{name:"color-scheme",content:e.colorScheme});let c=he(e.themeColor);c!==void 0&&n("meta:name:theme-color",{name:"theme-color",content:c});let u=he(e.canonical);if(u!==void 0&&t.push({tag:"link",key:"link:rel:canonical",attrs:{rel:"canonical",href:u}}),e.manifest!==void 0&&t.push({tag:"link",key:"link:rel:manifest",attrs:{rel:"manifest",href:e.manifest}}),e.base!==void 0&&t.push({tag:"base",key:"base",attrs:{href:e.base}}),e.verification){let f={google:"google-site-verification",bing:"msvalidate.01",yandex:"yandex-verification",pinterest:"p:domain_verify"};for(let[d,g]of Object.entries(e.verification)){if(g==null)continue;let h=f[d]??d;n("meta:name:"+h,{name:h,content:g})}}for(let f of e.alternates??[])t.push({tag:"link",key:"link:alternate:hreflang:"+f.hreflang,attrs:{rel:"alternate",hreflang:f.hreflang,href:f.href}});for(let f of e.feeds??[])t.push({tag:"link",key:"link:alternate:feed:"+f.href,attrs:{rel:"alternate",type:f.type??"application/rss+xml",href:f.href,...f.title?{title:f.title}:{}}});e.og&&$u(e.og,t),e.twitter&&Nu(e.twitter,t),e.icons&&Mu(e.icons,t);let l=he(e.jsonLd);if(l!==void 0){let f=Array.isArray(l)?l:[l];for(let d of f){let g=JSON.stringify(d);t.push({tag:"script",key:"script:ldjson:"+zt(g),attrs:{type:"application/ld+json"},children:g})}}for(let f of e.meta??[]){let d={};for(let[g,h]of Object.entries(f))h!=null&&(d[g==="httpEquiv"?"http-equiv":g]=h);t.push({tag:"meta",key:Ru(d),attrs:d})}for(let f of e.link??[]){let d={};for(let[g,h]of Object.entries(f))h!=null&&(d[g]=h);t.push({tag:"link",key:"link:"+(d.rel??"")+":"+(d.href??zt(JSON.stringify(d))),attrs:d})}for(let f of e.script??[]){let d={},g;for(let[h,p]of Object.entries(f))p!=null&&(h==="children"?g=p:d[h]=p);t.push({tag:"script",key:"script:"+(d.src??zt((g??"")+JSON.stringify(d))),attrs:d,children:g})}}function Lu(e,t){return typeof e=="function"?e(t):e.includes("%s")?e.replace("%s",t):e}function Du(e){let t=[],r={};for(let i of e.sources){let a=typeof i=="function"?i():i;Iu(a,t,r)}r.title!==void 0&&t.push({tag:"title",key:"title",children:r.template?Lu(r.template,r.title):r.title});let n=new Map,o={};for(let i of t){if(i.tag==="htmlAttr"){o[i.name]=i.value;continue}n.set(i.key,i)}return{tags:[...n.values()],htmlAttrs:o}}var en="data-fh",tn="data-fh-key";function ss(e){for(let t=e.firstChild;t;t=t.nextSibling)if(t.nodeType===8&&t.data.startsWith("fh:")){t.parentNode?.removeChild(t);return}}function as(e,t){for(let r of Array.from(e.attributes))r.name===en||r.name===tn||r.name in t||e.removeAttribute(r.name);for(let[r,n]of Object.entries(t))e.getAttribute(r)!==n&&e.setAttribute(r,n)}function qu(e){let t=document.createElement(e.tag);return as(t,e.attrs),t.setAttribute(en,""),t.setAttribute(tn,e.key),e.tag==="script"&&e.children!=null&&(t.textContent=e.children),t}function Vu(e,t){let r=document.head,n=new Map;for(let a of Array.from(r.querySelectorAll(`[${en}]`))){let s=a.getAttribute(tn);a.tagName!=="TITLE"&&s&&n.set(s,a)}let o=null,i=new Set;for(let a of e){if(a.tag==="title"){o=a.children;continue}if(a.tag==="htmlAttr")continue;i.add(a.key);let s=n.get(a.key);s&&s.tagName===a.tag.toUpperCase()?(as(s,a.attrs),a.tag==="script"&&(s.textContent??"")!==(a.children??"")&&(s.textContent=a.children??"")):(s&&s.remove(),r.appendChild(qu(a)))}for(let[a,s]of n)i.has(a)||s.remove();o!=null&&document.title!==o&&(document.title=o);for(let[a,s]of Object.entries(t))document.documentElement.getAttribute(a)!==s&&document.documentElement.setAttribute(a,s)}function cs(e){return q(t=>(x(()=>{e.version();let{tags:r,htmlAttrs:n}=Du(e);Vu(r,n)}),S(()=>{}),t))}var Wu={};Tu(Wu,{Base:()=>Uu,JsonLD:()=>zu,Link:()=>ju,Meta:()=>Hu,Script:()=>Ku,Title:()=>Fu});function je(e){return typeof e=="function"?e():e}function Fu(e){return Pe(()=>({title:je(e.children)})),null}function Hu(e){return Pe(()=>({meta:[{...e,content:je(e.content)}]})),null}function ju(e){return Pe(()=>{let t={};for(let[r,n]of Object.entries(e))t[r]=je(n);return{link:[t]}}),null}function Ku(e){return Pe(()=>{let t={};for(let[r,n]of Object.entries(e))t[r]=je(n);return{script:[t]}}),null}function Uu(e){return Pe({base:e.href}),null}function zu(e){return Pe(()=>({jsonLd:je(e.data)})),null}function Ts(e,t){if(!t)throw new Error("Container element not found for mount()");Vr(()=>e(),t)}var Os=e=>m(()=>Oe(e));async function Es(e,t={}){let r=typeof t.root=="string"?document.querySelector(t.root):t.root??document.querySelector("#app");if(!r)throw new Error(`[Fluixi] Mount container not found: ${t.root??"#app"}`);let n=!!document.getElementById("__FLUIXI_HYDRATION__")||!!t.routes&&r.firstElementChild!=null,o=t.hydrate??n,i=ns();if(is(i),ss(r),o){if(t.routes&&t.routes.length){let{preloadRoutes:a}=await Promise.resolve().then(()=>(yn(),_s));await a(t.routes,window.location.pathname)}ts(),Yr(!0),Mt(Os(e),r),bf(),setTimeout(()=>{Yr(!1),Zr()},100)}else Ee(Os(e),r);cs(i)}function bf(){if(typeof window>"u")return;let e=window;typeof e.__FX_REPLAY_STOP__=="function"&&e.__FX_REPLAY_STOP__();let t=e.__FX_REPLAY__;if(e.__FX_REPLAY__=void 0,e.__FX_REPLAY_STOP__=void 0,!(!Array.isArray(t)||t.length===0))for(let r of t){let n=r&&r.target;if(!n||n.isConnected===!1||typeof n.dispatchEvent!="function")continue;let o=r.type,i=o==="click"?new MouseEvent(o,{bubbles:!0,cancelable:!0}):new Event(o,{bubbles:!0,cancelable:!0});n.dispatchEvent(i)}}yn();return Ms(Af);})();
|