@fluixi/reactive 1.0.0-alpha.82 → 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.
Files changed (169) hide show
  1. package/README.md +4 -0
  2. package/dist/cdn/reactive.cjs +2673 -1
  3. package/dist/cdn/reactive.global.js +2 -1
  4. package/dist/cdn/reactive.mjs +2657 -1
  5. package/dist/cdn/signal.cjs +299 -1
  6. package/dist/cdn/signal.d.ts +1 -1
  7. package/dist/cdn/signal.global.js +2 -1
  8. package/dist/cdn/signal.js +1 -1
  9. package/dist/cdn/signal.mjs +276 -1
  10. package/dist/index.cjs +2673 -1
  11. package/dist/index.mjs +2657 -1
  12. package/dist/lib/index.cjs +2674 -1
  13. package/dist/lib/index.js +1 -1
  14. package/dist/lib/index.mjs +2659 -1
  15. package/dist/lib/observable/index.cjs +386 -1
  16. package/dist/lib/observable/index.mjs +364 -1
  17. package/dist/lib/observable/observable.cjs +384 -1
  18. package/dist/lib/observable/observable.d.ts +0 -137
  19. package/dist/lib/observable/observable.d.ts.map +1 -1
  20. package/dist/lib/observable/observable.js +0 -71
  21. package/dist/lib/observable/observable.mjs +361 -1
  22. package/dist/lib/observable/subscription.cjs +180 -1
  23. package/dist/lib/observable/subscription.d.ts +0 -12
  24. package/dist/lib/observable/subscription.d.ts.map +1 -1
  25. package/dist/lib/observable/subscription.js +0 -12
  26. package/dist/lib/observable/subscription.mjs +157 -1
  27. package/dist/lib/observable/types.cjs +18 -1
  28. package/dist/lib/observable/types.d.ts.map +1 -1
  29. package/dist/lib/predicates.cjs +44 -1
  30. package/dist/lib/predicates.d.ts +2 -2
  31. package/dist/lib/predicates.js +2 -2
  32. package/dist/lib/predicates.mjs +23 -1
  33. package/dist/lib/signal/api.cjs +571 -1
  34. package/dist/lib/signal/api.d.ts +211 -1
  35. package/dist/lib/signal/api.d.ts.map +1 -1
  36. package/dist/lib/signal/api.js +207 -12
  37. package/dist/lib/signal/api.mjs +548 -1
  38. package/dist/lib/signal/cached-resource.cjs +672 -1
  39. package/dist/lib/signal/cached-resource.d.ts +28 -16
  40. package/dist/lib/signal/cached-resource.d.ts.map +1 -1
  41. package/dist/lib/signal/cached-resource.js +35 -29
  42. package/dist/lib/signal/cached-resource.mjs +650 -1
  43. package/dist/lib/signal/graph/children.cjs +325 -1
  44. package/dist/lib/signal/graph/children.js +1 -1
  45. package/dist/lib/signal/graph/children.mjs +302 -1
  46. package/dist/lib/signal/graph/compat.cjs +578 -1
  47. package/dist/lib/signal/graph/compat.d.ts +13 -13
  48. package/dist/lib/signal/graph/compat.d.ts.map +1 -1
  49. package/dist/lib/signal/graph/compat.js +51 -32
  50. package/dist/lib/signal/graph/compat.mjs +556 -1
  51. package/dist/lib/signal/graph/core.cjs +295 -1
  52. package/dist/lib/signal/graph/core.d.ts +28 -24
  53. package/dist/lib/signal/graph/core.d.ts.map +1 -1
  54. package/dist/lib/signal/graph/core.js +45 -31
  55. package/dist/lib/signal/graph/core.mjs +273 -1
  56. package/dist/lib/signal/graph/debounced.cjs +668 -1
  57. package/dist/lib/signal/graph/debounced.d.ts +5 -5
  58. package/dist/lib/signal/graph/debounced.d.ts.map +1 -1
  59. package/dist/lib/signal/graph/debounced.js +5 -5
  60. package/dist/lib/signal/graph/debounced.mjs +645 -1
  61. package/dist/lib/signal/graph/derived.cjs +496 -1
  62. package/dist/lib/signal/graph/derived.d.ts +1 -1
  63. package/dist/lib/signal/graph/derived.js +1 -1
  64. package/dist/lib/signal/graph/derived.mjs +473 -1
  65. package/dist/lib/signal/graph/detect.cjs +66 -1
  66. package/dist/lib/signal/graph/detect.mjs +45 -1
  67. package/dist/lib/signal/graph/error-boundary.cjs +301 -1
  68. package/dist/lib/signal/graph/error-boundary.js +3 -3
  69. package/dist/lib/signal/graph/error-boundary.mjs +278 -1
  70. package/dist/lib/signal/graph/index.cjs +305 -1
  71. package/dist/lib/signal/graph/index.d.ts +7 -6
  72. package/dist/lib/signal/graph/index.d.ts.map +1 -1
  73. package/dist/lib/signal/graph/index.js +7 -6
  74. package/dist/lib/signal/graph/index.mjs +283 -1
  75. package/dist/lib/signal/graph/observe.cjs +163 -0
  76. package/dist/lib/signal/graph/observe.d.ts +141 -0
  77. package/dist/lib/signal/graph/observe.d.ts.map +1 -0
  78. package/dist/lib/signal/graph/observe.js +149 -0
  79. package/dist/lib/signal/graph/observe.mjs +140 -0
  80. package/dist/lib/signal/graph/resource.cjs +620 -1
  81. package/dist/lib/signal/graph/resource.d.ts +1 -1
  82. package/dist/lib/signal/graph/resource.js +7 -8
  83. package/dist/lib/signal/graph/resource.mjs +597 -1
  84. package/dist/lib/signal/graph/runtime.cjs +501 -1
  85. package/dist/lib/signal/graph/runtime.d.ts +9 -9
  86. package/dist/lib/signal/graph/runtime.d.ts.map +1 -1
  87. package/dist/lib/signal/graph/runtime.js +56 -37
  88. package/dist/lib/signal/graph/runtime.mjs +478 -1
  89. package/dist/lib/signal/graph/signal-next.cjs +1208 -1
  90. package/dist/lib/signal/graph/signal-next.d.ts +5 -5
  91. package/dist/lib/signal/graph/signal-next.d.ts.map +1 -1
  92. package/dist/lib/signal/graph/signal-next.js +14 -12
  93. package/dist/lib/signal/graph/signal-next.mjs +1186 -1
  94. package/dist/lib/signal/graph/ssr-hooks.cjs +60 -1
  95. package/dist/lib/signal/graph/ssr-hooks.d.ts +6 -7
  96. package/dist/lib/signal/graph/ssr-hooks.d.ts.map +1 -1
  97. package/dist/lib/signal/graph/ssr-hooks.js +6 -7
  98. package/dist/lib/signal/graph/ssr-hooks.mjs +39 -1
  99. package/dist/lib/signal/graph/state.cjs +72 -1
  100. package/dist/lib/signal/graph/state.d.ts +43 -10
  101. package/dist/lib/signal/graph/state.d.ts.map +1 -1
  102. package/dist/lib/signal/graph/state.js +83 -21
  103. package/dist/lib/signal/graph/state.mjs +49 -1
  104. package/dist/lib/signal/graph/suspense.cjs +301 -1
  105. package/dist/lib/signal/graph/suspense.js +4 -4
  106. package/dist/lib/signal/graph/suspense.mjs +278 -1
  107. package/dist/lib/signal/index-legacy.cjs +2540 -1
  108. package/dist/lib/signal/index-legacy.d.ts +1 -1
  109. package/dist/lib/signal/index-legacy.js +1 -1
  110. package/dist/lib/signal/index-legacy.mjs +2518 -1
  111. package/dist/lib/signal/index.cjs +1275 -1
  112. package/dist/lib/signal/index.d.ts +5 -2
  113. package/dist/lib/signal/index.d.ts.map +1 -1
  114. package/dist/lib/signal/index.js +8 -3
  115. package/dist/lib/signal/index.mjs +1253 -1
  116. package/dist/lib/signal/list.cjs +549 -1
  117. package/dist/lib/signal/list.d.ts +5 -5
  118. package/dist/lib/signal/list.js +10 -10
  119. package/dist/lib/signal/list.mjs +526 -1
  120. package/dist/lib/signal/resource-api.cjs +626 -1
  121. package/dist/lib/signal/resource-api.d.ts +5 -5
  122. package/dist/lib/signal/resource-api.js +5 -5
  123. package/dist/lib/signal/resource-api.mjs +603 -1
  124. package/dist/lib/signal/signal.cjs +2023 -1
  125. package/dist/lib/signal/signal.d.ts +4 -4
  126. package/dist/lib/signal/signal.d.ts.map +1 -1
  127. package/dist/lib/signal/signal.js +22 -23
  128. package/dist/lib/signal/signal.mjs +2000 -1
  129. package/dist/lib/signal/types.cjs +38 -1
  130. package/dist/lib/signal/types.d.ts.map +1 -1
  131. package/dist/lib/signal/types.js +2 -2
  132. package/dist/lib/signal/types.mjs +17 -1
  133. package/dist/lib/signal/utilities.cjs +1012 -1
  134. package/dist/lib/signal/utilities.d.ts +0 -108
  135. package/dist/lib/signal/utilities.d.ts.map +1 -1
  136. package/dist/lib/signal/utilities.js +0 -158
  137. package/dist/lib/signal/utilities.mjs +990 -1
  138. package/dist/lib/store/api.cjs +612 -1
  139. package/dist/lib/store/api.d.ts +33 -0
  140. package/dist/lib/store/api.d.ts.map +1 -1
  141. package/dist/lib/store/api.js +41 -8
  142. package/dist/lib/store/api.mjs +596 -1
  143. package/dist/lib/store/index.cjs +691 -1
  144. package/dist/lib/store/index.js +1 -1
  145. package/dist/lib/store/index.mjs +676 -1
  146. package/dist/lib/store/setter.types.cjs +18 -1
  147. package/dist/lib/store/setter.types.d.ts +43 -3
  148. package/dist/lib/store/setter.types.d.ts.map +1 -1
  149. package/dist/lib/store/store.cjs +658 -1
  150. package/dist/lib/store/store.d.ts +72 -0
  151. package/dist/lib/store/store.d.ts.map +1 -1
  152. package/dist/lib/store/store.js +294 -11
  153. package/dist/lib/store/store.mjs +644 -1
  154. package/dist/lib/store/types.cjs +18 -1
  155. package/dist/lib/store/types.d.ts +1 -1
  156. package/dist/lib/store/types.d.ts.map +1 -1
  157. package/dist/lib/store/utils.cjs +43 -1
  158. package/dist/lib/store/utils.d.ts +1 -1
  159. package/dist/lib/store/utils.js +1 -1
  160. package/dist/lib/store/utils.mjs +22 -1
  161. package/dist/lib/subject.cjs +450 -1
  162. package/dist/lib/subject.js +3 -91
  163. package/dist/lib/subject.mjs +427 -1
  164. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  165. package/dist/version.generated.cjs +27 -1
  166. package/dist/version.generated.d.ts +1 -1
  167. package/dist/version.generated.js +2 -2
  168. package/dist/version.generated.mjs +7 -1
  169. package/package.json +5 -4
