sibujs 2.0.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/browser.cjs +369 -276
  2. package/dist/browser.js +4 -4
  3. package/dist/build.cjs +411 -300
  4. package/dist/build.js +10 -10
  5. package/dist/cdn.global.js +8 -8
  6. package/dist/{chunk-JA6667UN.js → chunk-2JQUV4Y3.js} +4 -4
  7. package/dist/{chunk-3NSGB5JN.js → chunk-2KM2724A.js} +2 -2
  8. package/dist/{chunk-52YJLLRO.js → chunk-4YTVESDX.js} +1 -1
  9. package/dist/chunk-5WD7BYTZ.js +152 -0
  10. package/dist/{chunk-CC65Y57T.js → chunk-6QZO7MMG.js} +48 -16
  11. package/dist/{chunk-54EDRCEF.js → chunk-DF3GTP4Q.js} +7 -2
  12. package/dist/{chunk-ND2664SF.js → chunk-J63GPPCJ.js} +13 -9
  13. package/dist/{chunk-O2MNQFLP.js → chunk-KH4OE6WY.js} +5 -5
  14. package/dist/{chunk-3LR7GLWQ.js → chunk-KZA7ANXP.js} +3 -3
  15. package/dist/chunk-L4DAT4WU.js +400 -0
  16. package/dist/{chunk-WOMYAHHI.js → chunk-L52H775O.js} +4 -4
  17. package/dist/{chunk-ITX6OO3F.js → chunk-NEWH4O5U.js} +1 -1
  18. package/dist/{chunk-7JDB7I65.js → chunk-RJIRT46U.js} +4 -4
  19. package/dist/{chunk-KLRMB5ZS.js → chunk-STFTTMO2.js} +2 -2
  20. package/dist/{chunk-DFPFITST.js → chunk-UKMXT5T6.js} +1 -1
  21. package/dist/{chunk-SAHNHTFC.js → chunk-V65KTDZW.js} +3 -3
  22. package/dist/{chunk-R73P76YZ.js → chunk-VSNLICTS.js} +1 -1
  23. package/dist/{chunk-MIUAXB7K.js → chunk-XDKP4T7G.js} +2 -2
  24. package/dist/{chunk-JXMMDLBY.js → chunk-XVYB3J6C.js} +27 -29
  25. package/dist/{chunk-GTBNNBJ6.js → chunk-YMOIAHWA.js} +1 -1
  26. package/dist/data.cjs +382 -274
  27. package/dist/data.js +6 -6
  28. package/dist/devtools.cjs +398 -284
  29. package/dist/devtools.d.cts +1 -1
  30. package/dist/devtools.d.ts +1 -1
  31. package/dist/devtools.js +4 -4
  32. package/dist/ecosystem.cjs +382 -274
  33. package/dist/ecosystem.js +7 -7
  34. package/dist/extras.cjs +421 -299
  35. package/dist/extras.d.cts +1 -1
  36. package/dist/extras.d.ts +1 -1
  37. package/dist/extras.js +19 -19
  38. package/dist/index.cjs +413 -300
  39. package/dist/index.d.cts +16 -11
  40. package/dist/index.d.ts +16 -11
  41. package/dist/index.js +14 -10
  42. package/dist/{introspect-cY2pg9pW.d.ts → introspect-BZWKvQUZ.d.ts} +2 -1
  43. package/dist/{introspect-BWNjNw64.d.cts → introspect-DsJlDD2T.d.cts} +2 -1
  44. package/dist/motion.cjs +189 -149
  45. package/dist/motion.js +3 -3
  46. package/dist/patterns.cjs +382 -274
  47. package/dist/patterns.js +5 -5
  48. package/dist/performance.cjs +360 -260
  49. package/dist/performance.js +4 -4
  50. package/dist/plugins.cjs +376 -257
  51. package/dist/plugins.js +6 -6
  52. package/dist/ssr.cjs +383 -271
  53. package/dist/ssr.js +7 -7
  54. package/dist/testing.cjs +168 -109
  55. package/dist/testing.js +2 -2
  56. package/dist/ui.cjs +373 -258
  57. package/dist/ui.js +6 -6
  58. package/dist/widgets.cjs +382 -274
  59. package/dist/widgets.js +6 -6
  60. package/package.json +1 -1
  61. package/dist/chunk-HB24TBAF.js +0 -121
  62. package/dist/chunk-VLPPXTYG.js +0 -332
package/dist/build.js CHANGED
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  index_exports
3
- } from "./chunk-ND2664SF.js";
3
+ } from "./chunk-J63GPPCJ.js";
4
4
  import "./chunk-YT6HQ6AM.js";
5
- import "./chunk-R73P76YZ.js";
6
- import "./chunk-ITX6OO3F.js";
5
+ import "./chunk-VSNLICTS.js";
6
+ import "./chunk-NEWH4O5U.js";
7
7
  import "./chunk-JYD2PWXH.js";
8
- import "./chunk-GTBNNBJ6.js";
9
- import "./chunk-KLRMB5ZS.js";
10
- import "./chunk-DFPFITST.js";
11
- import "./chunk-54EDRCEF.js";
8
+ import "./chunk-YMOIAHWA.js";
9
+ import "./chunk-STFTTMO2.js";
10
+ import "./chunk-UKMXT5T6.js";
11
+ import "./chunk-DF3GTP4Q.js";
12
12
  import "./chunk-2UPRY23K.js";
13
13
  import "./chunk-UCS6AMJ7.js";
14
- import "./chunk-HB24TBAF.js";
14
+ import "./chunk-5WD7BYTZ.js";
15
15
  import "./chunk-2RA7SHDA.js";
16
- import "./chunk-CC65Y57T.js";
17
- import "./chunk-VLPPXTYG.js";
16
+ import "./chunk-6QZO7MMG.js";
17
+ import "./chunk-L4DAT4WU.js";
18
18
  import "./chunk-LMLD24FC.js";
19
19
 
20
20
  // src/build/compileTemplates.ts
