sibujs 4.10.0 → 4.11.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 (60) hide show
  1. package/dist/browser.cjs +1 -1
  2. package/dist/browser.js +4 -4
  3. package/dist/build.cjs +1 -1
  4. package/dist/build.js +10 -10
  5. package/dist/cdn.dev.global.js +1 -1
  6. package/dist/cdn.full.dev.global.js +1 -1
  7. package/dist/cdn.full.global.js +1 -1
  8. package/dist/cdn.global.js +1 -1
  9. package/dist/{chunk-EVI4ZQO3.js → chunk-3Z7AEJMQ.js} +2 -2
  10. package/dist/{chunk-GMMDHJJT.js → chunk-5G53CC6L.js} +4 -4
  11. package/dist/{chunk-VWPMWV7O.js → chunk-5IODQRR3.js} +4 -4
  12. package/dist/{chunk-TOPRMXFY.js → chunk-7V7VFT7E.js} +1 -1
  13. package/dist/{chunk-D6HYFOWR.js → chunk-ADWDDJ5M.js} +1 -1
  14. package/dist/{chunk-GOL3FU5Q.js → chunk-CHQPJY47.js} +1 -1
  15. package/dist/{chunk-2NWHJ2UJ.js → chunk-DEUONJYR.js} +9 -9
  16. package/dist/{chunk-FYUEL5IW.js → chunk-F6B5CKF7.js} +1 -1
  17. package/dist/{chunk-XUQUQJYE.js → chunk-HMOPAC2Z.js} +1 -1
  18. package/dist/{chunk-5PC7OTQW.js → chunk-KFJUMC3Q.js} +1 -1
  19. package/dist/{chunk-IL5MMSCL.js → chunk-KREPZR2U.js} +3 -3
  20. package/dist/{chunk-N6U4GOIU.js → chunk-LQ2C44YH.js} +1 -1
  21. package/dist/{chunk-BMCR7TXG.js → chunk-MCPL5WKQ.js} +3 -3
  22. package/dist/{chunk-ITEL5KPL.js → chunk-NBBFF5VA.js} +5 -5
  23. package/dist/{chunk-7WIHYHWD.js → chunk-OJV2RW4D.js} +1 -1
  24. package/dist/{chunk-54F4TPHK.js → chunk-R244COCR.js} +2 -2
  25. package/dist/{chunk-EVOK663Z.js → chunk-REOAVT2M.js} +1 -1
  26. package/dist/{chunk-IFRIBZ4O.js → chunk-RRKGQKPU.js} +4 -4
  27. package/dist/{chunk-GTS35FLA.js → chunk-VZDMHDVA.js} +2 -2
  28. package/dist/{chunk-JCKUWWHU.js → chunk-WQ7M57JJ.js} +3 -3
  29. package/dist/{chunk-4DCVJ4YA.js → chunk-YXJHLMRH.js} +4 -4
  30. package/dist/data.cjs +1 -1
  31. package/dist/data.js +5 -5
  32. package/dist/devtools.cjs +1 -1
  33. package/dist/devtools.js +4 -4
  34. package/dist/ecosystem.cjs +1 -1
  35. package/dist/ecosystem.js +7 -7
  36. package/dist/extras.cjs +3 -3
  37. package/dist/extras.js +20 -20
  38. package/dist/index.cjs +1 -1
  39. package/dist/index.d.cts +16 -4
  40. package/dist/index.d.ts +16 -4
  41. package/dist/index.js +10 -10
  42. package/dist/motion.cjs +1 -1
  43. package/dist/motion.js +3 -3
  44. package/dist/patterns.cjs +1 -1
  45. package/dist/patterns.js +5 -5
  46. package/dist/performance.cjs +1 -1
  47. package/dist/performance.js +4 -4
  48. package/dist/plugins.cjs +142 -15
  49. package/dist/plugins.d.cts +19 -5
  50. package/dist/plugins.d.ts +19 -5
  51. package/dist/plugins.js +146 -19
  52. package/dist/ssr.cjs +1 -1
  53. package/dist/ssr.js +7 -7
  54. package/dist/testing.cjs +1 -1
  55. package/dist/testing.js +2 -2
  56. package/dist/ui.cjs +1 -1
  57. package/dist/ui.js +7 -7
  58. package/dist/widgets.cjs +1 -1
  59. package/dist/widgets.js +6 -6
  60. package/package.json +1 -1
package/dist/browser.cjs CHANGED
@@ -700,7 +700,7 @@ function forEachSubscriber(signal2, visit) {
700
700
  }
701
701
 
702
702
  // src/reactivity/track.ts
703
- var _runtimeVersion = true ? "4.10.0" : "dev";
703
+ var _runtimeVersion = true ? "4.11.0" : "dev";
704
704
  var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
705
705
  function resolveReactiveApi() {
706
706
  const g = globalThis;
package/dist/browser.js CHANGED
@@ -36,15 +36,15 @@ import {
36
36
  visibility,
37
37
  wakeLock,
38
38
  windowSize
39
- } from "./chunk-GTS35FLA.js";
39
+ } from "./chunk-VZDMHDVA.js";
40
40
  import "./chunk-52XFPGSN.js";
41
41
  import "./chunk-62BDYGAG.js";
42
42
  import "./chunk-7ZHH77QA.js";
43
- import "./chunk-7WIHYHWD.js";
43
+ import "./chunk-OJV2RW4D.js";
44
44
  import "./chunk-EXXSN3BW.js";
45
45
  import "./chunk-7XHATCIH.js";
46
- import "./chunk-FYUEL5IW.js";
47
- import "./chunk-D6HYFOWR.js";
46
+ import "./chunk-F6B5CKF7.js";
47
+ import "./chunk-ADWDDJ5M.js";
48
48
  import "./chunk-NYNYSPK7.js";
49
49
  export {
50
50
  __resetSpeechCoordinator,
package/dist/build.cjs CHANGED
@@ -3574,7 +3574,7 @@ function forEachSubscriber(signal2, visit) {
3574
3574
  }
3575
3575
 
3576
3576
  // src/reactivity/track.ts
3577
- var _runtimeVersion = true ? "4.10.0" : "dev";
3577
+ var _runtimeVersion = true ? "4.11.0" : "dev";
3578
3578
  var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
3579
3579
  function resolveReactiveApi() {
3580
3580
  const g2 = globalThis;
package/dist/build.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  index_exports
3
- } from "./chunk-2NWHJ2UJ.js";
4
- import "./chunk-N6U4GOIU.js";
3
+ } from "./chunk-DEUONJYR.js";
4
+ import "./chunk-LQ2C44YH.js";
5
5
  import "./chunk-FC6KCJSA.js";
6
- import "./chunk-EVOK663Z.js";
7
- import "./chunk-GOL3FU5Q.js";
6
+ import "./chunk-REOAVT2M.js";
7
+ import "./chunk-CHQPJY47.js";
8
8
  import "./chunk-62BDYGAG.js";
9
- import "./chunk-EVI4ZQO3.js";
10
- import "./chunk-XUQUQJYE.js";
9
+ import "./chunk-3Z7AEJMQ.js";
10
+ import "./chunk-HMOPAC2Z.js";
11
11
  import "./chunk-3ACAAQIN.js";
12
- import "./chunk-5PC7OTQW.js";
12
+ import "./chunk-KFJUMC3Q.js";
13
13
  import "./chunk-7ZHH77QA.js";