@@ -1 +1,2 @@
1
- "use strict";var Fluixi=(()=>{var it=Object.defineProperty;var Tr=Object.getOwnPropertyDescriptor;var mr=Object.getOwnPropertyNames;var br=Object.prototype.hasOwnProperty;var vr=(e,t)=>{for(var n in t)it(e,n,{get:t[n],enumerable:!0})},Sr=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of mr(t))!br.call(e,o)&&o!==n&&it(e,o,{get:()=>t[o],enumerable:!(r=Tr(t,o))||r.enumerable});return e};var xr=e=>Sr(it({},"__esModule",{value:!0}),e);var es={};vr(es,{$NAME:()=>Kn,$NODE:()=>Q,$PROXY:()=>Nr,$RAW:()=>qe,$SELF:()=>Qe,$SIGNAL:()=>jr,$STORE:()=>Hn,$TRACK:()=>Je,Observable:()=>j,SafeSubscriber:()=>Be,Signal:()=>Rn,Store:()=>H,StoreAPI:()=>or,Subject:()=>ct,Subscriber:()=>ie,Subscription:()=>se,SuspenseContext:()=>Ge,VERSION:()=>zt,__DEV__:()=>de,batch:()=>V,clearAllCachedResources:()=>Zo,clearCachedResourceNamespace:()=>Jo,combineSignal:()=>xo,combineSignals:()=>go,createCachedResource:()=>Qo,createChildOwner:()=>en,createComputed:()=>fn,createComputedStore:()=>Yn,createContext:()=>ce,createDebounce:()=>bn,createDebouncedResource:()=>vn,createDebouncedSignal:()=>kt,createDeferred:()=>mn,createEffect:()=>U,createErrorBoundary:()=>wn,createMemo:()=>y,createMutableStore:()=>Nt,createRenderEffect:()=>dn,createResource:()=>pe,createRoot:()=>X,createSelector:()=>Tn,createSignal:()=>b,createStore:()=>Ue,createStoreEffect:()=>Qn,createStoreMemo:()=>Jn,createSuspenseBoundary:()=>Sn,debounceSignal:()=>Eo,disposeScope:()=>tn,distinctSignal:()=>So,effect:()=>Vr,everySignal:()=>bo,filterSignal:()=>ho,findSignal:()=>To,flush:()=>hn,getNode:()=>tr,getOwner:()=>Ae,getServerData:()=>ke,getStoreNode:()=>nr,guardSignal:()=>ko,indexArray:()=>Pr,isComponent:()=>mt,isMemo:()=>yt,isOwnerDisposed:()=>nn,isProvider:()=>vt,isResource:()=>Tt,isSignal:()=>_e,isStore:()=>er,isStoreProxy:()=>et,isSuspense:()=>bt,keyArray:()=>Er,makeArrayFlat:()=>Ke,mapArray:()=>kr,mapSignal:()=>po,memo:()=>Lr,mergeSignal:()=>wo,modifiable:()=>rr,nextResourceId:()=>Ee,omitSignal:()=>Co,on:()=>yn,onCleanup:()=>D,operate:()=>gr,pickSignal:()=>Ao,produceUtil:()=>sr,provide:()=>le,provideErrorBoundary:()=>On,provideSuspense:()=>xn,readChildren:()=>We,readSignal:()=>Do,reconcileUtil:()=>ir,reduceSignal:()=>yo,reportResourceData:()=>Pe,resource:()=>An,runWithOwner:()=>fe,selectSignal:()=>Ro,setOwner:()=>dt,setResourceDataSink:()=>Ct,setResourceIdSource:()=>At,setResourceTracker:()=>Ot,setServerDataGetter:()=>Rt,signal:()=>Br,someSignal:()=>mo,sortSignal:()=>vo,startTransition:()=>ht,store:()=>ur,throttleSignal:()=>Po,trackResourcePromise:()=>Y,untrack:()=>F,untrackStore:()=>Bt,unwrap:()=>ye,useContext:()=>rn,useTransition:()=>pn,whenSignal:()=>_o,wrap:()=>Zn,zipSignal:()=>Oo});var zt="1.0.0-alpha.82";function ut(e){return typeof e=="function"&&!/^class\s/.test(Function.prototype.toString.call(e))}function Xt(e){return 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"}function at(e){return e instanceof Promise||!!e&&(typeof e=="object"||typeof e=="function")&&"then"in e}var se=class e{constructor(t){this._closed=!1;this._parentOrParents=null;this._subscriptions=null;t&&(this._subscriptions=[t])}get closed(){return this._closed}unsubscribe(){if(this._closed)return;this._closed=!0;let{_parentOrParents:t,_subscriptions:n}=this;if(t instanceof e)t.remove(this);else if(t!==null)for(let r of t)r.remove(this);if(n){for(let r of n)if(ut(r)&&!(r instanceof e))try{r()}catch(o){console.error("Error in unsubscribe function:",o)}else if(Xt(r)&&typeof r.unsubscribe=="function")try{r.unsubscribe()}catch(o){console.error("Error unsubscribing child:",o)}this._subscriptions=null}}add(t){if(!t||t===this)return this;if(t.closed)return this;let{_closed:n,_subscriptions:r}=this;if(n){if(ut(t))try{t()}catch(o){console.error("Error in unsubscribe function:",o)}else if(t.unsubscribe)try{t.unsubscribe()}catch(o){console.error("Error unsubscribing:",o)}return this}return r||(this._subscriptions=[]),this._subscriptions.push(t),t instanceof e&&t._addParent(this),this}remove(t){let{_subscriptions:n}=this;if(!n)return;let r=n.indexOf(t);r!==-1&&(n.splice(r,1),t._removeParent(this))}_addParent(t){let{_parentOrParents:n}=this;n?Array.isArray(n)?n.push(t):this._parentOrParents=[n,t]:this._parentOrParents=t}_removeParent(t){let{_parentOrParents:n}=this;if(n===t)this._parentOrParents=null;else if(Array.isArray(n)){let r=n.indexOf(t);r!==-1&&(n.splice(r,1),n.length===1&&(this._parentOrParents=n[0]))}}};var ie=class extends se{constructor(n,r,o){super();this.isStopped=!1;let s;n?typeof n=="object"?s=n:s={next:n,error:r,complete:o}:s={},this.destination=s}next(n){if(!this.isStopped&&this.destination.next)try{this.destination.next(n)}catch(r){this.error(r)}}error(n){if(!this.isStopped){if(this.isStopped=!0,this.destination.error)try{this.destination.error(n)}catch(r){throw r}else throw n;this.unsubscribe()}}complete(){if(!this.isStopped){if(this.isStopped=!0,this.destination.complete)try{this.destination.complete()}catch(n){this.error(n);return}this.unsubscribe()}}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}},Be=class extends ie{constructor(n,r,o,s){super(n,r,o);this._isUnsubscribing=!1;this._parentSubscriber=null;this._parentSubscriber=s||null}next(n){if(!this.isStopped&&!this._isUnsubscribing)try{super.next(n)}catch(r){this.error(r)}}error(n){if(!this.isStopped&&!this._isUnsubscribing){this._isUnsubscribing=!0;try{super.error(n)}finally{this._isUnsubscribing=!1}}}complete(){if(!this.isStopped&&!this._isUnsubscribing){this._isUnsubscribing=!0;try{super.complete()}finally{this._isUnsubscribing=!1}}}unsubscribe(){this.closed||(this._isUnsubscribing=!0,super.unsubscribe(),this._isUnsubscribing=!1)}};function gr(e){return new ie(e.next,e.error,e.complete)}var j=class extends se{constructor(t){if(super(),t)this._subscribe=t;else throw new TypeError("Observable constructor requires a subscribe function")}subscribe(t,n,r){let o;t instanceof ie?o=t:o=new Be(t,n,r);let{_subscribe:s}=this;try{let i=s.call(this,o);i&&(typeof i=="function"||typeof i.unsubscribe=="function")&&o.add(i)}catch(i){o.error(i)}return o}pipe(...t){return t.length===0?this:t.reduce((n,r)=>r(n),this)}toPromise(){return new Promise((t,n)=>{let r;this.subscribe({next:o=>r=o,error:n,complete:()=>t(r)})})}};var ct=class extends j{constructor(){super(n=>{if(this.closed)throw new Error("Subject has been closed");if(this.hasError)n.error(this.thrownError);else if(this.isStopped)n.complete();else return this.observers.push(n),()=>{let r=this.observers.indexOf(n);r!==-1&&this.observers.splice(r,1)}});this.observers=[];this.isStopped=!1;this.hasError=!1;this.thrownError=null}next(n){if(this.isStopped)return;let{observers:r}=this,o=r.length,s=r.slice();for(let i=0;i<o;i++)s[i].next?.(n)}error(n){if(this.isStopped)return;this.hasError=!0,this.thrownError=n,this.isStopped=!0;let{observers:r}=this;this.observers=[];let o=r.length,s=r.slice();for(let i=0;i<o;i++)s[i].error?.(n)}complete(){if(this.isStopped)return;this.isStopped=!0;let{observers:n}=this;this.observers=[];let r=n.length,o=n.slice();for(let s=0;s<r;s++)o[s].complete?.()}unsubscribe(){this.isStopped=!0,this.observers=[]}asObservable(){return new j(r=>this.subscribe(r))}};var wr="__fluixi_signal_next_state__",Or=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},a=globalThis[wr]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Or,onSuspend:null,onError:null};var Yt=0,Qt=1,ge=2,Le=class{constructor(){this.observers=null;this.watchers=null;this.version=0}updateIfNecessary(){}track(){if(a.untracked)return;let t=a.consumer;t&&((this.observers??=new Set).add(t),(t.sources??=new Set).add(this))}},ue=class extends Le{constructor(t,n){super(),this._value=t,this._equals=n?.equals===!1?()=>!1:n?.equals??Object.is}get(){return this.track(),this._value}set(t){if(!this._equals(this._value,t)){if(this._value=t,this.version++,this.observers)for(let n of[...this.observers])n.markDirty(ge);lt(this)}}peek(){return this._value}},K=class extends Le{constructor(n,r){super();this._threw=!1;this._initialized=!1;this.state=ge;this.sources=null;this._fn=n,this._equals=r?.equals===!1?()=>!1:r?.equals??Object.is}get(){if(a.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===Qt&&this.sources){for(let n of this.sources)if(n.updateIfNecessary(),this.state===ge)break}(this.state===ge||!this._initialized)&&this.recompute(),this.state=Yt}recompute(){if(this.sources){for(let u of this.sources)u.observers?.delete(this);this.sources.clear()}let n=a.consumer,r=a.untracked;a.consumer=this,a.untracked=!1;let o,s=!1,i;try{o=this._fn()}catch(u){s=!0,i=u,o=this._value}finally{a.consumer=n,a.untracked=r}let c=!this._initialized||this._threw!==s||(s?i!==this._error:!this._equals(this._value,o));if(this._initialized=!0,this._threw=s,this._error=i,this._value=o,c){if(this.version++,this.observers)for(let u of[...this.observers])u.markDirty(ge);lt(this)}}markDirty(n){if(this.state>=n)return;let r=this.state===Yt;if(this.state=n,r){if(this.observers)for(let o of[...this.observers])o.markDirty(Qt);lt(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function lt(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}var ae=class{constructor(t){this._watched=new Set;this._pending=new Set;this._notifyFn=t}watch(...t){for(let n of t)this._watched.add(n),(n.watchers??=new Set).add(this)}unwatch(...t){for(let n of t)this._watched.delete(n),n.watchers?.delete(this),this._pending.delete(n)}getPending(){let t=[...this._pending];return this._pending.clear(),t}_notify(t){if(!this._watched.has(t)||this._pending.has(t))return;let n=this._pending.size===0;this._pending.add(t),n&&this._notifyFn()}};function we(e){if(a.untracked)return e();a.untracked=!0;try{return e()}finally{a.untracked=!1}}function Jt(){return a.consumer}function Zt(e){return!!(e.observers&&e.observers.size)||!!(e.watchers&&e.watchers.size)}function en(e){let t=Re(e);return e&&(e.owned??=[]).push(t),t}function tn(e,t=!0){Oe(e,t)}function nn(e){return!!e&&e.disposed===!0}function Re(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function ce(e){let t=Symbol("context");return{id:t,defaultValue:e,Provider:r=>{let o=a.owner,s=Re(o);(s.contexts=new Map).set(t,r.value),o&&(o.owned??=[]).push(s),a.owner=s;try{return r.children}finally{a.owner=o}}}}function rn(e){let t=a.owner;for(;t;){if(t.contexts&&t.contexts.has(e.id))return t.contexts.get(e.id);t=t.parent}return e.defaultValue}function Ve(e,t){let n=e;for(;n;){if(n.contexts&&n.contexts.has(t.id))return n.contexts.get(t.id);n=n.parent}return t.defaultValue}function le(e,t,n){let r=Re(a.owner);(r.contexts=new Map).set(e.id,t),a.owner&&(a.owner.owned??=[]).push(r);let o=a.owner;a.owner=r;try{return n()}finally{a.owner=o}}function on(e){a.onSuspend=e}function sn(e){return a.onSuspend?(a.onSuspend(e,a.owner),!0):!1}function un(e){a.onError=e}function Ae(){return a.owner}function dt(e){let t=a.owner;return a.owner=e,t}function fe(e,t){let n=a.owner;a.owner=e;try{return t()}finally{a.owner=n}}function D(e){if(a.owner){if(a.owner.disposed){e();return}(a.owner.cleanups??=[]).push(e)}}function Oe(e,t=!0){if(!e.disposed){if(e.owned){for(let n=e.owned.length-1;n>=0;n--)Oe(e.owned[n]);e.owned=null}if(e.cleanups){for(let n=e.cleanups.length-1;n>=0;n--)e.cleanups[n]();e.cleanups=null}t&&(e.disposed=!0)}}function X(e){let t=Re(a.owner);a.owner&&(a.owner.owned??=[]).push(t);let n=a.owner;a.owner=t;try{return e(()=>Oe(t))}finally{a.owner=n}}function an(e){a.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Rr(e){e.queued||(e.queued=!0,a.queue.push(e),!a.scheduled&&a.batchDepth===0&&(a.scheduled=!0,a.hostSchedule(Ce)))}function Ce(){if(a.scheduled=!1,a.flushing)return;a.flushing=!0;let e=0;try{for(;a.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let t=a.queue;a.queue=[];for(let n of t)n.queued=!1,n.disposed||n.run()}}finally{a.flushing=!1}}function cn(){a.batchDepth===0&&Ce()}function pt(e){a.batchDepth++;try{return e()}finally{--a.batchDepth===0&&Ce()}}var ft=class{constructor(t){this.queued=!1;this.disposed=!1;this.owner=Re(a.owner),a.owner&&(a.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new K(()=>{Oe(this.owner,!1),fe(this.owner,()=>{let n=t();typeof n=="function"&&(this.owner.cleanups??=[]).push(n)})}),this.watcher=new ae(()=>Rr(this)),this.run(),this.watcher.watch(this.computed)}run(){if(!this.disposed){this.watcher.getPending();try{this.computed.get()}catch(t){if(t&&typeof t.then=="function"&&a.onSuspend){a.onSuspend(t,this.owner);return}if(a.onError&&a.onError(t,this.owner))return;throw t}}}dispose(){this.disposed||(this.disposed=!0,this.watcher.unwatch(this.computed),Oe(this.owner))}};function $e(e){let t=new ft(e);return()=>t.dispose()}function Ar(e){return!!e&&typeof e.then=="function"}an(()=>{});var ln=Symbol.for("signal"),Cr=Symbol.for("memo"),_r=Symbol.for("signal-node");function b(e,t){let n=new ue(e,{equals:t?.equals}),r=(()=>n.get()),o=(s=>{let i=typeof s=="function"?s(n.peek()):s;return n.set(i),cn(),i});return Object.defineProperty(r,ln,{value:!0,enumerable:!0}),Object.defineProperty(r,_r,{value:{get value(){return n.peek()},get version(){return n.version}},enumerable:!1}),[r,o]}function y(e,t,n){let r=t,o=Ae(),s=new K(()=>fe(o,()=>{try{return r=e(r)}catch(c){if(Ar(c))return sn(c),r;throw c}}),{equals:n?.equals}),i=(()=>s.get());return Object.defineProperty(i,ln,{value:!0,enumerable:!0}),Object.defineProperty(i,Cr,{value:!0,enumerable:!0}),i}function U(e,t){let n=t;return $e(()=>{n=e(n)})}function fn(e,t){let n=t;$e(()=>{n=e(n)})}function dn(e,t){let n=t;return $e(()=>{n=e(n)})}function V(e){return pt(e)}function F(e){return we(e)}function ht(e){return pt(e),Promise.resolve()}function pn(){return[()=>!1,ht]}function hn(){return Ce(),Promise.resolve()}function yn(e,t,n){let r=Array.isArray(e),o,s=n?.defer??!1;return i=>{let c=r?e.map(f=>f()):e();if(s){s=!1,o=c;return}let u=we(()=>t(c,o,i));return o=c,u}}function kr(e,t,n){let r=[];return D(()=>{for(let o of r)o.dispose();r=[]}),y(()=>{let o=e()||[];return F(()=>{if(o.length===0){for(let u of r)u.dispose();return r=[],n?.fallback?n.fallback():[]}let s=new Map;for(let u of r)s.has(u.item)||s.set(u.item,u);let i=[],c=new Set;for(let u=0;u<o.length;u++){let f=o[u],v=s.get(f);if(v&&!c.has(v))v.setIndex(u),i.push(v),c.add(v);else{let p,m,S;X(g=>{S=g;let[_,h]=b(u);m=h,p=t(f,_)});let O={item:f,rendered:p,dispose:S,setIndex:m};i.push(O),c.add(O)}}for(let u of r)c.has(u)||u.dispose();return r=i,i.map(u=>u.rendered)})})}function Er(e,t,n,r){let o=[],s=[];return D(()=>{for(let i of s)i.dispose();o=[],s=[]}),y(()=>{let i=e()||[];return F(()=>{if(i.length===0){for(let p of s)p.dispose();return o=[],s=[],r?.fallback?r.fallback():[]}let c=new Map;for(let p=0;p<o.length;p++)c.set(o[p],s[p]);let u=[],f=[],v=new Set;for(let p=0;p<i.length;p++){let m=t(i[p]),S=c.get(m);if(S&&!v.has(m))S.setIndex(p),u.push(S);else{let O,g,_;X(h=>{_=h;let[I,A]=b(p);g=A;let B=y(k=>{let q=(e()||[])[I()];return q??k},i[p]);O=n(B,I)}),u.push({rendered:O,dispose:_,setIndex:g})}f.push(m),v.add(m)}for(let[p,m]of c)v.has(p)||m.dispose();return o=f,s=u,u.map(p=>p.rendered)})})}function Pr(e,t,n){let r=[];return D(()=>{for(let o of r)o.dispose();r=[]}),y(()=>{let o=e()||[];return F(()=>{if(o.length===0){for(let u of r)u.dispose();return r=[],n?.fallback?n.fallback():[]}let s=r.length,i=o.length;for(let u=s;u<i;u++){let f,v,p,m=o[u];X(S=>{p=S;let[O,g]=b(m);v=g,f=t(O,u)}),r.push({rendered:f,setItem:v,dispose:p})}for(let u=i;u<s;u++)r[u].dispose();i<s&&(r=r.slice(0,i));let c=Math.min(s,i);for(let u=0;u<c;u++)r[u].setItem(o[u]);return r.map(u=>u.rendered)})})}var Dr=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0,de=typeof process>"u"?Dr:!1,Fr=Symbol.for("signal"),Ir=Symbol.for("memo"),qr=Symbol.for("resource");function _e(e){return typeof e=="function"&&e[Fr]===!0}function yt(e){return typeof e=="function"&&e[Ir]===!0}function Tt(e){return typeof e=="function"&&e[qr]===!0}function mt(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}function bt(e){return typeof e=="function"&&e[Symbol.for("fluixi-suspense")]===!0}function vt(e){return typeof e=="function"&&e[Symbol.for("fluixi-provider")]===!0}function Ke(e){return Array.isArray(e)?e.length===2&&e[1]===" "?Array.isArray(e[0])?Ke(e[0]):(typeof e[0]=="function",e[0]):e.length===1&&typeof e[0]=="function"?e[0]:e:e}var St=null;function Ot(e){St=e}function Y(e){St&&St(e)}var xt=null;function Rt(e){xt=e}function ke(e){return xt?xt(e):void 0}var gt=null;function At(e){gt=e}function Ee(){return gt?gt():void 0}var wt=null;function Ct(e){wt=e}function Pe(e,t){wt&&wt(e,t)}function Tn(e,t=(n,r)=>n===r){let n=new Map;return U(()=>{let r=e();for(let[o,s]of n){let[i,c]=s,u=t(o,r);i()!==u&&c(u)}}),r=>{let o=n.get(r);if(!o){let[s,i]=b(!1);o=[s,i],n.set(r,o);let c=e();i(t(r,c))}return o[0]()}}function mn(e,t){let[n,r]=b(e(),t);return U(()=>{let o=e();t?.timeoutMs?setTimeout(()=>r(()=>o),t.timeoutMs):typeof requestIdleCallback=="function"?requestIdleCallback(()=>r(()=>o)):Promise.resolve().then(()=>r(()=>o))}),n}function bn(e,t){let n,r=(...o)=>{n!==void 0&&clearTimeout(n),n=setTimeout(()=>{n=void 0,e(...o)},t)};return D(()=>{n!==void 0&&clearTimeout(n)}),r}function Ur(e){return!!e&&typeof e.then=="function"}var _t=Symbol();function pe(e,t,n={}){let r,o;typeof t=="function"?(r=typeof e=="function"?e:()=>e,o=t):(r=()=>!0,o=e,t&&typeof t=="object"&&(n=t));let s=n.transport===!1?void 0:Ee(),i=s!==void 0?ke(s):void 0,c=i!==void 0,[u,f]=b(i!==void 0?i.value:n.initialValue,{equals:!1}),[v,p]=b(void 0,{equals:!1}),[m,S]=b(i!==void 0||n.initialValue!==void 0?"ready":"unresolved",{equals:!1}),[O,g]=b(void 0,{equals:!1}),[_,h]=b(void 0,{equals:!1}),I=_t,A=!1;U(()=>{let C=r();if(_(),C===!1||C===null||C===void 0){I=_t,V(()=>{S("unresolved"),g(void 0),p(void 0)});return}let q=A;if(A=!1,I!==_t&&C===I&&!q)return;if(I=C,c){c=!1;return}let $=!1;D(()=>$=!0);let G=F(m),xe=F(u),ne=G==="ready"||G==="refreshing";V(()=>{S(ne?"refreshing":"pending"),p(void 0)});try{let M=o(C,{value:xe,refetching:ne});Ur(M)?(g(M),Y(M),M.then(z=>{$||(s!==void 0&&Pe(s,z),V(()=>{f(()=>z),S("ready"),g(void 0)}))},z=>{$||V(()=>{p(z),S("errored"),g(void 0)})})):V(()=>{f(()=>M),S("ready"),g(void 0)})}catch(M){if($)return;V(()=>{p(M),S("errored"),g(void 0)})}});let B=()=>{let C=m();return C==="pending"||C==="refreshing"},k=(()=>{let C=v();if(C)throw C;if(B()){let q=O();if(q)throw q}return u()});return Object.defineProperties(k,{state:{get:m},loading:{get:B},error:{get:v},latest:{get:u}}),Object.defineProperty(k,Symbol.for("resource"),{value:!0,enumerable:!0}),Object.defineProperty(k,Symbol.for("signal"),{value:!0,enumerable:!0}),[k,{mutate:f,refetch:()=>{A=!0,h(void 0)}}]}function kt(e,t=300){let[n,r]=b(e),[o,s]=b(e),[i,c]=b(!1),u,f=()=>{u!==void 0&&(clearTimeout(u),u=void 0)},v=()=>{f();let m=F(n);return s(()=>m),c(!1),m},p=(m=>{let S=typeof m=="function"?m(F(n)):m;return r(()=>S),c(!0),f(),u=setTimeout(v,t),S});return D(f),[o,p,{immediate:n,pending:i,flush:v,cancel:()=>{f(),c(!1)}}]}function Mr(e){return e!=null&&e!==""}function vn(e,t,n={}){let{delay:r=300,initialValue:o,shouldFetch:s=Mr}=n,[i,c,u]=kt(e,r),f=()=>s(i())?i():!1,[v,{refetch:p}]=pe(f,t,o===void 0?{}:{initialValue:o});return[v,{...u,query:i,setQuery:c,refetch:p}]}function He(e){if(typeof e=="function"&&!e.length){let t=e();return _e(t)?t:He(t)}if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=He(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function We(e){let t=y(e);return de?y(()=>He(t()),void 0,{name:"children"}):y(()=>He(t()))}var Ge=ce();on((e,t)=>{let n=Ve(t,Ge);n&&(n.increment(),e.finally(()=>n.decrement()))});function Sn(){let[e,t]=b(0),n=0;return{increment:()=>t(n+=1),decrement:()=>t(n-=1),inFallback:()=>e()>0}}function xn(e,t){return le(Ge,e,t)}var gn=ce();un((e,t)=>{let n=Ve(t,gn);return n?(n.setError(e),!0):!1});function wn(){let[e,t]=b(void 0,{equals:!1});return{error:e,reset:()=>t(()=>{}),setError:r=>t(()=>r)}}function On(e,t){return le(gn,e,t)}var Rn={State:ue,Computed:K,subtle:{Watcher:ae,untrack:we,currentComputed:Jt,hasSinks:Zt}};var jr=Symbol.for("signal"),Nr=Symbol.for("fluixi-proxy");function Br(e,t){let[n,r]=b(e,t);return Object.assign(n,{set:r})}function Lr(e,t,n){return y(e,t,n)}function Vr(e,t){return U(e,t)}function An(...e){let[t,n]=pe(...e);return Object.assign(t,n)}var $r="__fluixi_signal_next_state__",Kr=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},l=globalThis[$r]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Kr,onSuspend:null,onError:null},Cn=0,_n=1,De=2,kn=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(l.untracked)return;let e=l.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}},Hr=class extends kn{constructor(e,t){super(),this._value=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){return this.track(),this._value}set(e){if(!this._equals(this._value,e)){if(this._value=e,this.version++,this.observers)for(let t of[...this.observers])t.markDirty(De);Et(this)}}peek(){return this._value}},En=class extends kn{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=De,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(l.consumer===this)throw new Error("Signal.Computed cannot read itself");if(this.track(),this.updateIfNecessary(),this._threw)throw this._error;return this._value}updateIfNecessary(){if(this.state===_n&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===De)break}(this.state===De||!this._initialized)&&this.recompute(),this.state=Cn}recompute(){if(this.sources){for(let i of this.sources)i.observers?.delete(this);this.sources.clear()}let e=l.consumer,t=l.untracked;l.consumer=this,l.untracked=!1;let n,r=!1,o;try{n=this._fn()}catch(i){r=!0,o=i,n=this._value}finally{l.consumer=e,l.untracked=t}let s=!this._initialized||this._threw!==r||(r?o!==this._error:!this._equals(this._value,n));if(this._initialized=!0,this._threw=r,this._error=o,this._value=n,s){if(this.version++,this.observers)for(let i of[...this.observers])i.markDirty(De);Et(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===Cn;if(this.state=e,t){if(this.observers)for(let n of[...this.observers])n.markDirty(_n);Et(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function Et(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}var Wr=class{constructor(e){this._watched=new Set,this._pending=new Set,this._notifyFn=e}watch(...e){for(let t of e)this._watched.add(t),(t.watchers??=new Set).add(this)}unwatch(...e){for(let t of e)this._watched.delete(t),t.watchers?.delete(this),this._pending.delete(t)}getPending(){let e=[...this._pending];return this._pending.clear(),e}_notify(e){if(!this._watched.has(e)||this._pending.has(e))return;let t=this._pending.size===0;this._pending.add(e),t&&this._notifyFn()}};function Gr(e){if(l.untracked)return e();l.untracked=!0;try{return e()}finally{l.untracked=!1}}function Pn(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function Dn(e){let t=Symbol("context");return{id:t,defaultValue:e,Provider:n=>{let r=l.owner,o=Pn(r);(o.contexts=new Map).set(t,n.value),r&&(r.owned??=[]).push(o),l.owner=o;try{return n.children}finally{l.owner=r}}}}function Fn(e,t){let n=e;for(;n;){if(n.contexts&&n.contexts.has(t.id))return n.contexts.get(t.id);n=n.parent}return t.defaultValue}function zr(e){l.onSuspend=e}function Xr(e){return l.onSuspend?(l.onSuspend(e,l.owner),!0):!1}function Yr(e){l.onError=e}function Qr(){return l.owner}function In(e,t){let n=l.owner;l.owner=e;try{return t()}finally{l.owner=n}}function Pt(e,t=!0){if(!e.disposed){if(e.owned){for(let n=e.owned.length-1;n>=0;n--)Pt(e.owned[n]);e.owned=null}if(e.cleanups){for(let n=e.cleanups.length-1;n>=0;n--)e.cleanups[n]();e.cleanups=null}t&&(e.disposed=!0)}}function Jr(e){l.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Zr(e){e.queued||(e.queued=!0,l.queue.push(e),!l.scheduled&&l.batchDepth===0&&(l.scheduled=!0,l.hostSchedule(Dt)))}function Dt(){if(l.scheduled=!1,l.flushing)return;l.flushing=!0;let e=0;try{for(;l.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let t=l.queue;l.queue=[];for(let n of t)n.queued=!1,n.disposed||n.run()}}finally{l.flushing=!1}}function eo(){l.batchDepth===0&&Dt()}function to(e){l.batchDepth++;try{return e()}finally{--l.batchDepth===0&&Dt()}}var no=class{constructor(e){this.queued=!1,this.disposed=!1,this.owner=Pn(l.owner),l.owner&&(l.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new En(()=>{Pt(this.owner,!1),In(this.owner,()=>{let t=e();typeof t=="function"&&(this.owner.cleanups??=[]).push(t)})}),this.watcher=new Wr(()=>Zr(this)),this.run(),this.watcher.watch(this.computed)}run(){if(!this.disposed){this.watcher.getPending();try{this.computed.get()}catch(e){if(e&&typeof e.then=="function"&&l.onSuspend){l.onSuspend(e,this.owner);return}if(l.onError&&l.onError(e,this.owner))return;throw e}}}dispose(){this.disposed||(this.disposed=!0,this.watcher.unwatch(this.computed),Pt(this.owner))}};function ro(e){let t=new no(e);return()=>t.dispose()}function oo(e){return!!e&&typeof e.then=="function"}Jr(()=>{});var qn=Symbol.for("signal"),so=Symbol.for("memo"),io=Symbol.for("signal-node");function Ft(e,t){let n=new Hr(e,{equals:t?.equals}),r=(()=>n.get()),o=(s=>{let i=typeof s=="function"?s(n.peek()):s;return n.set(i),eo(),i});return Object.defineProperty(r,qn,{value:!0,enumerable:!0}),Object.defineProperty(r,io,{value:{get value(){return n.peek()},get version(){return n.version}},enumerable:!1}),[r,o]}function ze(e,t,n){let r=t,o=Qr(),s=new En(()=>In(o,()=>{try{return r=e(r)}catch(c){if(oo(c))return Xr(c),r;throw c}}),{equals:n?.equals}),i=(()=>s.get());return Object.defineProperty(i,qn,{value:!0,enumerable:!0}),Object.defineProperty(i,so,{value:!0,enumerable:!0}),i}function Fe(e,t){let n=t;return ro(()=>{n=e(n)})}function It(e){return to(e)}function Un(e){return Gr(e)}var pi=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0;var uo=Dn();zr((e,t)=>{let n=Fn(t,uo);n&&(n.increment(),e.finally(()=>n.decrement()))});var ao=Dn();Yr((e,t)=>{let n=Fn(t,ao);return n?(n.setError(e),!0):!1});var Xe=Symbol.for("fluixi-proxy");var qe=Symbol("store-raw"),Q=Symbol("store-node"),Mn=Symbol("store-has"),Qe=Symbol("store-self"),Je=Symbol("store-track"),Kn=Symbol("store-name"),Hn=Symbol("store-store"),jn=new WeakMap,Nn=new WeakMap;function Wn(e){let[t,n]=Ft(e),r=t;return r.$=n,r}function Ze(e){let t=jn.get(e);return t||jn.set(e,t={keys:new Map}),t}function Bn(e,t,n){let r=e.keys.get(t);return r||e.keys.set(t,r=Wn(n)),r}function Ln(e){let t=Ze(e);(t.all||(t.all=Wn()))()}function Vn(e,t){e.$(typeof t=="function"?()=>t:t)}function Gn(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 Ye(e){if(!Gn(e))return e;let t=Nn.get(e);if(t)return t;let n=new Proxy(e,co);return Nn.set(e,n),n}var co={get(e,t,n){if(t===qe||t===Q)return e;if(t===Xe)return n;if(t===Mn)return i=>i in e;if(t==="__proxy")return!0;if(t===Je||t===Qe)return Ln(e),n;let r=e[t];if(typeof r=="function"&&!Object.prototype.hasOwnProperty.call(e,t))return r;let o=Object.getOwnPropertyDescriptor(e,t);if(o&&o.get)return o.get.call(n);let s=Bn(Ze(e),t,r)();return Gn(s)?Ye(s):s},set(){return!0},deleteProperty(e,t){return t in e&&Ie(e,t,void 0),!0},has(e,t){return t===qe||t===Xe||t===Q||t===Mn||t===Qe||t===Je?!0:(Bn(Ze(e),t,e[t])(),t in e)},ownKeys(e){return Ln(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function Ie(e,t,n){if(e[t]===n&&(n!==void 0||t in e))return;let o=Array.isArray(e),s=o?e.length:0;n===void 0?delete e[t]:e[t]=n;let i=Ze(e),c=i.keys.get(t);if(c&&Vn(c,n),o&&e.length!==s){let u=i.keys.get("length");u&&Vn(u,e.length)}i.all&&i.all.$(void 0)}function $n(e,t){return typeof e=="function"?e(t):e}function Ut(e,t){for(let n of Object.keys(t)){let r=t[n],o=e[n];r&&typeof r=="object"&&!Array.isArray(r)&&o&&typeof o=="object"&&!Array.isArray(o)?Ut(o,r):Ie(e,n,r)}}function jt(e){let t=[],n=e.replace(/\[([^\]]*)\]/g,".$1");for(let r of n.split("."))r.length&&t.push(r);return t}function zn(e,t,n){let r=t.length-1;for(let s=0;s<r;s++){let i=t[s];if(i==="*"){let u=t.slice(s+1);if(Array.isArray(e))for(let f=0;f<e.length;f++)zn(e[f],u,n);return}let c=e[i];(c==null||typeof c!="object")&&(c=/^\d+$/.test(t[s+1])?[]:{},Ie(e,i,c)),e=c}let o=t[r];if(o==="*"){if(Array.isArray(e))for(let s=0;s<e.length;s++)Ie(e,s,$n(n,e[s]));return}Ie(e,o,$n(n,e[o]))}function qt(e,t,n){zn(e,jt(t),n)}function lo(e,t){let n=t[0];if(typeof n=="function"&&t.length===1){let r=n(e);r&&r!==e&&Ut(e,r);return}if(Array.isArray(n)&&t.length===1){for(let r of n)Array.isArray(r)&&qt(e,r[0],r[1]);return}if(n&&typeof n=="object"&&!Array.isArray(n)&&t.length===1){Ut(e,n);return}if(Array.isArray(t[1])&&t.length>=3){qt(e,`${n}.${t[1].join(".")}`,t[2]);return}qt(e,String(n),t[1])}function Mt(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(Mt);let t={};for(let n of Object.keys(e))t[n]=Mt(e[n]);return t}function he(e,t){let n=e;for(let r of jt(t)){if(n==null)return;n=n[r]}return n}var H=class{constructor(t,n={immutable:!0}){this.options=n;this.root=t,this.set=((...r)=>It(()=>lo(this.root,r)))}get state(){return Ye(this.root)}get proxy(){return Ye(this.root)}get accessor(){return(()=>Ye(this.root))}unwrap(){return this.root}getNode(t){return this.root&&this.root[t]}get(t){if(t==null||t==="")return ye(this.state);let n=this.state;for(let r of jt(t)){if(n==null)return;n=n[r]}return ye(n)}select(t){return ze(()=>t(this.state))}subscribe(t){return Fe(()=>t(this.state))}watch(t,n){let r;return Fe(()=>{let o=t(this.state);Object.is(o,r)||(n(o,r),r=o)})}reactive(t){return ze(()=>this.state[t])}produce(t){this.set((n=>{let r=Mt(n);return t(r),r}))}reconcile(t,n={}){this.set(t)}push(t,...n){let r=he(this.root,t);this.set(t,r.concat(n))}pop(t){let n=he(this.root,t).slice(),r=n.pop();return this.set(t,n),r}shift(t){let n=he(this.root,t).slice(),r=n.shift();return this.set(t,n),r}splice(t,n,r,...o){let s=he(this.root,t).slice(),i=s.splice(n,r,...o);return this.set(t,s),i}insert(t,n,r){let o=he(this.root,t).slice();o.splice(n,0,r),this.set(t,o)}removeAt(t,n){let r=he(this.root,t).slice(),o=r.splice(n,1);return this.set(t,r),o}toObservable(){let[t]=Ft(this.state);return t.toObservable()}dispose(){}},fo=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","unwrap","toObservable"];function Xn(e,t){for(let n of fo)e[n]=t[n].bind(t);e.$=t.reactive.bind(t)}function Ue(e,t={immutable:!0}){let n=new H(e,t);return Xn(n.set,n),[n.proxy,n.set]}function Nt(e,t={}){return new H(e,{...t,immutable:!1})}function Yn(e,t={}){let n=new H(e(),t);return Fe(()=>n.set(e())),n}function Qn(e,t,n){return Fe(()=>n(t(e)))}function Jn(e,t,n){return ze(()=>t(e),void 0,n)}function Zn(e,t={}){let n=new H(e,t),r=(()=>n.proxy);return Xn(r,n),r}function ye(e){if(e==null||typeof e!="object")return e;let t=e[qe];return t!==void 0?t:e}function Bt(e){return Un(()=>ye(e))}function er(e){return et(e)}function tr(e){return et(e)?e[Q]:null}function nr(e){return e&&typeof e=="object"&&Q in e?e[Q]:null}function et(e){return!!e&&typeof e=="object"&&(Xe in e||e.__proxy===!0)}function rr(e){return e}var or=Object.freeze({createStore:Ue,createMutableStore:Nt,batch:It,unwrap:ye,untrackStore:Bt});function Lt(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(Lt);let t={};for(let n of Object.keys(e))t[n]=Lt(e[n]);return t}function sr(e){return t=>{let n=Lt(t);return e(n),n}}function ir(e,t={}){return()=>e}function ur(e,t){let[n,r]=Ue(e,t);return new Proxy(n,{get:(o,s)=>s==="set"?r:o[s],has:(o,s)=>s==="set"||Reflect.has(o,s)})}function po(e,t,n){return y(()=>t(e()),void 0,n)}function ho(e,t,n){return y(()=>e().filter(t),void 0,n)}function yo(e,t,n,r){return y(()=>e().reduce(t,n),void 0,r)}function To(e,t,n){return y(()=>e().find(t),void 0,n)}function mo(e,t,n){return y(()=>e().some(t),void 0,n)}function bo(e,t,n){return y(()=>e().every(t),void 0,n)}function vo(e,t,n){return y(()=>[...e()].sort(t),void 0,n)}function So(e,t){return y(()=>[...new Set(e())],void 0,t)}function xo(e,t,n){return y(()=>{let r=e.map(o=>o());return t(r)},void 0,n)}function go(...e){return new j(t=>{let n=()=>e.map(o=>typeof o=="function"?o():o.get()),r=e.map(o=>typeof o=="function"&&o.subscribe?o.subscribe(()=>{t.next(n())}):typeof o!="function"?o.subscribe(()=>{t.next(n())}):U(()=>{t.next(n())}));return()=>{r.forEach(o=>{typeof o=="function"?o():o&&typeof o.unsubscribe=="function"&&o.unsubscribe()})}})}function wo(e,t,n){return y(()=>e()||t(),void 0,n)}function Oo(e,t,n,r){return y(()=>n(e(),t()),void 0,r)}function Ro(e,t,n){return y(()=>t(e()),void 0,{equals:n,internal:!0})}function Ao(e,t,n){return y(()=>{let r=e(),o={};for(let s of t)o[s]=r[s];return o},void 0,n)}function Co(e,t,n){return y(()=>{let o={...e()};for(let s of t)delete o[s];return o},void 0,n)}function _o(e,t,n,r){return y(()=>e()?t():n(),void 0,r)}function ko(e,t,n){return y(()=>e()?t():void 0,void 0,n)}function Eo(e,t,n){let[r,o]=b(e()),s;return y(()=>{let i=e();clearTimeout(s),s=setTimeout(()=>o(()=>i),t)}),r}function Po(e,t,n){let[r,o]=b(e()),s=0,i;return y(()=>{let c=e(),u=Date.now();u-s>=t?(s=u,o(()=>c)):(clearTimeout(i),i=setTimeout(()=>{s=Date.now(),o(()=>c)},t-(u-s)))}),r}function Do(e){let t=e;for(;typeof t=="function";)t=t();return t}var Fo=Symbol.for("signal");var ar=Symbol("fluixi-proxy"),Io=Symbol.for("signal-node"),Me=0,$t=1,ot=2,me=3,x=null,R=null,d=null,nt=null,rt=0,qo=!1,Vt=!1,Te=0,Uo=1e6,W=new WeakMap,tt=null;var Mo=new Map,jo=0;function No(){return`node_${++jo}_${Date.now()}`}function Bo(e){de&&Mo.set(e.id,new WeakRef(e))}function Lo(e,t,n){let r={id:No(),type:e,value:t,version:0,equals:n?.equals,name:n?.name,created:Date.now(),updated:Date.now()};return Bo(r),r}function Vo(e,t){return e===t}function lr(e){throw typeof console<"u"&&console.error("Reactive error:",e),e}function $o(e){if(d)d.indexOf(e)===-1&&d.push(e);else if(tt&&tt.running&&!e.pure)tt.effects.indexOf(e)===-1&&tt.effects.push(e);else if(!e.pure||e.computed)Ht(e);else if(e.pure&&!e.computed&&e.accessor){let t=R,n=d;R=null,d=[],e.accessor(),R=t;let r=d;if(d=n,r.length>0){let o=d;st(r),d=o}}}function cr(e,t){for(let n=0;n<e.length;n++)t(e[n])}function J(e,t){let n=e;typeof n=="object"&&n&&ar in n&&delete n[ar];let r=Lo("signal",n,{equals:t?.equals===!1?void 0:t?.equals,name:t?.name}),o=[i,c];W.set(o,new Set);let s;function i(){let u=R;if(u){u.sources?u.sources.indexOf(o)===-1&&u.sources.push(o):u.sources=[o];let f=W.get(o);f&&!f.has(u)&&f.add(u)}return n}function c(u){let f=typeof u=="function"?u(n):u,v=r.equals||Vo;if(t?.equals===!1||!v(n,f)){n=f,r.value=f,r.version++,r.updated=Date.now();let m=W.get(o);if(m&&m.size>0){let _=function(h,I=!1){let A=h.state;if(!(A===me&&h===R)){if(I&&!h.pure){A===Me&&(h.state=$t,qo&&(d!==null&&d.indexOf(h)===-1?d.push(h):O.push(h)));return}if(!g.has(h)&&(g.add(h),h.state=ot,A===Me||A===$t?O.push(h):!h.pure&&d!==null&&d.indexOf(h)===-1&&d.push(h),h.pure&&h.accessor)){let B=W.get(h.accessor);B&&cr(Array.from(B),k=>_(k,!0))}}};var p=_;let S=Array.from(m),O=[],g=new Set;cr(S,_);for(let h of O)$o(h)}}}return i.toObservable=()=>new j(u=>{let f=!0;return Kt(()=>{let p=i();f?f=!1:u.next(p)})}),Object.defineProperty(i,Fo,{value:!0,enumerable:!0}),Object.defineProperty(i,Io,{value:r,enumerable:!1}),o}function Kt(e,t,n){let r={fn:e,state:ot,sources:null,sourceSlots:null,owned:null,cleanups:null,owner:x,contexts:null,pure:!1,updatedAt:null};x&&(x.owned?x.owned.push(r):x.owned=[r]);let o=N&&Se(N);return o&&(r.suspense=o),fr(r,t),()=>be(r)}function fr(e,t){if(e.sources){for(let o of e.sources){let s=W.get(o);s&&s.delete(e)}e.sources=null,e.sourceSlots=null}if(e.owned){for(let o=0;o<e.owned.length;o++)be(e.owned[o]);e.owned=null}let n=R,r=x;if(R=e,x=e,rt++,rt>Uo)throw rt=0,R=n,x=r,new Error("Potential infinite loop detected. Exceeded maximum iterations.");try{e.state=me;let o=e.fn(t);typeof o=="function"&&(e.cleanups?e.cleanups.push(o):e.cleanups=[o]),e.state===me&&(e.state=Me)}catch(o){if(at(o)){let s=N&&Se(N);s&&(s.increment(),o.finally(()=>s.decrement()),e.suspense&&s.effects.push(e));return}lr(o)}finally{R=n,x=r}}function Ht(e){if(!(e.disposed||!e.fn||e.state===Me)&&(e.state===ot||e.state===$t||e.state===me)){if(e.cleanups){for(let t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}if(e.owned){for(let t=0;t<e.owned.length;t++)be(e.owned[t]);e.owned=null}e.renderEffect?pr(e):fr(e,e.value)}}function be(e){if(e.disposed=!0,e.sources)for(let t of e.sources){let n=W.get(t);n&&n.delete(e)}if(e.cleanups)for(let t=0;t<e.cleanups.length;t++)e.cleanups[t]();if(e.owned)for(let t=0;t<e.owned.length;t++)be(e.owned[t]);if(e.owner&&e.owner.owned){let t=e.owner.owned.indexOf(e);t!==-1&&e.owner.owned.splice(t,1)}}function st(e){let t=[],n=[];for(let o of e)o.pure&&!o.computed&&o.accessor?t.indexOf(o)===-1&&t.push(o):(o.computed||!o.pure)&&n.indexOf(o)===-1&&n.push(o);d=[];let r=0;for(;r<t.length;){let o=t[r++],s=W.get(o.accessor);if(s&&s.size>0){let c=R;R=null,o.accessor(),R=c}let i=d.splice(0);for(let c of i)c.pure&&!c.computed&&c.accessor?t.indexOf(c)===-1&&t.push(c):(c.computed||!c.pure)&&n.indexOf(c)===-1&&n.push(c)}d=null;for(let o of n)(o.computed||!o.pure)&&Ht(o)}function Z(e){if(d&&Te>0)return e();if(d&&Te===0){let t=d,n=[];d=n,Te++;let r;try{r=e()}finally{Te--,d=t}let o=d;return st(n),d=o,r}Te++,d=[],nt=[];try{return e()}finally{Te--,Ko()}}function Ko(){if(!Vt){Vt=!0,rt=0;try{for(;d&&d.length>0;){let e=d;d=null,st(e)}if(d=null,nt){let e=nt;nt=null;for(let t=0;t<e.length;t++)Ht(e[t])}}finally{Vt=!1}}}function ve(e){let t=R;R=null;try{return e()}finally{R=t}}function dr(e){x&&(x.cleanups?x.cleanups.push(e):x.cleanups=[e])}function Ho(e){let t=Symbol("context"),n=Wo(t);return{id:t,Provider:n,defaultValue:e}}function Wo(e){return t=>{let n=x;for(;n;)n.contexts||(n.contexts=new Map),n.contexts.has(e)||n.contexts.set(e,t.value),n=n.owner;let r;return Go(()=>{r=ve(()=>{let o=x;return o&&(o.contexts||(o.contexts=new Map),o.contexts.set(e,t.value)),We(()=>t.children)})}),r}}function Se(e){let t=x;for(;t;){if(t.contexts&&t.contexts.has(e.id))return t.contexts.get(e.id);t=t.owner}if(e)return e.defaultValue}function Go(e,t,n){let r={fn:e,state:ot,sources:null,sourceSlots:null,value:t,owned:null,cleanups:null,owner:x,contexts:null,pure:!1,updatedAt:null,renderEffect:!0};x&&(x.owned?x.owned.push(r):x.owned=[r]);let o=N&&Se(N);return o&&(r.suspense=o),pr(r),()=>be(r)}function pr(e){if(e.sources){for(let o of e.sources){let s=W.get(o);s&&s.delete(e)}e.sources=null,e.sourceSlots=null}if(e.cleanups){for(let o=0;o<e.cleanups.length;o++)e.cleanups[o]();e.cleanups=null}if(e.owned){for(let o=0;o<e.owned.length;o++)be(e.owned[o]);e.owned=null}let t=R,n=x,r=d;R=e,x=e,d===null&&(d=[]),e.state=me;try{let o=e.fn(e.value);typeof o=="function"&&(e.cleanups||(e.cleanups=[]),e.cleanups.push(o)),e.value=o,e.state===me&&(e.state=Me)}catch(o){if(at(o)){let s=N&&Se(N);s&&(s.increment(),o.finally(()=>s.decrement()),e.suspense&&s.effects.push(e));return}lr(o)}finally{R=t,x=n;let o=d;if(d=r,o!==r&&o&&o.length>0){let s=d;st(o),d=s}}}var N;function hr(){return N||(N=Ho())}var te=new Map,ee=new Map,zo=0,Xo=Symbol.for("signal"),Yo=Symbol.for("resource");function Qo(e,t,n={}){let r,o,s;typeof t=="function"?(r=e,o=t,s=n):(r=()=>!0,o=e,s=t??n);let{ttl:i=1/0,name:c=`_auto_${zo++}`,staleWhileRevalidate:u=!0}=s,f=c,v=T=>`${f}:${JSON.stringify(T)}`,p=T=>i===1/0||Date.now()-T.timestamp<=i,[m,S]=J(void 0,{equals:!1}),[O,g]=J("unresolved",{equals:!1}),[_,h]=J(void 0,{equals:!1}),[I,A]=J(void 0,{equals:!1}),[B,k]=J(!1),[C,q]=J(0,{equals:!1}),$=Symbol("unset"),G=$,xe=!1,ne=!1;function M(T,E,P,L){if(ee.has(E)){ee.get(E).then(w=>{L()||z(w,P)},w=>{!L()&&!P&&Wt(w)}),P||A(ee.get(E));return}let re=Promise.resolve(o(T)).then(w=>(te.set(E,{value:w,timestamp:Date.now()}),ee.delete(E),w),w=>{throw ee.delete(E),w});if(ee.set(E,re),!P){Y(re),A(re);let w=je&&Se(je);w&&(w.increment(),re.finally(()=>w.decrement()))}re.then(w=>{L()||z(w,P)},w=>{!L()&&!P&&Wt(w)})}function z(T,E){Z(()=>{S(()=>T),g("ready"),k(!1),A(void 0),h(void 0)})}function Wt(T){Z(()=>{h(T),g("errored"),A(void 0)})}let je;Kt(()=>{je===void 0&&(je=hr());let T=r();if(C(),T===!1||T===null||T===void 0){G=$,Z(()=>{g("unresolved"),A(void 0),h(void 0)});return}let E=xe,P=ne;xe=!1,ne=!1;let L=v(T);P&&te.delete(L);let re=G===$||T!==G;G=T;let w=!1;dr(()=>{w=!0});let oe=te.get(L);if(oe&&p(oe)&&!E&&!P){(ve(O)!=="ready"||ve(m)!==oe.value)&&Z(()=>{S(()=>oe.value),g("ready"),k(!1),h(void 0)});return}if(oe&&u&&!P){Z(()=>{S(()=>oe.value),g("ready"),k(!0),h(void 0),A(void 0)}),M(T,L,!0,()=>w);return}let Gt=ve(O),yr=Gt==="ready"||Gt==="refreshing";Z(()=>{g(yr?"refreshing":"pending"),h(void 0),k(!1)}),M(T,L,!1,()=>w)});let Ne=(()=>{let T=_();if(T)throw T;if(O()==="pending"){let P=I();if(P)throw P}return m()});return Object.defineProperty(Ne,Yo,{value:!0,enumerable:!0}),Object.defineProperty(Ne,Xo,{value:!0,enumerable:!0}),Object.defineProperties(Ne,{state:{get:O},loading:{get:()=>{let T=O();return T==="pending"||T==="refreshing"}},error:{get:_},latest:{get:m},stale:{get:B}}),[Ne,{mutate:S,refetch:()=>{xe=!0,q(T=>T+1)},invalidate:()=>{let T=ve(r);T!=null&&T!==!1&&te.delete(v(T)),ne=!0,q(E=>E+1)}}]}function Jo(e){let t=`${e}:`;for(let n of te.keys())n.startsWith(t)&&te.delete(n)}function Zo(){te.clear(),ee.clear()}return xr(es);})();
1
+ /*! @fluixi/reactive v1.0.0-alpha.84 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
2
+ "use strict";var Fluixi=(()=>{var ot=Object.defineProperty;var Rn=Object.getOwnPropertyDescriptor;var kn=Object.getOwnPropertyNames;var An=Object.prototype.hasOwnProperty;var _n=(e,t)=>{for(var r in t)ot(e,r,{get:t[r],enumerable:!0})},En=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of kn(t))!An.call(e,o)&&o!==r&&ot(e,o,{get:()=>t[o],enumerable:!(n=Rn(t,o))||n.enumerable});return e};var Cn=e=>En(ot({},"__esModule",{value:!0}),e);var ys={};_n(ys,{$NAME:()=>sn,$NODE:()=>J,$PROXY:()=>Xn,$RAW:()=>ye,$SELF:()=>Qe,$SIGNAL:()=>Yn,$STORE:()=>un,$TRACK:()=>Ze,Observable:()=>$,SafeSubscriber:()=>Pe,Signal:()=>Ur,Store:()=>G,StoreAPI:()=>Sn,Subject:()=>it,Subscriber:()=>oe,Subscription:()=>ne,SuspenseContext:()=>We,VERSION:()=>Y,__DEV__:()=>$e,batch:()=>x,childOwner:()=>oo,clearAllCachedResources:()=>hs,clearCachedResourceNamespace:()=>ps,combineSignal:()=>Jo,combineSignals:()=>Qo,computed:()=>ro,context:()=>no,createCachedResource:()=>ds,createChildOwner:()=>Ue,createComputed:()=>qe,createComputedStore:()=>dn,createContext:()=>L,createDebounce:()=>_r,createDebouncedResource:()=>Er,createDebouncedSignal:()=>St,createDeferred:()=>Ar,createEffect:()=>E,createErrorBoundary:()=>jr,createMemo:()=>h,createMutableStore:()=>Ft,createRenderEffect:()=>Be,createResource:()=>de,createRoot:()=>N,createSelector:()=>kr,createSignal:()=>d,createStore:()=>Ee,createStoreEffect:()=>pn,createStoreMemo:()=>hn,createSuspenseBoundary:()=>Pr,debounceSignal:()=>is,disposeScope:()=>sr,distinctSignal:()=>Xo,effect:()=>Zn,everySignal:()=>zo,filterSignal:()=>Lo,findSignal:()=>Go,flush:()=>yr,getNode:()=>bn,getOwner:()=>Oe,getServerData:()=>Ve,getStoreNode:()=>mn,guardSignal:()=>ss,indexArray:()=>Kn,isComponent:()=>Tr,isMemo:()=>br,isOwnerDisposed:()=>ir,isProvider:()=>wr,isResource:()=>mr,isSignal:()=>Ke,isStore:()=>vn,isStoreProxy:()=>nt,isSuspense:()=>Sr,joinedVersions:()=>Ht,keyArray:()=>$n,makeArrayFlat:()=>ht,mapArray:()=>Bn,mapSignal:()=>Vo,memo:()=>Qn,mergeSignal:()=>Zo,modifiable:()=>Tn,nextResourceId:()=>Le,observeReactiveNodes:()=>ut,omitSignal:()=>ns,on:()=>vr,onCleanup:()=>S,operate:()=>Pn,pickSignal:()=>rs,produceUtil:()=>wn,provide:()=>ce,provideErrorBoundary:()=>Fr,provideSuspense:()=>Dr,readChildren:()=>Cr,readSignal:()=>as,reconcileUtil:()=>gn,reduceSignal:()=>Ho,renderEffect:()=>to,reportReactiveBinding:()=>Qt,reportReactiveContext:()=>se,reportReactiveContextCreated:()=>je,reportReactiveDirective:()=>er,reportReactiveProps:()=>Zt,reportResourceData:()=>He,resource:()=>Mr,root:()=>eo,runWithOwner:()=>le,selectSignal:()=>ts,setOwner:()=>ft,setResourceDataSink:()=>Rr,setResourceIdSource:()=>Or,setResourceTracker:()=>gr,setServerDataGetter:()=>xr,signal:()=>Jn,someSignal:()=>Wo,sortSignal:()=>Yo,startTransition:()=>pt,store:()=>xn,throttleSignal:()=>us,trackResourcePromise:()=>fe,untrack:()=>w,untrackStore:()=>Ut,unwrap:()=>be,useContext:()=>ur,useTransition:()=>hr,whenSignal:()=>os,wrap:()=>yn,zipSignal:()=>es});var Y="1.0.0-alpha.84";function st(e){return typeof e=="function"&&!/^class\s/.test(Function.prototype.toString.call(e))}function Bt(e){return 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"}var ne=class e{constructor(t){this._closed=!1;this._parentOrParents=null;this._subscriptions=null;t&&(this._subscriptions=[t])}get closed(){return this._closed}unsubscribe(){if(this._closed)return;this._closed=!0;let{_parentOrParents:t,_subscriptions:r}=this;if(t instanceof e)t.remove(this);else if(t!==null)for(let n of t)n.remove(this);if(r){for(let n of r)if(st(n)&&!(n instanceof e))try{n()}catch(o){console.error("Error in unsubscribe function:",o)}else if(Bt(n)&&typeof n.unsubscribe=="function")try{n.unsubscribe()}catch(o){console.error("Error unsubscribing child:",o)}this._subscriptions=null}}add(t){if(!t||t===this)return this;if(t.closed)return this;let{_closed:r,_subscriptions:n}=this;if(r){if(st(t))try{t()}catch(o){console.error("Error in unsubscribe function:",o)}else if(t.unsubscribe)try{t.unsubscribe()}catch(o){console.error("Error unsubscribing:",o)}return this}return n||(this._subscriptions=[]),this._subscriptions.push(t),t instanceof e&&t._addParent(this),this}remove(t){let{_subscriptions:r}=this;if(!r)return;let n=r.indexOf(t);n!==-1&&(r.splice(n,1),t._removeParent(this))}_addParent(t){let{_parentOrParents:r}=this;r?Array.isArray(r)?r.push(t):this._parentOrParents=[r,t]:this._parentOrParents=t}_removeParent(t){let{_parentOrParents:r}=this;if(r===t)this._parentOrParents=null;else if(Array.isArray(r)){let n=r.indexOf(t);n!==-1&&(r.splice(n,1),r.length===1&&(this._parentOrParents=r[0]))}}};var oe=class extends ne{constructor(r,n,o){super();this.isStopped=!1;let s;r?typeof r=="object"?s=r:s={next:r,error:n,complete:o}:s={},this.destination=s}next(r){if(!this.isStopped&&this.destination.next)try{this.destination.next(r)}catch(n){this.error(n)}}error(r){if(!this.isStopped){if(this.isStopped=!0,this.destination.error)try{this.destination.error(r)}catch(n){throw n}else throw r;this.unsubscribe()}}complete(){if(!this.isStopped){if(this.isStopped=!0,this.destination.complete)try{this.destination.complete()}catch(r){this.error(r);return}this.unsubscribe()}}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}},Pe=class extends oe{constructor(r,n,o,s){super(r,n,o);this._isUnsubscribing=!1;this._parentSubscriber=null;this._parentSubscriber=s||null}next(r){if(!this.isStopped&&!this._isUnsubscribing)try{super.next(r)}catch(n){this.error(n)}}error(r){if(!this.isStopped&&!this._isUnsubscribing){this._isUnsubscribing=!0;try{super.error(r)}finally{this._isUnsubscribing=!1}}}complete(){if(!this.isStopped&&!this._isUnsubscribing){this._isUnsubscribing=!0;try{super.complete()}finally{this._isUnsubscribing=!1}}}unsubscribe(){this.closed||(this._isUnsubscribing=!0,super.unsubscribe(),this._isUnsubscribing=!1)}};function Pn(e){return new oe(e.next,e.error,e.complete)}var $=class extends ne{constructor(t){if(super(),t)this._subscribe=t;else throw new TypeError("Observable constructor requires a subscribe function")}subscribe(t,r,n){let o;t instanceof oe?o=t:o=new Pe(t,r,n);let{_subscribe:s}=this;try{let i=s.call(this,o);i&&(typeof i=="function"||typeof i.unsubscribe=="function")&&o.add(i)}catch(i){o.error(i)}return o}pipe(...t){return t.length===0?this:t.reduce((r,n)=>n(r),this)}toPromise(){return new Promise((t,r)=>{let n;this.subscribe({next:o=>n=o,error:r,complete:()=>t(n)})})}};var it=class extends ${constructor(){super(r=>{if(this.closed)throw new Error("Subject has been closed");if(this.hasError)r.error(this.thrownError);else if(this.isStopped)r.complete();else return this.observers.push(r),()=>{let n=this.observers.indexOf(r);n!==-1&&this.observers.splice(n,1)}});this.observers=[];this.isStopped=!1;this.hasError=!1;this.thrownError=null}next(r){if(this.isStopped)return;let{observers:n}=this,o=n.length,s=n.slice();for(let i=0;i<o;i++)s[i].next?.(r)}error(r){if(this.isStopped)return;this.hasError=!0,this.thrownError=r,this.isStopped=!0;let{observers:n}=this;this.observers=[];let o=n.length,s=n.slice();for(let i=0;i<o;i++)s[i].error?.(r)}complete(){if(this.isStopped)return;this.isStopped=!0;let{observers:r}=this;this.observers=[];let n=r.length,o=r.slice();for(let s=0;s<n;s++)o[s].complete?.()}unsubscribe(){this.isStopped=!0,this.observers=[]}asObservable(){return new $(n=>this.subscribe(n))}};var Kt=Y.split(".")[0],$t=`__fluixi_signal_state_v${Kt}__`,Vt=`__fluixi_signal_builds_v${Kt}__`,Dn=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};function Lt(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Dn,onSuspend:null,onError:null,observer:null}}var De=globalThis;function In(e){let t=Lt(),r=e;for(let n of Object.keys(t))n in e||(r[n]=t[n]);return e}function jn(){let e=De[$t];return e?In(e):De[$t]=Lt()}var u=jn();(De[Vt]??=[]).push(Y);function Ht(){return[...new Set(De[Vt]??[])]}function ut(e){return u.observer=e,()=>{u.observer===e&&(u.observer=null)}}var k=[],Ie;function Wt(e,t){if(!u.observer)return t();let r=Ie;Ie=e;try{return t()}finally{Ie=r}}function X(e){let t=u.observer;t&&t.created(e.parents===void 0?{...e,parents:k,origin:e.origin??Ie}:e)}function zt(e){return u.observer?(k.push(e),!0):!1}function Yt(){k.pop()}function Xt(e){u.observer?.ran?.(e)}function Jt(e,t){u.observer?.wrote?.(e,t)}function Qt(e,t,r,n){let o=u.observer;!o?.bound||!k.length||o.bound(k[k.length-1],e,t,r,n)}function Zt(e){let t=u.observer;!t?.props||!k.length||!e||t.props(k[k.length-1],e)}function er(e,t,r,n){let o=u.observer;!o?.directive||!k.length||o.directive(k[k.length-1],e,t,r,n)}function je(e){u.observer?.contextCreated?.(e)}function se(e,t,r){let n=u.observer;!n?.context||!k.length||n.context(k[k.length-1],e,t,r)}function at(e,t,r){u.observer?.moved?.(e,t,r)}function K(e){u.observer?.disposed?.(e)}var Fn="__FLUIXI_DEVTOOLS_HOOK__",Gt=globalThis[Fn];if(typeof Gt?.inject=="function")try{Gt.inject({observeReactiveNodes:ut,version:Y})}catch{}function ie(){return u.observer!=null}var tr=0,rr=1,Se=2,Fe=class{constructor(){this.observers=null;this.watchers=null;this.version=0}updateIfNecessary(){}track(){if(u.untracked)return;let t=u.consumer;t&&((this.observers??=new Set).add(t),(t.sources??=new Set).add(this))}},ue=class extends Fe{constructor(t,r){super(),this._value=t,this._equals=r?.equals===!1?()=>!1:r?.equals??Object.is}get(){return this.track(),this._value}set(t){if(!this._equals(this._value,t)){if(this._value=t,this.version++,Jt(this,u.consumer),this.observers)for(let r of[...this.observers])r.markDirty(Se);ct(this)}}peek(){return this._value}},V=class extends Fe{constructor(r,n){super();this._threw=!1;this._initialized=!1;this.state=Se;this.sources=null;this._fn=r,this._equals=n?.equals===!1?()=>!1:n?.equals??Object.is}get(){if(u.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===rr&&this.sources){for(let r of this.sources)if(r.updateIfNecessary(),this.state===Se)break}(this.state===Se||!this._initialized)&&this.recompute(),this.state=tr}recompute(){if(this.sources){for(let f of this.sources)f.observers?.delete(this);this.sources.clear()}let r=u.consumer,n=u.untracked,o=zt(this);u.consumer=this,u.untracked=!1;let s,i=!1,a;try{s=this._fn()}catch(f){i=!0,a=f,s=this._value}finally{u.consumer=r,u.untracked=n,o&&Yt()}let c=!this._initialized||this._threw!==i||(i?a!==this._error:!this._equals(this._value,s));if(this._initialized=!0,this._threw=i,this._error=a,this._value=s,Xt(this),c){if(this.version++,this.observers)for(let f of[...this.observers])f.markDirty(Se);ct(this)}}markDirty(r){if(this.state>=r)return;let n=this.state===tr;if(this.state=r,n){if(this.observers)for(let o of[...this.observers])o.markDirty(rr);ct(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function ct(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}var ae=class{constructor(t){this._watched=new Set;this._pending=new Set;this._notifyFn=t}watch(...t){for(let r of t)this._watched.add(r),(r.watchers??=new Set).add(this)}unwatch(...t){for(let r of t)this._watched.delete(r),r.watchers?.delete(this),this._pending.delete(r)}getPending(){let t=[...this._pending];return this._pending.clear(),t}_notify(t){if(!this._watched.has(t)||this._pending.has(t))return;let r=this._pending.size===0;this._pending.add(t),r&&this._notifyFn()}};function we(e){if(u.untracked)return e();u.untracked=!0;try{return e()}finally{u.untracked=!1}}function nr(){return u.consumer}function or(e){return!!(e.observers&&e.observers.size)||!!(e.watchers&&e.watchers.size)}function Ue(e){let t=xe(e);return e&&(e.owned??=[]).push(t),t}function sr(e,t=!0){ge(e,t)}function ir(e){return!!e&&e.disposed===!0}function xe(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function L(e,t){let r=Symbol(t??"context");return je(r),{id:r,defaultValue:e,Provider:o=>{se(r,"provide",o.value);let s=u.owner,i=xe(s);(i.contexts=new Map).set(r,o.value),s&&(s.owned??=[]).push(i),u.owner=i;try{return o.children}finally{u.owner=s}}}}function ur(e){let t=u.owner;for(;t;){if(t.contexts&&t.contexts.has(e.id)){let r=t.contexts.get(e.id);return se(e.id,"read",r),r}t=t.parent}return se(e.id,"read",e.defaultValue),e.defaultValue}function Me(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 ce(e,t,r){let n=xe(u.owner);(n.contexts=new Map).set(e.id,t),u.owner&&(u.owner.owned??=[]).push(n);let o=u.owner;u.owner=n;try{return r()}finally{u.owner=o}}function ar(e){u.onSuspend=e}function cr(e){return u.onSuspend?(u.onSuspend(e,u.owner),!0):!1}function lr(e){u.onError=e}function Oe(){return u.owner}function ft(e){let t=u.owner;return u.owner=e,t}function le(e,t){let r=u.owner;u.owner=e;try{return t()}finally{u.owner=r}}function S(e){if(u.owner){if(u.owner.disposed){e();return}(u.owner.cleanups??=[]).push(e)}}function ge(e,t=!0){if(!e.disposed){if(e.owned){for(let r=e.owned.length-1;r>=0;r--)ge(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 N(e){let t=xe(u.owner);u.owner&&(u.owner.owned??=[]).push(t);let r=u.owner;u.owner=t;try{return e(()=>ge(t))}finally{u.owner=r}}function fr(e){u.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Un(e){e.queued||(e.queued=!0,u.queue.push(e),!u.scheduled&&u.batchDepth===0&&(u.scheduled=!0,u.hostSchedule(Re)))}function Re(){if(u.scheduled=!1,u.flushing)return;u.flushing=!0;let e=0;try{for(;u.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let t=u.queue;u.queue=[];for(let r of t)r.queued=!1,r.disposed||r.run()}}finally{u.flushing=!1}}function dr(){u.batchDepth===0&&Re()}function dt(e){u.batchDepth++;try{return e()}finally{--u.batchDepth===0&&Re()}}var lt=class{constructor(t,r=!1){this.queued=!1;this.disposed=!1;this.owner=xe(u.owner),u.owner&&(u.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new V(()=>{ge(this.owner,!1),le(this.owner,()=>{let n=t();typeof n=="function"&&(this.owner.cleanups??=[]).push(n)})}),X({kind:"effect",node:this.computed,handle:this,internal:!r}),this.watcher=new ae(()=>Un(this)),this.run(),this.watcher.watch(this.computed)}run(){if(!this.disposed){this.watcher.getPending();try{this.computed.get()}catch(t){if(t&&typeof t.then=="function"&&u.onSuspend){u.onSuspend(t,this.owner);return}if(u.onError&&u.onError(t,this.owner))return;throw t}}}dispose(){this.disposed||(this.disposed=!0,K(this.computed),this.watcher.unwatch(this.computed),ge(this.owner))}};function Ne(e,t=!1){let r=new lt(e,t);return()=>r.dispose()}function Mn(e){return!!e&&typeof e.then=="function"}fr(()=>{});var pr=Symbol.for("signal"),Nn=Symbol.for("memo"),qn=Symbol.for("signal-node");function d(e,t){let r=new ue(e,{equals:t?.equals}),n=(()=>r.get()),o=(s=>{let i=typeof s=="function"?s(r.peek()):s;return r.set(i),dr(),i});return Object.defineProperty(n,pr,{value:!0,enumerable:!0}),Object.defineProperty(n,qn,{value:{get value(){return r.peek()},get version(){return r.version}},enumerable:!1}),X({kind:"signal",node:r,handle:n,name:t?.name,set:o}),ie()&&S(()=>K(r)),[n,o]}function h(e,t,r){let n=t,o=Oe(),s=new V(()=>le(o,()=>{try{return n=e(n)}catch(a){if(Mn(a))return cr(a),n;throw a}}),{equals:r?.equals}),i=(()=>s.get());return Object.defineProperty(i,pr,{value:!0,enumerable:!0}),Object.defineProperty(i,Nn,{value:!0,enumerable:!0}),X({kind:"memo",node:s,handle:i,name:r?.name}),ie()&&S(()=>K(s)),i}function E(e,t){let r=t;return Ne(()=>{r=e(r)},!0)}function qe(e,t){let r=t;Ne(()=>{r=e(r)})}function Be(e,t){let r=t;return Ne(()=>{r=e(r)})}function x(e){return dt(e)}function w(e){return we(e)}function pt(e){return dt(e),Promise.resolve()}function hr(){return[()=>!1,pt]}function yr(){return Re(),Promise.resolve()}function vr(e,t,r){let n=Array.isArray(e),o,s=r?.defer??!1;return i=>{let a=n?e.map(f=>f()):e();if(s){s=!1,o=a;return}let c=we(()=>t(a,o,i));return o=a,c}}function Bn(e,t,r){let n=[];return S(()=>{for(let o of n)o.dispose();n=[]}),h(()=>{let o=e()||[];return w(()=>{if(o.length===0){for(let c of n)c.dispose();return n=[],r?.fallback?r.fallback():[]}let s=new Map;for(let c of n)s.has(c.item)||s.set(c.item,c);let i=[],a=new Set;for(let c=0;c<o.length;c++){let f=o[c],b=s.get(f);if(b&&!a.has(b))b.setIndex(c),i.push(b),a.add(b);else{let p,v,m;N(T=>{m=T;let[F,C]=d(c,{name:"row index"});v=C,p=t(f,F)});let O={item:f,rendered:p,dispose:m,setIndex:v};i.push(O),a.add(O)}}for(let c of n)a.has(c)||c.dispose();return n=i,i.map(c=>c.rendered)})},void 0,{name:"mapArray"})}function $n(e,t,r,n){let o=[],s=[];return S(()=>{for(let i of s)i.dispose();o=[],s=[]}),h(()=>{let i=e()||[];return w(()=>{if(i.length===0){for(let p of s)p.dispose();return o=[],s=[],n?.fallback?n.fallback():[]}let a=new Map;for(let p=0;p<o.length;p++)a.set(o[p],s[p]);let c=[],f=[],b=new Set;for(let p=0;p<i.length;p++){let v=t(i[p]),m=a.get(v);if(m&&!b.has(v))m.setIndex(p),c.push(m);else{let O,T,F;N(C=>{F=C;let[U,P]=d(p,{name:"row index"});T=P;let ee=h(D=>{let I=(e()||[])[U()];return I??D},i[p]);O=r(ee,U)}),c.push({rendered:O,dispose:F,setIndex:T})}f.push(v),b.add(v)}for(let[p,v]of a)b.has(p)||v.dispose();return o=f,s=c,c.map(p=>p.rendered)})},void 0,{name:"keyArray"})}function Kn(e,t,r){let n=[];return S(()=>{for(let o of n)o.dispose();n=[]}),h(()=>{let o=e()||[];return w(()=>{if(o.length===0){for(let c of n)c.dispose();return n=[],r?.fallback?r.fallback():[]}let s=n.length,i=o.length;for(let c=s;c<i;c++){let f,b,p,v=o[c];N(m=>{p=m;let[O,T]=d(v);b=T,f=t(O,c)}),n.push({rendered:f,setItem:b,dispose:p})}for(let c=i;c<s;c++)n[c].dispose();i<s&&(n=n.slice(0,i));let a=Math.min(s,i);for(let c=0;c<a;c++)n[c].setItem(o[c]);return n.map(c=>c.rendered)})},void 0,{name:"indexArray"})}var Vn=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0,$e=typeof process>"u"?Vn:!1,Ln=Symbol.for("signal"),Hn=Symbol.for("memo"),Gn=Symbol.for("resource");function Ke(e){return typeof e=="function"&&e[Ln]===!0}function br(e){return typeof e=="function"&&e[Hn]===!0}function mr(e){return typeof e=="function"&&e[Gn]===!0}function Tr(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}function Sr(e){return typeof e=="function"&&e[Symbol.for("fluixi-suspense")]===!0}function wr(e){return typeof e=="function"&&e[Symbol.for("fluixi-provider")]===!0}function ht(e){return Array.isArray(e)?e.length===2&&e[1]===" "?Array.isArray(e[0])?ht(e[0]):(typeof e[0]=="function",e[0]):e.length===1&&typeof e[0]=="function"?e[0]:e:e}var yt=null;function gr(e){yt=e}function fe(e){yt&&yt(e)}var vt=null;function xr(e){vt=e}function Ve(e){return vt?vt(e):void 0}var bt=null;function Or(e){bt=e}function Le(){return bt?bt():void 0}var mt=null;function Rr(e){mt=e}function He(e,t){mt&&mt(e,t)}function kr(e,t=(r,n)=>r===n){let r=new Map;return E(()=>{let n=e();for(let[o,s]of r){let[i,a]=s,c=t(o,n);i()!==c&&a(c)}}),n=>{let o=r.get(n);if(!o){let[s,i]=d(!1);o=[s,i],r.set(n,o);let a=e();i(t(n,a))}return o[0]()}}function Ar(e,t){let[r,n]=d(e(),t);return E(()=>{let o=e();t?.timeoutMs?setTimeout(()=>n(()=>o),t.timeoutMs):typeof requestIdleCallback=="function"?requestIdleCallback(()=>n(()=>o)):Promise.resolve().then(()=>n(()=>o))}),r}function _r(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 Wn(e){return!!e&&typeof e.then=="function"}var Tt=Symbol();function de(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:Le(),i=s!==void 0?Ve(s):void 0,a=i!==void 0,[c,f]=d(i!==void 0?i.value:r.initialValue,{equals:!1}),[b,p]=d(void 0,{equals:!1}),[v,m]=d(i!==void 0||r.initialValue!==void 0?"ready":"unresolved",{equals:!1}),[O,T]=d(void 0,{equals:!1}),[F,C]=d(void 0,{equals:!1}),U=Tt,P=!1;E(()=>{let R=n();if(F(),R===!1||R===null||R===void 0){U=Tt,x(()=>{m("unresolved"),T(void 0),p(void 0)});return}let I=P;if(P=!1,U!==Tt&&R===U&&!I)return;if(U=R,a){a=!1;return}let B=!1;S(()=>B=!0);let W=w(v),me=w(c),te=W==="ready"||W==="refreshing";x(()=>{m(te?"refreshing":"pending"),p(void 0)});try{let j=o(R,{value:me,refetching:te});Wn(j)?(T(j),fe(j),j.then(z=>{B||(s!==void 0&&He(s,z),x(()=>{f(()=>z),m("ready"),T(void 0)}))},z=>{B||x(()=>{p(z),m("errored"),T(void 0)})})):x(()=>{f(()=>j),m("ready"),T(void 0)})}catch(j){if(B)return;x(()=>{p(j),m("errored"),T(void 0)})}});let ee=()=>{let R=v();return R==="pending"||R==="refreshing"},D=(()=>{let R=b();if(R)throw R;if(ee()){let I=O();if(I)throw I}return c()});return Object.defineProperties(D,{state:{get:v},loading:{get:ee},error:{get:b},latest:{get:c}}),Object.defineProperty(D,Symbol.for("resource"),{value:!0,enumerable:!0}),Object.defineProperty(D,Symbol.for("signal"),{value:!0,enumerable:!0}),[D,{mutate:f,refetch:()=>{P=!0,C(void 0)}}]}function St(e,t=300){let[r,n]=d(e),[o,s]=d(e),[i,a]=d(!1),c,f=()=>{c!==void 0&&(clearTimeout(c),c=void 0)},b=()=>{f();let v=w(r);return s(()=>v),a(!1),v},p=(v=>{let m=typeof v=="function"?v(w(r)):v;return n(()=>m),a(!0),f(),c=setTimeout(b,t),m});return S(f),[o,p,{immediate:r,pending:i,flush:b,cancel:()=>{f(),a(!1)}}]}function zn(e){return e!=null&&e!==""}function Er(e,t,r={}){let{delay:n=300,initialValue:o,shouldFetch:s=zn}=r,[i,a,c]=St(e,n),f=()=>s(i())?i():!1,[b,{refetch:p}]=de(f,t,o===void 0?{}:{initialValue:o});return[b,{...c,query:i,setQuery:a,refetch:p}]}function Ge(e){if(typeof e=="function"&&!e.length){let t=e();return Ke(t)?t:Ge(t)}if(Array.isArray(e)){let t=[];for(let r=0;r<e.length;r++){let n=Ge(e[r]);Array.isArray(n)?t.push.apply(t,n):t.push(n)}return t}return e}function Cr(e){let t=h(e);return $e?h(()=>Ge(t()),void 0,{name:"children"}):h(()=>Ge(t()))}var We=L();ar((e,t)=>{let r=Me(t,We);r&&(r.increment(),e.finally(()=>r.decrement()))});function Pr(){let[e,t]=d(0),r=0;return{increment:()=>t(r+=1),decrement:()=>t(r-=1),inFallback:()=>e()>0}}function Dr(e,t){return ce(We,e,t)}var Ir=L();lr((e,t)=>{let r=Me(t,Ir);return r?(r.setError(e),!0):!1});function jr(){let[e,t]=d(void 0,{equals:!1});return{error:e,reset:()=>t(()=>{}),setError:n=>t(()=>n)}}function Fr(e,t){return ce(Ir,e,t)}var Ur={State:ue,Computed:V,subtle:{Watcher:ae,untrack:we,currentComputed:nr,hasSinks:or}};var Yn=Symbol.for("signal"),Xn=Symbol.for("fluixi-proxy");function Jn(e,t){let[r,n]=d(e,t);return Object.assign(r,{set:n})}function Qn(e,t,r){return h(e,t,r)}function Zn(e,t){return E(e,t)}function eo(e){return N(e)}function to(e,t){return Be(e,t)}function ro(e,t){qe(e,t)}function no(e,t){return L(e,t)}function oo(e){return Ue(e)}function Mr(...e){let[t,r]=de(...e);return Object.assign(t,r)}var Ot="1.0.0-alpha.84",Kr=Ot.split(".")[0],Nr=`__fluixi_signal_state_v${Kr}__`,so=`__fluixi_signal_builds_v${Kr}__`,io=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};function Vr(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:io,onSuspend:null,onError:null,observer:null}}var wt=globalThis;function uo(e){let t=Vr(),r=e;for(let n of Object.keys(t))n in e||(r[n]=t[n]);return e}function ao(){let e=wt[Nr];return e?uo(e):wt[Nr]=Vr()}var l=ao();(wt[so]??=[]).push(Ot);function co(e){return l.observer=e,()=>{l.observer===e&&(l.observer=null)}}var pe=[],lo;function Rt(e){let t=l.observer;t&&t.created(e.parents===void 0?{...e,parents:pe,origin:e.origin??lo}:e)}function fo(e){return l.observer?(pe.push(e),!0):!1}function po(){pe.pop()}function ho(e){l.observer?.ran?.(e)}function yo(e,t){l.observer?.wrote?.(e,t)}function vo(e){l.observer?.contextCreated?.(e)}function bo(e,t,r){let n=l.observer;!n?.context||!pe.length||n.context(pe[pe.length-1],e,t,r)}function kt(e){l.observer?.disposed?.(e)}var mo="__FLUIXI_DEVTOOLS_HOOK__",qr=globalThis[mo];if(typeof qr?.inject=="function")try{qr.inject({observeReactiveNodes:co,version:Ot})}catch{}function Lr(){return l.observer!=null}var Br=0,$r=1,ke=2,Hr=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(l.untracked)return;let e=l.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}},To=class extends Hr{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++,yo(this,l.consumer),this.observers)for(let t of[...this.observers])t.markDirty(ke);gt(this)}}peek(){return this._value}},Gr=class extends Hr{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=ke,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(l.consumer===this)throw new Error("Signal.Computed cannot read itself");if(this.track(),this.updateIfNecessary(),this._threw)throw this._error;return this._value}updateIfNecessary(){if(this.state===$r&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===ke)break}(this.state===ke||!this._initialized)&&this.recompute(),this.state=Br}recompute(){if(this.sources){for(let a of this.sources)a.observers?.delete(this);this.sources.clear()}let e=l.consumer,t=l.untracked,r=fo(this);l.consumer=this,l.untracked=!1;let n,o=!1,s;try{n=this._fn()}catch(a){o=!0,s=a,n=this._value}finally{l.consumer=e,l.untracked=t,r&&po()}let i=!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,ho(this),i){if(this.version++,this.observers)for(let a of[...this.observers])a.markDirty(ke);gt(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===Br;if(this.state=e,t){if(this.observers)for(let r of[...this.observers])r.markDirty($r);gt(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function gt(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}var So=class{constructor(e){this._watched=new Set,this._pending=new Set,this._notifyFn=e}watch(...e){for(let t of e)this._watched.add(t),(t.watchers??=new Set).add(this)}unwatch(...e){for(let t of e)this._watched.delete(t),t.watchers?.delete(this),this._pending.delete(t)}getPending(){let e=[...this._pending];return this._pending.clear(),e}_notify(e){if(!this._watched.has(e)||this._pending.has(e))return;let t=this._pending.size===0;this._pending.add(e),t&&this._notifyFn()}};function wo(e){if(l.untracked)return e();l.untracked=!0;try{return e()}finally{l.untracked=!1}}function Wr(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function zr(e,t){let r=Symbol(t??"context");return vo(r),{id:r,defaultValue:e,Provider:o=>{bo(r,"provide",o.value);let s=l.owner,i=Wr(s);(i.contexts=new Map).set(r,o.value),s&&(s.owned??=[]).push(i),l.owner=i;try{return o.children}finally{l.owner=s}}}}function Yr(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 go(e){l.onSuspend=e}function xo(e){return l.onSuspend?(l.onSuspend(e,l.owner),!0):!1}function Oo(e){l.onError=e}function Ro(){return l.owner}function Xr(e,t){let r=l.owner;l.owner=e;try{return t()}finally{l.owner=r}}function Jr(e){if(l.owner){if(l.owner.disposed){e();return}(l.owner.cleanups??=[]).push(e)}}function xt(e,t=!0){if(!e.disposed){if(e.owned){for(let r=e.owned.length-1;r>=0;r--)xt(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 ko(e){l.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Ao(e){e.queued||(e.queued=!0,l.queue.push(e),!l.scheduled&&l.batchDepth===0&&(l.scheduled=!0,l.hostSchedule(At)))}function At(){if(l.scheduled=!1,l.flushing)return;l.flushing=!0;let e=0;try{for(;l.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let t=l.queue;l.queue=[];for(let r of t)r.queued=!1,r.disposed||r.run()}}finally{l.flushing=!1}}function _o(){l.batchDepth===0&&At()}function Eo(e){l.batchDepth++;try{return e()}finally{--l.batchDepth===0&&At()}}var Co=class{constructor(e,t=!1){this.queued=!1,this.disposed=!1,this.owner=Wr(l.owner),l.owner&&(l.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new Gr(()=>{xt(this.owner,!1),Xr(this.owner,()=>{let r=e();typeof r=="function"&&(this.owner.cleanups??=[]).push(r)})}),Rt({kind:"effect",node:this.computed,handle:this,internal:!t}),this.watcher=new So(()=>Ao(this)),this.run(),this.watcher.watch(this.computed)}run(){if(!this.disposed){this.watcher.getPending();try{this.computed.get()}catch(e){if(e&&typeof e.then=="function"&&l.onSuspend){l.onSuspend(e,this.owner);return}if(l.onError&&l.onError(e,this.owner))return;throw e}}}dispose(){this.disposed||(this.disposed=!0,kt(this.computed),this.watcher.unwatch(this.computed),xt(this.owner))}};function Po(e,t=!1){let r=new Co(e,t);return()=>r.dispose()}function Do(e){return!!e&&typeof e.then=="function"}ko(()=>{});var Qr=Symbol.for("signal"),Io=Symbol.for("memo"),jo=Symbol.for("signal-node");function _t(e,t){let r=new To(e,{equals:t?.equals}),n=(()=>r.get()),o=(s=>{let i=typeof s=="function"?s(r.peek()):s;return r.set(i),_o(),i});return Object.defineProperty(n,Qr,{value:!0,enumerable:!0}),Object.defineProperty(n,jo,{value:{get value(){return r.peek()},get version(){return r.version}},enumerable:!1}),Rt({kind:"signal",node:r,handle:n,name:t?.name,set:o}),Lr()&&Jr(()=>kt(r)),[n,o]}function ze(e,t,r){let n=t,o=Ro(),s=new Gr(()=>Xr(o,()=>{try{return n=e(n)}catch(a){if(Do(a))return xo(a),n;throw a}}),{equals:r?.equals}),i=(()=>s.get());return Object.defineProperty(i,Qr,{value:!0,enumerable:!0}),Object.defineProperty(i,Io,{value:!0,enumerable:!0}),Rt({kind:"memo",node:s,handle:i,name:r?.name}),Lr()&&Jr(()=>kt(s)),i}function Ae(e,t){let r=t;return Po(()=>{r=e(r)},!0)}function Et(e){return Eo(e)}function Zr(e){return wo(e)}var Ni=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0;var Fo=zr();go((e,t)=>{let r=Yr(t,Fo);r&&(r.increment(),e.finally(()=>r.decrement()))});var Uo=zr();Oo((e,t)=>{let r=Yr(t,Uo);return r?(r.setError(e),!0):!1});var Ye=Symbol.for("fluixi-proxy");var ye=Symbol("store-raw"),J=Symbol("store-node"),en=Symbol("store-has"),Qe=Symbol("store-self"),Ze=Symbol("store-track"),sn=Symbol("store-name"),un=Symbol("store-store"),_e=new WeakMap,Pt=new WeakMap,ve=new WeakMap,et=new WeakMap;function Mo(e,t){if(!he(e)||!ie())return;let r=new Set,n=i=>{if(!(!he(i)||r.has(i))){r.add(i);for(let a of Object.values(i))n(a)}};n(et.get(t)??t);let o=new Set,s=i=>{if(!he(i))return;let a=i;if(r.has(a)||o.has(a))return;o.add(a);let c=_e.get(a);if(c){for(let f of c.keys.values())K(f);c.all&&K(c.all),_e.delete(a),ve.delete(a),Pt.delete(a)}for(let f of Object.values(a))s(f)};s(e)}var tt=(e,t,r)=>r?`${e}[${String(t)}]`:`${e}.${String(t)}`;function an(e,t,r){let n=t?.owner,o=n&&r!==void 0?tt(n.name,r,t?.array):void 0,[s,i]=Wt(n?.store,()=>_t(e,o?{name:o}:void 0)),a=s;return a.$=i,a}function rt(e){let t=_e.get(e);return t?t.owner||(t.owner=ve.get(e)):_e.set(e,t={keys:new Map,owner:ve.get(e),array:Array.isArray(e)}),t}function tn(e,t,r){let n=e.keys.get(t);return n||e.keys.set(t,n=an(r,e,t)),n}function No(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),et.set(e,et.get(n)??n);let i=_e.get(e);if(i&&(i.owner=s,!!ie())){for(let[a,c]of i.keys)at(c,t,tt(r,a,i.array));i.all&&at(i.all,t,tt(r,"*",i.array))}}function rn(e){let t=rt(e);(t.all||(t.all=an(void 0,t,"*")))()}function nn(e,t){e.$(typeof t=="function"?()=>t:t)}function he(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 Xe(e){if(!he(e))return e;let t=Pt.get(e);if(t)return t;let r=new Proxy(e,qo);return Pt.set(e,r),r}var qo={get(e,t,r){if(t===ye||t===J)return e;if(t===Ye)return r;if(t===en)return c=>c in e;if(t==="__proxy")return!0;if(t===Ze||t===Qe)return rn(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=rt(e),i=tn(s,t,n),a=i();return he(a)?(s.owner&&No(a,i,tt(s.owner.name,t,s.array),e),Xe(a)):a},set(){return!0},deleteProperty(e,t){return t in e&&q(e,t,void 0),!0},has(e,t){return t===ye||t===Ye||t===J||t===en||t===Qe||t===Ze?!0:(tn(rt(e),t,e[t])(),t in e)},ownKeys(e){return rn(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function cn(e,t=new Set){if(e==null||typeof e!="object")return e;let r=e[ye]??e;if(t.has(r)||!he(r))return r;t.add(r);let n=!1,o=i=>{let a=cn(i,t);return a!==i&&(n=!0),a};if(Array.isArray(r)){let i=r.map(o);return n?i:r}let s={};for(let i of Object.keys(r))s[i]=o(r[i]);return n?s:r}function q(e,t,r){let n=cn(r),o=e[t];if(o===n&&(n!==void 0||t in e))return;let s=Array.isArray(e),i=s?e.length:0;n===void 0?delete e[t]:e[t]=n;let a=rt(e),c=a.keys.get(t);if(c&&nn(c,n),Mo(o,e),s&&e.length!==i){let f=a.keys.get("length");f&&nn(f,e.length)}a.all&&a.all.$(void 0)}function on(e,t){return typeof e=="function"?e(t):e}function Dt(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)?Dt(o,n):q(e,r,n)}}function jt(e){let t=[],r=e.replace(/\[([^\]]*)\]/g,".$1");for(let n of r.split("."))n.length&&t.push(n);return t}function ln(e,t,r){let n=t.length-1;for(let s=0;s<n;s++){let i=t[s];if(i==="*"){let c=t.slice(s+1);if(Array.isArray(e))for(let f=0;f<e.length;f++)ln(e[f],c,r);return}let a=e[i];(a==null||typeof a!="object")&&(a=/^\d+$/.test(t[s+1])?[]:{},q(e,i,a)),e=a}let o=t[n];if(o==="*"){if(Array.isArray(e))for(let s=0;s<e.length;s++)q(e,s,on(r,e[s]));return}q(e,o,on(r,e[o]))}function Ct(e,t,r){ln(e,jt(t),r)}function Bo(e){return Array.isArray(e)&&e.length>0&&e.every(t=>Array.isArray(t)&&t.length>=2&&typeof t[0]=="string")}function Je(e,t){for(let r=e.length-1;r>=t.length;r--)q(e,String(r),void 0);e.length!==t.length&&q(e,"length",t.length);for(let r=0;r<t.length;r++)q(e,String(r),t[r])}function $o(e,t){let r=t[0];if(typeof r=="function"&&t.length===1){let n=r(e);n&&n!==e&&Dt(e,n);return}if(Array.isArray(r)&&t.length===1){if(Bo(r)){for(let n of r)Ct(e,n[0],n[1]);return}if(Array.isArray(e)){Je(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){Dt(e,r);return}if(Array.isArray(t[1])&&t.length>=3){Ct(e,`${r}.${t[1].join(".")}`,t[2]);return}Ct(e,String(r),t[1])}function It(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(It);let t={};for(let r of Object.keys(e))t[r]=It(e[r]);return t}function H(e,t){let r=e;for(let n of jt(t)){if(r==null)return;r=r[n]}return r}var G=class{constructor(t,r={immutable:!0}){this.options=r;this.root=t,this.set=((...n)=>Et(()=>$o(this.root,n))),t&&typeof t=="object"&&(ve.set(t,{store:this,name:r.name??"store"}),et.set(t,t)),X({kind:"store",node:this,handle:()=>this.root,name:r.name})}get state(){return Xe(this.root)}get proxy(){return Xe(this.root)}get accessor(){return(()=>Xe(this.root))}unwrap(){return this.root}getNode(t){return this.root&&this.root[t]}get(t){if(t==null||t==="")return be(this.state);let r=this.state;for(let n of jt(t)){if(r==null)return;r=r[n]}return be(r)}select(t){return ze(()=>t(this.state))}subscribe(t){return Ae(()=>t(this.state))}watch(t,r){let n;return Ae(()=>{let o=t(this.state);Object.is(o,n)||(r(o,n),n=o)})}reactive(t){return ze(()=>this.state[t])}produce(t){this.set((r=>{let n=It(r);return t(n),n}))}reconcile(t,r={}){this.set(t)}push(t,...r){let n=H(this.root,t);this.set(t,n.concat(r))}pop(t){let r=H(this.root,t).slice(),n=r.pop();return this.set(t,r),n}shift(t){let r=H(this.root,t).slice(),n=r.shift();return this.set(t,r),n}splice(t,r,n,...o){let s=H(this.root,t).slice(),i=s.splice(r,n,...o);return this.set(t,s),i}insert(t,r,n){let o=H(this.root,t).slice();o.splice(r,0,n),this.set(t,o)}removeAt(t,r){let n=H(this.root,t).slice(),o=n.splice(r,1);return this.set(t,n),o}replace(t,r){if(arguments.length>=2){let o=H(this.root,String(t)),s=r;if(Array.isArray(o)&&Array.isArray(s)){Je(o,s);return}this.set(t,s);return}let n=this.root;if(Array.isArray(n)&&Array.isArray(t)){Je(n,t);return}this.set(t)}clear(t){let r=t===void 0?this.root:H(this.root,t);if(Array.isArray(r)){Je(r,[]);return}if(r&&typeof r=="object")for(let n of Object.keys(r))q(r,n,void 0)}toObservable(){let[t]=_t(this.state);return t.toObservable()}dispose(){}},Ko=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","replace","clear","unwrap","toObservable"];function fn(e,t){for(let r of Ko)e[r]=t[r].bind(t);e.$=t.reactive.bind(t)}function Ee(e,t={immutable:!0}){let r=new G(e,t);return fn(r.set,r),[r.proxy,r.set]}function Ft(e,t={}){return new G(e,{...t,immutable:!1})}function dn(e,t={}){let r=new G(e(),t);return Ae(()=>r.set(e())),r}function pn(e,t,r){return Ae(()=>r(t(e)))}function hn(e,t,r){return ze(()=>t(e),void 0,r)}function yn(e,t={}){let r=new G(e,t),n=(()=>r.proxy);return fn(n,r),n}function be(e){if(e==null||typeof e!="object")return e;let t=e[ye];return t!==void 0?t:e}function Ut(e){return Zr(()=>be(e))}function vn(e){return nt(e)}function bn(e){return nt(e)?e[J]:null}function mn(e){return e&&typeof e=="object"&&J in e?e[J]:null}function nt(e){return!!e&&typeof e=="object"&&(Ye in e||e.__proxy===!0)}function Tn(e){return e}var Sn=Object.freeze({createStore:Ee,createMutableStore:Ft,batch:Et,unwrap:be,untrackStore:Ut});function Mt(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(Mt);let t={};for(let r of Object.keys(e))t[r]=Mt(e[r]);return t}function wn(e){return t=>{let r=Mt(t);return e(r),r}}function gn(e,t={}){return()=>e}function xn(e,t){let[r,n]=Ee(e,t);return new Proxy(r,{get:(o,s)=>s==="set"?n:o[s],has:(o,s)=>s==="set"||Reflect.has(o,s)})}function Vo(e,t,r){return h(()=>t(e()),void 0,r)}function Lo(e,t,r){return h(()=>e().filter(t),void 0,r)}function Ho(e,t,r,n){return h(()=>e().reduce(t,r),void 0,n)}function Go(e,t,r){return h(()=>e().find(t),void 0,r)}function Wo(e,t,r){return h(()=>e().some(t),void 0,r)}function zo(e,t,r){return h(()=>e().every(t),void 0,r)}function Yo(e,t,r){return h(()=>[...e()].sort(t),void 0,r)}function Xo(e,t){return h(()=>[...new Set(e())],void 0,t)}function Jo(e,t,r){return h(()=>{let n=e.map(o=>o());return t(n)},void 0,r)}function Qo(...e){return new $(t=>{let r=()=>e.map(o=>typeof o=="function"?o():o.get()),n=e.map(o=>typeof o=="function"&&o.subscribe?o.subscribe(()=>{t.next(r())}):typeof o!="function"?o.subscribe(()=>{t.next(r())}):E(()=>{t.next(r())}));return()=>{n.forEach(o=>{typeof o=="function"?o():o&&typeof o.unsubscribe=="function"&&o.unsubscribe()})}})}function Zo(e,t,r){return h(()=>e()||t(),void 0,r)}function es(e,t,r,n){return h(()=>r(e(),t()),void 0,n)}function ts(e,t,r){return h(()=>t(e()),void 0,{equals:r,internal:!0})}function rs(e,t,r){return h(()=>{let n=e(),o={};for(let s of t)o[s]=n[s];return o},void 0,r)}function ns(e,t,r){return h(()=>{let o={...e()};for(let s of t)delete o[s];return o},void 0,r)}function os(e,t,r,n){return h(()=>e()?t():r(),void 0,n)}function ss(e,t,r){return h(()=>e()?t():void 0,void 0,r)}function is(e,t,r){let[n,o]=d(e()),s;return h(()=>{let i=e();clearTimeout(s),s=setTimeout(()=>o(()=>i),t)}),n}function us(e,t,r){let[n,o]=d(e()),s=0,i;return h(()=>{let a=e(),c=Date.now();c-s>=t?(s=c,o(()=>a)):(clearTimeout(i),i=setTimeout(()=>{s=Date.now(),o(()=>a)},t-(c-s)))}),n}function as(e){let t=e;for(;typeof t=="function";)t=t();return t}var Z=new Map,Q=new Map,cs=0,ls=Symbol.for("signal"),fs=Symbol.for("resource");function ds(e,t,r={}){let n,o,s;typeof t=="function"?(n=e,o=t,s=r):(n=()=>!0,o=e,s=t??r);let{ttl:i=1/0,name:a=`_auto_${cs++}`,staleWhileRevalidate:c=!0}=s,f=a,b=y=>`${f}:${JSON.stringify(y)}`,p=y=>i===1/0||Date.now()-y.timestamp<=i,[v,m]=d(void 0,{equals:!1}),[O,T]=d("unresolved",{equals:!1}),[F,C]=d(void 0,{equals:!1}),[U,P]=d(void 0,{equals:!1}),[ee,D]=d(!1),[R,I]=d(0,{equals:!1}),B=Symbol("unset"),W=B,me=!1,te=!1;function j(y,A,_,M){if(Q.has(A)){Q.get(A).then(g=>{M()||z(g,_)},g=>{!M()&&!_&&Nt(g)}),_||P(Q.get(A));return}let Te=Promise.resolve(o(y)).then(g=>(Z.set(A,{value:g,timestamp:Date.now()}),Q.delete(A),g),g=>{throw Q.delete(A),g});Q.set(A,Te),_||(fe(Te),P(Te)),Te.then(g=>{M()||z(g,_)},g=>{!M()&&!_&&Nt(g)})}function z(y,A){x(()=>{m(()=>y),T("ready"),D(!1),P(void 0),C(void 0)})}function Nt(y){x(()=>{C(y),T("errored"),P(void 0)})}E(()=>{let y=n();if(R(),y===!1||y===null||y===void 0){W=B,x(()=>{T("unresolved"),P(void 0),C(void 0)});return}let A=me,_=te;me=!1,te=!1;let M=b(y);_&&Z.delete(M);let Te=W===B||y!==W;W=y;let g=!1;S(()=>{g=!0});let re=Z.get(M);if(re&&p(re)&&!A&&!_){(w(O)!=="ready"||w(v)!==re.value)&&x(()=>{m(()=>re.value),T("ready"),D(!1),C(void 0)});return}if(re&&c&&!_){x(()=>{m(()=>re.value),T("ready"),D(!0),C(void 0),P(void 0)}),j(y,M,!0,()=>g);return}let qt=w(O),On=qt==="ready"||qt==="refreshing";x(()=>{T(On?"refreshing":"pending"),C(void 0),D(!1)}),j(y,M,!1,()=>g)});let Ce=(()=>{let y=F();if(y)throw y;if(O()==="pending"){let _=U();if(_)throw _}return v()});return Object.defineProperty(Ce,fs,{value:!0,enumerable:!0}),Object.defineProperty(Ce,ls,{value:!0,enumerable:!0}),Object.defineProperties(Ce,{state:{get:O},loading:{get:()=>{let y=O();return y==="pending"||y==="refreshing"}},error:{get:F},latest:{get:v},stale:{get:ee}}),[Ce,{mutate:m,refetch:()=>{me=!0,I(y=>y+1)},invalidate:()=>{let y=w(n);y!=null&&y!==!1&&Z.delete(b(y)),te=!0,I(A=>A+1)}}]}function ps(e){let t=`${e}:`;for(let r of Z.keys())r.startsWith(t)&&Z.delete(r)}function hs(){Z.clear(),Q.clear()}return Cn(ys);})();