@@ -1,5 +1,5 @@
1
- "use strict";var Sibu=(()=>{var Fe=Object.defineProperty;var si=Object.getOwnPropertyDescriptor;var ai=Object.getOwnPropertyNames;var ci=Object.prototype.hasOwnProperty;var ht=(e,t)=>{for(var n in t)Fe(e,n,{get:t[n],enumerable:!0})},li=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ai(t))!ci.call(e,o)&&o!==n&&Fe(e,o,{get:()=>t[o],enumerable:!(r=si(t,o))||r.enumerable});return e};var ui=e=>li(Fe({},"__esModule",{value:!0}),e);var Zi={};ht(Zi,{DynamicComponent:()=>oo,ErrorBoundary:()=>Xo,ErrorDisplay:()=>ze,Fragment:()=>eo,KeepAlive:()=>lo,Loading:()=>ti,Portal:()=>to,SVG_NS:()=>k,Suspense:()=>st,__resetIdCounter:()=>To,a:()=>Qt,abbr:()=>Xt,action:()=>uo,address:()=>Dt,area:()=>En,array:()=>Ro,article:()=>Nt,aside:()=>Ot,asyncDerived:()=>Do,audio:()=>Cn,autoResize:()=>go,b:()=>en,base:()=>vr,batch:()=>z,bdi:()=>tn,bdo:()=>nn,bindDynamic:()=>je,blockquote:()=>qt,body:()=>At,br:()=>rn,button:()=>ae,canvas:()=>Bn,caption:()=>Un,catchError:()=>ho,catchErrorAsync:()=>yo,center:()=>jr,checkLeaks:()=>wt,circle:()=>wr,cite:()=>on,clickOutside:()=>fo,clipPath:()=>Hr,code:()=>Oe,col:()=>Kn,colgroup:()=>Wn,context:()=>Bo,copyOnClick:()=>mo,createId:()=>vo,customElement:()=>Kr,data:()=>sn,datalist:()=>tr,dd:()=>jt,deepEqual:()=>fe,deepSignal:()=>Ho,defer:()=>Uo,defs:()=>$r,del:()=>jn,derived:()=>De,details:()=>mr,dfn:()=>an,dialog:()=>gr,disableSSR:()=>Eo,dispose:()=>M,div:()=>T,dl:()=>Vt,dt:()=>Ut,each:()=>Qr,effect:()=>O,ellipse:()=>kr,em:()=>cn,embed:()=>Mn,enableSSR:()=>ko,enqueueBatchedSignal:()=>ce,fieldset:()=>nr,figcaption:()=>Kt,figure:()=>Wt,font:()=>Vr,footer:()=>Rt,form:()=>rr,g:()=>Er,getSSRStore:()=>ue,getSlot:()=>io,h1:()=>Pt,h2:()=>zt,h3:()=>$e,h4:()=>Ft,h5:()=>Bt,h6:()=>It,head:()=>Ct,header:()=>Mt,hr:()=>Jt,html:()=>Ke,i:()=>ln,iframe:()=>Rn,img:()=>An,input:()=>or,ins:()=>Vn,isBatching:()=>So,isSSR:()=>de,kbd:()=>un,label:()=>ir,lazy:()=>it,legend:()=>sr,li:()=>Gt,line:()=>Cr,linearGradient:()=>Pr,link:()=>Tr,longPress:()=>po,main:()=>Ht,map:()=>_n,mark:()=>dn,marker:()=>qr,marquee:()=>Ur,mask:()=>Or,match:()=>co,math:()=>Fn,menu:()=>br,meta:()=>Sr,meter:()=>ar,mount:()=>Gr,nav:()=>$t,nextTick:()=>jo,noscript:()=>In,object:()=>$n,ol:()=>Zt,on:()=>_o,onCleanup:()=>Fo,onMount:()=>ve,onUnmount:()=>zo,optgroup:()=>cr,option:()=>lr,output:()=>ur,p:()=>Re,param:()=>Hn,path:()=>Ar,pattern:()=>Dr,picture:()=>On,polygon:()=>_r,polyline:()=>Lr,portal:()=>Dn,pre:()=>He,progress:()=>dr,q:()=>fn,radialGradient:()=>zr,reactiveArray:()=>$o,rect:()=>Nr,ref:()=>Mo,registerComponent:()=>no,registerDisposer:()=>v,resolveComponent:()=>Je,rp:()=>pn,rt:()=>mn,ruby:()=>gn,runInSSRContext:()=>Co,s:()=>bn,samp:()=>hn,script:()=>qn,section:()=>Lt,select:()=>fr,setGlobalErrorHandler:()=>xo,show:()=>so,signal:()=>C,slot:()=>yr,small:()=>yn,source:()=>Pn,span:()=>A,stop:()=>Fr,store:()=>No,strict:()=>Io,strictEffect:()=>qo,strong:()=>xn,style:()=>K,sub:()=>vn,summary:()=>hr,sup:()=>Tn,svg:()=>zn,symbol:()=>Ir,table:()=>Jn,tagFactory:()=>u,takePendingError:()=>Te,tbody:()=>Gn,td:()=>Zn,template:()=>xr,text:()=>Mr,textarea:()=>pr,tfoot:()=>Yn,th:()=>Qn,thead:()=>Xn,time:()=>Sn,title:()=>_t,tr:()=>er,track:()=>Ln,transition:()=>Ko,trapFocus:()=>bo,trustHTML:()=>at,tspan:()=>Rr,u:()=>wn,ul:()=>Yt,unregisterComponent:()=>ro,untracked:()=>U,use:()=>Br,var_:()=>kn,video:()=>Nn,watch:()=>Lo,when:()=>ao,withSSR:()=>Ao,writable:()=>Oo});var lt={};ht(lt,{DynamicComponent:()=>oo,ErrorBoundary:()=>Xo,ErrorDisplay:()=>ze,Fragment:()=>eo,KeepAlive:()=>lo,Loading:()=>ti,Portal:()=>to,SVG_NS:()=>k,Suspense:()=>st,__resetIdCounter:()=>To,a:()=>Qt,abbr:()=>Xt,action:()=>uo,address:()=>Dt,area:()=>En,array:()=>Ro,article:()=>Nt,aside:()=>Ot,asyncDerived:()=>Do,audio:()=>Cn,autoResize:()=>go,b:()=>en,base:()=>vr,batch:()=>z,bdi:()=>tn,bdo:()=>nn,bindDynamic:()=>je,blockquote:()=>qt,body:()=>At,br:()=>rn,button:()=>ae,canvas:()=>Bn,caption:()=>Un,catchError:()=>ho,catchErrorAsync:()=>yo,center:()=>jr,checkLeaks:()=>wt,circle:()=>wr,cite:()=>on,clickOutside:()=>fo,clipPath:()=>Hr,code:()=>Oe,col:()=>Kn,colgroup:()=>Wn,context:()=>Bo,copyOnClick:()=>mo,createId:()=>vo,customElement:()=>Kr,data:()=>sn,datalist:()=>tr,dd:()=>jt,deepEqual:()=>fe,deepSignal:()=>Ho,defer:()=>Uo,defs:()=>$r,del:()=>jn,derived:()=>De,details:()=>mr,dfn:()=>an,dialog:()=>gr,disableSSR:()=>Eo,dispose:()=>M,div:()=>T,dl:()=>Vt,dt:()=>Ut,each:()=>Qr,effect:()=>O,ellipse:()=>kr,em:()=>cn,embed:()=>Mn,enableSSR:()=>ko,enqueueBatchedSignal:()=>ce,fieldset:()=>nr,figcaption:()=>Kt,figure:()=>Wt,font:()=>Vr,footer:()=>Rt,form:()=>rr,g:()=>Er,getSSRStore:()=>ue,getSlot:()=>io,h1:()=>Pt,h2:()=>zt,h3:()=>$e,h4:()=>Ft,h5:()=>Bt,h6:()=>It,head:()=>Ct,header:()=>Mt,hr:()=>Jt,html:()=>Ke,i:()=>ln,iframe:()=>Rn,img:()=>An,input:()=>or,ins:()=>Vn,isBatching:()=>So,isSSR:()=>de,kbd:()=>un,label:()=>ir,lazy:()=>it,legend:()=>sr,li:()=>Gt,line:()=>Cr,linearGradient:()=>Pr,link:()=>Tr,longPress:()=>po,main:()=>Ht,map:()=>_n,mark:()=>dn,marker:()=>qr,marquee:()=>Ur,mask:()=>Or,match:()=>co,math:()=>Fn,menu:()=>br,meta:()=>Sr,meter:()=>ar,mount:()=>Gr,nav:()=>$t,nextTick:()=>jo,noscript:()=>In,object:()=>$n,ol:()=>Zt,on:()=>_o,onCleanup:()=>Fo,onMount:()=>ve,onUnmount:()=>zo,optgroup:()=>cr,option:()=>lr,output:()=>ur,p:()=>Re,param:()=>Hn,path:()=>Ar,pattern:()=>Dr,picture:()=>On,polygon:()=>_r,polyline:()=>Lr,portal:()=>Dn,pre:()=>He,progress:()=>dr,q:()=>fn,radialGradient:()=>zr,reactiveArray:()=>$o,rect:()=>Nr,ref:()=>Mo,registerComponent:()=>no,registerDisposer:()=>v,resolveComponent:()=>Je,rp:()=>pn,rt:()=>mn,ruby:()=>gn,runInSSRContext:()=>Co,s:()=>bn,samp:()=>hn,script:()=>qn,section:()=>Lt,select:()=>fr,setGlobalErrorHandler:()=>xo,show:()=>so,signal:()=>C,slot:()=>yr,small:()=>yn,source:()=>Pn,span:()=>A,stop:()=>Fr,store:()=>No,strict:()=>Io,strictEffect:()=>qo,strong:()=>xn,style:()=>K,sub:()=>vn,summary:()=>hr,sup:()=>Tn,svg:()=>zn,symbol:()=>Ir,table:()=>Jn,tagFactory:()=>u,takePendingError:()=>Te,tbody:()=>Gn,td:()=>Zn,template:()=>xr,text:()=>Mr,textarea:()=>pr,tfoot:()=>Yn,th:()=>Qn,thead:()=>Xn,time:()=>Sn,title:()=>_t,tr:()=>er,track:()=>Ln,transition:()=>Ko,trapFocus:()=>bo,trustHTML:()=>at,tspan:()=>Rr,u:()=>wn,ul:()=>Yt,unregisterComponent:()=>ro,untracked:()=>U,use:()=>Br,var_:()=>kn,video:()=>Nn,watch:()=>Lo,when:()=>ao,withSSR:()=>Ao,writable:()=>Oo});function E(){return typeof globalThis.__SIBU_DEV__<"u"?!!globalThis.__SIBU_DEV__:typeof __SIBU_DEV__<"u"?__SIBU_DEV__:typeof process<"u"&&process.env?.NODE_ENV!=="production"}var yt=E();function $(e,t){if(yt&&!e)throw new Error(`[SibuJS] ${t}`)}function w(e){yt&&console.warn(`[SibuJS] ${e}`)}var di=["http:","https:","mailto:","tel:","ftp:"];function I(e){let t=e.replace(/[\x00-\x20\x7f-\x9f]+/g,"").trim();if(!t)return"";let n=t.toLowerCase(),r=-1;for(let i=0;i<n.length;i++){let s=n.charCodeAt(i);if(s===58){r=i;break}if(s===47||s===63||s===35)break}if(r===-1)return t;let o=n.slice(0,r+1);return/^[a-z][a-z0-9+.-]*:$/.test(o)&&di.indexOf(o)===-1?"":t}function he(e){let t=e.split(","),n=[];for(let r=0;r<t.length;r++){let o=t[r].trim();if(!o)continue;let i=o.match(/^(\S+)(\s+.+)?$/);if(!i)continue;let s=I(i[1]);s&&n.push(i[2]?`${s}${i[2]}`:s)}return n.join(", ")}function Be(e){let n=e.replace(/\\([0-9a-fA-F]{1,6})\s?/g,(r,o)=>{let i=Number.parseInt(o,16);if(!Number.isFinite(i)||i<0||i>1114111)return"";try{return String.fromCodePoint(i)}catch{return""}}).toLowerCase().replace(/\s+/g,"");return n.includes("url(")||n.includes("expression(")||n.includes("javascript:")||n.includes("vbscript:")||n.includes("-moz-binding")||n.includes("behavior:")||n.includes("@import")||n.includes("image-set(")||n.includes("filter:progid")?"":e}var fi=new Set(["href","xlink:href","src","action","formaction","formtarget","cite","poster","background","srcset","ping","data"]);function V(e){return fi.has(e)}var pi=E(),te=new Array(32),ne=32,P=-1,B=null,W="__s",D=0,L=[],H=new Set,mi=[];function X(e){try{e()}catch(t){pi&&w(`Subscriber threw during notification: ${t instanceof Error?t.message:String(t)}`)}}var Ae=0,_e=!1;function Ie(e,t){let n=B;B=t;try{e()}finally{B=n}}function S(e,t){t||(t=e),xt(t),++P,P>=ne&&(ne*=2,te.length=ne),te[P]=t,B=t;try{e()}finally{P--,B=P>=0?te[P]:null}return()=>xt(t)}function gi(){Ae===0&&(++P,P>=ne&&(ne*=2,te.length=ne),te[P]=null,B=null,_e=!0),Ae++}function bi(){Ae--,Ae===0&&(P--,B=P>=0?te[P]:null,_e=!1)}function U(e){gi();try{return e()}finally{bi()}}function re(e){if(!B)return;let t=B;if(t._dep===e)return;let n=t._deps;if(n){if(n.has(e))return;n.add(e)}else if(t._dep!==void 0){let o=new Set;o.add(t._dep),o.add(e),t._deps=o,t._dep=void 0}else t._dep=e;let r=e[W];r||(r=new Set,e[W]=r),r.add(B),r.size===1?e.__f=B:e.__f!==void 0&&(e.__f=void 0)}function vt(e){let t=e[W];if(t)for(let n of t)n._c?ye(n):H.has(n)||(H.add(n),L.push(n))}var ee=1e5;function Tt(){if(!(D>0)){D++;try{let e=0;for(;e<L.length;){if(e>=ee){typeof console<"u"&&console.error(`[SibuJS] Notification queue exceeded ${ee} iterations \u2014 likely an effect that writes to a signal it reads. Breaking to prevent infinite loop.`);break}X(L[e]),e++}}finally{D--,D===0&&(L.length=0,H.clear())}}}function ye(e){e();let t=e._sig;if(!t)return;let n=mi,r=n.length;for(n.push(t);n.length>r;){let o=n.pop(),i=o.__f;if(i){if(i._c){let a=i._sig;a._d||(a._d=!0,n.push(a))}else H.has(i)||(H.add(i),L.push(i));continue}let s=o[W];if(s)for(let a of s)if(a._c){let c=a._sig;c&&!c._d?(c._d=!0,n.push(c)):c||a()}else H.has(a)||(H.add(a),L.push(a))}}function Le(e){let t=e.__f;if(t){if(D>0){t._c?ye(t):H.has(t)||(H.add(t),L.push(t));return}D++;try{t._c?ye(t):X(t);let r=0;for(;r<L.length;){if(r>=ee){typeof console<"u"&&console.error(`[SibuJS] Notification queue exceeded ${ee} iterations \u2014 likely an effect that writes to a signal it reads. Breaking to prevent infinite loop.`);break}X(L[r]),r++}}finally{D--,D===0&&(L.length=0,H.clear())}return}let n=e[W];if(!(!n||n.size===0)){if(D>0){for(let r of n)r._c?ye(r):H.has(r)||(H.add(r),L.push(r));return}D++;try{let r=0,o=!1;for(let s of n)s._c&&(o=!0),L[r++]=s;if(o){for(let s=0;s<r;s++)L[s]._c&&ye(L[s]);for(let s=0;s<r;s++){let a=L[s];!a._c&&!H.has(a)&&(H.add(a),X(a))}}else for(let s=0;s<r;s++)X(L[s]);let i=r;for(;i<L.length;){if(i-r>=ee){typeof console<"u"&&console.error(`[SibuJS] Notification queue exceeded ${ee} iterations \u2014 likely an effect that writes to a signal it reads. Breaking to prevent infinite loop.`);break}X(L[i]),i++}}finally{D--,D===0&&(L.length=0,H.clear())}}}function xt(e){let t=e,n=t._dep;if(n!==void 0){let o=n[W];o&&(o.delete(e),n.__f===e?n.__f=o.size===1?o.values().next().value:void 0:o.size===1&&n.__f===void 0&&(n.__f=o.values().next().value)),t._dep=void 0;return}let r=t._deps;if(!(!r||r.size===0)){for(let o of r){let i=o[W];i&&(i.delete(e),o.__f===e?o.__f=i.size===1?i.values().next().value:void 0:i.size===1&&o.__f===void 0&&(o.__f=i.values().next().value))}r.clear()}}var Ne=E();function qe(e,t,n){e[t]=n}function hi(e){if(e.length<3)return!1;let t=e.toLowerCase();return t[0]==="o"&&t[1]==="n"&&t.charCodeAt(2)>=97&&t.charCodeAt(2)<=122}function Me(e,t,n){if(hi(t))return Ne&&w(`bindAttribute: refusing to bind event-handler attribute "${t}". Use on:{ ${t.slice(2)}: fn } instead.`),()=>{};function r(){let i;try{i=n()}catch(a){Ne&&w(`bindAttribute: getter for "${t}" threw: ${a instanceof Error?a.message:String(a)}`);return}if(typeof i=="boolean"){t in e&&(t==="checked"||t==="disabled"||t==="selected")?qe(e,t,i):i?e.setAttribute(t,""):e.removeAttribute(t);return}let s=String(i);(t==="value"||t==="checked")&&t in e?qe(e,t,t==="checked"?!!i:s):e.setAttribute(t,V(t)?I(s):s)}return S(r)}function je(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(l){Ne&&w(`bindDynamic: name getter threw: ${l instanceof Error?l.message:String(l)}`);return}let a;try{a=typeof n=="function"?n():n}catch(l){Ne&&w(`bindDynamic: value getter threw: ${l instanceof Error?l.message:String(l)}`);return}if((s[0]==="o"||s[0]==="O")&&(s[1]==="n"||s[1]==="N"))return;r!==null&&r!==s&&e.removeAttribute(r);let c=String(a);(s==="value"||s==="checked")&&s in e?qe(e,s,s==="checked"?!!a:c):e.setAttribute(s,V(s)?I(c):c),r=s}let i=S(o);return()=>{i(),r!==null&&e.removeAttribute(r)}}var St=E();function J(e,t){let n=[];function r(){let o;try{o=t()}catch(l){St&&w(`bindChildNode: getter threw: ${l instanceof Error?l.message:String(l)}`);return}if(o==null||typeof o=="boolean"){for(let l=0;l<n.length;l++){let d=n[l];d.parentNode&&d.parentNode.removeChild(d)}n.length=0;return}let i=e.parentNode;if(!i){n.length=0;return}let s;if(Array.isArray(o)){s=[];let l=new Set;for(let d=0;d<o.length;d++){let m=o[d];if(m==null||typeof m=="boolean")continue;let b=m instanceof Node?m:document.createTextNode(String(m));if(l.has(b)){St&&w("bindChildNode: duplicate node reference in array \u2014 only the first occurrence is rendered.");continue}l.add(b),s.push(b)}}else s=[o instanceof Node?o:document.createTextNode(String(o))];let a;if(n.length>0&&s.length>0){let l=new Set(n);a=new Set;for(let d=0;d<s.length;d++)l.has(s[d])&&a.add(s[d])}for(let l=0;l<n.length;l++){let d=n[l];a?.has(d)||d.parentNode&&d.parentNode.removeChild(d)}let c=e.nextSibling;for(let l=0;l<s.length;l++){let d=s[l];a?.has(d)&&d.parentNode===i?d.nextSibling!==c&&i.insertBefore(d,c):i.insertBefore(d,c)}n=s}return S(r)}var oe=new WeakMap,ie=E(),se=0;function v(e,t){let n=oe.get(e);n||(n=[],oe.set(e,n)),n.push(t),ie&&se++}function M(e){let t=[e],n=[];for(;t.length>0;){let r=t.pop();n.push(r);let o=Array.from(r.childNodes);for(let i=0;i<o.length;i++)t.push(o[i])}for(let r=n.length-1;r>=0;r--){let o=n[r],i=oe.get(o);if(i){let s=i.slice();oe.delete(o),ie&&(se-=s.length);for(let c of s)try{c()}catch(l){ie&&typeof console<"u"&&console.warn("[SibuJS] Disposer threw during cleanup:",l)}let a=0;for(;a++<8;){let c=oe.get(o);if(!c||c.length===0)break;let l=c.slice();oe.delete(o),ie&&(se-=l.length);for(let d of l)try{d()}catch(m){ie&&typeof console<"u"&&console.warn("[SibuJS] Disposer threw during cleanup:",m)}}}}}function wt(e=0){return ie?(e>0&&se>e&&w(`checkLeaks: ${se} active DOM bindings detected. Expected \u2264${e}. This may indicate a component was removed from the DOM without calling dispose().`),se):0}var k="http://www.w3.org/2000/svg",kt=E(),yi=new Set(["script","iframe","object","embed","frame","frameset"]);function xi(e){let t=e.toLowerCase();if(yi.has(t))throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`)}var vi=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);function Ti(e,t,n){e[t]=n}var Et=new Map;function Si(e){let t=Et.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),Et.set(e,t)),t}function wi(e,t){if(typeof t=="function"){let r=S(()=>{e.setAttribute("style",t())});v(e,r);return}if(typeof t=="string"){e.setAttribute("style",t);return}let n=e;for(let r in t){let o=t[r],i=Si(r);if(typeof o=="function"){let s=o,a=S(()=>{n.style.setProperty(i,Be(String(s())))});v(e,a)}else n.style.setProperty(i,Be(String(o)))}}function ki(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=S(()=>{e.setAttribute("class",t())});v(e,i);return}let n=t,r=!1,o="";for(let i in n){let s=n[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=S(()=>{let a="";for(let c in n){let l=n[c];(typeof l=="function"?l():l)&&(a=a?`${a} ${c}`:c)}e.setAttribute("class",a)});v(e,s)}else e.setAttribute("class",o)}function Ve(e,t){if(typeof t=="string"){e.textContent=t;return}if(typeof t=="number"){e.textContent=String(t);return}if(!(typeof t=="boolean"||t==null)){if(typeof t=="function"){let n=document.createComment("");e.appendChild(n),v(e,J(n,t));return}if(t instanceof Node){e.appendChild(t);return}if(Array.isArray(t))for(let n=0;n<t.length;n++){let r=t[n];if(typeof r=="function"){let o=document.createComment("");e.appendChild(o),v(e,J(o,r))}else if(r instanceof Node)e.appendChild(r);else if(Array.isArray(r))for(let o=0;o<r.length;o++){let i=r[o];if(typeof i=="function"){let s=document.createComment("");e.appendChild(s),v(e,J(s,i))}else i instanceof Node?e.appendChild(i):i!=null&&typeof i!="boolean"&&e.appendChild(document.createTextNode(String(i)))}else r!=null&&typeof r!="boolean"&&e.appendChild(document.createTextNode(String(r)))}}}var u=(e,t)=>(n,r)=>{xi(e);let o=t?document.createElementNS(t,e):document.createElement(e);if(n===void 0)return o;if(typeof n=="string")return r!==void 0?(o.setAttribute("class",n),Ve(o,r),o):(o.textContent=n,o);if(typeof n=="number")return o.textContent=String(n),o;if(Array.isArray(n)||n instanceof Node||typeof n=="function")return Ve(o,n),o;let i=n,s=i.class;s!=null&&ki(o,s);let a=i.id;a!=null&&(kt&&typeof a=="string"&&vi.has(a.toLowerCase())&&w(`tagFactory: element id="${a}" matches a common global and may cause DOM clobbering. Avoid setting ids from untrusted input.`),o.id=a);let c=r!==void 0?r:i.nodes;c!=null&&Ve(o,c);let l=i.on;if(l)for(let b in l){let f=l[b];typeof f=="function"?o.addEventListener(b,f):kt&&w(`tagFactory: on.${b} handler is not a function (got ${typeof f}). Event listener was not attached.`)}let d=i.style;d!=null&&wi(o,d);let m=i.ref;m&&(m.current=o);for(let b in i)switch(b){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{let f=i[b];if(f==null)continue;let p=b.toLowerCase();if(p[0]==="o"&&p[1]==="n")continue;if(typeof f=="function")v(o,Me(o,b,f));else if(typeof f=="boolean")b in o&&(b==="checked"||b==="disabled"||b==="selected")?Ti(o,b,f):f?o.setAttribute(b,""):o.removeAttribute(b);else{let g=String(f);p==="srcset"?o.setAttribute(b,he(g)):V(p)?o.setAttribute(b,I(g)):o.setAttribute(b,g)}}}return i.onElement&&typeof i.onElement=="function"&&i.onElement(o),o};var xs=u("html"),Ct=u("head"),At=u("body"),_t=u("title"),T=u("div"),A=u("span"),Lt=u("section"),Nt=u("article"),Mt=u("header"),Rt=u("footer"),$t=u("nav"),Ht=u("main"),Ot=u("aside"),Dt=u("address"),Re=u("p"),Pt=u("h1"),zt=u("h2"),$e=u("h3"),Ft=u("h4"),Bt=u("h5"),It=u("h6"),qt=u("blockquote"),jt=u("dd"),Vt=u("dl"),Ut=u("dt"),Kt=u("figcaption"),Wt=u("figure"),Jt=u("hr"),Gt=u("li"),Zt=u("ol"),Yt=u("ul"),He=u("pre"),Qt=u("a"),Xt=u("abbr"),en=u("b"),tn=u("bdi"),nn=u("bdo"),rn=u("br"),on=u("cite"),Oe=u("code"),sn=u("data"),an=u("dfn"),cn=u("em"),ln=u("i"),un=u("kbd"),dn=u("mark"),fn=u("q"),pn=u("rp"),mn=u("rt"),gn=u("ruby"),bn=u("s"),hn=u("samp"),yn=u("small"),xn=u("strong"),vn=u("sub"),Tn=u("sup"),Sn=u("time"),wn=u("u"),kn=u("var"),En=u("area"),Cn=u("audio"),An=u("img"),_n=u("map"),Ln=u("track"),Nn=u("video"),Mn=u("embed"),Rn=u("iframe"),$n=u("object"),Hn=u("param"),On=u("picture"),Dn=u("portal"),Pn=u("source"),zn=u("svg",k),Fn=u("math"),Bn=u("canvas"),In=u("noscript"),qn=u("script"),jn=u("del"),Vn=u("ins"),Un=u("caption"),Kn=u("col"),Wn=u("colgroup"),Jn=u("table"),Gn=u("tbody"),Zn=u("td"),Yn=u("tfoot"),Qn=u("th"),Xn=u("thead"),er=u("tr"),ae=u("button"),tr=u("datalist"),nr=u("fieldset"),rr=u("form"),or=u("input"),ir=u("label"),sr=u("legend"),ar=u("meter"),cr=u("optgroup"),lr=u("option"),ur=u("output"),dr=u("progress"),fr=u("select"),pr=u("textarea"),mr=u("details"),gr=u("dialog"),br=u("menu"),hr=u("summary"),yr=u("slot"),xr=u("template"),vr=u("base"),Tr=u("link"),Sr=u("meta"),K=u("style"),wr=u("circle",k),kr=u("ellipse",k),Er=u("g",k),Cr=u("line",k),Ar=u("path",k),_r=u("polygon",k),Lr=u("polyline",k),Nr=u("rect",k),Mr=u("text",k),Rr=u("tspan",k),$r=u("defs",k),Hr=u("clipPath",k),Or=u("mask",k),Dr=u("pattern",k),Pr=u("linearGradient",k),zr=u("radialGradient",k),Fr=u("stop",k),Br=u("use",k),Ir=u("symbol",k),qr=u("marker",k),jr=u("center"),Vr=u("font"),Ur=u("marquee"),Kr=e=>u(e);var Ei=E(),Ci=new Set(["script","style"]),Ai=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Wr=new Set(["svg","circle","ellipse","g","line","path","polygon","polyline","rect","text","tspan","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop","use","symbol","marker"]),Jr=new WeakMap;function _i(e){let t=e.length-1,n=e[0];for(let f=0;f<t;f++)n+=`\0${f}\0${e[f+1]}`;let r=0,o=n.length;function i(){for(;r<o&&(n[r]===" "||n[r]===" "||n[r]===`
2
- `||n[r]==="\r");)r++}function s(){if(n.charCodeAt(r)!==0)return-1;let f=r;r++;let p=0;for(;r<o&&n.charCodeAt(r)!==0;)p=p*10+(n.charCodeAt(r)-48),r++;return r<o&&r++,p<0||p>=t?(r=f,-1):p}function a(){let f=r;for(;r<o;){let p=n.charCodeAt(r);if(p>=97&&p<=122||p>=65&&p<=90||p>=48&&p<=57||p===45)r++;else break}return n.slice(f,r)}function c(){if(i(),n[r]!=="=")return{kind:"bool"};r++,i();let f=s();if(f>=0)return{kind:"expr",idx:f};let p=n[r];if(p==='"'||p==="'"){r++;let y=[],N=[],F="";for(;r<o&&n[r]!==p;){let Se=s();Se>=0?(y.push(F),F="",N.push(Se)):F+=n[r++]}return r<o&&r++,y.push(F),N.length===0?{kind:"static",value:y[0]}:{kind:"mixed",statics:y,exprs:N}}let g=r;for(;r<o;){let y=n.charCodeAt(r);if(y===32||y===9||y===10||y===13||y===62||y===47)break;r++}return{kind:"static",value:n.slice(g,r)}}function l(){let f=[];for(;r<o&&(i(),!(n[r]===">"||n[r]==="/"));){let p=r;for(;r<o;){let y=n.charCodeAt(r);if(y>=97&&y<=122||y>=65&&y<=90||y>=48&&y<=57||y===45||y===58||y===95||y===46)r++;else break}let g=n.slice(p,r);if(!g)break;let x=c();g.startsWith("on:")?x.kind==="expr"&&f.push({t:3,name:g.slice(3),idx:x.idx}):x.kind==="bool"?f.push({t:4,name:g}):x.kind==="static"?f.push({t:0,name:g,value:x.value}):x.kind==="expr"?f.push({t:1,name:g,idx:x.idx}):x.kind==="mixed"&&f.push({t:2,name:g,statics:x.statics,exprs:x.exprs})}return f}function d(f){return f.replace(/\s+/g," ")}function m(f){let p="";for(;r<o&&n[r]!=="<";){let x=s();if(x>=0){let y=d(p);y&&f.push({t:1,value:y}),p="",f.push({t:2,idx:x})}else p+=n[r++]}let g=d(p);g&&f.push({t:1,value:g})}function b(){let f=[];for(;r<o&&!(n[r]==="<"&&r+1<o&&n[r+1]==="/");)if(n[r]==="<"){r++;let p=a(),g=l();i();let x=Ai.has(p),y=n[r]==="/";if(y&&r++,r<o&&r++,x||y)f.push({t:0,el:{tag:p,svg:Wr.has(p),attrs:g,children:[]}});else{let N=b();if(Ci.has(p.toLowerCase())){for(let F=0;F<N.length;F++)if(N[F].t===2)throw new Error(`html: dynamic \${...} expressions are not allowed inside <${p}> (raw-text context). Build the content separately and append it as a Node.`)}n[r]==="<"&&r+1<o&&n[r+1]==="/"&&(r+=2,a(),i(),r<o&&n[r]===">"&&r++),f.push({t:0,el:{tag:p,svg:Wr.has(p),attrs:g,children:N}})}}else m(f);return f}return b()}function Ue(e,t){let n=e.svg?document.createElementNS(k,e.tag):document.createElement(e.tag);for(let r=0;r<e.attrs.length;r++){let o=e.attrs[r];switch(o.t){case 0:n.setAttribute(o.name,o.value);break;case 1:{let i=o.name,s=i.toLowerCase();if(s[0]==="o"&&s[1]==="n")break;let a=t[o.idx];if(typeof a=="function")v(n,Me(n,i,a));else if(a!=null){let c=String(a);s==="srcset"?n.setAttribute(i,he(c)):V(s)?n.setAttribute(i,I(c)):n.setAttribute(i,c)}break}case 2:{let i=o.statics[0];for(let a=0;a<o.exprs.length;a++){let c=t[o.exprs[a]];i+=(c==null?"":String(c))+o.statics[a+1]}let s=o.name.toLowerCase();s==="srcset"?n.setAttribute(o.name,he(i)):V(s)?n.setAttribute(o.name,I(i)):n.setAttribute(o.name,i);break}case 3:{let i=t[o.idx];typeof i=="function"?n.addEventListener(o.name,i):Ei&&w(`html: on:${o.name} handler is not a function (got ${typeof i}). Event listener was not attached.`);break}case 4:n.setAttribute(o.name,"");break}}for(let r=0;r<e.children.length;r++){let o=e.children[r];switch(o.t){case 0:n.appendChild(Ue(o.el,t));break;case 1:n.appendChild(document.createTextNode(o.value));break;case 2:{let i=t[o.idx];if(typeof i=="function"){let s=document.createComment("");n.appendChild(s),v(n,J(s,i))}else if(i instanceof Node)n.appendChild(i);else if(Array.isArray(i))for(let s=0;s<i.length;s++){let a=i[s];a instanceof Node?n.appendChild(a):a!=null&&typeof a!="boolean"&&n.appendChild(document.createTextNode(String(a)))}else i!=null&&typeof i!="boolean"&&n.appendChild(document.createTextNode(String(i)));break}}}return n}function Ke(e,...t){let n=Jr.get(e);if(n||(n=_i(e),Jr.set(e,n)),n.length===1&&n[0].t===0)return Ue(n[0].el,t);let r=document.createElement("div");for(let o=0;o<n.length;o++){let i=n[o];switch(i.t){case 0:r.appendChild(Ue(i.el,t));break;case 1:r.appendChild(document.createTextNode(i.value));break;case 2:{let s=t[i.idx];if(s instanceof Node)r.appendChild(s);else if(typeof s=="function"){let a=document.createComment("bind:htm");r.appendChild(a),v(r,J(a,s))}else if(Array.isArray(s))for(let a=0;a<s.length;a++){let c=s[a];c instanceof Node?r.appendChild(c):c!=null&&typeof c!="boolean"&&r.appendChild(document.createTextNode(String(c)))}else s!=null&&typeof s!="boolean"&&r.appendChild(document.createTextNode(String(s)));break}}}return r.childNodes.length===1&&r.firstChild instanceof Element?r.firstChild:r}function Gr(e,t){if(!t)throw new Error("[SibuJS mount] container element not found. Make sure the DOM element exists before calling mount().");$(typeof e=="function"||e instanceof Node,"mount: first argument must be a component function or a DOM Node.");let n=typeof performance<"u"?performance.now():0,r=typeof e=="function"?e():e,o=typeof performance<"u"?performance.now()-n:0;t.appendChild(r);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("app:init",{rootElement:r,container:t,duration:o}),{node:r,unmount(){i&&i.emit("app:unmount",{rootElement:r}),M(r),r.parentNode&&r.parentNode.removeChild(r)}}}var Zr=E();function Yr(e){return typeof e=="function"?Yr(e()):e instanceof Node?e:document.createTextNode(String(e))}function Li(e,t){if(t===0)return[];let n=[],r=new Array(t);for(let a=0;a<t;a++){let c=e[a],l=0,d=n.length;for(;l<d;){let m=l+d>>1;e[n[m]]<c?l=m+1:d=m}n[l]=a,r[a]=l>0?n[l-1]:-1}let o=n.length,i=new Array(o),s=n[o-1];for(let a=o-1;a>=0;a--)i[a]=s,s=r[s];return i}function Qr(e,t,n){$(typeof e=="function","each: first argument must be a function that returns an array."),$(typeof t=="function","each: second argument must be a render function."),$(n&&typeof n.key=="function","each: options.key must be a function that returns a unique key per item.");let r=document.createComment("each:anchor"),o=document.createComment("each:end"),i=[],s=[],a=i,c=0,l=new Map,d=new Map,m=[],b=[],f=new Uint8Array(0),p=new Map,g=[],x=[],y=new Map,N=!1,F=!1,Se=n.key,ut=()=>{let dt=e(),_=dt.length,we=r.parentNode;if(!we)return;F||(we.insertBefore(o,r.nextSibling),F=!0),b.length<_&&(b=new Array(_));for(let h=0;h<_;h++)b[h]=Se(dt[h]);let ge=b;m.length<_&&(m=new Array(_)),d.clear(),y.clear();for(let h=0;h<_;h++)y.set(ge[h],h);for(let h=0;h<_;h++){let R=ge[h],pt=l.get(R),be;if(pt!==void 0)be=pt;else{let mt=R,oi=()=>U(()=>e()[y.get(mt)]),ii=()=>y.get(mt);try{be=Yr(t(oi,ii))}catch(Q){Zr&&w(`each: render threw for item at index ${h} (key="${ge[h]}"): ${Q instanceof Error?Q.message:String(Q)}`),be=document.createComment(`each:error:${h}`);let gt=Q instanceof Error?Q:new Error(String(Q));queueMicrotask(()=>{try{let bt=r.parentNode;bt?.dispatchEvent?bt.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:gt}})):Zr&&w(`each: error not surfaced \u2014 anchor detached: ${gt.message}`)}catch{}})}}d.set(R,be),m[h]=be}for(let[h,R]of l)d.has(h)||(M(R),R.parentNode&&we.removeChild(R));if(_===0){c=0;let h=l;l=d,d=h;return}p.clear();for(let h=0;h<c;h++)p.set(a[h],h);g.length<_&&(g=new Array(_),x=new Array(_));let ke=0;for(let h=0;h<_;h++){let R=p.get(ge[h]);R!==void 0&&(g[ke]=h,x[ke]=R,ke++)}let ft=Li(x,ke);f.length<_?f=new Uint8Array(_):f.fill(0,0,_);for(let h=0;h<ft.length;h++)f[g[ft[h]]]=1;let Ee=o;for(let h=_-1;h>=0;h--){let R=m[h];f[h]||R.nextSibling!==Ee&&we.insertBefore(R,Ee),Ee=R}let Ce=a===i?s:i;Ce.length<_&&(Ce.length=_);for(let h=0;h<_;h++)Ce[h]=ge[h];a=Ce,c=_;let ri=l;l=d,d=ri,N=!0},ni=S(ut);return v(r,ni),N||queueMicrotask(()=>{!N&&r.parentNode&&ut()}),r}function eo(e){let t=document.createDocumentFragment();for(let n of e)if(!(n==null||typeof n=="boolean"))if(Array.isArray(n))for(let r of n)r==null||typeof r=="boolean"||t.appendChild(Xr(r));else t.appendChild(Xr(n));return t}function Xr(e){if(e==null)return document.createTextNode("");if(e instanceof Node)return e;if(typeof e=="function"){let t=e();return t instanceof Node?t:document.createTextNode(String(t??""))}return document.createTextNode(String(e))}function to(e,t){let n=document.createComment("portal"),r=t||document.body,o=null,i=!1;return queueMicrotask(()=>{if(!i)try{o=e(),r.appendChild(o)}catch(s){typeof console<"u"&&console.error("[Portal] Render error:",s);let a=s instanceof Error?s:new Error(String(s));queueMicrotask(()=>{try{let c=n.parentNode;c?.dispatchEvent&&c.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:a}}))}catch{}})}}),v(n,()=>{i=!0,o&&(M(o),o.remove(),o=null)}),n}var We=new Map;function no(e,t){We.set(e,t)}function ro(e){We.delete(e)}function Je(e){let t=We.get(e);return t?t():T({nodes:`[Component "${e}" not found]`})}function oo(e){let t=T({class:"sibu-dynamic"});function n(){let o=e(),i;typeof o=="function"?i=o():i=Je(o);for(let s of Array.from(t.childNodes))M(s);t.replaceChildren(i)}let r=S(n);return v(t,r),t}function io(e,t="default"){return e?.[t]}function so(e,t){return S(()=>{t.style.display=e()?"":"none"}),t}function ao(e,t,n){let r=document.createComment("when"),o=null,i,s=!1,a=()=>{let c=e(),l=r.parentNode;if(!l||s&&c===i)return;i=c,o?.parentNode&&(M(o),o.parentNode.removeChild(o),o=null);let d=c?t():n?n():null;if(d!=null){let m=d instanceof Node?d:document.createTextNode(String(d));l.insertBefore(m,r.nextSibling),o=m}s=!0};return S(a),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function co(e,t,n){let r=document.createComment("match"),o=null,i,s=!1,a=()=>{let c=String(e()),l=r.parentNode;if(!l||s&&c===i)return;i=c,o?.parentNode&&(M(o),o.parentNode.removeChild(o),o=null);let d=t[c]||n;if(d){let m=d();if(m!=null){let b=m instanceof Node?m:document.createTextNode(String(m));l.insertBefore(b,r.nextSibling),o=b}}s=!0};return S(a),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function lo(e,t,n){let r=document.createComment("keep-alive"),o=new Map,i=[],s=n?.max??10;s===0&&E()&&w("KeepAlive: unbounded cache (max: 0). Cached subtrees will never be evicted \u2014 set `max` to bound memory.");let a,c=null,l=!1,d=!1,m=()=>{if(d)return;let f=e(),p=r.parentNode;if(!p||l&&f===a)return;c?.parentNode&&p.removeChild(c),a=f;let g=o.get(f);if(g){let x=i.indexOf(f);x!==-1&&(i.splice(x,1),i.push(f))}else{let x=t[f];if(!x){c=null,l=!0;return}if(g=x(),o.set(f,g),i.push(f),s>0&&i.length>s){let y=i.shift(),N=o.get(y);N&&(M(N),N.parentNode&&N.parentNode.removeChild(N),o.delete(y))}}p.insertBefore(g,r.nextSibling),c=g,l=!0},b=S(m);return l||queueMicrotask(()=>{!l&&r.parentNode&&m()}),v(r,()=>{d=!0,b();for(let f of o.values())M(f),f.parentNode&&f.parentNode.removeChild(f);o.clear(),i.length=0,c=null}),r}function uo(e,t,n){let r=t(e,n);typeof r=="function"&&v(e,r)}var fo=(e,t)=>{let n=r=>{e.contains(r.target)||t()};return document.addEventListener("pointerdown",n,!0),()=>document.removeEventListener("pointerdown",n,!0)},po=(e,t)=>{let n=t.duration??500,r=null,o=()=>{r=setTimeout(()=>{t.callback(),r=null},n)},i=()=>{r!==null&&(clearTimeout(r),r=null)};return e.addEventListener("pointerdown",o),e.addEventListener("pointerup",i),e.addEventListener("pointerleave",i),()=>{i(),e.removeEventListener("pointerdown",o),e.removeEventListener("pointerup",i),e.removeEventListener("pointerleave",i)}},mo=(e,t)=>{let n=()=>{let r=typeof t=="function"?t():e.textContent??"";navigator.clipboard.writeText(r)};return e.addEventListener("click",n),()=>e.removeEventListener("click",n)},go=e=>{let t=()=>{e.style.overflow="hidden",e.style.height="auto",e.style.height=`${e.scrollHeight}px`};return t(),e.addEventListener("input",t),()=>e.removeEventListener("input",t)},bo=e=>{let t='a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])',n=r=>{if(r.key!=="Tab")return;let o=Array.from(e.querySelectorAll(t));if(o.length===0)return;let i=o[0],s=o[o.length-1];r.shiftKey&&document.activeElement===i?(r.preventDefault(),s.focus()):!r.shiftKey&&document.activeElement===s&&(r.preventDefault(),i.focus())};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)};var G=null;function ho(e,t){try{let n=e();return n&&typeof n.then=="function"&&n.catch(r=>{t?t(r,"async"):G?G(r,"async"):console.error("Unhandled async error in Sibu.catchError:",r)}),n}catch(n){return t?t(n,"sync"):G?G(n,"sync"):console.error("Unhandled error in Sibu.catchError:",n),null}}async function yo(e,t){try{return await e()}catch(n){return t?t(n,"async"):G?G(n,"async"):console.error("Unhandled async error in Sibu.catchErrorAsync:",n),null}}function xo(e){G=e}var Ge=0;function vo(e="sibu"){return Ge++,`${e}-${Ge}`}function To(){Ge=0}var xe=0,Ze=new Set;function z(e){xe++;try{return e()}finally{xe--,xe===0&&Ni()}}function ce(e){return xe===0?!1:(Ze.add(e),!0)}function So(){return xe>0}function Ni(){try{for(let e of Ze)vt(e)}finally{Ze.clear()}Tt()}var wo=globalThis,Ye=E();function C(e,t){let n={value:e},r=Ye?t?.name:void 0,o=t?.equals;r&&(n.__name=r);function i(){return re(n),n.value}i.__signal=n,r&&(i.__name=r);function s(a){let c=typeof a=="function"?a(n.value):a;if(!(o?o(n.value,c):Object.is(c,n.value))){if(Ye){let l=n.value;n.value=c;let d=wo.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&d.emit("signal:update",{signal:n,name:r,oldValue:l,newValue:c})}else n.value=c;ce(n)||Le(n)}}if(Ye){let a=wo.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&a.emit("signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}var le=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let e=Function("return typeof require==='function'?require:null")();if(e){let t=e("node:async_hooks");le=new t.AsyncLocalStorage}}}catch{le=null}var Z={ssr:!1,suspenseIdCounter:0};function ue(){if(le){let e=le.getStore();if(e)return e}return Z}function de(){return ue().ssr}function ko(){ue().ssr=!0}function Eo(){ue().ssr=!1}function Co(e){let t={ssr:!0,suspenseIdCounter:0};if(le)return le.run(t,e);let n=Z.ssr,r=Z.suspenseIdCounter;Z.ssr=!0,Z.suspenseIdCounter=0;try{return e()}finally{Z.ssr=n,Z.suspenseIdCounter=r}}function Ao(e){let t=ue(),n=t.ssr;t.ssr=!0;try{return e()}finally{n||(t.ssr=!1)}}var Qe=globalThis;function _o(e,t){let n,r=!0;return()=>{let o=e();if(r)r=!1,n=o,U(()=>t(o,void 0));else{let i=n;n=o,U(()=>t(o,i))}}}function O(e,t){if($(typeof e=="function","effect: argument must be a function."),de())return()=>{};let n=t?.onError,r=[],o=f=>{r.push(f)},i=()=>{if(r.length===0)return;let f=r;r=[];for(let p=f.length-1;p>=0;p--)try{f[p]()}catch(g){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw:",g)}},s=()=>e(o),a=n?()=>{try{s()}catch(f){n(f)}}:s,c=()=>{},l=!1,d=()=>{if(l){Qe.__SIBU_DEV_WARN__!==!1&&typeof console<"u"&&console.warn("[SibuJS] effect re-entered itself while running \u2014 the triggering update will be ignored. Wrap mutual writes in `batch()` or split the effect to avoid this.");return}l=!0;try{i(),c(),c=S(a,d)}finally{l=!1}};l=!0;try{c=S(a,d)}finally{l=!1}let m=Qe.__SIBU_DEVTOOLS_GLOBAL_HOOK__;m&&m.emit("effect:create",{effectFn:e});let b=!1;return()=>{if(b)return;b=!0;let f=Qe.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(f)try{f.emit("effect:destroy",{effectFn:e})}catch{}try{i()}catch(p){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",p)}try{c()}catch(p){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",p)}}}function De(e,t){$(typeof e=="function","derived: argument must be a getter function.");let n=t?.name,r=t?.equals,o={};o._d=!1,o._g=e;let i=()=>{o._d||(o._d=!0)};i._c=1,i._sig=o,S(()=>{let l=!0;try{o._v=e(),o._d=!1,l=!1}finally{l&&(o._d=!0)}},i);let s=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__,a=!1;function c(){if(a)throw new Error(`[SibuJS] Circular dependency detected in derived${n?` "${n}"`:""}. A derived signal cannot read itself (directly or through a chain).`);if(_e){if(o._d){a=!0;let l=!0;try{Ie(()=>{o._v=e(),o._d=!1,l=!1},i)}finally{a=!1,l&&(o._d=!0)}}return o._v}if(re(o),o._d){let l=o._v;a=!0;let d=!0;try{Ie(()=>{let m=e();o._v=r&&o._v!==void 0&&r(o._v,m)?o._v:m,o._d=!1,d=!1},i)}finally{a=!1,d&&(o._d=!0)}s&&l!==o._v&&s.emit("computed:update",{signal:o,oldValue:l,newValue:o._v})}return o._v}return n&&(c.__name=n,o.__name=n),c.__signal=o,s&&s.emit("computed:create",{signal:o,name:n,getter:c}),c}function Lo(e,t){if($(typeof e=="function","watch: first argument must be a getter function."),$(typeof t=="function","watch: second argument must be a callback function."),de())return()=>{};let n,r=!0;return S(()=>{let s=e();if(r){n=s,r=!1;return}Object.is(s,n)||(t(s,n),n=s)})}function No(e){$(e!==null&&typeof e=="object"&&!Array.isArray(e),"store: argument must be a plain object. For arrays, use array() instead.");let t={};Object.keys(e).forEach(c=>{let[l,d]=C(e[c]);t[c]=[l,d]});let n=new Proxy({},{get(c,l){if(l in t){let d=t[l][0];return d()}},set(){throw new Error("[SibuJS store] Direct mutation is not allowed. Use actions.setState() to update store properties.")}}),r=()=>{let c={};return Object.keys(t).forEach(l=>{c[l]=t[l][0]()}),c};return[n,{setState:c=>{let l=r(),d=typeof c=="function"?c(l):c;z(()=>{Object.entries(d).forEach(([m,b])=>{m in t&&t[m][1](b)})})},reset:()=>{z(()=>{Object.keys(e).forEach(c=>{let l=t[c][1];l(e[c])})})},subscribe:c=>{let l=!0;return O(()=>{let d=r();if(l){l=!1;return}c(d)})},subscribeKey:(c,l)=>{let d,m=!0;return O(()=>{let b=t[c][0]();if(m){d=b,m=!1;return}if(!Object.is(b,d)){let f=d;d=b,l(b,f)}})},getSnapshot:r}]}function Mo(e){let[t,n]=C(e);return{get current(){return t()},set current(r){n(r)}}}function Ro(e=[]){let[t,n]=C([...e]);return[t,{push(...o){n(i=>[...i,...o])},pop(){let o;return n(i=>{let s=[...i];return o=s.pop(),s}),o},shift(){let o;return n(i=>{let s=[...i];return o=s.shift(),s}),o},unshift(...o){n(i=>[...o,...i])},splice(o,i=0,...s){let a=[];return n(c=>{let l=[...c];return a=l.splice(o,i,...s),l}),a},remove(o){n(i=>i.filter((s,a)=>a!==o))},removeWhere(o){n(i=>{let s=i.findIndex(o);return s===-1?i:i.filter((a,c)=>c!==s)})},set(o){n([...o])},update(o,i){n(s=>s.map((a,c)=>c===o?i:a))},updateWhere(o,i){n(s=>s.map(a=>o(a)?i(a):a))},sort(o){n(i=>[...i].sort(o))},reverse(){n(o=>[...o].reverse())},filter(o){n(i=>i.filter(o))},map(o){n(i=>i.map(o))},clear(){n([])}}]}function $o(e=[]){let t=[...e],n=null,r={};function o(){n=null,ce(r)||Le(r)}function i(){if(re(r),n===null){let a=t.slice();n=Object.freeze(a)}return n}return[i,{push(...a){a.length!==0&&(t.push(...a),o())},pop(){if(t.length===0)return;let a=t.pop();return o(),a},shift(){if(t.length===0)return;let a=t.shift();return o(),a},unshift(...a){a.length!==0&&(t.unshift(...a),o())},splice(a,c=0,...l){let d=t.splice(a,c,...l);return(d.length>0||l.length>0)&&o(),d},remove(a){a<0||a>=t.length||(t.splice(a,1),o())},removeWhere(a){let c=t.findIndex(a);c!==-1&&(t.splice(c,1),o())},set(a){t=[...a],o()},update(a,c){a<0||a>=t.length||Object.is(t[a],c)||(t[a]=c,o())},updateWhere(a,c){let l=!1;for(let d=0;d<t.length;d++)if(a(t[d])){let m=c(t[d]);Object.is(t[d],m)||(t[d]=m,l=!0)}l&&o()},sort(a){t.length<=1||(t.sort(a),o())},reverse(){t.length<=1||(t.reverse(),o())},filter(a){let c=t.filter(a);c.length!==t.length&&(t=c,o())},map(a){let c=!1;for(let l=0;l<t.length;l++){let d=a(t[l],l);Object.is(t[l],d)||(t[l]=d,c=!0)}c&&o()},clear(){t.length!==0&&(t=[],o())}}]}function fe(e,t,n){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!=typeof t||typeof e!="object")return!1;let r=e,o=t;if(r.constructor!==o.constructor)return!1;if(e instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp){let c=t;return e.source===c.source&&e.flags===c.flags}n||(n=new Map);let i=n.get(r);if(i?.has(o))return!0;if(i||(i=new Set,n.set(r,i)),i.add(o),e instanceof Map){let c=t;if(e.size!==c.size)return!1;for(let[l,d]of e)if(!c.has(l)||!fe(d,c.get(l),n))return!1;return!0}if(e instanceof Set){let c=t;if(e.size!==c.size)return!1;for(let l of e)if(!c.has(l))return!1;return!0}if(e instanceof ArrayBuffer){let c=new Uint8Array(e),l=new Uint8Array(t);if(c.length!==l.length)return!1;for(let d=0;d<c.length;d++)if(c[d]!==l[d])return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){let c=e,l=t;if(c.length!==l.length)return!1;for(let d=0;d<c.length;d++)if(c[d]!==l[d])return!1;return!0}if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:e.every((c,l)=>fe(c,t[l],n));let s=Object.keys(r),a=Object.keys(o);return s.length!==a.length?!1:s.every(c=>fe(r[c],o[c],n))}function Ho(e){return C(e,{equals:(t,n)=>fe(t,n)})}function Oo(e,t,n){return[De(e,n),i=>{z(()=>t(i))}]}function Do(e,t){let[n,r]=C(t),[o,i]=C(!1),[s,a]=C(null),[c,l]=C(0),d=0;return O(()=>{c();let m=++d;z(()=>{i(!0),a(null)});let b;try{b=e()}catch(f){z(()=>{a(f),i(!1)});return}b.then(f=>{m===d&&z(()=>{r(f),i(!1)})},f=>{m===d&&z(()=>{a(f),i(!1)})})}),{value:n,loading:o,error:s,refresh:()=>l(m=>m+1)}}function nt(e,t){try{return e()}catch(n){w(`${t}: callback threw: ${n instanceof Error?n.message:String(n)}`);return}}function Xe(e,t,n){let r=nt(e,t);typeof r=="function"&&n&&v(n,r)}var pe=new WeakMap,Y=new WeakMap,q=new Set,j=new Set,me=null,Pe=0,Mi=256;function et(e){let t=pe.get(e);if(t){pe.delete(e),q.delete(e);for(let n of t)try{n()}catch{}}}function tt(e){Y.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let n=Y.get(e);if(n){Y.delete(e),j.delete(e);for(let r of n)try{r()}catch{}}})}function Ri(e){if(q.size===0||e.nodeType!==1)return;let t=e;if(q.has(t)&&t.isConnected&&et(t),t.firstElementChild)for(let n of Array.from(q))n!==t&&n.isConnected&&t.contains(n)&&et(n)}function $i(e){if(j.size===0||e.nodeType!==1)return;let t=e;if(j.has(t)&&!t.isConnected&&tt(t),t.firstElementChild)for(let n of Array.from(j))n!==t&&!n.isConnected&&t.contains(n)&&tt(n)}function Hi(){if(q.size>0)for(let e of Array.from(q))e.isConnected&&et(e);if(j.size>0)for(let e of Array.from(j))e.isConnected||tt(e)}function Po(){me||typeof document>"u"||(me=new MutationObserver(e=>{for(let t of e)if(t.type==="childList"){if(t.addedNodes.length>0)for(let n=0;n<t.addedNodes.length;n++)Ri(t.addedNodes[n]);if(t.removedNodes.length>0)for(let n=0;n<t.removedNodes.length;n++)$i(t.removedNodes[n])}Pe+=e.length,Pe>=Mi&&(Pe=0,Hi()),rt()}),me.observe(document.body,{childList:!0,subtree:!0}))}function rt(){me&&q.size===0&&j.size===0&&(me.disconnect(),me=null,Pe=0)}function Oi(e,t){let n=pe.get(e);return n||(n=[],pe.set(e,n)),n.push(t),q.add(e),Po(),()=>{let r=pe.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(pe.delete(e),q.delete(e))}rt()}}function Di(e,t){let n=Y.get(e);return n||(n=[],Y.set(e,n)),n.push(t),j.add(e),Po(),()=>{let r=Y.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Y.delete(e),j.delete(e))}rt()}}function ve(e,t){if(!(typeof document>"u"))if(t){let n=!1;if(v(t,()=>{n=!0}),t.isConnected){queueMicrotask(()=>{n||Xe(e,"onMount",t)});return}queueMicrotask(()=>{if(n)return;if(t.isConnected){Xe(e,"onMount",t);return}let r=Oi(t,()=>{n||Xe(e,"onMount",t)});v(t,r)})}else queueMicrotask(()=>{nt(e,"onMount")})}function zo(e,t){if(typeof document>"u")return;let n=!1,r=()=>{n||(n=!0,nt(e,"onUnmount"))};v(t,r);let o=()=>{if(n)return;let i=Di(t,r);v(t,i)};t.isConnected?o():ve(()=>{o()},t)}function Fo(e,t){v(t,e)}function Bo(e){let[t,n]=C(e);return{provide(o){let i=t();return n(o),()=>n(i)},use(){return t},get(){return t()},set(o){n(o)},withContext(o,i){let s=t();n(o);try{return i()}finally{n(s)}}}}function Io(e){let t=e();return E()&&queueMicrotask(()=>{try{e()}catch(n){console.warn("[SibuJS strict] second run threw:",n)}}),t}function qo(e){if(!E())return O(e);let t=O(e),n=null;return queueMicrotask(()=>{try{n=O(e)}catch(r){console.warn("[SibuJS strictEffect] second run threw:",r)}}),()=>{t(),n&&n()}}function jo(){return new Promise(e=>{queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>e()):e()})})}function Uo(e){let[t,n]=C(e()),r=!1,o=!1,i=t(),s=()=>{r=!1,!o&&n(i)},a=()=>{r||(r=!0,queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(s):s()}))},c=S(()=>{i=e(),a()}),l=(()=>t());return l.dispose=()=>{o||(o=!0,c())},l}var Vo=16;function Pi(e){let t=globalThis;if(typeof t.requestIdleCallback=="function"){t.requestIdleCallback(e,{timeout:Vo*4});return}if(typeof requestAnimationFrame=="function"){requestAnimationFrame(()=>e());return}setTimeout(e,Vo)}function Ko(){let[e,t]=C(!1);function n(r){t(!0),Pi(()=>{let o;try{o=r()}catch{t(!1);return}o&&typeof o.then=="function"?o.then(()=>t(!1),()=>t(!1)):t(!1)})}return{pending:e,start:n}}var ot="__sibuPendingError";function Wo(e,t){let n=()=>{try{return e.parentNode?(e.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:t}})),!0):!1}catch{return!1}};e.parentNode&&n()||queueMicrotask(()=>{n()||(e[ot]=t)})}function Te(e){let t=e,n=t[ot];if(n instanceof Error)return delete t[ot],n}function it(e){let t=null;return function(){if(t)return t();let r=T({class:"sibu-lazy"}),o=!1;return e().then(i=>{if(o)return;t=i.default;let s=t();r.replaceChildren(s)}).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));w(`[SibuJS] lazy() failed to load component: ${s.message}`),r.replaceChildren(T({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),Wo(r,s)}),r.appendChild(A("sibu-lazy-loading","Loading...")),v(r,()=>{o=!0}),r}}function st({nodes:e,fallback:t}){let n=T({class:"sibu-suspense"}),r=t();n.appendChild(r);let o=!1,i=null;return v(n,()=>{o=!0,i&&(i.disconnect(),i=null)}),queueMicrotask(()=>{if(!o)try{let s=e();if(s.classList.contains("sibu-lazy")){if(!s.querySelector(".sibu-lazy-loading")){n.replaceChildren(s);return}i=new MutationObserver(()=>{if(o)return;s.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,n.replaceChildren(s))}),i.observe(s,{childList:!0,subtree:!0})}else n.replaceChildren(s)}catch(s){let a=s instanceof Error?s:new Error(String(s));w(`[SibuJS] Suspense nodes() threw: ${a.message}`),Wo(n,a)}}),n}var tc=E();function at(e){return e}var nc=1024*1024;var zi=E(),Fi=`
1
+ "use strict";var Sibu=(()=>{var De=Object.defineProperty;var fi=Object.getOwnPropertyDescriptor;var pi=Object.getOwnPropertyNames;var mi=Object.prototype.hasOwnProperty;var xt=(e,n)=>{for(var t in n)De(e,t,{get:n[t],enumerable:!0})},bi=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of pi(n))!mi.call(e,o)&&o!==t&&De(e,o,{get:()=>n[o],enumerable:!(r=fi(n,o))||r.enumerable});return e};var gi=e=>bi(De({},"__esModule",{value:!0}),e);var ms={};xt(ms,{DynamicComponent:()=>lo,ErrorBoundary:()=>ii,ErrorDisplay:()=>Oe,Fragment:()=>io,KeepAlive:()=>bo,Loading:()=>ai,Portal:()=>so,SVG_NS:()=>w,Suspense:()=>ct,__resetIdCounter:()=>Co,a:()=>rn,abbr:()=>on,action:()=>go,address:()=>It,area:()=>Ln,array:()=>Fo,article:()=>Pt,aside:()=>zt,asyncDerived:()=>jo,audio:()=>Mn,autoResize:()=>vo,b:()=>sn,base:()=>kr,batch:()=>$,bdi:()=>an,bdo:()=>cn,bindDynamic:()=>qe,blockquote:()=>Ut,body:()=>Rt,br:()=>ln,button:()=>oe,canvas:()=>Vn,caption:()=>Zn,catchError:()=>So,catchErrorAsync:()=>wo,center:()=>Jr,checkLeaks:()=>At,circle:()=>Ar,cite:()=>un,clickOutside:()=>ho,clipPath:()=>Br,code:()=>Re,col:()=>Xn,colgroup:()=>Qn,context:()=>Ko,copyOnClick:()=>xo,createId:()=>ko,customElement:()=>Xr,data:()=>dn,datalist:()=>sr,dd:()=>Jt,deepEqual:()=>ce,deepSignal:()=>zo,defer:()=>Xo,defs:()=>Fr,del:()=>Jn,derived:()=>$e,details:()=>xr,dfn:()=>fn,dialog:()=>vr,disableSSR:()=>No,dispose:()=>L,div:()=>T,dl:()=>Gt,dt:()=>Zt,each:()=>ro,effect:()=>H,ellipse:()=>Nr,em:()=>pn,embed:()=>On,enableSSR:()=>Ao,enqueueBatchedSignal:()=>U,fieldset:()=>ar,figcaption:()=>Xt,figure:()=>Qt,font:()=>Gr,footer:()=>Dt,form:()=>cr,g:()=>Lr,getSSRStore:()=>se,getSlot:()=>uo,h1:()=>jt,h2:()=>Wt,h3:()=>Le,h4:()=>qt,h5:()=>Vt,h6:()=>Kt,head:()=>Mt,header:()=>Ot,hr:()=>Yt,html:()=>Ue,i:()=>mn,iframe:()=>Dn,img:()=>Rn,input:()=>lr,ins:()=>Gn,isBatching:()=>_o,isSSR:()=>ae,kbd:()=>bn,label:()=>ur,lazy:()=>at,legend:()=>dr,li:()=>en,line:()=>Mr,linearGradient:()=>jr,link:()=>Cr,longPress:()=>yo,main:()=>Bt,map:()=>Hn,mark:()=>gn,marker:()=>Ur,marquee:()=>Zr,mask:()=>zr,match:()=>mo,math:()=>qn,menu:()=>Tr,meta:()=>_r,meter:()=>fr,mount:()=>eo,nav:()=>Ft,nextTick:()=>Go,noscript:()=>Kn,object:()=>Fn,ol:()=>tn,on:()=>$o,onCleanup:()=>Vo,onMount:()=>be,onUnmount:()=>qo,optgroup:()=>pr,option:()=>mr,output:()=>br,p:()=>Ne,param:()=>Bn,path:()=>Rr,pattern:()=>Ir,picture:()=>zn,polygon:()=>Hr,polyline:()=>$r,portal:()=>In,pre:()=>Me,progress:()=>gr,q:()=>hn,radialGradient:()=>Wr,reactiveArray:()=>Bo,rect:()=>Pr,ref:()=>Do,registerComponent:()=>ao,registerDisposer:()=>v,resolveComponent:()=>Ge,retrack:()=>F,rp:()=>yn,rt:()=>xn,ruby:()=>vn,runInSSRContext:()=>Lo,s:()=>Tn,samp:()=>Sn,script:()=>Un,section:()=>$t,select:()=>hr,setGlobalErrorHandler:()=>Eo,setMaxDrainIterations:()=>je,show:()=>fo,signal:()=>C,slot:()=>wr,small:()=>wn,source:()=>jn,span:()=>_,stop:()=>qr,store:()=>Oo,strict:()=>Uo,strictEffect:()=>Jo,strong:()=>En,style:()=>K,sub:()=>kn,summary:()=>Sr,sup:()=>Cn,svg:()=>Wn,symbol:()=>Kr,table:()=>Yn,tagFactory:()=>u,takePendingError:()=>ge,tbody:()=>er,td:()=>tr,template:()=>Er,text:()=>Or,textarea:()=>yr,tfoot:()=>nr,th:()=>rr,thead:()=>or,time:()=>_n,title:()=>Ht,tr:()=>ir,track:()=>$n,transition:()=>Qo,trapFocus:()=>To,trustHTML:()=>lt,tspan:()=>Dr,u:()=>An,ul:()=>nn,unregisterComponent:()=>co,untracked:()=>V,use:()=>Vr,var_:()=>Nn,video:()=>Pn,watch:()=>Po,when:()=>po,withSSR:()=>Mo,writable:()=>Io});var dt={};xt(dt,{DynamicComponent:()=>lo,ErrorBoundary:()=>ii,ErrorDisplay:()=>Oe,Fragment:()=>io,KeepAlive:()=>bo,Loading:()=>ai,Portal:()=>so,SVG_NS:()=>w,Suspense:()=>ct,__resetIdCounter:()=>Co,a:()=>rn,abbr:()=>on,action:()=>go,address:()=>It,area:()=>Ln,array:()=>Fo,article:()=>Pt,aside:()=>zt,asyncDerived:()=>jo,audio:()=>Mn,autoResize:()=>vo,b:()=>sn,base:()=>kr,batch:()=>$,bdi:()=>an,bdo:()=>cn,bindDynamic:()=>qe,blockquote:()=>Ut,body:()=>Rt,br:()=>ln,button:()=>oe,canvas:()=>Vn,caption:()=>Zn,catchError:()=>So,catchErrorAsync:()=>wo,center:()=>Jr,checkLeaks:()=>At,circle:()=>Ar,cite:()=>un,clickOutside:()=>ho,clipPath:()=>Br,code:()=>Re,col:()=>Xn,colgroup:()=>Qn,context:()=>Ko,copyOnClick:()=>xo,createId:()=>ko,customElement:()=>Xr,data:()=>dn,datalist:()=>sr,dd:()=>Jt,deepEqual:()=>ce,deepSignal:()=>zo,defer:()=>Xo,defs:()=>Fr,del:()=>Jn,derived:()=>$e,details:()=>xr,dfn:()=>fn,dialog:()=>vr,disableSSR:()=>No,dispose:()=>L,div:()=>T,dl:()=>Gt,dt:()=>Zt,each:()=>ro,effect:()=>H,ellipse:()=>Nr,em:()=>pn,embed:()=>On,enableSSR:()=>Ao,enqueueBatchedSignal:()=>U,fieldset:()=>ar,figcaption:()=>Xt,figure:()=>Qt,font:()=>Gr,footer:()=>Dt,form:()=>cr,g:()=>Lr,getSSRStore:()=>se,getSlot:()=>uo,h1:()=>jt,h2:()=>Wt,h3:()=>Le,h4:()=>qt,h5:()=>Vt,h6:()=>Kt,head:()=>Mt,header:()=>Ot,hr:()=>Yt,html:()=>Ue,i:()=>mn,iframe:()=>Dn,img:()=>Rn,input:()=>lr,ins:()=>Gn,isBatching:()=>_o,isSSR:()=>ae,kbd:()=>bn,label:()=>ur,lazy:()=>at,legend:()=>dr,li:()=>en,line:()=>Mr,linearGradient:()=>jr,link:()=>Cr,longPress:()=>yo,main:()=>Bt,map:()=>Hn,mark:()=>gn,marker:()=>Ur,marquee:()=>Zr,mask:()=>zr,match:()=>mo,math:()=>qn,menu:()=>Tr,meta:()=>_r,meter:()=>fr,mount:()=>eo,nav:()=>Ft,nextTick:()=>Go,noscript:()=>Kn,object:()=>Fn,ol:()=>tn,on:()=>$o,onCleanup:()=>Vo,onMount:()=>be,onUnmount:()=>qo,optgroup:()=>pr,option:()=>mr,output:()=>br,p:()=>Ne,param:()=>Bn,path:()=>Rr,pattern:()=>Ir,picture:()=>zn,polygon:()=>Hr,polyline:()=>$r,portal:()=>In,pre:()=>Me,progress:()=>gr,q:()=>hn,radialGradient:()=>Wr,reactiveArray:()=>Bo,rect:()=>Pr,ref:()=>Do,registerComponent:()=>ao,registerDisposer:()=>v,resolveComponent:()=>Ge,retrack:()=>F,rp:()=>yn,rt:()=>xn,ruby:()=>vn,runInSSRContext:()=>Lo,s:()=>Tn,samp:()=>Sn,script:()=>Un,section:()=>$t,select:()=>hr,setGlobalErrorHandler:()=>Eo,setMaxDrainIterations:()=>je,show:()=>fo,signal:()=>C,slot:()=>wr,small:()=>wn,source:()=>jn,span:()=>_,stop:()=>qr,store:()=>Oo,strict:()=>Uo,strictEffect:()=>Jo,strong:()=>En,style:()=>K,sub:()=>kn,summary:()=>Sr,sup:()=>Cn,svg:()=>Wn,symbol:()=>Kr,table:()=>Yn,tagFactory:()=>u,takePendingError:()=>ge,tbody:()=>er,td:()=>tr,template:()=>Er,text:()=>Or,textarea:()=>yr,tfoot:()=>nr,th:()=>rr,thead:()=>or,time:()=>_n,title:()=>Ht,tr:()=>ir,track:()=>$n,transition:()=>Qo,trapFocus:()=>To,trustHTML:()=>lt,tspan:()=>Dr,u:()=>An,ul:()=>nn,unregisterComponent:()=>co,untracked:()=>V,use:()=>Vr,var_:()=>Nn,video:()=>Pn,watch:()=>Po,when:()=>po,withSSR:()=>Mo,writable:()=>Io});function E(){return typeof globalThis.__SIBU_DEV__<"u"?!!globalThis.__SIBU_DEV__:typeof __SIBU_DEV__<"u"?__SIBU_DEV__:typeof process<"u"&&process.env?.NODE_ENV!=="production"}var vt=E();function R(e,n){if(vt&&!e)throw new Error(`[SibuJS] ${n}`)}function S(e){vt&&console.warn(`[SibuJS] ${e}`)}var hi=["http:","https:","mailto:","tel:","ftp:"];function B(e){let n=e.replace(/[\x00-\x20\x7f-\x9f]+/g,"").trim();if(!n)return"";let t=n.toLowerCase(),r=-1;for(let i=0;i<t.length;i++){let s=t.charCodeAt(i);if(s===58){r=i;break}if(s===47||s===63||s===35)break}if(r===-1)return n;let o=t.slice(0,r+1);return/^[a-z][a-z0-9+.-]*:$/.test(o)&&hi.indexOf(o)===-1?"":n}function pe(e){let n=e.split(","),t=[];for(let r=0;r<n.length;r++){let o=n[r].trim();if(!o)continue;let i=o.match(/^(\S+)(\s+.+)?$/);if(!i)continue;let s=B(i[1]);s&&t.push(i[2]?`${s}${i[2]}`:s)}return t.join(", ")}function Fe(e){let t=e.replace(/\\([0-9a-fA-F]{1,6})\s?/g,(r,o)=>{let i=Number.parseInt(o,16);if(!Number.isFinite(i)||i<0||i>1114111)return"";try{return String.fromCodePoint(i)}catch{return""}}).toLowerCase().replace(/\s+/g,"");return t.includes("url(")||t.includes("expression(")||t.includes("javascript:")||t.includes("vbscript:")||t.includes("-moz-binding")||t.includes("behavior:")||t.includes("@import")||t.includes("image-set(")||t.includes("filter:progid")?"":e}var yi=new Set(["href","xlink:href","src","action","formaction","formtarget","cite","poster","background","srcset","ping","data"]);function j(e){return yi.has(e)}var xi=E(),vi=4096,Be=[];function Ti(){return{sig:null,sub:null,epoch:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function Si(e,n,t){let r=Be.pop();if(r)return r.sig=e,r.sub=n,r.epoch=t,r;let o=Ti();return o.sig=e,o.sub=n,o.epoch=t,o}function Tt(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,Be.length<vi&&Be.push(e)}function wi(e,n){let t=e.subsHead??null;n.sigPrev=null,n.sigNext=t,t?t.sigPrev=n:e.subsTail=n,e.subsHead=n,e.__sc=(e.__sc??0)+1}function St(e){let n=e.sig;if(!n)return;let t=e.sigPrev,r=e.sigNext;t?t.sigNext=r:n.subsHead=r,r?r.sigPrev=t:n.subsTail=t,n.__sc=(n.__sc??1)-1,n.__activeNode===e&&(n.__activeNode=e.prevActive),n.__sc===0&&(n.subsHead=null,n.subsTail=null)}function Ei(e,n){let t=e.depsTail??null;n.subPrev=t,n.subNext=null,t?t.subNext=n:e.depsHead=n,e.depsTail=n}function ki(e){let n=e.sub;if(!n)return;let t=e.subPrev,r=e.subNext;t?t.subNext=r:n.depsHead=r,r?r.subPrev=t:n.depsTail=t}var D=null,ze=null,W=0,q=[],O=new Set,Ci=[];function _i(e){try{e()}catch(n){xi&&S(`Subscriber threw during notification: ${n instanceof Error?n.message:String(n)}`)}}var Se=0,Ce=!1;function Ai(){Se===0&&(ze=D,D=null,Ce=!0),Se++}function Ni(){Se--,Se===0&&(D=ze,ze=null,Ce=!1)}function V(e){Ai();try{return e()}finally{Ni()}}var Li=0;function F(e,n){let t=D;D=n;let r=n,o=++Li;r._epoch=o,r._structDirty=!1;for(let i=r.depsHead??null;i!==null;i=i.subNext){let s=i.sig;i.prevActive=s.__activeNode??null,s.__activeNode=i}try{e()}finally{D=t;let i=r.depsHead??null;for(;i!==null;){let s=i.subNext,a=i.sig;a.__activeNode=i.prevActive,i.prevActive=null,i.epoch!==o&&(ki(i),St(i),Tt(i)),i=s}}}function k(e,n){n||(n=e),we(n);let t=D;D=n;try{e()}finally{D=t;let o=n;for(let i=o.depsHead??null;i!==null;i=i.subNext){let s=i.sig;s.__activeNode=i.prevActive,i.prevActive=null}}let r=n;return r._dispose??(r._dispose=()=>we(n))}function Y(e){if(!D)return;let n=D,t=e,r=n._epoch??0,o=t.__activeNode??null;if(o!==null&&o.sub===n){o.epoch=r;return}let i=Si(e,n,r);i.prevActive=o,t.__activeNode=i,Ei(n,i),wi(t,i),n._structDirty=!0}function we(e){let n=e,t=n.depsHead??null;for(n.depsHead=null,n.depsTail=null;t;){let r=t.subNext;St(t),Tt(t),t=r}}var wt=50,Ee=1e6,ke=0;function je(e){let n=Ee;return Number.isFinite(e)&&e>0&&(Ee=Math.floor(e)),n}function Mi(e){let n=e;return n._runEpoch!==ke?(n._runEpoch=ke,n._runs=1,!1):(n._runs=(n._runs??0)+1,n._runs>wt)}function Ri(e){if(typeof console<"u"){let n=e.__name??"<unnamed>";console.error(`[SibuJS] subscriber "${n}" fired more than ${wt} times \u2014 likely a write-reads-self cycle between effects/signals. Breaking to prevent infinite loop.`)}}function Hi(){typeof console<"u"&&console.error(`[SibuJS] Notification drain exceeded ${Ee} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`)}function Et(){let e=0;for(;e<q.length;){if(e>=Ee){Hi();break}let n=q[e++];if(Mi(n)){Ri(n);break}O.delete(n),_i(n)}}function kt(){if(!(W>0)){W++,ke++;try{Et()}finally{W--,W===0&&(q.length=0,O.clear())}}}function Ie(e){e();let n=e._sig;if(!n)return;let t=Ci,r=t.length;for(t.push(n);t.length>r;){let i=t.pop().subsHead??null;for(;i;){let s=i.sub;if(s)if(s._c){let a=s._sig;a?a._d||(a._d=!0,t.push(a)):s()}else O.has(s)||(O.add(s),q.push(s));i=i.sigNext}}}function Ct(e){let t=e.subsHead??null;for(;t;){let r=t.sub;r&&(r._c?Ie(r):O.has(r)||(O.add(r),q.push(r))),t=t.sigNext}}function ee(e){let t=e.subsHead;if(t){if(W>0){let r=t;for(;r;){let o=r.sub;o&&(o._c?Ie(o):O.has(o)||(O.add(o),q.push(o))),r=r.sigNext}return}W++,ke++;try{let r=t;for(;r;){let o=r.sub;o&&(o._c?Ie(o):O.has(o)||(O.add(o),q.push(o))),r=r.sigNext}Et()}finally{W--,W===0&&(q.length=0,O.clear())}}}var _e=E();function We(e,n,t){e[n]=t}function $i(e){if(e.length<3)return!1;let n=e.toLowerCase();return n[0]==="o"&&n[1]==="n"&&n.charCodeAt(2)>=97&&n.charCodeAt(2)<=122}function Ae(e,n,t){if($i(n))return _e&&S(`bindAttribute: refusing to bind event-handler attribute "${n}". Use on:{ ${n.slice(2)}: fn } instead.`),()=>{};function r(){let i;try{i=t()}catch(a){_e&&S(`bindAttribute: getter for "${n}" threw: ${a instanceof Error?a.message:String(a)}`);return}if(typeof i=="boolean"){n in e&&(n==="checked"||n==="disabled"||n==="selected")?We(e,n,i):i?e.setAttribute(n,""):e.removeAttribute(n);return}let s=String(i);(n==="value"||n==="checked")&&n in e?We(e,n,n==="checked"?!!i:s):e.setAttribute(n,j(n)?B(s):s)}return k(r)}function qe(e,n,t){let r=null;function o(){let s;try{s=typeof n=="function"?n():n}catch(l){_e&&S(`bindDynamic: name getter threw: ${l instanceof Error?l.message:String(l)}`);return}let a;try{a=typeof t=="function"?t():t}catch(l){_e&&S(`bindDynamic: value getter threw: ${l instanceof Error?l.message:String(l)}`);return}if((s[0]==="o"||s[0]==="O")&&(s[1]==="n"||s[1]==="N"))return;r!==null&&r!==s&&e.removeAttribute(r);let c=String(a);(s==="value"||s==="checked")&&s in e?We(e,s,s==="checked"?!!a:c):e.setAttribute(s,j(s)?B(c):c),r=s}let i=k(o);return()=>{i(),r!==null&&e.removeAttribute(r)}}var _t=E();function J(e,n){let t=[];function r(){let o;try{o=n()}catch(l){_t&&S(`bindChildNode: getter threw: ${l instanceof Error?l.message:String(l)}`);return}if(o==null||typeof o=="boolean"){for(let l=0;l<t.length;l++){let d=t[l];d.parentNode&&d.parentNode.removeChild(d)}t.length=0;return}let i=e.parentNode;if(!i){t.length=0;return}let s;if(Array.isArray(o)){s=[];let l=new Set;for(let d=0;d<o.length;d++){let m=o[d];if(m==null||typeof m=="boolean")continue;let g=m instanceof Node?m:document.createTextNode(String(m));if(l.has(g)){_t&&S("bindChildNode: duplicate node reference in array \u2014 only the first occurrence is rendered.");continue}l.add(g),s.push(g)}}else s=[o instanceof Node?o:document.createTextNode(String(o))];let a;if(t.length>0&&s.length>0){let l=new Set(t);a=new Set;for(let d=0;d<s.length;d++)l.has(s[d])&&a.add(s[d])}for(let l=0;l<t.length;l++){let d=t[l];a?.has(d)||d.parentNode&&d.parentNode.removeChild(d)}let c=e.nextSibling;for(let l=0;l<s.length;l++){let d=s[l];a?.has(d)&&d.parentNode===i?d.nextSibling!==c&&i.insertBefore(d,c):i.insertBefore(d,c)}t=s}return k(r)}var te=new WeakMap,ne=E(),re=0;function v(e,n){let t=te.get(e);t||(t=[],te.set(e,t)),t.push(n),ne&&re++}function L(e){let n=[e],t=[];for(;n.length>0;){let r=n.pop();t.push(r);let o=Array.from(r.childNodes);for(let i=0;i<o.length;i++)n.push(o[i])}for(let r=t.length-1;r>=0;r--){let o=t[r],i=te.get(o);if(i){let s=i.slice();te.delete(o),ne&&(re-=s.length);for(let c of s)try{c()}catch(l){ne&&typeof console<"u"&&console.warn("[SibuJS] Disposer threw during cleanup:",l)}let a=0;for(;a++<8;){let c=te.get(o);if(!c||c.length===0)break;let l=c.slice();te.delete(o),ne&&(re-=l.length);for(let d of l)try{d()}catch(m){ne&&typeof console<"u"&&console.warn("[SibuJS] Disposer threw during cleanup:",m)}}}}}function At(e=0){return ne?(e>0&&re>e&&S(`checkLeaks: ${re} active DOM bindings detected. Expected \u2264${e}. This may indicate a component was removed from the DOM without calling dispose().`),re):0}var w="http://www.w3.org/2000/svg",Nt=E(),Pi=new Set(["script","iframe","object","embed","frame","frameset"]);function Oi(e){let n=e.toLowerCase();if(Pi.has(n))throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`)}var Di=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);function Fi(e,n,t){e[n]=t}var Lt=new Map;function Bi(e){let n=Lt.get(e);return n!==void 0||(n=e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),Lt.set(e,n)),n}function zi(e,n){if(typeof n=="function"){let r=k(()=>{e.setAttribute("style",n())});v(e,r);return}if(typeof n=="string"){e.setAttribute("style",n);return}let t=e;for(let r in n){let o=n[r],i=Bi(r);if(typeof o=="function"){let s=o,a=k(()=>{t.style.setProperty(i,Fe(String(s())))});v(e,a)}else t.style.setProperty(i,Fe(String(o)))}}function Ii(e,n){if(typeof n=="string"){e.setAttribute("class",n);return}if(typeof n=="function"){let i=k(()=>{e.setAttribute("class",n())});v(e,i);return}let t=n,r=!1,o="";for(let i in t){let s=t[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=k(()=>{let a="";for(let c in t){let l=t[c];(typeof l=="function"?l():l)&&(a=a?`${a} ${c}`:c)}e.setAttribute("class",a)});v(e,s)}else e.setAttribute("class",o)}function Ve(e,n){if(typeof n=="string"){e.textContent=n;return}if(typeof n=="number"){e.textContent=String(n);return}if(!(typeof n=="boolean"||n==null)){if(typeof n=="function"){let t=document.createComment("");e.appendChild(t),v(e,J(t,n));return}if(n instanceof Node){e.appendChild(n);return}if(Array.isArray(n))for(let t=0;t<n.length;t++){let r=n[t];if(typeof r=="function"){let o=document.createComment("");e.appendChild(o),v(e,J(o,r))}else if(r instanceof Node)e.appendChild(r);else if(Array.isArray(r))for(let o=0;o<r.length;o++){let i=r[o];if(typeof i=="function"){let s=document.createComment("");e.appendChild(s),v(e,J(s,i))}else i instanceof Node?e.appendChild(i):i!=null&&typeof i!="boolean"&&e.appendChild(document.createTextNode(String(i)))}else r!=null&&typeof r!="boolean"&&e.appendChild(document.createTextNode(String(r)))}}}var u=(e,n)=>(t,r)=>{Oi(e);let o=n?document.createElementNS(n,e):document.createElement(e);if(t===void 0)return o;if(typeof t=="string")return r!==void 0?(o.setAttribute("class",t),Ve(o,r),o):(o.textContent=t,o);if(typeof t=="number")return o.textContent=String(t),o;if(Array.isArray(t)||t instanceof Node||typeof t=="function")return Ve(o,t),o;let i=t,s=i.class;s!=null&&Ii(o,s);let a=i.id;a!=null&&(Nt&&typeof a=="string"&&Di.has(a.toLowerCase())&&S(`tagFactory: element id="${a}" matches a common global and may cause DOM clobbering. Avoid setting ids from untrusted input.`),o.id=a);let c=r!==void 0?r:i.nodes;c!=null&&Ve(o,c);let l=i.on;if(l)for(let g in l){let f=l[g];typeof f=="function"?o.addEventListener(g,f):Nt&&S(`tagFactory: on.${g} handler is not a function (got ${typeof f}). Event listener was not attached.`)}let d=i.style;d!=null&&zi(o,d);let m=i.ref;m&&(m.current=o);for(let g in i)switch(g){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{let f=i[g];if(f==null)continue;let p=g.toLowerCase();if(p[0]==="o"&&p[1]==="n")continue;if(typeof f=="function")v(o,Ae(o,g,f));else if(typeof f=="boolean")g in o&&(g==="checked"||g==="disabled"||g==="selected")?Fi(o,g,f):f?o.setAttribute(g,""):o.removeAttribute(g);else{let b=String(f);p==="srcset"?o.setAttribute(g,pe(b)):j(p)?o.setAttribute(g,B(b)):o.setAttribute(g,b)}}}return i.onElement&&typeof i.onElement=="function"&&i.onElement(o),o};var Ds=u("html"),Mt=u("head"),Rt=u("body"),Ht=u("title"),T=u("div"),_=u("span"),$t=u("section"),Pt=u("article"),Ot=u("header"),Dt=u("footer"),Ft=u("nav"),Bt=u("main"),zt=u("aside"),It=u("address"),Ne=u("p"),jt=u("h1"),Wt=u("h2"),Le=u("h3"),qt=u("h4"),Vt=u("h5"),Kt=u("h6"),Ut=u("blockquote"),Jt=u("dd"),Gt=u("dl"),Zt=u("dt"),Xt=u("figcaption"),Qt=u("figure"),Yt=u("hr"),en=u("li"),tn=u("ol"),nn=u("ul"),Me=u("pre"),rn=u("a"),on=u("abbr"),sn=u("b"),an=u("bdi"),cn=u("bdo"),ln=u("br"),un=u("cite"),Re=u("code"),dn=u("data"),fn=u("dfn"),pn=u("em"),mn=u("i"),bn=u("kbd"),gn=u("mark"),hn=u("q"),yn=u("rp"),xn=u("rt"),vn=u("ruby"),Tn=u("s"),Sn=u("samp"),wn=u("small"),En=u("strong"),kn=u("sub"),Cn=u("sup"),_n=u("time"),An=u("u"),Nn=u("var"),Ln=u("area"),Mn=u("audio"),Rn=u("img"),Hn=u("map"),$n=u("track"),Pn=u("video"),On=u("embed"),Dn=u("iframe"),Fn=u("object"),Bn=u("param"),zn=u("picture"),In=u("portal"),jn=u("source"),Wn=u("svg",w),qn=u("math"),Vn=u("canvas"),Kn=u("noscript"),Un=u("script"),Jn=u("del"),Gn=u("ins"),Zn=u("caption"),Xn=u("col"),Qn=u("colgroup"),Yn=u("table"),er=u("tbody"),tr=u("td"),nr=u("tfoot"),rr=u("th"),or=u("thead"),ir=u("tr"),oe=u("button"),sr=u("datalist"),ar=u("fieldset"),cr=u("form"),lr=u("input"),ur=u("label"),dr=u("legend"),fr=u("meter"),pr=u("optgroup"),mr=u("option"),br=u("output"),gr=u("progress"),hr=u("select"),yr=u("textarea"),xr=u("details"),vr=u("dialog"),Tr=u("menu"),Sr=u("summary"),wr=u("slot"),Er=u("template"),kr=u("base"),Cr=u("link"),_r=u("meta"),K=u("style"),Ar=u("circle",w),Nr=u("ellipse",w),Lr=u("g",w),Mr=u("line",w),Rr=u("path",w),Hr=u("polygon",w),$r=u("polyline",w),Pr=u("rect",w),Or=u("text",w),Dr=u("tspan",w),Fr=u("defs",w),Br=u("clipPath",w),zr=u("mask",w),Ir=u("pattern",w),jr=u("linearGradient",w),Wr=u("radialGradient",w),qr=u("stop",w),Vr=u("use",w),Kr=u("symbol",w),Ur=u("marker",w),Jr=u("center"),Gr=u("font"),Zr=u("marquee"),Xr=e=>u(e);var ji=E(),Wi=new Set(["script","style"]),qi=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Qr=new Set(["svg","circle","ellipse","g","line","path","polygon","polyline","rect","text","tspan","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop","use","symbol","marker"]),Yr=new WeakMap;function Vi(e){let n=e.length-1,t=e[0];for(let f=0;f<n;f++)t+=`\0${f}\0${e[f+1]}`;let r=0,o=t.length;function i(){for(;r<o&&(t[r]===" "||t[r]===" "||t[r]===`
2
+ `||t[r]==="\r");)r++}function s(){if(t.charCodeAt(r)!==0)return-1;let f=r;r++;let p=0;for(;r<o&&t.charCodeAt(r)!==0;)p=p*10+(t.charCodeAt(r)-48),r++;return r<o&&r++,p<0||p>=n?(r=f,-1):p}function a(){let f=r;for(;r<o;){let p=t.charCodeAt(r);if(p>=97&&p<=122||p>=65&&p<=90||p>=48&&p<=57||p===45)r++;else break}return t.slice(f,r)}function c(){if(i(),t[r]!=="=")return{kind:"bool"};r++,i();let f=s();if(f>=0)return{kind:"expr",idx:f};let p=t[r];if(p==='"'||p==="'"){r++;let y=[],N=[],P="";for(;r<o&&t[r]!==p;){let he=s();he>=0?(y.push(P),P="",N.push(he)):P+=t[r++]}return r<o&&r++,y.push(P),N.length===0?{kind:"static",value:y[0]}:{kind:"mixed",statics:y,exprs:N}}let b=r;for(;r<o;){let y=t.charCodeAt(r);if(y===32||y===9||y===10||y===13||y===62||y===47)break;r++}return{kind:"static",value:t.slice(b,r)}}function l(){let f=[];for(;r<o&&(i(),!(t[r]===">"||t[r]==="/"));){let p=r;for(;r<o;){let y=t.charCodeAt(r);if(y>=97&&y<=122||y>=65&&y<=90||y>=48&&y<=57||y===45||y===58||y===95||y===46)r++;else break}let b=t.slice(p,r);if(!b)break;let x=c();b.startsWith("on:")?x.kind==="expr"&&f.push({t:3,name:b.slice(3),idx:x.idx}):x.kind==="bool"?f.push({t:4,name:b}):x.kind==="static"?f.push({t:0,name:b,value:x.value}):x.kind==="expr"?f.push({t:1,name:b,idx:x.idx}):x.kind==="mixed"&&f.push({t:2,name:b,statics:x.statics,exprs:x.exprs})}return f}function d(f){return f.replace(/\s+/g," ")}function m(f){let p="";for(;r<o&&t[r]!=="<";){let x=s();if(x>=0){let y=d(p);y&&f.push({t:1,value:y}),p="",f.push({t:2,idx:x})}else p+=t[r++]}let b=d(p);b&&f.push({t:1,value:b})}function g(){let f=[];for(;r<o&&!(t[r]==="<"&&r+1<o&&t[r+1]==="/");)if(t[r]==="<"){r++;let p=a(),b=l();i();let x=qi.has(p),y=t[r]==="/";if(y&&r++,r<o&&r++,x||y)f.push({t:0,el:{tag:p,svg:Qr.has(p),attrs:b,children:[]}});else{let N=g();if(Wi.has(p.toLowerCase())){for(let P=0;P<N.length;P++)if(N[P].t===2)throw new Error(`html: dynamic \${...} expressions are not allowed inside <${p}> (raw-text context). Build the content separately and append it as a Node.`)}t[r]==="<"&&r+1<o&&t[r+1]==="/"&&(r+=2,a(),i(),r<o&&t[r]===">"&&r++),f.push({t:0,el:{tag:p,svg:Qr.has(p),attrs:b,children:N}})}}else m(f);return f}return g()}function Ke(e,n){let t=e.svg?document.createElementNS(w,e.tag):document.createElement(e.tag);for(let r=0;r<e.attrs.length;r++){let o=e.attrs[r];switch(o.t){case 0:t.setAttribute(o.name,o.value);break;case 1:{let i=o.name,s=i.toLowerCase();if(s[0]==="o"&&s[1]==="n")break;let a=n[o.idx];if(typeof a=="function")v(t,Ae(t,i,a));else if(a!=null){let c=String(a);s==="srcset"?t.setAttribute(i,pe(c)):j(s)?t.setAttribute(i,B(c)):t.setAttribute(i,c)}break}case 2:{let i=o.statics[0];for(let a=0;a<o.exprs.length;a++){let c=n[o.exprs[a]];i+=(c==null?"":String(c))+o.statics[a+1]}let s=o.name.toLowerCase();s==="srcset"?t.setAttribute(o.name,pe(i)):j(s)?t.setAttribute(o.name,B(i)):t.setAttribute(o.name,i);break}case 3:{let i=n[o.idx];typeof i=="function"?t.addEventListener(o.name,i):ji&&S(`html: on:${o.name} handler is not a function (got ${typeof i}). Event listener was not attached.`);break}case 4:t.setAttribute(o.name,"");break}}for(let r=0;r<e.children.length;r++){let o=e.children[r];switch(o.t){case 0:t.appendChild(Ke(o.el,n));break;case 1:t.appendChild(document.createTextNode(o.value));break;case 2:{let i=n[o.idx];if(typeof i=="function"){let s=document.createComment("");t.appendChild(s),v(t,J(s,i))}else if(i instanceof Node)t.appendChild(i);else if(Array.isArray(i))for(let s=0;s<i.length;s++){let a=i[s];a instanceof Node?t.appendChild(a):a!=null&&typeof a!="boolean"&&t.appendChild(document.createTextNode(String(a)))}else i!=null&&typeof i!="boolean"&&t.appendChild(document.createTextNode(String(i)));break}}}return t}function Ue(e,...n){let t=Yr.get(e);if(t||(t=Vi(e),Yr.set(e,t)),t.length===1&&t[0].t===0)return Ke(t[0].el,n);let r=document.createElement("div");for(let o=0;o<t.length;o++){let i=t[o];switch(i.t){case 0:r.appendChild(Ke(i.el,n));break;case 1:r.appendChild(document.createTextNode(i.value));break;case 2:{let s=n[i.idx];if(s instanceof Node)r.appendChild(s);else if(typeof s=="function"){let a=document.createComment("bind:htm");r.appendChild(a),v(r,J(a,s))}else if(Array.isArray(s))for(let a=0;a<s.length;a++){let c=s[a];c instanceof Node?r.appendChild(c):c!=null&&typeof c!="boolean"&&r.appendChild(document.createTextNode(String(c)))}else s!=null&&typeof s!="boolean"&&r.appendChild(document.createTextNode(String(s)));break}}}return r.childNodes.length===1&&r.firstChild instanceof Element?r.firstChild:r}function eo(e,n){if(!n)throw new Error("[SibuJS mount] container element not found. Make sure the DOM element exists before calling mount().");R(typeof e=="function"||e instanceof Node,"mount: first argument must be a component function or a DOM Node.");let t=typeof performance<"u"?performance.now():0,r=typeof e=="function"?e():e,o=typeof performance<"u"?performance.now()-t:0;n.appendChild(r);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("app:init",{rootElement:r,container:n,duration:o}),{node:r,unmount(){i&&i.emit("app:unmount",{rootElement:r}),L(r),r.parentNode&&r.parentNode.removeChild(r)}}}var to=E();function no(e){return typeof e=="function"?no(e()):e instanceof Node?e:document.createTextNode(String(e))}function Ki(e,n){if(n===0)return[];let t=[],r=new Array(n);for(let a=0;a<n;a++){let c=e[a],l=0,d=t.length;for(;l<d;){let m=l+d>>1;e[t[m]]<c?l=m+1:d=m}t[l]=a,r[a]=l>0?t[l-1]:-1}let o=t.length,i=new Array(o),s=t[o-1];for(let a=o-1;a>=0;a--)i[a]=s,s=r[s];return i}function ro(e,n,t){R(typeof e=="function","each: first argument must be a function that returns an array."),R(typeof n=="function","each: second argument must be a render function."),R(t&&typeof t.key=="function","each: options.key must be a function that returns a unique key per item.");let r=document.createComment("each:anchor"),o=document.createComment("each:end"),i=[],s=[],a=i,c=0,l=new Map,d=new Map,m=[],g=[],f=new Uint8Array(0),p=new Map,b=[],x=[],y=new Map,N=!1,P=!1,he=t.key,ft=()=>{let pt=e(),A=pt.length,ye=r.parentNode;if(!ye)return;P||(ye.insertBefore(o,r.nextSibling),P=!0),g.length<A&&(g=new Array(A));for(let h=0;h<A;h++)g[h]=he(pt[h]);let de=g;m.length<A&&(m=new Array(A)),d.clear(),y.clear();for(let h=0;h<A;h++)y.set(de[h],h);for(let h=0;h<A;h++){let M=de[h],bt=l.get(M),fe;if(bt!==void 0)fe=bt;else{let gt=M,ui=()=>V(()=>e()[y.get(gt)]),di=()=>y.get(gt);try{fe=no(n(ui,di))}catch(Q){to&&S(`each: render threw for item at index ${h} (key="${de[h]}"): ${Q instanceof Error?Q.message:String(Q)}`),fe=document.createComment(`each:error:${h}`);let ht=Q instanceof Error?Q:new Error(String(Q));queueMicrotask(()=>{try{let yt=r.parentNode;yt?.dispatchEvent?yt.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:ht}})):to&&S(`each: error not surfaced \u2014 anchor detached: ${ht.message}`)}catch{}})}}d.set(M,fe),m[h]=fe}for(let[h,M]of l)d.has(h)||(L(M),M.parentNode&&ye.removeChild(M));if(A===0){c=0;let h=l;l=d,d=h;return}p.clear();for(let h=0;h<c;h++)p.set(a[h],h);b.length<A&&(b=new Array(A),x=new Array(A));let xe=0;for(let h=0;h<A;h++){let M=p.get(de[h]);M!==void 0&&(b[xe]=h,x[xe]=M,xe++)}let mt=Ki(x,xe);f.length<A?f=new Uint8Array(A):f.fill(0,0,A);for(let h=0;h<mt.length;h++)f[b[mt[h]]]=1;let ve=o;for(let h=A-1;h>=0;h--){let M=m[h];f[h]||M.nextSibling!==ve&&ye.insertBefore(M,ve),ve=M}let Te=a===i?s:i;Te.length<A&&(Te.length=A);for(let h=0;h<A;h++)Te[h]=de[h];a=Te,c=A;let li=l;l=d,d=li,N=!0},ci=k(ft);return v(r,ci),N||queueMicrotask(()=>{!N&&r.parentNode&&ft()}),r}function io(e){let n=document.createDocumentFragment();for(let t of e)if(!(t==null||typeof t=="boolean"))if(Array.isArray(t))for(let r of t)r==null||typeof r=="boolean"||n.appendChild(oo(r));else n.appendChild(oo(t));return n}function oo(e){if(e==null)return document.createTextNode("");if(e instanceof Node)return e;if(typeof e=="function"){let n=e();return n instanceof Node?n:document.createTextNode(String(n??""))}return document.createTextNode(String(e))}function so(e,n){let t=document.createComment("portal"),r=n||document.body,o=null,i=!1;return queueMicrotask(()=>{if(!i)try{o=e(),r.appendChild(o)}catch(s){typeof console<"u"&&console.error("[Portal] Render error:",s);let a=s instanceof Error?s:new Error(String(s));queueMicrotask(()=>{try{let c=t.parentNode;c?.dispatchEvent&&c.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:a}}))}catch{}})}}),v(t,()=>{i=!0,o&&(L(o),o.remove(),o=null)}),t}var Je=new Map;function ao(e,n){Je.set(e,n)}function co(e){Je.delete(e)}function Ge(e){let n=Je.get(e);return n?n():T({nodes:`[Component "${e}" not found]`})}function lo(e){let n=T({class:"sibu-dynamic"});function t(){let o=e(),i;typeof o=="function"?i=o():i=Ge(o);for(let s of Array.from(n.childNodes))L(s);n.replaceChildren(i)}let r=k(t);return v(n,r),n}function uo(e,n="default"){return e?.[n]}function fo(e,n){return k(()=>{n.style.display=e()?"":"none"}),n}function po(e,n,t){let r=document.createComment("when"),o=null,i,s=!1,a=()=>{let c=e(),l=r.parentNode;if(!l||s&&c===i)return;i=c,o?.parentNode&&(L(o),o.parentNode.removeChild(o),o=null);let d=c?n():t?t():null;if(d!=null){let m=d instanceof Node?d:document.createTextNode(String(d));l.insertBefore(m,r.nextSibling),o=m}s=!0};return k(a),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function mo(e,n,t){let r=document.createComment("match"),o=null,i,s=!1,a=()=>{let c=String(e()),l=r.parentNode;if(!l||s&&c===i)return;i=c,o?.parentNode&&(L(o),o.parentNode.removeChild(o),o=null);let d=n[c]||t;if(d){let m=d();if(m!=null){let g=m instanceof Node?m:document.createTextNode(String(m));l.insertBefore(g,r.nextSibling),o=g}}s=!0};return k(a),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function bo(e,n,t){let r=document.createComment("keep-alive"),o=new Map,i=[],s=t?.max??10;s===0&&E()&&S("KeepAlive: unbounded cache (max: 0). Cached subtrees will never be evicted \u2014 set `max` to bound memory.");let a,c=null,l=!1,d=!1,m=()=>{if(d)return;let f=e(),p=r.parentNode;if(!p||l&&f===a)return;c?.parentNode&&p.removeChild(c),a=f;let b=o.get(f);if(b){let x=i.indexOf(f);x!==-1&&(i.splice(x,1),i.push(f))}else{let x=n[f];if(!x){c=null,l=!0;return}if(b=x(),o.set(f,b),i.push(f),s>0&&i.length>s){let y=i.shift(),N=o.get(y);N&&(L(N),N.parentNode&&N.parentNode.removeChild(N),o.delete(y))}}p.insertBefore(b,r.nextSibling),c=b,l=!0},g=k(m);return l||queueMicrotask(()=>{!l&&r.parentNode&&m()}),v(r,()=>{d=!0,g();for(let f of o.values())L(f),f.parentNode&&f.parentNode.removeChild(f);o.clear(),i.length=0,c=null}),r}function go(e,n,t){let r=n(e,t);typeof r=="function"&&v(e,r)}var ho=(e,n)=>{let t=r=>{e.contains(r.target)||n()};return document.addEventListener("pointerdown",t,!0),()=>document.removeEventListener("pointerdown",t,!0)},yo=(e,n)=>{let t=n.duration??500,r=null,o=()=>{r=setTimeout(()=>{n.callback(),r=null},t)},i=()=>{r!==null&&(clearTimeout(r),r=null)};return e.addEventListener("pointerdown",o),e.addEventListener("pointerup",i),e.addEventListener("pointerleave",i),()=>{i(),e.removeEventListener("pointerdown",o),e.removeEventListener("pointerup",i),e.removeEventListener("pointerleave",i)}},xo=(e,n)=>{let t=()=>{let r=typeof n=="function"?n():e.textContent??"";navigator.clipboard.writeText(r)};return e.addEventListener("click",t),()=>e.removeEventListener("click",t)},vo=e=>{let n=()=>{e.style.overflow="hidden",e.style.height="auto",e.style.height=`${e.scrollHeight}px`};return n(),e.addEventListener("input",n),()=>e.removeEventListener("input",n)},To=e=>{let n='a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])',t=r=>{if(r.key!=="Tab")return;let o=Array.from(e.querySelectorAll(n));if(o.length===0)return;let i=o[0],s=o[o.length-1];r.shiftKey&&document.activeElement===i?(r.preventDefault(),s.focus()):!r.shiftKey&&document.activeElement===s&&(r.preventDefault(),i.focus())};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)};var G=null;function So(e,n){try{let t=e();return t&&typeof t.then=="function"&&t.catch(r=>{n?n(r,"async"):G?G(r,"async"):console.error("Unhandled async error in Sibu.catchError:",r)}),t}catch(t){return n?n(t,"sync"):G?G(t,"sync"):console.error("Unhandled error in Sibu.catchError:",t),null}}async function wo(e,n){try{return await e()}catch(t){return n?n(t,"async"):G?G(t,"async"):console.error("Unhandled async error in Sibu.catchErrorAsync:",t),null}}function Eo(e){G=e}var Ze=0;function ko(e="sibu"){return Ze++,`${e}-${Ze}`}function Co(){Ze=0}var me=0,Xe=new Set;function $(e){me++;try{return e()}finally{me--,me===0&&Ui()}}function U(e){return me===0?!1:(Xe.add(e),!0)}function _o(){return me>0}function Ui(){try{for(let e of Xe)Ct(e)}finally{Xe.clear()}kt()}var Qe=globalThis,He=E();function C(e,n){let t={value:e,__v:0,__sc:0,subsHead:null,subsTail:null,__activeNode:null,__name:void 0},r=He?n?.name:void 0,o=n?.equals;r&&(t.__name=r);function i(){return Y(t),t.value}i.__signal=t,r&&(i.__name=r);let s;if(o?s=a=>{let c=t.value,l=typeof a=="function"?a(c):a;if(!o(c,l)){if(t.value=l,t.__v++,He){let d=Qe.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&d.emit("signal:update",{signal:t,name:r,oldValue:c,newValue:l})}U(t)||ee(t)}}:He?s=a=>{let c=t.value,l=typeof a=="function"?a(c):a;if(Object.is(l,c))return;t.value=l,t.__v++;let d=Qe.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&d.emit("signal:update",{signal:t,name:r,oldValue:c,newValue:l}),U(t)||ee(t)}:s=a=>{let c=t.value,l=typeof a=="function"?a(c):a;Object.is(l,c)||(t.value=l,t.__v++,U(t)||ee(t))},He){let a=Qe.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&a.emit("signal:create",{signal:t,name:r,getter:i,initial:e})}return[i,s]}var ie=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let e=Function("return typeof require==='function'?require:null")();if(e){let n=e("node:async_hooks");ie=new n.AsyncLocalStorage}}}catch{ie=null}var Z={ssr:!1,suspenseIdCounter:0};function se(){if(ie){let e=ie.getStore();if(e)return e}return Z}function ae(){return se().ssr}function Ao(){se().ssr=!0}function No(){se().ssr=!1}function Lo(e){let n={ssr:!0,suspenseIdCounter:0};if(ie)return ie.run(n,e);let t=Z.ssr,r=Z.suspenseIdCounter;Z.ssr=!0,Z.suspenseIdCounter=0;try{return e()}finally{Z.ssr=t,Z.suspenseIdCounter=r}}function Mo(e){let n=se(),t=n.ssr;n.ssr=!0;try{return e()}finally{t||(n.ssr=!1)}}var Ye=globalThis;function $o(e,n){let t,r=!0;return()=>{let o=e();if(r)r=!1,t=o,V(()=>n(o,void 0));else{let i=t;t=o,V(()=>n(o,i))}}}var Ro=100;function et(e){let n=e.userCleanups;if(n.length!==0){e.userCleanups=[];for(let t=n.length-1;t>=0;t--)try{n[t]()}catch(r){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw:",r)}}}function Ho(e){let n=1;do e.rerunPending=!1,e.userCleanups.length>0&&et(e),F(e.bodyFn,e.subscriber);while(e.rerunPending&&++n<=Ro);e.rerunPending&&(e.rerunPending=!1,Ye.__SIBU_DEV_WARN__!==!1&&typeof console<"u"&&console.error(`[SibuJS] effect re-requested itself ${Ro}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`))}function Ji(e){if(e.disposed)return;e.disposed=!0;let n=Ye.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(n)try{n.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&et(e)}catch(t){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",t)}try{we(e.subscriber)}catch(t){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",t)}}function H(e,n){if(R(typeof e=="function","effect: argument must be a function."),ae())return()=>{};let t={fn:e,onError:n?.onError,userCleanups:[],running:!1,rerunPending:!1,disposed:!1,onCleanup:null,subscriber:null,bodyFn:null};t.onCleanup=s=>{t.userCleanups.push(s)};let r=t.onError;t.bodyFn=r?()=>{try{t.fn(t.onCleanup)}catch(s){r(s)}}:()=>{t.fn(t.onCleanup)};let o=(()=>{if(t.running){t.rerunPending=!0;return}t.running=!0;try{t.rerunPending=!1,t.userCleanups.length>0&&et(t),F(t.bodyFn,o),t.rerunPending&&Ho(t)}finally{t.running=!1,t.rerunPending=!1}});o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._runEpoch=0,o._runs=0,t.subscriber=o,t.running=!0;try{F(t.bodyFn,t.subscriber),t.rerunPending&&Ho(t)}finally{t.running=!1,t.rerunPending=!1}let i=Ye.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("effect:create",{effectFn:e}),()=>Ji(t)}function $e(e,n){R(typeof e=="function","derived: argument must be a getter function.");let t=n?.name,r=n?.equals,o={};o._d=!1,o._g=e,o.__v=0;let i=()=>{o._d||(o._d=!0)};i._c=1,i._sig=o,k(()=>{let l=!0;try{o._v=e(),o._d=!1,l=!1}finally{l&&(o._d=!0)}},i);let s=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__,a=!1;function c(){if(a)throw new Error(`[SibuJS] Circular dependency detected in derived${t?` "${t}"`:""}. A derived signal cannot read itself (directly or through a chain).`);if(Ce){if(o._d){a=!0;let l=!0;try{let d=o._v;F(()=>{let m=e();o._v=r&&o._v!==void 0&&r(o._v,m)?o._v:m,o._d=!1,l=!1},i),Object.is(d,o._v)||o.__v++}finally{a=!1,l&&(o._d=!0)}}return o._v}if(Y(o),o._d){let l=o._v;a=!0;let d=!0;try{F(()=>{let m=e();o._v=r&&o._v!==void 0&&r(o._v,m)?o._v:m,o._d=!1,d=!1},i),Object.is(l,o._v)||o.__v++}finally{a=!1,d&&(o._d=!0)}s&&l!==o._v&&s.emit("computed:update",{signal:o,oldValue:l,newValue:o._v})}return o._v}return t&&(c.__name=t,o.__name=t),c.__signal=o,s&&s.emit("computed:create",{signal:o,name:t,getter:c}),c}function Po(e,n){if(R(typeof e=="function","watch: first argument must be a getter function."),R(typeof n=="function","watch: second argument must be a callback function."),ae())return()=>{};let t,r=!0;return k(()=>{let s=e();if(r){t=s,r=!1;return}Object.is(s,t)||(n(s,t),t=s)})}function Oo(e){R(e!==null&&typeof e=="object"&&!Array.isArray(e),"store: argument must be a plain object. For arrays, use array() instead.");let n={};Object.keys(e).forEach(c=>{let[l,d]=C(e[c]);n[c]=[l,d]});let t=new Proxy({},{get(c,l){if(l in n){let d=n[l][0];return d()}},set(){throw new Error("[SibuJS store] Direct mutation is not allowed. Use actions.setState() to update store properties.")}}),r=()=>{let c={};return Object.keys(n).forEach(l=>{c[l]=n[l][0]()}),c};return[t,{setState:c=>{let l=r(),d=typeof c=="function"?c(l):c;$(()=>{Object.entries(d).forEach(([m,g])=>{m in n&&n[m][1](g)})})},reset:()=>{$(()=>{Object.keys(e).forEach(c=>{let l=n[c][1];l(e[c])})})},subscribe:c=>{let l=!0;return H(()=>{let d=r();if(l){l=!1;return}c(d)})},subscribeKey:(c,l)=>{let d,m=!0;return H(()=>{let g=n[c][0]();if(m){d=g,m=!1;return}if(!Object.is(g,d)){let f=d;d=g,l(g,f)}})},getSnapshot:r}]}function Do(e){let[n,t]=C(e);return{get current(){return n()},set current(r){t(r)}}}function Fo(e=[]){let[n,t]=C([...e]);return[n,{push(...o){t(i=>[...i,...o])},pop(){let o;return t(i=>{let s=[...i];return o=s.pop(),s}),o},shift(){let o;return t(i=>{let s=[...i];return o=s.shift(),s}),o},unshift(...o){t(i=>[...o,...i])},splice(o,i=0,...s){let a=[];return t(c=>{let l=[...c];return a=l.splice(o,i,...s),l}),a},remove(o){t(i=>i.filter((s,a)=>a!==o))},removeWhere(o){t(i=>{let s=i.findIndex(o);return s===-1?i:i.filter((a,c)=>c!==s)})},set(o){t([...o])},update(o,i){t(s=>s.map((a,c)=>c===o?i:a))},updateWhere(o,i){t(s=>s.map(a=>o(a)?i(a):a))},sort(o){t(i=>[...i].sort(o))},reverse(){t(o=>[...o].reverse())},filter(o){t(i=>i.filter(o))},map(o){t(i=>i.map(o))},clear(){t([])}}]}function Bo(e=[]){let n=[...e],t=null,r={};function o(){t=null,U(r)||ee(r)}function i(){if(Y(r),t===null){let a=n.slice();t=Object.freeze(a)}return t}return[i,{push(...a){a.length!==0&&(n.push(...a),o())},pop(){if(n.length===0)return;let a=n.pop();return o(),a},shift(){if(n.length===0)return;let a=n.shift();return o(),a},unshift(...a){a.length!==0&&(n.unshift(...a),o())},splice(a,c=0,...l){let d=n.splice(a,c,...l);return(d.length>0||l.length>0)&&o(),d},remove(a){a<0||a>=n.length||(n.splice(a,1),o())},removeWhere(a){let c=n.findIndex(a);c!==-1&&(n.splice(c,1),o())},set(a){n=[...a],o()},update(a,c){a<0||a>=n.length||Object.is(n[a],c)||(n[a]=c,o())},updateWhere(a,c){let l=!1;for(let d=0;d<n.length;d++)if(a(n[d])){let m=c(n[d]);Object.is(n[d],m)||(n[d]=m,l=!0)}l&&o()},sort(a){n.length<=1||(n.sort(a),o())},reverse(){n.length<=1||(n.reverse(),o())},filter(a){let c=n.filter(a);c.length!==n.length&&(n=c,o())},map(a){let c=!1;for(let l=0;l<n.length;l++){let d=a(n[l],l);Object.is(n[l],d)||(n[l]=d,c=!0)}c&&o()},clear(){n.length!==0&&(n=[],o())}}]}function ce(e,n,t){if(Object.is(e,n))return!0;if(e==null||n==null||typeof e!=typeof n||typeof e!="object")return!1;let r=e,o=n;if(r.constructor!==o.constructor)return!1;if(e instanceof Date)return e.getTime()===n.getTime();if(e instanceof RegExp){let c=n;return e.source===c.source&&e.flags===c.flags}t||(t=new Map);let i=t.get(r);if(i?.has(o))return!0;if(i||(i=new Set,t.set(r,i)),i.add(o),e instanceof Map){let c=n;if(e.size!==c.size)return!1;for(let[l,d]of e)if(!c.has(l)||!ce(d,c.get(l),t))return!1;return!0}if(e instanceof Set){let c=n;if(e.size!==c.size)return!1;for(let l of e)if(!c.has(l))return!1;return!0}if(e instanceof ArrayBuffer){let c=new Uint8Array(e),l=new Uint8Array(n);if(c.length!==l.length)return!1;for(let d=0;d<c.length;d++)if(c[d]!==l[d])return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(n)){let c=e,l=n;if(c.length!==l.length)return!1;for(let d=0;d<c.length;d++)if(c[d]!==l[d])return!1;return!0}if(Array.isArray(e))return!Array.isArray(n)||e.length!==n.length?!1:e.every((c,l)=>ce(c,n[l],t));let s=Object.keys(r),a=Object.keys(o);return s.length!==a.length?!1:s.every(c=>ce(r[c],o[c],t))}function zo(e){return C(e,{equals:(n,t)=>ce(n,t)})}function Io(e,n,t){return[$e(e,t),i=>{$(()=>n(i))}]}function jo(e,n){let[t,r]=C(n),[o,i]=C(!1),[s,a]=C(null),[c,l]=C(0),d=0;return H(()=>{c();let m=++d;$(()=>{i(!0),a(null)});let g;try{g=e()}catch(f){$(()=>{a(f),i(!1)});return}g.then(f=>{m===d&&$(()=>{r(f),i(!1)})},f=>{m===d&&$(()=>{a(f),i(!1)})})}),{value:t,loading:o,error:s,refresh:()=>l(m=>m+1)}}function ot(e,n){try{return e()}catch(t){S(`${n}: callback threw: ${t instanceof Error?t.message:String(t)}`);return}}function tt(e,n,t){let r=ot(e,n);typeof r=="function"&&t&&v(t,r)}var le=new WeakMap,X=new WeakMap,z=new Set,I=new Set,ue=null,Pe=0,Gi=256;function nt(e){let n=le.get(e);if(n){le.delete(e),z.delete(e);for(let t of n)try{t()}catch{}}}function rt(e){X.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let t=X.get(e);if(t){X.delete(e),I.delete(e);for(let r of t)try{r()}catch{}}})}function Zi(e){if(z.size===0||e.nodeType!==1)return;let n=e;if(z.has(n)&&n.isConnected&&nt(n),n.firstElementChild)for(let t of Array.from(z))t!==n&&t.isConnected&&n.contains(t)&&nt(t)}function Xi(e){if(I.size===0||e.nodeType!==1)return;let n=e;if(I.has(n)&&!n.isConnected&&rt(n),n.firstElementChild)for(let t of Array.from(I))t!==n&&!t.isConnected&&n.contains(t)&&rt(t)}function Qi(){if(z.size>0)for(let e of Array.from(z))e.isConnected&&nt(e);if(I.size>0)for(let e of Array.from(I))e.isConnected||rt(e)}function Wo(){ue||typeof document>"u"||(ue=new MutationObserver(e=>{for(let n of e)if(n.type==="childList"){if(n.addedNodes.length>0)for(let t=0;t<n.addedNodes.length;t++)Zi(n.addedNodes[t]);if(n.removedNodes.length>0)for(let t=0;t<n.removedNodes.length;t++)Xi(n.removedNodes[t])}Pe+=e.length,Pe>=Gi&&(Pe=0,Qi()),it()}),ue.observe(document.body,{childList:!0,subtree:!0}))}function it(){ue&&z.size===0&&I.size===0&&(ue.disconnect(),ue=null,Pe=0)}function Yi(e,n){let t=le.get(e);return t||(t=[],le.set(e,t)),t.push(n),z.add(e),Wo(),()=>{let r=le.get(e);if(r){let o=r.indexOf(n);o!==-1&&r.splice(o,1),r.length===0&&(le.delete(e),z.delete(e))}it()}}function es(e,n){let t=X.get(e);return t||(t=[],X.set(e,t)),t.push(n),I.add(e),Wo(),()=>{let r=X.get(e);if(r){let o=r.indexOf(n);o!==-1&&r.splice(o,1),r.length===0&&(X.delete(e),I.delete(e))}it()}}function be(e,n){if(!(typeof document>"u"))if(n){let t=!1;if(v(n,()=>{t=!0}),n.isConnected){queueMicrotask(()=>{t||tt(e,"onMount",n)});return}queueMicrotask(()=>{if(t)return;if(n.isConnected){tt(e,"onMount",n);return}let r=Yi(n,()=>{t||tt(e,"onMount",n)});v(n,r)})}else queueMicrotask(()=>{ot(e,"onMount")})}function qo(e,n){if(typeof document>"u")return;let t=!1,r=()=>{t||(t=!0,ot(e,"onUnmount"))};v(n,r);let o=()=>{if(t)return;let i=es(n,r);v(n,i)};n.isConnected?o():be(()=>{o()},n)}function Vo(e,n){v(n,e)}function Ko(e){let[n,t]=C(e);return{provide(o){let i=n();return t(o),()=>t(i)},use(){return n},get(){return n()},set(o){t(o)},withContext(o,i){let s=n();t(o);try{return i()}finally{t(s)}}}}function Uo(e){let n=e();return E()&&queueMicrotask(()=>{try{e()}catch(t){console.warn("[SibuJS strict] second run threw:",t)}}),n}function Jo(e){if(!E())return H(e);let n=H(e),t=null;return queueMicrotask(()=>{try{t=H(e)}catch(r){console.warn("[SibuJS strictEffect] second run threw:",r)}}),()=>{n(),t&&t()}}function Go(){return new Promise(e=>{queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>e()):e()})})}function Xo(e){let[n,t]=C(e()),r=!1,o=!1,i=n(),s=()=>{r=!1,!o&&t(i)},a=()=>{r||(r=!0,queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(s):s()}))},c=k(()=>{i=e(),a()}),l=(()=>n());return l.dispose=()=>{o||(o=!0,c())},l}var Zo=16;function ts(e){let n=globalThis;if(typeof n.requestIdleCallback=="function"){n.requestIdleCallback(e,{timeout:Zo*4});return}if(typeof requestAnimationFrame=="function"){requestAnimationFrame(()=>e());return}setTimeout(e,Zo)}function Qo(){let[e,n]=C(!1);function t(r){n(!0),ts(()=>{let o;try{o=r()}catch{n(!1);return}o&&typeof o.then=="function"?o.then(()=>n(!1),()=>n(!1)):n(!1)})}return{pending:e,start:t}}var st="__sibuPendingError";function Yo(e,n){let t=()=>{try{return e.parentNode?(e.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:n}})),!0):!1}catch{return!1}};e.parentNode&&t()||queueMicrotask(()=>{t()||(e[st]=n)})}function ge(e){let n=e,t=n[st];if(t instanceof Error)return delete n[st],t}function at(e){let n=null;return function(){if(n)return n();let r=T({class:"sibu-lazy"}),o=!1;return e().then(i=>{if(o)return;n=i.default;let s=n();r.replaceChildren(s)}).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));S(`[SibuJS] lazy() failed to load component: ${s.message}`),r.replaceChildren(T({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),Yo(r,s)}),r.appendChild(_("sibu-lazy-loading","Loading...")),v(r,()=>{o=!0}),r}}function ct({nodes:e,fallback:n}){let t=T({class:"sibu-suspense"}),r=n();t.appendChild(r);let o=!1,i=null;return v(t,()=>{o=!0,i&&(i.disconnect(),i=null)}),queueMicrotask(()=>{if(!o)try{let s=e();if(s.classList.contains("sibu-lazy")){if(!s.querySelector(".sibu-lazy-loading")){t.replaceChildren(s);return}i=new MutationObserver(()=>{if(o)return;s.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,t.replaceChildren(s))}),i.observe(s,{childList:!0,subtree:!0})}else t.replaceChildren(s)}catch(s){let a=s instanceof Error?s:new Error(String(s));S(`[SibuJS] Suspense nodes() threw: ${a.message}`),Yo(t,a)}}),t}var xc=E();function lt(e){return e}var vc=1024*1024;var ns=E(),rs=`
3
3
  .sibu-error-display {
4
4
  border: 1px solid var(--sibu-err-border, #e5484d);
5
5
  border-radius: 10px;
@@ -180,11 +180,11 @@
180
180
  border: 1px solid #3a3a4e;
181
181
  }
182
182
  .sibu-error-display .sibu-err-btn-reload:hover { background: #2a2b40; }
183
- `,Jo=!1;function Bi(){if(Jo||typeof document>"u")return;let e=K({nodes:Fi});document.head.appendChild(e),Jo=!0}function Ii(e){let t=[],n=e.split(`
184
- `);for(let r of n){let o=r.trim(),i=o.match(/^at\s+(?:(.+?)\s+\((.+)\)|(.+))$/);if(i){t.push({fn:i[1]||"(anonymous)",loc:i[2]||i[3]||""});continue}let s=o.match(/^(.+?)@(.+)$/);s&&t.push({fn:s[1]||"(anonymous)",loc:s[2]||""})}return t}function Go(e){if(e instanceof Error){let t=e.code??e.name??"ERROR",n=e.message||"Unknown error",r=e.stack??"",o=Ii(r),i=e.cause,s=i!=null?Go(i):null;return{code:t,message:n,stack:r,frames:o,cause:s}}return{code:"NON_ERROR",message:typeof e=="string"?e:JSON.stringify(e),stack:"",frames:[],cause:null}}function qi(e,t,n){let r=[];r.push(n),r.push(`[${e.code}] ${e.message}`),e.stack&&(r.push(""),r.push("Stack Trace:"),r.push(e.stack));let o=e.cause;for(;o;){if(r.push(""),r.push("Caused by:"),r.push(` [${o.code}] ${o.message}`),o.stack){let i=o.stack.split(`
183
+ `,ei=!1;function os(){if(ei||typeof document>"u")return;let e=K({nodes:rs});document.head.appendChild(e),ei=!0}function is(e){let n=[],t=e.split(`
184
+ `);for(let r of t){let o=r.trim(),i=o.match(/^at\s+(?:(.+?)\s+\((.+)\)|(.+))$/);if(i){n.push({fn:i[1]||"(anonymous)",loc:i[2]||i[3]||""});continue}let s=o.match(/^(.+?)@(.+)$/);s&&n.push({fn:s[1]||"(anonymous)",loc:s[2]||""})}return n}function ti(e){if(e instanceof Error){let n=e.code??e.name??"ERROR",t=e.message||"Unknown error",r=e.stack??"",o=is(r),i=e.cause,s=i!=null?ti(i):null;return{code:n,message:t,stack:r,frames:o,cause:s}}return{code:"NON_ERROR",message:typeof e=="string"?e:JSON.stringify(e),stack:"",frames:[],cause:null}}function ss(e,n,t){let r=[];r.push(t),r.push(`[${e.code}] ${e.message}`),e.stack&&(r.push(""),r.push("Stack Trace:"),r.push(e.stack));let o=e.cause;for(;o;){if(r.push(""),r.push("Caused by:"),r.push(` [${o.code}] ${o.message}`),o.stack){let i=o.stack.split(`
185
185
  `).map(s=>` ${s}`).join(`
186
- `);r.push(i)}o=o.cause}if(t&&Object.keys(t).length>0){r.push(""),r.push("Metadata:");for(let[i,s]of Object.entries(t))r.push(` ${i}: ${String(s)}`)}return r.push(""),r.push("Environment:"),r.push(` Timestamp: ${new Date().toISOString()}`),typeof location<"u"&&r.push(` URL: ${location.href}`),typeof navigator<"u"&&navigator.userAgent&&r.push(` User Agent: ${navigator.userAgent}`),r.join(`
187
- `)}function Zo(e){let t=e.map((n,r)=>T({class:"sibu-err-frame",nodes:[A({class:"sibu-err-line",nodes:String(r+1)}),A({class:"sibu-err-fn",nodes:n.fn}),A({class:"sibu-err-loc",nodes:` \u2014 ${n.loc}`})]}));return He({class:"sibu-err-stack",nodes:t})}function Yo(e){return e?[T({class:"sibu-err-cause-label",nodes:"Caused by"}),T({class:"sibu-err-section",nodes:[T({class:"sibu-err-section-head",nodes:[A({nodes:`[${e.code}] ${e.message}`}),A({nodes:""})]}),e.frames.length>0?Zo(e.frames):T({class:"sibu-err-stack",nodes:"(no stack)"})]}),...Yo(e.cause)]:[]}function ji(e){let t=[];for(let[r,o]of Object.entries(e)){t.push(document.createElement("dt")),t[t.length-1].textContent=r;let i=document.createElement("dd");i.textContent=o==null?"(null)":String(o),t.push(i)}let n=document.createElement("dl");n.className="sibu-err-meta";for(let r of t)n.appendChild(r);return n}function ze(e){Bi();let t=e.severity??"error",n=Go(e.error),r=e.alwaysShowDetails??zi,o=e.title??n.message,i=new Date().toISOString().replace("T"," ").slice(0,19),[s,a]=C("Copy"),c=ae({class:"sibu-err-copy-btn",nodes:()=>s(),on:{click:()=>{let f=qi(n,e.metadata,o);typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(f).then(()=>{a("Copied!"),setTimeout(()=>a("Copy"),1500)},()=>{a("Copy failed"),setTimeout(()=>a("Copy"),1500)})}}}),l=T({class:"sibu-err-header",nodes:[Oe({class:"sibu-err-icon",nodes:n.code}),$e({class:"sibu-err-title",nodes:o}),c,A({class:"sibu-err-timestamp",nodes:i})]}),d=[Re({class:"sibu-err-message",nodes:n.message})];r&&n.frames.length>0&&d.push(T({class:"sibu-err-section",nodes:[T({class:"sibu-err-section-head",nodes:[A({nodes:"Stack Trace"})]}),Zo(n.frames)]})),r&&d.push(...Yo(n.cause)),r&&e.metadata&&Object.keys(e.metadata).length>0&&d.push(T({class:"sibu-err-section",nodes:[T({class:"sibu-err-section-head",nodes:[A({nodes:"Metadata"})]}),ji(e.metadata)]}));let m=[];e.onRetry&&m.push(ae({class:"sibu-err-btn sibu-err-btn-retry",nodes:e.retryLabel??"Retry",on:{click:e.onRetry}})),!e.hideReload&&typeof location<"u"&&m.push(ae({class:"sibu-err-btn sibu-err-btn-reload",nodes:"Reload Page",on:{click:()=>location.reload()}})),m.length>0&&d.push(T({class:"sibu-err-actions",nodes:m}));let b=T({class:"sibu-err-body",nodes:d});return T({class:"sibu-error-display","data-severity":t,nodes:[l,b]})}var Vi=`
186
+ `);r.push(i)}o=o.cause}if(n&&Object.keys(n).length>0){r.push(""),r.push("Metadata:");for(let[i,s]of Object.entries(n))r.push(` ${i}: ${String(s)}`)}return r.push(""),r.push("Environment:"),r.push(` Timestamp: ${new Date().toISOString()}`),typeof location<"u"&&r.push(` URL: ${location.href}`),typeof navigator<"u"&&navigator.userAgent&&r.push(` User Agent: ${navigator.userAgent}`),r.join(`
187
+ `)}function ni(e){let n=e.map((t,r)=>T({class:"sibu-err-frame",nodes:[_({class:"sibu-err-line",nodes:String(r+1)}),_({class:"sibu-err-fn",nodes:t.fn}),_({class:"sibu-err-loc",nodes:` \u2014 ${t.loc}`})]}));return Me({class:"sibu-err-stack",nodes:n})}function ri(e){return e?[T({class:"sibu-err-cause-label",nodes:"Caused by"}),T({class:"sibu-err-section",nodes:[T({class:"sibu-err-section-head",nodes:[_({nodes:`[${e.code}] ${e.message}`}),_({nodes:""})]}),e.frames.length>0?ni(e.frames):T({class:"sibu-err-stack",nodes:"(no stack)"})]}),...ri(e.cause)]:[]}function as(e){let n=[];for(let[r,o]of Object.entries(e)){n.push(document.createElement("dt")),n[n.length-1].textContent=r;let i=document.createElement("dd");i.textContent=o==null?"(null)":String(o),n.push(i)}let t=document.createElement("dl");t.className="sibu-err-meta";for(let r of n)t.appendChild(r);return t}function Oe(e){os();let n=e.severity??"error",t=ti(e.error),r=e.alwaysShowDetails??ns,o=e.title??t.message,i=new Date().toISOString().replace("T"," ").slice(0,19),[s,a]=C("Copy"),c=oe({class:"sibu-err-copy-btn",nodes:()=>s(),on:{click:()=>{let f=ss(t,e.metadata,o);typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(f).then(()=>{a("Copied!"),setTimeout(()=>a("Copy"),1500)},()=>{a("Copy failed"),setTimeout(()=>a("Copy"),1500)})}}}),l=T({class:"sibu-err-header",nodes:[Re({class:"sibu-err-icon",nodes:t.code}),Le({class:"sibu-err-title",nodes:o}),c,_({class:"sibu-err-timestamp",nodes:i})]}),d=[Ne({class:"sibu-err-message",nodes:t.message})];r&&t.frames.length>0&&d.push(T({class:"sibu-err-section",nodes:[T({class:"sibu-err-section-head",nodes:[_({nodes:"Stack Trace"})]}),ni(t.frames)]})),r&&d.push(...ri(t.cause)),r&&e.metadata&&Object.keys(e.metadata).length>0&&d.push(T({class:"sibu-err-section",nodes:[T({class:"sibu-err-section-head",nodes:[_({nodes:"Metadata"})]}),as(e.metadata)]}));let m=[];e.onRetry&&m.push(oe({class:"sibu-err-btn sibu-err-btn-retry",nodes:e.retryLabel??"Retry",on:{click:e.onRetry}})),!e.hideReload&&typeof location<"u"&&m.push(oe({class:"sibu-err-btn sibu-err-btn-reload",nodes:"Reload Page",on:{click:()=>location.reload()}})),m.length>0&&d.push(T({class:"sibu-err-actions",nodes:m}));let g=T({class:"sibu-err-body",nodes:d});return T({class:"sibu-error-display","data-severity":n,nodes:[l,g]})}var cs=`
188
188
  .sibu-error-boundary {
189
189
  position: relative;
190
190
  }
@@ -338,7 +338,7 @@
338
338
  .sibu-error-fallback .sibu-error-btn-reload:hover {
339
339
  background: #3a3a4e;
340
340
  }
341
- `,Qo=!1;function Ui(){if(!Qo&&typeof document<"u"){let e=K({nodes:Vi});document.head.appendChild(e),Qo=!0}}var Ki=50,ct=new WeakMap;function Wi(e,t,n){let r=ct.get(e);r||(r=new Map,ct.set(e,r));let o=t.message,i=r.get(o);if(i)r.delete(o),r.set(o,i);else if(i=()=>e(t,n),r.set(o,i),r.size>Ki){let s=r.keys().next().value;s!==void 0&&r.delete(s)}return i()}function Xo({nodes:e,fallback:t,onError:n,resetKeys:r}){Ui();let[o,i]=C(null),s=()=>{if(t){let f=o(),p=ct.get(t);f&&p&&p.delete(f.message)}i(null)},a=null;if(r&&r.length>0){let f=!1;a=O(()=>{for(let p of r)try{p()}catch(g){typeof console<"u"&&console.warn("[SibuJS ErrorBoundary] resetKeys getter threw:",g)}if(!f){f=!0;return}o()!==null&&s()})}let c=f=>{let p=f instanceof Error?f:new Error(String(f));if(i(p),n)try{n(p)}catch(g){typeof console<"u"&&console.error("[SibuJS ErrorBoundary] onError callback threw:",g)}return p},l=(f,p)=>ze({error:f,severity:"error",onRetry:p}),d=f=>{let p=t||l;try{return Wi(p,f,s)}catch(g){let x=g instanceof Error?g:new Error(String(g));return queueMicrotask(()=>{m.parentNode&&m.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:x}}))}),document.createComment("error-boundary-failed")}},m=T({class:"sibu-error-boundary",nodes:()=>{let f=o();if(f)return d(f);try{let p=e();if(p&&typeof p.then=="function"){let g=T({class:"sibu-error-async"});return g.appendChild(A({class:"sibu-lazy-loading",nodes:"Loading..."})),p.then(x=>{g.replaceChildren(x)}).catch(x=>{let y=c(x);g.replaceChildren(d(y))}),g}return p}catch(p){let g=c(p);return d(g)}}}),b=f=>{if(o())return;f.stopPropagation();let g=f.detail?.error;g&&c(g)};return m.addEventListener("sibu:error-propagate",b),ve(()=>{let f=document.createTreeWalker(m,NodeFilter.SHOW_ELEMENT),p=[],g=f.currentNode;for(;g;){let x=Te(g);x&&p.push(x),g=f.nextNode()}if(p.length===1)c(p[0]);else if(p.length>1){let x=globalThis.AggregateError;c(x?new x(p,`${p.length} pre-mount errors caught by ErrorBoundary`):new Error(p.map(y=>y.message).join("; ")))}},m),v(m,()=>{a&&a(),m.removeEventListener("sibu:error-propagate",b)}),m}var Ji=`
341
+ `,oi=!1;function ls(){if(!oi&&typeof document<"u"){let e=K({nodes:cs});document.head.appendChild(e),oi=!0}}var us=50,ut=new WeakMap;function ds(e,n,t){let r=ut.get(e);r||(r=new Map,ut.set(e,r));let o=n.message,i=r.get(o);if(i)r.delete(o),r.set(o,i);else if(i=()=>e(n,t),r.set(o,i),r.size>us){let s=r.keys().next().value;s!==void 0&&r.delete(s)}return i()}function ii({nodes:e,fallback:n,onError:t,resetKeys:r}){ls();let[o,i]=C(null),s=()=>{if(n){let f=o(),p=ut.get(n);f&&p&&p.delete(f.message)}i(null)},a=null;if(r&&r.length>0){let f=!1;a=H(()=>{for(let p of r)try{p()}catch(b){typeof console<"u"&&console.warn("[SibuJS ErrorBoundary] resetKeys getter threw:",b)}if(!f){f=!0;return}o()!==null&&s()})}let c=f=>{let p=f instanceof Error?f:new Error(String(f));if(i(p),t)try{t(p)}catch(b){typeof console<"u"&&console.error("[SibuJS ErrorBoundary] onError callback threw:",b)}return p},l=(f,p)=>Oe({error:f,severity:"error",onRetry:p}),d=f=>{let p=n||l;try{return ds(p,f,s)}catch(b){let x=b instanceof Error?b:new Error(String(b));return queueMicrotask(()=>{m.parentNode&&m.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:x}}))}),document.createComment("error-boundary-failed")}},m=T({class:"sibu-error-boundary",nodes:()=>{let f=o();if(f)return d(f);try{let p=e();if(p&&typeof p.then=="function"){let b=T({class:"sibu-error-async"});return b.appendChild(_({class:"sibu-lazy-loading",nodes:"Loading..."})),p.then(x=>{b.replaceChildren(x)}).catch(x=>{let y=c(x);b.replaceChildren(d(y))}),b}return p}catch(p){let b=c(p);return d(b)}}}),g=f=>{if(o())return;f.stopPropagation();let b=f.detail?.error;b&&c(b)};return m.addEventListener("sibu:error-propagate",g),be(()=>{let f=document.createTreeWalker(m,NodeFilter.SHOW_ELEMENT),p=[],b=f.currentNode;for(;b;){let x=ge(b);x&&p.push(x),b=f.nextNode()}if(p.length===1)c(p[0]);else if(p.length>1){let x=globalThis.AggregateError;c(x?new x(p,`${p.length} pre-mount errors caught by ErrorBoundary`):new Error(p.map(y=>y.message).join("; ")))}},m),v(m,()=>{a&&a(),m.removeEventListener("sibu:error-propagate",g)}),m}var fs=`
342
342
  @keyframes sibu-spin {
343
343
  to { transform: rotate(360deg); }
344
344
  }
@@ -391,4 +391,4 @@
391
391
  .sibu-loading-lg .sibu-loading-spinner { width: 40px; height: 40px; border-width: 4px; }
392
392
  .sibu-loading-lg .sibu-loading-dot { width: 12px; height: 12px; }
393
393
  .sibu-loading-lg .sibu-loading-dots { gap: 6px; }
394
- `,ei=!1;function Gi(){!ei&&typeof document<"u"&&(document.head.appendChild(K({nodes:Ji})),ei=!0)}function ti(e={}){Gi();let{text:t,variant:n="spinner",size:r="md"}=e,o=r!=="md"?` sibu-loading-${r}`:"";return n==="dots"?T({class:`sibu-loading${o}`,nodes:[T({class:"sibu-loading-dots",nodes:[A({class:"sibu-loading-dot"}),A({class:"sibu-loading-dot"}),A({class:"sibu-loading-dot"})]}),t?A({class:"sibu-loading-text",nodes:t}):null].filter(Boolean)}):T({class:`sibu-loading${o}`,nodes:[T({class:"sibu-loading-spinner"}),t?A({class:"sibu-loading-text",nodes:t}):null].filter(Boolean)})}typeof window<"u"&&(window.Sibu=lt);return ui(Zi);})();
394
+ `,si=!1;function ps(){!si&&typeof document<"u"&&(document.head.appendChild(K({nodes:fs})),si=!0)}function ai(e={}){ps();let{text:n,variant:t="spinner",size:r="md"}=e,o=r!=="md"?` sibu-loading-${r}`:"";return t==="dots"?T({class:`sibu-loading${o}`,nodes:[T({class:"sibu-loading-dots",nodes:[_({class:"sibu-loading-dot"}),_({class:"sibu-loading-dot"}),_({class:"sibu-loading-dot"})]}),n?_({class:"sibu-loading-text",nodes:n}):null].filter(Boolean)}):T({class:`sibu-loading${o}`,nodes:[T({class:"sibu-loading-spinner"}),n?_({class:"sibu-loading-text",nodes:n}):null].filter(Boolean)})}typeof window<"u"&&(window.Sibu=dt);return gi(ms);})();
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  context
3
- } from "./chunk-GTBNNBJ6.js";
3
+ } from "./chunk-YMOIAHWA.js";
4
4
  import {
5
5
  derived
6
- } from "./chunk-54EDRCEF.js";
6
+ } from "./chunk-DF3GTP4Q.js";
7
7
  import {
8
8
  sanitizeUrl
9
9
  } from "./chunk-UCS6AMJ7.js";
10
10
  import {
11
11
  effect
12
- } from "./chunk-HB24TBAF.js";
12
+ } from "./chunk-5WD7BYTZ.js";
13
13
  import {
14
14
  batch,
15
15
  signal
16
- } from "./chunk-CC65Y57T.js";
16
+ } from "./chunk-6QZO7MMG.js";
17
17
 
