sibujs 4.14.0 → 4.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.cjs +1 -1
- package/dist/browser.js +4 -4
- package/dist/build.cjs +1 -1
- package/dist/build.js +12 -12
- package/dist/cdn.dev.global.js +1 -1
- package/dist/cdn.full.dev.global.js +1 -1
- package/dist/cdn.full.global.js +1 -1
- package/dist/cdn.global.js +1 -1
- package/dist/{chunk-HQIAL7F2.js → chunk-3T7TWMSD.js} +1 -1
- package/dist/{chunk-RVR5NPFL.js → chunk-4XCWNGRY.js} +1 -1
- package/dist/{chunk-F67F77IA.js → chunk-55TAOW5M.js} +1 -1
- package/dist/{chunk-SVULV7O4.js → chunk-B2NLNZ3E.js} +4 -4
- package/dist/{chunk-4FJSAUKB.js → chunk-FCWOMATN.js} +1 -1
- package/dist/{chunk-AE32RGWX.js → chunk-FFXZ6ELZ.js} +2 -2
- package/dist/{chunk-GVAMIU6K.js → chunk-KTJC7QPA.js} +2 -2
- package/dist/{chunk-VM2U5LEL.js → chunk-L2IPKGUJ.js} +6 -6
- package/dist/{chunk-MIRKTVH4.js → chunk-LAHX7XFG.js} +1 -1
- package/dist/{chunk-TLS4NVIB.js → chunk-LJ2LR5P4.js} +4 -4
- package/dist/{chunk-2TTRW2TE.js → chunk-LUZXFMKH.js} +4 -4
- package/dist/{chunk-QS6GMWDD.js → chunk-LZKKMDQF.js} +10 -10
- package/dist/{chunk-Y4LUM2XS.js → chunk-NIHGSXOX.js} +3 -3
- package/dist/{chunk-BNXRWZZV.js → chunk-OLMZF4RU.js} +5 -5
- package/dist/{chunk-CCKUNHVU.js → chunk-OPRQW4LI.js} +1 -1
- package/dist/{chunk-UUIKJJIK.js → chunk-RBRITLFL.js} +3 -3
- package/dist/{chunk-BOYKGGVD.js → chunk-TOV4PN3P.js} +2 -2
- package/dist/{chunk-JTFQ7IL4.js → chunk-TS6JDK7Y.js} +5 -5
- package/dist/{chunk-A454RAEK.js → chunk-TZNR6E6D.js} +2 -2
- package/dist/{chunk-4TQDTWWN.js → chunk-VIAVYBNQ.js} +3 -3
- package/dist/{chunk-BKZ5N6NK.js → chunk-WFMMSMA5.js} +3 -3
- package/dist/{chunk-CNPT6NKV.js → chunk-YIXMS546.js} +43 -1
- package/dist/{chunk-7ILEHTVX.js → chunk-YPLQQTWS.js} +1 -1
- package/dist/{chunk-CJ7KS3DF.js → chunk-ZKI4SDZ2.js} +2 -2
- package/dist/{chunk-N7A6FKWW.js → chunk-ZYK4NZZA.js} +2 -2
- package/dist/data.cjs +1 -1
- package/dist/data.js +5 -5
- package/dist/devtools.cjs +1 -1
- package/dist/devtools.js +4 -4
- package/dist/ecosystem.cjs +1 -1
- package/dist/ecosystem.js +7 -7
- package/dist/extras.cjs +46 -4
- package/dist/extras.js +22 -22
- package/dist/index.cjs +1 -1
- package/dist/index.js +12 -12
- package/dist/motion.cjs +1 -1
- package/dist/motion.js +3 -3
- package/dist/patterns.cjs +1 -1
- package/dist/patterns.js +5 -5
- package/dist/performance.cjs +1 -1
- package/dist/performance.js +6 -6
- package/dist/plugins.cjs +46 -4
- package/dist/plugins.js +11 -11
- package/dist/{ssr-NECEU4X4.js → ssr-HHU3DAD2.js} +3 -3
- package/dist/ssr-dom.cjs +43 -1
- package/dist/ssr-dom.d.cts +2 -0
- package/dist/ssr-dom.d.ts +2 -0
- package/dist/ssr-dom.js +1 -1
- package/dist/ssr.cjs +44 -2
- package/dist/ssr.js +11 -11
- package/dist/testing.cjs +44 -2
- package/dist/testing.js +9 -9
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +7 -7
- package/dist/widgets.cjs +1 -1
- package/dist/widgets.js +6 -6
- package/package.json +1 -1
package/dist/cdn.full.global.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
`||o==="\f"){n+=1;continue}if(o==="\r"){n+=e[n+2]===`
|
|
5
5
|
`?2:1;continue}if(cr(o)){let i="",s=n+1;for(;s<e.length&&i.length<6&&cr(e[s]);)i+=e[s],s++;s<e.length&&Pi(e[s])&&(s+=e[s]==="\r"&&e[s+1]===`
|
|
6
6
|
`?2:1);let a=Number.parseInt(i,16),l=a===0||a>1114111||a>=55296&&a<=57343;t+=l?"\uFFFD":String.fromCodePoint(a),n=s-1;continue}t+=o,n+=1}return t}var dr=["url(","expression(","javascript:","vbscript:","-moz-binding","behavior:","@import","image-set(","filter:progid","image(","src("],Hi=4,$i=5,Ii=8;function Bi(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 Xt=new Set,fr=100,pr=!1;function St(e,t,n){}function mr(e){return(e.includes("\\")?Di(e):e).toLowerCase().replace(/\s+/g,"")}function Qt(e){if(!Oi.test(e))return-1;let t=mr(e);for(let n=0;n<dr.length;n++)if(t.includes(dr[n]))return n;return-1}function xt(e,t,n){let r=en(e,t);return r===-1?t:(St(t,r,{property:e,element:n?.element}),"")}function en(e,t){let n=Qt(t);if(n!==-1)return n;let r=se(e);return r==="behavior"?$i:r==="-moz-binding"?Hi:(r==="filter"||r==="-ms-filter")&&mr(t).includes("progid:")?Ii:-1}function ji(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 l=e.indexOf("*/",s+2);if(l===-1)return null;s=l+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 l=s.slice(0,a).trim();if(!/^(--[\w-]+|-?[a-zA-Z_][\w-]*)$/.test(l))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 p=l.startsWith("--")?l:se(l);i.push([p,u,d!==null])}return i}function Vi(e,t){let n=String(e),r=ji(n);if(r===null)return Qt(n)!==-1&&St(n,Qt(n),t),"";let o=[];for(let[i,s,a]of r){let l=en(i,s);if(l!==-1){St(s,l,{property:i,element:t?.element});continue}o.push(`${i}: ${s}${a?" !important":""}`)}return o.join("; ")}function wt(e,t){let n=String(e);if(n.trim()==="")return"";if(typeof document>"u")return Vi(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),l=en(s,a);if(l!==-1){St(a,l,{property:s,element:t?.element});continue}let u=r.style.getPropertyPriority(s);o.push(`${s}: ${a}${u?` !${u}`:""}`)}return o.join("; ")}var tn=new Set(["href","xlink:href","src","action","formaction","formtarget","cite","poster","background","srcset","ping","data","manifest"]),Fi=new Set(["srcdoc"]);function ct(e){return Fi.has(e.toLowerCase())}function gr(e){return tn.has(e.toLowerCase())}function zi(e){let t=e.toLowerCase();return t==="style"||tn.has(t)}function Wi(e,t,n){let r=e.toLowerCase();return r==="srcset"?Mi(t):tn.has(r)?vt(t):r==="style"?wt(t,n):t}function br(e,t,n){if(!zi(e))return t;let r=Wi(e,t,n);return r===""?null:r}function De(e){return e===" "||e===" "||e===`
|
|
7
|
-
`||e==="\r"||e==="\f"}function Tt(e){let t=0,n=e.length;for(;t<n&&De(e[t]);)t++;for(;n>t&&De(e[n-1]);)n--;return e.slice(t,n)}var ae=e=>({kind:"forbidden",reason:e});function qi(e){let t=Tt(Ge(e));if(t==="")return ae("");let n=0;for(;n<t.length&&t[n]>="0"&&t[n]<="9";)n++;if(n===0)return ae("");let r=Number.parseInt(t.slice(0,n),10);if(!Number.isFinite(r))return ae("");for(;n<t.length&&De(t[n]);)n++;if(n===t.length)return{kind:"delay-only",delay:r};if(t[n]!==";"&&t[n]!==",")return ae("");for(n++;n<t.length&&De(t[n]);)n++;let o=n;for(;n<t.length&&!De(t[n])&&t[n]!=="=";)n++;let i=t.slice(o,n).toLowerCase();if(i!=="url")return ae("");for(;n<t.length&&De(t[n]);)n++;if(t[n]!=="=")return ae("");for(n++;n<t.length&&De(t[n]);)n++;let s,a=t[n];if(a==='"'||a==="'"){let u=t.indexOf(a,n+1);if(u===-1)return ae("");if(s=t.slice(n+1,u),Tt(t.slice(u+1))!=="")return ae("")}else if(s=Tt(t.slice(n)),/[;,]/.test(s))return ae("");if(s==="")return ae("");let l=vt(s);return l===""?ae(""):{kind:"allowed",delay:r,destination:s,sanitizedDestination:l}}function nn(e){let t,n,r,o=new Set;for(let[i,s]of e){let a=se(i);o.has(a)&&(r=a),o.add(a),a==="http-equiv"?t=s:a==="content"&&(n=s)}return r!==void 0?ae(""):typeof t!="string"?{kind:"not-refresh"}:Tt(Ge(t)).toLowerCase()!=="refresh"?{kind:"not-refresh"}:typeof n!="string"?{kind:"not-refresh"}:qi(n)}var Ui="http://www.w3.org/1999/xhtml",Ki="http://www.w3.org/2000/svg",Ji=new Set(["script","iframe","object","embed","frame","frameset"]);function yr(e){return se(e)}function Sr(e){return Ji.has(yr(e))}var Gi=new Set(["script","style"]);function vr(e){return Gi.has(yr(e))}var B={None:0,MetaRefreshForbidden:1,MetaRefreshReactive:2,ScriptSource:3,AnimationTarget:4,StylesheetSource:5},Yi=new Set(["src","href","xlink:href","type","language"]),Zi=new Set(["animate","set","animateMotion","animateTransform","animateColor"]),rn=new WeakSet;function xr(e){return e.namespaceURI===Ui||e.namespaceURI===null}function wr(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 Xi(e){rn.has(e)||(rn.add(e),e.getAttribute("content")!==null&&nn(wr(e,null,null)).kind!=="not-refresh"&&e.removeAttribute("content"))}function Qi(e,t,n,r){if(!xr(e))return B.None;let o=se(t);if(o!=="http-equiv"&&o!=="content"||(r==="reactive"&&Xi(e),n===null)||o==="content"&&!e.hasAttribute("http-equiv"))return B.None;let i=nn(wr(e,o,n));return i.kind==="forbidden"?B.MetaRefreshForbidden:i.kind!=="not-refresh"&&rn.has(e)?B.MetaRefreshReactive:B.None}function es(e,t){if(t===null||se(e)!=="attributename")return B.None;let n=Ge(t);return gr(n)||_e(n)||ct(n)?B.AnimationTarget:B.None}var Et=new WeakSet;function hr(e){if(e===null)return!1;let t=se(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 ts(e,t,n,r){if(!xr(e))return B.None;let o=se(t);return o==="href"?r==="static"||n===null?B.None:hr(e.getAttribute("rel"))?B.StylesheetSource:(Et.add(e),B.None):o==="rel"&&hr(n)&&Et.has(e)&&e.hasAttribute("href")?B.StylesheetSource:B.None}function on(e,t,n,r){let o=e.localName;return o==="meta"?Qi(e,t,n,r):o==="link"?ts(e,t,n,r):o==="script"?r==="static"||n===null?B.None:Yi.has(se(t))?B.ScriptSource:B.None:Zi.has(o)&&e.namespaceURI===Ki?es(t,n):B.None}function sn(e,t,n){e.localName!=="link"||se(t)!=="href"||(n!=="static"&&e.hasAttribute("href")?Et.add(e):Et.delete(e))}var ns="http://www.w3.org/1999/xhtml",rs="http://www.w3.org/2000/svg",os="http://www.w3.org/1999/xlink",is="http://www.w3.org/XML/1998/namespace",ss=new Set(["checked","disabled","selected"]);function as(e){return e.namespaceURI===null||e.namespaceURI===ns}function Er(e,t,n){}function Tr(e,t,n){e[t]=n}function ls(e,t){if(e.namespaceURI!==rs)return null;let n=t.toLowerCase();return n.startsWith("xlink:")?os:n.startsWith("xml:")?is:null}function de(e,t,n,r={}){let o=us(e,t,n,r);return e.localName==="link"&&sn(e,t,r.reactive?"reactive":"runtime"),o}function us(e,t,n,r){let o=ls(e,t),i=o?t.slice(t.indexOf(":")+1):t;if(_e(t))return!1,o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let s=n==null||n===!1?null:n===!0?"":String(n),a=on(e,t,s,r.reactive?"reactive":"runtime");if(a!==B.None)return Er(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(ct(t))return!1,o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let l=as(e),u=l?t.toLowerCase():t;if(typeof n=="boolean"){if(t.length>5&&t.slice(0,5).toLowerCase()==="aria-"){let b=n?"true":"false";return(o?e.getAttributeNS(o,i):e.getAttribute(t))!==b&&(o?e.setAttributeNS(o,t,b):e.setAttribute(t,b)),!0}return l&&ss.has(u)&&u in e?Tr(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&&l&&(u==="value"||u==="checked")&&u in e)return Tr(e,u,u==="checked"?!!n:d),!0;let p=d===""?"":br(t,d,{element:e});return p===null?(o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0):((o?e.getAttributeNS(o,i):e.getAttribute(t))===p||(o?e.setAttributeNS(o,t,p):e.setAttribute(t,p)),!0)}function an(e,t,n){if(ct(t))return!1,!1;let r=on(e,t,n,"static");return r!==B.None?(Er("html (static attribute)",t,r),!1):(e.setAttribute(t,n),e.localName==="link"&&sn(e,t,"static"),!0)}var cs=4096,ln=[];function ds(){return{sig:null,sub:null,epoch:0,depVersion:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function fs(e,t,n){let r=ln.pop();if(r)return r.sig=e,r.sub=t,r.epoch=n,r;let o=ds();return o.sig=e,o.sub=t,o.epoch=n,o}function kr(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,ln.length<cs&&ln.push(e)}function ps(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 Cr(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 ms(e,t){let n=e.depsTail??null;t.subPrev=n,t.subNext=null,n?n.subNext=t:e.depsHead=t,e.depsTail=t}function gs(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,ve=null,Ne=0,Re=[],Y=new Set,bs=[];function hs(e){try{e()}catch(t){let n=e;L(t,{phase:n._errorPhase??"effect",name:n.__name,node:n._errorNode})}}function ys(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 he=0,xe=!1;function cn(){he===0&&(ve=fe,fe=null,xe=!0),he++}function dn(){he--,he===0&&(fe=ve,ve=null,xe=!1)}function Ar(){return xe}function _r(e){cn();try{return e()}finally{dn()}}var le=null;function fn(){return le}function _t(e,t){let n=le;le=e;try{return t()}finally{le=n}}function pn(e){let t=le;return t===null?e:(...n)=>_t(t,()=>e(...n))}var Ye=null,Ss=0;function mn(e,t){let n=fe,r=0,o=null;xe&&(r=he,o=ve,he=0,ve=null,xe=!1),fe=t;let i=t;i._cap===void 0&&(i._cap=ir());let s=le;s!==null&&!i._epoch&&i._scope===void 0&&(i._scope=s);let a=i._scope===void 0?null:i._scope;a!==s&&(le=a);let l=Ye;l!==null&&!i._epoch&&!i._c&&i._owner==null&&(i._owner=l),i._tok!=null&&(Ye=i._tok);let u=++Ss;i._epoch=u,i._structDirty=!1;for(let d=i.depsHead??null;d!==null;d=d.subNext){let p=d.sig;d.prevActive=p.__activeNode??null,p.__activeNode=d}try{e()}finally{fe=n,le=s,Ye=l,r!==0&&(he=r,ve=o,xe=!0);let d=i.depsHead??null;for(;d!==null;){let p=d.subNext,g=d.sig;g.__activeNode=d.prevActive,d.prevActive=null,d.epoch!==u&&(gs(d),Cr(d),kr(d)),d=p}}}function Nr(e,t){if(!t)return gn(e);Ze(t);let n=fe,r=0,o=null;xe&&(r=he,o=ve,he=0,ve=null,xe=!1),fe=t;let i=t;i._scope===void 0&&(i._scope=le);let s=le;le=i._scope;try{e()}finally{fe=n,le=s,r!==0&&(he=r,ve=o,xe=!0);for(let a=i.depsHead??null;a!==null;a=a.subNext){let l=a.sig;l.__activeNode=a.prevActive,a.prevActive=null}}return i._dispose??(i._dispose=()=>Ze(t))}function gn(e,t,n){return Lr(e,t,n===!0)._dispose}function Rr(e,t){let n=Lr(e,t,!0);return{stop:n._dispose,run:r=>{let o=Ye;Ye=n._tok??null;try{return r()}finally{Ye=o}}}}function Lr(e,t,n){let r=()=>{let i=o;if(!(i._disposed||i._reentrant)){i._reentrant=!0;try{mn(e,o)}finally{i._reentrant=!1}}},o=r;o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._runEpoch=0,o._runs=0,o._reentrant=!1,o._disposed=!1,o._errorPhase="binding",o._errorNode=t,o._tok=null,o._owner=null,n&&(o._tok={sub:o});try{r()}catch(i){throw o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),Ze(o),i}return o._dispose=()=>{o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),Ze(o)},o}function Mr(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=fs(e,t,r);i.depVersion=n.__v??Number.NaN,i.prevActive=o,n.__activeNode=i,ms(t,i),ps(n,i),t._structDirty=!0}function Ze(e){let t=e;t._owner!=null&&(t._owner=null);let n=t.depsHead??null;for(t.depsHead=null,t.depsTail=null;n;){let r=n.subNext;Cr(n),kr(n),n=r}}var kt=1e3,Ct=1e6,At=0,He=new Set;function Or(e){let t=kt;return Number.isFinite(e)&&e>0&&(kt=Math.floor(e)),t}function Pr(e){let t=Ct;return Number.isFinite(e)&&e>0&&(Ct=Math.floor(e)),t}function vs(e){let t=e;return t._runEpoch!==At?(t._runEpoch=At,t._runs=1,!1):(t._runs=(t._runs??0)+1,t._runs>kt)}function xs(e){let t=e.__name??"<unnamed>";L(new Error(`subscriber "${t}" fired more than ${kt} 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 ws(){L(new Error(`Notification drain exceeded ${Ct} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`),{phase:"scheduler"})}function Dr(){let e=0;for(;e<Re.length;){if(e>=Ct){ws();break}let t=Re[e++];Y.delete(t)&&(t._owner!=null&&Y.size>0&&(Ts(t),Y.has(t))||Hr(t))}}function Ts(e){for(;;){let t=null;for(let n=e._owner??null;n!==null;){let r=n.sub;if(r===null)break;Y.has(r)&&(t=r),n=r._owner??null}if(t===null)return;Y.delete(t),Hr(t)}}function Hr(e){if(He.size>0&&He.has(e)||e._hasComputedDep===!0&&!ys(e))return;if(vs(e)){xs(e),He.add(e);return}let t=sr(e._cap??null);try{hs(e)}finally{t&&ar()}}function $r(){if(!(Ne>0)){Ne++,At++;try{Dr()}finally{Ne--,Ne===0&&(Re.length=0,Y.clear(),He.size>0&&He.clear())}}}function un(e){e();let t=e._sig;if(!t)return;let n=bs,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 Y.has(s)||(Y.add(s),Re.push(s));i=i.sigNext}}}function Ir(e){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&(r._c?un(r):Y.has(r)||(Y.add(r),Re.push(r))),n=n.sigNext}}function Br(e){let n=e.subsHead;if(n){if(Ne>0){let r=n;for(;r;){let o=r.sub;o&&(o._c?un(o):Y.has(o)||(Y.add(o),Re.push(o))),r=r.sigNext}return}Ne++,At++;try{let r=n;for(;r;){let o=r.sub;o&&(o._c?un(o):Y.has(o)||(Y.add(o),Re.push(o))),r=r.sigNext}Dr()}finally{Ne--,Ne===0&&(Re.length=0,Y.clear(),He.size>0&&He.clear())}}}function jr(e){return e.__sc??0}function Vr(e){let t=e,n=[],r=t.depsHead??null;for(;r;)r.sig&&n.push(r.sig),r=r.subNext;return n}function Fr(e,t){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&t(r),n=n.sigNext}}var zr="4.14.0",Wr=Symbol.for("sibujs.reactive.v1");function ks(){let e=globalThis,t=e[Wr];if(t)return!1,t;let n={suspendTracking:cn,resumeTracking:dn,isTrackingSuspended:Ar,untracked:_r,retrack:mn,track:Nr,reactiveBinding:gn,recordDependency:Mr,cleanup:Ze,setMaxSubscriberRepeats:Or,setMaxDrainIterations:Pr,drainNotificationQueue:$r,queueSignalNotification:Ir,notifySubscribers:Br,getSubscriberCount:jr,getSubscriberDeps:Vr,forEachSubscriber:Fr,getOwnerScope:fn,runWithOwnerScope:_t,bindOwnerScope:pn,structuralBinding:Rr,version:zr};return e[Wr]=n,n}var V=ks(),$e=V.suspendTracking,Ie=V.resumeTracking,qr=V.isTrackingSuspended,pe=V.untracked,Le=V.retrack,Xe=V.track,K=V.reactiveBinding,Be=V.recordDependency,je=V.cleanup,dd=V.setMaxSubscriberRepeats,Ur=V.setMaxDrainIterations,Kr=V.drainNotificationQueue,Jr=V.queueSignalNotification,Qe=V.notifySubscribers,fd=V.getSubscriberCount,pd=V.getSubscriberDeps,md=V.forEachSubscriber,et=V.getOwnerScope??fn,Nt=V.runWithOwnerScope??_t,Q=V.bindOwnerScope??pn,Ve=V.structuralBinding??((e,t)=>({stop:V.reactiveBinding(e,t),run:n=>n()}));function dt(e,t,n){if(_e(t))return de(e,t,"",{label:`bindAttribute("${t}")`}),()=>{};function r(){let o;try{o=n()}catch(i){L(i,{phase:"binding",name:`bindAttribute("${t}")`,node:e});return}de(e,t,o,{label:`bindAttribute("${t}")`,reactive:!0})}return K(r,e)}function Gr(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(l){L(l,{phase:"binding",name:"bindDynamic (name getter)",node:e});return}let a;try{a=typeof n=="function"?n():n}catch(l){L(l,{phase:"binding",name:"bindDynamic (value getter)",node:e});return}r!==null&&r!==s&&(e.removeAttribute(r),r=null),de(e,s,a,{label:"bindDynamic",reactive:!0})&&(r=s)}let i=K(o,e);return()=>{i(),r!==null&&e.removeAttribute(r)}}var bn=["data-focus-key","id","name"],Cs=new Set(["text","search","url","tel","password",""]);function As(e){let t=e.tagName;if(!(t==="TEXTAREA"||t==="INPUT"&&Cs.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 ft(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<bn.length;i++){let s=t.getAttribute(bn[i]);if(s){r=bn[i],o=s;break}}return{el:t,attr:r,value:o,tag:t.tagName,...As(t)}}function _s(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Ns(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 l=0;l<a.length;l++)r++,n??(n=a[l]);if(r>1)return{el:null,count:r}}return r===1?{el:n,count:r}:{el:null,count:r}}function Yr(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 tt(e,t,n,r){if(!e||typeof document>"u"||r==="discard")return;let o=document.activeElement;if(o===e.el||o&&o!==document.body&&o!==document.documentElement)return;if(e.el.isConnected){Yr(e.el,e);return}let i=!1;if(e.attr&&e.value){let{el:s,count:a}=Ns(t,`[${e.attr}=${_s(e.value)}]`);if(s&&s.tagName===e.tag){Yr(s,e);return}i=a>1}if(r!==void 0&&typeof r=="object"){let s=typeof r.restoreTo=="function"?r.restoreTo():r.restoreTo;if(s?.isConnected&&(s.focus(),document.activeElement===s))return}}function we(e,t){let n=[],r=ge();function o(){let i;try{i=X(r,t)}catch(p){L(p,{phase:"binding",name:"bindChildNode",node:e});return}let s=ft(n);if(i==null||typeof i=="boolean"){for(let p=0;p<n.length;p++){let g=n[p];I(g),g.parentNode&&g.parentNode.removeChild(g)}n.length=0,tt(s,n,"bindChildNode");return}let a=e.parentNode;if(!a){n.length=0;return}let l;if(Array.isArray(i)){l=[];let p=new Set;for(let g=0;g<i.length;g++){let b=i[g];if(b==null||typeof b=="boolean")continue;let c=b instanceof Node?b:document.createTextNode(String(b));if(p.has(c)){!1;continue}p.add(c),l.push(c)}}else l=[i instanceof Node?i:document.createTextNode(String(i))];let u;if(n.length>0&&l.length>0){let p=new Set(n);u=new Set;for(let g=0;g<l.length;g++)p.has(l[g])&&u.add(l[g])}for(let p=0;p<n.length;p++){let g=n[p];u?.has(g)||(I(g),g.parentNode&&g.parentNode.removeChild(g))}let d=e;for(let p=0;p<l.length;p++){let g=l[p];d.nextSibling!==g&&a.insertBefore(g,d.nextSibling),d=g}n=l,tt(s,l,"bindChildNode")}return K(o,e,!0)}function hn(){throw new Error("[SibuJS] renderToString needs a DOM: register happy-dom or jsdom globals first.")}function re(){typeof document>"u"&&hn()}var H="http://www.w3.org/2000/svg",Rs=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);var yn=new Set,Zr=100,Xr=!1,Qr=new Map;function eo(e){let t=Qr.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),Qr.set(e,t)),t}function Ls(e,t){if(typeof t=="function"){let r=t,o=[],i=!1,s=K(()=>{let a=r();if(a===null||typeof a!="object"){o=[],i=!0,e.setAttribute("style",wt(String(a),{element:e}));return}let l=e.style;i&&(e.removeAttribute("style"),i=!1);let u=[];for(let d in a){if(!Object.hasOwn(a,d))continue;let p=a[d];if(p==null)continue;let g=eo(d);u.push(g),l.setProperty(g,xt(g,String(p),{element:e}))}for(let d=0;d<o.length;d++)u.indexOf(o[d])===-1&&l.removeProperty(o[d]);o=u},e);C(e,s);return}if(typeof t=="string"){e.setAttribute("style",wt(t,{element:e}));return}let n=e;for(let r in t){if(!Object.hasOwn(t,r))continue;let o=t[r],i=eo(r);if(typeof o=="function"){let s=o,a=K(()=>{n.style.setProperty(i,xt(i,String(s()),{element:e}))},e);C(e,a)}else n.style.setProperty(i,xt(i,String(o),{element:e}))}}function Ms(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=K(()=>{let s=t();s==null||s===!1?e.removeAttribute("class"):e.setAttribute("class",s)},e);C(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=K(()=>{let a="";for(let l in n){if(!Object.hasOwn(n,l))continue;let u=n[l];(typeof u=="function"?u():u)&&(a=a?`${a} ${l}`:l)}e.setAttribute("class",a)},e);C(e,s)}else e.setAttribute("class",o)}function Sn(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),C(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),C(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),C(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 m(e,t){let n=Sr(e);return(r,o)=>{if(n)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);typeof document>"u"&&hn();let i=lt(e,t);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),Sn(i,o),i):(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 Sn(i,r),i;let s=r,a=s.class;a!=null&&Ms(i,a);let l=s.id;typeof l=="function"?C(i,dt(i,"id",l)):l!=null&&(!1,i.id=l);let u=o!==void 0?o:s.nodes;u!=null&&Sn(i,u);let d=s.on;if(d)for(let b in d){if(!Object.hasOwn(d,b))continue;let c=d[b];typeof c=="function"?i.addEventListener(b,c):!1}let p=s.style;p!=null&&Ls(i,p);let g=s.ref;g&&(g.current=i);for(let b in s)switch(b){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{if(!Object.hasOwn(s,b))continue;let c=s[b];if(c==null||_e(b))continue;typeof c=="function"?C(i,dt(i,b,c)):de(i,b,c,{syncValueProperty:!1,label:"tagFactory"})}}return typeof s.onElement=="function"&&s.onElement(i),i}}var jd=m("html"),Os=m("head"),Ps=m("body"),Ds=m("title"),P=m("div"),z=m("span"),Hs=m("section"),$s=m("article"),Is=m("header"),Bs=m("footer"),js=m("nav"),Vs=m("main"),Fs=m("aside"),zs=m("address"),vn=m("p"),Ws=m("h1"),qs=m("h2"),xn=m("h3"),Us=m("h4"),Ks=m("h5"),Js=m("h6"),Gs=m("blockquote"),Ys=m("dd"),Zs=m("dl"),Xs=m("dt"),Qs=m("figcaption"),ea=m("figure"),ta=m("hr"),na=m("li"),ra=m("ol"),oa=m("ul"),wn=m("pre"),ia=m("a"),sa=m("abbr"),aa=m("b"),la=m("bdi"),ua=m("bdo"),ca=m("br"),da=m("cite"),Tn=m("code"),fa=m("data"),pa=m("dfn"),ma=m("em"),ga=m("i"),ba=m("kbd"),ha=m("mark"),ya=m("q"),Sa=m("rp"),va=m("rt"),xa=m("ruby"),wa=m("s"),Ta=m("samp"),Ea=m("small"),ka=m("strong"),Ca=m("sub"),Aa=m("sup"),_a=m("time"),Na=m("u"),Ra=m("var"),La=m("area"),Ma=m("audio"),Oa=m("img"),Pa=m("map"),Da=m("track"),Ha=m("video"),$a=m("embed"),Ia=m("iframe"),Ba=m("object"),ja=m("param"),Va=m("picture"),Fa=m("portal"),za=m("source"),Wa=m("svg",H),qa=m("math"),Ua=m("canvas"),Ka=m("noscript"),Ja=m("script"),Ga=m("del"),Ya=m("ins"),Za=m("caption"),Xa=m("col"),Qa=m("colgroup"),el=m("table"),tl=m("tbody"),nl=m("td"),rl=m("tfoot"),ol=m("th"),il=m("thead"),sl=m("tr"),pt=m("button"),al=m("datalist"),ll=m("fieldset"),ul=m("form"),cl=m("input"),dl=m("label"),fl=m("legend"),pl=m("meter"),ml=m("optgroup"),gl=m("option"),bl=m("output"),hl=m("progress"),yl=m("select"),Sl=m("textarea"),vl=m("details"),xl=m("dialog"),wl=m("menu"),Tl=m("summary"),El=m("slot"),kl=m("template"),Cl=m("base"),Al=m("link"),_l=m("meta"),Fe=m("style"),Nl=m("circle",H),Rl=m("ellipse",H),Ll=m("g",H),Ml=m("line",H),Ol=m("path",H),Pl=m("polygon",H),Dl=m("polyline",H),Hl=m("rect",H),$l=m("text",H),Il=m("tspan",H),Bl=m("defs",H),jl=m("clipPath",H),Vl=m("mask",H),Fl=m("pattern",H),zl=m("linearGradient",H),Wl=m("radialGradient",H),ql=m("stop",H),Ul=m("use",H),Kl=m("symbol",H),Jl=m("marker",H),Gl=m("center"),Yl=m("font"),Zl=m("marquee"),Xl=e=>m(e);var to,En=globalThis[to=Symbol.for("sibujs.streamBoundary.v1")]??(globalThis[to]={hook:null,current:null});function no(e){return En.hook?En.hook(e):null}function Rt(){return En.current}var kn=Symbol.for("sibujs.ssr.v1");function Ql(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let n=null,r=process.getBuiltinModule;typeof r=="function"?n=r("node:async_hooks"):typeof Ut=="function"&&(n=Ut("async_hooks")),n&&(e=new n.AsyncLocalStorage)}let t=globalThis.AsyncLocalStorage;!e&&typeof t=="function"&&(e=new t)}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0,locale:void 0},fallbackDepth:0}}var Me=globalThis[kn]??(globalThis[kn]=Ql()),We=Me.als,ze=Me.fallbackStore;Me.fallbackDepth??(Me.fallbackDepth=0);var ro=!1;function eu(){if(ro||We||!(typeof process<"u"&&!!process.versions?.node))return;ro=!0;let t=process.versions.node;`${t}`}function Oe(){if(We){let e=We.getStore();if(e)return e}return ze}function Cn(){return We?We.getStore()??null:Me.fallbackDepth>0?ze:null}function ee(){return Oe().ssr}function oo(e){if(!ee())return null;let t=Oe(),n=t.caches??(t.caches=new Map),r=n.get(e);return r||(r=new Map,n.set(e,r)),r}var tu=Symbol.for("sibujs.prerender.v1");function mt(){return Oe().ssr||globalThis[tu]!==void 0}function io(){return!mt()}function so(){Oe().ssr=!0}function ao(){Oe().ssr=!1}function lo(e){let t={ssr:!0,suspenseIdCounter:0,idCounter:0,locale:void 0,pending:new Set,wake:null};if(We)return We.run(t,e);eu();let n={...ze};Object.assign(ze,t),Me.fallbackDepth++;try{return e()}finally{Me.fallbackDepth--;for(let r of Object.keys(ze))r in n||delete ze[r];Object.assign(ze,n)}}function uo(e,t,n=!0){let r=Cn(),o=r?.pending,i=o||!n?[]:Yt();if(!o&&i.length===0)return e;let s={label:t,since:Date.now(),boundary:Rt()??void 0};o?.add(s);let a=or(i,s),l=()=>{o?.delete(s),r?.wake?.(),a()};try{Promise.resolve(e).then(l,l)}catch{l()}return e}function co(e){let t=Oe(),n=t.ssr;t.ssr=!0;try{return e()}finally{n||(t.ssr=!1)}}var An="__sibuPendingError";function fo(e,t){let n=()=>e.parentNode?(L(t,{phase:"render",name:"lazy",node:e}),!0):!1;n()||queueMicrotask(()=>{n()||(e[An]=t)})}function Lt(e){let t=e,n=t[An];if(n instanceof Error)return delete t[An],n}function po(e){let t=null;return function(){if(t&&!Qn())return t();let r=P({class:"sibu-lazy"}),o=ge(),i=Rt(),s=!1,a=X(null,()=>z("sibu-lazy-loading","Loading..."));if(t){let l=t;return ie(r,X(o,()=>l())),r}return uo(e(),"lazy").then(Q(l=>{if(s)return;t=l.default;let u=t,d=()=>X(o,()=>u()),p=i?i.enter(d):d();ie(r,p)})).catch(l=>{if(s)return;let u=l instanceof Error?l:new Error(String(l));ie(r,P({class:"sibu-lazy-error"},`Failed to load component: ${u.message}`)),fo(r,u)}),ye()&&r.firstChild||r.appendChild(a),C(r,()=>{s=!0}),r}}function mo({nodes:e,fallback:t}){let n=P({class:"sibu-suspense"}),r=ge(),o=no(n),i=p=>{ie(n,p),o?.done()},s=X(null,t);ye()&&n.firstChild?I(s):n.appendChild(s);let a=!1,l=null,u=null;C(n,()=>{a=!0,l&&(l.disconnect(),l=null),u&&!n.contains(u)&&I(u)});let d=Q(()=>{if(!a)try{let p=o?o.enter(()=>X(r,e)):X(r,e);if(u=p,p.classList.contains("sibu-lazy")){if(!p.querySelector(".sibu-lazy-loading")){i(p);return}l=new MutationObserver(()=>{if(a)return;p.querySelector(".sibu-lazy-loading")||(l?.disconnect(),l=null,i(p))}),l.observe(p,{childList:!0,subtree:!0})}else i(p)}catch(p){let g=p instanceof Error?p:new Error(String(p));fo(n,g)}});return queueMicrotask(d),n}function Ln(e,t){return()=>et()===e?t():Nt(e,t)}function Ot(e,t){try{return e()}catch(n){let r=t.toLowerCase().includes("unmount")?"cleanup":"effect";L(n,{phase:r,name:t});return}}function _n(e,t,n,r,o){let i=Ot(e,t);if(typeof i!="function")return;let s=Ln(o,i);r()||!n.isConnected?Ot(s,"onUnmount"):bo(s,n)}var nt=new WeakMap,qe=new WeakMap,Te=new Set,Ee=new Set,rt=null,Mt=0,nu=256;function Nn(e){let t=nt.get(e);if(t){nt.delete(e),Te.delete(e);for(let n of t)try{n()}catch{}}}function Rn(e){qe.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let n=qe.get(e);if(n){qe.delete(e),Ee.delete(e);for(let r of n)try{r()}catch{}}})}function ru(e){if(Te.size===0||e.nodeType!==1)return;let t=e;if(Te.has(t)&&t.isConnected&&Nn(t),t.firstElementChild)for(let n of Array.from(Te))n!==t&&n.isConnected&&t.contains(n)&&Nn(n)}function ou(e){if(Ee.size===0||e.nodeType!==1)return;let t=e;if(Ee.has(t)&&!t.isConnected&&Rn(t),t.firstElementChild)for(let n of Array.from(Ee))n!==t&&!n.isConnected&&t.contains(n)&&Rn(n)}function iu(){if(Te.size>0)for(let e of Array.from(Te))e.isConnected&&Nn(e);if(Ee.size>0)for(let e of Array.from(Ee))e.isConnected||Rn(e)}function go(){rt||typeof document>"u"||(rt=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++)ru(t.addedNodes[n]);if(t.removedNodes.length>0)for(let n=0;n<t.removedNodes.length;n++)ou(t.removedNodes[n])}Mt+=e.length,Mt>=nu&&(Mt=0,iu()),Mn()}),rt.observe(document.body,{childList:!0,subtree:!0}))}function Mn(){rt&&Te.size===0&&Ee.size===0&&(rt.disconnect(),rt=null,Mt=0)}function su(e,t){let n=nt.get(e);return n||(n=[],nt.set(e,n)),n.push(t),Te.add(e),go(),()=>{let r=nt.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(nt.delete(e),Te.delete(e))}Mn()}}function au(e,t){let n=qe.get(e);return n||(n=[],qe.set(e,n)),n.push(t),Ee.add(e),go(),()=>{let r=qe.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(qe.delete(e),Ee.delete(e))}Mn()}}function Pt(e,t){if(typeof document>"u"||ee())return;let n=et();if(e=Ln(n,e),t){let r=!1,o=()=>r;if(C(t,()=>{r=!0}),t.isConnected){queueMicrotask(()=>{r||_n(e,"onMount",t,o,n)});return}queueMicrotask(()=>{if(r)return;if(t.isConnected){_n(e,"onMount",t,o,n);return}let i=su(t,()=>{r||_n(e,"onMount",t,o,n)});C(t,i)})}else queueMicrotask(()=>{Ot(e,"onMount")})}function lu(e,t){typeof document>"u"||ee()||bo(Ln(et(),e),t)}function bo(e,t){let n=!1,r=()=>{n||(n=!0,Ot(e,"onUnmount"))};C(t,r);let o=()=>{if(n)return;let i=au(t,r);C(t,i)};t.isConnected?o():Pt(()=>{o()},t)}function uu(e,t){C(t,e)}function ue(e,t,n){try{e.emit(t,n)}catch{}}var vo=globalThis;function cu(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 ho=100;function Dt(e){let t=e.userCleanups;if(t.length===0)return;e.userCleanups=[];let n=e.subscriber._scope??null;n===et()?yo(t):Nt(n,()=>yo(t))}function yo(e){for(let t=e.length-1;t>=0;t--)try{e[t]()}catch(n){L(n,{phase:"cleanup"})}}function So(e){let t=1;do e.rerunPending=!1,e.userCleanups.length>0&&Dt(e),Le(e.bodyFn,e.subscriber);while(e.rerunPending&&++t<=ho);e.rerunPending&&(e.rerunPending=!1,L(new Error(`effect re-requested itself ${ho}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),{phase:"effect"}))}function du(e){if(e.disposed)return;e.disposed=!0;let t=vo.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(t)try{t.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&Dt(e)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",n)}try{je(e.subscriber)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",n)}}function te(e,t){if(ee()&&!t?.server)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&&Dt(n),Le(n.bodyFn,o),n.rerunPending&&So(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{Le(n.bodyFn,n.subscriber),n.rerunPending&&So(n)}catch(s){throw n.disposed=!0,n.userCleanups.length>0&&Dt(n),je(n.subscriber),s}finally{n.running=!1,n.rerunPending=!1}let i=vo.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&ue(i,"effect:create",{effectFn:e}),()=>du(n)}var gt=0,On=new Set;function fu(e){gt++;try{return e()}finally{gt--,gt===0&&gu()}}function pu(e){return gt===0?!1:(On.add(e),!0)}function mu(){return gt>0}function gu(){try{for(let e of On)Jr(e)}finally{On.clear()}Kr()}var xo=Symbol.for("sibujs.reactive.batch.v1");function bu(){let e=globalThis,t=e[xo];if(t)return t;let n={batch:fu,enqueueBatchedSignal:pu,isBatching:mu};return e[xo]=n,n}var Pn=bu(),W=Pn.batch,Ue=Pn.enqueueBatchedSignal,hu=Pn.isBatching;var Dn=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=void 0,o=t?.equals;r&&(n.__name=r);function i(){return Be(n),n.value}i.__signal=n,r&&(i.__name=r);let s;if(o?s=a=>{let l=n.value,u=typeof a=="function"?a(l):a;if(!o(l,u)){if(n.value=u,n.__v++,!1){let d=Dn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&ue(d,"signal:update",{signal:n,name:r,oldValue:l,newValue:u})}Ue(n)||Qe(n)}}:s=a=>{let l=n.value,u=typeof a=="function"?a(l):a;Object.is(u,l)||(n.value=u,n.__v++,Ue(n)||Qe(n))},!1){let a=Dn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&ue(a,"signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}function yu(e){let[t,n]=A(0,e?.name?{name:e.name}:void 0);return{track(){t()},invalidate(){n(r=>r+1)}}}var Su=`
|
|
7
|
+
`||e==="\r"||e==="\f"}function Tt(e){let t=0,n=e.length;for(;t<n&&De(e[t]);)t++;for(;n>t&&De(e[n-1]);)n--;return e.slice(t,n)}var ae=e=>({kind:"forbidden",reason:e});function qi(e){let t=Tt(Ge(e));if(t==="")return ae("");let n=0;for(;n<t.length&&t[n]>="0"&&t[n]<="9";)n++;if(n===0)return ae("");let r=Number.parseInt(t.slice(0,n),10);if(!Number.isFinite(r))return ae("");for(;n<t.length&&De(t[n]);)n++;if(n===t.length)return{kind:"delay-only",delay:r};if(t[n]!==";"&&t[n]!==",")return ae("");for(n++;n<t.length&&De(t[n]);)n++;let o=n;for(;n<t.length&&!De(t[n])&&t[n]!=="=";)n++;let i=t.slice(o,n).toLowerCase();if(i!=="url")return ae("");for(;n<t.length&&De(t[n]);)n++;if(t[n]!=="=")return ae("");for(n++;n<t.length&&De(t[n]);)n++;let s,a=t[n];if(a==='"'||a==="'"){let u=t.indexOf(a,n+1);if(u===-1)return ae("");if(s=t.slice(n+1,u),Tt(t.slice(u+1))!=="")return ae("")}else if(s=Tt(t.slice(n)),/[;,]/.test(s))return ae("");if(s==="")return ae("");let l=vt(s);return l===""?ae(""):{kind:"allowed",delay:r,destination:s,sanitizedDestination:l}}function nn(e){let t,n,r,o=new Set;for(let[i,s]of e){let a=se(i);o.has(a)&&(r=a),o.add(a),a==="http-equiv"?t=s:a==="content"&&(n=s)}return r!==void 0?ae(""):typeof t!="string"?{kind:"not-refresh"}:Tt(Ge(t)).toLowerCase()!=="refresh"?{kind:"not-refresh"}:typeof n!="string"?{kind:"not-refresh"}:qi(n)}var Ui="http://www.w3.org/1999/xhtml",Ki="http://www.w3.org/2000/svg",Ji=new Set(["script","iframe","object","embed","frame","frameset"]);function yr(e){return se(e)}function Sr(e){return Ji.has(yr(e))}var Gi=new Set(["script","style"]);function vr(e){return Gi.has(yr(e))}var B={None:0,MetaRefreshForbidden:1,MetaRefreshReactive:2,ScriptSource:3,AnimationTarget:4,StylesheetSource:5},Yi=new Set(["src","href","xlink:href","type","language"]),Zi=new Set(["animate","set","animateMotion","animateTransform","animateColor"]),rn=new WeakSet;function xr(e){return e.namespaceURI===Ui||e.namespaceURI===null}function wr(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 Xi(e){rn.has(e)||(rn.add(e),e.getAttribute("content")!==null&&nn(wr(e,null,null)).kind!=="not-refresh"&&e.removeAttribute("content"))}function Qi(e,t,n,r){if(!xr(e))return B.None;let o=se(t);if(o!=="http-equiv"&&o!=="content"||(r==="reactive"&&Xi(e),n===null)||o==="content"&&!e.hasAttribute("http-equiv"))return B.None;let i=nn(wr(e,o,n));return i.kind==="forbidden"?B.MetaRefreshForbidden:i.kind!=="not-refresh"&&rn.has(e)?B.MetaRefreshReactive:B.None}function es(e,t){if(t===null||se(e)!=="attributename")return B.None;let n=Ge(t);return gr(n)||_e(n)||ct(n)?B.AnimationTarget:B.None}var Et=new WeakSet;function hr(e){if(e===null)return!1;let t=se(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 ts(e,t,n,r){if(!xr(e))return B.None;let o=se(t);return o==="href"?r==="static"||n===null?B.None:hr(e.getAttribute("rel"))?B.StylesheetSource:(Et.add(e),B.None):o==="rel"&&hr(n)&&Et.has(e)&&e.hasAttribute("href")?B.StylesheetSource:B.None}function on(e,t,n,r){let o=e.localName;return o==="meta"?Qi(e,t,n,r):o==="link"?ts(e,t,n,r):o==="script"?r==="static"||n===null?B.None:Yi.has(se(t))?B.ScriptSource:B.None:Zi.has(o)&&e.namespaceURI===Ki?es(t,n):B.None}function sn(e,t,n){e.localName!=="link"||se(t)!=="href"||(n!=="static"&&e.hasAttribute("href")?Et.add(e):Et.delete(e))}var ns="http://www.w3.org/1999/xhtml",rs="http://www.w3.org/2000/svg",os="http://www.w3.org/1999/xlink",is="http://www.w3.org/XML/1998/namespace",ss=new Set(["checked","disabled","selected"]);function as(e){return e.namespaceURI===null||e.namespaceURI===ns}function Er(e,t,n){}function Tr(e,t,n){e[t]=n}function ls(e,t){if(e.namespaceURI!==rs)return null;let n=t.toLowerCase();return n.startsWith("xlink:")?os:n.startsWith("xml:")?is:null}function de(e,t,n,r={}){let o=us(e,t,n,r);return e.localName==="link"&&sn(e,t,r.reactive?"reactive":"runtime"),o}function us(e,t,n,r){let o=ls(e,t),i=o?t.slice(t.indexOf(":")+1):t;if(_e(t))return!1,o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let s=n==null||n===!1?null:n===!0?"":String(n),a=on(e,t,s,r.reactive?"reactive":"runtime");if(a!==B.None)return Er(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(ct(t))return!1,o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let l=as(e),u=l?t.toLowerCase():t;if(typeof n=="boolean"){if(t.length>5&&t.slice(0,5).toLowerCase()==="aria-"){let b=n?"true":"false";return(o?e.getAttributeNS(o,i):e.getAttribute(t))!==b&&(o?e.setAttributeNS(o,t,b):e.setAttribute(t,b)),!0}return l&&ss.has(u)&&u in e?Tr(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&&l&&(u==="value"||u==="checked")&&u in e)return Tr(e,u,u==="checked"?!!n:d),!0;let p=d===""?"":br(t,d,{element:e});return p===null?(o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0):((o?e.getAttributeNS(o,i):e.getAttribute(t))===p||(o?e.setAttributeNS(o,t,p):e.setAttribute(t,p)),!0)}function an(e,t,n){if(ct(t))return!1,!1;let r=on(e,t,n,"static");return r!==B.None?(Er("html (static attribute)",t,r),!1):(e.setAttribute(t,n),e.localName==="link"&&sn(e,t,"static"),!0)}var cs=4096,ln=[];function ds(){return{sig:null,sub:null,epoch:0,depVersion:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function fs(e,t,n){let r=ln.pop();if(r)return r.sig=e,r.sub=t,r.epoch=n,r;let o=ds();return o.sig=e,o.sub=t,o.epoch=n,o}function kr(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,ln.length<cs&&ln.push(e)}function ps(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 Cr(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 ms(e,t){let n=e.depsTail??null;t.subPrev=n,t.subNext=null,n?n.subNext=t:e.depsHead=t,e.depsTail=t}function gs(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,ve=null,Ne=0,Re=[],Y=new Set,bs=[];function hs(e){try{e()}catch(t){let n=e;L(t,{phase:n._errorPhase??"effect",name:n.__name,node:n._errorNode})}}function ys(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 he=0,xe=!1;function cn(){he===0&&(ve=fe,fe=null,xe=!0),he++}function dn(){he--,he===0&&(fe=ve,ve=null,xe=!1)}function Ar(){return xe}function _r(e){cn();try{return e()}finally{dn()}}var le=null;function fn(){return le}function _t(e,t){let n=le;le=e;try{return t()}finally{le=n}}function pn(e){let t=le;return t===null?e:(...n)=>_t(t,()=>e(...n))}var Ye=null,Ss=0;function mn(e,t){let n=fe,r=0,o=null;xe&&(r=he,o=ve,he=0,ve=null,xe=!1),fe=t;let i=t;i._cap===void 0&&(i._cap=ir());let s=le;s!==null&&!i._epoch&&i._scope===void 0&&(i._scope=s);let a=i._scope===void 0?null:i._scope;a!==s&&(le=a);let l=Ye;l!==null&&!i._epoch&&!i._c&&i._owner==null&&(i._owner=l),i._tok!=null&&(Ye=i._tok);let u=++Ss;i._epoch=u,i._structDirty=!1;for(let d=i.depsHead??null;d!==null;d=d.subNext){let p=d.sig;d.prevActive=p.__activeNode??null,p.__activeNode=d}try{e()}finally{fe=n,le=s,Ye=l,r!==0&&(he=r,ve=o,xe=!0);let d=i.depsHead??null;for(;d!==null;){let p=d.subNext,g=d.sig;g.__activeNode=d.prevActive,d.prevActive=null,d.epoch!==u&&(gs(d),Cr(d),kr(d)),d=p}}}function Nr(e,t){if(!t)return gn(e);Ze(t);let n=fe,r=0,o=null;xe&&(r=he,o=ve,he=0,ve=null,xe=!1),fe=t;let i=t;i._scope===void 0&&(i._scope=le);let s=le;le=i._scope;try{e()}finally{fe=n,le=s,r!==0&&(he=r,ve=o,xe=!0);for(let a=i.depsHead??null;a!==null;a=a.subNext){let l=a.sig;l.__activeNode=a.prevActive,a.prevActive=null}}return i._dispose??(i._dispose=()=>Ze(t))}function gn(e,t,n){return Lr(e,t,n===!0)._dispose}function Rr(e,t){let n=Lr(e,t,!0);return{stop:n._dispose,run:r=>{let o=Ye;Ye=n._tok??null;try{return r()}finally{Ye=o}}}}function Lr(e,t,n){let r=()=>{let i=o;if(!(i._disposed||i._reentrant)){i._reentrant=!0;try{mn(e,o)}finally{i._reentrant=!1}}},o=r;o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._runEpoch=0,o._runs=0,o._reentrant=!1,o._disposed=!1,o._errorPhase="binding",o._errorNode=t,o._tok=null,o._owner=null,n&&(o._tok={sub:o});try{r()}catch(i){throw o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),Ze(o),i}return o._dispose=()=>{o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),Ze(o)},o}function Mr(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=fs(e,t,r);i.depVersion=n.__v??Number.NaN,i.prevActive=o,n.__activeNode=i,ms(t,i),ps(n,i),t._structDirty=!0}function Ze(e){let t=e;t._owner!=null&&(t._owner=null);let n=t.depsHead??null;for(t.depsHead=null,t.depsTail=null;n;){let r=n.subNext;Cr(n),kr(n),n=r}}var kt=1e3,Ct=1e6,At=0,He=new Set;function Or(e){let t=kt;return Number.isFinite(e)&&e>0&&(kt=Math.floor(e)),t}function Pr(e){let t=Ct;return Number.isFinite(e)&&e>0&&(Ct=Math.floor(e)),t}function vs(e){let t=e;return t._runEpoch!==At?(t._runEpoch=At,t._runs=1,!1):(t._runs=(t._runs??0)+1,t._runs>kt)}function xs(e){let t=e.__name??"<unnamed>";L(new Error(`subscriber "${t}" fired more than ${kt} 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 ws(){L(new Error(`Notification drain exceeded ${Ct} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`),{phase:"scheduler"})}function Dr(){let e=0;for(;e<Re.length;){if(e>=Ct){ws();break}let t=Re[e++];Y.delete(t)&&(t._owner!=null&&Y.size>0&&(Ts(t),Y.has(t))||Hr(t))}}function Ts(e){for(;;){let t=null;for(let n=e._owner??null;n!==null;){let r=n.sub;if(r===null)break;Y.has(r)&&(t=r),n=r._owner??null}if(t===null)return;Y.delete(t),Hr(t)}}function Hr(e){if(He.size>0&&He.has(e)||e._hasComputedDep===!0&&!ys(e))return;if(vs(e)){xs(e),He.add(e);return}let t=sr(e._cap??null);try{hs(e)}finally{t&&ar()}}function $r(){if(!(Ne>0)){Ne++,At++;try{Dr()}finally{Ne--,Ne===0&&(Re.length=0,Y.clear(),He.size>0&&He.clear())}}}function un(e){e();let t=e._sig;if(!t)return;let n=bs,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 Y.has(s)||(Y.add(s),Re.push(s));i=i.sigNext}}}function Ir(e){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&(r._c?un(r):Y.has(r)||(Y.add(r),Re.push(r))),n=n.sigNext}}function Br(e){let n=e.subsHead;if(n){if(Ne>0){let r=n;for(;r;){let o=r.sub;o&&(o._c?un(o):Y.has(o)||(Y.add(o),Re.push(o))),r=r.sigNext}return}Ne++,At++;try{let r=n;for(;r;){let o=r.sub;o&&(o._c?un(o):Y.has(o)||(Y.add(o),Re.push(o))),r=r.sigNext}Dr()}finally{Ne--,Ne===0&&(Re.length=0,Y.clear(),He.size>0&&He.clear())}}}function jr(e){return e.__sc??0}function Vr(e){let t=e,n=[],r=t.depsHead??null;for(;r;)r.sig&&n.push(r.sig),r=r.subNext;return n}function Fr(e,t){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&t(r),n=n.sigNext}}var zr="4.14.1",Wr=Symbol.for("sibujs.reactive.v1");function ks(){let e=globalThis,t=e[Wr];if(t)return!1,t;let n={suspendTracking:cn,resumeTracking:dn,isTrackingSuspended:Ar,untracked:_r,retrack:mn,track:Nr,reactiveBinding:gn,recordDependency:Mr,cleanup:Ze,setMaxSubscriberRepeats:Or,setMaxDrainIterations:Pr,drainNotificationQueue:$r,queueSignalNotification:Ir,notifySubscribers:Br,getSubscriberCount:jr,getSubscriberDeps:Vr,forEachSubscriber:Fr,getOwnerScope:fn,runWithOwnerScope:_t,bindOwnerScope:pn,structuralBinding:Rr,version:zr};return e[Wr]=n,n}var V=ks(),$e=V.suspendTracking,Ie=V.resumeTracking,qr=V.isTrackingSuspended,pe=V.untracked,Le=V.retrack,Xe=V.track,K=V.reactiveBinding,Be=V.recordDependency,je=V.cleanup,dd=V.setMaxSubscriberRepeats,Ur=V.setMaxDrainIterations,Kr=V.drainNotificationQueue,Jr=V.queueSignalNotification,Qe=V.notifySubscribers,fd=V.getSubscriberCount,pd=V.getSubscriberDeps,md=V.forEachSubscriber,et=V.getOwnerScope??fn,Nt=V.runWithOwnerScope??_t,Q=V.bindOwnerScope??pn,Ve=V.structuralBinding??((e,t)=>({stop:V.reactiveBinding(e,t),run:n=>n()}));function dt(e,t,n){if(_e(t))return de(e,t,"",{label:`bindAttribute("${t}")`}),()=>{};function r(){let o;try{o=n()}catch(i){L(i,{phase:"binding",name:`bindAttribute("${t}")`,node:e});return}de(e,t,o,{label:`bindAttribute("${t}")`,reactive:!0})}return K(r,e)}function Gr(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(l){L(l,{phase:"binding",name:"bindDynamic (name getter)",node:e});return}let a;try{a=typeof n=="function"?n():n}catch(l){L(l,{phase:"binding",name:"bindDynamic (value getter)",node:e});return}r!==null&&r!==s&&(e.removeAttribute(r),r=null),de(e,s,a,{label:"bindDynamic",reactive:!0})&&(r=s)}let i=K(o,e);return()=>{i(),r!==null&&e.removeAttribute(r)}}var bn=["data-focus-key","id","name"],Cs=new Set(["text","search","url","tel","password",""]);function As(e){let t=e.tagName;if(!(t==="TEXTAREA"||t==="INPUT"&&Cs.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 ft(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<bn.length;i++){let s=t.getAttribute(bn[i]);if(s){r=bn[i],o=s;break}}return{el:t,attr:r,value:o,tag:t.tagName,...As(t)}}function _s(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Ns(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 l=0;l<a.length;l++)r++,n??(n=a[l]);if(r>1)return{el:null,count:r}}return r===1?{el:n,count:r}:{el:null,count:r}}function Yr(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 tt(e,t,n,r){if(!e||typeof document>"u"||r==="discard")return;let o=document.activeElement;if(o===e.el||o&&o!==document.body&&o!==document.documentElement)return;if(e.el.isConnected){Yr(e.el,e);return}let i=!1;if(e.attr&&e.value){let{el:s,count:a}=Ns(t,`[${e.attr}=${_s(e.value)}]`);if(s&&s.tagName===e.tag){Yr(s,e);return}i=a>1}if(r!==void 0&&typeof r=="object"){let s=typeof r.restoreTo=="function"?r.restoreTo():r.restoreTo;if(s?.isConnected&&(s.focus(),document.activeElement===s))return}}function we(e,t){let n=[],r=ge();function o(){let i;try{i=X(r,t)}catch(p){L(p,{phase:"binding",name:"bindChildNode",node:e});return}let s=ft(n);if(i==null||typeof i=="boolean"){for(let p=0;p<n.length;p++){let g=n[p];I(g),g.parentNode&&g.parentNode.removeChild(g)}n.length=0,tt(s,n,"bindChildNode");return}let a=e.parentNode;if(!a){n.length=0;return}let l;if(Array.isArray(i)){l=[];let p=new Set;for(let g=0;g<i.length;g++){let b=i[g];if(b==null||typeof b=="boolean")continue;let c=b instanceof Node?b:document.createTextNode(String(b));if(p.has(c)){!1;continue}p.add(c),l.push(c)}}else l=[i instanceof Node?i:document.createTextNode(String(i))];let u;if(n.length>0&&l.length>0){let p=new Set(n);u=new Set;for(let g=0;g<l.length;g++)p.has(l[g])&&u.add(l[g])}for(let p=0;p<n.length;p++){let g=n[p];u?.has(g)||(I(g),g.parentNode&&g.parentNode.removeChild(g))}let d=e;for(let p=0;p<l.length;p++){let g=l[p];d.nextSibling!==g&&a.insertBefore(g,d.nextSibling),d=g}n=l,tt(s,l,"bindChildNode")}return K(o,e,!0)}function hn(){throw new Error("[SibuJS] renderToString needs a DOM: register happy-dom or jsdom globals first.")}function re(){typeof document>"u"&&hn()}var H="http://www.w3.org/2000/svg",Rs=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);var yn=new Set,Zr=100,Xr=!1,Qr=new Map;function eo(e){let t=Qr.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),Qr.set(e,t)),t}function Ls(e,t){if(typeof t=="function"){let r=t,o=[],i=!1,s=K(()=>{let a=r();if(a===null||typeof a!="object"){o=[],i=!0,e.setAttribute("style",wt(String(a),{element:e}));return}let l=e.style;i&&(e.removeAttribute("style"),i=!1);let u=[];for(let d in a){if(!Object.hasOwn(a,d))continue;let p=a[d];if(p==null)continue;let g=eo(d);u.push(g),l.setProperty(g,xt(g,String(p),{element:e}))}for(let d=0;d<o.length;d++)u.indexOf(o[d])===-1&&l.removeProperty(o[d]);o=u},e);C(e,s);return}if(typeof t=="string"){e.setAttribute("style",wt(t,{element:e}));return}let n=e;for(let r in t){if(!Object.hasOwn(t,r))continue;let o=t[r],i=eo(r);if(typeof o=="function"){let s=o,a=K(()=>{n.style.setProperty(i,xt(i,String(s()),{element:e}))},e);C(e,a)}else n.style.setProperty(i,xt(i,String(o),{element:e}))}}function Ms(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=K(()=>{let s=t();s==null||s===!1?e.removeAttribute("class"):e.setAttribute("class",s)},e);C(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=K(()=>{let a="";for(let l in n){if(!Object.hasOwn(n,l))continue;let u=n[l];(typeof u=="function"?u():u)&&(a=a?`${a} ${l}`:l)}e.setAttribute("class",a)},e);C(e,s)}else e.setAttribute("class",o)}function Sn(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),C(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),C(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),C(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 m(e,t){let n=Sr(e);return(r,o)=>{if(n)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);typeof document>"u"&&hn();let i=lt(e,t);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),Sn(i,o),i):(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 Sn(i,r),i;let s=r,a=s.class;a!=null&&Ms(i,a);let l=s.id;typeof l=="function"?C(i,dt(i,"id",l)):l!=null&&(!1,i.id=l);let u=o!==void 0?o:s.nodes;u!=null&&Sn(i,u);let d=s.on;if(d)for(let b in d){if(!Object.hasOwn(d,b))continue;let c=d[b];typeof c=="function"?i.addEventListener(b,c):!1}let p=s.style;p!=null&&Ls(i,p);let g=s.ref;g&&(g.current=i);for(let b in s)switch(b){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{if(!Object.hasOwn(s,b))continue;let c=s[b];if(c==null||_e(b))continue;typeof c=="function"?C(i,dt(i,b,c)):de(i,b,c,{syncValueProperty:!1,label:"tagFactory"})}}return typeof s.onElement=="function"&&s.onElement(i),i}}var jd=m("html"),Os=m("head"),Ps=m("body"),Ds=m("title"),P=m("div"),z=m("span"),Hs=m("section"),$s=m("article"),Is=m("header"),Bs=m("footer"),js=m("nav"),Vs=m("main"),Fs=m("aside"),zs=m("address"),vn=m("p"),Ws=m("h1"),qs=m("h2"),xn=m("h3"),Us=m("h4"),Ks=m("h5"),Js=m("h6"),Gs=m("blockquote"),Ys=m("dd"),Zs=m("dl"),Xs=m("dt"),Qs=m("figcaption"),ea=m("figure"),ta=m("hr"),na=m("li"),ra=m("ol"),oa=m("ul"),wn=m("pre"),ia=m("a"),sa=m("abbr"),aa=m("b"),la=m("bdi"),ua=m("bdo"),ca=m("br"),da=m("cite"),Tn=m("code"),fa=m("data"),pa=m("dfn"),ma=m("em"),ga=m("i"),ba=m("kbd"),ha=m("mark"),ya=m("q"),Sa=m("rp"),va=m("rt"),xa=m("ruby"),wa=m("s"),Ta=m("samp"),Ea=m("small"),ka=m("strong"),Ca=m("sub"),Aa=m("sup"),_a=m("time"),Na=m("u"),Ra=m("var"),La=m("area"),Ma=m("audio"),Oa=m("img"),Pa=m("map"),Da=m("track"),Ha=m("video"),$a=m("embed"),Ia=m("iframe"),Ba=m("object"),ja=m("param"),Va=m("picture"),Fa=m("portal"),za=m("source"),Wa=m("svg",H),qa=m("math"),Ua=m("canvas"),Ka=m("noscript"),Ja=m("script"),Ga=m("del"),Ya=m("ins"),Za=m("caption"),Xa=m("col"),Qa=m("colgroup"),el=m("table"),tl=m("tbody"),nl=m("td"),rl=m("tfoot"),ol=m("th"),il=m("thead"),sl=m("tr"),pt=m("button"),al=m("datalist"),ll=m("fieldset"),ul=m("form"),cl=m("input"),dl=m("label"),fl=m("legend"),pl=m("meter"),ml=m("optgroup"),gl=m("option"),bl=m("output"),hl=m("progress"),yl=m("select"),Sl=m("textarea"),vl=m("details"),xl=m("dialog"),wl=m("menu"),Tl=m("summary"),El=m("slot"),kl=m("template"),Cl=m("base"),Al=m("link"),_l=m("meta"),Fe=m("style"),Nl=m("circle",H),Rl=m("ellipse",H),Ll=m("g",H),Ml=m("line",H),Ol=m("path",H),Pl=m("polygon",H),Dl=m("polyline",H),Hl=m("rect",H),$l=m("text",H),Il=m("tspan",H),Bl=m("defs",H),jl=m("clipPath",H),Vl=m("mask",H),Fl=m("pattern",H),zl=m("linearGradient",H),Wl=m("radialGradient",H),ql=m("stop",H),Ul=m("use",H),Kl=m("symbol",H),Jl=m("marker",H),Gl=m("center"),Yl=m("font"),Zl=m("marquee"),Xl=e=>m(e);var to,En=globalThis[to=Symbol.for("sibujs.streamBoundary.v1")]??(globalThis[to]={hook:null,current:null});function no(e){return En.hook?En.hook(e):null}function Rt(){return En.current}var kn=Symbol.for("sibujs.ssr.v1");function Ql(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let n=null,r=process.getBuiltinModule;typeof r=="function"?n=r("node:async_hooks"):typeof Ut=="function"&&(n=Ut("async_hooks")),n&&(e=new n.AsyncLocalStorage)}let t=globalThis.AsyncLocalStorage;!e&&typeof t=="function"&&(e=new t)}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0,locale:void 0},fallbackDepth:0}}var Me=globalThis[kn]??(globalThis[kn]=Ql()),We=Me.als,ze=Me.fallbackStore;Me.fallbackDepth??(Me.fallbackDepth=0);var ro=!1;function eu(){if(ro||We||!(typeof process<"u"&&!!process.versions?.node))return;ro=!0;let t=process.versions.node;`${t}`}function Oe(){if(We){let e=We.getStore();if(e)return e}return ze}function Cn(){return We?We.getStore()??null:Me.fallbackDepth>0?ze:null}function ee(){return Oe().ssr}function oo(e){if(!ee())return null;let t=Oe(),n=t.caches??(t.caches=new Map),r=n.get(e);return r||(r=new Map,n.set(e,r)),r}var tu=Symbol.for("sibujs.prerender.v1");function mt(){return Oe().ssr||globalThis[tu]!==void 0}function io(){return!mt()}function so(){Oe().ssr=!0}function ao(){Oe().ssr=!1}function lo(e){let t={ssr:!0,suspenseIdCounter:0,idCounter:0,locale:void 0,pending:new Set,wake:null};if(We)return We.run(t,e);eu();let n={...ze};Object.assign(ze,t),Me.fallbackDepth++;try{return e()}finally{Me.fallbackDepth--;for(let r of Object.keys(ze))r in n||delete ze[r];Object.assign(ze,n)}}function uo(e,t,n=!0){let r=Cn(),o=r?.pending,i=o||!n?[]:Yt();if(!o&&i.length===0)return e;let s={label:t,since:Date.now(),boundary:Rt()??void 0};o?.add(s);let a=or(i,s),l=()=>{o?.delete(s),r?.wake?.(),a()};try{Promise.resolve(e).then(l,l)}catch{l()}return e}function co(e){let t=Oe(),n=t.ssr;t.ssr=!0;try{return e()}finally{n||(t.ssr=!1)}}var An="__sibuPendingError";function fo(e,t){let n=()=>e.parentNode?(L(t,{phase:"render",name:"lazy",node:e}),!0):!1;n()||queueMicrotask(()=>{n()||(e[An]=t)})}function Lt(e){let t=e,n=t[An];if(n instanceof Error)return delete t[An],n}function po(e){let t=null;return function(){if(t&&!Qn())return t();let r=P({class:"sibu-lazy"}),o=ge(),i=Rt(),s=!1,a=X(null,()=>z("sibu-lazy-loading","Loading..."));if(t){let l=t;return ie(r,X(o,()=>l())),r}return uo(e(),"lazy").then(Q(l=>{if(s)return;t=l.default;let u=t,d=()=>X(o,()=>u()),p=i?i.enter(d):d();ie(r,p)})).catch(l=>{if(s)return;let u=l instanceof Error?l:new Error(String(l));ie(r,P({class:"sibu-lazy-error"},`Failed to load component: ${u.message}`)),fo(r,u)}),ye()&&r.firstChild||r.appendChild(a),C(r,()=>{s=!0}),r}}function mo({nodes:e,fallback:t}){let n=P({class:"sibu-suspense"}),r=ge(),o=no(n),i=p=>{ie(n,p),o?.done()},s=X(null,t);ye()&&n.firstChild?I(s):n.appendChild(s);let a=!1,l=null,u=null;C(n,()=>{a=!0,l&&(l.disconnect(),l=null),u&&!n.contains(u)&&I(u)});let d=Q(()=>{if(!a)try{let p=o?o.enter(()=>X(r,e)):X(r,e);if(u=p,p.classList.contains("sibu-lazy")){if(!p.querySelector(".sibu-lazy-loading")){i(p);return}l=new MutationObserver(()=>{if(a)return;p.querySelector(".sibu-lazy-loading")||(l?.disconnect(),l=null,i(p))}),l.observe(p,{childList:!0,subtree:!0})}else i(p)}catch(p){let g=p instanceof Error?p:new Error(String(p));fo(n,g)}});return queueMicrotask(d),n}function Ln(e,t){return()=>et()===e?t():Nt(e,t)}function Ot(e,t){try{return e()}catch(n){let r=t.toLowerCase().includes("unmount")?"cleanup":"effect";L(n,{phase:r,name:t});return}}function _n(e,t,n,r,o){let i=Ot(e,t);if(typeof i!="function")return;let s=Ln(o,i);r()||!n.isConnected?Ot(s,"onUnmount"):bo(s,n)}var nt=new WeakMap,qe=new WeakMap,Te=new Set,Ee=new Set,rt=null,Mt=0,nu=256;function Nn(e){let t=nt.get(e);if(t){nt.delete(e),Te.delete(e);for(let n of t)try{n()}catch{}}}function Rn(e){qe.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let n=qe.get(e);if(n){qe.delete(e),Ee.delete(e);for(let r of n)try{r()}catch{}}})}function ru(e){if(Te.size===0||e.nodeType!==1)return;let t=e;if(Te.has(t)&&t.isConnected&&Nn(t),t.firstElementChild)for(let n of Array.from(Te))n!==t&&n.isConnected&&t.contains(n)&&Nn(n)}function ou(e){if(Ee.size===0||e.nodeType!==1)return;let t=e;if(Ee.has(t)&&!t.isConnected&&Rn(t),t.firstElementChild)for(let n of Array.from(Ee))n!==t&&!n.isConnected&&t.contains(n)&&Rn(n)}function iu(){if(Te.size>0)for(let e of Array.from(Te))e.isConnected&&Nn(e);if(Ee.size>0)for(let e of Array.from(Ee))e.isConnected||Rn(e)}function go(){rt||typeof document>"u"||(rt=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++)ru(t.addedNodes[n]);if(t.removedNodes.length>0)for(let n=0;n<t.removedNodes.length;n++)ou(t.removedNodes[n])}Mt+=e.length,Mt>=nu&&(Mt=0,iu()),Mn()}),rt.observe(document.body,{childList:!0,subtree:!0}))}function Mn(){rt&&Te.size===0&&Ee.size===0&&(rt.disconnect(),rt=null,Mt=0)}function su(e,t){let n=nt.get(e);return n||(n=[],nt.set(e,n)),n.push(t),Te.add(e),go(),()=>{let r=nt.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(nt.delete(e),Te.delete(e))}Mn()}}function au(e,t){let n=qe.get(e);return n||(n=[],qe.set(e,n)),n.push(t),Ee.add(e),go(),()=>{let r=qe.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(qe.delete(e),Ee.delete(e))}Mn()}}function Pt(e,t){if(typeof document>"u"||ee())return;let n=et();if(e=Ln(n,e),t){let r=!1,o=()=>r;if(C(t,()=>{r=!0}),t.isConnected){queueMicrotask(()=>{r||_n(e,"onMount",t,o,n)});return}queueMicrotask(()=>{if(r)return;if(t.isConnected){_n(e,"onMount",t,o,n);return}let i=su(t,()=>{r||_n(e,"onMount",t,o,n)});C(t,i)})}else queueMicrotask(()=>{Ot(e,"onMount")})}function lu(e,t){typeof document>"u"||ee()||bo(Ln(et(),e),t)}function bo(e,t){let n=!1,r=()=>{n||(n=!0,Ot(e,"onUnmount"))};C(t,r);let o=()=>{if(n)return;let i=au(t,r);C(t,i)};t.isConnected?o():Pt(()=>{o()},t)}function uu(e,t){C(t,e)}function ue(e,t,n){try{e.emit(t,n)}catch{}}var vo=globalThis;function cu(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 ho=100;function Dt(e){let t=e.userCleanups;if(t.length===0)return;e.userCleanups=[];let n=e.subscriber._scope??null;n===et()?yo(t):Nt(n,()=>yo(t))}function yo(e){for(let t=e.length-1;t>=0;t--)try{e[t]()}catch(n){L(n,{phase:"cleanup"})}}function So(e){let t=1;do e.rerunPending=!1,e.userCleanups.length>0&&Dt(e),Le(e.bodyFn,e.subscriber);while(e.rerunPending&&++t<=ho);e.rerunPending&&(e.rerunPending=!1,L(new Error(`effect re-requested itself ${ho}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),{phase:"effect"}))}function du(e){if(e.disposed)return;e.disposed=!0;let t=vo.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(t)try{t.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&Dt(e)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",n)}try{je(e.subscriber)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",n)}}function te(e,t){if(ee()&&!t?.server)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&&Dt(n),Le(n.bodyFn,o),n.rerunPending&&So(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{Le(n.bodyFn,n.subscriber),n.rerunPending&&So(n)}catch(s){throw n.disposed=!0,n.userCleanups.length>0&&Dt(n),je(n.subscriber),s}finally{n.running=!1,n.rerunPending=!1}let i=vo.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&ue(i,"effect:create",{effectFn:e}),()=>du(n)}var gt=0,On=new Set;function fu(e){gt++;try{return e()}finally{gt--,gt===0&&gu()}}function pu(e){return gt===0?!1:(On.add(e),!0)}function mu(){return gt>0}function gu(){try{for(let e of On)Jr(e)}finally{On.clear()}Kr()}var xo=Symbol.for("sibujs.reactive.batch.v1");function bu(){let e=globalThis,t=e[xo];if(t)return t;let n={batch:fu,enqueueBatchedSignal:pu,isBatching:mu};return e[xo]=n,n}var Pn=bu(),W=Pn.batch,Ue=Pn.enqueueBatchedSignal,hu=Pn.isBatching;var Dn=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=void 0,o=t?.equals;r&&(n.__name=r);function i(){return Be(n),n.value}i.__signal=n,r&&(i.__name=r);let s;if(o?s=a=>{let l=n.value,u=typeof a=="function"?a(l):a;if(!o(l,u)){if(n.value=u,n.__v++,!1){let d=Dn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&ue(d,"signal:update",{signal:n,name:r,oldValue:l,newValue:u})}Ue(n)||Qe(n)}}:s=a=>{let l=n.value,u=typeof a=="function"?a(l):a;Object.is(u,l)||(n.value=u,n.__v++,Ue(n)||Qe(n))},!1){let a=Dn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&ue(a,"signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}function yu(e){let[t,n]=A(0,e?.name?{name:e.name}:void 0);return{track(){t()},invalidate(){n(r=>r+1)}}}var Su=`
|
|
8
8
|
.sibu-error-display {
|
|
9
9
|
border: 1px solid var(--sibu-err-border, #e5484d);
|
|
10
10
|
border-radius: 10px;
|
package/dist/cdn.global.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
`||o==="\f"){n+=1;continue}if(o==="\r"){n+=e[n+2]===`
|
|
5
5
|
`?2:1;continue}if(er(o)){let i="",s=n+1;for(;s<e.length&&i.length<6&&er(e[s]);)i+=e[s],s++;s<e.length&&ki(e[s])&&(s+=e[s]==="\r"&&e[s+1]===`
|
|
6
6
|
`?2:1);let a=Number.parseInt(i,16),l=a===0||a>1114111||a>=55296&&a<=57343;t+=l?"\uFFFD":String.fromCodePoint(a),n=s-1;continue}t+=o,n+=1}return t}var tr=["url(","expression(","javascript:","vbscript:","-moz-binding","behavior:","@import","image-set(","filter:progid","image(","src("],_i=4,Ci=5,Ni=8;function Ri(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 Ft=new Set,nr=100,rr=!1;function dt(e,t,n){}function or(e){return(e.includes("\\")?Ai(e):e).toLowerCase().replace(/\s+/g,"")}function zt(e){if(!wi.test(e))return-1;let t=or(e);for(let n=0;n<tr.length;n++)if(t.includes(tr[n]))return n;return-1}function pt(e,t,n){let r=jt(e,t);return r===-1?t:(dt(t,r,{property:e,element:n?.element}),"")}function jt(e,t){let n=zt(t);if(n!==-1)return n;let r=K(e);return r==="behavior"?Ci:r==="-moz-binding"?_i:(r==="filter"||r==="-ms-filter")&&or(t).includes("progid:")?Ni:-1}function Li(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 l=e.indexOf("*/",s+2);if(l===-1)return null;s=l+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 l=s.slice(0,a).trim();if(!/^(--[\w-]+|-?[a-zA-Z_][\w-]*)$/.test(l))continue;let c=s.slice(a+1).trim(),u=/!\s*important\s*$/i.exec(c);if(u&&(c=c.slice(0,u.index).trim()),c==="")continue;let f=l.startsWith("--")?l:K(l);i.push([f,c,u!==null])}return i}function Mi(e,t){let n=String(e),r=Li(n);if(r===null)return zt(n)!==-1&&dt(n,zt(n),t),"";let o=[];for(let[i,s,a]of r){let l=jt(i,s);if(l!==-1){dt(s,l,{property:i,element:t?.element});continue}o.push(`${i}: ${s}${a?" !important":""}`)}return o.join("; ")}function mt(e,t){let n=String(e);if(n.trim()==="")return"";if(typeof document>"u")return Mi(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),l=jt(s,a);if(l!==-1){dt(a,l,{property:s,element:t?.element});continue}let c=r.style.getPropertyPriority(s);o.push(`${s}: ${a}${c?` !${c}`:""}`)}return o.join("; ")}var Wt=new Set(["href","xlink:href","src","action","formaction","formtarget","cite","poster","background","srcset","ping","data","manifest"]),Oi=new Set(["srcdoc"]);function Xe(e){return Oi.has(e.toLowerCase())}function ir(e){return Wt.has(e.toLowerCase())}function Di(e){let t=e.toLowerCase();return t==="style"||Wt.has(t)}function Hi(e,t,n){let r=e.toLowerCase();return r==="srcset"?Ti(t):Wt.has(r)?ft(t):r==="style"?mt(t,n):t}function sr(e,t,n){if(!Di(e))return t;let r=Hi(e,t,n);return r===""?null:r}function we(e){return e===" "||e===" "||e===`
|
|
7
|
-
`||e==="\r"||e==="\f"}function gt(e){let t=0,n=e.length;for(;t<n&&we(e[t]);)t++;for(;n>t&&we(e[n-1]);)n--;return e.slice(t,n)}var J=e=>({kind:"forbidden",reason:e});function Pi(e){let t=gt($e(e));if(t==="")return J("");let n=0;for(;n<t.length&&t[n]>="0"&&t[n]<="9";)n++;if(n===0)return J("");let r=Number.parseInt(t.slice(0,n),10);if(!Number.isFinite(r))return J("");for(;n<t.length&&we(t[n]);)n++;if(n===t.length)return{kind:"delay-only",delay:r};if(t[n]!==";"&&t[n]!==",")return J("");for(n++;n<t.length&&we(t[n]);)n++;let o=n;for(;n<t.length&&!we(t[n])&&t[n]!=="=";)n++;let i=t.slice(o,n).toLowerCase();if(i!=="url")return J("");for(;n<t.length&&we(t[n]);)n++;if(t[n]!=="=")return J("");for(n++;n<t.length&&we(t[n]);)n++;let s,a=t[n];if(a==='"'||a==="'"){let c=t.indexOf(a,n+1);if(c===-1)return J("");if(s=t.slice(n+1,c),gt(t.slice(c+1))!=="")return J("")}else if(s=gt(t.slice(n)),/[;,]/.test(s))return J("");if(s==="")return J("");let l=ft(s);return l===""?J(""):{kind:"allowed",delay:r,destination:s,sanitizedDestination:l}}function Vt(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(""):typeof t!="string"?{kind:"not-refresh"}:gt($e(t)).toLowerCase()!=="refresh"?{kind:"not-refresh"}:typeof n!="string"?{kind:"not-refresh"}:Pi(n)}var $i="http://www.w3.org/1999/xhtml",Ii="http://www.w3.org/2000/svg",Bi=new Set(["script","iframe","object","embed","frame","frameset"]);function lr(e){return K(e)}function cr(e){return Bi.has(lr(e))}var Fi=new Set(["script","style"]);function ur(e){return Fi.has(lr(e))}var M={None:0,MetaRefreshForbidden:1,MetaRefreshReactive:2,ScriptSource:3,AnimationTarget:4,StylesheetSource:5},zi=new Set(["src","href","xlink:href","type","language"]),ji=new Set(["animate","set","animateMotion","animateTransform","animateColor"]),qt=new WeakSet;function dr(e){return e.namespaceURI===$i||e.namespaceURI===null}function fr(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 Wi(e){qt.has(e)||(qt.add(e),e.getAttribute("content")!==null&&Vt(fr(e,null,null)).kind!=="not-refresh"&&e.removeAttribute("content"))}function Vi(e,t,n,r){if(!dr(e))return M.None;let o=K(t);if(o!=="http-equiv"&&o!=="content"||(r==="reactive"&&Wi(e),n===null)||o==="content"&&!e.hasAttribute("http-equiv"))return M.None;let i=Vt(fr(e,o,n));return i.kind==="forbidden"?M.MetaRefreshForbidden:i.kind!=="not-refresh"&&qt.has(e)?M.MetaRefreshReactive:M.None}function qi(e,t){if(t===null||K(e)!=="attributename")return M.None;let n=$e(t);return ir(n)||he(n)||Xe(n)?M.AnimationTarget:M.None}var bt=new WeakSet;function ar(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 Ui(e,t,n,r){if(!dr(e))return M.None;let o=K(t);return o==="href"?r==="static"||n===null?M.None:ar(e.getAttribute("rel"))?M.StylesheetSource:(bt.add(e),M.None):o==="rel"&&ar(n)&&bt.has(e)&&e.hasAttribute("href")?M.StylesheetSource:M.None}function Ut(e,t,n,r){let o=e.localName;return o==="meta"?Vi(e,t,n,r):o==="link"?Ui(e,t,n,r):o==="script"?r==="static"||n===null?M.None:zi.has(K(t))?M.ScriptSource:M.None:ji.has(o)&&e.namespaceURI===Ii?qi(t,n):M.None}function Kt(e,t,n){e.localName!=="link"||K(t)!=="href"||(n!=="static"&&e.hasAttribute("href")?bt.add(e):bt.delete(e))}var Ki="http://www.w3.org/1999/xhtml",Ji="http://www.w3.org/2000/svg",Gi="http://www.w3.org/1999/xlink",Yi="http://www.w3.org/XML/1998/namespace",Zi=new Set(["checked","disabled","selected"]);function Xi(e){return e.namespaceURI===null||e.namespaceURI===Ki}function mr(e,t,n){}function pr(e,t,n){e[t]=n}function Qi(e,t){if(e.namespaceURI!==Ji)return null;let n=t.toLowerCase();return n.startsWith("xlink:")?Gi:n.startsWith("xml:")?Yi:null}function X(e,t,n,r={}){let o=es(e,t,n,r);return e.localName==="link"&&Kt(e,t,r.reactive?"reactive":"runtime"),o}function es(e,t,n,r){let o=Qi(e,t),i=o?t.slice(t.indexOf(":")+1):t;if(he(t))return!1,o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let s=n==null||n===!1?null:n===!0?"":String(n),a=Ut(e,t,s,r.reactive?"reactive":"runtime");if(a!==M.None)return mr(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(Xe(t))return!1,o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let l=Xi(e),c=l?t.toLowerCase():t;if(typeof n=="boolean"){if(t.length>5&&t.slice(0,5).toLowerCase()==="aria-"){let g=n?"true":"false";return(o?e.getAttributeNS(o,i):e.getAttribute(t))!==g&&(o?e.setAttributeNS(o,t,g):e.setAttribute(t,g)),!0}return l&&Zi.has(c)&&c in e?pr(e,c,n):n?o?e.setAttributeNS(o,t,""):e.setAttribute(t,""):o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0}let u=String(n);if(r.syncValueProperty!==!1&&l&&(c==="value"||c==="checked")&&c in e)return pr(e,c,c==="checked"?!!n:u),!0;let f=u===""?"":sr(t,u,{element:e});return f===null?(o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0):((o?e.getAttributeNS(o,i):e.getAttribute(t))===f||(o?e.setAttributeNS(o,t,f):e.setAttribute(t,f)),!0)}function Jt(e,t,n){if(Xe(t))return!1,!1;let r=Ut(e,t,n,"static");return r!==M.None?(mr("html (static attribute)",t,r),!1):(e.setAttribute(t,n),e.localName==="link"&&Kt(e,t,"static"),!0)}var ts=4096,Gt=[];function ns(){return{sig:null,sub:null,epoch:0,depVersion:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function rs(e,t,n){let r=Gt.pop();if(r)return r.sig=e,r.sub=t,r.epoch=n,r;let o=ns();return o.sig=e,o.sub=t,o.epoch=n,o}function gr(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,Gt.length<ts&&Gt.push(e)}function os(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 br(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 is(e,t){let n=e.depsTail??null;t.subPrev=n,t.subNext=null,n?n.subNext=t:e.depsHead=t,e.depsTail=t}function ss(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 Q=null,le=null,ye=0,Se=[],B=new Set,as=[];function ls(e){try{e()}catch(t){let n=e;w(t,{phase:n._errorPhase??"effect",name:n.__name,node:n._errorNode})}}function cs(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 ie=0,ce=!1;function Zt(){ie===0&&(le=Q,Q=null,ce=!0),ie++}function Xt(){ie--,ie===0&&(Q=le,le=null,ce=!1)}function hr(){return ce}function yr(e){Zt();try{return e()}finally{Xt()}}var G=null;function Qt(){return G}function vt(e,t){let n=G;G=e;try{return t()}finally{G=n}}function en(e){let t=G;return t===null?e:(...n)=>vt(t,()=>e(...n))}var Ie=null,us=0;function tn(e,t){let n=Q,r=0,o=null;ce&&(r=ie,o=le,ie=0,le=null,ce=!1),Q=t;let i=t;i._cap===void 0&&(i._cap=Gn());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 l=Ie;l!==null&&!i._epoch&&!i._c&&i._owner==null&&(i._owner=l),i._tok!=null&&(Ie=i._tok);let c=++us;i._epoch=c,i._structDirty=!1;for(let u=i.depsHead??null;u!==null;u=u.subNext){let f=u.sig;u.prevActive=f.__activeNode??null,f.__activeNode=u}try{e()}finally{Q=n,G=s,Ie=l,r!==0&&(ie=r,le=o,ce=!0);let u=i.depsHead??null;for(;u!==null;){let f=u.subNext,m=u.sig;m.__activeNode=u.prevActive,u.prevActive=null,u.epoch!==c&&(ss(u),br(u),gr(u)),u=f}}}function Sr(e,t){if(!t)return nn(e);Be(t);let n=Q,r=0,o=null;ce&&(r=ie,o=le,ie=0,le=null,ce=!1),Q=t;let i=t;i._scope===void 0&&(i._scope=G);let s=G;G=i._scope;try{e()}finally{Q=n,G=s,r!==0&&(ie=r,le=o,ce=!0);for(let a=i.depsHead??null;a!==null;a=a.subNext){let l=a.sig;l.__activeNode=a.prevActive,a.prevActive=null}}return i._dispose??(i._dispose=()=>Be(t))}function nn(e,t,n){return xr(e,t,n===!0)._dispose}function vr(e,t){let n=xr(e,t,!0);return{stop:n._dispose,run:r=>{let o=Ie;Ie=n._tok??null;try{return r()}finally{Ie=o}}}}function xr(e,t,n){let r=()=>{let i=o;if(!(i._disposed||i._reentrant)){i._reentrant=!0;try{tn(e,o)}finally{i._reentrant=!1}}},o=r;o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._runEpoch=0,o._runs=0,o._reentrant=!1,o._disposed=!1,o._errorPhase="binding",o._errorNode=t,o._tok=null,o._owner=null,n&&(o._tok={sub:o});try{r()}catch(i){throw o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),Be(o),i}return o._dispose=()=>{o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),Be(o)},o}function Er(e){if(!Q)return;let t=Q,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=rs(e,t,r);i.depVersion=n.__v??Number.NaN,i.prevActive=o,n.__activeNode=i,is(t,i),os(n,i),t._structDirty=!0}function Be(e){let t=e;t._owner!=null&&(t._owner=null);let n=t.depsHead??null;for(t.depsHead=null,t.depsTail=null;n;){let r=n.subNext;br(n),gr(n),n=r}}var ht=1e3,yt=1e6,St=0,ke=new Set;function Tr(e){let t=ht;return Number.isFinite(e)&&e>0&&(ht=Math.floor(e)),t}function wr(e){let t=yt;return Number.isFinite(e)&&e>0&&(yt=Math.floor(e)),t}function ds(e){let t=e;return t._runEpoch!==St?(t._runEpoch=St,t._runs=1,!1):(t._runs=(t._runs??0)+1,t._runs>ht)}function fs(e){let t=e.__name??"<unnamed>";w(new Error(`subscriber "${t}" fired more than ${ht} 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 ps(){w(new Error(`Notification drain exceeded ${yt} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`),{phase:"scheduler"})}function kr(){let e=0;for(;e<Se.length;){if(e>=yt){ps();break}let t=Se[e++];B.delete(t)&&(t._owner!=null&&B.size>0&&(ms(t),B.has(t))||Ar(t))}}function ms(e){for(;;){let t=null;for(let n=e._owner??null;n!==null;){let r=n.sub;if(r===null)break;B.has(r)&&(t=r),n=r._owner??null}if(t===null)return;B.delete(t),Ar(t)}}function Ar(e){if(ke.size>0&&ke.has(e)||e._hasComputedDep===!0&&!cs(e))return;if(ds(e)){fs(e),ke.add(e);return}let t=Yn(e._cap??null);try{ls(e)}finally{t&&Zn()}}function _r(){if(!(ye>0)){ye++,St++;try{kr()}finally{ye--,ye===0&&(Se.length=0,B.clear(),ke.size>0&&ke.clear())}}}function Yt(e){e();let t=e._sig;if(!t)return;let n=as,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 B.has(s)||(B.add(s),Se.push(s));i=i.sigNext}}}function Cr(e){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&(r._c?Yt(r):B.has(r)||(B.add(r),Se.push(r))),n=n.sigNext}}function Nr(e){let n=e.subsHead;if(n){if(ye>0){let r=n;for(;r;){let o=r.sub;o&&(o._c?Yt(o):B.has(o)||(B.add(o),Se.push(o))),r=r.sigNext}return}ye++,St++;try{let r=n;for(;r;){let o=r.sub;o&&(o._c?Yt(o):B.has(o)||(B.add(o),Se.push(o))),r=r.sigNext}kr()}finally{ye--,ye===0&&(Se.length=0,B.clear(),ke.size>0&&ke.clear())}}}function Rr(e){return e.__sc??0}function Lr(e){let t=e,n=[],r=t.depsHead??null;for(;r;)r.sig&&n.push(r.sig),r=r.subNext;return n}function Mr(e,t){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&t(r),n=n.sigNext}}var Or="4.14.0",Dr=Symbol.for("sibujs.reactive.v1");function bs(){let e=globalThis,t=e[Dr];if(t)return!1,t;let n={suspendTracking:Zt,resumeTracking:Xt,isTrackingSuspended:hr,untracked:yr,retrack:tn,track:Sr,reactiveBinding:nn,recordDependency:Er,cleanup:Be,setMaxSubscriberRepeats:Tr,setMaxDrainIterations:wr,drainNotificationQueue:_r,queueSignalNotification:Cr,notifySubscribers:Nr,getSubscriberCount:Rr,getSubscriberDeps:Lr,forEachSubscriber:Mr,getOwnerScope:Qt,runWithOwnerScope:vt,bindOwnerScope:en,structuralBinding:vr,version:Or};return e[Dr]=n,n}var O=bs(),Ae=O.suspendTracking,_e=O.resumeTracking,Hr=O.isTrackingSuspended,ee=O.untracked,ve=O.retrack,Fe=O.track,$=O.reactiveBinding,Ce=O.recordDependency,Ne=O.cleanup,Pu=O.setMaxSubscriberRepeats,Pr=O.setMaxDrainIterations,$r=O.drainNotificationQueue,Ir=O.queueSignalNotification,ze=O.notifySubscribers,$u=O.getSubscriberCount,Iu=O.getSubscriberDeps,Bu=O.forEachSubscriber,je=O.getOwnerScope??Qt,xt=O.runWithOwnerScope??vt,z=O.bindOwnerScope??en,Re=O.structuralBinding??((e,t)=>({stop:O.reactiveBinding(e,t),run:n=>n()}));function Qe(e,t,n){if(he(t))return X(e,t,"",{label:`bindAttribute("${t}")`}),()=>{};function r(){let o;try{o=n()}catch(i){w(i,{phase:"binding",name:`bindAttribute("${t}")`,node:e});return}X(e,t,o,{label:`bindAttribute("${t}")`,reactive:!0})}return $(r,e)}function Br(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(l){w(l,{phase:"binding",name:"bindDynamic (name getter)",node:e});return}let a;try{a=typeof n=="function"?n():n}catch(l){w(l,{phase:"binding",name:"bindDynamic (value getter)",node:e});return}r!==null&&r!==s&&(e.removeAttribute(r),r=null),X(e,s,a,{label:"bindDynamic",reactive:!0})&&(r=s)}let i=$(o,e);return()=>{i(),r!==null&&e.removeAttribute(r)}}var rn=["data-focus-key","id","name"],hs=new Set(["text","search","url","tel","password",""]);function ys(e){let t=e.tagName;if(!(t==="TEXTAREA"||t==="INPUT"&&hs.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 et(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<rn.length;i++){let s=t.getAttribute(rn[i]);if(s){r=rn[i],o=s;break}}return{el:t,attr:r,value:o,tag:t.tagName,...ys(t)}}function Ss(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function vs(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 l=0;l<a.length;l++)r++,n??(n=a[l]);if(r>1)return{el:null,count:r}}return r===1?{el:n,count:r}:{el:null,count:r}}function Fr(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 We(e,t,n,r){if(!e||typeof document>"u"||r==="discard")return;let o=document.activeElement;if(o===e.el||o&&o!==document.body&&o!==document.documentElement)return;if(e.el.isConnected){Fr(e.el,e);return}let i=!1;if(e.attr&&e.value){let{el:s,count:a}=vs(t,`[${e.attr}=${Ss(e.value)}]`);if(s&&s.tagName===e.tag){Fr(s,e);return}i=a>1}if(r!==void 0&&typeof r=="object"){let s=typeof r.restoreTo=="function"?r.restoreTo():r.restoreTo;if(s?.isConnected&&(s.focus(),document.activeElement===s))return}}function ue(e,t){let n=[],r=re();function o(){let i;try{i=F(r,t)}catch(f){w(f,{phase:"binding",name:"bindChildNode",node:e});return}let s=et(n);if(i==null||typeof i=="boolean"){for(let f=0;f<n.length;f++){let m=n[f];L(m),m.parentNode&&m.parentNode.removeChild(m)}n.length=0,We(s,n,"bindChildNode");return}let a=e.parentNode;if(!a){n.length=0;return}let l;if(Array.isArray(i)){l=[];let f=new Set;for(let m=0;m<i.length;m++){let g=i[m];if(g==null||typeof g=="boolean")continue;let p=g instanceof Node?g:document.createTextNode(String(g));if(f.has(p)){!1;continue}f.add(p),l.push(p)}}else l=[i instanceof Node?i:document.createTextNode(String(i))];let c;if(n.length>0&&l.length>0){let f=new Set(n);c=new Set;for(let m=0;m<l.length;m++)f.has(l[m])&&c.add(l[m])}for(let f=0;f<n.length;f++){let m=n[f];c?.has(m)||(L(m),m.parentNode&&m.parentNode.removeChild(m))}let u=e;for(let f=0;f<l.length;f++){let m=l[f];u.nextSibling!==m&&a.insertBefore(m,u.nextSibling),u=m}n=l,We(s,l,"bindChildNode")}return $(o,e,!0)}function on(){throw new Error("[SibuJS] renderToString needs a DOM: register happy-dom or jsdom globals first.")}function W(){typeof document>"u"&&on()}var R="http://www.w3.org/2000/svg",xs=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);var sn=new Set,zr=100,jr=!1,Wr=new Map;function Vr(e){let t=Wr.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),Wr.set(e,t)),t}function Es(e,t){if(typeof t=="function"){let r=t,o=[],i=!1,s=$(()=>{let a=r();if(a===null||typeof a!="object"){o=[],i=!0,e.setAttribute("style",mt(String(a),{element:e}));return}let l=e.style;i&&(e.removeAttribute("style"),i=!1);let c=[];for(let u in a){if(!Object.hasOwn(a,u))continue;let f=a[u];if(f==null)continue;let m=Vr(u);c.push(m),l.setProperty(m,pt(m,String(f),{element:e}))}for(let u=0;u<o.length;u++)c.indexOf(o[u])===-1&&l.removeProperty(o[u]);o=c},e);E(e,s);return}if(typeof t=="string"){e.setAttribute("style",mt(t,{element:e}));return}let n=e;for(let r in t){if(!Object.hasOwn(t,r))continue;let o=t[r],i=Vr(r);if(typeof o=="function"){let s=o,a=$(()=>{n.style.setProperty(i,pt(i,String(s()),{element:e}))},e);E(e,a)}else n.style.setProperty(i,pt(i,String(o),{element:e}))}}function Ts(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=$(()=>{let s=t();s==null||s===!1?e.removeAttribute("class"):e.setAttribute("class",s)},e);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=$(()=>{let a="";for(let l in n){if(!Object.hasOwn(n,l))continue;let c=n[l];(typeof c=="function"?c():c)&&(a=a?`${a} ${l}`:l)}e.setAttribute("class",a)},e);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(e,ue(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(e,ue(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(e,ue(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=cr(e);return(r,o)=>{if(n)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);typeof document>"u"&&on();let i=Ye(e,t);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),an(i,o),i):(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&&Ts(i,a);let l=s.id;typeof l=="function"?E(i,Qe(i,"id",l)):l!=null&&(!1,i.id=l);let c=o!==void 0?o:s.nodes;c!=null&&an(i,c);let u=s.on;if(u)for(let g in u){if(!Object.hasOwn(u,g))continue;let p=u[g];typeof p=="function"?i.addEventListener(g,p):!1}let f=s.style;f!=null&&Es(i,f);let m=s.ref;m&&(m.current=i);for(let g in s)switch(g){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{if(!Object.hasOwn(s,g))continue;let p=s[g];if(p==null||he(g))continue;typeof p=="function"?E(i,Qe(i,g,p)):X(i,g,p,{syncValueProperty:!1,label:"tagFactory"})}}return typeof s.onElement=="function"&&s.onElement(i),i}}var dd=d("html"),ws=d("head"),ks=d("body"),As=d("title"),_=d("div"),H=d("span"),_s=d("section"),Cs=d("article"),Ns=d("header"),Rs=d("footer"),Ls=d("nav"),Ms=d("main"),Os=d("aside"),Ds=d("address"),ln=d("p"),Hs=d("h1"),Ps=d("h2"),cn=d("h3"),$s=d("h4"),Is=d("h5"),Bs=d("h6"),Fs=d("blockquote"),zs=d("dd"),js=d("dl"),Ws=d("dt"),Vs=d("figcaption"),qs=d("figure"),Us=d("hr"),Ks=d("li"),Js=d("ol"),Gs=d("ul"),un=d("pre"),Ys=d("a"),Zs=d("abbr"),Xs=d("b"),Qs=d("bdi"),ea=d("bdo"),ta=d("br"),na=d("cite"),dn=d("code"),ra=d("data"),oa=d("dfn"),ia=d("em"),sa=d("i"),aa=d("kbd"),la=d("mark"),ca=d("q"),ua=d("rp"),da=d("rt"),fa=d("ruby"),pa=d("s"),ma=d("samp"),ga=d("small"),ba=d("strong"),ha=d("sub"),ya=d("sup"),Sa=d("time"),va=d("u"),xa=d("var"),Ea=d("area"),Ta=d("audio"),wa=d("img"),ka=d("map"),Aa=d("track"),_a=d("video"),Ca=d("embed"),Na=d("iframe"),Ra=d("object"),La=d("param"),Ma=d("picture"),Oa=d("portal"),Da=d("source"),Ha=d("svg",R),Pa=d("math"),$a=d("canvas"),Ia=d("noscript"),Ba=d("script"),Fa=d("del"),za=d("ins"),ja=d("caption"),Wa=d("col"),Va=d("colgroup"),qa=d("table"),Ua=d("tbody"),Ka=d("td"),Ja=d("tfoot"),Ga=d("th"),Ya=d("thead"),Za=d("tr"),tt=d("button"),Xa=d("datalist"),Qa=d("fieldset"),el=d("form"),tl=d("input"),nl=d("label"),rl=d("legend"),ol=d("meter"),il=d("optgroup"),sl=d("option"),al=d("output"),ll=d("progress"),cl=d("select"),ul=d("textarea"),dl=d("details"),fl=d("dialog"),pl=d("menu"),ml=d("summary"),gl=d("slot"),bl=d("template"),hl=d("base"),yl=d("link"),Sl=d("meta"),Le=d("style"),vl=d("circle",R),xl=d("ellipse",R),El=d("g",R),Tl=d("line",R),wl=d("path",R),kl=d("polygon",R),Al=d("polyline",R),_l=d("rect",R),Cl=d("text",R),Nl=d("tspan",R),Rl=d("defs",R),Ll=d("clipPath",R),Ml=d("mask",R),Ol=d("pattern",R),Dl=d("linearGradient",R),Hl=d("radialGradient",R),Pl=d("stop",R),$l=d("use",R),Il=d("symbol",R),Bl=d("marker",R),Fl=d("center"),zl=d("font"),jl=d("marquee"),Wl=e=>d(e);var qr,fn=globalThis[qr=Symbol.for("sibujs.streamBoundary.v1")]??(globalThis[qr]={hook:null,current:null});function Ur(e){return fn.hook?fn.hook(e):null}function Et(){return fn.current}var pn=Symbol.for("sibujs.ssr.v1");function Vl(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let n=null,r=process.getBuiltinModule;typeof r=="function"?n=r("node:async_hooks"):typeof Dt=="function"&&(n=Dt("async_hooks")),n&&(e=new n.AsyncLocalStorage)}let t=globalThis.AsyncLocalStorage;!e&&typeof t=="function"&&(e=new t)}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0,locale:void 0},fallbackDepth:0}}var xe=globalThis[pn]??(globalThis[pn]=Vl()),Oe=xe.als,Me=xe.fallbackStore;xe.fallbackDepth??(xe.fallbackDepth=0);var Kr=!1;function ql(){if(Kr||Oe||!(typeof process<"u"&&!!process.versions?.node))return;Kr=!0;let t=process.versions.node;`${t}`}function Ee(){if(Oe){let e=Oe.getStore();if(e)return e}return Me}function mn(){return Oe?Oe.getStore()??null:xe.fallbackDepth>0?Me:null}function j(){return Ee().ssr}function Jr(e){if(!j())return null;let t=Ee(),n=t.caches??(t.caches=new Map),r=n.get(e);return r||(r=new Map,n.set(e,r)),r}var Ul=Symbol.for("sibujs.prerender.v1");function nt(){return Ee().ssr||globalThis[Ul]!==void 0}function Gr(){return!nt()}function Yr(){Ee().ssr=!0}function Zr(){Ee().ssr=!1}function Xr(e){let t={ssr:!0,suspenseIdCounter:0,idCounter:0,locale:void 0,pending:new Set,wake:null};if(Oe)return Oe.run(t,e);ql();let n={...Me};Object.assign(Me,t),xe.fallbackDepth++;try{return e()}finally{xe.fallbackDepth--;for(let r of Object.keys(Me))r in n||delete Me[r];Object.assign(Me,n)}}function Qr(e,t,n=!0){let r=mn(),o=r?.pending,i=o||!n?[]:It();if(!o&&i.length===0)return e;let s={label:t,since:Date.now(),boundary:Et()??void 0};o?.add(s);let a=Jn(i,s),l=()=>{o?.delete(s),r?.wake?.(),a()};try{Promise.resolve(e).then(l,l)}catch{l()}return e}function eo(e){let t=Ee(),n=t.ssr;t.ssr=!0;try{return e()}finally{n||(t.ssr=!1)}}var gn="__sibuPendingError";function to(e,t){let n=()=>e.parentNode?(w(t,{phase:"render",name:"lazy",node:e}),!0):!1;n()||queueMicrotask(()=>{n()||(e[gn]=t)})}function Tt(e){let t=e,n=t[gn];if(n instanceof Error)return delete t[gn],n}function no(e){let t=null;return function(){if(t&&!Wn())return t();let r=_({class:"sibu-lazy"}),o=re(),i=Et(),s=!1,a=F(null,()=>H("sibu-lazy-loading","Loading..."));if(t){let l=t;return U(r,F(o,()=>l())),r}return Qr(e(),"lazy").then(z(l=>{if(s)return;t=l.default;let c=t,u=()=>F(o,()=>c()),f=i?i.enter(u):u();U(r,f)})).catch(l=>{if(s)return;let c=l instanceof Error?l:new Error(String(l));U(r,_({class:"sibu-lazy-error"},`Failed to load component: ${c.message}`)),to(r,c)}),se()&&r.firstChild||r.appendChild(a),E(r,()=>{s=!0}),r}}function ro({nodes:e,fallback:t}){let n=_({class:"sibu-suspense"}),r=re(),o=Ur(n),i=f=>{U(n,f),o?.done()},s=F(null,t);se()&&n.firstChild?L(s):n.appendChild(s);let a=!1,l=null,c=null;E(n,()=>{a=!0,l&&(l.disconnect(),l=null),c&&!n.contains(c)&&L(c)});let u=z(()=>{if(!a)try{let f=o?o.enter(()=>F(r,e)):F(r,e);if(c=f,f.classList.contains("sibu-lazy")){if(!f.querySelector(".sibu-lazy-loading")){i(f);return}l=new MutationObserver(()=>{if(a)return;f.querySelector(".sibu-lazy-loading")||(l?.disconnect(),l=null,i(f))}),l.observe(f,{childList:!0,subtree:!0})}else i(f)}catch(f){let m=f instanceof Error?f:new Error(String(f));to(n,m)}});return queueMicrotask(u),n}function Sn(e,t){return()=>je()===e?t():xt(e,t)}function kt(e,t){try{return e()}catch(n){let r=t.toLowerCase().includes("unmount")?"cleanup":"effect";w(n,{phase:r,name:t});return}}function bn(e,t,n,r,o){let i=kt(e,t);if(typeof i!="function")return;let s=Sn(o,i);r()||!n.isConnected?kt(s,"onUnmount"):io(s,n)}var Ve=new WeakMap,De=new WeakMap,de=new Set,fe=new Set,qe=null,wt=0,Kl=256;function hn(e){let t=Ve.get(e);if(t){Ve.delete(e),de.delete(e);for(let n of t)try{n()}catch{}}}function yn(e){De.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let n=De.get(e);if(n){De.delete(e),fe.delete(e);for(let r of n)try{r()}catch{}}})}function Jl(e){if(de.size===0||e.nodeType!==1)return;let t=e;if(de.has(t)&&t.isConnected&&hn(t),t.firstElementChild)for(let n of Array.from(de))n!==t&&n.isConnected&&t.contains(n)&&hn(n)}function Gl(e){if(fe.size===0||e.nodeType!==1)return;let t=e;if(fe.has(t)&&!t.isConnected&&yn(t),t.firstElementChild)for(let n of Array.from(fe))n!==t&&!n.isConnected&&t.contains(n)&&yn(n)}function Yl(){if(de.size>0)for(let e of Array.from(de))e.isConnected&&hn(e);if(fe.size>0)for(let e of Array.from(fe))e.isConnected||yn(e)}function oo(){qe||typeof document>"u"||(qe=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++)Jl(t.addedNodes[n]);if(t.removedNodes.length>0)for(let n=0;n<t.removedNodes.length;n++)Gl(t.removedNodes[n])}wt+=e.length,wt>=Kl&&(wt=0,Yl()),vn()}),qe.observe(document.body,{childList:!0,subtree:!0}))}function vn(){qe&&de.size===0&&fe.size===0&&(qe.disconnect(),qe=null,wt=0)}function Zl(e,t){let n=Ve.get(e);return n||(n=[],Ve.set(e,n)),n.push(t),de.add(e),oo(),()=>{let r=Ve.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Ve.delete(e),de.delete(e))}vn()}}function Xl(e,t){let n=De.get(e);return n||(n=[],De.set(e,n)),n.push(t),fe.add(e),oo(),()=>{let r=De.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(De.delete(e),fe.delete(e))}vn()}}function At(e,t){if(typeof document>"u"||j())return;let n=je();if(e=Sn(n,e),t){let r=!1,o=()=>r;if(E(t,()=>{r=!0}),t.isConnected){queueMicrotask(()=>{r||bn(e,"onMount",t,o,n)});return}queueMicrotask(()=>{if(r)return;if(t.isConnected){bn(e,"onMount",t,o,n);return}let i=Zl(t,()=>{r||bn(e,"onMount",t,o,n)});E(t,i)})}else queueMicrotask(()=>{kt(e,"onMount")})}function Ql(e,t){typeof document>"u"||j()||io(Sn(je(),e),t)}function io(e,t){let n=!1,r=()=>{n||(n=!0,kt(e,"onUnmount"))};E(t,r);let o=()=>{if(n)return;let i=Xl(t,r);E(t,i)};t.isConnected?o():At(()=>{o()},t)}function ec(e,t){E(t,e)}function Y(e,t,n){try{e.emit(t,n)}catch{}}var co=globalThis;function tc(e,t){let n,r=!0;return()=>{let o=e();if(r)r=!1,n=o,ee(()=>t(o,void 0));else{let i=n;n=o,ee(()=>t(o,i))}}}var so=100;function _t(e){let t=e.userCleanups;if(t.length===0)return;e.userCleanups=[];let n=e.subscriber._scope??null;n===je()?ao(t):xt(n,()=>ao(t))}function ao(e){for(let t=e.length-1;t>=0;t--)try{e[t]()}catch(n){w(n,{phase:"cleanup"})}}function lo(e){let t=1;do e.rerunPending=!1,e.userCleanups.length>0&&_t(e),ve(e.bodyFn,e.subscriber);while(e.rerunPending&&++t<=so);e.rerunPending&&(e.rerunPending=!1,w(new Error(`effect re-requested itself ${so}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),{phase:"effect"}))}function nc(e){if(e.disposed)return;e.disposed=!0;let t=co.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(t)try{t.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&_t(e)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",n)}try{Ne(e.subscriber)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",n)}}function Z(e,t){if(j()&&!t?.server)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&&_t(n),ve(n.bodyFn,o),n.rerunPending&&lo(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&&lo(n)}catch(s){throw n.disposed=!0,n.userCleanups.length>0&&_t(n),Ne(n.subscriber),s}finally{n.running=!1,n.rerunPending=!1}let i=co.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&Y(i,"effect:create",{effectFn:e}),()=>nc(n)}var rt=0,xn=new Set;function rc(e){rt++;try{return e()}finally{rt--,rt===0&&sc()}}function oc(e){return rt===0?!1:(xn.add(e),!0)}function ic(){return rt>0}function sc(){try{for(let e of xn)Ir(e)}finally{xn.clear()}$r()}var uo=Symbol.for("sibujs.reactive.batch.v1");function ac(){let e=globalThis,t=e[uo];if(t)return t;let n={batch:rc,enqueueBatchedSignal:oc,isBatching:ic};return e[uo]=n,n}var En=ac(),V=En.batch,He=En.enqueueBatchedSignal,lc=En.isBatching;var Tn=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=void 0,o=t?.equals;r&&(n.__name=r);function i(){return Ce(n),n.value}i.__signal=n,r&&(i.__name=r);let s;if(o?s=a=>{let l=n.value,c=typeof a=="function"?a(l):a;if(!o(l,c)){if(n.value=c,n.__v++,!1){let u=Tn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;u&&Y(u,"signal:update",{signal:n,name:r,oldValue:l,newValue:c})}He(n)||ze(n)}}:s=a=>{let l=n.value,c=typeof a=="function"?a(l):a;Object.is(c,l)||(n.value=c,n.__v++,He(n)||ze(n))},!1){let a=Tn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&Y(a,"signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}function cc(e){let[t,n]=C(0,e?.name?{name:e.name}:void 0);return{track(){t()},invalidate(){n(r=>r+1)}}}var uc=`
|
|
7
|
+
`||e==="\r"||e==="\f"}function gt(e){let t=0,n=e.length;for(;t<n&&we(e[t]);)t++;for(;n>t&&we(e[n-1]);)n--;return e.slice(t,n)}var J=e=>({kind:"forbidden",reason:e});function Pi(e){let t=gt($e(e));if(t==="")return J("");let n=0;for(;n<t.length&&t[n]>="0"&&t[n]<="9";)n++;if(n===0)return J("");let r=Number.parseInt(t.slice(0,n),10);if(!Number.isFinite(r))return J("");for(;n<t.length&&we(t[n]);)n++;if(n===t.length)return{kind:"delay-only",delay:r};if(t[n]!==";"&&t[n]!==",")return J("");for(n++;n<t.length&&we(t[n]);)n++;let o=n;for(;n<t.length&&!we(t[n])&&t[n]!=="=";)n++;let i=t.slice(o,n).toLowerCase();if(i!=="url")return J("");for(;n<t.length&&we(t[n]);)n++;if(t[n]!=="=")return J("");for(n++;n<t.length&&we(t[n]);)n++;let s,a=t[n];if(a==='"'||a==="'"){let c=t.indexOf(a,n+1);if(c===-1)return J("");if(s=t.slice(n+1,c),gt(t.slice(c+1))!=="")return J("")}else if(s=gt(t.slice(n)),/[;,]/.test(s))return J("");if(s==="")return J("");let l=ft(s);return l===""?J(""):{kind:"allowed",delay:r,destination:s,sanitizedDestination:l}}function Vt(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(""):typeof t!="string"?{kind:"not-refresh"}:gt($e(t)).toLowerCase()!=="refresh"?{kind:"not-refresh"}:typeof n!="string"?{kind:"not-refresh"}:Pi(n)}var $i="http://www.w3.org/1999/xhtml",Ii="http://www.w3.org/2000/svg",Bi=new Set(["script","iframe","object","embed","frame","frameset"]);function lr(e){return K(e)}function cr(e){return Bi.has(lr(e))}var Fi=new Set(["script","style"]);function ur(e){return Fi.has(lr(e))}var M={None:0,MetaRefreshForbidden:1,MetaRefreshReactive:2,ScriptSource:3,AnimationTarget:4,StylesheetSource:5},zi=new Set(["src","href","xlink:href","type","language"]),ji=new Set(["animate","set","animateMotion","animateTransform","animateColor"]),qt=new WeakSet;function dr(e){return e.namespaceURI===$i||e.namespaceURI===null}function fr(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 Wi(e){qt.has(e)||(qt.add(e),e.getAttribute("content")!==null&&Vt(fr(e,null,null)).kind!=="not-refresh"&&e.removeAttribute("content"))}function Vi(e,t,n,r){if(!dr(e))return M.None;let o=K(t);if(o!=="http-equiv"&&o!=="content"||(r==="reactive"&&Wi(e),n===null)||o==="content"&&!e.hasAttribute("http-equiv"))return M.None;let i=Vt(fr(e,o,n));return i.kind==="forbidden"?M.MetaRefreshForbidden:i.kind!=="not-refresh"&&qt.has(e)?M.MetaRefreshReactive:M.None}function qi(e,t){if(t===null||K(e)!=="attributename")return M.None;let n=$e(t);return ir(n)||he(n)||Xe(n)?M.AnimationTarget:M.None}var bt=new WeakSet;function ar(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 Ui(e,t,n,r){if(!dr(e))return M.None;let o=K(t);return o==="href"?r==="static"||n===null?M.None:ar(e.getAttribute("rel"))?M.StylesheetSource:(bt.add(e),M.None):o==="rel"&&ar(n)&&bt.has(e)&&e.hasAttribute("href")?M.StylesheetSource:M.None}function Ut(e,t,n,r){let o=e.localName;return o==="meta"?Vi(e,t,n,r):o==="link"?Ui(e,t,n,r):o==="script"?r==="static"||n===null?M.None:zi.has(K(t))?M.ScriptSource:M.None:ji.has(o)&&e.namespaceURI===Ii?qi(t,n):M.None}function Kt(e,t,n){e.localName!=="link"||K(t)!=="href"||(n!=="static"&&e.hasAttribute("href")?bt.add(e):bt.delete(e))}var Ki="http://www.w3.org/1999/xhtml",Ji="http://www.w3.org/2000/svg",Gi="http://www.w3.org/1999/xlink",Yi="http://www.w3.org/XML/1998/namespace",Zi=new Set(["checked","disabled","selected"]);function Xi(e){return e.namespaceURI===null||e.namespaceURI===Ki}function mr(e,t,n){}function pr(e,t,n){e[t]=n}function Qi(e,t){if(e.namespaceURI!==Ji)return null;let n=t.toLowerCase();return n.startsWith("xlink:")?Gi:n.startsWith("xml:")?Yi:null}function X(e,t,n,r={}){let o=es(e,t,n,r);return e.localName==="link"&&Kt(e,t,r.reactive?"reactive":"runtime"),o}function es(e,t,n,r){let o=Qi(e,t),i=o?t.slice(t.indexOf(":")+1):t;if(he(t))return!1,o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let s=n==null||n===!1?null:n===!0?"":String(n),a=Ut(e,t,s,r.reactive?"reactive":"runtime");if(a!==M.None)return mr(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(Xe(t))return!1,o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let l=Xi(e),c=l?t.toLowerCase():t;if(typeof n=="boolean"){if(t.length>5&&t.slice(0,5).toLowerCase()==="aria-"){let g=n?"true":"false";return(o?e.getAttributeNS(o,i):e.getAttribute(t))!==g&&(o?e.setAttributeNS(o,t,g):e.setAttribute(t,g)),!0}return l&&Zi.has(c)&&c in e?pr(e,c,n):n?o?e.setAttributeNS(o,t,""):e.setAttribute(t,""):o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0}let u=String(n);if(r.syncValueProperty!==!1&&l&&(c==="value"||c==="checked")&&c in e)return pr(e,c,c==="checked"?!!n:u),!0;let f=u===""?"":sr(t,u,{element:e});return f===null?(o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0):((o?e.getAttributeNS(o,i):e.getAttribute(t))===f||(o?e.setAttributeNS(o,t,f):e.setAttribute(t,f)),!0)}function Jt(e,t,n){if(Xe(t))return!1,!1;let r=Ut(e,t,n,"static");return r!==M.None?(mr("html (static attribute)",t,r),!1):(e.setAttribute(t,n),e.localName==="link"&&Kt(e,t,"static"),!0)}var ts=4096,Gt=[];function ns(){return{sig:null,sub:null,epoch:0,depVersion:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function rs(e,t,n){let r=Gt.pop();if(r)return r.sig=e,r.sub=t,r.epoch=n,r;let o=ns();return o.sig=e,o.sub=t,o.epoch=n,o}function gr(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,Gt.length<ts&&Gt.push(e)}function os(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 br(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 is(e,t){let n=e.depsTail??null;t.subPrev=n,t.subNext=null,n?n.subNext=t:e.depsHead=t,e.depsTail=t}function ss(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 Q=null,le=null,ye=0,Se=[],B=new Set,as=[];function ls(e){try{e()}catch(t){let n=e;w(t,{phase:n._errorPhase??"effect",name:n.__name,node:n._errorNode})}}function cs(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 ie=0,ce=!1;function Zt(){ie===0&&(le=Q,Q=null,ce=!0),ie++}function Xt(){ie--,ie===0&&(Q=le,le=null,ce=!1)}function hr(){return ce}function yr(e){Zt();try{return e()}finally{Xt()}}var G=null;function Qt(){return G}function vt(e,t){let n=G;G=e;try{return t()}finally{G=n}}function en(e){let t=G;return t===null?e:(...n)=>vt(t,()=>e(...n))}var Ie=null,us=0;function tn(e,t){let n=Q,r=0,o=null;ce&&(r=ie,o=le,ie=0,le=null,ce=!1),Q=t;let i=t;i._cap===void 0&&(i._cap=Gn());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 l=Ie;l!==null&&!i._epoch&&!i._c&&i._owner==null&&(i._owner=l),i._tok!=null&&(Ie=i._tok);let c=++us;i._epoch=c,i._structDirty=!1;for(let u=i.depsHead??null;u!==null;u=u.subNext){let f=u.sig;u.prevActive=f.__activeNode??null,f.__activeNode=u}try{e()}finally{Q=n,G=s,Ie=l,r!==0&&(ie=r,le=o,ce=!0);let u=i.depsHead??null;for(;u!==null;){let f=u.subNext,m=u.sig;m.__activeNode=u.prevActive,u.prevActive=null,u.epoch!==c&&(ss(u),br(u),gr(u)),u=f}}}function Sr(e,t){if(!t)return nn(e);Be(t);let n=Q,r=0,o=null;ce&&(r=ie,o=le,ie=0,le=null,ce=!1),Q=t;let i=t;i._scope===void 0&&(i._scope=G);let s=G;G=i._scope;try{e()}finally{Q=n,G=s,r!==0&&(ie=r,le=o,ce=!0);for(let a=i.depsHead??null;a!==null;a=a.subNext){let l=a.sig;l.__activeNode=a.prevActive,a.prevActive=null}}return i._dispose??(i._dispose=()=>Be(t))}function nn(e,t,n){return xr(e,t,n===!0)._dispose}function vr(e,t){let n=xr(e,t,!0);return{stop:n._dispose,run:r=>{let o=Ie;Ie=n._tok??null;try{return r()}finally{Ie=o}}}}function xr(e,t,n){let r=()=>{let i=o;if(!(i._disposed||i._reentrant)){i._reentrant=!0;try{tn(e,o)}finally{i._reentrant=!1}}},o=r;o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._runEpoch=0,o._runs=0,o._reentrant=!1,o._disposed=!1,o._errorPhase="binding",o._errorNode=t,o._tok=null,o._owner=null,n&&(o._tok={sub:o});try{r()}catch(i){throw o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),Be(o),i}return o._dispose=()=>{o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),Be(o)},o}function Er(e){if(!Q)return;let t=Q,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=rs(e,t,r);i.depVersion=n.__v??Number.NaN,i.prevActive=o,n.__activeNode=i,is(t,i),os(n,i),t._structDirty=!0}function Be(e){let t=e;t._owner!=null&&(t._owner=null);let n=t.depsHead??null;for(t.depsHead=null,t.depsTail=null;n;){let r=n.subNext;br(n),gr(n),n=r}}var ht=1e3,yt=1e6,St=0,ke=new Set;function Tr(e){let t=ht;return Number.isFinite(e)&&e>0&&(ht=Math.floor(e)),t}function wr(e){let t=yt;return Number.isFinite(e)&&e>0&&(yt=Math.floor(e)),t}function ds(e){let t=e;return t._runEpoch!==St?(t._runEpoch=St,t._runs=1,!1):(t._runs=(t._runs??0)+1,t._runs>ht)}function fs(e){let t=e.__name??"<unnamed>";w(new Error(`subscriber "${t}" fired more than ${ht} 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 ps(){w(new Error(`Notification drain exceeded ${yt} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`),{phase:"scheduler"})}function kr(){let e=0;for(;e<Se.length;){if(e>=yt){ps();break}let t=Se[e++];B.delete(t)&&(t._owner!=null&&B.size>0&&(ms(t),B.has(t))||Ar(t))}}function ms(e){for(;;){let t=null;for(let n=e._owner??null;n!==null;){let r=n.sub;if(r===null)break;B.has(r)&&(t=r),n=r._owner??null}if(t===null)return;B.delete(t),Ar(t)}}function Ar(e){if(ke.size>0&&ke.has(e)||e._hasComputedDep===!0&&!cs(e))return;if(ds(e)){fs(e),ke.add(e);return}let t=Yn(e._cap??null);try{ls(e)}finally{t&&Zn()}}function _r(){if(!(ye>0)){ye++,St++;try{kr()}finally{ye--,ye===0&&(Se.length=0,B.clear(),ke.size>0&&ke.clear())}}}function Yt(e){e();let t=e._sig;if(!t)return;let n=as,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 B.has(s)||(B.add(s),Se.push(s));i=i.sigNext}}}function Cr(e){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&(r._c?Yt(r):B.has(r)||(B.add(r),Se.push(r))),n=n.sigNext}}function Nr(e){let n=e.subsHead;if(n){if(ye>0){let r=n;for(;r;){let o=r.sub;o&&(o._c?Yt(o):B.has(o)||(B.add(o),Se.push(o))),r=r.sigNext}return}ye++,St++;try{let r=n;for(;r;){let o=r.sub;o&&(o._c?Yt(o):B.has(o)||(B.add(o),Se.push(o))),r=r.sigNext}kr()}finally{ye--,ye===0&&(Se.length=0,B.clear(),ke.size>0&&ke.clear())}}}function Rr(e){return e.__sc??0}function Lr(e){let t=e,n=[],r=t.depsHead??null;for(;r;)r.sig&&n.push(r.sig),r=r.subNext;return n}function Mr(e,t){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&t(r),n=n.sigNext}}var Or="4.14.1",Dr=Symbol.for("sibujs.reactive.v1");function bs(){let e=globalThis,t=e[Dr];if(t)return!1,t;let n={suspendTracking:Zt,resumeTracking:Xt,isTrackingSuspended:hr,untracked:yr,retrack:tn,track:Sr,reactiveBinding:nn,recordDependency:Er,cleanup:Be,setMaxSubscriberRepeats:Tr,setMaxDrainIterations:wr,drainNotificationQueue:_r,queueSignalNotification:Cr,notifySubscribers:Nr,getSubscriberCount:Rr,getSubscriberDeps:Lr,forEachSubscriber:Mr,getOwnerScope:Qt,runWithOwnerScope:vt,bindOwnerScope:en,structuralBinding:vr,version:Or};return e[Dr]=n,n}var O=bs(),Ae=O.suspendTracking,_e=O.resumeTracking,Hr=O.isTrackingSuspended,ee=O.untracked,ve=O.retrack,Fe=O.track,$=O.reactiveBinding,Ce=O.recordDependency,Ne=O.cleanup,Pu=O.setMaxSubscriberRepeats,Pr=O.setMaxDrainIterations,$r=O.drainNotificationQueue,Ir=O.queueSignalNotification,ze=O.notifySubscribers,$u=O.getSubscriberCount,Iu=O.getSubscriberDeps,Bu=O.forEachSubscriber,je=O.getOwnerScope??Qt,xt=O.runWithOwnerScope??vt,z=O.bindOwnerScope??en,Re=O.structuralBinding??((e,t)=>({stop:O.reactiveBinding(e,t),run:n=>n()}));function Qe(e,t,n){if(he(t))return X(e,t,"",{label:`bindAttribute("${t}")`}),()=>{};function r(){let o;try{o=n()}catch(i){w(i,{phase:"binding",name:`bindAttribute("${t}")`,node:e});return}X(e,t,o,{label:`bindAttribute("${t}")`,reactive:!0})}return $(r,e)}function Br(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(l){w(l,{phase:"binding",name:"bindDynamic (name getter)",node:e});return}let a;try{a=typeof n=="function"?n():n}catch(l){w(l,{phase:"binding",name:"bindDynamic (value getter)",node:e});return}r!==null&&r!==s&&(e.removeAttribute(r),r=null),X(e,s,a,{label:"bindDynamic",reactive:!0})&&(r=s)}let i=$(o,e);return()=>{i(),r!==null&&e.removeAttribute(r)}}var rn=["data-focus-key","id","name"],hs=new Set(["text","search","url","tel","password",""]);function ys(e){let t=e.tagName;if(!(t==="TEXTAREA"||t==="INPUT"&&hs.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 et(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<rn.length;i++){let s=t.getAttribute(rn[i]);if(s){r=rn[i],o=s;break}}return{el:t,attr:r,value:o,tag:t.tagName,...ys(t)}}function Ss(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function vs(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 l=0;l<a.length;l++)r++,n??(n=a[l]);if(r>1)return{el:null,count:r}}return r===1?{el:n,count:r}:{el:null,count:r}}function Fr(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 We(e,t,n,r){if(!e||typeof document>"u"||r==="discard")return;let o=document.activeElement;if(o===e.el||o&&o!==document.body&&o!==document.documentElement)return;if(e.el.isConnected){Fr(e.el,e);return}let i=!1;if(e.attr&&e.value){let{el:s,count:a}=vs(t,`[${e.attr}=${Ss(e.value)}]`);if(s&&s.tagName===e.tag){Fr(s,e);return}i=a>1}if(r!==void 0&&typeof r=="object"){let s=typeof r.restoreTo=="function"?r.restoreTo():r.restoreTo;if(s?.isConnected&&(s.focus(),document.activeElement===s))return}}function ue(e,t){let n=[],r=re();function o(){let i;try{i=F(r,t)}catch(f){w(f,{phase:"binding",name:"bindChildNode",node:e});return}let s=et(n);if(i==null||typeof i=="boolean"){for(let f=0;f<n.length;f++){let m=n[f];L(m),m.parentNode&&m.parentNode.removeChild(m)}n.length=0,We(s,n,"bindChildNode");return}let a=e.parentNode;if(!a){n.length=0;return}let l;if(Array.isArray(i)){l=[];let f=new Set;for(let m=0;m<i.length;m++){let g=i[m];if(g==null||typeof g=="boolean")continue;let p=g instanceof Node?g:document.createTextNode(String(g));if(f.has(p)){!1;continue}f.add(p),l.push(p)}}else l=[i instanceof Node?i:document.createTextNode(String(i))];let c;if(n.length>0&&l.length>0){let f=new Set(n);c=new Set;for(let m=0;m<l.length;m++)f.has(l[m])&&c.add(l[m])}for(let f=0;f<n.length;f++){let m=n[f];c?.has(m)||(L(m),m.parentNode&&m.parentNode.removeChild(m))}let u=e;for(let f=0;f<l.length;f++){let m=l[f];u.nextSibling!==m&&a.insertBefore(m,u.nextSibling),u=m}n=l,We(s,l,"bindChildNode")}return $(o,e,!0)}function on(){throw new Error("[SibuJS] renderToString needs a DOM: register happy-dom or jsdom globals first.")}function W(){typeof document>"u"&&on()}var R="http://www.w3.org/2000/svg",xs=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);var sn=new Set,zr=100,jr=!1,Wr=new Map;function Vr(e){let t=Wr.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),Wr.set(e,t)),t}function Es(e,t){if(typeof t=="function"){let r=t,o=[],i=!1,s=$(()=>{let a=r();if(a===null||typeof a!="object"){o=[],i=!0,e.setAttribute("style",mt(String(a),{element:e}));return}let l=e.style;i&&(e.removeAttribute("style"),i=!1);let c=[];for(let u in a){if(!Object.hasOwn(a,u))continue;let f=a[u];if(f==null)continue;let m=Vr(u);c.push(m),l.setProperty(m,pt(m,String(f),{element:e}))}for(let u=0;u<o.length;u++)c.indexOf(o[u])===-1&&l.removeProperty(o[u]);o=c},e);E(e,s);return}if(typeof t=="string"){e.setAttribute("style",mt(t,{element:e}));return}let n=e;for(let r in t){if(!Object.hasOwn(t,r))continue;let o=t[r],i=Vr(r);if(typeof o=="function"){let s=o,a=$(()=>{n.style.setProperty(i,pt(i,String(s()),{element:e}))},e);E(e,a)}else n.style.setProperty(i,pt(i,String(o),{element:e}))}}function Ts(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=$(()=>{let s=t();s==null||s===!1?e.removeAttribute("class"):e.setAttribute("class",s)},e);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=$(()=>{let a="";for(let l in n){if(!Object.hasOwn(n,l))continue;let c=n[l];(typeof c=="function"?c():c)&&(a=a?`${a} ${l}`:l)}e.setAttribute("class",a)},e);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(e,ue(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(e,ue(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(e,ue(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=cr(e);return(r,o)=>{if(n)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);typeof document>"u"&&on();let i=Ye(e,t);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),an(i,o),i):(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&&Ts(i,a);let l=s.id;typeof l=="function"?E(i,Qe(i,"id",l)):l!=null&&(!1,i.id=l);let c=o!==void 0?o:s.nodes;c!=null&&an(i,c);let u=s.on;if(u)for(let g in u){if(!Object.hasOwn(u,g))continue;let p=u[g];typeof p=="function"?i.addEventListener(g,p):!1}let f=s.style;f!=null&&Es(i,f);let m=s.ref;m&&(m.current=i);for(let g in s)switch(g){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{if(!Object.hasOwn(s,g))continue;let p=s[g];if(p==null||he(g))continue;typeof p=="function"?E(i,Qe(i,g,p)):X(i,g,p,{syncValueProperty:!1,label:"tagFactory"})}}return typeof s.onElement=="function"&&s.onElement(i),i}}var dd=d("html"),ws=d("head"),ks=d("body"),As=d("title"),_=d("div"),H=d("span"),_s=d("section"),Cs=d("article"),Ns=d("header"),Rs=d("footer"),Ls=d("nav"),Ms=d("main"),Os=d("aside"),Ds=d("address"),ln=d("p"),Hs=d("h1"),Ps=d("h2"),cn=d("h3"),$s=d("h4"),Is=d("h5"),Bs=d("h6"),Fs=d("blockquote"),zs=d("dd"),js=d("dl"),Ws=d("dt"),Vs=d("figcaption"),qs=d("figure"),Us=d("hr"),Ks=d("li"),Js=d("ol"),Gs=d("ul"),un=d("pre"),Ys=d("a"),Zs=d("abbr"),Xs=d("b"),Qs=d("bdi"),ea=d("bdo"),ta=d("br"),na=d("cite"),dn=d("code"),ra=d("data"),oa=d("dfn"),ia=d("em"),sa=d("i"),aa=d("kbd"),la=d("mark"),ca=d("q"),ua=d("rp"),da=d("rt"),fa=d("ruby"),pa=d("s"),ma=d("samp"),ga=d("small"),ba=d("strong"),ha=d("sub"),ya=d("sup"),Sa=d("time"),va=d("u"),xa=d("var"),Ea=d("area"),Ta=d("audio"),wa=d("img"),ka=d("map"),Aa=d("track"),_a=d("video"),Ca=d("embed"),Na=d("iframe"),Ra=d("object"),La=d("param"),Ma=d("picture"),Oa=d("portal"),Da=d("source"),Ha=d("svg",R),Pa=d("math"),$a=d("canvas"),Ia=d("noscript"),Ba=d("script"),Fa=d("del"),za=d("ins"),ja=d("caption"),Wa=d("col"),Va=d("colgroup"),qa=d("table"),Ua=d("tbody"),Ka=d("td"),Ja=d("tfoot"),Ga=d("th"),Ya=d("thead"),Za=d("tr"),tt=d("button"),Xa=d("datalist"),Qa=d("fieldset"),el=d("form"),tl=d("input"),nl=d("label"),rl=d("legend"),ol=d("meter"),il=d("optgroup"),sl=d("option"),al=d("output"),ll=d("progress"),cl=d("select"),ul=d("textarea"),dl=d("details"),fl=d("dialog"),pl=d("menu"),ml=d("summary"),gl=d("slot"),bl=d("template"),hl=d("base"),yl=d("link"),Sl=d("meta"),Le=d("style"),vl=d("circle",R),xl=d("ellipse",R),El=d("g",R),Tl=d("line",R),wl=d("path",R),kl=d("polygon",R),Al=d("polyline",R),_l=d("rect",R),Cl=d("text",R),Nl=d("tspan",R),Rl=d("defs",R),Ll=d("clipPath",R),Ml=d("mask",R),Ol=d("pattern",R),Dl=d("linearGradient",R),Hl=d("radialGradient",R),Pl=d("stop",R),$l=d("use",R),Il=d("symbol",R),Bl=d("marker",R),Fl=d("center"),zl=d("font"),jl=d("marquee"),Wl=e=>d(e);var qr,fn=globalThis[qr=Symbol.for("sibujs.streamBoundary.v1")]??(globalThis[qr]={hook:null,current:null});function Ur(e){return fn.hook?fn.hook(e):null}function Et(){return fn.current}var pn=Symbol.for("sibujs.ssr.v1");function Vl(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let n=null,r=process.getBuiltinModule;typeof r=="function"?n=r("node:async_hooks"):typeof Dt=="function"&&(n=Dt("async_hooks")),n&&(e=new n.AsyncLocalStorage)}let t=globalThis.AsyncLocalStorage;!e&&typeof t=="function"&&(e=new t)}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0,locale:void 0},fallbackDepth:0}}var xe=globalThis[pn]??(globalThis[pn]=Vl()),Oe=xe.als,Me=xe.fallbackStore;xe.fallbackDepth??(xe.fallbackDepth=0);var Kr=!1;function ql(){if(Kr||Oe||!(typeof process<"u"&&!!process.versions?.node))return;Kr=!0;let t=process.versions.node;`${t}`}function Ee(){if(Oe){let e=Oe.getStore();if(e)return e}return Me}function mn(){return Oe?Oe.getStore()??null:xe.fallbackDepth>0?Me:null}function j(){return Ee().ssr}function Jr(e){if(!j())return null;let t=Ee(),n=t.caches??(t.caches=new Map),r=n.get(e);return r||(r=new Map,n.set(e,r)),r}var Ul=Symbol.for("sibujs.prerender.v1");function nt(){return Ee().ssr||globalThis[Ul]!==void 0}function Gr(){return!nt()}function Yr(){Ee().ssr=!0}function Zr(){Ee().ssr=!1}function Xr(e){let t={ssr:!0,suspenseIdCounter:0,idCounter:0,locale:void 0,pending:new Set,wake:null};if(Oe)return Oe.run(t,e);ql();let n={...Me};Object.assign(Me,t),xe.fallbackDepth++;try{return e()}finally{xe.fallbackDepth--;for(let r of Object.keys(Me))r in n||delete Me[r];Object.assign(Me,n)}}function Qr(e,t,n=!0){let r=mn(),o=r?.pending,i=o||!n?[]:It();if(!o&&i.length===0)return e;let s={label:t,since:Date.now(),boundary:Et()??void 0};o?.add(s);let a=Jn(i,s),l=()=>{o?.delete(s),r?.wake?.(),a()};try{Promise.resolve(e).then(l,l)}catch{l()}return e}function eo(e){let t=Ee(),n=t.ssr;t.ssr=!0;try{return e()}finally{n||(t.ssr=!1)}}var gn="__sibuPendingError";function to(e,t){let n=()=>e.parentNode?(w(t,{phase:"render",name:"lazy",node:e}),!0):!1;n()||queueMicrotask(()=>{n()||(e[gn]=t)})}function Tt(e){let t=e,n=t[gn];if(n instanceof Error)return delete t[gn],n}function no(e){let t=null;return function(){if(t&&!Wn())return t();let r=_({class:"sibu-lazy"}),o=re(),i=Et(),s=!1,a=F(null,()=>H("sibu-lazy-loading","Loading..."));if(t){let l=t;return U(r,F(o,()=>l())),r}return Qr(e(),"lazy").then(z(l=>{if(s)return;t=l.default;let c=t,u=()=>F(o,()=>c()),f=i?i.enter(u):u();U(r,f)})).catch(l=>{if(s)return;let c=l instanceof Error?l:new Error(String(l));U(r,_({class:"sibu-lazy-error"},`Failed to load component: ${c.message}`)),to(r,c)}),se()&&r.firstChild||r.appendChild(a),E(r,()=>{s=!0}),r}}function ro({nodes:e,fallback:t}){let n=_({class:"sibu-suspense"}),r=re(),o=Ur(n),i=f=>{U(n,f),o?.done()},s=F(null,t);se()&&n.firstChild?L(s):n.appendChild(s);let a=!1,l=null,c=null;E(n,()=>{a=!0,l&&(l.disconnect(),l=null),c&&!n.contains(c)&&L(c)});let u=z(()=>{if(!a)try{let f=o?o.enter(()=>F(r,e)):F(r,e);if(c=f,f.classList.contains("sibu-lazy")){if(!f.querySelector(".sibu-lazy-loading")){i(f);return}l=new MutationObserver(()=>{if(a)return;f.querySelector(".sibu-lazy-loading")||(l?.disconnect(),l=null,i(f))}),l.observe(f,{childList:!0,subtree:!0})}else i(f)}catch(f){let m=f instanceof Error?f:new Error(String(f));to(n,m)}});return queueMicrotask(u),n}function Sn(e,t){return()=>je()===e?t():xt(e,t)}function kt(e,t){try{return e()}catch(n){let r=t.toLowerCase().includes("unmount")?"cleanup":"effect";w(n,{phase:r,name:t});return}}function bn(e,t,n,r,o){let i=kt(e,t);if(typeof i!="function")return;let s=Sn(o,i);r()||!n.isConnected?kt(s,"onUnmount"):io(s,n)}var Ve=new WeakMap,De=new WeakMap,de=new Set,fe=new Set,qe=null,wt=0,Kl=256;function hn(e){let t=Ve.get(e);if(t){Ve.delete(e),de.delete(e);for(let n of t)try{n()}catch{}}}function yn(e){De.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let n=De.get(e);if(n){De.delete(e),fe.delete(e);for(let r of n)try{r()}catch{}}})}function Jl(e){if(de.size===0||e.nodeType!==1)return;let t=e;if(de.has(t)&&t.isConnected&&hn(t),t.firstElementChild)for(let n of Array.from(de))n!==t&&n.isConnected&&t.contains(n)&&hn(n)}function Gl(e){if(fe.size===0||e.nodeType!==1)return;let t=e;if(fe.has(t)&&!t.isConnected&&yn(t),t.firstElementChild)for(let n of Array.from(fe))n!==t&&!n.isConnected&&t.contains(n)&&yn(n)}function Yl(){if(de.size>0)for(let e of Array.from(de))e.isConnected&&hn(e);if(fe.size>0)for(let e of Array.from(fe))e.isConnected||yn(e)}function oo(){qe||typeof document>"u"||(qe=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++)Jl(t.addedNodes[n]);if(t.removedNodes.length>0)for(let n=0;n<t.removedNodes.length;n++)Gl(t.removedNodes[n])}wt+=e.length,wt>=Kl&&(wt=0,Yl()),vn()}),qe.observe(document.body,{childList:!0,subtree:!0}))}function vn(){qe&&de.size===0&&fe.size===0&&(qe.disconnect(),qe=null,wt=0)}function Zl(e,t){let n=Ve.get(e);return n||(n=[],Ve.set(e,n)),n.push(t),de.add(e),oo(),()=>{let r=Ve.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Ve.delete(e),de.delete(e))}vn()}}function Xl(e,t){let n=De.get(e);return n||(n=[],De.set(e,n)),n.push(t),fe.add(e),oo(),()=>{let r=De.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(De.delete(e),fe.delete(e))}vn()}}function At(e,t){if(typeof document>"u"||j())return;let n=je();if(e=Sn(n,e),t){let r=!1,o=()=>r;if(E(t,()=>{r=!0}),t.isConnected){queueMicrotask(()=>{r||bn(e,"onMount",t,o,n)});return}queueMicrotask(()=>{if(r)return;if(t.isConnected){bn(e,"onMount",t,o,n);return}let i=Zl(t,()=>{r||bn(e,"onMount",t,o,n)});E(t,i)})}else queueMicrotask(()=>{kt(e,"onMount")})}function Ql(e,t){typeof document>"u"||j()||io(Sn(je(),e),t)}function io(e,t){let n=!1,r=()=>{n||(n=!0,kt(e,"onUnmount"))};E(t,r);let o=()=>{if(n)return;let i=Xl(t,r);E(t,i)};t.isConnected?o():At(()=>{o()},t)}function ec(e,t){E(t,e)}function Y(e,t,n){try{e.emit(t,n)}catch{}}var co=globalThis;function tc(e,t){let n,r=!0;return()=>{let o=e();if(r)r=!1,n=o,ee(()=>t(o,void 0));else{let i=n;n=o,ee(()=>t(o,i))}}}var so=100;function _t(e){let t=e.userCleanups;if(t.length===0)return;e.userCleanups=[];let n=e.subscriber._scope??null;n===je()?ao(t):xt(n,()=>ao(t))}function ao(e){for(let t=e.length-1;t>=0;t--)try{e[t]()}catch(n){w(n,{phase:"cleanup"})}}function lo(e){let t=1;do e.rerunPending=!1,e.userCleanups.length>0&&_t(e),ve(e.bodyFn,e.subscriber);while(e.rerunPending&&++t<=so);e.rerunPending&&(e.rerunPending=!1,w(new Error(`effect re-requested itself ${so}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),{phase:"effect"}))}function nc(e){if(e.disposed)return;e.disposed=!0;let t=co.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(t)try{t.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&_t(e)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",n)}try{Ne(e.subscriber)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",n)}}function Z(e,t){if(j()&&!t?.server)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&&_t(n),ve(n.bodyFn,o),n.rerunPending&&lo(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&&lo(n)}catch(s){throw n.disposed=!0,n.userCleanups.length>0&&_t(n),Ne(n.subscriber),s}finally{n.running=!1,n.rerunPending=!1}let i=co.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&Y(i,"effect:create",{effectFn:e}),()=>nc(n)}var rt=0,xn=new Set;function rc(e){rt++;try{return e()}finally{rt--,rt===0&&sc()}}function oc(e){return rt===0?!1:(xn.add(e),!0)}function ic(){return rt>0}function sc(){try{for(let e of xn)Ir(e)}finally{xn.clear()}$r()}var uo=Symbol.for("sibujs.reactive.batch.v1");function ac(){let e=globalThis,t=e[uo];if(t)return t;let n={batch:rc,enqueueBatchedSignal:oc,isBatching:ic};return e[uo]=n,n}var En=ac(),V=En.batch,He=En.enqueueBatchedSignal,lc=En.isBatching;var Tn=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=void 0,o=t?.equals;r&&(n.__name=r);function i(){return Ce(n),n.value}i.__signal=n,r&&(i.__name=r);let s;if(o?s=a=>{let l=n.value,c=typeof a=="function"?a(l):a;if(!o(l,c)){if(n.value=c,n.__v++,!1){let u=Tn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;u&&Y(u,"signal:update",{signal:n,name:r,oldValue:l,newValue:c})}He(n)||ze(n)}}:s=a=>{let l=n.value,c=typeof a=="function"?a(l):a;Object.is(c,l)||(n.value=c,n.__v++,He(n)||ze(n))},!1){let a=Tn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&Y(a,"signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}function cc(e){let[t,n]=C(0,e?.name?{name:e.name}:void 0);return{track(){t()},invalidate(){n(r=>r+1)}}}var uc=`
|
|
8
8
|
.sibu-error-display {
|
|
9
9
|
border: 1px solid var(--sibu-err-border, #e5484d);
|
|
10
10
|
border-radius: 10px;
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
} from "./chunk-3HZOSMPX.js";
|
|
6
6
|
import {
|
|
7
7
|
derived
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZYK4NZZA.js";
|
|
9
9
|
import {
|
|
10
10
|
globalSingleton
|
|
11
11
|
} from "./chunk-7ZHH77QA.js";
|
|
12
12
|
import {
|
|
13
13
|
effect
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-FFXZ6ELZ.js";
|
|
15
15
|
import {
|
|
16
16
|
sanitizeUrl
|
|
17
17
|
} from "./chunk-B3HOT4TK.js";
|
|
@@ -24,10 +24,10 @@ import {
|
|
|
24
24
|
import {
|
|
25
25
|
batch,
|
|
26
26
|
signal
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-FCWOMATN.js";
|
|
28
28
|
import {
|
|
29
29
|
untracked
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-LAHX7XFG.js";
|
|
31
31
|
import {
|
|
32
32
|
reportError
|
|
33
33
|
} from "./chunk-S37PZD6I.js";
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "./chunk-UYTYNCMZ.js";
|
|
4
4
|
import {
|
|
5
5
|
emitDevtools
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FCWOMATN.js";
|
|
7
7
|
import {
|
|
8
8
|
cleanup,
|
|
9
9
|
getOwnerScope,
|
|
10
10
|
retrack,
|
|
11
11
|
runWithOwnerScope,
|
|
12
12
|
untracked
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-LAHX7XFG.js";
|
|
14
14
|
import {
|
|
15
15
|
reportError
|
|
16
16
|
} from "./chunk-S37PZD6I.js";
|
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
Route,
|
|
3
3
|
createRouter,
|
|
4
4
|
route
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-L2IPKGUJ.js";
|
|
6
6
|
import {
|
|
7
7
|
DEFAULT_SETTLE_TIMEOUT,
|
|
8
8
|
assembleDocument,
|
|
9
9
|
collectServerHead,
|
|
10
10
|
renderToStringAsync
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-TOV4PN3P.js";
|
|
12
12
|
import {
|
|
13
13
|
assertRequestIsolation,
|
|
14
14
|
getRequestStore,
|
|
@@ -7,17 +7,17 @@ import {
|
|
|
7
7
|
planMetaEntry,
|
|
8
8
|
recordServerHead,
|
|
9
9
|
serializeHeadEntry
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-TOV4PN3P.js";
|
|
11
11
|
import {
|
|
12
12
|
appendChildren,
|
|
13
13
|
resolveClassValue
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ZKI4SDZ2.js";
|
|
15
15
|
import {
|
|
16
16
|
setSafeAttribute
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-3T7TWMSD.js";
|
|
18
18
|
import {
|
|
19
19
|
effect
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-FFXZ6ELZ.js";
|
|
21
21
|
import {
|
|
22
22
|
sanitizeUrl,
|
|
23
23
|
stripControlChars
|
|
@@ -28,14 +28,14 @@ import {
|
|
|
28
28
|
} from "./chunk-UYTYNCMZ.js";
|
|
29
29
|
import {
|
|
30
30
|
signal
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-FCWOMATN.js";
|
|
32
32
|
import {
|
|
33
33
|
bindOwnerScope,
|
|
34
34
|
getOwnerScope,
|
|
35
35
|
runWithOwnerScope,
|
|
36
36
|
track,
|
|
37
37
|
untracked
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-LAHX7XFG.js";
|
|
39
39
|
import {
|
|
40
40
|
dispose,
|
|
41
41
|
registerDisposer
|
|
@@ -577,7 +577,7 @@ function forEachSubscriber(signal, visit) {
|
|
|
577
577
|
}
|
|
578
578
|
|
|
579
579
|
// src/reactivity/track.ts
|
|
580
|
-
var _runtimeVersion = true ? "4.14.
|
|
580
|
+
var _runtimeVersion = true ? "4.14.1" : "dev";
|
|
581
581
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
582
582
|
function resolveReactiveApi() {
|
|
583
583
|
const g = globalThis;
|
|
@@ -4,22 +4,22 @@ import {
|
|
|
4
4
|
} from "./chunk-N5TBYXHW.js";
|
|
5
5
|
import {
|
|
6
6
|
watch
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4XCWNGRY.js";
|
|
8
8
|
import {
|
|
9
9
|
createId,
|
|
10
10
|
domBinding,
|
|
11
11
|
idSegment
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OPRQW4LI.js";
|
|
13
13
|
import {
|
|
14
14
|
derived
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ZYK4NZZA.js";
|
|
16
16
|
import {
|
|
17
17
|
stripHtml
|
|
18
18
|
} from "./chunk-B3HOT4TK.js";
|
|
19
19
|
import {
|
|
20
20
|
batch,
|
|
21
21
|
signal
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-FCWOMATN.js";
|
|
23
23
|
|
|
24
24
|
// src/widgets/Combobox.ts
|
|
25
25
|
var boundComboboxes = /* @__PURE__ */ new WeakMap();
|
|
@@ -3,23 +3,23 @@ import {
|
|
|
3
3
|
} from "./chunk-3HEX6QJQ.js";
|
|
4
4
|
import {
|
|
5
5
|
tagFactory
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZKI4SDZ2.js";
|
|
7
7
|
import {
|
|
8
8
|
derived
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZYK4NZZA.js";
|
|
10
10
|
import {
|
|
11
11
|
globalSingleton
|
|
12
12
|
} from "./chunk-7ZHH77QA.js";
|
|
13
13
|
import {
|
|
14
14
|
effect
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-FFXZ6ELZ.js";
|
|
16
16
|
import {
|
|
17
17
|
sanitizeCSSDeclaration
|
|
18
18
|
} from "./chunk-B3HOT4TK.js";
|
|
19
19
|
import {
|
|
20
20
|
batch,
|
|
21
21
|
signal
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-FCWOMATN.js";
|
|
23
23
|
|
|
24
24
|
// src/ecosystem/adapters/mobx.ts
|
|
25
25
|
function mobXAdapter(options) {
|