14
- import "./chunk-7WIHYHWD.js";
14
+ import "./chunk-OJV2RW4D.js";
15
15
  import {
16
16
  isEventHandlerAttr,
17
17
  isHtmlContentAttribute,
@@ -19,8 +19,8 @@ import {
19
19
  } from "./chunk-EXXSN3BW.js";
20
20
  import "./chunk-7XHATCIH.js";
21
21
  import "./chunk-5HZXGZ6T.js";
22
- import "./chunk-FYUEL5IW.js";
23
- import "./chunk-D6HYFOWR.js";
22
+ import "./chunk-F6B5CKF7.js";
23
+ import "./chunk-ADWDDJ5M.js";
24
24
  import "./chunk-NYNYSPK7.js";
25
25
 
26
26
  // src/build/sourceEdit.ts
@@ -4,7 +4,7 @@
4
4
  `||o==="\f"){n+=1;continue}if(o==="\r"){n+=e[n+2]===`
5
5
  `?2:1;continue}if(On(o)){let i="",s=n+1;for(;s<e.length&&i.length<6&&On(e[s]);)i+=e[s],s++;s<e.length&&Ko(e[s])&&(s+=e[s]==="\r"&&e[s+1]===`
6
6
  `?2:1);let a=Number.parseInt(i,16),c=a===0||a>1114111||a>=55296&&a<=57343;t+=c?"\uFFFD":String.fromCodePoint(a),n=s-1;continue}t+=o,n+=1}return t}var Dn=["url(","expression(","javascript:","vbscript:","-moz-binding","behavior:","@import","image-set(","filter:progid","image(","src("],Go=4,Yo=5,Zo=8;function Xo(e){if(!e)return"an element";let t=e.tagName.toLowerCase(),n=e.getAttribute("id");n&&(t+=`#${n}`);let r=e.getAttribute("class");return r&&(t+=`.${r.trim().split(/\s+/).slice(0,3).join(".")}`),`<${t}>`}var Rt=new Set,$n=100,Hn=!1;function ot(e,t,n){j(()=>{let r=["url() in an inline style is an exfiltration channel: the browser fetches it immediately and the URL's path or query can carry page data off-origin","expression() executes arbitrary script in legacy engines","the javascript: scheme executes script","the vbscript: scheme executes script","-moz-binding loads and runs remote XBL","behavior: loads and runs a remote HTC script","@import pulls in a remote stylesheet","image-set() fetches remote images, the same exfiltration channel as url()","filter:progid activates legacy scriptable filters","image() fetches its string argument as a URL, the same exfiltration channel as url()","src() fetches its string argument as a URL, the same exfiltration channel as url()"],o=n?.property?`${n.property}: ${e}`:e,i=Xo(n?.element),s=`${i}|${o}`;return Rt.has(s)?"":Rt.size>=$n?Hn?"":(Hn=!0,`${$n} distinct dropped style declarations have been reported; suppressing further ones for the rest of this session so they cannot flood the console. The declarations are still dropped \u2014 only the reporting stops. Fix the reported ones and reload to see any that remain.`):(Rt.add(s),`style declaration "${o}" was dropped by the style sanitizer on ${i} \u2014 ${r[t]}. The element renders without it, which usually looks like a missing image rather than an error. Sanctioned alternatives: for a content image use an <img> element (or a <picture>); for decoration, put the rule in a stylesheet and set a class instead \u2014 stylesheet CSS is not sanitized, only inline style attributes are. If this declaration is not yours, it came from untrusted data and the drop just prevented an exfiltration.`)})}function In(e){return(e.includes("\\")?Jo(e):e).toLowerCase().replace(/\s+/g,"")}function Lt(e){if(!Uo.test(e))return-1;let t=In(e);for(let n=0;n<Dn.length;n++)if(t.includes(Dn[n]))return n;return-1}function st(e,t,n){let r=Mt(e,t);return r===-1?t:(ot(t,r,{property:e,element:n?.element}),"")}function Mt(e,t){let n=Lt(t);if(n!==-1)return n;let r=K(e);return r==="behavior"?Yo:r==="-moz-binding"?Go:(r==="filter"||r==="-ms-filter")&&In(t).includes("progid:")?Zo:-1}function Qo(e){let t=[],n="",r=0,o="";for(let s=0;s<e.length;s++){let a=e[s];if(o){n+=a,a==="\\"&&s+1<e.length?n+=e[++s]:a===o&&(o="");continue}if(a==="\\"){n+=a,s+1<e.length&&(n+=e[++s]);continue}if(a==="/"&&e[s+1]==="*"){let c=e.indexOf("*/",s+2);if(c===-1)return null;s=c+1;continue}if(a==='"'||a==="'")o=a;else if(a==="("||a==="[")r++;else if(a===")"||a==="]"){if(--r<0)return null}else{if(a==="{"||a==="}")return null;if(a===";"&&r===0){t.push(n),n="";continue}}n+=a}if(o||r!==0)return null;t.push(n);let i=[];for(let s of t){let a=s.indexOf(":");if(a===-1)continue;let c=s.slice(0,a).trim();if(!/^(--[\w-]+|-?[a-zA-Z_][\w-]*)$/.test(c))continue;let u=s.slice(a+1).trim(),l=/!\s*important\s*$/i.exec(u);if(l&&(u=u.slice(0,l.index).trim()),u==="")continue;let m=c.startsWith("--")?c:K(c);i.push([m,u,l!==null])}return i}function ei(e,t){let n=String(e),r=Qo(n);if(r===null)return Lt(n)!==-1&&ot(n,Lt(n),t),"";let o=[];for(let[i,s,a]of r){let c=Mt(i,s);if(c!==-1){ot(s,c,{property:i,element:t?.element});continue}o.push(`${i}: ${s}${a?" !important":""}`)}return o.join("; ")}function at(e,t){let n=String(e);if(n.trim()==="")return"";if(typeof document>"u")return ei(n,t);let r=document.createElement("div");try{r.style.cssText=n}catch{return""}let o=[];for(let i=0;i<r.style.length;i++){let s=r.style[i],a=r.style.getPropertyValue(s),c=Mt(s,a);if(c!==-1){ot(a,c,{property:s,element:t?.element});continue}let u=r.style.getPropertyPriority(s);o.push(`${s}: ${a}${u?` !${u}`:""}`)}return o.join("; ")}var Ot=new Set(["href","xlink:href","src","action","formaction","formtarget","cite","poster","background","srcset","ping","data","manifest"]),ti=new Set(["srcdoc"]);function Ke(e){return ti.has(e.toLowerCase())}function Pn(e){return Ot.has(e.toLowerCase())}function ni(e){let t=e.toLowerCase();return t==="style"||Ot.has(t)}function ri(e,t,n){let r=e.toLowerCase();return r==="srcset"?qo(t):Ot.has(r)?it(t):r==="style"?at(t,n):t}function Bn(e,t,n){if(!ni(e))return t;let r=ri(e,t,n);return r===""?null:r}function Te(e){return e===" "||e===" "||e===`
7
- `||e==="\r"||e==="\f"}function ct(e){let t=0,n=e.length;for(;t<n&&Te(e[t]);)t++;for(;n>t&&Te(e[n-1]);)n--;return e.slice(t,n)}var J=e=>({kind:"forbidden",reason:e});function oi(e){let t=ct(He(e));if(t==="")return J("empty content");let n=0;for(;n<t.length&&t[n]>="0"&&t[n]<="9";)n++;if(n===0)return J("missing or non-numeric delay");let r=Number.parseInt(t.slice(0,n),10);if(!Number.isFinite(r))return J("unparseable delay");for(;n<t.length&&Te(t[n]);)n++;if(n===t.length)return{kind:"delay-only",delay:r};if(t[n]!==";"&&t[n]!==",")return J("unexpected text after delay");for(n++;n<t.length&&Te(t[n]);)n++;let o=n;for(;n<t.length&&!Te(t[n])&&t[n]!=="=";)n++;let i=t.slice(o,n).toLowerCase();if(i!=="url")return J(`unsupported refresh key ${JSON.stringify(i)}`);for(;n<t.length&&Te(t[n]);)n++;if(t[n]!=="=")return J("missing '=' after url");for(n++;n<t.length&&Te(t[n]);)n++;let s,a=t[n];if(a==='"'||a==="'"){let u=t.indexOf(a,n+1);if(u===-1)return J("unterminated quoted destination");if(s=t.slice(n+1,u),ct(t.slice(u+1))!=="")return J("trailing text after quoted destination")}else if(s=ct(t.slice(n)),/[;,]/.test(s))return J("multiple refresh assignments");if(s==="")return J("empty destination");let c=it(s);return c===""?J("destination uses a disallowed protocol"):{kind:"allowed",delay:r,destination:s,sanitizedDestination:c}}function Dt(e){let t,n,r,o=new Set;for(let[i,s]of e){let a=K(i);o.has(a)&&(r=a),o.add(a),a==="http-equiv"?t=s:a==="content"&&(n=s)}return r!==void 0?J(`duplicate case-insensitive attribute ${JSON.stringify(r)}`):typeof t!="string"?{kind:"not-refresh"}:ct(He(t)).toLowerCase()!=="refresh"?{kind:"not-refresh"}:typeof n!="string"?{kind:"not-refresh"}:oi(n)}var ii="http://www.w3.org/1999/xhtml",si="http://www.w3.org/2000/svg",ai=new Set(["script","iframe","object","embed","frame","frameset"]);function zn(e){return K(e)}function Vn(e){return ai.has(zn(e))}var ci=new Set(["script","style"]);function jn(e){return ci.has(zn(e))}var L={None:0,MetaRefreshForbidden:1,MetaRefreshReactive:2,ScriptSource:3,AnimationTarget:4,StylesheetSource:5},ui=new Set(["src","href","xlink:href","type","language"]),li=new Set(["animate","set","animateMotion","animateTransform","animateColor"]),$t=new WeakSet;function Wn(e){return e.namespaceURI===ii||e.namespaceURI===null}function qn(e,t,n){let r=new Map,o=e.attributes;for(let i=0;i<o.length;i++){let s=o[i];s.name!==t&&r.set(s.name,s.value)}return t!==null&&n!==null&&r.set(t,n),r}function di(e){$t.has(e)||($t.add(e),e.getAttribute("content")!==null&&Dt(qn(e,null,null)).kind!=="not-refresh"&&e.removeAttribute("content"))}function fi(e,t,n,r){if(!Wn(e))return L.None;let o=K(t);if(o!=="http-equiv"&&o!=="content"||(r==="reactive"&&di(e),n===null)||o==="content"&&!e.hasAttribute("http-equiv"))return L.None;let i=Dt(qn(e,o,n));return i.kind==="forbidden"?L.MetaRefreshForbidden:i.kind!=="not-refresh"&&$t.has(e)?L.MetaRefreshReactive:L.None}function pi(e,t){if(t===null||K(e)!=="attributename")return L.None;let n=He(t);return Pn(n)||be(n)||Ke(n)?L.AnimationTarget:L.None}var ut=new WeakSet;function Fn(e){if(e===null)return!1;let t=K(e);if(!t.includes("stylesheet"))return!1;let n=t.split(/[\t\n\f\r ]+/);for(let r=0;r<n.length;r++)if(n[r]==="stylesheet")return!0;return!1}function mi(e,t,n,r){if(!Wn(e))return L.None;let o=K(t);return o==="href"?r==="static"||n===null?L.None:Fn(e.getAttribute("rel"))?L.StylesheetSource:(ut.add(e),L.None):o==="rel"&&Fn(n)&&ut.has(e)&&e.hasAttribute("href")?L.StylesheetSource:L.None}function Ht(e,t,n,r){let o=e.localName;return o==="meta"?fi(e,t,n,r):o==="link"?mi(e,t,n,r):o==="script"?r==="static"||n===null?L.None:ui.has(K(t))?L.ScriptSource:L.None:li.has(o)&&e.namespaceURI===si?pi(t,n):L.None}function It(e,t,n){e.localName!=="link"||K(t)!=="href"||(n!=="static"&&e.hasAttribute("href")?ut.add(e):ut.delete(e))}var gi="http://www.w3.org/1999/xhtml",bi="http://www.w3.org/2000/svg",hi="http://www.w3.org/1999/xlink",yi="http://www.w3.org/XML/1998/namespace",vi=new Set(["checked","disabled","selected"]);function Si(e){return e.namespaceURI===null||e.namespaceURI===gi}function Kn(e,t,n){j(()=>`${e}: refusing "${t}" in this element's context \u2014 ${["",'the element would become a <meta http-equiv="refresh"> directive the shared refresh policy forbids (a destination outside the URL allowlist, or a directive too malformed to read unambiguously)',"a <meta> whose http-equiv or content is reactive may never carry a refresh directive: a browser schedules the navigation as soon as the directive is valid, and nothing can withdraw it when the state changes back","a runtime value may not choose the program a <script> runs; name the script in static template source, or load it through Head({ script }) as an explicit trust decision","an SVG animation may not target a URL, event-handler or nested-document attribute; its to / values would be written into that attribute without passing the URL policy",'a runtime-chosen href may not become an applied <link rel="stylesheet">: a well-formed URL is not a trusted stylesheet. Name the stylesheet in static template source, or load a runtime-chosen one through Head({ link }) as an explicit trust decision'][n]}. The write was not performed.`)}function Un(e,t,n){e[t]=n}function xi(e,t){if(e.namespaceURI!==bi)return null;let n=t.toLowerCase();return n.startsWith("xlink:")?hi:n.startsWith("xml:")?yi:null}function Q(e,t,n,r={}){let o=Ei(e,t,n,r);return e.localName==="link"&&It(e,t,r.reactive?"reactive":"runtime"),o}function Ei(e,t,n,r){let o=xi(e,t),i=o?t.slice(t.indexOf(":")+1):t;if(be(t))return O(`${r.label??"setSafeAttribute"}: refusing to set event-handler attribute "${t}". Its value would be evaluated as JavaScript. Use on:{ ${t.slice(2)}: fn } instead.`),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let s=n==null||n===!1?null:n===!0?"":String(n),a=Ht(e,t,s,r.reactive?"reactive":"runtime");if(a!==L.None)return Kn(r.label??"setSafeAttribute",t,a),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;if(n==null)return o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0;if(Ke(t))return O(`${r.label??"setSafeAttribute"}: refusing to set "${t}". The browser parses this attribute as a nested HTML document, so a generic string value cannot be made safe \u2014 attribute escaping is undone before the parse. Build the frame's content another way.`),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let c=Si(e),u=c?t.toLowerCase():t;if(typeof n=="boolean"){if(t.length>5&&t.slice(0,5).toLowerCase()==="aria-"){let f=n?"true":"false";return(o?e.getAttributeNS(o,i):e.getAttribute(t))!==f&&(o?e.setAttributeNS(o,t,f):e.setAttribute(t,f)),!0}return c&&vi.has(u)&&u in e?Un(e,u,n):n?o?e.setAttributeNS(o,t,""):e.setAttribute(t,""):o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0}let l=String(n);if(r.syncValueProperty!==!1&&c&&(u==="value"||u==="checked")&&u in e)return Un(e,u,u==="checked"?!!n:l),!0;let m=l===""?"":Bn(t,l,{element:e});return m===null?(o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0):((o?e.getAttributeNS(o,i):e.getAttribute(t))===m||(o?e.setAttributeNS(o,t,m):e.setAttribute(t,m)),!0)}function Pt(e,t,n){if(Ke(t))return O(`html: refusing static attribute "${t}" \u2014 the browser parses it as a nested document.`),!1;let r=Ht(e,t,n,"static");return r!==L.None?(Kn("html (static attribute)",t,r),!1):(e.setAttribute(t,n),e.localName==="link"&&It(e,t,"static"),!0)}var Ti=4096,Bt=[];function wi(){return{sig:null,sub:null,epoch:0,depVersion:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function ki(e,t,n){let r=Bt.pop();if(r)return r.sig=e,r.sub=t,r.epoch=n,r;let o=wi();return o.sig=e,o.sub=t,o.epoch=n,o}function Jn(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,Bt.length<Ti&&Bt.push(e)}function _i(e,t){let n=e.subsHead??null;t.sigPrev=null,t.sigNext=n,n?n.sigPrev=t:e.subsTail=t,e.subsHead=t,e.__sc=(e.__sc??0)+1}function Gn(e){let t=e.sig;if(!t)return;let n=e.sigPrev,r=e.sigNext;n?n.sigNext=r:t.subsHead=r,r?r.sigPrev=n:t.subsTail=n,t.__sc=(t.__sc??1)-1,t.__activeNode===e&&(t.__activeNode=e.prevActive),t.__sc===0&&(t.subsHead=null,t.subsTail=null)}function Ai(e,t){let n=e.depsTail??null;t.subPrev=n,t.subNext=null,n?n.subNext=t:e.depsHead=t,e.depsTail=t}function Ci(e){let t=e.sub;if(!t)return;let n=e.subPrev,r=e.subNext;n?n.subNext=r:t.depsHead=r,r?r.subPrev=n:t.depsTail=n}var te=null,ue=null,he=0,ye=[],ee=new Set,Ni=[];function Ri(e){try{e()}catch(t){let n=e;k(t,{phase:n._errorPhase??"effect",name:n.__name,node:n._errorNode})}}function Li(e){let t=e.depsHead??null;if(t===null)return!0;for(;t!==null;){let n=t.sig;if(n===null)return!0;if(n._d===!0&&n._validate!==void 0)try{n._validate()}catch{return!0}if(t.depVersion!==n.__v)return!0;t=t.subNext}return!1}var ae=0,le=!1;function zt(){ae===0&&(ue=te,te=null,le=!0),ae++}function Vt(){ae--,ae===0&&(te=ue,ue=null,le=!1)}function Yn(){return le}function Zn(e){zt();try{return e()}finally{Vt()}}var G=null;function jt(){return G}function pt(e,t){let n=G;G=e;try{return t()}finally{G=n}}function Wt(e){let t=G;return t===null?e:(...n)=>pt(t,()=>e(...n))}var Mi=0;function qt(e,t){let n=te,r=0,o=null;le&&(r=ae,o=ue,ae=0,ue=null,le=!1),te=t;let i=t;i._cap===void 0&&(i._cap=Cn());let s=G;s!==null&&!i._epoch&&i._scope===void 0&&(i._scope=s);let a=i._scope===void 0?null:i._scope;a!==s&&(G=a);let c=++Mi;i._epoch=c,i._structDirty=!1;for(let u=i.depsHead??null;u!==null;u=u.subNext){let l=u.sig;u.prevActive=l.__activeNode??null,l.__activeNode=u}try{e()}finally{te=n,G=s,r!==0&&(ae=r,ue=o,le=!0);let u=i.depsHead??null;for(;u!==null;){let l=u.subNext,m=u.sig;m.__activeNode=u.prevActive,u.prevActive=null,u.epoch!==c&&(Ci(u),Gn(u),Jn(u)),u=l}}}function Xn(e,t){if(!t)return Ut(e);Ie(t);let n=te,r=0,o=null;le&&(r=ae,o=ue,ae=0,ue=null,le=!1),te=t;let i=t;i._scope===void 0&&(i._scope=G);let s=G;G=i._scope;try{e()}finally{te=n,G=s,r!==0&&(ae=r,ue=o,le=!0);for(let a=i.depsHead??null;a!==null;a=a.subNext){let c=a.sig;c.__activeNode=a.prevActive,a.prevActive=null}}return i._dispose??(i._dispose=()=>Ie(t))}function Ut(e,t){let n=()=>{let o=r;if(!(o._disposed||o._reentrant)){o._reentrant=!0;try{qt(e,r)}finally{o._reentrant=!1}}},r=n;r.depsHead=null,r.depsTail=null,r._epoch=0,r._structDirty=!1,r._hasComputedDep=!1,r._runEpoch=0,r._runs=0,r._reentrant=!1,r._disposed=!1,r._errorPhase="binding",r._errorNode=t;try{n()}catch(o){throw r._disposed=!0,r._errorNode=void 0,Ie(r),o}return r._dispose??(r._dispose=()=>{r._disposed=!0,r._errorNode=void 0,Ie(r)})}function Qn(e){if(!te)return;let t=te,n=e,r=t._epoch??0,o=n.__activeNode??null;if(o!==null&&o.sub===t){o.epoch=r,o.depVersion=n.__v??Number.NaN;return}n._validate!==void 0&&(t._hasComputedDep=!0);let i=ki(e,t,r);i.depVersion=n.__v??Number.NaN,i.prevActive=o,n.__activeNode=i,Ai(t,i),_i(n,i),t._structDirty=!0}function Ie(e){let t=e,n=t.depsHead??null;for(t.depsHead=null,t.depsTail=null;n;){let r=n.subNext;Gn(n),Jn(n),n=r}}var lt=1e3,dt=1e6,ft=0,we=new Set;function er(e){let t=lt;return Number.isFinite(e)&&e>0&&(lt=Math.floor(e)),t}function tr(e){let t=dt;return Number.isFinite(e)&&e>0&&(dt=Math.floor(e)),t}function Oi(e){let t=e;return t._runEpoch!==ft?(t._runEpoch=ft,t._runs=1,!1):(t._runs=(t._runs??0)+1,t._runs>lt)}function Di(e){let t=e.__name??"<unnamed>";k(new Error(`subscriber "${t}" fired more than ${lt} times \u2014 likely a write-reads-self cycle between effects/signals. This subscriber is quarantined for the rest of this update; other pending work still runs.`),{phase:"scheduler",name:t})}function $i(){k(new Error(`Notification drain exceeded ${dt} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`),{phase:"scheduler"})}function nr(){let e=0;for(;e<ye.length;){if(e>=dt){$i();break}let t=ye[e++];if(ee.delete(t),we.size>0&&we.has(t)||t._hasComputedDep===!0&&!Li(t))continue;if(Oi(t)){Di(t),we.add(t);continue}let n=Nn(t._cap??null);try{Ri(t)}finally{n&&Rn()}}}function rr(){if(!(he>0)){he++,ft++;try{nr()}finally{he--,he===0&&(ye.length=0,ee.clear(),we.size>0&&we.clear())}}}function Ft(e){e();let t=e._sig;if(!t)return;let n=Ni,r=n.length;for(n.push(t);n.length>r;){let i=n.pop().subsHead??null;for(;i;){let s=i.sub;if(s)if(s._c){let a=s._sig;a?(!a._d||a._f===!0)&&(a._d=!0,a._f=!1,n.push(a)):s()}else ee.has(s)||(ee.add(s),ye.push(s));i=i.sigNext}}}function or(e){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&(r._c?Ft(r):ee.has(r)||(ee.add(r),ye.push(r))),n=n.sigNext}}function ir(e){let n=e.subsHead;if(n){if(he>0){let r=n;for(;r;){let o=r.sub;o&&(o._c?Ft(o):ee.has(o)||(ee.add(o),ye.push(o))),r=r.sigNext}return}he++,ft++;try{let r=n;for(;r;){let o=r.sub;o&&(o._c?Ft(o):ee.has(o)||(ee.add(o),ye.push(o))),r=r.sigNext}nr()}finally{he--,he===0&&(ye.length=0,ee.clear(),we.size>0&&we.clear())}}}function sr(e){return e.__sc??0}function ar(e){let t=e,n=[],r=t.depsHead??null;for(;r;)r.sig&&n.push(r.sig),r=r.subNext;return n}function cr(e,t){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&t(r),n=n.sigNext}}var ur="4.10.0",lr=Symbol.for("sibujs.reactive.v1");function Ii(){let e=globalThis,t=e[lr];if(t)return!t.__dupWarned&&(t.__dupWarned=!0,O(`Multiple instances of the reactive runtime detected on this page (active: ${t.version}, duplicate: ${ur}). Reactivity is NOT broken and no bundler configuration is required: every copy routes through the first one via a global registry, so signal writes still reach subscribers registered by any copy. This is only a SIZE issue \u2014 the duplicate copy's bytes are downloaded and parsed for nothing. If you want them back, de-duplicate sibujs in your bundler (Vite: resolve.dedupe: ['sibujs']). Mismatched VERSIONS above are worth fixing regardless, since only the first one loaded is used.`)),t;let n={suspendTracking:zt,resumeTracking:Vt,isTrackingSuspended:Yn,untracked:Zn,retrack:qt,track:Xn,reactiveBinding:Ut,recordDependency:Qn,cleanup:Ie,setMaxSubscriberRepeats:er,setMaxDrainIterations:tr,drainNotificationQueue:rr,queueSignalNotification:or,notifySubscribers:ir,getSubscriberCount:sr,getSubscriberDeps:ar,forEachSubscriber:cr,getOwnerScope:jt,runWithOwnerScope:pt,bindOwnerScope:Wt,version:ur};return e[lr]=n,n}var H=Ii(),ke=H.suspendTracking,_e=H.resumeTracking,dr=H.isTrackingSuspended,ne=H.untracked,ve=H.retrack,Y=H.track,P=H.reactiveBinding,Ae=H.recordDependency,Ce=H.cleanup,nl=H.setMaxSubscriberRepeats,fr=H.setMaxDrainIterations,pr=H.drainNotificationQueue,mr=H.queueSignalNotification,Pe=H.notifySubscribers,rl=H.getSubscriberCount,ol=H.getSubscriberDeps,il=H.forEachSubscriber,Be=H.getOwnerScope??jt,mt=H.runWithOwnerScope??pt,z=H.bindOwnerScope??Wt;function Je(e,t,n){if(be(t))return Q(e,t,"",{label:`bindAttribute("${t}")`}),()=>{};function r(){let o;try{o=n()}catch(i){k(i,{phase:"binding",name:`bindAttribute("${t}")`,node:e});return}Q(e,t,o,{label:`bindAttribute("${t}")`,reactive:!0})}return P(r,e)}function gr(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(c){k(c,{phase:"binding",name:"bindDynamic (name getter)",node:e});return}let a;try{a=typeof n=="function"?n():n}catch(c){k(c,{phase:"binding",name:"bindDynamic (value getter)",node:e});return}r!==null&&r!==s&&(e.removeAttribute(r),r=null),Q(e,s,a,{label:"bindDynamic",reactive:!0})&&(r=s)}let i=P(o,e);return()=>{i(),r!==null&&e.removeAttribute(r)}}var Kt=["data-focus-key","id","name"],Pi=new Set(["text","search","url","tel","password",""]);function Bi(e){let t=e.tagName;if(!(t==="TEXTAREA"||t==="INPUT"&&Pi.has(e.type.toLowerCase())))return{start:null,end:null,direction:null};let r=e;return{start:r.selectionStart,end:r.selectionEnd,direction:r.selectionDirection}}function Ge(e){if(e.length===0||typeof document>"u")return null;let t=document.activeElement;if(!t||t===document.body)return null;let n=!1;for(let i=0;i<e.length;i++){let s=e[i];if(s===t||s.nodeType===1&&s.contains(t)){n=!0;break}}if(!n)return null;let r=null,o=null;for(let i=0;i<Kt.length;i++){let s=t.getAttribute(Kt[i]);if(s){r=Kt[i],o=s;break}}return{el:t,attr:r,value:o,tag:t.tagName,...Bi(t)}}function Fi(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function zi(e,t){let n=null,r=0;for(let o=0;o<e.length;o++){let i=e[o];if(i.nodeType!==1)continue;let s=i;s.matches(t)&&(r++,n??(n=s));let a=s.querySelectorAll(t);for(let c=0;c<a.length;c++)r++,n??(n=a[c]);if(r>1)return{el:null,count:r}}return r===1?{el:n,count:r}:{el:null,count:r}}function br(e,t){if(e.focus(),t.start!==null&&typeof e.setSelectionRange=="function"){let n=e,r=n.value.length,o=Math.min(t.start,r),i=Math.min(t.end??o,r);n.setSelectionRange(o,i,t.direction??"none")}}function Fe(e,t,n){if(!e||typeof document>"u")return;let r=document.activeElement;if(r===e.el||r&&r!==document.body&&r!==document.documentElement)return;if(e.el.isConnected){br(e.el,e);return}let o=!1;if(e.attr&&e.value){let{el:i,count:s}=zi(t,`[${e.attr}=${Fi(e.value)}]`);if(i&&i.tagName===e.tag){br(i,e);return}o=s>1}j(()=>{let i=e.attr?` (${e.attr}="${e.value}")`:"",s=o?`several elements in the rebuilt subtree share ${e.attr}="${e.value}", so there is no way to tell which one the user was in \u2014 a shared name (a radio group) identifies a GROUP, not a control. Add a unique id or data-focus-key to each`:"no element in the rebuilt subtree carries the same identity. Give it a stable id, name, or data-focus-key that the rebuild reproduces";return`${n}: a reactive rebuild discarded the focused element <${e.tag.toLowerCase()}>${i} and could not re-establish it, so focus fell back to <body>. An in-progress edit ends here, and an in-progress IME composition is lost outright \u2014 a composition belongs to the DOM node, so it cannot survive the node being destroyed. ${s}, or stop the rebuild from happening: key the subtree with match(() => shapeKey(), { \u2026 }) so it is re-created only when the shape actually changes, and drive the rest with reactive attributes and text children, which mutate nodes in place instead of replacing them.`})}function de(e,t){let n=[];function r(){let o;try{o=t()}catch(l){k(l,{phase:"binding",name:"bindChildNode",node:e});return}let i=Ge(n);if(o==null||typeof o=="boolean"){for(let l=0;l<n.length;l++){let m=n[l];D(m),m.parentNode&&m.parentNode.removeChild(m)}n.length=0,Fe(i,n,"bindChildNode");return}let s=e.parentNode;if(!s){n.length=0;return}let a;if(Array.isArray(o)){a=[];let l=new Set;for(let m=0;m<o.length;m++){let g=o[m];if(g==null||typeof g=="boolean")continue;let f=g instanceof Node?g:document.createTextNode(String(g));if(l.has(f)){O("bindChildNode: duplicate node reference in array \u2014 only the first occurrence is rendered.");continue}l.add(f),a.push(f)}}else a=[o instanceof Node?o:document.createTextNode(String(o))];let c;if(n.length>0&&a.length>0){let l=new Set(n);c=new Set;for(let m=0;m<a.length;m++)l.has(a[m])&&c.add(a[m])}for(let l=0;l<n.length;l++){let m=n[l];c?.has(m)||(D(m),m.parentNode&&m.parentNode.removeChild(m))}let u=e;for(let l=0;l<a.length;l++){let m=a[l];u.nextSibling!==m&&s.insertBefore(m,u.nextSibling),u=m}n=a,Fe(i,a,"bindChildNode")}return P(r,e)}var R="http://www.w3.org/2000/svg",Vi=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);var Jt=new Set,hr=100,yr=!1,vr=new Map;function Sr(e){let t=vr.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),vr.set(e,t)),t}function ji(e,t){if(typeof t=="function"){let r=t,o=[],i=!1,s=P(()=>{let a=r();if(a===null||typeof a!="object"){o=[],i=!0,e.setAttribute("style",at(String(a),{element:e}));return}let c=e.style;i&&(e.removeAttribute("style"),i=!1);let u=[];for(let l in a){if(!Object.hasOwn(a,l))continue;let m=a[l];if(m==null)continue;let g=Sr(l);u.push(g),c.setProperty(g,st(g,String(m),{element:e}))}for(let l=0;l<o.length;l++)u.indexOf(o[l])===-1&&c.removeProperty(o[l]);o=u},e);x(e,s);return}if(typeof t=="string"){e.setAttribute("style",at(t,{element:e}));return}let n=e;for(let r in t){if(!Object.hasOwn(t,r))continue;let o=t[r],i=Sr(r);if(typeof o=="function"){let s=o,a=P(()=>{n.style.setProperty(i,st(i,String(s()),{element:e}))},e);x(e,a)}else n.style.setProperty(i,st(i,String(o),{element:e}))}}function Wi(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=P(()=>{let s=t();s==null||s===!1?e.removeAttribute("class"):e.setAttribute("class",s)},e);x(e,i);return}let n=t,r=!1,o="";for(let i in n){if(!Object.hasOwn(n,i))continue;let s=n[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=P(()=>{let a="";for(let c in n){if(!Object.hasOwn(n,c))continue;let u=n[c];(typeof u=="function"?u():u)&&(a=a?`${a} ${c}`:c)}e.setAttribute("class",a)},e);x(e,s)}else e.setAttribute("class",o)}function Gt(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),x(e,de(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),x(e,de(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),x(e,de(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)))}}}function d(e,t){let n=Vn(e);return(r,o)=>{if(n)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);let i=t?document.createElementNS(t,e):document.createElement(e);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),Gt(i,o),i):(j(()=>{let f=r.trim().split(/\s+/);if(f.length<2)return"";let p=0;for(let h=0;h<f.length;h++){let y=f[h];if(!/^-?[A-Za-z_][A-Za-z0-9_:/.-]*$/.test(y))return"";/[-:/0-9]/.test(y)&&p++}if(p<2)return"";let b=`${e}|${r}`;return Jt.has(b)?"":Jt.size>=hr?yr?"":(yr=!0,`tagFactory: ${hr} distinct lone-string class warnings have been reported; suppressing further ones for the rest of this session so they cannot flood the console. Fix the reported ones and reload to see any that remain.`):(Jt.add(b),`tagFactory: lone string "${r}" looks like a class list but is being rendered as TEXT. For a class, use ${e}({ class: "${r}" }) \u2014 or ${e}("${r}", children) to set the class AND add children.`)}),i.textContent=r,i);if(typeof r=="number")return i.textContent=String(r),i;if(Array.isArray(r)||r instanceof Node||typeof r=="function")return Gt(i,r),i;let s=r,a=s.class;a!=null&&Wi(i,a);let c=s.id;typeof c=="function"?x(i,Je(i,"id",c)):c!=null&&(typeof c=="string"&&Vi.has(c.toLowerCase())&&O(`tagFactory: element id="${c}" matches a common global and may cause DOM clobbering. Avoid setting ids from untrusted input.`),i.id=c);let u=o!==void 0?o:s.nodes;u!=null&&Gt(i,u);let l=s.on;if(l)for(let f in l){if(!Object.hasOwn(l,f))continue;let p=l[f];typeof p=="function"?i.addEventListener(f,p):O(`tagFactory: on.${f} handler is not a function (got ${typeof p}). Event listener was not attached.`)}let m=s.style;m!=null&&ji(i,m);let g=s.ref;g&&(g.current=i);for(let f in s)switch(f){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{if(!Object.hasOwn(s,f))continue;let p=s[f];if(p==null||be(f))continue;typeof p=="function"?x(i,Je(i,f,p)):Q(i,f,p,{syncValueProperty:!1,label:"tagFactory"})}}return typeof s.onElement=="function"&&s.onElement(i),i}}var Rl=d("html"),qi=d("head"),Ui=d("body"),Ki=d("title"),A=d("div"),I=d("span"),Ji=d("section"),Gi=d("article"),Yi=d("header"),Zi=d("footer"),Xi=d("nav"),Qi=d("main"),es=d("aside"),ts=d("address"),Yt=d("p"),ns=d("h1"),rs=d("h2"),Zt=d("h3"),os=d("h4"),is=d("h5"),ss=d("h6"),as=d("blockquote"),cs=d("dd"),us=d("dl"),ls=d("dt"),ds=d("figcaption"),fs=d("figure"),ps=d("hr"),ms=d("li"),gs=d("ol"),bs=d("ul"),Xt=d("pre"),hs=d("a"),ys=d("abbr"),vs=d("b"),Ss=d("bdi"),xs=d("bdo"),Es=d("br"),Ts=d("cite"),Qt=d("code"),ws=d("data"),ks=d("dfn"),_s=d("em"),As=d("i"),Cs=d("kbd"),Ns=d("mark"),Rs=d("q"),Ls=d("rp"),Ms=d("rt"),Os=d("ruby"),Ds=d("s"),$s=d("samp"),Hs=d("small"),Is=d("strong"),Ps=d("sub"),Bs=d("sup"),Fs=d("time"),zs=d("u"),Vs=d("var"),js=d("area"),Ws=d("audio"),qs=d("img"),Us=d("map"),Ks=d("track"),Js=d("video"),Gs=d("embed"),Ys=d("iframe"),Zs=d("object"),Xs=d("param"),Qs=d("picture"),ea=d("portal"),ta=d("source"),na=d("svg",R),ra=d("math"),oa=d("canvas"),ia=d("noscript"),sa=d("script"),aa=d("del"),ca=d("ins"),ua=d("caption"),la=d("col"),da=d("colgroup"),fa=d("table"),pa=d("tbody"),ma=d("td"),ga=d("tfoot"),ba=d("th"),ha=d("thead"),ya=d("tr"),Ye=d("button"),va=d("datalist"),Sa=d("fieldset"),xa=d("form"),Ea=d("input"),Ta=d("label"),wa=d("legend"),ka=d("meter"),_a=d("optgroup"),Aa=d("option"),Ca=d("output"),Na=d("progress"),Ra=d("select"),La=d("textarea"),Ma=d("details"),Oa=d("dialog"),Da=d("menu"),$a=d("summary"),Ha=d("slot"),Ia=d("template"),Pa=d("base"),Ba=d("link"),Fa=d("meta"),Ne=d("style"),za=d("circle",R),Va=d("ellipse",R),ja=d("g",R),Wa=d("line",R),qa=d("path",R),Ua=d("polygon",R),Ka=d("polyline",R),Ja=d("rect",R),Ga=d("text",R),Ya=d("tspan",R),Za=d("defs",R),Xa=d("clipPath",R),Qa=d("mask",R),ec=d("pattern",R),tc=d("linearGradient",R),nc=d("radialGradient",R),rc=d("stop",R),oc=d("use",R),ic=d("symbol",R),sc=d("marker",R),ac=d("center"),cc=d("font"),uc=d("marquee"),lc=e=>d(e);var en="__sibuPendingError";function xr(e,t){let n=()=>e.parentNode?(k(t,{phase:"render",name:"lazy",node:e}),!0):!1;n()||queueMicrotask(()=>{n()||(e[en]=t)})}function gt(e){let t=e,n=t[en];if(n instanceof Error)return delete t[en],n}function Er(e){let t=null;return function(){if(t)return t();let r=A({class:"sibu-lazy"}),o=!1;return e().then(z(i=>{if(o)return;t=i.default;let s=t();W(r,s)})).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));W(r,A({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),xr(r,s)}),r.appendChild(I("sibu-lazy-loading","Loading...")),x(r,()=>{o=!0}),r}}function Tr({nodes:e,fallback:t}){let n=A({class:"sibu-suspense"}),r=t();n.appendChild(r);let o=!1,i=null,s=null;x(n,()=>{o=!0,i&&(i.disconnect(),i=null),s&&!n.contains(s)&&D(s)});let a=z(()=>{if(!o)try{let c=e();if(s=c,c.classList.contains("sibu-lazy")){if(!c.querySelector(".sibu-lazy-loading")){W(n,c);return}i=new MutationObserver(()=>{if(o)return;c.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,W(n,c))}),i.observe(c,{childList:!0,subtree:!0})}else W(n,c)}catch(c){let u=c instanceof Error?c:new Error(String(c));xr(n,u)}});return queueMicrotask(a),n}function on(e,t){return()=>Be()===e?t():mt(e,t)}function ht(e,t){try{return e()}catch(n){let r=t.toLowerCase().includes("unmount")?"cleanup":"effect";k(n,{phase:r,name:t});return}}function tn(e,t,n,r,o){let i=ht(e,t);if(typeof i!="function")return;let s=on(o,i);r()||!n.isConnected?ht(s,"onUnmount"):kr(s,n)}var ze=new WeakMap,Re=new WeakMap,fe=new Set,pe=new Set,Ve=null,bt=0,dc=256;function nn(e){let t=ze.get(e);if(t){ze.delete(e),fe.delete(e);for(let n of t)try{n()}catch{}}}function rn(e){Re.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let n=Re.get(e);if(n){Re.delete(e),pe.delete(e);for(let r of n)try{r()}catch{}}})}function fc(e){if(fe.size===0||e.nodeType!==1)return;let t=e;if(fe.has(t)&&t.isConnected&&nn(t),t.firstElementChild)for(let n of Array.from(fe))n!==t&&n.isConnected&&t.contains(n)&&nn(n)}function pc(e){if(pe.size===0||e.nodeType!==1)return;let t=e;if(pe.has(t)&&!t.isConnected&&rn(t),t.firstElementChild)for(let n of Array.from(pe))n!==t&&!n.isConnected&&t.contains(n)&&rn(n)}function mc(){if(fe.size>0)for(let e of Array.from(fe))e.isConnected&&nn(e);if(pe.size>0)for(let e of Array.from(pe))e.isConnected||rn(e)}function wr(){Ve||typeof document>"u"||(Ve=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++)fc(t.addedNodes[n]);if(t.removedNodes.length>0)for(let n=0;n<t.removedNodes.length;n++)pc(t.removedNodes[n])}bt+=e.length,bt>=dc&&(bt=0,mc()),sn()}),Ve.observe(document.body,{childList:!0,subtree:!0}))}function sn(){Ve&&fe.size===0&&pe.size===0&&(Ve.disconnect(),Ve=null,bt=0)}function gc(e,t){let n=ze.get(e);return n||(n=[],ze.set(e,n)),n.push(t),fe.add(e),wr(),()=>{let r=ze.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(ze.delete(e),fe.delete(e))}sn()}}function bc(e,t){let n=Re.get(e);return n||(n=[],Re.set(e,n)),n.push(t),pe.add(e),wr(),()=>{let r=Re.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Re.delete(e),pe.delete(e))}sn()}}function yt(e,t){if(typeof document>"u")return;let n=Be();if(e=on(n,e),t){let r=!1,o=()=>r;if(x(t,()=>{r=!0}),t.isConnected){queueMicrotask(()=>{r||tn(e,"onMount",t,o,n)});return}queueMicrotask(()=>{if(r)return;if(t.isConnected){tn(e,"onMount",t,o,n);return}let i=gc(t,()=>{r||tn(e,"onMount",t,o,n)});x(t,i)})}else queueMicrotask(()=>{ht(e,"onMount")})}function hc(e,t){typeof document>"u"||kr(on(Be(),e),t)}function kr(e,t){let n=!1,r=()=>{n||(n=!0,ht(e,"onUnmount"))};x(t,r);let o=()=>{if(n)return;let i=bc(t,r);x(t,i)};t.isConnected?o():yt(()=>{o()},t)}function yc(e,t){x(t,e)}function Z(e,t,n){try{e.emit(t,n)}catch{}}var an=Symbol.for("sibujs.ssr.v1");function vc(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let t=null,n=process.getBuiltinModule;typeof n=="function"?t=n("node:async_hooks"):typeof _t=="function"&&(t=_t("async_hooks")),t&&(e=new t.AsyncLocalStorage)}}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0,locale:void 0},fallbackDepth:0}}var Se=globalThis[an]??(globalThis[an]=vc()),Le=Se.als,V=Se.fallbackStore;Se.fallbackDepth??(Se.fallbackDepth=0);var _r=!1;function Sc(){if(_r||Le||!(typeof process<"u"&&!!process.versions?.node))return;_r=!0;let t=process.versions.node;O(`SSR request isolation is UNAVAILABLE on this runtime (Node ${t}). AsyncLocalStorage could not be loaded, so concurrent requests share one SSR store: request state and the query cache can bleed between them. Node >= 22.3 is required for isolated SSR under ESM; the CommonJS build works on older versions. A fully synchronous render is unaffected.`)}function Me(){if(Le){let e=Le.getStore();if(e)return e}return V}function Ar(){return Le?Le.getStore()??null:Se.fallbackDepth>0?V:null}function re(){return Me().ssr}function Cr(e){if(!re())return null;let t=Me(),n=t.caches??(t.caches=new Map),r=n.get(e);return r||(r=new Map,n.set(e,r)),r}function Nr(){Me().ssr=!0}function Rr(){Me().ssr=!1}function Lr(e){let t={ssr:!0,suspenseIdCounter:0,idCounter:0,locale:void 0};if(Le)return Le.run(t,e);Sc();let n=V.ssr,r=V.suspenseIdCounter,o=V.idCounter,i=V.locale;V.ssr=!0,V.suspenseIdCounter=0,V.idCounter=0,V.locale=void 0,Se.fallbackDepth++;try{return e()}finally{Se.fallbackDepth--,V.ssr=n,V.suspenseIdCounter=r,V.idCounter=o,V.locale=i}}function Mr(e){let t=Me(),n=t.ssr;t.ssr=!0;try{return e()}finally{n||(t.ssr=!1)}}var Hr=globalThis;function xc(e,t){let n,r=!0;return()=>{let o=e();if(r)r=!1,n=o,ne(()=>t(o,void 0));else{let i=n;n=o,ne(()=>t(o,i))}}}var Or=100;function vt(e){let t=e.userCleanups;if(t.length===0)return;e.userCleanups=[];let n=e.subscriber._scope??null;n===Be()?Dr(t):mt(n,()=>Dr(t))}function Dr(e){for(let t=e.length-1;t>=0;t--)try{e[t]()}catch(n){k(n,{phase:"cleanup"})}}function $r(e){let t=1;do e.rerunPending=!1,e.userCleanups.length>0&&vt(e),ve(e.bodyFn,e.subscriber);while(e.rerunPending&&++t<=Or);e.rerunPending&&(e.rerunPending=!1,k(new Error(`effect re-requested itself ${Or}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),{phase:"effect"}))}function Ec(e){if(e.disposed)return;e.disposed=!0;let t=Hr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(t)try{t.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&vt(e)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",n)}try{Ce(e.subscriber)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",n)}}function X(e,t){if(M(typeof e=="function","effect: argument must be a function."),re())return()=>{};let n={fn:e,onError:t?.onError,userCleanups:[],running:!1,rerunPending:!1,disposed:!1,onCleanup:null,subscriber:null,bodyFn:null};n.onCleanup=s=>{n.userCleanups.push(s)};let r=n.onError;n.bodyFn=r?()=>{try{n.fn(n.onCleanup)}catch(s){r(s)}}:()=>{n.fn(n.onCleanup)};let o=(()=>{if(!n.disposed){if(n.running){n.rerunPending=!0;return}n.running=!0;try{n.rerunPending=!1,n.userCleanups.length>0&&vt(n),ve(n.bodyFn,o),n.rerunPending&&$r(n)}finally{n.running=!1,n.rerunPending=!1}}});o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._errorPhase="effect",o._runEpoch=0,o._runs=0,n.subscriber=o,n.running=!0;try{ve(n.bodyFn,n.subscriber),n.rerunPending&&$r(n)}catch(s){throw n.disposed=!0,n.userCleanups.length>0&&vt(n),Ce(n.subscriber),s}finally{n.running=!1,n.rerunPending=!1}let i=Hr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&Z(i,"effect:create",{effectFn:e}),()=>Ec(n)}var Ze=0,cn=new Set;function Tc(e){Ze++;try{return e()}finally{Ze--,Ze===0&&_c()}}function wc(e){return Ze===0?!1:(cn.add(e),!0)}function kc(){return Ze>0}function _c(){try{for(let e of cn)mr(e)}finally{cn.clear()}pr()}var Ir=Symbol.for("sibujs.reactive.batch.v1");function Ac(){let e=globalThis,t=e[Ir];if(t)return t;let n={batch:Tc,enqueueBatchedSignal:wc,isBatching:kc};return e[Ir]=n,n}var un=Ac(),q=un.batch,Oe=un.enqueueBatchedSignal,Cc=un.isBatching;var ln=globalThis;function C(e,t){let n={value:e,__v:0,__sc:0,subsHead:null,subsTail:null,__activeNode:null,__name:void 0,_d:!1,_validate:void 0},r=t?.name,o=t?.equals;r&&(n.__name=r);function i(){return Ae(n),n.value}i.__signal=n,r&&(i.__name=r);let s;if(o?s=a=>{let c=n.value,u=typeof a=="function"?a(c):a;if(!o(c,u)){if(n.value=u,n.__v++,!0){let l=ln.__SIBU_DEVTOOLS_GLOBAL_HOOK__;l&&Z(l,"signal:update",{signal:n,name:r,oldValue:c,newValue:u})}Oe(n)||Pe(n)}}:s=a=>{let c=n.value,u=typeof a=="function"?a(c):a;if(Object.is(u,c))return;n.value=u,n.__v++;let l=ln.__SIBU_DEVTOOLS_GLOBAL_HOOK__;l&&Z(l,"signal:update",{signal:n,name:r,oldValue:c,newValue:u}),Oe(n)||Pe(n)},!0){let a=ln.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&Z(a,"signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}function Nc(e){let[t,n]=C(0,e?.name?{name:e.name}:void 0);return{track(){t()},invalidate(){n(r=>r+1)}}}var Rc=`
7
+ `||e==="\r"||e==="\f"}function ct(e){let t=0,n=e.length;for(;t<n&&Te(e[t]);)t++;for(;n>t&&Te(e[n-1]);)n--;return e.slice(t,n)}var J=e=>({kind:"forbidden",reason:e});function oi(e){let t=ct(He(e));if(t==="")return J("empty content");let n=0;for(;n<t.length&&t[n]>="0"&&t[n]<="9";)n++;if(n===0)return J("missing or non-numeric delay");let r=Number.parseInt(t.slice(0,n),10);if(!Number.isFinite(r))return J("unparseable delay");for(;n<t.length&&Te(t[n]);)n++;if(n===t.length)return{kind:"delay-only",delay:r};if(t[n]!==";"&&t[n]!==",")return J("unexpected text after delay");for(n++;n<t.length&&Te(t[n]);)n++;let o=n;for(;n<t.length&&!Te(t[n])&&t[n]!=="=";)n++;let i=t.slice(o,n).toLowerCase();if(i!=="url")return J(`unsupported refresh key ${JSON.stringify(i)}`);for(;n<t.length&&Te(t[n]);)n++;if(t[n]!=="=")return J("missing '=' after url");for(n++;n<t.length&&Te(t[n]);)n++;let s,a=t[n];if(a==='"'||a==="'"){let u=t.indexOf(a,n+1);if(u===-1)return J("unterminated quoted destination");if(s=t.slice(n+1,u),ct(t.slice(u+1))!=="")return J("trailing text after quoted destination")}else if(s=ct(t.slice(n)),/[;,]/.test(s))return J("multiple refresh assignments");if(s==="")return J("empty destination");let c=it(s);return c===""?J("destination uses a disallowed protocol"):{kind:"allowed",delay:r,destination:s,sanitizedDestination:c}}function Dt(e){let t,n,r,o=new Set;for(let[i,s]of e){let a=K(i);o.has(a)&&(r=a),o.add(a),a==="http-equiv"?t=s:a==="content"&&(n=s)}return r!==void 0?J(`duplicate case-insensitive attribute ${JSON.stringify(r)}`):typeof t!="string"?{kind:"not-refresh"}:ct(He(t)).toLowerCase()!=="refresh"?{kind:"not-refresh"}:typeof n!="string"?{kind:"not-refresh"}:oi(n)}var ii="http://www.w3.org/1999/xhtml",si="http://www.w3.org/2000/svg",ai=new Set(["script","iframe","object","embed","frame","frameset"]);function zn(e){return K(e)}function Vn(e){return ai.has(zn(e))}var ci=new Set(["script","style"]);function jn(e){return ci.has(zn(e))}var L={None:0,MetaRefreshForbidden:1,MetaRefreshReactive:2,ScriptSource:3,AnimationTarget:4,StylesheetSource:5},ui=new Set(["src","href","xlink:href","type","language"]),li=new Set(["animate","set","animateMotion","animateTransform","animateColor"]),$t=new WeakSet;function Wn(e){return e.namespaceURI===ii||e.namespaceURI===null}function qn(e,t,n){let r=new Map,o=e.attributes;for(let i=0;i<o.length;i++){let s=o[i];s.name!==t&&r.set(s.name,s.value)}return t!==null&&n!==null&&r.set(t,n),r}function di(e){$t.has(e)||($t.add(e),e.getAttribute("content")!==null&&Dt(qn(e,null,null)).kind!=="not-refresh"&&e.removeAttribute("content"))}function fi(e,t,n,r){if(!Wn(e))return L.None;let o=K(t);if(o!=="http-equiv"&&o!=="content"||(r==="reactive"&&di(e),n===null)||o==="content"&&!e.hasAttribute("http-equiv"))return L.None;let i=Dt(qn(e,o,n));return i.kind==="forbidden"?L.MetaRefreshForbidden:i.kind!=="not-refresh"&&$t.has(e)?L.MetaRefreshReactive:L.None}function pi(e,t){if(t===null||K(e)!=="attributename")return L.None;let n=He(t);return Pn(n)||be(n)||Ke(n)?L.AnimationTarget:L.None}var ut=new WeakSet;function Fn(e){if(e===null)return!1;let t=K(e);if(!t.includes("stylesheet"))return!1;let n=t.split(/[\t\n\f\r ]+/);for(let r=0;r<n.length;r++)if(n[r]==="stylesheet")return!0;return!1}function mi(e,t,n,r){if(!Wn(e))return L.None;let o=K(t);return o==="href"?r==="static"||n===null?L.None:Fn(e.getAttribute("rel"))?L.StylesheetSource:(ut.add(e),L.None):o==="rel"&&Fn(n)&&ut.has(e)&&e.hasAttribute("href")?L.StylesheetSource:L.None}function Ht(e,t,n,r){let o=e.localName;return o==="meta"?fi(e,t,n,r):o==="link"?mi(e,t,n,r):o==="script"?r==="static"||n===null?L.None:ui.has(K(t))?L.ScriptSource:L.None:li.has(o)&&e.namespaceURI===si?pi(t,n):L.None}function It(e,t,n){e.localName!=="link"||K(t)!=="href"||(n!=="static"&&e.hasAttribute("href")?ut.add(e):ut.delete(e))}var gi="http://www.w3.org/1999/xhtml",bi="http://www.w3.org/2000/svg",hi="http://www.w3.org/1999/xlink",yi="http://www.w3.org/XML/1998/namespace",vi=new Set(["checked","disabled","selected"]);function Si(e){return e.namespaceURI===null||e.namespaceURI===gi}function Kn(e,t,n){j(()=>`${e}: refusing "${t}" in this element's context \u2014 ${["",'the element would become a <meta http-equiv="refresh"> directive the shared refresh policy forbids (a destination outside the URL allowlist, or a directive too malformed to read unambiguously)',"a <meta> whose http-equiv or content is reactive may never carry a refresh directive: a browser schedules the navigation as soon as the directive is valid, and nothing can withdraw it when the state changes back","a runtime value may not choose the program a <script> runs; name the script in static template source, or load it through Head({ script }) as an explicit trust decision","an SVG animation may not target a URL, event-handler or nested-document attribute; its to / values would be written into that attribute without passing the URL policy",'a runtime-chosen href may not become an applied <link rel="stylesheet">: a well-formed URL is not a trusted stylesheet. Name the stylesheet in static template source, or load a runtime-chosen one through Head({ link }) as an explicit trust decision'][n]}. The write was not performed.`)}function Un(e,t,n){e[t]=n}function xi(e,t){if(e.namespaceURI!==bi)return null;let n=t.toLowerCase();return n.startsWith("xlink:")?hi:n.startsWith("xml:")?yi:null}function Q(e,t,n,r={}){let o=Ei(e,t,n,r);return e.localName==="link"&&It(e,t,r.reactive?"reactive":"runtime"),o}function Ei(e,t,n,r){let o=xi(e,t),i=o?t.slice(t.indexOf(":")+1):t;if(be(t))return O(`${r.label??"setSafeAttribute"}: refusing to set event-handler attribute "${t}". Its value would be evaluated as JavaScript. Use on:{ ${t.slice(2)}: fn } instead.`),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let s=n==null||n===!1?null:n===!0?"":String(n),a=Ht(e,t,s,r.reactive?"reactive":"runtime");if(a!==L.None)return Kn(r.label??"setSafeAttribute",t,a),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;if(n==null)return o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0;if(Ke(t))return O(`${r.label??"setSafeAttribute"}: refusing to set "${t}". The browser parses this attribute as a nested HTML document, so a generic string value cannot be made safe \u2014 attribute escaping is undone before the parse. Build the frame's content another way.`),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let c=Si(e),u=c?t.toLowerCase():t;if(typeof n=="boolean"){if(t.length>5&&t.slice(0,5).toLowerCase()==="aria-"){let f=n?"true":"false";return(o?e.getAttributeNS(o,i):e.getAttribute(t))!==f&&(o?e.setAttributeNS(o,t,f):e.setAttribute(t,f)),!0}return c&&vi.has(u)&&u in e?Un(e,u,n):n?o?e.setAttributeNS(o,t,""):e.setAttribute(t,""):o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0}let l=String(n);if(r.syncValueProperty!==!1&&c&&(u==="value"||u==="checked")&&u in e)return Un(e,u,u==="checked"?!!n:l),!0;let m=l===""?"":Bn(t,l,{element:e});return m===null?(o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0):((o?e.getAttributeNS(o,i):e.getAttribute(t))===m||(o?e.setAttributeNS(o,t,m):e.setAttribute(t,m)),!0)}function Pt(e,t,n){if(Ke(t))return O(`html: refusing static attribute "${t}" \u2014 the browser parses it as a nested document.`),!1;let r=Ht(e,t,n,"static");return r!==L.None?(Kn("html (static attribute)",t,r),!1):(e.setAttribute(t,n),e.localName==="link"&&It(e,t,"static"),!0)}var Ti=4096,Bt=[];function wi(){return{sig:null,sub:null,epoch:0,depVersion:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function ki(e,t,n){let r=Bt.pop();if(r)return r.sig=e,r.sub=t,r.epoch=n,r;let o=wi();return o.sig=e,o.sub=t,o.epoch=n,o}function Jn(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,Bt.length<Ti&&Bt.push(e)}function _i(e,t){let n=e.subsHead??null;t.sigPrev=null,t.sigNext=n,n?n.sigPrev=t:e.subsTail=t,e.subsHead=t,e.__sc=(e.__sc??0)+1}function Gn(e){let t=e.sig;if(!t)return;let n=e.sigPrev,r=e.sigNext;n?n.sigNext=r:t.subsHead=r,r?r.sigPrev=n:t.subsTail=n,t.__sc=(t.__sc??1)-1,t.__activeNode===e&&(t.__activeNode=e.prevActive),t.__sc===0&&(t.subsHead=null,t.subsTail=null)}function Ai(e,t){let n=e.depsTail??null;t.subPrev=n,t.subNext=null,n?n.subNext=t:e.depsHead=t,e.depsTail=t}function Ci(e){let t=e.sub;if(!t)return;let n=e.subPrev,r=e.subNext;n?n.subNext=r:t.depsHead=r,r?r.subPrev=n:t.depsTail=n}var te=null,ue=null,he=0,ye=[],ee=new Set,Ni=[];function Ri(e){try{e()}catch(t){let n=e;k(t,{phase:n._errorPhase??"effect",name:n.__name,node:n._errorNode})}}function Li(e){let t=e.depsHead??null;if(t===null)return!0;for(;t!==null;){let n=t.sig;if(n===null)return!0;if(n._d===!0&&n._validate!==void 0)try{n._validate()}catch{return!0}if(t.depVersion!==n.__v)return!0;t=t.subNext}return!1}var ae=0,le=!1;function zt(){ae===0&&(ue=te,te=null,le=!0),ae++}function Vt(){ae--,ae===0&&(te=ue,ue=null,le=!1)}function Yn(){return le}function Zn(e){zt();try{return e()}finally{Vt()}}var G=null;function jt(){return G}function pt(e,t){let n=G;G=e;try{return t()}finally{G=n}}function Wt(e){let t=G;return t===null?e:(...n)=>pt(t,()=>e(...n))}var Mi=0;function qt(e,t){let n=te,r=0,o=null;le&&(r=ae,o=ue,ae=0,ue=null,le=!1),te=t;let i=t;i._cap===void 0&&(i._cap=Cn());let s=G;s!==null&&!i._epoch&&i._scope===void 0&&(i._scope=s);let a=i._scope===void 0?null:i._scope;a!==s&&(G=a);let c=++Mi;i._epoch=c,i._structDirty=!1;for(let u=i.depsHead??null;u!==null;u=u.subNext){let l=u.sig;u.prevActive=l.__activeNode??null,l.__activeNode=u}try{e()}finally{te=n,G=s,r!==0&&(ae=r,ue=o,le=!0);let u=i.depsHead??null;for(;u!==null;){let l=u.subNext,m=u.sig;m.__activeNode=u.prevActive,u.prevActive=null,u.epoch!==c&&(Ci(u),Gn(u),Jn(u)),u=l}}}function Xn(e,t){if(!t)return Ut(e);Ie(t);let n=te,r=0,o=null;le&&(r=ae,o=ue,ae=0,ue=null,le=!1),te=t;let i=t;i._scope===void 0&&(i._scope=G);let s=G;G=i._scope;try{e()}finally{te=n,G=s,r!==0&&(ae=r,ue=o,le=!0);for(let a=i.depsHead??null;a!==null;a=a.subNext){let c=a.sig;c.__activeNode=a.prevActive,a.prevActive=null}}return i._dispose??(i._dispose=()=>Ie(t))}function Ut(e,t){let n=()=>{let o=r;if(!(o._disposed||o._reentrant)){o._reentrant=!0;try{qt(e,r)}finally{o._reentrant=!1}}},r=n;r.depsHead=null,r.depsTail=null,r._epoch=0,r._structDirty=!1,r._hasComputedDep=!1,r._runEpoch=0,r._runs=0,r._reentrant=!1,r._disposed=!1,r._errorPhase="binding",r._errorNode=t;try{n()}catch(o){throw r._disposed=!0,r._errorNode=void 0,Ie(r),o}return r._dispose??(r._dispose=()=>{r._disposed=!0,r._errorNode=void 0,Ie(r)})}function Qn(e){if(!te)return;let t=te,n=e,r=t._epoch??0,o=n.__activeNode??null;if(o!==null&&o.sub===t){o.epoch=r,o.depVersion=n.__v??Number.NaN;return}n._validate!==void 0&&(t._hasComputedDep=!0);let i=ki(e,t,r);i.depVersion=n.__v??Number.NaN,i.prevActive=o,n.__activeNode=i,Ai(t,i),_i(n,i),t._structDirty=!0}function Ie(e){let t=e,n=t.depsHead??null;for(t.depsHead=null,t.depsTail=null;n;){let r=n.subNext;Gn(n),Jn(n),n=r}}var lt=1e3,dt=1e6,ft=0,we=new Set;function er(e){let t=lt;return Number.isFinite(e)&&e>0&&(lt=Math.floor(e)),t}function tr(e){let t=dt;return Number.isFinite(e)&&e>0&&(dt=Math.floor(e)),t}function Oi(e){let t=e;return t._runEpoch!==ft?(t._runEpoch=ft,t._runs=1,!1):(t._runs=(t._runs??0)+1,t._runs>lt)}function Di(e){let t=e.__name??"<unnamed>";k(new Error(`subscriber "${t}" fired more than ${lt} times \u2014 likely a write-reads-self cycle between effects/signals. This subscriber is quarantined for the rest of this update; other pending work still runs.`),{phase:"scheduler",name:t})}function $i(){k(new Error(`Notification drain exceeded ${dt} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`),{phase:"scheduler"})}function nr(){let e=0;for(;e<ye.length;){if(e>=dt){$i();break}let t=ye[e++];if(ee.delete(t),we.size>0&&we.has(t)||t._hasComputedDep===!0&&!Li(t))continue;if(Oi(t)){Di(t),we.add(t);continue}let n=Nn(t._cap??null);try{Ri(t)}finally{n&&Rn()}}}function rr(){if(!(he>0)){he++,ft++;try{nr()}finally{he--,he===0&&(ye.length=0,ee.clear(),we.size>0&&we.clear())}}}function Ft(e){e();let t=e._sig;if(!t)return;let n=Ni,r=n.length;for(n.push(t);n.length>r;){let i=n.pop().subsHead??null;for(;i;){let s=i.sub;if(s)if(s._c){let a=s._sig;a?(!a._d||a._f===!0)&&(a._d=!0,a._f=!1,n.push(a)):s()}else ee.has(s)||(ee.add(s),ye.push(s));i=i.sigNext}}}function or(e){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&(r._c?Ft(r):ee.has(r)||(ee.add(r),ye.push(r))),n=n.sigNext}}function ir(e){let n=e.subsHead;if(n){if(he>0){let r=n;for(;r;){let o=r.sub;o&&(o._c?Ft(o):ee.has(o)||(ee.add(o),ye.push(o))),r=r.sigNext}return}he++,ft++;try{let r=n;for(;r;){let o=r.sub;o&&(o._c?Ft(o):ee.has(o)||(ee.add(o),ye.push(o))),r=r.sigNext}nr()}finally{he--,he===0&&(ye.length=0,ee.clear(),we.size>0&&we.clear())}}}function sr(e){return e.__sc??0}function ar(e){let t=e,n=[],r=t.depsHead??null;for(;r;)r.sig&&n.push(r.sig),r=r.subNext;return n}function cr(e,t){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&t(r),n=n.sigNext}}var ur="4.11.0",lr=Symbol.for("sibujs.reactive.v1");function Ii(){let e=globalThis,t=e[lr];if(t)return!t.__dupWarned&&(t.__dupWarned=!0,O(`Multiple instances of the reactive runtime detected on this page (active: ${t.version}, duplicate: ${ur}). Reactivity is NOT broken and no bundler configuration is required: every copy routes through the first one via a global registry, so signal writes still reach subscribers registered by any copy. This is only a SIZE issue \u2014 the duplicate copy's bytes are downloaded and parsed for nothing. If you want them back, de-duplicate sibujs in your bundler (Vite: resolve.dedupe: ['sibujs']). Mismatched VERSIONS above are worth fixing regardless, since only the first one loaded is used.`)),t;let n={suspendTracking:zt,resumeTracking:Vt,isTrackingSuspended:Yn,untracked:Zn,retrack:qt,track:Xn,reactiveBinding:Ut,recordDependency:Qn,cleanup:Ie,setMaxSubscriberRepeats:er,setMaxDrainIterations:tr,drainNotificationQueue:rr,queueSignalNotification:or,notifySubscribers:ir,getSubscriberCount:sr,getSubscriberDeps:ar,forEachSubscriber:cr,getOwnerScope:jt,runWithOwnerScope:pt,bindOwnerScope:Wt,version:ur};return e[lr]=n,n}var H=Ii(),ke=H.suspendTracking,_e=H.resumeTracking,dr=H.isTrackingSuspended,ne=H.untracked,ve=H.retrack,Y=H.track,P=H.reactiveBinding,Ae=H.recordDependency,Ce=H.cleanup,nl=H.setMaxSubscriberRepeats,fr=H.setMaxDrainIterations,pr=H.drainNotificationQueue,mr=H.queueSignalNotification,Pe=H.notifySubscribers,rl=H.getSubscriberCount,ol=H.getSubscriberDeps,il=H.forEachSubscriber,Be=H.getOwnerScope??jt,mt=H.runWithOwnerScope??pt,z=H.bindOwnerScope??Wt;function Je(e,t,n){if(be(t))return Q(e,t,"",{label:`bindAttribute("${t}")`}),()=>{};function r(){let o;try{o=n()}catch(i){k(i,{phase:"binding",name:`bindAttribute("${t}")`,node:e});return}Q(e,t,o,{label:`bindAttribute("${t}")`,reactive:!0})}return P(r,e)}function gr(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(c){k(c,{phase:"binding",name:"bindDynamic (name getter)",node:e});return}let a;try{a=typeof n=="function"?n():n}catch(c){k(c,{phase:"binding",name:"bindDynamic (value getter)",node:e});return}r!==null&&r!==s&&(e.removeAttribute(r),r=null),Q(e,s,a,{label:"bindDynamic",reactive:!0})&&(r=s)}let i=P(o,e);return()=>{i(),r!==null&&e.removeAttribute(r)}}var Kt=["data-focus-key","id","name"],Pi=new Set(["text","search","url","tel","password",""]);function Bi(e){let t=e.tagName;if(!(t==="TEXTAREA"||t==="INPUT"&&Pi.has(e.type.toLowerCase())))return{start:null,end:null,direction:null};let r=e;return{start:r.selectionStart,end:r.selectionEnd,direction:r.selectionDirection}}function Ge(e){if(e.length===0||typeof document>"u")return null;let t=document.activeElement;if(!t||t===document.body)return null;let n=!1;for(let i=0;i<e.length;i++){let s=e[i];if(s===t||s.nodeType===1&&s.contains(t)){n=!0;break}}if(!n)return null;let r=null,o=null;for(let i=0;i<Kt.length;i++){let s=t.getAttribute(Kt[i]);if(s){r=Kt[i],o=s;break}}return{el:t,attr:r,value:o,tag:t.tagName,...Bi(t)}}function Fi(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function zi(e,t){let n=null,r=0;for(let o=0;o<e.length;o++){let i=e[o];if(i.nodeType!==1)continue;let s=i;s.matches(t)&&(r++,n??(n=s));let a=s.querySelectorAll(t);for(let c=0;c<a.length;c++)r++,n??(n=a[c]);if(r>1)return{el:null,count:r}}return r===1?{el:n,count:r}:{el:null,count:r}}function br(e,t){if(e.focus(),t.start!==null&&typeof e.setSelectionRange=="function"){let n=e,r=n.value.length,o=Math.min(t.start,r),i=Math.min(t.end??o,r);n.setSelectionRange(o,i,t.direction??"none")}}function Fe(e,t,n){if(!e||typeof document>"u")return;let r=document.activeElement;if(r===e.el||r&&r!==document.body&&r!==document.documentElement)return;if(e.el.isConnected){br(e.el,e);return}let o=!1;if(e.attr&&e.value){let{el:i,count:s}=zi(t,`[${e.attr}=${Fi(e.value)}]`);if(i&&i.tagName===e.tag){br(i,e);return}o=s>1}j(()=>{let i=e.attr?` (${e.attr}="${e.value}")`:"",s=o?`several elements in the rebuilt subtree share ${e.attr}="${e.value}", so there is no way to tell which one the user was in \u2014 a shared name (a radio group) identifies a GROUP, not a control. Add a unique id or data-focus-key to each`:"no element in the rebuilt subtree carries the same identity. Give it a stable id, name, or data-focus-key that the rebuild reproduces";return`${n}: a reactive rebuild discarded the focused element <${e.tag.toLowerCase()}>${i} and could not re-establish it, so focus fell back to <body>. An in-progress edit ends here, and an in-progress IME composition is lost outright \u2014 a composition belongs to the DOM node, so it cannot survive the node being destroyed. ${s}, or stop the rebuild from happening: key the subtree with match(() => shapeKey(), { \u2026 }) so it is re-created only when the shape actually changes, and drive the rest with reactive attributes and text children, which mutate nodes in place instead of replacing them.`})}function de(e,t){let n=[];function r(){let o;try{o=t()}catch(l){k(l,{phase:"binding",name:"bindChildNode",node:e});return}let i=Ge(n);if(o==null||typeof o=="boolean"){for(let l=0;l<n.length;l++){let m=n[l];D(m),m.parentNode&&m.parentNode.removeChild(m)}n.length=0,Fe(i,n,"bindChildNode");return}let s=e.parentNode;if(!s){n.length=0;return}let a;if(Array.isArray(o)){a=[];let l=new Set;for(let m=0;m<o.length;m++){let g=o[m];if(g==null||typeof g=="boolean")continue;let f=g instanceof Node?g:document.createTextNode(String(g));if(l.has(f)){O("bindChildNode: duplicate node reference in array \u2014 only the first occurrence is rendered.");continue}l.add(f),a.push(f)}}else a=[o instanceof Node?o:document.createTextNode(String(o))];let c;if(n.length>0&&a.length>0){let l=new Set(n);c=new Set;for(let m=0;m<a.length;m++)l.has(a[m])&&c.add(a[m])}for(let l=0;l<n.length;l++){let m=n[l];c?.has(m)||(D(m),m.parentNode&&m.parentNode.removeChild(m))}let u=e;for(let l=0;l<a.length;l++){let m=a[l];u.nextSibling!==m&&s.insertBefore(m,u.nextSibling),u=m}n=a,Fe(i,a,"bindChildNode")}return P(r,e)}var R="http://www.w3.org/2000/svg",Vi=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);var Jt=new Set,hr=100,yr=!1,vr=new Map;function Sr(e){let t=vr.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),vr.set(e,t)),t}function ji(e,t){if(typeof t=="function"){let r=t,o=[],i=!1,s=P(()=>{let a=r();if(a===null||typeof a!="object"){o=[],i=!0,e.setAttribute("style",at(String(a),{element:e}));return}let c=e.style;i&&(e.removeAttribute("style"),i=!1);let u=[];for(let l in a){if(!Object.hasOwn(a,l))continue;let m=a[l];if(m==null)continue;let g=Sr(l);u.push(g),c.setProperty(g,st(g,String(m),{element:e}))}for(let l=0;l<o.length;l++)u.indexOf(o[l])===-1&&c.removeProperty(o[l]);o=u},e);x(e,s);return}if(typeof t=="string"){e.setAttribute("style",at(t,{element:e}));return}let n=e;for(let r in t){if(!Object.hasOwn(t,r))continue;let o=t[r],i=Sr(r);if(typeof o=="function"){let s=o,a=P(()=>{n.style.setProperty(i,st(i,String(s()),{element:e}))},e);x(e,a)}else n.style.setProperty(i,st(i,String(o),{element:e}))}}function Wi(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=P(()=>{let s=t();s==null||s===!1?e.removeAttribute("class"):e.setAttribute("class",s)},e);x(e,i);return}let n=t,r=!1,o="";for(let i in n){if(!Object.hasOwn(n,i))continue;let s=n[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=P(()=>{let a="";for(let c in n){if(!Object.hasOwn(n,c))continue;let u=n[c];(typeof u=="function"?u():u)&&(a=a?`${a} ${c}`:c)}e.setAttribute("class",a)},e);x(e,s)}else e.setAttribute("class",o)}function Gt(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),x(e,de(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),x(e,de(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),x(e,de(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)))}}}function d(e,t){let n=Vn(e);return(r,o)=>{if(n)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);let i=t?document.createElementNS(t,e):document.createElement(e);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),Gt(i,o),i):(j(()=>{let f=r.trim().split(/\s+/);if(f.length<2)return"";let p=0;for(let h=0;h<f.length;h++){let y=f[h];if(!/^-?[A-Za-z_][A-Za-z0-9_:/.-]*$/.test(y))return"";/[-:/0-9]/.test(y)&&p++}if(p<2)return"";let b=`${e}|${r}`;return Jt.has(b)?"":Jt.size>=hr?yr?"":(yr=!0,`tagFactory: ${hr} distinct lone-string class warnings have been reported; suppressing further ones for the rest of this session so they cannot flood the console. Fix the reported ones and reload to see any that remain.`):(Jt.add(b),`tagFactory: lone string "${r}" looks like a class list but is being rendered as TEXT. For a class, use ${e}({ class: "${r}" }) \u2014 or ${e}("${r}", children) to set the class AND add children.`)}),i.textContent=r,i);if(typeof r=="number")return i.textContent=String(r),i;if(Array.isArray(r)||r instanceof Node||typeof r=="function")return Gt(i,r),i;let s=r,a=s.class;a!=null&&Wi(i,a);let c=s.id;typeof c=="function"?x(i,Je(i,"id",c)):c!=null&&(typeof c=="string"&&Vi.has(c.toLowerCase())&&O(`tagFactory: element id="${c}" matches a common global and may cause DOM clobbering. Avoid setting ids from untrusted input.`),i.id=c);let u=o!==void 0?o:s.nodes;u!=null&&Gt(i,u);let l=s.on;if(l)for(let f in l){if(!Object.hasOwn(l,f))continue;let p=l[f];typeof p=="function"?i.addEventListener(f,p):O(`tagFactory: on.${f} handler is not a function (got ${typeof p}). Event listener was not attached.`)}let m=s.style;m!=null&&ji(i,m);let g=s.ref;g&&(g.current=i);for(let f in s)switch(f){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{if(!Object.hasOwn(s,f))continue;let p=s[f];if(p==null||be(f))continue;typeof p=="function"?x(i,Je(i,f,p)):Q(i,f,p,{syncValueProperty:!1,label:"tagFactory"})}}return typeof s.onElement=="function"&&s.onElement(i),i}}var Rl=d("html"),qi=d("head"),Ui=d("body"),Ki=d("title"),A=d("div"),I=d("span"),Ji=d("section"),Gi=d("article"),Yi=d("header"),Zi=d("footer"),Xi=d("nav"),Qi=d("main"),es=d("aside"),ts=d("address"),Yt=d("p"),ns=d("h1"),rs=d("h2"),Zt=d("h3"),os=d("h4"),is=d("h5"),ss=d("h6"),as=d("blockquote"),cs=d("dd"),us=d("dl"),ls=d("dt"),ds=d("figcaption"),fs=d("figure"),ps=d("hr"),ms=d("li"),gs=d("ol"),bs=d("ul"),Xt=d("pre"),hs=d("a"),ys=d("abbr"),vs=d("b"),Ss=d("bdi"),xs=d("bdo"),Es=d("br"),Ts=d("cite"),Qt=d("code"),ws=d("data"),ks=d("dfn"),_s=d("em"),As=d("i"),Cs=d("kbd"),Ns=d("mark"),Rs=d("q"),Ls=d("rp"),Ms=d("rt"),Os=d("ruby"),Ds=d("s"),$s=d("samp"),Hs=d("small"),Is=d("strong"),Ps=d("sub"),Bs=d("sup"),Fs=d("time"),zs=d("u"),Vs=d("var"),js=d("area"),Ws=d("audio"),qs=d("img"),Us=d("map"),Ks=d("track"),Js=d("video"),Gs=d("embed"),Ys=d("iframe"),Zs=d("object"),Xs=d("param"),Qs=d("picture"),ea=d("portal"),ta=d("source"),na=d("svg",R),ra=d("math"),oa=d("canvas"),ia=d("noscript"),sa=d("script"),aa=d("del"),ca=d("ins"),ua=d("caption"),la=d("col"),da=d("colgroup"),fa=d("table"),pa=d("tbody"),ma=d("td"),ga=d("tfoot"),ba=d("th"),ha=d("thead"),ya=d("tr"),Ye=d("button"),va=d("datalist"),Sa=d("fieldset"),xa=d("form"),Ea=d("input"),Ta=d("label"),wa=d("legend"),ka=d("meter"),_a=d("optgroup"),Aa=d("option"),Ca=d("output"),Na=d("progress"),Ra=d("select"),La=d("textarea"),Ma=d("details"),Oa=d("dialog"),Da=d("menu"),$a=d("summary"),Ha=d("slot"),Ia=d("template"),Pa=d("base"),Ba=d("link"),Fa=d("meta"),Ne=d("style"),za=d("circle",R),Va=d("ellipse",R),ja=d("g",R),Wa=d("line",R),qa=d("path",R),Ua=d("polygon",R),Ka=d("polyline",R),Ja=d("rect",R),Ga=d("text",R),Ya=d("tspan",R),Za=d("defs",R),Xa=d("clipPath",R),Qa=d("mask",R),ec=d("pattern",R),tc=d("linearGradient",R),nc=d("radialGradient",R),rc=d("stop",R),oc=d("use",R),ic=d("symbol",R),sc=d("marker",R),ac=d("center"),cc=d("font"),uc=d("marquee"),lc=e=>d(e);var en="__sibuPendingError";function xr(e,t){let n=()=>e.parentNode?(k(t,{phase:"render",name:"lazy",node:e}),!0):!1;n()||queueMicrotask(()=>{n()||(e[en]=t)})}function gt(e){let t=e,n=t[en];if(n instanceof Error)return delete t[en],n}function Er(e){let t=null;return function(){if(t)return t();let r=A({class:"sibu-lazy"}),o=!1;return e().then(z(i=>{if(o)return;t=i.default;let s=t();W(r,s)})).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));W(r,A({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),xr(r,s)}),r.appendChild(I("sibu-lazy-loading","Loading...")),x(r,()=>{o=!0}),r}}function Tr({nodes:e,fallback:t}){let n=A({class:"sibu-suspense"}),r=t();n.appendChild(r);let o=!1,i=null,s=null;x(n,()=>{o=!0,i&&(i.disconnect(),i=null),s&&!n.contains(s)&&D(s)});let a=z(()=>{if(!o)try{let c=e();if(s=c,c.classList.contains("sibu-lazy")){if(!c.querySelector(".sibu-lazy-loading")){W(n,c);return}i=new MutationObserver(()=>{if(o)return;c.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,W(n,c))}),i.observe(c,{childList:!0,subtree:!0})}else W(n,c)}catch(c){let u=c instanceof Error?c:new Error(String(c));xr(n,u)}});return queueMicrotask(a),n}function on(e,t){return()=>Be()===e?t():mt(e,t)}function ht(e,t){try{return e()}catch(n){let r=t.toLowerCase().includes("unmount")?"cleanup":"effect";k(n,{phase:r,name:t});return}}function tn(e,t,n,r,o){let i=ht(e,t);if(typeof i!="function")return;let s=on(o,i);r()||!n.isConnected?ht(s,"onUnmount"):kr(s,n)}var ze=new WeakMap,Re=new WeakMap,fe=new Set,pe=new Set,Ve=null,bt=0,dc=256;function nn(e){let t=ze.get(e);if(t){ze.delete(e),fe.delete(e);for(let n of t)try{n()}catch{}}}function rn(e){Re.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let n=Re.get(e);if(n){Re.delete(e),pe.delete(e);for(let r of n)try{r()}catch{}}})}function fc(e){if(fe.size===0||e.nodeType!==1)return;let t=e;if(fe.has(t)&&t.isConnected&&nn(t),t.firstElementChild)for(let n of Array.from(fe))n!==t&&n.isConnected&&t.contains(n)&&nn(n)}function pc(e){if(pe.size===0||e.nodeType!==1)return;let t=e;if(pe.has(t)&&!t.isConnected&&rn(t),t.firstElementChild)for(let n of Array.from(pe))n!==t&&!n.isConnected&&t.contains(n)&&rn(n)}function mc(){if(fe.size>0)for(let e of Array.from(fe))e.isConnected&&nn(e);if(pe.size>0)for(let e of Array.from(pe))e.isConnected||rn(e)}function wr(){Ve||typeof document>"u"||(Ve=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++)fc(t.addedNodes[n]);if(t.removedNodes.length>0)for(let n=0;n<t.removedNodes.length;n++)pc(t.removedNodes[n])}bt+=e.length,bt>=dc&&(bt=0,mc()),sn()}),Ve.observe(document.body,{childList:!0,subtree:!0}))}function sn(){Ve&&fe.size===0&&pe.size===0&&(Ve.disconnect(),Ve=null,bt=0)}function gc(e,t){let n=ze.get(e);return n||(n=[],ze.set(e,n)),n.push(t),fe.add(e),wr(),()=>{let r=ze.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(ze.delete(e),fe.delete(e))}sn()}}function bc(e,t){let n=Re.get(e);return n||(n=[],Re.set(e,n)),n.push(t),pe.add(e),wr(),()=>{let r=Re.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Re.delete(e),pe.delete(e))}sn()}}function yt(e,t){if(typeof document>"u")return;let n=Be();if(e=on(n,e),t){let r=!1,o=()=>r;if(x(t,()=>{r=!0}),t.isConnected){queueMicrotask(()=>{r||tn(e,"onMount",t,o,n)});return}queueMicrotask(()=>{if(r)return;if(t.isConnected){tn(e,"onMount",t,o,n);return}let i=gc(t,()=>{r||tn(e,"onMount",t,o,n)});x(t,i)})}else queueMicrotask(()=>{ht(e,"onMount")})}function hc(e,t){typeof document>"u"||kr(on(Be(),e),t)}function kr(e,t){let n=!1,r=()=>{n||(n=!0,ht(e,"onUnmount"))};x(t,r);let o=()=>{if(n)return;let i=bc(t,r);x(t,i)};t.isConnected?o():yt(()=>{o()},t)}function yc(e,t){x(t,e)}function Z(e,t,n){try{e.emit(t,n)}catch{}}var an=Symbol.for("sibujs.ssr.v1");function vc(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let t=null,n=process.getBuiltinModule;typeof n=="function"?t=n("node:async_hooks"):typeof _t=="function"&&(t=_t("async_hooks")),t&&(e=new t.AsyncLocalStorage)}}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0,locale:void 0},fallbackDepth:0}}var Se=globalThis[an]??(globalThis[an]=vc()),Le=Se.als,V=Se.fallbackStore;Se.fallbackDepth??(Se.fallbackDepth=0);var _r=!1;function Sc(){if(_r||Le||!(typeof process<"u"&&!!process.versions?.node))return;_r=!0;let t=process.versions.node;O(`SSR request isolation is UNAVAILABLE on this runtime (Node ${t}). AsyncLocalStorage could not be loaded, so concurrent requests share one SSR store: request state and the query cache can bleed between them. Node >= 22.3 is required for isolated SSR under ESM; the CommonJS build works on older versions. A fully synchronous render is unaffected.`)}function Me(){if(Le){let e=Le.getStore();if(e)return e}return V}function Ar(){return Le?Le.getStore()??null:Se.fallbackDepth>0?V:null}function re(){return Me().ssr}function Cr(e){if(!re())return null;let t=Me(),n=t.caches??(t.caches=new Map),r=n.get(e);return r||(r=new Map,n.set(e,r)),r}function Nr(){Me().ssr=!0}function Rr(){Me().ssr=!1}function Lr(e){let t={ssr:!0,suspenseIdCounter:0,idCounter:0,locale:void 0};if(Le)return Le.run(t,e);Sc();let n=V.ssr,r=V.suspenseIdCounter,o=V.idCounter,i=V.locale;V.ssr=!0,V.suspenseIdCounter=0,V.idCounter=0,V.locale=void 0,Se.fallbackDepth++;try{return e()}finally{Se.fallbackDepth--,V.ssr=n,V.suspenseIdCounter=r,V.idCounter=o,V.locale=i}}function Mr(e){let t=Me(),n=t.ssr;t.ssr=!0;try{return e()}finally{n||(t.ssr=!1)}}var Hr=globalThis;function xc(e,t){let n,r=!0;return()=>{let o=e();if(r)r=!1,n=o,ne(()=>t(o,void 0));else{let i=n;n=o,ne(()=>t(o,i))}}}var Or=100;function vt(e){let t=e.userCleanups;if(t.length===0)return;e.userCleanups=[];let n=e.subscriber._scope??null;n===Be()?Dr(t):mt(n,()=>Dr(t))}function Dr(e){for(let t=e.length-1;t>=0;t--)try{e[t]()}catch(n){k(n,{phase:"cleanup"})}}function $r(e){let t=1;do e.rerunPending=!1,e.userCleanups.length>0&&vt(e),ve(e.bodyFn,e.subscriber);while(e.rerunPending&&++t<=Or);e.rerunPending&&(e.rerunPending=!1,k(new Error(`effect re-requested itself ${Or}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),{phase:"effect"}))}function Ec(e){if(e.disposed)return;e.disposed=!0;let t=Hr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(t)try{t.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&vt(e)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",n)}try{Ce(e.subscriber)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",n)}}function X(e,t){if(M(typeof e=="function","effect: argument must be a function."),re())return()=>{};let n={fn:e,onError:t?.onError,userCleanups:[],running:!1,rerunPending:!1,disposed:!1,onCleanup:null,subscriber:null,bodyFn:null};n.onCleanup=s=>{n.userCleanups.push(s)};let r=n.onError;n.bodyFn=r?()=>{try{n.fn(n.onCleanup)}catch(s){r(s)}}:()=>{n.fn(n.onCleanup)};let o=(()=>{if(!n.disposed){if(n.running){n.rerunPending=!0;return}n.running=!0;try{n.rerunPending=!1,n.userCleanups.length>0&&vt(n),ve(n.bodyFn,o),n.rerunPending&&$r(n)}finally{n.running=!1,n.rerunPending=!1}}});o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._errorPhase="effect",o._runEpoch=0,o._runs=0,n.subscriber=o,n.running=!0;try{ve(n.bodyFn,n.subscriber),n.rerunPending&&$r(n)}catch(s){throw n.disposed=!0,n.userCleanups.length>0&&vt(n),Ce(n.subscriber),s}finally{n.running=!1,n.rerunPending=!1}let i=Hr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&Z(i,"effect:create",{effectFn:e}),()=>Ec(n)}var Ze=0,cn=new Set;function Tc(e){Ze++;try{return e()}finally{Ze--,Ze===0&&_c()}}function wc(e){return Ze===0?!1:(cn.add(e),!0)}function kc(){return Ze>0}function _c(){try{for(let e of cn)mr(e)}finally{cn.clear()}pr()}var Ir=Symbol.for("sibujs.reactive.batch.v1");function Ac(){let e=globalThis,t=e[Ir];if(t)return t;let n={batch:Tc,enqueueBatchedSignal:wc,isBatching:kc};return e[Ir]=n,n}var un=Ac(),q=un.batch,Oe=un.enqueueBatchedSignal,Cc=un.isBatching;var ln=globalThis;function C(e,t){let n={value:e,__v:0,__sc:0,subsHead:null,subsTail:null,__activeNode:null,__name:void 0,_d:!1,_validate:void 0},r=t?.name,o=t?.equals;r&&(n.__name=r);function i(){return Ae(n),n.value}i.__signal=n,r&&(i.__name=r);let s;if(o?s=a=>{let c=n.value,u=typeof a=="function"?a(c):a;if(!o(c,u)){if(n.value=u,n.__v++,!0){let l=ln.__SIBU_DEVTOOLS_GLOBAL_HOOK__;l&&Z(l,"signal:update",{signal:n,name:r,oldValue:c,newValue:u})}Oe(n)||Pe(n)}}:s=a=>{let c=n.value,u=typeof a=="function"?a(c):a;if(Object.is(u,c))return;n.value=u,n.__v++;let l=ln.__SIBU_DEVTOOLS_GLOBAL_HOOK__;l&&Z(l,"signal:update",{signal:n,name:r,oldValue:c,newValue:u}),Oe(n)||Pe(n)},!0){let a=ln.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&Z(a,"signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}function Nc(e){let[t,n]=C(0,e?.name?{name:e.name}:void 0);return{track(){t()},invalidate(){n(r=>r+1)}}}var Rc=`
8
8
  .sibu-error-display {
9
9
  border: 1px solid var(--sibu-err-border, #e5484d);
10
10
  border-radius: 10px;
@@ -4,7 +4,7 @@
4
4
  `||o==="\f"){n+=1;continue}if(o==="\r"){n+=e[n+2]===`
5
5
  `?2:1;continue}if(zn(o)){let i="",s=n+1;for(;s<e.length&&i.length<6&&zn(e[s]);)i+=e[s],s++;s<e.length&&ni(e[s])&&(s+=e[s]==="\r"&&e[s+1]===`
6
6
  `?2:1);let a=Number.parseInt(i,16),c=a===0||a>1114111||a>=55296&&a<=57343;t+=c?"\uFFFD":String.fromCodePoint(a),n=s-1;continue}t+=o,n+=1}return t}var Wn=["url(","expression(","javascript:","vbscript:","-moz-binding","behavior:","@import","image-set(","filter:progid","image(","src("],oi=4,ii=5,si=8;function ai(e){if(!e)return"an element";let t=e.tagName.toLowerCase(),n=e.getAttribute("id");n&&(t+=`#${n}`);let r=e.getAttribute("class");return r&&(t+=`.${r.trim().split(/\s+/).slice(0,3).join(".")}`),`<${t}>`}var jt=new Set,qn=100,Un=!1;function pt(e,t,n){te(()=>{let r=["url() in an inline style is an exfiltration channel: the browser fetches it immediately and the URL's path or query can carry page data off-origin","expression() executes arbitrary script in legacy engines","the javascript: scheme executes script","the vbscript: scheme executes script","-moz-binding loads and runs remote XBL","behavior: loads and runs a remote HTC script","@import pulls in a remote stylesheet","image-set() fetches remote images, the same exfiltration channel as url()","filter:progid activates legacy scriptable filters","image() fetches its string argument as a URL, the same exfiltration channel as url()","src() fetches its string argument as a URL, the same exfiltration channel as url()"],o=n?.property?`${n.property}: ${e}`:e,i=ai(n?.element),s=`${i}|${o}`;return jt.has(s)?"":jt.size>=qn?Un?"":(Un=!0,`${qn} distinct dropped style declarations have been reported; suppressing further ones for the rest of this session so they cannot flood the console. The declarations are still dropped \u2014 only the reporting stops. Fix the reported ones and reload to see any that remain.`):(jt.add(s),`style declaration "${o}" was dropped by the style sanitizer on ${i} \u2014 ${r[t]}. The element renders without it, which usually looks like a missing image rather than an error. Sanctioned alternatives: for a content image use an <img> element (or a <picture>); for decoration, put the rule in a stylesheet and set a class instead \u2014 stylesheet CSS is not sanitized, only inline style attributes are. If this declaration is not yours, it came from untrusted data and the drop just prevented an exfiltration.`)})}function Kn(e){return(e.includes("\\")?ri(e):e).toLowerCase().replace(/\s+/g,"")}function Ft(e){if(!ti.test(e))return-1;let t=Kn(e);for(let n=0;n<Wn.length;n++)if(t.includes(Wn[n]))return n;return-1}function gt(e,t,n){let r=zt(e,t);return r===-1?t:(pt(t,r,{property:e,element:n?.element}),"")}function zt(e,t){let n=Ft(t);if(n!==-1)return n;let r=ie(e);return r==="behavior"?ii:r==="-moz-binding"?oi:(r==="filter"||r==="-ms-filter")&&Kn(t).includes("progid:")?si:-1}function ci(e){let t=[],n="",r=0,o="";for(let s=0;s<e.length;s++){let a=e[s];if(o){n+=a,a==="\\"&&s+1<e.length?n+=e[++s]:a===o&&(o="");continue}if(a==="\\"){n+=a,s+1<e.length&&(n+=e[++s]);continue}if(a==="/"&&e[s+1]==="*"){let c=e.indexOf("*/",s+2);if(c===-1)return null;s=c+1;continue}if(a==='"'||a==="'")o=a;else if(a==="("||a==="[")r++;else if(a===")"||a==="]"){if(--r<0)return null}else{if(a==="{"||a==="}")return null;if(a===";"&&r===0){t.push(n),n="";continue}}n+=a}if(o||r!==0)return null;t.push(n);let i=[];for(let s of t){let a=s.indexOf(":");if(a===-1)continue;let c=s.slice(0,a).trim();if(!/^(--[\w-]+|-?[a-zA-Z_][\w-]*)$/.test(c))continue;let u=s.slice(a+1).trim(),d=/!\s*important\s*$/i.exec(u);if(d&&(u=u.slice(0,d.index).trim()),u==="")continue;let g=c.startsWith("--")?c:ie(c);i.push([g,u,d!==null])}return i}function ui(e,t){let n=String(e),r=ci(n);if(r===null)return Ft(n)!==-1&&pt(n,Ft(n),t),"";let o=[];for(let[i,s,a]of r){let c=zt(i,s);if(c!==-1){pt(s,c,{property:i,element:t?.element});continue}o.push(`${i}: ${s}${a?" !important":""}`)}return o.join("; ")}function bt(e,t){let n=String(e);if(n.trim()==="")return"";if(typeof document>"u")return ui(n,t);let r=document.createElement("div");try{r.style.cssText=n}catch{return""}let o=[];for(let i=0;i<r.style.length;i++){let s=r.style[i],a=r.style.getPropertyValue(s),c=zt(s,a);if(c!==-1){pt(a,c,{property:s,element:t?.element});continue}let u=r.style.getPropertyPriority(s);o.push(`${s}: ${a}${u?` !${u}`:""}`)}return o.join("; ")}var Wt=new Set(["href","xlink:href","src","action","formaction","formtarget","cite","poster","background","srcset","ping","data","manifest"]),li=new Set(["srcdoc"]);function ot(e){return li.has(e.toLowerCase())}function Jn(e){return Wt.has(e.toLowerCase())}function di(e){let t=e.toLowerCase();return t==="style"||Wt.has(t)}function fi(e,t,n){let r=e.toLowerCase();return r==="srcset"?ei(t):Wt.has(r)?mt(t):r==="style"?bt(t,n):t}function Gn(e,t,n){if(!di(e))return t;let r=fi(e,t,n);return r===""?null:r}function Me(e){return e===" "||e===" "||e===`
7
- `||e==="\r"||e==="\f"}function ht(e){let t=0,n=e.length;for(;t<n&&Me(e[t]);)t++;for(;n>t&&Me(e[n-1]);)n--;return e.slice(t,n)}var se=e=>({kind:"forbidden",reason:e});function pi(e){let t=ht(qe(e));if(t==="")return se("empty content");let n=0;for(;n<t.length&&t[n]>="0"&&t[n]<="9";)n++;if(n===0)return se("missing or non-numeric delay");let r=Number.parseInt(t.slice(0,n),10);if(!Number.isFinite(r))return se("unparseable delay");for(;n<t.length&&Me(t[n]);)n++;if(n===t.length)return{kind:"delay-only",delay:r};if(t[n]!==";"&&t[n]!==",")return se("unexpected text after delay");for(n++;n<t.length&&Me(t[n]);)n++;let o=n;for(;n<t.length&&!Me(t[n])&&t[n]!=="=";)n++;let i=t.slice(o,n).toLowerCase();if(i!=="url")return se(`unsupported refresh key ${JSON.stringify(i)}`);for(;n<t.length&&Me(t[n]);)n++;if(t[n]!=="=")return se("missing '=' after url");for(n++;n<t.length&&Me(t[n]);)n++;let s,a=t[n];if(a==='"'||a==="'"){let u=t.indexOf(a,n+1);if(u===-1)return se("unterminated quoted destination");if(s=t.slice(n+1,u),ht(t.slice(u+1))!=="")return se("trailing text after quoted destination")}else if(s=ht(t.slice(n)),/[;,]/.test(s))return se("multiple refresh assignments");if(s==="")return se("empty destination");let c=mt(s);return c===""?se("destination uses a disallowed protocol"):{kind:"allowed",delay:r,destination:s,sanitizedDestination:c}}function qt(e){let t,n,r,o=new Set;for(let[i,s]of e){let a=ie(i);o.has(a)&&(r=a),o.add(a),a==="http-equiv"?t=s:a==="content"&&(n=s)}return r!==void 0?se(`duplicate case-insensitive attribute ${JSON.stringify(r)}`):typeof t!="string"?{kind:"not-refresh"}:ht(qe(t)).toLowerCase()!=="refresh"?{kind:"not-refresh"}:typeof n!="string"?{kind:"not-refresh"}:pi(n)}var mi="http://www.w3.org/1999/xhtml",gi="http://www.w3.org/2000/svg",bi=new Set(["script","iframe","object","embed","frame","frameset"]);function Zn(e){return ie(e)}function Xn(e){return bi.has(Zn(e))}var hi=new Set(["script","style"]);function Qn(e){return hi.has(Zn(e))}var B={None:0,MetaRefreshForbidden:1,MetaRefreshReactive:2,ScriptSource:3,AnimationTarget:4,StylesheetSource:5},yi=new Set(["src","href","xlink:href","type","language"]),vi=new Set(["animate","set","animateMotion","animateTransform","animateColor"]),Ut=new WeakSet;function er(e){return e.namespaceURI===mi||e.namespaceURI===null}function tr(e,t,n){let r=new Map,o=e.attributes;for(let i=0;i<o.length;i++){let s=o[i];s.name!==t&&r.set(s.name,s.value)}return t!==null&&n!==null&&r.set(t,n),r}function Si(e){Ut.has(e)||(Ut.add(e),e.getAttribute("content")!==null&&qt(tr(e,null,null)).kind!=="not-refresh"&&e.removeAttribute("content"))}function xi(e,t,n,r){if(!er(e))return B.None;let o=ie(t);if(o!=="http-equiv"&&o!=="content"||(r==="reactive"&&Si(e),n===null)||o==="content"&&!e.hasAttribute("http-equiv"))return B.None;let i=qt(tr(e,o,n));return i.kind==="forbidden"?B.MetaRefreshForbidden:i.kind!=="not-refresh"&&Ut.has(e)?B.MetaRefreshReactive:B.None}function wi(e,t){if(t===null||ie(e)!=="attributename")return B.None;let n=qe(t);return Jn(n)||Ce(n)||ot(n)?B.AnimationTarget:B.None}var yt=new WeakSet;function Yn(e){if(e===null)return!1;let t=ie(e);if(!t.includes("stylesheet"))return!1;let n=t.split(/[\t\n\f\r ]+/);for(let r=0;r<n.length;r++)if(n[r]==="stylesheet")return!0;return!1}function Ti(e,t,n,r){if(!er(e))return B.None;let o=ie(t);return o==="href"?r==="static"||n===null?B.None:Yn(e.getAttribute("rel"))?B.StylesheetSource:(yt.add(e),B.None):o==="rel"&&Yn(n)&&yt.has(e)&&e.hasAttribute("href")?B.StylesheetSource:B.None}function Kt(e,t,n,r){let o=e.localName;return o==="meta"?xi(e,t,n,r):o==="link"?Ti(e,t,n,r):o==="script"?r==="static"||n===null?B.None:yi.has(ie(t))?B.ScriptSource:B.None:vi.has(o)&&e.namespaceURI===gi?wi(t,n):B.None}function Jt(e,t,n){e.localName!=="link"||ie(t)!=="href"||(n!=="static"&&e.hasAttribute("href")?yt.add(e):yt.delete(e))}var Ei="http://www.w3.org/1999/xhtml",ki="http://www.w3.org/2000/svg",Ci="http://www.w3.org/1999/xlink",_i="http://www.w3.org/XML/1998/namespace",Ai=new Set(["checked","disabled","selected"]);function Ni(e){return e.namespaceURI===null||e.namespaceURI===Ei}function rr(e,t,n){te(()=>`${e}: refusing "${t}" in this element's context \u2014 ${["",'the element would become a <meta http-equiv="refresh"> directive the shared refresh policy forbids (a destination outside the URL allowlist, or a directive too malformed to read unambiguously)',"a <meta> whose http-equiv or content is reactive may never carry a refresh directive: a browser schedules the navigation as soon as the directive is valid, and nothing can withdraw it when the state changes back","a runtime value may not choose the program a <script> runs; name the script in static template source, or load it through Head({ script }) as an explicit trust decision","an SVG animation may not target a URL, event-handler or nested-document attribute; its to / values would be written into that attribute without passing the URL policy",'a runtime-chosen href may not become an applied <link rel="stylesheet">: a well-formed URL is not a trusted stylesheet. Name the stylesheet in static template source, or load a runtime-chosen one through Head({ link }) as an explicit trust decision'][n]}. The write was not performed.`)}function nr(e,t,n){e[t]=n}function Ri(e,t){if(e.namespaceURI!==ki)return null;let n=t.toLowerCase();return n.startsWith("xlink:")?Ci:n.startsWith("xml:")?_i:null}function le(e,t,n,r={}){let o=Li(e,t,n,r);return e.localName==="link"&&Jt(e,t,r.reactive?"reactive":"runtime"),o}function Li(e,t,n,r){let o=Ri(e,t),i=o?t.slice(t.indexOf(":")+1):t;if(Ce(t))return P(`${r.label??"setSafeAttribute"}: refusing to set event-handler attribute "${t}". Its value would be evaluated as JavaScript. Use on:{ ${t.slice(2)}: fn } instead.`),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let s=n==null||n===!1?null:n===!0?"":String(n),a=Kt(e,t,s,r.reactive?"reactive":"runtime");if(a!==B.None)return rr(r.label??"setSafeAttribute",t,a),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;if(n==null)return o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0;if(ot(t))return P(`${r.label??"setSafeAttribute"}: refusing to set "${t}". The browser parses this attribute as a nested HTML document, so a generic string value cannot be made safe \u2014 attribute escaping is undone before the parse. Build the frame's content another way.`),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let c=Ni(e),u=c?t.toLowerCase():t;if(typeof n=="boolean"){if(t.length>5&&t.slice(0,5).toLowerCase()==="aria-"){let m=n?"true":"false";return(o?e.getAttributeNS(o,i):e.getAttribute(t))!==m&&(o?e.setAttributeNS(o,t,m):e.setAttribute(t,m)),!0}return c&&Ai.has(u)&&u in e?nr(e,u,n):n?o?e.setAttributeNS(o,t,""):e.setAttribute(t,""):o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0}let d=String(n);if(r.syncValueProperty!==!1&&c&&(u==="value"||u==="checked")&&u in e)return nr(e,u,u==="checked"?!!n:d),!0;let g=d===""?"":Gn(t,d,{element:e});return g===null?(o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0):((o?e.getAttributeNS(o,i):e.getAttribute(t))===g||(o?e.setAttributeNS(o,t,g):e.setAttribute(t,g)),!0)}function Gt(e,t,n){if(ot(t))return P(`html: refusing static attribute "${t}" \u2014 the browser parses it as a nested document.`),!1;let r=Kt(e,t,n,"static");return r!==B.None?(rr("html (static attribute)",t,r),!1):(e.setAttribute(t,n),e.localName==="link"&&Jt(e,t,"static"),!0)}var Mi=4096,Yt=[];function Oi(){return{sig:null,sub:null,epoch:0,depVersion:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function Pi(e,t,n){let r=Yt.pop();if(r)return r.sig=e,r.sub=t,r.epoch=n,r;let o=Oi();return o.sig=e,o.sub=t,o.epoch=n,o}function or(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,Yt.length<Mi&&Yt.push(e)}function Di(e,t){let n=e.subsHead??null;t.sigPrev=null,t.sigNext=n,n?n.sigPrev=t:e.subsTail=t,e.subsHead=t,e.__sc=(e.__sc??0)+1}function ir(e){let t=e.sig;if(!t)return;let n=e.sigPrev,r=e.sigNext;n?n.sigNext=r:t.subsHead=r,r?r.sigPrev=n:t.subsTail=n,t.__sc=(t.__sc??1)-1,t.__activeNode===e&&(t.__activeNode=e.prevActive),t.__sc===0&&(t.subsHead=null,t.subsTail=null)}function $i(e,t){let n=e.depsTail??null;t.subPrev=n,t.subNext=null,n?n.subNext=t:e.depsHead=t,e.depsTail=t}function Ii(e){let t=e.sub;if(!t)return;let n=e.subPrev,r=e.subNext;n?n.subNext=r:t.depsHead=r,r?r.subPrev=n:t.depsTail=n}var fe=null,Se=null,_e=0,Ae=[],de=new Set,Hi=[];function Bi(e){try{e()}catch(t){let n=e;L(t,{phase:n._errorPhase??"effect",name:n.__name,node:n._errorNode})}}function Vi(e){let t=e.depsHead??null;if(t===null)return!0;for(;t!==null;){let n=t.sig;if(n===null)return!0;if(n._d===!0&&n._validate!==void 0)try{n._validate()}catch{return!0}if(t.depVersion!==n.__v)return!0;t=t.subNext}return!1}var ye=0,xe=!1;function Xt(){ye===0&&(Se=fe,fe=null,xe=!0),ye++}function Qt(){ye--,ye===0&&(fe=Se,Se=null,xe=!1)}function sr(){return xe}function ar(e){Xt();try{return e()}finally{Qt()}}var ae=null;function en(){return ae}function wt(e,t){let n=ae;ae=e;try{return t()}finally{ae=n}}function tn(e){let t=ae;return t===null?e:(...n)=>wt(t,()=>e(...n))}var ji=0;function nn(e,t){let n=fe,r=0,o=null;xe&&(r=ye,o=Se,ye=0,Se=null,xe=!1),fe=t;let i=t;i._cap===void 0&&(i._cap=Hn());let s=ae;s!==null&&!i._epoch&&i._scope===void 0&&(i._scope=s);let a=i._scope===void 0?null:i._scope;a!==s&&(ae=a);let c=++ji;i._epoch=c,i._structDirty=!1;for(let u=i.depsHead??null;u!==null;u=u.subNext){let d=u.sig;u.prevActive=d.__activeNode??null,d.__activeNode=u}try{e()}finally{fe=n,ae=s,r!==0&&(ye=r,Se=o,xe=!0);let u=i.depsHead??null;for(;u!==null;){let d=u.subNext,g=u.sig;g.__activeNode=u.prevActive,u.prevActive=null,u.epoch!==c&&(Ii(u),ir(u),or(u)),u=d}}}function cr(e,t){if(!t)return rn(e);Ue(t);let n=fe,r=0,o=null;xe&&(r=ye,o=Se,ye=0,Se=null,xe=!1),fe=t;let i=t;i._scope===void 0&&(i._scope=ae);let s=ae;ae=i._scope;try{e()}finally{fe=n,ae=s,r!==0&&(ye=r,Se=o,xe=!0);for(let a=i.depsHead??null;a!==null;a=a.subNext){let c=a.sig;c.__activeNode=a.prevActive,a.prevActive=null}}return i._dispose??(i._dispose=()=>Ue(t))}function rn(e,t){let n=()=>{let o=r;if(!(o._disposed||o._reentrant)){o._reentrant=!0;try{nn(e,r)}finally{o._reentrant=!1}}},r=n;r.depsHead=null,r.depsTail=null,r._epoch=0,r._structDirty=!1,r._hasComputedDep=!1,r._runEpoch=0,r._runs=0,r._reentrant=!1,r._disposed=!1,r._errorPhase="binding",r._errorNode=t;try{n()}catch(o){throw r._disposed=!0,r._errorNode=void 0,Ue(r),o}return r._dispose??(r._dispose=()=>{r._disposed=!0,r._errorNode=void 0,Ue(r)})}function ur(e){if(!fe)return;let t=fe,n=e,r=t._epoch??0,o=n.__activeNode??null;if(o!==null&&o.sub===t){o.epoch=r,o.depVersion=n.__v??Number.NaN;return}n._validate!==void 0&&(t._hasComputedDep=!0);let i=Pi(e,t,r);i.depVersion=n.__v??Number.NaN,i.prevActive=o,n.__activeNode=i,$i(t,i),Di(n,i),t._structDirty=!0}function Ue(e){let t=e,n=t.depsHead??null;for(t.depsHead=null,t.depsTail=null;n;){let r=n.subNext;ir(n),or(n),n=r}}var vt=1e3,St=1e6,xt=0,Oe=new Set;function lr(e){let t=vt;return Number.isFinite(e)&&e>0&&(vt=Math.floor(e)),t}function dr(e){let t=St;return Number.isFinite(e)&&e>0&&(St=Math.floor(e)),t}function Fi(e){let t=e;return t._runEpoch!==xt?(t._runEpoch=xt,t._runs=1,!1):(t._runs=(t._runs??0)+1,t._runs>vt)}function zi(e){let t=e.__name??"<unnamed>";L(new Error(`subscriber "${t}" fired more than ${vt} times \u2014 likely a write-reads-self cycle between effects/signals. This subscriber is quarantined for the rest of this update; other pending work still runs.`),{phase:"scheduler",name:t})}function Wi(){L(new Error(`Notification drain exceeded ${St} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`),{phase:"scheduler"})}function fr(){let e=0;for(;e<Ae.length;){if(e>=St){Wi();break}let t=Ae[e++];if(de.delete(t),Oe.size>0&&Oe.has(t)||t._hasComputedDep===!0&&!Vi(t))continue;if(Fi(t)){zi(t),Oe.add(t);continue}let n=Bn(t._cap??null);try{Bi(t)}finally{n&&Vn()}}}function pr(){if(!(_e>0)){_e++,xt++;try{fr()}finally{_e--,_e===0&&(Ae.length=0,de.clear(),Oe.size>0&&Oe.clear())}}}function Zt(e){e();let t=e._sig;if(!t)return;let n=Hi,r=n.length;for(n.push(t);n.length>r;){let i=n.pop().subsHead??null;for(;i;){let s=i.sub;if(s)if(s._c){let a=s._sig;a?(!a._d||a._f===!0)&&(a._d=!0,a._f=!1,n.push(a)):s()}else de.has(s)||(de.add(s),Ae.push(s));i=i.sigNext}}}function mr(e){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&(r._c?Zt(r):de.has(r)||(de.add(r),Ae.push(r))),n=n.sigNext}}function gr(e){let n=e.subsHead;if(n){if(_e>0){let r=n;for(;r;){let o=r.sub;o&&(o._c?Zt(o):de.has(o)||(de.add(o),Ae.push(o))),r=r.sigNext}return}_e++,xt++;try{let r=n;for(;r;){let o=r.sub;o&&(o._c?Zt(o):de.has(o)||(de.add(o),Ae.push(o))),r=r.sigNext}fr()}finally{_e--,_e===0&&(Ae.length=0,de.clear(),Oe.size>0&&Oe.clear())}}}function br(e){return e.__sc??0}function hr(e){let t=e,n=[],r=t.depsHead??null;for(;r;)r.sig&&n.push(r.sig),r=r.subNext;return n}function yr(e,t){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&t(r),n=n.sigNext}}var vr="4.10.0",Sr=Symbol.for("sibujs.reactive.v1");function Ui(){let e=globalThis,t=e[Sr];if(t)return!t.__dupWarned&&(t.__dupWarned=!0,P(`Multiple instances of the reactive runtime detected on this page (active: ${t.version}, duplicate: ${vr}). Reactivity is NOT broken and no bundler configuration is required: every copy routes through the first one via a global registry, so signal writes still reach subscribers registered by any copy. This is only a SIZE issue \u2014 the duplicate copy's bytes are downloaded and parsed for nothing. If you want them back, de-duplicate sibujs in your bundler (Vite: resolve.dedupe: ['sibujs']). Mismatched VERSIONS above are worth fixing regardless, since only the first one loaded is used.`)),t;let n={suspendTracking:Xt,resumeTracking:Qt,isTrackingSuspended:sr,untracked:ar,retrack:nn,track:cr,reactiveBinding:rn,recordDependency:ur,cleanup:Ue,setMaxSubscriberRepeats:lr,setMaxDrainIterations:dr,drainNotificationQueue:pr,queueSignalNotification:mr,notifySubscribers:gr,getSubscriberCount:br,getSubscriberDeps:hr,forEachSubscriber:yr,getOwnerScope:en,runWithOwnerScope:wt,bindOwnerScope:tn,version:vr};return e[Sr]=n,n}var z=Ui(),Pe=z.suspendTracking,De=z.resumeTracking,xr=z.isTrackingSuspended,pe=z.untracked,Ne=z.retrack,ce=z.track,Y=z.reactiveBinding,$e=z.recordDependency,Ie=z.cleanup,Ll=z.setMaxSubscriberRepeats,wr=z.setMaxDrainIterations,Tr=z.drainNotificationQueue,Er=z.queueSignalNotification,Ke=z.notifySubscribers,Ml=z.getSubscriberCount,Ol=z.getSubscriberDeps,Pl=z.forEachSubscriber,Je=z.getOwnerScope??en,Tt=z.runWithOwnerScope??wt,X=z.bindOwnerScope??tn;function it(e,t,n){if(Ce(t))return le(e,t,"",{label:`bindAttribute("${t}")`}),()=>{};function r(){let o;try{o=n()}catch(i){L(i,{phase:"binding",name:`bindAttribute("${t}")`,node:e});return}le(e,t,o,{label:`bindAttribute("${t}")`,reactive:!0})}return Y(r,e)}function kr(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(c){L(c,{phase:"binding",name:"bindDynamic (name getter)",node:e});return}let a;try{a=typeof n=="function"?n():n}catch(c){L(c,{phase:"binding",name:"bindDynamic (value getter)",node:e});return}r!==null&&r!==s&&(e.removeAttribute(r),r=null),le(e,s,a,{label:"bindDynamic",reactive:!0})&&(r=s)}let i=Y(o,e);return()=>{i(),r!==null&&e.removeAttribute(r)}}var on=["data-focus-key","id","name"],Ki=new Set(["text","search","url","tel","password",""]);function Ji(e){let t=e.tagName;if(!(t==="TEXTAREA"||t==="INPUT"&&Ki.has(e.type.toLowerCase())))return{start:null,end:null,direction:null};let r=e;return{start:r.selectionStart,end:r.selectionEnd,direction:r.selectionDirection}}function st(e){if(e.length===0||typeof document>"u")return null;let t=document.activeElement;if(!t||t===document.body)return null;let n=!1;for(let i=0;i<e.length;i++){let s=e[i];if(s===t||s.nodeType===1&&s.contains(t)){n=!0;break}}if(!n)return null;let r=null,o=null;for(let i=0;i<on.length;i++){let s=t.getAttribute(on[i]);if(s){r=on[i],o=s;break}}return{el:t,attr:r,value:o,tag:t.tagName,...Ji(t)}}function Gi(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Yi(e,t){let n=null,r=0;for(let o=0;o<e.length;o++){let i=e[o];if(i.nodeType!==1)continue;let s=i;s.matches(t)&&(r++,n??(n=s));let a=s.querySelectorAll(t);for(let c=0;c<a.length;c++)r++,n??(n=a[c]);if(r>1)return{el:null,count:r}}return r===1?{el:n,count:r}:{el:null,count:r}}function Cr(e,t){if(e.focus(),t.start!==null&&typeof e.setSelectionRange=="function"){let n=e,r=n.value.length,o=Math.min(t.start,r),i=Math.min(t.end??o,r);n.setSelectionRange(o,i,t.direction??"none")}}function Ge(e,t,n){if(!e||typeof document>"u")return;let r=document.activeElement;if(r===e.el||r&&r!==document.body&&r!==document.documentElement)return;if(e.el.isConnected){Cr(e.el,e);return}let o=!1;if(e.attr&&e.value){let{el:i,count:s}=Yi(t,`[${e.attr}=${Gi(e.value)}]`);if(i&&i.tagName===e.tag){Cr(i,e);return}o=s>1}te(()=>{let i=e.attr?` (${e.attr}="${e.value}")`:"",s=o?`several elements in the rebuilt subtree share ${e.attr}="${e.value}", so there is no way to tell which one the user was in \u2014 a shared name (a radio group) identifies a GROUP, not a control. Add a unique id or data-focus-key to each`:"no element in the rebuilt subtree carries the same identity. Give it a stable id, name, or data-focus-key that the rebuild reproduces";return`${n}: a reactive rebuild discarded the focused element <${e.tag.toLowerCase()}>${i} and could not re-establish it, so focus fell back to <body>. An in-progress edit ends here, and an in-progress IME composition is lost outright \u2014 a composition belongs to the DOM node, so it cannot survive the node being destroyed. ${s}, or stop the rebuild from happening: key the subtree with match(() => shapeKey(), { \u2026 }) so it is re-created only when the shape actually changes, and drive the rest with reactive attributes and text children, which mutate nodes in place instead of replacing them.`})}function we(e,t){let n=[];function r(){let o;try{o=t()}catch(d){L(d,{phase:"binding",name:"bindChildNode",node:e});return}let i=st(n);if(o==null||typeof o=="boolean"){for(let d=0;d<n.length;d++){let g=n[d];F(g),g.parentNode&&g.parentNode.removeChild(g)}n.length=0,Ge(i,n,"bindChildNode");return}let s=e.parentNode;if(!s){n.length=0;return}let a;if(Array.isArray(o)){a=[];let d=new Set;for(let g=0;g<o.length;g++){let h=o[g];if(h==null||typeof h=="boolean")continue;let m=h instanceof Node?h:document.createTextNode(String(h));if(d.has(m)){P("bindChildNode: duplicate node reference in array \u2014 only the first occurrence is rendered.");continue}d.add(m),a.push(m)}}else a=[o instanceof Node?o:document.createTextNode(String(o))];let c;if(n.length>0&&a.length>0){let d=new Set(n);c=new Set;for(let g=0;g<a.length;g++)d.has(a[g])&&c.add(a[g])}for(let d=0;d<n.length;d++){let g=n[d];c?.has(g)||(F(g),g.parentNode&&g.parentNode.removeChild(g))}let u=e;for(let d=0;d<a.length;d++){let g=a[d];u.nextSibling!==g&&s.insertBefore(g,u.nextSibling),u=g}n=a,Ge(i,a,"bindChildNode")}return Y(r,e)}var H="http://www.w3.org/2000/svg",Zi=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);var sn=new Set,_r=100,Ar=!1,Nr=new Map;function Rr(e){let t=Nr.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),Nr.set(e,t)),t}function Xi(e,t){if(typeof t=="function"){let r=t,o=[],i=!1,s=Y(()=>{let a=r();if(a===null||typeof a!="object"){o=[],i=!0,e.setAttribute("style",bt(String(a),{element:e}));return}let c=e.style;i&&(e.removeAttribute("style"),i=!1);let u=[];for(let d in a){if(!Object.hasOwn(a,d))continue;let g=a[d];if(g==null)continue;let h=Rr(d);u.push(h),c.setProperty(h,gt(h,String(g),{element:e}))}for(let d=0;d<o.length;d++)u.indexOf(o[d])===-1&&c.removeProperty(o[d]);o=u},e);_(e,s);return}if(typeof t=="string"){e.setAttribute("style",bt(t,{element:e}));return}let n=e;for(let r in t){if(!Object.hasOwn(t,r))continue;let o=t[r],i=Rr(r);if(typeof o=="function"){let s=o,a=Y(()=>{n.style.setProperty(i,gt(i,String(s()),{element:e}))},e);_(e,a)}else n.style.setProperty(i,gt(i,String(o),{element:e}))}}function Qi(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=Y(()=>{let s=t();s==null||s===!1?e.removeAttribute("class"):e.setAttribute("class",s)},e);_(e,i);return}let n=t,r=!1,o="";for(let i in n){if(!Object.hasOwn(n,i))continue;let s=n[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=Y(()=>{let a="";for(let c in n){if(!Object.hasOwn(n,c))continue;let u=n[c];(typeof u=="function"?u():u)&&(a=a?`${a} ${c}`:c)}e.setAttribute("class",a)},e);_(e,s)}else e.setAttribute("class",o)}function an(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),_(e,we(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),_(e,we(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),_(e,we(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)))}}}function p(e,t){let n=Xn(e);return(r,o)=>{if(n)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);let i=t?document.createElementNS(t,e):document.createElement(e);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),an(i,o),i):(te(()=>{let m=r.trim().split(/\s+/);if(m.length<2)return"";let l=0;for(let b=0;b<m.length;b++){let y=m[b];if(!/^-?[A-Za-z_][A-Za-z0-9_:/.-]*$/.test(y))return"";/[-:/0-9]/.test(y)&&l++}if(l<2)return"";let f=`${e}|${r}`;return sn.has(f)?"":sn.size>=_r?Ar?"":(Ar=!0,`tagFactory: ${_r} distinct lone-string class warnings have been reported; suppressing further ones for the rest of this session so they cannot flood the console. Fix the reported ones and reload to see any that remain.`):(sn.add(f),`tagFactory: lone string "${r}" looks like a class list but is being rendered as TEXT. For a class, use ${e}({ class: "${r}" }) \u2014 or ${e}("${r}", children) to set the class AND add children.`)}),i.textContent=r,i);if(typeof r=="number")return i.textContent=String(r),i;if(Array.isArray(r)||r instanceof Node||typeof r=="function")return an(i,r),i;let s=r,a=s.class;a!=null&&Qi(i,a);let c=s.id;typeof c=="function"?_(i,it(i,"id",c)):c!=null&&(typeof c=="string"&&Zi.has(c.toLowerCase())&&P(`tagFactory: element id="${c}" matches a common global and may cause DOM clobbering. Avoid setting ids from untrusted input.`),i.id=c);let u=o!==void 0?o:s.nodes;u!=null&&an(i,u);let d=s.on;if(d)for(let m in d){if(!Object.hasOwn(d,m))continue;let l=d[m];typeof l=="function"?i.addEventListener(m,l):P(`tagFactory: on.${m} handler is not a function (got ${typeof l}). Event listener was not attached.`)}let g=s.style;g!=null&&Xi(i,g);let h=s.ref;h&&(h.current=i);for(let m in s)switch(m){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{if(!Object.hasOwn(s,m))continue;let l=s[m];if(l==null||Ce(m))continue;typeof l=="function"?_(i,it(i,m,l)):le(i,m,l,{syncValueProperty:!1,label:"tagFactory"})}}return typeof s.onElement=="function"&&s.onElement(i),i}}var id=p("html"),es=p("head"),ts=p("body"),ns=p("title"),O=p("div"),W=p("span"),rs=p("section"),os=p("article"),is=p("header"),ss=p("footer"),as=p("nav"),cs=p("main"),us=p("aside"),ls=p("address"),cn=p("p"),ds=p("h1"),fs=p("h2"),un=p("h3"),ps=p("h4"),ms=p("h5"),gs=p("h6"),bs=p("blockquote"),hs=p("dd"),ys=p("dl"),vs=p("dt"),Ss=p("figcaption"),xs=p("figure"),ws=p("hr"),Ts=p("li"),Es=p("ol"),ks=p("ul"),ln=p("pre"),Cs=p("a"),_s=p("abbr"),As=p("b"),Ns=p("bdi"),Rs=p("bdo"),Ls=p("br"),Ms=p("cite"),dn=p("code"),Os=p("data"),Ps=p("dfn"),Ds=p("em"),$s=p("i"),Is=p("kbd"),Hs=p("mark"),Bs=p("q"),Vs=p("rp"),js=p("rt"),Fs=p("ruby"),zs=p("s"),Ws=p("samp"),qs=p("small"),Us=p("strong"),Ks=p("sub"),Js=p("sup"),Gs=p("time"),Ys=p("u"),Zs=p("var"),Xs=p("area"),Qs=p("audio"),ea=p("img"),ta=p("map"),na=p("track"),ra=p("video"),oa=p("embed"),ia=p("iframe"),sa=p("object"),aa=p("param"),ca=p("picture"),ua=p("portal"),la=p("source"),da=p("svg",H),fa=p("math"),pa=p("canvas"),ma=p("noscript"),ga=p("script"),ba=p("del"),ha=p("ins"),ya=p("caption"),va=p("col"),Sa=p("colgroup"),xa=p("table"),wa=p("tbody"),Ta=p("td"),Ea=p("tfoot"),ka=p("th"),Ca=p("thead"),_a=p("tr"),at=p("button"),Aa=p("datalist"),Na=p("fieldset"),Ra=p("form"),La=p("input"),Ma=p("label"),Oa=p("legend"),Pa=p("meter"),Da=p("optgroup"),$a=p("option"),Ia=p("output"),Ha=p("progress"),Ba=p("select"),Va=p("textarea"),ja=p("details"),Fa=p("dialog"),za=p("menu"),Wa=p("summary"),qa=p("slot"),Ua=p("template"),Ka=p("base"),Ja=p("link"),Ga=p("meta"),He=p("style"),Ya=p("circle",H),Za=p("ellipse",H),Xa=p("g",H),Qa=p("line",H),ec=p("path",H),tc=p("polygon",H),nc=p("polyline",H),rc=p("rect",H),oc=p("text",H),ic=p("tspan",H),sc=p("defs",H),ac=p("clipPath",H),cc=p("mask",H),uc=p("pattern",H),lc=p("linearGradient",H),dc=p("radialGradient",H),fc=p("stop",H),pc=p("use",H),mc=p("symbol",H),gc=p("marker",H),bc=p("center"),hc=p("font"),yc=p("marquee"),vc=e=>p(e);var fn="__sibuPendingError";function Lr(e,t){let n=()=>e.parentNode?(L(t,{phase:"render",name:"lazy",node:e}),!0):!1;n()||queueMicrotask(()=>{n()||(e[fn]=t)})}function Et(e){let t=e,n=t[fn];if(n instanceof Error)return delete t[fn],n}function Mr(e){let t=null;return function(){if(t)return t();let r=O({class:"sibu-lazy"}),o=!1;return e().then(X(i=>{if(o)return;t=i.default;let s=t();ne(r,s)})).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));ne(r,O({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),Lr(r,s)}),r.appendChild(W("sibu-lazy-loading","Loading...")),_(r,()=>{o=!0}),r}}function Or({nodes:e,fallback:t}){let n=O({class:"sibu-suspense"}),r=t();n.appendChild(r);let o=!1,i=null,s=null;_(n,()=>{o=!0,i&&(i.disconnect(),i=null),s&&!n.contains(s)&&F(s)});let a=X(()=>{if(!o)try{let c=e();if(s=c,c.classList.contains("sibu-lazy")){if(!c.querySelector(".sibu-lazy-loading")){ne(n,c);return}i=new MutationObserver(()=>{if(o)return;c.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,ne(n,c))}),i.observe(c,{childList:!0,subtree:!0})}else ne(n,c)}catch(c){let u=c instanceof Error?c:new Error(String(c));Lr(n,u)}});return queueMicrotask(a),n}function bn(e,t){return()=>Je()===e?t():Tt(e,t)}function Ct(e,t){try{return e()}catch(n){let r=t.toLowerCase().includes("unmount")?"cleanup":"effect";L(n,{phase:r,name:t});return}}function pn(e,t,n,r,o){let i=Ct(e,t);if(typeof i!="function")return;let s=bn(o,i);r()||!n.isConnected?Ct(s,"onUnmount"):Dr(s,n)}var Ye=new WeakMap,Be=new WeakMap,Te=new Set,Ee=new Set,Ze=null,kt=0,Sc=256;function mn(e){let t=Ye.get(e);if(t){Ye.delete(e),Te.delete(e);for(let n of t)try{n()}catch{}}}function gn(e){Be.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let n=Be.get(e);if(n){Be.delete(e),Ee.delete(e);for(let r of n)try{r()}catch{}}})}function xc(e){if(Te.size===0||e.nodeType!==1)return;let t=e;if(Te.has(t)&&t.isConnected&&mn(t),t.firstElementChild)for(let n of Array.from(Te))n!==t&&n.isConnected&&t.contains(n)&&mn(n)}function wc(e){if(Ee.size===0||e.nodeType!==1)return;let t=e;if(Ee.has(t)&&!t.isConnected&&gn(t),t.firstElementChild)for(let n of Array.from(Ee))n!==t&&!n.isConnected&&t.contains(n)&&gn(n)}function Tc(){if(Te.size>0)for(let e of Array.from(Te))e.isConnected&&mn(e);if(Ee.size>0)for(let e of Array.from(Ee))e.isConnected||gn(e)}function Pr(){Ze||typeof document>"u"||(Ze=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++)xc(t.addedNodes[n]);if(t.removedNodes.length>0)for(let n=0;n<t.removedNodes.length;n++)wc(t.removedNodes[n])}kt+=e.length,kt>=Sc&&(kt=0,Tc()),hn()}),Ze.observe(document.body,{childList:!0,subtree:!0}))}function hn(){Ze&&Te.size===0&&Ee.size===0&&(Ze.disconnect(),Ze=null,kt=0)}function Ec(e,t){let n=Ye.get(e);return n||(n=[],Ye.set(e,n)),n.push(t),Te.add(e),Pr(),()=>{let r=Ye.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Ye.delete(e),Te.delete(e))}hn()}}function kc(e,t){let n=Be.get(e);return n||(n=[],Be.set(e,n)),n.push(t),Ee.add(e),Pr(),()=>{let r=Be.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Be.delete(e),Ee.delete(e))}hn()}}function _t(e,t){if(typeof document>"u")return;let n=Je();if(e=bn(n,e),t){let r=!1,o=()=>r;if(_(t,()=>{r=!0}),t.isConnected){queueMicrotask(()=>{r||pn(e,"onMount",t,o,n)});return}queueMicrotask(()=>{if(r)return;if(t.isConnected){pn(e,"onMount",t,o,n);return}let i=Ec(t,()=>{r||pn(e,"onMount",t,o,n)});_(t,i)})}else queueMicrotask(()=>{Ct(e,"onMount")})}function Cc(e,t){typeof document>"u"||Dr(bn(Je(),e),t)}function Dr(e,t){let n=!1,r=()=>{n||(n=!0,Ct(e,"onUnmount"))};_(t,r);let o=()=>{if(n)return;let i=kc(t,r);_(t,i)};t.isConnected?o():_t(()=>{o()},t)}function _c(e,t){_(t,e)}function ue(e,t,n){try{e.emit(t,n)}catch{}}var yn=Symbol.for("sibujs.ssr.v1");function Ac(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let t=null,n=process.getBuiltinModule;typeof n=="function"?t=n("node:async_hooks"):typeof It=="function"&&(t=It("async_hooks")),t&&(e=new t.AsyncLocalStorage)}}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0,locale:void 0},fallbackDepth:0}}var Re=globalThis[yn]??(globalThis[yn]=Ac()),Ve=Re.als,Q=Re.fallbackStore;Re.fallbackDepth??(Re.fallbackDepth=0);var $r=!1;function Nc(){if($r||Ve||!(typeof process<"u"&&!!process.versions?.node))return;$r=!0;let t=process.versions.node;P(`SSR request isolation is UNAVAILABLE on this runtime (Node ${t}). AsyncLocalStorage could not be loaded, so concurrent requests share one SSR store: request state and the query cache can bleed between them. Node >= 22.3 is required for isolated SSR under ESM; the CommonJS build works on older versions. A fully synchronous render is unaffected.`)}function je(){if(Ve){let e=Ve.getStore();if(e)return e}return Q}function Ir(){return Ve?Ve.getStore()??null:Re.fallbackDepth>0?Q:null}function me(){return je().ssr}function Hr(e){if(!me())return null;let t=je(),n=t.caches??(t.caches=new Map),r=n.get(e);return r||(r=new Map,n.set(e,r)),r}function Br(){je().ssr=!0}function Vr(){je().ssr=!1}function jr(e){let t={ssr:!0,suspenseIdCounter:0,idCounter:0,locale:void 0};if(Ve)return Ve.run(t,e);Nc();let n=Q.ssr,r=Q.suspenseIdCounter,o=Q.idCounter,i=Q.locale;Q.ssr=!0,Q.suspenseIdCounter=0,Q.idCounter=0,Q.locale=void 0,Re.fallbackDepth++;try{return e()}finally{Re.fallbackDepth--,Q.ssr=n,Q.suspenseIdCounter=r,Q.idCounter=o,Q.locale=i}}function Fr(e){let t=je(),n=t.ssr;t.ssr=!0;try{return e()}finally{n||(t.ssr=!1)}}var Ur=globalThis;function Rc(e,t){let n,r=!0;return()=>{let o=e();if(r)r=!1,n=o,pe(()=>t(o,void 0));else{let i=n;n=o,pe(()=>t(o,i))}}}var zr=100;function At(e){let t=e.userCleanups;if(t.length===0)return;e.userCleanups=[];let n=e.subscriber._scope??null;n===Je()?Wr(t):Tt(n,()=>Wr(t))}function Wr(e){for(let t=e.length-1;t>=0;t--)try{e[t]()}catch(n){L(n,{phase:"cleanup"})}}function qr(e){let t=1;do e.rerunPending=!1,e.userCleanups.length>0&&At(e),Ne(e.bodyFn,e.subscriber);while(e.rerunPending&&++t<=zr);e.rerunPending&&(e.rerunPending=!1,L(new Error(`effect re-requested itself ${zr}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),{phase:"effect"}))}function Lc(e){if(e.disposed)return;e.disposed=!0;let t=Ur.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(t)try{t.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&At(e)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",n)}try{Ie(e.subscriber)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",n)}}function ee(e,t){if(j(typeof e=="function","effect: argument must be a function."),me())return()=>{};let n={fn:e,onError:t?.onError,userCleanups:[],running:!1,rerunPending:!1,disposed:!1,onCleanup:null,subscriber:null,bodyFn:null};n.onCleanup=s=>{n.userCleanups.push(s)};let r=n.onError;n.bodyFn=r?()=>{try{n.fn(n.onCleanup)}catch(s){r(s)}}:()=>{n.fn(n.onCleanup)};let o=(()=>{if(!n.disposed){if(n.running){n.rerunPending=!0;return}n.running=!0;try{n.rerunPending=!1,n.userCleanups.length>0&&At(n),Ne(n.bodyFn,o),n.rerunPending&&qr(n)}finally{n.running=!1,n.rerunPending=!1}}});o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._errorPhase="effect",o._runEpoch=0,o._runs=0,n.subscriber=o,n.running=!0;try{Ne(n.bodyFn,n.subscriber),n.rerunPending&&qr(n)}catch(s){throw n.disposed=!0,n.userCleanups.length>0&&At(n),Ie(n.subscriber),s}finally{n.running=!1,n.rerunPending=!1}let i=Ur.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&ue(i,"effect:create",{effectFn:e}),()=>Lc(n)}var ct=0,vn=new Set;function Mc(e){ct++;try{return e()}finally{ct--,ct===0&&Dc()}}function Oc(e){return ct===0?!1:(vn.add(e),!0)}function Pc(){return ct>0}function Dc(){try{for(let e of vn)Er(e)}finally{vn.clear()}Tr()}var Kr=Symbol.for("sibujs.reactive.batch.v1");function $c(){let e=globalThis,t=e[Kr];if(t)return t;let n={batch:Mc,enqueueBatchedSignal:Oc,isBatching:Pc};return e[Kr]=n,n}var Sn=$c(),q=Sn.batch,Fe=Sn.enqueueBatchedSignal,Ic=Sn.isBatching;var xn=globalThis;function A(e,t){let n={value:e,__v:0,__sc:0,subsHead:null,subsTail:null,__activeNode:null,__name:void 0,_d:!1,_validate:void 0},r=t?.name,o=t?.equals;r&&(n.__name=r);function i(){return $e(n),n.value}i.__signal=n,r&&(i.__name=r);let s;if(o?s=a=>{let c=n.value,u=typeof a=="function"?a(c):a;if(!o(c,u)){if(n.value=u,n.__v++,!0){let d=xn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&ue(d,"signal:update",{signal:n,name:r,oldValue:c,newValue:u})}Fe(n)||Ke(n)}}:s=a=>{let c=n.value,u=typeof a=="function"?a(c):a;if(Object.is(u,c))return;n.value=u,n.__v++;let d=xn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&ue(d,"signal:update",{signal:n,name:r,oldValue:c,newValue:u}),Fe(n)||Ke(n)},!0){let a=xn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&ue(a,"signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}function Hc(e){let[t,n]=A(0,e?.name?{name:e.name}:void 0);return{track(){t()},invalidate(){n(r=>r+1)}}}var Bc=`
7
+ `||e==="\r"||e==="\f"}function ht(e){let t=0,n=e.length;for(;t<n&&Me(e[t]);)t++;for(;n>t&&Me(e[n-1]);)n--;return e.slice(t,n)}var se=e=>({kind:"forbidden",reason:e});function pi(e){let t=ht(qe(e));if(t==="")return se("empty content");let n=0;for(;n<t.length&&t[n]>="0"&&t[n]<="9";)n++;if(n===0)return se("missing or non-numeric delay");let r=Number.parseInt(t.slice(0,n),10);if(!Number.isFinite(r))return se("unparseable delay");for(;n<t.length&&Me(t[n]);)n++;if(n===t.length)return{kind:"delay-only",delay:r};if(t[n]!==";"&&t[n]!==",")return se("unexpected text after delay");for(n++;n<t.length&&Me(t[n]);)n++;let o=n;for(;n<t.length&&!Me(t[n])&&t[n]!=="=";)n++;let i=t.slice(o,n).toLowerCase();if(i!=="url")return se(`unsupported refresh key ${JSON.stringify(i)}`);for(;n<t.length&&Me(t[n]);)n++;if(t[n]!=="=")return se("missing '=' after url");for(n++;n<t.length&&Me(t[n]);)n++;let s,a=t[n];if(a==='"'||a==="'"){let u=t.indexOf(a,n+1);if(u===-1)return se("unterminated quoted destination");if(s=t.slice(n+1,u),ht(t.slice(u+1))!=="")return se("trailing text after quoted destination")}else if(s=ht(t.slice(n)),/[;,]/.test(s))return se("multiple refresh assignments");if(s==="")return se("empty destination");let c=mt(s);return c===""?se("destination uses a disallowed protocol"):{kind:"allowed",delay:r,destination:s,sanitizedDestination:c}}function qt(e){let t,n,r,o=new Set;for(let[i,s]of e){let a=ie(i);o.has(a)&&(r=a),o.add(a),a==="http-equiv"?t=s:a==="content"&&(n=s)}return r!==void 0?se(`duplicate case-insensitive attribute ${JSON.stringify(r)}`):typeof t!="string"?{kind:"not-refresh"}:ht(qe(t)).toLowerCase()!=="refresh"?{kind:"not-refresh"}:typeof n!="string"?{kind:"not-refresh"}:pi(n)}var mi="http://www.w3.org/1999/xhtml",gi="http://www.w3.org/2000/svg",bi=new Set(["script","iframe","object","embed","frame","frameset"]);function Zn(e){return ie(e)}function Xn(e){return bi.has(Zn(e))}var hi=new Set(["script","style"]);function Qn(e){return hi.has(Zn(e))}var B={None:0,MetaRefreshForbidden:1,MetaRefreshReactive:2,ScriptSource:3,AnimationTarget:4,StylesheetSource:5},yi=new Set(["src","href","xlink:href","type","language"]),vi=new Set(["animate","set","animateMotion","animateTransform","animateColor"]),Ut=new WeakSet;function er(e){return e.namespaceURI===mi||e.namespaceURI===null}function tr(e,t,n){let r=new Map,o=e.attributes;for(let i=0;i<o.length;i++){let s=o[i];s.name!==t&&r.set(s.name,s.value)}return t!==null&&n!==null&&r.set(t,n),r}function Si(e){Ut.has(e)||(Ut.add(e),e.getAttribute("content")!==null&&qt(tr(e,null,null)).kind!=="not-refresh"&&e.removeAttribute("content"))}function xi(e,t,n,r){if(!er(e))return B.None;let o=ie(t);if(o!=="http-equiv"&&o!=="content"||(r==="reactive"&&Si(e),n===null)||o==="content"&&!e.hasAttribute("http-equiv"))return B.None;let i=qt(tr(e,o,n));return i.kind==="forbidden"?B.MetaRefreshForbidden:i.kind!=="not-refresh"&&Ut.has(e)?B.MetaRefreshReactive:B.None}function wi(e,t){if(t===null||ie(e)!=="attributename")return B.None;let n=qe(t);return Jn(n)||Ce(n)||ot(n)?B.AnimationTarget:B.None}var yt=new WeakSet;function Yn(e){if(e===null)return!1;let t=ie(e);if(!t.includes("stylesheet"))return!1;let n=t.split(/[\t\n\f\r ]+/);for(let r=0;r<n.length;r++)if(n[r]==="stylesheet")return!0;return!1}function Ti(e,t,n,r){if(!er(e))return B.None;let o=ie(t);return o==="href"?r==="static"||n===null?B.None:Yn(e.getAttribute("rel"))?B.StylesheetSource:(yt.add(e),B.None):o==="rel"&&Yn(n)&&yt.has(e)&&e.hasAttribute("href")?B.StylesheetSource:B.None}function Kt(e,t,n,r){let o=e.localName;return o==="meta"?xi(e,t,n,r):o==="link"?Ti(e,t,n,r):o==="script"?r==="static"||n===null?B.None:yi.has(ie(t))?B.ScriptSource:B.None:vi.has(o)&&e.namespaceURI===gi?wi(t,n):B.None}function Jt(e,t,n){e.localName!=="link"||ie(t)!=="href"||(n!=="static"&&e.hasAttribute("href")?yt.add(e):yt.delete(e))}var Ei="http://www.w3.org/1999/xhtml",ki="http://www.w3.org/2000/svg",Ci="http://www.w3.org/1999/xlink",_i="http://www.w3.org/XML/1998/namespace",Ai=new Set(["checked","disabled","selected"]);function Ni(e){return e.namespaceURI===null||e.namespaceURI===Ei}function rr(e,t,n){te(()=>`${e}: refusing "${t}" in this element's context \u2014 ${["",'the element would become a <meta http-equiv="refresh"> directive the shared refresh policy forbids (a destination outside the URL allowlist, or a directive too malformed to read unambiguously)',"a <meta> whose http-equiv or content is reactive may never carry a refresh directive: a browser schedules the navigation as soon as the directive is valid, and nothing can withdraw it when the state changes back","a runtime value may not choose the program a <script> runs; name the script in static template source, or load it through Head({ script }) as an explicit trust decision","an SVG animation may not target a URL, event-handler or nested-document attribute; its to / values would be written into that attribute without passing the URL policy",'a runtime-chosen href may not become an applied <link rel="stylesheet">: a well-formed URL is not a trusted stylesheet. Name the stylesheet in static template source, or load a runtime-chosen one through Head({ link }) as an explicit trust decision'][n]}. The write was not performed.`)}function nr(e,t,n){e[t]=n}function Ri(e,t){if(e.namespaceURI!==ki)return null;let n=t.toLowerCase();return n.startsWith("xlink:")?Ci:n.startsWith("xml:")?_i:null}function le(e,t,n,r={}){let o=Li(e,t,n,r);return e.localName==="link"&&Jt(e,t,r.reactive?"reactive":"runtime"),o}function Li(e,t,n,r){let o=Ri(e,t),i=o?t.slice(t.indexOf(":")+1):t;if(Ce(t))return P(`${r.label??"setSafeAttribute"}: refusing to set event-handler attribute "${t}". Its value would be evaluated as JavaScript. Use on:{ ${t.slice(2)}: fn } instead.`),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let s=n==null||n===!1?null:n===!0?"":String(n),a=Kt(e,t,s,r.reactive?"reactive":"runtime");if(a!==B.None)return rr(r.label??"setSafeAttribute",t,a),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;if(n==null)return o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0;if(ot(t))return P(`${r.label??"setSafeAttribute"}: refusing to set "${t}". The browser parses this attribute as a nested HTML document, so a generic string value cannot be made safe \u2014 attribute escaping is undone before the parse. Build the frame's content another way.`),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let c=Ni(e),u=c?t.toLowerCase():t;if(typeof n=="boolean"){if(t.length>5&&t.slice(0,5).toLowerCase()==="aria-"){let m=n?"true":"false";return(o?e.getAttributeNS(o,i):e.getAttribute(t))!==m&&(o?e.setAttributeNS(o,t,m):e.setAttribute(t,m)),!0}return c&&Ai.has(u)&&u in e?nr(e,u,n):n?o?e.setAttributeNS(o,t,""):e.setAttribute(t,""):o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0}let d=String(n);if(r.syncValueProperty!==!1&&c&&(u==="value"||u==="checked")&&u in e)return nr(e,u,u==="checked"?!!n:d),!0;let g=d===""?"":Gn(t,d,{element:e});return g===null?(o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0):((o?e.getAttributeNS(o,i):e.getAttribute(t))===g||(o?e.setAttributeNS(o,t,g):e.setAttribute(t,g)),!0)}function Gt(e,t,n){if(ot(t))return P(`html: refusing static attribute "${t}" \u2014 the browser parses it as a nested document.`),!1;let r=Kt(e,t,n,"static");return r!==B.None?(rr("html (static attribute)",t,r),!1):(e.setAttribute(t,n),e.localName==="link"&&Jt(e,t,"static"),!0)}var Mi=4096,Yt=[];function Oi(){return{sig:null,sub:null,epoch:0,depVersion:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function Pi(e,t,n){let r=Yt.pop();if(r)return r.sig=e,r.sub=t,r.epoch=n,r;let o=Oi();return o.sig=e,o.sub=t,o.epoch=n,o}function or(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,Yt.length<Mi&&Yt.push(e)}function Di(e,t){let n=e.subsHead??null;t.sigPrev=null,t.sigNext=n,n?n.sigPrev=t:e.subsTail=t,e.subsHead=t,e.__sc=(e.__sc??0)+1}function ir(e){let t=e.sig;if(!t)return;let n=e.sigPrev,r=e.sigNext;n?n.sigNext=r:t.subsHead=r,r?r.sigPrev=n:t.subsTail=n,t.__sc=(t.__sc??1)-1,t.__activeNode===e&&(t.__activeNode=e.prevActive),t.__sc===0&&(t.subsHead=null,t.subsTail=null)}function $i(e,t){let n=e.depsTail??null;t.subPrev=n,t.subNext=null,n?n.subNext=t:e.depsHead=t,e.depsTail=t}function Ii(e){let t=e.sub;if(!t)return;let n=e.subPrev,r=e.subNext;n?n.subNext=r:t.depsHead=r,r?r.subPrev=n:t.depsTail=n}var fe=null,Se=null,_e=0,Ae=[],de=new Set,Hi=[];function Bi(e){try{e()}catch(t){let n=e;L(t,{phase:n._errorPhase??"effect",name:n.__name,node:n._errorNode})}}function Vi(e){let t=e.depsHead??null;if(t===null)return!0;for(;t!==null;){let n=t.sig;if(n===null)return!0;if(n._d===!0&&n._validate!==void 0)try{n._validate()}catch{return!0}if(t.depVersion!==n.__v)return!0;t=t.subNext}return!1}var ye=0,xe=!1;function Xt(){ye===0&&(Se=fe,fe=null,xe=!0),ye++}function Qt(){ye--,ye===0&&(fe=Se,Se=null,xe=!1)}function sr(){return xe}function ar(e){Xt();try{return e()}finally{Qt()}}var ae=null;function en(){return ae}function wt(e,t){let n=ae;ae=e;try{return t()}finally{ae=n}}function tn(e){let t=ae;return t===null?e:(...n)=>wt(t,()=>e(...n))}var ji=0;function nn(e,t){let n=fe,r=0,o=null;xe&&(r=ye,o=Se,ye=0,Se=null,xe=!1),fe=t;let i=t;i._cap===void 0&&(i._cap=Hn());let s=ae;s!==null&&!i._epoch&&i._scope===void 0&&(i._scope=s);let a=i._scope===void 0?null:i._scope;a!==s&&(ae=a);let c=++ji;i._epoch=c,i._structDirty=!1;for(let u=i.depsHead??null;u!==null;u=u.subNext){let d=u.sig;u.prevActive=d.__activeNode??null,d.__activeNode=u}try{e()}finally{fe=n,ae=s,r!==0&&(ye=r,Se=o,xe=!0);let u=i.depsHead??null;for(;u!==null;){let d=u.subNext,g=u.sig;g.__activeNode=u.prevActive,u.prevActive=null,u.epoch!==c&&(Ii(u),ir(u),or(u)),u=d}}}function cr(e,t){if(!t)return rn(e);Ue(t);let n=fe,r=0,o=null;xe&&(r=ye,o=Se,ye=0,Se=null,xe=!1),fe=t;let i=t;i._scope===void 0&&(i._scope=ae);let s=ae;ae=i._scope;try{e()}finally{fe=n,ae=s,r!==0&&(ye=r,Se=o,xe=!0);for(let a=i.depsHead??null;a!==null;a=a.subNext){let c=a.sig;c.__activeNode=a.prevActive,a.prevActive=null}}return i._dispose??(i._dispose=()=>Ue(t))}function rn(e,t){let n=()=>{let o=r;if(!(o._disposed||o._reentrant)){o._reentrant=!0;try{nn(e,r)}finally{o._reentrant=!1}}},r=n;r.depsHead=null,r.depsTail=null,r._epoch=0,r._structDirty=!1,r._hasComputedDep=!1,r._runEpoch=0,r._runs=0,r._reentrant=!1,r._disposed=!1,r._errorPhase="binding",r._errorNode=t;try{n()}catch(o){throw r._disposed=!0,r._errorNode=void 0,Ue(r),o}return r._dispose??(r._dispose=()=>{r._disposed=!0,r._errorNode=void 0,Ue(r)})}function ur(e){if(!fe)return;let t=fe,n=e,r=t._epoch??0,o=n.__activeNode??null;if(o!==null&&o.sub===t){o.epoch=r,o.depVersion=n.__v??Number.NaN;return}n._validate!==void 0&&(t._hasComputedDep=!0);let i=Pi(e,t,r);i.depVersion=n.__v??Number.NaN,i.prevActive=o,n.__activeNode=i,$i(t,i),Di(n,i),t._structDirty=!0}function Ue(e){let t=e,n=t.depsHead??null;for(t.depsHead=null,t.depsTail=null;n;){let r=n.subNext;ir(n),or(n),n=r}}var vt=1e3,St=1e6,xt=0,Oe=new Set;function lr(e){let t=vt;return Number.isFinite(e)&&e>0&&(vt=Math.floor(e)),t}function dr(e){let t=St;return Number.isFinite(e)&&e>0&&(St=Math.floor(e)),t}function Fi(e){let t=e;return t._runEpoch!==xt?(t._runEpoch=xt,t._runs=1,!1):(t._runs=(t._runs??0)+1,t._runs>vt)}function zi(e){let t=e.__name??"<unnamed>";L(new Error(`subscriber "${t}" fired more than ${vt} times \u2014 likely a write-reads-self cycle between effects/signals. This subscriber is quarantined for the rest of this update; other pending work still runs.`),{phase:"scheduler",name:t})}function Wi(){L(new Error(`Notification drain exceeded ${St} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`),{phase:"scheduler"})}function fr(){let e=0;for(;e<Ae.length;){if(e>=St){Wi();break}let t=Ae[e++];if(de.delete(t),Oe.size>0&&Oe.has(t)||t._hasComputedDep===!0&&!Vi(t))continue;if(Fi(t)){zi(t),Oe.add(t);continue}let n=Bn(t._cap??null);try{Bi(t)}finally{n&&Vn()}}}function pr(){if(!(_e>0)){_e++,xt++;try{fr()}finally{_e--,_e===0&&(Ae.length=0,de.clear(),Oe.size>0&&Oe.clear())}}}function Zt(e){e();let t=e._sig;if(!t)return;let n=Hi,r=n.length;for(n.push(t);n.length>r;){let i=n.pop().subsHead??null;for(;i;){let s=i.sub;if(s)if(s._c){let a=s._sig;a?(!a._d||a._f===!0)&&(a._d=!0,a._f=!1,n.push(a)):s()}else de.has(s)||(de.add(s),Ae.push(s));i=i.sigNext}}}function mr(e){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&(r._c?Zt(r):de.has(r)||(de.add(r),Ae.push(r))),n=n.sigNext}}function gr(e){let n=e.subsHead;if(n){if(_e>0){let r=n;for(;r;){let o=r.sub;o&&(o._c?Zt(o):de.has(o)||(de.add(o),Ae.push(o))),r=r.sigNext}return}_e++,xt++;try{let r=n;for(;r;){let o=r.sub;o&&(o._c?Zt(o):de.has(o)||(de.add(o),Ae.push(o))),r=r.sigNext}fr()}finally{_e--,_e===0&&(Ae.length=0,de.clear(),Oe.size>0&&Oe.clear())}}}function br(e){return e.__sc??0}function hr(e){let t=e,n=[],r=t.depsHead??null;for(;r;)r.sig&&n.push(r.sig),r=r.subNext;return n}function yr(e,t){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&t(r),n=n.sigNext}}var vr="4.11.0",Sr=Symbol.for("sibujs.reactive.v1");function Ui(){let e=globalThis,t=e[Sr];if(t)return!t.__dupWarned&&(t.__dupWarned=!0,P(`Multiple instances of the reactive runtime detected on this page (active: ${t.version}, duplicate: ${vr}). Reactivity is NOT broken and no bundler configuration is required: every copy routes through the first one via a global registry, so signal writes still reach subscribers registered by any copy. This is only a SIZE issue \u2014 the duplicate copy's bytes are downloaded and parsed for nothing. If you want them back, de-duplicate sibujs in your bundler (Vite: resolve.dedupe: ['sibujs']). Mismatched VERSIONS above are worth fixing regardless, since only the first one loaded is used.`)),t;let n={suspendTracking:Xt,resumeTracking:Qt,isTrackingSuspended:sr,untracked:ar,retrack:nn,track:cr,reactiveBinding:rn,recordDependency:ur,cleanup:Ue,setMaxSubscriberRepeats:lr,setMaxDrainIterations:dr,drainNotificationQueue:pr,queueSignalNotification:mr,notifySubscribers:gr,getSubscriberCount:br,getSubscriberDeps:hr,forEachSubscriber:yr,getOwnerScope:en,runWithOwnerScope:wt,bindOwnerScope:tn,version:vr};return e[Sr]=n,n}var z=Ui(),Pe=z.suspendTracking,De=z.resumeTracking,xr=z.isTrackingSuspended,pe=z.untracked,Ne=z.retrack,ce=z.track,Y=z.reactiveBinding,$e=z.recordDependency,Ie=z.cleanup,Ll=z.setMaxSubscriberRepeats,wr=z.setMaxDrainIterations,Tr=z.drainNotificationQueue,Er=z.queueSignalNotification,Ke=z.notifySubscribers,Ml=z.getSubscriberCount,Ol=z.getSubscriberDeps,Pl=z.forEachSubscriber,Je=z.getOwnerScope??en,Tt=z.runWithOwnerScope??wt,X=z.bindOwnerScope??tn;function it(e,t,n){if(Ce(t))return le(e,t,"",{label:`bindAttribute("${t}")`}),()=>{};function r(){let o;try{o=n()}catch(i){L(i,{phase:"binding",name:`bindAttribute("${t}")`,node:e});return}le(e,t,o,{label:`bindAttribute("${t}")`,reactive:!0})}return Y(r,e)}function kr(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(c){L(c,{phase:"binding",name:"bindDynamic (name getter)",node:e});return}let a;try{a=typeof n=="function"?n():n}catch(c){L(c,{phase:"binding",name:"bindDynamic (value getter)",node:e});return}r!==null&&r!==s&&(e.removeAttribute(r),r=null),le(e,s,a,{label:"bindDynamic",reactive:!0})&&(r=s)}let i=Y(o,e);return()=>{i(),r!==null&&e.removeAttribute(r)}}var on=["data-focus-key","id","name"],Ki=new Set(["text","search","url","tel","password",""]);function Ji(e){let t=e.tagName;if(!(t==="TEXTAREA"||t==="INPUT"&&Ki.has(e.type.toLowerCase())))return{start:null,end:null,direction:null};let r=e;return{start:r.selectionStart,end:r.selectionEnd,direction:r.selectionDirection}}function st(e){if(e.length===0||typeof document>"u")return null;let t=document.activeElement;if(!t||t===document.body)return null;let n=!1;for(let i=0;i<e.length;i++){let s=e[i];if(s===t||s.nodeType===1&&s.contains(t)){n=!0;break}}if(!n)return null;let r=null,o=null;for(let i=0;i<on.length;i++){let s=t.getAttribute(on[i]);if(s){r=on[i],o=s;break}}return{el:t,attr:r,value:o,tag:t.tagName,...Ji(t)}}function Gi(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Yi(e,t){let n=null,r=0;for(let o=0;o<e.length;o++){let i=e[o];if(i.nodeType!==1)continue;let s=i;s.matches(t)&&(r++,n??(n=s));let a=s.querySelectorAll(t);for(let c=0;c<a.length;c++)r++,n??(n=a[c]);if(r>1)return{el:null,count:r}}return r===1?{el:n,count:r}:{el:null,count:r}}function Cr(e,t){if(e.focus(),t.start!==null&&typeof e.setSelectionRange=="function"){let n=e,r=n.value.length,o=Math.min(t.start,r),i=Math.min(t.end??o,r);n.setSelectionRange(o,i,t.direction??"none")}}function Ge(e,t,n){if(!e||typeof document>"u")return;let r=document.activeElement;if(r===e.el||r&&r!==document.body&&r!==document.documentElement)return;if(e.el.isConnected){Cr(e.el,e);return}let o=!1;if(e.attr&&e.value){let{el:i,count:s}=Yi(t,`[${e.attr}=${Gi(e.value)}]`);if(i&&i.tagName===e.tag){Cr(i,e);return}o=s>1}te(()=>{let i=e.attr?` (${e.attr}="${e.value}")`:"",s=o?`several elements in the rebuilt subtree share ${e.attr}="${e.value}", so there is no way to tell which one the user was in \u2014 a shared name (a radio group) identifies a GROUP, not a control. Add a unique id or data-focus-key to each`:"no element in the rebuilt subtree carries the same identity. Give it a stable id, name, or data-focus-key that the rebuild reproduces";return`${n}: a reactive rebuild discarded the focused element <${e.tag.toLowerCase()}>${i} and could not re-establish it, so focus fell back to <body>. An in-progress edit ends here, and an in-progress IME composition is lost outright \u2014 a composition belongs to the DOM node, so it cannot survive the node being destroyed. ${s}, or stop the rebuild from happening: key the subtree with match(() => shapeKey(), { \u2026 }) so it is re-created only when the shape actually changes, and drive the rest with reactive attributes and text children, which mutate nodes in place instead of replacing them.`})}function we(e,t){let n=[];function r(){let o;try{o=t()}catch(d){L(d,{phase:"binding",name:"bindChildNode",node:e});return}let i=st(n);if(o==null||typeof o=="boolean"){for(let d=0;d<n.length;d++){let g=n[d];F(g),g.parentNode&&g.parentNode.removeChild(g)}n.length=0,Ge(i,n,"bindChildNode");return}let s=e.parentNode;if(!s){n.length=0;return}let a;if(Array.isArray(o)){a=[];let d=new Set;for(let g=0;g<o.length;g++){let h=o[g];if(h==null||typeof h=="boolean")continue;let m=h instanceof Node?h:document.createTextNode(String(h));if(d.has(m)){P("bindChildNode: duplicate node reference in array \u2014 only the first occurrence is rendered.");continue}d.add(m),a.push(m)}}else a=[o instanceof Node?o:document.createTextNode(String(o))];let c;if(n.length>0&&a.length>0){let d=new Set(n);c=new Set;for(let g=0;g<a.length;g++)d.has(a[g])&&c.add(a[g])}for(let d=0;d<n.length;d++){let g=n[d];c?.has(g)||(F(g),g.parentNode&&g.parentNode.removeChild(g))}let u=e;for(let d=0;d<a.length;d++){let g=a[d];u.nextSibling!==g&&s.insertBefore(g,u.nextSibling),u=g}n=a,Ge(i,a,"bindChildNode")}return Y(r,e)}var H="http://www.w3.org/2000/svg",Zi=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);var sn=new Set,_r=100,Ar=!1,Nr=new Map;function Rr(e){let t=Nr.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),Nr.set(e,t)),t}function Xi(e,t){if(typeof t=="function"){let r=t,o=[],i=!1,s=Y(()=>{let a=r();if(a===null||typeof a!="object"){o=[],i=!0,e.setAttribute("style",bt(String(a),{element:e}));return}let c=e.style;i&&(e.removeAttribute("style"),i=!1);let u=[];for(let d in a){if(!Object.hasOwn(a,d))continue;let g=a[d];if(g==null)continue;let h=Rr(d);u.push(h),c.setProperty(h,gt(h,String(g),{element:e}))}for(let d=0;d<o.length;d++)u.indexOf(o[d])===-1&&c.removeProperty(o[d]);o=u},e);_(e,s);return}if(typeof t=="string"){e.setAttribute("style",bt(t,{element:e}));return}let n=e;for(let r in t){if(!Object.hasOwn(t,r))continue;let o=t[r],i=Rr(r);if(typeof o=="function"){let s=o,a=Y(()=>{n.style.setProperty(i,gt(i,String(s()),{element:e}))},e);_(e,a)}else n.style.setProperty(i,gt(i,String(o),{element:e}))}}function Qi(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=Y(()=>{let s=t();s==null||s===!1?e.removeAttribute("class"):e.setAttribute("class",s)},e);_(e,i);return}let n=t,r=!1,o="";for(let i in n){if(!Object.hasOwn(n,i))continue;let s=n[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=Y(()=>{let a="";for(let c in n){if(!Object.hasOwn(n,c))continue;let u=n[c];(typeof u=="function"?u():u)&&(a=a?`${a} ${c}`:c)}e.setAttribute("class",a)},e);_(e,s)}else e.setAttribute("class",o)}function an(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),_(e,we(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),_(e,we(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),_(e,we(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)))}}}function p(e,t){let n=Xn(e);return(r,o)=>{if(n)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);let i=t?document.createElementNS(t,e):document.createElement(e);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),an(i,o),i):(te(()=>{let m=r.trim().split(/\s+/);if(m.length<2)return"";let l=0;for(let b=0;b<m.length;b++){let y=m[b];if(!/^-?[A-Za-z_][A-Za-z0-9_:/.-]*$/.test(y))return"";/[-:/0-9]/.test(y)&&l++}if(l<2)return"";let f=`${e}|${r}`;return sn.has(f)?"":sn.size>=_r?Ar?"":(Ar=!0,`tagFactory: ${_r} distinct lone-string class warnings have been reported; suppressing further ones for the rest of this session so they cannot flood the console. Fix the reported ones and reload to see any that remain.`):(sn.add(f),`tagFactory: lone string "${r}" looks like a class list but is being rendered as TEXT. For a class, use ${e}({ class: "${r}" }) \u2014 or ${e}("${r}", children) to set the class AND add children.`)}),i.textContent=r,i);if(typeof r=="number")return i.textContent=String(r),i;if(Array.isArray(r)||r instanceof Node||typeof r=="function")return an(i,r),i;let s=r,a=s.class;a!=null&&Qi(i,a);let c=s.id;typeof c=="function"?_(i,it(i,"id",c)):c!=null&&(typeof c=="string"&&Zi.has(c.toLowerCase())&&P(`tagFactory: element id="${c}" matches a common global and may cause DOM clobbering. Avoid setting ids from untrusted input.`),i.id=c);let u=o!==void 0?o:s.nodes;u!=null&&an(i,u);let d=s.on;if(d)for(let m in d){if(!Object.hasOwn(d,m))continue;let l=d[m];typeof l=="function"?i.addEventListener(m,l):P(`tagFactory: on.${m} handler is not a function (got ${typeof l}). Event listener was not attached.`)}let g=s.style;g!=null&&Xi(i,g);let h=s.ref;h&&(h.current=i);for(let m in s)switch(m){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{if(!Object.hasOwn(s,m))continue;let l=s[m];if(l==null||Ce(m))continue;typeof l=="function"?_(i,it(i,m,l)):le(i,m,l,{syncValueProperty:!1,label:"tagFactory"})}}return typeof s.onElement=="function"&&s.onElement(i),i}}var id=p("html"),es=p("head"),ts=p("body"),ns=p("title"),O=p("div"),W=p("span"),rs=p("section"),os=p("article"),is=p("header"),ss=p("footer"),as=p("nav"),cs=p("main"),us=p("aside"),ls=p("address"),cn=p("p"),ds=p("h1"),fs=p("h2"),un=p("h3"),ps=p("h4"),ms=p("h5"),gs=p("h6"),bs=p("blockquote"),hs=p("dd"),ys=p("dl"),vs=p("dt"),Ss=p("figcaption"),xs=p("figure"),ws=p("hr"),Ts=p("li"),Es=p("ol"),ks=p("ul"),ln=p("pre"),Cs=p("a"),_s=p("abbr"),As=p("b"),Ns=p("bdi"),Rs=p("bdo"),Ls=p("br"),Ms=p("cite"),dn=p("code"),Os=p("data"),Ps=p("dfn"),Ds=p("em"),$s=p("i"),Is=p("kbd"),Hs=p("mark"),Bs=p("q"),Vs=p("rp"),js=p("rt"),Fs=p("ruby"),zs=p("s"),Ws=p("samp"),qs=p("small"),Us=p("strong"),Ks=p("sub"),Js=p("sup"),Gs=p("time"),Ys=p("u"),Zs=p("var"),Xs=p("area"),Qs=p("audio"),ea=p("img"),ta=p("map"),na=p("track"),ra=p("video"),oa=p("embed"),ia=p("iframe"),sa=p("object"),aa=p("param"),ca=p("picture"),ua=p("portal"),la=p("source"),da=p("svg",H),fa=p("math"),pa=p("canvas"),ma=p("noscript"),ga=p("script"),ba=p("del"),ha=p("ins"),ya=p("caption"),va=p("col"),Sa=p("colgroup"),xa=p("table"),wa=p("tbody"),Ta=p("td"),Ea=p("tfoot"),ka=p("th"),Ca=p("thead"),_a=p("tr"),at=p("button"),Aa=p("datalist"),Na=p("fieldset"),Ra=p("form"),La=p("input"),Ma=p("label"),Oa=p("legend"),Pa=p("meter"),Da=p("optgroup"),$a=p("option"),Ia=p("output"),Ha=p("progress"),Ba=p("select"),Va=p("textarea"),ja=p("details"),Fa=p("dialog"),za=p("menu"),Wa=p("summary"),qa=p("slot"),Ua=p("template"),Ka=p("base"),Ja=p("link"),Ga=p("meta"),He=p("style"),Ya=p("circle",H),Za=p("ellipse",H),Xa=p("g",H),Qa=p("line",H),ec=p("path",H),tc=p("polygon",H),nc=p("polyline",H),rc=p("rect",H),oc=p("text",H),ic=p("tspan",H),sc=p("defs",H),ac=p("clipPath",H),cc=p("mask",H),uc=p("pattern",H),lc=p("linearGradient",H),dc=p("radialGradient",H),fc=p("stop",H),pc=p("use",H),mc=p("symbol",H),gc=p("marker",H),bc=p("center"),hc=p("font"),yc=p("marquee"),vc=e=>p(e);var fn="__sibuPendingError";function Lr(e,t){let n=()=>e.parentNode?(L(t,{phase:"render",name:"lazy",node:e}),!0):!1;n()||queueMicrotask(()=>{n()||(e[fn]=t)})}function Et(e){let t=e,n=t[fn];if(n instanceof Error)return delete t[fn],n}function Mr(e){let t=null;return function(){if(t)return t();let r=O({class:"sibu-lazy"}),o=!1;return e().then(X(i=>{if(o)return;t=i.default;let s=t();ne(r,s)})).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));ne(r,O({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),Lr(r,s)}),r.appendChild(W("sibu-lazy-loading","Loading...")),_(r,()=>{o=!0}),r}}function Or({nodes:e,fallback:t}){let n=O({class:"sibu-suspense"}),r=t();n.appendChild(r);let o=!1,i=null,s=null;_(n,()=>{o=!0,i&&(i.disconnect(),i=null),s&&!n.contains(s)&&F(s)});let a=X(()=>{if(!o)try{let c=e();if(s=c,c.classList.contains("sibu-lazy")){if(!c.querySelector(".sibu-lazy-loading")){ne(n,c);return}i=new MutationObserver(()=>{if(o)return;c.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,ne(n,c))}),i.observe(c,{childList:!0,subtree:!0})}else ne(n,c)}catch(c){let u=c instanceof Error?c:new Error(String(c));Lr(n,u)}});return queueMicrotask(a),n}function bn(e,t){return()=>Je()===e?t():Tt(e,t)}function Ct(e,t){try{return e()}catch(n){let r=t.toLowerCase().includes("unmount")?"cleanup":"effect";L(n,{phase:r,name:t});return}}function pn(e,t,n,r,o){let i=Ct(e,t);if(typeof i!="function")return;let s=bn(o,i);r()||!n.isConnected?Ct(s,"onUnmount"):Dr(s,n)}var Ye=new WeakMap,Be=new WeakMap,Te=new Set,Ee=new Set,Ze=null,kt=0,Sc=256;function mn(e){let t=Ye.get(e);if(t){Ye.delete(e),Te.delete(e);for(let n of t)try{n()}catch{}}}function gn(e){Be.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let n=Be.get(e);if(n){Be.delete(e),Ee.delete(e);for(let r of n)try{r()}catch{}}})}function xc(e){if(Te.size===0||e.nodeType!==1)return;let t=e;if(Te.has(t)&&t.isConnected&&mn(t),t.firstElementChild)for(let n of Array.from(Te))n!==t&&n.isConnected&&t.contains(n)&&mn(n)}function wc(e){if(Ee.size===0||e.nodeType!==1)return;let t=e;if(Ee.has(t)&&!t.isConnected&&gn(t),t.firstElementChild)for(let n of Array.from(Ee))n!==t&&!n.isConnected&&t.contains(n)&&gn(n)}function Tc(){if(Te.size>0)for(let e of Array.from(Te))e.isConnected&&mn(e);if(Ee.size>0)for(let e of Array.from(Ee))e.isConnected||gn(e)}function Pr(){Ze||typeof document>"u"||(Ze=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++)xc(t.addedNodes[n]);if(t.removedNodes.length>0)for(let n=0;n<t.removedNodes.length;n++)wc(t.removedNodes[n])}kt+=e.length,kt>=Sc&&(kt=0,Tc()),hn()}),Ze.observe(document.body,{childList:!0,subtree:!0}))}function hn(){Ze&&Te.size===0&&Ee.size===0&&(Ze.disconnect(),Ze=null,kt=0)}function Ec(e,t){let n=Ye.get(e);return n||(n=[],Ye.set(e,n)),n.push(t),Te.add(e),Pr(),()=>{let r=Ye.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Ye.delete(e),Te.delete(e))}hn()}}function kc(e,t){let n=Be.get(e);return n||(n=[],Be.set(e,n)),n.push(t),Ee.add(e),Pr(),()=>{let r=Be.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Be.delete(e),Ee.delete(e))}hn()}}function _t(e,t){if(typeof document>"u")return;let n=Je();if(e=bn(n,e),t){let r=!1,o=()=>r;if(_(t,()=>{r=!0}),t.isConnected){queueMicrotask(()=>{r||pn(e,"onMount",t,o,n)});return}queueMicrotask(()=>{if(r)return;if(t.isConnected){pn(e,"onMount",t,o,n);return}let i=Ec(t,()=>{r||pn(e,"onMount",t,o,n)});_(t,i)})}else queueMicrotask(()=>{Ct(e,"onMount")})}function Cc(e,t){typeof document>"u"||Dr(bn(Je(),e),t)}function Dr(e,t){let n=!1,r=()=>{n||(n=!0,Ct(e,"onUnmount"))};_(t,r);let o=()=>{if(n)return;let i=kc(t,r);_(t,i)};t.isConnected?o():_t(()=>{o()},t)}function _c(e,t){_(t,e)}function ue(e,t,n){try{e.emit(t,n)}catch{}}var yn=Symbol.for("sibujs.ssr.v1");function Ac(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let t=null,n=process.getBuiltinModule;typeof n=="function"?t=n("node:async_hooks"):typeof It=="function"&&(t=It("async_hooks")),t&&(e=new t.AsyncLocalStorage)}}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0,locale:void 0},fallbackDepth:0}}var Re=globalThis[yn]??(globalThis[yn]=Ac()),Ve=Re.als,Q=Re.fallbackStore;Re.fallbackDepth??(Re.fallbackDepth=0);var $r=!1;function Nc(){if($r||Ve||!(typeof process<"u"&&!!process.versions?.node))return;$r=!0;let t=process.versions.node;P(`SSR request isolation is UNAVAILABLE on this runtime (Node ${t}). AsyncLocalStorage could not be loaded, so concurrent requests share one SSR store: request state and the query cache can bleed between them. Node >= 22.3 is required for isolated SSR under ESM; the CommonJS build works on older versions. A fully synchronous render is unaffected.`)}function je(){if(Ve){let e=Ve.getStore();if(e)return e}return Q}function Ir(){return Ve?Ve.getStore()??null:Re.fallbackDepth>0?Q:null}function me(){return je().ssr}function Hr(e){if(!me())return null;let t=je(),n=t.caches??(t.caches=new Map),r=n.get(e);return r||(r=new Map,n.set(e,r)),r}function Br(){je().ssr=!0}function Vr(){je().ssr=!1}function jr(e){let t={ssr:!0,suspenseIdCounter:0,idCounter:0,locale:void 0};if(Ve)return Ve.run(t,e);Nc();let n=Q.ssr,r=Q.suspenseIdCounter,o=Q.idCounter,i=Q.locale;Q.ssr=!0,Q.suspenseIdCounter=0,Q.idCounter=0,Q.locale=void 0,Re.fallbackDepth++;try{return e()}finally{Re.fallbackDepth--,Q.ssr=n,Q.suspenseIdCounter=r,Q.idCounter=o,Q.locale=i}}function Fr(e){let t=je(),n=t.ssr;t.ssr=!0;try{return e()}finally{n||(t.ssr=!1)}}var Ur=globalThis;function Rc(e,t){let n,r=!0;return()=>{let o=e();if(r)r=!1,n=o,pe(()=>t(o,void 0));else{let i=n;n=o,pe(()=>t(o,i))}}}var zr=100;function At(e){let t=e.userCleanups;if(t.length===0)return;e.userCleanups=[];let n=e.subscriber._scope??null;n===Je()?Wr(t):Tt(n,()=>Wr(t))}function Wr(e){for(let t=e.length-1;t>=0;t--)try{e[t]()}catch(n){L(n,{phase:"cleanup"})}}function qr(e){let t=1;do e.rerunPending=!1,e.userCleanups.length>0&&At(e),Ne(e.bodyFn,e.subscriber);while(e.rerunPending&&++t<=zr);e.rerunPending&&(e.rerunPending=!1,L(new Error(`effect re-requested itself ${zr}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),{phase:"effect"}))}function Lc(e){if(e.disposed)return;e.disposed=!0;let t=Ur.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(t)try{t.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&At(e)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",n)}try{Ie(e.subscriber)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",n)}}function ee(e,t){if(j(typeof e=="function","effect: argument must be a function."),me())return()=>{};let n={fn:e,onError:t?.onError,userCleanups:[],running:!1,rerunPending:!1,disposed:!1,onCleanup:null,subscriber:null,bodyFn:null};n.onCleanup=s=>{n.userCleanups.push(s)};let r=n.onError;n.bodyFn=r?()=>{try{n.fn(n.onCleanup)}catch(s){r(s)}}:()=>{n.fn(n.onCleanup)};let o=(()=>{if(!n.disposed){if(n.running){n.rerunPending=!0;return}n.running=!0;try{n.rerunPending=!1,n.userCleanups.length>0&&At(n),Ne(n.bodyFn,o),n.rerunPending&&qr(n)}finally{n.running=!1,n.rerunPending=!1}}});o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._errorPhase="effect",o._runEpoch=0,o._runs=0,n.subscriber=o,n.running=!0;try{Ne(n.bodyFn,n.subscriber),n.rerunPending&&qr(n)}catch(s){throw n.disposed=!0,n.userCleanups.length>0&&At(n),Ie(n.subscriber),s}finally{n.running=!1,n.rerunPending=!1}let i=Ur.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&ue(i,"effect:create",{effectFn:e}),()=>Lc(n)}var ct=0,vn=new Set;function Mc(e){ct++;try{return e()}finally{ct--,ct===0&&Dc()}}function Oc(e){return ct===0?!1:(vn.add(e),!0)}function Pc(){return ct>0}function Dc(){try{for(let e of vn)Er(e)}finally{vn.clear()}Tr()}var Kr=Symbol.for("sibujs.reactive.batch.v1");function $c(){let e=globalThis,t=e[Kr];if(t)return t;let n={batch:Mc,enqueueBatchedSignal:Oc,isBatching:Pc};return e[Kr]=n,n}var Sn=$c(),q=Sn.batch,Fe=Sn.enqueueBatchedSignal,Ic=Sn.isBatching;var xn=globalThis;function A(e,t){let n={value:e,__v:0,__sc:0,subsHead:null,subsTail:null,__activeNode:null,__name:void 0,_d:!1,_validate:void 0},r=t?.name,o=t?.equals;r&&(n.__name=r);function i(){return $e(n),n.value}i.__signal=n,r&&(i.__name=r);let s;if(o?s=a=>{let c=n.value,u=typeof a=="function"?a(c):a;if(!o(c,u)){if(n.value=u,n.__v++,!0){let d=xn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&ue(d,"signal:update",{signal:n,name:r,oldValue:c,newValue:u})}Fe(n)||Ke(n)}}:s=a=>{let c=n.value,u=typeof a=="function"?a(c):a;if(Object.is(u,c))return;n.value=u,n.__v++;let d=xn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&ue(d,"signal:update",{signal:n,name:r,oldValue:c,newValue:u}),Fe(n)||Ke(n)},!0){let a=xn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&ue(a,"signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}function Hc(e){let[t,n]=A(0,e?.name?{name:e.name}:void 0);return{track(){t()},invalidate(){n(r=>r+1)}}}var Bc=`
8
8
  .sibu-error-display {
9
9
  border: 1px solid var(--sibu-err-border, #e5484d);
10
10
  border-radius: 10px;