18
18
  // src/data/retry.ts
19
19
  function calculateDelay(attempt, strategy, baseDelay, maxDelay, jitter) {
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  effect
3
- } from "./chunk-HB24TBAF.js";
3
+ } from "./chunk-5WD7BYTZ.js";
4
4
  import {
5
5
  batch,
6
6
  signal
7
- } from "./chunk-CC65Y57T.js";
7
+ } from "./chunk-6QZO7MMG.js";
8
8
 
9
9
  // src/browser/media.ts
10
10
  function media(query) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  signal
3
- } from "./chunk-CC65Y57T.js";
3
+ } from "./chunk-6QZO7MMG.js";
4
4
 
5
5
  // src/ui/transition.ts
6
6
  function transition(element, options = {}) {
@@ -0,0 +1,152 @@
1
+ import {
2
+ isSSR
3
+ } from "./chunk-2RA7SHDA.js";
4
+ import {
5
+ cleanup,
6
+ retrack,
7
+ untracked
8
+ } from "./chunk-L4DAT4WU.js";
9
+ import {
10
+ devAssert
11
+ } from "./chunk-LMLD24FC.js";
12
+
13
+ // src/core/signals/effect.ts
14
+ var _g = globalThis;
15
+ function on(deps, handler) {
16
+ let prev;
17
+ let first = true;
18
+ return () => {
19
+ const value = deps();
20
+ if (first) {
21
+ first = false;
22
+ prev = value;
23
+ untracked(() => handler(value, void 0));
24
+ } else {
25
+ const p = prev;
26
+ prev = value;
27
+ untracked(() => handler(value, p));
28
+ }
29
+ };
30
+ }
31
+ var MAX_RERUNS = 100;
32
+ function flushUserCleanups(ctx) {
33
+ const list = ctx.userCleanups;
34
+ if (list.length === 0) return;
35
+ ctx.userCleanups = [];
36
+ for (let i = list.length - 1; i >= 0; i--) {
37
+ try {
38
+ list[i]();
39
+ } catch (err) {
40
+ if (typeof console !== "undefined") console.warn("[SibuJS effect] onCleanup threw:", err);
41
+ }
42
+ }
43
+ }
44
+ function drainReruns(ctx) {
45
+ let reruns = 1;
46
+ do {
47
+ ctx.rerunPending = false;
48
+ if (ctx.userCleanups.length > 0) flushUserCleanups(ctx);
49
+ retrack(ctx.bodyFn, ctx.subscriber);
50
+ } while (ctx.rerunPending && ++reruns <= MAX_RERUNS);
51
+ if (ctx.rerunPending) {
52
+ ctx.rerunPending = false;
53
+ if (_g.__SIBU_DEV_WARN__ !== false && typeof console !== "undefined") {
54
+ console.error(
55
+ `[SibuJS] effect re-requested itself ${MAX_RERUNS}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`
56
+ );
57
+ }
58
+ }
59
+ }
60
+ function disposeEffect(ctx) {
61
+ if (ctx.disposed) return;
62
+ ctx.disposed = true;
63
+ const h = _g.__SIBU_DEVTOOLS_GLOBAL_HOOK__;
64
+ if (h) {
65
+ try {
66
+ h.emit("effect:destroy", { effectFn: ctx.fn });
67
+ } catch {
68
+ }
69
+ }
70
+ try {
71
+ if (ctx.userCleanups.length > 0) flushUserCleanups(ctx);
72
+ } catch (err) {
73
+ if (typeof console !== "undefined") {
74
+ console.warn("[SibuJS effect] onCleanup threw during dispose:", err);
75
+ }
76
+ }
77
+ try {
78
+ cleanup(ctx.subscriber);
79
+ } catch (err) {
80
+ if (typeof console !== "undefined") {
81
+ console.warn("[SibuJS effect] dispose threw:", err);
82
+ }
83
+ }
84
+ }
85
+ function effect(effectFn, options) {
86
+ devAssert(typeof effectFn === "function", "effect: argument must be a function.");
87
+ if (isSSR()) return () => {
88
+ };
89
+ const ctx = {
90
+ fn: effectFn,
91
+ onError: options?.onError,
92
+ userCleanups: [],
93
+ running: false,
94
+ rerunPending: false,
95
+ disposed: false,
96
+ onCleanup: null,
97
+ subscriber: null,
98
+ bodyFn: null
99
+ };
100
+ ctx.onCleanup = (fn) => {
101
+ ctx.userCleanups.push(fn);
102
+ };
103
+ const onErrorCaptured = ctx.onError;
104
+ ctx.bodyFn = onErrorCaptured ? () => {
105
+ try {
106
+ ctx.fn(ctx.onCleanup);
107
+ } catch (err) {
108
+ onErrorCaptured(err);
109
+ }
110
+ } : () => {
111
+ ctx.fn(ctx.onCleanup);
112
+ };
113
+ const sub = (() => {
114
+ if (ctx.running) {
115
+ ctx.rerunPending = true;
116
+ return;
117
+ }
118
+ ctx.running = true;
119
+ try {
120
+ ctx.rerunPending = false;
121
+ if (ctx.userCleanups.length > 0) flushUserCleanups(ctx);
122
+ retrack(ctx.bodyFn, sub);
123
+ if (ctx.rerunPending) drainReruns(ctx);
124
+ } finally {
125
+ ctx.running = false;
126
+ ctx.rerunPending = false;
127
+ }
128
+ });
129
+ sub.depsHead = null;
130
+ sub.depsTail = null;
131
+ sub._epoch = 0;
132
+ sub._structDirty = false;
133
+ sub._runEpoch = 0;
134
+ sub._runs = 0;
135
+ ctx.subscriber = sub;
136
+ ctx.running = true;
137
+ try {
138
+ retrack(ctx.bodyFn, ctx.subscriber);
139
+ if (ctx.rerunPending) drainReruns(ctx);
140
+ } finally {
141
+ ctx.running = false;
142
+ ctx.rerunPending = false;
143
+ }
144
+ const hook = _g.__SIBU_DEVTOOLS_GLOBAL_HOOK__;
145
+ if (hook) hook.emit("effect:create", { effectFn });
146
+ return () => disposeEffect(ctx);
147
+ }
148
+
149
+ export {
150
+ on,
151
+ effect
152
+ };